From 67696c5f839b8cd6abf7107ef2cf023dc10ba897 Mon Sep 17 00:00:00 2001 From: Oli Folkerd Date: Sat, 2 Apr 2022 16:43:06 +0100 Subject: [PATCH] update version number to 5.1.8 --- bower.json | 2 +- dist/js/tabulator.js | 12 ++++++++---- dist/js/tabulator.js.map | 2 +- dist/js/tabulator.min.js | 4 ++-- dist/js/tabulator.min.js.map | 2 +- dist/js/tabulator_esm.js | 6 +++--- dist/js/tabulator_esm.js.map | 2 +- dist/js/tabulator_esm.min.js | 4 ++-- dist/js/tabulator_esm.min.js.map | 2 +- package-lock.json | 2 +- package.json | 2 +- 11 files changed, 22 insertions(+), 18 deletions(-) diff --git a/bower.json b/bower.json index af7afc3fc..06183f92c 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "tabulator", "main": "dist/js/tabulator.js", - "version": "5.1.7", + "version": "5.1.8", "description": "Interactive table generation JavaScript library", "keywords": [ "table", diff --git a/dist/js/tabulator.js b/dist/js/tabulator.js index fbf84789b..4b7225fac 100644 --- a/dist/js/tabulator.js +++ b/dist/js/tabulator.js @@ -1,4 +1,4 @@ -/* Tabulator v5.1.7 (c) Oliver Folkerd 2022 */ +/* Tabulator v5.1.8 (c) Oliver Folkerd 2022 */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : @@ -6675,7 +6675,7 @@ } if (this.bindings[type][funcName]) { - console.warn("Unable to bind component handler, a matching function name is already bound", type, funcName, hanlder); + console.warn("Unable to bind component handler, a matching function name is already bound", type, funcName, handler); } else { this.bindings[type][funcName] = handler; } @@ -6683,7 +6683,7 @@ }, { key: "handle", value: function handle(type, component, name) { - if (this.bindings[type] && this.bindings[type][name]) { + if (this.bindings[type] && this.bindings[type][name] && typeof this.bindings[type][name].bind === 'function') { return this.bindings[type][name].bind(null, component); } else { if (name !== "then" && typeof name === "string" && !name.startsWith("_")) { @@ -14115,6 +14115,7 @@ cell.column.definition.cellEditing.call(this.table, component); } + this.dispatch("cell-editing", cell); this.dispatchExternal("cellEditing", component); params = typeof cell.column.modules.edit.params === "function" ? cell.column.modules.edit.params(component) : cell.column.modules.edit.params; cellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params); //if editor returned, add to DOM, if false, abort edit @@ -16073,7 +16074,7 @@ if (newDatetime.isValid) { if (formatterParams.timezone) { - newDatetime = newDatetime.shiftTimezone(formatterParams.timezone); + newDatetime = newDatetime.setZone(formatterParams.timezone); } return newDatetime.toFormat(outputFormat); @@ -20164,6 +20165,8 @@ setTimeout(function () { _this4.table.rowManager.element.addEventListener("scroll", _this4.blurEvent); + _this4.subscribe("cell-editing", _this4.blurEvent); + document.body.addEventListener("click", _this4.blurEvent); document.body.addEventListener("contextmenu", _this4.blurEvent); window.addEventListener("resize", _this4.blurEvent); @@ -20217,6 +20220,7 @@ document.body.removeEventListener("contextmenu", this.blurEvent); window.removeEventListener("resize", this.blurEvent); this.table.rowManager.element.removeEventListener("scroll", this.blurEvent); + this.unsubscribe("cell-editing", this.blurEvent); if (this.currentComponent) { this.dispatchExternal("menuClosed", this.currentComponent.getComponent()); diff --git a/dist/js/tabulator.js.map b/dist/js/tabulator.js.map index 650c517e0..ae60e5151 100644 --- a/dist/js/tabulator.js.map +++ b/dist/js/tabulator.js.map @@ -1 +1 @@ -{"version":3,"file":"tabulator.js","sources":["../../src/js/core/defaults/options.js","../../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/TableRegistry.js","../../src/js/core/Module.js","../../src/js/modules/Layout/defaults/modes/fitData.js","../../src/js/modules/Layout/defaults/modes/fitDataGeneral.js","../../src/js/modules/Layout/defaults/modes/fitDataStretch.js","../../src/js/modules/Layout/defaults/modes/fitColumns.js","../../src/js/modules/Layout/defaults/modes.js","../../src/js/modules/Layout/Layout.js","../../src/js/modules/Localize/defaults/langs.js","../../src/js/modules/Localize/Localize.js","../../src/js/modules/Comms/Comms.js","../../src/js/core/tools/ModuleBinder.js","../../src/js/core/Tabulator.js","../../src/js/modules/Accessor/defaults/accessors.js","../../src/js/modules/Accessor/Accessor.js","../../src/js/modules/Ajax/defaults/config.js","../../src/js/modules/Ajax/defaults/urlGenerator.js","../../src/js/modules/Ajax/defaults/loaderPromise.js","../../src/js/modules/Ajax/defaults/contentTypeFormatters.js","../../src/js/modules/Ajax/Ajax.js","../../src/js/modules/Clipboard/defaults/pasteActions.js","../../src/js/modules/Clipboard/defaults/pasteParsers.js","../../src/js/modules/Clipboard/Clipboard.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/csv.js","../../src/js/modules/Download/defaults/downloaders/json.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/defaults/downloaders/jsonLines.js","../../src/js/modules/Download/defaults/downloaders.js","../../src/js/modules/Download/Download.js","../../src/js/modules/Edit/inputMask.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/select.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/defaults/editors.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/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/defaults/formatters.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/defaults/undoers.js","../../src/js/modules/History/defaults/redoers.js","../../src/js/modules/History/History.js","../../src/js/modules/HtmlTableImport/HtmlTableImport.js","../../src/js/modules/Import/defaults/importers/csv.js","../../src/js/modules/Import/defaults/importers/json.js","../../src/js/modules/Import/defaults/importers.js","../../src/js/modules/Import/Import.js","../../src/js/modules/Interaction/Interaction.js","../../src/js/modules/Keybindings/defaults/bindings.js","../../src/js/modules/Keybindings/defaults/actions.js","../../src/js/modules/Keybindings/Keybindings.js","../../src/js/modules/Menu/Menu.js","../../src/js/modules/MoveColumns/MoveColumns.js","../../src/js/modules/MoveRows/MoveRows.js","../../src/js/modules/Mutator/defaults/mutators.js","../../src/js/modules/Mutator/Mutator.js","../../src/js/modules/Page/defaults/pageCounters/rows.js","../../src/js/modules/Page/defaults/pageCounters/pages.js","../../src/js/modules/Page/defaults/pageCounters.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/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/number.js","../../src/js/modules/Sort/defaults/sorters/string.js","../../src/js/modules/Sort/defaults/sorters/datetime.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/defaults/sorters.js","../../src/js/modules/Sort/Sort.js","../../src/js/modules/Validate/defaults/validators.js","../../src/js/modules/Validate/Validate.js","../../src/js/core/TabulatorFull.js"],"sourcesContent":["export default {\r\n\r\n\tdebugEventsExternal:false, //flag to console log events\r\n\tdebugEventsInternal:false, //flag to console log events\r\n\tdebugInvalidOptions:true, //allow toggling of invalid option warnings\r\n\r\n\theight:false, //height of tabulator\r\n\tminHeight:false, //minimum height of tabulator\r\n\tmaxHeight:false, //maximum height of tabulator\r\n\r\n\tcolumnHeaderVertAlign:\"top\", //vertical alignment of column headers\r\n\r\n\tcolumns:[],//store for colum header info\r\n\tcolumnDefaults:{}, //store column default props\r\n\r\n\tdata:false, //default starting data\r\n\r\n\tautoColumns:false, //build columns from data row structure\r\n\tautoColumnsDefinitions:false,\r\n\r\n\tnestedFieldSeparator:\".\", //separator for nested data\r\n\r\n\ttooltipGenerationMode:\"load\", //when to generate tooltips\r\n\r\n\tfooterElement:false, //hold footer element\r\n\r\n\tindex:\"id\", //filed for row index\r\n\r\n\ttextDirection:\"auto\",\r\n\r\n\taddRowPos:\"bottom\", //position to insert blank rows, top|bottom\r\n\r\n\theaderVisible:true, //hide header\r\n\r\n\trenderVertical:\"virtual\",\r\n\trenderHorizontal:\"basic\",\r\n\trenderVerticalBuffer:0, // set virtual DOM buffer size\r\n\r\n\tscrollToRowPosition:\"top\",\r\n\tscrollToRowIfVisible:true,\r\n\r\n\tscrollToColumnPosition:\"left\",\r\n\tscrollToColumnIfVisible:true,\r\n\r\n\trowFormatter:false,\r\n\trowFormatterPrint:null,\r\n\trowFormatterClipboard:null,\r\n\trowFormatterHtmlOutput:null,\r\n\r\n\tplaceholder:false,\r\n\r\n\tdataLoader:true,\r\n\tdataLoaderLoading:false,\r\n\tdataLoaderError:false,\r\n\tdataLoaderErrorTimeout:3000,\r\n\r\n\tdataSendParams:{},\r\n\r\n\tdataReceiveParams:{},\r\n}\r\n","export default class CoreFeature{\r\n\r\n\tconstructor(table){\r\n\t\tthis.table = table;\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t/////////////// DataLoad /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\treloadData(data, silent){\r\n\t\treturn this.table.dataLoader.load(data, undefined, undefined, undefined, silent);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t///////////// Localization ///////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tlangText(){\r\n\t\treturn this.table.modules.localize.getText(...arguments);\r\n\t}\r\n\r\n\tlangBind(){\r\n\t\treturn this.table.modules.localize.bind(...arguments);\r\n\t}\r\n\r\n\tlangLocale(){\r\n\t\treturn this.table.modules.localize.getLocale(...arguments);\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t////////// Inter Table Comms /////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tcommsConnections(){\r\n\t\treturn this.table.modules.comms.getConnections(...arguments);\r\n\t}\r\n\r\n\tcommsSend(){\r\n\t\treturn this.table.modules.comms.send(...arguments);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Layout /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tlayoutMode(){\r\n\t\treturn this.table.modules.layout.getMode();\r\n\t}\r\n\r\n\tlayoutRefresh(){\r\n\t\treturn this.table.modules.layout.layout();\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t/////////////// Event Bus ////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tsubscribe(){\r\n\t\treturn this.table.eventBus.subscribe(...arguments);\r\n\t}\r\n\r\n\tunsubscribe(){\r\n\t\treturn this.table.eventBus.unsubscribe(...arguments);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.table.eventBus.subscribed(key);\r\n\t}\r\n\r\n\tsubscriptionChange(){\r\n\t\treturn this.table.eventBus.subscriptionChange(...arguments);\r\n\t}\r\n\r\n\tdispatch(){\r\n\t\treturn this.table.eventBus.dispatch(...arguments);\r\n\t}\r\n\r\n\tchain(){\r\n\t\treturn this.table.eventBus.chain(...arguments);\r\n\t}\r\n\r\n\tconfirm(){\r\n\t\treturn this.table.eventBus.confirm(...arguments);\r\n\t}\r\n\r\n\tdispatchExternal(){\r\n\t\treturn this.table.externalEvents.dispatch(...arguments);\r\n\t}\r\n\r\n\tsubscribedExternal(key){\r\n\t\treturn this.table.externalEvents.subscribed(key);\r\n\t}\r\n\r\n\tsubscriptionChangeExternal(){\r\n\t\treturn this.table.externalEvents.subscriptionChange(...arguments);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Options /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\toptions(key){\r\n\t\treturn this.table.options[key];\r\n\t}\r\n\r\n\tsetOption(key, value){\r\n\t\tif(typeof value !== \"undefined\"){\r\n\t\t\tthis.table.options[key] = value;\r\n\t\t}\r\n\r\n\t\treturn this.table.options[key];\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Modules /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tmodule(key){\r\n\t\treturn this.table.module(key);\r\n\t}\r\n}","import Column from './Column.js';\r\n\r\n//public column object\r\nexport default class ColumnComponent {\r\n\tconstructor (column){\r\n\t\tthis._column = column;\r\n\t\tthis.type = \"ColumnComponent\";\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._column.table.componentFunctionBinder.handle(\"column\", target._column, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._column.getElement();\r\n\t}\r\n\r\n\tgetDefinition(){\r\n\t\treturn this._column.getDefinition();\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._column.getField();\r\n\t}\r\n\r\n\tgetTitleDownload() {\r\n\t\treturn this._column.getTitleDownload();\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._column.cells.forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tisVisible(){\r\n\t\treturn this._column.visible;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tif(this._column.isGroup){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\tcolumn.show();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis._column.show();\r\n\t\t}\r\n\t}\r\n\r\n\thide(){\r\n\t\tif(this._column.isGroup){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\tcolumn.hide();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis._column.hide();\r\n\t\t}\r\n\t}\r\n\r\n\ttoggle(){\r\n\t\tif(this._column.visible){\r\n\t\t\tthis.hide();\r\n\t\t}else{\r\n\t\t\tthis.show();\r\n\t\t}\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn this._column.delete();\r\n\t}\r\n\r\n\tgetSubColumns(){\r\n\t\tvar output = [];\r\n\r\n\t\tif(this._column.columns.length){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\toutput.push(column.getComponent());\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetParentColumn(){\r\n\t\treturn this._column.parent instanceof Column ? this._column.parent.getComponent() : false;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._column;\r\n\t}\r\n\r\n\tscrollTo(){\r\n\t\treturn this._column.table.columnManager.scrollToColumn(this._column);\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._column.table;\r\n\t}\r\n\r\n\tmove(to, after){\r\n\t\tvar toColumn = this._column.table.columnManager.findColumn(to);\r\n\r\n\t\tif(toColumn){\r\n\t\t\tthis._column.table.columnManager.moveColumn(this._column, toColumn, after)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching column found:\", toColumn);\r\n\t\t}\r\n\t}\r\n\r\n\tgetNextColumn(){\r\n\t\tvar nextCol = this._column.nextColumn();\r\n\r\n\t\treturn nextCol ? nextCol.getComponent() : false;\r\n\t}\r\n\r\n\tgetPrevColumn(){\r\n\t\tvar prevCol = this._column.prevColumn();\r\n\r\n\t\treturn prevCol ? prevCol.getComponent() : false;\r\n\t}\r\n\r\n\tupdateDefinition(updates){\r\n\t\treturn this._column.updateDefinition(updates);\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\treturn this._column.getWidth();\r\n\t}\r\n\r\n\tsetWidth(width){\r\n\t\tvar result;\r\n\r\n\t\tif(width === true){\r\n\t\t\tresult = this._column.reinitializeWidth(true);\r\n\t\t}else{\r\n\t\t\tresult = this._column.setWidth(width);\r\n\t\t}\r\n\r\n\t\tthis._column.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\treturn result;\r\n\t}\r\n}","export default {\r\n\t\"title\": undefined,\r\n\t\"field\": undefined,\r\n\t\"columns\": undefined,\r\n\t\"visible\": undefined,\r\n\t\"hozAlign\": undefined,\r\n\t\"vertAlign\": undefined,\r\n\t\"width\": undefined,\r\n\t\"minWidth\": 40,\r\n\t\"maxWidth\": undefined,\r\n\t\"maxInitialWidth\": undefined,\r\n\t\"tooltip\": undefined,\r\n\t\"cssClass\": undefined,\r\n\t\"variableHeight\": undefined,\r\n\t\"headerTooltip\": undefined,\r\n\t\"headerVertical\": undefined,\r\n\t\"headerHozAlign\": undefined,\r\n\t\"editableTitle\": undefined,\r\n}","//public cell object\r\nexport default class CellComponent {\r\n\r\n\tconstructor (cell){\r\n\t\tthis._cell = cell;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._cell.table.componentFunctionBinder.handle(\"cell\", target._cell, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetValue(){\r\n\t\treturn this._cell.getValue();\r\n\t}\r\n\r\n\tgetOldValue(){\r\n\t\treturn this._cell.getOldValue();\r\n\t}\r\n\r\n\tgetInitialValue(){\r\n\t\treturn this._cell.initialValue;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._cell.getElement();\r\n\t}\r\n\r\n\tgetRow(){\r\n\t\treturn this._cell.row.getComponent();\r\n\t}\r\n\r\n\tgetData(){\r\n\t\treturn this._cell.row.getData();\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._cell.column.getField();\r\n\t}\r\n\r\n\tgetColumn(){\r\n\t\treturn this._cell.column.getComponent();\r\n\t}\r\n\r\n\tsetValue(value, mutate){\r\n\t\tif(typeof mutate == \"undefined\"){\r\n\t\t\tmutate = true;\r\n\t\t}\r\n\r\n\t\tthis._cell.setValue(value, mutate);\r\n\t}\r\n\r\n\trestoreOldValue(){\r\n\t\tthis._cell.setValueActual(this._cell.getOldValue());\r\n\t}\r\n\r\n\trestoreInitialValue(){\r\n\t\tthis._cell.setValueActual(this._cell.initialValue);\r\n\t}\r\n\r\n\tcheckHeight(){\r\n\t\tthis._cell.checkHeight();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._cell.table;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._cell;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport CellComponent from './CellComponent.js';\r\n\r\nexport default class Cell extends CoreFeature{\r\n\tconstructor(column, row){\r\n\t\tsuper(column.table);\r\n\r\n\t\tthis.table = column.table;\r\n\t\tthis.column = column;\r\n\t\tthis.row = row;\r\n\t\tthis.element = null;\r\n\t\tthis.value = null;\r\n\t\tthis.initialValue;\r\n\t\tthis.oldValue = null;\r\n\t\tthis.modules = {};\r\n\r\n\t\tthis.height = null;\r\n\t\tthis.width = null;\r\n\t\tthis.minWidth = null;\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\tthis.loaded = false; //track if the cell has been added to the DOM yet\r\n\r\n\t\tthis.build();\r\n\t}\r\n\r\n\t//////////////// Setup Functions /////////////////\r\n\t//generate element\r\n\tbuild(){\r\n\t\tthis.generateElement();\r\n\r\n\t\tthis.setWidth();\r\n\r\n\t\tthis._configureCell();\r\n\r\n\t\tthis.setValueActual(this.column.getFieldValue(this.row.data));\r\n\r\n\t\tthis.initialValue = this.value;\r\n\t}\r\n\r\n\tgenerateElement(){\r\n\t\tthis.element = document.createElement('div');\r\n\t\tthis.element.className = \"tabulator-cell\";\r\n\t\tthis.element.setAttribute(\"role\", \"gridcell\");\r\n\t\tthis.element = this.element;\r\n\t}\r\n\r\n\t_configureCell(){\r\n\t\tvar element = this.element,\r\n\t\tfield = this.column.getField(),\r\n\t\tvertAligns = {\r\n\t\t\ttop:\"flex-start\",\r\n\t\t\tbottom:\"flex-end\",\r\n\t\t\tmiddle:\"center\",\r\n\t\t},\r\n\t\thozAligns = {\r\n\t\t\tleft:\"flex-start\",\r\n\t\t\tright:\"flex-end\",\r\n\t\t\tcenter:\"center\",\r\n\t\t};\r\n\r\n\t\t//set text alignment\r\n\t\telement.style.textAlign = this.column.hozAlign;\r\n\r\n\t\tif(this.column.vertAlign){\r\n\t\t\telement.style.display = \"inline-flex\";\r\n\r\n\t\t\telement.style.alignItems = vertAligns[this.column.vertAlign] || \"\";\r\n\r\n\t\t\tif(this.column.hozAlign){\r\n\t\t\t\telement.style.justifyContent = hozAligns[this.column.hozAlign] || \"\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(field){\r\n\t\t\telement.setAttribute(\"tabulator-field\", field);\r\n\t\t}\r\n\r\n\t\t//add class to cell if needed\r\n\t\tif(this.column.definition.cssClass){\r\n\t\t\tvar classNames = this.column.definition.cssClass.split(\" \")\r\n\t\t\tclassNames.forEach((className) => {\r\n\t\t\t\telement.classList.add(className)\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t//update tooltip on mouse enter\r\n\t\tif (this.table.options.tooltipGenerationMode === \"hover\"){\r\n\t\t\telement.addEventListener(\"mouseenter\", (e) => {\r\n\t\t\t\tthis._generateTooltip();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"cell-init\", this);\r\n\r\n\t\t//hide cell if not visible\r\n\t\tif(!this.column.visible){\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\r\n\t//generate cell contents\r\n\t_generateContents(){\r\n\t\tvar val;\r\n\r\n\t\tval = this.chain(\"cell-format\", this, null, () => {\r\n\t\t\treturn this.element.innerHTML = this.value;\r\n\t\t});\r\n\r\n\t\tswitch(typeof val){\r\n\t\t\tcase \"object\":\r\n\t\t\tif(val instanceof Node){\r\n\r\n\t\t\t\t//clear previous cell contents\r\n\t\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\t\tthis.element.appendChild(val);\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.innerHTML = \"\";\r\n\r\n\t\t\t\tif(val != null){\r\n\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);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\tcase \"null\":\r\n\t\t\tthis.element.innerHTML = \"\";\r\n\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\tthis.element.innerHTML = val;\r\n\t\t}\r\n\t}\r\n\r\n\tcellRendered(){\r\n\t\tthis.dispatch(\"cell-rendered\", this);\r\n\t}\r\n\r\n\t//generate tooltip text\r\n\t_generateTooltip(){\r\n\t\tvar tooltip = this.column.tooltip;\r\n\r\n\t\tif(tooltip){\r\n\t\t\tif(tooltip === true){\r\n\t\t\t\ttooltip = this.value;\r\n\t\t\t}else if(typeof(tooltip) == \"function\"){\r\n\t\t\t\ttooltip = tooltip(this.getComponent());\r\n\r\n\t\t\t\tif(tooltip === false){\r\n\t\t\t\t\ttooltip = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof tooltip === \"undefined\"){\r\n\t\t\t\ttooltip = \"\";\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.setAttribute(\"title\", tooltip);\r\n\t\t}else{\r\n\t\t\tthis.element.setAttribute(\"title\", \"\");\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////////// Getters ////////////////////\r\n\tgetElement(containerOnly){\r\n\t\tif(!this.loaded){\r\n\t\t\tthis.loaded = true;\r\n\t\t\tif(!containerOnly){\r\n\t\t\t\tthis.layoutElement();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tgetValue(){\r\n\t\treturn this.value;\r\n\t}\r\n\r\n\tgetOldValue(){\r\n\t\treturn this.oldValue;\r\n\t}\r\n\r\n\t//////////////////// Actions ////////////////////\r\n\tsetValue(value, mutate){\r\n\t\tvar changed = this.setValueProcessData(value, mutate);\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.dispatch(\"cell-value-updated\", this);\r\n\r\n\t\t\tthis.cellRendered();\r\n\r\n\t\t\tif(this.column.definition.cellEdited){\r\n\t\t\t\tthis.column.definition.cellEdited.call(this.table, this.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"cellEdited\", this.getComponent());\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tsetValueProcessData(value, mutate){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(this.value !== value){\r\n\r\n\t\t\tchanged = true;\r\n\r\n\t\t\tif(mutate){\r\n\t\t\t\tvalue = this.chain(\"cell-value-changing\", [this, value], null, value);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.setValueActual(value);\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.dispatch(\"cell-value-changed\", this);\r\n\t\t}\r\n\r\n\t\treturn changed;\r\n\t}\r\n\r\n\tsetValueActual(value){\r\n\t\tthis.oldValue = this.value;\r\n\r\n\t\tthis.value = value;\r\n\r\n\t\tthis.dispatch(\"cell-value-save-before\", this);\r\n\r\n\t\tthis.column.setFieldValue(this.row.data, value);\r\n\r\n\t\tthis.dispatch(\"cell-value-save-after\", this);\r\n\r\n\t\tif(this.loaded){\r\n\t\t\tthis.layoutElement();\r\n\t\t}\r\n\t}\r\n\r\n\tlayoutElement(){\r\n\t\tthis._generateContents();\r\n\t\tthis._generateTooltip();\r\n\r\n\t\tthis.dispatch(\"cell-layout\", this);\r\n\t}\r\n\r\n\tsetWidth(){\r\n\t\tthis.width = this.column.width;\r\n\t\tthis.element.style.width = this.column.widthStyled;\r\n\t}\r\n\r\n\tclearWidth(){\r\n\t\tthis.width = \"\";\r\n\t\tthis.element.style.width = \"\";\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\treturn this.width || this.element.offsetWidth;\r\n\t}\r\n\r\n\tsetMinWidth(){\r\n\t\tthis.minWidth = this.column.minWidth;\r\n\t\tthis.element.style.minWidth = this.column.minWidthStyled;\r\n\t}\r\n\r\n\tsetMaxWidth(){\r\n\t\tthis.maxWidth = this.column.maxWidth;\r\n\t\tthis.element.style.maxWidth = this.column.maxWidthStyled;\r\n\t}\r\n\r\n\tcheckHeight(){\r\n\t\t// var height = this.element.css(\"height\");\r\n\t\tthis.row.reinitializeHeight();\r\n\t}\r\n\r\n\tclearHeight(){\r\n\t\tthis.element.style.height = \"\";\r\n\t\tthis.height = null;\r\n\t}\r\n\r\n\tsetHeight(){\r\n\t\tthis.height = this.row.height;\r\n\t\tthis.element.style.height = this.row.heightStyled;\r\n\t}\r\n\r\n\tgetHeight(){\r\n\t\treturn this.height || this.element.offsetHeight;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tthis.element.style.display = this.column.vertAlign ? \"inline-flex\" : \"\";\r\n\t}\r\n\r\n\thide(){\r\n\t\tthis.element.style.display = \"none\";\r\n\t}\r\n\r\n\tdelete(){\r\n\t\tthis.dispatch(\"cell-delete\", this);\r\n\r\n\t\tif(!this.table.rowManager.redrawBlock && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.column.deleteCell(this);\r\n\t\tthis.row.deleteCell(this);\r\n\t\tthis.calcs = {};\r\n\t}\r\n\r\n\tgetIndex(){\r\n\t\treturn this.row.getCellIndex(this);\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new CellComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport ColumnComponent from './ColumnComponent.js';\r\nimport defaultOptions from './defaults/options.js';\r\n\r\nimport Cell from '../cell/Cell.js';\r\n\r\nclass Column extends CoreFeature{\r\n\r\n\tconstructor(def, parent){\r\n\t\tsuper(parent.table);\r\n\r\n\t\tthis.definition = def; //column definition\r\n\t\tthis.parent = parent; //hold parent object\r\n\t\tthis.type = \"column\"; //type of element\r\n\t\tthis.columns = []; //child columns\r\n\t\tthis.cells = []; //cells bound to this column\r\n\t\tthis.element = this.createElement(); //column header element\r\n\t\tthis.contentElement = false;\r\n\t\tthis.titleHolderElement = false;\r\n\t\tthis.titleElement = false;\r\n\t\tthis.groupElement = this.createGroupElement(); //column group holder element\r\n\t\tthis.isGroup = false;\r\n\t\tthis.tooltip = false; //hold column tooltip\r\n\t\tthis.hozAlign = \"\"; //horizontal text alignment\r\n\t\tthis.vertAlign = \"\"; //vert text alignment\r\n\r\n\t\t//multi dimensional filed handling\r\n\t\tthis.field =\"\";\r\n\t\tthis.fieldStructure = \"\";\r\n\t\tthis.getFieldValue = \"\";\r\n\t\tthis.setFieldValue = \"\";\r\n\r\n\t\tthis.titleDownload = null;\r\n\t\tthis.titleFormatterRendered = false;\r\n\r\n\t\tthis.mapDefinitions();\r\n\r\n\t\tthis.setField(this.definition.field);\r\n\r\n\t\tthis.modules = {}; //hold module variables;\r\n\r\n\t\tthis.width = null; //column width\r\n\t\tthis.widthStyled = \"\"; //column width prestyled to improve render efficiency\r\n\t\tthis.maxWidth = null; //column maximum width\r\n\t\tthis.maxWidthStyled = \"\"; //column maximum prestyled to improve render efficiency\r\n\t\tthis.maxInitialWidth = null;\r\n\t\tthis.minWidth = null; //column minimum width\r\n\t\tthis.minWidthStyled = \"\"; //column minimum prestyled to improve render efficiency\r\n\t\tthis.widthFixed = false; //user has specified a width for this column\r\n\r\n\t\tthis.visible = true; //default visible state\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\t//initialize column\r\n\t\tif(this.definition.columns){\r\n\r\n\t\t\tthis.isGroup = true;\r\n\r\n\t\t\tthis.definition.columns.forEach((def, i) => {\r\n\t\t\t\tvar newCol = new Column(def, this);\r\n\t\t\t\tthis.attachColumn(newCol);\r\n\t\t\t});\r\n\r\n\t\t\tthis.checkColumnVisibility();\r\n\t\t}else{\r\n\t\t\tparent.registerColumnField(this);\r\n\t\t}\r\n\r\n\t\tthis._initialize();\r\n\r\n\t\tthis.bindModuleColumns();\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-col\");\r\n\t\tel.setAttribute(\"role\", \"columnheader\");\r\n\t\tel.setAttribute(\"aria-sort\", \"none\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateGroupElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-col-group-cols\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tmapDefinitions(){\r\n\t\tvar defaults = this.table.options.columnDefaults;\r\n\r\n\t\t//map columnDefaults onto column definitions\r\n\t\tif(defaults){\r\n\t\t\tfor(let key in defaults){\r\n\t\t\t\tif(typeof this.definition[key] === \"undefined\"){\r\n\t\t\t\t\tthis.definition[key] = defaults[key];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.definition = this.table.columnManager.optionsList.generate(Column.defaultOptionList, this.definition)\r\n\t}\r\n\r\n\tcheckDefinition(){\r\n\t\tObject.keys(this.definition).forEach((key) => {\r\n\t\t\tif(Column.defaultOptionList.indexOf(key) === -1){\r\n\t\t\t\tconsole.warn(\"Invalid column definition option in '\" + (this.field || this.definition.title) + \"' column:\", key)\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tsetField(field){\r\n\t\tthis.field = field;\r\n\t\tthis.fieldStructure = field ? (this.table.options.nestedFieldSeparator ? field.split(this.table.options.nestedFieldSeparator) : [field]) : [];\r\n\t\tthis.getFieldValue = this.fieldStructure.length > 1 ? this._getNestedData : this._getFlatData;\r\n\t\tthis.setFieldValue = this.fieldStructure.length > 1 ? this._setNestedData : this._setFlatData;\r\n\t}\r\n\r\n\t//register column position with column manager\r\n\tregisterColumnPosition(column){\r\n\t\tthis.parent.registerColumnPosition(column);\r\n\t}\r\n\r\n\t//register column position with column manager\r\n\tregisterColumnField(column){\r\n\t\tthis.parent.registerColumnField(column);\r\n\t}\r\n\r\n\t//trigger position registration\r\n\treRegisterPosition(){\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tcolumn.reRegisterPosition();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis.registerColumnPosition(this);\r\n\t\t}\r\n\t}\r\n\r\n\t_mapDepricatedFunctionality(){\r\n\t\t//all previously deprecated functionality removed in the 5.0 release\r\n\t}\r\n\r\n\tsetTooltip(){\r\n\t\tvar def = this.definition;\r\n\r\n\t\t//set header tooltips\r\n\t\tvar tooltip = def.headerTooltip;\r\n\r\n\t\tif(tooltip){\r\n\t\t\tif(tooltip === true){\r\n\t\t\t\tif(def.field){\r\n\t\t\t\t\tthis.langBind(\"columns|\" + def.field, (value) => {\r\n\t\t\t\t\t\tthis.element.setAttribute(\"title\", value || def.title);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.element.setAttribute(\"title\", def.title);\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tif(typeof(tooltip) == \"function\"){\r\n\t\t\t\t\ttooltip = tooltip(this.getComponent());\r\n\r\n\t\t\t\t\tif(tooltip === false){\r\n\t\t\t\t\t\ttooltip = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.element.setAttribute(\"title\", tooltip);\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tthis.element.setAttribute(\"title\", \"\");\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element\r\n\t_initialize(){\r\n\t\tvar def = this.definition;\r\n\r\n\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\tif(def.headerVertical){\r\n\t\t\tthis.element.classList.add(\"tabulator-col-vertical\");\r\n\r\n\t\t\tif(def.headerVertical === \"flip\"){\r\n\t\t\t\tthis.element.classList.add(\"tabulator-col-vertical-flip\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.contentElement = this._bindEvents();\r\n\r\n\t\tthis.contentElement = this._buildColumnHeaderContent();\r\n\r\n\t\tthis.element.appendChild(this.contentElement);\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis._buildGroupHeader();\r\n\t\t}else{\r\n\t\t\tthis._buildColumnHeader();\r\n\t\t}\r\n\r\n\t\tthis.setTooltip();\r\n\r\n\t\tthis.dispatch(\"column-init\", this);\r\n\r\n\t\t//update header tooltip on mouse enter\r\n\t\tthis.element.addEventListener(\"mouseenter\", (e) => {\r\n\t\t\tthis.setTooltip();\r\n\t\t});\r\n\t}\r\n\r\n\t_bindEvents(){\r\n\t\tvar def = this.definition,\r\n\t\tdblTap,\ttapHold, tap;\r\n\r\n\t\t//setup header click event bindings\r\n\t\tif(typeof(def.headerClick) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"click\", (e) => {def.headerClick(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerDblClick) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"dblclick\", (e) => {def.headerDblClick(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerContext) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"contextmenu\", (e) => {def.headerContext(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\t//setup header tap event bindings\r\n\t\tif(typeof(def.headerTap) == \"function\"){\r\n\t\t\ttap = false;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchstart\", (e) => {\r\n\t\t\t\ttap = true;\r\n\t\t\t}, {passive: true});\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\t\t\t\tif(tap){\r\n\t\t\t\t\tdef.headerTap(e, this.getComponent());\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttap = false;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerDblTap) == \"function\"){\r\n\t\t\tdblTap = null;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\r\n\t\t\t\tif(dblTap){\r\n\t\t\t\t\tclearTimeout(dblTap);\r\n\t\t\t\t\tdblTap = null;\r\n\r\n\t\t\t\t\tdef.headerDblTap(e, this.getComponent());\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tdblTap = setTimeout(() => {\r\n\t\t\t\t\t\tclearTimeout(dblTap);\r\n\t\t\t\t\t\tdblTap = null;\r\n\t\t\t\t\t}, 300);\r\n\t\t\t\t}\r\n\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerTapHold) == \"function\"){\r\n\t\t\ttapHold = null;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchstart\", (e) => {\r\n\t\t\t\tclearTimeout(tapHold);\r\n\r\n\t\t\t\ttapHold = setTimeout(function(){\r\n\t\t\t\t\tclearTimeout(tapHold);\r\n\t\t\t\t\ttapHold = null;\r\n\t\t\t\t\ttap = false;\r\n\t\t\t\t\tdef.headerTapHold(e, this.getComponent());\r\n\t\t\t\t}, 1000);\r\n\r\n\t\t\t}, {passive: true});\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\t\t\t\tclearTimeout(tapHold);\r\n\t\t\t\ttapHold = null;\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element for header\r\n\t_buildColumnHeader(){\r\n\t\tvar def = this.definition,\r\n\t\ttable = this.table;\r\n\r\n\t\tthis.dispatch(\"column-layout\", this);\r\n\r\n\t\t//set column visibility\r\n\t\tif(typeof def.visible != \"undefined\"){\r\n\t\t\tif(def.visible){\r\n\t\t\t\tthis.show(true);\r\n\t\t\t}else{\r\n\t\t\t\tthis.hide(true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//asign additional css classes to column header\r\n\t\tif(def.cssClass){\r\n\t\t\tvar classeNames = def.cssClass.split(\" \");\r\n\t\t\tclasseNames.forEach((className) => {\r\n\t\t\t\tthis.element.classList.add(className);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(def.field){\r\n\t\t\tthis.element.setAttribute(\"tabulator-field\", def.field);\r\n\t\t}\r\n\r\n\t\t//set min width if present\r\n\t\tthis.setMinWidth(parseInt(def.minWidth));\r\n\r\n\t\tif (def.maxInitialWidth) {\r\n\t\t\tthis.maxInitialWidth = parseInt(def.maxInitialWidth);\r\n\t\t}\r\n\t\t\r\n\t\tif(def.maxWidth){\r\n\t\t\tthis.setMaxWidth(parseInt(def.maxWidth));\r\n\t\t}\r\n\r\n\t\tthis.reinitializeWidth();\r\n\r\n\t\t//set tooltip if present\r\n\t\tthis.tooltip = this.definition.tooltip;\r\n\r\n\t\t//set orizontal text alignment\r\n\t\tthis.hozAlign = this.definition.hozAlign;\r\n\t\tthis.vertAlign = this.definition.vertAlign;\r\n\r\n\t\tthis.titleElement.style.textAlign = this.definition.headerHozAlign;\r\n\t}\r\n\r\n\t_buildColumnHeaderContent(){\r\n\t\tvar def = this.definition,\r\n\t\ttable = this.table;\r\n\r\n\t\tvar contentElement = document.createElement(\"div\");\r\n\t\tcontentElement.classList.add(\"tabulator-col-content\");\r\n\r\n\t\tthis.titleHolderElement = document.createElement(\"div\");\r\n\t\tthis.titleHolderElement.classList.add(\"tabulator-col-title-holder\");\r\n\r\n\t\tcontentElement.appendChild(this.titleHolderElement);\r\n\r\n\t\tthis.titleElement = this._buildColumnHeaderTitle();\r\n\r\n\t\tthis.titleHolderElement.appendChild(this.titleElement);\r\n\r\n\t\treturn contentElement;\r\n\t}\r\n\r\n\t//build title element of column\r\n\t_buildColumnHeaderTitle(){\r\n\t\tvar def = this.definition,\r\n\t\ttitle;\r\n\r\n\t\tvar titleHolderElement = document.createElement(\"div\");\r\n\t\ttitleHolderElement.classList.add(\"tabulator-col-title\");\r\n\r\n\t\tif(def.editableTitle){\r\n\t\t\tvar titleElement = document.createElement(\"input\");\r\n\t\t\ttitleElement.classList.add(\"tabulator-title-editor\");\r\n\r\n\t\t\ttitleElement.addEventListener(\"click\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\ttitleElement.focus();\r\n\t\t\t});\r\n\r\n\t\t\ttitleElement.addEventListener(\"change\", () => {\r\n\t\t\t\tdef.title = titleElement.value;\r\n\t\t\t\tthis.dispatchExternal(\"columnTitleChanged\", this.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\ttitleHolderElement.appendChild(titleElement);\r\n\r\n\t\t\tif(def.field){\r\n\t\t\t\tthis.langBind(\"columns|\" + def.field, (text) => {\r\n\t\t\t\t\ttitleElement.value = text || (def.title || \" \");\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\ttitleElement.value = def.title || \" \";\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tif(def.field){\r\n\t\t\t\tthis.langBind(\"columns|\" + def.field, (text) => {\r\n\t\t\t\t\tthis._formatColumnHeaderTitle(titleHolderElement, text || (def.title || \" \"));\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tthis._formatColumnHeaderTitle(titleHolderElement, def.title || \" \");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn titleHolderElement;\r\n\t}\r\n\r\n\t_formatColumnHeaderTitle(el, title){\r\n\t\tvar contents = this.chain(\"column-format\", [this, title, el], null, () => {\r\n\t\t\treturn title;\r\n\t\t});\r\n\r\n\t\tswitch(typeof contents){\r\n\t\t\tcase \"object\":\r\n\t\t\tif(contents instanceof Node){\r\n\t\t\t\tel.appendChild(contents);\r\n\t\t\t}else{\r\n\t\t\t\tel.innerHTML = \"\";\r\n\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);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\tcase \"null\":\r\n\t\t\tel.innerHTML = \"\";\r\n\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\tel.innerHTML = contents;\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element for column group\r\n\t_buildGroupHeader(){\r\n\t\tthis.element.classList.add(\"tabulator-col-group\");\r\n\t\tthis.element.setAttribute(\"role\", \"columngroup\");\r\n\t\tthis.element.setAttribute(\"aria-title\", this.definition.title);\r\n\r\n\t\t//asign additional css classes to column header\r\n\t\tif(this.definition.cssClass){\r\n\t\t\tvar classeNames = this.definition.cssClass.split(\" \");\r\n\t\t\tclasseNames.forEach((className) => {\r\n\t\t\t\tthis.element.classList.add(className);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.titleElement.style.textAlign = this.definition.headerHozAlign;\r\n\r\n\t\tthis.element.appendChild(this.groupElement);\r\n\t}\r\n\r\n\t//flat field lookup\r\n\t_getFlatData(data){\r\n\t\treturn data[this.field];\r\n\t}\r\n\r\n\t//nested field lookup\r\n\t_getNestedData(data){\r\n\t\tvar dataObj = data,\r\n\t\tstructure = this.fieldStructure,\r\n\t\tlength = structure.length,\r\n\t\toutput;\r\n\r\n\t\tfor(let i = 0; i < length; i++){\r\n\r\n\t\t\tdataObj = dataObj[structure[i]];\r\n\r\n\t\t\toutput = dataObj;\r\n\r\n\t\t\tif(!dataObj){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//flat field set\r\n\t_setFlatData(data, value){\r\n\t\tif(this.field){\r\n\t\t\tdata[this.field] = value;\r\n\t\t}\r\n\t}\r\n\r\n\t//nested field set\r\n\t_setNestedData(data, value){\r\n\t\tvar dataObj = data,\r\n\t\tstructure = this.fieldStructure,\r\n\t\tlength = structure.length;\r\n\r\n\t\tfor(let i = 0; i < length; i++){\r\n\r\n\t\t\tif(i == length -1){\r\n\t\t\t\tdataObj[structure[i]] = value;\r\n\t\t\t}else{\r\n\t\t\t\tif(!dataObj[structure[i]]){\r\n\t\t\t\t\tif(typeof value !== \"undefined\"){\r\n\t\t\t\t\t\tdataObj[structure[i]] = {};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdataObj = dataObj[structure[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//attach column to this group\r\n\tattachColumn(column){\r\n\t\tif(this.groupElement){\r\n\t\t\tthis.columns.push(column);\r\n\t\t\tthis.groupElement.appendChild(column.getElement());\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Warning - Column being attached to another column instead of column group\");\r\n\t\t}\r\n\t}\r\n\r\n\t//vertically align header in column\r\n\tverticalAlign(alignment, height){\r\n\r\n\t\t//calculate height of column header and group holder element\r\n\t\tvar parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : (height || this.parent.getHeadersElement().clientHeight);\r\n\t\t// var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : this.parent.getHeadersElement().clientHeight;\r\n\r\n\t\tthis.element.style.height = parentHeight + \"px\";\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.groupElement.style.minHeight = (parentHeight - this.contentElement.offsetHeight) + \"px\";\r\n\t\t}\r\n\r\n\t\t//vertically align cell contents\r\n\t\tif(!this.isGroup && alignment !== \"top\"){\r\n\t\t\tif(alignment === \"bottom\"){\r\n\t\t\t\tthis.element.style.paddingTop = (this.element.clientHeight - this.contentElement.offsetHeight) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.paddingTop = ((this.element.clientHeight - this.contentElement.offsetHeight) / 2) + \"px\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.verticalAlign(alignment);\r\n\t\t});\r\n\t}\r\n\r\n\t//clear vertical alignmenet\r\n\tclearVerticalAlign(){\r\n\t\tthis.element.style.paddingTop = \"\";\r\n\t\tthis.element.style.height = \"\";\r\n\t\tthis.element.style.minHeight = \"\";\r\n\t\tthis.groupElement.style.minHeight = \"\";\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.clearVerticalAlign();\r\n\t\t});\r\n\t}\r\n\r\n\tbindModuleColumns (){\r\n\t\t//check if rownum formatter is being used on a column\r\n\t\tif(this.definition.formatter == \"rownum\"){\r\n\t\t\tthis.table.rowManager.rowNumColumn = this;\r\n\t\t}\r\n\t}\r\n\r\n\t//// Retreive Column Information ////\r\n\t//return column header element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\t//return colunm group element\r\n\tgetGroupElement(){\r\n\t\treturn this.groupElement;\r\n\t}\r\n\r\n\t//return field name\r\n\tgetField(){\r\n\t\treturn this.field;\r\n\t}\r\n\r\n\tgetTitleDownload() {\r\n\t\treturn this.titleDownload;\r\n\t}\r\n\r\n\t//return the first column in a group\r\n\tgetFirstColumn(){\r\n\t\tif(!this.isGroup){\r\n\t\t\treturn this;\r\n\t\t}else{\r\n\t\t\tif(this.columns.length){\r\n\t\t\t\treturn this.columns[0].getFirstColumn();\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//return the last column in a group\r\n\tgetLastColumn(){\r\n\t\tif(!this.isGroup){\r\n\t\t\treturn this;\r\n\t\t}else{\r\n\t\t\tif(this.columns.length){\r\n\t\t\t\treturn this.columns[this.columns.length -1].getLastColumn();\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//return all columns in a group\r\n\tgetColumns(){\r\n\t\treturn this.columns;\r\n\t}\r\n\r\n\t//return all columns in a group\r\n\tgetCells(){\r\n\t\treturn this.cells;\r\n\t}\r\n\r\n\t//retreive the top column in a group of columns\r\n\tgetTopColumn(){\r\n\t\tif(this.parent.isGroup){\r\n\t\t\treturn this.parent.getTopColumn();\r\n\t\t}else{\r\n\t\t\treturn this;\r\n\t\t}\r\n\t}\r\n\r\n\t//return column definition object\r\n\tgetDefinition(updateBranches){\r\n\t\tvar colDefs = [];\r\n\r\n\t\tif(this.isGroup && updateBranches){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tcolDefs.push(column.getDefinition(true));\r\n\t\t\t});\r\n\r\n\t\t\tthis.definition.columns = colDefs;\r\n\t\t}\r\n\r\n\t\treturn this.definition;\r\n\t}\r\n\r\n\t//////////////////// Actions ////////////////////\r\n\tcheckColumnVisibility(){\r\n\t\tvar visible = false;\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvisible = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(visible){\r\n\t\t\tthis.show();\r\n\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), false);\r\n\t\t}else{\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\r\n\t//show column\r\n\tshow(silent, responsiveToggle){\r\n\t\tif(!this.visible){\r\n\t\t\tthis.visible = true;\r\n\r\n\t\t\tthis.element.style.display = \"\";\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.checkColumnVisibility();\r\n\t\t\t}\r\n\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.show();\r\n\t\t\t});\r\n\r\n\t\t\tif(!this.isGroup && this.width === null){\r\n\t\t\t\tthis.reinitializeWidth();\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.columnManager.verticalAlignHeaders();\r\n\r\n\t\t\tthis.dispatch(\"column-show\", this, responsiveToggle);\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), true);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\r\n\t\t\tif(!this.silent){\r\n\t\t\t\tthis.table.columnManager.renderer.rerenderColumns();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//hide column\r\n\thide(silent, responsiveToggle){\r\n\t\tif(this.visible){\r\n\t\t\tthis.visible = false;\r\n\r\n\t\t\tthis.element.style.display = \"none\";\r\n\r\n\t\t\tthis.table.columnManager.verticalAlignHeaders();\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.checkColumnVisibility();\r\n\t\t\t}\r\n\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.hide();\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatch(\"column-hide\", this, responsiveToggle);\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), false);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\r\n\t\t\tif(!this.silent){\r\n\t\t\t\tthis.table.columnManager.renderer.rerenderColumns();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmatchChildWidths(){\r\n\t\tvar childWidth = 0;\r\n\r\n\t\tif(this.contentElement && this.columns.length){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tif(column.visible){\r\n\t\t\t\t\tchildWidth += column.getWidth();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.contentElement.style.maxWidth = (childWidth - 1) + \"px\";\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tremoveChild(child){\r\n\t\tvar index = this.columns.indexOf(child);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columns.splice(index, 1);\r\n\t\t}\r\n\r\n\t\tif(!this.columns.length){\r\n\t\t\tthis.delete();\r\n\t\t}\r\n\t}\r\n\r\n\tsetWidth(width){\r\n\t\tthis.widthFixed = true;\r\n\t\tthis.setWidthActual(width);\r\n\t}\r\n\r\n\tsetWidthActual(width){\r\n\t\tif(isNaN(width)){\r\n\t\t\twidth = Math.floor((this.table.element.clientWidth/100) * parseInt(width));\r\n\t\t}\r\n\r\n\t\twidth = Math.max(this.minWidth, width);\r\n\r\n\t\tif(this.maxWidth){\r\n\t\t\twidth = Math.min(this.maxWidth, width);\r\n\t\t}\r\n\r\n\t\tthis.width = width;\r\n\t\tthis.widthStyled = width ? width + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.width = this.widthStyled;\r\n\r\n\t\tif(!this.isGroup){\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.setWidth();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.parent.isGroup){\r\n\t\t\tthis.parent.matchChildWidths();\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"column-width\", this);\r\n\t}\r\n\r\n\tcheckCellHeights(){\r\n\t\tvar rows = [];\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tif(cell.row.heightInitialized){\r\n\t\t\t\tif(cell.row.getElement().offsetParent !== null){\r\n\t\t\t\t\trows.push(cell.row);\r\n\t\t\t\t\tcell.row.clearCellHeight();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcell.row.heightInitialized = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\trow.calcHeight();\r\n\t\t});\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\trow.setCellHeight();\r\n\t\t});\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\tvar width = 0;\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tif(column.visible){\r\n\t\t\t\t\twidth += column.getWidth();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\twidth = this.width;\r\n\t\t}\r\n\r\n\t\treturn width;\r\n\t}\r\n\r\n\tgetHeight(){\r\n\t\treturn Math.ceil(this.element.getBoundingClientRect().height);\r\n\t}\r\n\r\n\tsetMinWidth(minWidth){\r\n\t\tthis.minWidth = minWidth;\r\n\t\tthis.minWidthStyled = minWidth ? minWidth + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.minWidth = this.minWidthStyled;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setMinWidth();\r\n\t\t});\r\n\t}\r\n\r\n\tsetMaxWidth(maxWidth){\r\n\t\tthis.maxWidth = maxWidth;\r\n\t\tthis.maxWidthStyled = maxWidth ? maxWidth + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.maxWidth = this.maxWidthStyled;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setMaxWidth();\r\n\t\t});\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar index;\r\n\r\n\t\t\tif(this.isGroup){\r\n\t\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\t\tcolumn.delete();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"column-delete\", this);\r\n\r\n\t\t\tvar cellCount = this.cells.length;\r\n\r\n\t\t\tfor(let i = 0; i < cellCount; i++){\r\n\t\t\t\tthis.cells[0].delete();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.element.parentNode){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element = false;\r\n\t\t\tthis.contentElement = false;\r\n\t\t\tthis.titleElement = false;\r\n\t\t\tthis.groupElement = false;\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.removeChild(this);\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.columnManager.deregisterColumn(this);\r\n\r\n\t\t\tthis.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\r\n\tcolumnRendered(){\r\n\t\tif(this.titleFormatterRendered){\r\n\t\t\tthis.titleFormatterRendered();\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\t//generate cell for this column\r\n\tgenerateCell(row){\r\n\t\tvar cell = new Cell(this, row);\r\n\r\n\t\tthis.cells.push(cell);\r\n\r\n\t\treturn cell;\r\n\t}\r\n\r\n\tnextColumn(){\r\n\t\tvar index = this.table.columnManager.findColumnIndex(this);\r\n\t\treturn index > -1 ? this._nextVisibleColumn(index + 1) : false;\r\n\t}\r\n\r\n\t_nextVisibleColumn(index){\r\n\t\tvar column = this.table.columnManager.getColumnByIndex(index);\r\n\t\treturn !column || column.visible ? column : this._nextVisibleColumn(index + 1);\r\n\t}\r\n\r\n\tprevColumn(){\r\n\t\tvar index = this.table.columnManager.findColumnIndex(this);\r\n\t\treturn index > -1 ? this._prevVisibleColumn(index - 1) : false;\r\n\t}\r\n\r\n\t_prevVisibleColumn(index){\r\n\t\tvar column = this.table.columnManager.getColumnByIndex(index);\r\n\t\treturn !column || column.visible ? column : this._prevVisibleColumn(index - 1);\r\n\t}\r\n\r\n\treinitializeWidth(force){\r\n\t\tthis.widthFixed = false;\r\n\r\n\t\t//set width if present\r\n\t\tif(typeof this.definition.width !== \"undefined\" && !force){\r\n\t\t\t// maxInitialWidth ignored here as width specified\r\n\t\t\tthis.setWidth(this.definition.width);\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"column-width-fit-before\", this);\r\n\r\n\t\tthis.fitToData(force);\r\n\r\n\t\tthis.dispatch(\"column-width-fit-after\", this);\r\n\t}\r\n\r\n\t//set column width to maximum cell width for non group columns\r\n\tfitToData(force){\r\n\t\tif(this.isGroup){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif(!this.widthFixed){\r\n\t\t\tthis.element.style.width = \"\";\r\n\r\n\t\t\tthis.cells.forEach((cell) => {\r\n\t\t\t\tcell.clearWidth();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tvar maxWidth = this.element.offsetWidth;\r\n\r\n\t\tif(!this.width || !this.widthFixed){\r\n\t\t\tthis.cells.forEach((cell) => {\r\n\t\t\t\tvar width = cell.getWidth();\r\n\r\n\t\t\t\tif(width > maxWidth){\r\n\t\t\t\t\tmaxWidth = width;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(maxWidth){\r\n\t\t\t\tvar setTo = maxWidth + 1;\r\n\t\t\t\tif (this.maxInitialWidth && !force) {\r\n\t\t\t\t\tsetTo = Math.min(setTo, this.maxInitialWidth);\r\n\t\t\t\t}\r\n\t\t\t\tthis.setWidthActual(setTo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateDefinition(updates){\r\n\t\tvar definition;\r\n\r\n\t\tif(!this.isGroup){\r\n\t\t\tif(!this.parent.isGroup){\r\n\t\t\t\tdefinition = Object.assign({}, this.getDefinition());\r\n\t\t\t\tdefinition = Object.assign(definition, updates);\r\n\r\n\t\t\t\treturn this.table.columnManager.addColumn(definition, false, this)\r\n\t\t\t\t.then((column) => {\r\n\r\n\t\t\t\t\tif(definition.field == this.field){\r\n\t\t\t\t\t\tthis.field = false; //cleair field name to prevent deletion of duplicate column from arrays\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn this.delete()\r\n\t\t\t\t\t.then(() => {\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Column Update Error - The updateDefinition function is only available on ungrouped columns\");\r\n\t\t\t\treturn Promise.reject(\"Column Update Error - The updateDefinition function is only available on columns, not column groups\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Column Update Error - The updateDefinition function is only available on ungrouped columns\");\r\n\t\t\treturn Promise.reject(\"Column Update Error - The updateDefinition function is only available on columns, not column groups\");\r\n\t\t}\r\n\t}\r\n\r\n\tdeleteCell(cell){\r\n\t\tvar index = this.cells.indexOf(cell);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.cells.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new ColumnComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}\r\n\r\nColumn.defaultOptionList = defaultOptions;\r\n\r\nexport default Column;","export default class Helpers{\r\n\r\n\tstatic elVisible(el){\r\n\t\treturn !(el.offsetWidth <= 0 && el.offsetHeight <= 0);\r\n\t}\r\n\r\n\tstatic elOffset(el){\r\n\t\tvar box = el.getBoundingClientRect();\r\n\r\n\t\treturn {\r\n\t\t\ttop: box.top + window.pageYOffset - document.documentElement.clientTop,\r\n\t\t\tleft: box.left + window.pageXOffset - document.documentElement.clientLeft\r\n\t\t};\r\n\t}\r\n\r\n\tstatic deepClone(obj, clone, list = []){\r\n\t\tvar objectProto = {}.__proto__,\r\n\t\tarrayProto = [].__proto__;\r\n\r\n\t\tif (!clone){\r\n\t\t\tclone = Object.assign(Array.isArray(obj) ? [] : {}, obj);\r\n\t\t}\r\n\r\n\t\tfor(var i in obj) {\r\n\t\t\tlet subject = obj[i],\r\n\t\t\tmatch, copy;\r\n\r\n\t\t\tif(subject != null && typeof subject === \"object\" && (subject.__proto__ === objectProto || subject.__proto__ === arrayProto)){\r\n\t\t\t\tmatch = list.findIndex((item) => {\r\n\t\t\t\t\treturn item.subject === subject;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(match > -1){\r\n\t\t\t\t\tclone[i] = list[match].copy;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcopy = Object.assign(Array.isArray(subject) ? [] : {}, subject);\r\n\r\n\t\t\t\t\tlist.unshift({subject, copy});\r\n\r\n\t\t\t\t\tclone[i] = this.deepClone(subject, copy, list);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn clone;\r\n\t}\r\n}","export default class OptionsList {\r\n\tconstructor(table, msgType, defaults = {}){\r\n\t\tthis.table = table;\r\n\t\tthis.msgType = msgType;\r\n\t\tthis.registeredDefaults = Object.assign({}, defaults)\r\n\t}\r\n\r\n\tregister(option, value){\r\n\t\tthis.registeredDefaults[option] = value;\r\n\t}\r\n\r\n\tgenerate(defaultOptions, userOptions = {}){\r\n\t\tvar output = Object.assign({}, this.registeredDefaults);\r\n\r\n\t\tObject.assign(output, defaultOptions);\r\n\r\n\t\tif(userOptions.debugInvalidOptions !== false || this.table.options.debugInvalidOptions){\r\n\t\t\tfor (var key in userOptions){\r\n\t\t\t\tif(!output.hasOwnProperty(key)){\r\n\t\t\t\t\tconsole.warn(\"Invalid \" + this.msgType + \" option:\", key)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var key in output){\r\n\t\t\tif(key in userOptions){\r\n\t\t\t\toutput[key] = userOptions[key];\r\n\t\t\t}else{\r\n\t\t\t\tif(Array.isArray(output[key])){\r\n\t\t\t\t\toutput[key] = Object.assign([], output[key]);\r\n\t\t\t\t}else if(typeof output[key] === \"object\" && output[key] !== null){\r\n\t\t\t\t\toutput[key] = Object.assign({}, output[key]);\r\n\t\t\t\t}else if (typeof output[key] === \"undefined\"){\r\n\t\t\t\t\tdelete output[key];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport Helpers from '../tools/Helpers.js';\r\n\r\nexport default class Renderer extends CoreFeature{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.elementVertical = table.rowManager.element;\r\n\t\tthis.elementHorizontal = table.columnManager.element;\r\n\t\tthis.tableElement = table.rowManager.tableElement;\r\n\r\n\t\tthis.verticalFillMode = \"fit\"; // used by row manager to determin how to size the render area (\"fit\" - fits container to the contents, \"fill\" - fills the contianer without resizing it)\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t/////// Internal Bindings /////////\r\n\t///////////////////////////////////\r\n\r\n\tinitialize(){\r\n\t\t//initialize core functionality\r\n\t}\r\n\r\n\tclearRows(){\r\n\t\t//clear down existing rows layout\r\n\t}\r\n\r\n\tclearColumns(){\r\n\t\t//clear down existing columns layout\r\n\t}\r\n\r\n\r\n\treinitializeColumnWidths(columns){\r\n\t\t//resize columns to fit data\r\n\t}\r\n\r\n\r\n\trenderRows(){\r\n\t\t//render rows from a clean slate\r\n\t}\r\n\r\n\trenderColumns(){\r\n\t\t//render columns from a clean slate\r\n\t}\r\n\r\n\trerenderRows(callback){\r\n\t\t// rerender rows and keep position\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\t}\r\n\r\n\trerenderColumns(update, blockRedraw){\r\n\t\t//rerender columns\r\n\t}\r\n\r\n\trenderRowCells(row){\r\n\t\t//render the cells in a row\r\n\t}\r\n\r\n\trerenderRowCells(row, force){\r\n\t\t//rerender the cells in a row\r\n\t}\r\n\r\n\tscrollColumns(left, dir){\r\n\t\t//handle horizontal scrolling\r\n\t}\r\n\r\n\tscrollRows(top, dir){\r\n\t\t//handle vertical scolling\r\n\t}\r\n\r\n\tresize(){\r\n\t\t//container has rezied, carry out any needed recalculations (DO NOT RERENDER IN THIS FUNCTION)\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\t//scroll to a specific row\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\t//determine weather the row is nearest the top or bottom of the table, retur true for top or false for bottom\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\t//return the visible rows\r\n\t\treturn [];\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t//////// Helper Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\trows(){\r\n\t\treturn this.table.rowManager.getDisplayRows();\r\n\t}\r\n\r\n\tstyleRow(row, index){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tif(index % 2){\r\n\t\t\trowEl.classList.add(\"tabulator-row-even\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-odd\");\r\n\t\t}else{\r\n\t\t\trowEl.classList.add(\"tabulator-row-odd\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-even\");\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t/////// External Triggers /////////\r\n\t/////// (DO NOT OVERRIDE) /////////\r\n\t///////////////////////////////////\r\n\r\n\tclear(){\r\n\t\t//clear down existing layout\r\n\t\tthis.clearRows();\r\n\t\tthis.clearColumns();\r\n\t}\r\n\r\n\trender(){\r\n\t\t//render from a clean slate\r\n\t\tthis.renderRows();\r\n\t\tthis.renderColumns();\r\n\t}\r\n\r\n\trerender(callback){\r\n\t\t// rerender and keep position\r\n\t\tthis.rerenderRows();\r\n\t\tthis.rerenderColumns();\r\n\t}\r\n\r\n\tscrollToRowPosition(row, position, ifVisible){\r\n\t\tvar rowIndex = this.rows().indexOf(row),\r\n\t\trowEl = row.getElement(),\r\n\t\toffset = 0;\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tif(rowIndex > -1){\r\n\r\n\t\t\t\tif(typeof ifVisible === \"undefined\"){\r\n\t\t\t\t\tifVisible = this.table.options.scrollToRowIfVisible;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//check row visibility\r\n\t\t\t\tif(!ifVisible){\r\n\t\t\t\t\tif(Helpers.elVisible(rowEl)){\r\n\t\t\t\t\t\toffset = Helpers.elOffset(rowEl).top - Helpers.elOffset(this.elementVertical).top;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(offset > 0 && offset < this.elementVertical.clientHeight - rowEl.offsetHeight){\r\n\t\t\t\t\t\t\tresolve();\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(typeof position === \"undefined\"){\r\n\t\t\t\t\tposition = this.table.options.scrollToRowPosition;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(position === \"nearest\"){\r\n\t\t\t\t\tposition = this.scrollToRowNearestTop(row) ? \"top\" : \"bottom\"\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//scroll to row\r\n\t\t\t\tthis.scrollToRow(row);\r\n\r\n\t\t\t\t//align to correct position\r\n\t\t\t\tswitch(position){\r\n\t\t\t\t\tcase \"middle\":\r\n\t\t\t\t\tcase \"center\":\r\n\r\n\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop + (rowEl.offsetTop - this.elementVertical.scrollTop) - ((this.elementVertical.scrollHeight - rowEl.offsetTop) / 2);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.clientHeight / 2);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"bottom\":\r\n\r\n\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.scrollHeight - rowEl.offsetTop) + rowEl.offsetHeight;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - this.elementVertical.clientHeight + rowEl.offsetHeight;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresolve();\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - Row not visible\");\r\n\t\t\t\treject(\"Scroll Error - Row not visible\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class BaiscHorizontal extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t}\r\n\r\n\trenderRowCells(row){\r\n\t\trow.cells.forEach((cell) => {\r\n\t\t\trow.element.appendChild(cell.getElement());\r\n\t\t\tcell.cellRendered();\r\n\t\t});\r\n\t}\r\n\r\n\treinitializeColumnWidths(columns){\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t});\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class VirtualDomHorizontal extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.leftCol = 0;\r\n\t\tthis.rightCol = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = 0;\r\n\t\tthis.vDomScrollPosRight = 0;\r\n\t\t\r\n\t\tthis.vDomPadLeft = 0;\r\n\t\tthis.vDomPadRight = 0;\r\n\t\t\r\n\t\tthis.fitDataColAvg = 0;\r\n\t\t\r\n\t\tthis.windowBuffer = 200; //pixel margin to make column visible before it is shown on screen\r\n\t\t\r\n\t\tthis.visibleRows = null;\r\n\r\n\t\tthis.initialized = false;\r\n\t\tthis.isFitData = false;\r\n\t\t\r\n\t\tthis.columns = [];\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.compatibilityCheck();\r\n\t\tthis.layoutCheck();\r\n\t\tthis.vertScrollListen();\r\n\t}\r\n\t\r\n\tcompatibilityCheck(){\r\n\t\tvar columns = this.options(\"columns\"),\r\n\t\tfrozen = false,\r\n\t\tok = true;\r\n\t\t\r\n\t\tif(this.options(\"layout\") == \"fitDataTable\"){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with fitDataTable layout mode\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.options(\"responsiveLayout\")){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with responsive columns\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.options(\"rtl\")){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not currently compatible with RTL text direction\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(columns){\r\n\t\t\tfrozen = columns.find((col) => {\r\n\t\t\t\treturn col.frozen;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(frozen){\r\n\t\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with frozen columns\");\r\n\t\t\t\tok = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// if(!ok){\r\n\t\t// \toptions.virtualDomHoz = false;\r\n\t\t// }\r\n\t\t\r\n\t\treturn ok;\r\n\t}\r\n\t\r\n\tlayoutCheck(){\r\n\t\tthis.isFitData = this.options(\"layout\").startsWith('fitData');\r\n\t}\r\n\r\n\tvertScrollListen(){\r\n\t\tthis.subscribe(\"scroll-vertical\", this.clearVisRowCache.bind(this));\r\n\t\tthis.subscribe(\"data-refreshed\", this.clearVisRowCache.bind(this));\r\n\t}\r\n\r\n\tclearVisRowCache(){\r\n\t\tthis.visibleRows = null;\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t///////// Public Functions ///////////\r\n\t//////////////////////////////////////\r\n\t\r\n\trenderColumns(row, force){\r\n\t\tthis.dataChange();\r\n\t}\r\n\r\n\t\r\n\tscrollColumns(left, dir){\r\n\t\tif(this.scrollLeft != left){\r\n\t\t\tthis.scrollLeft = left;\r\n\t\t\t\r\n\t\t\tthis.scroll(left - (this.vDomScrollPosLeft + this.windowBuffer));\r\n\t\t}\r\n\t}\r\n\t\r\n\tcalcWindowBuffer(){\r\n\t\tvar buffer = this.elementVertical.clientWidth;\r\n\t\t\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvar width = column.getWidth();\r\n\t\t\t\t\r\n\t\t\t\tif(width > buffer){\r\n\t\t\t\t\tbuffer = width;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.windowBuffer = buffer * 2;\r\n\t}\r\n\t\r\n\trerenderColumns(update, blockRedraw){\t\t\r\n\t\tvar old = {\r\n\t\t\tcols:this.columns,\r\n\t\t\tleftCol:this.leftCol,\r\n\t\t\trightCol:this.rightCol,\r\n\t\t},\r\n\t\tcolPos = 0;\r\n\t\t\r\n\t\t\r\n\t\tif(update && !this.initialized){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tthis.clear();\r\n\t\t\r\n\t\tthis.calcWindowBuffer();\r\n\t\t\r\n\t\tthis.scrollLeft = this.elementVertical.scrollLeft;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = this.scrollLeft - this.windowBuffer;\r\n\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\r\n\t\t\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tvar config = {};\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvar width = column.getWidth();\r\n\t\t\t\t\r\n\t\t\t\tconfig.leftPos = colPos;\r\n\t\t\t\tconfig.rightPos = colPos + width;\r\n\t\t\t\t\r\n\t\t\t\tconfig.width = width;\r\n\t\t\t\t\r\n\t\t\t\tif (this.isFitData) {\r\n\t\t\t\t\tconfig.fitDataCheck = column.modules.vdomHoz ? column.modules.vdomHoz.fitDataCheck : true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif((colPos + width > this.vDomScrollPosLeft) && (colPos < this.vDomScrollPosRight)){\r\n\t\t\t\t\t//column is visible\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.leftCol == -1){\r\n\t\t\t\t\t\tthis.leftCol = this.columns.length;\r\n\t\t\t\t\t\tthis.vDomPadLeft = colPos;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.rightCol = this.columns.length;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// column is hidden\r\n\t\t\t\t\tif(this.leftCol !== -1){\r\n\t\t\t\t\t\tthis.vDomPadRight += width;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.columns.push(column);\r\n\t\t\t\t\r\n\t\t\t\tcolumn.modules.vdomHoz = config;\r\n\t\t\t\t\r\n\t\t\t\tcolPos += width;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t\r\n\t\tthis.initialized = true;\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tif(!update || this.reinitChanged(old)){\r\n\t\t\t\tthis.reinitializeRows();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.elementVertical.scrollLeft = this.scrollLeft;\r\n\t}\r\n\t\r\n\trenderRowCells(row){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.initializeRow(row);\r\n\t\t}else{\r\n\t\t\trow.cells.forEach((cell) => {\r\n\t\t\t\trow.element.appendChild(cell.getElement());\r\n\t\t\t\tcell.cellRendered();\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\trerenderRowCells(row, force){\r\n\t\tthis.reinitializeRow(row, force);\r\n\t}\r\n\t\r\n\treinitializeColumnWidths(columns){\r\n\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\r\n\t\t\tthis.columns[i].reinitializeWidth();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t//////// Internal Rendering //////////\r\n\t//////////////////////////////////////\r\n\t\r\n\tdeinitialize(){\r\n\t\tthis.initialized = false;\r\n\t}\r\n\t\r\n\tclear(){\r\n\t\tthis.columns = [];\r\n\t\t\r\n\t\tthis.leftCol = -1;\r\n\t\tthis.rightCol = 0;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = 0;\r\n\t\tthis.vDomScrollPosRight = 0;\r\n\t\tthis.vDomPadLeft = 0;\r\n\t\tthis.vDomPadRight = 0;\r\n\t}\r\n\t\r\n\tdataChange(){\r\n\t\tvar change = false,\r\n\t\tcollsWidth = 0,\r\n\t\tcolEnd = 0,\r\n\t\tgroup, row, rowEl;\r\n\t\t\r\n\t\tif(this.isFitData){\r\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\t\tif(!column.definition.width && column.visible){\r\n\t\t\t\t\tchange = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(change){\r\n\t\t\t\tif(change && this.table.rowManager.getDisplayRows().length){\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar row = this.chain(\"rows-sample\", [1], [], () => {\r\n\t\t\t\t\t\treturn this.table.rowManager.getDisplayRows();\r\n\t\t\t\t\t})[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trowEl = row.getElement();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trow.generateCells();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.tableElement.appendChild(rowEl);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfor(var colEnd = 0; colEnd < row.cells.length; colEnd++){\r\n\t\t\t\t\t\t\tlet cell = row.cells[colEnd];\r\n\t\t\t\t\t\t\trowEl.appendChild(cell.getElement());\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcell.column.reinitializeWidth();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcollsWidth += cell.column.getWidth();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// if(collsWidth > this.vDomScrollPosRight){\r\n\t\t\t\t\t\t\t// \tbreak;\r\n\t\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// this.fitDataColAvg = Math.floor(collsWidth / (colEnd + 1));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// for(colEnd; colEnd < this.table.columnManager.columnsByIndex.length; colEnd++){\r\n\t\t\t\t\t\t// \tthis.table.columnManager.columnsByIndex[colEnd].setWidth(this.fitDataColAvg);\r\n\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.rerenderColumns(false, true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.options(\"layout\") === \"fitColumns\"){\r\n\t\t\t\tthis.layoutRefresh();\r\n\t\t\t\tthis.rerenderColumns(false, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitChanged(old){\r\n\t\tvar match = true;\r\n\t\t\r\n\t\tif(old.cols.length !== this.columns.length || old.leftCol !== this.leftCol || old.rightCol !== this.rightCol){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\told.cols.forEach((col, i) => {\r\n\t\t\tif(col !== this.columns[i]){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn !match;\r\n\t}\r\n\t\r\n\treinitializeRows(){\r\n\t\tvar rows = this.getVisibleRows();\r\n\t\trows.forEach((row) => {\r\n\t\t\tthis.reinitializeRow(row, true);\r\n\t\t});\r\n\t}\r\n\t\r\n\tgetVisibleRows(){\r\n\t\tif (!this.visibleRows){\r\n\t\t\tthis.visibleRows = this.table.rowManager.getVisibleRows();\r\n\t\t}\r\n\r\n\t\treturn this.visibleRows;\t\r\n\t}\r\n\t\r\n\tscroll(diff){\r\n\t\tthis.vDomScrollPosLeft += diff;\r\n\t\tthis.vDomScrollPosRight += diff;\r\n\r\n\t\tif(Math.abs(diff) > (this.windowBuffer / 2)){\r\n\t\t\tthis.rerenderColumns();\r\n\t\t}else{\r\n\t\t\tif(diff > 0){\r\n\t\t\t\t//scroll right\r\n\t\t\t\tthis.addColRight();\r\n\t\t\t\tthis.removeColLeft();\r\n\t\t\t}else{\r\n\t\t\t\t//scroll left\r\n\t\t\t\tthis.addColLeft();\r\n\t\t\t\tthis.removeColRight();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tcolPositionAdjust (start, end, diff){\r\n\t\tfor(let i = start; i < end; i++){\r\n\t\t\tlet column = this.columns[i];\r\n\t\t\t\r\n\t\t\tcolumn.modules.vdomHoz.leftPos += diff;\r\n\t\t\tcolumn.modules.vdomHoz.rightPos += diff;\r\n\t\t}\r\n\t}\r\n\t\r\n\taddColRight(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\t\r\n\t\t\tlet column = this.columns[this.rightCol + 1];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.leftPos <= this.vDomScrollPosRight){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\trow.getElement().appendChild(cell.getElement());\r\n\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.fitDataColActualWidthCheck(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.rightCol++; // Don't move this below the >= check below\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.rightCol >= (this.columns.length - 1)){\r\n\t\t\t\t\t\tthis.vDomPadRight = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomPadRight -= column.getWidth();\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\taddColLeft(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.leftCol - 1];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.rightPos >= this.vDomScrollPosLeft){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\trow.getElement().prepend(cell.getElement());\r\n\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.leftCol--; // don't move this below the <= check below\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.leftCol <= 0){ // replicating logic in addColRight\r\n\t\t\t\t\t\tthis.vDomPadLeft = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomPadLeft -= column.getWidth();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tlet diff = this.fitDataColActualWidthCheck(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(diff){\r\n\t\t\t\t\t\tthis.scrollLeft = this.elementVertical.scrollLeft = this.elementVertical.scrollLeft + diff;\r\n\t\t\t\t\t\tthis.vDomPadRight -= diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveColRight(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.rightCol];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.leftPos > this.vDomScrollPosRight){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\trow.getElement().removeChild(cell.getElement());\r\n\t\t\t\t\t\t\t} catch (ex) {\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Could not removeColRight\", ex.message)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomPadRight += column.getWidth();\r\n\t\t\t\t\tthis.rightCol --;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveColLeft(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.leftCol];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.rightPos < this.vDomScrollPosLeft){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\t\t\t\t\t\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\trow.getElement().removeChild(cell.getElement());\r\n\t\t\t\t\t\t\t} catch (ex) {\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Could not removeColLeft\", ex.message)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomPadLeft += column.getWidth();\r\n\t\t\t\t\tthis.leftCol ++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\tfitDataColActualWidthCheck(column){\r\n\t\tvar newWidth, widthDiff;\r\n\t\t\r\n\t\tif(column.modules.vdomHoz.fitDataCheck){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t\t\r\n\t\t\tnewWidth = column.getWidth();\r\n\t\t\twidthDiff = newWidth - column.modules.vdomHoz.width;\r\n\t\t\t\r\n\t\t\tif(widthDiff){\r\n\t\t\t\tcolumn.modules.vdomHoz.rightPos += widthDiff;\r\n\t\t\t\tcolumn.modules.vdomHoz.width = newWidth;\r\n\t\t\t\tthis.colPositionAdjust(this.columns.indexOf(column) + 1, this.columns.length, widthDiff);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcolumn.modules.vdomHoz.fitDataCheck = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn widthDiff;\r\n\t}\r\n\t\r\n\tinitializeRow(row){\r\n\t\tif(row.type !== \"group\"){\r\n\t\t\trow.modules.vdomHoz = {\r\n\t\t\t\tleftCol:this.leftCol,\r\n\t\t\t\trightCol:this.rightCol,\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\r\n\t\t\t\tlet column = this.columns[i];\r\n\t\t\t\t\r\n\t\t\t\tif(column && column.visible){\r\n\t\t\t\t\tlet cell = row.getCell(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\trow.getElement().appendChild(cell.getElement());\r\n\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitializeRow(row, force){\r\n\t\tif(row.type !== \"group\"){\r\n\t\t\tif(force || !row.modules.vdomHoz || row.modules.vdomHoz.leftCol !== this.leftCol || row.modules.vdomHoz.rightCol !== this.rightCol){\r\n\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\twhile(rowEl.firstChild) rowEl.removeChild(rowEl.firstChild);\r\n\t\t\t\t\r\n\t\t\t\tthis.initializeRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\nimport Column from './column/Column.js';\r\nimport ColumnComponent from './column/ColumnComponent.js';\r\nimport Helpers from './tools/Helpers.js';\r\nimport OptionsList from './tools/OptionsList.js';\r\n\r\nimport RendererBasicHorizontal from './rendering/renderers/BasicHorizontal.js';\r\nimport RendererVirtualDomHorizontal from './rendering/renderers/VirtualDomHorizontal.js';\r\n\r\nimport defaultColumnOptions from './column/defaults/options.js';\r\n\r\nexport default class ColumnManager extends CoreFeature {\r\n\r\n\tconstructor (table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.blockHozScrollEvent = false;\r\n\t\tthis.headersElement = null;\r\n\t\tthis.element = null ; //containing element\r\n\t\tthis.columns = []; // column definition object\r\n\t\tthis.columnsByIndex = []; //columns by index\r\n\t\tthis.columnsByField = {}; //columns by field\r\n\t\tthis.scrollLeft = 0;\r\n\t\tthis.optionsList = new OptionsList(this.table, \"column definition\", defaultColumnOptions);\r\n\r\n\t\tthis.renderer = null;\r\n\t}\r\n\r\n\t////////////// Setup Functions /////////////////\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeRenderer();\r\n\r\n\t\tthis.headersElement = this.createHeadersElement();\r\n\t\tthis.element = this.createHeaderElement();\r\n\r\n\t\tthis.element.insertBefore(this.headersElement, this.element.firstChild);\r\n\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t}\r\n\r\n\tinitializeRenderer(){\r\n\t\tvar renderClass;\r\n\r\n\t\tvar renderers = {\r\n\t\t\t\"virtual\": RendererVirtualDomHorizontal,\r\n\t\t\t\"basic\": RendererBasicHorizontal,\r\n\t\t};\r\n\r\n\t\tif(typeof this.table.options.renderHorizontal === \"string\"){\r\n\t\t\trenderClass = renderers[this.table.options.renderHorizontal];\r\n\t\t}else{\r\n\t\t\trenderClass = this.table.options.renderHorizontal;\r\n\t\t}\r\n\r\n\t\tif(renderClass){\r\n\t\t\tthis.renderer = new renderClass(this.table, this.element, this.tableElement);\r\n\t\t\tthis.renderer.initialize();\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Unable to find matching renderer:\", table.options.renderHorizontal);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tcreateHeadersElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-headers\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateHeaderElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-header\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\r\n\t\tif(!this.table.options.headerVisible){\r\n\t\t\tel.classList.add(\"tabulator-header-hidden\");\r\n\t\t}\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\t//return containing element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\t//return header containing element\r\n\tgetHeadersElement(){\r\n\t\treturn this.headersElement;\r\n\t}\r\n\r\n\t//scroll horizontally to match table body\r\n\tscrollHorizontal(left){\r\n\t\tvar hozAdjust = 0,\r\n\t\tscrollWidth = this.element.scrollWidth - this.table.element.clientWidth;\r\n\r\n\t\t// this.tempScrollBlock();\r\n\t\tthis.element.scrollLeft = left;\r\n\r\n\t\t//adjust for vertical scrollbar moving table when present\r\n\t\tif(left > scrollWidth){\r\n\t\t\thozAdjust = left - scrollWidth;\r\n\t\t\tthis.element.style.marginLeft = (-(hozAdjust)) + \"px\";\r\n\t\t}else{\r\n\t\t\tthis.element.style.marginLeft = 0;\r\n\t\t}\r\n\r\n\t\tthis.scrollLeft = left;\r\n\r\n\t\tthis.renderer.scrollColumns(left);\r\n\t}\r\n\r\n\t///////////// Column Setup Functions /////////////\r\n\tgenerateColumnsFromRowData(data){\r\n\t\tvar cols = [],\r\n\t\tdefinitions = this.table.options.autoColumnsDefinitions,\r\n\t\trow, sorter;\r\n\r\n\t\tif(data && data.length){\r\n\r\n\t\t\trow = data[0];\r\n\r\n\t\t\tfor(var key in row){\r\n\t\t\t\tlet col = {\r\n\t\t\t\t\tfield:key,\r\n\t\t\t\t\ttitle:key,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tlet value = row[key];\r\n\r\n\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tif(Array.isArray(value)){\r\n\t\t\t\t\t\tsorter = \"array\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){\r\n\t\t\t\t\t\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcol.sorter = sorter;\r\n\r\n\t\t\t\tcols.push(col);\r\n\t\t\t}\r\n\r\n\t\t\tif(definitions){\r\n\r\n\t\t\t\tswitch(typeof definitions){\r\n\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\tthis.table.options.columns = definitions.call(this.table, cols);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tif(Array.isArray(definitions)){\r\n\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\tvar match = definitions.find((def) => {\r\n\t\t\t\t\t\t\t\treturn def.field === col.field;\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tif(match){\r\n\t\t\t\t\t\t\t\tObject.assign(col, match);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\tif(definitions[col.field]){\r\n\t\t\t\t\t\t\t\tObject.assign(col, definitions[col.field]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.table.options.columns = cols;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.options.columns = cols;\r\n\t\t\t}\r\n\r\n\t\t\tthis.setColumns(this.table.options.columns);\r\n\t\t}\r\n\t}\r\n\r\n\tsetColumns(cols, row){\r\n\t\twhile(this.headersElement.firstChild) this.headersElement.removeChild(this.headersElement.firstChild);\r\n\r\n\t\tthis.columns = [];\r\n\t\tthis.columnsByIndex = [];\r\n\t\tthis.columnsByField = {};\r\n\r\n\t\tthis.dispatch(\"columns-loading\");\r\n\r\n\t\tcols.forEach((def, i) => {\r\n\t\t\tthis._addColumn(def);\r\n\t\t});\r\n\r\n\t\tthis._reIndexColumns();\r\n\r\n\t\tthis.dispatch(\"columns-loaded\");\r\n\r\n\t\tthis.renderer.rerenderColumns(false, true);\r\n\r\n\t\tthis.redraw(true);\r\n\t}\r\n\r\n\t_addColumn(definition, before, nextToColumn){\r\n\t\tvar column = new Column(definition, this),\r\n\t\tcolEl = column.getElement(),\r\n\t\tindex = nextToColumn ? this.findColumnIndex(nextToColumn) : nextToColumn;\r\n\r\n\t\tif(nextToColumn && index > -1){\r\n\t\t\tvar topColumn = nextToColumn.getTopColumn()\r\n\t\t\tvar parentIndex = this.columns.indexOf(topColumn);\r\n\t\t\tvar nextEl = topColumn.getElement();\r\n\r\n\t\t\tif(before){\r\n\t\t\t\tthis.columns.splice(parentIndex, 0, column);\r\n\t\t\t\tnextEl.parentNode.insertBefore(colEl, nextEl);\r\n\t\t\t}else{\r\n\t\t\t\tthis.columns.splice(parentIndex + 1, 0, column);\r\n\t\t\t\tnextEl.parentNode.insertBefore(colEl, nextEl.nextSibling);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(before){\r\n\t\t\t\tthis.columns.unshift(column);\r\n\t\t\t\tthis.headersElement.insertBefore(column.getElement(), this.headersElement.firstChild);\r\n\t\t\t}else{\r\n\t\t\t\tthis.columns.push(column);\r\n\t\t\t\tthis.headersElement.appendChild(column.getElement());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcolumn.columnRendered();\r\n\r\n\t\treturn column;\r\n\t}\r\n\r\n\tregisterColumnField(col){\r\n\t\tif(col.definition.field){\r\n\t\t\tthis.columnsByField[col.definition.field] = col;\r\n\t\t}\r\n\t}\r\n\r\n\tregisterColumnPosition(col){\r\n\t\tthis.columnsByIndex.push(col);\r\n\t}\r\n\r\n\t_reIndexColumns(){\r\n\t\tthis.columnsByIndex = [];\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.reRegisterPosition();\r\n\t\t});\r\n\t}\r\n\r\n\t//ensure column headers take up the correct amount of space in column groups\r\n\tverticalAlignHeaders(){\r\n\t\tvar minHeight = 0;\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\tvar height;\r\n\r\n\t\t\tcolumn.clearVerticalAlign();\r\n\r\n\t\t\theight = column.getHeight();\r\n\r\n\t\t\tif(height > minHeight){\r\n\t\t\t\tminHeight = height;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\tcolumn.verticalAlign(this.table.options.columnHeaderVertAlign, minHeight);\r\n\t\t});\r\n\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\t//////////////// Column Details /////////////////\r\n\tfindColumn(subject){\r\n\t\tif(typeof subject == \"object\"){\r\n\r\n\t\t\tif(subject instanceof Column){\r\n\t\t\t\t//subject is column element\r\n\t\t\t\treturn subject;\r\n\t\t\t}else if(subject instanceof ColumnComponent){\r\n\t\t\t\t//subject is public column component\r\n\t\t\t\treturn subject._getSelf() || false;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\t//subject is a HTML element of the column header\r\n\t\t\t\tlet match = this.columns.find((column) => {\r\n\t\t\t\t\treturn column.element === subject;\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn match || false;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the field name of the column\r\n\t\t\treturn this.columnsByField[subject] || false;\r\n\t\t}\r\n\r\n\t\t//catch all for any other type of input\r\n\t\treturn false;\r\n\t}\r\n\r\n\tgetColumnByField(field){\r\n\t\treturn this.columnsByField[field];\r\n\t}\r\n\r\n\tgetColumnsByFieldRoot(root){\r\n\t\tvar matches = [];\r\n\r\n\t\tObject.keys(this.columnsByField).forEach((field) => {\r\n\t\t\tvar fieldRoot = field.split(\".\")[0];\r\n\t\t\tif(fieldRoot === root){\r\n\t\t\t\tmatches.push(this.columnsByField[field]);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn matches;\r\n\t}\r\n\r\n\tgetColumnByIndex(index){\r\n\t\treturn this.columnsByIndex[index];\r\n\t}\r\n\r\n\tgetFirstVisibleColumn(index){\r\n\t\tvar index = this.columnsByIndex.findIndex((col) => {\r\n\t\t\treturn col.visible;\r\n\t\t});\r\n\r\n\t\treturn index > -1 ? this.columnsByIndex[index] : false;\r\n\t}\r\n\r\n\tgetColumns(){\r\n\t\treturn this.columns;\r\n\t}\r\n\r\n\tfindColumnIndex(column){\r\n\t\treturn this.columnsByIndex.findIndex((col) => {\r\n\t\t\treturn column === col;\r\n\t\t});\r\n\t}\r\n\r\n\t//return all columns that are not groups\r\n\tgetRealColumns(){\r\n\t\treturn this.columnsByIndex;\r\n\t}\r\n\r\n\t//travers across columns and call action\r\n\ttraverse(callback){\r\n\t\tthis.columnsByIndex.forEach((column,i) =>{\r\n\t\t\tcallback(column, i);\r\n\t\t});\r\n\t}\r\n\r\n\t//get defintions of actual columns\r\n\tgetDefinitions(active){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tif(!active || (active && column.visible)){\r\n\t\t\t\toutput.push(column.getDefinition());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//get full nested definition tree\r\n\tgetDefinitionTree(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\toutput.push(column.getDefinition(true));\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetComponents(structured){\r\n\t\tvar output = [],\r\n\t\tcolumns = structured ? this.columns : this.columnsByIndex;\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\toutput.push(column.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\tvar width = 0;\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tif(column.visible){\r\n\t\t\t\twidth += column.getWidth();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn width;\r\n\t}\r\n\r\n\tmoveColumn(from, to, after){\r\n\t\tthis.moveColumnActual(from, to, after);\r\n\r\n\t\tto.element.parentNode.insertBefore(from.element, to.element);\r\n\r\n\t\tif(after){\r\n\t\t\tto.element.parentNode.insertBefore(to.element, from.element);\r\n\t\t}\r\n\r\n\t\tthis.verticalAlignHeaders();\r\n\r\n\t\tthis.table.rowManager.reinitialize();\r\n\t}\r\n\r\n\tmoveColumnActual(from, to, after){\r\n\t\tif(from.parent.isGroup){\r\n\t\t\tthis._moveColumnInArray(from.parent.columns, from, to, after);\r\n\t\t}else{\r\n\t\t\tthis._moveColumnInArray(this.columns, from, to, after);\r\n\t\t}\r\n\r\n\t\tthis._moveColumnInArray(this.columnsByIndex, from, to, after, true);\r\n\r\n\t\tthis.renderer.rerenderColumns(true);\r\n\r\n\t\tthis.dispatch(\"column-moved\", from, to, after);\r\n\r\n\t\tif(this.subscribedExternal(\"columnMoved\")){\r\n\t\t\tthis.dispatchExternal(\"columnMoved\", from.getComponent(), this.table.columnManager.getComponents());\r\n\t\t}\r\n\t}\r\n\r\n\t_moveColumnInArray(columns, from, to, after, updateRows){\r\n\t\tvar\tfromIndex = columns.indexOf(from),\r\n\t\ttoIndex, rows = [];\r\n\r\n\t\tif (fromIndex > -1) {\r\n\r\n\t\t\tcolumns.splice(fromIndex, 1);\r\n\r\n\t\t\ttoIndex = columns.indexOf(to);\r\n\r\n\t\t\tif (toIndex > -1) {\r\n\r\n\t\t\t\tif(after){\r\n\t\t\t\t\ttoIndex = toIndex+1;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\ttoIndex = fromIndex;\r\n\t\t\t}\r\n\r\n\t\t\tcolumns.splice(toIndex, 0, from);\r\n\r\n\t\t\tif(updateRows){\r\n\r\n\t\t\t\trows = this.chain(\"column-moving-rows\", [from, to, after], null, []) || [];\r\n\r\n\t\t\t\trows = rows.concat(this.table.rowManager.rows);\r\n\r\n\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\tif(row.cells.length){\r\n\t\t\t\t\t\tvar cell = row.cells.splice(fromIndex, 1)[0];\r\n\t\t\t\t\t\trow.cells.splice(toIndex, 0, cell);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscrollToColumn(column, position, ifVisible){\r\n\t\tvar left = 0,\r\n\t\toffset = 0,\r\n\t\tadjust = 0,\r\n\t\tcolEl = column.getElement();\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\r\n\t\t\tif(typeof position === \"undefined\"){\r\n\t\t\t\tposition = this.table.options.scrollToColumnPosition;\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof ifVisible === \"undefined\"){\r\n\t\t\t\tifVisible = this.table.options.scrollToColumnIfVisible;\r\n\t\t\t}\r\n\r\n\t\t\tif(column.visible){\r\n\r\n\t\t\t\t//align to correct position\r\n\t\t\t\tswitch(position){\r\n\t\t\t\t\tcase \"middle\":\r\n\t\t\t\t\tcase \"center\":\r\n\t\t\t\t\tadjust = -this.element.clientWidth / 2;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"right\":\r\n\t\t\t\t\tadjust = colEl.clientWidth - this.headersElement.clientWidth;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//check column visibility\r\n\t\t\t\tif(!ifVisible){\r\n\r\n\t\t\t\t\toffset = colEl.offsetLeft;\r\n\r\n\t\t\t\t\tif(offset > 0 && offset + colEl.offsetWidth < this.element.clientWidth){\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//calculate scroll position\r\n\t\t\t\tleft = colEl.offsetLeft + adjust;\r\n\r\n\t\t\t\tleft = Math.max(Math.min(left, this.table.rowManager.element.scrollWidth - this.table.rowManager.element.clientWidth),0);\r\n\r\n\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\tthis.scrollHorizontal(left);\r\n\r\n\t\t\t\tresolve();\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - Column not visible\");\r\n\t\t\t\treject(\"Scroll Error - Column not visible\");\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\tgenerateCells(row){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tcells.push(column.generateCell(row));\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\t//////////////// Column Management /////////////////\r\n\tgetFlexBaseWidth(){\r\n\t\tvar totalWidth = this.table.element.clientWidth, //table element width\r\n\t\tfixedWidth = 0;\r\n\r\n\t\t//adjust for vertical scrollbar if present\r\n\t\tif(this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight){\r\n\t\t\ttotalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth;\r\n\t\t}\r\n\r\n\t\tthis.columnsByIndex.forEach(function(column){\r\n\t\t\tvar width, minWidth, colWidth;\r\n\r\n\t\t\tif(column.visible){\r\n\r\n\t\t\t\twidth = column.definition.width || 0;\r\n\r\n\t\t\t\tminWidth = parseInt(column.minWidth);\r\n\r\n\t\t\t\tif(typeof(width) == \"string\"){\r\n\t\t\t\t\tif(width.indexOf(\"%\") > -1){\r\n\t\t\t\t\t\tcolWidth = (totalWidth / 100) * parseInt(width) ;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tcolWidth = parseInt(width);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolWidth = width;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn fixedWidth;\r\n\t}\r\n\r\n\taddColumn(definition, before, nextToColumn){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar column = this._addColumn(definition, before, nextToColumn);\r\n\r\n\t\t\tthis._reIndexColumns();\r\n\r\n\t\t\tthis.dispatch(\"column-add\", definition, before, nextToColumn);\r\n\r\n\t\t\tif(this.layoutMode() != \"fitColumns\"){\r\n\t\t\t\tcolumn.reinitializeWidth();\r\n\t\t\t}\r\n\r\n\t\t\tthis.redraw(true);\r\n\r\n\t\t\tthis.table.rowManager.reinitialize();\r\n\r\n\t\t\tthis.renderer.rerenderColumns();\r\n\r\n\t\t\tresolve(column);\r\n\t\t});\r\n\t}\r\n\r\n\t//remove column from system\r\n\tderegisterColumn(column){\r\n\t\tvar field = column.getField(),\r\n\t\tindex;\r\n\r\n\t\t//remove from field list\r\n\t\tif(field){\r\n\t\t\tdelete this.columnsByField[field];\r\n\t\t}\r\n\r\n\t\t//remove from index list\r\n\t\tindex = this.columnsByIndex.indexOf(column);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columnsByIndex.splice(index, 1);\r\n\t\t}\r\n\r\n\t\t//remove from column list\r\n\t\tindex = this.columns.indexOf(column);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columns.splice(index, 1);\r\n\t\t}\r\n\r\n\t\tthis.verticalAlignHeaders();\r\n\r\n\t\tthis.redraw();\r\n\t}\r\n\r\n\t//redraw columns\r\n\tredraw(force){\r\n\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\tthis.verticalAlignHeaders();\r\n\t\t}\r\n\r\n\t\tif(force){\r\n\t\t\tthis.table.rowManager.resetScroll();\r\n\t\t\tthis.table.rowManager.reinitialize();\r\n\t\t}\r\n\r\n\t\tif(!this.confirm(\"table-redrawing\", force)){\r\n\t\t\tthis.layoutRefresh();\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"table-redraw\", force);\r\n\r\n\t\tthis.table.footerManager.redraw();\r\n\t}\r\n}","//public row object\r\nexport default class RowComponent {\r\n\r\n\tconstructor (row){\r\n\t\tthis._row = row;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._row.table.componentFunctionBinder.handle(\"row\", target._row, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\treturn this._row.getData(transform);\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._row.getElement();\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._row.getCells().forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar cell = this._row.getCell(column);\r\n\t\treturn cell ? cell.getComponent() : false;\r\n\t}\r\n\r\n\tgetIndex(){\r\n\t\treturn this._row.getData(\"data\")[this._row.table.options.index];\r\n\t}\r\n\r\n\tgetPosition(active){\r\n\t\treturn this._row.table.rowManager.getRowPosition(this._row, active);\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn this._row.delete();\r\n\t}\r\n\r\n\tscrollTo(){\r\n\t\treturn this._row.table.rowManager.scrollToRow(this._row);\r\n\t}\r\n\r\n\tmove(to, after){\r\n\t\tthis._row.moveToRow(to, after);\r\n\t}\r\n\r\n\tupdate(data){\r\n\t\treturn this._row.updateData(data);\r\n\t}\r\n\r\n\tnormalizeHeight(){\r\n\t\tthis._row.normalizeHeight(true);\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._row;\r\n\t}\r\n\r\n\treformat(){\r\n\t\treturn this._row.reinitialize();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._row.table;\r\n\t}\r\n\r\n\tgetNextRow(){\r\n\t\tvar row = this._row.nextRow();\r\n\t\treturn row ? row.getComponent() : row;\r\n\t}\r\n\r\n\tgetPrevRow(){\r\n\t\tvar row = this._row.prevRow();\r\n\t\treturn row ? row.getComponent() : row;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport RowComponent from './RowComponent.js';\r\nimport Helpers from '../tools/Helpers.js';\r\n\r\nexport default class Row extends CoreFeature{\r\n\tconstructor (data, parent, type = \"row\"){\r\n\t\tsuper(parent.table);\r\n\r\n\t\tthis.parent = parent;\r\n\t\tthis.data = {};\r\n\t\tthis.type = type; //type of element\r\n\t\tthis.element = false;\r\n\t\tthis.modules = {}; //hold module variables;\r\n\t\tthis.cells = [];\r\n\t\tthis.height = 0; //hold element height\r\n\t\tthis.heightStyled = \"\"; //hold element height prestyled to improve render efficiency\r\n\t\tthis.manualHeight = false; //user has manually set row height\r\n\t\tthis.outerHeight = 0; //holde lements outer height\r\n\t\tthis.initialized = false; //element has been rendered\r\n\t\tthis.heightInitialized = false; //element has resized cells to fit\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\tthis.created = false;\r\n\r\n\t\tthis.setData(data);\r\n\t}\r\n\r\n\tcreate(){\r\n\t\tif(!this.created){\r\n\t\t\tthis.created = true;\r\n\t\t\tthis.generateElement();\r\n\t\t}\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\r\n\t\tthis.element = el;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\tthis.create();\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tdetachElement(){\r\n\t\tif (this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateElement(){\r\n\t\tthis.createElement();\r\n\t\tthis.dispatch(\"row-init\", this);\r\n\t}\r\n\r\n\tgenerateCells(){\r\n\t\tthis.cells = this.table.columnManager.generateCells(this);\r\n\t}\r\n\r\n\t//functions to setup on first render\r\n\tinitialize(force){\r\n\t\tthis.create();\r\n\r\n\t\tif(!this.initialized || force){\r\n\r\n\t\t\tthis.deleteCells();\r\n\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\tthis.dispatch(\"row-layout-before\", this);\r\n\r\n\t\t\tthis.generateCells();\r\n\r\n\t\t\tthis.initialized = true;\r\n\r\n\t\t\tthis.table.columnManager.renderer.renderRowCells(this);\r\n\r\n\t\t\tif(force){\r\n\t\t\t\tthis.normalizeHeight();\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-layout\", this);\r\n\r\n\t\t\tif(this.table.options.rowFormatter){\r\n\t\t\t\tthis.table.options.rowFormatter(this.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-layout-after\", this);\r\n\t\t}else{\r\n\t\t\tthis.table.columnManager.renderer.rerenderRowCells(this);\r\n\t\t}\r\n\t}\r\n\r\n\treinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\r\n\t\tif(this.element && this.element.offsetParent !== null){\r\n\t\t\tthis.normalizeHeight(true);\r\n\t\t}\r\n\t}\r\n\r\n\tdeinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\t}\r\n\r\n\treinitialize(children){\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\r\n\t\tif(!this.manualHeight){\r\n\t\t\tthis.height = 0;\r\n\t\t\tthis.heightStyled = \"\";\r\n\t\t}\r\n\r\n\t\tif(this.element && this.element.offsetParent !== null){\r\n\t\t\tthis.initialize(true);\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"row-relayout\", this);\r\n\t}\r\n\r\n\t//get heights when doing bulk row style calcs in virtual DOM\r\n\tcalcHeight(force){\r\n\r\n\t\tvar maxHeight = 0,\r\n\t\tminHeight = this.table.options.resizableRows ? this.element.clientHeight : 0;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tvar height = cell.getHeight();\r\n\t\t\tif(height > maxHeight){\r\n\t\t\t\tmaxHeight = height;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(force){\r\n\t\t\tthis.height = Math.max(maxHeight, minHeight);\r\n\t\t}else{\r\n\t\t\tthis.height = this.manualHeight ? this.height : Math.max(maxHeight, minHeight);\r\n\t\t}\r\n\r\n\t\tthis.heightStyled = this.height ? this.height + \"px\" : \"\";\r\n\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t}\r\n\r\n\t//set of cells\r\n\tsetCellHeight(){\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setHeight();\r\n\t\t});\r\n\r\n\t\tthis.heightInitialized = true;\r\n\t}\r\n\r\n\tclearCellHeight(){\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.clearHeight();\r\n\t\t});\r\n\t}\r\n\r\n\t//normalize the height of elements in the row\r\n\tnormalizeHeight(force){\r\n\t\tif(force){\r\n\t\t\tthis.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis.calcHeight(force);\r\n\r\n\t\tthis.setCellHeight();\r\n\t}\r\n\r\n\t//set height of rows\r\n\tsetHeight(height, force){\r\n\t\tif(this.height != height || force){\r\n\r\n\t\t\tthis.manualHeight = true;\r\n\r\n\t\t\tthis.height = height;\r\n\t\t\tthis.heightStyled = height ? height + \"px\" : \"\";\r\n\r\n\t\t\tthis.setCellHeight();\r\n\r\n\t\t\t// this.outerHeight = this.element.outerHeight();\r\n\t\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t\t}\r\n\t}\r\n\r\n\t//return rows outer height\r\n\tgetHeight(){\r\n\t\treturn this.outerHeight;\r\n\t}\r\n\r\n\t//return rows outer Width\r\n\tgetWidth(){\r\n\t\treturn this.element.offsetWidth;\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\tdeleteCell(cell){\r\n\t\tvar index = this.cells.indexOf(cell);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.cells.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Data Management /////////////////\r\n\tsetData(data){\r\n\t\tthis.data = this.chain(\"row-data-init-before\", [this, data], undefined, data);\r\n\r\n\t\tthis.dispatch(\"row-data-init-after\", this);\r\n\t}\r\n\r\n\t//update the rows data\r\n\tupdateData(updatedData){\r\n\t\tvar visible = this.element && Helpers.elVisible(this.element),\r\n\t\ttempData = {},\r\n\t\tnewRowData;\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\r\n\t\t\tif(typeof updatedData === \"string\"){\r\n\t\t\t\tupdatedData = JSON.parse(updatedData);\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-save-before\", this);\r\n\r\n\t\t\tif(this.subscribed(\"row-data-changing\")){\r\n\t\t\t\ttempData = Object.assign(tempData, this.data);\r\n\t\t\t\ttempData = Object.assign(tempData, updatedData);\r\n\t\t\t}\r\n\r\n\t\t\tnewRowData = this.chain(\"row-data-changing\", [this, tempData, updatedData], null, updatedData);\r\n\r\n\t\t\t//set data\r\n\t\t\tfor (var attrname in newRowData) {\r\n\t\t\t\tthis.data[attrname] = newRowData[attrname];\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-save-after\", this);\r\n\r\n\t\t\t//update affected cells only\r\n\t\t\tfor (var attrname in updatedData) {\r\n\r\n\t\t\t\tlet columns = this.table.columnManager.getColumnsByFieldRoot(attrname);\r\n\r\n\t\t\t\tcolumns.forEach((column) => {\r\n\t\t\t\t\tlet cell = this.getCell(column.getField());\r\n\r\n\t\t\t\t\tif(cell){\r\n\t\t\t\t\t\tlet value = column.getFieldValue(newRowData);\r\n\t\t\t\t\t\tif(cell.getValue() != value){\r\n\t\t\t\t\t\t\tcell.setValueProcessData(value);\r\n\r\n\t\t\t\t\t\t\tif(visible){\r\n\t\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t//Partial reinitialization if visible\r\n\t\t\tif(visible){\r\n\t\t\t\tthis.normalizeHeight(true);\r\n\r\n\t\t\t\tif(this.table.options.rowFormatter){\r\n\t\t\t\t\tthis.table.options.rowFormatter(this.getComponent());\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.initialized = false;\r\n\t\t\t\tthis.height = 0;\r\n\t\t\t\tthis.heightStyled = \"\";\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-changed\", this, visible, updatedData);\r\n\r\n\t\t\t//this.reinitialize();\r\n\r\n\t\t\tthis.dispatchExternal(\"rowUpdated\", this.getComponent());\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t\t}\r\n\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\tif(transform){\r\n\t\t\treturn this.chain(\"row-data-retrieve\", [this, transform], null, this.data);\r\n\t\t}\r\n\r\n\t\treturn this.data;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar match = false;\r\n\r\n\t\tcolumn = this.table.columnManager.findColumn(column);\r\n\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\r\n\t\tmatch = this.cells.find(function(cell){\r\n\t\t\treturn cell.column === column;\r\n\t\t});\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tgetCellIndex(findCell){\r\n\t\treturn this.cells.findIndex(function(cell){\r\n\t\t\treturn cell === findCell;\r\n\t\t});\r\n\t}\r\n\r\n\tfindCell(subject){\r\n\t\treturn this.cells.find((cell) => {\r\n\t\t\treturn cell.element === subject;\r\n\t\t});\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\r\n\t\treturn this.cells;\r\n\t}\r\n\r\n\tnextRow(){\r\n\t\tvar row = this.table.rowManager.nextDisplayRow(this, true);\r\n\t\treturn row || false;\r\n\t}\r\n\r\n\tprevRow(){\r\n\t\tvar row = this.table.rowManager.prevDisplayRow(this, true);\r\n\t\treturn row || false;\r\n\t}\r\n\r\n\tmoveToRow(to, before){\r\n\t\tvar toRow = this.table.rowManager.findRow(to);\r\n\r\n\t\tif(toRow){\r\n\t\t\tthis.table.rowManager.moveRowActual(this, toRow, !before);\r\n\t\t\tthis.table.rowManager.refreshActiveData(\"display\", false, true);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching row found:\", to);\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////// Actions /////////////////////\r\n\tdelete(){\r\n\t\tthis.dispatch(\"row-delete\", this);\r\n\r\n\t\tthis.deleteActual();\r\n\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\r\n\tdeleteActual(blockRedraw){\r\n\t\tvar index = this.table.rowManager.getRowIndex(this);\r\n\r\n\t\tthis.detatchModules();\r\n\r\n\t\tthis.table.rowManager.deleteRow(this, blockRedraw);\r\n\r\n\t\tthis.deleteCells();\r\n\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\t\tthis.element = false;\r\n\r\n\t\tthis.dispatch(\"row-deleted\", this);\r\n\t}\r\n\r\n\tdetatchModules(){\r\n\t\tthis.dispatch(\"row-deleting\", this);\r\n\t}\r\n\r\n\tdeleteCells(){\r\n\t\tvar cellCount = this.cells.length;\r\n\r\n\t\tfor(let i = 0; i < cellCount; i++){\r\n\t\t\tthis.cells[0].delete();\r\n\t\t}\r\n\t}\r\n\r\n\twipe(){\r\n\t\tthis.detatchModules();\r\n\t\tthis.deleteCells();\r\n\r\n\t\tif(this.element){\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\tif(this.element.parentNode){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.modules = {};\r\n\t}\r\n\r\n\tgetGroup(){\r\n\t\treturn this.modules.group || false;\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new RowComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class BaiscVertical extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.verticalFillMode = \"fill\";\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t}\r\n\r\n\tclearRows(){\r\n\t\tvar element = this.tableElement;\r\n\r\n\t\t// element.children.detach();\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\telement.scrollTop = 0;\r\n\t\telement.scrollLeft = 0;\r\n\r\n\t\telement.style.minWidth = \"\";\r\n\t\telement.style.minHeight = \"\";\r\n\t\telement.style.display = \"\";\r\n\t\telement.style.visibility = \"\";\r\n\t}\r\n\r\n\trenderRows(){\r\n\t\tvar element = this.tableElement,\r\n\t\tonlyGroupHeaders = true;\r\n\r\n\t\tthis.rows().forEach((row, index) => {\r\n\t\t\tthis.styleRow(row, index);\r\n\t\t\telement.appendChild(row.getElement());\r\n\t\t\trow.initialize(true);\r\n\r\n\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\tonlyGroupHeaders = false;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(onlyGroupHeaders){\r\n\t\t\telement.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t}else{\r\n\t\t\telement.style.minWidth = \"\";\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trerenderRows(callback){\r\n\t\tthis.clearRows();\r\n\t\tthis.renderRows();\r\n\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\tvar rowTop = Helpers.elOffset(row.getElement()).top;\r\n\r\n\t\treturn !(Math.abs(this.elementVertical.scrollTop - rowTop) > Math.abs(this.elementVertical.scrollTop + this.elementVertical.clientHeight - rowTop));\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tthis.elementVertical.scrollTop = Helpers.elOffset(rowEl).top - Helpers.elOffset(this.elementVertical).top + this.elementVertical.scrollTop;\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\treturn this.rows();\r\n\t}\r\n\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class VirtualDomVertical extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.verticalFillMode = \"fill\";\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.vDomRowHeight = 20; //approximation of row heights for padding\r\n\r\n\t\tthis.vDomTop = 0; //hold position for first rendered row in the virtual DOM\r\n\t\tthis.vDomBottom = 0; //hold possition for last rendered row in the virtual DOM\r\n\r\n\t\tthis.vDomScrollPosTop = 0; //last scroll position of the vDom top;\r\n\t\tthis.vDomScrollPosBottom = 0; //last scroll position of the vDom bottom;\r\n\r\n\t\tthis.vDomTopPad = 0; //hold value of padding for top of virtual DOM\r\n\t\tthis.vDomBottomPad = 0; //hold value of padding for bottom of virtual DOM\r\n\r\n\t\tthis.vDomMaxRenderChain = 90; //the maximum number of dom elements that can be rendered in 1 go\r\n\r\n\t\tthis.vDomWindowBuffer = 0; //window row buffer before removing elements, to smooth scrolling\r\n\r\n\t\tthis.vDomWindowMinTotalRows = 20; //minimum number of rows to be generated in virtual dom (prevent buffering issues on tables with tall rows)\r\n\t\tthis.vDomWindowMinMarginRows = 5; //minimum number of rows to be generated in virtual dom margin\r\n\r\n\t\tthis.vDomTopNewRows = []; //rows to normalize after appending to optimize render speed\r\n\t\tthis.vDomBottomNewRows = []; //rows to normalize after appending to optimize render speed\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t///////// Public Functions ///////////\r\n\t//////////////////////////////////////\r\n\r\n\tclearRows(){\r\n\t\tvar element = this.tableElement;\r\n\r\n\t\t// element.children.detach();\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\telement.style.paddingTop = \"\";\r\n\t\telement.style.paddingBottom = \"\";\r\n\t\t// element.style.minWidth = \"\";\r\n\t\telement.style.minHeight = \"\";\r\n\t\telement.style.display = \"\";\r\n\t\telement.style.visibility = \"\";\r\n\r\n\t\tthis.elementVertical.scrollTop = 0;\r\n\t\tthis.elementVertical.scrollLeft = 0;\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.vDomTop = 0;\r\n\t\tthis.vDomBottom = 0;\r\n\t\tthis.vDomTopPad = 0;\r\n\t\tthis.vDomBottomPad = 0;\r\n\t\tthis.vDomScrollPosTop = 0;\r\n\t\tthis.vDomScrollPosBottom = 0;\r\n\t}\r\n\r\n\trenderRows(){\r\n\t\tthis._virtualRenderFill();\r\n\t}\r\n\r\n\trerenderRows(callback){\r\n\t\tvar scrollTop = this.elementVertical.scrollTop;\r\n\t\tvar topRow = false;\r\n\t\tvar topOffset = false;\r\n\r\n\t\tvar left = this.table.rowManager.scrollLeft;\r\n\r\n\t\tvar rows = this.rows();\r\n\r\n\t\tfor(var i = this.vDomTop; i <= this.vDomBottom; i++){\r\n\r\n\t\t\tif(rows[i]){\r\n\t\t\t\tvar diff = scrollTop - rows[i].getElement().offsetTop;\r\n\r\n\t\t\t\tif(topOffset === false || Math.abs(diff) < topOffset){\r\n\t\t\t\t\ttopOffset = diff;\r\n\t\t\t\t\ttopRow = i;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\trows.forEach((row) => {\r\n\t\t\trow.deinitializeHeight();\r\n\t\t});\r\n\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\r\n\t\tthis._virtualRenderFill((topRow === false ? this.rows.length - 1 : topRow), true, topOffset || 0);\r\n\r\n\t\tthis.scrollColumns(left);\r\n\t}\r\n\r\n\tscrollColumns(left){\r\n\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t}\r\n\r\n\tscrollRows(top, dir){\r\n\t\tvar topDiff = top - this.vDomScrollPosTop;\r\n\t\tvar bottomDiff = top - this.vDomScrollPosBottom;\r\n\t\tvar margin = this.vDomWindowBuffer * 2;\r\n\t\tvar rows = this.rows();\r\n\r\n\t\tthis.scrollTop = top;\r\n\r\n\t\tif(-topDiff > margin || bottomDiff > margin){\r\n\t\t\t//if big scroll redraw table;\r\n\t\t\tvar left = this.table.rowManager.scrollLeft;\r\n\t\t\tthis._virtualRenderFill(Math.floor((this.elementVertical.scrollTop / this.elementVertical.scrollHeight) * rows.length));\r\n\t\t\tthis.scrollColumns(left);\r\n\t\t}else{\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\t//scrolling up\r\n\t\t\t\tif(topDiff < 0){\r\n\t\t\t\t\tthis._addTopRow(rows, -topDiff);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(bottomDiff < 0){\r\n\t\t\t\t\t//hide bottom row if needed\r\n\t\t\t\t\tif(this.vDomScrollHeight - this.scrollTop > this.vDomWindowBuffer){\r\n\t\t\t\t\t\tthis._removeBottomRow(rows, -bottomDiff);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomScrollPosBottom = this.scrollTop;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\r\n\t\t\t\tif(bottomDiff >= 0){\r\n\t\t\t\t\tthis._addBottomRow(rows, bottomDiff);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//scrolling down\r\n\t\t\t\tif(topDiff >= 0){\r\n\t\t\t\t\t//hide top row if needed\r\n\t\t\t\t\tif(this.scrollTop > this.vDomWindowBuffer){\r\n\t\t\t\t\t\tthis._removeTopRow(rows, topDiff);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomScrollPosTop = this.scrollTop;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tresize(){\r\n\t\tthis.vDomWindowBuffer = this.table.options.renderVerticalBuffer || this.elementVertical.clientHeight;\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\tvar rowIndex = this.rows().indexOf(row);\r\n\r\n\t\treturn !(Math.abs(this.vDomTop - rowIndex) > Math.abs(this.vDomBottom - rowIndex));\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\tvar index = this.rows().indexOf(row);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis._virtualRenderFill(index, true);\r\n\t\t}\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\tvar topEdge = this.elementVertical.scrollTop,\r\n\t\tbottomEdge = this.elementVertical.clientHeight + topEdge,\r\n\t\ttopFound = false,\r\n\t\ttopRow = 0,\r\n\t\tbottomRow = 0,\r\n\t\trows = this.rows();\r\n\r\n\t\tif(includingBuffer){\r\n\t\t\ttopRow = this.vDomTop;\r\n\t\t\tbottomRow = this.vDomBottom;\r\n\t\t}else{\r\n\t\t\tfor(var i = this.vDomTop; i <= this.vDomBottom; i++){\r\n\t\t\t\tif(rows[i]){\r\n\t\t\t\t\tif(!topFound){\r\n\t\t\t\t\t\tif((topEdge - rows[i].getElement().offsetTop) >= 0){\r\n\t\t\t\t\t\t\ttopRow = i;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\ttopFound = true;\r\n\r\n\t\t\t\t\t\t\tif(bottomEdge - rows[i].getElement().offsetTop >= 0){\r\n\t\t\t\t\t\t\t\tbottomRow = i;\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(bottomEdge - rows[i].getElement().offsetTop >= 0){\r\n\t\t\t\t\t\t\tbottomRow = i;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn rows.slice(topRow, bottomRow + 1);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t//////// Internal Rendering //////////\r\n\t//////////////////////////////////////\r\n\r\n\t//full virtual render\r\n\t_virtualRenderFill(position, forceMove, offset){\r\n\t\tvar\telement = this.tableElement,\r\n\t\tholder = this.elementVertical,\r\n\t\ttopPad = 0,\r\n\t\trowsHeight = 0,\r\n\t\theightOccupied = 0,\r\n\t\ttopPadHeight = 0,\r\n\t\ti = 0,\r\n\t\trows = this.rows(),\r\n\t\trowsCount = rows.length,\r\n\t\tcontainerHeight = this.elementVertical.clientHeight;\r\n\r\n\t\tposition = position || 0;\r\n\r\n\t\toffset = offset || 0;\r\n\r\n\t\tif(!position){\r\n\t\t\tthis.clear();\r\n\t\t}else{\r\n\t\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\t\t//check if position is too close to bottom of table\r\n\t\t\theightOccupied = (rowsCount - position + 1) * this.vDomRowHeight;\r\n\r\n\t\t\tif(heightOccupied < containerHeight){\r\n\t\t\t\tposition -= Math.ceil((containerHeight - heightOccupied) / this.vDomRowHeight);\r\n\t\t\t\tif(position < 0){\r\n\t\t\t\t\tposition = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//calculate initial pad\r\n\t\t\ttopPad = Math.min(Math.max(Math.floor(this.vDomWindowBuffer / this.vDomRowHeight), this.vDomWindowMinMarginRows), position);\r\n\t\t\tposition -= topPad;\r\n\t\t}\r\n\r\n\t\tif(rowsCount && Helpers.elVisible(this.elementVertical)){\r\n\t\t\tthis.vDomTop = position;\r\n\r\n\t\t\tthis.vDomBottom = position -1;\r\n\r\n\t\t\twhile ((rowsHeight <= containerHeight + this.vDomWindowBuffer || i < this.vDomWindowMinTotalRows) && this.vDomBottom < rowsCount -1){\r\n\t\t\t\tvar index = this.vDomBottom + 1,\r\n\t\t\t\trow = rows[index],\r\n\t\t\t\trowHeight = 0;\r\n\r\n\t\t\t\tthis.styleRow(row, index);\r\n\r\n\t\t\t\telement.appendChild(row.getElement());\r\n\r\n\t\t\t\trow.initialize();\r\n\r\n\t\t\t\tif(!row.heightInitialized){\r\n\t\t\t\t\trow.normalizeHeight(true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowHeight = row.getHeight();\r\n\r\n\t\t\t\tif(i < topPad){\r\n\t\t\t\t\ttopPadHeight += rowHeight;\r\n\t\t\t\t}else{\r\n\t\t\t\t\trowsHeight += rowHeight;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.vDomBottom ++;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\r\n\t\t\tif(!position){\r\n\t\t\t\tthis.vDomTopPad = 0;\r\n\t\t\t\t//adjust rowheight to match average of rendered elements\r\n\t\t\t\tthis.vDomRowHeight = Math.floor((rowsHeight + topPadHeight) / i);\r\n\t\t\t\tthis.vDomBottomPad = this.vDomRowHeight * (rowsCount - this.vDomBottom -1);\r\n\r\n\t\t\t\tthis.vDomScrollHeight = topPadHeight + rowsHeight + this.vDomBottomPad - containerHeight;\r\n\t\t\t}else{\r\n\t\t\t\tthis.vDomTopPad = !forceMove ? this.scrollTop - topPadHeight : (this.vDomRowHeight * this.vDomTop) + offset;\r\n\t\t\t\tthis.vDomBottomPad = this.vDomBottom == rowsCount-1 ? 0 : Math.max(this.vDomScrollHeight - this.vDomTopPad - rowsHeight - topPadHeight, 0);\r\n\t\t\t}\r\n\r\n\t\t\telement.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\telement.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\r\n\t\t\tif(forceMove){\r\n\t\t\t\tthis.scrollTop = this.vDomTopPad + (topPadHeight) + offset - (this.elementVertical.scrollWidth > this.elementVertical.clientWidth ? this.elementVertical.offsetHeight - containerHeight : 0);\r\n\t\t\t}\r\n\r\n\t\t\tthis.scrollTop = Math.min(this.scrollTop, this.elementVertical.scrollHeight - containerHeight);\r\n\r\n\t\t\t//adjust for horizontal scrollbar if present (and not at top of table)\r\n\t\t\tif(this.elementVertical.scrollWidth > this.elementVertical.offsetWidth && forceMove){\r\n\t\t\t\tthis.scrollTop += this.elementVertical.offsetHeight - containerHeight;\r\n\t\t\t}\r\n\r\n\t\t\tthis.vDomScrollPosTop = this.scrollTop;\r\n\t\t\tthis.vDomScrollPosBottom = this.scrollTop;\r\n\r\n\t\t\tholder.scrollTop = this.scrollTop;\r\n\r\n\t\t\tthis.dispatch(\"render-virtual-fill\");\r\n\t\t}\r\n\t}\r\n\r\n\t_addTopRow(rows, fillableSpace){\r\n\t\tvar table = this.tableElement,\r\n\t\taddedRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\tindex = this.vDomTop -1,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tif(this.vDomTop){\r\n\t\t\t\tlet row = rows[index],\r\n\t\t\t\trowHeight, initialized;\r\n\r\n\t\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\t\t\t\t\tinitialized = row.initialized;\r\n\r\n\t\t\t\t\tif(fillableSpace >= rowHeight){\r\n\r\n\t\t\t\t\t\tthis.styleRow(row, index);\r\n\t\t\t\t\t\ttable.insertBefore(row.getElement(), table.firstChild);\r\n\r\n\t\t\t\t\t\tif(!row.initialized || !row.heightInitialized){\r\n\t\t\t\t\t\t\taddedRows.push(row);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trow.initialize();\r\n\r\n\t\t\t\t\t\tif(!initialized){\r\n\t\t\t\t\t\t\trowHeight = row.getElement().offsetHeight;\r\n\r\n\t\t\t\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\t\tthis.vDomTop--;\r\n\t\t\t\t\t\tindex--;\r\n\t\t\t\t\t\ti++;\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of addedRows){\r\n\t\t\trow.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis._quickNormalizeRowHeight(addedRows);\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomTopPad -= paddingAdjust;\r\n\r\n\t\t\tif(this.vDomTopPad < 0){\r\n\t\t\t\tthis.vDomTopPad = index * this.vDomRowHeight;\r\n\t\t\t}\r\n\r\n\t\t\tif(index < 1){\r\n\t\t\t\tthis.vDomTopPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\ttable.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\tthis.vDomScrollPosTop -= paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_removeTopRow(rows, fillableSpace){\r\n\t\tvar removableRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[this.vDomTop],\r\n\t\t\trowHeight, diff;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\t\t\t\t\tthis.vDomTop++;\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tremovableRows.push(row);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of removableRows){\r\n\t\t\tlet rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomTopPad += paddingAdjust;\r\n\t\t\tthis.tableElement.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\tthis.vDomScrollPosTop += this.vDomTop ? paddingAdjust : paddingAdjust + this.vDomWindowBuffer;\r\n\t\t}\r\n\t}\r\n\r\n\t_addBottomRow(rows, fillableSpace){\r\n\t\tvar table = this.tableElement,\r\n\t\taddedRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\tindex = this.vDomBottom + 1,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[index],\r\n\t\t\trowHeight, initialized;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\t\t\t\tinitialized = row.initialized;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\r\n\t\t\t\t\tthis.styleRow(row, index);\r\n\t\t\t\t\ttable.appendChild(row.getElement());\r\n\r\n\t\t\t\t\tif(!row.initialized || !row.heightInitialized){\r\n\t\t\t\t\t\taddedRows.push(row);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\trow.initialize();\r\n\r\n\t\t\t\t\tif(!initialized){\r\n\t\t\t\t\t\trowHeight = row.getElement().offsetHeight;\r\n\r\n\t\t\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tthis.vDomBottom++;\r\n\t\t\t\t\tindex++;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of addedRows){\r\n\t\t\trow.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis._quickNormalizeRowHeight(addedRows);\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomBottomPad -= paddingAdjust;\r\n\r\n\t\t\tif(this.vDomBottomPad < 0 || index == rows.length -1){\r\n\t\t\t\tthis.vDomBottomPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\ttable.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\t\t\tthis.vDomScrollPosBottom += paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_removeBottomRow(rows, fillableSpace){\r\n\t\tvar removableRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[this.vDomBottom],\r\n\t\t\trowHeight, diff;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\t\t\t\t\tthis.vDomBottom --;\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tremovableRows.push(row);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of removableRows){\r\n\t\t\tlet rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomBottomPad += paddingAdjust;\r\n\r\n\t\t\tif(this.vDomBottomPad < 0){\r\n\t\t\t\tthis.vDomBottomPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\tthis.tableElement.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\t\t\tthis.vDomScrollPosBottom -= paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_quickNormalizeRowHeight(rows){\r\n\t\tfor(let row of rows){\r\n\t\t\trow.calcHeight();\r\n\t\t}\r\n\r\n\t\tfor(let row of rows){\r\n\t\t\trow.setCellHeight();\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\nimport Row from './row/Row.js';\r\nimport RowComponent from './row/RowComponent.js';\r\nimport Helpers from './tools/Helpers.js';\r\n\r\nimport RendererBasicVertical from './rendering/renderers/BasicVertical.js';\r\nimport RendererVirtualDomVertical from './rendering/renderers/VirtualDomVertical.js';\r\n\r\nexport default class RowManager extends CoreFeature{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.element = this.createHolderElement(); //containing element\r\n\t\tthis.tableElement = this.createTableElement(); //table element\r\n\t\tthis.heightFixer = this.createTableElement(); //table element\r\n\t\tthis.placeholder = null; //placeholder element\r\n\t\tthis.placeholderContents = null; //placeholder element\r\n\t\t\r\n\t\tthis.firstRender = false; //handle first render\r\n\t\tthis.renderMode = \"virtual\"; //current rendering mode\r\n\t\tthis.fixedHeight = false; //current rendering mode\r\n\t\t\r\n\t\tthis.rows = []; //hold row data objects\r\n\t\tthis.activeRowsPipeline = []; //hold calculation of active rows\r\n\t\tthis.activeRows = []; //rows currently available to on display in the table\r\n\t\tthis.activeRowsCount = 0; //count of active rows\r\n\t\t\r\n\t\tthis.displayRows = []; //rows currently on display in the table\r\n\t\tthis.displayRowsCount = 0; //count of display rows\r\n\t\t\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.rowNumColumn = false; //hold column component for row number column\r\n\t\t\r\n\t\tthis.redrawBlock = false; //prevent redraws to allow multiple data manipulations before continuing\r\n\t\tthis.redrawBlockRestoreConfig = false; //store latest redraw function calls for when redraw is needed\r\n\t\tthis.redrawBlockRenderInPosition = false; //store latest redraw function calls for when redraw is needed\r\n\t\t\r\n\t\tthis.dataPipeline = []; //hold data pipeline tasks\r\n\t\tthis.displayPipeline = []; //hold data display pipeline tasks\r\n\t\t\r\n\t\tthis.renderer = null;\r\n\t}\r\n\t\r\n\t//////////////// Setup Functions /////////////////\r\n\t\r\n\tcreateHolderElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-tableholder\");\r\n\t\tel.setAttribute(\"tabindex\", 0);\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tcreateTableElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-table\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tinitializePlaceholder(){\r\n\t\t//configure placeholder element\r\n\t\tif(typeof this.table.options.placeholder == \"string\"){\r\n\t\t\tlet el = document.createElement(\"div\");\r\n\t\t\tel.classList.add(\"tabulator-placeholder\");\r\n\t\t\t\r\n\t\t\tlet contents = document.createElement(\"div\");\r\n\t\t\tcontents.classList.add(\"tabulator-placeholder-contents\");\r\n\t\t\tcontents.innerHTML = this.table.options.placeholder;\r\n\t\t\t\r\n\t\t\tel.appendChild(contents);\r\n\t\t\t\r\n\t\t\tthis.placeholderContents = contents;\r\n\t\t\tthis.placeholder = el;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return containing element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\t\r\n\t//return table element\r\n\tgetTableElement(){\r\n\t\treturn this.tableElement;\r\n\t}\r\n\t\r\n\t//return position of row in table\r\n\tgetRowPosition(row, active){\r\n\t\tif(active){\r\n\t\t\treturn this.activeRows.indexOf(row);\r\n\t\t}else{\r\n\t\t\treturn this.rows.indexOf(row);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.initializePlaceholder()\r\n\t\tthis.initializeRenderer();\r\n\t\t\r\n\t\t//initialize manager\r\n\t\tthis.element.appendChild(this.tableElement);\r\n\t\t\r\n\t\tthis.firstRender = true;\r\n\t\t\r\n\t\t//scroll header along with table body\r\n\t\tthis.element.addEventListener(\"scroll\", () => {\r\n\t\t\tvar left = this.element.scrollLeft,\r\n\t\t\tleftDir = this.scrollLeft > left,\r\n\t\t\ttop = this.element.scrollTop,\r\n\t\t\ttopDir = this.scrollTop > top;\r\n\t\t\t\r\n\t\t\t//handle horizontal scrolling\r\n\t\t\tif(this.scrollLeft != left){\r\n\t\t\t\tthis.scrollLeft = left;\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"scroll-horizontal\", left, leftDir);\r\n\t\t\t\tthis.dispatchExternal(\"scrollHorizontal\", left, leftDir);\r\n\r\n\t\t\t\tthis._positionPlaceholder();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//handle vertical scrolling\r\n\t\t\tif(this.scrollTop != top){\r\n\t\t\t\tthis.scrollTop = top;\r\n\t\t\t\t\r\n\t\t\t\tthis.renderer.scrollRows(top, topDir);\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"scroll-vertical\", top, topDir);\r\n\t\t\t\tthis.dispatchExternal(\"scrollVertical\", top, topDir);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t////////////////// Row Manipulation //////////////////\r\n\tfindRow(subject){\r\n\t\tif(typeof subject == \"object\"){\r\n\t\t\tif(subject instanceof Row){\r\n\t\t\t\t//subject is row element\r\n\t\t\t\treturn subject;\r\n\t\t\t}else if(subject instanceof RowComponent){\r\n\t\t\t\t//subject is public row component\r\n\t\t\t\treturn subject._getSelf() || false;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\t//subject is a HTML element of the row\r\n\t\t\t\tlet match = this.rows.find((row) => {\r\n\t\t\t\t\treturn row.getElement() === subject;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\treturn match || false;\r\n\t\t\t}\r\n\t\t}else if(typeof subject == \"undefined\" || subject === null){\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the index of the row\r\n\t\t\tlet match = this.rows.find((row) => {\r\n\t\t\t\treturn row.data[this.table.options.index] == subject;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\treturn match || false;\r\n\t\t}\r\n\t\t\r\n\t\t//catch all for any other type of input\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tgetRowFromDataObject(data){\r\n\t\tvar match = this.rows.find((row) => {\r\n\t\t\treturn row.data === data;\r\n\t\t});\r\n\t\t\r\n\t\treturn match || false;\r\n\t}\r\n\t\r\n\tgetRowFromPosition(position, active){\r\n\t\tif(active){\r\n\t\t\treturn this.activeRows[position];\r\n\t\t}else{\r\n\t\t\treturn this.rows[position];\r\n\t\t}\r\n\t}\r\n\t\r\n\tscrollToRow(row, position, ifVisible){\r\n\t\treturn this.renderer.scrollToRowPosition(row, position, ifVisible);\r\n\t}\r\n\t\r\n\t////////////////// Data Handling //////////////////\r\n\tsetData(data, renderInPosition, columnsChanged){\r\n\t\treturn new Promise((resolve, reject)=>{\r\n\t\t\tif(renderInPosition && this.getDisplayRows().length){\r\n\t\t\t\tif(this.table.options.pagination){\r\n\t\t\t\t\tthis._setDataActual(data, true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.reRenderInPosition(() => {\r\n\t\t\t\t\t\tthis._setDataActual(data);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.options.autoColumns && columnsChanged && this.table.initialized){\r\n\t\t\t\t\tthis.table.columnManager.generateColumnsFromRowData(data);\r\n\t\t\t\t}\r\n\t\t\t\tthis.resetScroll();\r\n\t\t\t\t\r\n\t\t\t\tthis._setDataActual(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\t\r\n\t_setDataActual(data, renderInPosition){\r\n\t\tthis.dispatchExternal(\"dataProcessing\", data);\r\n\t\t\r\n\t\tthis._wipeElements();\r\n\t\t\r\n\t\tif(Array.isArray(data)){\r\n\t\t\tthis.dispatch(\"data-processing\", data);\r\n\t\t\t\r\n\t\t\tdata.forEach((def, i) => {\r\n\t\t\t\tif(def && typeof def === \"object\"){\r\n\t\t\t\t\tvar row = new Row(def, this);\r\n\t\t\t\t\tthis.rows.push(row);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Data Loading Warning - Invalid row data detected and ignored, expecting object but received:\", def);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.refreshActiveData(false, false, renderInPosition);\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"data-processed\", data);\r\n\t\t\tthis.dispatchExternal(\"dataProcessed\", data);\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Data Loading Error - Unable to process data due to invalid data type \\nExpecting: array \\nReceived: \", typeof data, \"\\nData: \", data);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_wipeElements(){\r\n\t\tthis.dispatch(\"rows-wipe\");\r\n\t\t\r\n\t\tthis.rows.forEach((row) => {\r\n\t\t\trow.wipe();\r\n\t\t});\r\n\t\t\r\n\t\tthis.rows = [];\r\n\t\tthis.activeRows = [];\r\n\t\tthis.activeRowsPipeline = [];\r\n\t\tthis.activeRowsCount = 0;\r\n\t\tthis.displayRows = [];\r\n\t\tthis.displayRowsCount = 0;\r\n\t\t\r\n\t\tthis.adjustTableSize();\r\n\t}\r\n\t\r\n\tdeleteRow(row, blockRedraw){\r\n\t\tvar allIndex = this.rows.indexOf(row),\r\n\t\tactiveIndex = this.activeRows.indexOf(row);\r\n\t\t\r\n\t\tif(activeIndex > -1){\r\n\t\t\tthis.activeRows.splice(activeIndex, 1);\r\n\t\t}\r\n\t\t\r\n\t\tif(allIndex > -1){\r\n\t\t\tthis.rows.splice(allIndex, 1);\r\n\t\t}\r\n\t\t\r\n\t\tthis.setActiveRows(this.activeRows);\r\n\t\t\r\n\t\tthis.displayRowIterator((rows) => {\r\n\t\t\tvar displayIndex = rows.indexOf(row);\r\n\t\t\t\r\n\t\t\tif(displayIndex > -1){\r\n\t\t\t\trows.splice(displayIndex, 1);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t}\r\n\t\t\r\n\t\tthis.regenerateRowNumbers();\r\n\t\t\r\n\t\tthis.dispatchExternal(\"rowDeleted\", row.getComponent());\r\n\t\t\r\n\t\tif(!this.displayRowsCount){\r\n\t\t\tthis._showPlaceholder();\r\n\t\t}\r\n\t\t\r\n\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\tthis.dispatchExternal(\"dataChanged\", this.getData());\r\n\t\t}\r\n\t}\r\n\t\r\n\taddRow(data, pos, index, blockRedraw){\r\n\t\tvar row = this.addRowActual(data, pos, index, blockRedraw);\r\n\t\treturn row;\r\n\t}\r\n\t\r\n\t//add multiple rows\r\n\taddRows(data, pos, index){\r\n\t\tvar length = 0,\r\n\t\trows = [];\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tpos = this.findAddRowPos(pos);\r\n\t\t\t\r\n\t\t\tif(!Array.isArray(data)){\r\n\t\t\t\tdata = [data];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlength = data.length - 1;\r\n\t\t\t\r\n\t\t\tif((typeof index == \"undefined\" && pos) || (typeof index !== \"undefined\" && !pos)){\r\n\t\t\t\tdata.reverse();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdata.forEach((item, i) => {\r\n\t\t\t\tvar row = this.addRow(item, pos, index, true);\r\n\t\t\t\trows.push(row);\r\n\t\t\t\tthis.dispatch(\"row-added\", row, data, pos, index);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.refreshActiveData(false, false, true);\r\n\t\t\t\r\n\t\t\tthis.regenerateRowNumbers();\r\n\t\t\t\r\n\t\t\tif(rows.length){\r\n\t\t\t\tthis._clearPlaceholder();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tresolve(rows);\r\n\t\t});\r\n\t}\r\n\t\r\n\tfindAddRowPos(pos){\r\n\t\tif(typeof pos === \"undefined\"){\r\n\t\t\tpos = this.table.options.addRowPos;\r\n\t\t}\r\n\t\t\r\n\t\tif(pos === \"pos\"){\r\n\t\t\tpos = true;\r\n\t\t}\r\n\t\t\r\n\t\tif(pos === \"bottom\"){\r\n\t\t\tpos = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn pos;\r\n\t}\r\n\t\r\n\taddRowActual(data, pos, index, blockRedraw){\r\n\t\tvar row = data instanceof Row ? data : new Row(data || {}, this),\r\n\t\ttop = this.findAddRowPos(pos),\r\n\t\tallIndex = -1,\r\n\t\tactiveIndex, chainResult;\r\n\t\t\r\n\t\tif(!index){\r\n\t\t\tchainResult = this.chain(\"row-adding-position\", [row, top], null, {index, top});\r\n\t\t\t\r\n\t\t\tindex = chainResult.index;\r\n\t\t\ttop = chainResult.top;\r\n\t\t}\r\n\t\t\r\n\t\tif(typeof index !== \"undefined\"){\r\n\t\t\tindex = this.findRow(index);\r\n\t\t}\r\n\t\t\r\n\t\tindex = this.chain(\"row-adding-index\", [row, index, top], null, index);\r\n\t\t\r\n\t\tif(index){\r\n\t\t\tallIndex = this.rows.indexOf(index);\r\n\t\t}\r\n\t\t\r\n\t\tif(index && allIndex > -1){\r\n\t\t\tactiveIndex = this.activeRows.indexOf(index);\r\n\t\t\t\r\n\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\tvar displayIndex = rows.indexOf(index);\r\n\t\t\t\t\r\n\t\t\t\tif(displayIndex > -1){\r\n\t\t\t\t\trows.splice((top ? displayIndex : displayIndex + 1), 0, row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(activeIndex > -1){\r\n\t\t\t\tthis.activeRows.splice((top ? activeIndex : activeIndex + 1), 0, row);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.rows.splice((top ? allIndex : allIndex + 1), 0, row);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tif(top){\r\n\t\t\t\t\r\n\t\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\t\trows.unshift(row);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRows.unshift(row);\r\n\t\t\t\tthis.rows.unshift(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\t\trows.push(row);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRows.push(row);\r\n\t\t\t\tthis.rows.push(row);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.setActiveRows(this.activeRows);\r\n\t\t\r\n\t\tthis.dispatchExternal(\"rowAdded\", row.getComponent());\r\n\t\t\r\n\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t}\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t}\r\n\t\t\r\n\t\treturn row;\r\n\t}\r\n\t\r\n\tmoveRow(from, to, after){\r\n\t\tthis.dispatch(\"row-move\", from, to, after);\r\n\t\t\r\n\t\tthis.moveRowActual(from, to, after);\r\n\t\t\r\n\t\tthis.regenerateRowNumbers();\r\n\t\t\r\n\t\tthis.dispatch(\"row-moved\", from, to, after);\r\n\t\tthis.dispatchExternal(\"rowMoved\", from.getComponent());\r\n\t}\r\n\t\r\n\tmoveRowActual(from, to, after){\r\n\t\tthis.moveRowInArray(this.rows, from, to, after);\r\n\t\tthis.moveRowInArray(this.activeRows, from, to, after);\r\n\t\t\r\n\t\tthis.displayRowIterator((rows) => {\r\n\t\t\tthis.moveRowInArray(rows, from, to, after);\r\n\t\t});\r\n\t\t\r\n\t\tthis.dispatch(\"row-moving\", from, to, after);\r\n\t}\r\n\t\r\n\tmoveRowInArray(rows, from, to, after){\r\n\t\tvar\tfromIndex, toIndex, start, end;\r\n\t\t\r\n\t\tif(from !== to){\r\n\t\t\t\r\n\t\t\tfromIndex = rows.indexOf(from);\r\n\t\t\t\r\n\t\t\tif (fromIndex > -1) {\r\n\t\t\t\t\r\n\t\t\t\trows.splice(fromIndex, 1);\r\n\t\t\t\t\r\n\t\t\t\ttoIndex = rows.indexOf(to);\r\n\t\t\t\t\r\n\t\t\t\tif (toIndex > -1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(after){\r\n\t\t\t\t\t\trows.splice(toIndex+1, 0, from);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trows.splice(toIndex, 0, from);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\trows.splice(fromIndex, 0, from);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//restyle rows\r\n\t\t\tif(rows === this.getDisplayRows()){\r\n\t\t\t\t\r\n\t\t\t\tstart = fromIndex < toIndex ? fromIndex : toIndex;\r\n\t\t\t\tend = toIndex > fromIndex ? toIndex : fromIndex +1;\r\n\t\t\t\t\r\n\t\t\t\tfor(let i = start; i <= end; i++){\r\n\t\t\t\t\tif(rows[i]){\r\n\t\t\t\t\t\tthis.styleRow(rows[i], i);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tclearData(){\r\n\t\tthis.setData([]);\r\n\t}\r\n\t\r\n\tgetRowIndex(row){\r\n\t\treturn this.findRowIndex(row, this.rows);\r\n\t}\r\n\t\r\n\tgetDisplayRowIndex(row){\r\n\t\tvar index = this.getDisplayRows().indexOf(row);\r\n\t\treturn index > -1 ? index : false;\r\n\t}\r\n\t\r\n\tnextDisplayRow(row, rowOnly){\r\n\t\tvar index = this.getDisplayRowIndex(row),\r\n\t\tnextRow = false;\r\n\t\t\r\n\t\t\r\n\t\tif(index !== false && index < this.displayRowsCount -1){\r\n\t\t\tnextRow = this.getDisplayRows()[index+1];\r\n\t\t}\r\n\t\t\r\n\t\tif(nextRow && (!(nextRow instanceof Row) || nextRow.type != \"row\")){\r\n\t\t\treturn this.nextDisplayRow(nextRow, rowOnly);\r\n\t\t}\r\n\t\t\r\n\t\treturn nextRow;\r\n\t}\r\n\t\r\n\tprevDisplayRow(row, rowOnly){\r\n\t\tvar index = this.getDisplayRowIndex(row),\r\n\t\tprevRow = false;\r\n\t\t\r\n\t\tif(index){\r\n\t\t\tprevRow = this.getDisplayRows()[index-1];\r\n\t\t}\r\n\t\t\r\n\t\tif(rowOnly && prevRow && (!(prevRow instanceof Row) || prevRow.type != \"row\")){\r\n\t\t\treturn this.prevDisplayRow(prevRow, rowOnly);\r\n\t\t}\r\n\t\t\r\n\t\treturn prevRow;\r\n\t}\r\n\t\r\n\tfindRowIndex(row, list){\r\n\t\tvar rowIndex;\r\n\t\t\r\n\t\trow = this.findRow(row);\r\n\t\t\r\n\t\tif(row){\r\n\t\t\trowIndex = list.indexOf(row);\r\n\t\t\t\r\n\t\t\tif(rowIndex > -1){\r\n\t\t\t\treturn rowIndex;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tgetData(active, transform){\r\n\t\tvar output = [],\r\n\t\trows = this.getRows(active);\r\n\t\t\r\n\t\trows.forEach(function(row){\r\n\t\t\tif(row.type == \"row\"){\r\n\t\t\t\toutput.push(row.getData(transform || \"data\"));\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetComponents(active){\r\n\t\tvar\toutput = [],\r\n\t\trows = this.getRows(active);\r\n\t\t\r\n\t\trows.forEach(function(row){\r\n\t\t\toutput.push(row.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetDataCount(active){\r\n\t\tvar rows = this.getRows(active);\r\n\t\t\r\n\t\treturn rows.length;\r\n\t}\r\n\t\r\n\tscrollHorizontal(left){\r\n\t\tthis.scrollLeft = left;\r\n\t\tthis.element.scrollLeft = left;\r\n\t\t\r\n\t\tthis.dispatch(\"scroll-horizontal\", left);\r\n\t}\r\n\t\r\n\tregisterDataPipelineHandler(handler, priority){\r\n\t\tif(typeof priority !== \"undefined\"){\r\n\t\t\tthis.dataPipeline.push({handler, priority})\r\n\t\t\tthis.dataPipeline.sort((a, b) => {\r\n\t\t\t\treturn a.priority - b.priority;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Data pipeline handlers must have a priority in order to be registered\")\r\n\t\t}\r\n\t}\r\n\t\r\n\tregisterDisplayPipelineHandler(handler, priority){\r\n\t\tif(typeof priority !== \"undefined\"){\r\n\t\t\tthis.displayPipeline.push({handler, priority})\r\n\t\t\tthis.displayPipeline.sort((a, b) => {\r\n\t\t\t\treturn a.priority - b.priority;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Display pipeline handlers must have a priority in order to be registered\")\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set active data set\r\n\trefreshActiveData(handler, skipStage, renderInPosition){\r\n\t\tvar table = this.table,\r\n\t\tstage = \"\",\r\n\t\tindex = 0,\r\n\t\tcascadeOrder = [\"all\", \"dataPipeline\", \"display\", \"displayPipeline\", \"end\"],\r\n\t\tdisplayIndex;\r\n\t\t\r\n\t\t\r\n\t\tif(typeof handler === \"function\"){\r\n\t\t\tindex = this.dataPipeline.findIndex((item) => {\r\n\t\t\t\treturn item.handler === handler;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\tstage = \"dataPipeline\";\r\n\t\t\t\t\r\n\t\t\t\tif(skipStage){\r\n\t\t\t\t\tif(index == this.dataPipeline.length - 1){\r\n\t\t\t\t\t\tstage = \"display\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tindex++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tindex = this.displayPipeline.findIndex((item) => {\r\n\t\t\t\t\treturn item.handler === handler;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tstage = \"displayPipeline\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(skipStage){\r\n\t\t\t\t\t\tif(index == this.displayPipeline.length - 1){\r\n\t\t\t\t\t\t\tstage = \"end\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tindex++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.error(\"Unable to refresh data, invalid handler provided\", handler)\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tstage = handler || \"all\";\r\n\t\t\tindex = 0;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.redrawBlock){\r\n\t\t\tif(!this.redrawBlockRestoreConfig || (this.redrawBlockRestoreConfig && ((this.redrawBlockRestoreConfig.stage === stage && index < this.redrawBlockRestoreConfig.index) || (cascadeOrder.indexOf(stage) < cascadeOrder.indexOf(this.redrawBlockRestoreConfig.stage))))){\r\n\t\t\t\tthis.redrawBlockRestoreConfig = {\r\n\t\t\t\t\thandler: handler,\r\n\t\t\t\t\tskipStage: skipStage,\r\n\t\t\t\t\trenderInPosition: renderInPosition,\r\n\t\t\t\t\tstage:stage,\r\n\t\t\t\t\tindex:index,\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn;\r\n\t\t}else{\r\n\t\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\t\tif(renderInPosition){\r\n\t\t\t\t\tthis.reRenderInPosition(this.refreshPipelines.bind(this, handler, stage, index, renderInPosition));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!handler){\r\n\t\t\t\t\t\tthis.table.columnManager.renderer.renderColumns();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.renderTable();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(table.options.layoutColumnsOnNewData){\r\n\t\t\t\t\t\tthis.table.columnManager.redraw(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"data-refreshed\");\r\n\t\t}\r\n\t}\r\n\t\r\n\trefreshPipelines(handler, stage, index, renderInPosition){\r\n\t\tthis.dispatch(\"data-refreshing\");\r\n\t\t\r\n\t\tif(!handler){\r\n\t\t\tthis.activeRowsPipeline[0] = this.rows.slice(0);\r\n\t\t}\r\n\t\t\r\n\t\t//cascade through data refresh stages\r\n\t\tswitch(stage){\r\n\t\t\tcase \"all\":\r\n\t\t\t//handle case where alldata needs refreshing\r\n\t\t\t\r\n\t\t\tcase \"dataPipeline\":\r\n\t\t\t\r\n\t\t\tfor(let i = index; i < this.dataPipeline.length; i++){\r\n\t\t\t\tlet result = this.dataPipeline[i].handler(this.activeRowsPipeline[i].slice(0));\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRowsPipeline[i + 1] = result || this.activeRowsPipeline[i].slice(0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);\r\n\t\t\t\r\n\t\t\tthis.regenerateRowNumbers();\r\n\t\t\t\r\n\t\t\tcase \"display\":\r\n\t\t\tindex = 0;\r\n\t\t\tthis.resetDisplayRows();\r\n\t\t\t\r\n\t\t\tcase \"displayPipeline\":\r\n\t\t\tfor(let i = index; i < this.displayPipeline.length; i++){\r\n\t\t\t\tlet result = this.displayPipeline[i].handler((i ? this.getDisplayRows(i - 1) : this.activeRows).slice(0), renderInPosition);\r\n\t\t\t\t\r\n\t\t\t\tthis.setDisplayRows(result || this.getDisplayRows(i - 1).slice(0), i);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase \"end\":\r\n\t\t\t//case to handle scenario when trying to skip past end stage\r\n\t\t}\r\n\t}\r\n\t\r\n\t//regenerate row numbers for row number formatter if in use\r\n\tregenerateRowNumbers(){\r\n\t\tif(this.rowNumColumn){\r\n\t\t\tthis.activeRows.forEach((row) => {\r\n\t\t\t\tvar cell = row.getCell(this.rowNumColumn);\r\n\t\t\t\t\r\n\t\t\t\tif(cell){\r\n\t\t\t\t\tcell._generateContents();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetActiveRows(activeRows){\r\n\t\tthis.activeRows = activeRows;\r\n\t\tthis.activeRowsCount = this.activeRows.length;\r\n\t}\r\n\t\r\n\t//reset display rows array\r\n\tresetDisplayRows(){\r\n\t\tthis.displayRows = [];\r\n\t\t\r\n\t\tthis.displayRows.push(this.activeRows.slice(0));\r\n\t\t\r\n\t\tthis.displayRowsCount = this.displayRows[0].length;\r\n\t}\r\n\t\r\n\tgetNextDisplayIndex(){\r\n\t\treturn this.displayRows.length;\r\n\t}\r\n\t\r\n\t//set display row pipeline data\r\n\tsetDisplayRows(displayRows, index){\r\n\t\t\r\n\t\tvar output = true;\r\n\t\t\r\n\t\tif(index && typeof this.displayRows[index] != \"undefined\"){\r\n\t\t\tthis.displayRows[index] = displayRows;\r\n\t\t\toutput = true;\r\n\t\t}else{\r\n\t\t\tthis.displayRows.push(displayRows)\r\n\t\t\toutput = index = this.displayRows.length -1;\r\n\t\t}\r\n\t\t\r\n\t\tif(index == this.displayRows.length -1){\r\n\t\t\tthis.displayRowsCount = this.displayRows[this.displayRows.length -1].length;\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetDisplayRows(index){\r\n\t\tif(typeof index == \"undefined\"){\r\n\t\t\treturn this.displayRows.length ? this.displayRows[this.displayRows.length -1] : [];\r\n\t\t}else{\r\n\t\t\treturn this.displayRows[index] || [];\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetVisibleRows(chain, viewable){\r\n\t\tvar rows = Object.assign([], this.renderer.visibleRows(!viewable));\r\n\t\t\r\n\t\tif(chain){\r\n\t\t\trows = this.chain(\"rows-visible\", [viewable], rows, rows);\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t//repeat action accross display rows\r\n\tdisplayRowIterator(callback){\r\n\t\tthis.activeRowsPipeline.forEach(callback);\r\n\t\tthis.displayRows.forEach(callback);\r\n\t\t\r\n\t\tthis.displayRowsCount = this.displayRows[this.displayRows.length -1].length;\r\n\t}\r\n\t\r\n\t//return only actual rows (not group headers etc)\r\n\tgetRows(type){\r\n\t\tvar rows;\r\n\t\t\r\n\t\tswitch(type){\r\n\t\t\tcase \"active\":\r\n\t\t\trows = this.activeRows;\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"display\":\r\n\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"visible\":\r\n\t\t\trows = this.getVisibleRows(false, true);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\trows = this.chain(\"rows-retrieve\", type, null, this.rows) || this.rows;\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t///////////////// Table Rendering /////////////////\r\n\t//trigger rerender of table in current position\r\n\treRenderInPosition(callback){\r\n\t\tif(this.redrawBlock){\r\n\t\t\tif(callback){\r\n\t\t\t\tcallback();\r\n\t\t\t}else{\r\n\t\t\t\tthis.redrawBlockRenderInPosition = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.renderer.rerenderRows(callback);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRenderer(){\r\n\t\tvar renderClass;\r\n\t\t\r\n\t\tvar renderers = {\r\n\t\t\t\"virtual\": RendererVirtualDomVertical,\r\n\t\t\t\"basic\": RendererBasicVertical,\r\n\t\t};\r\n\t\t\r\n\t\tif(typeof this.table.options.renderVertical === \"string\"){\r\n\t\t\trenderClass = renderers[this.table.options.renderVertical];\r\n\t\t}else{\r\n\t\t\trenderClass = this.table.options.renderVertical;\r\n\t\t}\r\n\t\t\r\n\t\tif(renderClass){\r\n\t\t\tthis.renderer = new renderClass(this.table, this.element, this.tableElement);\r\n\t\t\tthis.renderer.initialize();\r\n\t\t\t\r\n\t\t\tif((this.table.element.clientHeight || this.table.options.height)){\r\n\t\t\t\tthis.fixedHeight = true;\r\n\t\t\t}else{\r\n\t\t\t\tthis.fixedHeight = false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Unable to find matching renderer:\", table.options.renderVertical);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRenderMode(){\r\n\t\treturn this.renderMode;\r\n\t}\r\n\t\r\n\trenderTable(){\r\n\t\tthis.dispatchExternal(\"renderStarted\");\r\n\t\t\r\n\t\tthis.element.scrollTop = 0;\r\n\t\t\r\n\t\tthis._clearTable();\r\n\t\t\r\n\t\tif(this.displayRowsCount){\r\n\t\t\tthis.renderer.renderRows();\r\n\t\t\t\r\n\t\t\tif(this.firstRender){\r\n\t\t\t\tthis.firstRender = false;\r\n\t\t\t\tthis.layoutRefresh();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.renderEmptyScroll();\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.fixedHeight){\r\n\t\t\tthis.adjustTableSize();\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatch(\"table-layout\");\r\n\t\t\r\n\t\tif(!this.displayRowsCount){\r\n\t\t\tthis._showPlaceholder();\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatchExternal(\"renderComplete\");\r\n\t}\r\n\t\r\n\t//show scrollbars on empty table div\r\n\trenderEmptyScroll(){\r\n\t\tif(this.placeholder){\r\n\t\t\tthis.tableElement.style.display = \"none\";\r\n\t\t}else{\r\n\t\t\tthis.tableElement.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t\t// this.tableElement.style.minHeight = \"1px\";\r\n\t\t\t// this.tableElement.style.visibility = \"hidden\";\r\n\t\t}\r\n\t}\r\n\t\r\n\t_clearTable(){\r\n\t\tvar element = this.tableElement;\r\n\t\t\r\n\t\tthis._clearPlaceholder();\r\n\t\t\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.renderer.clearRows();\r\n\t}\r\n\t\r\n\t_showPlaceholder(){\r\n\t\tif(this.placeholder){\r\n\t\t\tthis.placeholder.setAttribute(\"tabulator-render-mode\", this.renderMode);\r\n\t\t\t\r\n\t\t\tthis.getElement().appendChild(this.placeholder);\r\n\t\t\tthis._positionPlaceholder();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_clearPlaceholder(){\r\n\t\tif(this.placeholder && this.placeholder.parentNode){\r\n\t\t\tthis.placeholder.parentNode.removeChild(this.placeholder);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_positionPlaceholder(){\r\n\t\tif(this.placeholder && this.placeholder.parentNode){\r\n\t\t\tthis.placeholder.style.width = this.table.columnManager.getWidth() + \"px\";\r\n\t\t\tthis.placeholderContents.style.width = this.table.rowManager.element.clientWidth + \"px\";\r\n\t\t\tthis.placeholderContents.style.marginLeft = this.scrollLeft + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tstyleRow(row, index){\r\n\t\tvar rowEl = row.getElement();\r\n\t\t\r\n\t\tif(index % 2){\r\n\t\t\trowEl.classList.add(\"tabulator-row-even\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-odd\");\r\n\t\t}else{\r\n\t\t\trowEl.classList.add(\"tabulator-row-odd\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-even\");\r\n\t\t}\r\n\t}\r\n\t\r\n\t//normalize height of active rows\r\n\tnormalizeHeight(){\r\n\t\tthis.activeRows.forEach(function(row){\r\n\t\t\trow.normalizeHeight();\r\n\t\t});\r\n\t}\r\n\t\r\n\t//adjust the height of the table holder to fit in the Tabulator element\r\n\tadjustTableSize(){\r\n\t\tvar initialHeight = this.element.clientHeight,\r\n\t\tmodExists;\r\n\t\t\r\n\t\tif(this.renderer.verticalFillMode === \"fill\"){\r\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));\r\n\t\t\t\r\n\t\t\tif(this.fixedHeight){\r\n\t\t\t\tthis.element.style.minHeight = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t\tthis.element.style.height = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t\tthis.element.style.maxHeight = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.height = \"\";\r\n\t\t\t\tthis.element.style.height = (this.table.element.clientHeight - otherHeight) + \"px\";\r\n\t\t\t\tthis.element.scrollTop = this.scrollTop;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.renderer.resize();\r\n\t\t\t\r\n\t\t\t//check if the table has changed size when dealing with variable height tables\r\n\t\t\tif(!this.fixedHeight && initialHeight != this.element.clientHeight){\r\n\t\t\t\tif(this.subscribed(\"table-resize\")){\r\n\t\t\t\t\tthis.dispatch(\"table-resize\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.redraw();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._positionPlaceholder();\r\n\t}\r\n\t\r\n\t//renitialize all rows\r\n\treinitialize(){\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\trow.reinitialize(true);\r\n\t\t});\r\n\t}\r\n\t\r\n\t//prevent table from being redrawn\r\n\tblockRedraw (){\r\n\t\tthis.redrawBlock = true;\r\n\t\tthis.redrawBlockRestoreConfig = false;\r\n\t}\r\n\t\r\n\t//restore table redrawing\r\n\trestoreRedraw (){\r\n\t\tthis.redrawBlock = false;\r\n\t\t\r\n\t\tif(this.redrawBlockRestoreConfig){\r\n\t\t\tthis.refreshActiveData(this.redrawBlockRestoreConfig.handler, this.redrawBlockRestoreConfig.skipStage, this.redrawBlockRestoreConfig.renderInPosition)\r\n\t\t\t\r\n\t\t\tthis.redrawBlockRestoreConfig = false;\r\n\t\t}else{\r\n\t\t\tif(this.redrawBlockRenderInPosition){\r\n\t\t\t\tthis.reRenderInPosition();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.redrawBlockRenderInPosition = false;\r\n\t}\r\n\t\r\n\t//redraw table\r\n\tredraw (force){\r\n\t\tvar pos = 0,\r\n\t\tleft = this.scrollLeft;\r\n\t\t\r\n\t\tthis.adjustTableSize();\r\n\t\t\r\n\t\tthis.table.tableWidth = this.table.element.clientWidth;\r\n\t\t\r\n\t\tif(!force){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t\tthis.scrollHorizontal(left);\r\n\t\t}else{\r\n\t\t\tthis.renderTable();\r\n\t\t}\r\n\t}\r\n\t\r\n\tresetScroll(){\r\n\t\tthis.element.scrollLeft = 0;\r\n\t\tthis.element.scrollTop = 0;\r\n\t\t\r\n\t\tif(this.table.browser === \"ie\"){\r\n\t\t\tvar event = document.createEvent(\"Event\");\r\n\t\t\tevent.initEvent(\"scroll\", false, true);\r\n\t\t\tthis.element.dispatchEvent(event);\r\n\t\t}else{\r\n\t\t\tthis.element.dispatchEvent(new Event('scroll'));\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\n\r\nexport default class FooterManager extends CoreFeature{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.active = false;\r\n\t\tthis.element = this.createElement(); //containing element\r\n\t\tthis.containerElement = this.createContainerElement(); //containing element\r\n\t\tthis.external = false;\r\n\t\tthis.links = [];\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeElement();\r\n\t}\r\n\r\n\tcreateElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-footer\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\t\r\n\tcreateContainerElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-footer-contents\");\r\n\r\n\t\tthis.element.appendChild(el);\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitializeElement(){\r\n\t\tif(this.table.options.footerElement){\r\n\r\n\t\t\tswitch(typeof this.table.options.footerElement){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(this.table.options.footerElement[0] === \"<\"){\r\n\t\t\t\t\tthis.containerElement.innerHTML = this.table.options.footerElement;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.external = true;\r\n\t\t\t\t\tthis.containerElement = document.querySelector(this.table.options.footerElement);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.element = this.table.options.footerElement;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tappend(element, parent){\r\n\t\tthis.activate(parent);\r\n\r\n\t\tthis.containerElement.appendChild(element);\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\tprepend(element, parent){\r\n\t\tthis.activate(parent);\r\n\r\n\t\tthis.element.insertBefore(element, this.element.firstChild);\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\tremove(element){\r\n\t\telement.parentNode.removeChild(element);\r\n\t\tthis.deactivate();\r\n\t}\r\n\r\n\tdeactivate(force){\r\n\t\tif(!this.element.firstChild || force){\r\n\t\t\tif(!this.external){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\t\t\tthis.active = false;\r\n\t\t}\r\n\t}\r\n\r\n\tactivate(parent){\r\n\t\tif(!this.active){\r\n\t\t\tthis.active = true;\r\n\t\t\tif(!this.external){\r\n\t\t\t\tthis.table.element.appendChild(this.getElement());\r\n\t\t\t\tthis.table.element.style.display = '';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(parent){\r\n\t\t\tthis.links.push(parent);\r\n\t\t}\r\n\t}\r\n\r\n\tredraw(){\r\n\t\tthis.links.forEach(function(link){\r\n\t\t\tlink.footerRedraw();\r\n\t\t});\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport Helpers from './Helpers.js';\r\nimport Row from '../row/Row.js';\r\n\r\nexport default class InteractionManager extends CoreFeature {\r\n\t\r\n\tconstructor (table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.el = null;\r\n\t\t\r\n\t\tthis.abortClasses = [\"tabulator-headers\", \"tabulator-table\"];\r\n\t\t\r\n\t\tthis.previousTargets = {};\r\n\t\t\r\n\t\tthis.listeners = [\r\n\t\t\t\"click\",\r\n\t\t\t\"dblclick\",\r\n\t\t\t\"contextmenu\",\r\n\t\t\t\"mouseenter\",\r\n\t\t\t\"mouseleave\",\r\n\t\t\t\"mouseover\",\r\n\t\t\t\"mouseout\",\r\n\t\t\t\"mousemove\",\r\n\t\t\t\"touchstart\",\r\n\t\t\t\"touchend\",\r\n\t\t];\r\n\t\t\r\n\t\tthis.componentMap = {\r\n\t\t\t\"tabulator-cell\":\"cell\",\r\n\t\t\t\"tabulator-row\":\"row\",\r\n\t\t\t\"tabulator-group\":\"group\",\r\n\t\t\t\"tabulator-col\":\"column\",\r\n\t\t};\r\n\t\t\r\n\t\tthis.pseudoTrackers = {\r\n\t\t\t\"row\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"cell\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"group\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"column\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t}\r\n\t\t\r\n\t\tthis.pseudoTracking = false;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.el = this.table.element;\r\n\t\t\r\n\t\tthis.buildListenerMap();\r\n\t\tthis.bindSubscriptionWatchers();\r\n\t}\r\n\t\r\n\tbuildListenerMap(){\r\n\t\tvar listenerMap = {};\r\n\t\t\r\n\t\tthis.listeners.forEach((listener) => {\r\n\t\t\tlistenerMap[listener] = {\r\n\t\t\t\thandler:null,\r\n\t\t\t\tcomponents:[],\r\n\t\t\t}\r\n\t\t})\r\n\t\t\r\n\t\tthis.listeners = listenerMap;\r\n\t}\r\n\t\r\n\tbindPseudoEvents(){\r\n\t\tObject.keys(this.pseudoTrackers).forEach((key) => {\r\n\t\t\tthis.pseudoTrackers[key].subscriber = this.pseudoMouseEnter.bind(this, key);\r\n\t\t\tthis.subscribe(key + \"-mouseover\", this.pseudoTrackers[key].subscriber);\r\n\t\t});\r\n\t\t\r\n\t\tthis.pseudoTracking = true;\r\n\t}\r\n\t\r\n\tpseudoMouseEnter(key, e, target){\r\n\t\tif(this.pseudoTrackers[key].target !== target){\r\n\t\t\t\r\n\t\t\tif(this.pseudoTrackers[key].target){\r\n\t\t\t\tthis.dispatch(key + \"-mouseleave\", e, target);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.pseudoMouseLeave(key, e);\r\n\t\t\t\r\n\t\t\tthis.pseudoTrackers[key].target = target;\r\n\t\t\t\r\n\t\t\tthis.dispatch(key + \"-mouseenter\", e, target);\r\n\t\t}\r\n\t}\r\n\t\r\n\tpseudoMouseLeave(key, e){\r\n\t\tvar leaveList = Object.keys(this.pseudoTrackers),\r\n\t\tlinkedKeys = {\r\n\t\t\t\"row\":[\"cell\"],\r\n\t\t\t\"cell\":[\"row\"],\r\n\t\t};\r\n\t\t\r\n\t\tleaveList = leaveList.filter((item) => {\r\n\t\t\tvar links = linkedKeys[key];\r\n\t\t\treturn item !== key && (!links || (links && !links.includes(item)));\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\tleaveList.forEach((key) => {\r\n\t\t\tvar target = this.pseudoTrackers[key].target;\r\n\t\t\t\r\n\t\t\tif(this.pseudoTrackers[key].target){\r\n\t\t\t\tthis.dispatch(key + \"-mouseleave\", e, target);\r\n\t\t\t\t\r\n\t\t\t\tthis.pseudoTrackers[key].target = null;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t\r\n\tbindSubscriptionWatchers(){\r\n\t\tvar listeners = Object.keys(this.listeners),\r\n\t\tcomponents = Object.values(this.componentMap);\r\n\t\t\r\n\t\tfor(let comp of components){\r\n\t\t\tfor(let listener of listeners){\r\n\t\t\t\tlet key = comp + \"-\" + listener;\r\n\t\t\t\t\r\n\t\t\t\tthis.subscriptionChange(key, this.subscriptionChanged.bind(this, comp, listener));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.subscribe(\"table-destroy\", this.clearWatchers.bind(this))\r\n\t}\r\n\t\r\n\tsubscriptionChanged(component, key, added){\r\n\t\tvar listener = this.listeners[key].components,\r\n\t\tindex = listener.indexOf(component),\r\n\t\tchanged = false;\r\n\t\t\r\n\t\tif(added){\r\n\t\t\tif(index === -1){\r\n\t\t\t\tlistener.push(component);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!this.subscribed(component + \"-\" + key)){\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tlistener.splice(index, 1);\r\n\t\t\t\t\tchanged = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif((key === \"mouseenter\" || key === \"mouseleave\") && !this.pseudoTracking){\r\n\t\t\tthis.bindPseudoEvents();\r\n\t\t}\r\n\t\t\r\n\t\tif(changed){\r\n\t\t\tthis.updateEventListeners();\r\n\t\t}\r\n\t}\r\n\t\r\n\tupdateEventListeners(){\r\n\t\tfor(let key in this.listeners){\r\n\t\t\tlet listener = this.listeners[key];\r\n\t\t\t\r\n\t\t\tif(listener.components.length){\r\n\t\t\t\tif(!listener.handler){\r\n\t\t\t\t\tlistener.handler = this.track.bind(this, key);\r\n\t\t\t\t\tthis.el.addEventListener(key, listener.handler)\r\n\t\t\t\t\t// this.el.addEventListener(key, listener.handler, {passive: true})\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(listener.handler){\r\n\t\t\t\t\tthis.el.removeEventListener(key, listener.handler)\r\n\t\t\t\t\tlistener.handler = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\ttrack(type, e){\r\n\t\tvar path = (e.composedPath && e.composedPath()) || e.path;\r\n\t\t\r\n\t\tvar targets = this.findTargets(path);\r\n\t\ttargets = this.bindComponents(type, targets);\r\n\t\t\r\n\t\tthis.triggerEvents(type, e, targets);\r\n\t\t\r\n\t\tif(this.pseudoTracking && (type == \"mouseover\" || type == \"mouseleave\") && !Object.keys(targets).length){\r\n\t\t\tthis.pseudoMouseLeave(\"none\", e);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfindTargets(path){\r\n\t\tvar targets = {};\r\n\t\t\r\n\t\tlet componentMap = Object.keys(this.componentMap);\r\n\t\t\r\n\t\tfor (let el of path) {\r\n\t\t\tlet classList = el.classList ? [...el.classList] : [];\r\n\t\t\t\r\n\t\t\tlet abort = classList.filter((item) => {\r\n\t\t\t\treturn this.abortClasses.includes(item);\r\n\t\t\t})\r\n\t\t\t\r\n\t\t\tif(abort.length){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlet elTargets = classList.filter((item) => {\r\n\t\t\t\treturn componentMap.includes(item);\r\n\t\t\t})\r\n\t\t\t\r\n\t\t\tfor (let target of elTargets) {\r\n\t\t\t\ttargets[this.componentMap[target]] = el;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(targets.group && targets.group === targets.row){\r\n\t\t\tdelete targets.row;\r\n\t\t}\r\n\t\t\r\n\t\treturn targets;\r\n\t}\r\n\t\r\n\tbindComponents(type, targets){\r\n\t\t//ensure row component is looked up before cell\r\n\t\tvar keys = Object.keys(targets).reverse(),\r\n\t\tlistener = this.listeners[type],\r\n\t\ttargetMatches = {};\r\n\t\t\r\n\t\tfor(let key of keys){\r\n\t\t\tlet component;\r\n\t\t\tlet target = targets[key];\r\n\t\t\tlet previousTarget = this.previousTargets[key];\r\n\t\t\t\r\n\t\t\tif(previousTarget && previousTarget.target === target){\r\n\t\t\t\tcomponent = previousTarget.component;\r\n\t\t\t}else{\r\n\t\t\t\tswitch(key){\r\n\t\t\t\t\tcase \"row\":\r\n\t\t\t\t\tcase \"group\":\r\n\t\t\t\t\tif(listener.components.includes(\"row\") || listener.components.includes(\"cell\") || listener.components.includes(\"group\")){\r\n\t\t\t\t\t\tlet rows = this.table.rowManager.getVisibleRows(true);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcomponent = rows.find((row) => {\r\n\t\t\t\t\t\t\treturn row.getElement() === target;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(targets[\"row\"] && targets[\"row\"].parentNode && targets[\"row\"].parentNode.closest(\".tabulator-row\")){\r\n\t\t\t\t\t\t\ttargets[key] = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"column\":\r\n\t\t\t\t\tif(listener.components.includes(\"column\")){\r\n\t\t\t\t\t\tcomponent = this.table.columnManager.findColumn(target);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"cell\":\r\n\t\t\t\t\tif(listener.components.includes(\"cell\")){\r\n\t\t\t\t\t\tif(targets[\"row\"] instanceof Row){\r\n\t\t\t\t\t\t\tcomponent = targets[\"row\"].findCell(target);\r\n\t\t\t\t\t\t}else{\t\r\n\t\t\t\t\t\t\tif(targets[\"row\"]){\r\n\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?\")\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(component){\r\n\t\t\t\ttargets[key] = component;\r\n\t\t\t\ttargetMatches[key] = {\r\n\t\t\t\t\ttarget:target,\r\n\t\t\t\t\tcomponent:component,\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.previousTargets = targetMatches;\r\n\t\t\r\n\t\treturn targets;\r\n\t}\r\n\t\r\n\ttriggerEvents(type, e, targets){\r\n\t\tvar listener = this.listeners[type];\r\n\t\t\r\n\t\tfor(let key in targets){\r\n\t\t\tif(targets[key] && listener.components.includes(key)){\r\n\t\t\t\tthis.dispatch(key + \"-\" + type, e, targets[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tclearWatchers(){\r\n\t\tfor(let key in this.listeners){\r\n\t\t\tlet listener = this.listeners[key];\r\n\t\t\t\r\n\t\t\tif(listener.handler){\r\n\t\t\t\tthis.el.removeEventListener(key, listener.handler)\r\n\t\t\t\tlistener.handler = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}","export default class ComponentFunctionBinder{\r\n\r\n\tconstructor(table){\r\n\t\tthis.table = table;\r\n\r\n\t\tthis.bindings = {};\r\n\t}\r\n\r\n\tbind(type, funcName, handler){\r\n\t\tif(!this.bindings[type]){\r\n\t\t\tthis.bindings[type] = {};\r\n\t\t}\r\n\r\n\t\tif(this.bindings[type][funcName]){\r\n\t\t\tconsole.warn(\"Unable to bind component handler, a matching function name is already bound\", type, funcName, hanlder)\r\n\t\t}else{\r\n\t\t\tthis.bindings[type][funcName] = handler;\r\n\t\t}\r\n\t}\r\n\r\n\thandle(type, component, name){\r\n\t\tif(this.bindings[type] && this.bindings[type][name]){\r\n\t\t\treturn this.bindings[type][name].bind(null, component);\r\n\t\t}else{\r\n\t\t\tif(name !== \"then\" && typeof name === \"string\" && !name.startsWith(\"_\")){\r\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?\")\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\n\r\nexport default class DataLoader extends CoreFeature{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.loaderElement = this.createLoaderElement(); //loader message div\r\n\t\tthis.msgElement = this.createMsgElement(); //message element\r\n\t\tthis.loadingElement = null;\r\n\t\tthis.errorElement = null;\r\n\r\n\t\tthis.requestOrder = 0; //prevent requests comming out of sequence if overridden by another load request\r\n\t\tthis.loading = false;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tvar template;\r\n\r\n\t\tthis.loaderElement.appendChild(this.msgElement);\r\n\r\n\t\tif(this.table.options.dataLoaderLoading){\r\n\t\t\tif(typeof this.table.options.dataLoaderLoading == \"string\"){\r\n\t\t\t\ttemplate = document.createElement('template');\r\n\t\t\t\ttemplate.innerHTML = this.table.options.dataLoaderLoading.trim();\r\n\t\t\t\tthis.loadingElement = template.firstElementChild;\r\n\t\t\t}else{\r\n\t\t\t\tthis.loadingElement = this.table.options.dataLoaderLoading;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.table.options.dataLoaderError){\r\n\t\t\tif(typeof this.table.options.dataLoaderError == \"string\"){\r\n\t\t\t\ttemplate = document.createElement('template');\r\n\t\t\t\ttemplate.innerHTML = this.table.options.dataLoaderError.trim();\r\n\t\t\t\tthis.errorElement = template.firstElementChild;\r\n\t\t\t}else{\r\n\t\t\t\tthis.errorElement = this.table.options.dataLoaderError;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tcreateLoaderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-loader\");\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateMsgElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-loader-msg\");\r\n\t\tel.setAttribute(\"role\", \"alert\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tload(data, params, config, replace, silent){\r\n\t\tvar requestNo = ++this.requestOrder;\r\n\r\n\t\tthis.dispatchExternal(\"dataLoading\", data);\r\n\r\n\t\t//parse json data to array\r\n\t\tif (data && (data.indexOf(\"{\") == 0 || data.indexOf(\"[\") == 0)){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(this.confirm(\"data-loading\", [data, params, config, silent])){\r\n\t\t\tthis.loading = true;\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.showLoader();\r\n\t\t\t}\r\n\r\n\t\t\t//get params for request\r\n\t\t\tparams = this.chain(\"data-params\", [data, config, silent], params || {}, params || {});\r\n\r\n\t\t\tparams = this.mapParams(params, this.table.options.dataSendParams);\r\n\r\n\t\t\tvar result = this.chain(\"data-load\", [data, params, config, silent], false, Promise.resolve([]));\r\n\t\t\t\r\n\t\t\treturn result.then((response) => {\r\n\t\t\t\tif(!Array.isArray(response) && typeof response == \"object\"){\r\n\t\t\t\t\tresponse = this.mapParams(response, this.objectInvert(this.table.options.dataReceiveParams));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar rowData = this.chain(\"data-loaded\", response, null, response);\r\n\r\n\t\t\t\tif(requestNo == this.requestOrder){\r\n\t\t\t\t\tthis.hideLoader();\r\n\r\n\t\t\t\t\tif(rowData !== false){\r\n\t\t\t\t\t\tthis.dispatchExternal(\"dataLoaded\", rowData);\r\n\t\t\t\t\t\tthis.table.rowManager.setData(rowData, replace, !replace);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\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\");\r\n\t\t\t\t}\r\n\t\t\t}).catch((error) => {\r\n\t\t\t\tconsole.error(\"Data Load Error: \", error);\r\n\t\t\t\tthis.dispatchExternal(\"dataLoadError\", error);\r\n\r\n\t\t\t\tif(!silent){\r\n\t\t\t\t\tthis.showError();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.hideLoader();\r\n\t\t\t\t}, this.table.options.dataLoaderErrorTimeout);\r\n\t\t\t})\r\n\t\t\t.finally(() => {\r\n\t\t\t\tthis.loading = false;\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"dataLoaded\", data);\r\n\r\n\t\t\tif(!data){\r\n\t\t\t\tdata = [];\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.rowManager.setData(data, replace, !replace);\r\n\t\t\treturn Promise.resolve();\r\n\t\t}\r\n\t}\r\n\r\n\tmapParams(params, map){\r\n\t\tvar output = {};\r\n\r\n\t\tfor(let key in params){\r\n\t\t\toutput[map.hasOwnProperty(key) ? map[key] : key] = params[key];\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tobjectInvert(obj){\r\n\t\tvar output = {};\r\n\r\n\t\tfor(let key in obj){\r\n\t\t\toutput[obj[key]] = key;\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tblockActiveLoad(){\r\n\t\tthis.requestOrder++;\r\n\t}\r\n\r\n\tshowLoader(){\r\n\t\tvar shouldLoad = typeof this.table.options.dataLoader === \"function\" ? this.table.options.dataLoader() : this.table.options.dataLoader;\r\n\r\n\t\tif(shouldLoad){\r\n\t\t\tthis.hideLoader();\r\n\r\n\t\t\twhile(this.msgElement.firstChild) this.msgElement.removeChild(this.msgElement.firstChild);\r\n\r\n\t\t\tthis.msgElement.classList.remove(\"tabulator-error\");\r\n\t\t\tthis.msgElement.classList.add(\"tabulator-loading\");\r\n\r\n\t\t\tif(this.loadingElement){\r\n\t\t\t\tthis.msgElement.appendChild(this.loadingElement);\r\n\t\t\t}else{\r\n\t\t\t\tthis.msgElement.innerHTML = this.langText(\"data|loading\");\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.element.appendChild(this.loaderElement);\r\n\t\t}\r\n\t}\r\n\r\n\tshowError(){\r\n\t\tthis.hideLoader();\r\n\r\n\t\twhile(this.msgElement.firstChild) this.msgElement.removeChild(this.msgElement.firstChild);\r\n\t\tthis.msgElement.classList.remove(\"tabulator-loading\");\r\n\t\tthis.msgElement.classList.add(\"tabulator-error\");\r\n\r\n\t\tif(this.errorElement){\r\n\t\t\tthis.msgElement.appendChild(this.errorElement);\r\n\t\t}else{\r\n\t\t\tthis.msgElement.innerHTML = this.langText(\"data|error\");\r\n\t\t}\r\n\r\n\t\tthis.table.element.appendChild(this.loaderElement);\r\n\t}\r\n\r\n\r\n\thideLoader(){\r\n\t\tif(this.loaderElement.parentNode){\r\n\t\t\tthis.loaderElement.parentNode.removeChild(this.loaderElement);\r\n\t\t}\r\n\t}\r\n}","export default class ExternalEventBus {\r\n\r\n\tconstructor(table, optionsList, debug){\r\n\t\tthis.table = table;\r\n\t\tthis.events = {};\r\n\t\tthis.optionsList = optionsList || {};\r\n\t\tthis.subscriptionNotifiers = {};\r\n\r\n\t\tthis.dispatch = debug ? this._debugDispatch.bind(this) : this._dispatch.bind(this);\r\n\t\tthis.debug = debug;\r\n\t}\r\n\r\n\tsubscriptionChange(key, callback){\r\n\t\tif(!this.subscriptionNotifiers[key]){\r\n\t\t\tthis.subscriptionNotifiers[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.subscriptionNotifiers[key].push(callback);\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis._notifiySubscriptionChange(key, true);\r\n\t\t}\r\n\t}\r\n\r\n\tsubscribe(key, callback){\r\n\t\tif(!this.events[key]){\r\n\t\t\tthis.events[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.events[key].push(callback);\r\n\r\n\t\tthis._notifiySubscriptionChange(key, true);\r\n\t}\r\n\r\n\tunsubscribe(key, callback){\r\n\t\tvar index;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tif(callback){\r\n\t\t\t\tindex = this.events[key].findIndex((item) => {\r\n\t\t\t\t\treturn item === callback;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tthis.events[key].splice(index, 1);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Cannot remove event, no matching event found:\", key, callback);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tdelete this.events[key];\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cannot remove event, no events set on:\", key);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._notifiySubscriptionChange(key, false);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.events[key] && this.events[key].length;\r\n\t}\r\n\r\n\t_notifiySubscriptionChange(key, subscribed){\r\n\t\tvar notifiers = this.subscriptionNotifiers[key];\r\n\r\n\t\tif(notifiers){\r\n\t\t\tnotifiers.forEach((callback)=>{\r\n\t\t\t\tcallback(subscribed);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_dispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift(),\r\n\t\tresult;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tthis.events[key].forEach((callback, i) => {\r\n\t\t\t\tlet callResult = callback.apply(this.table, args);\r\n\r\n\t\t\t\tif(!i){\r\n\t\t\t\t\tresult = callResult;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t_debugDispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"ExternalEvent:\" + args[0];\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._dispatch(...arguments)\r\n\t}\r\n}","export default class InternalEventBus {\r\n\r\n\tconstructor(debug){\r\n\t\tthis.events = {};\r\n\t\tthis.subscriptionNotifiers = {};\r\n\r\n\t\tthis.dispatch = debug ? this._debugDispatch.bind(this) : this._dispatch.bind(this);\r\n\t\tthis.chain = debug ? this._debugChain.bind(this) : this._chain.bind(this);\r\n\t\tthis.confirm = debug ? this._debugConfirm.bind(this) : this._confirm.bind(this);\r\n\t\tthis.debug = debug;\r\n\t}\r\n\r\n\tsubscriptionChange(key, callback){\r\n\t\tif(!this.subscriptionNotifiers[key]){\r\n\t\t\tthis.subscriptionNotifiers[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.subscriptionNotifiers[key].push(callback);\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis._notifiySubscriptionChange(key, true);\r\n\t\t}\r\n\t}\r\n\r\n\tsubscribe(key, callback, priority = 10000){\r\n\t\tif(!this.events[key]){\r\n\t\t\tthis.events[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.events[key].push({callback, priority});\r\n\r\n\t\tthis.events[key].sort((a, b) => {\r\n\t\t\treturn a.priority - b.priority;\r\n\t\t});\r\n\r\n\t\tthis._notifiySubscriptionChange(key, true);\r\n\t}\r\n\r\n\tunsubscribe(key, callback){\r\n\t\tvar index;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tif(callback){\r\n\t\t\t\tindex = this.events[key].findIndex((item) => {\r\n\t\t\t\t\treturn item.callback === callback;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tthis.events[key].splice(index, 1);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Cannot remove event, no matching event found:\", key, callback);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cannot remove event, no events set on:\", key);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._notifiySubscriptionChange(key, false);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.events[key] && this.events[key].length;\r\n\t}\r\n\r\n\t_chain(key, args, initialValue, fallback){\r\n\t\tvar value = initialValue;\r\n\r\n\t\tif(!Array.isArray(args)){\r\n\t\t\targs = [args];\r\n\t\t}\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis.events[key].forEach((subscriber, i) => {\r\n\t\t\t\tvalue = subscriber.callback.apply(this, args.concat([value]));\r\n\t\t\t});\r\n\r\n\t\t\treturn value;\r\n\t\t}else{\r\n\t\t\treturn typeof fallback === \"function\" ? fallback() : fallback;\r\n\t\t}\r\n\t}\r\n\r\n\t_confirm(key, args){\r\n\t\tvar confirmed = false;\r\n\r\n\t\tif(!Array.isArray(args)){\r\n\t\t\targs = [args];\r\n\t\t}\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis.events[key].forEach((subscriber, i) => {\r\n\t\t\t\tif(subscriber.callback.apply(this, args)){\r\n\t\t\t\t\tconfirmed = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn confirmed;\r\n\t}\r\n\r\n\t_notifiySubscriptionChange(key, subscribed){\r\n\t\tvar notifiers = this.subscriptionNotifiers[key];\r\n\r\n\t\tif(notifiers){\r\n\t\t\tnotifiers.forEach((callback)=>{\r\n\t\t\t\tcallback(subscribed);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_dispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift();\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tthis.events[key].forEach((subscriber) => {\r\n\t\t\t\tlet callResult = subscriber.callback.apply(this, args);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_debugDispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._dispatch(...arguments);\r\n\t}\r\n\r\n\t_debugChain(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._chain(...arguments);\r\n\t}\r\n\r\n\t_debugConfirm(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._confirm(...arguments);\r\n\t}\r\n}","import Tabulator from '../Tabulator.js';\r\n\r\nclass TableRegistry {\r\n\r\n\tstatic register(table){\r\n\t\tTableRegistry.tables.push(table);\r\n\t}\r\n\r\n\tstatic deregister(table){\r\n\t\tvar index = TableRegistry.tables.indexOf(table);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tTableRegistry.tables.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\tstatic lookupTable(query, silent){\r\n\t\tvar results = [],\r\n\t\tmatches, match;\r\n\r\n\t\tif(typeof query === \"string\"){\r\n\t\t\tmatches = document.querySelectorAll(query);\r\n\r\n\t\t\tif(matches.length){\r\n\t\t\t\tfor(var i = 0; i < matches.length; i++){\r\n\t\t\t\t\tmatch = TableRegistry.matchElement(matches[i]);\r\n\r\n\t\t\t\t\tif(match){\r\n\t\t\t\t\t\tresults.push(match);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}else if((typeof HTMLElement !== \"undefined\" && query instanceof HTMLElement) || query instanceof Tabulator){\r\n\t\t\tmatch = TableRegistry.matchElement(query);\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tresults.push(match);\r\n\t\t\t}\r\n\t\t}else if(Array.isArray(query)){\r\n\t\t\tquery.forEach(function(item){\r\n\t\t\t\tresults = results.concat(TableRegistry.lookupTable(item));\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Table Connection Error - Invalid Selector\", query);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n\r\n\tstatic matchElement(element){\r\n\t\treturn TableRegistry.tables.find(function(table){\r\n\t\t\treturn element instanceof Tabulator ? table === element : table.element === element;\r\n\t\t});\r\n\t}\r\n}\r\n\r\nTableRegistry.tables = [];\r\n\r\nexport default TableRegistry;","import CoreFeature from './CoreFeature.js';\r\n\r\nclass Module extends CoreFeature{\r\n\r\n\tconstructor(table, name){\r\n\t\tsuper(table);\r\n\r\n\t\tthis._handler = null;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\t// setup module when table is initialized, to be overriden in module\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t////// Options Registration ///////\r\n\t///////////////////////////////////\r\n\r\n\tregisterTableOption(key, value){\r\n\t\tthis.table.optionsList.register(key, value);\r\n\t}\r\n\r\n\tregisterColumnOption(key, value){\r\n\t\tthis.table.columnManager.optionsList.register(key, value);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t/// Public Function Registation ///\r\n\t///////////////////////////////////\r\n\r\n\tregisterTableFunction(name, func){\r\n\t\tif(typeof this.table[name] === \"undefined\"){\r\n\t\t\tthis.table[name] = func;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Unable to bind table function, name already in use\", name)\r\n\t\t}\r\n\t}\r\n\r\n\tregisterComponentFunction(component, func, handler){\r\n\t\treturn this.table.componentFunctionBinder.bind(component, func, handler);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Data Pipeline //////////\r\n\t///////////////////////////////////\r\n\r\n\tregisterDataHandler(handler, priority){\r\n\t\tthis.table.rowManager.registerDataPipelineHandler(handler, priority)\r\n\t\tthis._handler = handler;\r\n\t}\r\n\r\n\tregisterDisplayHandler(handler, priority){\r\n\t\tthis.table.rowManager.registerDisplayPipelineHandler(handler, priority)\r\n\t\tthis._handler = handler;\r\n\t}\r\n\r\n\trefreshData(renderInPosition, handler){\r\n\t\tif(!handler){\r\n\t\t\thandler = this._handler;\r\n\t\t}\r\n\r\n\t\tif(handler){\r\n\t\t\tthis.table.rowManager.refreshActiveData(handler, false, renderInPosition);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport default Module;","//resize columns to fit data they contain\r\nexport default function(columns){\r\n\tthis.table.columnManager.renderer.reinitializeColumnWidths(columns);\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n};","//resize columns to fit data they contain and stretch row to fill table, also used for fitDataTable\r\nexport default function(columns){\r\n\tcolumns.forEach(function(column){\r\n\t\tcolumn.reinitializeWidth();\r\n\t});\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n};","//resize columns to fit data the contain and stretch last column to fill table\r\nexport default function(columns){\r\n\tvar colsWidth = 0,\r\n\ttableWidth = this.table.rowManager.element.clientWidth,\r\n\tgap = 0,\r\n\tlastCol = false;\r\n\r\n\tcolumns.forEach((column, i) => {\r\n\t\tif(!column.widthFixed){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t}\r\n\r\n\t\tif(this.table.options.responsiveLayout ? column.modules.responsive.visible : column.visible){\r\n\t\t\tlastCol = column;\r\n\t\t}\r\n\r\n\t\tif(column.visible){\r\n\t\t\tcolsWidth += column.getWidth();\r\n\t\t}\r\n\t});\r\n\r\n\tif(lastCol){\r\n\t\tgap = tableWidth - colsWidth + lastCol.getWidth();\r\n\r\n\t\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\t\tlastCol.setWidth(0);\r\n\t\t\tthis.table.modules.responsiveLayout.update();\r\n\t\t}\r\n\r\n\t\tif(gap > 0){\r\n\t\t\tlastCol.setWidth(gap);\r\n\t\t}else{\r\n\t\t\tlastCol.reinitializeWidth();\r\n\t\t}\r\n\t}else{\r\n\t\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\t\tthis.table.modules.responsiveLayout.update();\r\n\t\t}\r\n\t}\r\n};","//resize columns to fit\r\nexport default function(columns){\r\n\tvar totalWidth = this.table.element.clientWidth; //table element width\r\n\tvar fixedWidth = 0; //total width of columns with a defined width\r\n\tvar flexWidth = 0; //total width available to flexible columns\r\n\tvar flexGrowUnits = 0; //total number of widthGrow blocks accross all columns\r\n\tvar flexColWidth = 0; //desired width of flexible columns\r\n\tvar flexColumns = []; //array of flexible width columns\r\n\tvar fixedShrinkColumns = []; //array of fixed width columns that can shrink\r\n\tvar flexShrinkUnits = 0; //total number of widthShrink blocks accross all columns\r\n\tvar overflowWidth = 0; //horizontal overflow width\r\n\tvar gapFill=0; //number of pixels to be added to final column to close and half pixel gaps\r\n\r\n\tfunction calcWidth(width){\r\n\t\tvar colWidth;\r\n\r\n\t\tif(typeof(width) == \"string\"){\r\n\t\t\tif(width.indexOf(\"%\") > -1){\r\n\t\t\t\tcolWidth = (totalWidth / 100) * parseInt(width);\r\n\t\t\t}else{\r\n\t\t\t\tcolWidth = parseInt(width);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcolWidth = width;\r\n\t\t}\r\n\r\n\t\treturn colWidth;\r\n\t}\r\n\r\n\t//ensure columns resize to take up the correct amount of space\r\n\tfunction scaleColumns(columns, freeSpace, colWidth, shrinkCols){\r\n\r\n\t\tvar oversizeCols = [],\r\n\t\toversizeSpace = 0,\r\n\t\tremainingSpace = 0,\r\n\t\tnextColWidth = 0,\r\n\t\tremainingFlexGrowUnits = flexGrowUnits,\r\n\t\tgap = 0,\r\n\t\tchangeUnits = 0,\r\n\t\tundersizeCols = [];\r\n\r\n\t\tfunction calcGrow(col){\r\n\t\t\treturn (colWidth * (col.column.definition.widthGrow || 1));\r\n\t\t}\r\n\r\n\t\tfunction calcShrink(col){\r\n\t\t\treturn (calcWidth(col.width) - (colWidth * (col.column.definition.widthShrink || 0)))\r\n\t\t}\r\n\r\n\t\tcolumns.forEach(function(col, i){\r\n\t\t\tvar width = shrinkCols ? calcShrink(col) : calcGrow(col);\r\n\t\t\tif(col.column.minWidth >= width){\r\n\t\t\t\toversizeCols.push(col);\r\n\t\t\t}else{\r\n\t\t\t\tif(col.column.maxWidth && col.column.maxWidth < width){\r\n\t\t\t\t\tcol.width = col.column.maxWidth;\r\n\t\t\t\t\tfreeSpace -= col.column.maxWidth;\r\n\r\n\t\t\t\t\tremainingFlexGrowUnits -= shrinkCols ? (col.column.definition.widthShrink || 1) : (col.column.definition.widthGrow || 1);\r\n\r\n\t\t\t\t\tif(remainingFlexGrowUnits){\r\n\t\t\t\t\t\tcolWidth = Math.floor(freeSpace/remainingFlexGrowUnits);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tundersizeCols.push(col);\r\n\t\t\t\t\tchangeUnits += shrinkCols ? (col.column.definition.widthShrink || 1) : (col.column.definition.widthGrow || 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(oversizeCols.length){\r\n\t\t\toversizeCols.forEach(function(col){\r\n\t\t\t\toversizeSpace += shrinkCols ? col.width - col.column.minWidth : col.column.minWidth;\r\n\t\t\t\tcol.width = col.column.minWidth;\r\n\t\t\t});\r\n\r\n\t\t\tremainingSpace = freeSpace - oversizeSpace;\r\n\r\n\t\t\tnextColWidth = changeUnits ? Math.floor(remainingSpace/changeUnits) : remainingSpace;\r\n\r\n\t\t\tgap = remainingSpace - (nextColWidth * changeUnits);\r\n\r\n\t\t\tgap += scaleColumns(undersizeCols, remainingSpace, nextColWidth, shrinkCols);\r\n\t\t}else{\r\n\t\t\tgap = changeUnits ? freeSpace - (Math.floor(freeSpace/changeUnits) * changeUnits) : freeSpace;\r\n\r\n\t\t\tundersizeCols.forEach(function(column){\r\n\t\t\t\tcolumn.width = shrinkCols ? calcShrink(column) : calcGrow(column);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn gap;\r\n\t}\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n\r\n\t//adjust for vertical scrollbar if present\r\n\tif(this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight){\r\n\t\ttotalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth;\r\n\t}\r\n\r\n\tcolumns.forEach(function(column){\r\n\t\tvar width, minWidth, colWidth;\r\n\r\n\t\tif(column.visible){\r\n\r\n\t\t\twidth = column.definition.width;\r\n\t\t\tminWidth = parseInt(column.minWidth);\r\n\r\n\t\t\tif(width){\r\n\r\n\t\t\t\tcolWidth = calcWidth(width);\r\n\r\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\r\n\r\n\t\t\t\tif(column.definition.widthShrink){\r\n\t\t\t\t\tfixedShrinkColumns.push({\r\n\t\t\t\t\t\tcolumn:column,\r\n\t\t\t\t\t\twidth:colWidth > minWidth ? colWidth : minWidth\r\n\t\t\t\t\t});\r\n\t\t\t\t\tflexShrinkUnits += column.definition.widthShrink;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tflexColumns.push({\r\n\t\t\t\t\tcolumn:column,\r\n\t\t\t\t\twidth:0,\r\n\t\t\t\t});\r\n\t\t\t\tflexGrowUnits += column.definition.widthGrow || 1;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\t//calculate available space\r\n\tflexWidth = totalWidth - fixedWidth;\r\n\r\n\t//calculate correct column size\r\n\tflexColWidth = Math.floor(flexWidth / flexGrowUnits)\r\n\r\n\t//generate column widths\r\n\tvar gapFill = scaleColumns(flexColumns, flexWidth, flexColWidth, false);\r\n\r\n\t//increase width of last column to account for rounding errors\r\n\tif(flexColumns.length && gapFill > 0){\r\n\t\tflexColumns[flexColumns.length-1].width += + gapFill;\r\n\t}\r\n\r\n\t//caculate space for columns to be shrunk into\r\n\tflexColumns.forEach(function(col){\r\n\t\tflexWidth -= col.width;\r\n\t});\r\n\r\n\toverflowWidth = Math.abs(gapFill) + flexWidth;\r\n\r\n\t//shrink oversize columns if there is no available space\r\n\tif(overflowWidth > 0 && flexShrinkUnits){\r\n\t\tgapFill = scaleColumns(fixedShrinkColumns, overflowWidth, Math.floor(overflowWidth / flexShrinkUnits), true);\r\n\t}\r\n\r\n\t//decrease width of last column to account for rounding errors\r\n\tif(fixedShrinkColumns.length){\r\n\t\tfixedShrinkColumns[fixedShrinkColumns.length-1].width -= gapFill;\r\n\t}\r\n\r\n\tflexColumns.forEach(function(col){\r\n\t\tcol.column.setWidth(col.width);\r\n\t});\r\n\r\n\tfixedShrinkColumns.forEach(function(col){\r\n\t\tcol.column.setWidth(col.width);\r\n\t});\r\n};","import fitData from './modes/fitData.js';\r\nimport fitDataGeneral from './modes/fitDataGeneral.js';\r\nimport fitDataStretch from './modes/fitDataStretch.js';\r\nimport fitColumns from './modes/fitColumns.js';\r\n\r\nexport default {\r\n\tfitData:fitData,\r\n\tfitDataFill:fitDataGeneral,\r\n\tfitDataTable:fitDataGeneral,\r\n\tfitDataStretch:fitDataStretch,\r\n\tfitColumns:fitColumns ,\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultModes from './defaults/modes.js';\r\n\r\nclass Layout extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table, \"layout\");\r\n\r\n\t\tthis.mode = null;\r\n\r\n\t\tthis.registerTableOption(\"layout\", \"fitData\"); //layout type\r\n\t\tthis.registerTableOption(\"layoutColumnsOnNewData\", false); //update column widths on setData\r\n\r\n\t\tthis.registerColumnOption(\"widthGrow\");\r\n\t\tthis.registerColumnOption(\"widthShrink\");\r\n\t}\r\n\r\n\t//initialize layout system\r\n\tinitialize(){\r\n\t\tvar layout = this.table.options.layout;\r\n\r\n\t\tif(Layout.modes[layout]){\r\n\t\t\tthis.mode = layout;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Layout Error - invalid mode set, defaulting to 'fitData' : \" + layout);\r\n\t\t\tthis.mode = 'fitData';\r\n\t\t}\r\n\r\n\t\tthis.table.element.setAttribute(\"tabulator-layout\", this.mode);\r\n\t}\r\n\r\n\tgetMode(){\r\n\t\treturn this.mode;\r\n\t}\r\n\r\n\t//trigger table layout\r\n\tlayout(){\r\n\t\tthis.dispatch(\"layout-refreshing\")\r\n\t\tLayout.modes[this.mode].call(this, this.table.columnManager.columnsByIndex);\r\n\r\n\t\tthis.dispatch(\"layout-refreshed\")\r\n\t}\r\n}\r\n\r\nLayout.moduleName = \"layout\";\r\n\r\n//load defaults\r\nLayout.modes = defaultModes;\r\n\r\nexport default Layout;","export default {\r\n\t\"default\":{ //hold default locale text\r\n\t\t\"groups\":{\r\n\t\t\t\"item\":\"item\",\r\n\t\t\t\"items\":\"items\",\r\n\t\t},\r\n\t\t\"columns\":{\r\n\t\t},\r\n\t\t\"data\":{\r\n\t\t\t\"loading\":\"Loading\",\r\n\t\t\t\"error\":\"Error\",\r\n\t\t},\r\n\t\t\"pagination\":{\r\n\t\t\t\"page_size\":\"Page Size\",\r\n\t\t\t\"page_title\":\"Show Page\",\r\n\t\t\t\"first\":\"First\",\r\n\t\t\t\"first_title\":\"First Page\",\r\n\t\t\t\"last\":\"Last\",\r\n\t\t\t\"last_title\":\"Last Page\",\r\n\t\t\t\"prev\":\"Prev\",\r\n\t\t\t\"prev_title\":\"Prev Page\",\r\n\t\t\t\"next\":\"Next\",\r\n\t\t\t\"next_title\":\"Next Page\",\r\n\t\t\t\"all\":\"All\",\r\n\t\t\t\"counter\":{\r\n\t\t\t\t\"showing\": \"Showing\",\r\n\t\t\t\t\"of\": \"of\",\r\n\t\t\t\t\"rows\": \"rows\",\r\n\t\t\t\t\"pages\": \"pages\",\r\n\t\t\t}\r\n\t\t},\r\n\t\t\"headerFilters\":{\r\n\t\t\t\"default\":\"filter column...\",\r\n\t\t\t\"columns\":{}\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defaultLangs from './defaults/langs.js';\r\n\r\nclass Localize extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.locale = \"default\"; //current locale\r\n\t\tthis.lang = false; //current language\r\n\t\tthis.bindings = {}; //update events to call when locale is changed\r\n\t\tthis.langList = {};\r\n\r\n\t\tthis.registerTableOption(\"locale\", false); //current system language\r\n\t\tthis.registerTableOption(\"langs\", {});\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.langList = Helpers.deepClone(Localize.langs);\r\n\r\n\t\tif(this.table.options.columnDefaults.headerFilterPlaceholder !== false){\r\n\t\t\tthis.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder);\r\n\t\t}\r\n\r\n\t\tfor(let locale in this.table.options.langs){\r\n\t\t\tthis.installLang(locale, this.table.options.langs[locale]);\r\n\t\t}\r\n\r\n\t\tthis.setLocale(this.table.options.locale);\r\n\r\n\t\tthis.registerTableFunction(\"setLocale\", this.setLocale.bind(this));\r\n\t\tthis.registerTableFunction(\"getLocale\", this.getLocale.bind(this));\r\n\t\tthis.registerTableFunction(\"getLang\", this.getLang.bind(this));\r\n\t}\r\n\r\n\t//set header placehoder\r\n\tsetHeaderFilterPlaceholder(placeholder){\r\n\t\tthis.langList.default.headerFilters.default = placeholder;\r\n\t}\r\n\r\n\t//set header filter placeholder by column\r\n\tsetHeaderFilterColumnPlaceholder(column, placeholder){\r\n\t\tthis.langList.default.headerFilters.columns[column] = placeholder;\r\n\r\n\t\tif(this.lang && !this.lang.headerFilters.columns[column]){\r\n\t\t\tthis.lang.headerFilters.columns[column] = placeholder;\r\n\t\t}\r\n\t}\r\n\r\n\t//setup a lang description object\r\n\tinstallLang(locale, lang){\r\n\t\tif(this.langList[locale]){\r\n\t\t\tthis._setLangProp(this.langList[locale], lang);\r\n\t\t}else{\r\n\t\t\tthis.langList[locale] = lang;\r\n\t\t}\r\n\t}\r\n\r\n\t_setLangProp(lang, values){\r\n\t\tfor(let key in values){\r\n\t\t\tif(lang[key] && typeof lang[key] == \"object\"){\r\n\t\t\t\tthis._setLangProp(lang[key], values[key])\r\n\t\t\t}else{\r\n\t\t\t\tlang[key] = values[key];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//set current locale\r\n\tsetLocale(desiredLocale){\r\n\t\tdesiredLocale = desiredLocale || \"default\";\r\n\r\n\t\t//fill in any matching languge values\r\n\t\tfunction traverseLang(trans, path){\r\n\t\t\tfor(var prop in trans){\r\n\t\t\t\tif(typeof trans[prop] == \"object\"){\r\n\t\t\t\t\tif(!path[prop]){\r\n\t\t\t\t\t\tpath[prop] = {};\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttraverseLang(trans[prop], path[prop]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tpath[prop] = trans[prop];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//determing correct locale to load\r\n\t\tif(desiredLocale === true && navigator.language){\r\n\t\t\t//get local from system\r\n\t\t\tdesiredLocale = navigator.language.toLowerCase();\r\n\t\t}\r\n\r\n\t\tif(desiredLocale){\r\n\t\t\t//if locale is not set, check for matching top level locale else use default\r\n\t\t\tif(!this.langList[desiredLocale]){\r\n\t\t\t\tlet prefix = desiredLocale.split(\"-\")[0];\r\n\r\n\t\t\t\tif(this.langList[prefix]){\r\n\t\t\t\t\tconsole.warn(\"Localization Error - Exact matching locale not found, using closest match: \", desiredLocale, prefix);\r\n\t\t\t\t\tdesiredLocale = prefix;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Localization Error - Matching locale not found, using default: \", desiredLocale);\r\n\t\t\t\t\tdesiredLocale = \"default\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.locale = desiredLocale;\r\n\r\n\t\t//load default lang template\r\n\t\tthis.lang = Helpers.deepClone(this.langList.default || {});\r\n\r\n\t\tif(desiredLocale != \"default\"){\r\n\t\t\ttraverseLang(this.langList[desiredLocale], this.lang);\r\n\t\t}\r\n\r\n\t\tthis.dispatchExternal(\"localized\", this.locale, this.lang);\r\n\r\n\t\tthis._executeBindings();\r\n\t}\r\n\r\n\t//get current locale\r\n\tgetLocale(locale){\r\n\t\treturn this.locale;\r\n\t}\r\n\r\n\t//get lang object for given local or current if none provided\r\n\tgetLang(locale){\r\n\t\treturn locale ? this.langList[locale] : this.lang;\r\n\t}\r\n\r\n\t//get text for current locale\r\n\tgetText(path, value){\r\n\t\tvar path = value ? path + \"|\" + value : path,\r\n\t\tpathArray = path.split(\"|\"),\r\n\t\ttext = this._getLangElement(pathArray, this.locale);\r\n\r\n\t\t// if(text === false){\r\n\t\t// \tconsole.warn(\"Localization Error - Matching localized text not found for given path: \", path);\r\n\t\t// }\r\n\r\n\t\treturn text || \"\";\r\n\t}\r\n\r\n\t//traverse langs object and find localized copy\r\n\t_getLangElement(path, locale){\r\n\t\tvar root = this.lang;\r\n\r\n\t\tpath.forEach(function(level){\r\n\t\t\tvar rootPath;\r\n\r\n\t\t\tif(root){\r\n\t\t\t\trootPath = root[level];\r\n\r\n\t\t\t\tif(typeof rootPath != \"undefined\"){\r\n\t\t\t\t\troot = rootPath;\r\n\t\t\t\t}else{\r\n\t\t\t\t\troot = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn root;\r\n\t}\r\n\r\n\t//set update binding\r\n\tbind(path, callback){\r\n\t\tif(!this.bindings[path]){\r\n\t\t\tthis.bindings[path] = [];\r\n\t\t}\r\n\r\n\t\tthis.bindings[path].push(callback);\r\n\r\n\t\tcallback(this.getText(path), this.lang);\r\n\t}\r\n\r\n\t//itterate through bindings and trigger updates\r\n\t_executeBindings(){\r\n\t\tfor(let path in this.bindings){\r\n\t\t\tthis.bindings[path].forEach((binding) => {\r\n\t\t\t\tbinding(this.getText(path), this.lang);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}\r\n\r\nLocalize.moduleName = \"localize\";\r\n\r\n//load defaults\r\nLocalize.langs = defaultLangs;\r\n\r\nexport default Localize;","import Module from '../../core/Module.js';\r\nimport TableRegistry from '../../core/tools/TableRegistry.js';\r\n\r\nclass Comms extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"tableComms\", this.receive.bind(this));\r\n\t}\r\n\r\n\tgetConnections(selectors){\r\n\t\tvar connections = [],\r\n\t\tconnection;\r\n\r\n\t\tconnection = TableRegistry.lookupTable(selectors);\r\n\r\n\t\tconnection.forEach((con) =>{\r\n\t\t\tif(this.table !== con){\r\n\t\t\t\tconnections.push(con);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn connections;\r\n\t}\r\n\r\n\tsend(selectors, module, action, data){\r\n\t\tvar connections = this.getConnections(selectors);\r\n\r\n\t\tconnections.forEach((connection) => {\r\n\t\t\tconnection.tableComms(this.table.element, module, action, data);\r\n\t\t});\r\n\r\n\t\tif(!connections.length && selectors){\r\n\t\t\tconsole.warn(\"Table Connection Error - No tables matching selector found\", selectors);\r\n\t\t}\r\n\t}\r\n\r\n\treceive(table, module, action, data){\r\n\t\tif(this.table.modExists(module)){\r\n\t\t\treturn this.table.modules[module].commsReceived(table, action, data);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Inter-table Comms Error - no such module:\", module);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nComms.moduleName = \"comms\";\r\n\r\nexport default Comms;","import * as coreModules from '../modules/core.js';\r\nimport TableRegistry from './TableRegistry.js';\r\n\r\nexport default class ModuleBinder {\r\n\r\n\tconstructor(tabulator, modules){\r\n\t\tthis.bindStaticFuctionality(tabulator);\r\n\t\tthis.bindModules(tabulator, coreModules, true);\r\n\r\n\t\tif(modules){\r\n\t\t\tthis.bindModules(tabulator, modules);\r\n\t\t}\r\n\t}\r\n\r\n\tbindStaticFuctionality(tabulator){\r\n\t\ttabulator.moduleBindings = {};\r\n\r\n\t\ttabulator.extendModule = function(name, property, values){\r\n\t\t\tif(tabulator.moduleBindings[name]){\r\n\t\t\t\tvar source = tabulator.moduleBindings[name][property];\r\n\r\n\t\t\t\tif(source){\r\n\t\t\t\t\tif(typeof values == \"object\"){\r\n\t\t\t\t\t\tfor(let key in values){\r\n\t\t\t\t\t\t\tsource[key] = values[key];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Module Error - Invalid value type, it must be an object\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Module Error - property does not exist:\", property);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Module Error - module does not exist:\", name);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\ttabulator.registerModule = function(modules){\r\n\t\t\tif(!Array.isArray(modules)){\r\n\t\t\t\tmodules = [modules];\r\n\t\t\t}\r\n\r\n\t\t\tmodules.forEach((mod) => {\r\n\t\t\t\ttabulator.registerModuleBinding(mod)\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\ttabulator.registerModuleBinding = function(mod){\r\n\t\t\ttabulator.moduleBindings[mod.moduleName] = mod;\r\n\t\t};\r\n\r\n\t\ttabulator.findTable = function(query){\r\n\t\t\tvar results = TableRegistry.lookupTable(query, true);\r\n\t\t\treturn Array.isArray(results) && !results.length ? false : results;\r\n\t\t}\r\n\r\n\t\t//ensure that module are bound to instantiated function\r\n\t\ttabulator.prototype.bindModules = function(){\r\n\t\t\tvar orderedMods = [],\r\n\t\t\tunOrderedMods = [];\r\n\r\n\t\t\tthis.modules = {};\r\n\r\n\t\t\tfor(var name in tabulator.moduleBindings){\r\n\t\t\t\tlet mod = tabulator.moduleBindings[name];\r\n\t\t\t\tlet module = new mod(this);\r\n\r\n\t\t\t\tthis.modules[name] = module;\r\n\r\n\t\t\t\tif(mod.prototype.moduleCore){\r\n\t\t\t\t\tthis.modulesCore.push(module);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(mod.moduleInitOrder){\r\n\t\t\t\t\t\torderedMods.push(module);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tunOrderedMods.push(module);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\torderedMods.sort((a, b) => a.moduleInitOrder > b.moduleInitOrder ? 1 : -1);\r\n\r\n\t\t\tthis.modulesRegular = orderedMods.concat(unOrderedMods);\r\n\t\t}\r\n\t}\r\n\r\n\tbindModules(tabulator, modules, core){\r\n\t\tvar mods = Object.values(modules);\r\n\r\n\t\tif(core){\r\n\t\t\tmods.forEach((mod) => {\r\n\t\t\t\tmod.prototype.moduleCore = true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\ttabulator.registerModule(mods);\r\n\t}\r\n}","'use strict';\r\n\r\nimport defaultOptions from './defaults/options.js';\r\n\r\nimport ColumnManager from './ColumnManager.js';\r\nimport RowManager from './RowManager.js';\r\nimport FooterManager from './FooterManager.js';\r\n\r\nimport InteractionMonitor from './tools/InteractionMonitor.js';\r\nimport ComponentFunctionBinder from './tools/ComponentFunctionBinder.js';\r\nimport DataLoader from './tools/DataLoader.js';\r\n\r\nimport ExternalEventBus from './tools/ExternalEventBus.js';\r\nimport InternalEventBus from './tools/InternalEventBus.js';\r\n\r\nimport TableRegistry from './tools/TableRegistry.js';\r\nimport ModuleBinder from './tools/ModuleBinder.js';\r\n\r\nimport OptionsList from './tools/OptionsList.js';\r\n\r\nclass Tabulator {\r\n\r\n\tconstructor(element, options){\r\n\r\n\t\tthis.options = {};\r\n\r\n\t\tthis.columnManager = null; // hold Column Manager\r\n\t\tthis.rowManager = null; //hold Row Manager\r\n\t\tthis.footerManager = null; //holder Footer Manager\r\n\t\tthis.vdomHoz = null; //holder horizontal virtual dom\r\n\t\tthis.externalEvents = null; //handle external event messaging\r\n\t\tthis.eventBus = null; //handle internal event messaging\r\n\t\tthis.interactionMonitor = false; //track user interaction\r\n\t\tthis.browser = \"\"; //hold current browser type\r\n\t\tthis.browserSlow = false; //handle reduced functionality for slower browsers\r\n\t\tthis.browserMobile = false; //check if running on mobile, prevent resize cancelling edit on keyboard appearance\r\n\t\tthis.rtl = false; //check if the table is in RTL mode\r\n\t\tthis.originalElement = null; //hold original table element if it has been replaced\r\n\r\n\t\tthis.componentFunctionBinder = new ComponentFunctionBinder(this); //bind component functions\r\n\t\tthis.dataLoader = false; //bind component functions\r\n\r\n\t\tthis.modules = {}; //hold all modules bound to this table\r\n\t\tthis.modulesCore = []; //hold core modules bound to this table (for initialization purposes)\r\n\t\tthis.modulesRegular = []; //hold regular modules bound to this table (for initialization purposes)\r\n\r\n\t\tthis.optionsList = new OptionsList(this, \"table constructor\");\r\n\r\n\t\tthis.initialized = false;\r\n\r\n\t\tif(this.initializeElement(element)){\r\n\r\n\t\t\tthis.initializeCoreSystems(options);\r\n\r\n\t\t\t//delay table creation to allow event bindings immediately after the constructor\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis._create();\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tTableRegistry.register(this); //register table for inter-device communication\r\n\t}\r\n\r\n\tinitializeElement(element){\r\n\t\tif(typeof HTMLElement !== \"undefined\" && element instanceof HTMLElement){\r\n\t\t\tthis.element = element;\r\n\t\t\treturn true;\r\n\t\t}else if(typeof element === \"string\"){\r\n\t\t\tthis.element = document.querySelector(element);\r\n\r\n\t\t\tif(this.element){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Tabulator Creation Error - no element found matching selector: \", element);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Tabulator Creation Error - Invalid element provided:\", element);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeCoreSystems(options){\r\n\t\tthis.columnManager = new ColumnManager(this);\r\n\t\tthis.rowManager = new RowManager(this);\r\n\t\tthis.footerManager = new FooterManager(this);\r\n\t\tthis.dataLoader = new DataLoader(this);\r\n\r\n\t\tthis.bindModules();\r\n\r\n\t\tthis.options = this.optionsList.generate(Tabulator.defaultOptions, options)\r\n\r\n\t\tthis._clearObjectPointers();\r\n\r\n\t\tthis._mapDeprecatedFunctionality();\r\n\r\n\t\tthis.externalEvents = new ExternalEventBus(this, this.options, this.options.debugEventsExternal);\r\n\t\tthis.eventBus = new InternalEventBus(this.options.debugEventsInternal);\r\n\r\n\t\tthis.interactionMonitor = new InteractionMonitor(this);\r\n\r\n\t\tthis.dataLoader.initialize();\r\n\t\t// this.columnManager.initialize();\r\n\t\t// this.rowManager.initialize();\r\n\t\tthis.footerManager.initialize();\r\n\t}\r\n\r\n\t//convert deprecated functionality to new functions\r\n\t_mapDeprecatedFunctionality(){\r\n\t\t//all previously deprecated functionality removed in the 5.0 release\r\n\t}\r\n\r\n\t_clearSelection(){\r\n\r\n\t\tthis.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tif (window.getSelection) {\r\n\t\t if (window.getSelection().empty) { // Chrome\r\n\t\t \twindow.getSelection().empty();\r\n\t\t } else if (window.getSelection().removeAllRanges) { // Firefox\r\n\t\t \twindow.getSelection().removeAllRanges();\r\n\t\t }\r\n\t\t} else if (document.selection) { // IE?\r\n\t\t\tdocument.selection.empty();\r\n\t\t}\r\n\r\n\t\tthis.element.classList.remove(\"tabulator-block-select\");\r\n\t}\r\n\r\n\t//create table\r\n\t_create(){\r\n\t\tthis.externalEvents.dispatch(\"tableBuilding\");\r\n\t\tthis.eventBus.dispatch(\"table-building\");\r\n\r\n\t\tthis._rtlCheck();\r\n\r\n\t\tthis._buildElement();\r\n\r\n\t\tthis._initializeTable();\r\n\r\n\t\tthis._loadInitialData();\r\n\r\n\t\tthis.initialized = true;\r\n\r\n\t\tthis.externalEvents.dispatch(\"tableBuilt\");\r\n\t}\r\n\r\n\t_rtlCheck(){\r\n\t\tvar style = window.getComputedStyle(this.element);\r\n\r\n\t\tswitch(this.options.textDirection){\r\n\t\t\tcase\"auto\":\r\n\t\t\tif(style.direction !== \"rtl\"){\r\n\t\t\t\tbreak;\r\n\t\t\t};\r\n\r\n\t\t\tcase \"rtl\":\r\n\t\t\tthis.element.classList.add(\"tabulator-rtl\");\r\n\t\t\tthis.rtl = true;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"ltr\":\r\n\t\t\tthis.element.classList.add(\"tabulator-ltr\");\r\n\r\n\t\t\tdefault:\r\n\t\t\tthis.rtl = false;\r\n\t\t}\r\n\t}\r\n\r\n\t//clear pointers to objects in default config object\r\n\t_clearObjectPointers(){\r\n\t\tthis.options.columns = this.options.columns.slice(0);\r\n\r\n\t\tif(Array.isArray(this.options.data) && !this.options.reactiveData){\r\n\t\t\tthis.options.data = this.options.data.slice(0);\r\n\t\t}\r\n\t}\r\n\r\n\t//build tabulator element\r\n\t_buildElement(){\r\n\t\tvar element = this.element,\r\n\t\toptions = this.options,\r\n\t\tnewElement;\r\n\r\n\t\tif(element.tagName === \"TABLE\"){\r\n\t\t\tthis.originalElement = this.element;\r\n\t\t\tnewElement = document.createElement(\"div\");\r\n\r\n\t\t\t//transfer attributes to new element\r\n\t\t\tvar attributes = element.attributes;\r\n\r\n\t\t\t// loop through attributes and apply them on div\r\n\t\t\tfor(var i in attributes){\r\n\t\t\t\tif(typeof attributes[i] == \"object\"){\r\n\t\t\t\t\tnewElement.setAttribute(attributes[i].name, attributes[i].value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// replace table with div element\r\n\t\t\telement.parentNode.replaceChild(newElement, element);\r\n\r\n\t\t\tthis.element = element = newElement;\r\n\t\t}\r\n\r\n\t\telement.classList.add(\"tabulator\");\r\n\t\telement.setAttribute(\"role\", \"grid\");\r\n\r\n\t\t//empty element\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\t//set table height\r\n\t\tif(options.height){\r\n\t\t\toptions.height = isNaN(options.height) ? options.height : options.height + \"px\";\r\n\t\t\telement.style.height = options.height;\r\n\t\t}\r\n\r\n\t\t//set table min height\r\n\t\tif(options.minHeight !== false){\r\n\t\t\toptions.minHeight = isNaN(options.minHeight) ? options.minHeight : options.minHeight + \"px\";\r\n\t\t\telement.style.minHeight = options.minHeight;\r\n\t\t}\r\n\r\n\t\t//set table maxHeight\r\n\t\tif(options.maxHeight !== false){\r\n\t\t\toptions.maxHeight = isNaN(options.maxHeight) ? options.maxHeight : options.maxHeight + \"px\";\r\n\t\t\telement.style.maxHeight = options.maxHeight;\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize core systems and modules\r\n\t_initializeTable(){\r\n\t\tvar element = this.element,\r\n\t\toptions = this.options;\r\n\r\n\t\tthis.interactionMonitor.initialize();\r\n\r\n\t\tthis.columnManager.initialize();\r\n\t\tthis.rowManager.initialize();\r\n\r\n\t\tthis._detectBrowser();\r\n\r\n\t\t//initialize core modules\r\n\t\tthis.modulesCore.forEach((mod) => {\r\n\t\t\tmod.initialize();\r\n\t\t})\r\n\r\n\t\t//build table elements\r\n\t\telement.appendChild(this.columnManager.getElement());\r\n\t\telement.appendChild(this.rowManager.getElement());\r\n\r\n\t\tif(options.footerElement){\r\n\t\t\tthis.footerManager.activate();\r\n\t\t}\r\n\r\n\t\tif(options.autoColumns && options.data){\r\n\r\n\t\t\tthis.columnManager.generateColumnsFromRowData(this.options.data);\r\n\t\t}\r\n\r\n\t\t//initialize regular modules\r\n\t\tthis.modulesRegular.forEach((mod) => {\r\n\t\t\tmod.initialize();\r\n\t\t});\r\n\r\n\t\tthis.columnManager.setColumns(options.columns);\r\n\r\n\t\tthis.eventBus.dispatch(\"table-built\");\r\n\t}\r\n\r\n\t_loadInitialData(){\r\n\t\tthis.dataLoader.load(this.options.data);\r\n\t}\r\n\r\n\t//deconstructor\r\n\tdestroy(){\r\n\t\tvar element = this.element;\r\n\r\n\t\tTableRegistry.deregister(this); //deregister table from inter-device communication\r\n\r\n\t\tthis.eventBus.dispatch(\"table-destroy\");\r\n\r\n\t\t//clear row data\r\n\t\tthis.rowManager.rows.forEach(function(row){\r\n\t\t\trow.wipe();\r\n\t\t});\r\n\r\n\t\tthis.rowManager.rows = [];\r\n\t\tthis.rowManager.activeRows = [];\r\n\t\tthis.rowManager.displayRows = [];\r\n\r\n\t\t//clear DOM\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\t\telement.classList.remove(\"tabulator\");\r\n\t}\r\n\r\n\t_detectBrowser(){\r\n\t\tvar ua = navigator.userAgent||navigator.vendor||window.opera;\r\n\r\n\t\tif(ua.indexOf(\"Trident\") > -1){\r\n\t\t\tthis.browser = \"ie\";\r\n\t\t\tthis.browserSlow = true;\r\n\t\t}else if(ua.indexOf(\"Edge\") > -1){\r\n\t\t\tthis.browser = \"edge\";\r\n\t\t\tthis.browserSlow = true;\r\n\t\t}else if(ua.indexOf(\"Firefox\") > -1){\r\n\t\t\tthis.browser = \"firefox\";\r\n\t\t\tthis.browserSlow = false;\r\n\t\t}else{\r\n\t\t\tthis.browser = \"other\";\r\n\t\t\tthis.browserSlow = false;\r\n\t\t}\r\n\r\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));\r\n\t}\r\n\r\n\t////////////////// Data Handling //////////////////\r\n\t//block table redrawing\r\n\tblockRedraw(){\r\n\t\treturn this.rowManager.blockRedraw();\r\n\t}\r\n\r\n\t//restore table redrawing\r\n\trestoreRedraw(){\r\n\t\treturn this.rowManager.restoreRedraw();\r\n\t}\r\n\r\n\t//load data\r\n\tsetData(data, params, config){\r\n\t\tif(this.initialized){\r\n\t\t\treturn this.dataLoader.load(data, params, config, false);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"setData failed - table not yet initialized. To set initial data please use the 'data' property in the table constructor.\")\r\n\t\t}\r\n\t}\r\n\r\n\t//clear data\r\n\tclearData(){\r\n\t\tthis.dataLoader.blockActiveLoad();\r\n\t\tthis.rowManager.clearData();\r\n\t}\r\n\r\n\t//get table data array\r\n\tgetData(active){\r\n\t\treturn this.rowManager.getData(active);\r\n\t}\r\n\r\n\t//get table data array count\r\n\tgetDataCount(active){\r\n\t\treturn this.rowManager.getDataCount(active);\r\n\t}\r\n\r\n\t//replace data, keeping table in position with same sort\r\n\treplaceData(data, params, config){\r\n\t\tif(this.initialized){\r\n\t\t\treturn this.dataLoader.load(data, params, config, true, true);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"replaceData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update table data\r\n\tupdateData(data){\r\n\t\tvar responses = 0;\r\n\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\tresponses++;\r\n\r\n\t\t\t\t\t\t\trow.updateData(item)\r\n\t\t\t\t\t\t\t.then(()=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"updateData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\taddData(data, pos, index){\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tthis.rowManager.addRows(data, pos, index)\r\n\t\t\t\t\t.then((rows) => {\r\n\t\t\t\t\t\tvar output = [];\r\n\r\n\t\t\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\t\t\toutput.push(row.getComponent());\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tresolve(output);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"addData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update table data\r\n\tupdateOrAddData(data){\r\n\t\tvar rows = [],\r\n\t\tresponses = 0;\r\n\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\r\n\t\t\t\t\t\tresponses++;\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.updateData(item)\r\n\t\t\t\t\t\t\t.then(()=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\t\t\t\t\t\t\t\trows.push(row.getComponent());\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve(rows);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.rowManager.addRows(item)\r\n\t\t\t\t\t\t\t.then((newRows)=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\t\t\t\t\t\t\t\trows.push(newRows[0].getComponent());\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve(rows);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"updateOrAddData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//get row object\r\n\tgetRow(index){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching row found:\", index);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//get row object\r\n\tgetRowFromPosition(position, active){\r\n\t\tvar row = this.rowManager.getRowFromPosition(position, active);\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching row found:\", position);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//delete row from table\r\n\tdeleteRow(index){\r\n\t\tvar foundRows = [];\r\n\r\n\t\tif(!Array.isArray(index)){\r\n\t\t\tindex = [index];\r\n\t\t}\r\n\r\n\t\t//find matching rows\r\n\t\tfor(let item of index){\r\n\t\t\tlet row = this.rowManager.findRow(item, true);\r\n\r\n\t\t\tif(row){\r\n\t\t\t\tfoundRows.push(row);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Delete Error - No matching row found:\", item);\r\n\t\t\t\treturn Promise.reject(\"Delete Error - No matching row found\")\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//sort rows into correct order to ensure smooth delete from table\r\n\t\tfoundRows.sort((a, b) => {\r\n\t\t\treturn this.rowManager.rows.indexOf(a) > this.rowManager.rows.indexOf(b) ? 1 : -1;\r\n\t\t});\r\n\r\n\t\t//delete rows\r\n\t\tfoundRows.forEach((row) =>{\r\n\t\t\trow.delete()\r\n\t\t});\r\n\r\n\t\tthis.rowManager.reRenderInPosition();\r\n\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\r\n\t//add row to table\r\n\taddRow(data, pos, index){\r\n\t\tif(this.initialized){\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\r\n\t\t\treturn this.rowManager.addRows(data, pos, index)\r\n\t\t\t.then((rows)=>{\r\n\t\t\t\treturn rows[0].getComponent();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"addRow failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update a row if it exitsts otherwise create it\r\n\tupdateOrAddRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t.then(()=>{\r\n\t\t\t\treturn row.getComponent();\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\treturn this.rowManager.addRows(data)\r\n\t\t\t.then((rows)=>{\r\n\t\t\t\treturn rows[0].getComponent();\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\t//update row data\r\n\tupdateRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t.then(()=>{\r\n\t\t\t\treturn Promise.resolve(row.getComponent());\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Update Error - No matching row found:\", index);\r\n\t\t\treturn Promise.reject(\"Update Error - No matching row found\");\r\n\t\t}\r\n\t}\r\n\r\n\t//scroll to row in DOM\r\n\tscrollToRow(index, position, ifVisible){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn this.rowManager.scrollToRow(row, position, ifVisible)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Scroll Error - No matching row found:\", index);\r\n\t\t\treturn Promise.reject(\"Scroll Error - No matching row found\");\r\n\t\t}\r\n\t}\r\n\r\n\tmoveRow(from, to, after){\r\n\t\tvar fromRow = this.rowManager.findRow(from);\r\n\r\n\t\tif(fromRow){\r\n\t\t\tfromRow.moveToRow(to, after);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching row found:\", from);\r\n\t\t}\r\n\t}\r\n\r\n\tgetRows(active){\r\n\t\treturn this.rowManager.getComponents(active);\r\n\t}\r\n\r\n\t//get position of row in table\r\n\tgetRowPosition(index, active){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn this.rowManager.getRowPosition(row, active);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Position Error - No matching row found:\", index);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t/////////////// Column Functions ///////////////\r\n\tsetColumns(definition){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.columnManager.setColumns(definition);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"setColumns failed - table not yet initialized. To set initial data please use the 'columns' property in the table constructor.\")\r\n\t\t}\r\n\t}\r\n\r\n\tgetColumns(structured){\r\n\t\treturn this.columnManager.getComponents(structured);\r\n\t}\r\n\r\n\tgetColumn(field){\r\n\t\tvar col = this.columnManager.findColumn(field);\r\n\r\n\t\tif(col){\r\n\t\t\treturn col.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tgetColumnDefinitions(){\r\n\t\treturn this.columnManager.getDefinitionTree();\r\n\t}\r\n\r\n\tshowColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tcolumn.show();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Show Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\thideColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tcolumn.hide();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Hide Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\ttoggleColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tif(column.visible){\r\n\t\t\t\tcolumn.hide();\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.show();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Visibility Toggle Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\taddColumn(definition, before, field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\treturn this.columnManager.addColumn(definition, before, column)\r\n\t\t.then((column) => {\r\n\t\t\treturn column.getComponent();\r\n\t\t});\r\n\t}\r\n\r\n\tdeleteColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn column.delete();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Delete Error - No matching column found:\", field);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\r\n\tupdateColumnDefinition(field, definition){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn column.updateDefinition(definition)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Update Error - No matching column found:\", field);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\r\n\tmoveColumn(from, to, after){\r\n\t\tvar fromColumn = this.columnManager.findColumn(from);\r\n\t\tvar toColumn = this.columnManager.findColumn(to);\r\n\r\n\t\tif(fromColumn){\r\n\t\t\tif(toColumn){\r\n\t\t\t\tthis.columnManager.moveColumn(fromColumn, toColumn, after)\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Move Error - No matching column found:\", toColumn);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching column found:\", from);\r\n\t\t}\r\n\t}\r\n\r\n\t//scroll to column in DOM\r\n\tscrollToColumn(field, position, ifVisible){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\t\tif(column){\r\n\t\t\t\treturn this.columnManager.scrollToColumn(column, position, ifVisible)\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - No matching column found:\", field);\r\n\t\t\t\treturn Promise.reject(\"Scroll Error - No matching column found\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//////////// General Public Functions ////////////\r\n\t//redraw list without updating data\r\n\tredraw(force){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.columnManager.redraw(force);\r\n\t\t\tthis.rowManager.redraw(force);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"redraw failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\tsetHeight(height){\r\n\t\tthis.options.height = isNaN(height) ? height : height + \"px\";\r\n\t\tthis.element.style.height = this.options.height;\r\n\t\tthis.rowManager.initializeRenderer();\r\n\t\tthis.rowManager.redraw();\r\n\t}\r\n\r\n\t//////////////////// Event Bus ///////////////////\r\n\r\n\ton(key, callback){\r\n\t\tthis.externalEvents.subscribe(key, callback);\r\n\t}\r\n\r\n\toff(key, callback){\r\n\t\tthis.externalEvents.unsubscribe(key, callback);\r\n\t}\r\n\r\n\tdispatchEvent(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift();\r\n\r\n\t\tthis.externalEvents.dispatch(...arguments)\r\n\t}\r\n\r\n\t////////////// Extension Management //////////////\r\n\tmodExists(plugin, required){\r\n\t\tif(this.modules[plugin]){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tif(required){\r\n\t\t\t\tconsole.error(\"Tabulator Module Not Installed: \" + plugin);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tmodule(key){\r\n\t\tvar mod = this.modules[key];\r\n\r\n\t\tif(!mod){\r\n\t\t\tconsole.error(\"Tabulator module not installed: \" + key);\r\n\t\t}\r\n\r\n\t\treturn mod;\r\n\t}\r\n}\r\n\r\n//default setup options\r\nTabulator.defaultOptions = defaultOptions;\r\n\r\n//bind modules and static functionality\r\nnew ModuleBinder(Tabulator);\r\n\r\nexport default Tabulator;\r\n","export default {}","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defautlAccessors from './defaults/accessors.js';\r\n\r\nclass Accessor extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.allowedTypes = [\"\", \"data\", \"download\", \"clipboard\", \"print\", \"htmlOutput\"] //list of accessor types\r\n\r\n\t\tthis.registerColumnOption(\"accessor\");\r\n\t\tthis.registerColumnOption(\"accessorParams\");\r\n\t\tthis.registerColumnOption(\"accessorData\");\r\n\t\tthis.registerColumnOption(\"accessorDataParams\");\r\n\t\tthis.registerColumnOption(\"accessorDownload\");\r\n\t\tthis.registerColumnOption(\"accessorDownloadParams\");\r\n\t\tthis.registerColumnOption(\"accessorClipboard\");\r\n\t\tthis.registerColumnOption(\"accessorClipboardParams\");\r\n\t\tthis.registerColumnOption(\"accessorPrint\");\r\n\t\tthis.registerColumnOption(\"accessorPrintParams\");\r\n\t\tthis.registerColumnOption(\"accessorHtmlOutput\");\r\n\t\tthis.registerColumnOption(\"accessorHtmlOutputParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"row-data-retrieve\", this.transformRow.bind(this));\r\n\t}\r\n\r\n\t//initialize column accessor\r\n\tinitializeColumn(column){\r\n\t\tvar match = false,\r\n\t\tconfig = {};\r\n\r\n\t\tthis.allowedTypes.forEach((type) => {\r\n\t\t\tvar key = \"accessor\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\t\taccessor;\r\n\r\n\t\t\tif(column.definition[key]){\r\n\t\t\t\taccessor = this.lookupAccessor(column.definition[key]);\r\n\r\n\t\t\t\tif(accessor){\r\n\t\t\t\t\tmatch = true;\r\n\r\n\t\t\t\t\tconfig[key] = {\r\n\t\t\t\t\t\taccessor:accessor,\r\n\t\t\t\t\t\tparams: column.definition[key + \"Params\"] || {},\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tcolumn.modules.accessor = config;\r\n\t\t}\r\n\t}\r\n\r\n\tlookupAccessor(value){\r\n\t\tvar accessor = false;\r\n\r\n\t\t//set column accessor\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Accessor.accessors[value]){\r\n\t\t\t\taccessor = Accessor.accessors[value]\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Accessor Error - No such accessor found, ignoring: \", value);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\taccessor = value;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn accessor;\r\n\t}\r\n\r\n\t//apply accessor to row\r\n\ttransformRow(row, type){\r\n\t\tvar key = \"accessor\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\trowComponent = row.getComponent();\r\n\r\n\t\t//clone data object with deep copy to isolate internal data from returned result\r\n\t\tvar data = Helpers.deepClone(row.data || {});\r\n\r\n\t\tthis.table.columnManager.traverse(function(column){\r\n\t\t\tvar value, accessor, params, colCompnent;\r\n\r\n\t\t\tif(column.modules.accessor){\r\n\r\n\t\t\t\taccessor = column.modules.accessor[key] || column.modules.accessor.accessor || false;\r\n\r\n\t\t\t\tif(accessor){\r\n\t\t\t\t\tvalue = column.getFieldValue(data);\r\n\r\n\t\t\t\t\tif(value != \"undefined\"){\r\n\t\t\t\t\t\tcolCompnent = column.getComponent();\r\n\t\t\t\t\t\tparams = typeof accessor.params === \"function\" ? accessor.params(value, data, type, colCompnent, rowComponent) : accessor.params;\r\n\t\t\t\t\t\tcolumn.setFieldValue(data, accessor.accessor(value, data, type, params, colCompnent, rowComponent));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n}\r\n\r\n//load defaults\r\nAccessor.moduleName = \"accessor\";\r\nAccessor.accessors = defautlAccessors;\r\n\r\nexport default Accessor;","export default {\r\n\tmethod: \"GET\",\r\n};","function generateParamsList(data, prefix){\r\n\tvar output = [];\r\n\r\n\tprefix = prefix || \"\";\r\n\r\n\tif(Array.isArray(data)){\r\n\t\tdata.forEach((item, i) => {\r\n\t\t\toutput = output.concat(generateParamsList(item, prefix ? prefix + \"[\" + i + \"]\" : i));\r\n\t\t});\r\n\t}else if (typeof data === \"object\"){\r\n\t\tfor (var key in data){\r\n\t\t\toutput = output.concat(generateParamsList(data[key], prefix ? prefix + \"[\" + key + \"]\" : key));\r\n\t\t}\r\n\t}else{\r\n\t\toutput.push({key:prefix, value:data});\r\n\t}\r\n\r\n\treturn output;\r\n}\r\n\r\nfunction serializeParams(params){\r\n\tvar output = generateParamsList(params),\r\n\tencoded = [];\r\n\r\n\toutput.forEach(function(item){\r\n\t\tencoded.push(encodeURIComponent(item.key) + \"=\" + encodeURIComponent(item.value));\r\n\t});\r\n\r\n\treturn encoded.join(\"&\");\r\n}\r\n\r\nexport default function(url, config, params){\r\n\tif(url){\r\n\t\tif(params && Object.keys(params).length){\r\n\t\t\tif(!config.method || config.method.toLowerCase() == \"get\"){\r\n\t\t\t\tconfig.method = \"get\";\r\n\r\n\t\t\t\turl += (url.includes(\"?\") ? \"&\" : \"?\") + serializeParams(params);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn url;\r\n};","export default function(url, config, params){\r\n\tvar contentType;\r\n\r\n\treturn new Promise((resolve, reject) => {\r\n\t\t//set url\r\n\t\turl = this.urlGenerator.call(this.table, url, config, params);\r\n\r\n\t\t//set body content if not GET request\r\n\t\tif(config.method.toUpperCase() != \"GET\"){\r\n\t\t\tcontentType = typeof this.table.options.ajaxContentType === \"object\" ? this.table.options.ajaxContentType : this.contentTypeFormatters[this.table.options.ajaxContentType];\r\n\t\t\tif(contentType){\r\n\r\n\t\t\t\tfor(var key in contentType.headers){\r\n\t\t\t\t\tif(!config.headers){\r\n\t\t\t\t\t\tconfig.headers = {};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(typeof config.headers[key] === \"undefined\"){\r\n\t\t\t\t\t\tconfig.headers[key] = contentType.headers[key];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconfig.body = contentType.body.call(this, url, config, params);\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Ajax Error - Invalid ajaxContentType value:\", this.table.options.ajaxContentType);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(url){\r\n\t\t\t//configure headers\r\n\t\t\tif(typeof config.headers === \"undefined\"){\r\n\t\t\t\tconfig.headers = {};\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.headers.Accept === \"undefined\"){\r\n\t\t\t\tconfig.headers.Accept = \"application/json\";\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.headers[\"X-Requested-With\"] === \"undefined\"){\r\n\t\t\t\tconfig.headers[\"X-Requested-With\"] = \"XMLHttpRequest\";\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.mode === \"undefined\"){\r\n\t\t\t\tconfig.mode = \"cors\";\r\n\t\t\t}\r\n\r\n\t\t\tif(config.mode == \"cors\"){\r\n\t\t\t\tif(typeof config.headers[\"Origin\"] === \"undefined\"){\r\n\t\t\t\t\tconfig.headers[\"Origin\"] = window.location.origin;\r\n\t\t\t\t}\r\n \r\n\t\t\t\tif(typeof config.credentials === \"undefined\"){\r\n\t\t\t\t\tconfig.credentials = 'same-origin';\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(typeof config.credentials === \"undefined\"){\r\n\t\t\t\t\tconfig.credentials = 'include';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//send request\r\n\t\t\tfetch(url, config)\r\n\t\t\t.then((response)=>{\r\n\t\t\t\tif(response.ok) {\r\n\t\t\t\t\tresponse.json()\r\n\t\t\t\t\t.then((data)=>{\r\n\t\t\t\t\t\tresolve(data);\r\n\t\t\t\t\t}).catch((error)=>{\r\n\t\t\t\t\t\treject(error);\r\n\t\t\t\t\t\tconsole.warn(\"Ajax Load Error - Invalid JSON returned\", error);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \" + response.status, response.statusText);\r\n\t\t\t\t\treject(response);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.catch((error)=>{\r\n\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \", error);\r\n\t\t\t\treject(error);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Ajax Load Error - No URL Set\");\r\n\t\t\tresolve([]);\r\n\t\t}\r\n\t});\r\n};","function generateParamsList(data, prefix){\r\n\tvar output = [];\r\n\r\n\tprefix = prefix || \"\";\r\n\r\n\tif(Array.isArray(data)){\r\n\t\tdata.forEach((item, i) => {\r\n\t\t\toutput = output.concat(generateParamsList(item, prefix ? prefix + \"[\" + i + \"]\" : i));\r\n\t\t});\r\n\t}else if (typeof data === \"object\"){\r\n\t\tfor (var key in data){\r\n\t\t\toutput = output.concat(generateParamsList(data[key], prefix ? prefix + \"[\" + key + \"]\" : key));\r\n\t\t}\r\n\t}else{\r\n\t\toutput.push({key:prefix, value:data});\r\n\t}\r\n\r\n\treturn output;\r\n}\r\n\r\nexport default {\r\n\t\"json\":{\r\n\t\theaders:{\r\n\t\t\t'Content-Type': 'application/json',\r\n\t\t},\r\n\t\tbody:function(url, config, params){\r\n\t\t\treturn JSON.stringify(params);\r\n\t\t},\r\n\t},\r\n\t\"form\":{\r\n\t\theaders:{\r\n\t\t},\r\n\t\tbody:function(url, config, params){\r\n\r\n\t\t\tvar output = generateParamsList(params),\r\n\t\t\tform = new FormData();\r\n\r\n\t\t\toutput.forEach(function(item){\r\n\t\t\t\tform.append(item.key, item.value);\r\n\t\t\t});\r\n\r\n\t\t\treturn form;\r\n\t\t},\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultConfig from './defaults/config.js';\r\nimport defaultURLGenerator from './defaults/urlGenerator.js';\r\nimport defaultLoaderPromise from './defaults/loaderPromise.js';\r\nimport defaultContentTypeFormatters from './defaults/contentTypeFormatters.js';\r\n\r\nclass Ajax extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.config = {}; //hold config object for ajax request\r\n\t\tthis.url = \"\"; //request URL\r\n\t\tthis.urlGenerator = false;\r\n\t\tthis.params = false; //request parameters\r\n\t\t\r\n\t\tthis.loaderPromise = false;\r\n\t\t\r\n\t\tthis.registerTableOption(\"ajaxURL\", false); //url for ajax loading\r\n\t\tthis.registerTableOption(\"ajaxURLGenerator\", false);\r\n\t\tthis.registerTableOption(\"ajaxParams\", {}); //params for ajax loading\r\n\t\tthis.registerTableOption(\"ajaxConfig\", \"get\"); //ajax request type\r\n\t\tthis.registerTableOption(\"ajaxContentType\", \"form\"); //ajax request type\r\n\t\tthis.registerTableOption(\"ajaxRequestFunc\", false); //promise function\r\n\t\t\r\n\t\tthis.registerTableOption(\"ajaxRequesting\", function(){});\r\n\t\tthis.registerTableOption(\"ajaxResponse\", false);\r\n\t\t\r\n\t\tthis.contentTypeFormatters = Ajax.contentTypeFormatters;\r\n\t}\r\n\t\r\n\t//initialize setup options\r\n\tinitialize(){\r\n\t\tthis.loaderPromise = this.table.options.ajaxRequestFunc || Ajax.defaultLoaderPromise;\r\n\t\tthis.urlGenerator = this.table.options.ajaxURLGenerator || Ajax.defaultURLGenerator;\r\n\t\t\r\n\t\tif(this.table.options.ajaxURL){\r\n\t\t\tthis.setUrl(this.table.options.ajaxURL);\r\n\t\t}\r\n\r\n\r\n\t\tthis.setDefaultConfig(this.table.options.ajaxConfig);\r\n\t\t\r\n\t\tthis.registerTableFunction(\"getAjaxUrl\", this.getUrl.bind(this));\r\n\t\t\r\n\t\tthis.subscribe(\"data-loading\", this.requestDataCheck.bind(this));\r\n\t\tthis.subscribe(\"data-params\", this.requestParams.bind(this));\r\n\t\tthis.subscribe(\"data-load\", this.requestData.bind(this));\r\n\t}\r\n\t\r\n\trequestParams(data, config, silent, params){\r\n\t\tvar ajaxParams = this.table.options.ajaxParams;\r\n\t\t\r\n\t\tif(ajaxParams){\r\n\t\t\tif(typeof ajaxParams === \"function\"){\r\n\t\t\t\tajaxParams = ajaxParams.call(this.table);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tparams = Object.assign(params, ajaxParams);\r\n\t\t}\t\t\r\n\t\t\r\n\t\treturn params;\r\n\t}\r\n\t\r\n\trequestDataCheck(data, params, config, silent){\r\n\t\treturn !!((!data && this.url) || typeof data === \"string\");\r\n\t}\r\n\t\r\n\trequestData(url, params, config, silent, previousData){\r\n\t\tvar ajaxConfig;\r\n\t\t\r\n\t\tif(!previousData && this.requestDataCheck(url)){\r\n\t\t\tif(url){\r\n\t\t\t\tthis.setUrl(url);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tajaxConfig = this.generateConfig(config);\r\n\t\t\t\r\n\t\t\treturn this.sendRequest(this.url, params, ajaxConfig);\r\n\t\t}else{\r\n\t\t\treturn previousData;\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetDefaultConfig(config = {}){\r\n\t\tthis.config = Object.assign({}, Ajax.defaultConfig);\r\n\r\n\t\tif(typeof config == \"string\"){\r\n\t\t\tthis.config.method = config;\r\n\t\t}else{\r\n\t\t\tObject.assign(this.config, config);\r\n\t\t}\r\n\t}\r\n\t\r\n\t//load config object\r\n\tgenerateConfig(config = {}){\r\n\t\tvar ajaxConfig = Object.assign({}, this.config)\r\n\t\t\r\n\t\tif(typeof config == \"string\"){\r\n\t\t\tajaxConfig.method = config;\r\n\t\t}else{\r\n\t\t\tObject.assign(ajaxConfig, config);\r\n\t\t}\r\n\t\t\r\n\t\treturn ajaxConfig;\r\n\t}\r\n\t\r\n\t//set request url\r\n\tsetUrl(url){\r\n\t\tthis.url = url;\r\n\t}\r\n\t\r\n\t//get request url\r\n\tgetUrl(){\r\n\t\treturn this.url;\r\n\t}\r\n\t\r\n\t//send ajax request\r\n\tsendRequest(url, params, config){\r\n\t\tif(this.table.options.ajaxRequesting.call(this.table, url, params) !== false){\r\n\t\t\treturn this.loaderPromise(url, config, params)\r\n\t\t\t.then((data)=>{\r\n\t\t\t\tif(this.table.options.ajaxResponse){\r\n\t\t\t\t\tdata = this.table.options.ajaxResponse.call(this.table, url, params, data);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn data;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n}\r\n\r\nAjax.moduleName = \"ajax\";\r\n\r\n//load defaults\r\nAjax.defaultConfig = defaultConfig;\r\nAjax.defaultURLGenerator = defaultURLGenerator;\r\nAjax.defaultLoaderPromise = defaultLoaderPromise;\r\nAjax.contentTypeFormatters = defaultContentTypeFormatters;\r\n\r\nexport default Ajax;","export default {\r\n\treplace:function(rows){\r\n\t\treturn this.table.setData(rows);\r\n\t},\r\n\tupdate:function(rows){\r\n\t\treturn this.table.updateOrAddData(rows);\r\n\t},\r\n\tinsert:function(rows){\r\n\t\treturn this.table.addData(rows);\r\n\t},\r\n};","export default {\r\n\ttable:function(clipboard){\r\n\t\tvar data = [],\r\n\t\tsuccess = false,\r\n\t\theaderFindSuccess = true,\r\n\t\tcolumns = this.table.columnManager.columns,\r\n\t\tcolumnMap = [],\r\n\t\trows = [];\r\n\r\n\t\t//get data from clipboard into array of columns and rows.\r\n\t\tclipboard = clipboard.split(\"\\n\");\r\n\r\n\t\tclipboard.forEach(function(row){\r\n\t\t\tdata.push(row.split(\"\\t\"));\r\n\t\t});\r\n\r\n\t\tif(data.length && !(data.length === 1 && data[0].length < 2)){\r\n\t\t\tsuccess = true;\r\n\r\n\t\t\t//check if headers are present by title\r\n\t\t\tdata[0].forEach(function(value){\r\n\t\t\t\tvar column = columns.find(function(column){\r\n\t\t\t\t\treturn value && column.definition.title && value.trim() && column.definition.title.trim() === value.trim();\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tcolumnMap.push(column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\theaderFindSuccess = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t//check if column headers are present by field\r\n\t\t\tif(!headerFindSuccess){\r\n\t\t\t\theaderFindSuccess = true;\r\n\t\t\t\tcolumnMap = [];\r\n\r\n\t\t\t\tdata[0].forEach(function(value){\r\n\t\t\t\t\tvar column = columns.find(function(column){\r\n\t\t\t\t\t\treturn value && column.field && value.trim() && column.field.trim() === value.trim();\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(column){\r\n\t\t\t\t\t\tcolumnMap.push(column);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\theaderFindSuccess = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(!headerFindSuccess){\r\n\t\t\t\t\tcolumnMap = this.table.columnManager.columnsByIndex;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//remove header row if found\r\n\t\t\tif(headerFindSuccess){\r\n\t\t\t\tdata.shift();\r\n\t\t\t}\r\n\r\n\t\t\tdata.forEach(function(item){\r\n\t\t\t\tvar row = {};\r\n\r\n\t\t\t\titem.forEach(function(value, i){\r\n\t\t\t\t\tif(columnMap[i]){\r\n\t\t\t\t\t\trow[columnMap[i].field] = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\trows.push(row);\r\n\t\t\t});\r\n\r\n\t\t\treturn rows;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultPasteActions from './defaults/pasteActions.js';\r\nimport defaultPasteParsers from './defaults/pasteParsers.js';\r\n\r\nclass Clipboard extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.mode = true;\r\n\t\tthis.pasteParser = function(){};\r\n\t\tthis.pasteAction = function(){};\r\n\t\tthis.customSelection = false;\r\n\t\tthis.rowRange = false;\r\n\t\tthis.blocked = true; //block copy actions not originating from this command\r\n\r\n\t\tthis.registerTableOption(\"clipboard\", false); //enable clipboard\r\n\t\tthis.registerTableOption(\"clipboardCopyStyled\", true); //formatted table data\r\n\t\tthis.registerTableOption(\"clipboardCopyConfig\", false); //clipboard config\r\n\t\tthis.registerTableOption(\"clipboardCopyFormatter\", false); //DEPRICATED - REMOVE in 5.0\r\n\t\tthis.registerTableOption(\"clipboardCopyRowRange\", \"active\"); //restrict clipboard to visible rows only\r\n\t\tthis.registerTableOption(\"clipboardPasteParser\", \"table\"); //convert pasted clipboard data to rows\r\n\t\tthis.registerTableOption(\"clipboardPasteAction\", \"insert\"); //how to insert pasted data into the table\r\n\r\n\t\tthis.registerColumnOption(\"clipboard\");\r\n\t\tthis.registerColumnOption(\"titleClipboard\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.mode = this.table.options.clipboard;\r\n\r\n\t\tthis.rowRange = this.table.options.clipboardCopyRowRange;\r\n\r\n\t\tif(this.mode === true || this.mode === \"copy\"){\r\n\t\t\tthis.table.element.addEventListener(\"copy\", (e) => {\r\n\t\t\t\tvar plain, html, list;\r\n\r\n\t\t\t\tif(!this.blocked){\r\n\t\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\t\tif(this.customSelection){\r\n\t\t\t\t\t\tplain = this.customSelection;\r\n\r\n\t\t\t\t\t\tif(this.table.options.clipboardCopyFormatter){\r\n\t\t\t\t\t\t\tplain = this.table.options.clipboardCopyFormatter(\"plain\", plain);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\r\n\t\t\t\t\t\tvar list = this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig, this.table.options.clipboardCopyStyled, this.rowRange, \"clipboard\");\r\n\r\n\t\t\t\t\t\thtml = this.table.modules.export.genereateHTMLTable(list);\r\n\t\t\t\t\t\tplain = html ? this.generatePlainContent(list) : \"\";\r\n\r\n\t\t\t\t\t\tif(this.table.options.clipboardCopyFormatter){\r\n\t\t\t\t\t\t\tplain = this.table.options.clipboardCopyFormatter(\"plain\", plain);\r\n\t\t\t\t\t\t\thtml = this.table.options.clipboardCopyFormatter(\"html\", html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (window.clipboardData && window.clipboardData.setData) {\r\n\t\t\t\t\t\twindow.clipboardData.setData('Text', plain);\r\n\t\t\t\t\t} else if (e.clipboardData && e.clipboardData.setData) {\r\n\t\t\t\t\t\te.clipboardData.setData('text/plain', plain);\r\n\t\t\t\t\t\tif(html){\r\n\t\t\t\t\t\t\te.clipboardData.setData('text/html', html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (e.originalEvent && e.originalEvent.clipboardData.setData) {\r\n\t\t\t\t\t\te.originalEvent.clipboardData.setData('text/plain', plain);\r\n\t\t\t\t\t\tif(html){\r\n\t\t\t\t\t\t\te.originalEvent.clipboardData.setData('text/html', html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.dispatchExternal(\"clipboardCopied\", plain, html);\r\n\r\n\t\t\t\t\tthis.reset();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.mode === true || this.mode === \"paste\"){\r\n\t\t\tthis.table.element.addEventListener(\"paste\", (e) => {\r\n\t\t\t\tthis.paste(e);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.setPasteParser(this.table.options.clipboardPasteParser);\r\n\t\tthis.setPasteAction(this.table.options.clipboardPasteAction);\r\n\r\n\t\tthis.registerTableFunction(\"copyToClipboard\", this.copy.bind(this));\r\n\t}\r\n\r\n\treset(){\r\n\t\tthis.blocked = true;\r\n\t\tthis.customSelection = false;\r\n\t}\r\n\r\n\tgeneratePlainContent (list) {\r\n\t\tvar output = [];\r\n\r\n\t\tlist.forEach((row) => {\r\n\t\t\tvar rowData = [];\r\n\r\n\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\tvar value = \"\";\r\n\r\n\t\t\t\tif(col){\r\n\r\n\t\t\t\t\tif(row.type === \"group\"){\r\n\t\t\t\t\t\tcol.value = col.component.getKey();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(col.value === null){\r\n\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\t\tvalue = JSON.stringify(col.value);\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tvalue = col.value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowData.push(value);\r\n\t\t\t});\r\n\r\n\t\t\toutput.push(rowData.join(\"\\t\"));\r\n\t\t});\r\n\r\n\t\treturn output.join(\"\\n\");\r\n\t}\r\n\r\n\tcopy (range, internal) {\r\n\t\tvar range, sel, textRange;\r\n\t\tthis.blocked = false;\r\n\t\tthis.customSelection = false;\r\n\r\n\t\tif (this.mode === true || this.mode === \"copy\") {\r\n\r\n\t\t\tthis.rowRange = range || this.table.options.clipboardCopyRowRange;\r\n\r\n\t\t\tif (typeof window.getSelection != \"undefined\" && typeof document.createRange != \"undefined\") {\r\n\t\t\t\trange = document.createRange();\r\n\t\t\t\trange.selectNodeContents(this.table.element);\r\n\t\t\t\tsel = window.getSelection();\r\n\r\n\t\t\t\tif (sel.toString() && internal) {\r\n\t\t\t\t\tthis.customSelection = sel.toString();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsel.removeAllRanges();\r\n\t\t\t\tsel.addRange(range);\r\n\t\t\t} else if (typeof document.selection != \"undefined\" && typeof document.body.createTextRange != \"undefined\") {\r\n\t\t\t\ttextRange = document.body.createTextRange();\r\n\t\t\t\ttextRange.moveToElementText(this.table.element);\r\n\t\t\t\ttextRange.select();\r\n\t\t\t}\r\n\r\n\t\t\tdocument.execCommand('copy');\r\n\r\n\t\t\tif (sel) {\r\n\t\t\t\tsel.removeAllRanges();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//PASTE EVENT HANDLING\r\n\tsetPasteAction(action){\r\n\r\n\t\tswitch(typeof action){\r\n\t\t\tcase \"string\":\r\n\t\t\tthis.pasteAction = Clipboard.pasteActions[action];\r\n\r\n\t\t\tif(!this.pasteAction){\r\n\t\t\t\tconsole.warn(\"Clipboard Error - No such paste action found:\", action);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tthis.pasteAction = action;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tsetPasteParser(parser){\r\n\t\tswitch(typeof parser){\r\n\t\t\tcase \"string\":\r\n\t\t\tthis.pasteParser = Clipboard.pasteParsers[parser];\r\n\r\n\t\t\tif(!this.pasteParser){\r\n\t\t\t\tconsole.warn(\"Clipboard Error - No such paste parser found:\", parser);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tthis.pasteParser = parser;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tpaste(e){\r\n\t\tvar data, rowData, rows;\r\n\r\n\t\tif(this.checkPaseOrigin(e)){\r\n\r\n\t\t\tdata = this.getPasteData(e);\r\n\r\n\t\t\trowData = this.pasteParser.call(this, data);\r\n\r\n\t\t\tif(rowData){\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\t\t\trowData = this.mutateData(rowData);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trows = this.pasteAction.call(this, rowData);\r\n\r\n\t\t\t\tthis.dispatchExternal(\"clipboardPasted\", data, rowData, rows);\r\n\t\t\t}else{\r\n\t\t\t\tthis.dispatchExternal(\"clipboardPasteError\", data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmutateData(data){\r\n\t\tvar output = [];\r\n\r\n\t\tif(Array.isArray(data)){\r\n\t\t\tdata.forEach((row) => {\r\n\t\t\t\toutput.push(this.table.modules.mutator.transformRow(row, \"clipboard\"));\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\toutput = data;\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\r\n\tcheckPaseOrigin(e){\r\n\t\tvar valid = true;\r\n\r\n\t\tif(e.target.tagName != \"DIV\" || this.table.modules.edit.currentCell){\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\r\n\t\treturn valid;\r\n\t}\r\n\r\n\tgetPasteData(e){\r\n\t\tvar data;\r\n\r\n\t\tif (window.clipboardData && window.clipboardData.getData) {\r\n\t\t\tdata = window.clipboardData.getData('Text');\r\n\t\t} else if (e.clipboardData && e.clipboardData.getData) {\r\n\t\t\tdata = e.clipboardData.getData('text/plain');\r\n\t\t} else if (e.originalEvent && e.originalEvent.clipboardData.getData) {\r\n\t\t\tdata = e.originalEvent.clipboardData.getData('text/plain');\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n}\r\n\r\nClipboard.moduleName = \"clipboard\";\r\n\r\n//load defaults\r\nClipboard.pasteActions = defaultPasteActions;\r\nClipboard.pasteParsers = defaultPasteParsers;\r\n\r\nexport default Clipboard;","class CalcComponent{\r\n\tconstructor (row){\r\n\t\tthis._row = row;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._row.table.componentFunctionBinder.handle(\"row\", target._row, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\treturn this._row.getData(transform);\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._row.getElement();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._row.table;\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._row.getCells().forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar cell = this._row.getCell(column);\r\n\t\treturn cell ? cell.getComponent() : false;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._row;\r\n\t}\r\n}\r\n\r\nexport default CalcComponent;","export default {\r\n\t\"avg\":function(values, data, calcParams){\r\n\t\tvar output = 0,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : 2\r\n\r\n\t\tif(values.length){\r\n\t\t\toutput = values.reduce(function(sum, value){\r\n\t\t\t\treturn Number(sum) + Number(value);\r\n\t\t\t});\r\n\r\n\t\t\toutput = output / values.length;\r\n\r\n\t\t\toutput = precision !== false ? output.toFixed(precision) : output;\r\n\t\t}\r\n\r\n\t\treturn parseFloat(output).toString();\r\n\t},\r\n\t\"max\":function(values, data, calcParams){\r\n\t\tvar output = null,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tvalues.forEach(function(value){\r\n\r\n\t\t\tvalue = Number(value);\r\n\r\n\t\t\tif(value > output || output === null){\r\n\t\t\t\toutput = value;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output !== null ? (precision !== false ? output.toFixed(precision) : output) : \"\";\r\n\t},\r\n\t\"min\":function(values, data, calcParams){\r\n\t\tvar output = null,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tvalues.forEach(function(value){\r\n\r\n\t\t\tvalue = Number(value);\r\n\r\n\t\t\tif(value < output || output === null){\r\n\t\t\t\toutput = value;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output !== null ? (precision !== false ? output.toFixed(precision) : output) : \"\";\r\n\t},\r\n\t\"sum\":function(values, data, calcParams){\r\n\t\tvar output = 0,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tif(values.length){\r\n\t\t\tvalues.forEach(function(value){\r\n\t\t\t\tvalue = Number(value);\r\n\r\n\t\t\t\toutput += !isNaN(value) ? Number(value) : 0;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn precision !== false ? output.toFixed(precision) : output;\r\n\t},\r\n\t\"concat\":function(values, data, calcParams){\r\n\t\tvar output = 0;\r\n\r\n\t\tif(values.length){\r\n\t\t\toutput = values.reduce(function(sum, value){\r\n\t\t\t\treturn String(sum) + String(value);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t},\r\n\t\"count\":function(values, data, calcParams){\r\n\t\tvar output = 0;\r\n\r\n\t\tif(values.length){\r\n\t\t\tvalues.forEach(function(value){\r\n\t\t\t\tif(value){\r\n\t\t\t\t\toutput ++;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport CalcComponent from './CalcComponent.js';\r\n\r\nimport Cell from '../../core/cell/Cell.js';\r\nimport Column from '../../core/column/Column.js';\r\nimport Row from '../../core/row/Row.js';\r\n\r\nimport defaultCalculations from './defaults/calculations.js';\r\n\r\nclass ColumnCalcs extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.topCalcs = [];\r\n\t\tthis.botCalcs = [];\r\n\t\tthis.genColumn = false;\r\n\t\tthis.topElement = this.createElement();\r\n\t\tthis.botElement = this.createElement();\r\n\t\tthis.topRow = false;\r\n\t\tthis.botRow = false;\r\n\t\tthis.topInitialized = false;\r\n\t\tthis.botInitialized = false;\r\n\r\n\t\tthis.registerTableOption(\"columnCalcs\", true);\r\n\r\n\t\tthis.registerColumnOption(\"topCalc\");\r\n\t\tthis.registerColumnOption(\"topCalcParams\");\r\n\t\tthis.registerColumnOption(\"topCalcFormatter\");\r\n\t\tthis.registerColumnOption(\"topCalcFormatterParams\");\r\n\t\tthis.registerColumnOption(\"bottomCalc\");\r\n\t\tthis.registerColumnOption(\"bottomCalcParams\");\r\n\t\tthis.registerColumnOption(\"bottomCalcFormatter\");\r\n\t\tthis.registerColumnOption(\"bottomCalcFormatterParams\");\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-calcs-holder\");\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.genColumn = new Column({field:\"value\"}, this);\r\n\r\n\t\tthis.subscribe(\"cell-value-changed\", this.cellValueChanged.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumnCheck.bind(this));\r\n\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t\tthis.subscribe(\"row-added\", this.rowsUpdated.bind(this));\r\n\t\tthis.subscribe(\"column-moved\", this.recalcActiveRows.bind(this));\r\n\t\tthis.subscribe(\"column-add\", this.recalcActiveRows.bind(this));\r\n\t\tthis.subscribe(\"data-refreshed\", this.recalcActiveRowsRefresh.bind(this));\r\n\t\tthis.subscribe(\"table-redraw\", this.tableRedraw.bind(this));\r\n\t\tthis.subscribe(\"rows-visible\", this.visibleRows.bind(this));\r\n\r\n\t\tthis.registerTableFunction(\"getCalcResults\", this.getResults.bind(this));\r\n\t\tthis.registerTableFunction(\"recalc\", this.userRecalc.bind(this));\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\r\n\t\tif(force){\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\tuserRecalc(){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tvisibleRows(viewable, rows){\r\n\t\tif(this.topRow){\r\n\t\t\trows.unshift(this.topRow);\r\n\t\t}\r\n\r\n\t\tif(this.botRow){\r\n\t\t\trows.push(this.botRow);\r\n\t\t}\r\n\t\r\n\t\treturn rows;\r\n\t}\r\n\r\n\trowsUpdated(row){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.recalcRowGroup(this);\r\n\t\t}else{\r\n\t\t\tthis.recalcActiveRows();\r\n\t\t}\r\n\t}\r\n\r\n\trecalcActiveRowsRefresh(){\r\n\t\tif(this.table.options.groupBy && this.table.options.dataTreeStartExpanded && this.table.options.dataTree){\r\n\t\t\tthis.recalcAll();\r\n\t\t}else{\r\n\t\t\tthis.recalcActiveRows();\r\n\t\t}\r\n\t}\r\n\r\n\trecalcActiveRows(){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t}\r\n\r\n\tcellValueChanged(cell){\r\n\t\tif(cell.column.definition.topCalc || cell.column.definition.bottomCalc){\r\n\t\t\tif(this.table.options.groupBy){\r\n\t\t\t\tif(this.table.options.columnCalcs == \"table\" || this.table.options.columnCalcs == \"both\"){\r\n\t\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"table\"){\r\n\t\t\t\t\tthis.recalcRowGroup(cell.row);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(column.definition.topCalc || column.definition.bottomCalc){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column calcs\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition\r\n\r\n\t\tvar config = {\r\n\t\t\ttopCalcParams:def.topCalcParams || {},\r\n\t\t\tbotCalcParams:def.bottomCalcParams || {},\r\n\t\t};\r\n\r\n\t\tif(def.topCalc){\r\n\r\n\t\t\tswitch(typeof def.topCalc){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(ColumnCalcs.calculations[def.topCalc]){\r\n\t\t\t\t\tconfig.topCalc = ColumnCalcs.calculations[def.topCalc]\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.topCalc);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tconfig.topCalc = def.topCalc;\r\n\t\t\t\tbreak\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(config.topCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.topCalcs.push(column);\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"group\"){\r\n\t\t\t\t\tthis.initializeTopRow();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tif(def.bottomCalc){\r\n\t\t\tswitch(typeof def.bottomCalc){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(ColumnCalcs.calculations[def.bottomCalc]){\r\n\t\t\t\t\tconfig.botCalc = ColumnCalcs.calculations[def.bottomCalc]\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.bottomCalc);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tconfig.botCalc = def.bottomCalc;\r\n\t\t\t\tbreak\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(config.botCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.botCalcs.push(column);\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"group\"){\r\n\t\t\t\t\tthis.initializeBottomRow();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t//dummy functions to handle being mock column manager\r\n\tregisterColumnField(){};\r\n\r\n\tremoveCalcs(){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(this.topInitialized){\r\n\t\t\tthis.topInitialized = false;\r\n\t\t\tthis.topElement.parentNode.removeChild(this.topElement);\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\r\n\t\tif(this.botInitialized){\r\n\t\t\tthis.botInitialized = false;\r\n\t\t\tthis.table.footerManager.remove(this.botElement);\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeTopRow(){\r\n\t\tif(!this.topInitialized){\r\n\t\t\tthis.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\r\n\t\t\tthis.topInitialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeBottomRow(){\r\n\t\tif(!this.botInitialized){\r\n\t\t\tthis.table.footerManager.prepend(this.botElement);\r\n\t\t\tthis.botInitialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tscrollHorizontal(left){\r\n\t\tif(this.botInitialized && this.botRow){\r\n\t\t\tthis.botRow.getElement().style.marginLeft = (-left) + \"px\";\r\n\t\t}\r\n\t}\r\n\r\n\trecalc(rows){\r\n\t\tvar data, row;\r\n\r\n\t\tif(this.topInitialized || this.botInitialized){\r\n\t\t\tdata = this.rowsToData(rows);\r\n\r\n\t\t\tif(this.topInitialized){\r\n\t\t\t\tif(this.topRow){\r\n\t\t\t\t\tthis.topRow.deleteCells();\r\n\t\t\t\t}\r\n\r\n\t\t\t\trow = this.generateRow(\"top\", this.rowsToData(rows))\r\n\t\t\t\tthis.topRow = row;\r\n\t\t\t\twhile(this.topElement.firstChild) this.topElement.removeChild(this.topElement.firstChild);\r\n\t\t\t\tthis.topElement.appendChild(row.getElement());\r\n\t\t\t\trow.initialize(true);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.botInitialized){\r\n\t\t\t\tif(this.botRow){\r\n\t\t\t\t\tthis.botRow.deleteCells();\r\n\t\t\t\t}\r\n\r\n\t\t\t\trow = this.generateRow(\"bottom\", this.rowsToData(rows))\r\n\t\t\t\tthis.botRow = row;\r\n\t\t\t\twhile(this.botElement.firstChild) this.botElement.removeChild(this.botElement.firstChild);\r\n\t\t\t\tthis.botElement.appendChild(row.getElement());\r\n\t\t\t\trow.initialize(true);\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\t//set resizable handles\r\n\t\t\tif(this.table.modExists(\"frozenColumns\")){\r\n\t\t\t\tthis.table.modules.frozenColumns.layout();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trecalcRowGroup(row){\r\n\t\tthis.recalcGroup(this.table.modules.groupRows.getRowGroup(row));\r\n\t}\r\n\r\n\trecalcAll(){\r\n\t\tif(this.topCalcs.length || this.botCalcs.length){\r\n\t\t\tif(this.table.options.columnCalcs !== \"group\"){\r\n\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.groupBy && this.table.options.columnCalcs !== \"table\"){\r\n\r\n\t\t\t\tvar groups = this.table.modules.groupRows.getChildGroups();\r\n\r\n\t\t\t\tgroups.forEach((group) => {\r\n\t\t\t\t\tthis.recalcGroup(group);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trecalcGroup(group){\r\n\t\tvar data, rowData;\r\n\r\n\t\tif(group){\r\n\t\t\tif(group.calcs){\r\n\t\t\t\tif(group.calcs.bottom){\r\n\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\trowData = this.generateRowData(\"bottom\", data);\r\n\r\n\t\t\t\t\tgroup.calcs.bottom.updateData(rowData);\r\n\t\t\t\t\tgroup.calcs.bottom.reinitialize();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(group.calcs.top){\r\n\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\trowData = this.generateRowData(\"top\", data);\r\n\r\n\t\t\t\t\tgroup.calcs.top.updateData(rowData);\r\n\t\t\t\t\tgroup.calcs.top.reinitialize();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//generate top stats row\r\n\tgenerateTopRow(rows){\r\n\t\treturn this.generateRow(\"top\", this.rowsToData(rows));\r\n\t}\r\n\t//generate bottom stats row\r\n\tgenerateBottomRow(rows){\r\n\t\treturn this.generateRow(\"bottom\", this.rowsToData(rows));\r\n\t}\r\n\r\n\trowsToData(rows){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\trows.forEach((row) => {\r\n\t\t\tdata.push(row.getData());\r\n\r\n\t\t\tif(this.table.options.dataTree && this.table.options.dataTreeChildColumnCalcs){\r\n\t\t\t\tif(row.modules.dataTree && row.modules.dataTree.open){\r\n\t\t\t\t\tvar children = this.rowsToData(this.table.modules.dataTree.getFilteredTreeChildren(row));\r\n\t\t\t\t\tdata = data.concat(children);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//generate stats row\r\n\tgenerateRow(pos, data){\r\n\t\tvar rowData = this.generateRowData(pos, data),\r\n\t\trow;\r\n\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.disable();\r\n\t\t}\r\n\r\n\t\trow = new Row(rowData, this, \"calc\");\r\n\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.enable();\r\n\t\t}\r\n\r\n\t\trow.getElement().classList.add(\"tabulator-calcs\", \"tabulator-calcs-\" + pos);\r\n\r\n\t\trow.component = false;\r\n\r\n\t\trow.getComponent = () => {\r\n\t\t\tif(!row.component){\r\n\t\t\t\trow.component = new CalcComponent(row);\r\n\t\t\t}\r\n\r\n\t\t\treturn row.component;\r\n\t\t};\r\n\r\n\t\trow.generateCells = () => {\r\n\r\n\t\t\tvar cells = [];\r\n\r\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\r\n\t\t\t\t\t//set field name of mock column\r\n\t\t\t\t\tthis.genColumn.setField(column.getField());\r\n\t\t\t\t\tthis.genColumn.hozAlign = column.hozAlign;\r\n\r\n\t\t\t\t\tif(column.definition[pos + \"CalcFormatter\"] && this.table.modExists(\"format\")){\r\n\t\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(column.definition[pos + \"CalcFormatter\"]),\r\n\t\t\t\t\t\t\tparams: column.definition[pos + \"CalcFormatterParams\"] || {},\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(\"plaintext\"),\r\n\t\t\t\t\t\t\tparams:{}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//ensure css class defintion is replicated to calculation cell\r\n\t\t\t\t\tthis.genColumn.definition.cssClass = column.definition.cssClass;\r\n\r\n\t\t\t\t\t//generate cell and assign to correct column\r\n\t\t\t\t\tvar cell = new Cell(this.genColumn, row);\r\n\t\t\t\t\tcell.getElement();\r\n\t\t\t\t\tcell.column = column;\r\n\t\t\t\t\tcell.setWidth();\r\n\r\n\t\t\t\t\tcolumn.cells.push(cell);\r\n\t\t\t\t\tcells.push(cell);\r\n\r\n\t\t\t\t\tif(!column.visible){\r\n\t\t\t\t\t\tcell.hide();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\trow.cells = cells;\r\n\t\t};\r\n\r\n\t\treturn row;\r\n\t}\r\n\r\n\t//generate stats row\r\n\tgenerateRowData(pos, data){\r\n\t\tvar rowData = {},\r\n\t\tcalcs = pos == \"top\" ? this.topCalcs : this.botCalcs,\r\n\t\ttype = pos == \"top\" ? \"topCalc\" : \"botCalc\",\r\n\t\tparams, paramKey;\r\n\r\n\t\tcalcs.forEach(function(column){\r\n\t\t\tvar values = [];\r\n\r\n\t\t\tif(column.modules.columnCalcs && column.modules.columnCalcs[type]){\r\n\t\t\t\tdata.forEach(function(item){\r\n\t\t\t\t\tvalues.push(column.getFieldValue(item));\r\n\t\t\t\t});\r\n\r\n\t\t\t\tparamKey = type + \"Params\";\r\n\t\t\t\tparams = typeof column.modules.columnCalcs[paramKey] === \"function\" ? column.modules.columnCalcs[paramKey](values, data) : column.modules.columnCalcs[paramKey];\r\n\r\n\t\t\t\tcolumn.setFieldValue(rowData, column.modules.columnCalcs[type](values, data, params));\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowData;\r\n\t}\r\n\r\n\thasTopCalcs(){\r\n\t\treturn\t!!(this.topCalcs.length);\r\n\t}\r\n\r\n\thasBottomCalcs(){\r\n\t\treturn\t!!(this.botCalcs.length);\r\n\t}\r\n\r\n\t//handle table redraw\r\n\tredraw(){\r\n\t\tif(this.topRow){\r\n\t\t\tthis.topRow.normalizeHeight(true);\r\n\t\t}\r\n\t\tif(this.botRow){\r\n\t\t\tthis.botRow.normalizeHeight(true);\r\n\t\t}\r\n\t}\r\n\r\n\t//return the calculated\r\n\tgetResults(){\r\n\t\tvar results = {},\r\n\t\tgroups;\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tgroups = this.table.modules.groupRows.getGroups(true);\r\n\r\n\t\t\tgroups.forEach((group) => {\r\n\t\t\t\tresults[group.getKey()] = this.getGroupResults(group);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tresults = {\r\n\t\t\t\ttop: this.topRow ? this.topRow.getData() : {},\r\n\t\t\t\tbottom: this.botRow ? this.botRow.getData() : {},\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n\r\n\t//get results from a group\r\n\tgetGroupResults(group){\r\n\t\tvar groupObj = group._getSelf(),\r\n\t\tsubGroups = group.getSubGroups(),\r\n\t\tsubGroupResults = {},\r\n\t\tresults = {};\r\n\r\n\t\tsubGroups.forEach((subgroup) => {\r\n\t\t\tsubGroupResults[subgroup.getKey()] = this.getGroupResults(subgroup);\r\n\t\t});\r\n\r\n\t\tresults = {\r\n\t\t\ttop: groupObj.calcs.top ? groupObj.calcs.top.getData() : {},\r\n\t\t\tbottom: groupObj.calcs.bottom ? groupObj.calcs.bottom.getData() : {},\r\n\t\t\tgroups: subGroupResults,\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n}\r\n\r\nColumnCalcs.moduleName = \"columnCalcs\";\r\n\r\n//load defaults\r\nColumnCalcs.calculations = defaultCalculations;\r\n\r\nexport default ColumnCalcs;","import Module from '../../core/Module.js';\r\n\r\nimport Row from '../../core/row/Row.js';\r\n\r\nclass DataTree extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.indent = 10;\r\n\t\tthis.field = \"\";\r\n\t\tthis.collapseEl = null;\r\n\t\tthis.expandEl = null;\r\n\t\tthis.branchEl = null;\r\n\t\tthis.elementField = false;\r\n\r\n\t\tthis.startOpen = function(){};\r\n\r\n\t\tthis.displayIndex = 0;\r\n\r\n\t\tthis.registerTableOption(\"dataTree\", false); //enable data tree\r\n\t\tthis.registerTableOption(\"dataTreeFilter\", true); //filter child rows\r\n\t\tthis.registerTableOption(\"dataTreeSort\", true); //sort child rows\r\n\t\tthis.registerTableOption(\"dataTreeElementColumn\", false);\r\n\t\tthis.registerTableOption(\"dataTreeBranchElement\", true);//show data tree branch element\r\n\t\tthis.registerTableOption(\"dataTreeChildIndent\", 9); //data tree child indent in px\r\n\t\tthis.registerTableOption(\"dataTreeChildField\", \"_children\");//data tre column field to look for child rows\r\n\t\tthis.registerTableOption(\"dataTreeCollapseElement\", false);//data tree row collapse element\r\n\t\tthis.registerTableOption(\"dataTreeExpandElement\", false);//data tree row expand element\r\n\t\tthis.registerTableOption(\"dataTreeStartExpanded\", false);\r\n\t\tthis.registerTableOption(\"dataTreeChildColumnCalcs\", false);//include visible data tree rows in column calculations\r\n\t\tthis.registerTableOption(\"dataTreeSelectPropagate\", false);//seleccting a parent row selects its children\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"treeCollapse\", this.collapseRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"treeExpand\", this.expandRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"treeToggle\", this.toggleRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"getTreeParent\", this.getTreeParent.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"getTreeChildren\", this.getRowChildren.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"addTreeChild\", this.addTreeChildRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isTreeExpanded\", this.isRowExpanded.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.dataTree){\r\n\t\t\tvar dummyEl = null,\r\n\t\t\toptions = this.table.options;\r\n\r\n\t\t\tthis.field = options.dataTreeChildField;\r\n\t\t\tthis.indent = options.dataTreeChildIndent;\r\n\r\n\t\t\tif(options.dataTreeBranchElement){\r\n\r\n\t\t\t\tif(options.dataTreeBranchElement === true){\r\n\t\t\t\t\tthis.branchEl = document.createElement(\"div\");\r\n\t\t\t\t\tthis.branchEl.classList.add(\"tabulator-data-tree-branch\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(typeof options.dataTreeBranchElement === \"string\"){\r\n\t\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\t\tdummyEl.innerHTML = options.dataTreeBranchElement;\r\n\t\t\t\t\t\tthis.branchEl = dummyEl.firstChild;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.branchEl = options.dataTreeBranchElement;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(options.dataTreeCollapseElement){\r\n\t\t\t\tif(typeof options.dataTreeCollapseElement === \"string\"){\r\n\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\tdummyEl.innerHTML = options.dataTreeCollapseElement;\r\n\t\t\t\t\tthis.collapseEl = dummyEl.firstChild;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.collapseEl = options.dataTreeCollapseElement;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.collapseEl = document.createElement(\"div\");\r\n\t\t\t\tthis.collapseEl.classList.add(\"tabulator-data-tree-control\");\r\n\t\t\t\tthis.collapseEl.tabIndex = 0;\r\n\t\t\t\tthis.collapseEl.innerHTML = \"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif(options.dataTreeExpandElement){\r\n\t\t\t\tif(typeof options.dataTreeExpandElement === \"string\"){\r\n\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\tdummyEl.innerHTML = options.dataTreeExpandElement;\r\n\t\t\t\t\tthis.expandEl = dummyEl.firstChild;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.expandEl = options.dataTreeExpandElement;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.expandEl = document.createElement(\"div\");\r\n\t\t\t\tthis.expandEl.classList.add(\"tabulator-data-tree-control\");\r\n\t\t\t\tthis.expandEl.tabIndex = 0;\r\n\t\t\t\tthis.expandEl.innerHTML = \"
\";\r\n\t\t\t}\r\n\r\n\r\n\t\t\tswitch(typeof options.dataTreeStartExpanded){\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\treturn options.dataTreeStartExpanded;\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tthis.startOpen = options.dataTreeStartExpanded;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\treturn options.dataTreeStartExpanded[index];\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-layout-after\", this.layoutRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowDelete.bind(this),0);\r\n\t\t\tthis.subscribe(\"row-data-changed\", this.rowDataChanged.bind(this), 10);\r\n\t\t\tthis.subscribe(\"cell-value-updated\", this.cellValueChanged.bind(this));\r\n\t\t\tthis.subscribe(\"edit-cancelled\", this.cellValueChanged.bind(this));\r\n\t\t\tthis.subscribe(\"column-moving-rows\", this.columnMoving.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.initializeElementField.bind(this));\r\n\r\n\t\t\tthis.registerDisplayHandler(this.getRows.bind(this), 30);\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeElementField(){\r\n\t\tvar firstCol = this.table.columnManager.getFirstVisibleColumn();\r\n\r\n\t\tthis.elementField = this.table.options.dataTreeElementColumn || (firstCol ? firstCol.field : false);\r\n\t}\r\n\t\r\n\tgetRowChildren(row){\r\n\t\treturn this.getTreeChildren(row, true);\r\n\t}\r\n\r\n\tcolumnMoving(){\r\n\t\tvar rows = [];\r\n\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\trows = rows.concat(this.getTreeChildren(row, false, true));\r\n\t\t});\r\n\r\n\t\treturn rows;\r\n\t}\r\n\r\n\trowDataChanged(row, visible, updatedData){\r\n\t\tif(this.redrawNeeded(updatedData)){\r\n\t\t\tthis.initializeRow(row);\r\n\r\n\t\t\tif(visible){\r\n\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tcellValueChanged(cell){\r\n\t\tvar field = cell.column.getField();\r\n\r\n\t\tif(field === this.elementField){\r\n\t\t\tthis.layoutRow(cell.row);\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar childArray = row.getData()[this.field];\r\n\t\tvar isArray = Array.isArray(childArray);\r\n\r\n\t\tvar children = isArray || (!isArray && typeof childArray === \"object\" && childArray !== null);\r\n\r\n\t\tif(!children && row.modules.dataTree && row.modules.dataTree.branchEl){\r\n\t\t\trow.modules.dataTree.branchEl.parentNode.removeChild(row.modules.dataTree.branchEl);\r\n\t\t}\r\n\r\n\t\tif(!children && row.modules.dataTree && row.modules.dataTree.controlEl){\r\n\t\t\trow.modules.dataTree.controlEl.parentNode.removeChild(row.modules.dataTree.controlEl);\r\n\t\t}\r\n\r\n\t\trow.modules.dataTree = {\r\n\t\t\tindex: row.modules.dataTree ? row.modules.dataTree.index : 0,\r\n\t\t\topen: children ? (row.modules.dataTree ? row.modules.dataTree.open : this.startOpen(row.getComponent(), 0)) : false,\r\n\t\t\tcontrolEl: row.modules.dataTree && children ? row.modules.dataTree.controlEl : false,\r\n\t\t\tbranchEl: row.modules.dataTree && children ? row.modules.dataTree.branchEl : false,\r\n\t\t\tparent: row.modules.dataTree ? row.modules.dataTree.parent : false,\r\n\t\t\tchildren:children,\r\n\t\t};\r\n\t}\r\n\r\n\treinitializeRowChildren(row){\r\n\t\tvar children = this.getTreeChildren(row, false, true);\r\n\r\n\t\tchildren.forEach(function(child){\r\n\t\t\tchild.reinitialize(true);\r\n\t\t});\r\n\t}\r\n\r\n\tlayoutRow(row){\r\n\t\tvar cell = this.elementField ? row.getCell(this.elementField) : row.getCells()[0],\r\n\t\tel = cell.getElement(),\r\n\t\tconfig = row.modules.dataTree;\r\n\r\n\t\tif(config.branchEl){\r\n\t\t\tif(config.branchEl.parentNode){\r\n\t\t\t\tconfig.branchEl.parentNode.removeChild(config.branchEl);\r\n\t\t\t}\r\n\t\t\tconfig.branchEl = false;\r\n\t\t}\r\n\r\n\t\tif(config.controlEl){\r\n\t\t\tif(config.controlEl.parentNode){\r\n\t\t\t\tconfig.controlEl.parentNode.removeChild(config.controlEl);\r\n\t\t\t}\r\n\t\t\tconfig.controlEl = false;\r\n\t\t}\r\n\r\n\t\tthis.generateControlElement(row, el);\r\n\r\n\t\trow.getElement().classList.add(\"tabulator-tree-level-\" + config.index);\r\n\r\n\t\tif(config.index){\r\n\t\t\tif(this.branchEl){\r\n\t\t\t\tconfig.branchEl = this.branchEl.cloneNode(true);\r\n\t\t\t\tel.insertBefore(config.branchEl, el.firstChild);\r\n\r\n\t\t\t\tif(this.table.rtl){\r\n\t\t\t\t\tconfig.branchEl.style.marginRight = (((config.branchEl.offsetWidth + config.branchEl.style.marginLeft) * (config.index - 1)) + (config.index * this.indent)) + \"px\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.branchEl.style.marginLeft = (((config.branchEl.offsetWidth + config.branchEl.style.marginRight) * (config.index - 1)) + (config.index * this.indent)) + \"px\";\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\r\n\t\t\t\tif(this.table.rtl){\r\n\t\t\t\t\tel.style.paddingRight = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-right')) + (config.index * this.indent) + \"px\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.style.paddingLeft = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-left')) + (config.index * this.indent) + \"px\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateControlElement(row, el){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\tel = el || row.getCells()[0].getElement(),\r\n\t\toldControl = config.controlEl;\r\n\r\n\t\tif(config.children !== false){\r\n\r\n\t\t\tif(config.open){\r\n\t\t\t\tconfig.controlEl = this.collapseEl.cloneNode(true);\r\n\t\t\t\tconfig.controlEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tthis.collapseRow(row);\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconfig.controlEl = this.expandEl.cloneNode(true);\r\n\t\t\t\tconfig.controlEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tthis.expandRow(row);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tconfig.controlEl.addEventListener(\"mousedown\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\r\n\t\t\tif(oldControl && oldControl.parentNode === el){\r\n\t\t\t\toldControl.parentNode.replaceChild(config.controlEl,oldControl);\r\n\t\t\t}else{\r\n\t\t\t\tel.insertBefore(config.controlEl, el.firstChild);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tsetDisplayIndex (index) {\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\r\n\tgetDisplayIndex () {\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\r\n\tgetRows(rows){\r\n\t\tvar output = [];\r\n\r\n\t\trows.forEach((row, i) => {\r\n\t\t\tvar config, children;\r\n\r\n\t\t\toutput.push(row);\r\n\r\n\t\t\tif(row instanceof Row){\r\n\r\n\t\t\t\trow.create();\r\n\r\n\t\t\t\tconfig = row.modules.dataTree.children;\r\n\r\n\t\t\t\tif(!config.index && config.children !== false){\r\n\t\t\t\t\tchildren = this.getChildren(row);\r\n\r\n\t\t\t\t\tchildren.forEach((child) => {\r\n\t\t\t\t\t\tchild.create();\r\n\t\t\t\t\t\toutput.push(child);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetChildren(row, allChildren){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\tchildren = [],\r\n\t\toutput = [];\r\n\r\n\t\tif(config.children !== false && (config.open || allChildren)){\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"filter\") && this.table.options.dataTreeFilter){\r\n\t\t\t\tchildren = this.table.modules.filter.filter(config.children);\r\n\t\t\t}else{\r\n\t\t\t\tchildren = config.children;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"sort\") && this.table.options.dataTreeSort){\r\n\t\t\t\tthis.table.modules.sort.sort(children);\r\n\t\t\t}\r\n\r\n\t\t\tchildren.forEach((child) => {\r\n\t\t\t\toutput.push(child);\r\n\r\n\t\t\t\tvar subChildren = this.getChildren(child);\r\n\r\n\t\t\t\tsubChildren.forEach((sub) => {\r\n\t\t\t\t\toutput.push(sub);\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgenerateChildren(row){\r\n\t\tvar children = [];\r\n\r\n\t\tvar childArray = row.getData()[this.field];\r\n\r\n\t\tif(!Array.isArray(childArray)){\r\n\t\t\tchildArray = [childArray];\r\n\t\t}\r\n\r\n\t\tchildArray.forEach((childData) => {\r\n\t\t\tvar childRow = new Row(childData || {}, this.table.rowManager);\r\n\r\n\t\t\tchildRow.create();\r\n\r\n\t\t\tchildRow.modules.dataTree.index = row.modules.dataTree.index + 1;\r\n\t\t\tchildRow.modules.dataTree.parent = row;\r\n\r\n\t\t\tif(childRow.modules.dataTree.children){\r\n\t\t\t\tchildRow.modules.dataTree.open = this.startOpen(childRow.getComponent(), childRow.modules.dataTree.index);\r\n\t\t\t}\r\n\t\t\tchildren.push(childRow);\r\n\t\t});\r\n\r\n\t\treturn children;\r\n\t}\r\n\r\n\texpandRow(row, silent){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tconfig.open = true;\r\n\r\n\t\t\trow.reinitialize();\r\n\r\n\t\t\tthis.refreshData(true);\r\n\r\n\t\t\tthis.dispatchExternal(\"dataTreeRowExpanded\", row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\t}\r\n\r\n\tcollapseRow(row){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tconfig.open = false;\r\n\r\n\t\t\trow.reinitialize();\r\n\r\n\t\t\tthis.refreshData(true);\r\n\r\n\t\t\tthis.dispatchExternal(\"dataTreeRowCollapsed\", row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\t}\r\n\r\n\ttoggleRow(row){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tif(config.open){\r\n\t\t\t\tthis.collapseRow(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.expandRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tisRowExpanded(row){\r\n\t\treturn row.modules.dataTree.open;\r\n\t}\r\n\r\n\tgetTreeParent(row){\r\n\t\treturn row.modules.dataTree.parent ? row.modules.dataTree.parent.getComponent() : false;\r\n\t}\r\n\r\n\tgetFilteredTreeChildren(row){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\toutput = [], children;\r\n\r\n\t\tif(config.children){\r\n\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"filter\") && this.table.options.dataTreeFilter){\r\n\t\t\t\tchildren = this.table.modules.filter.filter(config.children);\r\n\t\t\t}else{\r\n\t\t\t\tchildren = config.children;\r\n\t\t\t}\r\n\r\n\t\t\tchildren.forEach((childRow) => {\r\n\t\t\t\tif(childRow instanceof Row){\r\n\t\t\t\t\toutput.push(childRow);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\trowDelete(row){\r\n\t\tvar parent = row.modules.dataTree.parent,\r\n\t\tchildIndex;\r\n\r\n\t\tif(parent){\r\n\t\t\tchildIndex = this.findChildIndex(row, parent);\r\n\r\n\t\t\tif(childIndex !== false){\r\n\t\t\t\tparent.data[this.field].splice(childIndex, 1);\r\n\t\t\t}\r\n\r\n\t\t\tif(!parent.data[this.field].length){\r\n\t\t\t\tdelete parent.data[this.field];\r\n\t\t\t}\r\n\r\n\t\t\tthis.initializeRow(parent);\r\n\t\t\tthis.layoutRow(parent);\r\n\t\t}\r\n\r\n\t\tthis.refreshData(true);\r\n\t}\r\n\r\n\taddTreeChildRow(row, data, top, index){\r\n\t\tvar childIndex = false;\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(row.data[this.field])){\r\n\t\t\trow.data[this.field] = [];\r\n\r\n\t\t\trow.modules.dataTree.open = this.startOpen(row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\r\n\t\tif(typeof index !== \"undefined\"){\r\n\t\t\tchildIndex = this.findChildIndex(index, row);\r\n\r\n\t\t\tif(childIndex !== false){\r\n\t\t\t\trow.data[this.field].splice((top ? childIndex : childIndex + 1), 0, data);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(childIndex === false){\r\n\t\t\tif(top){\r\n\t\t\t\trow.data[this.field].unshift(data);\r\n\t\t\t}else{\r\n\t\t\t\trow.data[this.field].push(data);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.initializeRow(row);\r\n\t\tthis.layoutRow(row);\r\n\r\n\t\tthis.refreshData(true);\r\n\t}\r\n\r\n\tfindChildIndex(subject, parent){\r\n\t\tvar match = false;\r\n\r\n\t\tif(typeof subject == \"object\"){\r\n\r\n\t\t\tif(subject instanceof Row){\r\n\t\t\t\t//subject is row element\r\n\t\t\t\tmatch = subject.data;\r\n\t\t\t}else if(subject instanceof RowComponent){\r\n\t\t\t\t//subject is public row component\r\n\t\t\t\tmatch = subject._getSelf().data;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\tif(parent.modules.dataTree){\r\n\t\t\t\t\tmatch = parent.modules.dataTree.children.find((childRow) => {\r\n\t\t\t\t\t\treturn childRow instanceof Row ? childRow.element === subject : false;\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(match){\r\n\t\t\t\t\t\tmatch = match.data;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}else if(typeof subject == \"undefined\" || subject === null){\r\n\t\t\tmatch = false\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the index of the row\r\n\t\t\tmatch = parent.data[this.field].find((row) => {\r\n\t\t\t\treturn row.data[this.table.options.index] == subject;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(match){\r\n\r\n\t\t\tif(Array.isArray(parent.data[this.field])){\r\n\t\t\t\tmatch = parent.data[this.field].indexOf(match);\r\n\t\t\t}\r\n\r\n\t\t\tif(match == -1){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//catch all for any other type of input\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tgetTreeChildren(row, component, recurse){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\toutput = [];\r\n\r\n\t\tif(config.children){\r\n\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tconfig.children.forEach((childRow) => {\r\n\t\t\t\tif(childRow instanceof Row){\r\n\t\t\t\t\toutput.push(component ? childRow.getComponent() : childRow);\r\n\r\n\t\t\t\t\tif(recurse){\r\n\t\t\t\t\t\toutput = output.concat(this.getTreeChildren(childRow, component, recurse));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetChildField(){\r\n\t\treturn this.field;\r\n\t}\r\n\r\n\tredrawNeeded(data){\r\n\t\treturn (this.field ? typeof data[this.field] !== \"undefined\" : false) || (this.elementField ? typeof data[this.elementField] !== \"undefined\" : false);\r\n\t}\r\n}\r\n\r\nDataTree.moduleName = \"dataTree\";\r\n\r\nexport default DataTree;","export default function(list, options, setFileContents){\r\n\tvar delimiter = options && options.delimiter ? options.delimiter : \",\",\r\n\tfileContents = [],\r\n\theaders = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tvar item = [];\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"group\":\r\n\t\t\tconsole.warn(\"Download Warning - CSV downloader cannot process row groups\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tconsole.warn(\"Download Warning - CSV downloader cannot process column calculations\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"header\":\r\n\t\t\trow.columns.forEach((col, i) => {\r\n\t\t\t\tif(col && col.depth === 1){\r\n\t\t\t\t\theaders[i] = typeof col.value == \"undefined\" || col.value === null ? \"\" : ('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\trow.columns.forEach((col) => {\r\n\r\n\t\t\t\tif(col){\r\n\r\n\t\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tcol.value = JSON.stringify(col.value);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\t\tcol.value = \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\titem.push('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tfileContents.push(item.join(delimiter));\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(headers.length){\r\n\t\tfileContents.unshift(headers.join(delimiter));\r\n\t}\r\n\r\n\tfileContents = fileContents.join(\"\\n\");\r\n\r\n\tif(options.bom){\r\n\t\tfileContents = \"\\ufeff\" + fileContents;\r\n\t}\r\n\r\n\tsetFileContents(fileContents, \"text/csv\");\r\n};","export default function(list, options, setFileContents){\r\n\tvar fileContents = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tvar item = {};\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"header\":\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process row groups\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process column calculations\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\tif(col){\r\n\t\t\t\t\titem[col.component.getTitleDownload() || col.component.getField()] = col.value;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tfileContents.push(item);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tfileContents = JSON.stringify(fileContents, null, '\\t');\r\n\r\n\tsetFileContents(fileContents, \"application/json\");\r\n};","export default function(list, options, setFileContents){\r\n\tvar header = [],\r\n\tbody = [],\r\n\tautoTableParams = {},\r\n\trowGroupStyles = options.rowGroupStyles || {\r\n\t\tfontStyle: \"bold\",\r\n\t\tfontSize: 12,\r\n\t\tcellPadding: 6,\r\n\t\tfillColor: 220,\r\n\t},\r\n\trowCalcStyles = options.rowCalcStyles || {\r\n\t\tfontStyle: \"bold\",\r\n\t\tfontSize: 10,\r\n\t\tcellPadding: 4,\r\n\t\tfillColor: 232,\r\n\t},\r\n\tjsPDFParams = options.jsPDF || {},\r\n\ttitle = options && options.title ? options.title : \"\";\r\n\r\n\tif(!jsPDFParams.orientation){\r\n\t\tjsPDFParams.orientation = options.orientation || \"landscape\";\r\n\t}\r\n\r\n\tif(!jsPDFParams.unit){\r\n\t\tjsPDFParams.unit = \"pt\";\r\n\t}\r\n\r\n\t//parse row list\r\n\tlist.forEach((row) => {\r\n\t\tvar item = {};\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"header\":\r\n\t\t\theader.push(parseRow(row));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tbody.push(parseRow(row, rowGroupStyles));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tbody.push(parseRow(row, rowCalcStyles));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\tbody.push(parseRow(row));\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tfunction parseRow(row, styles){\r\n\t\tvar rowData = [];\r\n\r\n\t\trow.columns.forEach((col) =>{\r\n\t\t\tvar cell;\r\n\r\n\t\t\tif(col){\r\n\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tcol.value = JSON.stringify(col.value);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\tcol.value = \"\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcell = {\r\n\t\t\t\t\tcontent:col.value,\r\n\t\t\t\t\tcolSpan:col.width,\r\n\t\t\t\t\trowSpan:col.height,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tif(styles){\r\n\t\t\t\t\tcell.styles = styles;\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowData.push(cell);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowData;\r\n\t}\r\n\r\n\r\n\t//configure PDF\r\n\tvar doc = new jspdf.jsPDF(jsPDFParams); //set document to landscape, better for most tables\r\n\r\n\tif(options && options.autoTable){\r\n\t\tif(typeof options.autoTable === \"function\"){\r\n\t\t\tautoTableParams = options.autoTable(doc) || {};\r\n\t\t}else{\r\n\t\t\tautoTableParams = options.autoTable;\r\n\t\t}\r\n\t}\r\n\r\n\tif(title){\r\n\t\tautoTableParams.didDrawPage = function(data) {\r\n\t\t\tdoc.text(title, 40, 30);\r\n\t\t};\r\n\t}\r\n\r\n\tautoTableParams.head = header;\r\n\tautoTableParams.body = body;\r\n\r\n\tdoc.autoTable(autoTableParams);\r\n\r\n\tif(options && options.documentProcessing){\r\n\t\toptions.documentProcessing(doc);\r\n\t}\r\n\r\n\tsetFileContents(doc.output(\"arraybuffer\"), \"application/pdf\");\r\n};","import CoreFeature from '../../../../core/CoreFeature.js';\r\n\r\nexport default function(list, options, setFileContents){\r\n\tvar self = this,\r\n\tsheetName = options.sheetName || \"Sheet1\",\r\n\tworkbook = XLSX.utils.book_new(),\r\n\ttableFeatures = new CoreFeature(this),\r\n\toutput;\r\n\r\n\tworkbook.SheetNames = [];\r\n\tworkbook.Sheets = {};\r\n\r\n\tfunction generateSheet(){\r\n\t\tvar rows = [],\r\n\t\tmerges = [],\r\n\t\tworksheet = {},\r\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 }};\r\n\r\n\t\t//parse row list\r\n\t\tlist.forEach((row, i) => {\r\n\t\t\tvar rowData = [];\r\n\r\n\t\t\trow.columns.forEach(function(col, j){\r\n\r\n\t\t\t\tif(col){\r\n\t\t\t\t\trowData.push(!(col.value instanceof Date) && typeof col.value === \"object\" ? JSON.stringify(col.value) : col.value);\r\n\r\n\t\t\t\t\tif(col.width > 1 || col.height > -1){\r\n\t\t\t\t\t\tif(col.height > 1 || col.width > 1){\r\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}});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\trowData.push(\"\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\trows.push(rowData);\r\n\t\t});\r\n\r\n\t\t//convert rows to worksheet\r\n\t\tXLSX.utils.sheet_add_aoa(worksheet, rows);\r\n\r\n\t\tworksheet['!ref'] = XLSX.utils.encode_range(range);\r\n\r\n\t\tif(merges.length){\r\n\t\t\tworksheet[\"!merges\"] = merges;\r\n\t\t}\r\n\r\n\t\treturn worksheet;\r\n\t}\r\n\r\n\tif(options.sheetOnly){\r\n\t\tsetFileContents(generateSheet());\r\n\t\treturn;\r\n\t}\r\n\r\n\tif(options.sheets){\r\n\t\tfor(var sheet in options.sheets){\r\n\r\n\t\t\tif(options.sheets[sheet] === true){\r\n\t\t\t\tworkbook.SheetNames.push(sheet);\r\n\t\t\t\tworkbook.Sheets[sheet] = generateSheet();\r\n\t\t\t}else{\r\n\r\n\t\t\t\tworkbook.SheetNames.push(sheet);\r\n\r\n\t\t\t\ttableFeatures.commsSend(options.sheets[sheet], \"download\", \"intercept\",{\r\n\t\t\t\t\ttype:\"xlsx\",\r\n\t\t\t\t\toptions:{sheetOnly:true},\r\n\t\t\t\t\tactive:self.active,\r\n\t\t\t\t\tintercept:function(data){\r\n\t\t\t\t\t\tworkbook.Sheets[sheet] = data;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tworkbook.SheetNames.push(sheetName);\r\n\t\tworkbook.Sheets[sheetName] = generateSheet();\r\n\t}\r\n\r\n\tif(options.documentProcessing){\r\n\t\tworkbook = options.documentProcessing(workbook);\r\n\t}\r\n\r\n\t//convert workbook to binary array\r\n\tfunction s2ab(s) {\r\n\t\tvar buf = new ArrayBuffer(s.length);\r\n\t\tvar view = new Uint8Array(buf);\r\n\t\tfor (var i=0; i!=s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;\r\n\t\t\treturn buf;\r\n\t}\r\n\r\n\toutput = XLSX.write(workbook, {bookType:'xlsx', bookSST:true, type: 'binary'});\r\n\r\n\tsetFileContents(s2ab(output), \"application/octet-stream\");\r\n};","export default function(list, options, setFileContents){\r\n\tif(this.modExists(\"export\", true)){\r\n\t\tsetFileContents(this.modules.export.genereateHTMLTable(list), \"text/html\");\r\n\t}\r\n};","export default function (list, options, setFileContents) {\r\n\tconst fileContents = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tconst item = {};\r\n\r\n\t\tswitch (row.type) {\r\n\t\t\tcase \"header\":\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process row groups\");\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process column calculations\");\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\t\tif (col) {\r\n\t\t\t\t\t\titem[col.component.getTitleDownload() || col.component.getField()] = col.value;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tfileContents.push(JSON.stringify(item));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tsetFileContents(fileContents.join(\"\\n\"), \"application/x-ndjson\");\r\n};","import csv from './downloaders/csv.js';\r\nimport json from './downloaders/json.js';\r\nimport pdf from './downloaders/pdf.js';\r\nimport xlsx from './downloaders/xlsx.js';\r\nimport html from './downloaders/html.js';\r\nimport jsonLines from './downloaders/jsonLines.js';\r\n\r\nexport default {\r\n\tcsv:csv,\r\n\tjson:json,\r\n\tjsonLines:jsonLines,\r\n\tpdf:pdf,\r\n\txlsx:xlsx,\r\n\thtml:html,\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultDownloaders from './defaults/downloaders.js';\r\n\r\nclass Download extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.registerTableOption(\"downloadReady\", function(data, blob){return blob;}); //function to manipulate download data\r\n\t\tthis.registerTableOption(\"downloadConfig\", {}); //download config\r\n\t\tthis.registerTableOption(\"downloadRowRange\", \"active\"); //restrict download to active rows only\r\n\r\n\t\tthis.registerColumnOption(\"download\");\r\n\t\tthis.registerColumnOption(\"titleDownload\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"download\", this.download.bind(this));\r\n\t\tthis.registerTableFunction(\"downloadToTab\", this.downloadToTab.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tdownloadToTab(type, filename, options, active){\r\n\t\tthis.download(type, filename, options, active, true);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\t//trigger file download\r\n\tdownload(type, filename, options, range, interceptCallback){\r\n\t\tvar downloadFunc = false;\r\n\r\n\t\tfunction buildLink(data, mime){\r\n\t\t\tif(interceptCallback){\r\n\t\t\t\tif(interceptCallback === true){\r\n\t\t\t\t\tthis.triggerDownload(data, mime, type, filename, true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tinterceptCallback(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tthis.triggerDownload(data, mime, type, filename);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(typeof type == \"function\"){\r\n\t\t\tdownloadFunc = type;\r\n\t\t}else{\r\n\t\t\tif(Download.downloaders[type]){\r\n\t\t\t\tdownloadFunc = Download.downloaders[type];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Download Error - No such download type found: \", type);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(downloadFunc){\r\n\t\t\tvar list = this.generateExportList(range);\r\n\r\n\t\t\tdownloadFunc.call(this.table, list , options || {}, buildLink.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateExportList(range){\r\n\t\tvar list = this.table.modules.export.generateExportList(this.table.options.downloadConfig, false, range || this.table.options.downloadRowRange, \"download\");\r\n\r\n\t\t//assign group header formatter\r\n\t\tvar groupHeader = this.table.options.groupHeaderDownload;\r\n\r\n\t\tif(groupHeader && !Array.isArray(groupHeader)){\r\n\t\t\tgroupHeader = [groupHeader];\r\n\t\t}\r\n\r\n\t\tlist.forEach((row) => {\r\n\t\t\tvar group;\r\n\r\n\t\t\tif(row.type === \"group\"){\r\n\t\t\t\tgroup = row.columns[0];\r\n\r\n\t\t\t\tif(groupHeader && groupHeader[row.indent]){\r\n\t\t\t\t\tgroup.value = groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn list;\r\n\t}\r\n\r\n\ttriggerDownload(data, mime, type, filename, newTab){\r\n\t\tvar element = document.createElement('a'),\r\n\t\tblob = new Blob([data],{type:mime}),\r\n\t\tfilename = filename || \"Tabulator.\" + (typeof type === \"function\" ? \"txt\" : type);\r\n\r\n\t\tblob = this.table.options.downloadReady(data, blob);\r\n\r\n\t\tif(blob){\r\n\r\n\t\t\tif(newTab){\r\n\t\t\t\twindow.open(window.URL.createObjectURL(blob));\r\n\t\t\t}else{\r\n\t\t\t\tif(navigator.msSaveOrOpenBlob){\r\n\t\t\t\t\tnavigator.msSaveOrOpenBlob(blob, filename);\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.setAttribute('href', window.URL.createObjectURL(blob));\r\n\r\n\t\t\t\t\t//set file title\r\n\t\t\t\t\telement.setAttribute('download', filename);\r\n\r\n\t\t\t\t\t//trigger download\r\n\t\t\t\t\telement.style.display = 'none';\r\n\t\t\t\t\tdocument.body.appendChild(element);\r\n\t\t\t\t\telement.click();\r\n\r\n\t\t\t\t\t//remove temporary link element\r\n\t\t\t\t\tdocument.body.removeChild(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"downloadComplete\");\r\n\t\t}\r\n\t}\r\n\r\n\tcommsReceived(table, action, data){\r\n\t\tswitch(action){\r\n\t\t\tcase \"intercept\":\r\n\t\t\tthis.download(data.type, \"\", data.options, data.active, data.intercept);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nDownload.moduleName = \"download\";\r\n\r\n//load defaults\r\nDownload.downloaders = defaultDownloaders;\r\n\r\nexport default Download;","export default function maskInput(el, options){\r\n\tvar mask = options.mask,\r\n\tmaskLetter = typeof options.maskLetterChar !== \"undefined\" ? options.maskLetterChar : \"A\",\r\n\tmaskNumber = typeof options.maskNumberChar !== \"undefined\" ? options.maskNumberChar : \"9\",\r\n\tmaskWildcard = typeof options.maskWildcardChar !== \"undefined\" ? options.maskWildcardChar : \"*\",\r\n\tsuccess = false;\r\n\r\n\tfunction fillSymbols(index){\r\n\t\tvar symbol = mask[index];\r\n\t\tif(typeof symbol !== \"undefined\" && symbol !== maskWildcard && symbol !== maskLetter && symbol !== maskNumber){\r\n\t\t\tel.value = el.value + \"\" + symbol;\r\n\t\t\tfillSymbols(index+1);\r\n\t\t}\r\n\t}\r\n\r\n\tel.addEventListener(\"keydown\", (e) => {\r\n\t\tvar index = el.value.length,\r\n\t\tchar = e.key;\r\n\r\n\t\tif(e.keyCode > 46){\r\n\t\t\tif(index >= mask.length){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tsuccess = false;\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\tswitch(mask[index]){\r\n\t\t\t\t\tcase maskLetter:\r\n\t\t\t\t\tif(char.toUpperCase() == char.toLowerCase()){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase maskNumber:\r\n\t\t\t\t\tif(isNaN(char)){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase maskWildcard:\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(char !== mask[index]){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\r\n\t\treturn;\r\n\t});\r\n\r\n\tel.addEventListener(\"keyup\", (e) => {\r\n\t\tif(e.keyCode > 46){\r\n\t\t\tif(options.maskAutoFill){\r\n\t\t\t\tfillSymbols(el.value.length);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\r\n\tif(!el.placeholder){\r\n\t\tel.placeholder = mask;\r\n\t}\r\n\r\n\tif(options.maskAutoFill){\r\n\t\tfillSymbols(el.value.length);\r\n\t}\r\n}","import maskInput from '../../inputMask.js';\r\n\r\n//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", editorParams.search ? \"search\" : \"text\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t});\r\n\r\n\tfunction onChange(e){\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\r\n\t\t\tif(success(input.value)){\r\n\t\t\t\tcellValue = input.value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\t// case 9:\r\n\t\t\tcase 13:\r\n\t\t\tonChange(e);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\te.stopPropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\treturn input;\r\n};","import maskInput from '../../inputMask.js';\r\n\r\n//resizable text area element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n var self = this,\r\n cellValue = cell.getValue(),\r\n vertNav = editorParams.verticalNavigation || \"hybrid\",\r\n value = String(cellValue !== null && typeof cellValue !== \"undefined\" ? cellValue : \"\"),\r\n count = (value.match(/(?:\\r\\n|\\r|\\n)/g) || []).length + 1,\r\n input = document.createElement(\"textarea\"),\r\n scrollHeight = 0;\r\n\r\n //create and style input\r\n input.style.display = \"block\";\r\n input.style.padding = \"2px\";\r\n input.style.height = \"100%\";\r\n input.style.width = \"100%\";\r\n input.style.boxSizing = \"border-box\";\r\n input.style.whiteSpace = \"pre-wrap\";\r\n input.style.resize = \"none\";\r\n\r\n if(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n for (let key in editorParams.elementAttributes){\r\n if(key.charAt(0) == \"+\"){\r\n key = key.slice(1);\r\n input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n }else{\r\n input.setAttribute(key, editorParams.elementAttributes[key]);\r\n }\r\n }\r\n }\r\n\r\n input.value = value;\r\n\r\n onRendered(function(){\r\n input.focus({preventScroll: true});\r\n input.style.height = \"100%\";\r\n\r\n input.scrollHeight;\r\n input.style.height = input.scrollHeight + \"px\";\r\n cell.getRow().normalizeHeight();\r\n });\r\n\r\n function onChange(e){\r\n\r\n if(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\r\n\r\n if(success(input.value)){\r\n cellValue = input.value; //persist value if successfully validated incase editor is used as header filter\r\n }\r\n\r\n setTimeout(function(){\r\n cell.getRow().normalizeHeight();\r\n },300)\r\n }else{\r\n cancel();\r\n }\r\n }\r\n\r\n //submit new value on blur or change\r\n input.addEventListener(\"change\", onChange);\r\n input.addEventListener(\"blur\", onChange);\r\n\r\n input.addEventListener(\"keyup\", function(){\r\n\r\n input.style.height = \"\";\r\n\r\n var heightNow = input.scrollHeight;\r\n\r\n input.style.height = heightNow + \"px\";\r\n\r\n if(heightNow != scrollHeight){\r\n scrollHeight = heightNow;\r\n cell.getRow().normalizeHeight();\r\n }\r\n });\r\n\r\n input.addEventListener(\"keydown\", function(e){\r\n\r\n switch(e.keyCode){\r\n case 27:\r\n cancel();\r\n break;\r\n\r\n case 38: //up arrow\r\n if(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart)){\r\n e.stopImmediatePropagation();\r\n e.stopPropagation();\r\n }\r\n\r\n break;\r\n\r\n case 40: //down arrow\r\n if(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart !== input.value.length)){\r\n e.stopImmediatePropagation();\r\n e.stopPropagation();\r\n }\r\n break;\r\n\r\n case 35:\r\n case 36:\r\n e.stopPropagation();\r\n break;\r\n }\r\n });\r\n\r\n if(editorParams.mask){\r\n maskInput(input, editorParams);\r\n }\r\n\r\n return input;\r\n};","import maskInput from '../../inputMask.js';\r\n\r\n//input element with type of number\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar cellValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", \"number\");\r\n\r\n\tif(typeof editorParams.max != \"undefined\"){\r\n\t\tinput.setAttribute(\"max\", editorParams.max);\r\n\t}\r\n\r\n\tif(typeof editorParams.min != \"undefined\"){\r\n\t\tinput.setAttribute(\"min\", editorParams.min);\r\n\t}\r\n\r\n\tif(typeof editorParams.step != \"undefined\"){\r\n\t\tinput.setAttribute(\"step\", editorParams.step);\r\n\t}\r\n\r\n\t//create and style input\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\r\n\tvar blurFunc = function(e){\r\n\t\tonChange();\r\n\t};\r\n\r\n\tonRendered(function () {\r\n\t\t//submit new value on blur\r\n\t\tinput.removeEventListener(\"blur\", blurFunc);\r\n\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\r\n\t\t//submit new value on blur\r\n\t\tinput.addEventListener(\"blur\", blurFunc);\r\n\t});\r\n\r\n\tfunction onChange(){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(!isNaN(value) && value !==\"\"){\r\n\t\t\tvalue = Number(value);\r\n\t\t}\r\n\r\n\t\tif(value !== cellValue){\r\n\t\t\tif(success(value)){\r\n\t\t\t\tcellValue = value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 13:\r\n\t\t\t// case 9:\r\n\t\t\tonChange();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tcase 40: //down arrow\r\n\t\t\tif(vertNav == \"editor\"){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\te.stopPropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\treturn input;\r\n};","//input element with type of number\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", \"range\");\r\n\r\n\tif (typeof editorParams.max != \"undefined\") {\r\n\t\tinput.setAttribute(\"max\", editorParams.max);\r\n\t}\r\n\r\n\tif (typeof editorParams.min != \"undefined\") {\r\n\t\tinput.setAttribute(\"min\", editorParams.min);\r\n\t}\r\n\r\n\tif (typeof editorParams.step != \"undefined\") {\r\n\t\tinput.setAttribute(\"step\", editorParams.step);\r\n\t}\r\n\r\n\t//create and style input\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\r\n\tonRendered(function () {\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t});\r\n\r\n\tfunction onChange(){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(!isNaN(value) && value !==\"\"){\r\n\t\t\tvalue = Number(value);\r\n\t\t}\r\n\r\n\t\tif(value != cellValue){\r\n\t\t\tif(success(value)){\r\n\t\t\t\tcellValue = value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tonChange();\r\n\t});\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 13:\r\n\t\t\t// case 9:\r\n\t\t\tonChange();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\treturn input;\r\n};","import Helpers from '../../../../core/tools/Helpers.js';\r\n\r\n//dropdown select editor\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\tcellEl = cell.getElement(),\r\n\tinitialValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinitialDisplayValue = typeof initialValue !== \"undefined\" || initialValue === null ? (Array.isArray(initialValue) ? initialValue : [initialValue]) : (typeof editorParams.defaultValue !== \"undefined\" ? editorParams.defaultValue : []),\r\n\tinput = document.createElement(\"input\"),\r\n\tlistEl = document.createElement(\"div\"),\r\n\tmultiselect = editorParams.multiselect,\r\n\tdataItems = [],\r\n\tcurrentItem = {},\r\n\tdisplayItems = [],\r\n\tcurrentItems = [],\r\n\tblurable = true,\r\n\tblockListShow = false,\r\n\tsearchWord = \"\",\r\n\tsearchWordTimeout = null;\r\n\r\n\tif(Array.isArray(editorParams) || (!Array.isArray(editorParams) && typeof editorParams === \"object\" && !editorParams.values)){\r\n\t\tconsole.warn(\"DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object\");\r\n\t\teditorParams = {values:editorParams};\r\n\t}\r\n\r\n\tfunction getUniqueColumnValues(field){\r\n\t\tvar output = {},\r\n\t\tdata = self.table.getData(),\r\n\t\tcolumn;\r\n\r\n\t\tif(field){\r\n\t\t\tcolumn = self.table.columnManager.getColumnByField(field);\r\n\t\t}else{\r\n\t\t\tcolumn = cell.getColumn()._getSelf();\r\n\t\t}\r\n\r\n\t\tif(column){\r\n\t\t\tdata.forEach(function(row){\r\n\t\t\t\tvar val = column.getFieldValue(row);\r\n\r\n\t\t\t\tif(val !== null && typeof val !== \"undefined\" && val !== \"\"){\r\n\t\t\t\t\toutput[val] = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"unable to find matching column to create select lookup list:\", field);\r\n\t\t}\r\n\r\n\t\treturn Object.keys(output);\r\n\t}\r\n\r\n\tfunction parseItems(inputValues, curentValues){\r\n\t\tvar dataList = [];\r\n\t\tvar displayList = [];\r\n\r\n\t\tfunction processComplexListItem(item){\r\n\t\t\tvar item = {\r\n\t\t\t\tlabel:item.label,\r\n\t\t\t\tvalue:item.value,\r\n\t\t\t\titemParams:item.itemParams,\r\n\t\t\t\telementAttributes: item.elementAttributes,\r\n\t\t\t\telement:false,\r\n\t\t\t};\r\n\r\n\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t// }\r\n\r\n\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\tsetItem(item);\r\n\t\t\t}\r\n\r\n\t\t\tdataList.push(item);\r\n\t\t\tdisplayList.push(item);\r\n\r\n\t\t\treturn item;\r\n\t\t}\r\n\r\n\t\tif(typeof inputValues == \"function\"){\r\n\t\t\tinputValues = inputValues(cell);\r\n\t\t}\r\n\r\n\t\tif(Array.isArray(inputValues)){\r\n\t\t\tinputValues.forEach(function(value){\r\n\t\t\t\tvar item;\r\n\r\n\t\t\t\tif(typeof value === \"object\"){\r\n\r\n\t\t\t\t\tif(value.options){\r\n\t\t\t\t\t\titem = {\r\n\t\t\t\t\t\t\tlabel:value.label,\r\n\t\t\t\t\t\t\tgroup:true,\r\n\t\t\t\t\t\t\titemParams:value.itemParams,\r\n\t\t\t\t\t\t\telementAttributes:value.elementAttributes,\r\n\t\t\t\t\t\t\telement:false,\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\tdisplayList.push(item);\r\n\r\n\t\t\t\t\t\tvalue.options.forEach(function(item){\r\n\t\t\t\t\t\t\tprocessComplexListItem(item);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tprocessComplexListItem(value);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\titem = {\r\n\t\t\t\t\t\tlabel:value,\r\n\t\t\t\t\t\tvalue:value,\r\n\t\t\t\t\t\telement:false,\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t\t\t// }\r\n\r\n\t\t\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\t\t\tsetItem(item);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdataList.push(item);\r\n\t\t\t\t\tdisplayList.push(item);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tfor(var key in inputValues){\r\n\t\t\t\tvar item = {\r\n\t\t\t\t\tlabel:inputValues[key],\r\n\t\t\t\t\tvalue:key,\r\n\t\t\t\t\telement:false,\r\n\t\t\t\t};\r\n\r\n\t\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t\t// }\r\n\r\n\t\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\t\tsetItem(item);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdataList.push(item);\r\n\t\t\t\tdisplayList.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(editorParams.sortValuesList){\r\n\t\t\tdataList.sort((a, b) => {\r\n\t\t\t\treturn a.label < b.label ? -1 : (a.label > b.label ? 1 : 0);\r\n\t\t\t});\r\n\r\n\t\t\tdisplayList.sort((a, b) => {\r\n\t\t\t\treturn a.label < b.label ? -1 : (a.label > b.label ? 1 : 0);\r\n\t\t\t});\r\n\r\n\t\t\tif(editorParams.sortValuesList !== \"asc\"){\r\n\t\t\t\tdataList.reverse();\r\n\t\t\t\tdisplayList.reverse();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataItems = dataList;\r\n\t\tdisplayItems = displayList;\r\n\r\n\t\tfillList();\r\n\t}\r\n\r\n\tfunction fillList(){\r\n\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\r\n\t\tdisplayItems.forEach(function(item){\r\n\r\n\t\t\tvar el = item.element;\r\n\r\n\t\t\tif(!el){\r\n\t\t\t\tel = document.createElement(\"div\");\r\n\t\t\t\titem.label = editorParams.listItemFormatter ? editorParams.listItemFormatter(item.value, item.label, cell, el, item.itemParams) : item.label;\r\n\t\t\t\tif(item.group){\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-select-list-group\");\r\n\t\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\t\tel.innerHTML = item.label === \"\" ? \" \" : item.label;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-select-list-item\");\r\n\t\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\t\tel.innerHTML = item.label === \"\" ? \" \" : item.label;\r\n\r\n\t\t\t\t\tel.addEventListener(\"click\", function(){\r\n\t\t\t\t\t\tblockListShow = true;\r\n\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tblockListShow = false;\r\n\t\t\t\t\t\t}, 10);\r\n\r\n\t\t\t\t\t\t// setCurrentItem(item);\r\n\t\t\t\t\t\t// chooseItem();\r\n\t\t\t\t\t\tif(multiselect){\r\n\t\t\t\t\t\t\ttoggleItem(item);\r\n\t\t\t\t\t\t\tinput.focus();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tchooseItem(item);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t// if(item === currentItem){\r\n\t\t\t\t\t// \tel.classList.add(\"active\");\r\n\t\t\t\t\t// }\r\n\r\n\t\t\t\t\tif(currentItems.indexOf(item) > -1){\r\n\t\t\t\t\t\tel.classList.add(\"active\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(item.elementAttributes && typeof item.elementAttributes == \"object\"){\r\n\t\t\t\t\tfor (let key in item.elementAttributes){\r\n\t\t\t\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\t\t\t\tkey = key.slice(1);\r\n\t\t\t\t\t\t\tel.setAttribute(key, input.getAttribute(key) + item.elementAttributes[\"+\" + key]);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tel.setAttribute(key, item.elementAttributes[key]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tel.addEventListener(\"mousedown\", function(){\r\n\t\t\t\t\tblurable = false;\r\n\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tblurable = true;\r\n\t\t\t\t\t}, 10);\r\n\t\t\t\t});\r\n\r\n\t\t\t\titem.element = el;\r\n\r\n\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(el);\r\n\t\t});\r\n\t}\r\n\r\n\r\n\tfunction setCurrentItem(item, active){\r\n\r\n\t\tif(!multiselect && currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"active\");\r\n\t\t}\r\n\r\n\t\tif(currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"focused\");\r\n\t\t}\r\n\r\n\t\tcurrentItem = item;\r\n\r\n\t\tif(item.element){\r\n\t\t\titem.element.classList.add(\"focused\");\r\n\t\t\tif(active){\r\n\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(item && item.element && item.element.scrollIntoView){\r\n\t\t\titem.element.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'start'});\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t// function chooseItem(){\r\n\t// \thideList();\r\n\r\n\t// \tif(initialValue !== currentItem.value){\r\n\t// \t\tinitialValue = currentItem.value;\r\n\t// \t\tsuccess(currentItem.value);\r\n\t// \t}else{\r\n\t// \t\tcancel();\r\n\t// \t}\r\n\t// }\r\n\r\n\tfunction setItem(item) {\r\n\t\tvar index = currentItems.indexOf(item);\r\n\r\n\t\tif(index == -1){\r\n\t\t\tcurrentItems.push(item);\r\n\t\t\tsetCurrentItem(item, true);\r\n\t\t}\r\n\r\n\t\tfillInput();\r\n\t}\r\n\r\n\tfunction unsetItem(index) {\r\n\t\tvar item = currentItems[index];\r\n\r\n\t\tif(index > -1){\r\n\t\t\tcurrentItems.splice(index, 1);\r\n\t\t\tif(item.element){\r\n\t\t\t\titem.element.classList.remove(\"active\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction toggleItem(item) {\r\n\t\tif(!item){\r\n\t\t\titem = currentItem;\r\n\t\t}\r\n\r\n\t\tvar index = currentItems.indexOf(item);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tunsetItem(index);\r\n\t\t}else{\r\n\t\t\tif(multiselect !== true && currentItems.length >= multiselect){\r\n\t\t\t\tunsetItem(0);\r\n\t\t\t}\r\n\r\n\t\t\tsetItem(item);\r\n\t\t}\r\n\r\n\t\tfillInput();\r\n\r\n\t}\r\n\r\n\tfunction chooseItem(item){\r\n\t\thideList();\r\n\r\n\t\tif(!item){\r\n\t\t\titem = currentItem;\r\n\t\t}\r\n\r\n\t\tif(item){\r\n\t\t\tinput.value = item.label;\r\n\t\t\tsuccess(item.value);\r\n\t\t}\r\n\r\n\t\tinitialDisplayValue = [item.value];\r\n\t}\r\n\r\n\r\n\tfunction chooseItems(silent){\r\n\t\tif(!silent){\r\n\t\t\thideList();\r\n\t\t}\r\n\r\n\t\tvar output = [];\r\n\r\n\t\tcurrentItems.forEach((item) => {\r\n\t\t\toutput.push(item.value);\r\n\t\t});\r\n\r\n\t\tinitialDisplayValue = output;\r\n\r\n\t\tsuccess(output);\r\n\t}\r\n\r\n\tfunction fillInput(){\r\n\t\tvar output = [];\r\n\r\n\t\tcurrentItems.forEach((item) => {\r\n\t\t\toutput.push(item.label);\r\n\t\t});\r\n\r\n\t\tinput.value = output.join(\", \");\r\n\r\n\t\tif(self.currentCell === false){\r\n\t\t\tchooseItems(true);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tfunction unsetItems() {\r\n\r\n\t\tvar len = currentItems.length;\r\n\r\n\t\tfor(let i = 0; i < len; i++){\r\n\t\t\tunsetItem(0);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction cancelItem(){\r\n\t\thideList();\r\n\t\tcancel();\r\n\t}\r\n\r\n\tfunction showList(){\r\n\t\tcurrentItems = [];\r\n\r\n\t\tif(!listEl.parentNode){\r\n\t\t\tif(editorParams.values === true){\r\n\t\t\t\tparseItems(getUniqueColumnValues(), initialDisplayValue);\r\n\t\t\t}else if(typeof editorParams.values === \"string\"){\r\n\t\t\t\tparseItems(getUniqueColumnValues(editorParams.values), initialDisplayValue);\r\n\t\t\t}else{\r\n\t\t\t\tparseItems(editorParams.values || [], initialDisplayValue);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tvar offset = Helpers.elOffset(cellEl);\r\n\r\n\t\t\tlistEl.style.minWidth = cellEl.offsetWidth + \"px\";\r\n\r\n\t\t\tlistEl.style.top = (offset.top + cellEl.offsetHeight) + \"px\";\r\n\t\t\tlistEl.style.left = offset.left + \"px\";\r\n\r\n\r\n\t\t\tlistEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tblurable = false;\r\n\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tblurable = true;\r\n\t\t\t\t}, 10);\r\n\t\t\t});\r\n\r\n\t\t\tdocument.body.appendChild(listEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction hideList(){\r\n\t\tif(listEl.parentNode){\r\n\t\t\tlistEl.parentNode.removeChild(listEl);\r\n\t\t}\r\n\r\n\t\tremoveScrollListener();\r\n\t}\r\n\r\n\tfunction removeScrollListener() {\r\n\t\tself.table.rowManager.element.removeEventListener(\"scroll\", cancelItem);\r\n\t}\r\n\r\n\tfunction scrollTovalue(char){\r\n\r\n\t\tclearTimeout(searchWordTimeout);\r\n\r\n\t\tvar character = String.fromCharCode(event.keyCode).toLowerCase();\r\n\t\tsearchWord += character.toLowerCase();\r\n\r\n\t\tvar match = dataItems.find((item) => {\r\n\t\t\treturn typeof item.label !== \"undefined\" && item.label.toLowerCase().startsWith(searchWord);\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tsetCurrentItem(match, !multiselect);\r\n\t\t}\r\n\r\n\t\tsearchWordTimeout = setTimeout(() => {\r\n\t\t\tsearchWord = \"\";\r\n\t\t}, 800)\r\n\t}\r\n\r\n\t//style input\r\n\tinput.setAttribute(\"type\", \"text\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\tinput.style.cursor = \"default\";\r\n\tinput.readOnly = (this.currentCell != false);\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = typeof initialValue !== \"undefined\" || initialValue === null ? initialValue : \"\";\r\n\r\n\t// if(editorParams.values === true){\r\n\t// \tparseItems(getUniqueColumnValues(), initialValue);\r\n\t// }else if(typeof editorParams.values === \"string\"){\r\n\t// \tparseItems(getUniqueColumnValues(editorParams.values), initialValue);\r\n\t// }else{\r\n\t// \tparseItems(editorParams.values || [], initialValue);\r\n\t// }\r\n\r\n\tinput.addEventListener(\"search\", function(e){\r\n\t\tif(!input.value){\r\n\t\t\tunsetItems();\r\n\t\t\tchooseItems();\r\n\t\t}\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tvar index;\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tindex = dataItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index > 0){\r\n\t\t\t\t\tsetCurrentItem(dataItems[index - 1], !multiselect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 40: //down arrow\r\n\t\t\tindex = dataItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index < dataItems.length - 1)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index < dataItems.length - 1){\r\n\t\t\t\t\tif(index == -1){\r\n\t\t\t\t\t\tsetCurrentItem(dataItems[0], !multiselect);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsetCurrentItem(dataItems[index + 1], !multiselect);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\t// chooseItem();\r\n\r\n\t\t\tif(multiselect){\r\n\t\t\t\ttoggleItem();\r\n\t\t\t}else{\r\n\t\t\t\tchooseItem();\r\n\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancelItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 9: //tab\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tif(self.currentCell === false){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tif(e.keyCode >= 38 && e.keyCode <= 90){\r\n\t\t\t\tscrollTovalue(e.keyCode);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tif(blurable){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tchooseItems();\r\n\t\t\t}else{\r\n\t\t\t\tcancelItem();\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"focus\", function(e){\r\n\t\tif(!blockListShow){\r\n\t\t\tshowList();\r\n\t\t}\r\n\t});\r\n\r\n\t//style list element\r\n\tlistEl = document.createElement(\"div\");\r\n\tlistEl.classList.add(\"tabulator-edit-select-list\");\r\n\r\n\tonRendered(function(){\r\n\t\tinput.style.height = \"100%\";\r\n\t\tinput.focus({preventScroll: true});\r\n\t});\r\n\r\n\tsetTimeout(() => {\r\n\t\tthis.table.rowManager.element.addEventListener(\"scroll\", cancelItem);\r\n\t}, 10);\r\n\r\n\treturn input;\r\n};","import Helpers from '../../../../core/tools/Helpers.js';\r\nimport maskInput from '../../inputMask.js';\r\n\r\n//autocomplete\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\tcellEl = cell.getElement(),\r\n\tinitialValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinitialDisplayValue = typeof initialValue !== \"undefined\" || initialValue === null ? initialValue : (typeof editorParams.defaultValue !== \"undefined\" ? editorParams.defaultValue : \"\"),\r\n\tinput = document.createElement(\"input\"),\r\n\tlistEl = document.createElement(\"div\"),\r\n\tallItems = [],\r\n\tdisplayItems = [],\r\n\tvalues = [],\r\n\tcurrentItem = false,\r\n\tblurable = true,\r\n\tuniqueColumnValues = false;\r\n\r\n\t//style input\r\n\tinput.setAttribute(\"type\", \"search\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//style list element\r\n\tlistEl.classList.add(\"tabulator-edit-select-list\");\r\n\r\n\tlistEl.addEventListener(\"mousedown\", function(e){\r\n\t\tblurable = false;\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tblurable = true;\r\n\t\t}, 10);\r\n\t});\r\n\r\n\r\n\tfunction genUniqueColumnValues(){\r\n\t\tif(editorParams.values === true){\r\n\t\t\tuniqueColumnValues = getUniqueColumnValues();\r\n\t\t}else if(typeof editorParams.values === \"string\"){\r\n\t\t\tuniqueColumnValues = getUniqueColumnValues(editorParams.values);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getUniqueColumnValues(field){\r\n\t\tvar output = {},\r\n\t\tdata = self.table.getData(),\r\n\t\tcolumn;\r\n\r\n\t\tif(field){\r\n\t\t\tcolumn = self.table.columnManager.getColumnByField(field);\r\n\t\t}else{\r\n\t\t\tcolumn = cell.getColumn()._getSelf();\r\n\t\t}\r\n\r\n\t\tif(column){\r\n\t\t\tdata.forEach(function(row){\r\n\t\t\t\tvar val = column.getFieldValue(row);\r\n\r\n\t\t\t\tif(val !== null && typeof val !== \"undefined\" && val !== \"\"){\r\n\t\t\t\t\toutput[val] = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(editorParams.sortValuesList){\r\n\t\t\t\tif(editorParams.sortValuesList == \"asc\"){\r\n\t\t\t\t\toutput = Object.keys(output).sort();\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput = Object.keys(output).sort().reverse();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\toutput = Object.keys(output);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"unable to find matching column to create autocomplete lookup list:\", field);\r\n\t\t}\r\n\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tfunction filterList(term, intialLoad){\r\n\t\tvar matches = [],\r\n\t\tvalues, items, searchEl;\r\n\r\n\t\t//lookup base values list\r\n\t\tif(uniqueColumnValues){\r\n\t\t\tvalues = uniqueColumnValues;\r\n\t\t}else{\r\n\t\t\tvalues = editorParams.values || [];\r\n\t\t}\r\n\r\n\t\tif(editorParams.searchFunc){\r\n\t\t\tmatches = editorParams.searchFunc(term, values);\r\n\r\n\t\t\tif(matches instanceof Promise){\r\n\r\n\t\t\t\taddNotice(typeof editorParams.searchingPlaceholder !== \"undefined\" ? editorParams.searchingPlaceholder : \"Searching...\");\r\n\r\n\t\t\t\tmatches.then((result) => {\r\n\t\t\t\t\tfillListIfNotEmpty(parseItems(result), intialLoad);\r\n\t\t\t\t}).catch((err) => {\r\n\t\t\t\t\tconsole.err(\"error in autocomplete search promise:\", err);\r\n\t\t\t\t});\r\n\r\n\t\t\t}else{\r\n\t\t\t\tfillListIfNotEmpty(parseItems(matches), intialLoad);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\titems = parseItems(values);\r\n\r\n\t\t\tif(term === \"\"){\r\n\t\t\t\tif(editorParams.showListOnEmpty){\r\n\t\t\t\t\tmatches = items;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\titems.forEach(function(item){\r\n\t\t\t\t\tif(item.value !== null || typeof item.value !== \"undefined\"){\r\n\t\t\t\t\t\tif(String(item.value).toLowerCase().indexOf(String(term).toLowerCase()) > -1 || String(item.title).toLowerCase().indexOf(String(term).toLowerCase()) > -1){\r\n\t\t\t\t\t\t\tmatches.push(item);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tfillListIfNotEmpty(matches, intialLoad);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction addNotice(notice){\r\n\t\tvar searchEl = document.createElement(\"div\");\r\n\r\n\t\tclearList();\r\n\r\n\t\tif(notice !== false){\r\n\t\t\tsearchEl.classList.add(\"tabulator-edit-select-list-notice\");\r\n\t\t\tsearchEl.tabIndex = 0;\r\n\r\n\t\t\tif(notice instanceof Node){\r\n\t\t\t\tsearchEl.appendChild(notice);\r\n\t\t\t}else{\r\n\t\t\t\tsearchEl.innerHTML = notice;\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(searchEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction parseItems(inputValues){\r\n\t\tvar itemList = [];\r\n\r\n\t\tif(Array.isArray(inputValues)){\r\n\t\t\tinputValues.forEach(function(value){\r\n\r\n\t\t\t\tvar item = {};\r\n\r\n\t\t\t\tif(typeof value === \"object\"){\r\n\t\t\t\t\titem.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value.value, value.label) : value.label;\r\n\t\t\t\t\titem.value = value.value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\titem.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value;\r\n\t\t\t\t\titem.value = value;\r\n\t\t\t\t}\r\n\r\n\t\t\t\titemList.push(item);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tfor(var key in inputValues){\r\n\t\t\t\tvar item = {\r\n\t\t\t\t\ttitle:editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : inputValues[key],\r\n\t\t\t\t\tvalue:key,\r\n\t\t\t\t};\r\n\r\n\t\t\t\titemList.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn itemList;\r\n\t}\r\n\r\n\tfunction clearList(){\r\n\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\t}\r\n\r\n\tfunction fillListIfNotEmpty(items, intialLoad){\r\n\t\tif(items.length){\r\n\t\t\tfillList(items, intialLoad);\r\n\t\t}else{\r\n\t\t\tif(editorParams.emptyPlaceholder){\r\n\t\t\t\taddNotice(editorParams.emptyPlaceholder);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fillList(items, intialLoad){\r\n\t\tvar current = false;\r\n\r\n\t\tclearList();\r\n\r\n\t\tdisplayItems = items;\r\n\r\n\t\tdisplayItems.forEach(function(item){\r\n\t\t\tvar el = item.element;\r\n\r\n\t\t\tif(!el){\r\n\t\t\t\tel = document.createElement(\"div\");\r\n\t\t\t\tel.classList.add(\"tabulator-edit-select-list-item\");\r\n\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\tel.innerHTML = item.title;\r\n\r\n\t\t\t\tel.addEventListener(\"click\", function(e){\r\n\t\t\t\t\tsetCurrentItem(item);\r\n\t\t\t\t\tchooseItem();\r\n\t\t\t\t});\r\n\r\n\t\t\t\tel.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\t\tblurable = false;\r\n\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tblurable = true;\r\n\t\t\t\t\t}, 10);\r\n\t\t\t\t});\r\n\r\n\t\t\t\titem.element = el;\r\n\r\n\t\t\t\tif(intialLoad && item.value == initialValue){\r\n\t\t\t\t\tinput.value = item.title;\r\n\t\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t\t\tcurrent = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(item === currentItem){\r\n\t\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t\t\tcurrent = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(el);\r\n\t\t});\r\n\r\n\t\tif(!current){\r\n\t\t\tsetCurrentItem(false);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction chooseItem(){\r\n\t\thideList();\r\n\r\n\t\tif(currentItem){\r\n\t\t\tif(initialValue !== currentItem.value){\r\n\t\t\t\tinitialValue = currentItem.value;\r\n\t\t\t\tinput.value = currentItem.title;\r\n\t\t\t\tsuccess(currentItem.value);\r\n\t\t\t}else{\r\n\t\t\t\tcancel();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(editorParams.freetext){\r\n\t\t\t\tinitialValue = input.value;\r\n\t\t\t\tsuccess(input.value);\r\n\t\t\t}else{\r\n\t\t\t\tif(editorParams.allowEmpty && input.value === \"\"){\r\n\t\t\t\t\tinitialValue = input.value;\r\n\t\t\t\t\tsuccess(input.value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcancel();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction showList(){\r\n\t\tif(!listEl.parentNode){\r\n\t\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\r\n\t\t\tvar offset = Helpers.elOffset(cellEl);\r\n\r\n\t\t\tlistEl.style.minWidth = cellEl.offsetWidth + \"px\";\r\n\r\n\t\t\tlistEl.style.top = (offset.top + cellEl.offsetHeight) + \"px\";\r\n\t\t\tlistEl.style.left = offset.left + \"px\";\r\n\t\t\tdocument.body.appendChild(listEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setCurrentItem(item, showInputValue){\r\n\t\tif(currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"active\");\r\n\t\t}\r\n\r\n\t\tcurrentItem = item;\r\n\r\n\t\tif(item && item.element){\r\n\t\t\titem.element.classList.add(\"active\");\r\n\t\t}\r\n\r\n\t\tif(item && item.element && item.element.scrollIntoView){\r\n\t\t\titem.element.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'start'});\r\n\t\t}\r\n\t}\r\n\r\n\tfunction hideList(){\r\n\t\tif(listEl.parentNode){\r\n\t\t\tlistEl.parentNode.removeChild(listEl);\r\n\t\t}\r\n\r\n\t\tremoveScrollListener();\r\n\t}\r\n\r\n\r\n\tfunction cancelItem(){\r\n\t\thideList();\r\n\t\tcancel();\r\n\t}\r\n\r\n\tfunction removeScrollListener() {\r\n\t\tself.table.rowManager.element.removeEventListener(\"scroll\", cancelItem);\r\n\t}\r\n\r\n\t//allow key based navigation\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tvar index;\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tindex = displayItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index > 0){\r\n\t\t\t\t\tsetCurrentItem(displayItems[index - 1]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tsetCurrentItem(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 40: //down arrow\r\n\r\n\t\t\tindex = displayItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index < displayItems.length - 1)){\r\n\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index < displayItems.length - 1){\r\n\t\t\t\t\tif(index == -1){\r\n\t\t\t\t\t\tsetCurrentItem(displayItems[0]);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsetCurrentItem(displayItems[index + 1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\t// e.preventDefault();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\tchooseItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancelItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 36: //home\r\n\t\t\tcase 35: //end\r\n\t\t\t//prevent table navigation while using input element\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"keyup\", function(e){\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //up arrow\r\n\t\t\tcase 40: //right arrow\r\n\t\t\tcase 13: //enter\r\n\t\t\tcase 27: //escape\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tfilterList(input.value);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\tinput.addEventListener(\"search\", function(e){\r\n\t\tfilterList(input.value);\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tif(blurable){\r\n\t\t\tchooseItem();\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"focus\", function(e){\r\n\t\tvar value = initialDisplayValue;\r\n\t\tgenUniqueColumnValues();\r\n\t\tshowList();\r\n\t\tinput.value = value;\r\n\t\tfilterList(value, true);\r\n\t});\r\n\r\n\r\n\tonRendered(function(){\r\n\t\tinput.style.height = \"100%\";\r\n\t\tinput.focus({preventScroll: true});\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\tsetTimeout(() => {\r\n\t\tthis.table.rowManager.element.addEventListener(\"scroll\", cancelItem);\r\n\t}, 10);\r\n\r\n\tgenUniqueColumnValues();\r\n\tinput.value = initialDisplayValue;\r\n\tfilterList(initialDisplayValue, true);\r\n\r\n\treturn input;\r\n};","//star rating\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\telement = cell.getElement(),\r\n\tvalue = cell.getValue(),\r\n\tmaxStars = element.getElementsByTagName(\"svg\").length || 5,\r\n\tsize = element.getElementsByTagName(\"svg\")[0] ? element.getElementsByTagName(\"svg\")[0].getAttribute(\"width\") : 14,\r\n\tstars = [],\r\n\tstarsHolder = document.createElement(\"div\"),\r\n\tstar = document.createElementNS('http://www.w3.org/2000/svg', \"svg\");\r\n\r\n\r\n\t//change star type\r\n\tfunction starChange(val){\r\n\t\tstars.forEach(function(star, i){\r\n\t\t\tif(i < val){\r\n\t\t\t\tif(self.table.browser == \"ie\"){\r\n\t\t\t\t\tstar.setAttribute(\"class\", \"tabulator-star-active\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tstar.classList.replace(\"tabulator-star-inactive\", \"tabulator-star-active\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstar.innerHTML = '';\r\n\t\t\t}else{\r\n\t\t\t\tif(self.table.browser == \"ie\"){\r\n\t\t\t\t\tstar.setAttribute(\"class\", \"tabulator-star-inactive\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tstar.classList.replace(\"tabulator-star-active\", \"tabulator-star-inactive\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstar.innerHTML = '';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//build stars\r\n\tfunction buildStar(i){\r\n\r\n\t\tvar starHolder = document.createElement(\"span\");\r\n\t\tvar nextStar = star.cloneNode(true);\r\n\r\n\t\tstars.push(nextStar);\r\n\r\n\t\tstarHolder.addEventListener(\"mouseenter\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tstarChange(i);\r\n\t\t});\r\n\r\n\t\tstarHolder.addEventListener(\"mousemove\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t});\r\n\r\n\t\tstarHolder.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tsuccess(i);\r\n\t\t\telement.blur();\r\n\t\t});\r\n\r\n\t\tstarHolder.appendChild(nextStar);\r\n\t\tstarsHolder.appendChild(starHolder);\r\n\r\n\t}\r\n\r\n\t//handle keyboard navigation value change\r\n\tfunction changeValue(val){\r\n\t\tvalue = val;\r\n\t\tstarChange(val);\r\n\t}\r\n\r\n\t//style cell\r\n\telement.style.whiteSpace = \"nowrap\";\r\n\telement.style.overflow = \"hidden\";\r\n\telement.style.textOverflow = \"ellipsis\";\r\n\r\n\t//style holding element\r\n\tstarsHolder.style.verticalAlign = \"middle\";\r\n\tstarsHolder.style.display = \"inline-block\";\r\n\tstarsHolder.style.padding = \"4px\";\r\n\r\n\t//style star\r\n\tstar.setAttribute(\"width\", size);\r\n\tstar.setAttribute(\"height\", size);\r\n\tstar.setAttribute(\"viewBox\", \"0 0 512 512\");\r\n\tstar.setAttribute(\"xml:space\", \"preserve\");\r\n\tstar.style.padding = \"0 1px\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tstarsHolder.setAttribute(key, starsHolder.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tstarsHolder.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//create correct number of stars\r\n\tfor(var i=1;i<= maxStars;i++){\r\n\t\tbuildStar(i);\r\n\t}\r\n\r\n\t//ensure value does not exceed number of stars\r\n\tvalue = Math.min(parseInt(value), maxStars);\r\n\r\n\t// set initial styling of stars\r\n\tstarChange(value);\r\n\r\n\tstarsHolder.addEventListener(\"mousemove\", function(e){\r\n\t\tstarChange(0);\r\n\t});\r\n\r\n\tstarsHolder.addEventListener(\"click\", function(e){\r\n\t\tsuccess(0);\r\n\t});\r\n\r\n\telement.addEventListener(\"blur\", function(e){\r\n\t\tcancel();\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\telement.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 39: //right arrow\r\n\t\t\tchangeValue(value + 1);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tchangeValue(value - 1);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\tsuccess(value);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\treturn starsHolder;\r\n};","//draggable progress bar\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar element = cell.getElement(),\r\n\tmax = typeof editorParams.max === \"undefined\" ? ((element.getElementsByTagName(\"div\")[0] && element.getElementsByTagName(\"div\")[0].getAttribute(\"max\")) || 100) : editorParams.max,\r\n\tmin = typeof editorParams.min === \"undefined\" ? ((element.getElementsByTagName(\"div\")[0] && element.getElementsByTagName(\"div\")[0].getAttribute(\"min\")) || 0) : editorParams.min,\r\n\tpercent = (max - min) / 100,\r\n\tvalue = cell.getValue() || 0,\r\n\thandle = document.createElement(\"div\"),\r\n\tbar = document.createElement(\"div\"),\r\n\tmouseDrag, mouseDragWidth;\r\n\r\n\t//set new value\r\n\tfunction updateValue(){\r\n\t\tvar style = window.getComputedStyle(element, null);\r\n\r\n\t\tvar calcVal = (percent * Math.round(bar.offsetWidth / ((element.clientWidth - parseInt(style.getPropertyValue(\"padding-left\")) - parseInt(style.getPropertyValue(\"padding-right\")))/100))) + min;\r\n\t\tsuccess(calcVal);\r\n\t\telement.setAttribute(\"aria-valuenow\", calcVal);\r\n\t\telement.setAttribute(\"aria-label\", value);\r\n\t}\r\n\r\n\t//style handle\r\n\thandle.style.position = \"absolute\";\r\n\thandle.style.right = \"0\";\r\n\thandle.style.top = \"0\";\r\n\thandle.style.bottom = \"0\";\r\n\thandle.style.width = \"5px\";\r\n\thandle.classList.add(\"tabulator-progress-handle\");\r\n\r\n\t//style bar\r\n\tbar.style.display = \"inline-block\";\r\n\tbar.style.position = \"relative\";\r\n\t// bar.style.top = \"8px\";\r\n\t// bar.style.bottom = \"8px\";\r\n\t// bar.style.left = \"4px\";\r\n\t// bar.style.marginRight = \"4px\";\r\n\tbar.style.height = \"100%\";\r\n\tbar.style.backgroundColor = \"#488CE9\";\r\n\tbar.style.maxWidth = \"100%\";\r\n\tbar.style.minWidth = \"0%\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tbar.setAttribute(key, bar.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tbar.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//style cell\r\n\telement.style.padding = \"4px 4px\";\r\n\r\n\t//make sure value is in range\r\n\tvalue = Math.min(parseFloat(value), max);\r\n\tvalue = Math.max(parseFloat(value), min);\r\n\r\n\t//workout percentage\r\n\tvalue = Math.round((value - min) / percent);\r\n\t// bar.style.right = value + \"%\";\r\n\tbar.style.width = value + \"%\";\r\n\r\n\telement.setAttribute(\"aria-valuemin\", min);\r\n\telement.setAttribute(\"aria-valuemax\", max);\r\n\r\n\tbar.appendChild(handle);\r\n\r\n\thandle.addEventListener(\"mousedown\", function(e){\r\n\t\tmouseDrag = e.screenX;\r\n\t\tmouseDragWidth = bar.offsetWidth;\r\n\t});\r\n\r\n\thandle.addEventListener(\"mouseover\", function(){\r\n\t\thandle.style.cursor = \"ew-resize\";\r\n\t});\r\n\r\n\telement.addEventListener(\"mousemove\", function(e){\r\n\t\tif(mouseDrag){\r\n\t\t\tbar.style.width = (mouseDragWidth + e.screenX - mouseDrag) + \"px\";\r\n\t\t}\r\n\t});\r\n\r\n\telement.addEventListener(\"mouseup\", function(e){\r\n\t\tif(mouseDrag){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\r\n\t\t\tmouseDrag = false;\r\n\t\t\tmouseDragWidth = false;\r\n\r\n\t\t\tupdateValue();\r\n\t\t}\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\telement.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.preventDefault();\r\n\t\t\tbar.style.width = (bar.clientWidth + element.clientWidth/100) + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\te.preventDefault();\r\n\t\t\tbar.style.width = (bar.clientWidth - element.clientWidth/100) + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 9: //tab\r\n\t\t\tcase 13: //enter\r\n\t\t\tupdateValue();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t}\r\n\t});\r\n\r\n\telement.addEventListener(\"blur\", function(){\r\n\t\tcancel();\r\n\t});\r\n\r\n\treturn bar;\r\n};","//checkbox\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar value = cell.getValue(),\r\n\tinput = document.createElement(\"input\"),\r\n\ttristate = editorParams.tristate,\r\n\tindetermValue = typeof editorParams.indeterminateValue === \"undefined\" ? null : editorParams.indeterminateValue,\r\n\tindetermState = false;\r\n\r\n\tinput.setAttribute(\"type\", \"checkbox\");\r\n\tinput.style.marginTop = \"5px\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = value;\r\n\r\n\tif(tristate && (typeof value === \"undefined\" || value === indetermValue || value === \"\")){\r\n\t\tindetermState = true;\r\n\t\tinput.indeterminate = true;\r\n\t}\r\n\r\n\tif(this.table.browser != \"firefox\"){ //prevent blur issue on mac firefox\r\n\t\tonRendered(function(){\r\n\t\t\tinput.focus({preventScroll: true});\r\n\t\t});\r\n\t}\r\n\r\n\tinput.checked = value === true || value === \"true\" || value === \"True\" || value === 1;\r\n\r\n\tonRendered(function(){\r\n\t\tinput.focus();\r\n\t});\r\n\r\n\tfunction setValue(blur){\r\n\t\tif(tristate){\r\n\t\t\tif(!blur){\r\n\t\t\t\tif(input.checked && !indetermState){\r\n\t\t\t\t\tinput.checked = false;\r\n\t\t\t\t\tinput.indeterminate = true;\r\n\t\t\t\t\tindetermState = true;\r\n\t\t\t\t\treturn indetermValue;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tindetermState = false;\r\n\t\t\t\t\treturn input.checked;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(indetermState){\r\n\t\t\t\t\treturn indetermValue;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn input.checked;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn input.checked;\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur\r\n\tinput.addEventListener(\"change\", function(e){\r\n\t\tsuccess(setValue());\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tsuccess(setValue(true));\r\n\t});\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tif(e.keyCode == 13){\r\n\t\t\tsuccess(setValue());\r\n\t\t}\r\n\t\tif(e.keyCode == 27){\r\n\t\t\tcancel();\r\n\t\t}\r\n\t});\r\n\r\n\treturn input;\r\n};","import input from './editors/input.js';\r\nimport textarea from './editors/textarea.js';\r\nimport number from './editors/number.js';\r\nimport range from './editors/range.js';\r\nimport select from './editors/select.js';\r\nimport autocomplete from './editors/autocomplete.js';\r\nimport star from './editors/star.js';\r\nimport progress from './editors/progress.js';\r\nimport tickCross from './editors/tickCross.js';\r\n\r\nexport default {\r\n\tinput:input,\r\n\ttextarea:textarea,\r\n number:number,\r\n range:range,\r\n\tselect:select,\r\n\tautocomplete:autocomplete,\r\n\tstar:star,\r\n\tprogress:progress,\r\n\ttickCross:tickCross,\r\n};","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defaultEditors from './defaults/editors.js';\r\n\r\nclass Edit extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.currentCell = false; //hold currently editing cell\r\n\t\tthis.mouseClick = false; //hold mousedown state to prevent click binding being overriden by editor opening\r\n\t\tthis.recursionBlock = false; //prevent focus recursion\r\n\t\tthis.invalidEdit = false;\r\n\t\tthis.editedCells = [];\r\n\r\n\t\tthis.editors = Edit.editors;\r\n\r\n\t\tthis.registerColumnOption(\"editable\");\r\n\t\tthis.registerColumnOption(\"editor\");\r\n\t\tthis.registerColumnOption(\"editorParams\");\r\n\r\n\t\tthis.registerColumnOption(\"cellEditing\");\r\n\t\tthis.registerColumnOption(\"cellEdited\");\r\n\t\tthis.registerColumnOption(\"cellEditCancelled\");\r\n\r\n\t\tthis.registerTableFunction(\"getEditedCells\", this.getEditedCells.bind(this));\r\n\t\tthis.registerTableFunction(\"clearCellEdited\", this.clearCellEdited.bind(this));\r\n\t\tthis.registerTableFunction(\"navigatePrev\", this.navigatePrev.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateNext\", this.navigateNext.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateLeft\", this.navigateLeft.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateRight\", this.navigateRight.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateUp\", this.navigateUp.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateDown\", this.navigateDown.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"isEdited\", this.cellisEdited.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"clearEdited\", this.clearEdited.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"edit\", this.editCell.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"cancelEdit\", this.cellCancelEdit.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigatePrev\", this.navigatePrev.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateNext\", this.navigateNext.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateLeft\", this.navigateLeft.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateRight\", this.navigateRight.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateUp\", this.navigateUp.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateDown\", this.navigateDown.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-init\", this.bindEditor.bind(this));\r\n\t\tthis.subscribe(\"cell-delete\", this.clearEdited.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumnCheck.bind(this));\r\n\t\tthis.subscribe(\"column-delete\", this.columnDeleteCheck.bind(this));\r\n\t\tthis.subscribe(\"row-deleting\", this.rowDeleteCheck.bind(this));\r\n\t\tthis.subscribe(\"data-refreshing\", this.cancelEdit.bind(this));\r\n\r\n\t\tthis.subscribe(\"keybinding-nav-prev\", this.navigatePrev.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-next\", this.keybindingNavigateNext.bind(this));\r\n\t\tthis.subscribe(\"keybinding-nav-left\", this.navigateLeft.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-right\", this.navigateRight.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-up\", this.navigateUp.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-down\", this.navigateDown.bind(this, undefined));\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t////// Keybinding Functions ///////\r\n\t///////////////////////////////////\r\n\r\n\tkeybindingNavigateNext(e){\r\n\t\tvar cell = this.currentCell,\r\n\t\tnewRow = this.options(\"tabEndNewRow\");\r\n\r\n\t\tif(cell){\r\n\t\t\tif(!this.navigateNext(cell, e)){\r\n\t\t\t\tif(newRow){\r\n\t\t\t\t\tcell.getElement().firstChild.blur();\r\n\r\n\t\t\t\t\tif(newRow === true){\r\n\t\t\t\t\t\tnewRow = this.table.addRow({})\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(typeof newRow == \"function\"){\r\n\t\t\t\t\t\t\tnewRow = this.table.addRow(newRow(cell.row.getComponent()))\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnewRow = this.table.addRow(Object.assign({}, newRow));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tnewRow.then(() => {\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tcell.getComponent().navigateNext();\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Cell Functions //////////\r\n\t///////////////////////////////////\r\n\r\n\tcellisEdited(cell){\r\n\t\treturn !! cell.modules.edit && cell.modules.edit.edited;\r\n\t}\r\n\r\n\tcellCancelEdit(cell){\r\n\t\tif(cell === this.currentCell){\r\n\t\t\tthis.table.modules.edit.cancelEdit();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cancel Editor Error - This cell is not currently being edited \");\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\tclearCellEdited(cells){\r\n\t\tif(!cells){\r\n\t\t\tcells = this.table.modules.edit.getEditedCells();\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\r\n\t\tcells.forEach((cell) => {\r\n\t\t\tthis.table.modules.edit.clearEdited(cell._getSelf());\r\n\t\t});\r\n\t}\r\n\r\n\tnavigatePrev(cell = this.currentCell, e){\r\n\t\tvar nextCell, prevRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tnextCell = this.navigateLeft();\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tprevRow = this.table.rowManager.prevDisplayRow(cell.row, true);\r\n\r\n\t\t\t\tif(prevRow){\r\n\t\t\t\t\tnextCell = this.findNextEditableCell(prevRow, prevRow.cells.length);\r\n\r\n\t\t\t\t\tif(nextCell){\r\n\t\t\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateNext(cell = this.currentCell, e){\r\n\t\tvar nextCell, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tnextCell = this.navigateRight();\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\r\n\r\n\t\t\t\tif(nextRow){\r\n\t\t\t\t\tnextCell = this.findNextEditableCell(nextRow, -1);\r\n\r\n\t\t\t\t\tif(nextCell){\r\n\t\t\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateLeft(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findPrevEditableCell(cell.row, index);\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateRight(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findNextEditableCell(cell.row, index);\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateUp(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.prevDisplayRow(cell.row, true);\r\n\r\n\t\t\tif(nextRow){\r\n\t\t\t\tnextRow.cells[index].getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateDown(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\r\n\r\n\t\t\tif(nextRow){\r\n\t\t\t\tnextRow.cells[index].getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfindNextEditableCell(row, index){\r\n\t\tvar nextCell = false;\r\n\r\n\t\tif(index < row.cells.length-1){\r\n\t\t\tfor(var i = index+1; i < row.cells.length; i++){\r\n\t\t\t\tlet cell = row.cells[i];\r\n\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tlet allowEdit = true;\r\n\r\n\t\t\t\t\tif(typeof cell.column.modules.edit.check == \"function\"){\r\n\t\t\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(allowEdit){\r\n\t\t\t\t\t\tnextCell = cell;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn nextCell;\r\n\t}\r\n\r\n\tfindPrevEditableCell(row, index){\r\n\t\tvar prevCell = false;\r\n\r\n\t\tif(index > 0){\r\n\t\t\tfor(var i = index-1; i >= 0; i--){\r\n\t\t\t\tlet cell = row.cells[i],\r\n\t\t\t\tallowEdit = true;\r\n\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tif(typeof cell.column.modules.edit.check == \"function\"){\r\n\t\t\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(allowEdit){\r\n\t\t\t\t\t\tprevCell = cell;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn prevCell;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(typeof column.definition.editor !== \"undefined\"){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\tcolumnDeleteCheck(column){\r\n\t\tif(this.currentCell && this.currentCell.column === column){\r\n\t\t\tthis.cancelEdit();\r\n\t\t}\r\n\t}\r\n\r\n\trowDeleteCheck(row){\r\n\t\tif(this.currentCell && this.currentCell.row === row){\r\n\t\t\tthis.cancelEdit();\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column editor\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = {\r\n\t\t\teditor:false,\r\n\t\t\tblocked:false,\r\n\t\t\tcheck:column.definition.editable,\r\n\t\t\tparams:column.definition.editorParams || {}\r\n\t\t};\r\n\r\n\t\t//set column editor\r\n\t\tswitch(typeof column.definition.editor){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(this.editors[column.definition.editor]){\r\n\t\t\t\tconfig.editor = this.editors[column.definition.editor];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Editor Error - No such editor found: \", column.definition.editor);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tconfig.editor = column.definition.editor;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"boolean\":\r\n\t\t\tif(column.definition.editor === true){\r\n\t\t\t\tif(typeof column.definition.formatter !== \"function\"){\r\n\t\t\t\t\tif(this.editors[column.definition.formatter]){\r\n\t\t\t\t\t\tconfig.editor = this.editors[column.definition.formatter];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconfig.editor = this.editors[\"input\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Editor Error - Cannot auto lookup editor for a custom formatter: \", column.definition.formatter);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(config.editor){\r\n\t\t\tcolumn.modules.edit = config;\r\n\t\t}\r\n\t}\r\n\r\n\tgetCurrentCell(){\r\n\t\treturn this.currentCell ? this.currentCell.getComponent() : false;\r\n\t}\r\n\r\n\tclearEditor(cancel){\r\n\t\tvar cell = this.currentCell,\r\n\t\tcellEl;\r\n\r\n\t\tthis.invalidEdit = false;\r\n\r\n\t\tif(cell){\r\n\t\t\tthis.currentCell = false;\r\n\r\n\t\t\tcellEl = cell.getElement();\r\n\r\n\t\t\tif(cancel){\r\n\t\t\t\tif(cell.column.modules.validate && this.table.modExists(\"validate\")){\r\n\t\t\t\t\tthis.table.modules.validate.cellValidate(cell);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcellEl.classList.remove(\"tabulator-validation-fail\");\r\n\t\t\t}\r\n\r\n\t\t\tcellEl.classList.remove(\"tabulator-editing\");\r\n\r\n\t\t\twhile(cellEl.firstChild) cellEl.removeChild(cellEl.firstChild);\r\n\r\n\t\t\tcell.row.getElement().classList.remove(\"tabulator-row-editing\");\r\n\t\t}\r\n\t}\r\n\r\n\tcancelEdit(){\r\n\t\tif(this.currentCell){\r\n\t\t\tvar cell = this.currentCell;\r\n\t\t\tvar component = this.currentCell.getComponent();\r\n\r\n\t\t\tthis.clearEditor(true);\r\n\t\t\tcell.setValueActual(cell.getValue());\r\n\t\t\tcell.cellRendered();\r\n\r\n\t\t\tif(cell.column.definition.editor == \"textarea\" || cell.column.definition.variableHeight){\r\n\t\t\t\tcell.row.normalizeHeight(true);\r\n\t\t\t}\r\n\r\n\t\t\tif(cell.column.definition.cellEditCancelled){\r\n\t\t\t\tcell.column.definition.cellEditCancelled.call(this.table, component);\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"edit-cancelled\", cell);\r\n\t\t\tthis.dispatchExternal(\"cellEditCancelled\", component);\r\n\t\t}\r\n\t}\r\n\r\n\t//return a formatted value for a cell\r\n\tbindEditor(cell){\r\n\t\tif(cell.column.modules.edit){\r\n\t\t\tvar self = this,\r\n\t\t\telement = cell.getElement(true);\r\n\r\n\t\t\telement.setAttribute(\"tabindex\", 0);\r\n\r\n\t\t\telement.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(!element.classList.contains(\"tabulator-editing\")){\r\n\t\t\t\t\telement.focus({preventScroll: true});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\telement.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif (e.button === 2) {\r\n\t\t\t\t\te.preventDefault();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.mouseClick = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\telement.addEventListener(\"focus\", function(e){\r\n\t\t\t\tif(!self.recursionBlock){\r\n\t\t\t\t\tself.edit(cell, e, false);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tfocusCellNoEvent(cell, block){\r\n\t\tthis.recursionBlock = true;\r\n\r\n\t\tif(!(block && this.table.browser === \"ie\")){\r\n\t\t\tcell.getElement().focus({preventScroll: true});\r\n\t\t}\r\n\r\n\t\tthis.recursionBlock = false;\r\n\t}\r\n\r\n\teditCell(cell, forceEdit){\r\n\t\tthis.focusCellNoEvent(cell);\r\n\t\tthis.edit(cell, false, forceEdit);\r\n\t}\r\n\r\n\tfocusScrollAdjust(cell){\r\n\t\tif(this.table.rowManager.getRenderMode() == \"virtual\"){\r\n\t\t\tvar topEdge = this.table.rowManager.element.scrollTop,\r\n\t\t\tbottomEdge = this.table.rowManager.element.clientHeight + this.table.rowManager.element.scrollTop,\r\n\t\t\trowEl = cell.row.getElement(),\r\n\t\t\toffset = rowEl.offsetTop;\r\n\r\n\t\t\tif(rowEl.offsetTop < topEdge){\r\n\t\t\t\tthis.table.rowManager.element.scrollTop -= (topEdge - rowEl.offsetTop);\r\n\t\t\t}else{\r\n\t\t\t\tif(rowEl.offsetTop + rowEl.offsetHeight > bottomEdge){\r\n\t\t\t\t\tthis.table.rowManager.element.scrollTop += (rowEl.offsetTop + rowEl.offsetHeight - bottomEdge);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar leftEdge = this.table.rowManager.element.scrollLeft,\r\n\t\t\trightEdge = this.table.rowManager.element.clientWidth + this.table.rowManager.element.scrollLeft,\r\n\t\t\tcellEl = cell.getElement(),\r\n\t\t\toffset = cellEl.offsetLeft;\r\n\r\n\t\t\tif(this.table.modExists(\"frozenColumns\")){\r\n\t\t\t\tleftEdge += parseInt(this.table.modules.frozenColumns.leftMargin);\r\n\t\t\t\trightEdge -= parseInt(this.table.modules.frozenColumns.rightMargin);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.renderHorizontal === \"virtual\"){\r\n\t\t\t\tleftEdge -= parseInt(this.table.columnManager.renderer.vDomPadLeft);\r\n\t\t\t\trightEdge -= parseInt(this.table.columnManager.renderer.vDomPadLeft);\r\n\t\t\t}\r\n\r\n\t\t\tif(cellEl.offsetLeft < leftEdge){\r\n\r\n\t\t\t\tthis.table.rowManager.element.scrollLeft -= (leftEdge - cellEl.offsetLeft);\r\n\t\t\t}else{\r\n\t\t\t\tif(cellEl.offsetLeft + cellEl.offsetWidth > rightEdge){\r\n\t\t\t\t\tthis.table.rowManager.element.scrollLeft += (cellEl.offsetLeft + cellEl.offsetWidth - rightEdge);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tedit(cell, e, forceEdit){\r\n\t\tvar self = this,\r\n\t\tallowEdit = true,\r\n\t\trendered = function(){},\r\n\t\telement = cell.getElement(),\r\n\t\tcellEditor, component, params;\r\n\r\n\t\t//prevent editing if another cell is refusing to leave focus (eg. validation fail)\r\n\t\tif(this.currentCell){\r\n\t\t\tif(!this.invalidEdit){\r\n\t\t\t\tthis.cancelEdit();\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//handle successfull value change\r\n\t\tfunction success(value){\r\n\t\t\tif(self.currentCell === cell){\r\n\t\t\t\tvar valid = true;\r\n\r\n\t\t\t\tif(cell.column.modules.validate && self.table.modExists(\"validate\") && self.table.options.validationMode != \"manual\"){\r\n\t\t\t\t\tvalid = self.table.modules.validate.validate(cell.column.modules.validate, cell, value);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(valid === true || self.table.options.validationMode === \"highlight\"){\r\n\t\t\t\t\tself.clearEditor();\r\n\r\n\r\n\t\t\t\t\tif(!cell.modules.edit){\r\n\t\t\t\t\t\tcell.modules.edit = {};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcell.modules.edit.edited = true;\r\n\r\n\t\t\t\t\tif(self.editedCells.indexOf(cell) == -1){\r\n\t\t\t\t\t\tself.editedCells.push(cell);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcell.setValue(value, true);\r\n\r\n\t\t\t\t\tif(valid !== true){\r\n\t\t\t\t\t\telement.classList.add(\"tabulator-validation-fail\");\r\n\t\t\t\t\t\tself.table.externalEvents.dispatch(\"validationFailed\", cell.getComponent(), value, valid);\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.invalidEdit = true;\r\n\t\t\t\t\telement.classList.add(\"tabulator-validation-fail\");\r\n\t\t\t\t\tself.focusCellNoEvent(cell, true);\r\n\t\t\t\t\trendered();\r\n\t\t\t\t\tself.table.externalEvents.dispatch(\"validationFailed\", cell.getComponent(), value, valid);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t// console.warn(\"Edit Success Error - cannot call success on a cell that is no longer being edited\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//handle aborted edit\r\n\t\tfunction cancel(){\r\n\t\t\tif(self.currentCell === cell){\r\n\t\t\t\tself.cancelEdit();\r\n\t\t\t}else{\r\n\t\t\t\t// console.warn(\"Edit Success Error - cannot call cancel on a cell that is no longer being edited\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\trendered = callback;\r\n\t\t}\r\n\r\n\t\tif(!cell.column.modules.edit.blocked){\r\n\t\t\tif(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t}\r\n\r\n\t\t\tswitch(typeof cell.column.modules.edit.check){\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tallowEdit = cell.column.modules.edit.check;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(allowEdit || forceEdit){\r\n\r\n\t\t\t\tself.cancelEdit();\r\n\r\n\t\t\t\tself.currentCell = cell;\r\n\r\n\t\t\t\tthis.focusScrollAdjust(cell);\r\n\r\n\t\t\t\tcomponent = cell.getComponent();\r\n\r\n\t\t\t\tif(this.mouseClick){\r\n\t\t\t\t\tthis.mouseClick = false;\r\n\r\n\t\t\t\t\tif(cell.column.definition.cellClick){\r\n\t\t\t\t\t\tcell.column.definition.cellClick.call(this.table, e, component);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(cell.column.definition.cellEditing){\r\n\t\t\t\t\tcell.column.definition.cellEditing.call(this.table, component);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.dispatchExternal(\"cellEditing\", component);\r\n\r\n\t\t\t\tparams = typeof cell.column.modules.edit.params === \"function\" ? cell.column.modules.edit.params(component) : cell.column.modules.edit.params;\r\n\r\n\t\t\t\tcellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params);\r\n\r\n\t\t\t\t//if editor returned, add to DOM, if false, abort edit\r\n\t\t\t\tif(cellEditor !== false){\r\n\r\n\t\t\t\t\tif(cellEditor instanceof Node){\r\n\t\t\t\t\t\telement.classList.add(\"tabulator-editing\");\r\n\t\t\t\t\t\tcell.row.getElement().classList.add(\"tabulator-row-editing\");\r\n\t\t\t\t\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\t\t\t\t\t\telement.appendChild(cellEditor);\r\n\r\n\t\t\t\t\t\t//trigger onRendered Callback\r\n\t\t\t\t\t\trendered();\r\n\r\n\t\t\t\t\t\t//prevent editing from triggering rowClick event\r\n\t\t\t\t\t\tvar children = element.children;\r\n\r\n\t\t\t\t\t\tfor (var i = 0; i < children.length; i++) {\r\n\t\t\t\t\t\t\tchildren[i].addEventListener(\"click\", function(e){\r\n\t\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Edit Error - Editor should return an instance of Node, the editor returned:\", cellEditor);\r\n\t\t\t\t\t\telement.blur();\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.blur();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tthis.mouseClick = false;\r\n\t\t\t\telement.blur();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.mouseClick = false;\r\n\t\t\telement.blur();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tgetEditedCells(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.editedCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tclearEdited(cell){\r\n\t\tvar editIndex;\r\n\r\n\t\tif(cell.modules.edit && cell.modules.edit.edited){\r\n\t\t\tcell.modules.edit.edited = false;\r\n\r\n\t\t\tif(cell.modules.validate){\r\n\t\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\teditIndex = this.editedCells.indexOf(cell);\r\n\r\n\t\tif(editIndex > -1){\r\n\t\t\tthis.editedCells.splice(editIndex, 1);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nEdit.moduleName = \"edit\";\r\n\r\n//load defaults\r\nEdit.editors = defaultEditors;\r\n\r\n\r\nexport default Edit;\r\n","class ExportRow{\r\n\tconstructor(type, columns, component, indent){\r\n\t\tthis.type = type;\r\n\t\tthis.columns = columns;\r\n\t\tthis.component = component || false;\r\n\t\tthis.indent = indent || 0;\r\n\t}\r\n}\r\n\r\nexport default ExportRow;","class ExportColumn{\r\n\tconstructor(value, component, width, height, depth){\r\n\t\tthis.value = value;\r\n\t\tthis.component = component || false;\r\n\t\tthis.width = width;\r\n\t\tthis.height = height;\r\n\t\tthis.depth = depth;\r\n\t}\r\n}\r\n\r\nexport default ExportColumn;","import Module from '../../core/Module.js';\r\n\r\nimport ExportRow from './ExportRow.js';\r\nimport ExportColumn from './ExportColumn.js';\r\n\r\nclass Export extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.config = {};\r\n\t\tthis.cloneTableStyle = true;\r\n\t\tthis.colVisProp = \"\";\r\n\r\n\t\tthis.registerTableOption(\"htmlOutputConfig\", false); //html outypu config\r\n\r\n\t\tthis.registerColumnOption(\"htmlOutput\");\r\n\t\tthis.registerColumnOption(\"titleHtmlOutput\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"getHtml\", this.getHtml.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tgenerateExportList(config, style, range, colVisProp){\r\n\t\tthis.cloneTableStyle = style;\r\n\t\tthis.config = config || {};\r\n\t\tthis.colVisProp = colVisProp;\r\n\r\n\t\tvar headers = this.config.columnHeaders !== false ? this.headersToExportRows(this.generateColumnGroupHeaders()) : [];\r\n\t\tvar body = this.bodyToExportRows(this.rowLookup(range));\r\n\r\n\t\treturn headers.concat(body);\r\n\t}\r\n\r\n\tgenereateTable(config, style, range, colVisProp){\r\n\t\tvar list = this.generateExportList(config, style, range, colVisProp);\r\n\r\n\t\treturn this.genereateTableElement(list);\r\n\t}\r\n\r\n\trowLookup(range){\r\n\t\tvar rows = [];\r\n\r\n\t\tif(typeof range == \"function\"){\r\n\t\t\trange.call(this.table).forEach((row) =>{\r\n\t\t\t\trow = this.table.rowManager.findRow(row);\r\n\r\n\t\t\t\tif(row){\r\n\t\t\t\t\trows.push(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tswitch(range){\r\n\t\t\t\tcase true:\r\n\t\t\t\tcase \"visible\":\r\n\t\t\t\trows = this.table.rowManager.getVisibleRows(false, true);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"all\":\r\n\t\t\t\trows = this.table.rowManager.rows;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"selected\":\r\n\t\t\t\trows = this.table.modules.selectRow.selectedRows;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"active\":\r\n\t\t\t\tdefault:\r\n\t\t\t\tif(this.table.options.pagination){\r\n\t\t\t\t\trows = this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length - 2);\r\n\t\t\t\t}else{\r\n\t\t\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn Object.assign([], rows);\r\n\t}\r\n\r\n\tgenerateColumnGroupHeaders(){\r\n\t\tvar output = [];\r\n\r\n\t\tvar columns = this.config.columnGroups !== false ? this.table.columnManager.columns : this.table.columnManager.columnsByIndex;\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\tvar colData = this.processColumnGroup(column);\r\n\r\n\t\t\tif(colData){\r\n\t\t\t\toutput.push(colData);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tprocessColumnGroup(column){\r\n\t\tvar subGroups = column.columns,\r\n\t\tmaxDepth = 0,\r\n\t\ttitle = column.definition[\"title\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))] || column.definition.title;\r\n\r\n\t\tvar groupData = {\r\n\t\t\ttitle:title,\r\n\t\t\tcolumn:column,\r\n\t\t\tdepth:1,\r\n\t\t};\r\n\r\n\t\tif(subGroups.length){\r\n\t\t\tgroupData.subGroups = [];\r\n\t\t\tgroupData.width = 0;\r\n\r\n\t\t\tsubGroups.forEach((subGroup) => {\r\n\t\t\t\tvar subGroupData = this.processColumnGroup(subGroup);\r\n\r\n\t\t\t\tif(subGroupData){\r\n\t\t\t\t\tgroupData.width += subGroupData.width;\r\n\t\t\t\t\tgroupData.subGroups.push(subGroupData);\r\n\r\n\t\t\t\t\tif(subGroupData.depth > maxDepth){\r\n\t\t\t\t\t\tmaxDepth = subGroupData.depth;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tgroupData.depth += maxDepth;\r\n\r\n\t\t\tif(!groupData.width){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.columnVisCheck(column)){\r\n\t\t\t\tgroupData.width = 1;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn groupData;\r\n\t}\r\n\r\n\tcolumnVisCheck(column){\r\n\t\treturn column.definition[this.colVisProp] !== false && (column.visible || (!column.visible && column.definition[this.colVisProp]));\r\n\t}\r\n\r\n\theadersToExportRows(columns){\r\n\t\tvar headers = [],\r\n\t\theaderDepth = 0,\r\n\t\texportRows = [];\r\n\r\n\t\tfunction parseColumnGroup(column, level){\r\n\r\n\t\t\tvar depth = headerDepth - level;\r\n\r\n\t\t\tif(typeof headers[level] === \"undefined\"){\r\n\t\t\t\theaders[level] = [];\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.height = column.subGroups ? 1 : (depth - column.depth) + 1;\r\n\r\n\t\t\theaders[level].push(column);\r\n\r\n\t\t\tif(column.height > 1){\r\n\t\t\t\tfor(let i = 1; i < column.height; i ++){\r\n\r\n\t\t\t\t\tif(typeof headers[level + i] === \"undefined\"){\r\n\t\t\t\t\t\theaders[level + i] = [];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\theaders[level + i].push(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(column.width > 1){\r\n\t\t\t\tfor(let i = 1; i < column.width; i ++){\r\n\t\t\t\t\theaders[level].push(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(column.subGroups){\r\n\t\t\t\tcolumn.subGroups.forEach(function(subGroup){\r\n\t\t\t\t\tparseColumnGroup(subGroup, level+1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//calculate maximum header debth\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tif(column.depth > headerDepth){\r\n\t\t\t\theaderDepth = column.depth;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tparseColumnGroup(column,0);\r\n\t\t});\r\n\r\n\t\theaders.forEach((header) => {\r\n\t\t\tvar columns = [];\r\n\r\n\t\t\theader.forEach((col) => {\r\n\t\t\t\tif(col){\r\n\t\t\t\t\tlet title = typeof col.title === \"undefined\" ? \"\" : col.title;\r\n\t\t\t\t\tcolumns.push(new ExportColumn(title, col.column.getComponent(), col.width, col.height, col.depth));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolumns.push(null);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\texportRows.push(new ExportRow(\"header\", columns));\r\n\t\t});\r\n\r\n\t\treturn exportRows;\r\n\t}\r\n\r\n\tbodyToExportRows(rows){\r\n\r\n\t\tvar columns = [];\r\n\t\tvar exportRows = [];\r\n\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tif (this.columnVisCheck(column)) {\r\n\t\t\t\tcolumns.push(column.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(this.config.columnCalcs !== false && this.table.modExists(\"columnCalcs\")){\r\n\t\t\tif(this.table.modules.columnCalcs.topInitialized){\r\n\t\t\t\trows.unshift(this.table.modules.columnCalcs.topRow);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modules.columnCalcs.botInitialized){\r\n\t\t\t\trows.push(this.table.modules.columnCalcs.botRow);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\trows = rows.filter((row) => {\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\treturn this.config.rowGroups !== false;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\treturn this.config.columnCalcs !== false;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\treturn !(this.table.options.dataTree && this.config.dataTree === false && row.modules.dataTree.parent);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\trows.forEach((row, i) => {\r\n\t\t\tvar rowData = row.getData(this.colVisProp);\r\n\t\t\tvar exportCols = [];\r\n\t\t\tvar indent = 0;\r\n\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\tindent = row.level;\r\n\t\t\t\texportCols.push(new ExportColumn(row.key, row.getComponent(), columns.length, 1));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\" :\r\n\t\t\t\tcase \"row\" :\r\n\t\t\t\tcolumns.forEach((col) => {\r\n\t\t\t\t\texportCols.push(new ExportColumn(col._column.getFieldValue(rowData), col, 1, 1));\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\r\n\t\t\t\t\tindent = row.modules.dataTree.index;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\texportRows.push(new ExportRow(row.type, exportCols, row.getComponent(), indent));\r\n\t\t});\r\n\r\n\t\treturn exportRows;\r\n\t}\r\n\r\n\tgenereateTableElement(list){\r\n\t\tvar table = document.createElement(\"table\"),\r\n\t\theaderEl = document.createElement(\"thead\"),\r\n\t\tbodyEl = document.createElement(\"tbody\"),\r\n\t\tstyles = this.lookupTableStyles(),\r\n\t\trowFormatter = this.table.options[\"rowFormatter\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))],\r\n\t\tsetup = {};\r\n\r\n\t\tsetup.rowFormatter = rowFormatter !== null ? rowFormatter : this.table.options.rowFormatter;\r\n\r\n\t\tif(this.table.options.dataTree &&this.config.dataTree !== false && this.table.modExists(\"columnCalcs\")){\r\n\t\t\tsetup.treeElementField = this.table.modules.dataTree.elementField;\r\n\t\t}\r\n\r\n\t\t//assign group header formatter\r\n\t\tsetup.groupHeader = this.table.options[\"groupHeader\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))];\r\n\r\n\t\tif(setup.groupHeader && !Array.isArray(setup.groupHeader)){\r\n\t\t\tsetup.groupHeader = [setup.groupHeader];\r\n\t\t}\r\n\r\n\t\ttable.classList.add(\"tabulator-print-table\");\r\n\r\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\"]);\r\n\r\n\r\n\t\tif(list.length > 1000){\r\n\t\t\tconsole.warn(\"It may take a long time to render an HTML table with more than 1000 rows\");\r\n\t\t}\r\n\r\n\t\tlist.forEach((row, i) => {\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"header\":\r\n\t\t\t\theaderEl.appendChild(this.genereateHeaderElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\tbodyEl.appendChild(this.genereateGroupElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\tbodyEl.appendChild(this.genereateCalcElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\tlet rowEl = this.genereateRowElement(row, setup, styles);\r\n\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\"]);\r\n\t\t\t\tbodyEl.appendChild(rowEl);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(headerEl.innerHTML){\r\n\t\t\ttable.appendChild(headerEl);\r\n\t\t}\r\n\r\n\t\ttable.appendChild(bodyEl);\r\n\r\n\r\n\t\tthis.mapElementStyles(this.table.element, table, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\"]);\r\n\t\treturn table;\r\n\t}\r\n\r\n\tlookupTableStyles(){\r\n\t\tvar styles = {};\r\n\r\n\t\t//lookup row styles\r\n\t\tif(this.cloneTableStyle && window.getComputedStyle){\r\n\t\t\tstyles.oddRow = this.table.element.querySelector(\".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.evenRow = this.table.element.querySelector(\".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.calcRow = this.table.element.querySelector(\".tabulator-row.tabulator-calcs\");\r\n\t\t\tstyles.firstRow = this.table.element.querySelector(\".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.firstGroup = this.table.element.getElementsByClassName(\"tabulator-group\")[0];\r\n\r\n\t\t\tif(styles.firstRow){\r\n\t\t\t\tstyles.styleCells = styles.firstRow.getElementsByClassName(\"tabulator-cell\");\r\n\t\t\t\tstyles.firstCell = styles.styleCells[0];\r\n\t\t\t\tstyles.lastCell = styles.styleCells[styles.styleCells.length - 1];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn styles;\r\n\t}\r\n\r\n\tgenereateHeaderElement(row, setup, styles){\r\n\t\tvar rowEl = document.createElement(\"tr\");\r\n\r\n\t\trow.columns.forEach((column) => {\r\n\t\t\tif(column){\r\n\t\t\t\tvar cellEl = document.createElement(\"th\");\r\n\t\t\t\tvar classNames = column.component._column.definition.cssClass ? column.component._column.definition.cssClass.split(\" \") : [];\r\n\r\n\t\t\t\tcellEl.colSpan = column.width;\r\n\t\t\t\tcellEl.rowSpan = column.height;\r\n\r\n\t\t\t\tcellEl.innerHTML = column.value;\r\n\r\n\t\t\t\tif(this.cloneTableStyle){\r\n\t\t\t\t\tcellEl.style.boxSizing = \"border-box\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tclassNames.forEach(function(className) {\r\n\t\t\t\t\tcellEl.classList.add(className);\r\n\t\t\t\t});\r\n\r\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\"]);\r\n\t\t\t\tthis.mapElementStyles(column.component._column.contentElement, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\"]);\r\n\r\n\t\t\t\tif(column.component._column.visible){\r\n\t\t\t\t\tthis.mapElementStyles(column.component.getElement(), cellEl, [\"width\"]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(column.component._column.definition.width){\r\n\t\t\t\t\t\tcellEl.style.width = column.component._column.definition.width + \"px\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(column.component._column.parent){\r\n\t\t\t\t\tthis.mapElementStyles(column.component._column.parent.groupElement, cellEl, [\"border-top\"]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowEl.appendChild(cellEl);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateGroupElement(row, setup, styles){\r\n\r\n\t\tvar rowEl = document.createElement(\"tr\"),\r\n\t\tcellEl = document.createElement(\"td\"),\r\n\t\tgroup = row.columns[0];\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-row\");\r\n\r\n\t\tif(setup.groupHeader && setup.groupHeader[row.indent]){\r\n\t\t\tgroup.value = setup.groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t}else{\r\n\t\t\tif(setup.groupHeader === false){\r\n\t\t\t\tgroup.value = group.value;\r\n\t\t\t}else{\r\n\t\t\t\tgroup.value = row.component._group.generator(group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcellEl.colSpan = group.width;\r\n\t\tcellEl.innerHTML = group.value;\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-group\");\r\n\t\trowEl.classList.add(\"tabulator-group-level-\" + row.indent);\r\n\r\n\t\tif(group.component.isVisible()){\r\n\t\t\trowEl.classList.add(\"tabulator-group-visible\");\r\n\t\t}\r\n\r\n\t\tthis.mapElementStyles(styles.firstGroup, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\r\n\t\tthis.mapElementStyles(styles.firstGroup, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\"]);\r\n\r\n\t\trowEl.appendChild(cellEl);\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateCalcElement(row, setup, styles){\r\n\t\tvar rowEl = this.genereateRowElement(row, setup, styles);\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-calcs\");\r\n\t\tthis.mapElementStyles(styles.calcRow, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateRowElement(row, setup, styles){\r\n\t\tvar rowEl = document.createElement(\"tr\");\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-row\");\r\n\r\n\t\trow.columns.forEach((col) => {\r\n\t\t\tif(col){\r\n\t\t\t\tvar cellEl = document.createElement(\"td\"),\r\n\t\t\t\tcolumn = col.component._column,\r\n\t\t\t\tindex = this.table.columnManager.findColumnIndex(column),\r\n\t\t\t\tvalue = col.value;\r\n\r\n\t\t\t\tvar cellWrapper = {\r\n\t\t\t\t\tmodules:{},\r\n\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetField:function(){\r\n\t\t\t\t\t\treturn column.definition.field;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\treturn cellEl;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetData:function(){\r\n\t\t\t\t\t\treturn row.component.getData();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\treturn row.component;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetComponent:function(){\r\n\t\t\t\t\t\treturn cellWrapper;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcolumn:column,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tvar classNames = column.definition.cssClass ? column.definition.cssClass.split(\" \") : [];\r\n\r\n\t\t\t\tclassNames.forEach(function(className) {\r\n\t\t\t\t\tcellEl.classList.add(className);\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.modExists(\"format\") && this.config.formatCells !== false){\r\n\t\t\t\t\tvalue = this.table.modules.format.formatExportValue(cellWrapper, this.colVisProp);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tvalue = JSON.stringify(value);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tvalue = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(value instanceof Node){\r\n\t\t\t\t\tcellEl.appendChild(value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcellEl.innerHTML = value;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(styles.styleCells[index] || styles.firstCell){\r\n\t\t\t\t\tthis.mapElementStyles(styles.styleCells[index] || styles.firstCell, 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\"]);\r\n\r\n\t\t\t\t\tif(column.definition.align){\r\n\t\t\t\t\t\tcellEl.style.textAlign = column.definition.align;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\r\n\t\t\t\t\tif((setup.treeElementField && setup.treeElementField == column.field) || (!setup.treeElementField && i == 0)){\r\n\t\t\t\t\t\tif(row.component._row.modules.dataTree.controlEl){\r\n\t\t\t\t\t\t\tcellEl.insertBefore(row.component._row.modules.dataTree.controlEl.cloneNode(true), cellEl.firstChild);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(row.component._row.modules.dataTree.branchEl){\r\n\t\t\t\t\t\t\tcellEl.insertBefore(row.component._row.modules.dataTree.branchEl.cloneNode(true), cellEl.firstChild);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowEl.appendChild(cellEl);\r\n\r\n\t\t\t\tif(cellWrapper.modules.format && cellWrapper.modules.format.renderedCallback){\r\n\t\t\t\t\tcellWrapper.modules.format.renderedCallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(setup.rowFormatter && this.config.formatCells !== false){\r\n\t\t\t\t\tsetup.rowFormatter(row.component);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateHTMLTable(list){\r\n\t\tvar holder = document.createElement(\"div\");\r\n\r\n\t\tholder.appendChild(this.genereateTableElement(list));\r\n\r\n\t\treturn holder.innerHTML;\r\n\t}\r\n\r\n\tgetHtml(visible, style, config, colVisProp){\r\n\t\tvar list = this.generateExportList(config || this.table.options.htmlOutputConfig, style, visible, colVisProp || \"htmlOutput\");\r\n\r\n\t\treturn this.genereateHTMLTable(list);\r\n\t}\r\n\r\n\tmapElementStyles(from, to, props){\r\n\t\tif(this.cloneTableStyle && from && to){\r\n\r\n\t\t\tvar lookup = {\r\n\t\t\t\t\"background-color\" : \"backgroundColor\",\r\n\t\t\t\t\"color\" : \"fontColor\",\r\n\t\t\t\t\"width\" : \"width\",\r\n\t\t\t\t\"font-weight\" : \"fontWeight\",\r\n\t\t\t\t\"font-family\" : \"fontFamily\",\r\n\t\t\t\t\"font-size\" : \"fontSize\",\r\n\t\t\t\t\"text-align\" : \"textAlign\",\r\n\t\t\t\t\"border-top\" : \"borderTop\",\r\n\t\t\t\t\"border-left\" : \"borderLeft\",\r\n\t\t\t\t\"border-right\" : \"borderRight\",\r\n\t\t\t\t\"border-bottom\" : \"borderBottom\",\r\n\t\t\t\t\"padding-top\" : \"paddingTop\",\r\n\t\t\t\t\"padding-left\" : \"paddingLeft\",\r\n\t\t\t\t\"padding-right\" : \"paddingRight\",\r\n\t\t\t\t\"padding-bottom\" : \"paddingBottom\",\r\n\t\t\t};\r\n\r\n\t\t\tif(window.getComputedStyle){\r\n\t\t\t\tvar fromStyle = window.getComputedStyle(from);\r\n\r\n\t\t\t\tprops.forEach(function(prop){\r\n\t\t\t\t\tto.style[lookup[prop]] = fromStyle.getPropertyValue(prop);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nExport.moduleName = \"export\";\r\n\r\nexport default Export;\r\n","export default {\r\n\r\n\t//equal to\r\n\t\"=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal == filterVal ? true : false;\r\n\t},\r\n\r\n\t//less than\r\n\t\"<\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal < filterVal ? true : false;\r\n\t},\r\n\r\n\t//less than or equal to\r\n\t\"<=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal <= filterVal ? true : false;\r\n\t},\r\n\r\n\t//greater than\r\n\t\">\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal > filterVal ? true : false;\r\n\t},\r\n\r\n\t//greater than or equal to\r\n\t\">=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal >= filterVal ? true : false;\r\n\t},\r\n\r\n\t//not equal to\r\n\t\"!=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal != filterVal ? true : false;\r\n\t},\r\n\r\n\t\"regex\":function(filterVal, rowVal, rowData, filterParams){\r\n\r\n\t\tif(typeof filterVal == \"string\"){\r\n\t\t\tfilterVal = new RegExp(filterVal);\r\n\t\t}\r\n\r\n\t\treturn filterVal.test(rowVal);\r\n\t},\r\n\r\n\t//contains the string\r\n\t\"like\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().indexOf(filterVal.toLowerCase()) > -1;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//contains the keywords\r\n\t\"keywords\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tvar keywords = filterVal.toLowerCase().split(typeof filterParams.separator === \"undefined\" ? \" \" : filterParams.separator),\r\n\t\tvalue = String(rowVal === null || typeof rowVal === \"undefined\" ? \"\" : rowVal).toLowerCase(),\r\n\t\tmatches = [];\r\n\r\n\t\tkeywords.forEach((keyword) =>{\r\n\t\t\tif(value.includes(keyword)){\r\n\t\t\t\tmatches.push(true);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn filterParams.matchAll ? matches.length === keywords.length : !!matches.length;\r\n\t},\r\n\r\n\t//starts with the string\r\n\t\"starts\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().startsWith(filterVal.toLowerCase());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//ends with the string\r\n\t\"ends\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().endsWith(filterVal.toLowerCase());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//in array\r\n\t\"in\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(Array.isArray(filterVal)){\r\n\t\t\treturn filterVal.length ? filterVal.indexOf(rowVal) > -1 : true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Filter Error - filter value is not an array:\", filterVal);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultFilters from './defaults/filters.js';\r\n\r\nclass Filter extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.filterList = []; //hold filter list\r\n\t\tthis.headerFilters = {}; //hold column filters\r\n\t\tthis.headerFilterColumns = []; //hold columns that use header filters\r\n\r\n\t\tthis.prevHeaderFilterChangeCheck = \"\";\r\n\t\tthis.prevHeaderFilterChangeCheck = \"{}\";\r\n\r\n\t\tthis.changed = false; //has filtering changed since last render\r\n\t\tthis.tableInitialized = false;\r\n\r\n\t\tthis.registerTableOption(\"filterMode\", \"local\"); //local or remote filtering\r\n\r\n\t\tthis.registerTableOption(\"initialFilter\", false); //initial filtering criteria\r\n\t\tthis.registerTableOption(\"initialHeaderFilter\", false); //initial header filtering criteria\r\n\t\tthis.registerTableOption(\"headerFilterLiveFilterDelay\", 300); //delay before updating column after user types in header filter\r\n\r\n\t\tthis.registerColumnOption(\"headerFilter\");\r\n\t\tthis.registerColumnOption(\"headerFilterPlaceholder\");\r\n\t\tthis.registerColumnOption(\"headerFilterParams\");\r\n\t\tthis.registerColumnOption(\"headerFilterEmptyCheck\");\r\n\t\tthis.registerColumnOption(\"headerFilterFunc\");\r\n\t\tthis.registerColumnOption(\"headerFilterFuncParams\");\r\n\t\tthis.registerColumnOption(\"headerFilterLiveFilter\");\r\n\r\n\t\tthis.registerTableFunction(\"searchRows\", this.searchRows.bind(this));\r\n\t\tthis.registerTableFunction(\"searchData\", this.searchData.bind(this));\r\n\r\n\t\tthis.registerTableFunction(\"setFilter\", this.userSetFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"refreshFilter\", this.userRefreshFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"addFilter\", this.userAddFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"getFilters\", this.getFilters.bind(this));\r\n\t\tthis.registerTableFunction(\"setHeaderFilterFocus\", this.userSetHeaderFilterFocus.bind(this));\r\n\t\tthis.registerTableFunction(\"getHeaderFilterValue\", this.userGetHeaderFilterValue.bind(this));\r\n\t\tthis.registerTableFunction(\"setHeaderFilterValue\", this.userSetHeaderFilterValue.bind(this));\r\n\t\tthis.registerTableFunction(\"getHeaderFilters\", this.getHeaderFilters.bind(this));\r\n\t\tthis.registerTableFunction(\"removeFilter\", this.userRemoveFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"clearFilter\", this.userClearFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"clearHeaderFilter\", this.userClearHeaderFilter.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"column\", \"headerFilterFocus\", this.setHeaderFilterFocus.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"reloadHeaderFilter\", this.reloadHeaderFilter.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"getHeaderFilterValue\", this.getHeaderFilterValue.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"setHeaderFilterValue\", this.setHeaderFilterValue.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumnHeaderFilter.bind(this));\r\n\t\tthis.subscribe(\"column-width-fit-before\", this.hideHeaderFilterElements.bind(this));\r\n\t\tthis.subscribe(\"column-width-fit-after\", this.showHeaderFilterElements.bind(this));\r\n\t\tthis.subscribe(\"table-built\", this.tableBuilt.bind(this));\r\n\r\n\t\tif(this.table.options.filterMode === \"remote\"){\r\n\t\t\tthis.subscribe(\"data-params\", this.remoteFilterParams.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerDataHandler(this.filter.bind(this), 10);\r\n\t}\r\n\r\n\ttableBuilt(){\r\n\t\tif(this.table.options.initialFilter){\r\n\t\t\tthis.setFilter(this.table.options.initialFilter);\r\n\t\t}\r\n\r\n\t\tif(this.table.options.initialHeaderFilter){\r\n\t\t\tthis.table.options.initialHeaderFilter.forEach((item) => {\r\n\r\n\t\t\t\tvar column = this.table.columnManager.findColumn(item.field);\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tthis.setHeaderFilterValue(column, item.value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", item.field);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.tableInitialized = true;\r\n\t}\r\n\r\n\tremoteFilterParams(data, config, silent, params){\r\n\t\tparams.filter = this.getFilters(true, true);\r\n\t\treturn params;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\t//set standard filters\r\n\tuserSetFilter(field, type, value, params){\r\n\t\tthis.setFilter(field, type, value, params);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//set standard filters\r\n\tuserRefreshFilter(){\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//add filter to array\r\n\tuserAddFilter(field, type, value, params){\r\n\t\tthis.addFilter(field, type, value, params);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\tuserSetHeaderFilterFocus(field){\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tthis.setHeaderFilterFocus(column);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Focus Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tuserGetHeaderFilterValue(field) {\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn this.getHeaderFilterValue(column);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", field);\r\n\t\t}\r\n\t}\r\n\r\n\tuserSetHeaderFilterValue(field, value){\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tthis.setHeaderFilterValue(column, value);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//remove filter from array\r\n\tuserRemoveFilter(field, type, value){\r\n\t\tthis.removeFilter(field, type, value);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//clear filters\r\n\tuserClearFilter(all){\r\n\t\tthis.clearFilter(all);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//clear header filters\r\n\tuserClearHeaderFilter(){\r\n\t\tthis.clearHeaderFilter();\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\r\n\t//search for specific row components\r\n\tsearchRows(field, type, value){\r\n\t\treturn this.search(\"rows\", field, type, value);\r\n\t}\r\n\r\n\t//search for specific data\r\n\tsearchData(field, type, value){\r\n\t\treturn this.search(\"data\", field, type, value);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnHeaderFilter(column){\r\n\t\tvar def = column.definition;\r\n\r\n\t\tif(def.headerFilter){\r\n\r\n\t\t\tif(typeof def.headerFilterPlaceholder !== \"undefined\" && def.field){\r\n\t\t\t\tthis.module(\"localize\").setHeaderFilterColumnPlaceholder(def.field, def.headerFilterPlaceholder);\r\n\t\t\t}\r\n\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column header filter\r\n\tinitializeColumn(column, value){\r\n\t\tvar self = this,\r\n\t\tfield = column.getField(),\r\n\t\tparams;\r\n\r\n\t\t//handle successfull value change\r\n\t\tfunction success(value){\r\n\t\t\tvar filterType = (column.modules.filter.tagType == \"input\" && column.modules.filter.attrType == \"text\") || column.modules.filter.tagType == \"textarea\" ? \"partial\" : \"match\",\r\n\t\t\ttype = \"\",\r\n\t\t\tfilterChangeCheck = \"\",\r\n\t\t\tfilterFunc;\r\n\r\n\t\t\tif(typeof column.modules.filter.prevSuccess === \"undefined\" || column.modules.filter.prevSuccess !== value){\r\n\r\n\t\t\t\tcolumn.modules.filter.prevSuccess = value;\r\n\r\n\t\t\t\tif(!column.modules.filter.emptyFunc(value)){\r\n\t\t\t\t\tcolumn.modules.filter.value = value;\r\n\r\n\t\t\t\t\tswitch(typeof column.definition.headerFilterFunc){\r\n\t\t\t\t\t\tcase \"string\":\r\n\t\t\t\t\t\tif(Filter.filters[column.definition.headerFilterFunc]){\r\n\t\t\t\t\t\t\ttype = column.definition.headerFilterFunc;\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\r\n\t\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\t\tparams = typeof params === \"function\" ? params(value, fieldVal, data) : params;\r\n\r\n\t\t\t\t\t\t\t\treturn Filter.filters[column.definition.headerFilterFunc](value, fieldVal, data, params);\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tconsole.warn(\"Header Filter Error - Matching filter function not found: \", column.definition.headerFilterFunc);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\r\n\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\tparams = typeof params === \"function\" ? params(value, fieldVal, data) : params;\r\n\r\n\t\t\t\t\t\t\treturn column.definition.headerFilterFunc(value, fieldVal, data, params);\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\ttype = filterFunc;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(!filterFunc){\r\n\t\t\t\t\t\tswitch(filterType){\r\n\t\t\t\t\t\t\tcase \"partial\":\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\tvar colVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\t\tif(typeof colVal !== 'undefined' && colVal !== null){\r\n\t\t\t\t\t\t\t\t\treturn String(colVal).toLowerCase().indexOf(String(value).toLowerCase()) > -1;\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\ttype = \"like\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\treturn column.getFieldValue(data) == value;\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\ttype = \"=\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tself.headerFilters[field] = {value:value, func:filterFunc, type:type, params:params || {}};\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdelete self.headerFilters[field];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfilterChangeCheck = JSON.stringify(self.headerFilters);\r\n\r\n\t\t\t\tif(self.prevHeaderFilterChangeCheck !== filterChangeCheck){\r\n\t\t\t\t\tself.prevHeaderFilterChangeCheck = filterChangeCheck;\r\n\r\n\t\t\t\t\tself.trackChanges();\r\n\t\t\t\t\tself.refreshFilter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tcolumn.modules.filter = {\r\n\t\t\tsuccess:success,\r\n\t\t\tattrType:false,\r\n\t\t\ttagType:false,\r\n\t\t\temptyFunc:false,\r\n\t\t};\r\n\r\n\t\tthis.generateHeaderFilterElement(column);\r\n\t}\r\n\r\n\tgenerateHeaderFilterElement(column, initialValue, reinitialize){\r\n\t\tvar self = this,\r\n\t\tsuccess = column.modules.filter.success,\r\n\t\tfield = column.getField(),\r\n\t\tfilterElement, editor, editorElement, cellWrapper, typingTimer, searchTrigger, params;\r\n\r\n\t\t//handle aborted edit\r\n\t\tfunction cancel(){}\r\n\r\n\t\tif(column.modules.filter.headerElement && column.modules.filter.headerElement.parentNode){\r\n\t\t\tcolumn.contentElement.removeChild(column.modules.filter.headerElement.parentNode);\r\n\t\t}\r\n\r\n\t\tif(field){\r\n\r\n\t\t\t//set empty value function\r\n\t\t\tcolumn.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function(value){\r\n\t\t\t\treturn !value && value !== \"0\" && value !== 0;\r\n\t\t\t};\r\n\r\n\t\t\tfilterElement = document.createElement(\"div\");\r\n\t\t\tfilterElement.classList.add(\"tabulator-header-filter\");\r\n\r\n\t\t\t//set column editor\r\n\t\t\tswitch(typeof column.definition.headerFilter){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(self.table.modules.edit.editors[column.definition.headerFilter]){\r\n\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.headerFilter];\r\n\r\n\t\t\t\t\tif((column.definition.headerFilter === \"tick\" || column.definition.headerFilter === \"tickCross\") && !column.definition.headerFilterEmptyCheck){\r\n\t\t\t\t\t\tcolumn.modules.filter.emptyFunc = function(value){\r\n\t\t\t\t\t\t\treturn value !== true && value !== false;\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Filter Error - Cannot build header filter, No such editor found: \", column.definition.editor);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\teditor = column.definition.headerFilter;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tif(column.modules.edit && column.modules.edit.editor){\r\n\t\t\t\t\teditor = column.modules.edit.editor;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]){\r\n\t\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.formatter];\r\n\r\n\t\t\t\t\t\tif((column.definition.formatter === \"tick\" || column.definition.formatter === \"tickCross\") && !column.definition.headerFilterEmptyCheck){\r\n\t\t\t\t\t\t\tcolumn.modules.filter.emptyFunc = function(value){\r\n\t\t\t\t\t\t\t\treturn value !== true && value !== false;\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\teditor = self.table.modules.edit.editors[\"input\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(editor){\r\n\r\n\t\t\t\tcellWrapper = {\r\n\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\treturn typeof initialValue !== \"undefined\" ? initialValue : \"\";\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetField:function(){\r\n\t\t\t\t\t\treturn column.definition.field;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\treturn filterElement;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\tnormalizeHeight:function(){\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\tparams = column.definition.headerFilterParams || {};\r\n\r\n\t\t\t\tparams = typeof params === \"function\" ? params.call(self.table, cellWrapper) : params;\r\n\r\n\t\t\t\teditorElement = editor.call(this.table.modules.edit, cellWrapper, function(){}, success, cancel, params);\r\n\r\n\t\t\t\tif(!editorElement){\r\n\t\t\t\t\tconsole.warn(\"Filter Error - Cannot add filter to \" + field + \" column, editor returned a value of false\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!(editorElement instanceof Node)){\r\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);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//set Placeholder Text\r\n\t\t\t\tif(field){\r\n\t\t\t\t\tself.langBind(\"headerFilters|columns|\" + column.definition.field, function(value){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"placeholder\", typeof value !== \"undefined\" && value ? value : self.langText(\"headerFilters|default\"));\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.langBind(\"headerFilters|default\", function(value){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"placeholder\", value);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//focus on element on click\r\n\t\t\t\teditorElement.addEventListener(\"click\", function(e){\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\teditorElement.focus();\r\n\t\t\t\t});\r\n\r\n\t\t\t\teditorElement.addEventListener(\"focus\", (e) => {\r\n\t\t\t\t\tvar left = this.table.columnManager.element.scrollLeft;\r\n\r\n\t\t\t\t\tvar headerPos = this.table.rowManager.element.scrollLeft + parseInt(this.table.columnManager.element.style.marginLeft);\r\n\r\n\t\t\t\t\tif(left !== headerPos){\r\n\t\t\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\t\t\tthis.table.columnManager.scrollHorizontal(left);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\t//live update filters as user types\r\n\t\t\t\ttypingTimer = false;\r\n\r\n\t\t\t\tsearchTrigger = function(e){\r\n\t\t\t\t\tif(typingTimer){\r\n\t\t\t\t\t\tclearTimeout(typingTimer);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ttypingTimer = setTimeout(function(){\r\n\t\t\t\t\t\tsuccess(editorElement.value);\r\n\t\t\t\t\t},self.table.options.headerFilterLiveFilterDelay);\r\n\t\t\t\t};\r\n\r\n\t\t\t\tcolumn.modules.filter.headerElement = editorElement;\r\n\t\t\t\tcolumn.modules.filter.attrType = editorElement.hasAttribute(\"type\") ? editorElement.getAttribute(\"type\").toLowerCase() : \"\" ;\r\n\t\t\t\tcolumn.modules.filter.tagType = editorElement.tagName.toLowerCase();\r\n\r\n\t\t\t\tif(column.definition.headerFilterLiveFilter !== false){\r\n\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\t!(\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === 'autocomplete' ||\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === 'tickCross' ||\r\n\t\t\t\t\t\t\t((column.definition.editor === 'autocomplete' ||\r\n\t\t\t\t\t\t\t\tcolumn.definition.editor === 'tickCross') &&\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === true)\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\teditorElement.addEventListener(\"keyup\", searchTrigger);\r\n\t\t\t\t\teditorElement.addEventListener(\"search\", searchTrigger);\r\n\r\n\r\n\t\t\t\t\t//update number filtered columns on change\r\n\t\t\t\t\tif(column.modules.filter.attrType == \"number\"){\r\n\t\t\t\t\t\teditorElement.addEventListener(\"change\", function(e){\r\n\t\t\t\t\t\t\tsuccess(editorElement.value);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//change text inputs to search inputs to allow for clearing of field\r\n\t\t\t\t\tif(column.modules.filter.attrType == \"text\" && this.table.browser !== \"ie\"){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"type\", \"search\");\r\n\t\t\t\t\t\t// editorElement.off(\"change blur\"); //prevent blur from triggering filter and preventing selection click\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\t//prevent input and select elements from propegating click to column sorters etc\r\n\t\t\t\t\tif(column.modules.filter.tagType == \"input\" || column.modules.filter.tagType == \"select\" || column.modules.filter.tagType == \"textarea\"){\r\n\t\t\t\t\t\teditorElement.addEventListener(\"mousedown\",function(e){\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfilterElement.appendChild(editorElement);\r\n\r\n\t\t\t\tcolumn.contentElement.appendChild(filterElement);\r\n\r\n\t\t\t\tif(!reinitialize){\r\n\t\t\t\t\tself.headerFilterColumns.push(column);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Filter Error - Cannot add header filter, column has no field set:\", column.definition.title);\r\n\t\t}\r\n\t}\r\n\r\n\t//hide all header filter elements (used to ensure correct column widths in \"fitData\" layout mode)\r\n\thideHeaderFilterElements(){\r\n\t\tthis.headerFilterColumns.forEach(function(column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tcolumn.modules.filter.headerElement.style.display = 'none';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//show all header filter elements (used to ensure correct column widths in \"fitData\" layout mode)\r\n\tshowHeaderFilterElements(){\r\n\t\tthis.headerFilterColumns.forEach(function(column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tcolumn.modules.filter.headerElement.style.display = '';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//programatically set focus of header filter\r\n\tsetHeaderFilterFocus(column){\r\n\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\tcolumn.modules.filter.headerElement.focus();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Focus Error - No header filter set on column:\", column.getField());\r\n\t\t}\r\n\t}\r\n\r\n\t//programmatically get value of header filter\r\n\tgetHeaderFilterValue(column){\r\n\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\treturn column.modules.filter.headerElement.value;\r\n\t\t} else {\r\n\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t}\r\n\t}\r\n\r\n\t//programatically set value of header filter\r\n\tsetHeaderFilterValue(column, value){\r\n\t\tif (column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tthis.generateHeaderFilterElement(column, value, true);\r\n\t\t\t\tcolumn.modules.filter.success(value);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treloadHeaderFilter(column){\r\n\t\tif (column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tthis.generateHeaderFilterElement(column, column.modules.filter.value, true);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trefreshFilter(){\r\n\t\tif(this.tableInitialized){\r\n\t\t\tif(this.table.options.filterMode === \"remote\"){\r\n\t\t\t\tthis.reloadData();\r\n\t\t\t}else{\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//TODO - Persist left position of row manager\r\n\t\t// left = this.scrollLeft;\r\n\t\t// this.scrollHorizontal(left);\r\n\t}\r\n\r\n\t//check if the filters has changed since last use\r\n\ttrackChanges(){\r\n\t\tthis.changed = true;\r\n\t\tthis.dispatch(\"filter-changed\");\r\n\t}\r\n\r\n\t//check if the filters has changed since last use\r\n\thasChanged(){\r\n\t\tvar changed = this.changed;\r\n\t\tthis.changed = false;\r\n\t\treturn changed;\r\n\t}\r\n\r\n\t//set standard filters\r\n\tsetFilter(field, type, value, params){\r\n\t\tthis.filterList = [];\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value, params:params}];\r\n\t\t}\r\n\r\n\t\tthis.addFilter(field);\r\n\t}\r\n\r\n\t//add filter to array\r\n\taddFilter(field, type, value, params){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value, params:params}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\tthis.filterList.push(filter);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.trackChanges();\r\n\t\t}\r\n\t}\r\n\r\n\tfindFilter(filter){\r\n\t\tvar column;\r\n\r\n\t\tif(Array.isArray(filter)){\r\n\t\t\treturn this.findSubFilters(filter);\r\n\t\t}\r\n\r\n\t\tvar filterFunc = false;\r\n\r\n\t\tif(typeof filter.field == \"function\"){\r\n\t\t\tfilterFunc = function(data){\r\n\t\t\t\treturn filter.field(data, filter.type || {})// pass params to custom filter function\r\n\t\t\t};\r\n\t\t}else{\r\n\r\n\t\t\tif(Filter.filters[filter.type]){\r\n\r\n\t\t\t\tcolumn = this.table.columnManager.getColumnByField(filter.field);\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\treturn Filter.filters[filter.type](filter.value, column.getFieldValue(data), data, filter.params || {});\r\n\t\t\t\t\t};\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\treturn Filter.filters[filter.type](filter.value, data[filter.field], data, filter.params || {});\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Filter Error - No such filter type found, ignoring: \", filter.type);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfilter.func = filterFunc;\r\n\r\n\t\treturn filter.func ? filter : false;\r\n\t}\r\n\r\n\tfindSubFilters(filters){\r\n\t\tvar output = [];\r\n\r\n\t\tfilters.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\toutput.push(filter);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output.length ? output : false;\r\n\t}\r\n\r\n\t//get all filters\r\n\tgetFilters(all, ajax){\r\n\t\tvar output = [];\r\n\r\n\t\tif(all){\r\n\t\t\toutput = this.getHeaderFilters();\r\n\t\t}\r\n\r\n\t\tif(ajax){\r\n\t\t\toutput.forEach(function(item){\r\n\t\t\t\tif(typeof item.type == \"function\"){\r\n\t\t\t\t\titem.type = \"function\";\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\toutput = output.concat(this.filtersToArray(this.filterList, ajax));\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//filter to Object\r\n\tfiltersToArray(filterList, ajax){\r\n\t\tvar output = [];\r\n\r\n\t\tfilterList.forEach((filter) => {\r\n\t\t\tvar item;\r\n\r\n\t\t\tif(Array.isArray(filter)){\r\n\t\t\t\toutput.push(this.filtersToArray(filter, ajax));\r\n\t\t\t}else{\r\n\t\t\t\titem = {field:filter.field, type:filter.type, value:filter.value}\r\n\r\n\t\t\t\tif(ajax){\r\n\t\t\t\t\tif(typeof item.type == \"function\"){\r\n\t\t\t\t\t\titem.type = \"function\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\toutput.push(item);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//get all filters\r\n\tgetHeaderFilters(){\r\n\t\tvar output = [];\r\n\r\n\t\tfor(var key in this.headerFilters){\r\n\t\t\toutput.push({field:key, type:this.headerFilters[key].type, value:this.headerFilters[key].value});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//remove filter from array\r\n\tremoveFilter(field, type, value){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tvar index = -1;\r\n\r\n\t\t\tif(typeof filter.field == \"object\"){\r\n\t\t\t\tindex = this.filterList.findIndex((element) => {\r\n\t\t\t\t\treturn filter === element;\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tindex = this.filterList.findIndex((element) => {\r\n\t\t\t\t\treturn filter.field === element.field && filter.type === element.type && filter.value === element.value;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.filterList.splice(index, 1);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Filter Error - No matching filter type found, ignoring: \", filter.type);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//clear filters\r\n\tclearFilter(all){\r\n\t\tthis.filterList = [];\r\n\r\n\t\tif(all){\r\n\t\t\tthis.clearHeaderFilter();\r\n\t\t}\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//clear header filters\r\n\tclearHeaderFilter(){\r\n\t\tthis.headerFilters = {};\r\n\t\tthis.prevHeaderFilterChangeCheck = \"{}\";\r\n\r\n\t\tthis.headerFilterColumns.forEach((column) => {\r\n\t\t\tif(typeof column.modules.filter.value !== \"undefined\"){\r\n\t\t\t\tdelete column.modules.filter.value;\r\n\t\t\t}\r\n\t\t\tcolumn.modules.filter.prevSuccess = undefined;\r\n\t\t\tthis.reloadHeaderFilter(column);\r\n\t\t});\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//search data and return matching rows\r\n\tsearch (searchType, field, type, value){\r\n\t\tvar activeRows = [],\r\n\t\tfilterList = [];\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\tfilterList.push(filter);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\tvar match = true;\r\n\r\n\t\t\tfilterList.forEach((filter) => {\r\n\t\t\t\tif(!this.filterRecurse(filter, row.getData())){\r\n\t\t\t\t\tmatch = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tactiveRows.push(searchType === \"data\" ? row.getData(\"data\") : row.getComponent());\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\t\treturn activeRows;\r\n\t}\r\n\r\n\t//filter row array\r\n\tfilter(rowList, filters){\r\n\t\tvar activeRows = [],\r\n\t\tactiveRowComponents = [];\r\n\r\n\t\tif(this.subscribedExternal(\"dataFiltering\")){\r\n\t\t\tthis.dispatchExternal(\"dataFiltering\", this.getFilters());\r\n\t\t}\r\n\r\n\t\tif(this.table.options.filterMode !== \"remote\" && (this.filterList.length || Object.keys(this.headerFilters).length)){\r\n\r\n\t\t\trowList.forEach((row) => {\r\n\t\t\t\tif(this.filterRow(row)){\r\n\t\t\t\t\tactiveRows.push(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t}else{\r\n\t\t\tactiveRows = rowList.slice(0);\r\n\t\t}\r\n\r\n\t\tif(this.subscribedExternal(\"dataFiltered\")){\r\n\r\n\t\t\tactiveRows.forEach((row) => {\r\n\t\t\t\tactiveRowComponents.push(row.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatchExternal(\"dataFiltered\", this.getFilters(), activeRowComponents);\r\n\t\t}\r\n\r\n\t\treturn activeRows;\r\n\t}\r\n\r\n\t//filter individual row\r\n\tfilterRow(row, filters){\r\n\t\tvar match = true,\r\n\t\tdata = row.getData();\r\n\r\n\t\tthis.filterList.forEach((filter) => {\r\n\t\t\tif(!this.filterRecurse(filter, data)){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\tfor(var field in this.headerFilters){\r\n\t\t\tif(!this.headerFilters[field].func(data)){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tfilterRecurse(filter, data){\r\n\t\tvar match = false;\r\n\r\n\t\tif(Array.isArray(filter)){\r\n\t\t\tfilter.forEach((subFilter) => {\r\n\t\t\t\tif(this.filterRecurse(subFilter, data)){\r\n\t\t\t\t\tmatch = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tmatch = filter.func(data);\r\n\t\t}\r\n\r\n\t\treturn match;\r\n\t}\r\n}\r\n\r\nFilter.moduleName = \"filter\";\r\n\r\n//load defaults\r\nFilter.filters = defaultFilters;\r\n\r\nexport default Filter;","export default function(cell, formatterParams, onRendered){\r\n\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn cell.getValue();\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().style.whiteSpace = \"pre-wrap\";\r\n\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar floatVal = parseFloat(cell.getValue()),\r\n\tsign = \"\",\r\n\tnumber, integer, decimal, rgx;\r\n\r\n\tvar decimalSym = formatterParams.decimal || \".\";\r\n\tvar thousandSym = formatterParams.thousand || \",\";\r\n\tvar negativeSign = formatterParams.negativeSign || \"-\";\r\n\tvar symbol = formatterParams.symbol || \"\";\r\n\tvar after = !!formatterParams.symbolAfter;\r\n\tvar precision = typeof formatterParams.precision !== \"undefined\" ? formatterParams.precision : 2;\r\n\r\n\tif(isNaN(floatVal)){\r\n\t\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n\t}\r\n\r\n\tif(floatVal < 0){\r\n\t\tfloatVal = Math.abs(floatVal);\r\n\t\tsign = negativeSign;\r\n\t}\r\n\r\n\tnumber = precision !== false ? floatVal.toFixed(precision) : floatVal;\r\n\tnumber = String(number).split(\".\");\r\n\r\n\tinteger = number[0];\r\n\tdecimal = number.length > 1 ? decimalSym + number[1] : \"\";\r\n\r\n\trgx = /(\\d+)(\\d{3})/;\r\n\r\n\twhile (rgx.test(integer)){\r\n\t\tinteger = integer.replace(rgx, \"$1\" + thousandSym + \"$2\");\r\n\t}\r\n\r\n\treturn after ? sign + integer + decimal + symbol : sign + symbol + integer + decimal;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\turlPrefix = formatterParams.urlPrefix || \"\",\r\n\tdownload = formatterParams.download,\r\n\tlabel = value,\r\n\tel = document.createElement(\"a\"),\r\n\tdata;\r\n\r\n\tif(formatterParams.labelField){\r\n\t\tdata = cell.getData();\r\n\t\tlabel = data[formatterParams.labelField];\r\n\t}\r\n\r\n\tif(formatterParams.label){\r\n\t\tswitch(typeof formatterParams.label){\r\n\t\t\tcase \"string\":\r\n\t\t\tlabel = formatterParams.label;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tlabel = formatterParams.label(cell);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(label){\r\n\t\tif(formatterParams.urlField){\r\n\t\t\tdata = cell.getData();\r\n\t\t\tvalue = data[formatterParams.urlField];\r\n\t\t}\r\n\r\n\t\tif(formatterParams.url){\r\n\t\t\tswitch(typeof formatterParams.url){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tvalue = formatterParams.url;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tvalue = formatterParams.url(cell);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tel.setAttribute(\"href\", urlPrefix + value);\r\n\r\n\t\tif(formatterParams.target){\r\n\t\t\tel.setAttribute(\"target\", formatterParams.target);\r\n\t\t}\r\n\r\n\t\tif(formatterParams.download){\r\n\r\n\t\t\tif(typeof download == \"function\"){\r\n\t\t\t\tdownload = download(cell);\r\n\t\t\t}else{\r\n\t\t\t\tdownload = download === true ? \"\" : download;\r\n\t\t\t}\r\n\r\n\t\t\tel.setAttribute(\"download\", download);\r\n\t\t}\r\n\r\n\t\tel.innerHTML = this.emptyToSpace(this.sanitizeHTML(label));\r\n\r\n\t\treturn el;\r\n\t}else{\r\n\t\treturn \" \";\r\n\t}\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar el = document.createElement(\"img\"),\r\n\tsrc = cell.getValue();\r\n\r\n\tif(formatterParams.urlPrefix){\r\n\t\tsrc = formatterParams.urlPrefix + cell.getValue();\r\n\t}\r\n\r\n\tif(formatterParams.urlSuffix){\r\n\t\tsrc = src + formatterParams.urlSuffix;\r\n\t}\r\n\r\n\tel.setAttribute(\"src\", src);\r\n\r\n\tswitch(typeof formatterParams.height){\r\n\t\tcase \"number\":\r\n\t\tel.style.height = formatterParams.height + \"px\";\r\n\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\tel.style.height = formatterParams.height;\r\n\t\tbreak;\r\n\t}\r\n\r\n\tswitch(typeof formatterParams.width){\r\n\t\tcase \"number\":\r\n\t\tel.style.width = formatterParams.width + \"px\";\r\n\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\tel.style.width = formatterParams.width;\r\n\t\tbreak;\r\n\t}\r\n\r\n\tel.addEventListener(\"load\", function(){\r\n\t\tcell.getRow().normalizeHeight();\r\n\t});\r\n\r\n\treturn el;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\telement = cell.getElement(),\r\n\tempty = formatterParams.allowEmpty,\r\n\ttruthy = formatterParams.allowTruthy,\r\n\ttick = typeof formatterParams.tickElement !== \"undefined\" ? formatterParams.tickElement : '',\r\n\tcross = typeof formatterParams.crossElement !== \"undefined\" ? formatterParams.crossElement : '';\r\n\r\n\tif((truthy && value) || (value === true || value === \"true\" || value === \"True\" || value === 1 || value === \"1\")){\r\n\t\telement.setAttribute(\"aria-checked\", true);\r\n\t\treturn tick || \"\";\r\n\t}else{\r\n\t\tif(empty && (value === \"null\" || value === \"\" || value === null || typeof value === \"undefined\")){\r\n\t\t\telement.setAttribute(\"aria-checked\", \"mixed\");\r\n\t\t\treturn \"\";\r\n\t\t}else{\r\n\t\t\telement.setAttribute(\"aria-checked\", false);\r\n\t\t\treturn cross || \"\";\r\n\t\t}\r\n\t}\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar inputFormat = formatterParams.inputFormat || \"yyyy-MM-dd HH:mm:ss\";\r\n\tvar\toutputFormat = formatterParams.outputFormat || \"dd/MM/yyyy HH:mm:ss\";\r\n\tvar\tinvalid = typeof formatterParams.invalidPlaceholder !== \"undefined\" ? formatterParams.invalidPlaceholder : \"\";\r\n\tvar value = cell.getValue();\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\tvar newDatetime = inputFormat === \"iso\" ? DT.fromISO(String(value)) : DT.fromFormat(String(value), inputFormat);\r\n\r\n\t\tif(newDatetime.isValid){\r\n\r\n\t\t\tif(formatterParams.timezone){\r\n\t\t\t\tnewDatetime = newDatetime.shiftTimezone(formatterParams.timezone);\r\n\t\t\t}\r\n\r\n\t\t\treturn newDatetime.toFormat(outputFormat);\r\n\t\t}else{\r\n\r\n\t\t\tif(invalid === true || !value){\r\n\t\t\t\treturn value;\r\n\t\t\t}else if(typeof invalid === \"function\"){\r\n\t\t\t\treturn invalid(value);\r\n\t\t\t}else{\r\n\t\t\t\treturn invalid;\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tconsole.error(\"Format Error - 'datetime' formatter is dependant on luxon.js\");\r\n\t}\r\n};","export default function (cell, formatterParams, onRendered) {\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar inputFormat = formatterParams.inputFormat || \"yyyy-MM-dd HH:mm:ss\";\r\n\tvar invalid = typeof formatterParams.invalidPlaceholder !== \"undefined\" ? formatterParams.invalidPlaceholder : \"\";\r\n\tvar suffix = typeof formatterParams.suffix !== \"undefined\" ? formatterParams.suffix : false;\r\n\tvar unit = typeof formatterParams.unit !== \"undefined\" ? formatterParams.unit : \"days\";\r\n\tvar humanize = typeof formatterParams.humanize !== \"undefined\" ? formatterParams.humanize : false;\r\n\tvar date = typeof formatterParams.date !== \"undefined\" ? formatterParams.date : DT.now();\r\n\tvar value = cell.getValue();\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\t\r\n\t\tvar newDatetime = inputFormat === \"iso\" ? DT.fromISO(String(value)) : DT.fromFormat(String(value), inputFormat);\r\n\r\n\t\tif (newDatetime.isValid){\r\n\t\t\tif(humanize){\r\n\t\t\t\t// return moment.duration(newDatetime.diff(date)).humanize(suffix);\r\n\t\t\t}else{\r\n\t\t\t\treturn parseInt(newDatetime.diff(date, unit)[unit]) + (suffix ? \" \" + suffix : \"\");\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\tif (invalid === true) {\r\n\t\t\t\treturn value;\r\n\t\t\t} else if (typeof invalid === \"function\") {\r\n\t\t\t\treturn invalid(value);\r\n\t\t\t} else {\r\n\t\t\t\treturn invalid;\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tconsole.error(\"Format Error - 'datetimediff' formatter is dependant on luxon.js\");\r\n\t}\r\n};","export default function (cell, formatterParams, onRendered) {\r\n\tvar value = cell.getValue();\r\n\r\n\tif (typeof formatterParams[value] === \"undefined\") {\r\n\t\tconsole.warn('Missing display value for ' + value);\r\n\t\treturn value;\r\n\t}\r\n\r\n\treturn formatterParams[value];\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\telement = cell.getElement(),\r\n\tmaxStars = formatterParams && formatterParams.stars ? formatterParams.stars : 5,\r\n\tstars = document.createElement(\"span\"),\r\n\tstar = document.createElementNS('http://www.w3.org/2000/svg', \"svg\"),\r\n\tstarActive = '',\r\n\tstarInactive = '';\r\n\r\n\t//style stars holder\r\n\tstars.style.verticalAlign = \"middle\";\r\n\r\n\t//style star\r\n\tstar.setAttribute(\"width\", \"14\");\r\n\tstar.setAttribute(\"height\", \"14\");\r\n\tstar.setAttribute(\"viewBox\", \"0 0 512 512\");\r\n\tstar.setAttribute(\"xml:space\", \"preserve\");\r\n\tstar.style.padding = \"0 1px\";\r\n\r\n\tvalue = value && !isNaN(value) ? parseInt(value) : 0;\r\n\r\n\tvalue = Math.max(0, Math.min(value, maxStars));\r\n\r\n\tfor(var i=1;i<= maxStars;i++){\r\n\t\tvar nextStar = star.cloneNode(true);\r\n\t\tnextStar.innerHTML = i <= value ? starActive : starInactive;\r\n\r\n\t\tstars.appendChild(nextStar);\r\n\t}\r\n\r\n\telement.style.whiteSpace = \"nowrap\";\r\n\telement.style.overflow = \"hidden\";\r\n\telement.style.textOverflow = \"ellipsis\";\r\n\r\n\telement.setAttribute(\"aria-label\", value);\r\n\r\n\treturn stars;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = this.sanitizeHTML(cell.getValue()) || 0,\r\n\tel = document.createElement(\"span\"),\r\n\tmax = formatterParams && formatterParams.max ? formatterParams.max : 100,\r\n\tmin = formatterParams && formatterParams.min ? formatterParams.min : 0,\r\n\tcolors = formatterParams && typeof formatterParams.color !== \"undefined\" ? formatterParams.color : [\"red\", \"orange\", \"green\"],\r\n\tcolor = \"#666666\",\r\n\tpercent, percentValue;\r\n\r\n\tif(isNaN(value) || typeof cell.getValue() === \"undefined\"){\r\n\t\treturn;\r\n\t}\r\n\r\n\tel.classList.add(\"tabulator-traffic-light\");\r\n\r\n\t//make sure value is in range\r\n\tpercentValue = parseFloat(value) <= max ? parseFloat(value) : max;\r\n\tpercentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min;\r\n\r\n\t//workout percentage\r\n\tpercent = (max - min) / 100;\r\n\tpercentValue = Math.round((percentValue - min) / percent);\r\n\r\n\t//set color\r\n\tswitch(typeof colors){\r\n\t\tcase \"string\":\r\n\t\tcolor = colors;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tcolor = colors(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(colors)){\r\n\t\t\tvar unit = 100 / colors.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, colors.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tcolor = colors[index];\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tel.style.backgroundColor = color;\r\n\r\n\treturn el;\r\n};","import CellComponent from '../../../../core/cell/CellComponent.js';\r\n\r\nexport default function(cell, formatterParams, onRendered){ //progress bar\r\n\tvar value = this.sanitizeHTML(cell.getValue()) || 0,\r\n\telement = cell.getElement(),\r\n\tmax = formatterParams && formatterParams.max ? formatterParams.max : 100,\r\n\tmin = formatterParams && formatterParams.min ? formatterParams.min : 0,\r\n\tlegendAlign = formatterParams && formatterParams.legendAlign ? formatterParams.legendAlign : \"center\",\r\n\tpercent, percentValue, color, legend, legendColor, top, left, right, bottom;\r\n\r\n\t//make sure value is in range\r\n\tpercentValue = parseFloat(value) <= max ? parseFloat(value) : max;\r\n\tpercentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min;\r\n\r\n\t//workout percentage\r\n\tpercent = (max - min) / 100;\r\n\tpercentValue = Math.round((percentValue - min) / percent);\r\n\r\n\t//set bar color\r\n\tswitch(typeof formatterParams.color){\r\n\t\tcase \"string\":\r\n\t\tcolor = formatterParams.color;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tcolor = formatterParams.color(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(formatterParams.color)){\r\n\t\t\tvar unit = 100 / formatterParams.color.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, formatterParams.color.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tcolor = formatterParams.color[index];\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tdefault:\r\n\t\tcolor = \"#2DC214\";\r\n\t}\r\n\r\n\t//generate legend\r\n\tswitch(typeof formatterParams.legend){\r\n\t\tcase \"string\":\r\n\t\tlegend = formatterParams.legend;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tlegend = formatterParams.legend(value);\r\n\t\tbreak;\r\n\t\tcase \"boolean\":\r\n\t\tlegend = value;\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\tlegend = false;\r\n\t}\r\n\r\n\t//set legend color\r\n\tswitch(typeof formatterParams.legendColor){\r\n\t\tcase \"string\":\r\n\t\tlegendColor = formatterParams.legendColor;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tlegendColor = formatterParams.legendColor(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(formatterParams.legendColor)){\r\n\t\t\tvar unit = 100 / formatterParams.legendColor.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, formatterParams.legendColor.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tlegendColor = formatterParams.legendColor[index];\r\n\t\t}\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\tlegendColor = \"#000\";\r\n\t}\r\n\r\n\telement.style.minWidth = \"30px\";\r\n\telement.style.position = \"relative\";\r\n\r\n\telement.setAttribute(\"aria-label\", percentValue);\r\n\r\n\tvar barEl = document.createElement(\"div\");\r\n\tbarEl.style.display = \"inline-block\";\r\n\tbarEl.style.position = \"absolute\";\r\n\tbarEl.style.width = percentValue + \"%\";\r\n\tbarEl.style.backgroundColor = color;\r\n\tbarEl.style.height = \"100%\";\r\n\r\n\tbarEl.setAttribute('data-max', max);\r\n\tbarEl.setAttribute('data-min', min);\r\n\r\n\tvar barContainer = document.createElement(\"div\");\r\n\tbarContainer.style.position = \"relative\";\r\n\tbarContainer.style.width = \"100%\";\r\n\tbarContainer.style.height = \"100%\";\r\n\r\n\tif(legend){\r\n\t\tvar legendEl = document.createElement(\"div\");\r\n\t\tlegendEl.style.position = \"absolute\";\r\n\t\tlegendEl.style.top = 0;\r\n\t\tlegendEl.style.left = 0;\r\n\t\tlegendEl.style.textAlign = legendAlign;\r\n\t\tlegendEl.style.width = \"100%\";\r\n\t\tlegendEl.style.color = legendColor;\r\n\t\tlegendEl.innerHTML = legend;\r\n\t}\r\n\r\n\tonRendered(function(){\r\n\r\n\t\t//handle custom element needed if formatter is to be included in printed/downloaded output\r\n\t\tif(!(cell instanceof CellComponent)){\r\n\t\t\tvar holderEl = document.createElement(\"div\");\r\n\t\t\tholderEl.style.position = \"absolute\";\r\n\t\t\tholderEl.style.top = \"4px\";\r\n\t\t\tholderEl.style.bottom = \"4px\";\r\n\t\t\tholderEl.style.left = \"4px\";\r\n\t\t\tholderEl.style.right = \"4px\";\r\n\r\n\t\t\telement.appendChild(holderEl);\r\n\r\n\t\t\telement = holderEl;\r\n\t\t}\r\n\r\n\t\telement.appendChild(barContainer);\r\n\t\tbarContainer.appendChild(barEl);\r\n\r\n\t\tif(legend){\r\n\t\t\tbarContainer.appendChild(legendEl);\r\n\t\t}\r\n\t});\r\n\r\n\treturn \"\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().style.backgroundColor = this.sanitizeHTML(cell.getValue());\r\n\treturn \"\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn '';\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn '';\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn this.table.rowManager.activeRows.indexOf(cell.getRow()._getSelf()) + 1 || \"\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().classList.add(\"tabulator-row-handle\");\r\n\treturn \"
\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar open = false,\r\n\tel = document.createElement(\"div\"),\r\n\tconfig = cell.getRow()._row.modules.responsiveLayout;\r\n\r\n\tel.classList.add(\"tabulator-responsive-collapse-toggle\");\r\n\tel.innerHTML = \"+-\";\r\n\r\n\tcell.getElement().classList.add(\"tabulator-row-handle\");\r\n\r\n\tfunction toggleList(isOpen){\r\n\t\tvar collapseEl = config.element;\r\n\r\n\t\tconfig.open = isOpen;\r\n\r\n\t\tif(collapseEl){\r\n\r\n\t\t\tif(config.open){\r\n\t\t\t\tel.classList.add(\"open\");\r\n\t\t\t\tcollapseEl.style.display = '';\r\n\t\t\t}else{\r\n\t\t\t\tel.classList.remove(\"open\");\r\n\t\t\t\tcollapseEl.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tel.addEventListener(\"click\", function(e){\r\n\t\te.stopImmediatePropagation();\r\n\t\ttoggleList(!config.open);\r\n\t});\r\n\r\n\ttoggleList(config.open);\r\n\r\n\treturn el;\r\n};","import RowComponent from '../../../../core/row/RowComponent.js';\r\n\r\nexport default function(cell, formatterParams, onRendered){\r\n\tvar checkbox = document.createElement(\"input\");\r\n\tvar blocked = false;\r\n\r\n\tcheckbox.type = 'checkbox';\r\n\r\n\tcheckbox.setAttribute(\"aria-label\", \"Select Row\");\r\n\t\r\n\tif(this.table.modExists(\"selectRow\", true)){\r\n\r\n\t\tcheckbox.addEventListener(\"click\", (e) => {\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tif(typeof cell.getRow == 'function'){\r\n\t\t\tvar row = cell.getRow();\r\n\r\n\t\t\tif(row instanceof RowComponent){\r\n\r\n\t\t\t\tcheckbox.addEventListener(\"change\", (e) => {\r\n\t\t\t\t\tif(this.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\t\tif(!blocked){\r\n\t\t\t\t\t\t\trow.toggleSelect();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tblocked = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trow.toggleSelect();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\tcheckbox.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\tblocked = true;\r\n\t\t\t\t\t\tthis.table.modules.selectRow.handleComplexRowClick(row._row, e);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcheckbox.checked = row.isSelected && row.isSelected();\r\n\t\t\t\tthis.table.modules.selectRow.registerRowSelectCheckbox(row, checkbox);\r\n\t\t\t}else{\r\n\t\t\t\tcheckbox = \"\";\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tcheckbox.addEventListener(\"change\", (e) => {\r\n\t\t\t\tif(this.table.modules.selectRow.selectedRows.length){\r\n\t\t\t\t\tthis.table.deselectRow();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis.table.selectRow(formatterParams.rowRange);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.table.modules.selectRow.registerHeaderSelectCheckbox(checkbox);\r\n\t\t}\r\n\t}\r\n\r\n\treturn checkbox;\r\n};","import plaintext from './formatters/plaintext.js';\r\nimport html from './formatters/html.js';\r\nimport textarea from './formatters/textarea.js';\r\nimport money from './formatters/money.js';\r\nimport link from './formatters/link.js';\r\nimport image from './formatters/image.js';\r\nimport tickCross from './formatters/tickCross.js';\r\nimport datetime from './formatters/datetime.js';\r\nimport datetimediff from './formatters/datetimediff.js';\r\nimport lookup from './formatters/lookup.js';\r\nimport star from './formatters/star.js';\r\nimport traffic from './formatters/traffic.js';\r\nimport progress from './formatters/progress.js';\r\nimport color from './formatters/color.js';\r\nimport buttonTick from './formatters/buttonTick.js';\r\nimport buttonCross from './formatters/buttonCross.js';\r\nimport rownum from './formatters/rownum.js';\r\nimport handle from './formatters/handle.js';\r\nimport responsiveCollapse from './formatters/responsiveCollapse.js';\r\nimport rowSelection from './formatters/rowSelection.js';\r\n\r\nexport default {\r\n\tplaintext:plaintext,\r\n\thtml:html,\r\n\ttextarea:textarea,\r\n\tmoney:money,\r\n\tlink:link,\r\n\timage:image,\r\n\ttickCross:tickCross,\r\n\tdatetime:datetime,\r\n\tdatetimediff:datetimediff,\r\n\tlookup:lookup,\r\n\tstar:star,\r\n\ttraffic:traffic,\r\n\tprogress:progress,\r\n\tcolor:color,\r\n\tbuttonTick:buttonTick,\r\n\tbuttonCross:buttonCross,\r\n\trownum:rownum,\r\n\thandle:handle,\r\n\tresponsiveCollapse:responsiveCollapse,\r\n\trowSelection:rowSelection,\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultFormatters from './defaults/formatters.js';\r\n\r\nclass Format extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.registerColumnOption(\"formatter\");\r\n\t\tthis.registerColumnOption(\"formatterParams\");\r\n\r\n\t\tthis.registerColumnOption(\"formatterPrint\");\r\n\t\tthis.registerColumnOption(\"formatterPrintParams\");\r\n\t\tthis.registerColumnOption(\"formatterClipboard\");\r\n\t\tthis.registerColumnOption(\"formatterClipboardParams\");\r\n\t\tthis.registerColumnOption(\"formatterHtmlOutput\");\r\n\t\tthis.registerColumnOption(\"formatterHtmlOutputParams\");\r\n\t\tthis.registerColumnOption(\"titleFormatter\");\r\n\t\tthis.registerColumnOption(\"titleFormatterParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-format\", this.formatValue.bind(this));\r\n\t\tthis.subscribe(\"cell-rendered\", this.cellRendered.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"column-format\", this.formatHeader.bind(this));\r\n\t}\r\n\r\n\t//initialize column formatter\r\n\tinitializeColumn(column){\r\n\t\tcolumn.modules.format = this.lookupFormatter(column, \"\");\r\n\r\n\t\tif(typeof column.definition.formatterPrint !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.print = this.lookupFormatter(column, \"Print\");\r\n\t\t}\r\n\r\n\t\tif(typeof column.definition.formatterClipboard !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.clipboard = this.lookupFormatter(column, \"Clipboard\");\r\n\t\t}\r\n\r\n\t\tif(typeof column.definition.formatterHtmlOutput !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.htmlOutput = this.lookupFormatter(column, \"HtmlOutput\");\r\n\t\t}\r\n\t}\r\n\r\n\tlookupFormatter(column, type){\r\n\t\tvar config = {params:column.definition[\"formatter\" + type + \"Params\"] || {}},\r\n\t\tformatter = column.definition[\"formatter\" + type];\r\n\r\n\t\t//set column formatter\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\tconfig.formatter = Format.formatters[formatter];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tconfig.formatter = formatter;\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn config;\r\n\t}\r\n\r\n\tcellRendered(cell){\r\n\t\tif(cell.modules.format && cell.modules.format.renderedCallback && !cell.modules.format.rendered){\r\n\t\t\tcell.modules.format.renderedCallback();\r\n\t\t\tcell.modules.format.rendered = true;\r\n\t\t}\r\n\t}\r\n\r\n\t//return a formatted value for a column header\r\n\tformatHeader(column, title, el){\r\n\t\tvar formatter, params, onRendered, mockCell;\r\n\r\n\t\tif(column.definition.titleFormatter){\r\n\t\t\tformatter = this.getFormatter(column.definition.titleFormatter);\r\n\r\n\t\t\tonRendered = (callback) => {\r\n\t\t\t\tcolumn.titleFormatterRendered = callback;\r\n\t\t\t};\r\n\r\n\t\t\tmockCell = {\r\n\t\t\t\tgetValue:function(){\r\n\t\t\t\t\treturn title;\r\n\t\t\t\t},\r\n\t\t\t\tgetElement:function(){\r\n\t\t\t\t\treturn el;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tparams = column.definition.titleFormatterParams || {};\r\n\r\n\t\t\tparams = typeof params === \"function\" ? params() : params;\r\n\r\n\t\t\treturn formatter.call(this, mockCell, params, onRendered);\r\n\t\t}else{\r\n\t\t\treturn title;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//return a formatted value for a cell\r\n\tformatValue(cell){\r\n\t\tvar component = cell.getComponent(),\r\n\t\tparams = typeof cell.column.modules.format.params === \"function\" ? cell.column.modules.format.params(component) : cell.column.modules.format.params;\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\tif(!cell.modules.format){\r\n\t\t\t\tcell.modules.format = {};\r\n\t\t\t}\r\n\r\n\t\t\tcell.modules.format.renderedCallback = callback;\r\n\t\t\tcell.modules.format.rendered = false;\r\n\t\t}\r\n\r\n\t\treturn cell.column.modules.format.formatter.call(this, component, params, onRendered);\r\n\t}\r\n\r\n\tformatExportValue(cell, type){\r\n\t\tvar formatter = cell.column.modules.format[type],\r\n\t\tparams;\r\n\r\n\t\tif(formatter){\r\n\t\t\tparams = typeof formatter.params === \"function\" ? formatter.params(component) : formatter.params;\r\n\r\n\t\t\tfunction onRendered(callback){\r\n\t\t\t\tif(!cell.modules.format){\r\n\t\t\t\t\tcell.modules.format = {};\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcell.modules.format.renderedCallback = callback;\r\n\t\t\t\tcell.modules.format.rendered = false;\r\n\t\t\t}\r\n\r\n\t\t\treturn formatter.formatter.call(this, cell.getComponent(), params, onRendered);\r\n\r\n\t\t}else{\r\n\t\t\treturn this.formatValue(cell);\r\n\t\t}\r\n\t}\r\n\r\n\tsanitizeHTML(value){\r\n\t\tif(value){\r\n\t\t\tvar entityMap = {\r\n\t\t\t\t'&': '&',\r\n\t\t\t\t'<': '<',\r\n\t\t\t\t'>': '>',\r\n\t\t\t\t'\"': '"',\r\n\t\t\t\t\"'\": ''',\r\n\t\t\t\t'/': '/',\r\n\t\t\t\t'`': '`',\r\n\t\t\t\t'=': '='\r\n\t\t\t};\r\n\r\n\t\t\treturn String(value).replace(/[&<>\"'`=\\/]/g, function (s) {\r\n\t\t\t\treturn entityMap[s];\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn value;\r\n\t\t}\r\n\t}\r\n\r\n\temptyToSpace(value){\r\n\t\treturn value === null || typeof value === \"undefined\" || value === \"\" ? \" \" : value;\r\n\t}\r\n\r\n\t//get formatter for cell\r\n\tgetFormatter(formatter){\r\n\t\tvar formatter;\r\n\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\tformatter = Format.formatters[formatter]\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tformatter = formatter;\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn formatter;\r\n\t}\r\n}\r\n\r\nFormat.moduleName = \"format\";\r\n\r\n//load defaults\r\nFormat.formatters = defaultFormatters;\r\n\r\nexport default Format;","import Module from '../../core/Module.js';\r\n\r\nclass FrozenColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.leftColumns = [];\r\n\t\tthis.rightColumns = [];\r\n\t\tthis.leftMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.rightPadding = 0;\r\n\t\tthis.initializationMode = \"left\";\r\n\t\tthis.active = false;\r\n\t\tthis.scrollEndTimer = false;\r\n\t\tthis.blocked = true;\r\n\t\t\r\n\t\tthis.registerColumnOption(\"frozen\");\r\n\t}\r\n\t\r\n\t//reset initial state\r\n\treset(){\r\n\t\tthis.initializationMode = \"left\";\r\n\t\tthis.leftColumns = [];\r\n\t\tthis.rightColumns = [];\r\n\t\tthis.leftMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.active = false;\r\n\t\t\r\n\t\tthis.table.columnManager.headersElement.style.marginLeft = 0;\r\n\t\tthis.table.columnManager.element.style.paddingRight = 0;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-layout\", this.layoutCell.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"column-width\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"row-layout-after\", this.layoutRow.bind(this));\r\n\t\tthis.subscribe(\"table-layout\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t\tthis.subscribe(\"columns-loading\", this.reset.bind(this));\r\n\t\tthis.subscribe(\"table-redraw\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"layout-refreshing\", this.blockLayout.bind(this));\r\n\t\tthis.subscribe(\"layout-refreshed\", this.unblockLayout.bind(this));\r\n\t}\r\n\t\r\n\tblockLayout(){\r\n\t\tthis.blocked = true;\r\n\t}\r\n\t\r\n\tunblockLayout(){\r\n\t\tthis.blocked = false;\r\n\t}\r\n\t\r\n\tlayoutCell(cell){\r\n\t\tthis.layoutElement(cell.element, cell.column)\r\n\t}\r\n\t\r\n\t//initialize specific column\r\n\tinitializeColumn(column){\r\n\t\tvar config = {margin:0, edge:false};\r\n\t\t\r\n\t\tif(!column.isGroup){\r\n\t\t\t\r\n\t\t\tif(this.frozenCheck(column)){\r\n\t\t\t\t\r\n\t\t\t\tconfig.position = this.initializationMode;\r\n\t\t\t\t\r\n\t\t\t\tif(this.initializationMode == \"left\"){\r\n\t\t\t\t\tthis.leftColumns.push(column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.rightColumns.unshift(column);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.active = true;\r\n\t\t\t\t\r\n\t\t\t\tcolumn.modules.frozen = config;\r\n\t\t\t}else{\r\n\t\t\t\tthis.initializationMode = \"right\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfrozenCheck(column){\r\n\t\tvar frozen = false;\r\n\t\t\r\n\t\tif(column.parent.isGroup && column.definition.frozen){\r\n\t\t\tconsole.warn(\"Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups\");\r\n\t\t}\r\n\t\t\r\n\t\tif(column.parent.isGroup){\r\n\t\t\treturn this.frozenCheck(column.parent);\r\n\t\t}else{\r\n\t\t\treturn column.definition.frozen;\r\n\t\t}\r\n\t\t\r\n\t\treturn frozen;\r\n\t}\r\n\t\r\n\t//quick layout to smooth horizontal scrolling\r\n\tscrollHorizontal(){\r\n\t\tvar rows;\r\n\t\t\r\n\t\tif(this.active){\r\n\t\t\tclearTimeout(this.scrollEndTimer);\r\n\r\n\t\t\trows = this.table.rowManager.getVisibleRows();\r\n\t\t\t\r\n\t\t\tthis.calcMargins(true);\r\n\t\t\t\r\n\t\t\tthis.layoutColumnPosition();\r\n\t\t\t\r\n\t\t\tthis.layoutCalcRows();\r\n\t\t\t\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\t//calculate margins for rows\r\n\tcalcMargins(scroll){\r\n\t\t\r\n\t\tif(!scroll){\r\n\t\t\tthis.leftMargin = this._calcSpace(this.leftColumns, this.leftColumns.length) + \"px\";\t\t\t\r\n\t\t\tthis.rightMargin = this._calcSpace(this.rightColumns, this.rightColumns.length) + \"px\";\t\r\n\t\t\tthis.table.rowManager.tableElement.style.marginRight = this.rightMargin;\r\n\t\t}\r\n\t\r\n\t\t//calculate right frozen columns\r\n\t\tthis.rightPadding = this.table.rowManager.element.clientWidth + this.table.columnManager.scrollLeft;\r\n\t}\r\n\t\r\n\t//layout calculation rows\r\n\tlayoutCalcRows(){\r\n\t\tif(this.table.modExists(\"columnCalcs\")){\r\n\t\t\tif(this.table.modules.columnCalcs.topInitialized && this.table.modules.columnCalcs.topRow){\r\n\t\t\t\tthis.layoutRow(this.table.modules.columnCalcs.topRow);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.modules.columnCalcs.botInitialized && this.table.modules.columnCalcs.botRow){\r\n\t\t\t\tthis.layoutRow(this.table.modules.columnCalcs.botRow);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.modExists(\"groupRows\")){\r\n\t\t\t\tthis.layoutGroupCalcs(this.table.modules.groupRows.getGroups())\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutGroupCalcs(groups){\r\n\t\tgroups.forEach((group) => {\r\n\t\t\tif(group.calcs.top){\r\n\t\t\t\tthis.layoutRow(group.calcs.top);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(group.calcs.bottom){\r\n\t\t\t\tthis.layoutRow(group.calcs.bottom);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(group.groupList && group.groupList.length){\r\n\t\t\t\tthis.layoutGroupCalcs(group.groupList && group.groupList);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//calculate column positions and layout headers\r\n\tlayoutColumnPosition(allCells){\r\n\t\tvar leftParents = [];\r\n\t\t\r\n\t\tvar leftMargin = 0;\r\n\t\tvar rightMargin = 0;\r\n\t\t\r\n\t\tthis.table.columnManager.headersElement.style.marginLeft = this.leftMargin;\r\n\t\tthis.table.columnManager.element.style.paddingRight = this.rightMargin;\r\n\r\n\t\tthis.leftColumns.forEach((column, i) => {\t\r\n\t\t\tcolumn.modules.frozen.margin = (leftMargin + this.table.columnManager.scrollLeft) + \"px\";\r\n\r\n\t\t\tif(column.visible){\r\n\t\t\t\tleftMargin += column.getWidth();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(i == this.leftColumns.length - 1){\r\n\t\t\t\tcolumn.modules.frozen.edge = true;\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.modules.frozen.edge = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(column.parent.isGroup){\r\n\t\t\t\tvar parentEl = this.getColGroupParentElement(column);\r\n\t\t\t\tif(!leftParents.includes(parentEl)){\r\n\t\t\t\t\tthis.layoutElement(parentEl, column);\r\n\t\t\t\t\tleftParents.push(parentEl);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(column.modules.frozen.edge){\r\n\t\t\t\t\tparentEl.classList.add(\"tabulator-frozen-\" + column.modules.frozen.position);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.layoutElement(column.getElement(), column);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(allCells){\r\n\t\t\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.rightColumns.forEach((column, i) => {\r\n\r\n\t\t\tif(column.visible){\r\n\t\t\t\trightMargin += column.getWidth();\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.modules.frozen.margin = (this.rightPadding - rightMargin) + \"px\";\r\n\t\t\t\r\n\t\t\tif(i == this.rightColumns.length - 1){\r\n\t\t\t\tcolumn.modules.frozen.edge = true;\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.modules.frozen.edge = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(column.parent.isGroup){\r\n\t\t\t\tthis.layoutElement(this.getColGroupParentElement(column), column);\r\n\t\t\t}else{\r\n\t\t\t\tthis.layoutElement(column.getElement(), column);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(allCells){\r\n\t\t\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tgetColGroupParentElement(column){\r\n\t\treturn column.parent.isGroup ? this.getColGroupParentElement(column.parent) : column.getElement();\r\n\t}\r\n\t\r\n\t//layout columns appropriately\r\n\tlayout(){\r\n\t\tif(this.active && !this.blocked){\r\n\t\t\t//calculate row padding\r\n\t\t\tthis.calcMargins();\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) =>{\r\n\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.layoutCalcRows();\r\n\t\t\t\r\n\t\t\t//calculate left columns\r\n\t\t\tthis.layoutColumnPosition(true);\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\t\t\r\n\t\trowEl.style.paddingLeft = this.leftMargin;\r\n\t\t\r\n\t\tif(this.table.options.layout === \"fitDataFill\" && this.rightColumns.length){\r\n\t\t\tthis.table.rowManager.getTableElement().style.minWidth = \"calc(100% - \" + this.rightMargin + \")\";\r\n\t\t}\r\n\t\t\r\n\t\tthis.leftColumns.forEach((column) => {\r\n\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\r\n\t\t\tif(cell){\r\n\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.rightColumns.forEach((column) => {\r\n\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\r\n\t\t\tif(cell){\r\n\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tlayoutElement(element, column){\r\n\t\t\r\n\t\tif(column.modules.frozen){\r\n\t\t\telement.style.position = \"absolute\";\r\n\t\t\telement.style.left = column.modules.frozen.margin;\r\n\t\t\t\r\n\t\t\telement.classList.add(\"tabulator-frozen\");\r\n\t\t\t\r\n\t\t\tif(column.modules.frozen.edge){\r\n\t\t\t\telement.classList.add(\"tabulator-frozen-\" + column.modules.frozen.position);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_calcSpace(columns, index){\r\n\t\tvar width = 0;\r\n\t\t\r\n\t\tfor (let i = 0; i < index; i++){\r\n\t\t\tif(columns[i].visible){\r\n\t\t\t\twidth += columns[i].getWidth();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn width;\r\n\t}\r\n}\r\n\r\nFrozenColumns.moduleName = \"frozenColumns\";\r\n\r\nexport default FrozenColumns;","import Module from '../../core/Module.js';\r\n\r\nclass FrozenRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.topElement = document.createElement(\"div\");\r\n\t\tthis.rows = [];\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"freeze\", this.freezeRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"unfreeze\", this.unfreezeRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isFrozen\", this.isRowFrozen.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.rows = [];\r\n\r\n\t\tthis.topElement.classList.add(\"tabulator-frozen-rows-holder\");\r\n\r\n\t\t// this.table.columnManager.element.append(this.topElement);\r\n\t\tthis.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\r\n\r\n\t\tthis.subscribe(\"row-deleting\", this.detachRow.bind(this));\r\n\t\tthis.subscribe(\"rows-visible\", this.visibleRows.bind(this));\r\n\r\n\t\tthis.registerDisplayHandler(this.getRows.bind(this), 10);\r\n\t}\r\n\r\n\tisRowFrozen(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\t\treturn index > -1;\r\n\t}\r\n\r\n\tisFrozen(){\r\n\t\treturn !!this.rows.length;\r\n\t}\r\n\r\n\tvisibleRows(viewable, rows){\r\n\t\tthis.rows.forEach((row) => {\r\n\t\t\trows.push(row);\r\n\t\t});\r\n\r\n\t\treturn rows;\r\n\t}\r\n\r\n\t//filter frozen rows out of display data\r\n\tgetRows(rows){\r\n\t\tvar self = this,\r\n\t\tfrozen = [],\r\n\t\toutput = rows.slice(0);\r\n\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\tvar index = output.indexOf(row);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\toutput.splice(index, 1);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tfreezeRow(row){\r\n\t\tif(!row.modules.frozen){\r\n\t\t\trow.modules.frozen = true;\r\n\t\t\tthis.topElement.appendChild(row.getElement());\r\n\t\t\trow.initialize();\r\n\t\t\trow.normalizeHeight();\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\tthis.rows.push(row);\r\n\r\n\t\t\tthis.refreshData(false, \"display\")\r\n\r\n\t\t\tthis.styleRows();\r\n\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Freeze Error - Row is already frozen\");\r\n\t\t}\r\n\t}\r\n\r\n\tunfreezeRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\r\n\t\tif(row.modules.frozen){\r\n\r\n\t\t\trow.modules.frozen = false;\r\n\r\n\t\t\tthis.detachRow(row);\r\n\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\tthis.refreshData(false, \"display\")\r\n\r\n\t\t\tif(this.rows.length){\r\n\t\t\t\tthis.styleRows();\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Freeze Error - Row is already unfrozen\");\r\n\t\t}\r\n\t}\r\n\r\n\tdetachRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tvar rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\r\n\t\t\tthis.rows.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\tstyleRows(row){\r\n\t\tthis.rows.forEach((row, i) => {\r\n\t\t\tthis.table.rowManager.styleRow(row, i);\r\n\t\t});\r\n\t}\r\n}\r\n\r\nFrozenRows.moduleName = \"frozenRows\";\r\n\r\nexport default FrozenRows;","//public group object\r\nclass GroupComponent {\r\n\tconstructor (group){\r\n\t\tthis._group = group;\r\n\t\tthis.type = \"GroupComponent\";\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._group.groupManager.table.componentFunctionBinder.handle(\"row\", target._group, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetKey(){\r\n\t\treturn this._group.key;\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._group.field;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._group.element;\r\n\t}\r\n\r\n\tgetRows(){\r\n\t\treturn this._group.getRows(true);\r\n\t}\r\n\r\n\tgetSubGroups(){\r\n\t\treturn this._group.getSubGroups(true);\r\n\t}\r\n\r\n\tgetParentGroup(){\r\n\t\treturn this._group.parent ? this._group.parent.getComponent() : false;\r\n\t}\r\n\r\n\tisVisible(){\r\n\t\treturn this._group.visible;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tthis._group.show();\r\n\t}\r\n\r\n\thide(){\r\n\t\tthis._group.hide();\r\n\t}\r\n\r\n\ttoggle(){\r\n\t\tthis._group.toggleVisibility();\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._group;\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._group.groupManager.table;\r\n\t}\r\n}\r\n\r\nexport default GroupComponent;","import Helpers from '../../core/tools/Helpers.js';\r\nimport GroupComponent from './GroupComponent.js';\r\n\r\n//Group functions\r\nclass Group{\r\n\t\r\n\tconstructor(groupManager, parent, level, key, field, generator, oldGroup){\r\n\t\tthis.groupManager = groupManager;\r\n\t\tthis.parent = parent;\r\n\t\tthis.key = key;\r\n\t\tthis.level = level;\r\n\t\tthis.field = field;\r\n\t\tthis.hasSubGroups = level < (groupManager.groupIDLookups.length - 1);\r\n\t\tthis.addRow = this.hasSubGroups ? this._addRowToGroup : this._addRow;\r\n\t\tthis.type = \"group\"; //type of element\r\n\t\tthis.old = oldGroup;\r\n\t\tthis.rows = [];\r\n\t\tthis.groups = [];\r\n\t\tthis.groupList = [];\r\n\t\tthis.generator = generator;\r\n\t\tthis.element = false;\r\n\t\tthis.elementContents = false;\r\n\t\tthis.height = 0;\r\n\t\tthis.outerHeight = 0;\r\n\t\tthis.initialized = false;\r\n\t\tthis.calcs = {};\r\n\t\tthis.initialized = false;\r\n\t\tthis.modules = {};\r\n\t\tthis.arrowElement = false;\r\n\t\t\r\n\t\tthis.visible = oldGroup ? oldGroup.visible : (typeof groupManager.startOpen[level] !== \"undefined\" ? groupManager.startOpen[level] : groupManager.startOpen[0]);\r\n\t\t\r\n\t\tthis.component = null;\r\n\t\t\r\n\t\tthis.createElements();\r\n\t\tthis.addBindings();\r\n\t\t\r\n\t\tthis.createValueGroups();\r\n\t}\r\n\t\r\n\twipe(){\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\tgroup.wipe();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\tif(row.modules){\r\n\t\t\t\t\tdelete row.modules.group;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\tthis.element = false;\r\n\t\tthis.arrowElement = false;\r\n\t\tthis.elementContents = false;\r\n\t}\r\n\t\r\n\tcreateElements(){\r\n\t\tvar arrow = document.createElement(\"div\");\r\n\t\tarrow.classList.add(\"tabulator-arrow\");\r\n\t\t\r\n\t\tthis.element = document.createElement(\"div\");\r\n\t\tthis.element.classList.add(\"tabulator-row\");\r\n\t\tthis.element.classList.add(\"tabulator-group\");\r\n\t\tthis.element.classList.add(\"tabulator-group-level-\" + this.level);\r\n\t\tthis.element.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\tthis.arrowElement = document.createElement(\"div\");\r\n\t\tthis.arrowElement.classList.add(\"tabulator-group-toggle\");\r\n\t\tthis.arrowElement.appendChild(arrow);\r\n\t\t\r\n\t\t//setup movable rows\r\n\t\tif(this.groupManager.table.options.movableRows !== false && this.groupManager.table.modExists(\"moveRow\")){\r\n\t\t\tthis.groupManager.table.modules.moveRow.initializeGroupHeader(this);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcreateValueGroups(){\r\n\t\tvar level = this.level + 1;\r\n\t\tif(this.groupManager.allowedValues && this.groupManager.allowedValues[level]){\r\n\t\t\tthis.groupManager.allowedValues[level].forEach((value) => {\r\n\t\t\t\tthis._createGroup(value, level);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\taddBindings(){\r\n\t\tvar toggleElement;\r\n\t\t\r\n\t\tif(this.groupManager.table.options.groupToggleElement){\r\n\t\t\ttoggleElement = this.groupManager.table.options.groupToggleElement == \"arrow\" ? this.arrowElement : this.element;\r\n\t\t\t\r\n\t\t\ttoggleElement.addEventListener(\"click\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\tthis.toggleVisibility();\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\t_createGroup(groupID, level){\r\n\t\tvar groupKey = level + \"_\" + groupID;\r\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);\r\n\t\t\r\n\t\tthis.groups[groupKey] = group;\r\n\t\tthis.groupList.push(group);\r\n\t}\r\n\t\r\n\t_addRowToGroup(row){\r\n\t\t\r\n\t\tvar level = this.level + 1;\r\n\t\t\r\n\t\tif(this.hasSubGroups){\r\n\t\t\tvar groupID = this.groupManager.groupIDLookups[level].func(row.getData()),\r\n\t\t\tgroupKey = level + \"_\" + groupID;\r\n\t\t\t\r\n\t\t\tif(this.groupManager.allowedValues && this.groupManager.allowedValues[level]){\r\n\t\t\t\tif(this.groups[groupKey]){\r\n\t\t\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(!this.groups[groupKey]){\r\n\t\t\t\t\tthis._createGroup(groupID, level);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_addRow(row){\r\n\t\tthis.rows.push(row);\r\n\t\trow.modules.group = this;\r\n\t}\r\n\t\r\n\tinsertRow(row, to, after){\r\n\t\tvar data = this.conformRowData({});\r\n\t\t\r\n\t\trow.updateData(data);\r\n\t\t\r\n\t\tvar toIndex = this.rows.indexOf(to);\r\n\t\t\r\n\t\tif(toIndex > -1){\r\n\t\t\tif(after){\r\n\t\t\t\tthis.rows.splice(toIndex+1, 0, row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.splice(toIndex, 0, row);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(after){\r\n\t\t\t\tthis.rows.push(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.unshift(row);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\trow.modules.group = this;\r\n\t\t\r\n\t\tthis.generateGroupHeaderContents();\r\n\t\t\r\n\t\tif(this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\tthis.groupManager.table.modules.columnCalcs.recalcGroup(this);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.updateGroupRows(true);\r\n\t}\r\n\t\r\n\tscrollHeader(left){\r\n\t\tif(this.arrowElement){\r\n\t\t\tthis.arrowElement.style.marginLeft = left;\r\n\t\t\t\r\n\t\t\tthis.groupList.forEach(function(child){\r\n\t\t\t\tchild.scrollHeader(left);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRowIndex(row){}\r\n\t\r\n\t//update row data to match grouping contraints\r\n\tconformRowData(data){\r\n\t\tif(this.field){\r\n\t\t\tdata[this.field] = this.key;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Data Conforming Error - Cannot conform row data to match new group as groupBy is a function\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.parent){\r\n\t\t\tdata = this.parent.conformRowData(data);\r\n\t\t}\r\n\t\t\r\n\t\treturn data;\r\n\t}\r\n\t\r\n\tremoveRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\t\tvar el = row.getElement();\r\n\t\t\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.rows.splice(index, 1);\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.groupManager.table.options.groupValues && !this.rows.length){\r\n\t\t\tif(this.parent){\r\n\t\t\t\tthis.parent.removeGroup(this);\r\n\t\t\t}else{\r\n\t\t\t\tthis.groupManager.removeGroup(this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tif(el.parentNode){\r\n\t\t\t\tel.parentNode.removeChild(el);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.generateGroupHeaderContents();\r\n\t\t\t\r\n\t\t\tif(this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\t\tthis.groupManager.table.modules.columnCalcs.recalcGroup(this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveGroup(group){\r\n\t\tvar groupKey = group.level + \"_\" + group.key,\r\n\t\tindex;\r\n\t\t\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tdelete this.groups[groupKey];\r\n\t\t\t\r\n\t\t\tindex = this.groupList.indexOf(group);\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.groupList.splice(index, 1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!this.groupList.length){\r\n\t\t\t\tif(this.parent){\r\n\t\t\t\t\tthis.parent.removeGroup(this);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.groupManager.removeGroup(this);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetHeadersAndRows(noCalc){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\toutput.push(this);\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(this.visible){\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\t\toutput = output.concat(group.getHeadersAndRows(noCalc));\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tif(!noCalc && this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\r\n\t\t\t\t\tif(this.calcs.top){\r\n\t\t\t\t\t\tthis.calcs.top.detachElement();\r\n\t\t\t\t\t\tthis.calcs.top.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows);\r\n\t\t\t\t\toutput.push(this.calcs.top);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\toutput = output.concat(this.rows);\r\n\t\t\t\t\r\n\t\t\t\tif(!noCalc && this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\r\n\t\t\t\t\tif(this.calcs.bottom){\r\n\t\t\t\t\t\tthis.calcs.bottom.detachElement();\r\n\t\t\t\t\t\tthis.calcs.bottom.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows);\r\n\t\t\t\t\toutput.push(this.calcs.bottom);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!this.groupList.length && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\t\t\r\n\t\t\t\tif(this.groupManager.table.modExists(\"columnCalcs\")){\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!noCalc && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\r\n\t\t\t\t\t\tif(this.calcs.top){\r\n\t\t\t\t\t\t\tthis.calcs.top.detachElement();\r\n\t\t\t\t\t\t\tthis.calcs.top.deleteCells();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.groupManager.table.options.groupClosedShowCalcs){\r\n\t\t\t\t\t\t\tthis.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows);\r\n\t\t\t\t\t\t\toutput.push(this.calcs.top);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!noCalc && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\r\n\t\t\t\t\t\tif(this.calcs.bottom){\r\n\t\t\t\t\t\t\tthis.calcs.bottom.detachElement();\r\n\t\t\t\t\t\t\tthis.calcs.bottom.deleteCells();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.groupManager.table.options.groupClosedShowCalcs){\r\n\t\t\t\t\t\t\tthis.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows);\r\n\t\t\t\t\t\t\toutput.push(this.calcs.bottom);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetData(visible, transform){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(!visible || (visible && this.visible)){\r\n\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\toutput.push(row.getData(transform || \"data\"));\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetRowCount(){\r\n\t\tvar count = 0;\r\n\t\t\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\tcount += group.getRowCount();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tcount = this.rows.length;\r\n\t\t}\r\n\t\treturn count;\r\n\t}\r\n\t\r\n\ttoggleVisibility(){\r\n\t\tif(this.visible){\r\n\t\t\tthis.hide();\r\n\t\t}else{\r\n\t\t\tthis.show();\r\n\t\t}\r\n\t}\r\n\t\r\n\thide(){\r\n\t\tthis.visible = false;\r\n\t\t\r\n\t\tif(this.groupManager.table.rowManager.getRenderMode() == \"classic\" && !this.groupManager.table.options.pagination){\r\n\t\t\t\r\n\t\t\tthis.element.classList.remove(\"tabulator-group-visible\");\r\n\t\t\t\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar rows = group.getHeadersAndRows();\r\n\t\t\t\t\t\r\n\t\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\t\trow.detachElement();\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex());\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth();\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.table.externalEvents.dispatch(\"groupVisibilityChanged\", this.getComponent(), false);\r\n\t}\r\n\t\r\n\tshow(){\r\n\t\tthis.visible = true;\r\n\t\t\r\n\t\tif(this.groupManager.table.rowManager.getRenderMode() == \"classic\" && !this.groupManager.table.options.pagination){\r\n\t\t\t\r\n\t\t\tthis.element.classList.add(\"tabulator-group-visible\");\r\n\t\t\t\r\n\t\t\tvar prev = this.generateElement();\r\n\t\t\t\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\t\tvar rows = group.getHeadersAndRows();\r\n\t\t\t\t\t\r\n\t\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\t\tprev.parentNode.insertBefore(rowEl, prev.nextSibling);\r\n\t\t\t\t\t\trow.initialize();\r\n\t\t\t\t\t\tprev = rowEl;\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\tprev.parentNode.insertBefore(rowEl, prev.nextSibling);\r\n\t\t\t\t\trow.initialize();\r\n\t\t\t\t\tprev = rowEl;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex());\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth();\r\n\t\t}else{\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.table.externalEvents.dispatch(\"groupVisibilityChanged\", this.getComponent(), true);\r\n\t}\r\n\t\r\n\t_visSet(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tif(typeof this.visible == \"function\"){\r\n\t\t\t\r\n\t\t\tthis.rows.forEach(function(row){\r\n\t\t\t\tdata.push(row.getData());\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.visible = this.visible(this.key, this.getRowCount(), data, this.getComponent());\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRowGroup(row){\r\n\t\tvar match = false;\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\tvar result = group.getRowGroup(row);\r\n\t\t\t\t\r\n\t\t\t\tif(result){\r\n\t\t\t\t\tmatch = result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tif(this.rows.find(function(item){\r\n\t\t\t\treturn item === row;\r\n\t\t\t})){\r\n\t\t\t\tmatch = this;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn match;\r\n\t}\r\n\t\r\n\tgetSubGroups(component){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.groupList.forEach(function(child){\r\n\t\t\toutput.push(component ? child.getComponent() : child);\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetRows(compoment){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\toutput.push(compoment ? row.getComponent() : row);\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgenerateGroupHeaderContents(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\tdata.push(row.getData());\r\n\t\t});\r\n\t\t\r\n\t\tthis.elementContents = this.generator(this.key, this.getRowCount(), data, this.getComponent());\r\n\t\t\r\n\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\t\t\r\n\t\tif(typeof this.elementContents === \"string\"){\r\n\t\t\tthis.element.innerHTML = this.elementContents;\r\n\t\t}else{\r\n\t\t\tthis.element.appendChild(this.elementContents);\r\n\t\t}\r\n\t\t\r\n\t\tthis.element.insertBefore(this.arrowElement, this.element.firstChild);\r\n\t}\r\n\t\r\n\tgetPath(path = []) {\r\n\t\tpath.unshift(this.key);\r\n\t\tif(this.parent) {\r\n\t\t\tthis.parent.getPath(path);\r\n\t\t}\r\n\t\treturn path;\r\n\t}\r\n\t\r\n\t////////////// Standard Row Functions //////////////\r\n\t\r\n\tgetElement(){\r\n\t\treturn this.elementContents ? this.element : this.generateElement();\r\n\t}\r\n\t\r\n\tgenerateElement(){\r\n\t\tthis.addBindings = false;\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(this.visible){\r\n\t\t\tthis.element.classList.add(\"tabulator-group-visible\");\r\n\t\t}else{\r\n\t\t\tthis.element.classList.remove(\"tabulator-group-visible\");\r\n\t\t}\r\n\t\t\r\n\t\tfor(var i = 0; i < this.element.childNodes.length; ++i){\r\n\t\t\tthis.element.childNodes[i].parentNode.removeChild(this.element.childNodes[i]);\r\n\t\t}\r\n\t\t\r\n\t\tthis.generateGroupHeaderContents();\r\n\t\t\r\n\t\t// this.addBindings();\r\n\t\t\r\n\t\treturn this.element;\r\n\t}\r\n\t\r\n\tdetachElement(){\r\n\t\tif (this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\t//normalize the height of elements in the row\r\n\tnormalizeHeight(){\r\n\t\tthis.setHeight(this.element.clientHeight);\r\n\t}\r\n\t\r\n\tinitialize(force){\r\n\t\tif(!this.initialized || force){\r\n\t\t\tthis.normalizeHeight();\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitialize(){\r\n\t\tthis.initialized = false;\r\n\t\tthis.height = 0;\r\n\t\t\r\n\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\tthis.initialize(true);\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetHeight(height){\r\n\t\tif(this.height != height){\r\n\t\t\tthis.height = height;\r\n\t\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return rows outer height\r\n\tgetHeight(){\r\n\t\treturn this.outerHeight;\r\n\t}\r\n\t\r\n\tgetGroup(){\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\treinitializeHeight(){}\r\n\t\r\n\tcalcHeight(){}\r\n\t\r\n\tsetCellHeight(){}\r\n\t\r\n\tclearCellHeight(){}\r\n\t\r\n\tdeinitializeHeight(){}\r\n\t\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new GroupComponent(this);\r\n\t\t}\r\n\t\t\r\n\t\treturn this.component;\r\n\t}\r\n}\r\n\r\nexport default Group;","import Module from '../../core/Module.js';\r\n\r\nimport GroupComponent from './GroupComponent.js';\r\nimport Group from './Group.js';\r\n\r\nclass GroupRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.groupIDLookups = false; //enable table grouping and set field to group by\r\n\t\tthis.startOpen = [function(){return false;}]; //starting state of group\r\n\t\tthis.headerGenerator = [function(){return \"\";}];\r\n\t\tthis.groupList = []; //ordered list of groups\r\n\t\tthis.allowedValues = false;\r\n\t\tthis.groups = {}; //hold row groups\r\n\t\tthis.displayIndex = 0; //index in display pipeline\r\n\r\n\t\tthis.displayHandler = this.getRows.bind(this);\r\n\r\n\t\t//register table options\r\n\t\tthis.registerTableOption(\"groupBy\", false); //enable table grouping and set field to group by\r\n\t\tthis.registerTableOption(\"groupStartOpen\", true); //starting state of group\r\n\t\tthis.registerTableOption(\"groupValues\", false);\r\n\t\tthis.registerTableOption(\"groupUpdateOnCellEdit\", false);\r\n\t\tthis.registerTableOption(\"groupHeader\", false); //header generation function\r\n\t\tthis.registerTableOption(\"groupHeaderPrint\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderClipboard\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderHtmlOutput\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderDownload\", null);\r\n\t\tthis.registerTableOption(\"groupToggleElement\", \"arrow\");\r\n\t\tthis.registerTableOption(\"groupClosedShowCalcs\", false);\r\n\r\n\t\t//register table functions\r\n\t\tthis.registerTableFunction(\"setGroupBy\", this.setGroupBy.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupValues\", this.setGroupValues.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupStartOpen\", this.setGroupStartOpen.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupHeader\", this.setGroupHeader.bind(this));\r\n\t\tthis.registerTableFunction(\"getGroups\", this.userGetGroups.bind(this));\r\n\t\tthis.registerTableFunction(\"getGroupedData\", this.userGetGroupedData.bind(this));\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"getGroup\", this.rowGetGroup.bind(this));\r\n\t}\r\n\r\n\t//initialize group configuration\r\n\tinitialize(){\r\n\t\tif(this.table.options.groupBy){\r\n\r\n\t\t\tif(this.table.options.groupUpdateOnCellEdit){\r\n\t\t\t\tthis.subscribe(\"cell-value-updated\", this.cellUpdated.bind(this));\r\n\t\t\t\tthis.subscribe(\"row-data-changed\", this.reassignRowToGroup.bind(this), 0);\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-built\", this.configureGroupSetup.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"row-deleting\", this.rowDeleting.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHeaders.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.wipe.bind(this));\r\n\t\t\tthis.subscribe(\"rows-added\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"row-moving\", this.rowMoving.bind(this));\r\n\t\t\tthis.subscribe(\"row-adding-index\", this.rowAddingIndex.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"rows-sample\", this.rowSample.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"render-virtual-fill\", this.virtualRenderFill.bind(this));\r\n\r\n\t\t\tthis.registerDisplayHandler(this.displayHandler, 20);\r\n\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tconfigureGroupSetup(){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tvar groupBy = this.table.options.groupBy,\r\n\t\t\tstartOpen = this.table.options.groupStartOpen,\r\n\t\t\tgroupHeader = this.table.options.groupHeader;\r\n\r\n\t\t\tthis.allowedValues = this.table.options.groupValues;\r\n\r\n\t\t\tif(Array.isArray(groupBy) && Array.isArray(groupHeader) && groupBy.length > groupHeader.length){\r\n\t\t\t\tconsole.warn(\"Error creating group headers, groupHeader array is shorter than groupBy array\");\r\n\t\t\t}\r\n\r\n\t\t\tthis.headerGenerator = [function(){return \"\";}];\r\n\t\t\tthis.startOpen = [function(){return false;}]; //starting state of group\r\n\r\n\t\t\tthis.langBind(\"groups|item\", (langValue, lang) => {\r\n\t\t\t\tthis.headerGenerator[0] = (value, count, data) => { //header layout function\r\n\t\t\t\t\treturn (typeof value === \"undefined\" ? \"\" : value) + \"(\" + count + \" \" + ((count === 1) ? langValue : lang.groups.items) + \")\";\r\n\t\t\t\t};\r\n\t\t\t});\r\n\r\n\t\t\tthis.groupIDLookups = [];\r\n\r\n\t\t\tif(Array.isArray(groupBy) || groupBy){\r\n\t\t\t\tif(this.table.modExists(\"columnCalcs\") && this.table.options.columnCalcs != \"table\" && this.table.options.columnCalcs != \"both\"){\r\n\t\t\t\t\tthis.table.modules.columnCalcs.removeCalcs();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.modExists(\"columnCalcs\") && this.table.options.columnCalcs != \"group\"){\r\n\r\n\t\t\t\t\tvar cols = this.table.columnManager.getRealColumns();\r\n\r\n\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\tif(col.definition.topCalc){\r\n\t\t\t\t\t\t\tthis.table.modules.columnCalcs.initializeTopRow();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(col.definition.bottomCalc){\r\n\t\t\t\t\t\t\tthis.table.modules.columnCalcs.initializeBottomRow();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(!Array.isArray(groupBy)){\r\n\t\t\t\tgroupBy = [groupBy];\r\n\t\t\t}\r\n\r\n\t\t\tgroupBy.forEach((group, i) => {\r\n\t\t\t\tvar lookupFunc, column;\r\n\r\n\t\t\t\tif(typeof group == \"function\"){\r\n\t\t\t\t\tlookupFunc = group;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolumn = this.table.columnManager.getColumnByField(group);\r\n\r\n\t\t\t\t\tif(column){\r\n\t\t\t\t\t\tlookupFunc = function(data){\r\n\t\t\t\t\t\t\treturn column.getFieldValue(data);\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tlookupFunc = function(data){\r\n\t\t\t\t\t\t\treturn data[group];\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.groupIDLookups.push({\r\n\t\t\t\t\tfield: typeof group === \"function\" ? false : group,\r\n\t\t\t\t\tfunc:lookupFunc,\r\n\t\t\t\t\tvalues:this.allowedValues ? this.allowedValues[i] : false,\r\n\t\t\t\t});\r\n\t\t\t});\r\n\r\n\t\t\tif(startOpen){\r\n\t\t\t\tif(!Array.isArray(startOpen)){\r\n\t\t\t\t\tstartOpen = [startOpen];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstartOpen.forEach((level) => {\r\n\t\t\t\t\tlevel = typeof level == \"function\" ? level : function(){return true;};\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.startOpen = startOpen;\r\n\t\t\t}\r\n\r\n\t\t\tif(groupHeader){\r\n\t\t\t\tthis.headerGenerator = Array.isArray(groupHeader) ? groupHeader : [groupHeader];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trowSample(rows, prevValue){\r\n\t\tvar group = this.getGroups(false)[0];\r\n\r\n\t\tprevValue.push(group.getRows(false)[0]);\r\n\r\n\t\treturn prevValue;\r\n\t}\r\n\r\n\tvirtualRenderFill(){\r\n\t\tvar el = this.table.rowManager.tableElement;\r\n\t\tvar rows = this.table.rowManager.getVisibleRows();\r\n\r\n\t\trows = rows.filter((row) => {\r\n\t\t\treturn row.type !== \"group\";\r\n\t\t});\r\n\r\n\t\tel.style.minWidth = !rows.length ? this.table.columnManager.getWidth() + \"px\" : \"\";\r\n\r\n\t\t// if(this.table.options.groupBy){\r\n\t\t// \tif(this.layoutMode() != \"fitDataFill\" && rowsCount == this.table.modules.groupRows.countGroups()){\r\n\t\t// \t\tel.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t// \t}\r\n\t\t// }\r\n\t}\r\n\r\n\trowAddingIndex(row, index, top){\r\n\t\tthis.assignRowToGroup(row);\r\n\r\n\t\tvar groupRows = row.modules.group.rows;\r\n\r\n\t\tif(groupRows.length > 1){\r\n\t\t\tif(!index || (index && groupRows.indexOf(index) == -1)){\r\n\t\t\t\tif(top){\r\n\t\t\t\t\tif(groupRows[0] !== row){\r\n\t\t\t\t\t\tindex = groupRows[0];\r\n\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(groupRows[groupRows.length -1] !== row){\r\n\t\t\t\t\t\tindex = groupRows[groupRows.length -1];\r\n\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn index;\r\n\t}\r\n\r\n\ttrackChanges(){\r\n\t\tthis.dispatch(\"group-changed\");\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tsetGroupBy(groups){\r\n\t\tthis.table.options.groupBy = groups;\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.initialize();\r\n\t\t}else{\r\n\t\t\tthis.configureGroupSetup();\r\n\t\t}\r\n\r\n\t\tthis.refreshData();\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\tsetGroupValues(groupValues){\r\n\t\tthis.table.options.groupValues = groupValues;\r\n\t\tthis.configureGroupSetup();\r\n\t\tthis.refreshData();\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\tsetGroupStartOpen(values){\r\n\t\tthis.table.options.groupStartOpen = values;\r\n\t\tthis.configureGroupSetup();\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\r\n\t\t\tthis.trackChanges();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Grouping Update - cant refresh view, no groups have been set\");\r\n\t\t}\r\n\t}\r\n\r\n\tsetGroupHeader(values){\r\n\t\tthis.table.options.groupHeader = values;\r\n\t\tthis.configureGroupSetup();\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\r\n\t\t\tthis.trackChanges();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Grouping Update - cant refresh view, no groups have been set\");\r\n\t\t}\r\n\t}\r\n\r\n\tuserGetGroups(values){\r\n\t\treturn this.getGroups(true);\r\n\t}\r\n\r\n\t// get grouped table data in the same format as getData()\r\n\tuserGetGroupedData(){\r\n\t\treturn this.table.options.groupBy ?\r\n\t\tthis.getGroupedData() : this.getData()\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////////\r\n\t///////// Component Functions /////////\r\n\t///////////////////////////////////////\r\n\r\n\trowGetGroup(row){\r\n\t\treturn row.modules.group ? row.modules.group.getComponent() : false;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\trowMoving(from, to, after){\r\n\t\tif(!after && to instanceof Group){\r\n\t\t\tto = this.table.rowManager.prevDisplayRow(from) || to;\r\n\t\t}\r\n\r\n\t\tvar toGroup = to instanceof Group ? to : to.modules.group;\r\n\t\tvar fromGroup = from instanceof Group ? from : from.modules.group;\r\n\r\n\t\tif(toGroup === fromGroup){\r\n\t\t\tthis.table.rowManager.moveRowInArray(toGroup.rows, from, to, after);\r\n\t\t}else{\r\n\t\t\tif(fromGroup){\r\n\t\t\t\tfromGroup.removeRow(from);\r\n\t\t\t}\r\n\r\n\t\t\ttoGroup.insertRow(from, to, after);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trowDeleting(row){\r\n\t\t//remove from group\r\n\t\tif(row.modules.group){\r\n\t\t\trow.modules.group.removeRow(row);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trowsUpdated(row){\r\n\t\tthis.updateGroupRows(true);\r\n\t}\r\n\r\n\tcellUpdated(cell){\r\n\t\tthis.reassignRowToGroup(cell.row);\r\n\t}\r\n\r\n\r\n\tsetDisplayIndex(index){\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\r\n\tgetDisplayIndex(){\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\r\n\t//return appropriate rows with group headers\r\n\tgetRows(rows){\r\n\t\tif(this.table.options.groupBy && this.groupIDLookups.length){\r\n\r\n\t\t\tthis.dispatchExternal(\"dataGrouping\");\r\n\r\n\t\t\tthis.generateGroups(rows);\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataGrouped\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataGrouped\", this.getGroups(true));\r\n\t\t\t}\r\n\r\n\t\t\treturn this.updateGroupRows();\r\n\r\n\t\t}else{\r\n\t\t\treturn rows.slice(0);\r\n\t\t}\r\n\t}\r\n\r\n\tgetGroups(component){\r\n\t\tvar groupComponents = [];\r\n\r\n\t\tthis.groupList.forEach(function(group){\r\n\t\t\tgroupComponents.push(component ? group.getComponent() : group);\r\n\t\t});\r\n\r\n\t\treturn groupComponents;\r\n\t}\r\n\r\n\tgetChildGroups(group){\r\n\t\tvar groupComponents = [];\r\n\r\n\t\tif(!group){\r\n\t\t\tgroup = this;\r\n\t\t}\r\n\r\n\t\tgroup.groupList.forEach((child) => {\r\n\t\t\tif(child.groupList.length){\r\n\t\t\t\tgroupComponents = groupComponents.concat(this.getChildGroups(child));\r\n\t\t\t}else{\r\n\t\t\t\tgroupComponents.push(child);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn groupComponents;\r\n\t}\r\n\r\n\twipe(){\r\n\t\tthis.groupList.forEach(function(group){\r\n\t\t\tgroup.wipe();\r\n\t\t});\r\n\t}\r\n\r\n\tpullGroupListData(groupList) {\r\n\t\tvar groupListData = [];\r\n\r\n\t\tgroupList.forEach((group) => {\r\n\t\t\tvar groupHeader = {};\r\n\t\t\tgroupHeader.level = 0;\r\n\t\t\tgroupHeader.rowCount = 0;\r\n\t\t\tgroupHeader.headerContent = \"\";\r\n\t\t\tvar childData = [];\r\n\r\n\t\t\tif (group.hasSubGroups) {\r\n\t\t\t\tchildData = this.pullGroupListData(group.groupList);\r\n\r\n\t\t\t\tgroupHeader.level = group.level;\r\n\t\t\t\tgroupHeader.rowCount = childData.length - group.groupList.length; // data length minus number of sub-headers\r\n\t\t\t\tgroupHeader.headerContent = group.generator(group.key, groupHeader.rowCount, group.rows, group);\r\n\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\t\t\t\tgroupListData = groupListData.concat(childData);\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tgroupHeader.level = group.level;\r\n\t\t\t\tgroupHeader.headerContent = group.generator(group.key, group.rows.length, group.rows, group);\r\n\t\t\t\tgroupHeader.rowCount = group.getRows().length;\r\n\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\r\n\t\t\t\tgroup.getRows().forEach((row) => {\r\n\t\t\t\t\tgroupListData.push(row.getData(\"data\"));\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn groupListData\r\n\t}\r\n\r\n\tgetGroupedData(){\r\n\r\n\t\treturn this.pullGroupListData(this.groupList);\r\n\t}\r\n\r\n\tgetRowGroup(row){\r\n\t\tvar match = false;\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\tvar result = group.getRowGroup(row);\r\n\r\n\t\t\tif(result){\r\n\t\t\t\tmatch = result;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tcountGroups(){\r\n\t\treturn this.groupList.length;\r\n\t}\r\n\r\n\tgenerateGroups(rows){\r\n\t\tvar oldGroups = this.groups;\r\n\r\n\t\tthis.groups = {};\r\n\t\tthis.groupList = [];\r\n\r\n\t\tif(this.allowedValues && this.allowedValues[0]){\r\n\t\t\tthis.allowedValues[0].forEach((value) => {\r\n\t\t\t\tthis.createGroup(value, 0, oldGroups);\r\n\t\t\t});\r\n\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tthis.assignRowToExistingGroup(row, oldGroups);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tthis.assignRowToGroup(row, oldGroups);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tcreateGroup(groupID, level, oldGroups){\r\n\t\tvar groupKey = level + \"_\" + groupID,\r\n\t\tgroup;\r\n\r\n\t\toldGroups = oldGroups || [];\r\n\r\n\t\tgroup = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]);\r\n\r\n\t\tthis.groups[groupKey] = group;\r\n\t\tthis.groupList.push(group);\r\n\t}\r\n\r\n\tassignRowToExistingGroup(row, oldGroups){\r\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\r\n\t\tgroupKey = \"0_\" + groupID;\r\n\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t}\r\n\t}\r\n\r\n\tassignRowToGroup(row, oldGroups){\r\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\r\n\t\tnewGroupNeeded = !this.groups[\"0_\" + groupID];\r\n\r\n\t\tif(newGroupNeeded){\r\n\t\t\tthis.createGroup(groupID, 0, oldGroups);\r\n\t\t}\r\n\r\n\t\tthis.groups[\"0_\" + groupID].addRow(row);\r\n\r\n\t\treturn !newGroupNeeded;\r\n\t}\r\n\r\n\treassignRowToGroup(row){\r\n\t\tif(row.type === \"row\"){\r\n\t\t\tvar oldRowGroup = row.modules.group,\r\n\t\t\toldGroupPath = oldRowGroup.getPath(),\r\n\t\t\tnewGroupPath = this.getExpectedPath(row),\r\n\t\t\tsamePath = true;\r\n\r\n\t\t\t// figure out if new group path is the same as old group path\r\n\t\t\tvar samePath = (oldGroupPath.length == newGroupPath.length) && oldGroupPath.every((element, index) => {\r\n\t\t\t\treturn element === newGroupPath[index];\r\n\t\t\t});\r\n\r\n\t\t\t// refresh if they new path and old path aren't the same (aka the row's groupings have changed)\r\n\t\t\tif(!samePath) {\r\n\t\t\t\toldRowGroup.removeRow(row);\r\n\t\t\t\tthis.assignRowToGroup(row, this.groups);\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgetExpectedPath(row) {\r\n\t\tvar groupPath = [], rowData = row.getData();\r\n\r\n\t\tthis.groupIDLookups.forEach((groupId) => {\r\n\t\t\tgroupPath.push(groupId.func(rowData));\r\n\t\t});\r\n\r\n\t\treturn groupPath;\r\n\t}\r\n\r\n\tupdateGroupRows(force){\r\n\t\tvar output = [],\r\n\t\toldRowCount;\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\toutput = output.concat(group.getHeadersAndRows());\r\n\t\t});\r\n\r\n\t\tif(force){\r\n\t\t\tthis.refreshData(true, this.displayHandler);\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tscrollHeaders(left){\r\n\t\tif(this.table.options.renderHorizontal === \"virtual\"){\r\n\t\t\tleft -= this.table.columnManager.renderer.vDomPadLeft;\r\n\t\t}\r\n\r\n\t\tleft = left + \"px\";\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\tgroup.scrollHeader(left);\r\n\t\t});\r\n\t}\r\n\r\n\tremoveGroup(group){\r\n\t\tvar groupKey = group.level + \"_\" + group.key,\r\n\t\tindex;\r\n\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tdelete this.groups[groupKey];\r\n\r\n\t\t\tindex = this.groupList.indexOf(group);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.groupList.splice(index, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nGroupRows.moduleName = \"groupRows\";\r\n\r\nexport default GroupRows;","export default {\r\n\tcellEdit: function(action){\r\n\t\taction.component.setValueProcessData(action.data.oldValue);\r\n\t\taction.component.cellRendered();\r\n\t},\r\n\r\n\trowAdd: function(action){\r\n\t\taction.component.deleteActual();\r\n\t},\r\n\r\n\trowDelete: function(action){\r\n\t\tvar newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index);\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tthis.table.modules.groupRows.updateGroupRows(true);\r\n\t\t}\r\n\r\n\t\tthis._rebindRow(action.component, newRow);\r\n\t},\r\n\r\n\trowMove: function(action){\r\n\t\tthis.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posFrom], !action.data.after);\r\n\t\tthis.table.rowManager.redraw();\r\n\t},\r\n};","export default {\r\n\tcellEdit: function(action){\r\n\t\taction.component.setValueProcessData(action.data.newValue);\r\n\t\taction.component.cellRendered();\r\n\t},\r\n\r\n\trowAdd: function(action){\r\n\t\tvar newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index);\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tthis.table.modules.groupRows.updateGroupRows(true);\r\n\t\t}\r\n\r\n\t\tthis._rebindRow(action.component, newRow);\r\n\t},\r\n\r\n\trowDelete:function(action){\r\n\t\taction.component.deleteActual();\r\n\t},\r\n\r\n\trowMove: function(action){\r\n\t\tthis.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posTo], action.data.after);\r\n\t\tthis.table.rowManager.redraw();\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\nimport Row from '../../core/row/Row.js';\r\nimport Cell from '../../core/cell/Cell.js';\r\n\r\nimport defaultUndoers from './defaults/undoers.js';\r\nimport defaultRedoers from './defaults/redoers.js';\r\n\r\nclass History extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.history = [];\r\n\t\tthis.index = -1;\r\n\r\n\t\tthis.registerTableOption(\"history\", false); //enable edit history\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.history){\r\n\t\t\tthis.subscribe(\"cell-value-updated\", this.cellUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"cell-delete\", this.clearComponentHistory.bind(this));\r\n\t\t\tthis.subscribe(\"row-delete\", this.rowDeleted.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.clear.bind(this));\r\n\t\t\tthis.subscribe(\"row-added\", this.rowAdded.bind(this));\r\n\t\t\tthis.subscribe(\"row-move\", this.rowMoved.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"undo\", this.undo.bind(this));\r\n\t\tthis.registerTableFunction(\"redo\", this.redo.bind(this));\r\n\t\tthis.registerTableFunction(\"getHistoryUndoSize\", this.getHistoryUndoSize.bind(this));\r\n\t\tthis.registerTableFunction(\"getHistoryRedoSize\", this.getHistoryRedoSize.bind(this));\r\n\t\tthis.registerTableFunction(\"clearHistory\", this.clear.bind(this));\r\n\t}\r\n\r\n\trowMoved(from, to, after){\r\n\t\tthis.action(\"rowMove\", from, {posFrom:this.table.rowManager.getRowPosition(from), posTo:this.table.rowManager.getRowPosition(to), to:to, after:after});\r\n\t}\r\n\r\n\trowAdded(row, data, pos, index){\r\n\t\tthis.action(\"rowAdd\", row, {data:data, pos:pos, index:index});\r\n\t}\r\n\r\n\trowDeleted(row){\r\n\t\tvar index, rows;\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\r\n\t\t\trows = row.getComponent().getGroup().rows\r\n\t\t\tindex = rows.indexOf(row);\r\n\r\n\t\t\tif(index){\r\n\t\t\t\tindex = rows[index-1];\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tindex = row.table.rowManager.getRowIndex(row);\r\n\r\n\t\t\tif(index){\r\n\t\t\t\tindex = row.table.rowManager.rows[index-1];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.action(\"rowDelete\", row, {data:row.getData(), pos:!index, index:index});\r\n\t}\r\n\r\n\tcellUpdated(cell){\r\n\t\tthis.action(\"cellEdit\", cell, {oldValue:cell.oldValue, newValue:cell.value});\r\n\t}\r\n\r\n\tclear(){\r\n\t\tthis.history = [];\r\n\t\tthis.index = -1;\r\n\t}\r\n\r\n\taction(type, component, data){\r\n\t\tthis.history = this.history.slice(0, this.index + 1);\r\n\r\n\t\tthis.history.push({\r\n\t\t\ttype:type,\r\n\t\t\tcomponent:component,\r\n\t\t\tdata:data,\r\n\t\t});\r\n\r\n\t\tthis.index ++;\r\n\t}\r\n\r\n\tgetHistoryUndoSize(){\r\n\t\treturn this.index + 1;\r\n\t}\r\n\r\n\tgetHistoryRedoSize(){\r\n\t\treturn this.history.length - (this.index + 1);\r\n\t}\r\n\r\n\tclearComponentHistory(component){\r\n\t\tvar index = this.history.findIndex(function(item){\r\n\t\t\treturn item.component === component;\r\n\t\t});\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.history.splice(index, 1);\r\n\t\t\tif(index <= this.index){\r\n\t\t\t\tthis.index--;\r\n\t\t\t}\r\n\r\n\t\t\tthis.clearComponentHistory(component);\r\n\t\t}\r\n\t}\r\n\r\n\tundo(){\r\n\t\tif(this.index > -1){\r\n\t\t\tlet action = this.history[this.index];\r\n\r\n\t\t\tHistory.undoers[action.type].call(this, action);\r\n\r\n\t\t\tthis.index--;\r\n\r\n\t\t\tthis.dispatchExternal(\"historyUndo\", action.type, action.component.getComponent(), action.data);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"History Undo Error - No more history to undo\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tredo(){\r\n\t\tif(this.history.length-1 > this.index){\r\n\r\n\t\t\tthis.index++;\r\n\r\n\t\t\tlet action = this.history[this.index];\r\n\r\n\t\t\tHistory.redoers[action.type].call(this, action);\r\n\r\n\t\t\tthis.dispatchExternal(\"historyRedo\", action.type, action.component.getComponent(), action.data);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"History Redo Error - No more history to redo\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//rebind rows to new element after deletion\r\n\t_rebindRow(oldRow, newRow){\r\n\t\tthis.history.forEach(function(action){\r\n\t\t\tif(action.component instanceof Row){\r\n\t\t\t\tif(action.component === oldRow){\r\n\t\t\t\t\taction.component = newRow;\r\n\t\t\t\t}\r\n\t\t\t}else if(action.component instanceof Cell){\r\n\t\t\t\tif(action.component.row === oldRow){\r\n\t\t\t\t\tvar field = action.component.column.getField();\r\n\r\n\t\t\t\t\tif(field){\r\n\t\t\t\t\t\taction.component = newRow.getCell(field);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}\r\n\r\nHistory.moduleName = \"history\";\r\n\r\n//load defaults\r\nHistory.undoers = defaultUndoers;\r\nHistory.redoers = defaultRedoers;\r\n\r\nexport default History;","import Module from '../../core/Module.js';\r\nimport Column from '../../core/column/Column.js';\r\n\r\nclass HtmlTableImport extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.fieldIndex = [];\r\n\t\tthis.hasIndex = false;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.tableElementCheck();\r\n\t}\r\n\r\n\ttableElementCheck(){\r\n\t\tif(this.table.originalElement && this.table.originalElement.tagName === \"TABLE\"){\r\n\t\t\tthis.parseTable();\r\n\t\t}\r\n\t}\r\n\r\n\tparseTable(){\r\n\t\tvar element = this.table.originalElement,\r\n\t\toptions = this.table.options,\r\n\t\tcolumns = options.columns,\r\n\t\theaders = element.getElementsByTagName(\"th\"),\r\n\t\trows = element.getElementsByTagName(\"tbody\")[0],\r\n\t\tdata = [],\r\n\t\tnewTable;\r\n\r\n\t\tthis.hasIndex = false;\r\n\r\n\t\tthis.dispatchExternal(\"htmlImporting\");\r\n\r\n\t\trows = rows ? rows.getElementsByTagName(\"tr\") : [];\r\n\r\n\t\t//check for Tabulator inline options\r\n\t\tthis._extractOptions(element, options);\r\n\r\n\t\tif(headers.length){\r\n\t\t\tthis._extractHeaders(headers, rows);\r\n\t\t}else{\r\n\t\t\tthis._generateBlankHeaders(headers, rows);\r\n\t\t}\r\n\r\n\t\t//iterate through table rows and build data set\r\n\t\tfor(var index = 0; index < rows.length; index++){\r\n\t\t\tvar row = rows[index],\r\n\t\t\tcells = row.getElementsByTagName(\"td\"),\r\n\t\t\titem = {};\r\n\r\n\t\t\t//create index if the dont exist in table\r\n\t\t\tif(!this.hasIndex){\r\n\t\t\t\titem[options.index] = index;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\tvar cell = cells[i];\r\n\t\t\t\tif(typeof this.fieldIndex[i] !== \"undefined\"){\r\n\t\t\t\t\titem[this.fieldIndex[i]] = cell.innerHTML;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//add row data to item\r\n\t\t\tdata.push(item);\r\n\t\t}\r\n\r\n\t\toptions.data = data;\r\n\r\n\t\tthis.dispatchExternal(\"htmlImported\");\r\n\t}\r\n\r\n\t//extract tabulator attribute options\r\n\t_extractOptions(element, options, defaultOptions){\r\n\t\tvar attributes = element.attributes;\r\n\t\tvar optionsArr = defaultOptions ? Object.keys(defaultOptions) : Object.keys(options);\r\n\t\tvar optionsList = {};\r\n\r\n\t\toptionsArr.forEach((item) => {\r\n\t\t\toptionsList[item.toLowerCase()] = item;\r\n\t\t});\r\n\r\n\t\tfor(var index in attributes){\r\n\t\t\tvar attrib = attributes[index];\r\n\t\t\tvar name;\r\n\r\n\t\t\tif(attrib && typeof attrib == \"object\" && attrib.name && attrib.name.indexOf(\"tabulator-\") === 0){\r\n\t\t\t\tname = attrib.name.replace(\"tabulator-\", \"\");\r\n\r\n\t\t\t\tif(typeof optionsList[name] !== \"undefined\"){\r\n\t\t\t\t\toptions[optionsList[name]] = this._attribValue(attrib.value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//get value of attribute\r\n\t_attribValue(value){\r\n\t\tif(value === \"true\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif(value === \"false\"){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\t//find column if it has already been defined\r\n\t_findCol(title){\r\n\t\tvar match = this.table.options.columns.find((column) => {\r\n\t\t\treturn column.title === title;\r\n\t\t});\r\n\r\n\t\treturn match || false;\r\n\t}\r\n\r\n\t//extract column from headers\r\n\t_extractHeaders(headers, rows){\r\n\t\tfor(var index = 0; index < headers.length; index++){\r\n\t\t\tvar header = headers[index],\r\n\t\t\texists = false,\r\n\t\t\tcol = this._findCol(header.textContent),\r\n\t\t\twidth, attributes;\r\n\r\n\t\t\tif(col){\r\n\t\t\t\texists = true;\r\n\t\t\t}else{\r\n\t\t\t\tcol = {title:header.textContent.trim()};\r\n\t\t\t}\r\n\r\n\t\t\tif(!col.field) {\r\n\t\t\t\tcol.field = header.textContent.trim().toLowerCase().replace(\" \", \"_\");\r\n\t\t\t}\r\n\r\n\t\t\twidth = header.getAttribute(\"width\");\r\n\r\n\t\t\tif(width && !col.width)\t{\r\n\t\t\t\tcol.width = width;\r\n\t\t\t}\r\n\r\n\t\t\t//check for Tabulator inline options\r\n\t\t\tthis._extractOptions(header, col, this.table.columnManager.optionsList.registeredDefaults);\r\n\r\n\t\t\tthis.fieldIndex[index] = col.field;\r\n\r\n\t\t\tif(col.field == this.table.options.index){\r\n\t\t\t\tthis.hasIndex = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(!exists){\r\n\t\t\t\tthis.table.options.columns.push(col);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\r\n\t//generate blank headers\r\n\t_generateBlankHeaders(headers, rows){\r\n\t\tfor(var index = 0; index < headers.length; index++){\r\n\t\t\tvar header = headers[index],\r\n\t\t\tcol = {title:\"\", field:\"col\" + index};\r\n\r\n\t\t\tthis.fieldIndex[index] = col.field;\r\n\r\n\t\t\tvar width = header.getAttribute(\"width\");\r\n\r\n\t\t\tif(width){\r\n\t\t\t\tcol.width = width;\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.options.columns.push(col);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nHtmlTableImport.moduleName = \"htmlTableImport\";\r\n\r\nexport default HtmlTableImport;","function csvImporter(input){\r\n var data = [],\r\n row = 0, \r\n col = 0,\r\n inQuote = false;\r\n \r\n //Iterate over each character\r\n for (let index = 0; index < input.length; index++) {\r\n let char = input[index], \r\n nextChar = input[index+1]; \r\n \r\n //Initialize empty row\r\n if(!data[row]){\r\n data[row] = [];\r\n }\r\n\r\n //Initialize empty column\r\n if(!data[row][col]){\r\n data[row][col] = \"\";\r\n }\r\n \r\n //Handle quotation mark inside string\r\n if (char == '\"' && inQuote && nextChar == '\"') { \r\n data[row][col] += char; \r\n index++;\r\n continue; \r\n }\r\n \r\n //Begin / End Quote\r\n if (char == '\"') { \r\n inQuote = !inQuote;\r\n continue;\r\n }\r\n \r\n //Next column (if not in quote)\r\n if (char == ',' && !inQuote) { \r\n col++;\r\n continue; \r\n }\r\n \r\n //New row if new line and not in quote (CRLF) \r\n if (char == '\\r' && nextChar == '\\n' && !inQuote) { \r\n col = 0; \r\n row++; \r\n index++; \r\n continue; \r\n }\r\n \r\n //New row if new line and not in quote (CR or LF) \r\n if ((char == '\\r' || char == '\\n') && !inQuote) { \r\n col = 0;\r\n row++;\r\n continue; \r\n }\r\n\r\n //Normal Character, append to column\r\n data[row][col] += char;\r\n }\r\n\r\n return data;\r\n}\r\n\r\nexport default csvImporter;","export default function(input){\r\n try {\r\n return JSON.parse(input);\r\n } catch(e) {\r\n console.warn(\"JSON Import Error - File contents is invalid JSON\", e);\r\n return Promise.reject();\r\n }\r\n}","import csv from './importers/csv.js';\r\nimport json from './importers/json.js';\r\n\r\nexport default {\r\n\tcsv:csv,\r\n\tjson:json,\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultImporters from './defaults/importers.js';\r\n\r\nclass Import extends Module{\r\n \r\n constructor(table){\r\n super(table);\r\n \r\n this.registerTableOption(\"importFormat\");\r\n this.registerTableOption(\"importReader\", \"text\");\r\n }\r\n \r\n initialize(){\r\n this.registerTableFunction(\"import\", this.importFromFile.bind(this));\r\n\r\n if(this.table.options.importFormat){\r\n this.subscribe(\"data-loading\", this.loadDataCheck.bind(this), 10);\r\n this.subscribe(\"data-load\", this.loadData.bind(this), 10);\r\n }\r\n }\r\n\r\n loadDataCheck(data){\r\n return typeof data === \"string\";\r\n }\r\n\r\n loadData(data, params, config, silent, previousData){\r\n return this.importData(this.lookupImporter(), data)\r\n .then(this.structureData.bind(this))\r\n .catch((err) => {\r\n console.error(\"Import Error:\", err || \"Unable to import data\")\r\n return Promise.reject(err);\r\n })\r\n }\r\n\r\n lookupImporter(importFormat){\r\n var importer;\r\n \r\n if(!importFormat){\r\n importFormat = this.table.options.importFormat;\r\n }\r\n \r\n if(typeof importFormat === \"string\"){\r\n importer = Import.importers[importFormat];\r\n }else{\r\n importer = importFormat;\r\n }\r\n\r\n if(!importer){\r\n console.error(\"Import Error - Importer not found:\", importFormat);\r\n }\r\n \r\n return importer;\r\n }\r\n \r\n importFromFile(importFormat, extension){\r\n var importer = this.lookupImporter(importFormat);\r\n \r\n if(importer){\r\n return this.pickFile(extension)\r\n .then(this.importData.bind(this, importer))\r\n .then(this.structureData.bind(this))\r\n .then(this.setData.bind(this))\r\n .catch((err) => {\r\n console.error(\"Import Error:\", err || \"Unable to import file\")\r\n return Promise.reject(err);\r\n })\r\n }\r\n }\r\n \r\n pickFile(extensions){\r\n return new Promise((resolve, reject) => {\r\n var input = document.createElement(\"input\");\r\n input.type = \"file\";\r\n input.accept = extensions;\r\n \r\n input.addEventListener(\"change\", (e) => {\r\n var file = input.files[0],\r\n reader = new FileReader(),\r\n data;\r\n \r\n switch(this.table.options.importReader){\r\n case \"buffer\":\r\n reader.readAsArrayBuffer(file);\r\n break;\r\n\r\n case \"binary\":\r\n reader.readAsBinaryString(file);\r\n break;\r\n\r\n case \"url\":\r\n reader.readAsDataURL(file);\r\n break;\r\n\r\n case \"text\":\r\n default:\r\n reader.readAsText(file);\r\n }\r\n \r\n reader.onload = (e) => {\r\n resolve(reader.result)\r\n };\r\n \r\n reader.onerror = (e) => {\r\n console.warn(\"File Load Error - Unable to read file\");\r\n reject();\r\n };\r\n });\r\n \r\n input.click();\r\n });\r\n }\r\n \r\n importData(importer, fileContents){\r\n var data = importer.call(this.table, fileContents);\r\n \r\n if(data instanceof Promise){\r\n return data;\r\n }else{\r\n return data ? Promise.resolve(data) : Promise.reject();\r\n }\r\n }\r\n\r\n structureData(parsedData){\r\n var data = [];\r\n \r\n if(Array.isArray(parsedData) && parsedData.length && Array.isArray(parsedData[0])){\r\n if(this.table.options.autoColumns){\r\n data = this.structureArrayToObject(parsedData);\r\n }else{\r\n data = this.structureArrayToColumns(parsedData);\r\n }\r\n\r\n return data;\r\n }else{\r\n return parsedData;\r\n }\r\n }\r\n\r\n structureArrayToObject(parsedData){\r\n var columns = parsedData.shift();\r\n\r\n var data = parsedData.map((values) => {\r\n var row = {};\r\n\r\n columns.forEach((key, i) => {\r\n row[key] = values[i];\r\n })\r\n\r\n return row;\r\n })\r\n\r\n return data;\r\n }\r\n\r\n structureArrayToColumns(parsedData){\r\n var data = [],\r\n columns = this.table.getColumns();\r\n\r\n //remove first row if it is the column names\r\n if(columns[0] && parsedData[0][0]){\r\n if(columns[0].getDefinition().title === parsedData[0][0]){\r\n parsedData.shift();\r\n }\r\n }\r\n \r\n //convert row arrays to objects\r\n parsedData.forEach((rowData) => {\r\n var row = {};\r\n\r\n rowData.forEach((value, index) => {\r\n var column = columns[index];\r\n\r\n if(column){\r\n row[column.getField()] = value;\r\n }\r\n })\r\n\r\n data.push(row);\r\n });\r\n\r\n return data;\r\n }\r\n \r\n setData(data){\r\n return this.table.setData(data);\r\n }\r\n}\r\n\r\nImport.moduleName = \"import\";\r\n\r\n//load defaults\r\nImport.importers = defaultImporters;\r\n\r\nexport default Import;","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport Cell from '../../core/cell/Cell';\r\nimport Column from '../../core/column/Column';\r\n\r\nclass Interaction extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.eventMap = {\r\n\t\t\t//row events\r\n\t\t\trowClick:\"row-click\",\r\n\t\t\trowDblClick:\"row-dblclick\",\r\n\t\t\trowContext:\"row-contextmenu\",\r\n\t\t\trowMouseEnter:\"row-mouseenter\",\r\n\t\t\trowMouseLeave:\"row-mouseleave\",\r\n\t\t\trowMouseOver:\"row-mouseover\",\r\n\t\t\trowMouseOut:\"row-mouseout\",\r\n\t\t\trowMouseMove:\"row-mousemove\",\r\n\t\t\trowTap:\"row\",\r\n\t\t\trowDblTap:\"row\",\r\n\t\t\trowTapHold:\"row\",\r\n\r\n\t\t\t//cell events\r\n\t\t\tcellClick:\"cell-click\",\r\n\t\t\tcellDblClick:\"cell-dblclick\",\r\n\t\t\tcellContext:\"cell-contextmenu\",\r\n\t\t\tcellMouseEnter:\"cell-mouseenter\",\r\n\t\t\tcellMouseLeave:\"cell-mouseleave\",\r\n\t\t\tcellMouseOver:\"cell-mouseover\",\r\n\t\t\tcellMouseOut:\"cell-mouseout\",\r\n\t\t\tcellMouseMove:\"cell-mousemove\",\r\n\t\t\tcellTap:\"cell\",\r\n\t\t\tcellDblTap:\"cell\",\r\n\t\t\tcellTapHold:\"cell\",\r\n\r\n\t\t\t//column header events\r\n\t\t\theaderClick:\"column-click\",\r\n\t\t\theaderDblClick:\"column-dblclick\",\r\n\t\t\theaderContext:\"column-contextmenu\",\r\n\t\t\theaderMouseEnter:\"column-mouseenter\",\r\n\t\t\theaderMouseLeave:\"column-mouseleave\",\r\n\t\t\theaderMouseOver:\"column-mouseover\",\r\n\t\t\theaderMouseOut:\"column-mouseout\",\r\n\t\t\theaderMouseMove:\"column-mousemove\",\r\n\t\t\theaderTap:\"column\",\r\n\t\t\theaderDblTap:\"column\",\r\n\t\t\theaderTapHold:\"column\",\r\n\r\n\t\t\t//group header\r\n\t\t\tgroupClick:\"group-click\",\r\n\t\t\tgroupDblClick:\"group-dblclick\",\r\n\t\t\tgroupContext:\"group-contextmenu\",\r\n\t\t\tgroupMouseEnter:\"group-mouseenter\",\r\n\t\t\tgroupMouseLeave:\"group-mouseleave\",\r\n\t\t\tgroupMouseOver:\"group-mouseover\",\r\n\t\t\tgroupMouseOut:\"group-mouseout\",\r\n\t\t\tgroupMouseMove:\"group-mousemove\",\r\n\t\t\tgroupTap:\"group\",\r\n\t\t\tgroupDblTap:\"group\",\r\n\t\t\tgroupTapHold:\"group\",\r\n\t\t}\r\n\r\n\t\tthis.subscribers = {};\r\n\r\n\t\tthis.touchSubscribers = {};\r\n\r\n\t\tthis.columnSubscribers = {};\r\n\r\n\t\tthis.touchWatchers = {\r\n\t\t\trow:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tcell:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tcolumn:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tgroup:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.registerColumnOption(\"headerClick\");\r\n\t\tthis.registerColumnOption(\"headerDblClick\");\r\n\t\tthis.registerColumnOption(\"headerContext\");\r\n\t\tthis.registerColumnOption(\"headerMouseEnter\");\r\n\t\tthis.registerColumnOption(\"headerMouseLeave\");\r\n\t\tthis.registerColumnOption(\"headerMouseOver\");\r\n\t\tthis.registerColumnOption(\"headerMouseOut\");\r\n\t\tthis.registerColumnOption(\"headerMouseMove\");\r\n\t\tthis.registerColumnOption(\"headerTap\");\r\n\t\tthis.registerColumnOption(\"headerDblTap\");\r\n\t\tthis.registerColumnOption(\"headerTapHold\");\r\n\r\n\t\tthis.registerColumnOption(\"cellClick\");\r\n\t\tthis.registerColumnOption(\"cellDblClick\");\r\n\t\tthis.registerColumnOption(\"cellContext\");\r\n\t\tthis.registerColumnOption(\"cellMouseEnter\");\r\n\t\tthis.registerColumnOption(\"cellMouseLeave\");\r\n\t\tthis.registerColumnOption(\"cellMouseOver\");\r\n\t\tthis.registerColumnOption(\"cellMouseOut\");\r\n\t\tthis.registerColumnOption(\"cellMouseMove\");\r\n\t\tthis.registerColumnOption(\"cellTap\");\r\n\t\tthis.registerColumnOption(\"cellDblTap\");\r\n\t\tthis.registerColumnOption(\"cellTapHold\");\r\n\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeExternalEvents();\r\n\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this))\r\n\t\tthis.subscribe(\"cell-dblclick\", this.cellContentsSelectionFixer.bind(this))\r\n\t}\r\n\r\n\tcellContentsSelectionFixer(e, cell){\r\n\t\tif(this.table.modExists(\"edit\")){\r\n\t\t\tif (this.table.modules.edit.currentCell === this){\r\n\t\t\t\treturn; //prevent instant selection of editor content\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\ttry{\r\n\t\t\tif (document.selection) { // IE\r\n\t\t\t\tvar range = document.body.createTextRange();\r\n\t\t\t\trange.moveToElementText(this.element);\r\n\t\t\t\trange.select();\r\n\t\t\t} else if (window.getSelection) {\r\n\t\t\t\tvar range = document.createRange();\r\n\t\t\t\trange.selectNode(this.element);\r\n\t\t\t\twindow.getSelection().removeAllRanges();\r\n\t\t\t\twindow.getSelection().addRange(range);\r\n\t\t\t}\r\n\t\t}catch(e){}\r\n\t}\r\n\r\n\tinitializeExternalEvents(){\r\n\t\tfor(let key in this.eventMap){\r\n\t\t\tthis.subscriptionChangeExternal(key, this.subscriptionChanged.bind(this, key))\r\n\t\t}\r\n\t}\r\n\r\n\tsubscriptionChanged(key, added){\r\n\t\tvar index;\r\n\r\n\t\tif(added){\r\n\t\t\tif(!this.subscribers[key]){\r\n\t\t\t\tif(this.eventMap[key].includes(\"-\")){\r\n\t\t\t\t\tthis.subscribers[key] = this.handle.bind(this, key);\r\n\t\t\t\t\tthis.subscribe(this.eventMap[key], this.subscribers[key]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.subscribeTouchEvents(key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.eventMap[key].includes(\"-\")){\r\n\t\t\t\tif(this.subscribers[key] && !this.columnSubscribers[key] && !this.subscribedExternal(key)){\r\n\t\t\t\t\tthis.unsubscribe(this.eventMap[key], this.subscribers[key]);\r\n\t\t\t\t\tdelete this.subscribers[key];\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.unsubscribeTouchEvents(key);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tsubscribeTouchEvents(key){\r\n\t\tvar type = this.eventMap[key];\r\n\r\n\t\tif(!this.touchSubscribers[type + \"-touchstart\"]){\r\n\t\t\tthis.touchSubscribers[type + \"-touchstart\"] = this.handleTouch.bind(this, type, \"start\");\r\n\t\t\tthis.touchSubscribers[type + \"-touchend\"] = this.handleTouch.bind(this, type, \"end\");\r\n\r\n\t\t\tthis.subscribe(type + \"-touchstart\", this.touchSubscribers[type + \"-touchstart\"]);\r\n\t\t\tthis.subscribe(type + \"-touchend\", this.touchSubscribers[type + \"-touchend\"]);\r\n\t\t}\r\n\r\n\t\tthis.subscribers[key] = true;\r\n\t}\r\n\r\n\tunsubscribeTouchEvents(key){\r\n\t\tvar notouch = true,\r\n\t\ttype = this.eventMap[key];\r\n\r\n\t\tif(this.subscribers[key] && !this.subscribedExternal(key)){\r\n\t\t\tdelete this.subscribers[key];\r\n\r\n\t\t\tfor(let i in this.eventMap){\r\n\t\t\t\tif(this.eventMap[i] === type){\r\n\t\t\t\t\tif(this.subscribers[i]){\r\n\t\t\t\t\t\tnotouch = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(notouch){\r\n\t\t\t\tthis.unsubscribe(type + \"-touchstart\", this.touchSubscribers[type + \"-touchstart\"]);\r\n\t\t\t\tthis.unsubscribe(type + \"-touchend\", this.touchSubscribers[type + \"-touchend\"]);\r\n\r\n\t\t\t\tdelete this.touchSubscribers[type + \"-touchstart\"];\r\n\t\t\t\tdelete this.touchSubscribers[type + \"-touchend\"];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition;\r\n\r\n\t\tfor(let key in this.eventMap){\r\n\t\t\tif(def[key]){\r\n\t\t\t\tthis.subscriptionChanged(key, true);\r\n\r\n\t\t\t\tif(!this.columnSubscribers[key]){\r\n\t\t\t\t\tthis.columnSubscribers[key] = [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.columnSubscribers[key].push(column);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\thandle(action, e, component){\r\n\t\tthis.dispatchEvent(action, e, component);\r\n\t}\r\n\r\n\thandleTouch(type, action, e, component){\r\n\t\tvar watchers = this.touchWatchers[type];\r\n\r\n\t\tif(type === \"column\"){\r\n\t\t\ttype = \"header\";\r\n\t\t}\r\n\r\n\t\tswitch(action){\r\n\t\t\tcase \"start\":\r\n\t\t\twatchers.tap = true;\r\n\r\n\t\t\tclearTimeout(watchers.tapHold);\r\n\r\n\t\t\twatchers.tapHold = setTimeout(() => {\r\n\t\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\t\twatchers.tapHold = null;\r\n\r\n\t\t\t\twatchers.tap = null;\r\n\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\tthis.dispatchEvent(type + \"TapHold\", e, component);\r\n\t\t\t}, 1000);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"end\":\r\n\t\t\tif(watchers.tap){\r\n\r\n\t\t\t\twatchers.tap = null;\r\n\t\t\t\tthis.dispatchEvent(type + \"Tap\", e, component);\r\n\t\t\t}\r\n\r\n\t\t\tif(watchers.tapDbl){\r\n\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\tthis.dispatchEvent(type + \"DblTap\", e, component);\r\n\t\t\t}else{\r\n\t\t\t\twatchers.tapDbl = setTimeout(() => {\r\n\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\twatchers.tapDbl = null;\r\n\t\t\t\t}, 300);\r\n\t\t\t}\r\n\r\n\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\twatchers.tapHold = null;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tdispatchEvent(action, e, component){\r\n\t\tvar componentObj = component.getComponent(),\r\n\t\tcallback;\r\n\r\n\t\tif(this.columnSubscribers[action]){\r\n\r\n\t\t\tif(component instanceof Cell){\r\n\t\t\t\tcallback = component.column.definition[action];\r\n\t\t\t}else if(component instanceof Column){\r\n\t\t\t\tcallback = component.definition[action];\r\n\t\t\t}\r\n\r\n\t\t\tif(callback){\r\n\t\t\t\tcallback(e, componentObj);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.dispatchExternal(action, e, componentObj);\r\n\t}\r\n}\r\n\r\nInteraction.moduleName = \"interaction\";\r\n\r\nexport default Interaction;","export default {\r\n\tnavPrev:\"shift + 9\",\r\n\tnavNext:9,\r\n\tnavUp:38,\r\n\tnavDown:40,\r\n\tscrollPageUp:33,\r\n\tscrollPageDown:34,\r\n\tscrollToStart:36,\r\n\tscrollToEnd:35,\r\n\tundo:[\"ctrl + 90\", \"meta + 90\"],\r\n\tredo:[\"ctrl + 89\", \"meta + 89\"],\r\n\tcopyToClipboard:[\"ctrl + 67\", \"meta + 89\"],\r\n};","export default {\r\n\tkeyBlock:function(e){\r\n\t\te.stopPropagation();\r\n\t\te.preventDefault();\r\n\t},\r\n\tscrollPageUp:function(e){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tnewPos = rowManager.scrollTop - rowManager.element.clientHeight,\r\n\t\tscrollMax = rowManager.element.scrollHeight;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\tif(newPos >= 0){\r\n\t\t\t\trowManager.element.scrollTop = newPos;\r\n\t\t\t}else{\r\n\t\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[0]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tscrollPageDown:function(e){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tnewPos = rowManager.scrollTop + rowManager.element.clientHeight,\r\n\t\tscrollMax = rowManager.element.scrollHeight;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\tif(newPos <= scrollMax){\r\n\t\t\t\trowManager.element.scrollTop = newPos;\r\n\t\t\t}else{\r\n\t\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\r\n\t},\r\n\tscrollToStart:function(e){\r\n\t\tvar rowManager = this.table.rowManager;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[0]);\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tscrollToEnd:function(e){\r\n\t\tvar rowManager = this.table.rowManager;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]);\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tnavPrev:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-prev\", e);\r\n\t},\r\n\r\n\tnavNext:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-next\", e);\r\n\t},\r\n\r\n\tnavLeft:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-left\", e);\r\n\t},\r\n\r\n\tnavRight:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-right\", e);\r\n\t},\r\n\r\n\tnavUp:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-up\", e);\r\n\t},\r\n\r\n\tnavDown:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-down\", e);\r\n\t},\r\n\r\n\tundo:function(e){\r\n\t\tvar cell = false;\r\n\t\tif(this.table.options.history && this.table.modExists(\"history\") && this.table.modExists(\"edit\")){\r\n\r\n\t\t\tcell = this.table.modules.edit.currentCell;\r\n\r\n\t\t\tif(!cell){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tthis.table.modules.history.undo();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tredo:function(e){\r\n\t\tvar cell = false;\r\n\t\tif(this.table.options.history && this.table.modExists(\"history\") && this.table.modExists(\"edit\")){\r\n\r\n\t\t\tcell = this.table.modules.edit.currentCell;\r\n\r\n\t\t\tif(!cell){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tthis.table.modules.history.redo();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tcopyToClipboard:function(e){\r\n\t\tif(!this.table.modules.edit.currentCell){\r\n\t\t\tif(this.table.modExists(\"clipboard\", true)){\r\n\t\t\t\tthis.table.modules.clipboard.copy(false, true);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultBindings from './defaults/bindings.js';\r\nimport defaultActions from './defaults/actions.js';\r\n\r\nclass Keybindings extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.watchKeys = null;\r\n\t\tthis.pressedKeys = null;\r\n\t\tthis.keyupBinding = false;\r\n\t\tthis.keydownBinding = false;\r\n\r\n\t\tthis.registerTableOption(\"keybindings\", {}); //array for keybindings\r\n\t\tthis.registerTableOption(\"tabEndNewRow\", false); //create new row when tab to end of table\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tvar bindings = this.table.options.keybindings,\r\n\t\tmergedBindings = {};\r\n\r\n\t\tthis.watchKeys = {};\r\n\t\tthis.pressedKeys = [];\r\n\r\n\t\tif(bindings !== false){\r\n\t\t\tObject.assign(mergedBindings, Keybindings.bindings)\r\n\t\t\tObject.assign(mergedBindings, bindings)\r\n\r\n\t\t\tthis.mapBindings(mergedBindings);\r\n\t\t\tthis.bindEvents();\r\n\t\t}\r\n\r\n\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\r\n\t}\r\n\r\n\tmapBindings(bindings){\r\n\t\tfor(let key in bindings){\r\n\t\t\tif(Keybindings.actions[key]){\r\n\t\t\t\tif(bindings[key]){\r\n\t\t\t\t\tif(typeof bindings[key] !== \"object\"){\r\n\t\t\t\t\t\tbindings[key] = [bindings[key]];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbindings[key].forEach((binding) => {\r\n\t\t\t\t\t\tvar bindingList = Array.isArray(binding) ? binding : [binding];\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tbindingList.forEach((item) => {\r\n\t\t\t\t\t\t\tthis.mapBinding(key, item);\r\n\t\t\t\t\t\t});\t\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Key Binding Error - no such action:\", key);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmapBinding(action, symbolsList){\r\n\t\tvar binding = {\r\n\t\t\taction: Keybindings.actions[action],\r\n\t\t\tkeys: [],\r\n\t\t\tctrl: false,\r\n\t\t\tshift: false,\r\n\t\t\tmeta: false,\r\n\t\t};\r\n\r\n\t\tvar symbols = symbolsList.toString().toLowerCase().split(\" \").join(\"\").split(\"+\");\r\n\r\n\t\tsymbols.forEach((symbol) => {\r\n\t\t\tswitch(symbol){\r\n\t\t\t\tcase \"ctrl\":\r\n\t\t\t\tbinding.ctrl = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"shift\":\r\n\t\t\t\tbinding.shift = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"meta\":\r\n\t\t\t\tbinding.meta = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tsymbol = isNaN(symbol) ? symbol.toUpperCase().charCodeAt(0) : parseInt(symbol);\r\n\t\t\t\tbinding.keys.push(symbol);\r\n\r\n\t\t\t\tif(!this.watchKeys[symbol]){\r\n\t\t\t\t\tthis.watchKeys[symbol] = [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.watchKeys[symbol].push(binding);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tbindEvents(){\r\n\t\tvar self = this;\r\n\r\n\t\tthis.keyupBinding = function(e){\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tvar bindings = self.watchKeys[code];\r\n\r\n\t\t\tif(bindings){\r\n\r\n\t\t\t\tself.pressedKeys.push(code);\r\n\r\n\t\t\t\tbindings.forEach(function(binding){\r\n\t\t\t\t\tself.checkBinding(e, binding);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.keydownBinding = function(e){\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tvar bindings = self.watchKeys[code];\r\n\r\n\t\t\tif(bindings){\r\n\r\n\t\t\t\tvar index = self.pressedKeys.indexOf(code);\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tself.pressedKeys.splice(index, 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.table.element.addEventListener(\"keydown\", this.keyupBinding);\r\n\r\n\t\tthis.table.element.addEventListener(\"keyup\", this.keydownBinding);\r\n\t}\r\n\r\n\tclearBindings(){\r\n\t\tif(this.keyupBinding){\r\n\t\t\tthis.table.element.removeEventListener(\"keydown\", this.keyupBinding);\r\n\t\t}\r\n\r\n\t\tif(this.keydownBinding){\r\n\t\t\tthis.table.element.removeEventListener(\"keyup\", this.keydownBinding);\r\n\t\t}\r\n\t}\r\n\r\n\tcheckBinding(e, binding){\r\n\t\tvar match = true;\r\n\r\n\t\tif(e.ctrlKey == binding.ctrl && e.shiftKey == binding.shift && e.metaKey == binding.meta){\r\n\t\t\tbinding.keys.forEach((key) => {\r\n\t\t\t\tvar index = this.pressedKeys.indexOf(key);\r\n\r\n\t\t\t\tif(index == -1){\r\n\t\t\t\t\tmatch = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tbinding.action.call(this, e);\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nKeybindings.moduleName = \"keybindings\";\r\n\r\n//load defaults\r\nKeybindings.bindings = defaultBindings;\r\nKeybindings.actions = defaultActions;\r\n\r\nexport default Keybindings;","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass Menu extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.menuContainer = null;\r\n\t\tthis.menuElements = [];\r\n\t\tthis.blurEvent = this.hideMenu.bind(this);\r\n\t\tthis.escEvent = this.escMenu.bind(this);\r\n\t\tthis.nestedMenuBlock = false;\r\n\t\tthis.positionReversedX = false;\r\n\t\t\r\n\t\tthis.currentComponent = null;\r\n\t\t\r\n\t\tthis.columnSubscribers = {};\r\n\t\t\r\n\t\tthis.registerTableOption(\"rowContextMenu\", false);\r\n\t\tthis.registerTableOption(\"rowClickMenu\", false);\r\n\t\tthis.registerTableOption(\"groupContextMenu\", false);\r\n\t\tthis.registerTableOption(\"groupClickMenu\", false);\r\n\t\tthis.registerTableOption(\"menuContainer\", false);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"headerContextMenu\");\r\n\t\tthis.registerColumnOption(\"headerClickMenu\");\r\n\t\tthis.registerColumnOption(\"headerMenu\");\r\n\t\tthis.registerColumnOption(\"contextMenu\");\r\n\t\tthis.registerColumnOption(\"clickMenu\");\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.lookupMenuContainer();\r\n\t\t\r\n\t\tthis.initializeRowWatchers();\r\n\t\tthis.initializeGroupWatchers();\r\n\t\t\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t}\r\n\t\r\n\tlookupMenuContainer(){\r\n\t\t\r\n\t\tthis.menuContainer = this.table.options.menuContainer;\r\n\t\t\r\n\t\tif(typeof this.menuContainer === \"string\"){\r\n\t\t\tthis.menuContainer = document.querySelector(this.menuContainer);\r\n\t\t\t\r\n\t\t\tif(!this.menuContainer){\r\n\t\t\t\tconsole.warn(\"Menu Error - no container element found matching selector:\", this.table.options.menuContainer , \"(defaulting to document body)\");\r\n\t\t\t}\r\n\t\t}else if (this.menuContainer === true){\r\n\t\t\tthis.menuContainer = this.table.element;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.menuContainer && !this.checkMenuContainerIsParent(this.menuContainer)){\r\n\t\t\tthis.menuContainer = false;\r\n\t\t\tconsole.warn(\"Menu Error - container element does not contain this table:\", this.table.options.menuContainer , \"(defaulting to document body)\");\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.menuContainer){\r\n\t\t\tthis.menuContainer = document.body;\r\n\t\t}\r\n\t}\r\n\t\r\n\tcheckMenuContainerIsParent(container, element = this.table.element){\r\n\t\tif(container === element){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn element.parentNode ? this.checkMenuContainerIsParent(container, element.parentNode) : false;\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRowWatchers(){\r\n\t\tif(this.table.options.rowContextMenu){\r\n\t\t\tthis.subscribe(\"row-contextmenu\", this.loadMenuEvent.bind(this, this.table.options.rowContextMenu));\r\n\t\t\tthis.table.on(\"rowTapHold\", this.loadMenuEvent.bind(this, this.table.options.rowContextMenu));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.rowClickMenu){\r\n\t\t\tthis.subscribe(\"row-click\", this.loadMenuEvent.bind(this, this.table.options.rowClickMenu));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeGroupWatchers(){\r\n\t\tif(this.table.options.groupContextMenu){\r\n\t\t\tthis.subscribe(\"group-contextmenu\", this.loadMenuEvent.bind(this, this.table.options.groupContextMenu));\r\n\t\t\tthis.table.on(\"groupTapHold\", this.loadMenuEvent.bind(this, this.table.options.groupContextMenu));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.groupClickMenu){\r\n\t\t\tthis.subscribe(\"group-click\", this.loadMenuEvent.bind(this, this.table.options.groupClickMenu));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar options = [\"headerContextMenu\", \"headerClickMenu\"],\r\n\t\tdef = column.definition;\r\n\t\t\r\n\t\t//handle column events\r\n\t\tif(def.headerContextMenu && !this.columnSubscribers.headerContextMenu){\r\n\t\t\tthis.columnSubscribers.headerContextMenu = this.loadMenuTableColumnEvent.bind(this, \"headerContextMenu\");\r\n\t\t\tthis.subscribe(\"column-contextmenu\", this.columnSubscribers.headerContextMenu);\r\n\t\t\tthis.table.on(\"headerTapHold\", this.loadMenuTableColumnEvent.bind(this, \"headerContextMenu\"))\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerClickMenu && !this.columnSubscribers.headerClickMenu){\r\n\t\t\tthis.columnSubscribers.headerClickMenu = this.loadMenuTableColumnEvent.bind(this, \"headerClickMenu\");\r\n\t\t\tthis.subscribe(\"column-click\", this.columnSubscribers.headerClickMenu);\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerMenu){\r\n\t\t\tthis.initializeColumnHeaderMenu(column);\r\n\t\t}\r\n\t\t\r\n\t\t//handle cell events\r\n\t\tif(def.contextMenu && !this.columnSubscribers.contextMenu){\r\n\t\t\tthis.columnSubscribers.contextMenu = this.loadMenuTableCellEvent.bind(this, \"contextMenu\");\r\n\t\t\tthis.subscribe(\"cell-contextmenu\", this.columnSubscribers.contextMenu);\r\n\t\t\tthis.table.on(\"cellTapHold\", this.loadMenuTableCellEvent.bind(this, \"contextMenu\"))\r\n\t\t}\r\n\t\t\r\n\t\tif(def.clickMenu && !this.columnSubscribers.clickMenu){\r\n\t\t\tthis.columnSubscribers.clickMenu = this.loadMenuTableCellEvent.bind(this, \"clickMenu\");\r\n\t\t\tthis.subscribe(\"cell-click\", this.columnSubscribers.clickMenu);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumnHeaderMenu(column){\r\n\t\tvar headerMenuEl;\r\n\t\t\r\n\t\theaderMenuEl = document.createElement(\"span\");\r\n\t\theaderMenuEl.classList.add(\"tabulator-header-menu-button\");\r\n\t\theaderMenuEl.innerHTML = \"⋮\";\r\n\t\t\r\n\t\theaderMenuEl.addEventListener(\"click\", (e) => {\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\t\r\n\t\t\tthis.loadMenuEvent(column.definition.headerMenu, e, column);\r\n\t\t});\r\n\t\t\r\n\t\tcolumn.titleElement.insertBefore(headerMenuEl, column.titleElement.firstChild);\r\n\t}\r\n\t\r\n\tloadMenuTableCellEvent(option, e, cell){\r\n\t\tif(cell._cell){\r\n\t\t\tcell = cell._cell;\r\n\t\t}\r\n\t\t\r\n\t\tif(cell.column.definition[option]){\r\n\t\t\tthis.loadMenuEvent(cell.column.definition[option], e, cell);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadMenuTableColumnEvent(option, e, column){\r\n\t\tif(column._column){\r\n\t\t\tcolumn = column._column;\r\n\t\t}\r\n\t\t\r\n\t\tif(column.definition[option]){\r\n\t\t\tthis.loadMenuEvent(column.definition[option], e, column);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadMenuEvent(menu, e, component){\r\n\t\tif(component._group){\r\n\t\t\tcomponent = component._group;\r\n\t\t}else if(component._row){\r\n\t\t\tcomponent = component._row;\r\n\t\t}\r\n\t\t\r\n\t\tmenu = typeof menu == \"function\" ? menu.call(this.table, component.getComponent(), e) : menu;\r\n\t\t\r\n\t\tthis.loadMenu(e, component, menu);\r\n\t}\r\n\t\r\n\tloadMenu(e, component, menu, parentEl){\r\n\t\tvar touch = !(e instanceof MouseEvent);\r\n\t\t\r\n\t\tvar menuEl = document.createElement(\"div\");\r\n\t\tmenuEl.classList.add(\"tabulator-menu\");\r\n\t\t\r\n\t\tif(!touch){\r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t\t\r\n\t\t//abort if no menu set\r\n\t\tif(!menu || !menu.length){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(!parentEl){\r\n\t\t\tif(this.nestedMenuBlock){\r\n\t\t\t\t//abort if child menu already open\r\n\t\t\t\tif(this.isOpen()){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.nestedMenuBlock = setTimeout(() => {\r\n\t\t\t\t\tthis.nestedMenuBlock = false;\r\n\t\t\t\t}, 100)\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.hideMenu();\r\n\t\t\tthis.menuElements = [];\r\n\t\t}\r\n\t\t\r\n\t\tmenu.forEach((item) => {\r\n\t\t\tvar itemEl = document.createElement(\"div\"),\r\n\t\t\tlabel = item.label,\r\n\t\t\tdisabled = item.disabled;\r\n\t\t\t\r\n\t\t\tif(item.separator){\r\n\t\t\t\titemEl.classList.add(\"tabulator-menu-separator\");\r\n\t\t\t}else{\r\n\t\t\t\titemEl.classList.add(\"tabulator-menu-item\");\r\n\t\t\t\t\r\n\t\t\t\tif(typeof label == \"function\"){\r\n\t\t\t\t\tlabel = label.call(this.table, component.getComponent());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(label instanceof Node){\r\n\t\t\t\t\titemEl.appendChild(label);\r\n\t\t\t\t}else{\r\n\t\t\t\t\titemEl.innerHTML = label;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(typeof disabled == \"function\"){\r\n\t\t\t\t\tdisabled = disabled.call(this.table, component.getComponent());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(disabled){\r\n\t\t\t\t\titemEl.classList.add(\"tabulator-menu-item-disabled\");\r\n\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(item.menu && item.menu.length){\r\n\t\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\tthis.hideOldSubMenus(menuEl);\r\n\t\t\t\t\t\t\tthis.loadMenu(e, component, item.menu, itemEl);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(item.action){\r\n\t\t\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\t\t\titem.action(e, component.getComponent());\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(item.menu && item.menu.length){\r\n\t\t\t\t\titemEl.classList.add(\"tabulator-menu-item-submenu\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tmenuEl.appendChild(itemEl);\r\n\t\t});\r\n\t\t\r\n\t\tmenuEl.addEventListener(\"click\", (e) => {\r\n\t\t\tthis.hideMenu();\r\n\t\t});\r\n\t\t\r\n\t\tthis.menuElements.push(menuEl);\r\n\t\tthis.positionMenu(menuEl, parentEl, touch, e);\r\n\t\t\r\n\t\tthis.currentComponent = component\r\n\t\t\r\n\t\tthis.dispatchExternal(\"menuOpened\", component.getComponent())\r\n\t}\r\n\t\r\n\thideOldSubMenus(menuEl){\r\n\t\tvar index = this.menuElements.indexOf(menuEl);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tfor(let i = this.menuElements.length - 1; i > index; i--){\r\n\t\t\t\tvar el = this.menuElements[i];\r\n\t\t\t\t\r\n\t\t\t\tif(el.parentNode){\r\n\t\t\t\t\tel.parentNode.removeChild(el);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.menuElements.pop();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tpositionMenu(element, parentEl, touch, e){\r\n\t\tvar x, y, parentOffset;\r\n\t\t\r\n\t\tif(!parentEl){\r\n\t\t\tx = touch ? e.touches[0].pageX : e.pageX;\r\n\t\t\ty = touch ? e.touches[0].pageY : e.pageY;\r\n\t\t\t\r\n\t\t\tif(this.menuContainer !== document.body){\r\n\t\t\t\tparentOffset = Helpers.elOffset(this.menuContainer);\r\n\t\t\t\t\r\n\t\t\t\tx -= parentOffset.left;\r\n\t\t\t\ty -= parentOffset.top;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.positionReversedX = false;\r\n\t\t}else{\r\n\t\t\tparentOffset = Helpers.elOffset(parentEl);\r\n\t\t\tx = parentOffset.left + parentEl.offsetWidth;\r\n\t\t\ty = parentOffset.top - 1;\r\n\t\t}\r\n\t\t\r\n\t\telement.style.top = y + \"px\";\r\n\t\telement.style.left = x + \"px\";\r\n\t\t\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.table.rowManager.element.addEventListener(\"scroll\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"click\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"contextmenu\", this.blurEvent);\r\n\t\t\twindow.addEventListener(\"resize\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"keydown\", this.escEvent);\r\n\t\t}, 100);\r\n\t\t\r\n\t\tthis.menuContainer.appendChild(element);\r\n\t\t\r\n\t\t//move menu to start on right edge if it is too close to the edge of the screen\r\n\t\tif((x + element.offsetWidth) >= this.menuContainer.offsetWidth || this.positionReversedX){\r\n\t\t\telement.style.left = \"\";\r\n\t\t\t\r\n\t\t\tif(parentEl){\r\n\t\t\t\telement.style.right = (this.menuContainer.offsetWidth - parentOffset.left) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\telement.style.right = (this.menuContainer.offsetWidth - x) + \"px\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.positionReversedX = true;\r\n\t\t}\r\n\t\t\r\n\t\t//move menu to start on bottom edge if it is too close to the edge of the screen\r\n\t\tif((y + element.offsetHeight) > this.menuContainer.offsetHeight) {\r\n\t\t\tif(parentEl){\r\n\t\t\t\telement.style.top = (parseInt(element.style.top) - element.offsetHeight + parentEl.offsetHeight + 1) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\telement.style.top = (parseInt(element.style.top) - element.offsetHeight) + \"px\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tisOpen(){\r\n\t\treturn !!this.menuElements.length;\r\n\t}\r\n\t\r\n\tescMenu(e){\r\n\t\tif(e.keyCode == 27){\r\n\t\t\tthis.hideMenu();\r\n\t\t}\r\n\t}\r\n\t\r\n\thideMenu(){\t\r\n\t\tthis.menuElements.forEach((menuEl) => {\r\n\t\t\tif(menuEl.parentNode){\r\n\t\t\t\tmenuEl.parentNode.removeChild(menuEl);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tdocument.body.removeEventListener(\"keydown\", this.escEvent);\r\n\t\tdocument.body.removeEventListener(\"click\", this.blurEvent);\r\n\t\tdocument.body.removeEventListener(\"contextmenu\", this.blurEvent);\r\n\t\twindow.removeEventListener(\"resize\", this.blurEvent);\r\n\t\tthis.table.rowManager.element.removeEventListener(\"scroll\", this.blurEvent);\r\n\t\t\r\n\t\tif(this.currentComponent){\r\n\t\t\tthis.dispatchExternal(\"menuClosed\", this.currentComponent.getComponent());\r\n\t\t\tthis.currentComponent = null;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMenu.moduleName = \"menu\";\r\n\r\nexport default Menu;","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass MoveColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.placeholderElement = this.createPlaceholderElement();\r\n\t\tthis.hoverElement = false; //floating column header element\r\n\t\tthis.checkTimeout = false; //click check timeout holder\r\n\t\tthis.checkPeriod = 250; //period to wait on mousedown to consider this a move and not a click\r\n\t\tthis.moving = false; //currently moving column\r\n\t\tthis.toCol = false; //destination column\r\n\t\tthis.toColAfter = false; //position of moving column relative to the desitnation column\r\n\t\tthis.startX = 0; //starting position within header element\r\n\t\tthis.autoScrollMargin = 40; //auto scroll on edge when within margin\r\n\t\tthis.autoScrollStep = 5; //auto scroll distance in pixels\r\n\t\tthis.autoScrollTimeout = false; //auto scroll timeout\r\n\t\tthis.touchMove = false;\r\n\t\t\r\n\t\tthis.moveHover = this.moveHover.bind(this);\r\n\t\tthis.endMove = this.endMove.bind(this);\r\n\t\t\r\n\t\tthis.registerTableOption(\"movableColumns\", false); //enable movable columns\r\n\t}\r\n\t\r\n\tcreatePlaceholderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-col\");\r\n\t\tel.classList.add(\"tabulator-col-placeholder\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.movableColumns){\r\n\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\tcolEl;\r\n\t\t\r\n\t\tif(!column.modules.frozen){\r\n\t\t\tcolEl = column.getElement();\r\n\t\t\t\r\n\t\t\tconfig.mousemove = function(e){\r\n\t\t\t\tif(column.parent === self.moving.parent){\r\n\t\t\t\t\tif((((self.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(colEl).left) + self.table.columnManager.element.scrollLeft) > (column.getWidth() / 2)){\r\n\t\t\t\t\t\tif(self.toCol !== column || !self.toColAfter){\r\n\t\t\t\t\t\t\tcolEl.parentNode.insertBefore(self.placeholderElement, colEl.nextSibling);\r\n\t\t\t\t\t\t\tself.moveColumn(column, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(self.toCol !== column || self.toColAfter){\r\n\t\t\t\t\t\t\tcolEl.parentNode.insertBefore(self.placeholderElement, colEl);\r\n\t\t\t\t\t\t\tself.moveColumn(column, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}.bind(self);\r\n\t\t\t\r\n\t\t\tcolEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tself.touchMove = false;\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, column);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tcolEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tself.bindTouchEvents(column);\r\n\t\t}\r\n\t\t\r\n\t\tcolumn.modules.moveColumn = config;\r\n\t}\r\n\t\r\n\tbindTouchEvents(column){\r\n\t\tvar colEl = column.getElement(),\r\n\t\tstartXMove = false, //shifting center position of the cell\r\n\t\tdir = false,\r\n\t\tcurrentCol, nextCol, prevCol, nextColWidth, prevColWidth, nextColWidthLast, prevColWidthLast;\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchstart\", (e) => {\r\n\t\t\tthis.checkTimeout = setTimeout(() => {\r\n\t\t\t\tthis.touchMove = true;\r\n\t\t\t\tcurrentCol = column;\r\n\t\t\t\tnextCol = column.nextColumn();\r\n\t\t\t\tnextColWidth = nextCol ? nextCol.getWidth()/2 : 0;\r\n\t\t\t\tprevCol = column.prevColumn();\r\n\t\t\t\tprevColWidth = prevCol ? prevCol.getWidth()/2 : 0;\r\n\t\t\t\tnextColWidthLast = 0;\r\n\t\t\t\tprevColWidthLast = 0;\r\n\t\t\t\tstartXMove = false;\r\n\t\t\t\t\r\n\t\t\t\tthis.startMove(e, column);\r\n\t\t\t}, this.checkPeriod);\r\n\t\t}, {passive: true});\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchmove\", (e) => {\r\n\t\t\tvar halfCol, diff, moveToCol;\r\n\t\t\t\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.moveHover(e);\r\n\t\t\t\t\r\n\t\t\t\tif(!startXMove){\r\n\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tdiff = e.touches[0].pageX - startXMove;\r\n\t\t\t\t\r\n\t\t\t\tif(diff > 0){\r\n\t\t\t\t\tif(nextCol && diff - nextColWidthLast > nextColWidth){\r\n\t\t\t\t\t\tmoveToCol = nextCol;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(moveToCol !== column){\r\n\t\t\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t\t\t\tmoveToCol.getElement().parentNode.insertBefore(this.placeholderElement, moveToCol.getElement().nextSibling);\r\n\t\t\t\t\t\t\tthis.moveColumn(moveToCol, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(prevCol && -diff - prevColWidthLast > prevColWidth){\r\n\t\t\t\t\t\tmoveToCol = prevCol;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(moveToCol !== column){\r\n\t\t\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t\t\t\tmoveToCol.getElement().parentNode.insertBefore(this.placeholderElement, moveToCol.getElement());\r\n\t\t\t\t\t\t\tthis.moveColumn(moveToCol, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(moveToCol){\r\n\t\t\t\t\tcurrentCol = moveToCol;\r\n\t\t\t\t\tnextCol = moveToCol.nextColumn();\r\n\t\t\t\t\tnextColWidthLast = nextColWidth;\r\n\t\t\t\t\tnextColWidth = nextCol ? nextCol.getWidth() / 2 : 0;\r\n\t\t\t\t\tprevCol = moveToCol.prevColumn();\r\n\t\t\t\t\tprevColWidthLast = prevColWidth;\r\n\t\t\t\t\tprevColWidth = prevCol ? prevCol.getWidth() / 2 : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}, {passive: true});\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchend\", (e) => {\r\n\t\t\tif(this.checkTimeout){\r\n\t\t\t\tclearTimeout(this.checkTimeout);\r\n\t\t\t}\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.endMove(e);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tstartMove(e, column){\r\n\t\tvar element = column.getElement(),\r\n\t\theaderElement = this.table.columnManager.getElement(),\r\n\t\theadersElement = this.table.columnManager.getHeadersElement();\r\n\t\t\r\n\t\tthis.moving = column;\r\n\t\tthis.startX = (this.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(element).left;\r\n\t\t\r\n\t\tthis.table.element.classList.add(\"tabulator-block-select\");\r\n\t\t\r\n\t\t//create placeholder\r\n\t\tthis.placeholderElement.style.width = column.getWidth() + \"px\";\r\n\t\tthis.placeholderElement.style.height = column.getHeight() + \"px\";\r\n\t\t\r\n\t\telement.parentNode.insertBefore(this.placeholderElement, element);\r\n\t\telement.parentNode.removeChild(element);\r\n\t\t\r\n\t\t//create hover element\r\n\t\tthis.hoverElement = element.cloneNode(true);\r\n\t\tthis.hoverElement.classList.add(\"tabulator-moving\");\r\n\t\t\r\n\t\tthis.table.columnManager.getElement().appendChild(this.hoverElement);\r\n\t\t\r\n\t\tthis.hoverElement.style.left = \"0\";\r\n\t\tthis.hoverElement.style.bottom = (headerElement.clientHeight - headersElement.offsetHeight) + \"px\";\r\n\t\t\r\n\t\tif(!this.touchMove){\r\n\t\t\tthis._bindMouseMove();\r\n\t\t\t\r\n\t\t\tdocument.body.addEventListener(\"mousemove\", this.moveHover);\r\n\t\t\tdocument.body.addEventListener(\"mouseup\", this.endMove);\r\n\t\t}\r\n\t\t\r\n\t\tthis.moveHover(e);\r\n\t}\r\n\t\r\n\t_bindMouseMove(){\r\n\t\tthis.table.columnManager.columnsByIndex.forEach(function(column){\r\n\t\t\tif(column.modules.moveColumn.mousemove){\r\n\t\t\t\tcolumn.getElement().addEventListener(\"mousemove\", column.modules.moveColumn.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t_unbindMouseMove(){\r\n\t\tthis.table.columnManager.columnsByIndex.forEach(function(column){\r\n\t\t\tif(column.modules.moveColumn.mousemove){\r\n\t\t\t\tcolumn.getElement().removeEventListener(\"mousemove\", column.modules.moveColumn.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tmoveColumn(column, after){\r\n\t\tvar movingCells = this.moving.getCells();\r\n\t\t\r\n\t\tthis.toCol = column;\r\n\t\tthis.toColAfter = after;\r\n\t\t\r\n\t\tif(after){\r\n\t\t\tcolumn.getCells().forEach(function(cell, i){\r\n\t\t\t\tvar cellEl = cell.getElement(true);\r\n\t\t\t\t\r\n\t\t\t\tif(cellEl.parentNode && movingCells[i]){\r\n\t\t\t\t\tcellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tcolumn.getCells().forEach(function(cell, i){\r\n\t\t\t\tvar cellEl = cell.getElement(true);\r\n\t\t\t\t\r\n\t\t\t\tif(cellEl.parentNode && movingCells[i]){\r\n\t\t\t\t\tcellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tendMove(e){\r\n\t\tif(e.which === 1 || this.touchMove){\r\n\t\t\tthis._unbindMouseMove();\r\n\t\t\t\r\n\t\t\tthis.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling);\r\n\t\t\tthis.placeholderElement.parentNode.removeChild(this.placeholderElement);\r\n\t\t\tthis.hoverElement.parentNode.removeChild(this.hoverElement);\r\n\t\t\t\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-block-select\");\r\n\t\t\t\r\n\t\t\tif(this.toCol){\r\n\t\t\t\tthis.table.columnManager.moveColumnActual(this.moving, this.toCol, this.toColAfter);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.moving = false;\r\n\t\t\tthis.toCol = false;\r\n\t\t\tthis.toColAfter = false;\r\n\t\t\t\r\n\t\t\tif(!this.touchMove){\r\n\t\t\t\tdocument.body.removeEventListener(\"mousemove\", this.moveHover);\r\n\t\t\t\tdocument.body.removeEventListener(\"mouseup\", this.endMove);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tmoveHover(e){\r\n\t\tvar columnHolder = this.table.columnManager.getElement(),\r\n\t\tscrollLeft = columnHolder.scrollLeft,\r\n\t\txPos = ((this.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(columnHolder).left) + scrollLeft,\r\n\t\tscrollPos;\r\n\t\t\r\n\t\tthis.hoverElement.style.left = (xPos - this.startX) + \"px\";\r\n\t\t\r\n\t\tif(xPos - scrollLeft < this.autoScrollMargin){\r\n\t\t\tif(!this.autoScrollTimeout){\r\n\t\t\t\tthis.autoScrollTimeout = setTimeout(() => {\r\n\t\t\t\t\tscrollPos = Math.max(0,scrollLeft-5);\r\n\t\t\t\t\tthis.table.rowManager.getElement().scrollLeft = scrollPos;\r\n\t\t\t\t\tthis.autoScrollTimeout = false;\r\n\t\t\t\t}, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(scrollLeft + columnHolder.clientWidth - xPos < this.autoScrollMargin){\r\n\t\t\tif(!this.autoScrollTimeout){\r\n\t\t\t\tthis.autoScrollTimeout = setTimeout(() => {\r\n\t\t\t\t\tscrollPos = Math.min(columnHolder.clientWidth, scrollLeft+5);\r\n\t\t\t\t\tthis.table.rowManager.getElement().scrollLeft = scrollPos;\r\n\t\t\t\t\tthis.autoScrollTimeout = false;\r\n\t\t\t\t}, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMoveColumns.moduleName = \"moveColumn\";\r\n\r\nexport default MoveColumns;\r\n","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass MoveRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.placeholderElement = this.createPlaceholderElement();\r\n\t\tthis.hoverElement = false; //floating row header element\r\n\t\tthis.checkTimeout = false; //click check timeout holder\r\n\t\tthis.checkPeriod = 150; //period to wait on mousedown to consider this a move and not a click\r\n\t\tthis.moving = false; //currently moving row\r\n\t\tthis.toRow = false; //destination row\r\n\t\tthis.toRowAfter = false; //position of moving row relative to the desitnation row\r\n\t\tthis.hasHandle = false; //row has handle instead of fully movable row\r\n\t\tthis.startY = 0; //starting Y position within header element\r\n\t\tthis.startX = 0; //starting X position within header element\r\n\r\n\t\tthis.moveHover = this.moveHover.bind(this);\r\n\t\tthis.endMove = this.endMove.bind(this);\r\n\t\tthis.tableRowDropEvent = false;\r\n\r\n\t\tthis.touchMove = false;\r\n\r\n\t\tthis.connection = false;\r\n\t\tthis.connectionSelectorsTables = false;\r\n\t\tthis.connectionSelectorsElements = false;\r\n\t\tthis.connectionElements = [];\r\n\t\tthis.connections = [];\r\n\r\n\t\tthis.connectedTable = false;\r\n\t\tthis.connectedRow = false;\r\n\r\n\t\tthis.registerTableOption(\"movableRows\", false); //enable movable rows\r\n\t\tthis.registerTableOption(\"movableRowsConnectedTables\", false); //tables for movable rows to be connected to\r\n\t\tthis.registerTableOption(\"movableRowsConnectedElements\", false); //other elements for movable rows to be connected to\r\n\t\tthis.registerTableOption(\"movableRowsSender\", false);\r\n\t\tthis.registerTableOption(\"movableRowsReceiver\", \"insert\");\r\n\r\n\t\tthis.registerColumnOption(\"rowHandle\");\r\n\t}\r\n\r\n\tcreatePlaceholderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\tel.classList.add(\"tabulator-row-placeholder\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.movableRows){\r\n\t\t\tthis.connectionSelectorsTables = this.table.options.movableRowsConnectedTables;\r\n\t\t\tthis.connectionSelectorsElements = this.table.options.movableRowsConnectedElements;\r\n\r\n\t\t\tthis.connection = this.connectionSelectorsTables || this.connectionSelectorsElements;\r\n\r\n\t\t\tthis.subscribe(\"cell-init\", this.initializeCell.bind(this));\r\n\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeGroupHeader(group){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\trowEl;\r\n\r\n\t\t//inter table drag drop\r\n\t\tconfig.mouseup = function(e){\r\n\t\t\tself.tableRowDrop(e, row);\r\n\t\t}.bind(self);\r\n\r\n\t\t//same table drag drop\r\n\t\tconfig.mousemove = function(e){\r\n\t\t\tif(((e.pageY - Helpers.elOffset(group.element).top) + self.table.rowManager.element.scrollTop) > (group.getHeight() / 2)){\r\n\t\t\t\tif(self.toRow !== group || !self.toRowAfter){\r\n\t\t\t\t\tvar rowEl = group.getElement();\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling);\r\n\t\t\t\t\tself.moveRow(group, true);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(self.toRow !== group || self.toRowAfter){\r\n\t\t\t\t\tvar rowEl = group.getElement();\r\n\t\t\t\t\tif(rowEl.previousSibling){\r\n\t\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl);\r\n\t\t\t\t\t\tself.moveRow(group, false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.bind(self);\r\n\r\n\t\tgroup.modules.moveRow = config;\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\trowEl;\r\n\r\n\t\t//inter table drag drop\r\n\t\tconfig.mouseup = function(e){\r\n\t\t\tself.tableRowDrop(e, row);\r\n\t\t}.bind(self);\r\n\r\n\t\t//same table drag drop\r\n\t\tconfig.mousemove = function(e){\r\n\t\t\tvar rowEl = row.getElement();\r\n\r\n\t\t\tif(((e.pageY - Helpers.elOffset(rowEl).top) + self.table.rowManager.element.scrollTop) > (row.getHeight() / 2)){\r\n\t\t\t\tif(self.toRow !== row || !self.toRowAfter){\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling);\r\n\t\t\t\t\tself.moveRow(row, true);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(self.toRow !== row || self.toRowAfter){\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl);\r\n\t\t\t\t\tself.moveRow(row, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.bind(self);\r\n\r\n\r\n\t\tif(!this.hasHandle){\r\n\r\n\t\t\trowEl = row.getElement();\r\n\r\n\t\t\trowEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, row);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\trowEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.bindTouchEvents(row, row.getElement());\r\n\t\t}\r\n\r\n\t\trow.modules.moveRow = config;\r\n\t}\r\n\r\n\tinitializeColumn(column){\r\n\t\tif(column.definition.rowHandle && this.table.options.movableRows !== false){\r\n\t\t\tthis.hasHandle = true;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeCell(cell){\r\n\t\tif(cell.column.definition.rowHandle && this.table.options.movableRows !== false){\r\n\t\t\tvar self = this,\r\n\t\t\tcellEl = cell.getElement(true);\r\n\r\n\t\t\tcellEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, cell.row);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tcellEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.bindTouchEvents(cell.row, cellEl);\r\n\t\t}\r\n\t}\r\n\r\n\tbindTouchEvents(row, element){\r\n\t\tvar startYMove = false, //shifting center position of the cell\r\n\t\tdir = false,\r\n\t\tcurrentRow, nextRow, prevRow, nextRowHeight, prevRowHeight, nextRowHeightLast, prevRowHeightLast;\r\n\r\n\t\telement.addEventListener(\"touchstart\", (e) => {\r\n\t\t\tthis.checkTimeout = setTimeout(() => {\r\n\t\t\t\tthis.touchMove = true;\r\n\t\t\t\tcurrentRow = row;\r\n\t\t\t\tnextRow = row.nextRow();\r\n\t\t\t\tnextRowHeight = nextRow ? nextRow.getHeight()/2 : 0;\r\n\t\t\t\tprevRow = row.prevRow();\r\n\t\t\t\tprevRowHeight = prevRow ? prevRow.getHeight()/2 : 0;\r\n\t\t\t\tnextRowHeightLast = 0;\r\n\t\t\t\tprevRowHeightLast = 0;\r\n\t\t\t\tstartYMove = false;\r\n\r\n\t\t\t\tthis.startMove(e, row);\r\n\t\t\t}, this.checkPeriod);\r\n\t\t}, {passive: true});\r\n\t\tthis.moving, this.toRow, this.toRowAfter\r\n\t\telement.addEventListener(\"touchmove\", (e) => {\r\n\r\n\t\t\tvar halfCol, diff, moveToRow;\r\n\r\n\t\t\tif(this.moving){\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tthis.moveHover(e);\r\n\r\n\t\t\t\tif(!startYMove){\r\n\t\t\t\t\tstartYMove = e.touches[0].pageY;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdiff = e.touches[0].pageY - startYMove;\r\n\r\n\t\t\t\tif(diff > 0){\r\n\t\t\t\t\tif(nextRow && diff - nextRowHeightLast > nextRowHeight){\r\n\t\t\t\t\t\tmoveToRow = nextRow;\r\n\r\n\t\t\t\t\t\tif(moveToRow !== row){\r\n\t\t\t\t\t\t\tstartYMove = e.touches[0].pageY\r\n\t\t\t\t\t\t\tmoveToRow.getElement().parentNode.insertBefore(this.placeholderElement, moveToRow.getElement().nextSibling);\r\n\t\t\t\t\t\t\tthis.moveRow(moveToRow, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(prevRow && -diff - prevRowHeightLast > prevRowHeight){\r\n\t\t\t\t\t\tmoveToRow = prevRow;\r\n\r\n\t\t\t\t\t\tif(moveToRow !== row){\r\n\t\t\t\t\t\t\tstartYMove = e.touches[0].pageY;\r\n\t\t\t\t\t\t\tmoveToRow.getElement().parentNode.insertBefore(this.placeholderElement, moveToRow.getElement());\r\n\t\t\t\t\t\t\tthis.moveRow(moveToRow, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(moveToRow){\r\n\t\t\t\t\tcurrentRow = moveToRow;\r\n\t\t\t\t\tnextRow = moveToRow.nextRow();\r\n\t\t\t\t\tnextRowHeightLast = nextRowHeight;\r\n\t\t\t\t\tnextRowHeight = nextRow ? nextRow.getHeight() / 2 : 0;\r\n\t\t\t\t\tprevRow = moveToRow.prevRow();\r\n\t\t\t\t\tprevRowHeightLast = prevRowHeight;\r\n\t\t\t\t\tprevRowHeight = prevRow ? prevRow.getHeight() / 2 : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\telement.addEventListener(\"touchend\", (e) => {\r\n\t\t\tif(this.checkTimeout){\r\n\t\t\t\tclearTimeout(this.checkTimeout);\r\n\t\t\t}\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.endMove(e);\r\n\t\t\t\tthis.touchMove = false;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t_bindMouseMove(){\r\n\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\tif((row.type === \"row\" || row.type === \"group\") && row.modules.moveRow && row.modules.moveRow.mousemove){\r\n\t\t\t\trow.getElement().addEventListener(\"mousemove\", row.modules.moveRow.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t_unbindMouseMove(){\r\n\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\tif((row.type === \"row\" || row.type === \"group\") && row.modules.moveRow && row.modules.moveRow.mousemove){\r\n\t\t\t\trow.getElement().removeEventListener(\"mousemove\", row.modules.moveRow.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tstartMove(e, row){\r\n\t\tvar element = row.getElement();\r\n\r\n\t\tthis.setStartPosition(e, row);\r\n\r\n\t\tthis.moving = row;\r\n\r\n\t\tthis.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\t//create placeholder\r\n\t\tthis.placeholderElement.style.width = row.getWidth() + \"px\";\r\n\t\tthis.placeholderElement.style.height = row.getHeight() + \"px\";\r\n\r\n\t\tif(!this.connection){\r\n\t\t\telement.parentNode.insertBefore(this.placeholderElement, element);\r\n\t\t\telement.parentNode.removeChild(element);\r\n\t\t}else{\r\n\t\t\tthis.table.element.classList.add(\"tabulator-movingrow-sending\");\r\n\t\t\tthis.connectToTables(row);\r\n\t\t}\r\n\r\n\t\t//create hover element\r\n\t\tthis.hoverElement = element.cloneNode(true);\r\n\t\tthis.hoverElement.classList.add(\"tabulator-moving\");\r\n\r\n\t\tif(this.connection){\r\n\t\t\tdocument.body.appendChild(this.hoverElement);\r\n\t\t\tthis.hoverElement.style.left = \"0\";\r\n\t\t\tthis.hoverElement.style.top = \"0\";\r\n\t\t\tthis.hoverElement.style.width = this.table.element.clientWidth + \"px\";\r\n\t\t\tthis.hoverElement.style.whiteSpace = \"nowrap\";\r\n\t\t\tthis.hoverElement.style.overflow = \"hidden\";\r\n\t\t\tthis.hoverElement.style.pointerEvents = \"none\";\r\n\t\t}else{\r\n\t\t\tthis.table.rowManager.getTableElement().appendChild(this.hoverElement);\r\n\r\n\t\t\tthis.hoverElement.style.left = \"0\";\r\n\t\t\tthis.hoverElement.style.top = \"0\";\r\n\r\n\t\t\tthis._bindMouseMove();\r\n\t\t}\r\n\r\n\t\tdocument.body.addEventListener(\"mousemove\", this.moveHover);\r\n\t\tdocument.body.addEventListener(\"mouseup\", this.endMove);\r\n\r\n\t\tthis.dispatchExternal(\"rowMoving\", row.getComponent());\r\n\r\n\t\tthis.moveHover(e);\r\n\t}\r\n\r\n\tsetStartPosition(e, row){\r\n\t\tvar pageX = this.touchMove ? e.touches[0].pageX : e.pageX,\r\n\t\tpageY = this.touchMove ? e.touches[0].pageY : e.pageY,\r\n\t\telement, position;\r\n\r\n\t\telement = row.getElement();\r\n\t\tif(this.connection){\r\n\t\t\tposition = element.getBoundingClientRect();\r\n\r\n\t\t\tthis.startX = position.left - pageX + window.pageXOffset;\r\n\t\t\tthis.startY = position.top - pageY + window.pageYOffset;\r\n\t\t}else{\r\n\t\t\tthis.startY = (pageY - element.getBoundingClientRect().top);\r\n\t\t}\r\n\t}\r\n\r\n\tendMove(e){\r\n\t\tif(!e || e.which === 1 || this.touchMove){\r\n\t\t\tthis._unbindMouseMove();\r\n\r\n\t\t\tif(!this.connection){\r\n\t\t\t\tthis.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling);\r\n\t\t\t\tthis.placeholderElement.parentNode.removeChild(this.placeholderElement);\r\n\t\t\t}\r\n\r\n\t\t\tthis.hoverElement.parentNode.removeChild(this.hoverElement);\r\n\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tif(this.toRow){\r\n\t\t\t\tthis.table.rowManager.moveRow(this.moving, this.toRow, this.toRowAfter);\r\n\t\t\t}else{\r\n\t\t\t\tthis.dispatchExternal(\"rowMoveCancelled\", this.moving.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.moving = false;\r\n\t\t\tthis.toRow = false;\r\n\t\t\tthis.toRowAfter = false;\r\n\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", this.moveHover);\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", this.endMove);\r\n\r\n\t\t\tif(this.connection){\r\n\t\t\t\tthis.table.element.classList.remove(\"tabulator-movingrow-sending\");\r\n\t\t\t\tthis.disconnectFromTables();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmoveRow(row, after){\r\n\t\tthis.toRow = row;\r\n\t\tthis.toRowAfter = after;\r\n\t}\r\n\r\n\tmoveHover(e){\r\n\t\tif(this.connection){\r\n\t\t\tthis.moveHoverConnections.call(this, e);\r\n\t\t}else{\r\n\t\t\tthis.moveHoverTable.call(this, e);\r\n\t\t}\r\n\t}\r\n\r\n\tmoveHoverTable(e){\r\n\t\tvar rowHolder = this.table.rowManager.getElement(),\r\n\t\tscrollTop = rowHolder.scrollTop,\r\n\t\tyPos = ((this.touchMove ? e.touches[0].pageY : e.pageY) - rowHolder.getBoundingClientRect().top) + scrollTop,\r\n\t\tscrollPos;\r\n\r\n\t\tthis.hoverElement.style.top = (yPos - this.startY) + \"px\";\r\n\t}\r\n\r\n\tmoveHoverConnections(e){\r\n\t\tthis.hoverElement.style.left = (this.startX + (this.touchMove ? e.touches[0].pageX : e.pageX)) + \"px\";\r\n\t\tthis.hoverElement.style.top = (this.startY + (this.touchMove ? e.touches[0].pageY : e.pageY)) + \"px\";\r\n\t}\r\n\r\n\telementRowDrop(e, element, row){\r\n\t\tthis.dispatchExternal(\"movableRowsElementDrop\", e, element, row ? row.getComponent() : false);\r\n\t}\r\n\r\n\t//establish connection with other tables\r\n\tconnectToTables(row){\r\n\t\tvar connectionTables;\r\n\r\n\t\tif(this.connectionSelectorsTables){\r\n\t\t\tconnectionTables = this.commsConnections(this.connectionSelectorsTables);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSendingStart\", connectionTables);\r\n\r\n\t\t\tthis.commsSend(this.connectionSelectorsTables, \"moveRow\", \"connect\", {\r\n\t\t\t\trow:row,\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.connectionSelectorsElements){\r\n\r\n\t\t\tthis.connectionElements = [];\r\n\r\n\t\t\tif(!Array.isArray(this.connectionSelectorsElements)){\r\n\t\t\t\tthis.connectionSelectorsElements = [this.connectionSelectorsElements];\r\n\t\t\t}\r\n\r\n\t\t\tthis.connectionSelectorsElements.forEach((query) => {\r\n\t\t\t\tif(typeof query === \"string\"){\r\n\t\t\t\t\tthis.connectionElements = this.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(query)));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.connectionElements.push(query);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.connectionElements.forEach((element) => {\r\n\t\t\t\tvar dropEvent = (e) => {\r\n\t\t\t\t\tthis.elementRowDrop(e, element, this.moving);\r\n\t\t\t\t};\r\n\r\n\t\t\t\telement.addEventListener(\"mouseup\", dropEvent);\r\n\t\t\t\telement.tabulatorElementDropEvent = dropEvent;\r\n\r\n\t\t\t\telement.classList.add(\"tabulator-movingrow-receiving\");\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t//disconnect from other tables\r\n\tdisconnectFromTables(){\r\n\t\tvar connectionTables;\r\n\r\n\t\tif(this.connectionSelectorsTables){\r\n\t\t\tconnectionTables = this.commsConnections(this.connectionSelectorsTables);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSendingStop\", connectionTables);\r\n\r\n\t\t\tthis.commsSend(this.connectionSelectorsTables, \"moveRow\", \"disconnect\");\r\n\t\t}\r\n\r\n\t\tthis.connectionElements.forEach((element) => {\r\n\t\t\telement.classList.remove(\"tabulator-movingrow-receiving\");\r\n\t\t\telement.removeEventListener(\"mouseup\", element.tabulatorElementDropEvent);\r\n\t\t\tdelete element.tabulatorElementDropEvent;\r\n\t\t});\r\n\t}\r\n\r\n\t//accept incomming connection\r\n\tconnect(table, row){\r\n\t\tif(!this.connectedTable){\r\n\t\t\tthis.connectedTable = table;\r\n\t\t\tthis.connectedRow = row;\r\n\r\n\t\t\tthis.table.element.classList.add(\"tabulator-movingrow-receiving\");\r\n\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\t\tif(row.type === \"row\" && row.modules.moveRow && row.modules.moveRow.mouseup){\r\n\t\t\t\t\trow.getElement().addEventListener(\"mouseup\", row.modules.moveRow.mouseup);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.tableRowDropEvent = this.tableRowDrop.bind(this);\r\n\r\n\t\t\tthis.table.element.addEventListener(\"mouseup\", this.tableRowDropEvent);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivingStart\", row, table);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Row Error - Table cannot accept connection, already connected to table:\", this.connectedTable);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//close incomming connection\r\n\tdisconnect(table){\r\n\t\tif(table === this.connectedTable){\r\n\t\t\tthis.connectedTable = false;\r\n\t\t\tthis.connectedRow = false;\r\n\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-movingrow-receiving\");\r\n\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) =>{\r\n\t\t\t\tif(row.type === \"row\" && row.modules.moveRow && row.modules.moveRow.mouseup){\r\n\t\t\t\t\trow.getElement().removeEventListener(\"mouseup\", row.modules.moveRow.mouseup);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.table.element.removeEventListener(\"mouseup\", this.tableRowDropEvent);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivingStop\", table);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Row Error - trying to disconnect from non connected table\")\r\n\t\t}\r\n\t}\r\n\r\n\tdropComplete(table, row, success){\r\n\t\tvar sender = false;\r\n\r\n\t\tif(success){\r\n\r\n\t\t\tswitch(typeof this.table.options.movableRowsSender){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tsender = this.senders[this.table.options.movableRowsSender];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tsender = this.table.options.movableRowsSender;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(sender){\r\n\t\t\t\tsender.call(this, this.moving.getComponent(), row ? row.getComponent() : undefined, table)\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.options.movableRowsSender){\r\n\t\t\t\t\tconsole.warn(\"Mover Row Error - no matching sender found:\", this.table.options.movableRowsSender);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSent\", this.moving.getComponent(), row ? row.getComponent() : undefined, table);\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"movableRowsSentFailed\", this.moving.getComponent(), row ? row.getComponent() : undefined, table);\r\n\t\t}\r\n\r\n\t\tthis.endMove();\r\n\t}\r\n\r\n\ttableRowDrop(e, row){\r\n\t\tvar receiver = false,\r\n\t\tsuccess = false;\r\n\r\n\t\te.stopImmediatePropagation();\r\n\r\n\t\tswitch(typeof this.table.options.movableRowsReceiver){\r\n\t\t\tcase \"string\":\r\n\t\t\treceiver = this.receivers[this.table.options.movableRowsReceiver];\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\treceiver = this.table.options.movableRowsReceiver;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(receiver){\r\n\t\t\tsuccess = receiver.call(this, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Mover Row Error - no matching receiver found:\", this.table.options.movableRowsReceiver)\r\n\t\t}\r\n\r\n\t\tif(success){\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceived\", this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable);\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivedFailed\", this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable);\r\n\t\t}\r\n\r\n\t\tthis.commsSend(this.connectedTable, \"moveRow\", \"dropcomplete\", {\r\n\t\t\trow:row,\r\n\t\t\tsuccess:success,\r\n\t\t});\r\n\t}\r\n\r\n\tcommsReceived(table, action, data){\r\n\t\tswitch(action){\r\n\t\t\tcase \"connect\":\r\n\t\t\treturn this.connect(table, data.row);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"disconnect\":\r\n\t\t\treturn this.disconnect(table);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"dropcomplete\":\r\n\t\t\treturn this.dropComplete(table, data.row, data.success);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMoveRows.prototype.receivers = {\r\n\tinsert:function(fromRow, toRow, fromTable){\r\n\t\tthis.table.addRow(fromRow.getData(), undefined, toRow);\r\n\t\treturn true;\r\n\t},\r\n\r\n\tadd:function(fromRow, toRow, fromTable){\r\n\t\tthis.table.addRow(fromRow.getData());\r\n\t\treturn true;\r\n\t},\r\n\r\n\tupdate:function(fromRow, toRow, fromTable){\r\n\t\tif(toRow){\r\n\t\t\ttoRow.update(fromRow.getData());\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\r\n\treplace:function(fromRow, toRow, fromTable){\r\n\t\tif(toRow){\r\n\t\t\tthis.table.addRow(fromRow.getData(), undefined, toRow);\r\n\t\t\ttoRow.delete();\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n};\r\n\r\nMoveRows.prototype.senders = {\r\n\tdelete:function(fromRow, toRow, toTable){\r\n\t\tfromRow.delete();\r\n\t}\r\n};\r\n\r\nMoveRows.moduleName = \"moveRow\";\r\n\r\nexport default MoveRows;","export default {};","import Module from '../../core/Module.js';\r\n\r\nimport defaultMutators from './defaults/mutators.js';\r\n\r\nclass Mutator extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.allowedTypes = [\"\", \"data\", \"edit\", \"clipboard\"]; //list of muatation types\r\n\t\tthis.enabled = true;\r\n\r\n\t\tthis.registerColumnOption(\"mutator\");\r\n\t\tthis.registerColumnOption(\"mutatorParams\");\r\n\t\tthis.registerColumnOption(\"mutatorData\");\r\n\t\tthis.registerColumnOption(\"mutatorDataParams\");\r\n\t\tthis.registerColumnOption(\"mutatorEdit\");\r\n\t\tthis.registerColumnOption(\"mutatorEditParams\");\r\n\t\tthis.registerColumnOption(\"mutatorClipboard\");\r\n\t\tthis.registerColumnOption(\"mutatorClipboardParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-value-changing\", this.transformCell.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"row-data-init-before\", this.rowDataChanged.bind(this));\r\n\t\tthis.subscribe(\"row-data-changing\", this.rowDataChanged.bind(this));\r\n\t}\r\n\r\n\trowDataChanged(row, tempData, updatedData){\r\n\t\treturn this.transformRow(tempData, \"data\", updatedData);\r\n\t}\r\n\r\n\t//initialize column mutator\r\n\tinitializeColumn(column){\r\n\t\tvar match = false,\r\n\t\tconfig = {};\r\n\r\n\t\tthis.allowedTypes.forEach((type) => {\r\n\t\t\tvar key = \"mutator\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\t\tmutator;\r\n\r\n\t\t\tif(column.definition[key]){\r\n\t\t\t\tmutator = this.lookupMutator(column.definition[key]);\r\n\r\n\t\t\t\tif(mutator){\r\n\t\t\t\t\tmatch = true;\r\n\r\n\t\t\t\t\tconfig[key] = {\r\n\t\t\t\t\t\tmutator:mutator,\r\n\t\t\t\t\t\tparams: column.definition[key + \"Params\"] || {},\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tcolumn.modules.mutate = config;\r\n\t\t}\r\n\t}\r\n\r\n\tlookupMutator(value){\r\n\t\tvar mutator = false;\r\n\r\n\t\t//set column mutator\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Mutator.mutators[value]){\r\n\t\t\t\tmutator = Mutator.mutators[value];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Mutator Error - No such mutator found, ignoring: \", value);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tmutator = value;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn mutator;\r\n\t}\r\n\r\n\t//apply mutator to row\r\n\ttransformRow(data, type, updatedData){\r\n\t\tvar key = \"mutator\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\tvalue;\r\n\r\n\t\tif(this.enabled){\r\n\r\n\t\t\tthis.table.columnManager.traverse((column) => {\r\n\t\t\t\tvar mutator, params, component;\r\n\r\n\t\t\t\tif(column.modules.mutate){\r\n\t\t\t\t\tmutator = column.modules.mutate[key] || column.modules.mutate.mutator || false;\r\n\r\n\t\t\t\t\tif(mutator){\r\n\t\t\t\t\t\tvalue = column.getFieldValue(typeof updatedData !== \"undefined\" ? updatedData : data);\r\n\r\n\t\t\t\t\t\tif(type == \"data\" || typeof value !== \"undefined\"){\r\n\t\t\t\t\t\t\tcomponent = column.getComponent();\r\n\t\t\t\t\t\t\tparams = typeof mutator.params === \"function\" ? mutator.params(value, data, type, component) : mutator.params;\r\n\t\t\t\t\t\t\tcolumn.setFieldValue(data, mutator.mutator(value, data, type, params, component));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//apply mutator to new cell value\r\n\ttransformCell(cell, value){\r\n\t\tif(cell.column.modules.mutate){\r\n\t\t\tvar mutator = cell.column.modules.mutate.mutatorEdit || cell.column.modules.mutate.mutator || false,\r\n\t\t\ttempData = {};\r\n\r\n\t\t\tif(mutator){\r\n\t\t\t\ttempData = Object.assign(tempData, cell.row.getData());\r\n\t\t\t\tcell.column.setFieldValue(tempData, value);\r\n\t\t\t\treturn mutator.mutator(value, tempData, \"edit\", mutator.params, cell.getComponent());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\tenable(){\r\n\t\tthis.enabled = true;\r\n\t}\r\n\r\n\tdisable(){\r\n\t\tthis.enabled = false;\r\n\t}\r\n}\r\n\r\nMutator.moduleName = \"mutator\";\r\n\r\n//load defaults\r\nMutator.mutators = defaultMutators;\r\n\r\nexport default Mutator;","export default function(pageSize, currentRow, currentPage, totalRows, totalPages){\r\n\tvar el = document.createElement(\"span\"),\r\n\tshowingEl = document.createElement(\"span\"),\r\n\tvalueEl = document.createElement(\"span\"),\r\n\tofEl = document.createElement(\"span\"),\r\n\ttotalEl = document.createElement(\"span\"),\r\n\trowsEl = document.createElement(\"span\");\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|showing\", (value) => {\r\n\t\tshowingEl.innerHTML = value;\r\n\t});\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|of\", (value) => {\r\n\t\tofEl.innerHTML = value;\r\n\t});\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|rows\", (value) => {\r\n\t\trowsEl.innerHTML = value;\r\n\t});\r\n\r\n\tif(totalRows){\r\n\t\tvalueEl.innerHTML = \" \" + currentRow + \"-\" + Math.min((currentRow + pageSize - 1), totalRows) + \" \";\r\n\t\t\r\n\t\ttotalEl.innerHTML = \" \" + totalRows + \" \";\r\n\t\t\r\n\t\tel.appendChild(showingEl);\r\n\t\tel.appendChild(valueEl);\r\n\t\tel.appendChild(ofEl);\r\n\t\tel.appendChild(totalEl);\r\n\t\tel.appendChild(rowsEl);\r\n\t}else{\r\n\t\tvalueEl.innerHTML = \" 0 \";\r\n\r\n\t\tel.appendChild(showingEl);\r\n\t\tel.appendChild(valueEl);\r\n\t\tel.appendChild(rowsEl);\r\n\t}\r\n\t\r\n\treturn el;\r\n};","export default function(pageSize, currentRow, currentPage, totalRows, totalPages){\r\n\r\n var el = document.createElement(\"span\"),\r\n\tshowingEl = document.createElement(\"span\"),\r\n\tvalueEl = document.createElement(\"span\"),\r\n\tofEl = document.createElement(\"span\"),\r\n\ttotalEl = document.createElement(\"span\"),\r\n\trowsEl = document.createElement(\"span\");\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|showing\", (value) => {\r\n\t\tshowingEl.innerHTML = value;\r\n\t});\r\n\t\r\n\tvalueEl.innerHTML = \" \" + currentPage + \" \";\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|of\", (value) => {\r\n\t\tofEl.innerHTML = value;\r\n\t});\r\n\t\r\n\ttotalEl.innerHTML = \" \" + totalPages + \" \";\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|pages\", (value) => {\r\n\t\trowsEl.innerHTML = value;\r\n\t});\r\n\t\r\n\tel.appendChild(showingEl);\r\n\tel.appendChild(valueEl);\r\n\tel.appendChild(ofEl);\r\n\tel.appendChild(totalEl);\r\n\tel.appendChild(rowsEl);\r\n\t\r\n\treturn el;\r\n};","import rows from './pageCounters/rows.js';\r\nimport pages from './pageCounters/pages.js';\r\n\r\n\r\nexport default {\r\n\trows:rows,\r\n\tpages:pages,\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultPageCounters from './defaults/pageCounters.js';\r\n\r\nclass Page extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.mode = \"local\";\r\n\t\tthis.progressiveLoad = false;\r\n\t\t\r\n\t\tthis.element = null;\r\n\t\tthis.pageCounterElement = null;\r\n\t\tthis.pageCounter = null;\r\n\t\t\r\n\t\tthis.size = 0;\r\n\t\tthis.page = 1;\r\n\t\tthis.count = 5;\r\n\t\tthis.max = 1;\r\n\r\n\t\tthis.remoteRowCountEstimate = null;\r\n\t\t\r\n\t\tthis.displayIndex = 0; //index in display pipeline\r\n\t\t\r\n\t\tthis.initialLoad = true;\r\n\t\tthis.dataChanging = false; //flag to check if data is being changed by this module\r\n\t\t\r\n\t\tthis.pageSizes = [];\r\n\t\t\r\n\t\tthis.registerTableOption(\"pagination\", false); //set pagination type\r\n\t\tthis.registerTableOption(\"paginationMode\", \"local\"); //local or remote pagination\r\n\t\tthis.registerTableOption(\"paginationSize\", false); //set number of rows to a page\r\n\t\tthis.registerTableOption(\"paginationInitialPage\", 1); //initial page to show on load\r\n\t\tthis.registerTableOption(\"paginationCounter\", false); // set pagination counter\r\n\t\tthis.registerTableOption(\"paginationCounterElement\", false); // set pagination counter\r\n\t\tthis.registerTableOption(\"paginationButtonCount\", 5); // set count of page button\r\n\t\tthis.registerTableOption(\"paginationSizeSelector\", false); //add pagination size selector element\r\n\t\tthis.registerTableOption(\"paginationElement\", false); //element to hold pagination numbers\r\n\t\t// this.registerTableOption(\"paginationDataSent\", {}); //pagination data sent to the server\r\n\t\t// this.registerTableOption(\"paginationDataReceived\", {}); //pagination data received from the server\r\n\t\tthis.registerTableOption(\"paginationAddRow\", \"page\"); //add rows on table or page\r\n\t\t\r\n\t\tthis.registerTableOption(\"progressiveLoad\", false); //progressive loading\r\n\t\tthis.registerTableOption(\"progressiveLoadDelay\", 0); //delay between requests\r\n\t\tthis.registerTableOption(\"progressiveLoadScrollMargin\", 0); //margin before scroll begins\r\n\t\t\r\n\t\tthis.registerTableFunction(\"setMaxPage\", this.setMaxPage.bind(this));\r\n\t\tthis.registerTableFunction(\"setPage\", this.setPage.bind(this));\r\n\t\tthis.registerTableFunction(\"setPageToRow\", this.userSetPageToRow.bind(this));\r\n\t\tthis.registerTableFunction(\"setPageSize\", this.userSetPageSize.bind(this));\r\n\t\tthis.registerTableFunction(\"getPageSize\", this.getPageSize.bind(this));\r\n\t\tthis.registerTableFunction(\"previousPage\", this.previousPage.bind(this));\r\n\t\tthis.registerTableFunction(\"nextPage\", this.nextPage.bind(this));\r\n\t\tthis.registerTableFunction(\"getPage\", this.getPage.bind(this));\r\n\t\tthis.registerTableFunction(\"getPageMax\", this.getPageMax.bind(this));\r\n\t\t\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"pageTo\", this.setPageToRow.bind(this));\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"row-added\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"data-processed\", this.initialLoadComplete.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.calculatePageSizes.bind(this));\r\n\r\n\t\t\tif(this.table.options.paginationAddRow == \"page\"){\r\n\t\t\t\tthis.subscribe(\"row-adding-position\", this.rowAddingPosition.bind(this));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.options.paginationMode === \"remote\"){\r\n\t\t\t\tthis.subscribe(\"data-params\", this.remotePageParams.bind(this));\r\n\t\t\t\tthis.subscribe(\"data-loaded\", this._parseRemoteData.bind(this));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.options.progressiveLoad){\r\n\t\t\t\tconsole.error(\"Progressive Load Error - Pagination and progressive load cannot be used at the same time\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.registerDisplayHandler(this.restOnRenderBefore.bind(this), 40);\r\n\t\t\tthis.registerDisplayHandler(this.getRows.bind(this), 50);\r\n\t\t\t\r\n\t\t\tthis.createElements();\r\n\t\t\tthis.initializePageCounter();\r\n\t\t\tthis.initializePaginator();\r\n\t\t}else if(this.table.options.progressiveLoad){\r\n\t\t\tthis.subscribe(\"data-params\", this.remotePageParams.bind(this));\r\n\t\t\tthis.subscribe(\"data-loaded\", this._parseRemoteData.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.calculatePageSizes.bind(this));\r\n\t\t\tthis.subscribe(\"data-processed\", this.initialLoadComplete.bind(this));\r\n\t\t\t\r\n\t\t\tthis.initializeProgressive(this.table.options.progressiveLoad)\r\n\t\t\t\r\n\t\t\tif(this.table.options.progressiveLoad === \"scroll\"){\r\n\t\t\t\tthis.subscribe(\"scroll-vertical\", this.scrollVertical.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trowAddingPosition(row, top){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tdispRows = rowManager.getDisplayRows(),\r\n\t\tindex;\r\n\t\t\r\n\t\tif(top){\r\n\t\t\tif(dispRows.length){\r\n\t\t\t\tindex = dispRows[0];\r\n\t\t\t}else{\r\n\t\t\t\tif(rowManager.activeRows.length){\r\n\t\t\t\t\tindex = rowManager.activeRows[rowManager.activeRows.length-1];\r\n\t\t\t\t\ttop = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(dispRows.length){\r\n\t\t\t\tindex = dispRows[dispRows.length - 1];\r\n\t\t\t\ttop = dispRows.length < this.size ? false : true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn {index, top}\r\n\t}\r\n\t\r\n\tcalculatePageSizes(){\r\n\t\tvar testElRow, testElCell;\r\n\t\t\r\n\t\tif(this.table.options.paginationSize){\r\n\t\t\tthis.size = this.table.options.paginationSize;\r\n\t\t}else{\r\n\t\t\ttestElRow = document.createElement(\"div\");\r\n\t\t\ttestElRow.classList.add(\"tabulator-row\");\r\n\t\t\ttestElRow.style.visibility = \"hidden\";\r\n\t\t\t\r\n\t\t\ttestElCell = document.createElement(\"div\");\r\n\t\t\ttestElCell.classList.add(\"tabulator-cell\");\r\n\t\t\ttestElCell.innerHTML = \"Page Row Test\";\r\n\t\t\t\r\n\t\t\ttestElRow.appendChild(testElCell);\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getTableElement().appendChild(testElRow);\r\n\t\t\t\r\n\t\t\tthis.size = Math.floor(this.table.rowManager.getElement().clientHeight / testElRow.offsetHeight);\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getTableElement().removeChild(testElRow);\r\n\t\t}\r\n\t\t\r\n\t\tthis.generatePageSizeSelectList();\r\n\t}\r\n\t\r\n\tinitialLoadComplete(){\r\n\t\tthis.initialLoad = false;\r\n\t}\r\n\t\r\n\tremotePageParams(data, config, silent, params){\r\n\t\tif(!this.initialLoad){\r\n\t\t\tif((this.progressiveLoad && !silent) || (!this.progressiveLoad && !this.dataChanging)){\r\n\t\t\t\tthis.reset(true);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//configure request params\r\n\t\tparams.page = this.page;\r\n\t\t\r\n\t\t//set page size if defined\r\n\t\tif(this.size){\r\n\t\t\tparams.size = this.size;\r\n\t\t}\r\n\t\t\r\n\t\treturn params;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\tuserSetPageToRow(row){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\trow = this.rowManager.findRow(row);\r\n\t\t\t\r\n\t\t\tif(row){\r\n\t\t\t\treturn this.setPageToRow(row)\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn Promise.reject();\r\n\t}\r\n\t\r\n\tuserSetPageSize(size){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\tthis.setPageSize(size);\r\n\t\t\treturn this.setPage(1);\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\r\n\tscrollVertical(top, dir){\r\n\t\tvar element, diff, margin;\r\n\t\tif(!dir && !this.table.dataLoader.loading){\r\n\t\t\telement = this.table.rowManager.getElement();\r\n\t\t\tdiff = element.scrollHeight - element.clientHeight - top;\r\n\t\t\tmargin = this.table.options.progressiveLoadScrollMargin || (element.clientHeight * 2);\r\n\t\t\t\r\n\t\t\tif(diff < margin){\r\n\t\t\t\tthis.nextPage()\r\n\t\t\t\t.catch(() => {}); //consume the exception thrown when on the last page\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trestOnRenderBefore(rows, renderInPosition){\r\n\t\tif(!renderInPosition){\r\n\t\t\tif(this.mode === \"local\"){\r\n\t\t\t\tthis.reset();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\trowsUpdated(){\r\n\t\tthis.refreshData(true, \"all\");\r\n\t}\r\n\t\r\n\tcreateElements(){\r\n\t\tvar button;\r\n\t\t\r\n\t\tthis.element = document.createElement(\"span\");\r\n\t\tthis.element.classList.add(\"tabulator-paginator\");\r\n\t\t\r\n\t\tthis.pagesElement = document.createElement(\"span\");\r\n\t\tthis.pagesElement.classList.add(\"tabulator-pages\");\r\n\t\t\r\n\t\tbutton = document.createElement(\"button\");\r\n\t\tbutton.classList.add(\"tabulator-page\");\r\n\t\tbutton.setAttribute(\"type\", \"button\");\r\n\t\tbutton.setAttribute(\"role\", \"button\");\r\n\t\tbutton.setAttribute(\"aria-label\", \"\");\r\n\t\tbutton.setAttribute(\"title\", \"\");\r\n\t\t\r\n\t\tthis.firstBut = button.cloneNode(true);\r\n\t\tthis.firstBut.setAttribute(\"data-page\", \"first\");\r\n\t\t\r\n\t\tthis.prevBut = button.cloneNode(true);\r\n\t\tthis.prevBut.setAttribute(\"data-page\", \"prev\");\r\n\t\t\r\n\t\tthis.nextBut = button.cloneNode(true);\r\n\t\tthis.nextBut.setAttribute(\"data-page\", \"next\");\r\n\t\t\r\n\t\tthis.lastBut = button.cloneNode(true);\r\n\t\tthis.lastBut.setAttribute(\"data-page\", \"last\");\r\n\t\t\r\n\t\tif(this.table.options.paginationSizeSelector){\r\n\t\t\tthis.pageSizeSelect = document.createElement(\"select\");\r\n\t\t\tthis.pageSizeSelect.classList.add(\"tabulator-page-size\");\r\n\t\t}\r\n\t}\r\n\t\r\n\tgeneratePageSizeSelectList(){\r\n\t\tvar pageSizes = [];\r\n\t\t\r\n\t\tif(this.pageSizeSelect){\r\n\t\t\t\r\n\t\t\tif(Array.isArray(this.table.options.paginationSizeSelector)){\r\n\t\t\t\tpageSizes = this.table.options.paginationSizeSelector;\r\n\t\t\t\tthis.pageSizes = pageSizes;\r\n\t\t\t\t\r\n\t\t\t\tif(this.pageSizes.indexOf(this.size) == -1){\r\n\t\t\t\t\tpageSizes.unshift(this.size);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t\r\n\t\t\t\tif(this.pageSizes.indexOf(this.size) == -1){\r\n\t\t\t\t\tpageSizes = [];\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (let i = 1; i < 5; i++){\r\n\t\t\t\t\t\tpageSizes.push(this.size * i);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.pageSizes = pageSizes;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tpageSizes = this.pageSizes;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\twhile(this.pageSizeSelect.firstChild) this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);\r\n\t\t\t\r\n\t\t\tpageSizes.forEach((item) => {\r\n\t\t\t\tvar itemEl = document.createElement(\"option\");\r\n\t\t\t\titemEl.value = item;\r\n\t\t\t\t\r\n\t\t\t\tif(item === true){\r\n\t\t\t\t\tthis.langBind(\"pagination|all\", function(value){\r\n\t\t\t\t\t\titemEl.innerHTML = value;\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\titemEl.innerHTML = item;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tthis.pageSizeSelect.appendChild(itemEl);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.pageSizeSelect.value = this.size;\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializePageCounter(){\r\n\t\tvar counter = this.table.options.paginationCounter,\r\n\t\tpageCounter = null;\r\n\t\t\r\n\t\tif(counter){\r\n\t\t\tif(typeof counter === \"function\"){\r\n\t\t\t\tpageCounter = counter;\r\n\t\t\t}else{\r\n\t\t\t\tpageCounter = Page.pageCounters[counter];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(pageCounter){\r\n\t\t\t\tthis.pageCounter = pageCounter;\r\n\t\t\t\t\r\n\t\t\t\tthis.pageCounterElement = document.createElement(\"span\");\r\n\t\t\t\tthis.pageCounterElement.classList.add(\"tabulator-page-counter\");\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Pagination Error - No such page counter found: \", counter);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//setup pagination\r\n\tinitializePaginator(hidden){\r\n\t\tvar pageSelectLabel, paginationCounterHolder;\r\n\t\t\r\n\t\tif(!hidden){\r\n\t\t\t//build pagination element\r\n\t\t\t\r\n\t\t\t//bind localizations\r\n\t\t\tthis.langBind(\"pagination|first\", (value) => {\r\n\t\t\t\tthis.firstBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|first_title\", (value) => {\r\n\t\t\t\tthis.firstBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.firstBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|prev\", (value) => {\r\n\t\t\t\tthis.prevBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|prev_title\", (value) => {\r\n\t\t\t\tthis.prevBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.prevBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|next\", (value) => {\r\n\t\t\t\tthis.nextBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|next_title\", (value) => {\r\n\t\t\t\tthis.nextBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.nextBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|last\", (value) => {\r\n\t\t\t\tthis.lastBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|last_title\", (value) => {\r\n\t\t\t\tthis.lastBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.lastBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t//click bindings\r\n\t\t\tthis.firstBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.setPage(1)\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.prevBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.previousPage()\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.nextBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.nextPage()\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.lastBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.setPage(this.max)\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(this.table.options.paginationElement){\r\n\t\t\t\tthis.element = this.table.options.paginationElement;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.pageSizeSelect){\r\n\t\t\t\tpageSelectLabel = document.createElement(\"label\");\r\n\t\t\t\t\r\n\t\t\t\tthis.langBind(\"pagination|page_size\", (value) => {\r\n\t\t\t\t\tthis.pageSizeSelect.setAttribute(\"aria-label\", value);\r\n\t\t\t\t\tthis.pageSizeSelect.setAttribute(\"title\", value);\r\n\t\t\t\t\tpageSelectLabel.innerHTML = value;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.element.appendChild(pageSelectLabel);\r\n\t\t\t\tthis.element.appendChild(this.pageSizeSelect);\r\n\t\t\t\t\r\n\t\t\t\tthis.pageSizeSelect.addEventListener(\"change\", (e) => {\r\n\t\t\t\t\tthis.setPageSize(this.pageSizeSelect.value == \"true\" ? true : this.pageSizeSelect.value);\r\n\t\t\t\t\tthis.setPage(1)\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//append to DOM\r\n\t\t\tthis.element.appendChild(this.firstBut);\r\n\t\t\tthis.element.appendChild(this.prevBut);\r\n\t\t\tthis.element.appendChild(this.pagesElement);\r\n\t\t\tthis.element.appendChild(this.nextBut);\r\n\t\t\tthis.element.appendChild(this.lastBut);\r\n\t\t\t\r\n\t\t\tif(!this.table.options.paginationElement && !hidden){\r\n\t\t\t\tif(this.table.options.paginationCounter){\r\n\r\n\t\t\t\t\tpaginationCounterHolder \r\n\r\n\t\t\t\t\tif(this.table.options.paginationCounterElement){\r\n\t\t\t\t\t\tif(this.table.options.paginationCounterElement instanceof HTMLElement){\r\n\t\t\t\t\t\t\tthis.table.options.paginationCounterElement.appendChild(this.pageCounterElement);\r\n\t\t\t\t\t\t}else if(typeof this.table.options.paginationCounterElement === \"string\"){\r\n\t\t\t\t\t\t\tpaginationCounterHolder = document.querySelector(this.table.options.paginationCounterElement);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(paginationCounterHolder){\r\n\t\t\t\t\t\t\t\tpaginationCounterHolder.appendChild(this.pageCounterElement);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Pagination Error - Unable to find element matching paginationCounterElement selector:\", this.table.options.paginationCounterElement);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.table.footerManager.append(this.pageCounterElement);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.table.footerManager.append(this.element, this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.page = this.table.options.paginationInitialPage;\r\n\t\t\tthis.count = this.table.options.paginationButtonCount;\r\n\t\t}\r\n\t\t\r\n\t\t//set default values\r\n\t\tthis.mode = this.table.options.paginationMode;\r\n\t}\r\n\t\r\n\tinitializeProgressive(mode){\r\n\t\tthis.initializePaginator(true);\r\n\t\tthis.mode = \"progressive_\" + mode;\r\n\t\tthis.progressiveLoad = true;\r\n\t}\r\n\t\r\n\ttrackChanges(){\r\n\t\tthis.dispatch(\"page-changed\");\r\n\t}\r\n\t\r\n\tsetDisplayIndex(index){\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\t\r\n\tgetDisplayIndex(){\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\t\r\n\t//calculate maximum page from number of rows\r\n\tsetMaxRows(rowCount){\r\n\t\tif(!rowCount){\r\n\t\t\tthis.max = 1;\r\n\t\t}else{\r\n\t\t\tthis.max = this.size === true ? 1 : Math.ceil(rowCount/this.size);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.page > this.max){\r\n\t\t\tthis.page = this.max;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//reset to first page without triggering action\r\n\treset(force){\r\n\t\tif(!this.initialLoad){\r\n\t\t\tif(this.mode == \"local\" || force){\r\n\t\t\t\tthis.page = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set the maximum page\r\n\tsetMaxPage(max){\r\n\t\t\r\n\t\tmax = parseInt(max);\r\n\t\t\r\n\t\tthis.max = max || 1;\r\n\t\t\r\n\t\tif(this.page > this.max){\r\n\t\t\tthis.page = this.max;\r\n\t\t\tthis.trigger();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set current page number\r\n\tsetPage(page){\r\n\t\tswitch(page){\r\n\t\t\tcase \"first\":\r\n\t\t\treturn this.setPage(1);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"prev\":\r\n\t\t\treturn this.previousPage();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"next\":\r\n\t\t\treturn this.nextPage();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"last\":\r\n\t\t\treturn this.setPage(this.max);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tpage = parseInt(page);\r\n\t\t\r\n\t\tif((page > 0 && page <= this.max) || this.mode !== \"local\"){\r\n\t\t\tthis.page = page;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Requested page is out of range of 1 - \" + this.max + \":\", page);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetPageToRow(row){\r\n\t\tvar rows = this.table.rowManager.getDisplayRows(this.displayIndex - 1);\r\n\t\tvar index = rows.indexOf(row);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tvar page = this.size === true ? 1 : Math.ceil((index + 1) / this.size);\r\n\t\t\t\r\n\t\t\treturn this.setPage(page)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Requested row is not visible\");\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetPageSize(size){\r\n\t\tif(size !== true){\r\n\t\t\tsize = parseInt(size);\r\n\t\t}\r\n\t\t\r\n\t\tif(size > 0){\r\n\t\t\tthis.size = size;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.pageSizeSelect){\r\n\t\t\t// this.pageSizeSelect.value = size;\r\n\t\t\tthis.generatePageSizeSelectList();\r\n\t\t}\r\n\t\t\r\n\t\tthis.trackChanges();\r\n\t}\r\n\t\r\n\t_setPageCounter(totalRows, size, currentRow){\r\n\t\tvar content;\r\n\t\t\r\n\t\tif(this.pageCounter){\r\n\r\n\t\t\tif(this.mode === \"remote\"){\r\n\t\t\t\tsize = this.size;\r\n\t\t\t\tcurrentRow = ((this.page - 1) * this.size) + 1;\r\n\t\t\t\ttotalRows = this.remoteRowCountEstimate;\r\n\t\t\t}\r\n\r\n\t\t\tcontent = this.pageCounter.call(this, size, currentRow, this.page, totalRows, this.max);\r\n\t\t\t\r\n\t\t\tswitch(typeof content){\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\tif(content instanceof Node){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//clear previous cell contents\r\n\t\t\t\t\twhile(this.pageCounterElement.firstChild) this.pageCounterElement.removeChild(this.pageCounterElement.firstChild);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.pageCounterElement.appendChild(content);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(content != null){\r\n\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);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"undefined\":\r\n\t\t\t\tcase \"null\":\r\n\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.pageCounterElement.innerHTML = content;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//setup the pagination buttons\r\n\t_setPageButtons(){\r\n\t\tlet leftSize = Math.floor((this.count-1) / 2);\r\n\t\tlet rightSize = Math.ceil((this.count-1) / 2);\r\n\t\tlet min = this.max - this.page + leftSize + 1 < this.count ? this.max-this.count+1: Math.max(this.page-leftSize,1);\r\n\t\tlet max = this.page <= rightSize? Math.min(this.count, this.max) :Math.min(this.page+rightSize, this.max);\r\n\t\t\r\n\t\twhile(this.pagesElement.firstChild) this.pagesElement.removeChild(this.pagesElement.firstChild);\r\n\t\t\r\n\t\tif(this.page == 1){\r\n\t\t\tthis.firstBut.disabled = true;\r\n\t\t\tthis.prevBut.disabled = true;\r\n\t\t}else{\r\n\t\t\tthis.firstBut.disabled = false;\r\n\t\t\tthis.prevBut.disabled = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.page == this.max){\r\n\t\t\tthis.lastBut.disabled = true;\r\n\t\t\tthis.nextBut.disabled = true;\r\n\t\t}else{\r\n\t\t\tthis.lastBut.disabled = false;\r\n\t\t\tthis.nextBut.disabled = false;\r\n\t\t}\r\n\t\t\r\n\t\tfor(let i = min; i <= max; i++){\r\n\t\t\tif(i>0 && i <= this.max){\r\n\t\t\t\tthis.pagesElement.appendChild(this._generatePageButton(i));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.footerRedraw();\r\n\t}\r\n\t\r\n\t_generatePageButton(page){\r\n\t\tvar button = document.createElement(\"button\");\r\n\t\t\r\n\t\tbutton.classList.add(\"tabulator-page\");\r\n\t\tif(page == this.page){\r\n\t\t\tbutton.classList.add(\"active\");\r\n\t\t}\r\n\t\t\r\n\t\tbutton.setAttribute(\"type\", \"button\");\r\n\t\tbutton.setAttribute(\"role\", \"button\");\r\n\t\t\r\n\t\tthis.langBind(\"pagination|page_title\", (value) => {\r\n\t\t\tbutton.setAttribute(\"aria-label\", value + \" \" + page);\r\n\t\t\tbutton.setAttribute(\"title\", value + \" \" + page);\r\n\t\t});\r\n\t\t\r\n\t\tbutton.setAttribute(\"data-page\", page);\r\n\t\tbutton.textContent = page;\r\n\t\t\r\n\t\tbutton.addEventListener(\"click\", (e) => {\r\n\t\t\tthis.setPage(page)\r\n\t\t});\r\n\t\t\r\n\t\treturn button;\r\n\t}\r\n\t\r\n\t//previous page\r\n\tpreviousPage(){\r\n\t\tif(this.page > 1){\r\n\t\t\tthis.page--;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger()\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Previous page would be less than page 1:\", 0);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//next page\r\n\tnextPage(){\r\n\t\tif(this.page < this.max){\r\n\t\t\tthis.page++;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger();\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tif(!this.progressiveLoad){\r\n\t\t\t\tconsole.warn(\"Pagination Error - Next page would be greater than maximum page of \" + this.max + \":\", this.max + 1);\r\n\t\t\t}\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return current page number\r\n\tgetPage(){\r\n\t\treturn this.page;\r\n\t}\r\n\t\r\n\t//return max page number\r\n\tgetPageMax(){\r\n\t\treturn this.max;\r\n\t}\r\n\t\r\n\tgetPageSize(size){\r\n\t\treturn this.size;\r\n\t}\r\n\t\r\n\tgetMode(){\r\n\t\treturn this.mode;\r\n\t}\r\n\t\r\n\t//return appropriate rows for current page\r\n\tgetRows(data){\r\n\t\tvar actualRowPageSize = 0,\r\n\t\toutput, start, end, actualStartRow;\r\n\r\n\t\tvar actualRows = data.filter((row) => {\r\n\t\t\treturn row.type === \"row\";\r\n\t\t});\r\n\t\t\r\n\t\tif(this.mode == \"local\"){\r\n\t\t\toutput = [];\r\n\t\t\t\r\n\t\t\tthis.setMaxRows(data.length);\r\n\t\t\t\r\n\t\t\tif(this.size === true){\r\n\t\t\t\tstart = 0;\r\n\t\t\t\tend = data.length;\r\n\t\t\t}else{\r\n\t\t\t\tstart = this.size * (this.page - 1);\r\n\t\t\t\tend = start + parseInt(this.size);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._setPageButtons();\r\n\t\t\t\r\n\t\t\tfor(let i = start; i < end; i++){\r\n\t\t\t\tlet row = data[i];\r\n\r\n\t\t\t\tif(row){\r\n\t\t\t\t\toutput.push(row);\r\n\r\n\t\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\t\tif(!actualStartRow){\r\n\t\t\t\t\t\t\tactualStartRow = row;\r\n\t\t\t\t\t\t}\t\r\n\r\n\t\t\t\t\t\tactualRowPageSize++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._setPageCounter(actualRows.length, actualRowPageSize, actualStartRow ? (actualRows.indexOf(actualStartRow) + 1) : 0);\r\n\t\t\t\r\n\t\t\treturn output;\r\n\t\t}else{\r\n\t\t\tthis._setPageButtons();\r\n\t\t\tthis._setPageCounter(actualRows.length);\r\n\t\t\t\r\n\t\t\treturn data.slice(0);\r\n\t\t}\r\n\t}\r\n\t\r\n\ttrigger(){\r\n\t\tvar left;\r\n\t\t\r\n\t\tswitch(this.mode){\r\n\t\t\tcase \"local\":\r\n\t\t\tleft = this.table.rowManager.scrollLeft;\r\n\t\t\t\r\n\t\t\tthis.refreshData();\r\n\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\r\n\t\t\t\r\n\t\t\treturn Promise.resolve();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"remote\":\r\n\t\t\tthis.dataChanging = true;\r\n\t\t\treturn this.reloadData(null)\r\n\t\t\t.finally(() => {\r\n\t\t\t\tthis.dataChanging = false;\r\n\t\t\t})\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"progressive_load\":\r\n\t\t\tcase \"progressive_scroll\":\r\n\t\t\treturn this.reloadData(null, true);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\tconsole.warn(\"Pagination Error - no such pagination mode:\", this.mode);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_parseRemoteData(data){\r\n\t\tvar left, data, margin;\r\n\t\t\r\n\t\tif(typeof data.last_page === \"undefined\"){\r\n\t\t\tconsole.warn(\"Remote Pagination Error - Server response missing '\" + (this.options(\"dataReceiveParams\").last_page || \"last_page\") + \"' property\");\r\n\t\t}\r\n\t\t\r\n\t\tif(data.data){\r\n\t\t\tthis.max = parseInt(data.last_page) || 1;\r\n\r\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));\r\n\t\t\t\r\n\t\t\tif(this.progressiveLoad){\r\n\t\t\t\tswitch(this.mode){\r\n\t\t\t\t\tcase \"progressive_load\":\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.page == 1){\r\n\t\t\t\t\t\tthis.table.rowManager.setData(data.data, false, this.page == 1)\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.table.rowManager.addRows(data.data);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.page < this.max){\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tthis.nextPage();\r\n\t\t\t\t\t\t}, this.table.options.progressiveLoadDelay);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"progressive_scroll\":\r\n\t\t\t\t\tdata = this.page === 1 ? data.data : this.table.rowManager.getData().concat(data.data);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.table.rowManager.setData(data, this.page !== 1, this.page == 1);\r\n\t\t\t\t\t\r\n\t\t\t\t\tmargin = this.table.options.progressiveLoadScrollMargin || (this.table.rowManager.element.clientHeight * 2);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.table.rowManager.element.scrollHeight <= (this.table.rowManager.element.clientHeight + margin)){\r\n\t\t\t\t\t\tif(this.page < this.max){\r\n\t\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\t\tthis.nextPage();\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\t// left = this.table.rowManager.scrollLeft;\r\n\t\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\r\n\t\t\t\t// this.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\t// this.table.columnManager.scrollHorizontal(left);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Remote Pagination Error - Server response missing '\" + (this.options(\"dataReceiveParams\").data || \"data\") + \"' property\");\r\n\t\t}\r\n\t\t\r\n\t\treturn data.data;\r\n\t}\r\n\t\r\n\t//handle the footer element being redrawn\r\n\tfooterRedraw(){\r\n\t\tvar footer = this.table.footerManager.containerElement;\r\n\r\n\t\tif((Math.ceil(footer.clientWidth) - footer.scrollWidth) < 0){\r\n\t\t\tthis.pagesElement.style.display = 'none';\r\n\t\t}else{\r\n\t\t\tthis.pagesElement.style.display = '';\r\n\t\t\t\r\n\t\t\tif((Math.ceil(footer.clientWidth) - footer.scrollWidth) < 0){\r\n\t\t\t\tthis.pagesElement.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nPage.moduleName = \"page\";\r\n\r\n//load defaults\r\nPage.pageCounters = defaultPageCounters;\r\n\r\nexport default Page;","// read peristence information from storage\r\nexport default {\r\n\tlocal:function(id, type){\r\n\t\tvar data = localStorage.getItem(id + \"-\" + type);\r\n\r\n\t\treturn data ? JSON.parse(data) : false;\r\n\t},\r\n\tcookie:function(id, type){\r\n\t\tvar cookie = document.cookie,\r\n\t\tkey = id + \"-\" + type,\r\n\t\tcookiePos = cookie.indexOf(key + \"=\"),\r\n\t\tend, data;\r\n\r\n\t\t//if cookie exists, decode and load column data into tabulator\r\n\t\tif(cookiePos > -1){\r\n\t\t\tcookie = cookie.slice(cookiePos);\r\n\r\n\t\t\tend = cookie.indexOf(\";\");\r\n\r\n\t\t\tif(end > -1){\r\n\t\t\t\tcookie = cookie.slice(0, end);\r\n\t\t\t}\r\n\r\n\t\t\tdata = cookie.replace(key + \"=\", \"\");\r\n\t\t}\r\n\r\n\t\treturn data ? JSON.parse(data) : false;\r\n\t}\r\n};\r\n","//write persistence information to storage\r\nexport default {\r\n\tlocal:function(id, type, data){\r\n\t\tlocalStorage.setItem(id + \"-\" + type, JSON.stringify(data));\r\n\t},\r\n\tcookie:function(id, type, data){\r\n\t\tvar expireDate = new Date();\r\n\r\n\t\texpireDate.setDate(expireDate.getDate() + 10000);\r\n\r\n\t\tdocument.cookie = id + \"-\" + type + \"=\" + JSON.stringify(data) + \"; expires=\" + expireDate.toUTCString();\r\n\t}\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultReaders from './defaults/readers.js';\r\nimport defaultWriters from './defaults/writers.js';\r\n\r\nclass Persistence extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.mode = \"\";\r\n\t\tthis.id = \"\";\r\n\t\t// this.persistProps = [\"field\", \"width\", \"visible\"];\r\n\t\tthis.defWatcherBlock = false;\r\n\t\tthis.config = {};\r\n\t\tthis.readFunc = false;\r\n\t\tthis.writeFunc = false;\r\n\r\n\t\tthis.registerTableOption(\"persistence\", false);\r\n\t\tthis.registerTableOption(\"persistenceID\", \"\"); //key for persistent storage\r\n\t\tthis.registerTableOption(\"persistenceMode\", true); //mode for storing persistence information\r\n\t\tthis.registerTableOption(\"persistenceReaderFunc\", false); //function for handling persistence data reading\r\n\t\tthis.registerTableOption(\"persistenceWriterFunc\", false); //function for handling persistence data writing\r\n\t}\r\n\r\n\t// Test for whether localStorage is available for use.\r\n\tlocalStorageTest() {\r\n\t\tvar testKey = \"_tabulator_test\";\r\n\r\n\t\ttry {\r\n\t\t\twindow.localStorage.setItem( testKey, testKey);\r\n\t\t\twindow.localStorage.removeItem( testKey );\r\n\t\t\treturn true;\r\n\t\t} catch(e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//setup parameters\r\n\tinitialize(){\r\n\t\tif(this.table.options.persistence){\r\n\t\t\t//determine persistent layout storage type\r\n\t\t\tvar mode = this.table.options.persistenceMode,\r\n\t\t\tid = this.table.options.persistenceID,\r\n\t\t\tretreivedData;\r\n\r\n\t\t\tthis.mode = mode !== true ? mode : (this.localStorageTest() ? \"local\" : \"cookie\");\r\n\r\n\t\t\tif(this.table.options.persistenceReaderFunc){\r\n\t\t\t\tif(typeof this.table.options.persistenceReaderFunc === \"function\"){\r\n\t\t\t\t\tthis.readFunc = this.table.options.persistenceReaderFunc;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(Persistence.readers[this.table.options.persistenceReaderFunc]){\r\n\t\t\t\t\t\tthis.readFunc = Persistence.readers[this.table.options.persistenceReaderFunc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Persistence Read Error - invalid reader set\", this.table.options.persistenceReaderFunc);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(Persistence.readers[this.mode]){\r\n\t\t\t\t\tthis.readFunc = Persistence.readers[this.mode];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Persistence Read Error - invalid reader set\", this.mode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.persistenceWriterFunc){\r\n\t\t\t\tif(typeof this.table.options.persistenceWriterFunc === \"function\"){\r\n\t\t\t\t\tthis.writeFunc = this.table.options.persistenceWriterFunc;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(Persistence.writers[this.table.options.persistenceWriterFunc]){\r\n\t\t\t\t\t\tthis.writeFunc = Persistence.writers[this.table.options.persistenceWriterFunc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Persistence Write Error - invalid reader set\", this.table.options.persistenceWriterFunc);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(Persistence.writers[this.mode]){\r\n\t\t\t\t\tthis.writeFunc = Persistence.writers[this.mode];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Persistence Write Error - invalid writer set\", this.mode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//set storage tag\r\n\t\t\tthis.id = \"tabulator-\" + (id || (this.table.element.getAttribute(\"id\") || \"\"));\r\n\r\n\t\t\tthis.config = {\r\n\t\t\t\tsort:this.table.options.persistence === true || this.table.options.persistence.sort,\r\n\t\t\t\tfilter:this.table.options.persistence === true || this.table.options.persistence.filter,\r\n\t\t\t\tgroup:this.table.options.persistence === true || this.table.options.persistence.group,\r\n\t\t\t\tpage:this.table.options.persistence === true || this.table.options.persistence.page,\r\n\t\t\t\tcolumns:this.table.options.persistence === true ? [\"title\", \"width\", \"visible\"] : this.table.options.persistence.columns,\r\n\t\t\t};\r\n\r\n\t\t\t//load pagination data if needed\r\n\t\t\tif(this.config.page){\r\n\t\t\t\tretreivedData = this.retreiveData(\"page\");\r\n\r\n\t\t\t\tif(retreivedData){\r\n\t\t\t\t\tif(typeof retreivedData.paginationSize !== \"undefined\" && (this.config.page === true || this.config.page.size)){\r\n\t\t\t\t\t\tthis.table.options.paginationSize = retreivedData.paginationSize;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(typeof retreivedData.paginationInitialPage !== \"undefined\" && (this.config.page === true || this.config.page.page)){\r\n\t\t\t\t\t\tthis.table.options.paginationInitialPage = retreivedData.paginationInitialPage;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//load group data if needed\r\n\t\t\tif(this.config.group){\r\n\t\t\t\tretreivedData = this.retreiveData(\"group\");\r\n\r\n\t\t\t\tif(retreivedData){\r\n\t\t\t\t\tif(typeof retreivedData.groupBy !== \"undefined\" && (this.config.group === true || this.config.group.groupBy)){\r\n\t\t\t\t\t\tthis.table.options.groupBy = retreivedData.groupBy;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retreivedData.groupStartOpen !== \"undefined\" && (this.config.group === true || this.config.group.groupStartOpen)){\r\n\t\t\t\t\t\tthis.table.options.groupStartOpen = retreivedData.groupStartOpen;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retreivedData.groupHeader !== \"undefined\" && (this.config.group === true || this.config.group.groupHeader)){\r\n\t\t\t\t\t\tthis.table.options.groupHeader = retreivedData.groupHeader;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.columns){\r\n\t\t\t\tthis.table.options.columns = this.load(\"columns\", this.table.options.columns);\r\n\t\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t\t\tthis.subscribe(\"column-show\", this.save.bind(this, \"columns\"));\r\n\t\t\t\tthis.subscribe(\"column-hide\", this.save.bind(this, \"columns\"));\r\n\t\t\t\tthis.subscribe(\"column-moved\", this.save.bind(this, \"columns\"));\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-built\", this.tableBuilt.bind(this), 0);\r\n\r\n\t\t\tthis.subscribe(\"table-redraw\", this.tableRedraw.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"filter-changed\", this.eventSave.bind(this, \"filter\"));\r\n\t\t\tthis.subscribe(\"sort-changed\", this.eventSave.bind(this, \"sort\"));\r\n\t\t\tthis.subscribe(\"group-changed\", this.eventSave.bind(this, \"group\"));\r\n\t\t\tthis.subscribe(\"page-changed\", this.eventSave.bind(this, \"page\"));\r\n\t\t\tthis.subscribe(\"column-resized\", this.eventSave.bind(this, \"columns\"));\r\n\t\t\tthis.subscribe(\"layout-refreshed\", this.eventSave.bind(this, \"columns\"));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"getColumnLayout\", this.getColumnLayout.bind(this));\r\n\t\tthis.registerTableFunction(\"setColumnLayout\", this.setColumnLayout.bind(this));\r\n\t}\r\n\r\n\teventSave(type){\r\n\t\tif(this.config[type]){\r\n\t\t\tthis.save(type);\r\n\t\t}\r\n\t}\r\n\r\n\ttableBuilt(){\r\n\t\tvar options = this.table.options,\r\n\t\tsorters, filters;\r\n\r\n\t\tif(this.config.sort){\r\n\t\t\tsorters = this.load(\"sort\");\r\n\r\n\t\t\tif(!sorters === false){\r\n\t\t\t\tthis.table.options.initialSort = sorters;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.config.filter){\r\n\t\t\tfilters = this.load(\"filter\");\r\n\r\n\t\t\tif(!filters === false){\r\n\t\t\t\tthis.table.options.initialFilter = filters;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tif(force && this.config.columns){\r\n\t\t\tthis.save(\"columns\");\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tgetColumnLayout(){\r\n\t\treturn this.parseColumns(this.table.columnManager.getColumns());\r\n\t}\r\n\r\n\tsetColumnLayout(layout){\r\n\t\tthis.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns, layout))\r\n\t\treturn true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumn(column){\r\n\t\tvar def, keys;\r\n\r\n\t\tif(this.config.columns){\r\n\t\t\tthis.defWatcherBlock = true;\r\n\r\n\t\t\tdef = column.getDefinition();\r\n\r\n\t\t\tkeys = this.config.columns === true ? Object.keys(def) : this.config.columns;\r\n\r\n\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\tvar props = Object.getOwnPropertyDescriptor(def, key);\r\n\t\t\t\tvar value = def[key];\r\n\t\t\t\tif(props){\r\n\t\t\t\t\tObject.defineProperty(def, key, {\r\n\t\t\t\t\t\tset: function(newValue){\r\n\t\t\t\t\t\t\tvalue = newValue;\r\n\r\n\t\t\t\t\t\t\tif(!this.defWatcherBlock){\r\n\t\t\t\t\t\t\t\tthis.save(\"columns\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif(props.set){\r\n\t\t\t\t\t\t\t\tprops.set(newValue);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tget:function(){\r\n\t\t\t\t\t\t\tif(props.get){\r\n\t\t\t\t\t\t\t\tprops.get();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.defWatcherBlock = false;\r\n\t\t}\r\n\t}\r\n\r\n\t//load saved definitions\r\n\tload(type, current){\r\n\t\tvar data = this.retreiveData(type);\r\n\r\n\t\tif(current){\r\n\t\t\tdata = data ? this.mergeDefinition(current, data) : current;\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//retreive data from memory\r\n\tretreiveData(type){\r\n\t\treturn this.readFunc ? this.readFunc(this.id, type) : false;\r\n\t}\r\n\r\n\t//merge old and new column definitions\r\n\tmergeDefinition(oldCols, newCols){\r\n\t\tvar output = [];\r\n\r\n\t\tnewCols = newCols || [];\r\n\r\n\t\tnewCols.forEach((column, to) => {\r\n\t\t\tvar from = this._findColumn(oldCols, column),\r\n\t\t\tkeys;\r\n\r\n\t\t\tif(from){\r\n\t\t\t\tif(this.config.columns === true || this.config.columns == undefined){\r\n\t\t\t\t\tkeys = Object.keys(from);\r\n\t\t\t\t\tkeys.push(\"width\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tkeys = this.config.columns;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\t\tif(key !== \"columns\" && typeof column[key] !== \"undefined\"){\r\n\t\t\t\t\t\tfrom[key] = column[key];\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(from.columns){\r\n\t\t\t\t\tfrom.columns = this.mergeDefinition(from.columns, column.columns);\r\n\t\t\t\t}\r\n\r\n\t\t\t\toutput.push(from);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\toldCols.forEach((column, i) => {\r\n\t\t\tvar from = this._findColumn(newCols, column);\r\n\r\n\t\t\tif (!from) {\r\n\t\t\t\tif(output.length>i){\r\n\t\t\t\t\toutput.splice(i, 0, column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput.push(column);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//find matching columns\r\n\t_findColumn(columns, subject){\r\n\t\tvar type = subject.columns ? \"group\" : (subject.field ? \"field\" : \"object\");\r\n\r\n\t\treturn columns.find(function(col){\r\n\t\t\tswitch(type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\treturn col.title === subject.title && col.columns.length === subject.columns.length;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"field\":\r\n\t\t\t\treturn col.field === subject.field;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\treturn col === subject;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//save data\r\n\tsave(type){\r\n\t\tvar data = {};\r\n\r\n\t\tswitch(type){\r\n\t\t\tcase \"columns\":\r\n\t\t\tdata = this.parseColumns(this.table.columnManager.getColumns())\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"filter\":\r\n\t\t\tdata = this.table.modules.filter.getFilters();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"sort\":\r\n\t\t\tdata = this.validateSorters(this.table.modules.sort.getSort());\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tdata = this.getGroupConfig();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"page\":\r\n\t\t\tdata = this.getPageConfig();\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(this.writeFunc){\r\n\t\t\tthis.writeFunc(this.id, type, data);\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t//ensure sorters contain no function data\r\n\tvalidateSorters(data){\r\n\t\tdata.forEach(function(item){\r\n\t\t\titem.column = item.field;\r\n\t\t\tdelete item.field;\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\tgetGroupConfig(){\r\n\t\tvar data = {};\r\n\r\n\t\tif(this.config.group){\r\n\t\t\tif(this.config.group === true || this.config.group.groupBy){\r\n\t\t\t\tdata.groupBy = this.table.options.groupBy;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.group === true || this.config.group.groupStartOpen){\r\n\t\t\t\tdata.groupStartOpen = this.table.options.groupStartOpen;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.group === true || this.config.group.groupHeader){\r\n\t\t\t\tdata.groupHeader = this.table.options.groupHeader;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\tgetPageConfig(){\r\n\t\tvar data = {};\r\n\r\n\t\tif(this.config.page){\r\n\t\t\tif(this.config.page === true || this.config.page.size){\r\n\t\t\t\tdata.paginationSize = this.table.modules.page.getPageSize();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.page === true || this.config.page.page){\r\n\t\t\t\tdata.paginationInitialPage = this.table.modules.page.getPage();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\r\n\t//parse columns for data to store\r\n\tparseColumns(columns){\r\n\t\tvar definitions = [],\r\n\t\texcludedKeys = [\"headerContextMenu\", \"headerMenu\", \"contextMenu\", \"clickMenu\"];\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\tvar defStore = {},\r\n\t\t\tcolDef = column.getDefinition(),\r\n\t\t\tkeys;\r\n\r\n\t\t\tif(column.isGroup){\r\n\t\t\t\tdefStore.title = colDef.title;\r\n\t\t\t\tdefStore.columns = this.parseColumns(column.getColumns());\r\n\t\t\t}else{\r\n\t\t\t\tdefStore.field = column.getField();\r\n\r\n\t\t\t\tif(this.config.columns === true || this.config.columns == undefined){\r\n\t\t\t\t\tkeys = Object.keys(colDef);\r\n\t\t\t\t\tkeys.push(\"width\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tkeys = this.config.columns;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\t\tswitch(key){\r\n\t\t\t\t\t\tcase \"width\":\r\n\t\t\t\t\t\tdefStore.width = column.getWidth();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"visible\":\r\n\t\t\t\t\t\tdefStore.visible = column.visible;\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(typeof colDef[key] !== \"function\" && excludedKeys.indexOf(key) === -1){\r\n\t\t\t\t\t\t\tdefStore[key] = colDef[key];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tdefinitions.push(defStore);\r\n\t\t});\r\n\r\n\t\treturn definitions;\r\n\t}\r\n}\r\n\r\nPersistence.moduleName = \"persistence\";\r\n\r\nPersistence.moduleInitOrder = 1;\r\n\r\n//load defaults\r\nPersistence.readers = defaultReaders;\r\nPersistence.writers = defaultWriters;\r\n\r\nexport default Persistence;","import Module from '../../core/Module.js';\r\n\r\nclass Print extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.manualBlock = false;\r\n\r\n\t\tthis.registerTableOption(\"printAsHtml\", false); //enable print as html\r\n\t\tthis.registerTableOption(\"printFormatter\", false); //printing page formatter\r\n\t\tthis.registerTableOption(\"printHeader\", false); //page header contents\r\n\t\tthis.registerTableOption(\"printFooter\", false); //page footer contents\r\n\t\tthis.registerTableOption(\"printStyled\", true); //enable print as html styling\r\n\t\tthis.registerTableOption(\"printRowRange\", \"visible\"); //restrict print to visible rows only\r\n\t\tthis.registerTableOption(\"printConfig\", {}); //print config options\r\n\r\n\t\tthis.registerColumnOption(\"print\");\r\n\t\tthis.registerColumnOption(\"titlePrint\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.printAsHtml){\r\n\t\t\twindow.addEventListener(\"beforeprint\", this.replaceTable.bind(this));\r\n\t\t\twindow.addEventListener(\"afterprint\", this.cleanup.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"print\", this.printFullscreen.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\treplaceTable(){\r\n\t\tif(!this.manualBlock){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"tabulator-print-table\");\r\n\r\n\t\t\tthis.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig, this.table.options.printStyled, this.table.options.printRowRange, \"print\"));\r\n\r\n\t\t\tthis.table.element.style.display = \"none\";\r\n\r\n\t\t\tthis.table.element.parentNode.insertBefore(this.element, this.table.element);\r\n\t\t}\r\n\t}\r\n\r\n\tcleanup(){\r\n\t\tdocument.body.classList.remove(\"tabulator-print-fullscreen-hide\");\r\n\r\n\t\tif(this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\tthis.table.element.style.display = \"\";\r\n\t\t}\r\n\t}\r\n\r\n\tprintFullscreen(visible, style, config){\r\n\t\tvar scrollX = window.scrollX,\r\n\t\tscrollY = window.scrollY,\r\n\t\theaderEl = document.createElement(\"div\"),\r\n\t\tfooterEl = document.createElement(\"div\"),\r\n\t\ttableEl = this.table.modules.export.genereateTable(typeof config != \"undefined\" ? config : this.table.options.printConfig, typeof style != \"undefined\" ? style : this.table.options.printStyled, visible || this.table.options.printRowRange, \"print\"),\r\n\t\theaderContent, footerContent;\r\n\r\n\t\tthis.manualBlock = true;\r\n\r\n\t\tthis.element = document.createElement(\"div\");\r\n\t\tthis.element.classList.add(\"tabulator-print-fullscreen\");\r\n\r\n\t\tif(this.table.options.printHeader){\r\n\t\t\theaderEl.classList.add(\"tabulator-print-header\");\r\n\r\n\t\t\theaderContent = typeof this.table.options.printHeader == \"function\" ? this.table.options.printHeader.call(this.table) : this.table.options.printHeader;\r\n\r\n\t\t\tif(typeof headerContent == \"string\"){\r\n\t\t\t\theaderEl.innerHTML = headerContent;\r\n\t\t\t}else{\r\n\t\t\t\theaderEl.appendChild(headerContent);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.appendChild(headerEl);\r\n\t\t}\r\n\r\n\t\tthis.element.appendChild(tableEl);\r\n\r\n\t\tif(this.table.options.printFooter){\r\n\t\t\tfooterEl.classList.add(\"tabulator-print-footer\");\r\n\r\n\t\t\tfooterContent = typeof this.table.options.printFooter == \"function\" ? this.table.options.printFooter.call(this.table) : this.table.options.printFooter;\r\n\r\n\r\n\t\t\tif(typeof footerContent == \"string\"){\r\n\t\t\t\tfooterEl.innerHTML = footerContent;\r\n\t\t\t}else{\r\n\t\t\t\tfooterEl.appendChild(footerContent);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.appendChild(footerEl);\r\n\t\t}\r\n\r\n\t\tdocument.body.classList.add(\"tabulator-print-fullscreen-hide\");\r\n\t\tdocument.body.appendChild(this.element);\r\n\r\n\t\tif(this.table.options.printFormatter){\r\n\t\t\tthis.table.options.printFormatter(this.element, tableEl);\r\n\t\t}\r\n\r\n\t\twindow.print();\r\n\r\n\t\tthis.cleanup();\r\n\r\n\t\twindow.scrollTo(scrollX, scrollY);\r\n\r\n\t\tthis.manualBlock = false;\r\n\t}\r\n}\r\n\r\nPrint.moduleName = \"print\";\r\n\r\nexport default Print;","import Module from '../../core/Module.js';\r\n\r\nclass ReactiveData extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.data = false;\r\n\t\tthis.blocked = false; //block reactivity while performing update\r\n\t\tthis.origFuncs = {}; // hold original data array functions to allow replacement after data is done with\r\n\t\tthis.currentVersion = 0;\r\n\r\n\t\tthis.registerTableOption(\"reactiveData\", false); //enable data reactivity\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.reactiveData){\r\n\t\t\tthis.subscribe(\"cell-value-save-before\", this.block.bind(this));\r\n\t\t\tthis.subscribe(\"cell-value-save-after\", this.unblock.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-save-before\", this.block.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-save-after\", this.unblock.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-init-after\", this.watchRow.bind(this));\r\n\t\t\tthis.subscribe(\"data-processing\", this.watchData.bind(this));\r\n\t\t\tthis.subscribe(\"table-destroy\", this.unwatchData.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\twatchData(data){\r\n\t\tvar self = this,\r\n\t\tpushFunc, version;\r\n\r\n\t\tthis.currentVersion ++;\r\n\r\n\t\tversion = this.currentVersion;\r\n\r\n\t\tthis.unwatchData();\r\n\r\n\t\tthis.data = data;\r\n\r\n\t\t//override array push function\r\n\t\tthis.origFuncs.push = data.push;\r\n\r\n\t\tObject.defineProperty(this.data, \"push\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments);\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\targs.forEach((arg) => {\r\n\t\t\t\t\t\tself.table.rowManager.addRowActual(arg, false);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.push.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//override array unshift function\r\n\t\tthis.origFuncs.unshift = data.unshift;\r\n\r\n\t\tObject.defineProperty(this.data, \"unshift\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments);\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\targs.forEach((arg) => {\r\n\t\t\t\t\t\tself.table.rowManager.addRowActual(arg, true);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.unshift.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\t//override array shift function\r\n\t\tthis.origFuncs.shift = data.shift;\r\n\r\n\t\tObject.defineProperty(this.data, \"shift\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar row;\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tif(self.data.length){\r\n\t\t\t\t\t\trow = self.table.rowManager.getRowFromDataObject(self.data[0]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.deleteActual();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.shift.call(data);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//override array pop function\r\n\t\tthis.origFuncs.pop = data.pop;\r\n\r\n\t\tObject.defineProperty(this.data, \"pop\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar row;\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tif(self.data.length){\r\n\t\t\t\t\t\trow = self.table.rowManager.getRowFromDataObject(self.data[self.data.length - 1]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.deleteActual();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn self.origFuncs.pop.call(data);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\t//override array splice function\r\n\t\tthis.origFuncs.splice = data.splice;\r\n\r\n\t\tObject.defineProperty(this.data, \"splice\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments),\r\n\t\t\t\tstart = args[0] < 0 ? data.length + args[0] : args[0],\r\n\t\t\t\tend = args[1],\r\n\t\t\t\tnewRows = args[2] ? args.slice(2) : false,\r\n\t\t\t\tstartRow;\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\r\n\t\t\t\t\t//add new rows\r\n\t\t\t\t\tif(newRows){\r\n\t\t\t\t\t\tstartRow = data[start] ? self.table.rowManager.getRowFromDataObject(data[start]) : false;\r\n\r\n\t\t\t\t\t\tif(startRow){\r\n\t\t\t\t\t\t\tnewRows.forEach((rowData) => {\r\n\t\t\t\t\t\t\t\tself.table.rowManager.addRowActual(rowData, true, startRow, true);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnewRows = newRows.slice().reverse();\r\n\r\n\t\t\t\t\t\t\tnewRows.forEach((rowData) => {\r\n\t\t\t\t\t\t\t\tself.table.rowManager.addRowActual(rowData, true, false, true);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//delete removed rows\r\n\t\t\t\t\tif(end !== 0){\r\n\t\t\t\t\t\tvar oldRows = data.slice(start, typeof args[1] === \"undefined\" ? args[1] : start + end);\r\n\r\n\t\t\t\t\t\toldRows.forEach((rowData, i) => {\r\n\t\t\t\t\t\t\tvar row = self.table.rowManager.getRowFromDataObject(rowData);\r\n\r\n\t\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\t\trow.deleteActual(i !== oldRows.length - 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(newRows || end !== 0){\r\n\t\t\t\t\t\tself.table.rowManager.reRenderInPosition();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.splice.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tunwatchData(){\r\n\t\tif(this.data !== false){\r\n\t\t\tfor(var key in this.origFuncs){\r\n\t\t\t\tObject.defineProperty(this.data, key, {\r\n\t\t\t\t\tenumerable: true,\r\n\t\t\t\t\tconfigurable:true,\r\n\t\t\t\t\twritable:true,\r\n\t\t\t\t\tvalue: this.origFuncs.key,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\twatchRow(row){\r\n\t\tvar data = row.getData();\r\n\r\n\t\tthis.blocked = true;\r\n\r\n\t\tfor(var key in data){\r\n\t\t\tthis.watchKey(row, data, key);\r\n\t\t}\r\n\r\n\t\tif(this.table.options.dataTree){\r\n\t\t\tthis.watchTreeChildren(row);\r\n\t\t}\r\n\r\n\t\tthis.blocked = false;\r\n\t}\r\n\r\n\twatchTreeChildren (row){\r\n\t\tvar childField = row.getData()[this.table.options.dataTreeChildField],\r\n\t\torigFuncs = {};\r\n\r\n\t\tfunction rebuildTree(){\r\n\t\t\tthis.table.modules.dataTree.initializeRow(row);\r\n\t\t\tthis.table.modules.dataTree.layoutRow(row);\r\n\t\t\tthis.table.rowManager.refreshActiveData(\"tree\", false, true);\r\n\t\t}\r\n\r\n\t\tif(childField){\r\n\r\n\t\t\torigFuncs.push = childField.push;\r\n\r\n\t\t\tObject.defineProperty(childField, \"push\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.push.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.unshift = childField.unshift;\r\n\r\n\t\t\tObject.defineProperty(childField, \"unshift\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.unshift.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.shift = childField.shift;\r\n\r\n\t\t\tObject.defineProperty(childField, \"shift\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.shift.call(childField);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.pop = childField.pop;\r\n\r\n\t\t\tObject.defineProperty(childField, \"pop\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.pop.call(childField);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.splice = childField.splice;\r\n\r\n\t\t\tObject.defineProperty(childField, \"splice\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.splice.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\twatchKey(row, data, key){\r\n\t\tvar props = Object.getOwnPropertyDescriptor(data, key),\r\n\t\tvalue = data[key],\r\n\t\tversion = this.currentVersion;\r\n\r\n\t\tObject.defineProperty(data, key, {\r\n\t\t\tset: (newValue) => {\r\n\t\t\t\tvalue = newValue;\r\n\t\t\t\tif(!this.blocked && version === this.currentVersion){\r\n\t\t\t\t\tvar update = {};\r\n\t\t\t\t\tupdate[key] = newValue;\r\n\t\t\t\t\trow.updateData(update);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(props.set){\r\n\t\t\t\t\tprops.set(newValue);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tget:() => {\r\n\r\n\t\t\t\tif(props.get){\r\n\t\t\t\t\tprops.get();\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tunwatchRow(row){\r\n\t\tvar data = row.getData();\r\n\r\n\t\tfor(var key in data){\r\n\t\t\tObject.defineProperty(data, key, {\r\n\t\t\t\tvalue:data[key],\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tblock(){\r\n\t\tthis.blocked = true;\r\n\t}\r\n\r\n\tunblock(){\r\n\t\tthis.blocked = false;\r\n\t}\r\n}\r\n\r\nReactiveData.moduleName = \"reactiveData\";\r\n\r\nexport default ReactiveData;\r\n\r\n\r\n\r\n","import Module from '../../core/Module.js';\r\n\r\nclass ResizeColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.startColumn = false;\r\n\t\tthis.startX = false;\r\n\t\tthis.startWidth = false;\r\n\t\tthis.handle = null;\r\n\t\tthis.prevHandle = null;\r\n\t\t\r\n\t\tthis.registerColumnOption(\"resizable\", true);\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\t// if(this.table.options.resizableColumns){\r\n\t\tthis.subscribe(\"cell-layout\", this.layoutCellHandles.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.layoutColumnHeader.bind(this));\r\n\t\t// }\r\n\t}\r\n\t\r\n\tlayoutCellHandles(cell){\r\n\t\tif(cell.row.type === \"row\"){\r\n\t\t\tthis.initializeColumn(\"cell\", cell.column, cell.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutColumnHeader(column){\r\n\t\tthis.initializeColumn(\"header\", column, column.element);\r\n\t}\r\n\t\r\n\tinitializeColumn(type, column, element){\r\n\t\tvar self = this,\r\n\t\tvariableHeight = false,\r\n\t\tmode = column.definition.resizable;\r\n\t\t\r\n\t\t//set column resize mode\r\n\t\tif(type === \"header\"){\r\n\t\t\tvariableHeight = column.definition.formatter == \"textarea\" || column.definition.variableHeight;\r\n\t\t\tcolumn.modules.resize = {variableHeight:variableHeight};\r\n\t\t}\r\n\t\t\r\n\t\tif(mode === true || mode == type){\r\n\t\t\t\r\n\t\t\tvar handle = document.createElement('div');\r\n\t\t\thandle.className = \"tabulator-col-resize-handle\";\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tvar prevHandle = document.createElement('div');\r\n\t\t\tprevHandle.className = \"tabulator-col-resize-handle prev\";\r\n\t\t\t\r\n\t\t\thandle.addEventListener(\"click\", function(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tvar handleDown = function(e){\r\n\t\t\t\tvar nearestColumn = column.getLastColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn && self._checkResizability(nearestColumn)){\r\n\t\t\t\t\tself.startColumn = column;\r\n\t\t\t\t\tself._mouseDown(e, nearestColumn, handle);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\thandle.addEventListener(\"mousedown\", handleDown);\r\n\t\t\thandle.addEventListener(\"touchstart\", handleDown, {passive: true});\r\n\t\t\t\r\n\t\t\t//reszie column on double click\r\n\t\t\thandle.addEventListener(\"dblclick\", function(e){\r\n\t\t\t\tvar col = column.getLastColumn(),\r\n\t\t\t\toldWidth;\r\n\t\t\t\t\r\n\t\t\t\tif(col && self._checkResizability(col)){\r\n\t\t\t\t\toldWidth = col.getWidth();\r\n\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tcol.reinitializeWidth(true);\r\n\r\n\t\t\t\t\tif(oldWidth !== col.getWidth()){\r\n\t\t\t\t\t\tself.dispatch(\"column-resized\", col);\r\n\t\t\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", col.getComponent());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tprevHandle.addEventListener(\"click\", function(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tvar prevHandleDown = function(e){\r\n\t\t\t\tvar nearestColumn, colIndex, prevColumn;\r\n\t\t\t\t\r\n\t\t\t\tnearestColumn = column.getFirstColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn){\r\n\t\t\t\t\tcolIndex = self.table.columnManager.findColumnIndex(nearestColumn);\r\n\t\t\t\t\tprevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(prevColumn && self._checkResizability(prevColumn)){\r\n\t\t\t\t\t\tself.startColumn = column;\r\n\t\t\t\t\t\tself._mouseDown(e, prevColumn, prevHandle);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tprevHandle.addEventListener(\"mousedown\", prevHandleDown);\r\n\t\t\tprevHandle.addEventListener(\"touchstart\", prevHandleDown, {passive: true});\r\n\t\t\t\r\n\t\t\t//resize column on double click\r\n\t\t\tprevHandle.addEventListener(\"dblclick\", function(e){\r\n\t\t\t\tvar nearestColumn, colIndex, prevColumn;\r\n\t\t\t\t\r\n\t\t\t\tnearestColumn = column.getFirstColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn){\r\n\t\t\t\t\tcolIndex = self.table.columnManager.findColumnIndex(nearestColumn);\r\n\t\t\t\t\tprevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(prevColumn && self._checkResizability(prevColumn)){\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tprevColumn.reinitializeWidth(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\telement.appendChild(handle);\r\n\t\t\telement.appendChild(prevHandle);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_checkResizability(column){\r\n\t\treturn column.definition.resizable;\r\n\t}\r\n\t\r\n\t_mouseDown(e, column, handle){\r\n\t\tvar self = this;\r\n\t\t\r\n\t\tself.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tfunction mouseMove(e){\r\n\t\t\t// self.table.columnManager.tempScrollBlock();\r\n\t\t\t\r\n\t\t\tif(self.table.rtl){\r\n\t\t\t\tcolumn.setWidth(self.startWidth - ((typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX) - self.startX));\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.setWidth(self.startWidth + ((typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX) - self.startX));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself.table.columnManager.renderer.rerenderColumns(true);\r\n\t\t\t\r\n\t\t\tif(!self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight){\r\n\t\t\t\tcolumn.checkCellHeights();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfunction mouseUp(e){\r\n\t\t\t\r\n\t\t\t//block editor from taking action while resizing is taking place\r\n\t\t\tif(self.startColumn.modules.edit){\r\n\t\t\t\tself.startColumn.modules.edit.blocked = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight){\r\n\t\t\t\tcolumn.checkCellHeights();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", mouseUp);\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", mouseMove);\r\n\t\t\t\r\n\t\t\thandle.removeEventListener(\"touchmove\", mouseMove);\r\n\t\t\thandle.removeEventListener(\"touchend\", mouseUp);\r\n\t\t\t\r\n\t\t\tself.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tif(self.startWidth !== column.getWidth()){\r\n\t\t\t\tself.dispatch(\"column-resized\", column);\r\n\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", column.getComponent());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\te.stopPropagation(); //prevent resize from interfereing with movable columns\r\n\t\t\r\n\t\t//block editor from taking action while resizing is taking place\r\n\t\tif(self.startColumn.modules.edit){\r\n\t\t\tself.startColumn.modules.edit.blocked = true;\r\n\t\t}\r\n\t\t\r\n\t\tself.startX = typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX;\r\n\t\tself.startWidth = column.getWidth();\r\n\t\t\r\n\t\tdocument.body.addEventListener(\"mousemove\", mouseMove);\r\n\t\tdocument.body.addEventListener(\"mouseup\", mouseUp);\r\n\t\thandle.addEventListener(\"touchmove\", mouseMove, {passive: true});\r\n\t\thandle.addEventListener(\"touchend\", mouseUp);\r\n\t}\r\n}\r\n\r\nResizeColumns.moduleName = \"resizeColumns\";\r\n\r\nexport default ResizeColumns;","import Module from '../../core/Module.js';\r\n\r\nclass ResizeRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.startColumn = false;\r\n\t\tthis.startY = false;\r\n\t\tthis.startHeight = false;\r\n\t\tthis.handle = null;\r\n\t\tthis.prevHandle = null;\r\n\r\n\t\tthis.registerTableOption(\"resizableRows\", false); //resizable rows\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.resizableRows){\r\n\t\t\tthis.subscribe(\"row-layout-after\", this.initializeRow.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\trowEl = row.getElement();\r\n\r\n\t\tvar handle = document.createElement('div');\r\n\t\thandle.className = \"tabulator-row-resize-handle\";\r\n\r\n\t\tvar prevHandle = document.createElement('div');\r\n\t\tprevHandle.className = \"tabulator-row-resize-handle prev\";\r\n\r\n\t\thandle.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tvar handleDown = function(e){\r\n\t\t\tself.startRow = row;\r\n\t\t\tself._mouseDown(e, row, handle);\r\n\t\t};\r\n\r\n\t\thandle.addEventListener(\"mousedown\", handleDown);\r\n\t\thandle.addEventListener(\"touchstart\", handleDown, {passive: true});\r\n\r\n\t\tprevHandle.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tvar prevHandleDown = function(e){\r\n\t\t\tvar prevRow = self.table.rowManager.prevDisplayRow(row);\r\n\r\n\t\t\tif(prevRow){\r\n\t\t\t\tself.startRow = prevRow;\r\n\t\t\t\tself._mouseDown(e, prevRow, prevHandle);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tprevHandle.addEventListener(\"mousedown\",prevHandleDown);\r\n\t\tprevHandle.addEventListener(\"touchstart\",prevHandleDown, {passive: true});\r\n\r\n\t\trowEl.appendChild(handle);\r\n\t\trowEl.appendChild(prevHandle);\r\n\t}\r\n\r\n\t_mouseDown(e, row, handle){\r\n\t\tvar self = this;\r\n\r\n\t\tself.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tfunction mouseMove(e){\r\n\t\t\trow.setHeight(self.startHeight + ((typeof e.screenY === \"undefined\" ? e.touches[0].screenY : e.screenY) - self.startY));\r\n\t\t}\r\n\r\n\t\tfunction mouseUp(e){\r\n\r\n\t\t\t// //block editor from taking action while resizing is taking place\r\n\t\t\t// if(self.startColumn.modules.edit){\r\n\t\t\t// \tself.startColumn.modules.edit.blocked = false;\r\n\t\t\t// }\r\n\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", mouseMove);\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", mouseMove);\r\n\r\n\t\t\thandle.removeEventListener(\"touchmove\", mouseMove);\r\n\t\t\thandle.removeEventListener(\"touchend\", mouseUp);\r\n\r\n\t\t\tself.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tself.dispatchExternal(\"rowResized\", row.getComponent());\r\n\t\t}\r\n\r\n\t\te.stopPropagation(); //prevent resize from interfereing with movable columns\r\n\r\n\t\t//block editor from taking action while resizing is taking place\r\n\t\t// if(self.startColumn.modules.edit){\r\n\t\t// \tself.startColumn.modules.edit.blocked = true;\r\n\t\t// }\r\n\r\n\t\tself.startY = typeof e.screenY === \"undefined\" ? e.touches[0].screenY : e.screenY;\r\n\t\tself.startHeight = row.getHeight();\r\n\r\n\t\tdocument.body.addEventListener(\"mousemove\", mouseMove);\r\n\t\tdocument.body.addEventListener(\"mouseup\", mouseUp);\r\n\r\n\t\thandle.addEventListener(\"touchmove\", mouseMove, {passive: true});\r\n\t\thandle.addEventListener(\"touchend\", mouseUp);\r\n\t}\r\n}\r\n\r\nResizeRows.moduleName = \"resizeRows\";\r\n\r\nexport default ResizeRows;","import Module from '../../core/Module.js';\r\n\r\nclass ResizeTable extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.binding = false;\r\n\t\tthis.observer = false;\r\n\t\tthis.containerObserver = false;\r\n\r\n\t\tthis.tableHeight = 0;\r\n\t\tthis.tableWidth = 0;\r\n\t\tthis.containerHeight = 0;\r\n\t\tthis.containerWidth = 0;\r\n\r\n\t\tthis.autoResize = false;\r\n\r\n\t\tthis.registerTableOption(\"autoResize\", true); //auto resize table\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.autoResize){\r\n\t\t\tvar table = this.table,\r\n\t\t\ttableStyle;\r\n\r\n\t\t\tthis.tableHeight = table.element.clientHeight;\r\n\t\t\tthis.tableWidth = table.element.clientWidth;\r\n\r\n\t\t\tif(table.element.parentNode){\r\n\t\t\t\tthis.containerHeight = table.element.parentNode.clientHeight;\r\n\t\t\t\tthis.containerWidth = table.element.parentNode.clientWidth;\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof ResizeObserver !== \"undefined\" && table.rowManager.getRenderMode() === \"virtual\"){\r\n\r\n\t\t\t\tthis.autoResize = true;\r\n\r\n\t\t\t\tthis.observer = new ResizeObserver((entry) => {\r\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\tvar nodeHeight = Math.floor(entry[0].contentRect.height);\r\n\t\t\t\t\t\tvar nodeWidth = Math.floor(entry[0].contentRect.width);\r\n\r\n\t\t\t\t\t\tif(this.tableHeight != nodeHeight || this.tableWidth != nodeWidth){\r\n\t\t\t\t\t\t\tthis.tableHeight = nodeHeight;\r\n\t\t\t\t\t\t\tthis.tableWidth = nodeWidth;\r\n\r\n\t\t\t\t\t\t\tif(table.element.parentNode){\r\n\t\t\t\t\t\t\t\tthis.containerHeight = table.element.parentNode.clientHeight;\r\n\t\t\t\t\t\t\t\tthis.containerWidth = table.element.parentNode.clientWidth;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tthis.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.observer.observe(table.element);\r\n\r\n\t\t\t\ttableStyle = window.getComputedStyle(table.element);\r\n\r\n\t\t\t\tif(this.table.element.parentNode && !this.table.rowManager.fixedHeight && (tableStyle.getPropertyValue(\"max-height\") || tableStyle.getPropertyValue(\"min-height\"))){\r\n\r\n\t\t\t\t\tthis.containerObserver = new ResizeObserver((entry) => {\r\n\t\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\t\tvar nodeHeight = Math.floor(entry[0].contentRect.height);\r\n\t\t\t\t\t\t\tvar nodeWidth = Math.floor(entry[0].contentRect.width);\r\n\r\n\t\t\t\t\t\t\tif(this.containerHeight != nodeHeight || this.containerWidth != nodeWidth){\r\n\t\t\t\t\t\t\t\tthis.containerHeight = nodeHeight;\r\n\t\t\t\t\t\t\t\tthis.containerWidth = nodeWidth;\r\n\t\t\t\t\t\t\t\tthis.tableHeight = table.element.clientHeight;\r\n\t\t\t\t\t\t\t\tthis.tableWidth = table.element.clientWidth;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\ttable.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tthis.containerObserver.observe(this.table.element.parentNode);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.subscribe(\"table-resize\", this.tableResized.bind(this));\r\n\r\n\t\t\t}else{\r\n\t\t\t\tthis.binding = function(){\r\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile && !table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\ttable.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\twindow.addEventListener(\"resize\", this.binding);\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\ttableResized(){\r\n\t\tthis.table.rowManager.redraw();\r\n\t}\r\n\r\n\tclearBindings(){\r\n\t\tif(this.binding){\r\n\t\t\twindow.removeEventListener(\"resize\", this.binding);\r\n\t\t}\r\n\r\n\t\tif(this.observer){\r\n\t\t\tthis.observer.unobserve(this.table.element);\r\n\t\t}\r\n\r\n\t\tif(this.containerObserver){\r\n\t\t\tthis.containerObserver.unobserve(this.table.element.parentNode);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nResizeTable.moduleName = \"resizeTable\";\r\n\r\nexport default ResizeTable;","import Module from '../../core/Module.js';\r\n\r\nclass ResponsiveLayout extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.columns = [];\r\n\t\tthis.hiddenColumns = [];\r\n\t\tthis.mode = \"\";\r\n\t\tthis.index = 0;\r\n\t\tthis.collapseFormatter = [];\r\n\t\tthis.collapseStartOpen = true;\r\n\t\tthis.collapseHandleColumn = false;\r\n\r\n\t\tthis.registerTableOption(\"responsiveLayout\", false); //responsive layout flags\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseStartOpen\", true); //start showing collapsed data\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseUseFormatters\", true); //responsive layout collapse formatter\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseFormatter\", false); //responsive layout collapse formatter\r\n\r\n\t\tthis.registerColumnOption(\"responsive\");\r\n\t}\r\n\r\n\t//generate responsive columns list\r\n\tinitialize(){\r\n\t\tvar self = this,\r\n\t\tcolumns = [];\r\n\r\n\t\tif(this.table.options.responsiveLayout){\r\n\t\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\t\tthis.subscribe(\"column-show\", this.updateColumnVisibility.bind(this));\r\n\t\t\tthis.subscribe(\"column-hide\", this.updateColumnVisibility.bind(this));\r\n\t\t\tthis.subscribe(\"columns-loaded\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-moved\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-add\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-delete\", this.initializeResponsivity.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"table-redrawing\", this.tableRedraw.bind(this));\r\n\r\n\t\t\tif(this.table.options.responsiveLayout === \"collapse\"){\r\n\t\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\t\tthis.subscribe(\"row-layout\", this.layoutRow.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tif([\"fitColumns\", \"fitDataStretch\"].indexOf(this.layoutMode()) === -1){\r\n\t\t\tif(!force){\r\n\t\t\t\tthis.update();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeResponsivity(){\r\n\t\tvar columns = [];\r\n\r\n\t\tthis.mode = this.table.options.responsiveLayout;\r\n\t\tthis.collapseFormatter = this.table.options.responsiveLayoutCollapseFormatter || this.formatCollapsedData;\r\n\t\tthis.collapseStartOpen = this.table.options.responsiveLayoutCollapseStartOpen;\r\n\t\tthis.hiddenColumns = [];\r\n\r\n\t\t//determine level of responsivity for each column\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column, i) => {\r\n\t\t\tif(column.modules.responsive){\r\n\t\t\t\tif(column.modules.responsive.order && column.modules.responsive.visible){\r\n\t\t\t\t\tcolumn.modules.responsive.index = i;\r\n\t\t\t\t\tcolumns.push(column);\r\n\r\n\t\t\t\t\tif(!column.visible && this.mode === \"collapse\"){\r\n\t\t\t\t\t\tthis.hiddenColumns.push(column);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//sort list by responsivity\r\n\t\tcolumns = columns.reverse();\r\n\t\tcolumns = columns.sort((a, b) => {\r\n\t\t\tvar diff = b.modules.responsive.order - a.modules.responsive.order;\r\n\t\t\treturn diff || (b.modules.responsive.index - a.modules.responsive.index);\r\n\t\t});\r\n\r\n\t\tthis.columns = columns;\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tthis.generateCollapsedContent();\r\n\t\t}\r\n\r\n\t\t//assign collapse column\r\n\t\tfor (let col of this.table.columnManager.columnsByIndex){\r\n\t\t\tif(col.definition.formatter == \"responsiveCollapse\"){\r\n\t\t\t\tthis.collapseHandleColumn = col;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.collapseHandleColumn){\r\n\t\t\tif(this.hiddenColumns.length){\r\n\t\t\t\tthis.collapseHandleColumn.show();\r\n\t\t\t}else{\r\n\t\t\t\tthis.collapseHandleColumn.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//define layout information\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.getDefinition();\r\n\r\n\t\tcolumn.modules.responsive = {order: typeof def.responsive === \"undefined\" ? 1 : def.responsive, visible:def.visible === false ? false : true};\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar el;\r\n\r\n\t\tif(row.type !== \"calc\"){\r\n\t\t\tel = document.createElement(\"div\");\r\n\t\t\tel.classList.add(\"tabulator-responsive-collapse\");\r\n\r\n\t\t\trow.modules.responsiveLayout = {\r\n\t\t\t\telement:el,\r\n\t\t\t\topen:this.collapseStartOpen,\r\n\t\t\t};\r\n\r\n\t\t\tif(!this.collapseStartOpen){\r\n\t\t\t\tel.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tlayoutRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tif(row.modules.responsiveLayout){\r\n\t\t\trowEl.appendChild(row.modules.responsiveLayout.element);\r\n\t\t\tthis.generateCollapsedRowContent(row);\r\n\t\t}\r\n\t}\r\n\r\n\t//update column visibility\r\n\tupdateColumnVisibility(column, responsiveToggle){\r\n\t\tif(!responsiveToggle && column.modules.responsive){\r\n\t\t\tcolumn.modules.responsive.visible = column.visible;\r\n\t\t\tthis.initializeResponsivity();\r\n\t\t}\r\n\t}\r\n\r\n\thideColumn(column){\r\n\t\tvar colCount = this.hiddenColumns.length;\r\n\r\n\t\tcolumn.hide(false, true);\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tthis.hiddenColumns.unshift(column);\r\n\t\t\tthis.generateCollapsedContent();\r\n\r\n\t\t\tif(this.collapseHandleColumn && !colCount){\r\n\t\t\t\tthis.collapseHandleColumn.show();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tshowColumn(column){\r\n\t\tvar index;\r\n\r\n\t\tcolumn.show(false, true);\r\n\t\t//set column width to prevent calculation loops on uninitialized columns\r\n\t\tcolumn.setWidth(column.getWidth());\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tindex = this.hiddenColumns.indexOf(column);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.hiddenColumns.splice(index, 1);\r\n\t\t\t}\r\n\r\n\t\t\tthis.generateCollapsedContent();\r\n\r\n\t\t\tif(this.collapseHandleColumn && !this.hiddenColumns.length){\r\n\t\t\t\tthis.collapseHandleColumn.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//redraw columns to fit space\r\n\tupdate(){\r\n\t\tvar self = this,\r\n\t\tworking = true;\r\n\r\n\t\twhile(working){\r\n\r\n\t\t\tlet width = self.table.modules.layout.getMode() == \"fitColumns\" ? self.table.columnManager.getFlexBaseWidth() : self.table.columnManager.getWidth();\r\n\r\n\t\t\tlet diff = (self.table.options.headerVisible ? self.table.columnManager.element.clientWidth : self.table.element.clientWidth) - width;\r\n\r\n\t\t\tif(diff < 0){\r\n\t\t\t\t//table is too wide\r\n\t\t\t\tlet column = self.columns[self.index];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tself.hideColumn(column);\r\n\t\t\t\t\tself.index ++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tworking = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\r\n\t\t\t\t//table has spare space\r\n\t\t\t\tlet column = self.columns[self.index -1];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tif(diff > 0){\r\n\t\t\t\t\t\tif(diff >= column.getWidth()){\r\n\t\t\t\t\t\t\tself.showColumn(column);\r\n\t\t\t\t\t\t\tself.index --;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tworking = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tworking = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(!self.table.rowManager.activeRowsCount){\r\n\t\t\t\tself.table.rowManager.renderEmptyScroll();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateCollapsedContent(){\r\n\t\tvar self = this,\r\n\t\trows = this.table.rowManager.getDisplayRows();\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\tself.generateCollapsedRowContent(row);\r\n\t\t});\r\n\t}\r\n\r\n\tgenerateCollapsedRowContent(row){\r\n\t\tvar el, contents;\r\n\r\n\t\tif(row.modules.responsiveLayout){\r\n\t\t\tel = row.modules.responsiveLayout.element;\r\n\r\n\t\t\twhile(el.firstChild) el.removeChild(el.firstChild);\r\n\r\n\t\t\tcontents = this.collapseFormatter(this.generateCollapsedRowData(row));\r\n\t\t\tif(contents){\r\n\t\t\t\tel.appendChild(contents);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateCollapsedRowData(row){\r\n\t\tvar self = this,\r\n\t\tdata = row.getData(),\r\n\t\toutput = [],\r\n\t\tmockCellComponent;\r\n\r\n\t\tthis.hiddenColumns.forEach(function(column){\r\n\t\t\tvar value = column.getFieldValue(data);\r\n\r\n\t\t\tif(column.definition.title && column.field){\r\n\t\t\t\tif(column.modules.format && self.table.options.responsiveLayoutCollapseUseFormatters){\r\n\r\n\t\t\t\t\tmockCellComponent = {\r\n\t\t\t\t\t\tvalue:false,\r\n\t\t\t\t\t\tdata:{},\r\n\t\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetData:function(){\r\n\t\t\t\t\t\t\treturn data;\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\t\treturn document.createElement(\"div\");\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\t\treturn row.getComponent();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tfunction onRendered(callback){\r\n\t\t\t\t\t\tcallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\toutput.push({\r\n\t\t\t\t\t\tfield: column.field,\r\n\t\t\t\t\t\ttitle: column.definition.title,\r\n\t\t\t\t\t\tvalue: column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params, onRendered)\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput.push({\r\n\t\t\t\t\t\tfield: column.field,\r\n\t\t\t\t\t\ttitle: column.definition.title,\r\n\t\t\t\t\t\tvalue: value\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tformatCollapsedData(data){\r\n\t\tvar list = document.createElement(\"table\");\r\n\r\n\t\tdata.forEach(function(item){\r\n\t\t\tvar row = document.createElement(\"tr\");\r\n\t\t\tvar titleData = document.createElement(\"td\");\r\n\t\t\tvar valueData = document.createElement(\"td\");\r\n\t\t\tvar node_content;\r\n\r\n\t\t\tvar titleHighlight = document.createElement(\"strong\");\r\n\t\t\ttitleData.appendChild(titleHighlight);\r\n\t\t\tthis.langBind(\"columns|\" + item.field, function(text){\r\n\t\t\t\ttitleHighlight.innerHTML = text || item.title;\r\n\t\t\t});\r\n\r\n\t\t\tif(item.value instanceof Node){\r\n\t\t\t\tnode_content = document.createElement(\"div\");\r\n\t\t\t\tnode_content.appendChild(item.value);\r\n\t\t\t\tvalueData.appendChild(node_content);\r\n\t\t\t}else{\r\n\t\t\t\tvalueData.innerHTML = item.value;\r\n\t\t\t}\r\n\r\n\t\t\trow.appendChild(titleData);\r\n\t\t\trow.appendChild(valueData);\r\n\t\t\tlist.appendChild(row);\r\n\t\t}, this);\r\n\r\n\t\treturn Object.keys(data).length ? list : \"\";\r\n\t}\r\n}\r\n\r\nResponsiveLayout.moduleName = \"responsiveLayout\";\r\n\r\nexport default ResponsiveLayout;","import Module from '../../core/Module.js';\r\n\r\nclass SelectRow extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.selecting = false; //flag selecting in progress\r\n\t\tthis.lastClickedRow = false; //last clicked row\r\n\t\tthis.selectPrev = []; //hold previously selected element for drag drop selection\r\n\t\tthis.selectedRows = []; //hold selected rows\r\n\t\tthis.headerCheckboxElement = null; // hold header select element\r\n\t\t\r\n\t\tthis.registerTableOption(\"selectable\", \"highlight\"); //highlight rows on hover\r\n\t\tthis.registerTableOption(\"selectableRangeMode\", \"drag\"); //highlight rows on hover\r\n\t\tthis.registerTableOption(\"selectableRollingSelection\", true); //roll selection once maximum number of selectable rows is reached\r\n\t\tthis.registerTableOption(\"selectablePersistence\", true); // maintain selection when table view is updated\r\n\t\tthis.registerTableOption(\"selectableCheck\", function(data, row){return true;}); //check wheather row is selectable\r\n\t\t\r\n\t\tthis.registerTableFunction(\"selectRow\", this.selectRows.bind(this));\r\n\t\tthis.registerTableFunction(\"deselectRow\", this.deselectRows.bind(this));\r\n\t\tthis.registerTableFunction(\"toggleSelectRow\", this.toggleRow.bind(this));\r\n\t\tthis.registerTableFunction(\"getSelectedRows\", this.getSelectedRows.bind(this));\r\n\t\tthis.registerTableFunction(\"getSelectedData\", this.getSelectedData.bind(this));\r\n\t\t\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"select\", this.selectRows.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"deselect\", this.deselectRows.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"toggleSelect\", this.toggleRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isSelected\", this.isRowSelected.bind(this));\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.selectable !== false){\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleting\", this.rowDeleted.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.clearSelectionData.bind(this));\r\n\t\t\tthis.subscribe(\"rows-retrieve\", this.rowRetrieve.bind(this));\r\n\t\t\t\r\n\t\t\tif(this.table.options.selectable && !this.table.options.selectablePersistence){\r\n\t\t\t\tthis.subscribe(\"data-refreshing\", this.deselectRows.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trowRetrieve(type, prevValue){\r\n\t\treturn type === \"selected\" ? this.selectedRows : prevValue;\r\n\t}\r\n\t\r\n\trowDeleted(row){\r\n\t\tthis._deselectRow(row, true);\r\n\t}\r\n\t\r\n\tclearSelectionData(silent){\r\n\t\tthis.selecting = false;\r\n\t\tthis.lastClickedRow = false;\r\n\t\tthis.selectPrev = [];\r\n\t\tthis.selectedRows = [];\r\n\t\t\r\n\t\tif(silent !== true){\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\telement = row.getElement();\r\n\t\t\r\n\t\t// trigger end of row selection\r\n\t\tvar endSelect = function(){\r\n\t\t\t\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tself.selecting = false;\r\n\t\t\t}, 50);\r\n\t\t\t\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", endSelect);\r\n\t\t};\r\n\t\t\r\n\t\trow.modules.select = {selected:false};\r\n\t\t\r\n\t\t//set row selection class\r\n\t\tif(self.table.options.selectableCheck.call(this.table, row.getComponent())){\r\n\t\t\telement.classList.add(\"tabulator-selectable\");\r\n\t\t\telement.classList.remove(\"tabulator-unselectable\");\r\n\t\t\t\r\n\t\t\tif(self.table.options.selectable && self.table.options.selectable != \"highlight\"){\r\n\t\t\t\tif(self.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\telement.addEventListener(\"click\", this.handleComplexRowClick.bind(this, row));\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.addEventListener(\"click\", function(e){\r\n\t\t\t\t\t\tif(!self.table.modExists(\"edit\") || !self.table.modules.edit.getCurrentCell()){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(!self.selecting){\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\t\t\tif(e.shiftKey){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.selecting = true;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.selectPrev = [];\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tdocument.body.addEventListener(\"mouseup\", endSelect);\r\n\t\t\t\t\t\t\tdocument.body.addEventListener(\"keyup\", endSelect);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mouseenter\", function(e){\r\n\t\t\t\t\t\tif(self.selecting){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(self.selectPrev[1] == row){\r\n\t\t\t\t\t\t\t\tself.toggleRow(self.selectPrev[0]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mouseout\", function(e){\r\n\t\t\t\t\t\tif(self.selecting){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\tself.selectPrev.unshift(row);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\telement.classList.add(\"tabulator-unselectable\");\r\n\t\t\telement.classList.remove(\"tabulator-selectable\");\r\n\t\t}\r\n\t}\r\n\t\r\n\thandleComplexRowClick(row, e){\r\n\t\tif(e.shiftKey){\r\n\t\t\tthis.table._clearSelection();\r\n\t\t\tthis.lastClickedRow = this.lastClickedRow || row;\r\n\t\t\t\r\n\t\t\tvar lastClickedRowIdx = this.table.rowManager.getDisplayRowIndex(this.lastClickedRow);\r\n\t\t\tvar rowIdx = this.table.rowManager.getDisplayRowIndex(row);\r\n\t\t\t\r\n\t\t\tvar fromRowIdx = lastClickedRowIdx <= rowIdx ? lastClickedRowIdx : rowIdx;\r\n\t\t\tvar toRowIdx = lastClickedRowIdx >= rowIdx ? lastClickedRowIdx : rowIdx;\r\n\t\t\t\r\n\t\t\tvar rows = this.table.rowManager.getDisplayRows().slice(0);\r\n\t\t\tvar toggledRows = rows.splice(fromRowIdx, toRowIdx - fromRowIdx + 1);\r\n\t\t\t\r\n\t\t\tif(e.ctrlKey || e.metaKey){\r\n\t\t\t\ttoggledRows.forEach((toggledRow)=>{\r\n\t\t\t\t\tif(toggledRow !== this.lastClickedRow){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.table.options.selectable !== true && !this.isRowSelected(row)){\r\n\t\t\t\t\t\t\tif(this.selectedRows.length < this.table.options.selectable){\r\n\t\t\t\t\t\t\t\tthis.toggleRow(toggledRow);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.toggleRow(toggledRow);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tthis.lastClickedRow = row;\r\n\t\t\t}else{\r\n\t\t\t\tthis.deselectRows(undefined, true);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.selectable !== true){\r\n\t\t\t\t\tif(toggledRows.length > this.table.options.selectable){\r\n\t\t\t\t\t\ttoggledRows = toggledRows.slice(0, this.table.options.selectable)\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.selectRows(toggledRows);\r\n\t\t\t}\r\n\t\t\tthis.table._clearSelection();\r\n\t\t}\r\n\t\telse if(e.ctrlKey || e.metaKey){\r\n\t\t\tthis.toggleRow(row);\r\n\t\t\tthis.lastClickedRow = row;\r\n\t\t}else{\r\n\t\t\tthis.deselectRows(undefined, true);\r\n\t\t\tthis.selectRows(row);\r\n\t\t\tthis.lastClickedRow = row;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//toggle row selection\r\n\ttoggleRow(row){\r\n\t\tif(this.table.options.selectableCheck.call(this.table, row.getComponent())){\r\n\t\t\tif(row.modules.select && row.modules.select.selected){\r\n\t\t\t\tthis._deselectRow(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis._selectRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//select a number of rows\r\n\tselectRows(rows){\r\n\t\tvar rowMatch;\r\n\t\t\r\n\t\tswitch(typeof rows){\r\n\t\t\tcase \"undefined\":\r\n\t\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"string\":\r\n\t\t\t\r\n\t\t\trowMatch = this.table.rowManager.findRow(rows);\r\n\t\t\t\r\n\t\t\tif(rowMatch){\r\n\t\t\t\tthis._selectRow(rowMatch, true, true);\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.rowManager.getRows(rows).forEach((row) => {\r\n\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\tif(Array.isArray(rows)){\r\n\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis._rowSelectionChanged();\r\n\t\t\t}else{\r\n\t\t\t\tthis._selectRow(rows, false, true);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//select an individual row\r\n\t_selectRow(rowInfo, silent, force){\r\n\t\tvar index;\r\n\t\t\r\n\t\t//handle max row count\r\n\t\tif(!isNaN(this.table.options.selectable) && this.table.options.selectable !== true && !force){\r\n\t\t\tif(this.selectedRows.length >= this.table.options.selectable){\r\n\t\t\t\tif(this.table.options.selectableRollingSelection){\r\n\t\t\t\t\tthis._deselectRow(this.selectedRows[0]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tvar row = this.table.rowManager.findRow(rowInfo);\r\n\t\t\r\n\t\tif(row){\r\n\t\t\tif(this.selectedRows.indexOf(row) == -1){\r\n\t\t\t\trow.getElement().classList.add(\"tabulator-selected\");\r\n\t\t\t\tif(!row.modules.select){\r\n\t\t\t\t\trow.modules.select = {};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\trow.modules.select.selected = true;\r\n\t\t\t\tif(row.modules.select.checkboxEl){\r\n\t\t\t\t\trow.modules.select.checkboxEl.checked = true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.selectedRows.push(row);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.dataTreeSelectPropagate){\r\n\t\t\t\t\tthis.childRowSelection(row, true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatchExternal(\"rowSelected\", row.getComponent());\r\n\t\t\t\t\r\n\t\t\t\tthis._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Selection Error - No such row found, ignoring selection:\" + rowInfo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tisRowSelected(row){\r\n\t\treturn this.selectedRows.indexOf(row) !== -1;\r\n\t}\r\n\t\r\n\t//deselect a number of rows\r\n\tdeselectRows(rows, silent){\r\n\t\tvar self = this,\r\n\t\trowCount;\r\n\t\t\r\n\t\tif(typeof rows == \"undefined\"){\r\n\t\t\t\r\n\t\t\trowCount = self.selectedRows.length;\r\n\t\t\t\r\n\t\t\tfor(let i = 0; i < rowCount; i++){\r\n\t\t\t\tself._deselectRow(self.selectedRows[0], true);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(rowCount){\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tif(Array.isArray(rows)){\r\n\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\tself._deselectRow(row, true);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}else{\r\n\t\t\t\tself._deselectRow(rows, silent);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//deselect an individual row\r\n\t_deselectRow(rowInfo, silent){\r\n\t\tvar self = this,\r\n\t\trow = self.table.rowManager.findRow(rowInfo),\r\n\t\tindex;\r\n\t\t\r\n\t\tif(row){\r\n\t\t\tindex = self.selectedRows.findIndex(function(selectedRow){\r\n\t\t\t\treturn selectedRow == row;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\t\r\n\t\t\t\trow.getElement().classList.remove(\"tabulator-selected\");\r\n\t\t\t\tif(!row.modules.select){\r\n\t\t\t\t\trow.modules.select = {};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\trow.modules.select.selected = false;\r\n\t\t\t\tif(row.modules.select.checkboxEl){\r\n\t\t\t\t\trow.modules.select.checkboxEl.checked = false;\r\n\t\t\t\t}\r\n\t\t\t\tself.selectedRows.splice(index, 1);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.dataTreeSelectPropagate){\r\n\t\t\t\t\tthis.childRowSelection(row, false);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatchExternal(\"rowDeselected\", row.getComponent());\r\n\t\t\t\t\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Deselection Error - No such row found, ignoring selection:\" + rowInfo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSelectedData(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tthis.selectedRows.forEach(function(row){\r\n\t\t\tdata.push(row.getData());\r\n\t\t});\r\n\t\t\r\n\t\treturn data;\r\n\t}\r\n\t\r\n\tgetSelectedRows(){\r\n\t\t\r\n\t\tvar rows = [];\r\n\t\t\r\n\t\tthis.selectedRows.forEach(function(row){\r\n\t\t\trows.push(row.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t_rowSelectionChanged(silent){\r\n\t\tif(this.headerCheckboxElement){\r\n\t\t\tif(this.selectedRows.length === 0){\r\n\t\t\t\tthis.headerCheckboxElement.checked = false;\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = false;\r\n\t\t\t} else if(this.table.rowManager.rows.length === this.selectedRows.length){\r\n\t\t\t\tthis.headerCheckboxElement.checked = true;\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = false;\r\n\t\t\t} else {\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = true;\r\n\t\t\t\tthis.headerCheckboxElement.checked = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(!silent){\r\n\t\t\tthis.dispatchExternal(\"rowSelectionChanged\", this.getSelectedData(), this.getSelectedRows());\r\n\t\t}\r\n\t}\r\n\t\r\n\tregisterRowSelectCheckbox (row, element) {\r\n\t\tif(!row._row.modules.select){\r\n\t\t\trow._row.modules.select = {};\r\n\t\t}\r\n\t\t\r\n\t\trow._row.modules.select.checkboxEl = element;\r\n\t}\r\n\t\r\n\tregisterHeaderSelectCheckbox (element) {\r\n\t\tthis.headerCheckboxElement = element;\r\n\t}\r\n\t\r\n\tchildRowSelection(row, select){\r\n\t\tvar children = this.table.modules.dataTree.getChildren(row, true);\r\n\t\t\r\n\t\tif(select){\r\n\t\t\tfor(let child of children){\r\n\t\t\t\tthis._selectRow(child, true);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tfor(let child of children){\r\n\t\t\t\tthis._deselectRow(child, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nSelectRow.moduleName = \"selectRow\";\r\n\r\nexport default SelectRow;","//sort numbers\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar decimal = params.decimalSeparator;\r\n\tvar thousand = params.thousandSeparator;\r\n\tvar emptyAlign = 0;\r\n\r\n\ta = String(a);\r\n\tb = String(b);\r\n\r\n\tif(thousand){\r\n\t\ta = a.split(thousand).join(\"\");\r\n\t\tb = b.split(thousand).join(\"\");\r\n\t}\r\n\r\n\tif(decimal){\r\n\t\ta = a.split(decimal).join(\".\");\r\n\t\tb = b.split(decimal).join(\".\");\r\n\t}\r\n\r\n\ta = parseFloat(a);\r\n\tb = parseFloat(b);\r\n\r\n\t//handle non numeric values\r\n\tif(isNaN(a)){\r\n\t\temptyAlign = isNaN(b) ? 0 : -1;\r\n\t}else if(isNaN(b)){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\t\t//compare valid values\r\n\t\treturn a - b;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","//sort strings\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\tvar locale;\r\n\r\n\t//handle empty values\r\n\tif(!a){\r\n\t\temptyAlign = !b ? 0 : -1;\r\n\t}else if(!b){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\t\t//compare valid values\r\n\t\tswitch(typeof params.locale){\r\n\t\t\tcase \"boolean\":\r\n\t\t\tif(params.locale){\r\n\t\t\t\tlocale = this.langLocale();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"string\":\r\n\t\t\tlocale = params.locale;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn String(a).toLowerCase().localeCompare(String(b).toLowerCase(), locale);\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","//sort datetime\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar format = params.format || \"dd/MM/yyyy HH:mm:ss\",\r\n\talignEmptyValues = params.alignEmptyValues,\r\n\temptyAlign = 0;\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\ta = format === \"iso\" ? DT.fromISO(String(a)) : DT.fromFormat(String(a), format);\r\n\t\tb = format === \"iso\" ? DT.fromISO(String(b)) : DT.fromFormat(String(b), format);\r\n\r\n\t\tif(!a.isValid){\r\n\t\t\temptyAlign = !b.isValid ? 0 : -1;\r\n\t\t}else if(!b.isValid){\r\n\t\t\temptyAlign = 1;\r\n\t\t}else{\r\n\t\t\t//compare valid values\r\n\t\t\treturn a - b;\r\n\t\t}\r\n\r\n\t\t//fix empty values in position\r\n\t\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\t\temptyAlign *= -1;\r\n\t\t}\r\n\r\n\t\treturn emptyAlign;\r\n\r\n\t}else{\r\n\t\tconsole.error(\"Sort Error - 'datetime' sorter is dependant on luxon.js\");\r\n\t}\r\n};","import datetime from './datetime.js';\r\n\r\n//sort date\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tif(!params.format){\r\n\t\tparams.format = \"dd/MM/yyyy\";\r\n\t}\r\n\r\n\treturn datetime.call(this, a, b, aRow, bRow, column, dir, params);\r\n};","import datetime from './datetime.js';\r\n\r\n//sort times\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tif(!params.format){\r\n\t\tparams.format = \"HH:mm\";\r\n\t}\r\n\r\n\treturn datetime.call(this, a, b, aRow, bRow, column, dir, params);\r\n};","//sort booleans\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = a === true || a === \"true\" || a === \"True\" || a === 1 ? 1 : 0;\r\n\tvar el2 = b === true || b === \"true\" || b === \"True\" || b === 1 ? 1 : 0;\r\n\r\n\treturn el1 - el2;\r\n};","//sort if element contains any data\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = 0;\r\n\tvar el2 = 0;\r\n\tvar type = params.type || \"length\";\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\r\n\tfunction calc(value){\r\n\r\n\t\tswitch(type){\r\n\t\t\tcase \"length\":\r\n\t\t\treturn value.length;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"sum\":\r\n\t\t\treturn value.reduce(function(c, d){\r\n\t\t\t\treturn c + d;\r\n\t\t\t});\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"max\":\r\n\t\t\treturn Math.max.apply(null, value) ;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"min\":\r\n\t\t\treturn Math.min.apply(null, value) ;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"avg\":\r\n\t\t\treturn value.reduce(function(c, d){\r\n\t\t\t\treturn c + d;\r\n\t\t\t}) / value.length;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t//handle non array values\r\n\tif(!Array.isArray(a)){\r\n\t\talignEmptyValues = !Array.isArray(b) ? 0 : -1;\r\n\t}else if(!Array.isArray(b)){\r\n\t\talignEmptyValues = 1;\r\n\t}else{\r\n\r\n\t\t//compare valid values\r\n\t\tel1 = a ? calc(a) : 0;\r\n\t\tel2 = b ? calc(b) : 0;\r\n\r\n\t\treturn el1 - el2;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","//sort if element contains any data\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = typeof a == \"undefined\" ? 0 : 1;\r\n\tvar el2 = typeof b == \"undefined\" ? 0 : 1;\r\n\r\n\treturn el1 - el2;\r\n};","//sort alpha numeric strings\r\nexport default function(as, bs, aRow, bRow, column, dir, params){\r\n\tvar a, b, a1, b1, i= 0, L, rx = /(\\d+)|(\\D+)/g, rd = /\\d/;\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\r\n\t//handle empty values\r\n\tif(!as && as!== 0){\r\n\t\temptyAlign = !bs && bs!== 0 ? 0 : -1;\r\n\t}else if(!bs && bs!== 0){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\r\n\t\tif(isFinite(as) && isFinite(bs)) return as - bs;\r\n\t\ta = String(as).toLowerCase();\r\n\t\tb = String(bs).toLowerCase();\r\n\t\tif(a === b) return 0;\r\n\t\tif(!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1;\r\n\t\ta = a.match(rx);\r\n\t\tb = b.match(rx);\r\n\t\tL = a.length > b.length ? b.length : a.length;\r\n\t\twhile(i < L){\r\n\t\t\ta1= a[i];\r\n\t\t\tb1= b[i++];\r\n\t\t\tif(a1 !== b1){\r\n\t\t\t\tif(isFinite(a1) && isFinite(b1)){\r\n\t\t\t\t\tif(a1.charAt(0) === \"0\") a1 = \".\" + a1;\r\n\t\t\t\t\tif(b1.charAt(0) === \"0\") b1 = \".\" + b1;\r\n\t\t\t\t\treturn a1 - b1;\r\n\t\t\t\t}\r\n\t\t\t\telse return a1 > b1 ? 1 : -1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn a.length > b.length;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","import number from './sorters/number.js';\r\nimport string from './sorters/string.js';\r\nimport date from './sorters/date.js';\r\nimport time from './sorters/time.js';\r\nimport datetime from './sorters/datetime.js';\r\nimport boolean from './sorters/boolean.js';\r\nimport array from './sorters/array.js';\r\nimport exists from './sorters/exists.js';\r\nimport alphanum from './sorters/alphanum.js';\r\n\r\nexport default {\r\n\tnumber:number,\r\n\tstring:string,\r\n\tdate:date,\r\n\ttime:time,\r\n\tdatetime:datetime,\r\n\tboolean:boolean,\r\n\tarray:array,\r\n\texists:exists,\r\n\talphanum:alphanum\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultSorters from './defaults/sorters.js';\r\n\r\nclass Sort extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t \tthis.sortList = []; //holder current sort\r\n\t \tthis.changed = false; //has the sort changed since last render\r\n\r\n\t \tthis.registerTableOption(\"sortMode\", \"local\"); //local or remote sorting\r\n\r\n\t \tthis.registerTableOption(\"initialSort\", false); //initial sorting criteria\r\n\t \tthis.registerTableOption(\"columnHeaderSortMulti\", true); //multiple or single column sorting\r\n\t \tthis.registerTableOption(\"sortOrderReverse\", false); //reverse internal sort ordering\r\n\t \tthis.registerTableOption(\"headerSortElement\", \"
\"); //header sort element\r\n\r\n\t \tthis.registerColumnOption(\"sorter\");\r\n\t \tthis.registerColumnOption(\"sorterParams\");\r\n\r\n\t \tthis.registerColumnOption(\"headerSort\", true);\r\n\t \tthis.registerColumnOption(\"headerSortStartingDir\");\r\n\t \tthis.registerColumnOption(\"headerSortTristate\");\r\n\r\n\t }\r\n\r\n\t initialize(){\r\n\t \tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t \tthis.subscribe(\"table-built\", this.tableBuilt.bind(this));\r\n\t \tthis.registerDataHandler(this.sort.bind(this), 20);\r\n\r\n\t \tthis.registerTableFunction(\"setSort\", this.userSetSort.bind(this));\r\n\t \tthis.registerTableFunction(\"getSorters\", this.getSort.bind(this));\r\n\t \tthis.registerTableFunction(\"clearSort\", this.clearSort.bind(this));\r\n\r\n\t \tif(this.table.options.sortMode === \"remote\"){\r\n\t \t\tthis.subscribe(\"data-params\", this.remoteSortParams.bind(this));\r\n\t \t}\r\n\t }\r\n\r\n\t tableBuilt(){\r\n\t \tif(this.table.options.initialSort){\r\n\t \t\tthis.setSort(this.table.options.initialSort);\r\n\t \t}\r\n\t }\r\n\r\n\t remoteSortParams(data, config, silent, params){\r\n\t \tvar sorters = this.getSort();\r\n\r\n\t \tsorters.forEach((item) => {\r\n\t \t\tdelete item.column;\r\n\t \t});\r\n\r\n\t \tparams.sort = sorters;\r\n\r\n\t \treturn params;\r\n\t }\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tuserSetSort(sortList, dir){\r\n\t\tthis.setSort(sortList, dir);\r\n\t\t// this.table.rowManager.sorterRefresh();\r\n\t\tthis.refreshSort();\r\n\t}\r\n\r\n\tclearSort(){\r\n\t\tthis.clear();\r\n\t\t// this.table.rowManager.sorterRefresh();\r\n\t\tthis.refreshSort();\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\t//initialize column header for sorting\r\n\tinitializeColumn(column){\r\n\t\tvar sorter = false,\r\n\t\tcolEl,\r\n\t\tarrowEl;\r\n\r\n\t\tswitch(typeof column.definition.sorter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Sort.sorters[column.definition.sorter]){\r\n\t\t\t\tsorter = Sort.sorters[column.definition.sorter];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Sort Error - No such sorter found: \", column.definition.sorter);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tsorter = column.definition.sorter;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tcolumn.modules.sort = {\r\n\t\t\tsorter:sorter, dir:\"none\",\r\n\t\t\tparams:column.definition.sorterParams || {},\r\n\t\t\tstartingDir:column.definition.headerSortStartingDir || \"asc\",\r\n\t\t\ttristate: column.definition.headerSortTristate,\r\n\t\t};\r\n\r\n\t\tif(column.definition.headerSort !== false){\r\n\r\n\t\t\tcolEl = column.getElement();\r\n\r\n\t\t\tcolEl.classList.add(\"tabulator-sortable\");\r\n\r\n\r\n\t\t\tarrowEl = document.createElement(\"div\");\r\n\t\t\tarrowEl.classList.add(\"tabulator-col-sorter\");\r\n\r\n\t\t\tif(typeof this.table.options.headerSortElement == \"object\"){\r\n\t\t\t\tarrowEl.appendChild(this.table.options.headerSortElement);\r\n\t\t\t}else{\r\n\t\t\t\tarrowEl.innerHTML = this.table.options.headerSortElement;\r\n\t\t\t}\r\n\r\n\t\t\t//create sorter arrow\r\n\t\t\tcolumn.titleHolderElement.appendChild(arrowEl);\r\n\r\n\t\t\tcolumn.modules.sort.element = arrowEl;\r\n\r\n\t\t\t//sort on click\r\n\t\t\tcolEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\tvar dir = \"\",\r\n\t\t\t\tsorters=[],\r\n\t\t\t\tmatch = false;\r\n\r\n\t\t\t\tif(column.modules.sort){\r\n\t\t\t\t\tif(column.modules.sort.tristate){\r\n\t\t\t\t\t\tif(column.modules.sort.dir == \"none\"){\r\n\t\t\t\t\t\t\tdir = column.modules.sort.startingDir;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(column.modules.sort.dir == column.modules.sort.startingDir){\r\n\t\t\t\t\t\t\t\tdir = column.modules.sort.dir == \"asc\" ? \"desc\" : \"asc\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tdir = \"none\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswitch(column.modules.sort.dir){\r\n\t\t\t\t\t\t\tcase \"asc\":\r\n\t\t\t\t\t\t\tdir = \"desc\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tcase \"desc\":\r\n\t\t\t\t\t\t\tdir = \"asc\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tdir = column.modules.sort.startingDir;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\tif (this.table.options.columnHeaderSortMulti && (e.shiftKey || e.ctrlKey)) {\r\n\t\t\t\t\t\tsorters = this.getSort();\r\n\r\n\t\t\t\t\t\tmatch = sorters.findIndex((sorter) => {\r\n\t\t\t\t\t\t\treturn sorter.field === column.getField();\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tif(match > -1){\r\n\t\t\t\t\t\t\tsorters[match].dir = dir;\r\n\r\n\t\t\t\t\t\t\tif(match != sorters.length -1){\r\n\t\t\t\t\t\t\t\tmatch = sorters.splice(match, 1)[0];\r\n\t\t\t\t\t\t\t\tif(dir != \"none\"){\r\n\t\t\t\t\t\t\t\t\tsorters.push(match);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(dir != \"none\"){\r\n\t\t\t\t\t\t\t\tsorters.push({column:column, dir:dir});\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t//add to existing sort\r\n\t\t\t\t\t\tthis.setSort(sorters);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(dir == \"none\"){\r\n\t\t\t\t\t\t\tthis.clear();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t//sort by column only\r\n\t\t\t\t\t\t\tthis.setSort(column, dir);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// this.table.rowManager.sorterRefresh(!this.sortList.length);\r\n\t\t\t\t\tthis.refreshSort();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\trefreshSort(){\r\n\t\tif(this.table.options.sortMode === \"remote\"){\r\n\t\t\tthis.reloadData();\r\n\t\t}else{\r\n\t\t\tthis.refreshData(true);\r\n\t\t}\r\n\r\n\t\t//TODO - Persist left position of row manager\r\n\t\t// left = this.scrollLeft;\r\n\t\t// this.scrollHorizontal(left);\r\n\t}\r\n\r\n\t//check if the sorters have changed since last use\r\n\thasChanged(){\r\n\t\tvar changed = this.changed;\r\n\t\tthis.changed = false;\r\n\t\treturn changed;\r\n\t}\r\n\r\n\t//return current sorters\r\n\tgetSort(){\r\n\t\tvar self = this,\r\n\t\tsorters = [];\r\n\r\n\t\tself.sortList.forEach(function(item){\r\n\t\t\tif(item.column){\r\n\t\t\t\tsorters.push({column:item.column.getComponent(), field:item.column.getField(), dir:item.dir});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn sorters;\r\n\t}\r\n\r\n\t//change sort list and trigger sort\r\n\tsetSort(sortList, dir){\r\n\t\tvar self = this,\r\n\t\tnewSortList = [];\r\n\r\n\t\tif(!Array.isArray(sortList)){\r\n\t\t\tsortList = [{column: sortList, dir:dir}];\r\n\t\t}\r\n\r\n\t\tsortList.forEach(function(item){\r\n\t\t\tvar column;\r\n\r\n\t\t\tcolumn = self.table.columnManager.findColumn(item.column);\r\n\r\n\t\t\tif(column){\r\n\t\t\t\titem.column = column;\r\n\t\t\t\tnewSortList.push(item);\r\n\t\t\t\tself.changed = true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Sort Warning - Sort field does not exist and is being ignored: \", item.column);\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\t\tself.sortList = newSortList;\r\n\r\n\t\tthis.dispatch(\"sort-changed\");\r\n\t}\r\n\r\n\t//clear sorters\r\n\tclear(){\r\n\t\tthis.setSort([]);\r\n\t}\r\n\r\n\t//find appropriate sorter for column\r\n\tfindSorter(column){\r\n\t\tvar row = this.table.rowManager.activeRows[0],\r\n\t\tsorter = \"string\",\r\n\t\tfield, value;\r\n\r\n\t\tif(row){\r\n\t\t\trow = row.getData();\r\n\t\t\tfield = column.getField();\r\n\r\n\t\t\tif(field){\r\n\r\n\t\t\t\tvalue = column.getFieldValue(row);\r\n\r\n\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){\r\n\t\t\t\t\t\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn Sort.sorters[sorter];\r\n\t}\r\n\r\n\t//work through sort list sorting data\r\n\tsort(data){\r\n\t\tvar self = this,\r\n\t\tsortList = this.table.options.sortOrderReverse ? self.sortList.slice().reverse() : self.sortList,\r\n\t\tsortListActual = [],\r\n\t\trowComponents = [],\r\n\t\tlastSort;\r\n\r\n\t\tif(this.subscribedExternal(\"dataSorting\")){\r\n\t\t\tthis.dispatchExternal(\"dataSorting\", self.getSort());\r\n\t\t}\r\n\r\n\t\tself.clearColumnHeaders();\r\n\r\n\t\tif(this.table.options.sortMode !== \"remote\"){\r\n\r\n\t\t\t//build list of valid sorters and trigger column specific callbacks before sort begins\r\n\t\t\tsortList.forEach(function(item, i){\r\n\t\t\t\tvar sortObj = item.column.modules.sort;\r\n\r\n\t\t\t\tif(item.column && sortObj){\r\n\r\n\t\t\t\t\t//if no sorter has been defined, take a guess\r\n\t\t\t\t\tif(!sortObj.sorter){\r\n\t\t\t\t\t\tsortObj.sorter = self.findSorter(item.column);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\titem.params = typeof sortObj.params === \"function\" ? sortObj.params(item.column.getComponent(), item.dir) : sortObj.params;\r\n\r\n\t\t\t\t\tsortListActual.push(item);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tself.setColumnHeader(item.column, item.dir);\r\n\t\t\t});\r\n\r\n\t\t\t//sort data\r\n\t\t\tif (sortListActual.length) {\r\n\t\t\t\tself._sortItems(data, sortListActual);\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tsortList.forEach(function(item, i){\r\n\t\t\t\tself.setColumnHeader(item.column, item.dir);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.subscribedExternal(\"dataSorted\")){\r\n\t\t\tdata.forEach((row) => {\r\n\t\t\t\trowComponents.push(row.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatchExternal(\"dataSorted\", self.getSort(), rowComponents);\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//clear sort arrows on columns\r\n\tclearColumnHeaders(){\r\n\t\tthis.table.columnManager.getRealColumns().forEach(function(column){\r\n\t\t\tif(column.modules.sort){\r\n\t\t\t\tcolumn.modules.sort.dir = \"none\";\r\n\t\t\t\tcolumn.getElement().setAttribute(\"aria-sort\", \"none\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//set the column header sort direction\r\n\tsetColumnHeader(column, dir){\r\n\t\tcolumn.modules.sort.dir = dir;\r\n\t\tcolumn.getElement().setAttribute(\"aria-sort\", dir);\r\n\t}\r\n\r\n\t//sort each item in sort list\r\n\t_sortItems(data, sortList){\r\n\t\tvar sorterCount = sortList.length - 1;\r\n\r\n\t\tdata.sort((a, b) => {\r\n\t\t\tvar result;\r\n\r\n\t\t\tfor(var i = sorterCount; i>= 0; i--){\r\n\t\t\t\tlet sortItem = sortList[i];\r\n\r\n\t\t\t\tresult = this._sortRow(a, b, sortItem.column, sortItem.dir, sortItem.params);\r\n\r\n\t\t\t\tif(result !== 0){\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn result;\r\n\t\t});\r\n\t}\r\n\r\n\t//process individual rows for a sort function on active data\r\n\t_sortRow(a, b, column, dir, params){\r\n\t\tvar el1Comp, el2Comp, colComp;\r\n\r\n\t\t//switch elements depending on search direction\r\n\t\tvar el1 = dir == \"asc\" ? a : b;\r\n\t\tvar el2 = dir == \"asc\" ? b : a;\r\n\r\n\t\ta = column.getFieldValue(el1.getData());\r\n\t\tb = column.getFieldValue(el2.getData());\r\n\r\n\t\ta = typeof a !== \"undefined\" ? a : \"\";\r\n\t\tb = typeof b !== \"undefined\" ? b : \"\";\r\n\r\n\t\tel1Comp = el1.getComponent();\r\n\t\tel2Comp = el2.getComponent();\r\n\r\n\t\treturn column.modules.sort.sorter.call(this, a, b, el1Comp, el2Comp, column.getComponent(), dir, params);\r\n\t}\r\n}\r\n\r\nSort.moduleName = \"sort\";\r\n\r\n//load defaults\r\nSort.sorters = defaultSorters;\r\n\r\nexport default Sort;","export default {\r\n\t//is integer\r\n\tinteger: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvalue = Number(value);\r\n\t\treturn typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\r\n\t},\r\n\r\n\t//is float\r\n\tfloat: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvalue = Number(value);\r\n\t\treturn typeof value === 'number' && isFinite(value) && value % 1 !== 0;\r\n\t},\r\n\r\n\t//must be a number\r\n\tnumeric: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn !isNaN(value);\r\n\t},\r\n\r\n\t//must be a string\r\n\tstring: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn isNaN(value);\r\n\t},\r\n\r\n\t//maximum value\r\n\tmax: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn parseFloat(value) <= parameters;\r\n\t},\r\n\r\n\t//minimum value\r\n\tmin: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn parseFloat(value) >= parameters;\r\n\t},\r\n\r\n\t//starts with value\r\n\tstarts: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).toLowerCase().startsWith(String(parameters).toLowerCase());\r\n\t},\r\n\r\n\t//ends with value\r\n\tends: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).toLowerCase().endsWith(String(parameters).toLowerCase());\r\n\t},\r\n\r\n\r\n\t//minimum string length\r\n\tminLength: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).length >= parameters;\r\n\t},\r\n\r\n\t//maximum string length\r\n\tmaxLength: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).length <= parameters;\r\n\t},\r\n\r\n\t//in provided value list\r\n\tin: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif(typeof parameters == \"string\"){\r\n\t\t\tparameters = parameters.split(\"|\");\r\n\t\t}\r\n\r\n\t\treturn value === \"\" || parameters.indexOf(value) > -1;\r\n\t},\r\n\r\n\t//must match provided regex\r\n\tregex: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar reg = new RegExp(parameters);\r\n\r\n\t\treturn reg.test(value);\r\n\t},\r\n\r\n\t//value must be unique in this column\r\n\tunique: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar unique = true;\r\n\r\n\t\tvar cellData = cell.getData();\r\n\t\tvar column = cell.getColumn()._getSelf();\r\n\r\n\t\tthis.table.rowManager.rows.forEach(function(row){\r\n\t\t\tvar data = row.getData();\r\n\r\n\t\t\tif(data !== cellData){\r\n\t\t\t\tif(value == column.getFieldValue(data)){\r\n\t\t\t\t\tunique = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn unique;\r\n\t},\r\n\r\n\t//must have a value\r\n\trequired:function(cell, value, parameters){\r\n\t\treturn value !== \"\" && value !== null && typeof value !== \"undefined\";\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultValidators from './defaults/validators.js';\r\n\r\nclass Validate extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.invalidCells = [];\r\n\r\n\t\tthis.registerTableOption(\"validationMode\", \"blocking\");\r\n\r\n\t\tthis.registerColumnOption(\"validator\");\r\n\r\n\t\tthis.registerTableFunction(\"getInvalidCells\", this.getInvalidCells.bind(this));\r\n\t\tthis.registerTableFunction(\"clearCellValidation\", this.userClearCellValidation.bind(this));\r\n\t\tthis.registerTableFunction(\"validate\", this.userValidate.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"isValid\", this.cellIsValid.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"clearValidation\", this.clearValidation.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"validate\", this.cellValidate.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"column\", \"validate\", this.columnValidate.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"validate\", this.rowValidate.bind(this));\r\n\t}\r\n\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-delete\", this.clearValidation.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumnCheck.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Cell Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tcellIsValid(cell){\r\n\t\treturn cell.modules.validate ? !cell.modules.validate.invalid : true;\r\n\t}\r\n\r\n\tcellValidate(cell){\r\n\t\treturn this.validate(cell.column.modules.validate, cell, cell.getValue());\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Column Functions ////////\r\n\t///////////////////////////////////\r\n\r\n\tcolumnValidate(column){\r\n\t\tvar invalid = [];\r\n\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tif(!this.cellValidate(cell)){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Row Functions //////////\r\n\t///////////////////////////////////\r\n\r\n\trowValidate(row){\r\n\t\tvar invalid = [];\r\n\r\n\t\trow.cells.forEach((cell) => {\r\n\t\t\tif(!this.cellValidate(cell)){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\r\n\tuserClearCellValidation(cells){\r\n\t\tif(!cells){\r\n\t\t\tcells = this.getInvalidCells();\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\r\n\t\tcells.forEach((cell) => {\r\n\t\t\tthis.clearValidation(cell._getSelf());\r\n\t\t});\r\n\t}\r\n\r\n\tuserValidate(cells){\r\n\t\tvar output = [];\r\n\r\n\t\t//clear row data\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\trow = row.getComponent();\r\n\r\n\t\t\tvar valid = row.validate();\r\n\r\n\t\t\tif(valid !== true){\r\n\t\t\t\toutput = output.concat(valid);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output.length ? output : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(typeof column.definition.validator !== \"undefined\"){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//validate\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = [],\r\n\t\tvalidator;\r\n\r\n\t\tif(column.definition.validator){\r\n\r\n\t\t\tif(Array.isArray(column.definition.validator)){\r\n\t\t\t\tcolumn.definition.validator.forEach((item) => {\r\n\t\t\t\t\tvalidator = self._extractValidator(item);\r\n\r\n\t\t\t\t\tif(validator){\r\n\t\t\t\t\t\tconfig.push(validator);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t}else{\r\n\t\t\t\tvalidator = this._extractValidator(column.definition.validator);\r\n\r\n\t\t\t\tif(validator){\r\n\t\t\t\t\tconfig.push(validator);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.modules.validate = config.length ? config : false;\r\n\t\t}\r\n\t}\r\n\r\n\t_extractValidator(value){\r\n\t\tvar type, params, pos;\r\n\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tpos = value.indexOf(':');\r\n\r\n\t\t\tif(pos > -1){\r\n\t\t\t\ttype = value.substring(0,pos);\r\n\t\t\t\tparams = value.substring(pos+1);\r\n\t\t\t}else{\r\n\t\t\t\ttype = value;\r\n\t\t\t}\r\n\r\n\t\t\treturn this._buildValidator(type, params);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\treturn this._buildValidator(value);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"object\":\r\n\t\t\treturn this._buildValidator(value.type, value.parameters);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t_buildValidator(type, params){\r\n\r\n\t\tvar func = typeof type == \"function\" ? type : Validate.validators[type];\r\n\r\n\t\tif(!func){\r\n\t\t\tconsole.warn(\"Validator Setup Error - No matching validator found:\", type);\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn {\r\n\t\t\t\ttype:typeof type == \"function\" ? \"function\" : type,\r\n\t\t\t\tfunc:func,\r\n\t\t\t\tparams:params,\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\tvalidate(validators, cell, value){\r\n\t\tvar self = this,\r\n\t\tvalid = [],\r\n\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\r\n\t\tif(validators){\r\n\t\t\tvalidators.forEach((item) => {\r\n\t\t\t\tif(!item.func.call(self, cell.getComponent(), value, item.params)){\r\n\t\t\t\t\tvalid.push({\r\n\t\t\t\t\t\ttype:item.type,\r\n\t\t\t\t\t\tparameters:item.params\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tvalid = valid.length ? valid : true;\r\n\r\n\t\tif(!cell.modules.validate){\r\n\t\t\tcell.modules.validate = {};\r\n\t\t}\r\n\r\n\t\tif(valid === true){\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\r\n\t\t\tif(invalidIndex > -1){\r\n\t\t\t\tthis.invalidCells.splice(invalidIndex, 1);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcell.modules.validate.invalid = true;\r\n\r\n\t\t\tif(this.table.options.validationMode !== \"manual\"){\r\n\t\t\t\tcell.getElement().classList.add(\"tabulator-validation-fail\");\r\n\t\t\t}\r\n\r\n\t\t\tif(invalidIndex == -1){\r\n\t\t\t\tthis.invalidCells.push(cell);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn valid;\r\n\t}\r\n\r\n\tgetInvalidCells(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.invalidCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tclearValidation(cell){\r\n\t\tvar invalidIndex;\r\n\r\n\t\tif(cell.modules.validate && cell.modules.validate.invalid){\r\n\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\r\n\t\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\r\n\t\t\tif(invalidIndex > -1){\r\n\t\t\t\tthis.invalidCells.splice(invalidIndex, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nValidate.moduleName = \"validate\";\r\n\r\n//load defaults\r\nValidate.validators = defaultValidators;\r\n\r\nexport default Validate;","//tabulator with all modules installed\r\nimport {default as Tabulator} from './Tabulator.js';\r\nimport * as modules from '../core/modules/optional.js';\r\nimport ModuleBinder from './tools/ModuleBinder.js';\r\n\r\nclass TabulatorFull extends Tabulator {};\r\n\r\n//bind modules and static functionality\r\nnew ModuleBinder(TabulatorFull, modules);\r\n\r\nexport default TabulatorFull;"],"names":["debugEventsExternal","debugEventsInternal","debugInvalidOptions","height","minHeight","maxHeight","columnHeaderVertAlign","columns","columnDefaults","data","autoColumns","autoColumnsDefinitions","nestedFieldSeparator","tooltipGenerationMode","footerElement","index","textDirection","addRowPos","headerVisible","renderVertical","renderHorizontal","renderVerticalBuffer","scrollToRowPosition","scrollToRowIfVisible","scrollToColumnPosition","scrollToColumnIfVisible","rowFormatter","rowFormatterPrint","rowFormatterClipboard","rowFormatterHtmlOutput","placeholder","dataLoader","dataLoaderLoading","dataLoaderError","dataLoaderErrorTimeout","dataSendParams","dataReceiveParams","CoreFeature","table","silent","load","undefined","modules","localize","getText","arguments","bind","getLocale","comms","getConnections","send","layout","getMode","eventBus","subscribe","unsubscribe","key","subscribed","subscriptionChange","dispatch","chain","confirm","externalEvents","options","value","module","ColumnComponent","column","_column","type","Proxy","get","target","name","receiver","componentFunctionBinder","handle","getElement","getDefinition","getField","getTitleDownload","cells","forEach","cell","push","getComponent","visible","isGroup","show","hide","output","length","parent","Column","columnManager","scrollToColumn","to","after","toColumn","findColumn","moveColumn","console","warn","nextCol","nextColumn","prevCol","prevColumn","updates","updateDefinition","getWidth","width","result","reinitializeWidth","setWidth","renderer","rerenderColumns","CellComponent","_cell","getValue","getOldValue","initialValue","row","getData","mutate","setValue","setValueActual","checkHeight","Cell","element","oldValue","minWidth","component","loaded","build","generateElement","_configureCell","getFieldValue","document","createElement","className","setAttribute","field","vertAligns","top","bottom","middle","hozAligns","left","right","center","style","textAlign","hozAlign","vertAlign","display","alignItems","justifyContent","definition","cssClass","classNames","split","classList","add","addEventListener","e","_generateTooltip","val","innerHTML","Node","firstChild","removeChild","appendChild","tooltip","containerOnly","layoutElement","changed","setValueProcessData","cellRendered","cellEdited","call","dispatchExternal","subscribedExternal","rowManager","setFieldValue","_generateContents","widthStyled","offsetWidth","minWidthStyled","maxWidth","maxWidthStyled","reinitializeHeight","heightStyled","offsetHeight","redrawBlock","parentNode","deleteCell","calcs","getCellIndex","def","contentElement","titleHolderElement","titleElement","groupElement","createGroupElement","fieldStructure","titleDownload","titleFormatterRendered","mapDefinitions","setField","maxInitialWidth","widthFixed","i","newCol","attachColumn","checkColumnVisibility","registerColumnField","_initialize","bindModuleColumns","el","defaults","optionsList","generate","defaultOptionList","Object","keys","indexOf","title","_getNestedData","_getFlatData","_setNestedData","_setFlatData","registerColumnPosition","reRegisterPosition","headerTooltip","langBind","headerVertical","_bindEvents","_buildColumnHeaderContent","_buildGroupHeader","_buildColumnHeader","setTooltip","dblTap","tapHold","tap","headerClick","headerDblClick","headerContext","headerTap","passive","headerDblTap","clearTimeout","setTimeout","headerTapHold","classeNames","setMinWidth","parseInt","setMaxWidth","headerHozAlign","_buildColumnHeaderTitle","editableTitle","stopPropagation","focus","text","_formatColumnHeaderTitle","contents","dataObj","structure","alignment","parentHeight","getGroupElement","clientHeight","getHeadersElement","paddingTop","verticalAlign","clearVerticalAlign","formatter","rowNumColumn","getFirstColumn","getLastColumn","getTopColumn","updateBranches","colDefs","responsiveToggle","verticalAlignHeaders","matchChildWidths","childWidth","child","splice","setWidthActual","isNaN","Math","floor","clientWidth","max","min","rows","heightInitialized","offsetParent","clearCellHeight","calcHeight","setCellHeight","ceil","getBoundingClientRect","Promise","resolve","reject","cellCount","deregisterColumn","findColumnIndex","_nextVisibleColumn","getColumnByIndex","_prevVisibleColumn","force","fitToData","clearWidth","setTo","assign","addColumn","then","error","defaultOptions","Helpers","box","window","pageYOffset","documentElement","clientTop","pageXOffset","clientLeft","obj","clone","list","objectProto","__proto__","arrayProto","Array","isArray","subject","match","copy","findIndex","item","unshift","deepClone","OptionsList","msgType","registeredDefaults","option","userOptions","hasOwnProperty","Renderer","elementVertical","elementHorizontal","tableElement","verticalFillMode","callback","update","blockRedraw","dir","includingBuffer","getDisplayRows","rowEl","remove","clearRows","clearColumns","renderRows","renderColumns","rerenderRows","position","ifVisible","rowIndex","offset","elVisible","elOffset","scrollToRowNearestTop","scrollToRow","scrollHeight","scrollTop","offsetTop","BaiscHorizontal","VirtualDomHorizontal","leftCol","rightCol","scrollLeft","vDomScrollPosLeft","vDomScrollPosRight","vDomPadLeft","vDomPadRight","fitDataColAvg","windowBuffer","visibleRows","initialized","isFitData","compatibilityCheck","layoutCheck","vertScrollListen","frozen","ok","find","col","startsWith","clearVisRowCache","dataChange","scroll","buffer","columnsByIndex","old","cols","colPos","clear","calcWindowBuffer","config","leftPos","rightPos","fitDataCheck","vdomHoz","paddingLeft","paddingRight","reinitChanged","reinitializeRows","initializeRow","reinitializeRow","change","collsWidth","colEnd","generateCells","layoutRefresh","getVisibleRows","diff","abs","addColRight","removeColLeft","addColLeft","removeColRight","start","end","changes","getCell","fitDataColActualWidthCheck","prepend","ex","message","newWidth","widthDiff","colPositionAdjust","ColumnManager","blockHozScrollEvent","headersElement","columnsByField","defaultColumnOptions","initializeRenderer","createHeadersElement","createHeaderElement","insertBefore","scrollHorizontal","renderClass","renderers","RendererVirtualDomHorizontal","RendererBasicHorizontal","initialize","hozAdjust","scrollWidth","marginLeft","scrollColumns","definitions","sorter","setColumns","_addColumn","_reIndexColumns","redraw","before","nextToColumn","colEl","topColumn","parentIndex","nextEl","nextSibling","columnRendered","getHeight","adjustTableSize","_getSelf","HTMLElement","root","matches","fieldRoot","active","structured","from","moveColumnActual","reinitialize","_moveColumnInArray","getComponents","updateRows","fromIndex","toIndex","concat","adjust","offsetLeft","generateCell","totalWidth","fixedWidth","colWidth","layoutMode","resetScroll","footerManager","RowComponent","_row","transform","getCells","getRowPosition","moveToRow","updateData","normalizeHeight","nextRow","prevRow","Row","manualHeight","outerHeight","created","setData","create","deleteCells","renderRowCells","rerenderRowCells","children","resizableRows","setHeight","clearHeight","updatedData","tempData","newRowData","JSON","parse","attrname","getColumnsByFieldRoot","findCell","nextDisplayRow","prevDisplayRow","toRow","findRow","moveRowActual","refreshActiveData","deleteActual","getRowIndex","detatchModules","deleteRow","group","BaiscVertical","visibility","onlyGroupHeaders","styleRow","rowTop","VirtualDomVertical","vDomRowHeight","vDomTop","vDomBottom","vDomScrollPosTop","vDomScrollPosBottom","vDomTopPad","vDomBottomPad","vDomMaxRenderChain","vDomWindowBuffer","vDomWindowMinTotalRows","vDomWindowMinMarginRows","vDomTopNewRows","vDomBottomNewRows","paddingBottom","_virtualRenderFill","topRow","topOffset","deinitializeHeight","topDiff","bottomDiff","margin","_addTopRow","vDomScrollHeight","_removeBottomRow","_addBottomRow","_removeTopRow","topEdge","bottomEdge","topFound","bottomRow","slice","forceMove","holder","topPad","rowsHeight","heightOccupied","topPadHeight","rowsCount","containerHeight","rowHeight","fillableSpace","addedRows","paddingAdjust","_quickNormalizeRowHeight","removableRows","RowManager","createHolderElement","createTableElement","heightFixer","placeholderContents","firstRender","renderMode","fixedHeight","activeRowsPipeline","activeRows","activeRowsCount","displayRows","displayRowsCount","redrawBlockRestoreConfig","redrawBlockRenderInPosition","dataPipeline","displayPipeline","initializePlaceholder","leftDir","topDir","_positionPlaceholder","scrollRows","renderInPosition","columnsChanged","pagination","_setDataActual","reRenderInPosition","generateColumnsFromRowData","_wipeElements","wipe","allIndex","activeIndex","setActiveRows","displayRowIterator","displayIndex","regenerateRowNumbers","_showPlaceholder","pos","addRowActual","findAddRowPos","reverse","addRow","_clearPlaceholder","chainResult","moveRowInArray","findRowIndex","rowOnly","getDisplayRowIndex","getRows","handler","priority","sort","a","b","skipStage","stage","cascadeOrder","refreshPipelines","renderTable","layoutColumnsOnNewData","resetDisplayRows","setDisplayRows","viewable","RendererVirtualDomVertical","RendererBasicVertical","_clearTable","renderEmptyScroll","initialHeight","otherHeight","external","resize","tableWidth","browser","event","createEvent","initEvent","dispatchEvent","Event","FooterManager","containerElement","createContainerElement","links","initializeElement","querySelector","activate","deactivate","link","footerRedraw","InteractionManager","abortClasses","previousTargets","listeners","componentMap","pseudoTrackers","subscriber","pseudoTracking","buildListenerMap","bindSubscriptionWatchers","listenerMap","listener","components","pseudoMouseEnter","pseudoMouseLeave","leaveList","linkedKeys","filter","includes","values","comp","subscriptionChanged","clearWatchers","added","bindPseudoEvents","updateEventListeners","track","removeEventListener","path","composedPath","targets","findTargets","bindComponents","triggerEvents","abort","elTargets","targetMatches","previousTarget","closest","ComponentFunctionBinder","bindings","funcName","hanlder","DataLoader","loaderElement","createLoaderElement","msgElement","createMsgElement","loadingElement","errorElement","requestOrder","loading","template","trim","firstElementChild","params","replace","requestNo","showLoader","mapParams","response","objectInvert","rowData","hideLoader","showError","map","shouldLoad","langText","ExternalEventBus","debug","events","subscriptionNotifiers","_debugDispatch","_dispatch","_notifiySubscriptionChange","notifiers","args","shift","callResult","apply","log","InternalEventBus","_debugChain","_chain","_debugConfirm","_confirm","fallback","confirmed","TableRegistry","tables","query","results","querySelectorAll","matchElement","Tabulator","lookupTable","Module","_handler","register","func","registerDataPipelineHandler","registerDisplayPipelineHandler","reinitializeColumnWidths","responsiveLayout","modExists","colsWidth","gap","lastCol","responsive","flexWidth","flexGrowUnits","flexColWidth","flexColumns","fixedShrinkColumns","flexShrinkUnits","overflowWidth","gapFill","calcWidth","scaleColumns","freeSpace","shrinkCols","oversizeCols","oversizeSpace","remainingSpace","nextColWidth","remainingFlexGrowUnits","changeUnits","undersizeCols","calcGrow","widthGrow","calcShrink","widthShrink","fitData","fitDataFill","fitDataGeneral","fitDataTable","fitDataStretch","fitColumns","Layout","mode","registerTableOption","registerColumnOption","modes","moduleName","defaultModes","Localize","locale","lang","langList","langs","headerFilterPlaceholder","setHeaderFilterPlaceholder","installLang","setLocale","registerTableFunction","getLang","headerFilters","_setLangProp","desiredLocale","traverseLang","trans","prop","navigator","language","toLowerCase","prefix","_executeBindings","pathArray","_getLangElement","level","rootPath","binding","defaultLangs","Comms","receive","selectors","connections","connection","con","action","tableComms","commsReceived","ModuleBinder","tabulator","bindStaticFuctionality","bindModules","coreModules","moduleBindings","extendModule","property","source","registerModule","mod","registerModuleBinding","findTable","prototype","orderedMods","unOrderedMods","moduleCore","modulesCore","moduleInitOrder","modulesRegular","core","mods","interactionMonitor","browserSlow","browserMobile","rtl","originalElement","initializeCoreSystems","_create","_clearObjectPointers","_mapDeprecatedFunctionality","InteractionMonitor","getSelection","empty","removeAllRanges","selection","_rtlCheck","_buildElement","_initializeTable","_loadInitialData","getComputedStyle","direction","reactiveData","newElement","tagName","attributes","replaceChild","_detectBrowser","deregister","ua","userAgent","vendor","opera","test","restoreRedraw","blockActiveLoad","clearData","getDataCount","responses","addRows","newRows","getRowFromPosition","foundRows","fromRow","getDefinitionTree","fromColumn","plugin","required","Accessor","allowedTypes","initializeColumn","transformRow","charAt","toUpperCase","accessor","lookupAccessor","accessors","rowComponent","traverse","colCompnent","defautlAccessors","method","generateParamsList","serializeParams","encoded","encodeURIComponent","join","url","contentType","urlGenerator","ajaxContentType","contentTypeFormatters","headers","body","Accept","location","origin","credentials","fetch","json","status","statusText","stringify","form","FormData","append","Ajax","loaderPromise","ajaxRequestFunc","defaultLoaderPromise","ajaxURLGenerator","defaultURLGenerator","ajaxURL","setUrl","setDefaultConfig","ajaxConfig","getUrl","requestDataCheck","requestParams","requestData","ajaxParams","previousData","generateConfig","sendRequest","defaultConfig","ajaxRequesting","ajaxResponse","defaultContentTypeFormatters","updateOrAddData","insert","addData","clipboard","headerFindSuccess","columnMap","Clipboard","pasteParser","pasteAction","customSelection","rowRange","blocked","clipboardCopyRowRange","plain","html","preventDefault","clipboardCopyFormatter","generateExportList","clipboardCopyConfig","clipboardCopyStyled","genereateHTMLTable","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","defaultPasteActions","defaultPasteParsers","CalcComponent","calcParams","precision","reduce","sum","Number","toFixed","parseFloat","String","ColumnCalcs","topCalcs","botCalcs","genColumn","topElement","botElement","botRow","topInitialized","botInitialized","cellValueChanged","initializeColumnCheck","rowsUpdated","recalcActiveRows","recalcActiveRowsRefresh","tableRedraw","getResults","userRecalc","recalc","groupBy","recalcRowGroup","dataTreeStartExpanded","dataTree","recalcAll","topCalc","bottomCalc","columnCalcs","topCalcParams","botCalcParams","bottomCalcParams","calculations","initializeTopRow","botCalc","initializeBottomRow","rowsToData","generateRow","frozenColumns","recalcGroup","groupRows","getRowGroup","groups","getChildGroups","generateRowData","dataTreeChildColumnCalcs","open","getFilteredTreeChildren","disable","enable","format","getFormatter","paramKey","getGroups","getGroupResults","groupObj","subGroups","getSubGroups","subGroupResults","subgroup","defaultCalculations","DataTree","indent","collapseEl","expandEl","branchEl","elementField","startOpen","registerComponentFunction","collapseRow","expandRow","toggleRow","getTreeParent","getRowChildren","addTreeChildRow","isRowExpanded","dummyEl","dataTreeChildField","dataTreeChildIndent","dataTreeBranchElement","dataTreeCollapseElement","tabIndex","dataTreeExpandElement","layoutRow","rowDelete","rowDataChanged","columnMoving","initializeElementField","registerDisplayHandler","firstCol","getFirstVisibleColumn","dataTreeElementColumn","getTreeChildren","redrawNeeded","refreshData","childArray","controlEl","generateControlElement","cloneNode","marginRight","getPropertyValue","oldControl","getChildren","allChildren","generateChildren","dataTreeFilter","dataTreeSort","subChildren","sub","childData","childRow","childIndex","findChildIndex","recurse","setFileContents","delimiter","fileContents","depth","bom","header","autoTableParams","rowGroupStyles","fontStyle","fontSize","cellPadding","fillColor","rowCalcStyles","jsPDFParams","jsPDF","orientation","unit","parseRow","styles","content","colSpan","rowSpan","doc","jspdf","autoTable","didDrawPage","head","documentProcessing","self","sheetName","workbook","XLSX","utils","book_new","tableFeatures","SheetNames","Sheets","generateSheet","merges","worksheet","s","c","r","j","Date","sheet_add_aoa","encode_range","sheetOnly","sheets","sheet","commsSend","intercept","s2ab","buf","ArrayBuffer","view","Uint8Array","charCodeAt","write","bookType","bookSST","csv","jsonLines","pdf","xlsx","Download","blob","download","downloadToTab","filename","interceptCallback","downloadFunc","buildLink","mime","triggerDownload","downloaders","downloadConfig","downloadRowRange","groupHeader","groupHeaderDownload","_group","getRowCount","newTab","Blob","downloadReady","URL","createObjectURL","msSaveOrOpenBlob","click","defaultDownloaders","maskInput","mask","maskLetter","maskLetterChar","maskNumber","maskNumberChar","maskWildcard","maskWildcardChar","fillSymbols","symbol","char","keyCode","maskAutoFill","onRendered","success","cancel","editorParams","cellValue","input","search","padding","boxSizing","elementAttributes","getAttribute","preventScroll","onChange","vertNav","verticalNavigation","count","whiteSpace","getRow","heightNow","selectionStart","stopImmediatePropagation","step","blurFunc","cellEl","initialDisplayValue","defaultValue","listEl","multiselect","dataItems","currentItem","displayItems","currentItems","blurable","blockListShow","searchWord","searchWordTimeout","getUniqueColumnValues","getColumnByField","getColumn","parseItems","inputValues","curentValues","dataList","displayList","processComplexListItem","label","itemParams","setItem","sortValuesList","fillList","listItemFormatter","toggleItem","chooseItem","setCurrentItem","scrollIntoView","behavior","block","inline","fillInput","unsetItem","hideList","chooseItems","unsetItems","len","cancelItem","showList","removeScrollListener","scrollTovalue","character","fromCharCode","cursor","readOnly","uniqueColumnValues","genUniqueColumnValues","filterList","term","intialLoad","items","searchFunc","addNotice","searchingPlaceholder","fillListIfNotEmpty","err","showListOnEmpty","notice","searchEl","clearList","itemList","emptyPlaceholder","current","freetext","allowEmpty","showInputValue","maxStars","getElementsByTagName","size","stars","starsHolder","star","createElementNS","starChange","buildStar","starHolder","nextStar","blur","changeValue","overflow","textOverflow","percent","bar","mouseDrag","mouseDragWidth","updateValue","calcVal","round","backgroundColor","screenX","tristate","indetermValue","indeterminateValue","indetermState","marginTop","indeterminate","checked","textarea","number","autocomplete","progress","tickCross","Edit","mouseClick","recursionBlock","invalidEdit","editedCells","editors","getEditedCells","clearCellEdited","navigatePrev","navigateNext","navigateLeft","navigateRight","navigateUp","navigateDown","cellisEdited","clearEdited","editCell","cellCancelEdit","bindEditor","columnDeleteCheck","rowDeleteCheck","cancelEdit","keybindingNavigateNext","newRow","edited","nextCell","findNextEditableCell","getIndex","findPrevEditableCell","allowEdit","check","prevCell","editor","editable","validate","cellValidate","clearEditor","variableHeight","cellEditCancelled","contains","button","forceEdit","focusCellNoEvent","getRenderMode","leftEdge","rightEdge","leftMargin","rightMargin","rendered","cellEditor","validationMode","focusScrollAdjust","cellClick","cellEditing","editIndex","invalid","defaultEditors","ExportRow","ExportColumn","Export","cloneTableStyle","colVisProp","getHtml","columnHeaders","headersToExportRows","generateColumnGroupHeaders","bodyToExportRows","rowLookup","genereateTableElement","selectRow","selectedRows","columnGroups","colData","processColumnGroup","maxDepth","groupData","subGroup","subGroupData","columnVisCheck","headerDepth","exportRows","parseColumnGroup","rowGroups","exportCols","headerEl","bodyEl","lookupTableStyles","setup","treeElementField","mapElementStyles","genereateHeaderElement","genereateGroupElement","genereateCalcElement","genereateRowElement","evenRow","oddRow","calcRow","firstRow","firstGroup","getElementsByClassName","styleCells","firstCell","lastCell","generator","isVisible","cellWrapper","formatCells","formatExportValue","align","renderedCallback","htmlOutputConfig","props","lookup","fromStyle","filterVal","rowVal","filterParams","RegExp","keywords","separator","keyword","matchAll","endsWith","Filter","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","registerDataHandler","initialFilter","setFilter","initialHeaderFilter","refreshFilter","addFilter","removeFilter","all","clearFilter","clearHeaderFilter","headerFilter","setHeaderFilterColumnPlaceholder","filterType","tagType","attrType","filterChangeCheck","filterFunc","prevSuccess","emptyFunc","headerFilterFunc","filters","headerFilterFuncParams","fieldVal","colVal","trackChanges","generateHeaderFilterElement","filterElement","editorElement","typingTimer","searchTrigger","headerElement","headerFilterEmptyCheck","headerFilterParams","headerPos","headerFilterLiveFilterDelay","hasAttribute","headerFilterLiveFilter","reloadData","findFilter","findSubFilters","ajax","filtersToArray","searchType","filterRecurse","rowList","activeRowComponents","filterRow","subFilter","defaultFilters","formatterParams","emptyToSpace","sanitizeHTML","floatVal","sign","integer","decimal","rgx","decimalSym","thousandSym","thousand","negativeSign","symbolAfter","urlPrefix","labelField","urlField","src","urlSuffix","truthy","allowTruthy","tick","tickElement","cross","crossElement","DT","DateTime","luxon","inputFormat","outputFormat","invalidPlaceholder","newDatetime","fromISO","fromFormat","isValid","timezone","shiftTimezone","toFormat","suffix","humanize","date","now","starActive","starInactive","colors","color","percentValue","legendAlign","legend","legendColor","barEl","barContainer","legendEl","holderEl","toggleList","isOpen","checkbox","selectableRangeMode","toggleSelect","handleComplexRowClick","isSelected","registerRowSelectCheckbox","deselectRow","registerHeaderSelectCheckbox","plaintext","money","image","datetime","datetimediff","traffic","buttonTick","buttonCross","rownum","responsiveCollapse","rowSelection","Format","formatValue","formatHeader","lookupFormatter","formatterPrint","print","formatterClipboard","formatterHtmlOutput","htmlOutput","formatters","mockCell","titleFormatter","titleFormatterParams","entityMap","defaultFormatters","FrozenColumns","leftColumns","rightColumns","rightPadding","initializationMode","scrollEndTimer","layoutCell","blockLayout","unblockLayout","edge","frozenCheck","calcMargins","layoutColumnPosition","layoutCalcRows","_calcSpace","layoutGroupCalcs","groupList","allCells","leftParents","parentEl","getColGroupParentElement","getTableElement","FrozenRows","freezeRow","unfreezeRow","isRowFrozen","detachRow","styleRows","GroupComponent","groupManager","toggleVisibility","Group","oldGroup","hasSubGroups","groupIDLookups","_addRowToGroup","_addRow","elementContents","arrowElement","createElements","addBindings","createValueGroups","arrow","movableRows","moveRow","initializeGroupHeader","allowedValues","_createGroup","toggleElement","groupToggleElement","groupID","groupKey","headerGenerator","conformRowData","generateGroupHeaderContents","updateGroupRows","scrollHeader","groupValues","removeGroup","noCalc","_visSet","getHeadersAndRows","hasTopCalcs","detachElement","generateTopRow","hasBottomCalcs","generateBottomRow","groupClosedShowCalcs","getDisplayIndex","checkClassicModeGroupHeaderWidth","prev","compoment","getPath","childNodes","GroupRows","displayHandler","setGroupBy","setGroupValues","setGroupStartOpen","setGroupHeader","userGetGroups","userGetGroupedData","rowGetGroup","groupUpdateOnCellEdit","cellUpdated","reassignRowToGroup","configureGroupSetup","rowDeleting","scrollHeaders","rowMoving","rowAddingIndex","rowSample","virtualRenderFill","groupStartOpen","langValue","removeCalcs","getRealColumns","lookupFunc","prevValue","assignRowToGroup","getGroupedData","toGroup","fromGroup","removeRow","insertRow","generateGroups","groupComponents","groupListData","rowCount","headerContent","pullGroupListData","oldGroups","createGroup","assignRowToExistingGroup","newGroupNeeded","oldRowGroup","oldGroupPath","newGroupPath","getExpectedPath","samePath","every","groupPath","groupId","cellEdit","rowAdd","_rebindRow","rowMove","posFrom","newValue","posTo","History","history","clearComponentHistory","rowDeleted","rowAdded","rowMoved","undo","redo","getHistoryUndoSize","getHistoryRedoSize","getGroup","undoers","redoers","oldRow","defaultUndoers","defaultRedoers","HtmlTableImport","fieldIndex","hasIndex","tableElementCheck","parseTable","_extractOptions","_extractHeaders","_generateBlankHeaders","optionsArr","attrib","_attribValue","exists","_findCol","textContent","csvImporter","inQuote","nextChar","Import","importFromFile","importFormat","loadDataCheck","loadData","importData","lookupImporter","structureData","importer","importers","extension","pickFile","extensions","accept","file","files","reader","FileReader","importReader","readAsArrayBuffer","readAsBinaryString","readAsDataURL","readAsText","onload","onerror","parsedData","structureArrayToObject","structureArrayToColumns","getColumns","defaultImporters","Interaction","eventMap","rowClick","rowDblClick","rowContext","rowMouseEnter","rowMouseLeave","rowMouseOver","rowMouseOut","rowMouseMove","rowTap","rowDblTap","rowTapHold","cellDblClick","cellContext","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellTap","cellDblTap","cellTapHold","headerMouseEnter","headerMouseLeave","headerMouseOver","headerMouseOut","headerMouseMove","groupClick","groupDblClick","groupContext","groupMouseEnter","groupMouseLeave","groupMouseOver","groupMouseOut","groupMouseMove","groupTap","groupDblTap","groupTapHold","subscribers","touchSubscribers","columnSubscribers","touchWatchers","tapDbl","initializeExternalEvents","cellContentsSelectionFixer","selectNode","subscriptionChangeExternal","subscribeTouchEvents","unsubscribeTouchEvents","handleTouch","notouch","watchers","componentObj","navPrev","navNext","navUp","navDown","scrollPageUp","scrollPageDown","scrollToStart","scrollToEnd","copyToClipboard","keyBlock","newPos","scrollMax","navLeft","navRight","Keybindings","watchKeys","pressedKeys","keyupBinding","keydownBinding","keybindings","mergedBindings","mapBindings","bindEvents","clearBindings","actions","bindingList","mapBinding","symbolsList","ctrl","meta","symbols","code","checkBinding","ctrlKey","shiftKey","metaKey","defaultBindings","defaultActions","Menu","menuContainer","menuElements","blurEvent","hideMenu","escEvent","escMenu","nestedMenuBlock","positionReversedX","currentComponent","lookupMenuContainer","initializeRowWatchers","initializeGroupWatchers","checkMenuContainerIsParent","container","rowContextMenu","loadMenuEvent","on","rowClickMenu","groupContextMenu","groupClickMenu","headerContextMenu","loadMenuTableColumnEvent","headerClickMenu","headerMenu","initializeColumnHeaderMenu","contextMenu","loadMenuTableCellEvent","clickMenu","headerMenuEl","menu","loadMenu","touch","MouseEvent","menuEl","itemEl","disabled","hideOldSubMenus","positionMenu","pop","x","y","parentOffset","touches","pageX","pageY","MoveColumns","placeholderElement","createPlaceholderElement","hoverElement","checkTimeout","checkPeriod","moving","toCol","toColAfter","startX","autoScrollMargin","autoScrollStep","autoScrollTimeout","touchMove","moveHover","endMove","movableColumns","mousemove","which","startMove","bindTouchEvents","startXMove","prevColWidth","nextColWidthLast","prevColWidthLast","moveToCol","_bindMouseMove","movingCells","_unbindMouseMove","columnHolder","xPos","scrollPos","MoveRows","toRowAfter","hasHandle","startY","tableRowDropEvent","connectionSelectorsTables","connectionSelectorsElements","connectionElements","connectedTable","connectedRow","movableRowsConnectedTables","movableRowsConnectedElements","initializeCell","mouseup","tableRowDrop","previousSibling","rowHandle","startYMove","nextRowHeight","prevRowHeight","nextRowHeightLast","prevRowHeightLast","setStartPosition","connectToTables","pointerEvents","disconnectFromTables","moveHoverConnections","moveHoverTable","rowHolder","yPos","connectionTables","commsConnections","dropEvent","elementRowDrop","tabulatorElementDropEvent","sender","movableRowsSender","senders","movableRowsReceiver","receivers","connect","disconnect","dropComplete","fromTable","toTable","Mutator","enabled","transformCell","lookupMutator","mutators","mutatorEdit","defaultMutators","pageSize","currentRow","currentPage","totalRows","totalPages","showingEl","valueEl","ofEl","totalEl","rowsEl","pages","Page","progressiveLoad","pageCounterElement","pageCounter","page","remoteRowCountEstimate","initialLoad","dataChanging","pageSizes","setMaxPage","setPage","userSetPageToRow","userSetPageSize","getPageSize","previousPage","nextPage","getPage","getPageMax","setPageToRow","initialLoadComplete","calculatePageSizes","paginationAddRow","rowAddingPosition","paginationMode","remotePageParams","_parseRemoteData","restOnRenderBefore","initializePageCounter","initializePaginator","initializeProgressive","scrollVertical","dispRows","testElRow","testElCell","paginationSize","generatePageSizeSelectList","setPageSize","progressiveLoadScrollMargin","pagesElement","firstBut","prevBut","nextBut","lastBut","paginationSizeSelector","pageSizeSelect","counter","paginationCounter","pageCounters","hidden","pageSelectLabel","paginationCounterHolder","paginationElement","paginationCounterElement","paginationInitialPage","paginationButtonCount","trigger","leftSize","rightSize","_generatePageButton","actualRowPageSize","actualStartRow","actualRows","setMaxRows","_setPageButtons","_setPageCounter","last_page","last_row","progressiveLoadDelay","footer","defaultPageCounters","local","id","localStorage","getItem","cookie","cookiePos","expireDate","setDate","getDate","toUTCString","Persistence","defWatcherBlock","readFunc","writeFunc","testKey","removeItem","persistence","persistenceMode","persistenceID","retreivedData","localStorageTest","persistenceReaderFunc","readers","persistenceWriterFunc","writers","retreiveData","save","eventSave","getColumnLayout","setColumnLayout","sorters","initialSort","parseColumns","mergeDefinition","getOwnPropertyDescriptor","defineProperty","set","oldCols","newCols","_findColumn","validateSorters","getSort","getGroupConfig","getPageConfig","excludedKeys","defStore","colDef","defaultReaders","defaultWriters","Print","manualBlock","printAsHtml","replaceTable","cleanup","printFullscreen","genereateTable","printConfig","printStyled","printRowRange","scrollX","scrollY","footerEl","tableEl","footerContent","printHeader","printFooter","printFormatter","scrollTo","ReactiveData","origFuncs","currentVersion","unblock","watchRow","watchData","unwatchData","version","enumerable","configurable","arg","getRowFromDataObject","startRow","oldRows","writable","watchKey","watchTreeChildren","childField","rebuildTree","ResizeColumns","startColumn","startWidth","prevHandle","layoutCellHandles","layoutColumnHeader","resizable","handleDown","nearestColumn","_checkResizability","_mouseDown","oldWidth","prevHandleDown","colIndex","mouseMove","checkCellHeights","mouseUp","ResizeRows","startHeight","screenY","ResizeTable","observer","containerObserver","tableHeight","containerWidth","autoResize","tableStyle","ResizeObserver","entry","nodeHeight","contentRect","nodeWidth","observe","tableResized","unobserve","ResponsiveLayout","hiddenColumns","collapseFormatter","collapseStartOpen","collapseHandleColumn","updateColumnVisibility","initializeResponsivity","responsiveLayoutCollapseFormatter","formatCollapsedData","responsiveLayoutCollapseStartOpen","order","generateCollapsedContent","generateCollapsedRowContent","colCount","working","getFlexBaseWidth","hideColumn","showColumn","generateCollapsedRowData","mockCellComponent","responsiveLayoutCollapseUseFormatters","titleData","valueData","node_content","titleHighlight","SelectRow","selecting","lastClickedRow","selectPrev","headerCheckboxElement","selectRows","deselectRows","getSelectedRows","getSelectedData","isRowSelected","selectable","clearSelectionData","rowRetrieve","selectablePersistence","_deselectRow","_rowSelectionChanged","endSelect","selected","selectableCheck","getCurrentCell","_clearSelection","lastClickedRowIdx","rowIdx","fromRowIdx","toRowIdx","toggledRows","toggledRow","_selectRow","rowMatch","rowInfo","selectableRollingSelection","checkboxEl","dataTreeSelectPropagate","childRowSelection","selectedRow","aRow","bRow","alignEmptyValues","decimalSeparator","thousandSeparator","emptyAlign","langLocale","localeCompare","el1","el2","calc","d","as","bs","a1","b1","L","rx","rd","isFinite","string","time","boolean","array","alphanum","Sort","sortList","userSetSort","clearSort","sortMode","remoteSortParams","setSort","refreshSort","arrowEl","sorterParams","startingDir","headerSortStartingDir","headerSortTristate","headerSort","headerSortElement","columnHeaderSortMulti","newSortList","sortOrderReverse","sortListActual","rowComponents","clearColumnHeaders","sortObj","findSorter","setColumnHeader","_sortItems","sorterCount","sortItem","_sortRow","el1Comp","el2Comp","defaultSorters","parameters","numeric","starts","ends","minLength","maxLength","regex","reg","unique","cellData","Validate","invalidCells","getInvalidCells","userClearCellValidation","userValidate","cellIsValid","clearValidation","columnValidate","rowValidate","validator","_extractValidator","substring","_buildValidator","validators","invalidIndex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EAA0D;EAEzD/1C,QAAAA,IAAI,CAACN,UAAL,GAAkBoF,SAAlB,CAA4ByM,MAA5B,CAAmC,2BAAnC;EACAvR,QAAAA,IAAI,CAACzC,OAAL,CAAam3C,QAAb,CAAsBqB,OAAtB,GAAgC,KAAhC;EAEA+9B,QAAAA,YAAY,GAAG,KAAKb,YAAL,CAAkBnqE,OAAlB,CAA0B9I,IAA1B,CAAf;;EAEA,YAAG8zE,YAAY,GAAG,CAAC,CAAnB,EAAqB;EACpB,eAAKb,YAAL,CAAkBrmE,MAAlB,CAAyBknE,YAAzB,EAAuC,CAAvC;EACA;EACD;EACD;;;;IAnQqBnoD;;EAsQvBqnD,QAAQ,CAACtkD,UAAT,GAAsB,UAAtB;;EAGAskD,QAAQ,CAACa,UAAT,GAAsBE,iBAAtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MCxQMC;;;;;;;;;;;;IAAsBvoD;;EAG5B,IAAIwF,YAAJ,CAAiB+iD,aAAjB,EAAgCz2E,OAAhC;;;;"} \ No newline at end of file +{"version":3,"file":"tabulator.js","sources":["../../src/js/core/defaults/options.js","../../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/TableRegistry.js","../../src/js/core/Module.js","../../src/js/modules/Layout/defaults/modes/fitData.js","../../src/js/modules/Layout/defaults/modes/fitDataGeneral.js","../../src/js/modules/Layout/defaults/modes/fitDataStretch.js","../../src/js/modules/Layout/defaults/modes/fitColumns.js","../../src/js/modules/Layout/defaults/modes.js","../../src/js/modules/Layout/Layout.js","../../src/js/modules/Localize/defaults/langs.js","../../src/js/modules/Localize/Localize.js","../../src/js/modules/Comms/Comms.js","../../src/js/core/tools/ModuleBinder.js","../../src/js/core/Tabulator.js","../../src/js/modules/Accessor/defaults/accessors.js","../../src/js/modules/Accessor/Accessor.js","../../src/js/modules/Ajax/defaults/config.js","../../src/js/modules/Ajax/defaults/urlGenerator.js","../../src/js/modules/Ajax/defaults/loaderPromise.js","../../src/js/modules/Ajax/defaults/contentTypeFormatters.js","../../src/js/modules/Ajax/Ajax.js","../../src/js/modules/Clipboard/defaults/pasteActions.js","../../src/js/modules/Clipboard/defaults/pasteParsers.js","../../src/js/modules/Clipboard/Clipboard.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/csv.js","../../src/js/modules/Download/defaults/downloaders/json.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/defaults/downloaders/jsonLines.js","../../src/js/modules/Download/defaults/downloaders.js","../../src/js/modules/Download/Download.js","../../src/js/modules/Edit/inputMask.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/select.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/defaults/editors.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/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/defaults/formatters.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/defaults/undoers.js","../../src/js/modules/History/defaults/redoers.js","../../src/js/modules/History/History.js","../../src/js/modules/HtmlTableImport/HtmlTableImport.js","../../src/js/modules/Import/defaults/importers/csv.js","../../src/js/modules/Import/defaults/importers/json.js","../../src/js/modules/Import/defaults/importers.js","../../src/js/modules/Import/Import.js","../../src/js/modules/Interaction/Interaction.js","../../src/js/modules/Keybindings/defaults/bindings.js","../../src/js/modules/Keybindings/defaults/actions.js","../../src/js/modules/Keybindings/Keybindings.js","../../src/js/modules/Menu/Menu.js","../../src/js/modules/MoveColumns/MoveColumns.js","../../src/js/modules/MoveRows/MoveRows.js","../../src/js/modules/Mutator/defaults/mutators.js","../../src/js/modules/Mutator/Mutator.js","../../src/js/modules/Page/defaults/pageCounters/rows.js","../../src/js/modules/Page/defaults/pageCounters/pages.js","../../src/js/modules/Page/defaults/pageCounters.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/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/number.js","../../src/js/modules/Sort/defaults/sorters/string.js","../../src/js/modules/Sort/defaults/sorters/datetime.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/defaults/sorters.js","../../src/js/modules/Sort/Sort.js","../../src/js/modules/Validate/defaults/validators.js","../../src/js/modules/Validate/Validate.js","../../src/js/core/TabulatorFull.js"],"sourcesContent":["export default {\r\n\r\n\tdebugEventsExternal:false, //flag to console log events\r\n\tdebugEventsInternal:false, //flag to console log events\r\n\tdebugInvalidOptions:true, //allow toggling of invalid option warnings\r\n\r\n\theight:false, //height of tabulator\r\n\tminHeight:false, //minimum height of tabulator\r\n\tmaxHeight:false, //maximum height of tabulator\r\n\r\n\tcolumnHeaderVertAlign:\"top\", //vertical alignment of column headers\r\n\r\n\tcolumns:[],//store for colum header info\r\n\tcolumnDefaults:{}, //store column default props\r\n\r\n\tdata:false, //default starting data\r\n\r\n\tautoColumns:false, //build columns from data row structure\r\n\tautoColumnsDefinitions:false,\r\n\r\n\tnestedFieldSeparator:\".\", //separator for nested data\r\n\r\n\ttooltipGenerationMode:\"load\", //when to generate tooltips\r\n\r\n\tfooterElement:false, //hold footer element\r\n\r\n\tindex:\"id\", //filed for row index\r\n\r\n\ttextDirection:\"auto\",\r\n\r\n\taddRowPos:\"bottom\", //position to insert blank rows, top|bottom\r\n\r\n\theaderVisible:true, //hide header\r\n\r\n\trenderVertical:\"virtual\",\r\n\trenderHorizontal:\"basic\",\r\n\trenderVerticalBuffer:0, // set virtual DOM buffer size\r\n\r\n\tscrollToRowPosition:\"top\",\r\n\tscrollToRowIfVisible:true,\r\n\r\n\tscrollToColumnPosition:\"left\",\r\n\tscrollToColumnIfVisible:true,\r\n\r\n\trowFormatter:false,\r\n\trowFormatterPrint:null,\r\n\trowFormatterClipboard:null,\r\n\trowFormatterHtmlOutput:null,\r\n\r\n\tplaceholder:false,\r\n\r\n\tdataLoader:true,\r\n\tdataLoaderLoading:false,\r\n\tdataLoaderError:false,\r\n\tdataLoaderErrorTimeout:3000,\r\n\r\n\tdataSendParams:{},\r\n\r\n\tdataReceiveParams:{},\r\n}\r\n","export default class CoreFeature{\r\n\r\n\tconstructor(table){\r\n\t\tthis.table = table;\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t/////////////// DataLoad /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\treloadData(data, silent){\r\n\t\treturn this.table.dataLoader.load(data, undefined, undefined, undefined, silent);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t///////////// Localization ///////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tlangText(){\r\n\t\treturn this.table.modules.localize.getText(...arguments);\r\n\t}\r\n\r\n\tlangBind(){\r\n\t\treturn this.table.modules.localize.bind(...arguments);\r\n\t}\r\n\r\n\tlangLocale(){\r\n\t\treturn this.table.modules.localize.getLocale(...arguments);\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t////////// Inter Table Comms /////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tcommsConnections(){\r\n\t\treturn this.table.modules.comms.getConnections(...arguments);\r\n\t}\r\n\r\n\tcommsSend(){\r\n\t\treturn this.table.modules.comms.send(...arguments);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Layout /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tlayoutMode(){\r\n\t\treturn this.table.modules.layout.getMode();\r\n\t}\r\n\r\n\tlayoutRefresh(){\r\n\t\treturn this.table.modules.layout.layout();\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t/////////////// Event Bus ////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tsubscribe(){\r\n\t\treturn this.table.eventBus.subscribe(...arguments);\r\n\t}\r\n\r\n\tunsubscribe(){\r\n\t\treturn this.table.eventBus.unsubscribe(...arguments);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.table.eventBus.subscribed(key);\r\n\t}\r\n\r\n\tsubscriptionChange(){\r\n\t\treturn this.table.eventBus.subscriptionChange(...arguments);\r\n\t}\r\n\r\n\tdispatch(){\r\n\t\treturn this.table.eventBus.dispatch(...arguments);\r\n\t}\r\n\r\n\tchain(){\r\n\t\treturn this.table.eventBus.chain(...arguments);\r\n\t}\r\n\r\n\tconfirm(){\r\n\t\treturn this.table.eventBus.confirm(...arguments);\r\n\t}\r\n\r\n\tdispatchExternal(){\r\n\t\treturn this.table.externalEvents.dispatch(...arguments);\r\n\t}\r\n\r\n\tsubscribedExternal(key){\r\n\t\treturn this.table.externalEvents.subscribed(key);\r\n\t}\r\n\r\n\tsubscriptionChangeExternal(){\r\n\t\treturn this.table.externalEvents.subscriptionChange(...arguments);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Options /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\toptions(key){\r\n\t\treturn this.table.options[key];\r\n\t}\r\n\r\n\tsetOption(key, value){\r\n\t\tif(typeof value !== \"undefined\"){\r\n\t\t\tthis.table.options[key] = value;\r\n\t\t}\r\n\r\n\t\treturn this.table.options[key];\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Modules /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tmodule(key){\r\n\t\treturn this.table.module(key);\r\n\t}\r\n}","import Column from './Column.js';\r\n\r\n//public column object\r\nexport default class ColumnComponent {\r\n\tconstructor (column){\r\n\t\tthis._column = column;\r\n\t\tthis.type = \"ColumnComponent\";\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._column.table.componentFunctionBinder.handle(\"column\", target._column, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._column.getElement();\r\n\t}\r\n\r\n\tgetDefinition(){\r\n\t\treturn this._column.getDefinition();\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._column.getField();\r\n\t}\r\n\r\n\tgetTitleDownload() {\r\n\t\treturn this._column.getTitleDownload();\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._column.cells.forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tisVisible(){\r\n\t\treturn this._column.visible;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tif(this._column.isGroup){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\tcolumn.show();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis._column.show();\r\n\t\t}\r\n\t}\r\n\r\n\thide(){\r\n\t\tif(this._column.isGroup){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\tcolumn.hide();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis._column.hide();\r\n\t\t}\r\n\t}\r\n\r\n\ttoggle(){\r\n\t\tif(this._column.visible){\r\n\t\t\tthis.hide();\r\n\t\t}else{\r\n\t\t\tthis.show();\r\n\t\t}\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn this._column.delete();\r\n\t}\r\n\r\n\tgetSubColumns(){\r\n\t\tvar output = [];\r\n\r\n\t\tif(this._column.columns.length){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\toutput.push(column.getComponent());\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetParentColumn(){\r\n\t\treturn this._column.parent instanceof Column ? this._column.parent.getComponent() : false;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._column;\r\n\t}\r\n\r\n\tscrollTo(){\r\n\t\treturn this._column.table.columnManager.scrollToColumn(this._column);\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._column.table;\r\n\t}\r\n\r\n\tmove(to, after){\r\n\t\tvar toColumn = this._column.table.columnManager.findColumn(to);\r\n\r\n\t\tif(toColumn){\r\n\t\t\tthis._column.table.columnManager.moveColumn(this._column, toColumn, after)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching column found:\", toColumn);\r\n\t\t}\r\n\t}\r\n\r\n\tgetNextColumn(){\r\n\t\tvar nextCol = this._column.nextColumn();\r\n\r\n\t\treturn nextCol ? nextCol.getComponent() : false;\r\n\t}\r\n\r\n\tgetPrevColumn(){\r\n\t\tvar prevCol = this._column.prevColumn();\r\n\r\n\t\treturn prevCol ? prevCol.getComponent() : false;\r\n\t}\r\n\r\n\tupdateDefinition(updates){\r\n\t\treturn this._column.updateDefinition(updates);\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\treturn this._column.getWidth();\r\n\t}\r\n\r\n\tsetWidth(width){\r\n\t\tvar result;\r\n\r\n\t\tif(width === true){\r\n\t\t\tresult = this._column.reinitializeWidth(true);\r\n\t\t}else{\r\n\t\t\tresult = this._column.setWidth(width);\r\n\t\t}\r\n\r\n\t\tthis._column.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\treturn result;\r\n\t}\r\n}","export default {\r\n\t\"title\": undefined,\r\n\t\"field\": undefined,\r\n\t\"columns\": undefined,\r\n\t\"visible\": undefined,\r\n\t\"hozAlign\": undefined,\r\n\t\"vertAlign\": undefined,\r\n\t\"width\": undefined,\r\n\t\"minWidth\": 40,\r\n\t\"maxWidth\": undefined,\r\n\t\"maxInitialWidth\": undefined,\r\n\t\"tooltip\": undefined,\r\n\t\"cssClass\": undefined,\r\n\t\"variableHeight\": undefined,\r\n\t\"headerTooltip\": undefined,\r\n\t\"headerVertical\": undefined,\r\n\t\"headerHozAlign\": undefined,\r\n\t\"editableTitle\": undefined,\r\n}","//public cell object\r\nexport default class CellComponent {\r\n\r\n\tconstructor (cell){\r\n\t\tthis._cell = cell;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._cell.table.componentFunctionBinder.handle(\"cell\", target._cell, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetValue(){\r\n\t\treturn this._cell.getValue();\r\n\t}\r\n\r\n\tgetOldValue(){\r\n\t\treturn this._cell.getOldValue();\r\n\t}\r\n\r\n\tgetInitialValue(){\r\n\t\treturn this._cell.initialValue;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._cell.getElement();\r\n\t}\r\n\r\n\tgetRow(){\r\n\t\treturn this._cell.row.getComponent();\r\n\t}\r\n\r\n\tgetData(){\r\n\t\treturn this._cell.row.getData();\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._cell.column.getField();\r\n\t}\r\n\r\n\tgetColumn(){\r\n\t\treturn this._cell.column.getComponent();\r\n\t}\r\n\r\n\tsetValue(value, mutate){\r\n\t\tif(typeof mutate == \"undefined\"){\r\n\t\t\tmutate = true;\r\n\t\t}\r\n\r\n\t\tthis._cell.setValue(value, mutate);\r\n\t}\r\n\r\n\trestoreOldValue(){\r\n\t\tthis._cell.setValueActual(this._cell.getOldValue());\r\n\t}\r\n\r\n\trestoreInitialValue(){\r\n\t\tthis._cell.setValueActual(this._cell.initialValue);\r\n\t}\r\n\r\n\tcheckHeight(){\r\n\t\tthis._cell.checkHeight();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._cell.table;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._cell;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport CellComponent from './CellComponent.js';\r\n\r\nexport default class Cell extends CoreFeature{\r\n\tconstructor(column, row){\r\n\t\tsuper(column.table);\r\n\r\n\t\tthis.table = column.table;\r\n\t\tthis.column = column;\r\n\t\tthis.row = row;\r\n\t\tthis.element = null;\r\n\t\tthis.value = null;\r\n\t\tthis.initialValue;\r\n\t\tthis.oldValue = null;\r\n\t\tthis.modules = {};\r\n\r\n\t\tthis.height = null;\r\n\t\tthis.width = null;\r\n\t\tthis.minWidth = null;\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\tthis.loaded = false; //track if the cell has been added to the DOM yet\r\n\r\n\t\tthis.build();\r\n\t}\r\n\r\n\t//////////////// Setup Functions /////////////////\r\n\t//generate element\r\n\tbuild(){\r\n\t\tthis.generateElement();\r\n\r\n\t\tthis.setWidth();\r\n\r\n\t\tthis._configureCell();\r\n\r\n\t\tthis.setValueActual(this.column.getFieldValue(this.row.data));\r\n\r\n\t\tthis.initialValue = this.value;\r\n\t}\r\n\r\n\tgenerateElement(){\r\n\t\tthis.element = document.createElement('div');\r\n\t\tthis.element.className = \"tabulator-cell\";\r\n\t\tthis.element.setAttribute(\"role\", \"gridcell\");\r\n\t\tthis.element = this.element;\r\n\t}\r\n\r\n\t_configureCell(){\r\n\t\tvar element = this.element,\r\n\t\tfield = this.column.getField(),\r\n\t\tvertAligns = {\r\n\t\t\ttop:\"flex-start\",\r\n\t\t\tbottom:\"flex-end\",\r\n\t\t\tmiddle:\"center\",\r\n\t\t},\r\n\t\thozAligns = {\r\n\t\t\tleft:\"flex-start\",\r\n\t\t\tright:\"flex-end\",\r\n\t\t\tcenter:\"center\",\r\n\t\t};\r\n\r\n\t\t//set text alignment\r\n\t\telement.style.textAlign = this.column.hozAlign;\r\n\r\n\t\tif(this.column.vertAlign){\r\n\t\t\telement.style.display = \"inline-flex\";\r\n\r\n\t\t\telement.style.alignItems = vertAligns[this.column.vertAlign] || \"\";\r\n\r\n\t\t\tif(this.column.hozAlign){\r\n\t\t\t\telement.style.justifyContent = hozAligns[this.column.hozAlign] || \"\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(field){\r\n\t\t\telement.setAttribute(\"tabulator-field\", field);\r\n\t\t}\r\n\r\n\t\t//add class to cell if needed\r\n\t\tif(this.column.definition.cssClass){\r\n\t\t\tvar classNames = this.column.definition.cssClass.split(\" \")\r\n\t\t\tclassNames.forEach((className) => {\r\n\t\t\t\telement.classList.add(className)\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t//update tooltip on mouse enter\r\n\t\tif (this.table.options.tooltipGenerationMode === \"hover\"){\r\n\t\t\telement.addEventListener(\"mouseenter\", (e) => {\r\n\t\t\t\tthis._generateTooltip();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"cell-init\", this);\r\n\r\n\t\t//hide cell if not visible\r\n\t\tif(!this.column.visible){\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\r\n\t//generate cell contents\r\n\t_generateContents(){\r\n\t\tvar val;\r\n\r\n\t\tval = this.chain(\"cell-format\", this, null, () => {\r\n\t\t\treturn this.element.innerHTML = this.value;\r\n\t\t});\r\n\r\n\t\tswitch(typeof val){\r\n\t\t\tcase \"object\":\r\n\t\t\tif(val instanceof Node){\r\n\r\n\t\t\t\t//clear previous cell contents\r\n\t\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\t\tthis.element.appendChild(val);\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.innerHTML = \"\";\r\n\r\n\t\t\t\tif(val != null){\r\n\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);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\tcase \"null\":\r\n\t\t\tthis.element.innerHTML = \"\";\r\n\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\tthis.element.innerHTML = val;\r\n\t\t}\r\n\t}\r\n\r\n\tcellRendered(){\r\n\t\tthis.dispatch(\"cell-rendered\", this);\r\n\t}\r\n\r\n\t//generate tooltip text\r\n\t_generateTooltip(){\r\n\t\tvar tooltip = this.column.tooltip;\r\n\r\n\t\tif(tooltip){\r\n\t\t\tif(tooltip === true){\r\n\t\t\t\ttooltip = this.value;\r\n\t\t\t}else if(typeof(tooltip) == \"function\"){\r\n\t\t\t\ttooltip = tooltip(this.getComponent());\r\n\r\n\t\t\t\tif(tooltip === false){\r\n\t\t\t\t\ttooltip = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof tooltip === \"undefined\"){\r\n\t\t\t\ttooltip = \"\";\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.setAttribute(\"title\", tooltip);\r\n\t\t}else{\r\n\t\t\tthis.element.setAttribute(\"title\", \"\");\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////////// Getters ////////////////////\r\n\tgetElement(containerOnly){\r\n\t\tif(!this.loaded){\r\n\t\t\tthis.loaded = true;\r\n\t\t\tif(!containerOnly){\r\n\t\t\t\tthis.layoutElement();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tgetValue(){\r\n\t\treturn this.value;\r\n\t}\r\n\r\n\tgetOldValue(){\r\n\t\treturn this.oldValue;\r\n\t}\r\n\r\n\t//////////////////// Actions ////////////////////\r\n\tsetValue(value, mutate){\r\n\t\tvar changed = this.setValueProcessData(value, mutate);\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.dispatch(\"cell-value-updated\", this);\r\n\r\n\t\t\tthis.cellRendered();\r\n\r\n\t\t\tif(this.column.definition.cellEdited){\r\n\t\t\t\tthis.column.definition.cellEdited.call(this.table, this.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"cellEdited\", this.getComponent());\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tsetValueProcessData(value, mutate){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(this.value !== value){\r\n\r\n\t\t\tchanged = true;\r\n\r\n\t\t\tif(mutate){\r\n\t\t\t\tvalue = this.chain(\"cell-value-changing\", [this, value], null, value);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.setValueActual(value);\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.dispatch(\"cell-value-changed\", this);\r\n\t\t}\r\n\r\n\t\treturn changed;\r\n\t}\r\n\r\n\tsetValueActual(value){\r\n\t\tthis.oldValue = this.value;\r\n\r\n\t\tthis.value = value;\r\n\r\n\t\tthis.dispatch(\"cell-value-save-before\", this);\r\n\r\n\t\tthis.column.setFieldValue(this.row.data, value);\r\n\r\n\t\tthis.dispatch(\"cell-value-save-after\", this);\r\n\r\n\t\tif(this.loaded){\r\n\t\t\tthis.layoutElement();\r\n\t\t}\r\n\t}\r\n\r\n\tlayoutElement(){\r\n\t\tthis._generateContents();\r\n\t\tthis._generateTooltip();\r\n\r\n\t\tthis.dispatch(\"cell-layout\", this);\r\n\t}\r\n\r\n\tsetWidth(){\r\n\t\tthis.width = this.column.width;\r\n\t\tthis.element.style.width = this.column.widthStyled;\r\n\t}\r\n\r\n\tclearWidth(){\r\n\t\tthis.width = \"\";\r\n\t\tthis.element.style.width = \"\";\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\treturn this.width || this.element.offsetWidth;\r\n\t}\r\n\r\n\tsetMinWidth(){\r\n\t\tthis.minWidth = this.column.minWidth;\r\n\t\tthis.element.style.minWidth = this.column.minWidthStyled;\r\n\t}\r\n\r\n\tsetMaxWidth(){\r\n\t\tthis.maxWidth = this.column.maxWidth;\r\n\t\tthis.element.style.maxWidth = this.column.maxWidthStyled;\r\n\t}\r\n\r\n\tcheckHeight(){\r\n\t\t// var height = this.element.css(\"height\");\r\n\t\tthis.row.reinitializeHeight();\r\n\t}\r\n\r\n\tclearHeight(){\r\n\t\tthis.element.style.height = \"\";\r\n\t\tthis.height = null;\r\n\t}\r\n\r\n\tsetHeight(){\r\n\t\tthis.height = this.row.height;\r\n\t\tthis.element.style.height = this.row.heightStyled;\r\n\t}\r\n\r\n\tgetHeight(){\r\n\t\treturn this.height || this.element.offsetHeight;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tthis.element.style.display = this.column.vertAlign ? \"inline-flex\" : \"\";\r\n\t}\r\n\r\n\thide(){\r\n\t\tthis.element.style.display = \"none\";\r\n\t}\r\n\r\n\tdelete(){\r\n\t\tthis.dispatch(\"cell-delete\", this);\r\n\r\n\t\tif(!this.table.rowManager.redrawBlock && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.column.deleteCell(this);\r\n\t\tthis.row.deleteCell(this);\r\n\t\tthis.calcs = {};\r\n\t}\r\n\r\n\tgetIndex(){\r\n\t\treturn this.row.getCellIndex(this);\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new CellComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport ColumnComponent from './ColumnComponent.js';\r\nimport defaultOptions from './defaults/options.js';\r\n\r\nimport Cell from '../cell/Cell.js';\r\n\r\nclass Column extends CoreFeature{\r\n\r\n\tconstructor(def, parent){\r\n\t\tsuper(parent.table);\r\n\r\n\t\tthis.definition = def; //column definition\r\n\t\tthis.parent = parent; //hold parent object\r\n\t\tthis.type = \"column\"; //type of element\r\n\t\tthis.columns = []; //child columns\r\n\t\tthis.cells = []; //cells bound to this column\r\n\t\tthis.element = this.createElement(); //column header element\r\n\t\tthis.contentElement = false;\r\n\t\tthis.titleHolderElement = false;\r\n\t\tthis.titleElement = false;\r\n\t\tthis.groupElement = this.createGroupElement(); //column group holder element\r\n\t\tthis.isGroup = false;\r\n\t\tthis.tooltip = false; //hold column tooltip\r\n\t\tthis.hozAlign = \"\"; //horizontal text alignment\r\n\t\tthis.vertAlign = \"\"; //vert text alignment\r\n\r\n\t\t//multi dimensional filed handling\r\n\t\tthis.field =\"\";\r\n\t\tthis.fieldStructure = \"\";\r\n\t\tthis.getFieldValue = \"\";\r\n\t\tthis.setFieldValue = \"\";\r\n\r\n\t\tthis.titleDownload = null;\r\n\t\tthis.titleFormatterRendered = false;\r\n\r\n\t\tthis.mapDefinitions();\r\n\r\n\t\tthis.setField(this.definition.field);\r\n\r\n\t\tthis.modules = {}; //hold module variables;\r\n\r\n\t\tthis.width = null; //column width\r\n\t\tthis.widthStyled = \"\"; //column width prestyled to improve render efficiency\r\n\t\tthis.maxWidth = null; //column maximum width\r\n\t\tthis.maxWidthStyled = \"\"; //column maximum prestyled to improve render efficiency\r\n\t\tthis.maxInitialWidth = null;\r\n\t\tthis.minWidth = null; //column minimum width\r\n\t\tthis.minWidthStyled = \"\"; //column minimum prestyled to improve render efficiency\r\n\t\tthis.widthFixed = false; //user has specified a width for this column\r\n\r\n\t\tthis.visible = true; //default visible state\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\t//initialize column\r\n\t\tif(this.definition.columns){\r\n\r\n\t\t\tthis.isGroup = true;\r\n\r\n\t\t\tthis.definition.columns.forEach((def, i) => {\r\n\t\t\t\tvar newCol = new Column(def, this);\r\n\t\t\t\tthis.attachColumn(newCol);\r\n\t\t\t});\r\n\r\n\t\t\tthis.checkColumnVisibility();\r\n\t\t}else{\r\n\t\t\tparent.registerColumnField(this);\r\n\t\t}\r\n\r\n\t\tthis._initialize();\r\n\r\n\t\tthis.bindModuleColumns();\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-col\");\r\n\t\tel.setAttribute(\"role\", \"columnheader\");\r\n\t\tel.setAttribute(\"aria-sort\", \"none\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateGroupElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-col-group-cols\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tmapDefinitions(){\r\n\t\tvar defaults = this.table.options.columnDefaults;\r\n\r\n\t\t//map columnDefaults onto column definitions\r\n\t\tif(defaults){\r\n\t\t\tfor(let key in defaults){\r\n\t\t\t\tif(typeof this.definition[key] === \"undefined\"){\r\n\t\t\t\t\tthis.definition[key] = defaults[key];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.definition = this.table.columnManager.optionsList.generate(Column.defaultOptionList, this.definition)\r\n\t}\r\n\r\n\tcheckDefinition(){\r\n\t\tObject.keys(this.definition).forEach((key) => {\r\n\t\t\tif(Column.defaultOptionList.indexOf(key) === -1){\r\n\t\t\t\tconsole.warn(\"Invalid column definition option in '\" + (this.field || this.definition.title) + \"' column:\", key)\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tsetField(field){\r\n\t\tthis.field = field;\r\n\t\tthis.fieldStructure = field ? (this.table.options.nestedFieldSeparator ? field.split(this.table.options.nestedFieldSeparator) : [field]) : [];\r\n\t\tthis.getFieldValue = this.fieldStructure.length > 1 ? this._getNestedData : this._getFlatData;\r\n\t\tthis.setFieldValue = this.fieldStructure.length > 1 ? this._setNestedData : this._setFlatData;\r\n\t}\r\n\r\n\t//register column position with column manager\r\n\tregisterColumnPosition(column){\r\n\t\tthis.parent.registerColumnPosition(column);\r\n\t}\r\n\r\n\t//register column position with column manager\r\n\tregisterColumnField(column){\r\n\t\tthis.parent.registerColumnField(column);\r\n\t}\r\n\r\n\t//trigger position registration\r\n\treRegisterPosition(){\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tcolumn.reRegisterPosition();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis.registerColumnPosition(this);\r\n\t\t}\r\n\t}\r\n\r\n\t_mapDepricatedFunctionality(){\r\n\t\t//all previously deprecated functionality removed in the 5.0 release\r\n\t}\r\n\r\n\tsetTooltip(){\r\n\t\tvar def = this.definition;\r\n\r\n\t\t//set header tooltips\r\n\t\tvar tooltip = def.headerTooltip;\r\n\r\n\t\tif(tooltip){\r\n\t\t\tif(tooltip === true){\r\n\t\t\t\tif(def.field){\r\n\t\t\t\t\tthis.langBind(\"columns|\" + def.field, (value) => {\r\n\t\t\t\t\t\tthis.element.setAttribute(\"title\", value || def.title);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.element.setAttribute(\"title\", def.title);\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tif(typeof(tooltip) == \"function\"){\r\n\t\t\t\t\ttooltip = tooltip(this.getComponent());\r\n\r\n\t\t\t\t\tif(tooltip === false){\r\n\t\t\t\t\t\ttooltip = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.element.setAttribute(\"title\", tooltip);\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tthis.element.setAttribute(\"title\", \"\");\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element\r\n\t_initialize(){\r\n\t\tvar def = this.definition;\r\n\r\n\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\tif(def.headerVertical){\r\n\t\t\tthis.element.classList.add(\"tabulator-col-vertical\");\r\n\r\n\t\t\tif(def.headerVertical === \"flip\"){\r\n\t\t\t\tthis.element.classList.add(\"tabulator-col-vertical-flip\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.contentElement = this._bindEvents();\r\n\r\n\t\tthis.contentElement = this._buildColumnHeaderContent();\r\n\r\n\t\tthis.element.appendChild(this.contentElement);\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis._buildGroupHeader();\r\n\t\t}else{\r\n\t\t\tthis._buildColumnHeader();\r\n\t\t}\r\n\r\n\t\tthis.setTooltip();\r\n\r\n\t\tthis.dispatch(\"column-init\", this);\r\n\r\n\t\t//update header tooltip on mouse enter\r\n\t\tthis.element.addEventListener(\"mouseenter\", (e) => {\r\n\t\t\tthis.setTooltip();\r\n\t\t});\r\n\t}\r\n\r\n\t_bindEvents(){\r\n\t\tvar def = this.definition,\r\n\t\tdblTap,\ttapHold, tap;\r\n\r\n\t\t//setup header click event bindings\r\n\t\tif(typeof(def.headerClick) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"click\", (e) => {def.headerClick(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerDblClick) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"dblclick\", (e) => {def.headerDblClick(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerContext) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"contextmenu\", (e) => {def.headerContext(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\t//setup header tap event bindings\r\n\t\tif(typeof(def.headerTap) == \"function\"){\r\n\t\t\ttap = false;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchstart\", (e) => {\r\n\t\t\t\ttap = true;\r\n\t\t\t}, {passive: true});\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\t\t\t\tif(tap){\r\n\t\t\t\t\tdef.headerTap(e, this.getComponent());\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttap = false;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerDblTap) == \"function\"){\r\n\t\t\tdblTap = null;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\r\n\t\t\t\tif(dblTap){\r\n\t\t\t\t\tclearTimeout(dblTap);\r\n\t\t\t\t\tdblTap = null;\r\n\r\n\t\t\t\t\tdef.headerDblTap(e, this.getComponent());\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tdblTap = setTimeout(() => {\r\n\t\t\t\t\t\tclearTimeout(dblTap);\r\n\t\t\t\t\t\tdblTap = null;\r\n\t\t\t\t\t}, 300);\r\n\t\t\t\t}\r\n\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerTapHold) == \"function\"){\r\n\t\t\ttapHold = null;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchstart\", (e) => {\r\n\t\t\t\tclearTimeout(tapHold);\r\n\r\n\t\t\t\ttapHold = setTimeout(function(){\r\n\t\t\t\t\tclearTimeout(tapHold);\r\n\t\t\t\t\ttapHold = null;\r\n\t\t\t\t\ttap = false;\r\n\t\t\t\t\tdef.headerTapHold(e, this.getComponent());\r\n\t\t\t\t}, 1000);\r\n\r\n\t\t\t}, {passive: true});\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\t\t\t\tclearTimeout(tapHold);\r\n\t\t\t\ttapHold = null;\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element for header\r\n\t_buildColumnHeader(){\r\n\t\tvar def = this.definition,\r\n\t\ttable = this.table;\r\n\r\n\t\tthis.dispatch(\"column-layout\", this);\r\n\r\n\t\t//set column visibility\r\n\t\tif(typeof def.visible != \"undefined\"){\r\n\t\t\tif(def.visible){\r\n\t\t\t\tthis.show(true);\r\n\t\t\t}else{\r\n\t\t\t\tthis.hide(true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//asign additional css classes to column header\r\n\t\tif(def.cssClass){\r\n\t\t\tvar classeNames = def.cssClass.split(\" \");\r\n\t\t\tclasseNames.forEach((className) => {\r\n\t\t\t\tthis.element.classList.add(className);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(def.field){\r\n\t\t\tthis.element.setAttribute(\"tabulator-field\", def.field);\r\n\t\t}\r\n\r\n\t\t//set min width if present\r\n\t\tthis.setMinWidth(parseInt(def.minWidth));\r\n\r\n\t\tif (def.maxInitialWidth) {\r\n\t\t\tthis.maxInitialWidth = parseInt(def.maxInitialWidth);\r\n\t\t}\r\n\t\t\r\n\t\tif(def.maxWidth){\r\n\t\t\tthis.setMaxWidth(parseInt(def.maxWidth));\r\n\t\t}\r\n\r\n\t\tthis.reinitializeWidth();\r\n\r\n\t\t//set tooltip if present\r\n\t\tthis.tooltip = this.definition.tooltip;\r\n\r\n\t\t//set orizontal text alignment\r\n\t\tthis.hozAlign = this.definition.hozAlign;\r\n\t\tthis.vertAlign = this.definition.vertAlign;\r\n\r\n\t\tthis.titleElement.style.textAlign = this.definition.headerHozAlign;\r\n\t}\r\n\r\n\t_buildColumnHeaderContent(){\r\n\t\tvar def = this.definition,\r\n\t\ttable = this.table;\r\n\r\n\t\tvar contentElement = document.createElement(\"div\");\r\n\t\tcontentElement.classList.add(\"tabulator-col-content\");\r\n\r\n\t\tthis.titleHolderElement = document.createElement(\"div\");\r\n\t\tthis.titleHolderElement.classList.add(\"tabulator-col-title-holder\");\r\n\r\n\t\tcontentElement.appendChild(this.titleHolderElement);\r\n\r\n\t\tthis.titleElement = this._buildColumnHeaderTitle();\r\n\r\n\t\tthis.titleHolderElement.appendChild(this.titleElement);\r\n\r\n\t\treturn contentElement;\r\n\t}\r\n\r\n\t//build title element of column\r\n\t_buildColumnHeaderTitle(){\r\n\t\tvar def = this.definition,\r\n\t\ttitle;\r\n\r\n\t\tvar titleHolderElement = document.createElement(\"div\");\r\n\t\ttitleHolderElement.classList.add(\"tabulator-col-title\");\r\n\r\n\t\tif(def.editableTitle){\r\n\t\t\tvar titleElement = document.createElement(\"input\");\r\n\t\t\ttitleElement.classList.add(\"tabulator-title-editor\");\r\n\r\n\t\t\ttitleElement.addEventListener(\"click\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\ttitleElement.focus();\r\n\t\t\t});\r\n\r\n\t\t\ttitleElement.addEventListener(\"change\", () => {\r\n\t\t\t\tdef.title = titleElement.value;\r\n\t\t\t\tthis.dispatchExternal(\"columnTitleChanged\", this.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\ttitleHolderElement.appendChild(titleElement);\r\n\r\n\t\t\tif(def.field){\r\n\t\t\t\tthis.langBind(\"columns|\" + def.field, (text) => {\r\n\t\t\t\t\ttitleElement.value = text || (def.title || \" \");\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\ttitleElement.value = def.title || \" \";\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tif(def.field){\r\n\t\t\t\tthis.langBind(\"columns|\" + def.field, (text) => {\r\n\t\t\t\t\tthis._formatColumnHeaderTitle(titleHolderElement, text || (def.title || \" \"));\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tthis._formatColumnHeaderTitle(titleHolderElement, def.title || \" \");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn titleHolderElement;\r\n\t}\r\n\r\n\t_formatColumnHeaderTitle(el, title){\r\n\t\tvar contents = this.chain(\"column-format\", [this, title, el], null, () => {\r\n\t\t\treturn title;\r\n\t\t});\r\n\r\n\t\tswitch(typeof contents){\r\n\t\t\tcase \"object\":\r\n\t\t\tif(contents instanceof Node){\r\n\t\t\t\tel.appendChild(contents);\r\n\t\t\t}else{\r\n\t\t\t\tel.innerHTML = \"\";\r\n\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);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\tcase \"null\":\r\n\t\t\tel.innerHTML = \"\";\r\n\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\tel.innerHTML = contents;\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element for column group\r\n\t_buildGroupHeader(){\r\n\t\tthis.element.classList.add(\"tabulator-col-group\");\r\n\t\tthis.element.setAttribute(\"role\", \"columngroup\");\r\n\t\tthis.element.setAttribute(\"aria-title\", this.definition.title);\r\n\r\n\t\t//asign additional css classes to column header\r\n\t\tif(this.definition.cssClass){\r\n\t\t\tvar classeNames = this.definition.cssClass.split(\" \");\r\n\t\t\tclasseNames.forEach((className) => {\r\n\t\t\t\tthis.element.classList.add(className);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.titleElement.style.textAlign = this.definition.headerHozAlign;\r\n\r\n\t\tthis.element.appendChild(this.groupElement);\r\n\t}\r\n\r\n\t//flat field lookup\r\n\t_getFlatData(data){\r\n\t\treturn data[this.field];\r\n\t}\r\n\r\n\t//nested field lookup\r\n\t_getNestedData(data){\r\n\t\tvar dataObj = data,\r\n\t\tstructure = this.fieldStructure,\r\n\t\tlength = structure.length,\r\n\t\toutput;\r\n\r\n\t\tfor(let i = 0; i < length; i++){\r\n\r\n\t\t\tdataObj = dataObj[structure[i]];\r\n\r\n\t\t\toutput = dataObj;\r\n\r\n\t\t\tif(!dataObj){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//flat field set\r\n\t_setFlatData(data, value){\r\n\t\tif(this.field){\r\n\t\t\tdata[this.field] = value;\r\n\t\t}\r\n\t}\r\n\r\n\t//nested field set\r\n\t_setNestedData(data, value){\r\n\t\tvar dataObj = data,\r\n\t\tstructure = this.fieldStructure,\r\n\t\tlength = structure.length;\r\n\r\n\t\tfor(let i = 0; i < length; i++){\r\n\r\n\t\t\tif(i == length -1){\r\n\t\t\t\tdataObj[structure[i]] = value;\r\n\t\t\t}else{\r\n\t\t\t\tif(!dataObj[structure[i]]){\r\n\t\t\t\t\tif(typeof value !== \"undefined\"){\r\n\t\t\t\t\t\tdataObj[structure[i]] = {};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdataObj = dataObj[structure[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//attach column to this group\r\n\tattachColumn(column){\r\n\t\tif(this.groupElement){\r\n\t\t\tthis.columns.push(column);\r\n\t\t\tthis.groupElement.appendChild(column.getElement());\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Warning - Column being attached to another column instead of column group\");\r\n\t\t}\r\n\t}\r\n\r\n\t//vertically align header in column\r\n\tverticalAlign(alignment, height){\r\n\r\n\t\t//calculate height of column header and group holder element\r\n\t\tvar parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : (height || this.parent.getHeadersElement().clientHeight);\r\n\t\t// var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : this.parent.getHeadersElement().clientHeight;\r\n\r\n\t\tthis.element.style.height = parentHeight + \"px\";\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.groupElement.style.minHeight = (parentHeight - this.contentElement.offsetHeight) + \"px\";\r\n\t\t}\r\n\r\n\t\t//vertically align cell contents\r\n\t\tif(!this.isGroup && alignment !== \"top\"){\r\n\t\t\tif(alignment === \"bottom\"){\r\n\t\t\t\tthis.element.style.paddingTop = (this.element.clientHeight - this.contentElement.offsetHeight) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.paddingTop = ((this.element.clientHeight - this.contentElement.offsetHeight) / 2) + \"px\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.verticalAlign(alignment);\r\n\t\t});\r\n\t}\r\n\r\n\t//clear vertical alignmenet\r\n\tclearVerticalAlign(){\r\n\t\tthis.element.style.paddingTop = \"\";\r\n\t\tthis.element.style.height = \"\";\r\n\t\tthis.element.style.minHeight = \"\";\r\n\t\tthis.groupElement.style.minHeight = \"\";\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.clearVerticalAlign();\r\n\t\t});\r\n\t}\r\n\r\n\tbindModuleColumns (){\r\n\t\t//check if rownum formatter is being used on a column\r\n\t\tif(this.definition.formatter == \"rownum\"){\r\n\t\t\tthis.table.rowManager.rowNumColumn = this;\r\n\t\t}\r\n\t}\r\n\r\n\t//// Retreive Column Information ////\r\n\t//return column header element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\t//return colunm group element\r\n\tgetGroupElement(){\r\n\t\treturn this.groupElement;\r\n\t}\r\n\r\n\t//return field name\r\n\tgetField(){\r\n\t\treturn this.field;\r\n\t}\r\n\r\n\tgetTitleDownload() {\r\n\t\treturn this.titleDownload;\r\n\t}\r\n\r\n\t//return the first column in a group\r\n\tgetFirstColumn(){\r\n\t\tif(!this.isGroup){\r\n\t\t\treturn this;\r\n\t\t}else{\r\n\t\t\tif(this.columns.length){\r\n\t\t\t\treturn this.columns[0].getFirstColumn();\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//return the last column in a group\r\n\tgetLastColumn(){\r\n\t\tif(!this.isGroup){\r\n\t\t\treturn this;\r\n\t\t}else{\r\n\t\t\tif(this.columns.length){\r\n\t\t\t\treturn this.columns[this.columns.length -1].getLastColumn();\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//return all columns in a group\r\n\tgetColumns(){\r\n\t\treturn this.columns;\r\n\t}\r\n\r\n\t//return all columns in a group\r\n\tgetCells(){\r\n\t\treturn this.cells;\r\n\t}\r\n\r\n\t//retreive the top column in a group of columns\r\n\tgetTopColumn(){\r\n\t\tif(this.parent.isGroup){\r\n\t\t\treturn this.parent.getTopColumn();\r\n\t\t}else{\r\n\t\t\treturn this;\r\n\t\t}\r\n\t}\r\n\r\n\t//return column definition object\r\n\tgetDefinition(updateBranches){\r\n\t\tvar colDefs = [];\r\n\r\n\t\tif(this.isGroup && updateBranches){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tcolDefs.push(column.getDefinition(true));\r\n\t\t\t});\r\n\r\n\t\t\tthis.definition.columns = colDefs;\r\n\t\t}\r\n\r\n\t\treturn this.definition;\r\n\t}\r\n\r\n\t//////////////////// Actions ////////////////////\r\n\tcheckColumnVisibility(){\r\n\t\tvar visible = false;\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvisible = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(visible){\r\n\t\t\tthis.show();\r\n\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), false);\r\n\t\t}else{\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\r\n\t//show column\r\n\tshow(silent, responsiveToggle){\r\n\t\tif(!this.visible){\r\n\t\t\tthis.visible = true;\r\n\r\n\t\t\tthis.element.style.display = \"\";\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.checkColumnVisibility();\r\n\t\t\t}\r\n\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.show();\r\n\t\t\t});\r\n\r\n\t\t\tif(!this.isGroup && this.width === null){\r\n\t\t\t\tthis.reinitializeWidth();\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.columnManager.verticalAlignHeaders();\r\n\r\n\t\t\tthis.dispatch(\"column-show\", this, responsiveToggle);\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), true);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\r\n\t\t\tif(!this.silent){\r\n\t\t\t\tthis.table.columnManager.renderer.rerenderColumns();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//hide column\r\n\thide(silent, responsiveToggle){\r\n\t\tif(this.visible){\r\n\t\t\tthis.visible = false;\r\n\r\n\t\t\tthis.element.style.display = \"none\";\r\n\r\n\t\t\tthis.table.columnManager.verticalAlignHeaders();\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.checkColumnVisibility();\r\n\t\t\t}\r\n\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.hide();\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatch(\"column-hide\", this, responsiveToggle);\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), false);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\r\n\t\t\tif(!this.silent){\r\n\t\t\t\tthis.table.columnManager.renderer.rerenderColumns();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmatchChildWidths(){\r\n\t\tvar childWidth = 0;\r\n\r\n\t\tif(this.contentElement && this.columns.length){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tif(column.visible){\r\n\t\t\t\t\tchildWidth += column.getWidth();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.contentElement.style.maxWidth = (childWidth - 1) + \"px\";\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tremoveChild(child){\r\n\t\tvar index = this.columns.indexOf(child);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columns.splice(index, 1);\r\n\t\t}\r\n\r\n\t\tif(!this.columns.length){\r\n\t\t\tthis.delete();\r\n\t\t}\r\n\t}\r\n\r\n\tsetWidth(width){\r\n\t\tthis.widthFixed = true;\r\n\t\tthis.setWidthActual(width);\r\n\t}\r\n\r\n\tsetWidthActual(width){\r\n\t\tif(isNaN(width)){\r\n\t\t\twidth = Math.floor((this.table.element.clientWidth/100) * parseInt(width));\r\n\t\t}\r\n\r\n\t\twidth = Math.max(this.minWidth, width);\r\n\r\n\t\tif(this.maxWidth){\r\n\t\t\twidth = Math.min(this.maxWidth, width);\r\n\t\t}\r\n\r\n\t\tthis.width = width;\r\n\t\tthis.widthStyled = width ? width + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.width = this.widthStyled;\r\n\r\n\t\tif(!this.isGroup){\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.setWidth();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.parent.isGroup){\r\n\t\t\tthis.parent.matchChildWidths();\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"column-width\", this);\r\n\t}\r\n\r\n\tcheckCellHeights(){\r\n\t\tvar rows = [];\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tif(cell.row.heightInitialized){\r\n\t\t\t\tif(cell.row.getElement().offsetParent !== null){\r\n\t\t\t\t\trows.push(cell.row);\r\n\t\t\t\t\tcell.row.clearCellHeight();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcell.row.heightInitialized = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\trow.calcHeight();\r\n\t\t});\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\trow.setCellHeight();\r\n\t\t});\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\tvar width = 0;\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tif(column.visible){\r\n\t\t\t\t\twidth += column.getWidth();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\twidth = this.width;\r\n\t\t}\r\n\r\n\t\treturn width;\r\n\t}\r\n\r\n\tgetHeight(){\r\n\t\treturn Math.ceil(this.element.getBoundingClientRect().height);\r\n\t}\r\n\r\n\tsetMinWidth(minWidth){\r\n\t\tthis.minWidth = minWidth;\r\n\t\tthis.minWidthStyled = minWidth ? minWidth + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.minWidth = this.minWidthStyled;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setMinWidth();\r\n\t\t});\r\n\t}\r\n\r\n\tsetMaxWidth(maxWidth){\r\n\t\tthis.maxWidth = maxWidth;\r\n\t\tthis.maxWidthStyled = maxWidth ? maxWidth + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.maxWidth = this.maxWidthStyled;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setMaxWidth();\r\n\t\t});\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar index;\r\n\r\n\t\t\tif(this.isGroup){\r\n\t\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\t\tcolumn.delete();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"column-delete\", this);\r\n\r\n\t\t\tvar cellCount = this.cells.length;\r\n\r\n\t\t\tfor(let i = 0; i < cellCount; i++){\r\n\t\t\t\tthis.cells[0].delete();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.element.parentNode){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element = false;\r\n\t\t\tthis.contentElement = false;\r\n\t\t\tthis.titleElement = false;\r\n\t\t\tthis.groupElement = false;\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.removeChild(this);\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.columnManager.deregisterColumn(this);\r\n\r\n\t\t\tthis.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\r\n\tcolumnRendered(){\r\n\t\tif(this.titleFormatterRendered){\r\n\t\t\tthis.titleFormatterRendered();\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\t//generate cell for this column\r\n\tgenerateCell(row){\r\n\t\tvar cell = new Cell(this, row);\r\n\r\n\t\tthis.cells.push(cell);\r\n\r\n\t\treturn cell;\r\n\t}\r\n\r\n\tnextColumn(){\r\n\t\tvar index = this.table.columnManager.findColumnIndex(this);\r\n\t\treturn index > -1 ? this._nextVisibleColumn(index + 1) : false;\r\n\t}\r\n\r\n\t_nextVisibleColumn(index){\r\n\t\tvar column = this.table.columnManager.getColumnByIndex(index);\r\n\t\treturn !column || column.visible ? column : this._nextVisibleColumn(index + 1);\r\n\t}\r\n\r\n\tprevColumn(){\r\n\t\tvar index = this.table.columnManager.findColumnIndex(this);\r\n\t\treturn index > -1 ? this._prevVisibleColumn(index - 1) : false;\r\n\t}\r\n\r\n\t_prevVisibleColumn(index){\r\n\t\tvar column = this.table.columnManager.getColumnByIndex(index);\r\n\t\treturn !column || column.visible ? column : this._prevVisibleColumn(index - 1);\r\n\t}\r\n\r\n\treinitializeWidth(force){\r\n\t\tthis.widthFixed = false;\r\n\r\n\t\t//set width if present\r\n\t\tif(typeof this.definition.width !== \"undefined\" && !force){\r\n\t\t\t// maxInitialWidth ignored here as width specified\r\n\t\t\tthis.setWidth(this.definition.width);\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"column-width-fit-before\", this);\r\n\r\n\t\tthis.fitToData(force);\r\n\r\n\t\tthis.dispatch(\"column-width-fit-after\", this);\r\n\t}\r\n\r\n\t//set column width to maximum cell width for non group columns\r\n\tfitToData(force){\r\n\t\tif(this.isGroup){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif(!this.widthFixed){\r\n\t\t\tthis.element.style.width = \"\";\r\n\r\n\t\t\tthis.cells.forEach((cell) => {\r\n\t\t\t\tcell.clearWidth();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tvar maxWidth = this.element.offsetWidth;\r\n\r\n\t\tif(!this.width || !this.widthFixed){\r\n\t\t\tthis.cells.forEach((cell) => {\r\n\t\t\t\tvar width = cell.getWidth();\r\n\r\n\t\t\t\tif(width > maxWidth){\r\n\t\t\t\t\tmaxWidth = width;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(maxWidth){\r\n\t\t\t\tvar setTo = maxWidth + 1;\r\n\t\t\t\tif (this.maxInitialWidth && !force) {\r\n\t\t\t\t\tsetTo = Math.min(setTo, this.maxInitialWidth);\r\n\t\t\t\t}\r\n\t\t\t\tthis.setWidthActual(setTo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateDefinition(updates){\r\n\t\tvar definition;\r\n\r\n\t\tif(!this.isGroup){\r\n\t\t\tif(!this.parent.isGroup){\r\n\t\t\t\tdefinition = Object.assign({}, this.getDefinition());\r\n\t\t\t\tdefinition = Object.assign(definition, updates);\r\n\r\n\t\t\t\treturn this.table.columnManager.addColumn(definition, false, this)\r\n\t\t\t\t.then((column) => {\r\n\r\n\t\t\t\t\tif(definition.field == this.field){\r\n\t\t\t\t\t\tthis.field = false; //cleair field name to prevent deletion of duplicate column from arrays\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn this.delete()\r\n\t\t\t\t\t.then(() => {\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Column Update Error - The updateDefinition function is only available on ungrouped columns\");\r\n\t\t\t\treturn Promise.reject(\"Column Update Error - The updateDefinition function is only available on columns, not column groups\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Column Update Error - The updateDefinition function is only available on ungrouped columns\");\r\n\t\t\treturn Promise.reject(\"Column Update Error - The updateDefinition function is only available on columns, not column groups\");\r\n\t\t}\r\n\t}\r\n\r\n\tdeleteCell(cell){\r\n\t\tvar index = this.cells.indexOf(cell);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.cells.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new ColumnComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}\r\n\r\nColumn.defaultOptionList = defaultOptions;\r\n\r\nexport default Column;","export default class Helpers{\r\n\r\n\tstatic elVisible(el){\r\n\t\treturn !(el.offsetWidth <= 0 && el.offsetHeight <= 0);\r\n\t}\r\n\r\n\tstatic elOffset(el){\r\n\t\tvar box = el.getBoundingClientRect();\r\n\r\n\t\treturn {\r\n\t\t\ttop: box.top + window.pageYOffset - document.documentElement.clientTop,\r\n\t\t\tleft: box.left + window.pageXOffset - document.documentElement.clientLeft\r\n\t\t};\r\n\t}\r\n\r\n\tstatic deepClone(obj, clone, list = []){\r\n\t\tvar objectProto = {}.__proto__,\r\n\t\tarrayProto = [].__proto__;\r\n\r\n\t\tif (!clone){\r\n\t\t\tclone = Object.assign(Array.isArray(obj) ? [] : {}, obj);\r\n\t\t}\r\n\r\n\t\tfor(var i in obj) {\r\n\t\t\tlet subject = obj[i],\r\n\t\t\tmatch, copy;\r\n\r\n\t\t\tif(subject != null && typeof subject === \"object\" && (subject.__proto__ === objectProto || subject.__proto__ === arrayProto)){\r\n\t\t\t\tmatch = list.findIndex((item) => {\r\n\t\t\t\t\treturn item.subject === subject;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(match > -1){\r\n\t\t\t\t\tclone[i] = list[match].copy;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcopy = Object.assign(Array.isArray(subject) ? [] : {}, subject);\r\n\r\n\t\t\t\t\tlist.unshift({subject, copy});\r\n\r\n\t\t\t\t\tclone[i] = this.deepClone(subject, copy, list);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn clone;\r\n\t}\r\n}","export default class OptionsList {\r\n\tconstructor(table, msgType, defaults = {}){\r\n\t\tthis.table = table;\r\n\t\tthis.msgType = msgType;\r\n\t\tthis.registeredDefaults = Object.assign({}, defaults)\r\n\t}\r\n\r\n\tregister(option, value){\r\n\t\tthis.registeredDefaults[option] = value;\r\n\t}\r\n\r\n\tgenerate(defaultOptions, userOptions = {}){\r\n\t\tvar output = Object.assign({}, this.registeredDefaults);\r\n\r\n\t\tObject.assign(output, defaultOptions);\r\n\r\n\t\tif(userOptions.debugInvalidOptions !== false || this.table.options.debugInvalidOptions){\r\n\t\t\tfor (var key in userOptions){\r\n\t\t\t\tif(!output.hasOwnProperty(key)){\r\n\t\t\t\t\tconsole.warn(\"Invalid \" + this.msgType + \" option:\", key)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var key in output){\r\n\t\t\tif(key in userOptions){\r\n\t\t\t\toutput[key] = userOptions[key];\r\n\t\t\t}else{\r\n\t\t\t\tif(Array.isArray(output[key])){\r\n\t\t\t\t\toutput[key] = Object.assign([], output[key]);\r\n\t\t\t\t}else if(typeof output[key] === \"object\" && output[key] !== null){\r\n\t\t\t\t\toutput[key] = Object.assign({}, output[key]);\r\n\t\t\t\t}else if (typeof output[key] === \"undefined\"){\r\n\t\t\t\t\tdelete output[key];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport Helpers from '../tools/Helpers.js';\r\n\r\nexport default class Renderer extends CoreFeature{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.elementVertical = table.rowManager.element;\r\n\t\tthis.elementHorizontal = table.columnManager.element;\r\n\t\tthis.tableElement = table.rowManager.tableElement;\r\n\r\n\t\tthis.verticalFillMode = \"fit\"; // used by row manager to determin how to size the render area (\"fit\" - fits container to the contents, \"fill\" - fills the contianer without resizing it)\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t/////// Internal Bindings /////////\r\n\t///////////////////////////////////\r\n\r\n\tinitialize(){\r\n\t\t//initialize core functionality\r\n\t}\r\n\r\n\tclearRows(){\r\n\t\t//clear down existing rows layout\r\n\t}\r\n\r\n\tclearColumns(){\r\n\t\t//clear down existing columns layout\r\n\t}\r\n\r\n\r\n\treinitializeColumnWidths(columns){\r\n\t\t//resize columns to fit data\r\n\t}\r\n\r\n\r\n\trenderRows(){\r\n\t\t//render rows from a clean slate\r\n\t}\r\n\r\n\trenderColumns(){\r\n\t\t//render columns from a clean slate\r\n\t}\r\n\r\n\trerenderRows(callback){\r\n\t\t// rerender rows and keep position\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\t}\r\n\r\n\trerenderColumns(update, blockRedraw){\r\n\t\t//rerender columns\r\n\t}\r\n\r\n\trenderRowCells(row){\r\n\t\t//render the cells in a row\r\n\t}\r\n\r\n\trerenderRowCells(row, force){\r\n\t\t//rerender the cells in a row\r\n\t}\r\n\r\n\tscrollColumns(left, dir){\r\n\t\t//handle horizontal scrolling\r\n\t}\r\n\r\n\tscrollRows(top, dir){\r\n\t\t//handle vertical scolling\r\n\t}\r\n\r\n\tresize(){\r\n\t\t//container has rezied, carry out any needed recalculations (DO NOT RERENDER IN THIS FUNCTION)\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\t//scroll to a specific row\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\t//determine weather the row is nearest the top or bottom of the table, retur true for top or false for bottom\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\t//return the visible rows\r\n\t\treturn [];\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t//////// Helper Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\trows(){\r\n\t\treturn this.table.rowManager.getDisplayRows();\r\n\t}\r\n\r\n\tstyleRow(row, index){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tif(index % 2){\r\n\t\t\trowEl.classList.add(\"tabulator-row-even\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-odd\");\r\n\t\t}else{\r\n\t\t\trowEl.classList.add(\"tabulator-row-odd\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-even\");\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t/////// External Triggers /////////\r\n\t/////// (DO NOT OVERRIDE) /////////\r\n\t///////////////////////////////////\r\n\r\n\tclear(){\r\n\t\t//clear down existing layout\r\n\t\tthis.clearRows();\r\n\t\tthis.clearColumns();\r\n\t}\r\n\r\n\trender(){\r\n\t\t//render from a clean slate\r\n\t\tthis.renderRows();\r\n\t\tthis.renderColumns();\r\n\t}\r\n\r\n\trerender(callback){\r\n\t\t// rerender and keep position\r\n\t\tthis.rerenderRows();\r\n\t\tthis.rerenderColumns();\r\n\t}\r\n\r\n\tscrollToRowPosition(row, position, ifVisible){\r\n\t\tvar rowIndex = this.rows().indexOf(row),\r\n\t\trowEl = row.getElement(),\r\n\t\toffset = 0;\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tif(rowIndex > -1){\r\n\r\n\t\t\t\tif(typeof ifVisible === \"undefined\"){\r\n\t\t\t\t\tifVisible = this.table.options.scrollToRowIfVisible;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//check row visibility\r\n\t\t\t\tif(!ifVisible){\r\n\t\t\t\t\tif(Helpers.elVisible(rowEl)){\r\n\t\t\t\t\t\toffset = Helpers.elOffset(rowEl).top - Helpers.elOffset(this.elementVertical).top;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(offset > 0 && offset < this.elementVertical.clientHeight - rowEl.offsetHeight){\r\n\t\t\t\t\t\t\tresolve();\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(typeof position === \"undefined\"){\r\n\t\t\t\t\tposition = this.table.options.scrollToRowPosition;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(position === \"nearest\"){\r\n\t\t\t\t\tposition = this.scrollToRowNearestTop(row) ? \"top\" : \"bottom\"\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//scroll to row\r\n\t\t\t\tthis.scrollToRow(row);\r\n\r\n\t\t\t\t//align to correct position\r\n\t\t\t\tswitch(position){\r\n\t\t\t\t\tcase \"middle\":\r\n\t\t\t\t\tcase \"center\":\r\n\r\n\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop + (rowEl.offsetTop - this.elementVertical.scrollTop) - ((this.elementVertical.scrollHeight - rowEl.offsetTop) / 2);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.clientHeight / 2);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"bottom\":\r\n\r\n\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.scrollHeight - rowEl.offsetTop) + rowEl.offsetHeight;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - this.elementVertical.clientHeight + rowEl.offsetHeight;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresolve();\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - Row not visible\");\r\n\t\t\t\treject(\"Scroll Error - Row not visible\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class BaiscHorizontal extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t}\r\n\r\n\trenderRowCells(row){\r\n\t\trow.cells.forEach((cell) => {\r\n\t\t\trow.element.appendChild(cell.getElement());\r\n\t\t\tcell.cellRendered();\r\n\t\t});\r\n\t}\r\n\r\n\treinitializeColumnWidths(columns){\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t});\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class VirtualDomHorizontal extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.leftCol = 0;\r\n\t\tthis.rightCol = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = 0;\r\n\t\tthis.vDomScrollPosRight = 0;\r\n\t\t\r\n\t\tthis.vDomPadLeft = 0;\r\n\t\tthis.vDomPadRight = 0;\r\n\t\t\r\n\t\tthis.fitDataColAvg = 0;\r\n\t\t\r\n\t\tthis.windowBuffer = 200; //pixel margin to make column visible before it is shown on screen\r\n\t\t\r\n\t\tthis.visibleRows = null;\r\n\r\n\t\tthis.initialized = false;\r\n\t\tthis.isFitData = false;\r\n\t\t\r\n\t\tthis.columns = [];\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.compatibilityCheck();\r\n\t\tthis.layoutCheck();\r\n\t\tthis.vertScrollListen();\r\n\t}\r\n\t\r\n\tcompatibilityCheck(){\r\n\t\tvar columns = this.options(\"columns\"),\r\n\t\tfrozen = false,\r\n\t\tok = true;\r\n\t\t\r\n\t\tif(this.options(\"layout\") == \"fitDataTable\"){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with fitDataTable layout mode\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.options(\"responsiveLayout\")){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with responsive columns\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.options(\"rtl\")){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not currently compatible with RTL text direction\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(columns){\r\n\t\t\tfrozen = columns.find((col) => {\r\n\t\t\t\treturn col.frozen;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(frozen){\r\n\t\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with frozen columns\");\r\n\t\t\t\tok = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// if(!ok){\r\n\t\t// \toptions.virtualDomHoz = false;\r\n\t\t// }\r\n\t\t\r\n\t\treturn ok;\r\n\t}\r\n\t\r\n\tlayoutCheck(){\r\n\t\tthis.isFitData = this.options(\"layout\").startsWith('fitData');\r\n\t}\r\n\r\n\tvertScrollListen(){\r\n\t\tthis.subscribe(\"scroll-vertical\", this.clearVisRowCache.bind(this));\r\n\t\tthis.subscribe(\"data-refreshed\", this.clearVisRowCache.bind(this));\r\n\t}\r\n\r\n\tclearVisRowCache(){\r\n\t\tthis.visibleRows = null;\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t///////// Public Functions ///////////\r\n\t//////////////////////////////////////\r\n\t\r\n\trenderColumns(row, force){\r\n\t\tthis.dataChange();\r\n\t}\r\n\r\n\t\r\n\tscrollColumns(left, dir){\r\n\t\tif(this.scrollLeft != left){\r\n\t\t\tthis.scrollLeft = left;\r\n\t\t\t\r\n\t\t\tthis.scroll(left - (this.vDomScrollPosLeft + this.windowBuffer));\r\n\t\t}\r\n\t}\r\n\t\r\n\tcalcWindowBuffer(){\r\n\t\tvar buffer = this.elementVertical.clientWidth;\r\n\t\t\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvar width = column.getWidth();\r\n\t\t\t\t\r\n\t\t\t\tif(width > buffer){\r\n\t\t\t\t\tbuffer = width;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.windowBuffer = buffer * 2;\r\n\t}\r\n\t\r\n\trerenderColumns(update, blockRedraw){\t\t\r\n\t\tvar old = {\r\n\t\t\tcols:this.columns,\r\n\t\t\tleftCol:this.leftCol,\r\n\t\t\trightCol:this.rightCol,\r\n\t\t},\r\n\t\tcolPos = 0;\r\n\t\t\r\n\t\t\r\n\t\tif(update && !this.initialized){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tthis.clear();\r\n\t\t\r\n\t\tthis.calcWindowBuffer();\r\n\t\t\r\n\t\tthis.scrollLeft = this.elementVertical.scrollLeft;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = this.scrollLeft - this.windowBuffer;\r\n\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\r\n\t\t\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tvar config = {};\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvar width = column.getWidth();\r\n\t\t\t\t\r\n\t\t\t\tconfig.leftPos = colPos;\r\n\t\t\t\tconfig.rightPos = colPos + width;\r\n\t\t\t\t\r\n\t\t\t\tconfig.width = width;\r\n\t\t\t\t\r\n\t\t\t\tif (this.isFitData) {\r\n\t\t\t\t\tconfig.fitDataCheck = column.modules.vdomHoz ? column.modules.vdomHoz.fitDataCheck : true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif((colPos + width > this.vDomScrollPosLeft) && (colPos < this.vDomScrollPosRight)){\r\n\t\t\t\t\t//column is visible\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.leftCol == -1){\r\n\t\t\t\t\t\tthis.leftCol = this.columns.length;\r\n\t\t\t\t\t\tthis.vDomPadLeft = colPos;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.rightCol = this.columns.length;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// column is hidden\r\n\t\t\t\t\tif(this.leftCol !== -1){\r\n\t\t\t\t\t\tthis.vDomPadRight += width;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.columns.push(column);\r\n\t\t\t\t\r\n\t\t\t\tcolumn.modules.vdomHoz = config;\r\n\t\t\t\t\r\n\t\t\t\tcolPos += width;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t\r\n\t\tthis.initialized = true;\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tif(!update || this.reinitChanged(old)){\r\n\t\t\t\tthis.reinitializeRows();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.elementVertical.scrollLeft = this.scrollLeft;\r\n\t}\r\n\t\r\n\trenderRowCells(row){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.initializeRow(row);\r\n\t\t}else{\r\n\t\t\trow.cells.forEach((cell) => {\r\n\t\t\t\trow.element.appendChild(cell.getElement());\r\n\t\t\t\tcell.cellRendered();\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\trerenderRowCells(row, force){\r\n\t\tthis.reinitializeRow(row, force);\r\n\t}\r\n\t\r\n\treinitializeColumnWidths(columns){\r\n\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\r\n\t\t\tthis.columns[i].reinitializeWidth();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t//////// Internal Rendering //////////\r\n\t//////////////////////////////////////\r\n\t\r\n\tdeinitialize(){\r\n\t\tthis.initialized = false;\r\n\t}\r\n\t\r\n\tclear(){\r\n\t\tthis.columns = [];\r\n\t\t\r\n\t\tthis.leftCol = -1;\r\n\t\tthis.rightCol = 0;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = 0;\r\n\t\tthis.vDomScrollPosRight = 0;\r\n\t\tthis.vDomPadLeft = 0;\r\n\t\tthis.vDomPadRight = 0;\r\n\t}\r\n\t\r\n\tdataChange(){\r\n\t\tvar change = false,\r\n\t\tcollsWidth = 0,\r\n\t\tcolEnd = 0,\r\n\t\tgroup, row, rowEl;\r\n\t\t\r\n\t\tif(this.isFitData){\r\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\t\tif(!column.definition.width && column.visible){\r\n\t\t\t\t\tchange = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(change){\r\n\t\t\t\tif(change && this.table.rowManager.getDisplayRows().length){\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar row = this.chain(\"rows-sample\", [1], [], () => {\r\n\t\t\t\t\t\treturn this.table.rowManager.getDisplayRows();\r\n\t\t\t\t\t})[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trowEl = row.getElement();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trow.generateCells();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.tableElement.appendChild(rowEl);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfor(var colEnd = 0; colEnd < row.cells.length; colEnd++){\r\n\t\t\t\t\t\t\tlet cell = row.cells[colEnd];\r\n\t\t\t\t\t\t\trowEl.appendChild(cell.getElement());\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcell.column.reinitializeWidth();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcollsWidth += cell.column.getWidth();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// if(collsWidth > this.vDomScrollPosRight){\r\n\t\t\t\t\t\t\t// \tbreak;\r\n\t\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// this.fitDataColAvg = Math.floor(collsWidth / (colEnd + 1));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// for(colEnd; colEnd < this.table.columnManager.columnsByIndex.length; colEnd++){\r\n\t\t\t\t\t\t// \tthis.table.columnManager.columnsByIndex[colEnd].setWidth(this.fitDataColAvg);\r\n\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.rerenderColumns(false, true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.options(\"layout\") === \"fitColumns\"){\r\n\t\t\t\tthis.layoutRefresh();\r\n\t\t\t\tthis.rerenderColumns(false, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitChanged(old){\r\n\t\tvar match = true;\r\n\t\t\r\n\t\tif(old.cols.length !== this.columns.length || old.leftCol !== this.leftCol || old.rightCol !== this.rightCol){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\told.cols.forEach((col, i) => {\r\n\t\t\tif(col !== this.columns[i]){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn !match;\r\n\t}\r\n\t\r\n\treinitializeRows(){\r\n\t\tvar rows = this.getVisibleRows();\r\n\t\trows.forEach((row) => {\r\n\t\t\tthis.reinitializeRow(row, true);\r\n\t\t});\r\n\t}\r\n\t\r\n\tgetVisibleRows(){\r\n\t\tif (!this.visibleRows){\r\n\t\t\tthis.visibleRows = this.table.rowManager.getVisibleRows();\r\n\t\t}\r\n\r\n\t\treturn this.visibleRows;\t\r\n\t}\r\n\t\r\n\tscroll(diff){\r\n\t\tthis.vDomScrollPosLeft += diff;\r\n\t\tthis.vDomScrollPosRight += diff;\r\n\r\n\t\tif(Math.abs(diff) > (this.windowBuffer / 2)){\r\n\t\t\tthis.rerenderColumns();\r\n\t\t}else{\r\n\t\t\tif(diff > 0){\r\n\t\t\t\t//scroll right\r\n\t\t\t\tthis.addColRight();\r\n\t\t\t\tthis.removeColLeft();\r\n\t\t\t}else{\r\n\t\t\t\t//scroll left\r\n\t\t\t\tthis.addColLeft();\r\n\t\t\t\tthis.removeColRight();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tcolPositionAdjust (start, end, diff){\r\n\t\tfor(let i = start; i < end; i++){\r\n\t\t\tlet column = this.columns[i];\r\n\t\t\t\r\n\t\t\tcolumn.modules.vdomHoz.leftPos += diff;\r\n\t\t\tcolumn.modules.vdomHoz.rightPos += diff;\r\n\t\t}\r\n\t}\r\n\t\r\n\taddColRight(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\t\r\n\t\t\tlet column = this.columns[this.rightCol + 1];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.leftPos <= this.vDomScrollPosRight){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\trow.getElement().appendChild(cell.getElement());\r\n\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.fitDataColActualWidthCheck(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.rightCol++; // Don't move this below the >= check below\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.rightCol >= (this.columns.length - 1)){\r\n\t\t\t\t\t\tthis.vDomPadRight = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomPadRight -= column.getWidth();\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\taddColLeft(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.leftCol - 1];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.rightPos >= this.vDomScrollPosLeft){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\trow.getElement().prepend(cell.getElement());\r\n\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.leftCol--; // don't move this below the <= check below\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.leftCol <= 0){ // replicating logic in addColRight\r\n\t\t\t\t\t\tthis.vDomPadLeft = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomPadLeft -= column.getWidth();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tlet diff = this.fitDataColActualWidthCheck(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(diff){\r\n\t\t\t\t\t\tthis.scrollLeft = this.elementVertical.scrollLeft = this.elementVertical.scrollLeft + diff;\r\n\t\t\t\t\t\tthis.vDomPadRight -= diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveColRight(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.rightCol];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.leftPos > this.vDomScrollPosRight){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\trow.getElement().removeChild(cell.getElement());\r\n\t\t\t\t\t\t\t} catch (ex) {\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Could not removeColRight\", ex.message)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomPadRight += column.getWidth();\r\n\t\t\t\t\tthis.rightCol --;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveColLeft(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.leftCol];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.rightPos < this.vDomScrollPosLeft){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\t\t\t\t\t\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\trow.getElement().removeChild(cell.getElement());\r\n\t\t\t\t\t\t\t} catch (ex) {\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Could not removeColLeft\", ex.message)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomPadLeft += column.getWidth();\r\n\t\t\t\t\tthis.leftCol ++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\tfitDataColActualWidthCheck(column){\r\n\t\tvar newWidth, widthDiff;\r\n\t\t\r\n\t\tif(column.modules.vdomHoz.fitDataCheck){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t\t\r\n\t\t\tnewWidth = column.getWidth();\r\n\t\t\twidthDiff = newWidth - column.modules.vdomHoz.width;\r\n\t\t\t\r\n\t\t\tif(widthDiff){\r\n\t\t\t\tcolumn.modules.vdomHoz.rightPos += widthDiff;\r\n\t\t\t\tcolumn.modules.vdomHoz.width = newWidth;\r\n\t\t\t\tthis.colPositionAdjust(this.columns.indexOf(column) + 1, this.columns.length, widthDiff);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcolumn.modules.vdomHoz.fitDataCheck = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn widthDiff;\r\n\t}\r\n\t\r\n\tinitializeRow(row){\r\n\t\tif(row.type !== \"group\"){\r\n\t\t\trow.modules.vdomHoz = {\r\n\t\t\t\tleftCol:this.leftCol,\r\n\t\t\t\trightCol:this.rightCol,\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\r\n\t\t\t\tlet column = this.columns[i];\r\n\t\t\t\t\r\n\t\t\t\tif(column && column.visible){\r\n\t\t\t\t\tlet cell = row.getCell(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\trow.getElement().appendChild(cell.getElement());\r\n\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitializeRow(row, force){\r\n\t\tif(row.type !== \"group\"){\r\n\t\t\tif(force || !row.modules.vdomHoz || row.modules.vdomHoz.leftCol !== this.leftCol || row.modules.vdomHoz.rightCol !== this.rightCol){\r\n\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\twhile(rowEl.firstChild) rowEl.removeChild(rowEl.firstChild);\r\n\t\t\t\t\r\n\t\t\t\tthis.initializeRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\nimport Column from './column/Column.js';\r\nimport ColumnComponent from './column/ColumnComponent.js';\r\nimport Helpers from './tools/Helpers.js';\r\nimport OptionsList from './tools/OptionsList.js';\r\n\r\nimport RendererBasicHorizontal from './rendering/renderers/BasicHorizontal.js';\r\nimport RendererVirtualDomHorizontal from './rendering/renderers/VirtualDomHorizontal.js';\r\n\r\nimport defaultColumnOptions from './column/defaults/options.js';\r\n\r\nexport default class ColumnManager extends CoreFeature {\r\n\r\n\tconstructor (table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.blockHozScrollEvent = false;\r\n\t\tthis.headersElement = null;\r\n\t\tthis.element = null ; //containing element\r\n\t\tthis.columns = []; // column definition object\r\n\t\tthis.columnsByIndex = []; //columns by index\r\n\t\tthis.columnsByField = {}; //columns by field\r\n\t\tthis.scrollLeft = 0;\r\n\t\tthis.optionsList = new OptionsList(this.table, \"column definition\", defaultColumnOptions);\r\n\r\n\t\tthis.renderer = null;\r\n\t}\r\n\r\n\t////////////// Setup Functions /////////////////\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeRenderer();\r\n\r\n\t\tthis.headersElement = this.createHeadersElement();\r\n\t\tthis.element = this.createHeaderElement();\r\n\r\n\t\tthis.element.insertBefore(this.headersElement, this.element.firstChild);\r\n\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t}\r\n\r\n\tinitializeRenderer(){\r\n\t\tvar renderClass;\r\n\r\n\t\tvar renderers = {\r\n\t\t\t\"virtual\": RendererVirtualDomHorizontal,\r\n\t\t\t\"basic\": RendererBasicHorizontal,\r\n\t\t};\r\n\r\n\t\tif(typeof this.table.options.renderHorizontal === \"string\"){\r\n\t\t\trenderClass = renderers[this.table.options.renderHorizontal];\r\n\t\t}else{\r\n\t\t\trenderClass = this.table.options.renderHorizontal;\r\n\t\t}\r\n\r\n\t\tif(renderClass){\r\n\t\t\tthis.renderer = new renderClass(this.table, this.element, this.tableElement);\r\n\t\t\tthis.renderer.initialize();\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Unable to find matching renderer:\", table.options.renderHorizontal);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tcreateHeadersElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-headers\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateHeaderElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-header\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\r\n\t\tif(!this.table.options.headerVisible){\r\n\t\t\tel.classList.add(\"tabulator-header-hidden\");\r\n\t\t}\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\t//return containing element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\t//return header containing element\r\n\tgetHeadersElement(){\r\n\t\treturn this.headersElement;\r\n\t}\r\n\r\n\t//scroll horizontally to match table body\r\n\tscrollHorizontal(left){\r\n\t\tvar hozAdjust = 0,\r\n\t\tscrollWidth = this.element.scrollWidth - this.table.element.clientWidth;\r\n\r\n\t\t// this.tempScrollBlock();\r\n\t\tthis.element.scrollLeft = left;\r\n\r\n\t\t//adjust for vertical scrollbar moving table when present\r\n\t\tif(left > scrollWidth){\r\n\t\t\thozAdjust = left - scrollWidth;\r\n\t\t\tthis.element.style.marginLeft = (-(hozAdjust)) + \"px\";\r\n\t\t}else{\r\n\t\t\tthis.element.style.marginLeft = 0;\r\n\t\t}\r\n\r\n\t\tthis.scrollLeft = left;\r\n\r\n\t\tthis.renderer.scrollColumns(left);\r\n\t}\r\n\r\n\t///////////// Column Setup Functions /////////////\r\n\tgenerateColumnsFromRowData(data){\r\n\t\tvar cols = [],\r\n\t\tdefinitions = this.table.options.autoColumnsDefinitions,\r\n\t\trow, sorter;\r\n\r\n\t\tif(data && data.length){\r\n\r\n\t\t\trow = data[0];\r\n\r\n\t\t\tfor(var key in row){\r\n\t\t\t\tlet col = {\r\n\t\t\t\t\tfield:key,\r\n\t\t\t\t\ttitle:key,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tlet value = row[key];\r\n\r\n\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tif(Array.isArray(value)){\r\n\t\t\t\t\t\tsorter = \"array\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){\r\n\t\t\t\t\t\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcol.sorter = sorter;\r\n\r\n\t\t\t\tcols.push(col);\r\n\t\t\t}\r\n\r\n\t\t\tif(definitions){\r\n\r\n\t\t\t\tswitch(typeof definitions){\r\n\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\tthis.table.options.columns = definitions.call(this.table, cols);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tif(Array.isArray(definitions)){\r\n\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\tvar match = definitions.find((def) => {\r\n\t\t\t\t\t\t\t\treturn def.field === col.field;\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tif(match){\r\n\t\t\t\t\t\t\t\tObject.assign(col, match);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\tif(definitions[col.field]){\r\n\t\t\t\t\t\t\t\tObject.assign(col, definitions[col.field]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.table.options.columns = cols;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.options.columns = cols;\r\n\t\t\t}\r\n\r\n\t\t\tthis.setColumns(this.table.options.columns);\r\n\t\t}\r\n\t}\r\n\r\n\tsetColumns(cols, row){\r\n\t\twhile(this.headersElement.firstChild) this.headersElement.removeChild(this.headersElement.firstChild);\r\n\r\n\t\tthis.columns = [];\r\n\t\tthis.columnsByIndex = [];\r\n\t\tthis.columnsByField = {};\r\n\r\n\t\tthis.dispatch(\"columns-loading\");\r\n\r\n\t\tcols.forEach((def, i) => {\r\n\t\t\tthis._addColumn(def);\r\n\t\t});\r\n\r\n\t\tthis._reIndexColumns();\r\n\r\n\t\tthis.dispatch(\"columns-loaded\");\r\n\r\n\t\tthis.renderer.rerenderColumns(false, true);\r\n\r\n\t\tthis.redraw(true);\r\n\t}\r\n\r\n\t_addColumn(definition, before, nextToColumn){\r\n\t\tvar column = new Column(definition, this),\r\n\t\tcolEl = column.getElement(),\r\n\t\tindex = nextToColumn ? this.findColumnIndex(nextToColumn) : nextToColumn;\r\n\r\n\t\tif(nextToColumn && index > -1){\r\n\t\t\tvar topColumn = nextToColumn.getTopColumn()\r\n\t\t\tvar parentIndex = this.columns.indexOf(topColumn);\r\n\t\t\tvar nextEl = topColumn.getElement();\r\n\r\n\t\t\tif(before){\r\n\t\t\t\tthis.columns.splice(parentIndex, 0, column);\r\n\t\t\t\tnextEl.parentNode.insertBefore(colEl, nextEl);\r\n\t\t\t}else{\r\n\t\t\t\tthis.columns.splice(parentIndex + 1, 0, column);\r\n\t\t\t\tnextEl.parentNode.insertBefore(colEl, nextEl.nextSibling);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(before){\r\n\t\t\t\tthis.columns.unshift(column);\r\n\t\t\t\tthis.headersElement.insertBefore(column.getElement(), this.headersElement.firstChild);\r\n\t\t\t}else{\r\n\t\t\t\tthis.columns.push(column);\r\n\t\t\t\tthis.headersElement.appendChild(column.getElement());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcolumn.columnRendered();\r\n\r\n\t\treturn column;\r\n\t}\r\n\r\n\tregisterColumnField(col){\r\n\t\tif(col.definition.field){\r\n\t\t\tthis.columnsByField[col.definition.field] = col;\r\n\t\t}\r\n\t}\r\n\r\n\tregisterColumnPosition(col){\r\n\t\tthis.columnsByIndex.push(col);\r\n\t}\r\n\r\n\t_reIndexColumns(){\r\n\t\tthis.columnsByIndex = [];\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.reRegisterPosition();\r\n\t\t});\r\n\t}\r\n\r\n\t//ensure column headers take up the correct amount of space in column groups\r\n\tverticalAlignHeaders(){\r\n\t\tvar minHeight = 0;\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\tvar height;\r\n\r\n\t\t\tcolumn.clearVerticalAlign();\r\n\r\n\t\t\theight = column.getHeight();\r\n\r\n\t\t\tif(height > minHeight){\r\n\t\t\t\tminHeight = height;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\tcolumn.verticalAlign(this.table.options.columnHeaderVertAlign, minHeight);\r\n\t\t});\r\n\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\t//////////////// Column Details /////////////////\r\n\tfindColumn(subject){\r\n\t\tif(typeof subject == \"object\"){\r\n\r\n\t\t\tif(subject instanceof Column){\r\n\t\t\t\t//subject is column element\r\n\t\t\t\treturn subject;\r\n\t\t\t}else if(subject instanceof ColumnComponent){\r\n\t\t\t\t//subject is public column component\r\n\t\t\t\treturn subject._getSelf() || false;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\t//subject is a HTML element of the column header\r\n\t\t\t\tlet match = this.columns.find((column) => {\r\n\t\t\t\t\treturn column.element === subject;\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn match || false;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the field name of the column\r\n\t\t\treturn this.columnsByField[subject] || false;\r\n\t\t}\r\n\r\n\t\t//catch all for any other type of input\r\n\t\treturn false;\r\n\t}\r\n\r\n\tgetColumnByField(field){\r\n\t\treturn this.columnsByField[field];\r\n\t}\r\n\r\n\tgetColumnsByFieldRoot(root){\r\n\t\tvar matches = [];\r\n\r\n\t\tObject.keys(this.columnsByField).forEach((field) => {\r\n\t\t\tvar fieldRoot = field.split(\".\")[0];\r\n\t\t\tif(fieldRoot === root){\r\n\t\t\t\tmatches.push(this.columnsByField[field]);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn matches;\r\n\t}\r\n\r\n\tgetColumnByIndex(index){\r\n\t\treturn this.columnsByIndex[index];\r\n\t}\r\n\r\n\tgetFirstVisibleColumn(index){\r\n\t\tvar index = this.columnsByIndex.findIndex((col) => {\r\n\t\t\treturn col.visible;\r\n\t\t});\r\n\r\n\t\treturn index > -1 ? this.columnsByIndex[index] : false;\r\n\t}\r\n\r\n\tgetColumns(){\r\n\t\treturn this.columns;\r\n\t}\r\n\r\n\tfindColumnIndex(column){\r\n\t\treturn this.columnsByIndex.findIndex((col) => {\r\n\t\t\treturn column === col;\r\n\t\t});\r\n\t}\r\n\r\n\t//return all columns that are not groups\r\n\tgetRealColumns(){\r\n\t\treturn this.columnsByIndex;\r\n\t}\r\n\r\n\t//travers across columns and call action\r\n\ttraverse(callback){\r\n\t\tthis.columnsByIndex.forEach((column,i) =>{\r\n\t\t\tcallback(column, i);\r\n\t\t});\r\n\t}\r\n\r\n\t//get defintions of actual columns\r\n\tgetDefinitions(active){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tif(!active || (active && column.visible)){\r\n\t\t\t\toutput.push(column.getDefinition());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//get full nested definition tree\r\n\tgetDefinitionTree(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\toutput.push(column.getDefinition(true));\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetComponents(structured){\r\n\t\tvar output = [],\r\n\t\tcolumns = structured ? this.columns : this.columnsByIndex;\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\toutput.push(column.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\tvar width = 0;\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tif(column.visible){\r\n\t\t\t\twidth += column.getWidth();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn width;\r\n\t}\r\n\r\n\tmoveColumn(from, to, after){\r\n\t\tthis.moveColumnActual(from, to, after);\r\n\r\n\t\tto.element.parentNode.insertBefore(from.element, to.element);\r\n\r\n\t\tif(after){\r\n\t\t\tto.element.parentNode.insertBefore(to.element, from.element);\r\n\t\t}\r\n\r\n\t\tthis.verticalAlignHeaders();\r\n\r\n\t\tthis.table.rowManager.reinitialize();\r\n\t}\r\n\r\n\tmoveColumnActual(from, to, after){\r\n\t\tif(from.parent.isGroup){\r\n\t\t\tthis._moveColumnInArray(from.parent.columns, from, to, after);\r\n\t\t}else{\r\n\t\t\tthis._moveColumnInArray(this.columns, from, to, after);\r\n\t\t}\r\n\r\n\t\tthis._moveColumnInArray(this.columnsByIndex, from, to, after, true);\r\n\r\n\t\tthis.renderer.rerenderColumns(true);\r\n\r\n\t\tthis.dispatch(\"column-moved\", from, to, after);\r\n\r\n\t\tif(this.subscribedExternal(\"columnMoved\")){\r\n\t\t\tthis.dispatchExternal(\"columnMoved\", from.getComponent(), this.table.columnManager.getComponents());\r\n\t\t}\r\n\t}\r\n\r\n\t_moveColumnInArray(columns, from, to, after, updateRows){\r\n\t\tvar\tfromIndex = columns.indexOf(from),\r\n\t\ttoIndex, rows = [];\r\n\r\n\t\tif (fromIndex > -1) {\r\n\r\n\t\t\tcolumns.splice(fromIndex, 1);\r\n\r\n\t\t\ttoIndex = columns.indexOf(to);\r\n\r\n\t\t\tif (toIndex > -1) {\r\n\r\n\t\t\t\tif(after){\r\n\t\t\t\t\ttoIndex = toIndex+1;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\ttoIndex = fromIndex;\r\n\t\t\t}\r\n\r\n\t\t\tcolumns.splice(toIndex, 0, from);\r\n\r\n\t\t\tif(updateRows){\r\n\r\n\t\t\t\trows = this.chain(\"column-moving-rows\", [from, to, after], null, []) || [];\r\n\r\n\t\t\t\trows = rows.concat(this.table.rowManager.rows);\r\n\r\n\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\tif(row.cells.length){\r\n\t\t\t\t\t\tvar cell = row.cells.splice(fromIndex, 1)[0];\r\n\t\t\t\t\t\trow.cells.splice(toIndex, 0, cell);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscrollToColumn(column, position, ifVisible){\r\n\t\tvar left = 0,\r\n\t\toffset = 0,\r\n\t\tadjust = 0,\r\n\t\tcolEl = column.getElement();\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\r\n\t\t\tif(typeof position === \"undefined\"){\r\n\t\t\t\tposition = this.table.options.scrollToColumnPosition;\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof ifVisible === \"undefined\"){\r\n\t\t\t\tifVisible = this.table.options.scrollToColumnIfVisible;\r\n\t\t\t}\r\n\r\n\t\t\tif(column.visible){\r\n\r\n\t\t\t\t//align to correct position\r\n\t\t\t\tswitch(position){\r\n\t\t\t\t\tcase \"middle\":\r\n\t\t\t\t\tcase \"center\":\r\n\t\t\t\t\tadjust = -this.element.clientWidth / 2;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"right\":\r\n\t\t\t\t\tadjust = colEl.clientWidth - this.headersElement.clientWidth;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//check column visibility\r\n\t\t\t\tif(!ifVisible){\r\n\r\n\t\t\t\t\toffset = colEl.offsetLeft;\r\n\r\n\t\t\t\t\tif(offset > 0 && offset + colEl.offsetWidth < this.element.clientWidth){\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//calculate scroll position\r\n\t\t\t\tleft = colEl.offsetLeft + adjust;\r\n\r\n\t\t\t\tleft = Math.max(Math.min(left, this.table.rowManager.element.scrollWidth - this.table.rowManager.element.clientWidth),0);\r\n\r\n\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\tthis.scrollHorizontal(left);\r\n\r\n\t\t\t\tresolve();\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - Column not visible\");\r\n\t\t\t\treject(\"Scroll Error - Column not visible\");\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\tgenerateCells(row){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tcells.push(column.generateCell(row));\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\t//////////////// Column Management /////////////////\r\n\tgetFlexBaseWidth(){\r\n\t\tvar totalWidth = this.table.element.clientWidth, //table element width\r\n\t\tfixedWidth = 0;\r\n\r\n\t\t//adjust for vertical scrollbar if present\r\n\t\tif(this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight){\r\n\t\t\ttotalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth;\r\n\t\t}\r\n\r\n\t\tthis.columnsByIndex.forEach(function(column){\r\n\t\t\tvar width, minWidth, colWidth;\r\n\r\n\t\t\tif(column.visible){\r\n\r\n\t\t\t\twidth = column.definition.width || 0;\r\n\r\n\t\t\t\tminWidth = parseInt(column.minWidth);\r\n\r\n\t\t\t\tif(typeof(width) == \"string\"){\r\n\t\t\t\t\tif(width.indexOf(\"%\") > -1){\r\n\t\t\t\t\t\tcolWidth = (totalWidth / 100) * parseInt(width) ;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tcolWidth = parseInt(width);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolWidth = width;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn fixedWidth;\r\n\t}\r\n\r\n\taddColumn(definition, before, nextToColumn){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar column = this._addColumn(definition, before, nextToColumn);\r\n\r\n\t\t\tthis._reIndexColumns();\r\n\r\n\t\t\tthis.dispatch(\"column-add\", definition, before, nextToColumn);\r\n\r\n\t\t\tif(this.layoutMode() != \"fitColumns\"){\r\n\t\t\t\tcolumn.reinitializeWidth();\r\n\t\t\t}\r\n\r\n\t\t\tthis.redraw(true);\r\n\r\n\t\t\tthis.table.rowManager.reinitialize();\r\n\r\n\t\t\tthis.renderer.rerenderColumns();\r\n\r\n\t\t\tresolve(column);\r\n\t\t});\r\n\t}\r\n\r\n\t//remove column from system\r\n\tderegisterColumn(column){\r\n\t\tvar field = column.getField(),\r\n\t\tindex;\r\n\r\n\t\t//remove from field list\r\n\t\tif(field){\r\n\t\t\tdelete this.columnsByField[field];\r\n\t\t}\r\n\r\n\t\t//remove from index list\r\n\t\tindex = this.columnsByIndex.indexOf(column);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columnsByIndex.splice(index, 1);\r\n\t\t}\r\n\r\n\t\t//remove from column list\r\n\t\tindex = this.columns.indexOf(column);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columns.splice(index, 1);\r\n\t\t}\r\n\r\n\t\tthis.verticalAlignHeaders();\r\n\r\n\t\tthis.redraw();\r\n\t}\r\n\r\n\t//redraw columns\r\n\tredraw(force){\r\n\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\tthis.verticalAlignHeaders();\r\n\t\t}\r\n\r\n\t\tif(force){\r\n\t\t\tthis.table.rowManager.resetScroll();\r\n\t\t\tthis.table.rowManager.reinitialize();\r\n\t\t}\r\n\r\n\t\tif(!this.confirm(\"table-redrawing\", force)){\r\n\t\t\tthis.layoutRefresh();\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"table-redraw\", force);\r\n\r\n\t\tthis.table.footerManager.redraw();\r\n\t}\r\n}","//public row object\r\nexport default class RowComponent {\r\n\r\n\tconstructor (row){\r\n\t\tthis._row = row;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._row.table.componentFunctionBinder.handle(\"row\", target._row, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\treturn this._row.getData(transform);\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._row.getElement();\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._row.getCells().forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar cell = this._row.getCell(column);\r\n\t\treturn cell ? cell.getComponent() : false;\r\n\t}\r\n\r\n\tgetIndex(){\r\n\t\treturn this._row.getData(\"data\")[this._row.table.options.index];\r\n\t}\r\n\r\n\tgetPosition(active){\r\n\t\treturn this._row.table.rowManager.getRowPosition(this._row, active);\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn this._row.delete();\r\n\t}\r\n\r\n\tscrollTo(){\r\n\t\treturn this._row.table.rowManager.scrollToRow(this._row);\r\n\t}\r\n\r\n\tmove(to, after){\r\n\t\tthis._row.moveToRow(to, after);\r\n\t}\r\n\r\n\tupdate(data){\r\n\t\treturn this._row.updateData(data);\r\n\t}\r\n\r\n\tnormalizeHeight(){\r\n\t\tthis._row.normalizeHeight(true);\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._row;\r\n\t}\r\n\r\n\treformat(){\r\n\t\treturn this._row.reinitialize();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._row.table;\r\n\t}\r\n\r\n\tgetNextRow(){\r\n\t\tvar row = this._row.nextRow();\r\n\t\treturn row ? row.getComponent() : row;\r\n\t}\r\n\r\n\tgetPrevRow(){\r\n\t\tvar row = this._row.prevRow();\r\n\t\treturn row ? row.getComponent() : row;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport RowComponent from './RowComponent.js';\r\nimport Helpers from '../tools/Helpers.js';\r\n\r\nexport default class Row extends CoreFeature{\r\n\tconstructor (data, parent, type = \"row\"){\r\n\t\tsuper(parent.table);\r\n\r\n\t\tthis.parent = parent;\r\n\t\tthis.data = {};\r\n\t\tthis.type = type; //type of element\r\n\t\tthis.element = false;\r\n\t\tthis.modules = {}; //hold module variables;\r\n\t\tthis.cells = [];\r\n\t\tthis.height = 0; //hold element height\r\n\t\tthis.heightStyled = \"\"; //hold element height prestyled to improve render efficiency\r\n\t\tthis.manualHeight = false; //user has manually set row height\r\n\t\tthis.outerHeight = 0; //holde lements outer height\r\n\t\tthis.initialized = false; //element has been rendered\r\n\t\tthis.heightInitialized = false; //element has resized cells to fit\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\tthis.created = false;\r\n\r\n\t\tthis.setData(data);\r\n\t}\r\n\r\n\tcreate(){\r\n\t\tif(!this.created){\r\n\t\t\tthis.created = true;\r\n\t\t\tthis.generateElement();\r\n\t\t}\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\r\n\t\tthis.element = el;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\tthis.create();\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tdetachElement(){\r\n\t\tif (this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateElement(){\r\n\t\tthis.createElement();\r\n\t\tthis.dispatch(\"row-init\", this);\r\n\t}\r\n\r\n\tgenerateCells(){\r\n\t\tthis.cells = this.table.columnManager.generateCells(this);\r\n\t}\r\n\r\n\t//functions to setup on first render\r\n\tinitialize(force){\r\n\t\tthis.create();\r\n\r\n\t\tif(!this.initialized || force){\r\n\r\n\t\t\tthis.deleteCells();\r\n\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\tthis.dispatch(\"row-layout-before\", this);\r\n\r\n\t\t\tthis.generateCells();\r\n\r\n\t\t\tthis.initialized = true;\r\n\r\n\t\t\tthis.table.columnManager.renderer.renderRowCells(this);\r\n\r\n\t\t\tif(force){\r\n\t\t\t\tthis.normalizeHeight();\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-layout\", this);\r\n\r\n\t\t\tif(this.table.options.rowFormatter){\r\n\t\t\t\tthis.table.options.rowFormatter(this.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-layout-after\", this);\r\n\t\t}else{\r\n\t\t\tthis.table.columnManager.renderer.rerenderRowCells(this);\r\n\t\t}\r\n\t}\r\n\r\n\treinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\r\n\t\tif(this.element && this.element.offsetParent !== null){\r\n\t\t\tthis.normalizeHeight(true);\r\n\t\t}\r\n\t}\r\n\r\n\tdeinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\t}\r\n\r\n\treinitialize(children){\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\r\n\t\tif(!this.manualHeight){\r\n\t\t\tthis.height = 0;\r\n\t\t\tthis.heightStyled = \"\";\r\n\t\t}\r\n\r\n\t\tif(this.element && this.element.offsetParent !== null){\r\n\t\t\tthis.initialize(true);\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"row-relayout\", this);\r\n\t}\r\n\r\n\t//get heights when doing bulk row style calcs in virtual DOM\r\n\tcalcHeight(force){\r\n\r\n\t\tvar maxHeight = 0,\r\n\t\tminHeight = this.table.options.resizableRows ? this.element.clientHeight : 0;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tvar height = cell.getHeight();\r\n\t\t\tif(height > maxHeight){\r\n\t\t\t\tmaxHeight = height;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(force){\r\n\t\t\tthis.height = Math.max(maxHeight, minHeight);\r\n\t\t}else{\r\n\t\t\tthis.height = this.manualHeight ? this.height : Math.max(maxHeight, minHeight);\r\n\t\t}\r\n\r\n\t\tthis.heightStyled = this.height ? this.height + \"px\" : \"\";\r\n\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t}\r\n\r\n\t//set of cells\r\n\tsetCellHeight(){\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setHeight();\r\n\t\t});\r\n\r\n\t\tthis.heightInitialized = true;\r\n\t}\r\n\r\n\tclearCellHeight(){\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.clearHeight();\r\n\t\t});\r\n\t}\r\n\r\n\t//normalize the height of elements in the row\r\n\tnormalizeHeight(force){\r\n\t\tif(force){\r\n\t\t\tthis.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis.calcHeight(force);\r\n\r\n\t\tthis.setCellHeight();\r\n\t}\r\n\r\n\t//set height of rows\r\n\tsetHeight(height, force){\r\n\t\tif(this.height != height || force){\r\n\r\n\t\t\tthis.manualHeight = true;\r\n\r\n\t\t\tthis.height = height;\r\n\t\t\tthis.heightStyled = height ? height + \"px\" : \"\";\r\n\r\n\t\t\tthis.setCellHeight();\r\n\r\n\t\t\t// this.outerHeight = this.element.outerHeight();\r\n\t\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t\t}\r\n\t}\r\n\r\n\t//return rows outer height\r\n\tgetHeight(){\r\n\t\treturn this.outerHeight;\r\n\t}\r\n\r\n\t//return rows outer Width\r\n\tgetWidth(){\r\n\t\treturn this.element.offsetWidth;\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\tdeleteCell(cell){\r\n\t\tvar index = this.cells.indexOf(cell);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.cells.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Data Management /////////////////\r\n\tsetData(data){\r\n\t\tthis.data = this.chain(\"row-data-init-before\", [this, data], undefined, data);\r\n\r\n\t\tthis.dispatch(\"row-data-init-after\", this);\r\n\t}\r\n\r\n\t//update the rows data\r\n\tupdateData(updatedData){\r\n\t\tvar visible = this.element && Helpers.elVisible(this.element),\r\n\t\ttempData = {},\r\n\t\tnewRowData;\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\r\n\t\t\tif(typeof updatedData === \"string\"){\r\n\t\t\t\tupdatedData = JSON.parse(updatedData);\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-save-before\", this);\r\n\r\n\t\t\tif(this.subscribed(\"row-data-changing\")){\r\n\t\t\t\ttempData = Object.assign(tempData, this.data);\r\n\t\t\t\ttempData = Object.assign(tempData, updatedData);\r\n\t\t\t}\r\n\r\n\t\t\tnewRowData = this.chain(\"row-data-changing\", [this, tempData, updatedData], null, updatedData);\r\n\r\n\t\t\t//set data\r\n\t\t\tfor (var attrname in newRowData) {\r\n\t\t\t\tthis.data[attrname] = newRowData[attrname];\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-save-after\", this);\r\n\r\n\t\t\t//update affected cells only\r\n\t\t\tfor (var attrname in updatedData) {\r\n\r\n\t\t\t\tlet columns = this.table.columnManager.getColumnsByFieldRoot(attrname);\r\n\r\n\t\t\t\tcolumns.forEach((column) => {\r\n\t\t\t\t\tlet cell = this.getCell(column.getField());\r\n\r\n\t\t\t\t\tif(cell){\r\n\t\t\t\t\t\tlet value = column.getFieldValue(newRowData);\r\n\t\t\t\t\t\tif(cell.getValue() != value){\r\n\t\t\t\t\t\t\tcell.setValueProcessData(value);\r\n\r\n\t\t\t\t\t\t\tif(visible){\r\n\t\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t//Partial reinitialization if visible\r\n\t\t\tif(visible){\r\n\t\t\t\tthis.normalizeHeight(true);\r\n\r\n\t\t\t\tif(this.table.options.rowFormatter){\r\n\t\t\t\t\tthis.table.options.rowFormatter(this.getComponent());\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.initialized = false;\r\n\t\t\t\tthis.height = 0;\r\n\t\t\t\tthis.heightStyled = \"\";\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-changed\", this, visible, updatedData);\r\n\r\n\t\t\t//this.reinitialize();\r\n\r\n\t\t\tthis.dispatchExternal(\"rowUpdated\", this.getComponent());\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t\t}\r\n\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\tif(transform){\r\n\t\t\treturn this.chain(\"row-data-retrieve\", [this, transform], null, this.data);\r\n\t\t}\r\n\r\n\t\treturn this.data;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar match = false;\r\n\r\n\t\tcolumn = this.table.columnManager.findColumn(column);\r\n\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\r\n\t\tmatch = this.cells.find(function(cell){\r\n\t\t\treturn cell.column === column;\r\n\t\t});\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tgetCellIndex(findCell){\r\n\t\treturn this.cells.findIndex(function(cell){\r\n\t\t\treturn cell === findCell;\r\n\t\t});\r\n\t}\r\n\r\n\tfindCell(subject){\r\n\t\treturn this.cells.find((cell) => {\r\n\t\t\treturn cell.element === subject;\r\n\t\t});\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\r\n\t\treturn this.cells;\r\n\t}\r\n\r\n\tnextRow(){\r\n\t\tvar row = this.table.rowManager.nextDisplayRow(this, true);\r\n\t\treturn row || false;\r\n\t}\r\n\r\n\tprevRow(){\r\n\t\tvar row = this.table.rowManager.prevDisplayRow(this, true);\r\n\t\treturn row || false;\r\n\t}\r\n\r\n\tmoveToRow(to, before){\r\n\t\tvar toRow = this.table.rowManager.findRow(to);\r\n\r\n\t\tif(toRow){\r\n\t\t\tthis.table.rowManager.moveRowActual(this, toRow, !before);\r\n\t\t\tthis.table.rowManager.refreshActiveData(\"display\", false, true);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching row found:\", to);\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////// Actions /////////////////////\r\n\tdelete(){\r\n\t\tthis.dispatch(\"row-delete\", this);\r\n\r\n\t\tthis.deleteActual();\r\n\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\r\n\tdeleteActual(blockRedraw){\r\n\t\tvar index = this.table.rowManager.getRowIndex(this);\r\n\r\n\t\tthis.detatchModules();\r\n\r\n\t\tthis.table.rowManager.deleteRow(this, blockRedraw);\r\n\r\n\t\tthis.deleteCells();\r\n\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\t\tthis.element = false;\r\n\r\n\t\tthis.dispatch(\"row-deleted\", this);\r\n\t}\r\n\r\n\tdetatchModules(){\r\n\t\tthis.dispatch(\"row-deleting\", this);\r\n\t}\r\n\r\n\tdeleteCells(){\r\n\t\tvar cellCount = this.cells.length;\r\n\r\n\t\tfor(let i = 0; i < cellCount; i++){\r\n\t\t\tthis.cells[0].delete();\r\n\t\t}\r\n\t}\r\n\r\n\twipe(){\r\n\t\tthis.detatchModules();\r\n\t\tthis.deleteCells();\r\n\r\n\t\tif(this.element){\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\tif(this.element.parentNode){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.modules = {};\r\n\t}\r\n\r\n\tgetGroup(){\r\n\t\treturn this.modules.group || false;\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new RowComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class BaiscVertical extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.verticalFillMode = \"fill\";\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t}\r\n\r\n\tclearRows(){\r\n\t\tvar element = this.tableElement;\r\n\r\n\t\t// element.children.detach();\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\telement.scrollTop = 0;\r\n\t\telement.scrollLeft = 0;\r\n\r\n\t\telement.style.minWidth = \"\";\r\n\t\telement.style.minHeight = \"\";\r\n\t\telement.style.display = \"\";\r\n\t\telement.style.visibility = \"\";\r\n\t}\r\n\r\n\trenderRows(){\r\n\t\tvar element = this.tableElement,\r\n\t\tonlyGroupHeaders = true;\r\n\r\n\t\tthis.rows().forEach((row, index) => {\r\n\t\t\tthis.styleRow(row, index);\r\n\t\t\telement.appendChild(row.getElement());\r\n\t\t\trow.initialize(true);\r\n\r\n\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\tonlyGroupHeaders = false;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(onlyGroupHeaders){\r\n\t\t\telement.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t}else{\r\n\t\t\telement.style.minWidth = \"\";\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trerenderRows(callback){\r\n\t\tthis.clearRows();\r\n\t\tthis.renderRows();\r\n\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\tvar rowTop = Helpers.elOffset(row.getElement()).top;\r\n\r\n\t\treturn !(Math.abs(this.elementVertical.scrollTop - rowTop) > Math.abs(this.elementVertical.scrollTop + this.elementVertical.clientHeight - rowTop));\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tthis.elementVertical.scrollTop = Helpers.elOffset(rowEl).top - Helpers.elOffset(this.elementVertical).top + this.elementVertical.scrollTop;\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\treturn this.rows();\r\n\t}\r\n\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class VirtualDomVertical extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.verticalFillMode = \"fill\";\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.vDomRowHeight = 20; //approximation of row heights for padding\r\n\r\n\t\tthis.vDomTop = 0; //hold position for first rendered row in the virtual DOM\r\n\t\tthis.vDomBottom = 0; //hold possition for last rendered row in the virtual DOM\r\n\r\n\t\tthis.vDomScrollPosTop = 0; //last scroll position of the vDom top;\r\n\t\tthis.vDomScrollPosBottom = 0; //last scroll position of the vDom bottom;\r\n\r\n\t\tthis.vDomTopPad = 0; //hold value of padding for top of virtual DOM\r\n\t\tthis.vDomBottomPad = 0; //hold value of padding for bottom of virtual DOM\r\n\r\n\t\tthis.vDomMaxRenderChain = 90; //the maximum number of dom elements that can be rendered in 1 go\r\n\r\n\t\tthis.vDomWindowBuffer = 0; //window row buffer before removing elements, to smooth scrolling\r\n\r\n\t\tthis.vDomWindowMinTotalRows = 20; //minimum number of rows to be generated in virtual dom (prevent buffering issues on tables with tall rows)\r\n\t\tthis.vDomWindowMinMarginRows = 5; //minimum number of rows to be generated in virtual dom margin\r\n\r\n\t\tthis.vDomTopNewRows = []; //rows to normalize after appending to optimize render speed\r\n\t\tthis.vDomBottomNewRows = []; //rows to normalize after appending to optimize render speed\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t///////// Public Functions ///////////\r\n\t//////////////////////////////////////\r\n\r\n\tclearRows(){\r\n\t\tvar element = this.tableElement;\r\n\r\n\t\t// element.children.detach();\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\telement.style.paddingTop = \"\";\r\n\t\telement.style.paddingBottom = \"\";\r\n\t\t// element.style.minWidth = \"\";\r\n\t\telement.style.minHeight = \"\";\r\n\t\telement.style.display = \"\";\r\n\t\telement.style.visibility = \"\";\r\n\r\n\t\tthis.elementVertical.scrollTop = 0;\r\n\t\tthis.elementVertical.scrollLeft = 0;\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.vDomTop = 0;\r\n\t\tthis.vDomBottom = 0;\r\n\t\tthis.vDomTopPad = 0;\r\n\t\tthis.vDomBottomPad = 0;\r\n\t\tthis.vDomScrollPosTop = 0;\r\n\t\tthis.vDomScrollPosBottom = 0;\r\n\t}\r\n\r\n\trenderRows(){\r\n\t\tthis._virtualRenderFill();\r\n\t}\r\n\r\n\trerenderRows(callback){\r\n\t\tvar scrollTop = this.elementVertical.scrollTop;\r\n\t\tvar topRow = false;\r\n\t\tvar topOffset = false;\r\n\r\n\t\tvar left = this.table.rowManager.scrollLeft;\r\n\r\n\t\tvar rows = this.rows();\r\n\r\n\t\tfor(var i = this.vDomTop; i <= this.vDomBottom; i++){\r\n\r\n\t\t\tif(rows[i]){\r\n\t\t\t\tvar diff = scrollTop - rows[i].getElement().offsetTop;\r\n\r\n\t\t\t\tif(topOffset === false || Math.abs(diff) < topOffset){\r\n\t\t\t\t\ttopOffset = diff;\r\n\t\t\t\t\ttopRow = i;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\trows.forEach((row) => {\r\n\t\t\trow.deinitializeHeight();\r\n\t\t});\r\n\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\r\n\t\tthis._virtualRenderFill((topRow === false ? this.rows.length - 1 : topRow), true, topOffset || 0);\r\n\r\n\t\tthis.scrollColumns(left);\r\n\t}\r\n\r\n\tscrollColumns(left){\r\n\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t}\r\n\r\n\tscrollRows(top, dir){\r\n\t\tvar topDiff = top - this.vDomScrollPosTop;\r\n\t\tvar bottomDiff = top - this.vDomScrollPosBottom;\r\n\t\tvar margin = this.vDomWindowBuffer * 2;\r\n\t\tvar rows = this.rows();\r\n\r\n\t\tthis.scrollTop = top;\r\n\r\n\t\tif(-topDiff > margin || bottomDiff > margin){\r\n\t\t\t//if big scroll redraw table;\r\n\t\t\tvar left = this.table.rowManager.scrollLeft;\r\n\t\t\tthis._virtualRenderFill(Math.floor((this.elementVertical.scrollTop / this.elementVertical.scrollHeight) * rows.length));\r\n\t\t\tthis.scrollColumns(left);\r\n\t\t}else{\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\t//scrolling up\r\n\t\t\t\tif(topDiff < 0){\r\n\t\t\t\t\tthis._addTopRow(rows, -topDiff);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(bottomDiff < 0){\r\n\t\t\t\t\t//hide bottom row if needed\r\n\t\t\t\t\tif(this.vDomScrollHeight - this.scrollTop > this.vDomWindowBuffer){\r\n\t\t\t\t\t\tthis._removeBottomRow(rows, -bottomDiff);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomScrollPosBottom = this.scrollTop;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\r\n\t\t\t\tif(bottomDiff >= 0){\r\n\t\t\t\t\tthis._addBottomRow(rows, bottomDiff);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//scrolling down\r\n\t\t\t\tif(topDiff >= 0){\r\n\t\t\t\t\t//hide top row if needed\r\n\t\t\t\t\tif(this.scrollTop > this.vDomWindowBuffer){\r\n\t\t\t\t\t\tthis._removeTopRow(rows, topDiff);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomScrollPosTop = this.scrollTop;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tresize(){\r\n\t\tthis.vDomWindowBuffer = this.table.options.renderVerticalBuffer || this.elementVertical.clientHeight;\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\tvar rowIndex = this.rows().indexOf(row);\r\n\r\n\t\treturn !(Math.abs(this.vDomTop - rowIndex) > Math.abs(this.vDomBottom - rowIndex));\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\tvar index = this.rows().indexOf(row);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis._virtualRenderFill(index, true);\r\n\t\t}\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\tvar topEdge = this.elementVertical.scrollTop,\r\n\t\tbottomEdge = this.elementVertical.clientHeight + topEdge,\r\n\t\ttopFound = false,\r\n\t\ttopRow = 0,\r\n\t\tbottomRow = 0,\r\n\t\trows = this.rows();\r\n\r\n\t\tif(includingBuffer){\r\n\t\t\ttopRow = this.vDomTop;\r\n\t\t\tbottomRow = this.vDomBottom;\r\n\t\t}else{\r\n\t\t\tfor(var i = this.vDomTop; i <= this.vDomBottom; i++){\r\n\t\t\t\tif(rows[i]){\r\n\t\t\t\t\tif(!topFound){\r\n\t\t\t\t\t\tif((topEdge - rows[i].getElement().offsetTop) >= 0){\r\n\t\t\t\t\t\t\ttopRow = i;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\ttopFound = true;\r\n\r\n\t\t\t\t\t\t\tif(bottomEdge - rows[i].getElement().offsetTop >= 0){\r\n\t\t\t\t\t\t\t\tbottomRow = i;\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(bottomEdge - rows[i].getElement().offsetTop >= 0){\r\n\t\t\t\t\t\t\tbottomRow = i;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn rows.slice(topRow, bottomRow + 1);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t//////// Internal Rendering //////////\r\n\t//////////////////////////////////////\r\n\r\n\t//full virtual render\r\n\t_virtualRenderFill(position, forceMove, offset){\r\n\t\tvar\telement = this.tableElement,\r\n\t\tholder = this.elementVertical,\r\n\t\ttopPad = 0,\r\n\t\trowsHeight = 0,\r\n\t\theightOccupied = 0,\r\n\t\ttopPadHeight = 0,\r\n\t\ti = 0,\r\n\t\trows = this.rows(),\r\n\t\trowsCount = rows.length,\r\n\t\tcontainerHeight = this.elementVertical.clientHeight;\r\n\r\n\t\tposition = position || 0;\r\n\r\n\t\toffset = offset || 0;\r\n\r\n\t\tif(!position){\r\n\t\t\tthis.clear();\r\n\t\t}else{\r\n\t\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\t\t//check if position is too close to bottom of table\r\n\t\t\theightOccupied = (rowsCount - position + 1) * this.vDomRowHeight;\r\n\r\n\t\t\tif(heightOccupied < containerHeight){\r\n\t\t\t\tposition -= Math.ceil((containerHeight - heightOccupied) / this.vDomRowHeight);\r\n\t\t\t\tif(position < 0){\r\n\t\t\t\t\tposition = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//calculate initial pad\r\n\t\t\ttopPad = Math.min(Math.max(Math.floor(this.vDomWindowBuffer / this.vDomRowHeight), this.vDomWindowMinMarginRows), position);\r\n\t\t\tposition -= topPad;\r\n\t\t}\r\n\r\n\t\tif(rowsCount && Helpers.elVisible(this.elementVertical)){\r\n\t\t\tthis.vDomTop = position;\r\n\r\n\t\t\tthis.vDomBottom = position -1;\r\n\r\n\t\t\twhile ((rowsHeight <= containerHeight + this.vDomWindowBuffer || i < this.vDomWindowMinTotalRows) && this.vDomBottom < rowsCount -1){\r\n\t\t\t\tvar index = this.vDomBottom + 1,\r\n\t\t\t\trow = rows[index],\r\n\t\t\t\trowHeight = 0;\r\n\r\n\t\t\t\tthis.styleRow(row, index);\r\n\r\n\t\t\t\telement.appendChild(row.getElement());\r\n\r\n\t\t\t\trow.initialize();\r\n\r\n\t\t\t\tif(!row.heightInitialized){\r\n\t\t\t\t\trow.normalizeHeight(true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowHeight = row.getHeight();\r\n\r\n\t\t\t\tif(i < topPad){\r\n\t\t\t\t\ttopPadHeight += rowHeight;\r\n\t\t\t\t}else{\r\n\t\t\t\t\trowsHeight += rowHeight;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.vDomBottom ++;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\r\n\t\t\tif(!position){\r\n\t\t\t\tthis.vDomTopPad = 0;\r\n\t\t\t\t//adjust rowheight to match average of rendered elements\r\n\t\t\t\tthis.vDomRowHeight = Math.floor((rowsHeight + topPadHeight) / i);\r\n\t\t\t\tthis.vDomBottomPad = this.vDomRowHeight * (rowsCount - this.vDomBottom -1);\r\n\r\n\t\t\t\tthis.vDomScrollHeight = topPadHeight + rowsHeight + this.vDomBottomPad - containerHeight;\r\n\t\t\t}else{\r\n\t\t\t\tthis.vDomTopPad = !forceMove ? this.scrollTop - topPadHeight : (this.vDomRowHeight * this.vDomTop) + offset;\r\n\t\t\t\tthis.vDomBottomPad = this.vDomBottom == rowsCount-1 ? 0 : Math.max(this.vDomScrollHeight - this.vDomTopPad - rowsHeight - topPadHeight, 0);\r\n\t\t\t}\r\n\r\n\t\t\telement.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\telement.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\r\n\t\t\tif(forceMove){\r\n\t\t\t\tthis.scrollTop = this.vDomTopPad + (topPadHeight) + offset - (this.elementVertical.scrollWidth > this.elementVertical.clientWidth ? this.elementVertical.offsetHeight - containerHeight : 0);\r\n\t\t\t}\r\n\r\n\t\t\tthis.scrollTop = Math.min(this.scrollTop, this.elementVertical.scrollHeight - containerHeight);\r\n\r\n\t\t\t//adjust for horizontal scrollbar if present (and not at top of table)\r\n\t\t\tif(this.elementVertical.scrollWidth > this.elementVertical.offsetWidth && forceMove){\r\n\t\t\t\tthis.scrollTop += this.elementVertical.offsetHeight - containerHeight;\r\n\t\t\t}\r\n\r\n\t\t\tthis.vDomScrollPosTop = this.scrollTop;\r\n\t\t\tthis.vDomScrollPosBottom = this.scrollTop;\r\n\r\n\t\t\tholder.scrollTop = this.scrollTop;\r\n\r\n\t\t\tthis.dispatch(\"render-virtual-fill\");\r\n\t\t}\r\n\t}\r\n\r\n\t_addTopRow(rows, fillableSpace){\r\n\t\tvar table = this.tableElement,\r\n\t\taddedRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\tindex = this.vDomTop -1,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tif(this.vDomTop){\r\n\t\t\t\tlet row = rows[index],\r\n\t\t\t\trowHeight, initialized;\r\n\r\n\t\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\t\t\t\t\tinitialized = row.initialized;\r\n\r\n\t\t\t\t\tif(fillableSpace >= rowHeight){\r\n\r\n\t\t\t\t\t\tthis.styleRow(row, index);\r\n\t\t\t\t\t\ttable.insertBefore(row.getElement(), table.firstChild);\r\n\r\n\t\t\t\t\t\tif(!row.initialized || !row.heightInitialized){\r\n\t\t\t\t\t\t\taddedRows.push(row);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trow.initialize();\r\n\r\n\t\t\t\t\t\tif(!initialized){\r\n\t\t\t\t\t\t\trowHeight = row.getElement().offsetHeight;\r\n\r\n\t\t\t\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\t\tthis.vDomTop--;\r\n\t\t\t\t\t\tindex--;\r\n\t\t\t\t\t\ti++;\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of addedRows){\r\n\t\t\trow.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis._quickNormalizeRowHeight(addedRows);\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomTopPad -= paddingAdjust;\r\n\r\n\t\t\tif(this.vDomTopPad < 0){\r\n\t\t\t\tthis.vDomTopPad = index * this.vDomRowHeight;\r\n\t\t\t}\r\n\r\n\t\t\tif(index < 1){\r\n\t\t\t\tthis.vDomTopPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\ttable.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\tthis.vDomScrollPosTop -= paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_removeTopRow(rows, fillableSpace){\r\n\t\tvar removableRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[this.vDomTop],\r\n\t\t\trowHeight, diff;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\t\t\t\t\tthis.vDomTop++;\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tremovableRows.push(row);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of removableRows){\r\n\t\t\tlet rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomTopPad += paddingAdjust;\r\n\t\t\tthis.tableElement.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\tthis.vDomScrollPosTop += this.vDomTop ? paddingAdjust : paddingAdjust + this.vDomWindowBuffer;\r\n\t\t}\r\n\t}\r\n\r\n\t_addBottomRow(rows, fillableSpace){\r\n\t\tvar table = this.tableElement,\r\n\t\taddedRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\tindex = this.vDomBottom + 1,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[index],\r\n\t\t\trowHeight, initialized;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\t\t\t\tinitialized = row.initialized;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\r\n\t\t\t\t\tthis.styleRow(row, index);\r\n\t\t\t\t\ttable.appendChild(row.getElement());\r\n\r\n\t\t\t\t\tif(!row.initialized || !row.heightInitialized){\r\n\t\t\t\t\t\taddedRows.push(row);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\trow.initialize();\r\n\r\n\t\t\t\t\tif(!initialized){\r\n\t\t\t\t\t\trowHeight = row.getElement().offsetHeight;\r\n\r\n\t\t\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tthis.vDomBottom++;\r\n\t\t\t\t\tindex++;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of addedRows){\r\n\t\t\trow.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis._quickNormalizeRowHeight(addedRows);\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomBottomPad -= paddingAdjust;\r\n\r\n\t\t\tif(this.vDomBottomPad < 0 || index == rows.length -1){\r\n\t\t\t\tthis.vDomBottomPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\ttable.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\t\t\tthis.vDomScrollPosBottom += paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_removeBottomRow(rows, fillableSpace){\r\n\t\tvar removableRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[this.vDomBottom],\r\n\t\t\trowHeight, diff;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\t\t\t\t\tthis.vDomBottom --;\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tremovableRows.push(row);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of removableRows){\r\n\t\t\tlet rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomBottomPad += paddingAdjust;\r\n\r\n\t\t\tif(this.vDomBottomPad < 0){\r\n\t\t\t\tthis.vDomBottomPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\tthis.tableElement.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\t\t\tthis.vDomScrollPosBottom -= paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_quickNormalizeRowHeight(rows){\r\n\t\tfor(let row of rows){\r\n\t\t\trow.calcHeight();\r\n\t\t}\r\n\r\n\t\tfor(let row of rows){\r\n\t\t\trow.setCellHeight();\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\nimport Row from './row/Row.js';\r\nimport RowComponent from './row/RowComponent.js';\r\nimport Helpers from './tools/Helpers.js';\r\n\r\nimport RendererBasicVertical from './rendering/renderers/BasicVertical.js';\r\nimport RendererVirtualDomVertical from './rendering/renderers/VirtualDomVertical.js';\r\n\r\nexport default class RowManager extends CoreFeature{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.element = this.createHolderElement(); //containing element\r\n\t\tthis.tableElement = this.createTableElement(); //table element\r\n\t\tthis.heightFixer = this.createTableElement(); //table element\r\n\t\tthis.placeholder = null; //placeholder element\r\n\t\tthis.placeholderContents = null; //placeholder element\r\n\t\t\r\n\t\tthis.firstRender = false; //handle first render\r\n\t\tthis.renderMode = \"virtual\"; //current rendering mode\r\n\t\tthis.fixedHeight = false; //current rendering mode\r\n\t\t\r\n\t\tthis.rows = []; //hold row data objects\r\n\t\tthis.activeRowsPipeline = []; //hold calculation of active rows\r\n\t\tthis.activeRows = []; //rows currently available to on display in the table\r\n\t\tthis.activeRowsCount = 0; //count of active rows\r\n\t\t\r\n\t\tthis.displayRows = []; //rows currently on display in the table\r\n\t\tthis.displayRowsCount = 0; //count of display rows\r\n\t\t\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.rowNumColumn = false; //hold column component for row number column\r\n\t\t\r\n\t\tthis.redrawBlock = false; //prevent redraws to allow multiple data manipulations before continuing\r\n\t\tthis.redrawBlockRestoreConfig = false; //store latest redraw function calls for when redraw is needed\r\n\t\tthis.redrawBlockRenderInPosition = false; //store latest redraw function calls for when redraw is needed\r\n\t\t\r\n\t\tthis.dataPipeline = []; //hold data pipeline tasks\r\n\t\tthis.displayPipeline = []; //hold data display pipeline tasks\r\n\t\t\r\n\t\tthis.renderer = null;\r\n\t}\r\n\t\r\n\t//////////////// Setup Functions /////////////////\r\n\t\r\n\tcreateHolderElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-tableholder\");\r\n\t\tel.setAttribute(\"tabindex\", 0);\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tcreateTableElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-table\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tinitializePlaceholder(){\r\n\t\t//configure placeholder element\r\n\t\tif(typeof this.table.options.placeholder == \"string\"){\r\n\t\t\tlet el = document.createElement(\"div\");\r\n\t\t\tel.classList.add(\"tabulator-placeholder\");\r\n\t\t\t\r\n\t\t\tlet contents = document.createElement(\"div\");\r\n\t\t\tcontents.classList.add(\"tabulator-placeholder-contents\");\r\n\t\t\tcontents.innerHTML = this.table.options.placeholder;\r\n\t\t\t\r\n\t\t\tel.appendChild(contents);\r\n\t\t\t\r\n\t\t\tthis.placeholderContents = contents;\r\n\t\t\tthis.placeholder = el;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return containing element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\t\r\n\t//return table element\r\n\tgetTableElement(){\r\n\t\treturn this.tableElement;\r\n\t}\r\n\t\r\n\t//return position of row in table\r\n\tgetRowPosition(row, active){\r\n\t\tif(active){\r\n\t\t\treturn this.activeRows.indexOf(row);\r\n\t\t}else{\r\n\t\t\treturn this.rows.indexOf(row);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.initializePlaceholder()\r\n\t\tthis.initializeRenderer();\r\n\t\t\r\n\t\t//initialize manager\r\n\t\tthis.element.appendChild(this.tableElement);\r\n\t\t\r\n\t\tthis.firstRender = true;\r\n\t\t\r\n\t\t//scroll header along with table body\r\n\t\tthis.element.addEventListener(\"scroll\", () => {\r\n\t\t\tvar left = this.element.scrollLeft,\r\n\t\t\tleftDir = this.scrollLeft > left,\r\n\t\t\ttop = this.element.scrollTop,\r\n\t\t\ttopDir = this.scrollTop > top;\r\n\t\t\t\r\n\t\t\t//handle horizontal scrolling\r\n\t\t\tif(this.scrollLeft != left){\r\n\t\t\t\tthis.scrollLeft = left;\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"scroll-horizontal\", left, leftDir);\r\n\t\t\t\tthis.dispatchExternal(\"scrollHorizontal\", left, leftDir);\r\n\r\n\t\t\t\tthis._positionPlaceholder();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//handle vertical scrolling\r\n\t\t\tif(this.scrollTop != top){\r\n\t\t\t\tthis.scrollTop = top;\r\n\t\t\t\t\r\n\t\t\t\tthis.renderer.scrollRows(top, topDir);\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"scroll-vertical\", top, topDir);\r\n\t\t\t\tthis.dispatchExternal(\"scrollVertical\", top, topDir);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t////////////////// Row Manipulation //////////////////\r\n\tfindRow(subject){\r\n\t\tif(typeof subject == \"object\"){\r\n\t\t\tif(subject instanceof Row){\r\n\t\t\t\t//subject is row element\r\n\t\t\t\treturn subject;\r\n\t\t\t}else if(subject instanceof RowComponent){\r\n\t\t\t\t//subject is public row component\r\n\t\t\t\treturn subject._getSelf() || false;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\t//subject is a HTML element of the row\r\n\t\t\t\tlet match = this.rows.find((row) => {\r\n\t\t\t\t\treturn row.getElement() === subject;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\treturn match || false;\r\n\t\t\t}\r\n\t\t}else if(typeof subject == \"undefined\" || subject === null){\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the index of the row\r\n\t\t\tlet match = this.rows.find((row) => {\r\n\t\t\t\treturn row.data[this.table.options.index] == subject;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\treturn match || false;\r\n\t\t}\r\n\t\t\r\n\t\t//catch all for any other type of input\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tgetRowFromDataObject(data){\r\n\t\tvar match = this.rows.find((row) => {\r\n\t\t\treturn row.data === data;\r\n\t\t});\r\n\t\t\r\n\t\treturn match || false;\r\n\t}\r\n\t\r\n\tgetRowFromPosition(position, active){\r\n\t\tif(active){\r\n\t\t\treturn this.activeRows[position];\r\n\t\t}else{\r\n\t\t\treturn this.rows[position];\r\n\t\t}\r\n\t}\r\n\t\r\n\tscrollToRow(row, position, ifVisible){\r\n\t\treturn this.renderer.scrollToRowPosition(row, position, ifVisible);\r\n\t}\r\n\t\r\n\t////////////////// Data Handling //////////////////\r\n\tsetData(data, renderInPosition, columnsChanged){\r\n\t\treturn new Promise((resolve, reject)=>{\r\n\t\t\tif(renderInPosition && this.getDisplayRows().length){\r\n\t\t\t\tif(this.table.options.pagination){\r\n\t\t\t\t\tthis._setDataActual(data, true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.reRenderInPosition(() => {\r\n\t\t\t\t\t\tthis._setDataActual(data);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.options.autoColumns && columnsChanged && this.table.initialized){\r\n\t\t\t\t\tthis.table.columnManager.generateColumnsFromRowData(data);\r\n\t\t\t\t}\r\n\t\t\t\tthis.resetScroll();\r\n\t\t\t\t\r\n\t\t\t\tthis._setDataActual(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\t\r\n\t_setDataActual(data, renderInPosition){\r\n\t\tthis.dispatchExternal(\"dataProcessing\", data);\r\n\t\t\r\n\t\tthis._wipeElements();\r\n\t\t\r\n\t\tif(Array.isArray(data)){\r\n\t\t\tthis.dispatch(\"data-processing\", data);\r\n\t\t\t\r\n\t\t\tdata.forEach((def, i) => {\r\n\t\t\t\tif(def && typeof def === \"object\"){\r\n\t\t\t\t\tvar row = new Row(def, this);\r\n\t\t\t\t\tthis.rows.push(row);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Data Loading Warning - Invalid row data detected and ignored, expecting object but received:\", def);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.refreshActiveData(false, false, renderInPosition);\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"data-processed\", data);\r\n\t\t\tthis.dispatchExternal(\"dataProcessed\", data);\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Data Loading Error - Unable to process data due to invalid data type \\nExpecting: array \\nReceived: \", typeof data, \"\\nData: \", data);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_wipeElements(){\r\n\t\tthis.dispatch(\"rows-wipe\");\r\n\t\t\r\n\t\tthis.rows.forEach((row) => {\r\n\t\t\trow.wipe();\r\n\t\t});\r\n\t\t\r\n\t\tthis.rows = [];\r\n\t\tthis.activeRows = [];\r\n\t\tthis.activeRowsPipeline = [];\r\n\t\tthis.activeRowsCount = 0;\r\n\t\tthis.displayRows = [];\r\n\t\tthis.displayRowsCount = 0;\r\n\t\t\r\n\t\tthis.adjustTableSize();\r\n\t}\r\n\t\r\n\tdeleteRow(row, blockRedraw){\r\n\t\tvar allIndex = this.rows.indexOf(row),\r\n\t\tactiveIndex = this.activeRows.indexOf(row);\r\n\t\t\r\n\t\tif(activeIndex > -1){\r\n\t\t\tthis.activeRows.splice(activeIndex, 1);\r\n\t\t}\r\n\t\t\r\n\t\tif(allIndex > -1){\r\n\t\t\tthis.rows.splice(allIndex, 1);\r\n\t\t}\r\n\t\t\r\n\t\tthis.setActiveRows(this.activeRows);\r\n\t\t\r\n\t\tthis.displayRowIterator((rows) => {\r\n\t\t\tvar displayIndex = rows.indexOf(row);\r\n\t\t\t\r\n\t\t\tif(displayIndex > -1){\r\n\t\t\t\trows.splice(displayIndex, 1);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t}\r\n\t\t\r\n\t\tthis.regenerateRowNumbers();\r\n\t\t\r\n\t\tthis.dispatchExternal(\"rowDeleted\", row.getComponent());\r\n\t\t\r\n\t\tif(!this.displayRowsCount){\r\n\t\t\tthis._showPlaceholder();\r\n\t\t}\r\n\t\t\r\n\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\tthis.dispatchExternal(\"dataChanged\", this.getData());\r\n\t\t}\r\n\t}\r\n\t\r\n\taddRow(data, pos, index, blockRedraw){\r\n\t\tvar row = this.addRowActual(data, pos, index, blockRedraw);\r\n\t\treturn row;\r\n\t}\r\n\t\r\n\t//add multiple rows\r\n\taddRows(data, pos, index){\r\n\t\tvar length = 0,\r\n\t\trows = [];\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tpos = this.findAddRowPos(pos);\r\n\t\t\t\r\n\t\t\tif(!Array.isArray(data)){\r\n\t\t\t\tdata = [data];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlength = data.length - 1;\r\n\t\t\t\r\n\t\t\tif((typeof index == \"undefined\" && pos) || (typeof index !== \"undefined\" && !pos)){\r\n\t\t\t\tdata.reverse();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdata.forEach((item, i) => {\r\n\t\t\t\tvar row = this.addRow(item, pos, index, true);\r\n\t\t\t\trows.push(row);\r\n\t\t\t\tthis.dispatch(\"row-added\", row, data, pos, index);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.refreshActiveData(false, false, true);\r\n\t\t\t\r\n\t\t\tthis.regenerateRowNumbers();\r\n\t\t\t\r\n\t\t\tif(rows.length){\r\n\t\t\t\tthis._clearPlaceholder();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tresolve(rows);\r\n\t\t});\r\n\t}\r\n\t\r\n\tfindAddRowPos(pos){\r\n\t\tif(typeof pos === \"undefined\"){\r\n\t\t\tpos = this.table.options.addRowPos;\r\n\t\t}\r\n\t\t\r\n\t\tif(pos === \"pos\"){\r\n\t\t\tpos = true;\r\n\t\t}\r\n\t\t\r\n\t\tif(pos === \"bottom\"){\r\n\t\t\tpos = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn pos;\r\n\t}\r\n\t\r\n\taddRowActual(data, pos, index, blockRedraw){\r\n\t\tvar row = data instanceof Row ? data : new Row(data || {}, this),\r\n\t\ttop = this.findAddRowPos(pos),\r\n\t\tallIndex = -1,\r\n\t\tactiveIndex, chainResult;\r\n\t\t\r\n\t\tif(!index){\r\n\t\t\tchainResult = this.chain(\"row-adding-position\", [row, top], null, {index, top});\r\n\t\t\t\r\n\t\t\tindex = chainResult.index;\r\n\t\t\ttop = chainResult.top;\r\n\t\t}\r\n\t\t\r\n\t\tif(typeof index !== \"undefined\"){\r\n\t\t\tindex = this.findRow(index);\r\n\t\t}\r\n\t\t\r\n\t\tindex = this.chain(\"row-adding-index\", [row, index, top], null, index);\r\n\t\t\r\n\t\tif(index){\r\n\t\t\tallIndex = this.rows.indexOf(index);\r\n\t\t}\r\n\t\t\r\n\t\tif(index && allIndex > -1){\r\n\t\t\tactiveIndex = this.activeRows.indexOf(index);\r\n\t\t\t\r\n\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\tvar displayIndex = rows.indexOf(index);\r\n\t\t\t\t\r\n\t\t\t\tif(displayIndex > -1){\r\n\t\t\t\t\trows.splice((top ? displayIndex : displayIndex + 1), 0, row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(activeIndex > -1){\r\n\t\t\t\tthis.activeRows.splice((top ? activeIndex : activeIndex + 1), 0, row);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.rows.splice((top ? allIndex : allIndex + 1), 0, row);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tif(top){\r\n\t\t\t\t\r\n\t\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\t\trows.unshift(row);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRows.unshift(row);\r\n\t\t\t\tthis.rows.unshift(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\t\trows.push(row);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRows.push(row);\r\n\t\t\t\tthis.rows.push(row);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.setActiveRows(this.activeRows);\r\n\t\t\r\n\t\tthis.dispatchExternal(\"rowAdded\", row.getComponent());\r\n\t\t\r\n\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t}\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t}\r\n\t\t\r\n\t\treturn row;\r\n\t}\r\n\t\r\n\tmoveRow(from, to, after){\r\n\t\tthis.dispatch(\"row-move\", from, to, after);\r\n\t\t\r\n\t\tthis.moveRowActual(from, to, after);\r\n\t\t\r\n\t\tthis.regenerateRowNumbers();\r\n\t\t\r\n\t\tthis.dispatch(\"row-moved\", from, to, after);\r\n\t\tthis.dispatchExternal(\"rowMoved\", from.getComponent());\r\n\t}\r\n\t\r\n\tmoveRowActual(from, to, after){\r\n\t\tthis.moveRowInArray(this.rows, from, to, after);\r\n\t\tthis.moveRowInArray(this.activeRows, from, to, after);\r\n\t\t\r\n\t\tthis.displayRowIterator((rows) => {\r\n\t\t\tthis.moveRowInArray(rows, from, to, after);\r\n\t\t});\r\n\t\t\r\n\t\tthis.dispatch(\"row-moving\", from, to, after);\r\n\t}\r\n\t\r\n\tmoveRowInArray(rows, from, to, after){\r\n\t\tvar\tfromIndex, toIndex, start, end;\r\n\t\t\r\n\t\tif(from !== to){\r\n\t\t\t\r\n\t\t\tfromIndex = rows.indexOf(from);\r\n\t\t\t\r\n\t\t\tif (fromIndex > -1) {\r\n\t\t\t\t\r\n\t\t\t\trows.splice(fromIndex, 1);\r\n\t\t\t\t\r\n\t\t\t\ttoIndex = rows.indexOf(to);\r\n\t\t\t\t\r\n\t\t\t\tif (toIndex > -1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(after){\r\n\t\t\t\t\t\trows.splice(toIndex+1, 0, from);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trows.splice(toIndex, 0, from);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\trows.splice(fromIndex, 0, from);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//restyle rows\r\n\t\t\tif(rows === this.getDisplayRows()){\r\n\t\t\t\t\r\n\t\t\t\tstart = fromIndex < toIndex ? fromIndex : toIndex;\r\n\t\t\t\tend = toIndex > fromIndex ? toIndex : fromIndex +1;\r\n\t\t\t\t\r\n\t\t\t\tfor(let i = start; i <= end; i++){\r\n\t\t\t\t\tif(rows[i]){\r\n\t\t\t\t\t\tthis.styleRow(rows[i], i);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tclearData(){\r\n\t\tthis.setData([]);\r\n\t}\r\n\t\r\n\tgetRowIndex(row){\r\n\t\treturn this.findRowIndex(row, this.rows);\r\n\t}\r\n\t\r\n\tgetDisplayRowIndex(row){\r\n\t\tvar index = this.getDisplayRows().indexOf(row);\r\n\t\treturn index > -1 ? index : false;\r\n\t}\r\n\t\r\n\tnextDisplayRow(row, rowOnly){\r\n\t\tvar index = this.getDisplayRowIndex(row),\r\n\t\tnextRow = false;\r\n\t\t\r\n\t\t\r\n\t\tif(index !== false && index < this.displayRowsCount -1){\r\n\t\t\tnextRow = this.getDisplayRows()[index+1];\r\n\t\t}\r\n\t\t\r\n\t\tif(nextRow && (!(nextRow instanceof Row) || nextRow.type != \"row\")){\r\n\t\t\treturn this.nextDisplayRow(nextRow, rowOnly);\r\n\t\t}\r\n\t\t\r\n\t\treturn nextRow;\r\n\t}\r\n\t\r\n\tprevDisplayRow(row, rowOnly){\r\n\t\tvar index = this.getDisplayRowIndex(row),\r\n\t\tprevRow = false;\r\n\t\t\r\n\t\tif(index){\r\n\t\t\tprevRow = this.getDisplayRows()[index-1];\r\n\t\t}\r\n\t\t\r\n\t\tif(rowOnly && prevRow && (!(prevRow instanceof Row) || prevRow.type != \"row\")){\r\n\t\t\treturn this.prevDisplayRow(prevRow, rowOnly);\r\n\t\t}\r\n\t\t\r\n\t\treturn prevRow;\r\n\t}\r\n\t\r\n\tfindRowIndex(row, list){\r\n\t\tvar rowIndex;\r\n\t\t\r\n\t\trow = this.findRow(row);\r\n\t\t\r\n\t\tif(row){\r\n\t\t\trowIndex = list.indexOf(row);\r\n\t\t\t\r\n\t\t\tif(rowIndex > -1){\r\n\t\t\t\treturn rowIndex;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tgetData(active, transform){\r\n\t\tvar output = [],\r\n\t\trows = this.getRows(active);\r\n\t\t\r\n\t\trows.forEach(function(row){\r\n\t\t\tif(row.type == \"row\"){\r\n\t\t\t\toutput.push(row.getData(transform || \"data\"));\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetComponents(active){\r\n\t\tvar\toutput = [],\r\n\t\trows = this.getRows(active);\r\n\t\t\r\n\t\trows.forEach(function(row){\r\n\t\t\toutput.push(row.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetDataCount(active){\r\n\t\tvar rows = this.getRows(active);\r\n\t\t\r\n\t\treturn rows.length;\r\n\t}\r\n\t\r\n\tscrollHorizontal(left){\r\n\t\tthis.scrollLeft = left;\r\n\t\tthis.element.scrollLeft = left;\r\n\t\t\r\n\t\tthis.dispatch(\"scroll-horizontal\", left);\r\n\t}\r\n\t\r\n\tregisterDataPipelineHandler(handler, priority){\r\n\t\tif(typeof priority !== \"undefined\"){\r\n\t\t\tthis.dataPipeline.push({handler, priority})\r\n\t\t\tthis.dataPipeline.sort((a, b) => {\r\n\t\t\t\treturn a.priority - b.priority;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Data pipeline handlers must have a priority in order to be registered\")\r\n\t\t}\r\n\t}\r\n\t\r\n\tregisterDisplayPipelineHandler(handler, priority){\r\n\t\tif(typeof priority !== \"undefined\"){\r\n\t\t\tthis.displayPipeline.push({handler, priority})\r\n\t\t\tthis.displayPipeline.sort((a, b) => {\r\n\t\t\t\treturn a.priority - b.priority;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Display pipeline handlers must have a priority in order to be registered\")\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set active data set\r\n\trefreshActiveData(handler, skipStage, renderInPosition){\r\n\t\tvar table = this.table,\r\n\t\tstage = \"\",\r\n\t\tindex = 0,\r\n\t\tcascadeOrder = [\"all\", \"dataPipeline\", \"display\", \"displayPipeline\", \"end\"],\r\n\t\tdisplayIndex;\r\n\t\t\r\n\t\t\r\n\t\tif(typeof handler === \"function\"){\r\n\t\t\tindex = this.dataPipeline.findIndex((item) => {\r\n\t\t\t\treturn item.handler === handler;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\tstage = \"dataPipeline\";\r\n\t\t\t\t\r\n\t\t\t\tif(skipStage){\r\n\t\t\t\t\tif(index == this.dataPipeline.length - 1){\r\n\t\t\t\t\t\tstage = \"display\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tindex++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tindex = this.displayPipeline.findIndex((item) => {\r\n\t\t\t\t\treturn item.handler === handler;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tstage = \"displayPipeline\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(skipStage){\r\n\t\t\t\t\t\tif(index == this.displayPipeline.length - 1){\r\n\t\t\t\t\t\t\tstage = \"end\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tindex++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.error(\"Unable to refresh data, invalid handler provided\", handler)\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tstage = handler || \"all\";\r\n\t\t\tindex = 0;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.redrawBlock){\r\n\t\t\tif(!this.redrawBlockRestoreConfig || (this.redrawBlockRestoreConfig && ((this.redrawBlockRestoreConfig.stage === stage && index < this.redrawBlockRestoreConfig.index) || (cascadeOrder.indexOf(stage) < cascadeOrder.indexOf(this.redrawBlockRestoreConfig.stage))))){\r\n\t\t\t\tthis.redrawBlockRestoreConfig = {\r\n\t\t\t\t\thandler: handler,\r\n\t\t\t\t\tskipStage: skipStage,\r\n\t\t\t\t\trenderInPosition: renderInPosition,\r\n\t\t\t\t\tstage:stage,\r\n\t\t\t\t\tindex:index,\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn;\r\n\t\t}else{\r\n\t\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\t\tif(renderInPosition){\r\n\t\t\t\t\tthis.reRenderInPosition(this.refreshPipelines.bind(this, handler, stage, index, renderInPosition));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!handler){\r\n\t\t\t\t\t\tthis.table.columnManager.renderer.renderColumns();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.renderTable();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(table.options.layoutColumnsOnNewData){\r\n\t\t\t\t\t\tthis.table.columnManager.redraw(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"data-refreshed\");\r\n\t\t}\r\n\t}\r\n\t\r\n\trefreshPipelines(handler, stage, index, renderInPosition){\r\n\t\tthis.dispatch(\"data-refreshing\");\r\n\t\t\r\n\t\tif(!handler){\r\n\t\t\tthis.activeRowsPipeline[0] = this.rows.slice(0);\r\n\t\t}\r\n\t\t\r\n\t\t//cascade through data refresh stages\r\n\t\tswitch(stage){\r\n\t\t\tcase \"all\":\r\n\t\t\t//handle case where alldata needs refreshing\r\n\t\t\t\r\n\t\t\tcase \"dataPipeline\":\r\n\t\t\t\r\n\t\t\tfor(let i = index; i < this.dataPipeline.length; i++){\r\n\t\t\t\tlet result = this.dataPipeline[i].handler(this.activeRowsPipeline[i].slice(0));\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRowsPipeline[i + 1] = result || this.activeRowsPipeline[i].slice(0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);\r\n\t\t\t\r\n\t\t\tthis.regenerateRowNumbers();\r\n\t\t\t\r\n\t\t\tcase \"display\":\r\n\t\t\tindex = 0;\r\n\t\t\tthis.resetDisplayRows();\r\n\t\t\t\r\n\t\t\tcase \"displayPipeline\":\r\n\t\t\tfor(let i = index; i < this.displayPipeline.length; i++){\r\n\t\t\t\tlet result = this.displayPipeline[i].handler((i ? this.getDisplayRows(i - 1) : this.activeRows).slice(0), renderInPosition);\r\n\t\t\t\t\r\n\t\t\t\tthis.setDisplayRows(result || this.getDisplayRows(i - 1).slice(0), i);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase \"end\":\r\n\t\t\t//case to handle scenario when trying to skip past end stage\r\n\t\t}\r\n\t}\r\n\t\r\n\t//regenerate row numbers for row number formatter if in use\r\n\tregenerateRowNumbers(){\r\n\t\tif(this.rowNumColumn){\r\n\t\t\tthis.activeRows.forEach((row) => {\r\n\t\t\t\tvar cell = row.getCell(this.rowNumColumn);\r\n\t\t\t\t\r\n\t\t\t\tif(cell){\r\n\t\t\t\t\tcell._generateContents();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetActiveRows(activeRows){\r\n\t\tthis.activeRows = activeRows;\r\n\t\tthis.activeRowsCount = this.activeRows.length;\r\n\t}\r\n\t\r\n\t//reset display rows array\r\n\tresetDisplayRows(){\r\n\t\tthis.displayRows = [];\r\n\t\t\r\n\t\tthis.displayRows.push(this.activeRows.slice(0));\r\n\t\t\r\n\t\tthis.displayRowsCount = this.displayRows[0].length;\r\n\t}\r\n\t\r\n\tgetNextDisplayIndex(){\r\n\t\treturn this.displayRows.length;\r\n\t}\r\n\t\r\n\t//set display row pipeline data\r\n\tsetDisplayRows(displayRows, index){\r\n\t\t\r\n\t\tvar output = true;\r\n\t\t\r\n\t\tif(index && typeof this.displayRows[index] != \"undefined\"){\r\n\t\t\tthis.displayRows[index] = displayRows;\r\n\t\t\toutput = true;\r\n\t\t}else{\r\n\t\t\tthis.displayRows.push(displayRows)\r\n\t\t\toutput = index = this.displayRows.length -1;\r\n\t\t}\r\n\t\t\r\n\t\tif(index == this.displayRows.length -1){\r\n\t\t\tthis.displayRowsCount = this.displayRows[this.displayRows.length -1].length;\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetDisplayRows(index){\r\n\t\tif(typeof index == \"undefined\"){\r\n\t\t\treturn this.displayRows.length ? this.displayRows[this.displayRows.length -1] : [];\r\n\t\t}else{\r\n\t\t\treturn this.displayRows[index] || [];\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetVisibleRows(chain, viewable){\r\n\t\tvar rows = Object.assign([], this.renderer.visibleRows(!viewable));\r\n\t\t\r\n\t\tif(chain){\r\n\t\t\trows = this.chain(\"rows-visible\", [viewable], rows, rows);\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t//repeat action accross display rows\r\n\tdisplayRowIterator(callback){\r\n\t\tthis.activeRowsPipeline.forEach(callback);\r\n\t\tthis.displayRows.forEach(callback);\r\n\t\t\r\n\t\tthis.displayRowsCount = this.displayRows[this.displayRows.length -1].length;\r\n\t}\r\n\t\r\n\t//return only actual rows (not group headers etc)\r\n\tgetRows(type){\r\n\t\tvar rows;\r\n\t\t\r\n\t\tswitch(type){\r\n\t\t\tcase \"active\":\r\n\t\t\trows = this.activeRows;\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"display\":\r\n\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"visible\":\r\n\t\t\trows = this.getVisibleRows(false, true);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\trows = this.chain(\"rows-retrieve\", type, null, this.rows) || this.rows;\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t///////////////// Table Rendering /////////////////\r\n\t//trigger rerender of table in current position\r\n\treRenderInPosition(callback){\r\n\t\tif(this.redrawBlock){\r\n\t\t\tif(callback){\r\n\t\t\t\tcallback();\r\n\t\t\t}else{\r\n\t\t\t\tthis.redrawBlockRenderInPosition = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.renderer.rerenderRows(callback);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRenderer(){\r\n\t\tvar renderClass;\r\n\t\t\r\n\t\tvar renderers = {\r\n\t\t\t\"virtual\": RendererVirtualDomVertical,\r\n\t\t\t\"basic\": RendererBasicVertical,\r\n\t\t};\r\n\t\t\r\n\t\tif(typeof this.table.options.renderVertical === \"string\"){\r\n\t\t\trenderClass = renderers[this.table.options.renderVertical];\r\n\t\t}else{\r\n\t\t\trenderClass = this.table.options.renderVertical;\r\n\t\t}\r\n\t\t\r\n\t\tif(renderClass){\r\n\t\t\tthis.renderer = new renderClass(this.table, this.element, this.tableElement);\r\n\t\t\tthis.renderer.initialize();\r\n\t\t\t\r\n\t\t\tif((this.table.element.clientHeight || this.table.options.height)){\r\n\t\t\t\tthis.fixedHeight = true;\r\n\t\t\t}else{\r\n\t\t\t\tthis.fixedHeight = false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Unable to find matching renderer:\", table.options.renderVertical);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRenderMode(){\r\n\t\treturn this.renderMode;\r\n\t}\r\n\t\r\n\trenderTable(){\r\n\t\tthis.dispatchExternal(\"renderStarted\");\r\n\t\t\r\n\t\tthis.element.scrollTop = 0;\r\n\t\t\r\n\t\tthis._clearTable();\r\n\t\t\r\n\t\tif(this.displayRowsCount){\r\n\t\t\tthis.renderer.renderRows();\r\n\t\t\t\r\n\t\t\tif(this.firstRender){\r\n\t\t\t\tthis.firstRender = false;\r\n\t\t\t\tthis.layoutRefresh();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.renderEmptyScroll();\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.fixedHeight){\r\n\t\t\tthis.adjustTableSize();\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatch(\"table-layout\");\r\n\t\t\r\n\t\tif(!this.displayRowsCount){\r\n\t\t\tthis._showPlaceholder();\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatchExternal(\"renderComplete\");\r\n\t}\r\n\t\r\n\t//show scrollbars on empty table div\r\n\trenderEmptyScroll(){\r\n\t\tif(this.placeholder){\r\n\t\t\tthis.tableElement.style.display = \"none\";\r\n\t\t}else{\r\n\t\t\tthis.tableElement.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t\t// this.tableElement.style.minHeight = \"1px\";\r\n\t\t\t// this.tableElement.style.visibility = \"hidden\";\r\n\t\t}\r\n\t}\r\n\t\r\n\t_clearTable(){\r\n\t\tvar element = this.tableElement;\r\n\t\t\r\n\t\tthis._clearPlaceholder();\r\n\t\t\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.renderer.clearRows();\r\n\t}\r\n\t\r\n\t_showPlaceholder(){\r\n\t\tif(this.placeholder){\r\n\t\t\tthis.placeholder.setAttribute(\"tabulator-render-mode\", this.renderMode);\r\n\t\t\t\r\n\t\t\tthis.getElement().appendChild(this.placeholder);\r\n\t\t\tthis._positionPlaceholder();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_clearPlaceholder(){\r\n\t\tif(this.placeholder && this.placeholder.parentNode){\r\n\t\t\tthis.placeholder.parentNode.removeChild(this.placeholder);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_positionPlaceholder(){\r\n\t\tif(this.placeholder && this.placeholder.parentNode){\r\n\t\t\tthis.placeholder.style.width = this.table.columnManager.getWidth() + \"px\";\r\n\t\t\tthis.placeholderContents.style.width = this.table.rowManager.element.clientWidth + \"px\";\r\n\t\t\tthis.placeholderContents.style.marginLeft = this.scrollLeft + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tstyleRow(row, index){\r\n\t\tvar rowEl = row.getElement();\r\n\t\t\r\n\t\tif(index % 2){\r\n\t\t\trowEl.classList.add(\"tabulator-row-even\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-odd\");\r\n\t\t}else{\r\n\t\t\trowEl.classList.add(\"tabulator-row-odd\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-even\");\r\n\t\t}\r\n\t}\r\n\t\r\n\t//normalize height of active rows\r\n\tnormalizeHeight(){\r\n\t\tthis.activeRows.forEach(function(row){\r\n\t\t\trow.normalizeHeight();\r\n\t\t});\r\n\t}\r\n\t\r\n\t//adjust the height of the table holder to fit in the Tabulator element\r\n\tadjustTableSize(){\r\n\t\tvar initialHeight = this.element.clientHeight,\r\n\t\tmodExists;\r\n\t\t\r\n\t\tif(this.renderer.verticalFillMode === \"fill\"){\r\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));\r\n\t\t\t\r\n\t\t\tif(this.fixedHeight){\r\n\t\t\t\tthis.element.style.minHeight = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t\tthis.element.style.height = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t\tthis.element.style.maxHeight = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.height = \"\";\r\n\t\t\t\tthis.element.style.height = (this.table.element.clientHeight - otherHeight) + \"px\";\r\n\t\t\t\tthis.element.scrollTop = this.scrollTop;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.renderer.resize();\r\n\t\t\t\r\n\t\t\t//check if the table has changed size when dealing with variable height tables\r\n\t\t\tif(!this.fixedHeight && initialHeight != this.element.clientHeight){\r\n\t\t\t\tif(this.subscribed(\"table-resize\")){\r\n\t\t\t\t\tthis.dispatch(\"table-resize\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.redraw();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._positionPlaceholder();\r\n\t}\r\n\t\r\n\t//renitialize all rows\r\n\treinitialize(){\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\trow.reinitialize(true);\r\n\t\t});\r\n\t}\r\n\t\r\n\t//prevent table from being redrawn\r\n\tblockRedraw (){\r\n\t\tthis.redrawBlock = true;\r\n\t\tthis.redrawBlockRestoreConfig = false;\r\n\t}\r\n\t\r\n\t//restore table redrawing\r\n\trestoreRedraw (){\r\n\t\tthis.redrawBlock = false;\r\n\t\t\r\n\t\tif(this.redrawBlockRestoreConfig){\r\n\t\t\tthis.refreshActiveData(this.redrawBlockRestoreConfig.handler, this.redrawBlockRestoreConfig.skipStage, this.redrawBlockRestoreConfig.renderInPosition)\r\n\t\t\t\r\n\t\t\tthis.redrawBlockRestoreConfig = false;\r\n\t\t}else{\r\n\t\t\tif(this.redrawBlockRenderInPosition){\r\n\t\t\t\tthis.reRenderInPosition();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.redrawBlockRenderInPosition = false;\r\n\t}\r\n\t\r\n\t//redraw table\r\n\tredraw (force){\r\n\t\tvar pos = 0,\r\n\t\tleft = this.scrollLeft;\r\n\t\t\r\n\t\tthis.adjustTableSize();\r\n\t\t\r\n\t\tthis.table.tableWidth = this.table.element.clientWidth;\r\n\t\t\r\n\t\tif(!force){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t\tthis.scrollHorizontal(left);\r\n\t\t}else{\r\n\t\t\tthis.renderTable();\r\n\t\t}\r\n\t}\r\n\t\r\n\tresetScroll(){\r\n\t\tthis.element.scrollLeft = 0;\r\n\t\tthis.element.scrollTop = 0;\r\n\t\t\r\n\t\tif(this.table.browser === \"ie\"){\r\n\t\t\tvar event = document.createEvent(\"Event\");\r\n\t\t\tevent.initEvent(\"scroll\", false, true);\r\n\t\t\tthis.element.dispatchEvent(event);\r\n\t\t}else{\r\n\t\t\tthis.element.dispatchEvent(new Event('scroll'));\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\n\r\nexport default class FooterManager extends CoreFeature{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.active = false;\r\n\t\tthis.element = this.createElement(); //containing element\r\n\t\tthis.containerElement = this.createContainerElement(); //containing element\r\n\t\tthis.external = false;\r\n\t\tthis.links = [];\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeElement();\r\n\t}\r\n\r\n\tcreateElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-footer\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\t\r\n\tcreateContainerElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-footer-contents\");\r\n\r\n\t\tthis.element.appendChild(el);\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitializeElement(){\r\n\t\tif(this.table.options.footerElement){\r\n\r\n\t\t\tswitch(typeof this.table.options.footerElement){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(this.table.options.footerElement[0] === \"<\"){\r\n\t\t\t\t\tthis.containerElement.innerHTML = this.table.options.footerElement;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.external = true;\r\n\t\t\t\t\tthis.containerElement = document.querySelector(this.table.options.footerElement);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.element = this.table.options.footerElement;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tappend(element, parent){\r\n\t\tthis.activate(parent);\r\n\r\n\t\tthis.containerElement.appendChild(element);\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\tprepend(element, parent){\r\n\t\tthis.activate(parent);\r\n\r\n\t\tthis.element.insertBefore(element, this.element.firstChild);\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\tremove(element){\r\n\t\telement.parentNode.removeChild(element);\r\n\t\tthis.deactivate();\r\n\t}\r\n\r\n\tdeactivate(force){\r\n\t\tif(!this.element.firstChild || force){\r\n\t\t\tif(!this.external){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\t\t\tthis.active = false;\r\n\t\t}\r\n\t}\r\n\r\n\tactivate(parent){\r\n\t\tif(!this.active){\r\n\t\t\tthis.active = true;\r\n\t\t\tif(!this.external){\r\n\t\t\t\tthis.table.element.appendChild(this.getElement());\r\n\t\t\t\tthis.table.element.style.display = '';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(parent){\r\n\t\t\tthis.links.push(parent);\r\n\t\t}\r\n\t}\r\n\r\n\tredraw(){\r\n\t\tthis.links.forEach(function(link){\r\n\t\t\tlink.footerRedraw();\r\n\t\t});\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport Helpers from './Helpers.js';\r\nimport Row from '../row/Row.js';\r\n\r\nexport default class InteractionManager extends CoreFeature {\r\n\t\r\n\tconstructor (table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.el = null;\r\n\t\t\r\n\t\tthis.abortClasses = [\"tabulator-headers\", \"tabulator-table\"];\r\n\t\t\r\n\t\tthis.previousTargets = {};\r\n\t\t\r\n\t\tthis.listeners = [\r\n\t\t\t\"click\",\r\n\t\t\t\"dblclick\",\r\n\t\t\t\"contextmenu\",\r\n\t\t\t\"mouseenter\",\r\n\t\t\t\"mouseleave\",\r\n\t\t\t\"mouseover\",\r\n\t\t\t\"mouseout\",\r\n\t\t\t\"mousemove\",\r\n\t\t\t\"touchstart\",\r\n\t\t\t\"touchend\",\r\n\t\t];\r\n\t\t\r\n\t\tthis.componentMap = {\r\n\t\t\t\"tabulator-cell\":\"cell\",\r\n\t\t\t\"tabulator-row\":\"row\",\r\n\t\t\t\"tabulator-group\":\"group\",\r\n\t\t\t\"tabulator-col\":\"column\",\r\n\t\t};\r\n\t\t\r\n\t\tthis.pseudoTrackers = {\r\n\t\t\t\"row\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"cell\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"group\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"column\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t}\r\n\t\t\r\n\t\tthis.pseudoTracking = false;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.el = this.table.element;\r\n\t\t\r\n\t\tthis.buildListenerMap();\r\n\t\tthis.bindSubscriptionWatchers();\r\n\t}\r\n\t\r\n\tbuildListenerMap(){\r\n\t\tvar listenerMap = {};\r\n\t\t\r\n\t\tthis.listeners.forEach((listener) => {\r\n\t\t\tlistenerMap[listener] = {\r\n\t\t\t\thandler:null,\r\n\t\t\t\tcomponents:[],\r\n\t\t\t}\r\n\t\t})\r\n\t\t\r\n\t\tthis.listeners = listenerMap;\r\n\t}\r\n\t\r\n\tbindPseudoEvents(){\r\n\t\tObject.keys(this.pseudoTrackers).forEach((key) => {\r\n\t\t\tthis.pseudoTrackers[key].subscriber = this.pseudoMouseEnter.bind(this, key);\r\n\t\t\tthis.subscribe(key + \"-mouseover\", this.pseudoTrackers[key].subscriber);\r\n\t\t});\r\n\t\t\r\n\t\tthis.pseudoTracking = true;\r\n\t}\r\n\t\r\n\tpseudoMouseEnter(key, e, target){\r\n\t\tif(this.pseudoTrackers[key].target !== target){\r\n\t\t\t\r\n\t\t\tif(this.pseudoTrackers[key].target){\r\n\t\t\t\tthis.dispatch(key + \"-mouseleave\", e, target);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.pseudoMouseLeave(key, e);\r\n\t\t\t\r\n\t\t\tthis.pseudoTrackers[key].target = target;\r\n\t\t\t\r\n\t\t\tthis.dispatch(key + \"-mouseenter\", e, target);\r\n\t\t}\r\n\t}\r\n\t\r\n\tpseudoMouseLeave(key, e){\r\n\t\tvar leaveList = Object.keys(this.pseudoTrackers),\r\n\t\tlinkedKeys = {\r\n\t\t\t\"row\":[\"cell\"],\r\n\t\t\t\"cell\":[\"row\"],\r\n\t\t};\r\n\t\t\r\n\t\tleaveList = leaveList.filter((item) => {\r\n\t\t\tvar links = linkedKeys[key];\r\n\t\t\treturn item !== key && (!links || (links && !links.includes(item)));\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\tleaveList.forEach((key) => {\r\n\t\t\tvar target = this.pseudoTrackers[key].target;\r\n\t\t\t\r\n\t\t\tif(this.pseudoTrackers[key].target){\r\n\t\t\t\tthis.dispatch(key + \"-mouseleave\", e, target);\r\n\t\t\t\t\r\n\t\t\t\tthis.pseudoTrackers[key].target = null;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t\r\n\tbindSubscriptionWatchers(){\r\n\t\tvar listeners = Object.keys(this.listeners),\r\n\t\tcomponents = Object.values(this.componentMap);\r\n\t\t\r\n\t\tfor(let comp of components){\r\n\t\t\tfor(let listener of listeners){\r\n\t\t\t\tlet key = comp + \"-\" + listener;\r\n\t\t\t\t\r\n\t\t\t\tthis.subscriptionChange(key, this.subscriptionChanged.bind(this, comp, listener));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.subscribe(\"table-destroy\", this.clearWatchers.bind(this))\r\n\t}\r\n\t\r\n\tsubscriptionChanged(component, key, added){\r\n\t\tvar listener = this.listeners[key].components,\r\n\t\tindex = listener.indexOf(component),\r\n\t\tchanged = false;\r\n\t\t\r\n\t\tif(added){\r\n\t\t\tif(index === -1){\r\n\t\t\t\tlistener.push(component);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!this.subscribed(component + \"-\" + key)){\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tlistener.splice(index, 1);\r\n\t\t\t\t\tchanged = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif((key === \"mouseenter\" || key === \"mouseleave\") && !this.pseudoTracking){\r\n\t\t\tthis.bindPseudoEvents();\r\n\t\t}\r\n\t\t\r\n\t\tif(changed){\r\n\t\t\tthis.updateEventListeners();\r\n\t\t}\r\n\t}\r\n\t\r\n\tupdateEventListeners(){\r\n\t\tfor(let key in this.listeners){\r\n\t\t\tlet listener = this.listeners[key];\r\n\t\t\t\r\n\t\t\tif(listener.components.length){\r\n\t\t\t\tif(!listener.handler){\r\n\t\t\t\t\tlistener.handler = this.track.bind(this, key);\r\n\t\t\t\t\tthis.el.addEventListener(key, listener.handler)\r\n\t\t\t\t\t// this.el.addEventListener(key, listener.handler, {passive: true})\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(listener.handler){\r\n\t\t\t\t\tthis.el.removeEventListener(key, listener.handler)\r\n\t\t\t\t\tlistener.handler = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\ttrack(type, e){\r\n\t\tvar path = (e.composedPath && e.composedPath()) || e.path;\r\n\t\t\r\n\t\tvar targets = this.findTargets(path);\r\n\t\ttargets = this.bindComponents(type, targets);\r\n\t\t\r\n\t\tthis.triggerEvents(type, e, targets);\r\n\t\t\r\n\t\tif(this.pseudoTracking && (type == \"mouseover\" || type == \"mouseleave\") && !Object.keys(targets).length){\r\n\t\t\tthis.pseudoMouseLeave(\"none\", e);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfindTargets(path){\r\n\t\tvar targets = {};\r\n\t\t\r\n\t\tlet componentMap = Object.keys(this.componentMap);\r\n\t\t\r\n\t\tfor (let el of path) {\r\n\t\t\tlet classList = el.classList ? [...el.classList] : [];\r\n\t\t\t\r\n\t\t\tlet abort = classList.filter((item) => {\r\n\t\t\t\treturn this.abortClasses.includes(item);\r\n\t\t\t})\r\n\t\t\t\r\n\t\t\tif(abort.length){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlet elTargets = classList.filter((item) => {\r\n\t\t\t\treturn componentMap.includes(item);\r\n\t\t\t})\r\n\t\t\t\r\n\t\t\tfor (let target of elTargets) {\r\n\t\t\t\ttargets[this.componentMap[target]] = el;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(targets.group && targets.group === targets.row){\r\n\t\t\tdelete targets.row;\r\n\t\t}\r\n\t\t\r\n\t\treturn targets;\r\n\t}\r\n\t\r\n\tbindComponents(type, targets){\r\n\t\t//ensure row component is looked up before cell\r\n\t\tvar keys = Object.keys(targets).reverse(),\r\n\t\tlistener = this.listeners[type],\r\n\t\ttargetMatches = {};\r\n\t\t\r\n\t\tfor(let key of keys){\r\n\t\t\tlet component;\r\n\t\t\tlet target = targets[key];\r\n\t\t\tlet previousTarget = this.previousTargets[key];\r\n\t\t\t\r\n\t\t\tif(previousTarget && previousTarget.target === target){\r\n\t\t\t\tcomponent = previousTarget.component;\r\n\t\t\t}else{\r\n\t\t\t\tswitch(key){\r\n\t\t\t\t\tcase \"row\":\r\n\t\t\t\t\tcase \"group\":\r\n\t\t\t\t\tif(listener.components.includes(\"row\") || listener.components.includes(\"cell\") || listener.components.includes(\"group\")){\r\n\t\t\t\t\t\tlet rows = this.table.rowManager.getVisibleRows(true);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcomponent = rows.find((row) => {\r\n\t\t\t\t\t\t\treturn row.getElement() === target;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(targets[\"row\"] && targets[\"row\"].parentNode && targets[\"row\"].parentNode.closest(\".tabulator-row\")){\r\n\t\t\t\t\t\t\ttargets[key] = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"column\":\r\n\t\t\t\t\tif(listener.components.includes(\"column\")){\r\n\t\t\t\t\t\tcomponent = this.table.columnManager.findColumn(target);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"cell\":\r\n\t\t\t\t\tif(listener.components.includes(\"cell\")){\r\n\t\t\t\t\t\tif(targets[\"row\"] instanceof Row){\r\n\t\t\t\t\t\t\tcomponent = targets[\"row\"].findCell(target);\r\n\t\t\t\t\t\t}else{\t\r\n\t\t\t\t\t\t\tif(targets[\"row\"]){\r\n\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?\")\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(component){\r\n\t\t\t\ttargets[key] = component;\r\n\t\t\t\ttargetMatches[key] = {\r\n\t\t\t\t\ttarget:target,\r\n\t\t\t\t\tcomponent:component,\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.previousTargets = targetMatches;\r\n\t\t\r\n\t\treturn targets;\r\n\t}\r\n\t\r\n\ttriggerEvents(type, e, targets){\r\n\t\tvar listener = this.listeners[type];\r\n\t\t\r\n\t\tfor(let key in targets){\r\n\t\t\tif(targets[key] && listener.components.includes(key)){\r\n\t\t\t\tthis.dispatch(key + \"-\" + type, e, targets[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tclearWatchers(){\r\n\t\tfor(let key in this.listeners){\r\n\t\t\tlet listener = this.listeners[key];\r\n\t\t\t\r\n\t\t\tif(listener.handler){\r\n\t\t\t\tthis.el.removeEventListener(key, listener.handler)\r\n\t\t\t\tlistener.handler = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}","export default class ComponentFunctionBinder{\r\n\r\n\tconstructor(table){\r\n\t\tthis.table = table;\r\n\r\n\t\tthis.bindings = {};\r\n\t}\r\n\r\n\tbind(type, funcName, handler){\r\n\t\tif(!this.bindings[type]){\r\n\t\t\tthis.bindings[type] = {};\r\n\t\t}\r\n\r\n\t\tif(this.bindings[type][funcName]){\r\n\t\t\tconsole.warn(\"Unable to bind component handler, a matching function name is already bound\", type, funcName, handler)\r\n\t\t}else{\r\n\t\t\tthis.bindings[type][funcName] = handler;\r\n\t\t}\r\n\t}\r\n\r\n\thandle(type, component, name){\r\n\t\tif(this.bindings[type] && this.bindings[type][name] && typeof this.bindings[type][name].bind === 'function'){\r\n\t\t\treturn this.bindings[type][name].bind(null, component);\r\n\t\t}else{\r\n\t\t\tif(name !== \"then\" && typeof name === \"string\" && !name.startsWith(\"_\")){\r\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?\")\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","import CoreFeature from '../CoreFeature.js';\r\n\r\nexport default class DataLoader extends CoreFeature{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.loaderElement = this.createLoaderElement(); //loader message div\r\n\t\tthis.msgElement = this.createMsgElement(); //message element\r\n\t\tthis.loadingElement = null;\r\n\t\tthis.errorElement = null;\r\n\r\n\t\tthis.requestOrder = 0; //prevent requests comming out of sequence if overridden by another load request\r\n\t\tthis.loading = false;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tvar template;\r\n\r\n\t\tthis.loaderElement.appendChild(this.msgElement);\r\n\r\n\t\tif(this.table.options.dataLoaderLoading){\r\n\t\t\tif(typeof this.table.options.dataLoaderLoading == \"string\"){\r\n\t\t\t\ttemplate = document.createElement('template');\r\n\t\t\t\ttemplate.innerHTML = this.table.options.dataLoaderLoading.trim();\r\n\t\t\t\tthis.loadingElement = template.firstElementChild;\r\n\t\t\t}else{\r\n\t\t\t\tthis.loadingElement = this.table.options.dataLoaderLoading;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.table.options.dataLoaderError){\r\n\t\t\tif(typeof this.table.options.dataLoaderError == \"string\"){\r\n\t\t\t\ttemplate = document.createElement('template');\r\n\t\t\t\ttemplate.innerHTML = this.table.options.dataLoaderError.trim();\r\n\t\t\t\tthis.errorElement = template.firstElementChild;\r\n\t\t\t}else{\r\n\t\t\t\tthis.errorElement = this.table.options.dataLoaderError;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tcreateLoaderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-loader\");\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateMsgElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-loader-msg\");\r\n\t\tel.setAttribute(\"role\", \"alert\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tload(data, params, config, replace, silent){\r\n\t\tvar requestNo = ++this.requestOrder;\r\n\r\n\t\tthis.dispatchExternal(\"dataLoading\", data);\r\n\r\n\t\t//parse json data to array\r\n\t\tif (data && (data.indexOf(\"{\") == 0 || data.indexOf(\"[\") == 0)){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(this.confirm(\"data-loading\", [data, params, config, silent])){\r\n\t\t\tthis.loading = true;\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.showLoader();\r\n\t\t\t}\r\n\r\n\t\t\t//get params for request\r\n\t\t\tparams = this.chain(\"data-params\", [data, config, silent], params || {}, params || {});\r\n\r\n\t\t\tparams = this.mapParams(params, this.table.options.dataSendParams);\r\n\r\n\t\t\tvar result = this.chain(\"data-load\", [data, params, config, silent], false, Promise.resolve([]));\r\n\t\t\t\r\n\t\t\treturn result.then((response) => {\r\n\t\t\t\tif(!Array.isArray(response) && typeof response == \"object\"){\r\n\t\t\t\t\tresponse = this.mapParams(response, this.objectInvert(this.table.options.dataReceiveParams));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar rowData = this.chain(\"data-loaded\", response, null, response);\r\n\r\n\t\t\t\tif(requestNo == this.requestOrder){\r\n\t\t\t\t\tthis.hideLoader();\r\n\r\n\t\t\t\t\tif(rowData !== false){\r\n\t\t\t\t\t\tthis.dispatchExternal(\"dataLoaded\", rowData);\r\n\t\t\t\t\t\tthis.table.rowManager.setData(rowData, replace, !replace);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\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\");\r\n\t\t\t\t}\r\n\t\t\t}).catch((error) => {\r\n\t\t\t\tconsole.error(\"Data Load Error: \", error);\r\n\t\t\t\tthis.dispatchExternal(\"dataLoadError\", error);\r\n\r\n\t\t\t\tif(!silent){\r\n\t\t\t\t\tthis.showError();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.hideLoader();\r\n\t\t\t\t}, this.table.options.dataLoaderErrorTimeout);\r\n\t\t\t})\r\n\t\t\t.finally(() => {\r\n\t\t\t\tthis.loading = false;\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"dataLoaded\", data);\r\n\r\n\t\t\tif(!data){\r\n\t\t\t\tdata = [];\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.rowManager.setData(data, replace, !replace);\r\n\t\t\treturn Promise.resolve();\r\n\t\t}\r\n\t}\r\n\r\n\tmapParams(params, map){\r\n\t\tvar output = {};\r\n\r\n\t\tfor(let key in params){\r\n\t\t\toutput[map.hasOwnProperty(key) ? map[key] : key] = params[key];\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tobjectInvert(obj){\r\n\t\tvar output = {};\r\n\r\n\t\tfor(let key in obj){\r\n\t\t\toutput[obj[key]] = key;\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tblockActiveLoad(){\r\n\t\tthis.requestOrder++;\r\n\t}\r\n\r\n\tshowLoader(){\r\n\t\tvar shouldLoad = typeof this.table.options.dataLoader === \"function\" ? this.table.options.dataLoader() : this.table.options.dataLoader;\r\n\r\n\t\tif(shouldLoad){\r\n\t\t\tthis.hideLoader();\r\n\r\n\t\t\twhile(this.msgElement.firstChild) this.msgElement.removeChild(this.msgElement.firstChild);\r\n\r\n\t\t\tthis.msgElement.classList.remove(\"tabulator-error\");\r\n\t\t\tthis.msgElement.classList.add(\"tabulator-loading\");\r\n\r\n\t\t\tif(this.loadingElement){\r\n\t\t\t\tthis.msgElement.appendChild(this.loadingElement);\r\n\t\t\t}else{\r\n\t\t\t\tthis.msgElement.innerHTML = this.langText(\"data|loading\");\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.element.appendChild(this.loaderElement);\r\n\t\t}\r\n\t}\r\n\r\n\tshowError(){\r\n\t\tthis.hideLoader();\r\n\r\n\t\twhile(this.msgElement.firstChild) this.msgElement.removeChild(this.msgElement.firstChild);\r\n\t\tthis.msgElement.classList.remove(\"tabulator-loading\");\r\n\t\tthis.msgElement.classList.add(\"tabulator-error\");\r\n\r\n\t\tif(this.errorElement){\r\n\t\t\tthis.msgElement.appendChild(this.errorElement);\r\n\t\t}else{\r\n\t\t\tthis.msgElement.innerHTML = this.langText(\"data|error\");\r\n\t\t}\r\n\r\n\t\tthis.table.element.appendChild(this.loaderElement);\r\n\t}\r\n\r\n\r\n\thideLoader(){\r\n\t\tif(this.loaderElement.parentNode){\r\n\t\t\tthis.loaderElement.parentNode.removeChild(this.loaderElement);\r\n\t\t}\r\n\t}\r\n}","export default class ExternalEventBus {\r\n\r\n\tconstructor(table, optionsList, debug){\r\n\t\tthis.table = table;\r\n\t\tthis.events = {};\r\n\t\tthis.optionsList = optionsList || {};\r\n\t\tthis.subscriptionNotifiers = {};\r\n\r\n\t\tthis.dispatch = debug ? this._debugDispatch.bind(this) : this._dispatch.bind(this);\r\n\t\tthis.debug = debug;\r\n\t}\r\n\r\n\tsubscriptionChange(key, callback){\r\n\t\tif(!this.subscriptionNotifiers[key]){\r\n\t\t\tthis.subscriptionNotifiers[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.subscriptionNotifiers[key].push(callback);\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis._notifiySubscriptionChange(key, true);\r\n\t\t}\r\n\t}\r\n\r\n\tsubscribe(key, callback){\r\n\t\tif(!this.events[key]){\r\n\t\t\tthis.events[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.events[key].push(callback);\r\n\r\n\t\tthis._notifiySubscriptionChange(key, true);\r\n\t}\r\n\r\n\tunsubscribe(key, callback){\r\n\t\tvar index;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tif(callback){\r\n\t\t\t\tindex = this.events[key].findIndex((item) => {\r\n\t\t\t\t\treturn item === callback;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tthis.events[key].splice(index, 1);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Cannot remove event, no matching event found:\", key, callback);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tdelete this.events[key];\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cannot remove event, no events set on:\", key);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._notifiySubscriptionChange(key, false);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.events[key] && this.events[key].length;\r\n\t}\r\n\r\n\t_notifiySubscriptionChange(key, subscribed){\r\n\t\tvar notifiers = this.subscriptionNotifiers[key];\r\n\r\n\t\tif(notifiers){\r\n\t\t\tnotifiers.forEach((callback)=>{\r\n\t\t\t\tcallback(subscribed);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_dispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift(),\r\n\t\tresult;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tthis.events[key].forEach((callback, i) => {\r\n\t\t\t\tlet callResult = callback.apply(this.table, args);\r\n\r\n\t\t\t\tif(!i){\r\n\t\t\t\t\tresult = callResult;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t_debugDispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"ExternalEvent:\" + args[0];\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._dispatch(...arguments)\r\n\t}\r\n}","export default class InternalEventBus {\r\n\r\n\tconstructor(debug){\r\n\t\tthis.events = {};\r\n\t\tthis.subscriptionNotifiers = {};\r\n\r\n\t\tthis.dispatch = debug ? this._debugDispatch.bind(this) : this._dispatch.bind(this);\r\n\t\tthis.chain = debug ? this._debugChain.bind(this) : this._chain.bind(this);\r\n\t\tthis.confirm = debug ? this._debugConfirm.bind(this) : this._confirm.bind(this);\r\n\t\tthis.debug = debug;\r\n\t}\r\n\r\n\tsubscriptionChange(key, callback){\r\n\t\tif(!this.subscriptionNotifiers[key]){\r\n\t\t\tthis.subscriptionNotifiers[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.subscriptionNotifiers[key].push(callback);\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis._notifiySubscriptionChange(key, true);\r\n\t\t}\r\n\t}\r\n\r\n\tsubscribe(key, callback, priority = 10000){\r\n\t\tif(!this.events[key]){\r\n\t\t\tthis.events[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.events[key].push({callback, priority});\r\n\r\n\t\tthis.events[key].sort((a, b) => {\r\n\t\t\treturn a.priority - b.priority;\r\n\t\t});\r\n\r\n\t\tthis._notifiySubscriptionChange(key, true);\r\n\t}\r\n\r\n\tunsubscribe(key, callback){\r\n\t\tvar index;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tif(callback){\r\n\t\t\t\tindex = this.events[key].findIndex((item) => {\r\n\t\t\t\t\treturn item.callback === callback;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tthis.events[key].splice(index, 1);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Cannot remove event, no matching event found:\", key, callback);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cannot remove event, no events set on:\", key);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._notifiySubscriptionChange(key, false);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.events[key] && this.events[key].length;\r\n\t}\r\n\r\n\t_chain(key, args, initialValue, fallback){\r\n\t\tvar value = initialValue;\r\n\r\n\t\tif(!Array.isArray(args)){\r\n\t\t\targs = [args];\r\n\t\t}\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis.events[key].forEach((subscriber, i) => {\r\n\t\t\t\tvalue = subscriber.callback.apply(this, args.concat([value]));\r\n\t\t\t});\r\n\r\n\t\t\treturn value;\r\n\t\t}else{\r\n\t\t\treturn typeof fallback === \"function\" ? fallback() : fallback;\r\n\t\t}\r\n\t}\r\n\r\n\t_confirm(key, args){\r\n\t\tvar confirmed = false;\r\n\r\n\t\tif(!Array.isArray(args)){\r\n\t\t\targs = [args];\r\n\t\t}\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis.events[key].forEach((subscriber, i) => {\r\n\t\t\t\tif(subscriber.callback.apply(this, args)){\r\n\t\t\t\t\tconfirmed = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn confirmed;\r\n\t}\r\n\r\n\t_notifiySubscriptionChange(key, subscribed){\r\n\t\tvar notifiers = this.subscriptionNotifiers[key];\r\n\r\n\t\tif(notifiers){\r\n\t\t\tnotifiers.forEach((callback)=>{\r\n\t\t\t\tcallback(subscribed);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_dispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift();\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tthis.events[key].forEach((subscriber) => {\r\n\t\t\t\tlet callResult = subscriber.callback.apply(this, args);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_debugDispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._dispatch(...arguments);\r\n\t}\r\n\r\n\t_debugChain(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._chain(...arguments);\r\n\t}\r\n\r\n\t_debugConfirm(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._confirm(...arguments);\r\n\t}\r\n}","import Tabulator from '../Tabulator.js';\r\n\r\nclass TableRegistry {\r\n\r\n\tstatic register(table){\r\n\t\tTableRegistry.tables.push(table);\r\n\t}\r\n\r\n\tstatic deregister(table){\r\n\t\tvar index = TableRegistry.tables.indexOf(table);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tTableRegistry.tables.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\tstatic lookupTable(query, silent){\r\n\t\tvar results = [],\r\n\t\tmatches, match;\r\n\r\n\t\tif(typeof query === \"string\"){\r\n\t\t\tmatches = document.querySelectorAll(query);\r\n\r\n\t\t\tif(matches.length){\r\n\t\t\t\tfor(var i = 0; i < matches.length; i++){\r\n\t\t\t\t\tmatch = TableRegistry.matchElement(matches[i]);\r\n\r\n\t\t\t\t\tif(match){\r\n\t\t\t\t\t\tresults.push(match);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}else if((typeof HTMLElement !== \"undefined\" && query instanceof HTMLElement) || query instanceof Tabulator){\r\n\t\t\tmatch = TableRegistry.matchElement(query);\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tresults.push(match);\r\n\t\t\t}\r\n\t\t}else if(Array.isArray(query)){\r\n\t\t\tquery.forEach(function(item){\r\n\t\t\t\tresults = results.concat(TableRegistry.lookupTable(item));\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Table Connection Error - Invalid Selector\", query);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n\r\n\tstatic matchElement(element){\r\n\t\treturn TableRegistry.tables.find(function(table){\r\n\t\t\treturn element instanceof Tabulator ? table === element : table.element === element;\r\n\t\t});\r\n\t}\r\n}\r\n\r\nTableRegistry.tables = [];\r\n\r\nexport default TableRegistry;","import CoreFeature from './CoreFeature.js';\r\n\r\nclass Module extends CoreFeature{\r\n\r\n\tconstructor(table, name){\r\n\t\tsuper(table);\r\n\r\n\t\tthis._handler = null;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\t// setup module when table is initialized, to be overriden in module\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t////// Options Registration ///////\r\n\t///////////////////////////////////\r\n\r\n\tregisterTableOption(key, value){\r\n\t\tthis.table.optionsList.register(key, value);\r\n\t}\r\n\r\n\tregisterColumnOption(key, value){\r\n\t\tthis.table.columnManager.optionsList.register(key, value);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t/// Public Function Registation ///\r\n\t///////////////////////////////////\r\n\r\n\tregisterTableFunction(name, func){\r\n\t\tif(typeof this.table[name] === \"undefined\"){\r\n\t\t\tthis.table[name] = func;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Unable to bind table function, name already in use\", name)\r\n\t\t}\r\n\t}\r\n\r\n\tregisterComponentFunction(component, func, handler){\r\n\t\treturn this.table.componentFunctionBinder.bind(component, func, handler);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Data Pipeline //////////\r\n\t///////////////////////////////////\r\n\r\n\tregisterDataHandler(handler, priority){\r\n\t\tthis.table.rowManager.registerDataPipelineHandler(handler, priority)\r\n\t\tthis._handler = handler;\r\n\t}\r\n\r\n\tregisterDisplayHandler(handler, priority){\r\n\t\tthis.table.rowManager.registerDisplayPipelineHandler(handler, priority)\r\n\t\tthis._handler = handler;\r\n\t}\r\n\r\n\trefreshData(renderInPosition, handler){\r\n\t\tif(!handler){\r\n\t\t\thandler = this._handler;\r\n\t\t}\r\n\r\n\t\tif(handler){\r\n\t\t\tthis.table.rowManager.refreshActiveData(handler, false, renderInPosition);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport default Module;","//resize columns to fit data they contain\r\nexport default function(columns){\r\n\tthis.table.columnManager.renderer.reinitializeColumnWidths(columns);\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n};","//resize columns to fit data they contain and stretch row to fill table, also used for fitDataTable\r\nexport default function(columns){\r\n\tcolumns.forEach(function(column){\r\n\t\tcolumn.reinitializeWidth();\r\n\t});\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n};","//resize columns to fit data the contain and stretch last column to fill table\r\nexport default function(columns){\r\n\tvar colsWidth = 0,\r\n\ttableWidth = this.table.rowManager.element.clientWidth,\r\n\tgap = 0,\r\n\tlastCol = false;\r\n\r\n\tcolumns.forEach((column, i) => {\r\n\t\tif(!column.widthFixed){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t}\r\n\r\n\t\tif(this.table.options.responsiveLayout ? column.modules.responsive.visible : column.visible){\r\n\t\t\tlastCol = column;\r\n\t\t}\r\n\r\n\t\tif(column.visible){\r\n\t\t\tcolsWidth += column.getWidth();\r\n\t\t}\r\n\t});\r\n\r\n\tif(lastCol){\r\n\t\tgap = tableWidth - colsWidth + lastCol.getWidth();\r\n\r\n\t\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\t\tlastCol.setWidth(0);\r\n\t\t\tthis.table.modules.responsiveLayout.update();\r\n\t\t}\r\n\r\n\t\tif(gap > 0){\r\n\t\t\tlastCol.setWidth(gap);\r\n\t\t}else{\r\n\t\t\tlastCol.reinitializeWidth();\r\n\t\t}\r\n\t}else{\r\n\t\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\t\tthis.table.modules.responsiveLayout.update();\r\n\t\t}\r\n\t}\r\n};","//resize columns to fit\r\nexport default function(columns){\r\n\tvar totalWidth = this.table.element.clientWidth; //table element width\r\n\tvar fixedWidth = 0; //total width of columns with a defined width\r\n\tvar flexWidth = 0; //total width available to flexible columns\r\n\tvar flexGrowUnits = 0; //total number of widthGrow blocks accross all columns\r\n\tvar flexColWidth = 0; //desired width of flexible columns\r\n\tvar flexColumns = []; //array of flexible width columns\r\n\tvar fixedShrinkColumns = []; //array of fixed width columns that can shrink\r\n\tvar flexShrinkUnits = 0; //total number of widthShrink blocks accross all columns\r\n\tvar overflowWidth = 0; //horizontal overflow width\r\n\tvar gapFill=0; //number of pixels to be added to final column to close and half pixel gaps\r\n\r\n\tfunction calcWidth(width){\r\n\t\tvar colWidth;\r\n\r\n\t\tif(typeof(width) == \"string\"){\r\n\t\t\tif(width.indexOf(\"%\") > -1){\r\n\t\t\t\tcolWidth = (totalWidth / 100) * parseInt(width);\r\n\t\t\t}else{\r\n\t\t\t\tcolWidth = parseInt(width);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcolWidth = width;\r\n\t\t}\r\n\r\n\t\treturn colWidth;\r\n\t}\r\n\r\n\t//ensure columns resize to take up the correct amount of space\r\n\tfunction scaleColumns(columns, freeSpace, colWidth, shrinkCols){\r\n\r\n\t\tvar oversizeCols = [],\r\n\t\toversizeSpace = 0,\r\n\t\tremainingSpace = 0,\r\n\t\tnextColWidth = 0,\r\n\t\tremainingFlexGrowUnits = flexGrowUnits,\r\n\t\tgap = 0,\r\n\t\tchangeUnits = 0,\r\n\t\tundersizeCols = [];\r\n\r\n\t\tfunction calcGrow(col){\r\n\t\t\treturn (colWidth * (col.column.definition.widthGrow || 1));\r\n\t\t}\r\n\r\n\t\tfunction calcShrink(col){\r\n\t\t\treturn (calcWidth(col.width) - (colWidth * (col.column.definition.widthShrink || 0)))\r\n\t\t}\r\n\r\n\t\tcolumns.forEach(function(col, i){\r\n\t\t\tvar width = shrinkCols ? calcShrink(col) : calcGrow(col);\r\n\t\t\tif(col.column.minWidth >= width){\r\n\t\t\t\toversizeCols.push(col);\r\n\t\t\t}else{\r\n\t\t\t\tif(col.column.maxWidth && col.column.maxWidth < width){\r\n\t\t\t\t\tcol.width = col.column.maxWidth;\r\n\t\t\t\t\tfreeSpace -= col.column.maxWidth;\r\n\r\n\t\t\t\t\tremainingFlexGrowUnits -= shrinkCols ? (col.column.definition.widthShrink || 1) : (col.column.definition.widthGrow || 1);\r\n\r\n\t\t\t\t\tif(remainingFlexGrowUnits){\r\n\t\t\t\t\t\tcolWidth = Math.floor(freeSpace/remainingFlexGrowUnits);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tundersizeCols.push(col);\r\n\t\t\t\t\tchangeUnits += shrinkCols ? (col.column.definition.widthShrink || 1) : (col.column.definition.widthGrow || 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(oversizeCols.length){\r\n\t\t\toversizeCols.forEach(function(col){\r\n\t\t\t\toversizeSpace += shrinkCols ? col.width - col.column.minWidth : col.column.minWidth;\r\n\t\t\t\tcol.width = col.column.minWidth;\r\n\t\t\t});\r\n\r\n\t\t\tremainingSpace = freeSpace - oversizeSpace;\r\n\r\n\t\t\tnextColWidth = changeUnits ? Math.floor(remainingSpace/changeUnits) : remainingSpace;\r\n\r\n\t\t\tgap = remainingSpace - (nextColWidth * changeUnits);\r\n\r\n\t\t\tgap += scaleColumns(undersizeCols, remainingSpace, nextColWidth, shrinkCols);\r\n\t\t}else{\r\n\t\t\tgap = changeUnits ? freeSpace - (Math.floor(freeSpace/changeUnits) * changeUnits) : freeSpace;\r\n\r\n\t\t\tundersizeCols.forEach(function(column){\r\n\t\t\t\tcolumn.width = shrinkCols ? calcShrink(column) : calcGrow(column);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn gap;\r\n\t}\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n\r\n\t//adjust for vertical scrollbar if present\r\n\tif(this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight){\r\n\t\ttotalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth;\r\n\t}\r\n\r\n\tcolumns.forEach(function(column){\r\n\t\tvar width, minWidth, colWidth;\r\n\r\n\t\tif(column.visible){\r\n\r\n\t\t\twidth = column.definition.width;\r\n\t\t\tminWidth = parseInt(column.minWidth);\r\n\r\n\t\t\tif(width){\r\n\r\n\t\t\t\tcolWidth = calcWidth(width);\r\n\r\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\r\n\r\n\t\t\t\tif(column.definition.widthShrink){\r\n\t\t\t\t\tfixedShrinkColumns.push({\r\n\t\t\t\t\t\tcolumn:column,\r\n\t\t\t\t\t\twidth:colWidth > minWidth ? colWidth : minWidth\r\n\t\t\t\t\t});\r\n\t\t\t\t\tflexShrinkUnits += column.definition.widthShrink;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tflexColumns.push({\r\n\t\t\t\t\tcolumn:column,\r\n\t\t\t\t\twidth:0,\r\n\t\t\t\t});\r\n\t\t\t\tflexGrowUnits += column.definition.widthGrow || 1;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\t//calculate available space\r\n\tflexWidth = totalWidth - fixedWidth;\r\n\r\n\t//calculate correct column size\r\n\tflexColWidth = Math.floor(flexWidth / flexGrowUnits)\r\n\r\n\t//generate column widths\r\n\tvar gapFill = scaleColumns(flexColumns, flexWidth, flexColWidth, false);\r\n\r\n\t//increase width of last column to account for rounding errors\r\n\tif(flexColumns.length && gapFill > 0){\r\n\t\tflexColumns[flexColumns.length-1].width += + gapFill;\r\n\t}\r\n\r\n\t//caculate space for columns to be shrunk into\r\n\tflexColumns.forEach(function(col){\r\n\t\tflexWidth -= col.width;\r\n\t});\r\n\r\n\toverflowWidth = Math.abs(gapFill) + flexWidth;\r\n\r\n\t//shrink oversize columns if there is no available space\r\n\tif(overflowWidth > 0 && flexShrinkUnits){\r\n\t\tgapFill = scaleColumns(fixedShrinkColumns, overflowWidth, Math.floor(overflowWidth / flexShrinkUnits), true);\r\n\t}\r\n\r\n\t//decrease width of last column to account for rounding errors\r\n\tif(fixedShrinkColumns.length){\r\n\t\tfixedShrinkColumns[fixedShrinkColumns.length-1].width -= gapFill;\r\n\t}\r\n\r\n\tflexColumns.forEach(function(col){\r\n\t\tcol.column.setWidth(col.width);\r\n\t});\r\n\r\n\tfixedShrinkColumns.forEach(function(col){\r\n\t\tcol.column.setWidth(col.width);\r\n\t});\r\n};","import fitData from './modes/fitData.js';\r\nimport fitDataGeneral from './modes/fitDataGeneral.js';\r\nimport fitDataStretch from './modes/fitDataStretch.js';\r\nimport fitColumns from './modes/fitColumns.js';\r\n\r\nexport default {\r\n\tfitData:fitData,\r\n\tfitDataFill:fitDataGeneral,\r\n\tfitDataTable:fitDataGeneral,\r\n\tfitDataStretch:fitDataStretch,\r\n\tfitColumns:fitColumns ,\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultModes from './defaults/modes.js';\r\n\r\nclass Layout extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table, \"layout\");\r\n\r\n\t\tthis.mode = null;\r\n\r\n\t\tthis.registerTableOption(\"layout\", \"fitData\"); //layout type\r\n\t\tthis.registerTableOption(\"layoutColumnsOnNewData\", false); //update column widths on setData\r\n\r\n\t\tthis.registerColumnOption(\"widthGrow\");\r\n\t\tthis.registerColumnOption(\"widthShrink\");\r\n\t}\r\n\r\n\t//initialize layout system\r\n\tinitialize(){\r\n\t\tvar layout = this.table.options.layout;\r\n\r\n\t\tif(Layout.modes[layout]){\r\n\t\t\tthis.mode = layout;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Layout Error - invalid mode set, defaulting to 'fitData' : \" + layout);\r\n\t\t\tthis.mode = 'fitData';\r\n\t\t}\r\n\r\n\t\tthis.table.element.setAttribute(\"tabulator-layout\", this.mode);\r\n\t}\r\n\r\n\tgetMode(){\r\n\t\treturn this.mode;\r\n\t}\r\n\r\n\t//trigger table layout\r\n\tlayout(){\r\n\t\tthis.dispatch(\"layout-refreshing\")\r\n\t\tLayout.modes[this.mode].call(this, this.table.columnManager.columnsByIndex);\r\n\r\n\t\tthis.dispatch(\"layout-refreshed\")\r\n\t}\r\n}\r\n\r\nLayout.moduleName = \"layout\";\r\n\r\n//load defaults\r\nLayout.modes = defaultModes;\r\n\r\nexport default Layout;","export default {\r\n\t\"default\":{ //hold default locale text\r\n\t\t\"groups\":{\r\n\t\t\t\"item\":\"item\",\r\n\t\t\t\"items\":\"items\",\r\n\t\t},\r\n\t\t\"columns\":{\r\n\t\t},\r\n\t\t\"data\":{\r\n\t\t\t\"loading\":\"Loading\",\r\n\t\t\t\"error\":\"Error\",\r\n\t\t},\r\n\t\t\"pagination\":{\r\n\t\t\t\"page_size\":\"Page Size\",\r\n\t\t\t\"page_title\":\"Show Page\",\r\n\t\t\t\"first\":\"First\",\r\n\t\t\t\"first_title\":\"First Page\",\r\n\t\t\t\"last\":\"Last\",\r\n\t\t\t\"last_title\":\"Last Page\",\r\n\t\t\t\"prev\":\"Prev\",\r\n\t\t\t\"prev_title\":\"Prev Page\",\r\n\t\t\t\"next\":\"Next\",\r\n\t\t\t\"next_title\":\"Next Page\",\r\n\t\t\t\"all\":\"All\",\r\n\t\t\t\"counter\":{\r\n\t\t\t\t\"showing\": \"Showing\",\r\n\t\t\t\t\"of\": \"of\",\r\n\t\t\t\t\"rows\": \"rows\",\r\n\t\t\t\t\"pages\": \"pages\",\r\n\t\t\t}\r\n\t\t},\r\n\t\t\"headerFilters\":{\r\n\t\t\t\"default\":\"filter column...\",\r\n\t\t\t\"columns\":{}\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defaultLangs from './defaults/langs.js';\r\n\r\nclass Localize extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.locale = \"default\"; //current locale\r\n\t\tthis.lang = false; //current language\r\n\t\tthis.bindings = {}; //update events to call when locale is changed\r\n\t\tthis.langList = {};\r\n\r\n\t\tthis.registerTableOption(\"locale\", false); //current system language\r\n\t\tthis.registerTableOption(\"langs\", {});\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.langList = Helpers.deepClone(Localize.langs);\r\n\r\n\t\tif(this.table.options.columnDefaults.headerFilterPlaceholder !== false){\r\n\t\t\tthis.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder);\r\n\t\t}\r\n\r\n\t\tfor(let locale in this.table.options.langs){\r\n\t\t\tthis.installLang(locale, this.table.options.langs[locale]);\r\n\t\t}\r\n\r\n\t\tthis.setLocale(this.table.options.locale);\r\n\r\n\t\tthis.registerTableFunction(\"setLocale\", this.setLocale.bind(this));\r\n\t\tthis.registerTableFunction(\"getLocale\", this.getLocale.bind(this));\r\n\t\tthis.registerTableFunction(\"getLang\", this.getLang.bind(this));\r\n\t}\r\n\r\n\t//set header placehoder\r\n\tsetHeaderFilterPlaceholder(placeholder){\r\n\t\tthis.langList.default.headerFilters.default = placeholder;\r\n\t}\r\n\r\n\t//set header filter placeholder by column\r\n\tsetHeaderFilterColumnPlaceholder(column, placeholder){\r\n\t\tthis.langList.default.headerFilters.columns[column] = placeholder;\r\n\r\n\t\tif(this.lang && !this.lang.headerFilters.columns[column]){\r\n\t\t\tthis.lang.headerFilters.columns[column] = placeholder;\r\n\t\t}\r\n\t}\r\n\r\n\t//setup a lang description object\r\n\tinstallLang(locale, lang){\r\n\t\tif(this.langList[locale]){\r\n\t\t\tthis._setLangProp(this.langList[locale], lang);\r\n\t\t}else{\r\n\t\t\tthis.langList[locale] = lang;\r\n\t\t}\r\n\t}\r\n\r\n\t_setLangProp(lang, values){\r\n\t\tfor(let key in values){\r\n\t\t\tif(lang[key] && typeof lang[key] == \"object\"){\r\n\t\t\t\tthis._setLangProp(lang[key], values[key])\r\n\t\t\t}else{\r\n\t\t\t\tlang[key] = values[key];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//set current locale\r\n\tsetLocale(desiredLocale){\r\n\t\tdesiredLocale = desiredLocale || \"default\";\r\n\r\n\t\t//fill in any matching languge values\r\n\t\tfunction traverseLang(trans, path){\r\n\t\t\tfor(var prop in trans){\r\n\t\t\t\tif(typeof trans[prop] == \"object\"){\r\n\t\t\t\t\tif(!path[prop]){\r\n\t\t\t\t\t\tpath[prop] = {};\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttraverseLang(trans[prop], path[prop]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tpath[prop] = trans[prop];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//determing correct locale to load\r\n\t\tif(desiredLocale === true && navigator.language){\r\n\t\t\t//get local from system\r\n\t\t\tdesiredLocale = navigator.language.toLowerCase();\r\n\t\t}\r\n\r\n\t\tif(desiredLocale){\r\n\t\t\t//if locale is not set, check for matching top level locale else use default\r\n\t\t\tif(!this.langList[desiredLocale]){\r\n\t\t\t\tlet prefix = desiredLocale.split(\"-\")[0];\r\n\r\n\t\t\t\tif(this.langList[prefix]){\r\n\t\t\t\t\tconsole.warn(\"Localization Error - Exact matching locale not found, using closest match: \", desiredLocale, prefix);\r\n\t\t\t\t\tdesiredLocale = prefix;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Localization Error - Matching locale not found, using default: \", desiredLocale);\r\n\t\t\t\t\tdesiredLocale = \"default\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.locale = desiredLocale;\r\n\r\n\t\t//load default lang template\r\n\t\tthis.lang = Helpers.deepClone(this.langList.default || {});\r\n\r\n\t\tif(desiredLocale != \"default\"){\r\n\t\t\ttraverseLang(this.langList[desiredLocale], this.lang);\r\n\t\t}\r\n\r\n\t\tthis.dispatchExternal(\"localized\", this.locale, this.lang);\r\n\r\n\t\tthis._executeBindings();\r\n\t}\r\n\r\n\t//get current locale\r\n\tgetLocale(locale){\r\n\t\treturn this.locale;\r\n\t}\r\n\r\n\t//get lang object for given local or current if none provided\r\n\tgetLang(locale){\r\n\t\treturn locale ? this.langList[locale] : this.lang;\r\n\t}\r\n\r\n\t//get text for current locale\r\n\tgetText(path, value){\r\n\t\tvar path = value ? path + \"|\" + value : path,\r\n\t\tpathArray = path.split(\"|\"),\r\n\t\ttext = this._getLangElement(pathArray, this.locale);\r\n\r\n\t\t// if(text === false){\r\n\t\t// \tconsole.warn(\"Localization Error - Matching localized text not found for given path: \", path);\r\n\t\t// }\r\n\r\n\t\treturn text || \"\";\r\n\t}\r\n\r\n\t//traverse langs object and find localized copy\r\n\t_getLangElement(path, locale){\r\n\t\tvar root = this.lang;\r\n\r\n\t\tpath.forEach(function(level){\r\n\t\t\tvar rootPath;\r\n\r\n\t\t\tif(root){\r\n\t\t\t\trootPath = root[level];\r\n\r\n\t\t\t\tif(typeof rootPath != \"undefined\"){\r\n\t\t\t\t\troot = rootPath;\r\n\t\t\t\t}else{\r\n\t\t\t\t\troot = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn root;\r\n\t}\r\n\r\n\t//set update binding\r\n\tbind(path, callback){\r\n\t\tif(!this.bindings[path]){\r\n\t\t\tthis.bindings[path] = [];\r\n\t\t}\r\n\r\n\t\tthis.bindings[path].push(callback);\r\n\r\n\t\tcallback(this.getText(path), this.lang);\r\n\t}\r\n\r\n\t//itterate through bindings and trigger updates\r\n\t_executeBindings(){\r\n\t\tfor(let path in this.bindings){\r\n\t\t\tthis.bindings[path].forEach((binding) => {\r\n\t\t\t\tbinding(this.getText(path), this.lang);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}\r\n\r\nLocalize.moduleName = \"localize\";\r\n\r\n//load defaults\r\nLocalize.langs = defaultLangs;\r\n\r\nexport default Localize;","import Module from '../../core/Module.js';\r\nimport TableRegistry from '../../core/tools/TableRegistry.js';\r\n\r\nclass Comms extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"tableComms\", this.receive.bind(this));\r\n\t}\r\n\r\n\tgetConnections(selectors){\r\n\t\tvar connections = [],\r\n\t\tconnection;\r\n\r\n\t\tconnection = TableRegistry.lookupTable(selectors);\r\n\r\n\t\tconnection.forEach((con) =>{\r\n\t\t\tif(this.table !== con){\r\n\t\t\t\tconnections.push(con);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn connections;\r\n\t}\r\n\r\n\tsend(selectors, module, action, data){\r\n\t\tvar connections = this.getConnections(selectors);\r\n\r\n\t\tconnections.forEach((connection) => {\r\n\t\t\tconnection.tableComms(this.table.element, module, action, data);\r\n\t\t});\r\n\r\n\t\tif(!connections.length && selectors){\r\n\t\t\tconsole.warn(\"Table Connection Error - No tables matching selector found\", selectors);\r\n\t\t}\r\n\t}\r\n\r\n\treceive(table, module, action, data){\r\n\t\tif(this.table.modExists(module)){\r\n\t\t\treturn this.table.modules[module].commsReceived(table, action, data);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Inter-table Comms Error - no such module:\", module);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nComms.moduleName = \"comms\";\r\n\r\nexport default Comms;","import * as coreModules from '../modules/core.js';\r\nimport TableRegistry from './TableRegistry.js';\r\n\r\nexport default class ModuleBinder {\r\n\r\n\tconstructor(tabulator, modules){\r\n\t\tthis.bindStaticFuctionality(tabulator);\r\n\t\tthis.bindModules(tabulator, coreModules, true);\r\n\r\n\t\tif(modules){\r\n\t\t\tthis.bindModules(tabulator, modules);\r\n\t\t}\r\n\t}\r\n\r\n\tbindStaticFuctionality(tabulator){\r\n\t\ttabulator.moduleBindings = {};\r\n\r\n\t\ttabulator.extendModule = function(name, property, values){\r\n\t\t\tif(tabulator.moduleBindings[name]){\r\n\t\t\t\tvar source = tabulator.moduleBindings[name][property];\r\n\r\n\t\t\t\tif(source){\r\n\t\t\t\t\tif(typeof values == \"object\"){\r\n\t\t\t\t\t\tfor(let key in values){\r\n\t\t\t\t\t\t\tsource[key] = values[key];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Module Error - Invalid value type, it must be an object\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Module Error - property does not exist:\", property);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Module Error - module does not exist:\", name);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\ttabulator.registerModule = function(modules){\r\n\t\t\tif(!Array.isArray(modules)){\r\n\t\t\t\tmodules = [modules];\r\n\t\t\t}\r\n\r\n\t\t\tmodules.forEach((mod) => {\r\n\t\t\t\ttabulator.registerModuleBinding(mod)\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\ttabulator.registerModuleBinding = function(mod){\r\n\t\t\ttabulator.moduleBindings[mod.moduleName] = mod;\r\n\t\t};\r\n\r\n\t\ttabulator.findTable = function(query){\r\n\t\t\tvar results = TableRegistry.lookupTable(query, true);\r\n\t\t\treturn Array.isArray(results) && !results.length ? false : results;\r\n\t\t}\r\n\r\n\t\t//ensure that module are bound to instantiated function\r\n\t\ttabulator.prototype.bindModules = function(){\r\n\t\t\tvar orderedMods = [],\r\n\t\t\tunOrderedMods = [];\r\n\r\n\t\t\tthis.modules = {};\r\n\r\n\t\t\tfor(var name in tabulator.moduleBindings){\r\n\t\t\t\tlet mod = tabulator.moduleBindings[name];\r\n\t\t\t\tlet module = new mod(this);\r\n\r\n\t\t\t\tthis.modules[name] = module;\r\n\r\n\t\t\t\tif(mod.prototype.moduleCore){\r\n\t\t\t\t\tthis.modulesCore.push(module);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(mod.moduleInitOrder){\r\n\t\t\t\t\t\torderedMods.push(module);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tunOrderedMods.push(module);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\torderedMods.sort((a, b) => a.moduleInitOrder > b.moduleInitOrder ? 1 : -1);\r\n\r\n\t\t\tthis.modulesRegular = orderedMods.concat(unOrderedMods);\r\n\t\t}\r\n\t}\r\n\r\n\tbindModules(tabulator, modules, core){\r\n\t\tvar mods = Object.values(modules);\r\n\r\n\t\tif(core){\r\n\t\t\tmods.forEach((mod) => {\r\n\t\t\t\tmod.prototype.moduleCore = true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\ttabulator.registerModule(mods);\r\n\t}\r\n}","'use strict';\r\n\r\nimport defaultOptions from './defaults/options.js';\r\n\r\nimport ColumnManager from './ColumnManager.js';\r\nimport RowManager from './RowManager.js';\r\nimport FooterManager from './FooterManager.js';\r\n\r\nimport InteractionMonitor from './tools/InteractionMonitor.js';\r\nimport ComponentFunctionBinder from './tools/ComponentFunctionBinder.js';\r\nimport DataLoader from './tools/DataLoader.js';\r\n\r\nimport ExternalEventBus from './tools/ExternalEventBus.js';\r\nimport InternalEventBus from './tools/InternalEventBus.js';\r\n\r\nimport TableRegistry from './tools/TableRegistry.js';\r\nimport ModuleBinder from './tools/ModuleBinder.js';\r\n\r\nimport OptionsList from './tools/OptionsList.js';\r\n\r\nclass Tabulator {\r\n\r\n\tconstructor(element, options){\r\n\r\n\t\tthis.options = {};\r\n\r\n\t\tthis.columnManager = null; // hold Column Manager\r\n\t\tthis.rowManager = null; //hold Row Manager\r\n\t\tthis.footerManager = null; //holder Footer Manager\r\n\t\tthis.vdomHoz = null; //holder horizontal virtual dom\r\n\t\tthis.externalEvents = null; //handle external event messaging\r\n\t\tthis.eventBus = null; //handle internal event messaging\r\n\t\tthis.interactionMonitor = false; //track user interaction\r\n\t\tthis.browser = \"\"; //hold current browser type\r\n\t\tthis.browserSlow = false; //handle reduced functionality for slower browsers\r\n\t\tthis.browserMobile = false; //check if running on mobile, prevent resize cancelling edit on keyboard appearance\r\n\t\tthis.rtl = false; //check if the table is in RTL mode\r\n\t\tthis.originalElement = null; //hold original table element if it has been replaced\r\n\r\n\t\tthis.componentFunctionBinder = new ComponentFunctionBinder(this); //bind component functions\r\n\t\tthis.dataLoader = false; //bind component functions\r\n\r\n\t\tthis.modules = {}; //hold all modules bound to this table\r\n\t\tthis.modulesCore = []; //hold core modules bound to this table (for initialization purposes)\r\n\t\tthis.modulesRegular = []; //hold regular modules bound to this table (for initialization purposes)\r\n\r\n\t\tthis.optionsList = new OptionsList(this, \"table constructor\");\r\n\r\n\t\tthis.initialized = false;\r\n\r\n\t\tif(this.initializeElement(element)){\r\n\r\n\t\t\tthis.initializeCoreSystems(options);\r\n\r\n\t\t\t//delay table creation to allow event bindings immediately after the constructor\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis._create();\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tTableRegistry.register(this); //register table for inter-device communication\r\n\t}\r\n\r\n\tinitializeElement(element){\r\n\t\tif(typeof HTMLElement !== \"undefined\" && element instanceof HTMLElement){\r\n\t\t\tthis.element = element;\r\n\t\t\treturn true;\r\n\t\t}else if(typeof element === \"string\"){\r\n\t\t\tthis.element = document.querySelector(element);\r\n\r\n\t\t\tif(this.element){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Tabulator Creation Error - no element found matching selector: \", element);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Tabulator Creation Error - Invalid element provided:\", element);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeCoreSystems(options){\r\n\t\tthis.columnManager = new ColumnManager(this);\r\n\t\tthis.rowManager = new RowManager(this);\r\n\t\tthis.footerManager = new FooterManager(this);\r\n\t\tthis.dataLoader = new DataLoader(this);\r\n\r\n\t\tthis.bindModules();\r\n\r\n\t\tthis.options = this.optionsList.generate(Tabulator.defaultOptions, options)\r\n\r\n\t\tthis._clearObjectPointers();\r\n\r\n\t\tthis._mapDeprecatedFunctionality();\r\n\r\n\t\tthis.externalEvents = new ExternalEventBus(this, this.options, this.options.debugEventsExternal);\r\n\t\tthis.eventBus = new InternalEventBus(this.options.debugEventsInternal);\r\n\r\n\t\tthis.interactionMonitor = new InteractionMonitor(this);\r\n\r\n\t\tthis.dataLoader.initialize();\r\n\t\t// this.columnManager.initialize();\r\n\t\t// this.rowManager.initialize();\r\n\t\tthis.footerManager.initialize();\r\n\t}\r\n\r\n\t//convert deprecated functionality to new functions\r\n\t_mapDeprecatedFunctionality(){\r\n\t\t//all previously deprecated functionality removed in the 5.0 release\r\n\t}\r\n\r\n\t_clearSelection(){\r\n\r\n\t\tthis.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tif (window.getSelection) {\r\n\t\t if (window.getSelection().empty) { // Chrome\r\n\t\t \twindow.getSelection().empty();\r\n\t\t } else if (window.getSelection().removeAllRanges) { // Firefox\r\n\t\t \twindow.getSelection().removeAllRanges();\r\n\t\t }\r\n\t\t} else if (document.selection) { // IE?\r\n\t\t\tdocument.selection.empty();\r\n\t\t}\r\n\r\n\t\tthis.element.classList.remove(\"tabulator-block-select\");\r\n\t}\r\n\r\n\t//create table\r\n\t_create(){\r\n\t\tthis.externalEvents.dispatch(\"tableBuilding\");\r\n\t\tthis.eventBus.dispatch(\"table-building\");\r\n\r\n\t\tthis._rtlCheck();\r\n\r\n\t\tthis._buildElement();\r\n\r\n\t\tthis._initializeTable();\r\n\r\n\t\tthis._loadInitialData();\r\n\r\n\t\tthis.initialized = true;\r\n\r\n\t\tthis.externalEvents.dispatch(\"tableBuilt\");\r\n\t}\r\n\r\n\t_rtlCheck(){\r\n\t\tvar style = window.getComputedStyle(this.element);\r\n\r\n\t\tswitch(this.options.textDirection){\r\n\t\t\tcase\"auto\":\r\n\t\t\tif(style.direction !== \"rtl\"){\r\n\t\t\t\tbreak;\r\n\t\t\t};\r\n\r\n\t\t\tcase \"rtl\":\r\n\t\t\tthis.element.classList.add(\"tabulator-rtl\");\r\n\t\t\tthis.rtl = true;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"ltr\":\r\n\t\t\tthis.element.classList.add(\"tabulator-ltr\");\r\n\r\n\t\t\tdefault:\r\n\t\t\tthis.rtl = false;\r\n\t\t}\r\n\t}\r\n\r\n\t//clear pointers to objects in default config object\r\n\t_clearObjectPointers(){\r\n\t\tthis.options.columns = this.options.columns.slice(0);\r\n\r\n\t\tif(Array.isArray(this.options.data) && !this.options.reactiveData){\r\n\t\t\tthis.options.data = this.options.data.slice(0);\r\n\t\t}\r\n\t}\r\n\r\n\t//build tabulator element\r\n\t_buildElement(){\r\n\t\tvar element = this.element,\r\n\t\toptions = this.options,\r\n\t\tnewElement;\r\n\r\n\t\tif(element.tagName === \"TABLE\"){\r\n\t\t\tthis.originalElement = this.element;\r\n\t\t\tnewElement = document.createElement(\"div\");\r\n\r\n\t\t\t//transfer attributes to new element\r\n\t\t\tvar attributes = element.attributes;\r\n\r\n\t\t\t// loop through attributes and apply them on div\r\n\t\t\tfor(var i in attributes){\r\n\t\t\t\tif(typeof attributes[i] == \"object\"){\r\n\t\t\t\t\tnewElement.setAttribute(attributes[i].name, attributes[i].value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// replace table with div element\r\n\t\t\telement.parentNode.replaceChild(newElement, element);\r\n\r\n\t\t\tthis.element = element = newElement;\r\n\t\t}\r\n\r\n\t\telement.classList.add(\"tabulator\");\r\n\t\telement.setAttribute(\"role\", \"grid\");\r\n\r\n\t\t//empty element\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\t//set table height\r\n\t\tif(options.height){\r\n\t\t\toptions.height = isNaN(options.height) ? options.height : options.height + \"px\";\r\n\t\t\telement.style.height = options.height;\r\n\t\t}\r\n\r\n\t\t//set table min height\r\n\t\tif(options.minHeight !== false){\r\n\t\t\toptions.minHeight = isNaN(options.minHeight) ? options.minHeight : options.minHeight + \"px\";\r\n\t\t\telement.style.minHeight = options.minHeight;\r\n\t\t}\r\n\r\n\t\t//set table maxHeight\r\n\t\tif(options.maxHeight !== false){\r\n\t\t\toptions.maxHeight = isNaN(options.maxHeight) ? options.maxHeight : options.maxHeight + \"px\";\r\n\t\t\telement.style.maxHeight = options.maxHeight;\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize core systems and modules\r\n\t_initializeTable(){\r\n\t\tvar element = this.element,\r\n\t\toptions = this.options;\r\n\r\n\t\tthis.interactionMonitor.initialize();\r\n\r\n\t\tthis.columnManager.initialize();\r\n\t\tthis.rowManager.initialize();\r\n\r\n\t\tthis._detectBrowser();\r\n\r\n\t\t//initialize core modules\r\n\t\tthis.modulesCore.forEach((mod) => {\r\n\t\t\tmod.initialize();\r\n\t\t})\r\n\r\n\t\t//build table elements\r\n\t\telement.appendChild(this.columnManager.getElement());\r\n\t\telement.appendChild(this.rowManager.getElement());\r\n\r\n\t\tif(options.footerElement){\r\n\t\t\tthis.footerManager.activate();\r\n\t\t}\r\n\r\n\t\tif(options.autoColumns && options.data){\r\n\r\n\t\t\tthis.columnManager.generateColumnsFromRowData(this.options.data);\r\n\t\t}\r\n\r\n\t\t//initialize regular modules\r\n\t\tthis.modulesRegular.forEach((mod) => {\r\n\t\t\tmod.initialize();\r\n\t\t});\r\n\r\n\t\tthis.columnManager.setColumns(options.columns);\r\n\r\n\t\tthis.eventBus.dispatch(\"table-built\");\r\n\t}\r\n\r\n\t_loadInitialData(){\r\n\t\tthis.dataLoader.load(this.options.data);\r\n\t}\r\n\r\n\t//deconstructor\r\n\tdestroy(){\r\n\t\tvar element = this.element;\r\n\r\n\t\tTableRegistry.deregister(this); //deregister table from inter-device communication\r\n\r\n\t\tthis.eventBus.dispatch(\"table-destroy\");\r\n\r\n\t\t//clear row data\r\n\t\tthis.rowManager.rows.forEach(function(row){\r\n\t\t\trow.wipe();\r\n\t\t});\r\n\r\n\t\tthis.rowManager.rows = [];\r\n\t\tthis.rowManager.activeRows = [];\r\n\t\tthis.rowManager.displayRows = [];\r\n\r\n\t\t//clear DOM\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\t\telement.classList.remove(\"tabulator\");\r\n\t}\r\n\r\n\t_detectBrowser(){\r\n\t\tvar ua = navigator.userAgent||navigator.vendor||window.opera;\r\n\r\n\t\tif(ua.indexOf(\"Trident\") > -1){\r\n\t\t\tthis.browser = \"ie\";\r\n\t\t\tthis.browserSlow = true;\r\n\t\t}else if(ua.indexOf(\"Edge\") > -1){\r\n\t\t\tthis.browser = \"edge\";\r\n\t\t\tthis.browserSlow = true;\r\n\t\t}else if(ua.indexOf(\"Firefox\") > -1){\r\n\t\t\tthis.browser = \"firefox\";\r\n\t\t\tthis.browserSlow = false;\r\n\t\t}else{\r\n\t\t\tthis.browser = \"other\";\r\n\t\t\tthis.browserSlow = false;\r\n\t\t}\r\n\r\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));\r\n\t}\r\n\r\n\t////////////////// Data Handling //////////////////\r\n\t//block table redrawing\r\n\tblockRedraw(){\r\n\t\treturn this.rowManager.blockRedraw();\r\n\t}\r\n\r\n\t//restore table redrawing\r\n\trestoreRedraw(){\r\n\t\treturn this.rowManager.restoreRedraw();\r\n\t}\r\n\r\n\t//load data\r\n\tsetData(data, params, config){\r\n\t\tif(this.initialized){\r\n\t\t\treturn this.dataLoader.load(data, params, config, false);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"setData failed - table not yet initialized. To set initial data please use the 'data' property in the table constructor.\")\r\n\t\t}\r\n\t}\r\n\r\n\t//clear data\r\n\tclearData(){\r\n\t\tthis.dataLoader.blockActiveLoad();\r\n\t\tthis.rowManager.clearData();\r\n\t}\r\n\r\n\t//get table data array\r\n\tgetData(active){\r\n\t\treturn this.rowManager.getData(active);\r\n\t}\r\n\r\n\t//get table data array count\r\n\tgetDataCount(active){\r\n\t\treturn this.rowManager.getDataCount(active);\r\n\t}\r\n\r\n\t//replace data, keeping table in position with same sort\r\n\treplaceData(data, params, config){\r\n\t\tif(this.initialized){\r\n\t\t\treturn this.dataLoader.load(data, params, config, true, true);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"replaceData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update table data\r\n\tupdateData(data){\r\n\t\tvar responses = 0;\r\n\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\tresponses++;\r\n\r\n\t\t\t\t\t\t\trow.updateData(item)\r\n\t\t\t\t\t\t\t.then(()=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"updateData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\taddData(data, pos, index){\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tthis.rowManager.addRows(data, pos, index)\r\n\t\t\t\t\t.then((rows) => {\r\n\t\t\t\t\t\tvar output = [];\r\n\r\n\t\t\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\t\t\toutput.push(row.getComponent());\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tresolve(output);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"addData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update table data\r\n\tupdateOrAddData(data){\r\n\t\tvar rows = [],\r\n\t\tresponses = 0;\r\n\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\r\n\t\t\t\t\t\tresponses++;\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.updateData(item)\r\n\t\t\t\t\t\t\t.then(()=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\t\t\t\t\t\t\t\trows.push(row.getComponent());\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve(rows);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.rowManager.addRows(item)\r\n\t\t\t\t\t\t\t.then((newRows)=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\t\t\t\t\t\t\t\trows.push(newRows[0].getComponent());\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve(rows);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"updateOrAddData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//get row object\r\n\tgetRow(index){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching row found:\", index);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//get row object\r\n\tgetRowFromPosition(position, active){\r\n\t\tvar row = this.rowManager.getRowFromPosition(position, active);\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching row found:\", position);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//delete row from table\r\n\tdeleteRow(index){\r\n\t\tvar foundRows = [];\r\n\r\n\t\tif(!Array.isArray(index)){\r\n\t\t\tindex = [index];\r\n\t\t}\r\n\r\n\t\t//find matching rows\r\n\t\tfor(let item of index){\r\n\t\t\tlet row = this.rowManager.findRow(item, true);\r\n\r\n\t\t\tif(row){\r\n\t\t\t\tfoundRows.push(row);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Delete Error - No matching row found:\", item);\r\n\t\t\t\treturn Promise.reject(\"Delete Error - No matching row found\")\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//sort rows into correct order to ensure smooth delete from table\r\n\t\tfoundRows.sort((a, b) => {\r\n\t\t\treturn this.rowManager.rows.indexOf(a) > this.rowManager.rows.indexOf(b) ? 1 : -1;\r\n\t\t});\r\n\r\n\t\t//delete rows\r\n\t\tfoundRows.forEach((row) =>{\r\n\t\t\trow.delete()\r\n\t\t});\r\n\r\n\t\tthis.rowManager.reRenderInPosition();\r\n\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\r\n\t//add row to table\r\n\taddRow(data, pos, index){\r\n\t\tif(this.initialized){\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\r\n\t\t\treturn this.rowManager.addRows(data, pos, index)\r\n\t\t\t.then((rows)=>{\r\n\t\t\t\treturn rows[0].getComponent();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"addRow failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update a row if it exitsts otherwise create it\r\n\tupdateOrAddRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t.then(()=>{\r\n\t\t\t\treturn row.getComponent();\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\treturn this.rowManager.addRows(data)\r\n\t\t\t.then((rows)=>{\r\n\t\t\t\treturn rows[0].getComponent();\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\t//update row data\r\n\tupdateRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t.then(()=>{\r\n\t\t\t\treturn Promise.resolve(row.getComponent());\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Update Error - No matching row found:\", index);\r\n\t\t\treturn Promise.reject(\"Update Error - No matching row found\");\r\n\t\t}\r\n\t}\r\n\r\n\t//scroll to row in DOM\r\n\tscrollToRow(index, position, ifVisible){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn this.rowManager.scrollToRow(row, position, ifVisible)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Scroll Error - No matching row found:\", index);\r\n\t\t\treturn Promise.reject(\"Scroll Error - No matching row found\");\r\n\t\t}\r\n\t}\r\n\r\n\tmoveRow(from, to, after){\r\n\t\tvar fromRow = this.rowManager.findRow(from);\r\n\r\n\t\tif(fromRow){\r\n\t\t\tfromRow.moveToRow(to, after);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching row found:\", from);\r\n\t\t}\r\n\t}\r\n\r\n\tgetRows(active){\r\n\t\treturn this.rowManager.getComponents(active);\r\n\t}\r\n\r\n\t//get position of row in table\r\n\tgetRowPosition(index, active){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn this.rowManager.getRowPosition(row, active);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Position Error - No matching row found:\", index);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t/////////////// Column Functions ///////////////\r\n\tsetColumns(definition){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.columnManager.setColumns(definition);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"setColumns failed - table not yet initialized. To set initial data please use the 'columns' property in the table constructor.\")\r\n\t\t}\r\n\t}\r\n\r\n\tgetColumns(structured){\r\n\t\treturn this.columnManager.getComponents(structured);\r\n\t}\r\n\r\n\tgetColumn(field){\r\n\t\tvar col = this.columnManager.findColumn(field);\r\n\r\n\t\tif(col){\r\n\t\t\treturn col.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tgetColumnDefinitions(){\r\n\t\treturn this.columnManager.getDefinitionTree();\r\n\t}\r\n\r\n\tshowColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tcolumn.show();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Show Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\thideColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tcolumn.hide();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Hide Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\ttoggleColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tif(column.visible){\r\n\t\t\t\tcolumn.hide();\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.show();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Visibility Toggle Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\taddColumn(definition, before, field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\treturn this.columnManager.addColumn(definition, before, column)\r\n\t\t.then((column) => {\r\n\t\t\treturn column.getComponent();\r\n\t\t});\r\n\t}\r\n\r\n\tdeleteColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn column.delete();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Delete Error - No matching column found:\", field);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\r\n\tupdateColumnDefinition(field, definition){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn column.updateDefinition(definition)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Update Error - No matching column found:\", field);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\r\n\tmoveColumn(from, to, after){\r\n\t\tvar fromColumn = this.columnManager.findColumn(from);\r\n\t\tvar toColumn = this.columnManager.findColumn(to);\r\n\r\n\t\tif(fromColumn){\r\n\t\t\tif(toColumn){\r\n\t\t\t\tthis.columnManager.moveColumn(fromColumn, toColumn, after)\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Move Error - No matching column found:\", toColumn);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching column found:\", from);\r\n\t\t}\r\n\t}\r\n\r\n\t//scroll to column in DOM\r\n\tscrollToColumn(field, position, ifVisible){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\t\tif(column){\r\n\t\t\t\treturn this.columnManager.scrollToColumn(column, position, ifVisible)\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - No matching column found:\", field);\r\n\t\t\t\treturn Promise.reject(\"Scroll Error - No matching column found\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//////////// General Public Functions ////////////\r\n\t//redraw list without updating data\r\n\tredraw(force){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.columnManager.redraw(force);\r\n\t\t\tthis.rowManager.redraw(force);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"redraw failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\tsetHeight(height){\r\n\t\tthis.options.height = isNaN(height) ? height : height + \"px\";\r\n\t\tthis.element.style.height = this.options.height;\r\n\t\tthis.rowManager.initializeRenderer();\r\n\t\tthis.rowManager.redraw();\r\n\t}\r\n\r\n\t//////////////////// Event Bus ///////////////////\r\n\r\n\ton(key, callback){\r\n\t\tthis.externalEvents.subscribe(key, callback);\r\n\t}\r\n\r\n\toff(key, callback){\r\n\t\tthis.externalEvents.unsubscribe(key, callback);\r\n\t}\r\n\r\n\tdispatchEvent(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift();\r\n\r\n\t\tthis.externalEvents.dispatch(...arguments)\r\n\t}\r\n\r\n\t////////////// Extension Management //////////////\r\n\tmodExists(plugin, required){\r\n\t\tif(this.modules[plugin]){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tif(required){\r\n\t\t\t\tconsole.error(\"Tabulator Module Not Installed: \" + plugin);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tmodule(key){\r\n\t\tvar mod = this.modules[key];\r\n\r\n\t\tif(!mod){\r\n\t\t\tconsole.error(\"Tabulator module not installed: \" + key);\r\n\t\t}\r\n\r\n\t\treturn mod;\r\n\t}\r\n}\r\n\r\n//default setup options\r\nTabulator.defaultOptions = defaultOptions;\r\n\r\n//bind modules and static functionality\r\nnew ModuleBinder(Tabulator);\r\n\r\nexport default Tabulator;\r\n","export default {}","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defautlAccessors from './defaults/accessors.js';\r\n\r\nclass Accessor extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.allowedTypes = [\"\", \"data\", \"download\", \"clipboard\", \"print\", \"htmlOutput\"] //list of accessor types\r\n\r\n\t\tthis.registerColumnOption(\"accessor\");\r\n\t\tthis.registerColumnOption(\"accessorParams\");\r\n\t\tthis.registerColumnOption(\"accessorData\");\r\n\t\tthis.registerColumnOption(\"accessorDataParams\");\r\n\t\tthis.registerColumnOption(\"accessorDownload\");\r\n\t\tthis.registerColumnOption(\"accessorDownloadParams\");\r\n\t\tthis.registerColumnOption(\"accessorClipboard\");\r\n\t\tthis.registerColumnOption(\"accessorClipboardParams\");\r\n\t\tthis.registerColumnOption(\"accessorPrint\");\r\n\t\tthis.registerColumnOption(\"accessorPrintParams\");\r\n\t\tthis.registerColumnOption(\"accessorHtmlOutput\");\r\n\t\tthis.registerColumnOption(\"accessorHtmlOutputParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"row-data-retrieve\", this.transformRow.bind(this));\r\n\t}\r\n\r\n\t//initialize column accessor\r\n\tinitializeColumn(column){\r\n\t\tvar match = false,\r\n\t\tconfig = {};\r\n\r\n\t\tthis.allowedTypes.forEach((type) => {\r\n\t\t\tvar key = \"accessor\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\t\taccessor;\r\n\r\n\t\t\tif(column.definition[key]){\r\n\t\t\t\taccessor = this.lookupAccessor(column.definition[key]);\r\n\r\n\t\t\t\tif(accessor){\r\n\t\t\t\t\tmatch = true;\r\n\r\n\t\t\t\t\tconfig[key] = {\r\n\t\t\t\t\t\taccessor:accessor,\r\n\t\t\t\t\t\tparams: column.definition[key + \"Params\"] || {},\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tcolumn.modules.accessor = config;\r\n\t\t}\r\n\t}\r\n\r\n\tlookupAccessor(value){\r\n\t\tvar accessor = false;\r\n\r\n\t\t//set column accessor\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Accessor.accessors[value]){\r\n\t\t\t\taccessor = Accessor.accessors[value]\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Accessor Error - No such accessor found, ignoring: \", value);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\taccessor = value;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn accessor;\r\n\t}\r\n\r\n\t//apply accessor to row\r\n\ttransformRow(row, type){\r\n\t\tvar key = \"accessor\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\trowComponent = row.getComponent();\r\n\r\n\t\t//clone data object with deep copy to isolate internal data from returned result\r\n\t\tvar data = Helpers.deepClone(row.data || {});\r\n\r\n\t\tthis.table.columnManager.traverse(function(column){\r\n\t\t\tvar value, accessor, params, colCompnent;\r\n\r\n\t\t\tif(column.modules.accessor){\r\n\r\n\t\t\t\taccessor = column.modules.accessor[key] || column.modules.accessor.accessor || false;\r\n\r\n\t\t\t\tif(accessor){\r\n\t\t\t\t\tvalue = column.getFieldValue(data);\r\n\r\n\t\t\t\t\tif(value != \"undefined\"){\r\n\t\t\t\t\t\tcolCompnent = column.getComponent();\r\n\t\t\t\t\t\tparams = typeof accessor.params === \"function\" ? accessor.params(value, data, type, colCompnent, rowComponent) : accessor.params;\r\n\t\t\t\t\t\tcolumn.setFieldValue(data, accessor.accessor(value, data, type, params, colCompnent, rowComponent));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n}\r\n\r\n//load defaults\r\nAccessor.moduleName = \"accessor\";\r\nAccessor.accessors = defautlAccessors;\r\n\r\nexport default Accessor;","export default {\r\n\tmethod: \"GET\",\r\n};","function generateParamsList(data, prefix){\r\n\tvar output = [];\r\n\r\n\tprefix = prefix || \"\";\r\n\r\n\tif(Array.isArray(data)){\r\n\t\tdata.forEach((item, i) => {\r\n\t\t\toutput = output.concat(generateParamsList(item, prefix ? prefix + \"[\" + i + \"]\" : i));\r\n\t\t});\r\n\t}else if (typeof data === \"object\"){\r\n\t\tfor (var key in data){\r\n\t\t\toutput = output.concat(generateParamsList(data[key], prefix ? prefix + \"[\" + key + \"]\" : key));\r\n\t\t}\r\n\t}else{\r\n\t\toutput.push({key:prefix, value:data});\r\n\t}\r\n\r\n\treturn output;\r\n}\r\n\r\nfunction serializeParams(params){\r\n\tvar output = generateParamsList(params),\r\n\tencoded = [];\r\n\r\n\toutput.forEach(function(item){\r\n\t\tencoded.push(encodeURIComponent(item.key) + \"=\" + encodeURIComponent(item.value));\r\n\t});\r\n\r\n\treturn encoded.join(\"&\");\r\n}\r\n\r\nexport default function(url, config, params){\r\n\tif(url){\r\n\t\tif(params && Object.keys(params).length){\r\n\t\t\tif(!config.method || config.method.toLowerCase() == \"get\"){\r\n\t\t\t\tconfig.method = \"get\";\r\n\r\n\t\t\t\turl += (url.includes(\"?\") ? \"&\" : \"?\") + serializeParams(params);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn url;\r\n};","export default function(url, config, params){\r\n\tvar contentType;\r\n\r\n\treturn new Promise((resolve, reject) => {\r\n\t\t//set url\r\n\t\turl = this.urlGenerator.call(this.table, url, config, params);\r\n\r\n\t\t//set body content if not GET request\r\n\t\tif(config.method.toUpperCase() != \"GET\"){\r\n\t\t\tcontentType = typeof this.table.options.ajaxContentType === \"object\" ? this.table.options.ajaxContentType : this.contentTypeFormatters[this.table.options.ajaxContentType];\r\n\t\t\tif(contentType){\r\n\r\n\t\t\t\tfor(var key in contentType.headers){\r\n\t\t\t\t\tif(!config.headers){\r\n\t\t\t\t\t\tconfig.headers = {};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(typeof config.headers[key] === \"undefined\"){\r\n\t\t\t\t\t\tconfig.headers[key] = contentType.headers[key];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconfig.body = contentType.body.call(this, url, config, params);\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Ajax Error - Invalid ajaxContentType value:\", this.table.options.ajaxContentType);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(url){\r\n\t\t\t//configure headers\r\n\t\t\tif(typeof config.headers === \"undefined\"){\r\n\t\t\t\tconfig.headers = {};\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.headers.Accept === \"undefined\"){\r\n\t\t\t\tconfig.headers.Accept = \"application/json\";\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.headers[\"X-Requested-With\"] === \"undefined\"){\r\n\t\t\t\tconfig.headers[\"X-Requested-With\"] = \"XMLHttpRequest\";\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.mode === \"undefined\"){\r\n\t\t\t\tconfig.mode = \"cors\";\r\n\t\t\t}\r\n\r\n\t\t\tif(config.mode == \"cors\"){\r\n\t\t\t\tif(typeof config.headers[\"Origin\"] === \"undefined\"){\r\n\t\t\t\t\tconfig.headers[\"Origin\"] = window.location.origin;\r\n\t\t\t\t}\r\n \r\n\t\t\t\tif(typeof config.credentials === \"undefined\"){\r\n\t\t\t\t\tconfig.credentials = 'same-origin';\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(typeof config.credentials === \"undefined\"){\r\n\t\t\t\t\tconfig.credentials = 'include';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//send request\r\n\t\t\tfetch(url, config)\r\n\t\t\t.then((response)=>{\r\n\t\t\t\tif(response.ok) {\r\n\t\t\t\t\tresponse.json()\r\n\t\t\t\t\t.then((data)=>{\r\n\t\t\t\t\t\tresolve(data);\r\n\t\t\t\t\t}).catch((error)=>{\r\n\t\t\t\t\t\treject(error);\r\n\t\t\t\t\t\tconsole.warn(\"Ajax Load Error - Invalid JSON returned\", error);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \" + response.status, response.statusText);\r\n\t\t\t\t\treject(response);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.catch((error)=>{\r\n\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \", error);\r\n\t\t\t\treject(error);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Ajax Load Error - No URL Set\");\r\n\t\t\tresolve([]);\r\n\t\t}\r\n\t});\r\n};","function generateParamsList(data, prefix){\r\n\tvar output = [];\r\n\r\n\tprefix = prefix || \"\";\r\n\r\n\tif(Array.isArray(data)){\r\n\t\tdata.forEach((item, i) => {\r\n\t\t\toutput = output.concat(generateParamsList(item, prefix ? prefix + \"[\" + i + \"]\" : i));\r\n\t\t});\r\n\t}else if (typeof data === \"object\"){\r\n\t\tfor (var key in data){\r\n\t\t\toutput = output.concat(generateParamsList(data[key], prefix ? prefix + \"[\" + key + \"]\" : key));\r\n\t\t}\r\n\t}else{\r\n\t\toutput.push({key:prefix, value:data});\r\n\t}\r\n\r\n\treturn output;\r\n}\r\n\r\nexport default {\r\n\t\"json\":{\r\n\t\theaders:{\r\n\t\t\t'Content-Type': 'application/json',\r\n\t\t},\r\n\t\tbody:function(url, config, params){\r\n\t\t\treturn JSON.stringify(params);\r\n\t\t},\r\n\t},\r\n\t\"form\":{\r\n\t\theaders:{\r\n\t\t},\r\n\t\tbody:function(url, config, params){\r\n\r\n\t\t\tvar output = generateParamsList(params),\r\n\t\t\tform = new FormData();\r\n\r\n\t\t\toutput.forEach(function(item){\r\n\t\t\t\tform.append(item.key, item.value);\r\n\t\t\t});\r\n\r\n\t\t\treturn form;\r\n\t\t},\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultConfig from './defaults/config.js';\r\nimport defaultURLGenerator from './defaults/urlGenerator.js';\r\nimport defaultLoaderPromise from './defaults/loaderPromise.js';\r\nimport defaultContentTypeFormatters from './defaults/contentTypeFormatters.js';\r\n\r\nclass Ajax extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.config = {}; //hold config object for ajax request\r\n\t\tthis.url = \"\"; //request URL\r\n\t\tthis.urlGenerator = false;\r\n\t\tthis.params = false; //request parameters\r\n\t\t\r\n\t\tthis.loaderPromise = false;\r\n\t\t\r\n\t\tthis.registerTableOption(\"ajaxURL\", false); //url for ajax loading\r\n\t\tthis.registerTableOption(\"ajaxURLGenerator\", false);\r\n\t\tthis.registerTableOption(\"ajaxParams\", {}); //params for ajax loading\r\n\t\tthis.registerTableOption(\"ajaxConfig\", \"get\"); //ajax request type\r\n\t\tthis.registerTableOption(\"ajaxContentType\", \"form\"); //ajax request type\r\n\t\tthis.registerTableOption(\"ajaxRequestFunc\", false); //promise function\r\n\t\t\r\n\t\tthis.registerTableOption(\"ajaxRequesting\", function(){});\r\n\t\tthis.registerTableOption(\"ajaxResponse\", false);\r\n\t\t\r\n\t\tthis.contentTypeFormatters = Ajax.contentTypeFormatters;\r\n\t}\r\n\t\r\n\t//initialize setup options\r\n\tinitialize(){\r\n\t\tthis.loaderPromise = this.table.options.ajaxRequestFunc || Ajax.defaultLoaderPromise;\r\n\t\tthis.urlGenerator = this.table.options.ajaxURLGenerator || Ajax.defaultURLGenerator;\r\n\t\t\r\n\t\tif(this.table.options.ajaxURL){\r\n\t\t\tthis.setUrl(this.table.options.ajaxURL);\r\n\t\t}\r\n\r\n\r\n\t\tthis.setDefaultConfig(this.table.options.ajaxConfig);\r\n\t\t\r\n\t\tthis.registerTableFunction(\"getAjaxUrl\", this.getUrl.bind(this));\r\n\t\t\r\n\t\tthis.subscribe(\"data-loading\", this.requestDataCheck.bind(this));\r\n\t\tthis.subscribe(\"data-params\", this.requestParams.bind(this));\r\n\t\tthis.subscribe(\"data-load\", this.requestData.bind(this));\r\n\t}\r\n\t\r\n\trequestParams(data, config, silent, params){\r\n\t\tvar ajaxParams = this.table.options.ajaxParams;\r\n\t\t\r\n\t\tif(ajaxParams){\r\n\t\t\tif(typeof ajaxParams === \"function\"){\r\n\t\t\t\tajaxParams = ajaxParams.call(this.table);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tparams = Object.assign(params, ajaxParams);\r\n\t\t}\t\t\r\n\t\t\r\n\t\treturn params;\r\n\t}\r\n\t\r\n\trequestDataCheck(data, params, config, silent){\r\n\t\treturn !!((!data && this.url) || typeof data === \"string\");\r\n\t}\r\n\t\r\n\trequestData(url, params, config, silent, previousData){\r\n\t\tvar ajaxConfig;\r\n\t\t\r\n\t\tif(!previousData && this.requestDataCheck(url)){\r\n\t\t\tif(url){\r\n\t\t\t\tthis.setUrl(url);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tajaxConfig = this.generateConfig(config);\r\n\t\t\t\r\n\t\t\treturn this.sendRequest(this.url, params, ajaxConfig);\r\n\t\t}else{\r\n\t\t\treturn previousData;\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetDefaultConfig(config = {}){\r\n\t\tthis.config = Object.assign({}, Ajax.defaultConfig);\r\n\r\n\t\tif(typeof config == \"string\"){\r\n\t\t\tthis.config.method = config;\r\n\t\t}else{\r\n\t\t\tObject.assign(this.config, config);\r\n\t\t}\r\n\t}\r\n\t\r\n\t//load config object\r\n\tgenerateConfig(config = {}){\r\n\t\tvar ajaxConfig = Object.assign({}, this.config)\r\n\t\t\r\n\t\tif(typeof config == \"string\"){\r\n\t\t\tajaxConfig.method = config;\r\n\t\t}else{\r\n\t\t\tObject.assign(ajaxConfig, config);\r\n\t\t}\r\n\t\t\r\n\t\treturn ajaxConfig;\r\n\t}\r\n\t\r\n\t//set request url\r\n\tsetUrl(url){\r\n\t\tthis.url = url;\r\n\t}\r\n\t\r\n\t//get request url\r\n\tgetUrl(){\r\n\t\treturn this.url;\r\n\t}\r\n\t\r\n\t//send ajax request\r\n\tsendRequest(url, params, config){\r\n\t\tif(this.table.options.ajaxRequesting.call(this.table, url, params) !== false){\r\n\t\t\treturn this.loaderPromise(url, config, params)\r\n\t\t\t.then((data)=>{\r\n\t\t\t\tif(this.table.options.ajaxResponse){\r\n\t\t\t\t\tdata = this.table.options.ajaxResponse.call(this.table, url, params, data);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn data;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n}\r\n\r\nAjax.moduleName = \"ajax\";\r\n\r\n//load defaults\r\nAjax.defaultConfig = defaultConfig;\r\nAjax.defaultURLGenerator = defaultURLGenerator;\r\nAjax.defaultLoaderPromise = defaultLoaderPromise;\r\nAjax.contentTypeFormatters = defaultContentTypeFormatters;\r\n\r\nexport default Ajax;","export default {\r\n\treplace:function(rows){\r\n\t\treturn this.table.setData(rows);\r\n\t},\r\n\tupdate:function(rows){\r\n\t\treturn this.table.updateOrAddData(rows);\r\n\t},\r\n\tinsert:function(rows){\r\n\t\treturn this.table.addData(rows);\r\n\t},\r\n};","export default {\r\n\ttable:function(clipboard){\r\n\t\tvar data = [],\r\n\t\tsuccess = false,\r\n\t\theaderFindSuccess = true,\r\n\t\tcolumns = this.table.columnManager.columns,\r\n\t\tcolumnMap = [],\r\n\t\trows = [];\r\n\r\n\t\t//get data from clipboard into array of columns and rows.\r\n\t\tclipboard = clipboard.split(\"\\n\");\r\n\r\n\t\tclipboard.forEach(function(row){\r\n\t\t\tdata.push(row.split(\"\\t\"));\r\n\t\t});\r\n\r\n\t\tif(data.length && !(data.length === 1 && data[0].length < 2)){\r\n\t\t\tsuccess = true;\r\n\r\n\t\t\t//check if headers are present by title\r\n\t\t\tdata[0].forEach(function(value){\r\n\t\t\t\tvar column = columns.find(function(column){\r\n\t\t\t\t\treturn value && column.definition.title && value.trim() && column.definition.title.trim() === value.trim();\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tcolumnMap.push(column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\theaderFindSuccess = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t//check if column headers are present by field\r\n\t\t\tif(!headerFindSuccess){\r\n\t\t\t\theaderFindSuccess = true;\r\n\t\t\t\tcolumnMap = [];\r\n\r\n\t\t\t\tdata[0].forEach(function(value){\r\n\t\t\t\t\tvar column = columns.find(function(column){\r\n\t\t\t\t\t\treturn value && column.field && value.trim() && column.field.trim() === value.trim();\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(column){\r\n\t\t\t\t\t\tcolumnMap.push(column);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\theaderFindSuccess = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(!headerFindSuccess){\r\n\t\t\t\t\tcolumnMap = this.table.columnManager.columnsByIndex;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//remove header row if found\r\n\t\t\tif(headerFindSuccess){\r\n\t\t\t\tdata.shift();\r\n\t\t\t}\r\n\r\n\t\t\tdata.forEach(function(item){\r\n\t\t\t\tvar row = {};\r\n\r\n\t\t\t\titem.forEach(function(value, i){\r\n\t\t\t\t\tif(columnMap[i]){\r\n\t\t\t\t\t\trow[columnMap[i].field] = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\trows.push(row);\r\n\t\t\t});\r\n\r\n\t\t\treturn rows;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultPasteActions from './defaults/pasteActions.js';\r\nimport defaultPasteParsers from './defaults/pasteParsers.js';\r\n\r\nclass Clipboard extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.mode = true;\r\n\t\tthis.pasteParser = function(){};\r\n\t\tthis.pasteAction = function(){};\r\n\t\tthis.customSelection = false;\r\n\t\tthis.rowRange = false;\r\n\t\tthis.blocked = true; //block copy actions not originating from this command\r\n\r\n\t\tthis.registerTableOption(\"clipboard\", false); //enable clipboard\r\n\t\tthis.registerTableOption(\"clipboardCopyStyled\", true); //formatted table data\r\n\t\tthis.registerTableOption(\"clipboardCopyConfig\", false); //clipboard config\r\n\t\tthis.registerTableOption(\"clipboardCopyFormatter\", false); //DEPRICATED - REMOVE in 5.0\r\n\t\tthis.registerTableOption(\"clipboardCopyRowRange\", \"active\"); //restrict clipboard to visible rows only\r\n\t\tthis.registerTableOption(\"clipboardPasteParser\", \"table\"); //convert pasted clipboard data to rows\r\n\t\tthis.registerTableOption(\"clipboardPasteAction\", \"insert\"); //how to insert pasted data into the table\r\n\r\n\t\tthis.registerColumnOption(\"clipboard\");\r\n\t\tthis.registerColumnOption(\"titleClipboard\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.mode = this.table.options.clipboard;\r\n\r\n\t\tthis.rowRange = this.table.options.clipboardCopyRowRange;\r\n\r\n\t\tif(this.mode === true || this.mode === \"copy\"){\r\n\t\t\tthis.table.element.addEventListener(\"copy\", (e) => {\r\n\t\t\t\tvar plain, html, list;\r\n\r\n\t\t\t\tif(!this.blocked){\r\n\t\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\t\tif(this.customSelection){\r\n\t\t\t\t\t\tplain = this.customSelection;\r\n\r\n\t\t\t\t\t\tif(this.table.options.clipboardCopyFormatter){\r\n\t\t\t\t\t\t\tplain = this.table.options.clipboardCopyFormatter(\"plain\", plain);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\r\n\t\t\t\t\t\tvar list = this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig, this.table.options.clipboardCopyStyled, this.rowRange, \"clipboard\");\r\n\r\n\t\t\t\t\t\thtml = this.table.modules.export.genereateHTMLTable(list);\r\n\t\t\t\t\t\tplain = html ? this.generatePlainContent(list) : \"\";\r\n\r\n\t\t\t\t\t\tif(this.table.options.clipboardCopyFormatter){\r\n\t\t\t\t\t\t\tplain = this.table.options.clipboardCopyFormatter(\"plain\", plain);\r\n\t\t\t\t\t\t\thtml = this.table.options.clipboardCopyFormatter(\"html\", html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (window.clipboardData && window.clipboardData.setData) {\r\n\t\t\t\t\t\twindow.clipboardData.setData('Text', plain);\r\n\t\t\t\t\t} else if (e.clipboardData && e.clipboardData.setData) {\r\n\t\t\t\t\t\te.clipboardData.setData('text/plain', plain);\r\n\t\t\t\t\t\tif(html){\r\n\t\t\t\t\t\t\te.clipboardData.setData('text/html', html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (e.originalEvent && e.originalEvent.clipboardData.setData) {\r\n\t\t\t\t\t\te.originalEvent.clipboardData.setData('text/plain', plain);\r\n\t\t\t\t\t\tif(html){\r\n\t\t\t\t\t\t\te.originalEvent.clipboardData.setData('text/html', html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.dispatchExternal(\"clipboardCopied\", plain, html);\r\n\r\n\t\t\t\t\tthis.reset();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.mode === true || this.mode === \"paste\"){\r\n\t\t\tthis.table.element.addEventListener(\"paste\", (e) => {\r\n\t\t\t\tthis.paste(e);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.setPasteParser(this.table.options.clipboardPasteParser);\r\n\t\tthis.setPasteAction(this.table.options.clipboardPasteAction);\r\n\r\n\t\tthis.registerTableFunction(\"copyToClipboard\", this.copy.bind(this));\r\n\t}\r\n\r\n\treset(){\r\n\t\tthis.blocked = true;\r\n\t\tthis.customSelection = false;\r\n\t}\r\n\r\n\tgeneratePlainContent (list) {\r\n\t\tvar output = [];\r\n\r\n\t\tlist.forEach((row) => {\r\n\t\t\tvar rowData = [];\r\n\r\n\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\tvar value = \"\";\r\n\r\n\t\t\t\tif(col){\r\n\r\n\t\t\t\t\tif(row.type === \"group\"){\r\n\t\t\t\t\t\tcol.value = col.component.getKey();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(col.value === null){\r\n\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\t\tvalue = JSON.stringify(col.value);\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tvalue = col.value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowData.push(value);\r\n\t\t\t});\r\n\r\n\t\t\toutput.push(rowData.join(\"\\t\"));\r\n\t\t});\r\n\r\n\t\treturn output.join(\"\\n\");\r\n\t}\r\n\r\n\tcopy (range, internal) {\r\n\t\tvar range, sel, textRange;\r\n\t\tthis.blocked = false;\r\n\t\tthis.customSelection = false;\r\n\r\n\t\tif (this.mode === true || this.mode === \"copy\") {\r\n\r\n\t\t\tthis.rowRange = range || this.table.options.clipboardCopyRowRange;\r\n\r\n\t\t\tif (typeof window.getSelection != \"undefined\" && typeof document.createRange != \"undefined\") {\r\n\t\t\t\trange = document.createRange();\r\n\t\t\t\trange.selectNodeContents(this.table.element);\r\n\t\t\t\tsel = window.getSelection();\r\n\r\n\t\t\t\tif (sel.toString() && internal) {\r\n\t\t\t\t\tthis.customSelection = sel.toString();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsel.removeAllRanges();\r\n\t\t\t\tsel.addRange(range);\r\n\t\t\t} else if (typeof document.selection != \"undefined\" && typeof document.body.createTextRange != \"undefined\") {\r\n\t\t\t\ttextRange = document.body.createTextRange();\r\n\t\t\t\ttextRange.moveToElementText(this.table.element);\r\n\t\t\t\ttextRange.select();\r\n\t\t\t}\r\n\r\n\t\t\tdocument.execCommand('copy');\r\n\r\n\t\t\tif (sel) {\r\n\t\t\t\tsel.removeAllRanges();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//PASTE EVENT HANDLING\r\n\tsetPasteAction(action){\r\n\r\n\t\tswitch(typeof action){\r\n\t\t\tcase \"string\":\r\n\t\t\tthis.pasteAction = Clipboard.pasteActions[action];\r\n\r\n\t\t\tif(!this.pasteAction){\r\n\t\t\t\tconsole.warn(\"Clipboard Error - No such paste action found:\", action);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tthis.pasteAction = action;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tsetPasteParser(parser){\r\n\t\tswitch(typeof parser){\r\n\t\t\tcase \"string\":\r\n\t\t\tthis.pasteParser = Clipboard.pasteParsers[parser];\r\n\r\n\t\t\tif(!this.pasteParser){\r\n\t\t\t\tconsole.warn(\"Clipboard Error - No such paste parser found:\", parser);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tthis.pasteParser = parser;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tpaste(e){\r\n\t\tvar data, rowData, rows;\r\n\r\n\t\tif(this.checkPaseOrigin(e)){\r\n\r\n\t\t\tdata = this.getPasteData(e);\r\n\r\n\t\t\trowData = this.pasteParser.call(this, data);\r\n\r\n\t\t\tif(rowData){\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\t\t\trowData = this.mutateData(rowData);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trows = this.pasteAction.call(this, rowData);\r\n\r\n\t\t\t\tthis.dispatchExternal(\"clipboardPasted\", data, rowData, rows);\r\n\t\t\t}else{\r\n\t\t\t\tthis.dispatchExternal(\"clipboardPasteError\", data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmutateData(data){\r\n\t\tvar output = [];\r\n\r\n\t\tif(Array.isArray(data)){\r\n\t\t\tdata.forEach((row) => {\r\n\t\t\t\toutput.push(this.table.modules.mutator.transformRow(row, \"clipboard\"));\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\toutput = data;\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\r\n\tcheckPaseOrigin(e){\r\n\t\tvar valid = true;\r\n\r\n\t\tif(e.target.tagName != \"DIV\" || this.table.modules.edit.currentCell){\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\r\n\t\treturn valid;\r\n\t}\r\n\r\n\tgetPasteData(e){\r\n\t\tvar data;\r\n\r\n\t\tif (window.clipboardData && window.clipboardData.getData) {\r\n\t\t\tdata = window.clipboardData.getData('Text');\r\n\t\t} else if (e.clipboardData && e.clipboardData.getData) {\r\n\t\t\tdata = e.clipboardData.getData('text/plain');\r\n\t\t} else if (e.originalEvent && e.originalEvent.clipboardData.getData) {\r\n\t\t\tdata = e.originalEvent.clipboardData.getData('text/plain');\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n}\r\n\r\nClipboard.moduleName = \"clipboard\";\r\n\r\n//load defaults\r\nClipboard.pasteActions = defaultPasteActions;\r\nClipboard.pasteParsers = defaultPasteParsers;\r\n\r\nexport default Clipboard;","class CalcComponent{\r\n\tconstructor (row){\r\n\t\tthis._row = row;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._row.table.componentFunctionBinder.handle(\"row\", target._row, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\treturn this._row.getData(transform);\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._row.getElement();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._row.table;\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._row.getCells().forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar cell = this._row.getCell(column);\r\n\t\treturn cell ? cell.getComponent() : false;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._row;\r\n\t}\r\n}\r\n\r\nexport default CalcComponent;","export default {\r\n\t\"avg\":function(values, data, calcParams){\r\n\t\tvar output = 0,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : 2\r\n\r\n\t\tif(values.length){\r\n\t\t\toutput = values.reduce(function(sum, value){\r\n\t\t\t\treturn Number(sum) + Number(value);\r\n\t\t\t});\r\n\r\n\t\t\toutput = output / values.length;\r\n\r\n\t\t\toutput = precision !== false ? output.toFixed(precision) : output;\r\n\t\t}\r\n\r\n\t\treturn parseFloat(output).toString();\r\n\t},\r\n\t\"max\":function(values, data, calcParams){\r\n\t\tvar output = null,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tvalues.forEach(function(value){\r\n\r\n\t\t\tvalue = Number(value);\r\n\r\n\t\t\tif(value > output || output === null){\r\n\t\t\t\toutput = value;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output !== null ? (precision !== false ? output.toFixed(precision) : output) : \"\";\r\n\t},\r\n\t\"min\":function(values, data, calcParams){\r\n\t\tvar output = null,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tvalues.forEach(function(value){\r\n\r\n\t\t\tvalue = Number(value);\r\n\r\n\t\t\tif(value < output || output === null){\r\n\t\t\t\toutput = value;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output !== null ? (precision !== false ? output.toFixed(precision) : output) : \"\";\r\n\t},\r\n\t\"sum\":function(values, data, calcParams){\r\n\t\tvar output = 0,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tif(values.length){\r\n\t\t\tvalues.forEach(function(value){\r\n\t\t\t\tvalue = Number(value);\r\n\r\n\t\t\t\toutput += !isNaN(value) ? Number(value) : 0;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn precision !== false ? output.toFixed(precision) : output;\r\n\t},\r\n\t\"concat\":function(values, data, calcParams){\r\n\t\tvar output = 0;\r\n\r\n\t\tif(values.length){\r\n\t\t\toutput = values.reduce(function(sum, value){\r\n\t\t\t\treturn String(sum) + String(value);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t},\r\n\t\"count\":function(values, data, calcParams){\r\n\t\tvar output = 0;\r\n\r\n\t\tif(values.length){\r\n\t\t\tvalues.forEach(function(value){\r\n\t\t\t\tif(value){\r\n\t\t\t\t\toutput ++;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport CalcComponent from './CalcComponent.js';\r\n\r\nimport Cell from '../../core/cell/Cell.js';\r\nimport Column from '../../core/column/Column.js';\r\nimport Row from '../../core/row/Row.js';\r\n\r\nimport defaultCalculations from './defaults/calculations.js';\r\n\r\nclass ColumnCalcs extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.topCalcs = [];\r\n\t\tthis.botCalcs = [];\r\n\t\tthis.genColumn = false;\r\n\t\tthis.topElement = this.createElement();\r\n\t\tthis.botElement = this.createElement();\r\n\t\tthis.topRow = false;\r\n\t\tthis.botRow = false;\r\n\t\tthis.topInitialized = false;\r\n\t\tthis.botInitialized = false;\r\n\r\n\t\tthis.registerTableOption(\"columnCalcs\", true);\r\n\r\n\t\tthis.registerColumnOption(\"topCalc\");\r\n\t\tthis.registerColumnOption(\"topCalcParams\");\r\n\t\tthis.registerColumnOption(\"topCalcFormatter\");\r\n\t\tthis.registerColumnOption(\"topCalcFormatterParams\");\r\n\t\tthis.registerColumnOption(\"bottomCalc\");\r\n\t\tthis.registerColumnOption(\"bottomCalcParams\");\r\n\t\tthis.registerColumnOption(\"bottomCalcFormatter\");\r\n\t\tthis.registerColumnOption(\"bottomCalcFormatterParams\");\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-calcs-holder\");\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.genColumn = new Column({field:\"value\"}, this);\r\n\r\n\t\tthis.subscribe(\"cell-value-changed\", this.cellValueChanged.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumnCheck.bind(this));\r\n\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t\tthis.subscribe(\"row-added\", this.rowsUpdated.bind(this));\r\n\t\tthis.subscribe(\"column-moved\", this.recalcActiveRows.bind(this));\r\n\t\tthis.subscribe(\"column-add\", this.recalcActiveRows.bind(this));\r\n\t\tthis.subscribe(\"data-refreshed\", this.recalcActiveRowsRefresh.bind(this));\r\n\t\tthis.subscribe(\"table-redraw\", this.tableRedraw.bind(this));\r\n\t\tthis.subscribe(\"rows-visible\", this.visibleRows.bind(this));\r\n\r\n\t\tthis.registerTableFunction(\"getCalcResults\", this.getResults.bind(this));\r\n\t\tthis.registerTableFunction(\"recalc\", this.userRecalc.bind(this));\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\r\n\t\tif(force){\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\tuserRecalc(){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tvisibleRows(viewable, rows){\r\n\t\tif(this.topRow){\r\n\t\t\trows.unshift(this.topRow);\r\n\t\t}\r\n\r\n\t\tif(this.botRow){\r\n\t\t\trows.push(this.botRow);\r\n\t\t}\r\n\t\r\n\t\treturn rows;\r\n\t}\r\n\r\n\trowsUpdated(row){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.recalcRowGroup(this);\r\n\t\t}else{\r\n\t\t\tthis.recalcActiveRows();\r\n\t\t}\r\n\t}\r\n\r\n\trecalcActiveRowsRefresh(){\r\n\t\tif(this.table.options.groupBy && this.table.options.dataTreeStartExpanded && this.table.options.dataTree){\r\n\t\t\tthis.recalcAll();\r\n\t\t}else{\r\n\t\t\tthis.recalcActiveRows();\r\n\t\t}\r\n\t}\r\n\r\n\trecalcActiveRows(){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t}\r\n\r\n\tcellValueChanged(cell){\r\n\t\tif(cell.column.definition.topCalc || cell.column.definition.bottomCalc){\r\n\t\t\tif(this.table.options.groupBy){\r\n\t\t\t\tif(this.table.options.columnCalcs == \"table\" || this.table.options.columnCalcs == \"both\"){\r\n\t\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"table\"){\r\n\t\t\t\t\tthis.recalcRowGroup(cell.row);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(column.definition.topCalc || column.definition.bottomCalc){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column calcs\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition\r\n\r\n\t\tvar config = {\r\n\t\t\ttopCalcParams:def.topCalcParams || {},\r\n\t\t\tbotCalcParams:def.bottomCalcParams || {},\r\n\t\t};\r\n\r\n\t\tif(def.topCalc){\r\n\r\n\t\t\tswitch(typeof def.topCalc){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(ColumnCalcs.calculations[def.topCalc]){\r\n\t\t\t\t\tconfig.topCalc = ColumnCalcs.calculations[def.topCalc]\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.topCalc);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tconfig.topCalc = def.topCalc;\r\n\t\t\t\tbreak\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(config.topCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.topCalcs.push(column);\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"group\"){\r\n\t\t\t\t\tthis.initializeTopRow();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tif(def.bottomCalc){\r\n\t\t\tswitch(typeof def.bottomCalc){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(ColumnCalcs.calculations[def.bottomCalc]){\r\n\t\t\t\t\tconfig.botCalc = ColumnCalcs.calculations[def.bottomCalc]\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.bottomCalc);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tconfig.botCalc = def.bottomCalc;\r\n\t\t\t\tbreak\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(config.botCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.botCalcs.push(column);\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"group\"){\r\n\t\t\t\t\tthis.initializeBottomRow();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t//dummy functions to handle being mock column manager\r\n\tregisterColumnField(){};\r\n\r\n\tremoveCalcs(){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(this.topInitialized){\r\n\t\t\tthis.topInitialized = false;\r\n\t\t\tthis.topElement.parentNode.removeChild(this.topElement);\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\r\n\t\tif(this.botInitialized){\r\n\t\t\tthis.botInitialized = false;\r\n\t\t\tthis.table.footerManager.remove(this.botElement);\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeTopRow(){\r\n\t\tif(!this.topInitialized){\r\n\t\t\tthis.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\r\n\t\t\tthis.topInitialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeBottomRow(){\r\n\t\tif(!this.botInitialized){\r\n\t\t\tthis.table.footerManager.prepend(this.botElement);\r\n\t\t\tthis.botInitialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tscrollHorizontal(left){\r\n\t\tif(this.botInitialized && this.botRow){\r\n\t\t\tthis.botRow.getElement().style.marginLeft = (-left) + \"px\";\r\n\t\t}\r\n\t}\r\n\r\n\trecalc(rows){\r\n\t\tvar data, row;\r\n\r\n\t\tif(this.topInitialized || this.botInitialized){\r\n\t\t\tdata = this.rowsToData(rows);\r\n\r\n\t\t\tif(this.topInitialized){\r\n\t\t\t\tif(this.topRow){\r\n\t\t\t\t\tthis.topRow.deleteCells();\r\n\t\t\t\t}\r\n\r\n\t\t\t\trow = this.generateRow(\"top\", this.rowsToData(rows))\r\n\t\t\t\tthis.topRow = row;\r\n\t\t\t\twhile(this.topElement.firstChild) this.topElement.removeChild(this.topElement.firstChild);\r\n\t\t\t\tthis.topElement.appendChild(row.getElement());\r\n\t\t\t\trow.initialize(true);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.botInitialized){\r\n\t\t\t\tif(this.botRow){\r\n\t\t\t\t\tthis.botRow.deleteCells();\r\n\t\t\t\t}\r\n\r\n\t\t\t\trow = this.generateRow(\"bottom\", this.rowsToData(rows))\r\n\t\t\t\tthis.botRow = row;\r\n\t\t\t\twhile(this.botElement.firstChild) this.botElement.removeChild(this.botElement.firstChild);\r\n\t\t\t\tthis.botElement.appendChild(row.getElement());\r\n\t\t\t\trow.initialize(true);\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\t//set resizable handles\r\n\t\t\tif(this.table.modExists(\"frozenColumns\")){\r\n\t\t\t\tthis.table.modules.frozenColumns.layout();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trecalcRowGroup(row){\r\n\t\tthis.recalcGroup(this.table.modules.groupRows.getRowGroup(row));\r\n\t}\r\n\r\n\trecalcAll(){\r\n\t\tif(this.topCalcs.length || this.botCalcs.length){\r\n\t\t\tif(this.table.options.columnCalcs !== \"group\"){\r\n\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.groupBy && this.table.options.columnCalcs !== \"table\"){\r\n\r\n\t\t\t\tvar groups = this.table.modules.groupRows.getChildGroups();\r\n\r\n\t\t\t\tgroups.forEach((group) => {\r\n\t\t\t\t\tthis.recalcGroup(group);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trecalcGroup(group){\r\n\t\tvar data, rowData;\r\n\r\n\t\tif(group){\r\n\t\t\tif(group.calcs){\r\n\t\t\t\tif(group.calcs.bottom){\r\n\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\trowData = this.generateRowData(\"bottom\", data);\r\n\r\n\t\t\t\t\tgroup.calcs.bottom.updateData(rowData);\r\n\t\t\t\t\tgroup.calcs.bottom.reinitialize();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(group.calcs.top){\r\n\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\trowData = this.generateRowData(\"top\", data);\r\n\r\n\t\t\t\t\tgroup.calcs.top.updateData(rowData);\r\n\t\t\t\t\tgroup.calcs.top.reinitialize();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//generate top stats row\r\n\tgenerateTopRow(rows){\r\n\t\treturn this.generateRow(\"top\", this.rowsToData(rows));\r\n\t}\r\n\t//generate bottom stats row\r\n\tgenerateBottomRow(rows){\r\n\t\treturn this.generateRow(\"bottom\", this.rowsToData(rows));\r\n\t}\r\n\r\n\trowsToData(rows){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\trows.forEach((row) => {\r\n\t\t\tdata.push(row.getData());\r\n\r\n\t\t\tif(this.table.options.dataTree && this.table.options.dataTreeChildColumnCalcs){\r\n\t\t\t\tif(row.modules.dataTree && row.modules.dataTree.open){\r\n\t\t\t\t\tvar children = this.rowsToData(this.table.modules.dataTree.getFilteredTreeChildren(row));\r\n\t\t\t\t\tdata = data.concat(children);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//generate stats row\r\n\tgenerateRow(pos, data){\r\n\t\tvar rowData = this.generateRowData(pos, data),\r\n\t\trow;\r\n\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.disable();\r\n\t\t}\r\n\r\n\t\trow = new Row(rowData, this, \"calc\");\r\n\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.enable();\r\n\t\t}\r\n\r\n\t\trow.getElement().classList.add(\"tabulator-calcs\", \"tabulator-calcs-\" + pos);\r\n\r\n\t\trow.component = false;\r\n\r\n\t\trow.getComponent = () => {\r\n\t\t\tif(!row.component){\r\n\t\t\t\trow.component = new CalcComponent(row);\r\n\t\t\t}\r\n\r\n\t\t\treturn row.component;\r\n\t\t};\r\n\r\n\t\trow.generateCells = () => {\r\n\r\n\t\t\tvar cells = [];\r\n\r\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\r\n\t\t\t\t\t//set field name of mock column\r\n\t\t\t\t\tthis.genColumn.setField(column.getField());\r\n\t\t\t\t\tthis.genColumn.hozAlign = column.hozAlign;\r\n\r\n\t\t\t\t\tif(column.definition[pos + \"CalcFormatter\"] && this.table.modExists(\"format\")){\r\n\t\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(column.definition[pos + \"CalcFormatter\"]),\r\n\t\t\t\t\t\t\tparams: column.definition[pos + \"CalcFormatterParams\"] || {},\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(\"plaintext\"),\r\n\t\t\t\t\t\t\tparams:{}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//ensure css class defintion is replicated to calculation cell\r\n\t\t\t\t\tthis.genColumn.definition.cssClass = column.definition.cssClass;\r\n\r\n\t\t\t\t\t//generate cell and assign to correct column\r\n\t\t\t\t\tvar cell = new Cell(this.genColumn, row);\r\n\t\t\t\t\tcell.getElement();\r\n\t\t\t\t\tcell.column = column;\r\n\t\t\t\t\tcell.setWidth();\r\n\r\n\t\t\t\t\tcolumn.cells.push(cell);\r\n\t\t\t\t\tcells.push(cell);\r\n\r\n\t\t\t\t\tif(!column.visible){\r\n\t\t\t\t\t\tcell.hide();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\trow.cells = cells;\r\n\t\t};\r\n\r\n\t\treturn row;\r\n\t}\r\n\r\n\t//generate stats row\r\n\tgenerateRowData(pos, data){\r\n\t\tvar rowData = {},\r\n\t\tcalcs = pos == \"top\" ? this.topCalcs : this.botCalcs,\r\n\t\ttype = pos == \"top\" ? \"topCalc\" : \"botCalc\",\r\n\t\tparams, paramKey;\r\n\r\n\t\tcalcs.forEach(function(column){\r\n\t\t\tvar values = [];\r\n\r\n\t\t\tif(column.modules.columnCalcs && column.modules.columnCalcs[type]){\r\n\t\t\t\tdata.forEach(function(item){\r\n\t\t\t\t\tvalues.push(column.getFieldValue(item));\r\n\t\t\t\t});\r\n\r\n\t\t\t\tparamKey = type + \"Params\";\r\n\t\t\t\tparams = typeof column.modules.columnCalcs[paramKey] === \"function\" ? column.modules.columnCalcs[paramKey](values, data) : column.modules.columnCalcs[paramKey];\r\n\r\n\t\t\t\tcolumn.setFieldValue(rowData, column.modules.columnCalcs[type](values, data, params));\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowData;\r\n\t}\r\n\r\n\thasTopCalcs(){\r\n\t\treturn\t!!(this.topCalcs.length);\r\n\t}\r\n\r\n\thasBottomCalcs(){\r\n\t\treturn\t!!(this.botCalcs.length);\r\n\t}\r\n\r\n\t//handle table redraw\r\n\tredraw(){\r\n\t\tif(this.topRow){\r\n\t\t\tthis.topRow.normalizeHeight(true);\r\n\t\t}\r\n\t\tif(this.botRow){\r\n\t\t\tthis.botRow.normalizeHeight(true);\r\n\t\t}\r\n\t}\r\n\r\n\t//return the calculated\r\n\tgetResults(){\r\n\t\tvar results = {},\r\n\t\tgroups;\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tgroups = this.table.modules.groupRows.getGroups(true);\r\n\r\n\t\t\tgroups.forEach((group) => {\r\n\t\t\t\tresults[group.getKey()] = this.getGroupResults(group);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tresults = {\r\n\t\t\t\ttop: this.topRow ? this.topRow.getData() : {},\r\n\t\t\t\tbottom: this.botRow ? this.botRow.getData() : {},\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n\r\n\t//get results from a group\r\n\tgetGroupResults(group){\r\n\t\tvar groupObj = group._getSelf(),\r\n\t\tsubGroups = group.getSubGroups(),\r\n\t\tsubGroupResults = {},\r\n\t\tresults = {};\r\n\r\n\t\tsubGroups.forEach((subgroup) => {\r\n\t\t\tsubGroupResults[subgroup.getKey()] = this.getGroupResults(subgroup);\r\n\t\t});\r\n\r\n\t\tresults = {\r\n\t\t\ttop: groupObj.calcs.top ? groupObj.calcs.top.getData() : {},\r\n\t\t\tbottom: groupObj.calcs.bottom ? groupObj.calcs.bottom.getData() : {},\r\n\t\t\tgroups: subGroupResults,\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n}\r\n\r\nColumnCalcs.moduleName = \"columnCalcs\";\r\n\r\n//load defaults\r\nColumnCalcs.calculations = defaultCalculations;\r\n\r\nexport default ColumnCalcs;","import Module from '../../core/Module.js';\r\n\r\nimport Row from '../../core/row/Row.js';\r\n\r\nclass DataTree extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.indent = 10;\r\n\t\tthis.field = \"\";\r\n\t\tthis.collapseEl = null;\r\n\t\tthis.expandEl = null;\r\n\t\tthis.branchEl = null;\r\n\t\tthis.elementField = false;\r\n\r\n\t\tthis.startOpen = function(){};\r\n\r\n\t\tthis.displayIndex = 0;\r\n\r\n\t\tthis.registerTableOption(\"dataTree\", false); //enable data tree\r\n\t\tthis.registerTableOption(\"dataTreeFilter\", true); //filter child rows\r\n\t\tthis.registerTableOption(\"dataTreeSort\", true); //sort child rows\r\n\t\tthis.registerTableOption(\"dataTreeElementColumn\", false);\r\n\t\tthis.registerTableOption(\"dataTreeBranchElement\", true);//show data tree branch element\r\n\t\tthis.registerTableOption(\"dataTreeChildIndent\", 9); //data tree child indent in px\r\n\t\tthis.registerTableOption(\"dataTreeChildField\", \"_children\");//data tre column field to look for child rows\r\n\t\tthis.registerTableOption(\"dataTreeCollapseElement\", false);//data tree row collapse element\r\n\t\tthis.registerTableOption(\"dataTreeExpandElement\", false);//data tree row expand element\r\n\t\tthis.registerTableOption(\"dataTreeStartExpanded\", false);\r\n\t\tthis.registerTableOption(\"dataTreeChildColumnCalcs\", false);//include visible data tree rows in column calculations\r\n\t\tthis.registerTableOption(\"dataTreeSelectPropagate\", false);//seleccting a parent row selects its children\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"treeCollapse\", this.collapseRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"treeExpand\", this.expandRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"treeToggle\", this.toggleRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"getTreeParent\", this.getTreeParent.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"getTreeChildren\", this.getRowChildren.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"addTreeChild\", this.addTreeChildRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isTreeExpanded\", this.isRowExpanded.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.dataTree){\r\n\t\t\tvar dummyEl = null,\r\n\t\t\toptions = this.table.options;\r\n\r\n\t\t\tthis.field = options.dataTreeChildField;\r\n\t\t\tthis.indent = options.dataTreeChildIndent;\r\n\r\n\t\t\tif(options.dataTreeBranchElement){\r\n\r\n\t\t\t\tif(options.dataTreeBranchElement === true){\r\n\t\t\t\t\tthis.branchEl = document.createElement(\"div\");\r\n\t\t\t\t\tthis.branchEl.classList.add(\"tabulator-data-tree-branch\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(typeof options.dataTreeBranchElement === \"string\"){\r\n\t\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\t\tdummyEl.innerHTML = options.dataTreeBranchElement;\r\n\t\t\t\t\t\tthis.branchEl = dummyEl.firstChild;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.branchEl = options.dataTreeBranchElement;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(options.dataTreeCollapseElement){\r\n\t\t\t\tif(typeof options.dataTreeCollapseElement === \"string\"){\r\n\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\tdummyEl.innerHTML = options.dataTreeCollapseElement;\r\n\t\t\t\t\tthis.collapseEl = dummyEl.firstChild;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.collapseEl = options.dataTreeCollapseElement;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.collapseEl = document.createElement(\"div\");\r\n\t\t\t\tthis.collapseEl.classList.add(\"tabulator-data-tree-control\");\r\n\t\t\t\tthis.collapseEl.tabIndex = 0;\r\n\t\t\t\tthis.collapseEl.innerHTML = \"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif(options.dataTreeExpandElement){\r\n\t\t\t\tif(typeof options.dataTreeExpandElement === \"string\"){\r\n\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\tdummyEl.innerHTML = options.dataTreeExpandElement;\r\n\t\t\t\t\tthis.expandEl = dummyEl.firstChild;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.expandEl = options.dataTreeExpandElement;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.expandEl = document.createElement(\"div\");\r\n\t\t\t\tthis.expandEl.classList.add(\"tabulator-data-tree-control\");\r\n\t\t\t\tthis.expandEl.tabIndex = 0;\r\n\t\t\t\tthis.expandEl.innerHTML = \"
\";\r\n\t\t\t}\r\n\r\n\r\n\t\t\tswitch(typeof options.dataTreeStartExpanded){\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\treturn options.dataTreeStartExpanded;\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tthis.startOpen = options.dataTreeStartExpanded;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\treturn options.dataTreeStartExpanded[index];\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-layout-after\", this.layoutRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowDelete.bind(this),0);\r\n\t\t\tthis.subscribe(\"row-data-changed\", this.rowDataChanged.bind(this), 10);\r\n\t\t\tthis.subscribe(\"cell-value-updated\", this.cellValueChanged.bind(this));\r\n\t\t\tthis.subscribe(\"edit-cancelled\", this.cellValueChanged.bind(this));\r\n\t\t\tthis.subscribe(\"column-moving-rows\", this.columnMoving.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.initializeElementField.bind(this));\r\n\r\n\t\t\tthis.registerDisplayHandler(this.getRows.bind(this), 30);\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeElementField(){\r\n\t\tvar firstCol = this.table.columnManager.getFirstVisibleColumn();\r\n\r\n\t\tthis.elementField = this.table.options.dataTreeElementColumn || (firstCol ? firstCol.field : false);\r\n\t}\r\n\t\r\n\tgetRowChildren(row){\r\n\t\treturn this.getTreeChildren(row, true);\r\n\t}\r\n\r\n\tcolumnMoving(){\r\n\t\tvar rows = [];\r\n\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\trows = rows.concat(this.getTreeChildren(row, false, true));\r\n\t\t});\r\n\r\n\t\treturn rows;\r\n\t}\r\n\r\n\trowDataChanged(row, visible, updatedData){\r\n\t\tif(this.redrawNeeded(updatedData)){\r\n\t\t\tthis.initializeRow(row);\r\n\r\n\t\t\tif(visible){\r\n\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tcellValueChanged(cell){\r\n\t\tvar field = cell.column.getField();\r\n\r\n\t\tif(field === this.elementField){\r\n\t\t\tthis.layoutRow(cell.row);\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar childArray = row.getData()[this.field];\r\n\t\tvar isArray = Array.isArray(childArray);\r\n\r\n\t\tvar children = isArray || (!isArray && typeof childArray === \"object\" && childArray !== null);\r\n\r\n\t\tif(!children && row.modules.dataTree && row.modules.dataTree.branchEl){\r\n\t\t\trow.modules.dataTree.branchEl.parentNode.removeChild(row.modules.dataTree.branchEl);\r\n\t\t}\r\n\r\n\t\tif(!children && row.modules.dataTree && row.modules.dataTree.controlEl){\r\n\t\t\trow.modules.dataTree.controlEl.parentNode.removeChild(row.modules.dataTree.controlEl);\r\n\t\t}\r\n\r\n\t\trow.modules.dataTree = {\r\n\t\t\tindex: row.modules.dataTree ? row.modules.dataTree.index : 0,\r\n\t\t\topen: children ? (row.modules.dataTree ? row.modules.dataTree.open : this.startOpen(row.getComponent(), 0)) : false,\r\n\t\t\tcontrolEl: row.modules.dataTree && children ? row.modules.dataTree.controlEl : false,\r\n\t\t\tbranchEl: row.modules.dataTree && children ? row.modules.dataTree.branchEl : false,\r\n\t\t\tparent: row.modules.dataTree ? row.modules.dataTree.parent : false,\r\n\t\t\tchildren:children,\r\n\t\t};\r\n\t}\r\n\r\n\treinitializeRowChildren(row){\r\n\t\tvar children = this.getTreeChildren(row, false, true);\r\n\r\n\t\tchildren.forEach(function(child){\r\n\t\t\tchild.reinitialize(true);\r\n\t\t});\r\n\t}\r\n\r\n\tlayoutRow(row){\r\n\t\tvar cell = this.elementField ? row.getCell(this.elementField) : row.getCells()[0],\r\n\t\tel = cell.getElement(),\r\n\t\tconfig = row.modules.dataTree;\r\n\r\n\t\tif(config.branchEl){\r\n\t\t\tif(config.branchEl.parentNode){\r\n\t\t\t\tconfig.branchEl.parentNode.removeChild(config.branchEl);\r\n\t\t\t}\r\n\t\t\tconfig.branchEl = false;\r\n\t\t}\r\n\r\n\t\tif(config.controlEl){\r\n\t\t\tif(config.controlEl.parentNode){\r\n\t\t\t\tconfig.controlEl.parentNode.removeChild(config.controlEl);\r\n\t\t\t}\r\n\t\t\tconfig.controlEl = false;\r\n\t\t}\r\n\r\n\t\tthis.generateControlElement(row, el);\r\n\r\n\t\trow.getElement().classList.add(\"tabulator-tree-level-\" + config.index);\r\n\r\n\t\tif(config.index){\r\n\t\t\tif(this.branchEl){\r\n\t\t\t\tconfig.branchEl = this.branchEl.cloneNode(true);\r\n\t\t\t\tel.insertBefore(config.branchEl, el.firstChild);\r\n\r\n\t\t\t\tif(this.table.rtl){\r\n\t\t\t\t\tconfig.branchEl.style.marginRight = (((config.branchEl.offsetWidth + config.branchEl.style.marginLeft) * (config.index - 1)) + (config.index * this.indent)) + \"px\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.branchEl.style.marginLeft = (((config.branchEl.offsetWidth + config.branchEl.style.marginRight) * (config.index - 1)) + (config.index * this.indent)) + \"px\";\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\r\n\t\t\t\tif(this.table.rtl){\r\n\t\t\t\t\tel.style.paddingRight = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-right')) + (config.index * this.indent) + \"px\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.style.paddingLeft = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-left')) + (config.index * this.indent) + \"px\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateControlElement(row, el){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\tel = el || row.getCells()[0].getElement(),\r\n\t\toldControl = config.controlEl;\r\n\r\n\t\tif(config.children !== false){\r\n\r\n\t\t\tif(config.open){\r\n\t\t\t\tconfig.controlEl = this.collapseEl.cloneNode(true);\r\n\t\t\t\tconfig.controlEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tthis.collapseRow(row);\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconfig.controlEl = this.expandEl.cloneNode(true);\r\n\t\t\t\tconfig.controlEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tthis.expandRow(row);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tconfig.controlEl.addEventListener(\"mousedown\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\r\n\t\t\tif(oldControl && oldControl.parentNode === el){\r\n\t\t\t\toldControl.parentNode.replaceChild(config.controlEl,oldControl);\r\n\t\t\t}else{\r\n\t\t\t\tel.insertBefore(config.controlEl, el.firstChild);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tsetDisplayIndex (index) {\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\r\n\tgetDisplayIndex () {\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\r\n\tgetRows(rows){\r\n\t\tvar output = [];\r\n\r\n\t\trows.forEach((row, i) => {\r\n\t\t\tvar config, children;\r\n\r\n\t\t\toutput.push(row);\r\n\r\n\t\t\tif(row instanceof Row){\r\n\r\n\t\t\t\trow.create();\r\n\r\n\t\t\t\tconfig = row.modules.dataTree.children;\r\n\r\n\t\t\t\tif(!config.index && config.children !== false){\r\n\t\t\t\t\tchildren = this.getChildren(row);\r\n\r\n\t\t\t\t\tchildren.forEach((child) => {\r\n\t\t\t\t\t\tchild.create();\r\n\t\t\t\t\t\toutput.push(child);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetChildren(row, allChildren){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\tchildren = [],\r\n\t\toutput = [];\r\n\r\n\t\tif(config.children !== false && (config.open || allChildren)){\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"filter\") && this.table.options.dataTreeFilter){\r\n\t\t\t\tchildren = this.table.modules.filter.filter(config.children);\r\n\t\t\t}else{\r\n\t\t\t\tchildren = config.children;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"sort\") && this.table.options.dataTreeSort){\r\n\t\t\t\tthis.table.modules.sort.sort(children);\r\n\t\t\t}\r\n\r\n\t\t\tchildren.forEach((child) => {\r\n\t\t\t\toutput.push(child);\r\n\r\n\t\t\t\tvar subChildren = this.getChildren(child);\r\n\r\n\t\t\t\tsubChildren.forEach((sub) => {\r\n\t\t\t\t\toutput.push(sub);\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgenerateChildren(row){\r\n\t\tvar children = [];\r\n\r\n\t\tvar childArray = row.getData()[this.field];\r\n\r\n\t\tif(!Array.isArray(childArray)){\r\n\t\t\tchildArray = [childArray];\r\n\t\t}\r\n\r\n\t\tchildArray.forEach((childData) => {\r\n\t\t\tvar childRow = new Row(childData || {}, this.table.rowManager);\r\n\r\n\t\t\tchildRow.create();\r\n\r\n\t\t\tchildRow.modules.dataTree.index = row.modules.dataTree.index + 1;\r\n\t\t\tchildRow.modules.dataTree.parent = row;\r\n\r\n\t\t\tif(childRow.modules.dataTree.children){\r\n\t\t\t\tchildRow.modules.dataTree.open = this.startOpen(childRow.getComponent(), childRow.modules.dataTree.index);\r\n\t\t\t}\r\n\t\t\tchildren.push(childRow);\r\n\t\t});\r\n\r\n\t\treturn children;\r\n\t}\r\n\r\n\texpandRow(row, silent){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tconfig.open = true;\r\n\r\n\t\t\trow.reinitialize();\r\n\r\n\t\t\tthis.refreshData(true);\r\n\r\n\t\t\tthis.dispatchExternal(\"dataTreeRowExpanded\", row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\t}\r\n\r\n\tcollapseRow(row){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tconfig.open = false;\r\n\r\n\t\t\trow.reinitialize();\r\n\r\n\t\t\tthis.refreshData(true);\r\n\r\n\t\t\tthis.dispatchExternal(\"dataTreeRowCollapsed\", row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\t}\r\n\r\n\ttoggleRow(row){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tif(config.open){\r\n\t\t\t\tthis.collapseRow(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.expandRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tisRowExpanded(row){\r\n\t\treturn row.modules.dataTree.open;\r\n\t}\r\n\r\n\tgetTreeParent(row){\r\n\t\treturn row.modules.dataTree.parent ? row.modules.dataTree.parent.getComponent() : false;\r\n\t}\r\n\r\n\tgetFilteredTreeChildren(row){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\toutput = [], children;\r\n\r\n\t\tif(config.children){\r\n\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"filter\") && this.table.options.dataTreeFilter){\r\n\t\t\t\tchildren = this.table.modules.filter.filter(config.children);\r\n\t\t\t}else{\r\n\t\t\t\tchildren = config.children;\r\n\t\t\t}\r\n\r\n\t\t\tchildren.forEach((childRow) => {\r\n\t\t\t\tif(childRow instanceof Row){\r\n\t\t\t\t\toutput.push(childRow);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\trowDelete(row){\r\n\t\tvar parent = row.modules.dataTree.parent,\r\n\t\tchildIndex;\r\n\r\n\t\tif(parent){\r\n\t\t\tchildIndex = this.findChildIndex(row, parent);\r\n\r\n\t\t\tif(childIndex !== false){\r\n\t\t\t\tparent.data[this.field].splice(childIndex, 1);\r\n\t\t\t}\r\n\r\n\t\t\tif(!parent.data[this.field].length){\r\n\t\t\t\tdelete parent.data[this.field];\r\n\t\t\t}\r\n\r\n\t\t\tthis.initializeRow(parent);\r\n\t\t\tthis.layoutRow(parent);\r\n\t\t}\r\n\r\n\t\tthis.refreshData(true);\r\n\t}\r\n\r\n\taddTreeChildRow(row, data, top, index){\r\n\t\tvar childIndex = false;\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(row.data[this.field])){\r\n\t\t\trow.data[this.field] = [];\r\n\r\n\t\t\trow.modules.dataTree.open = this.startOpen(row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\r\n\t\tif(typeof index !== \"undefined\"){\r\n\t\t\tchildIndex = this.findChildIndex(index, row);\r\n\r\n\t\t\tif(childIndex !== false){\r\n\t\t\t\trow.data[this.field].splice((top ? childIndex : childIndex + 1), 0, data);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(childIndex === false){\r\n\t\t\tif(top){\r\n\t\t\t\trow.data[this.field].unshift(data);\r\n\t\t\t}else{\r\n\t\t\t\trow.data[this.field].push(data);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.initializeRow(row);\r\n\t\tthis.layoutRow(row);\r\n\r\n\t\tthis.refreshData(true);\r\n\t}\r\n\r\n\tfindChildIndex(subject, parent){\r\n\t\tvar match = false;\r\n\r\n\t\tif(typeof subject == \"object\"){\r\n\r\n\t\t\tif(subject instanceof Row){\r\n\t\t\t\t//subject is row element\r\n\t\t\t\tmatch = subject.data;\r\n\t\t\t}else if(subject instanceof RowComponent){\r\n\t\t\t\t//subject is public row component\r\n\t\t\t\tmatch = subject._getSelf().data;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\tif(parent.modules.dataTree){\r\n\t\t\t\t\tmatch = parent.modules.dataTree.children.find((childRow) => {\r\n\t\t\t\t\t\treturn childRow instanceof Row ? childRow.element === subject : false;\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(match){\r\n\t\t\t\t\t\tmatch = match.data;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}else if(typeof subject == \"undefined\" || subject === null){\r\n\t\t\tmatch = false\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the index of the row\r\n\t\t\tmatch = parent.data[this.field].find((row) => {\r\n\t\t\t\treturn row.data[this.table.options.index] == subject;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(match){\r\n\r\n\t\t\tif(Array.isArray(parent.data[this.field])){\r\n\t\t\t\tmatch = parent.data[this.field].indexOf(match);\r\n\t\t\t}\r\n\r\n\t\t\tif(match == -1){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//catch all for any other type of input\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tgetTreeChildren(row, component, recurse){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\toutput = [];\r\n\r\n\t\tif(config.children){\r\n\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tconfig.children.forEach((childRow) => {\r\n\t\t\t\tif(childRow instanceof Row){\r\n\t\t\t\t\toutput.push(component ? childRow.getComponent() : childRow);\r\n\r\n\t\t\t\t\tif(recurse){\r\n\t\t\t\t\t\toutput = output.concat(this.getTreeChildren(childRow, component, recurse));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetChildField(){\r\n\t\treturn this.field;\r\n\t}\r\n\r\n\tredrawNeeded(data){\r\n\t\treturn (this.field ? typeof data[this.field] !== \"undefined\" : false) || (this.elementField ? typeof data[this.elementField] !== \"undefined\" : false);\r\n\t}\r\n}\r\n\r\nDataTree.moduleName = \"dataTree\";\r\n\r\nexport default DataTree;","export default function(list, options, setFileContents){\r\n\tvar delimiter = options && options.delimiter ? options.delimiter : \",\",\r\n\tfileContents = [],\r\n\theaders = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tvar item = [];\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"group\":\r\n\t\t\tconsole.warn(\"Download Warning - CSV downloader cannot process row groups\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tconsole.warn(\"Download Warning - CSV downloader cannot process column calculations\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"header\":\r\n\t\t\trow.columns.forEach((col, i) => {\r\n\t\t\t\tif(col && col.depth === 1){\r\n\t\t\t\t\theaders[i] = typeof col.value == \"undefined\" || col.value === null ? \"\" : ('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\trow.columns.forEach((col) => {\r\n\r\n\t\t\t\tif(col){\r\n\r\n\t\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tcol.value = JSON.stringify(col.value);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\t\tcol.value = \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\titem.push('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tfileContents.push(item.join(delimiter));\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(headers.length){\r\n\t\tfileContents.unshift(headers.join(delimiter));\r\n\t}\r\n\r\n\tfileContents = fileContents.join(\"\\n\");\r\n\r\n\tif(options.bom){\r\n\t\tfileContents = \"\\ufeff\" + fileContents;\r\n\t}\r\n\r\n\tsetFileContents(fileContents, \"text/csv\");\r\n};","export default function(list, options, setFileContents){\r\n\tvar fileContents = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tvar item = {};\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"header\":\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process row groups\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process column calculations\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\tif(col){\r\n\t\t\t\t\titem[col.component.getTitleDownload() || col.component.getField()] = col.value;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tfileContents.push(item);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tfileContents = JSON.stringify(fileContents, null, '\\t');\r\n\r\n\tsetFileContents(fileContents, \"application/json\");\r\n};","export default function(list, options, setFileContents){\r\n\tvar header = [],\r\n\tbody = [],\r\n\tautoTableParams = {},\r\n\trowGroupStyles = options.rowGroupStyles || {\r\n\t\tfontStyle: \"bold\",\r\n\t\tfontSize: 12,\r\n\t\tcellPadding: 6,\r\n\t\tfillColor: 220,\r\n\t},\r\n\trowCalcStyles = options.rowCalcStyles || {\r\n\t\tfontStyle: \"bold\",\r\n\t\tfontSize: 10,\r\n\t\tcellPadding: 4,\r\n\t\tfillColor: 232,\r\n\t},\r\n\tjsPDFParams = options.jsPDF || {},\r\n\ttitle = options && options.title ? options.title : \"\";\r\n\r\n\tif(!jsPDFParams.orientation){\r\n\t\tjsPDFParams.orientation = options.orientation || \"landscape\";\r\n\t}\r\n\r\n\tif(!jsPDFParams.unit){\r\n\t\tjsPDFParams.unit = \"pt\";\r\n\t}\r\n\r\n\t//parse row list\r\n\tlist.forEach((row) => {\r\n\t\tvar item = {};\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"header\":\r\n\t\t\theader.push(parseRow(row));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tbody.push(parseRow(row, rowGroupStyles));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tbody.push(parseRow(row, rowCalcStyles));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\tbody.push(parseRow(row));\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tfunction parseRow(row, styles){\r\n\t\tvar rowData = [];\r\n\r\n\t\trow.columns.forEach((col) =>{\r\n\t\t\tvar cell;\r\n\r\n\t\t\tif(col){\r\n\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tcol.value = JSON.stringify(col.value);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\tcol.value = \"\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcell = {\r\n\t\t\t\t\tcontent:col.value,\r\n\t\t\t\t\tcolSpan:col.width,\r\n\t\t\t\t\trowSpan:col.height,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tif(styles){\r\n\t\t\t\t\tcell.styles = styles;\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowData.push(cell);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowData;\r\n\t}\r\n\r\n\r\n\t//configure PDF\r\n\tvar doc = new jspdf.jsPDF(jsPDFParams); //set document to landscape, better for most tables\r\n\r\n\tif(options && options.autoTable){\r\n\t\tif(typeof options.autoTable === \"function\"){\r\n\t\t\tautoTableParams = options.autoTable(doc) || {};\r\n\t\t}else{\r\n\t\t\tautoTableParams = options.autoTable;\r\n\t\t}\r\n\t}\r\n\r\n\tif(title){\r\n\t\tautoTableParams.didDrawPage = function(data) {\r\n\t\t\tdoc.text(title, 40, 30);\r\n\t\t};\r\n\t}\r\n\r\n\tautoTableParams.head = header;\r\n\tautoTableParams.body = body;\r\n\r\n\tdoc.autoTable(autoTableParams);\r\n\r\n\tif(options && options.documentProcessing){\r\n\t\toptions.documentProcessing(doc);\r\n\t}\r\n\r\n\tsetFileContents(doc.output(\"arraybuffer\"), \"application/pdf\");\r\n};","import CoreFeature from '../../../../core/CoreFeature.js';\r\n\r\nexport default function(list, options, setFileContents){\r\n\tvar self = this,\r\n\tsheetName = options.sheetName || \"Sheet1\",\r\n\tworkbook = XLSX.utils.book_new(),\r\n\ttableFeatures = new CoreFeature(this),\r\n\toutput;\r\n\r\n\tworkbook.SheetNames = [];\r\n\tworkbook.Sheets = {};\r\n\r\n\tfunction generateSheet(){\r\n\t\tvar rows = [],\r\n\t\tmerges = [],\r\n\t\tworksheet = {},\r\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 }};\r\n\r\n\t\t//parse row list\r\n\t\tlist.forEach((row, i) => {\r\n\t\t\tvar rowData = [];\r\n\r\n\t\t\trow.columns.forEach(function(col, j){\r\n\r\n\t\t\t\tif(col){\r\n\t\t\t\t\trowData.push(!(col.value instanceof Date) && typeof col.value === \"object\" ? JSON.stringify(col.value) : col.value);\r\n\r\n\t\t\t\t\tif(col.width > 1 || col.height > -1){\r\n\t\t\t\t\t\tif(col.height > 1 || col.width > 1){\r\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}});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\trowData.push(\"\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\trows.push(rowData);\r\n\t\t});\r\n\r\n\t\t//convert rows to worksheet\r\n\t\tXLSX.utils.sheet_add_aoa(worksheet, rows);\r\n\r\n\t\tworksheet['!ref'] = XLSX.utils.encode_range(range);\r\n\r\n\t\tif(merges.length){\r\n\t\t\tworksheet[\"!merges\"] = merges;\r\n\t\t}\r\n\r\n\t\treturn worksheet;\r\n\t}\r\n\r\n\tif(options.sheetOnly){\r\n\t\tsetFileContents(generateSheet());\r\n\t\treturn;\r\n\t}\r\n\r\n\tif(options.sheets){\r\n\t\tfor(var sheet in options.sheets){\r\n\r\n\t\t\tif(options.sheets[sheet] === true){\r\n\t\t\t\tworkbook.SheetNames.push(sheet);\r\n\t\t\t\tworkbook.Sheets[sheet] = generateSheet();\r\n\t\t\t}else{\r\n\r\n\t\t\t\tworkbook.SheetNames.push(sheet);\r\n\r\n\t\t\t\ttableFeatures.commsSend(options.sheets[sheet], \"download\", \"intercept\",{\r\n\t\t\t\t\ttype:\"xlsx\",\r\n\t\t\t\t\toptions:{sheetOnly:true},\r\n\t\t\t\t\tactive:self.active,\r\n\t\t\t\t\tintercept:function(data){\r\n\t\t\t\t\t\tworkbook.Sheets[sheet] = data;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tworkbook.SheetNames.push(sheetName);\r\n\t\tworkbook.Sheets[sheetName] = generateSheet();\r\n\t}\r\n\r\n\tif(options.documentProcessing){\r\n\t\tworkbook = options.documentProcessing(workbook);\r\n\t}\r\n\r\n\t//convert workbook to binary array\r\n\tfunction s2ab(s) {\r\n\t\tvar buf = new ArrayBuffer(s.length);\r\n\t\tvar view = new Uint8Array(buf);\r\n\t\tfor (var i=0; i!=s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;\r\n\t\t\treturn buf;\r\n\t}\r\n\r\n\toutput = XLSX.write(workbook, {bookType:'xlsx', bookSST:true, type: 'binary'});\r\n\r\n\tsetFileContents(s2ab(output), \"application/octet-stream\");\r\n};","export default function(list, options, setFileContents){\r\n\tif(this.modExists(\"export\", true)){\r\n\t\tsetFileContents(this.modules.export.genereateHTMLTable(list), \"text/html\");\r\n\t}\r\n};","export default function (list, options, setFileContents) {\r\n\tconst fileContents = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tconst item = {};\r\n\r\n\t\tswitch (row.type) {\r\n\t\t\tcase \"header\":\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process row groups\");\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process column calculations\");\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\t\tif (col) {\r\n\t\t\t\t\t\titem[col.component.getTitleDownload() || col.component.getField()] = col.value;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tfileContents.push(JSON.stringify(item));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tsetFileContents(fileContents.join(\"\\n\"), \"application/x-ndjson\");\r\n};","import csv from './downloaders/csv.js';\r\nimport json from './downloaders/json.js';\r\nimport pdf from './downloaders/pdf.js';\r\nimport xlsx from './downloaders/xlsx.js';\r\nimport html from './downloaders/html.js';\r\nimport jsonLines from './downloaders/jsonLines.js';\r\n\r\nexport default {\r\n\tcsv:csv,\r\n\tjson:json,\r\n\tjsonLines:jsonLines,\r\n\tpdf:pdf,\r\n\txlsx:xlsx,\r\n\thtml:html,\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultDownloaders from './defaults/downloaders.js';\r\n\r\nclass Download extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.registerTableOption(\"downloadReady\", function(data, blob){return blob;}); //function to manipulate download data\r\n\t\tthis.registerTableOption(\"downloadConfig\", {}); //download config\r\n\t\tthis.registerTableOption(\"downloadRowRange\", \"active\"); //restrict download to active rows only\r\n\r\n\t\tthis.registerColumnOption(\"download\");\r\n\t\tthis.registerColumnOption(\"titleDownload\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"download\", this.download.bind(this));\r\n\t\tthis.registerTableFunction(\"downloadToTab\", this.downloadToTab.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tdownloadToTab(type, filename, options, active){\r\n\t\tthis.download(type, filename, options, active, true);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\t//trigger file download\r\n\tdownload(type, filename, options, range, interceptCallback){\r\n\t\tvar downloadFunc = false;\r\n\r\n\t\tfunction buildLink(data, mime){\r\n\t\t\tif(interceptCallback){\r\n\t\t\t\tif(interceptCallback === true){\r\n\t\t\t\t\tthis.triggerDownload(data, mime, type, filename, true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tinterceptCallback(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tthis.triggerDownload(data, mime, type, filename);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(typeof type == \"function\"){\r\n\t\t\tdownloadFunc = type;\r\n\t\t}else{\r\n\t\t\tif(Download.downloaders[type]){\r\n\t\t\t\tdownloadFunc = Download.downloaders[type];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Download Error - No such download type found: \", type);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(downloadFunc){\r\n\t\t\tvar list = this.generateExportList(range);\r\n\r\n\t\t\tdownloadFunc.call(this.table, list , options || {}, buildLink.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateExportList(range){\r\n\t\tvar list = this.table.modules.export.generateExportList(this.table.options.downloadConfig, false, range || this.table.options.downloadRowRange, \"download\");\r\n\r\n\t\t//assign group header formatter\r\n\t\tvar groupHeader = this.table.options.groupHeaderDownload;\r\n\r\n\t\tif(groupHeader && !Array.isArray(groupHeader)){\r\n\t\t\tgroupHeader = [groupHeader];\r\n\t\t}\r\n\r\n\t\tlist.forEach((row) => {\r\n\t\t\tvar group;\r\n\r\n\t\t\tif(row.type === \"group\"){\r\n\t\t\t\tgroup = row.columns[0];\r\n\r\n\t\t\t\tif(groupHeader && groupHeader[row.indent]){\r\n\t\t\t\t\tgroup.value = groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn list;\r\n\t}\r\n\r\n\ttriggerDownload(data, mime, type, filename, newTab){\r\n\t\tvar element = document.createElement('a'),\r\n\t\tblob = new Blob([data],{type:mime}),\r\n\t\tfilename = filename || \"Tabulator.\" + (typeof type === \"function\" ? \"txt\" : type);\r\n\r\n\t\tblob = this.table.options.downloadReady(data, blob);\r\n\r\n\t\tif(blob){\r\n\r\n\t\t\tif(newTab){\r\n\t\t\t\twindow.open(window.URL.createObjectURL(blob));\r\n\t\t\t}else{\r\n\t\t\t\tif(navigator.msSaveOrOpenBlob){\r\n\t\t\t\t\tnavigator.msSaveOrOpenBlob(blob, filename);\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.setAttribute('href', window.URL.createObjectURL(blob));\r\n\r\n\t\t\t\t\t//set file title\r\n\t\t\t\t\telement.setAttribute('download', filename);\r\n\r\n\t\t\t\t\t//trigger download\r\n\t\t\t\t\telement.style.display = 'none';\r\n\t\t\t\t\tdocument.body.appendChild(element);\r\n\t\t\t\t\telement.click();\r\n\r\n\t\t\t\t\t//remove temporary link element\r\n\t\t\t\t\tdocument.body.removeChild(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"downloadComplete\");\r\n\t\t}\r\n\t}\r\n\r\n\tcommsReceived(table, action, data){\r\n\t\tswitch(action){\r\n\t\t\tcase \"intercept\":\r\n\t\t\tthis.download(data.type, \"\", data.options, data.active, data.intercept);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nDownload.moduleName = \"download\";\r\n\r\n//load defaults\r\nDownload.downloaders = defaultDownloaders;\r\n\r\nexport default Download;","export default function maskInput(el, options){\r\n\tvar mask = options.mask,\r\n\tmaskLetter = typeof options.maskLetterChar !== \"undefined\" ? options.maskLetterChar : \"A\",\r\n\tmaskNumber = typeof options.maskNumberChar !== \"undefined\" ? options.maskNumberChar : \"9\",\r\n\tmaskWildcard = typeof options.maskWildcardChar !== \"undefined\" ? options.maskWildcardChar : \"*\",\r\n\tsuccess = false;\r\n\r\n\tfunction fillSymbols(index){\r\n\t\tvar symbol = mask[index];\r\n\t\tif(typeof symbol !== \"undefined\" && symbol !== maskWildcard && symbol !== maskLetter && symbol !== maskNumber){\r\n\t\t\tel.value = el.value + \"\" + symbol;\r\n\t\t\tfillSymbols(index+1);\r\n\t\t}\r\n\t}\r\n\r\n\tel.addEventListener(\"keydown\", (e) => {\r\n\t\tvar index = el.value.length,\r\n\t\tchar = e.key;\r\n\r\n\t\tif(e.keyCode > 46){\r\n\t\t\tif(index >= mask.length){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tsuccess = false;\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\tswitch(mask[index]){\r\n\t\t\t\t\tcase maskLetter:\r\n\t\t\t\t\tif(char.toUpperCase() == char.toLowerCase()){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase maskNumber:\r\n\t\t\t\t\tif(isNaN(char)){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase maskWildcard:\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(char !== mask[index]){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\r\n\t\treturn;\r\n\t});\r\n\r\n\tel.addEventListener(\"keyup\", (e) => {\r\n\t\tif(e.keyCode > 46){\r\n\t\t\tif(options.maskAutoFill){\r\n\t\t\t\tfillSymbols(el.value.length);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\r\n\tif(!el.placeholder){\r\n\t\tel.placeholder = mask;\r\n\t}\r\n\r\n\tif(options.maskAutoFill){\r\n\t\tfillSymbols(el.value.length);\r\n\t}\r\n}","import maskInput from '../../inputMask.js';\r\n\r\n//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", editorParams.search ? \"search\" : \"text\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t});\r\n\r\n\tfunction onChange(e){\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\r\n\t\t\tif(success(input.value)){\r\n\t\t\t\tcellValue = input.value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\t// case 9:\r\n\t\t\tcase 13:\r\n\t\t\tonChange(e);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\te.stopPropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\treturn input;\r\n};","import maskInput from '../../inputMask.js';\r\n\r\n//resizable text area element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n var self = this,\r\n cellValue = cell.getValue(),\r\n vertNav = editorParams.verticalNavigation || \"hybrid\",\r\n value = String(cellValue !== null && typeof cellValue !== \"undefined\" ? cellValue : \"\"),\r\n count = (value.match(/(?:\\r\\n|\\r|\\n)/g) || []).length + 1,\r\n input = document.createElement(\"textarea\"),\r\n scrollHeight = 0;\r\n\r\n //create and style input\r\n input.style.display = \"block\";\r\n input.style.padding = \"2px\";\r\n input.style.height = \"100%\";\r\n input.style.width = \"100%\";\r\n input.style.boxSizing = \"border-box\";\r\n input.style.whiteSpace = \"pre-wrap\";\r\n input.style.resize = \"none\";\r\n\r\n if(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n for (let key in editorParams.elementAttributes){\r\n if(key.charAt(0) == \"+\"){\r\n key = key.slice(1);\r\n input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n }else{\r\n input.setAttribute(key, editorParams.elementAttributes[key]);\r\n }\r\n }\r\n }\r\n\r\n input.value = value;\r\n\r\n onRendered(function(){\r\n input.focus({preventScroll: true});\r\n input.style.height = \"100%\";\r\n\r\n input.scrollHeight;\r\n input.style.height = input.scrollHeight + \"px\";\r\n cell.getRow().normalizeHeight();\r\n });\r\n\r\n function onChange(e){\r\n\r\n if(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\r\n\r\n if(success(input.value)){\r\n cellValue = input.value; //persist value if successfully validated incase editor is used as header filter\r\n }\r\n\r\n setTimeout(function(){\r\n cell.getRow().normalizeHeight();\r\n },300)\r\n }else{\r\n cancel();\r\n }\r\n }\r\n\r\n //submit new value on blur or change\r\n input.addEventListener(\"change\", onChange);\r\n input.addEventListener(\"blur\", onChange);\r\n\r\n input.addEventListener(\"keyup\", function(){\r\n\r\n input.style.height = \"\";\r\n\r\n var heightNow = input.scrollHeight;\r\n\r\n input.style.height = heightNow + \"px\";\r\n\r\n if(heightNow != scrollHeight){\r\n scrollHeight = heightNow;\r\n cell.getRow().normalizeHeight();\r\n }\r\n });\r\n\r\n input.addEventListener(\"keydown\", function(e){\r\n\r\n switch(e.keyCode){\r\n case 27:\r\n cancel();\r\n break;\r\n\r\n case 38: //up arrow\r\n if(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart)){\r\n e.stopImmediatePropagation();\r\n e.stopPropagation();\r\n }\r\n\r\n break;\r\n\r\n case 40: //down arrow\r\n if(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart !== input.value.length)){\r\n e.stopImmediatePropagation();\r\n e.stopPropagation();\r\n }\r\n break;\r\n\r\n case 35:\r\n case 36:\r\n e.stopPropagation();\r\n break;\r\n }\r\n });\r\n\r\n if(editorParams.mask){\r\n maskInput(input, editorParams);\r\n }\r\n\r\n return input;\r\n};","import maskInput from '../../inputMask.js';\r\n\r\n//input element with type of number\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar cellValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", \"number\");\r\n\r\n\tif(typeof editorParams.max != \"undefined\"){\r\n\t\tinput.setAttribute(\"max\", editorParams.max);\r\n\t}\r\n\r\n\tif(typeof editorParams.min != \"undefined\"){\r\n\t\tinput.setAttribute(\"min\", editorParams.min);\r\n\t}\r\n\r\n\tif(typeof editorParams.step != \"undefined\"){\r\n\t\tinput.setAttribute(\"step\", editorParams.step);\r\n\t}\r\n\r\n\t//create and style input\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\r\n\tvar blurFunc = function(e){\r\n\t\tonChange();\r\n\t};\r\n\r\n\tonRendered(function () {\r\n\t\t//submit new value on blur\r\n\t\tinput.removeEventListener(\"blur\", blurFunc);\r\n\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\r\n\t\t//submit new value on blur\r\n\t\tinput.addEventListener(\"blur\", blurFunc);\r\n\t});\r\n\r\n\tfunction onChange(){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(!isNaN(value) && value !==\"\"){\r\n\t\t\tvalue = Number(value);\r\n\t\t}\r\n\r\n\t\tif(value !== cellValue){\r\n\t\t\tif(success(value)){\r\n\t\t\t\tcellValue = value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 13:\r\n\t\t\t// case 9:\r\n\t\t\tonChange();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tcase 40: //down arrow\r\n\t\t\tif(vertNav == \"editor\"){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\te.stopPropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\treturn input;\r\n};","//input element with type of number\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", \"range\");\r\n\r\n\tif (typeof editorParams.max != \"undefined\") {\r\n\t\tinput.setAttribute(\"max\", editorParams.max);\r\n\t}\r\n\r\n\tif (typeof editorParams.min != \"undefined\") {\r\n\t\tinput.setAttribute(\"min\", editorParams.min);\r\n\t}\r\n\r\n\tif (typeof editorParams.step != \"undefined\") {\r\n\t\tinput.setAttribute(\"step\", editorParams.step);\r\n\t}\r\n\r\n\t//create and style input\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\r\n\tonRendered(function () {\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t});\r\n\r\n\tfunction onChange(){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(!isNaN(value) && value !==\"\"){\r\n\t\t\tvalue = Number(value);\r\n\t\t}\r\n\r\n\t\tif(value != cellValue){\r\n\t\t\tif(success(value)){\r\n\t\t\t\tcellValue = value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tonChange();\r\n\t});\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 13:\r\n\t\t\t// case 9:\r\n\t\t\tonChange();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\treturn input;\r\n};","import Helpers from '../../../../core/tools/Helpers.js';\r\n\r\n//dropdown select editor\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\tcellEl = cell.getElement(),\r\n\tinitialValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinitialDisplayValue = typeof initialValue !== \"undefined\" || initialValue === null ? (Array.isArray(initialValue) ? initialValue : [initialValue]) : (typeof editorParams.defaultValue !== \"undefined\" ? editorParams.defaultValue : []),\r\n\tinput = document.createElement(\"input\"),\r\n\tlistEl = document.createElement(\"div\"),\r\n\tmultiselect = editorParams.multiselect,\r\n\tdataItems = [],\r\n\tcurrentItem = {},\r\n\tdisplayItems = [],\r\n\tcurrentItems = [],\r\n\tblurable = true,\r\n\tblockListShow = false,\r\n\tsearchWord = \"\",\r\n\tsearchWordTimeout = null;\r\n\r\n\tif(Array.isArray(editorParams) || (!Array.isArray(editorParams) && typeof editorParams === \"object\" && !editorParams.values)){\r\n\t\tconsole.warn(\"DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object\");\r\n\t\teditorParams = {values:editorParams};\r\n\t}\r\n\r\n\tfunction getUniqueColumnValues(field){\r\n\t\tvar output = {},\r\n\t\tdata = self.table.getData(),\r\n\t\tcolumn;\r\n\r\n\t\tif(field){\r\n\t\t\tcolumn = self.table.columnManager.getColumnByField(field);\r\n\t\t}else{\r\n\t\t\tcolumn = cell.getColumn()._getSelf();\r\n\t\t}\r\n\r\n\t\tif(column){\r\n\t\t\tdata.forEach(function(row){\r\n\t\t\t\tvar val = column.getFieldValue(row);\r\n\r\n\t\t\t\tif(val !== null && typeof val !== \"undefined\" && val !== \"\"){\r\n\t\t\t\t\toutput[val] = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"unable to find matching column to create select lookup list:\", field);\r\n\t\t}\r\n\r\n\t\treturn Object.keys(output);\r\n\t}\r\n\r\n\tfunction parseItems(inputValues, curentValues){\r\n\t\tvar dataList = [];\r\n\t\tvar displayList = [];\r\n\r\n\t\tfunction processComplexListItem(item){\r\n\t\t\tvar item = {\r\n\t\t\t\tlabel:item.label,\r\n\t\t\t\tvalue:item.value,\r\n\t\t\t\titemParams:item.itemParams,\r\n\t\t\t\telementAttributes: item.elementAttributes,\r\n\t\t\t\telement:false,\r\n\t\t\t};\r\n\r\n\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t// }\r\n\r\n\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\tsetItem(item);\r\n\t\t\t}\r\n\r\n\t\t\tdataList.push(item);\r\n\t\t\tdisplayList.push(item);\r\n\r\n\t\t\treturn item;\r\n\t\t}\r\n\r\n\t\tif(typeof inputValues == \"function\"){\r\n\t\t\tinputValues = inputValues(cell);\r\n\t\t}\r\n\r\n\t\tif(Array.isArray(inputValues)){\r\n\t\t\tinputValues.forEach(function(value){\r\n\t\t\t\tvar item;\r\n\r\n\t\t\t\tif(typeof value === \"object\"){\r\n\r\n\t\t\t\t\tif(value.options){\r\n\t\t\t\t\t\titem = {\r\n\t\t\t\t\t\t\tlabel:value.label,\r\n\t\t\t\t\t\t\tgroup:true,\r\n\t\t\t\t\t\t\titemParams:value.itemParams,\r\n\t\t\t\t\t\t\telementAttributes:value.elementAttributes,\r\n\t\t\t\t\t\t\telement:false,\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\tdisplayList.push(item);\r\n\r\n\t\t\t\t\t\tvalue.options.forEach(function(item){\r\n\t\t\t\t\t\t\tprocessComplexListItem(item);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tprocessComplexListItem(value);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\titem = {\r\n\t\t\t\t\t\tlabel:value,\r\n\t\t\t\t\t\tvalue:value,\r\n\t\t\t\t\t\telement:false,\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t\t\t// }\r\n\r\n\t\t\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\t\t\tsetItem(item);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdataList.push(item);\r\n\t\t\t\t\tdisplayList.push(item);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tfor(var key in inputValues){\r\n\t\t\t\tvar item = {\r\n\t\t\t\t\tlabel:inputValues[key],\r\n\t\t\t\t\tvalue:key,\r\n\t\t\t\t\telement:false,\r\n\t\t\t\t};\r\n\r\n\t\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t\t// }\r\n\r\n\t\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\t\tsetItem(item);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdataList.push(item);\r\n\t\t\t\tdisplayList.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(editorParams.sortValuesList){\r\n\t\t\tdataList.sort((a, b) => {\r\n\t\t\t\treturn a.label < b.label ? -1 : (a.label > b.label ? 1 : 0);\r\n\t\t\t});\r\n\r\n\t\t\tdisplayList.sort((a, b) => {\r\n\t\t\t\treturn a.label < b.label ? -1 : (a.label > b.label ? 1 : 0);\r\n\t\t\t});\r\n\r\n\t\t\tif(editorParams.sortValuesList !== \"asc\"){\r\n\t\t\t\tdataList.reverse();\r\n\t\t\t\tdisplayList.reverse();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataItems = dataList;\r\n\t\tdisplayItems = displayList;\r\n\r\n\t\tfillList();\r\n\t}\r\n\r\n\tfunction fillList(){\r\n\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\r\n\t\tdisplayItems.forEach(function(item){\r\n\r\n\t\t\tvar el = item.element;\r\n\r\n\t\t\tif(!el){\r\n\t\t\t\tel = document.createElement(\"div\");\r\n\t\t\t\titem.label = editorParams.listItemFormatter ? editorParams.listItemFormatter(item.value, item.label, cell, el, item.itemParams) : item.label;\r\n\t\t\t\tif(item.group){\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-select-list-group\");\r\n\t\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\t\tel.innerHTML = item.label === \"\" ? \" \" : item.label;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-select-list-item\");\r\n\t\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\t\tel.innerHTML = item.label === \"\" ? \" \" : item.label;\r\n\r\n\t\t\t\t\tel.addEventListener(\"click\", function(){\r\n\t\t\t\t\t\tblockListShow = true;\r\n\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tblockListShow = false;\r\n\t\t\t\t\t\t}, 10);\r\n\r\n\t\t\t\t\t\t// setCurrentItem(item);\r\n\t\t\t\t\t\t// chooseItem();\r\n\t\t\t\t\t\tif(multiselect){\r\n\t\t\t\t\t\t\ttoggleItem(item);\r\n\t\t\t\t\t\t\tinput.focus();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tchooseItem(item);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t// if(item === currentItem){\r\n\t\t\t\t\t// \tel.classList.add(\"active\");\r\n\t\t\t\t\t// }\r\n\r\n\t\t\t\t\tif(currentItems.indexOf(item) > -1){\r\n\t\t\t\t\t\tel.classList.add(\"active\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(item.elementAttributes && typeof item.elementAttributes == \"object\"){\r\n\t\t\t\t\tfor (let key in item.elementAttributes){\r\n\t\t\t\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\t\t\t\tkey = key.slice(1);\r\n\t\t\t\t\t\t\tel.setAttribute(key, input.getAttribute(key) + item.elementAttributes[\"+\" + key]);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tel.setAttribute(key, item.elementAttributes[key]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tel.addEventListener(\"mousedown\", function(){\r\n\t\t\t\t\tblurable = false;\r\n\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tblurable = true;\r\n\t\t\t\t\t}, 10);\r\n\t\t\t\t});\r\n\r\n\t\t\t\titem.element = el;\r\n\r\n\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(el);\r\n\t\t});\r\n\t}\r\n\r\n\r\n\tfunction setCurrentItem(item, active){\r\n\r\n\t\tif(!multiselect && currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"active\");\r\n\t\t}\r\n\r\n\t\tif(currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"focused\");\r\n\t\t}\r\n\r\n\t\tcurrentItem = item;\r\n\r\n\t\tif(item.element){\r\n\t\t\titem.element.classList.add(\"focused\");\r\n\t\t\tif(active){\r\n\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(item && item.element && item.element.scrollIntoView){\r\n\t\t\titem.element.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'start'});\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t// function chooseItem(){\r\n\t// \thideList();\r\n\r\n\t// \tif(initialValue !== currentItem.value){\r\n\t// \t\tinitialValue = currentItem.value;\r\n\t// \t\tsuccess(currentItem.value);\r\n\t// \t}else{\r\n\t// \t\tcancel();\r\n\t// \t}\r\n\t// }\r\n\r\n\tfunction setItem(item) {\r\n\t\tvar index = currentItems.indexOf(item);\r\n\r\n\t\tif(index == -1){\r\n\t\t\tcurrentItems.push(item);\r\n\t\t\tsetCurrentItem(item, true);\r\n\t\t}\r\n\r\n\t\tfillInput();\r\n\t}\r\n\r\n\tfunction unsetItem(index) {\r\n\t\tvar item = currentItems[index];\r\n\r\n\t\tif(index > -1){\r\n\t\t\tcurrentItems.splice(index, 1);\r\n\t\t\tif(item.element){\r\n\t\t\t\titem.element.classList.remove(\"active\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction toggleItem(item) {\r\n\t\tif(!item){\r\n\t\t\titem = currentItem;\r\n\t\t}\r\n\r\n\t\tvar index = currentItems.indexOf(item);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tunsetItem(index);\r\n\t\t}else{\r\n\t\t\tif(multiselect !== true && currentItems.length >= multiselect){\r\n\t\t\t\tunsetItem(0);\r\n\t\t\t}\r\n\r\n\t\t\tsetItem(item);\r\n\t\t}\r\n\r\n\t\tfillInput();\r\n\r\n\t}\r\n\r\n\tfunction chooseItem(item){\r\n\t\thideList();\r\n\r\n\t\tif(!item){\r\n\t\t\titem = currentItem;\r\n\t\t}\r\n\r\n\t\tif(item){\r\n\t\t\tinput.value = item.label;\r\n\t\t\tsuccess(item.value);\r\n\t\t}\r\n\r\n\t\tinitialDisplayValue = [item.value];\r\n\t}\r\n\r\n\r\n\tfunction chooseItems(silent){\r\n\t\tif(!silent){\r\n\t\t\thideList();\r\n\t\t}\r\n\r\n\t\tvar output = [];\r\n\r\n\t\tcurrentItems.forEach((item) => {\r\n\t\t\toutput.push(item.value);\r\n\t\t});\r\n\r\n\t\tinitialDisplayValue = output;\r\n\r\n\t\tsuccess(output);\r\n\t}\r\n\r\n\tfunction fillInput(){\r\n\t\tvar output = [];\r\n\r\n\t\tcurrentItems.forEach((item) => {\r\n\t\t\toutput.push(item.label);\r\n\t\t});\r\n\r\n\t\tinput.value = output.join(\", \");\r\n\r\n\t\tif(self.currentCell === false){\r\n\t\t\tchooseItems(true);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tfunction unsetItems() {\r\n\r\n\t\tvar len = currentItems.length;\r\n\r\n\t\tfor(let i = 0; i < len; i++){\r\n\t\t\tunsetItem(0);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction cancelItem(){\r\n\t\thideList();\r\n\t\tcancel();\r\n\t}\r\n\r\n\tfunction showList(){\r\n\t\tcurrentItems = [];\r\n\r\n\t\tif(!listEl.parentNode){\r\n\t\t\tif(editorParams.values === true){\r\n\t\t\t\tparseItems(getUniqueColumnValues(), initialDisplayValue);\r\n\t\t\t}else if(typeof editorParams.values === \"string\"){\r\n\t\t\t\tparseItems(getUniqueColumnValues(editorParams.values), initialDisplayValue);\r\n\t\t\t}else{\r\n\t\t\t\tparseItems(editorParams.values || [], initialDisplayValue);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tvar offset = Helpers.elOffset(cellEl);\r\n\r\n\t\t\tlistEl.style.minWidth = cellEl.offsetWidth + \"px\";\r\n\r\n\t\t\tlistEl.style.top = (offset.top + cellEl.offsetHeight) + \"px\";\r\n\t\t\tlistEl.style.left = offset.left + \"px\";\r\n\r\n\r\n\t\t\tlistEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tblurable = false;\r\n\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tblurable = true;\r\n\t\t\t\t}, 10);\r\n\t\t\t});\r\n\r\n\t\t\tdocument.body.appendChild(listEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction hideList(){\r\n\t\tif(listEl.parentNode){\r\n\t\t\tlistEl.parentNode.removeChild(listEl);\r\n\t\t}\r\n\r\n\t\tremoveScrollListener();\r\n\t}\r\n\r\n\tfunction removeScrollListener() {\r\n\t\tself.table.rowManager.element.removeEventListener(\"scroll\", cancelItem);\r\n\t}\r\n\r\n\tfunction scrollTovalue(char){\r\n\r\n\t\tclearTimeout(searchWordTimeout);\r\n\r\n\t\tvar character = String.fromCharCode(event.keyCode).toLowerCase();\r\n\t\tsearchWord += character.toLowerCase();\r\n\r\n\t\tvar match = dataItems.find((item) => {\r\n\t\t\treturn typeof item.label !== \"undefined\" && item.label.toLowerCase().startsWith(searchWord);\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tsetCurrentItem(match, !multiselect);\r\n\t\t}\r\n\r\n\t\tsearchWordTimeout = setTimeout(() => {\r\n\t\t\tsearchWord = \"\";\r\n\t\t}, 800)\r\n\t}\r\n\r\n\t//style input\r\n\tinput.setAttribute(\"type\", \"text\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\tinput.style.cursor = \"default\";\r\n\tinput.readOnly = (this.currentCell != false);\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = typeof initialValue !== \"undefined\" || initialValue === null ? initialValue : \"\";\r\n\r\n\t// if(editorParams.values === true){\r\n\t// \tparseItems(getUniqueColumnValues(), initialValue);\r\n\t// }else if(typeof editorParams.values === \"string\"){\r\n\t// \tparseItems(getUniqueColumnValues(editorParams.values), initialValue);\r\n\t// }else{\r\n\t// \tparseItems(editorParams.values || [], initialValue);\r\n\t// }\r\n\r\n\tinput.addEventListener(\"search\", function(e){\r\n\t\tif(!input.value){\r\n\t\t\tunsetItems();\r\n\t\t\tchooseItems();\r\n\t\t}\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tvar index;\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tindex = dataItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index > 0){\r\n\t\t\t\t\tsetCurrentItem(dataItems[index - 1], !multiselect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 40: //down arrow\r\n\t\t\tindex = dataItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index < dataItems.length - 1)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index < dataItems.length - 1){\r\n\t\t\t\t\tif(index == -1){\r\n\t\t\t\t\t\tsetCurrentItem(dataItems[0], !multiselect);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsetCurrentItem(dataItems[index + 1], !multiselect);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\t// chooseItem();\r\n\r\n\t\t\tif(multiselect){\r\n\t\t\t\ttoggleItem();\r\n\t\t\t}else{\r\n\t\t\t\tchooseItem();\r\n\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancelItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 9: //tab\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tif(self.currentCell === false){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tif(e.keyCode >= 38 && e.keyCode <= 90){\r\n\t\t\t\tscrollTovalue(e.keyCode);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tif(blurable){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tchooseItems();\r\n\t\t\t}else{\r\n\t\t\t\tcancelItem();\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"focus\", function(e){\r\n\t\tif(!blockListShow){\r\n\t\t\tshowList();\r\n\t\t}\r\n\t});\r\n\r\n\t//style list element\r\n\tlistEl = document.createElement(\"div\");\r\n\tlistEl.classList.add(\"tabulator-edit-select-list\");\r\n\r\n\tonRendered(function(){\r\n\t\tinput.style.height = \"100%\";\r\n\t\tinput.focus({preventScroll: true});\r\n\t});\r\n\r\n\tsetTimeout(() => {\r\n\t\tthis.table.rowManager.element.addEventListener(\"scroll\", cancelItem);\r\n\t}, 10);\r\n\r\n\treturn input;\r\n};","import Helpers from '../../../../core/tools/Helpers.js';\r\nimport maskInput from '../../inputMask.js';\r\n\r\n//autocomplete\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\tcellEl = cell.getElement(),\r\n\tinitialValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinitialDisplayValue = typeof initialValue !== \"undefined\" || initialValue === null ? initialValue : (typeof editorParams.defaultValue !== \"undefined\" ? editorParams.defaultValue : \"\"),\r\n\tinput = document.createElement(\"input\"),\r\n\tlistEl = document.createElement(\"div\"),\r\n\tallItems = [],\r\n\tdisplayItems = [],\r\n\tvalues = [],\r\n\tcurrentItem = false,\r\n\tblurable = true,\r\n\tuniqueColumnValues = false;\r\n\r\n\t//style input\r\n\tinput.setAttribute(\"type\", \"search\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//style list element\r\n\tlistEl.classList.add(\"tabulator-edit-select-list\");\r\n\r\n\tlistEl.addEventListener(\"mousedown\", function(e){\r\n\t\tblurable = false;\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tblurable = true;\r\n\t\t}, 10);\r\n\t});\r\n\r\n\r\n\tfunction genUniqueColumnValues(){\r\n\t\tif(editorParams.values === true){\r\n\t\t\tuniqueColumnValues = getUniqueColumnValues();\r\n\t\t}else if(typeof editorParams.values === \"string\"){\r\n\t\t\tuniqueColumnValues = getUniqueColumnValues(editorParams.values);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getUniqueColumnValues(field){\r\n\t\tvar output = {},\r\n\t\tdata = self.table.getData(),\r\n\t\tcolumn;\r\n\r\n\t\tif(field){\r\n\t\t\tcolumn = self.table.columnManager.getColumnByField(field);\r\n\t\t}else{\r\n\t\t\tcolumn = cell.getColumn()._getSelf();\r\n\t\t}\r\n\r\n\t\tif(column){\r\n\t\t\tdata.forEach(function(row){\r\n\t\t\t\tvar val = column.getFieldValue(row);\r\n\r\n\t\t\t\tif(val !== null && typeof val !== \"undefined\" && val !== \"\"){\r\n\t\t\t\t\toutput[val] = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(editorParams.sortValuesList){\r\n\t\t\t\tif(editorParams.sortValuesList == \"asc\"){\r\n\t\t\t\t\toutput = Object.keys(output).sort();\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput = Object.keys(output).sort().reverse();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\toutput = Object.keys(output);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"unable to find matching column to create autocomplete lookup list:\", field);\r\n\t\t}\r\n\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tfunction filterList(term, intialLoad){\r\n\t\tvar matches = [],\r\n\t\tvalues, items, searchEl;\r\n\r\n\t\t//lookup base values list\r\n\t\tif(uniqueColumnValues){\r\n\t\t\tvalues = uniqueColumnValues;\r\n\t\t}else{\r\n\t\t\tvalues = editorParams.values || [];\r\n\t\t}\r\n\r\n\t\tif(editorParams.searchFunc){\r\n\t\t\tmatches = editorParams.searchFunc(term, values);\r\n\r\n\t\t\tif(matches instanceof Promise){\r\n\r\n\t\t\t\taddNotice(typeof editorParams.searchingPlaceholder !== \"undefined\" ? editorParams.searchingPlaceholder : \"Searching...\");\r\n\r\n\t\t\t\tmatches.then((result) => {\r\n\t\t\t\t\tfillListIfNotEmpty(parseItems(result), intialLoad);\r\n\t\t\t\t}).catch((err) => {\r\n\t\t\t\t\tconsole.err(\"error in autocomplete search promise:\", err);\r\n\t\t\t\t});\r\n\r\n\t\t\t}else{\r\n\t\t\t\tfillListIfNotEmpty(parseItems(matches), intialLoad);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\titems = parseItems(values);\r\n\r\n\t\t\tif(term === \"\"){\r\n\t\t\t\tif(editorParams.showListOnEmpty){\r\n\t\t\t\t\tmatches = items;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\titems.forEach(function(item){\r\n\t\t\t\t\tif(item.value !== null || typeof item.value !== \"undefined\"){\r\n\t\t\t\t\t\tif(String(item.value).toLowerCase().indexOf(String(term).toLowerCase()) > -1 || String(item.title).toLowerCase().indexOf(String(term).toLowerCase()) > -1){\r\n\t\t\t\t\t\t\tmatches.push(item);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tfillListIfNotEmpty(matches, intialLoad);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction addNotice(notice){\r\n\t\tvar searchEl = document.createElement(\"div\");\r\n\r\n\t\tclearList();\r\n\r\n\t\tif(notice !== false){\r\n\t\t\tsearchEl.classList.add(\"tabulator-edit-select-list-notice\");\r\n\t\t\tsearchEl.tabIndex = 0;\r\n\r\n\t\t\tif(notice instanceof Node){\r\n\t\t\t\tsearchEl.appendChild(notice);\r\n\t\t\t}else{\r\n\t\t\t\tsearchEl.innerHTML = notice;\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(searchEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction parseItems(inputValues){\r\n\t\tvar itemList = [];\r\n\r\n\t\tif(Array.isArray(inputValues)){\r\n\t\t\tinputValues.forEach(function(value){\r\n\r\n\t\t\t\tvar item = {};\r\n\r\n\t\t\t\tif(typeof value === \"object\"){\r\n\t\t\t\t\titem.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value.value, value.label) : value.label;\r\n\t\t\t\t\titem.value = value.value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\titem.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value;\r\n\t\t\t\t\titem.value = value;\r\n\t\t\t\t}\r\n\r\n\t\t\t\titemList.push(item);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tfor(var key in inputValues){\r\n\t\t\t\tvar item = {\r\n\t\t\t\t\ttitle:editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : inputValues[key],\r\n\t\t\t\t\tvalue:key,\r\n\t\t\t\t};\r\n\r\n\t\t\t\titemList.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn itemList;\r\n\t}\r\n\r\n\tfunction clearList(){\r\n\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\t}\r\n\r\n\tfunction fillListIfNotEmpty(items, intialLoad){\r\n\t\tif(items.length){\r\n\t\t\tfillList(items, intialLoad);\r\n\t\t}else{\r\n\t\t\tif(editorParams.emptyPlaceholder){\r\n\t\t\t\taddNotice(editorParams.emptyPlaceholder);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fillList(items, intialLoad){\r\n\t\tvar current = false;\r\n\r\n\t\tclearList();\r\n\r\n\t\tdisplayItems = items;\r\n\r\n\t\tdisplayItems.forEach(function(item){\r\n\t\t\tvar el = item.element;\r\n\r\n\t\t\tif(!el){\r\n\t\t\t\tel = document.createElement(\"div\");\r\n\t\t\t\tel.classList.add(\"tabulator-edit-select-list-item\");\r\n\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\tel.innerHTML = item.title;\r\n\r\n\t\t\t\tel.addEventListener(\"click\", function(e){\r\n\t\t\t\t\tsetCurrentItem(item);\r\n\t\t\t\t\tchooseItem();\r\n\t\t\t\t});\r\n\r\n\t\t\t\tel.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\t\tblurable = false;\r\n\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tblurable = true;\r\n\t\t\t\t\t}, 10);\r\n\t\t\t\t});\r\n\r\n\t\t\t\titem.element = el;\r\n\r\n\t\t\t\tif(intialLoad && item.value == initialValue){\r\n\t\t\t\t\tinput.value = item.title;\r\n\t\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t\t\tcurrent = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(item === currentItem){\r\n\t\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t\t\tcurrent = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(el);\r\n\t\t});\r\n\r\n\t\tif(!current){\r\n\t\t\tsetCurrentItem(false);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction chooseItem(){\r\n\t\thideList();\r\n\r\n\t\tif(currentItem){\r\n\t\t\tif(initialValue !== currentItem.value){\r\n\t\t\t\tinitialValue = currentItem.value;\r\n\t\t\t\tinput.value = currentItem.title;\r\n\t\t\t\tsuccess(currentItem.value);\r\n\t\t\t}else{\r\n\t\t\t\tcancel();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(editorParams.freetext){\r\n\t\t\t\tinitialValue = input.value;\r\n\t\t\t\tsuccess(input.value);\r\n\t\t\t}else{\r\n\t\t\t\tif(editorParams.allowEmpty && input.value === \"\"){\r\n\t\t\t\t\tinitialValue = input.value;\r\n\t\t\t\t\tsuccess(input.value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcancel();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction showList(){\r\n\t\tif(!listEl.parentNode){\r\n\t\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\r\n\t\t\tvar offset = Helpers.elOffset(cellEl);\r\n\r\n\t\t\tlistEl.style.minWidth = cellEl.offsetWidth + \"px\";\r\n\r\n\t\t\tlistEl.style.top = (offset.top + cellEl.offsetHeight) + \"px\";\r\n\t\t\tlistEl.style.left = offset.left + \"px\";\r\n\t\t\tdocument.body.appendChild(listEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setCurrentItem(item, showInputValue){\r\n\t\tif(currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"active\");\r\n\t\t}\r\n\r\n\t\tcurrentItem = item;\r\n\r\n\t\tif(item && item.element){\r\n\t\t\titem.element.classList.add(\"active\");\r\n\t\t}\r\n\r\n\t\tif(item && item.element && item.element.scrollIntoView){\r\n\t\t\titem.element.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'start'});\r\n\t\t}\r\n\t}\r\n\r\n\tfunction hideList(){\r\n\t\tif(listEl.parentNode){\r\n\t\t\tlistEl.parentNode.removeChild(listEl);\r\n\t\t}\r\n\r\n\t\tremoveScrollListener();\r\n\t}\r\n\r\n\r\n\tfunction cancelItem(){\r\n\t\thideList();\r\n\t\tcancel();\r\n\t}\r\n\r\n\tfunction removeScrollListener() {\r\n\t\tself.table.rowManager.element.removeEventListener(\"scroll\", cancelItem);\r\n\t}\r\n\r\n\t//allow key based navigation\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tvar index;\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tindex = displayItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index > 0){\r\n\t\t\t\t\tsetCurrentItem(displayItems[index - 1]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tsetCurrentItem(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 40: //down arrow\r\n\r\n\t\t\tindex = displayItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index < displayItems.length - 1)){\r\n\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index < displayItems.length - 1){\r\n\t\t\t\t\tif(index == -1){\r\n\t\t\t\t\t\tsetCurrentItem(displayItems[0]);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsetCurrentItem(displayItems[index + 1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\t// e.preventDefault();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\tchooseItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancelItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 36: //home\r\n\t\t\tcase 35: //end\r\n\t\t\t//prevent table navigation while using input element\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"keyup\", function(e){\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //up arrow\r\n\t\t\tcase 40: //right arrow\r\n\t\t\tcase 13: //enter\r\n\t\t\tcase 27: //escape\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tfilterList(input.value);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\tinput.addEventListener(\"search\", function(e){\r\n\t\tfilterList(input.value);\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tif(blurable){\r\n\t\t\tchooseItem();\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"focus\", function(e){\r\n\t\tvar value = initialDisplayValue;\r\n\t\tgenUniqueColumnValues();\r\n\t\tshowList();\r\n\t\tinput.value = value;\r\n\t\tfilterList(value, true);\r\n\t});\r\n\r\n\r\n\tonRendered(function(){\r\n\t\tinput.style.height = \"100%\";\r\n\t\tinput.focus({preventScroll: true});\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\tsetTimeout(() => {\r\n\t\tthis.table.rowManager.element.addEventListener(\"scroll\", cancelItem);\r\n\t}, 10);\r\n\r\n\tgenUniqueColumnValues();\r\n\tinput.value = initialDisplayValue;\r\n\tfilterList(initialDisplayValue, true);\r\n\r\n\treturn input;\r\n};","//star rating\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\telement = cell.getElement(),\r\n\tvalue = cell.getValue(),\r\n\tmaxStars = element.getElementsByTagName(\"svg\").length || 5,\r\n\tsize = element.getElementsByTagName(\"svg\")[0] ? element.getElementsByTagName(\"svg\")[0].getAttribute(\"width\") : 14,\r\n\tstars = [],\r\n\tstarsHolder = document.createElement(\"div\"),\r\n\tstar = document.createElementNS('http://www.w3.org/2000/svg', \"svg\");\r\n\r\n\r\n\t//change star type\r\n\tfunction starChange(val){\r\n\t\tstars.forEach(function(star, i){\r\n\t\t\tif(i < val){\r\n\t\t\t\tif(self.table.browser == \"ie\"){\r\n\t\t\t\t\tstar.setAttribute(\"class\", \"tabulator-star-active\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tstar.classList.replace(\"tabulator-star-inactive\", \"tabulator-star-active\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstar.innerHTML = '';\r\n\t\t\t}else{\r\n\t\t\t\tif(self.table.browser == \"ie\"){\r\n\t\t\t\t\tstar.setAttribute(\"class\", \"tabulator-star-inactive\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tstar.classList.replace(\"tabulator-star-active\", \"tabulator-star-inactive\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstar.innerHTML = '';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//build stars\r\n\tfunction buildStar(i){\r\n\r\n\t\tvar starHolder = document.createElement(\"span\");\r\n\t\tvar nextStar = star.cloneNode(true);\r\n\r\n\t\tstars.push(nextStar);\r\n\r\n\t\tstarHolder.addEventListener(\"mouseenter\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tstarChange(i);\r\n\t\t});\r\n\r\n\t\tstarHolder.addEventListener(\"mousemove\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t});\r\n\r\n\t\tstarHolder.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tsuccess(i);\r\n\t\t\telement.blur();\r\n\t\t});\r\n\r\n\t\tstarHolder.appendChild(nextStar);\r\n\t\tstarsHolder.appendChild(starHolder);\r\n\r\n\t}\r\n\r\n\t//handle keyboard navigation value change\r\n\tfunction changeValue(val){\r\n\t\tvalue = val;\r\n\t\tstarChange(val);\r\n\t}\r\n\r\n\t//style cell\r\n\telement.style.whiteSpace = \"nowrap\";\r\n\telement.style.overflow = \"hidden\";\r\n\telement.style.textOverflow = \"ellipsis\";\r\n\r\n\t//style holding element\r\n\tstarsHolder.style.verticalAlign = \"middle\";\r\n\tstarsHolder.style.display = \"inline-block\";\r\n\tstarsHolder.style.padding = \"4px\";\r\n\r\n\t//style star\r\n\tstar.setAttribute(\"width\", size);\r\n\tstar.setAttribute(\"height\", size);\r\n\tstar.setAttribute(\"viewBox\", \"0 0 512 512\");\r\n\tstar.setAttribute(\"xml:space\", \"preserve\");\r\n\tstar.style.padding = \"0 1px\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tstarsHolder.setAttribute(key, starsHolder.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tstarsHolder.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//create correct number of stars\r\n\tfor(var i=1;i<= maxStars;i++){\r\n\t\tbuildStar(i);\r\n\t}\r\n\r\n\t//ensure value does not exceed number of stars\r\n\tvalue = Math.min(parseInt(value), maxStars);\r\n\r\n\t// set initial styling of stars\r\n\tstarChange(value);\r\n\r\n\tstarsHolder.addEventListener(\"mousemove\", function(e){\r\n\t\tstarChange(0);\r\n\t});\r\n\r\n\tstarsHolder.addEventListener(\"click\", function(e){\r\n\t\tsuccess(0);\r\n\t});\r\n\r\n\telement.addEventListener(\"blur\", function(e){\r\n\t\tcancel();\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\telement.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 39: //right arrow\r\n\t\t\tchangeValue(value + 1);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tchangeValue(value - 1);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\tsuccess(value);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\treturn starsHolder;\r\n};","//draggable progress bar\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar element = cell.getElement(),\r\n\tmax = typeof editorParams.max === \"undefined\" ? ((element.getElementsByTagName(\"div\")[0] && element.getElementsByTagName(\"div\")[0].getAttribute(\"max\")) || 100) : editorParams.max,\r\n\tmin = typeof editorParams.min === \"undefined\" ? ((element.getElementsByTagName(\"div\")[0] && element.getElementsByTagName(\"div\")[0].getAttribute(\"min\")) || 0) : editorParams.min,\r\n\tpercent = (max - min) / 100,\r\n\tvalue = cell.getValue() || 0,\r\n\thandle = document.createElement(\"div\"),\r\n\tbar = document.createElement(\"div\"),\r\n\tmouseDrag, mouseDragWidth;\r\n\r\n\t//set new value\r\n\tfunction updateValue(){\r\n\t\tvar style = window.getComputedStyle(element, null);\r\n\r\n\t\tvar calcVal = (percent * Math.round(bar.offsetWidth / ((element.clientWidth - parseInt(style.getPropertyValue(\"padding-left\")) - parseInt(style.getPropertyValue(\"padding-right\")))/100))) + min;\r\n\t\tsuccess(calcVal);\r\n\t\telement.setAttribute(\"aria-valuenow\", calcVal);\r\n\t\telement.setAttribute(\"aria-label\", value);\r\n\t}\r\n\r\n\t//style handle\r\n\thandle.style.position = \"absolute\";\r\n\thandle.style.right = \"0\";\r\n\thandle.style.top = \"0\";\r\n\thandle.style.bottom = \"0\";\r\n\thandle.style.width = \"5px\";\r\n\thandle.classList.add(\"tabulator-progress-handle\");\r\n\r\n\t//style bar\r\n\tbar.style.display = \"inline-block\";\r\n\tbar.style.position = \"relative\";\r\n\t// bar.style.top = \"8px\";\r\n\t// bar.style.bottom = \"8px\";\r\n\t// bar.style.left = \"4px\";\r\n\t// bar.style.marginRight = \"4px\";\r\n\tbar.style.height = \"100%\";\r\n\tbar.style.backgroundColor = \"#488CE9\";\r\n\tbar.style.maxWidth = \"100%\";\r\n\tbar.style.minWidth = \"0%\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tbar.setAttribute(key, bar.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tbar.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//style cell\r\n\telement.style.padding = \"4px 4px\";\r\n\r\n\t//make sure value is in range\r\n\tvalue = Math.min(parseFloat(value), max);\r\n\tvalue = Math.max(parseFloat(value), min);\r\n\r\n\t//workout percentage\r\n\tvalue = Math.round((value - min) / percent);\r\n\t// bar.style.right = value + \"%\";\r\n\tbar.style.width = value + \"%\";\r\n\r\n\telement.setAttribute(\"aria-valuemin\", min);\r\n\telement.setAttribute(\"aria-valuemax\", max);\r\n\r\n\tbar.appendChild(handle);\r\n\r\n\thandle.addEventListener(\"mousedown\", function(e){\r\n\t\tmouseDrag = e.screenX;\r\n\t\tmouseDragWidth = bar.offsetWidth;\r\n\t});\r\n\r\n\thandle.addEventListener(\"mouseover\", function(){\r\n\t\thandle.style.cursor = \"ew-resize\";\r\n\t});\r\n\r\n\telement.addEventListener(\"mousemove\", function(e){\r\n\t\tif(mouseDrag){\r\n\t\t\tbar.style.width = (mouseDragWidth + e.screenX - mouseDrag) + \"px\";\r\n\t\t}\r\n\t});\r\n\r\n\telement.addEventListener(\"mouseup\", function(e){\r\n\t\tif(mouseDrag){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\r\n\t\t\tmouseDrag = false;\r\n\t\t\tmouseDragWidth = false;\r\n\r\n\t\t\tupdateValue();\r\n\t\t}\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\telement.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.preventDefault();\r\n\t\t\tbar.style.width = (bar.clientWidth + element.clientWidth/100) + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\te.preventDefault();\r\n\t\t\tbar.style.width = (bar.clientWidth - element.clientWidth/100) + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 9: //tab\r\n\t\t\tcase 13: //enter\r\n\t\t\tupdateValue();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t}\r\n\t});\r\n\r\n\telement.addEventListener(\"blur\", function(){\r\n\t\tcancel();\r\n\t});\r\n\r\n\treturn bar;\r\n};","//checkbox\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar value = cell.getValue(),\r\n\tinput = document.createElement(\"input\"),\r\n\ttristate = editorParams.tristate,\r\n\tindetermValue = typeof editorParams.indeterminateValue === \"undefined\" ? null : editorParams.indeterminateValue,\r\n\tindetermState = false;\r\n\r\n\tinput.setAttribute(\"type\", \"checkbox\");\r\n\tinput.style.marginTop = \"5px\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = value;\r\n\r\n\tif(tristate && (typeof value === \"undefined\" || value === indetermValue || value === \"\")){\r\n\t\tindetermState = true;\r\n\t\tinput.indeterminate = true;\r\n\t}\r\n\r\n\tif(this.table.browser != \"firefox\"){ //prevent blur issue on mac firefox\r\n\t\tonRendered(function(){\r\n\t\t\tinput.focus({preventScroll: true});\r\n\t\t});\r\n\t}\r\n\r\n\tinput.checked = value === true || value === \"true\" || value === \"True\" || value === 1;\r\n\r\n\tonRendered(function(){\r\n\t\tinput.focus();\r\n\t});\r\n\r\n\tfunction setValue(blur){\r\n\t\tif(tristate){\r\n\t\t\tif(!blur){\r\n\t\t\t\tif(input.checked && !indetermState){\r\n\t\t\t\t\tinput.checked = false;\r\n\t\t\t\t\tinput.indeterminate = true;\r\n\t\t\t\t\tindetermState = true;\r\n\t\t\t\t\treturn indetermValue;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tindetermState = false;\r\n\t\t\t\t\treturn input.checked;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(indetermState){\r\n\t\t\t\t\treturn indetermValue;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn input.checked;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn input.checked;\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur\r\n\tinput.addEventListener(\"change\", function(e){\r\n\t\tsuccess(setValue());\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tsuccess(setValue(true));\r\n\t});\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tif(e.keyCode == 13){\r\n\t\t\tsuccess(setValue());\r\n\t\t}\r\n\t\tif(e.keyCode == 27){\r\n\t\t\tcancel();\r\n\t\t}\r\n\t});\r\n\r\n\treturn input;\r\n};","import input from './editors/input.js';\r\nimport textarea from './editors/textarea.js';\r\nimport number from './editors/number.js';\r\nimport range from './editors/range.js';\r\nimport select from './editors/select.js';\r\nimport autocomplete from './editors/autocomplete.js';\r\nimport star from './editors/star.js';\r\nimport progress from './editors/progress.js';\r\nimport tickCross from './editors/tickCross.js';\r\n\r\nexport default {\r\n\tinput:input,\r\n\ttextarea:textarea,\r\n number:number,\r\n range:range,\r\n\tselect:select,\r\n\tautocomplete:autocomplete,\r\n\tstar:star,\r\n\tprogress:progress,\r\n\ttickCross:tickCross,\r\n};","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defaultEditors from './defaults/editors.js';\r\n\r\nclass Edit extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.currentCell = false; //hold currently editing cell\r\n\t\tthis.mouseClick = false; //hold mousedown state to prevent click binding being overriden by editor opening\r\n\t\tthis.recursionBlock = false; //prevent focus recursion\r\n\t\tthis.invalidEdit = false;\r\n\t\tthis.editedCells = [];\r\n\r\n\t\tthis.editors = Edit.editors;\r\n\r\n\t\tthis.registerColumnOption(\"editable\");\r\n\t\tthis.registerColumnOption(\"editor\");\r\n\t\tthis.registerColumnOption(\"editorParams\");\r\n\r\n\t\tthis.registerColumnOption(\"cellEditing\");\r\n\t\tthis.registerColumnOption(\"cellEdited\");\r\n\t\tthis.registerColumnOption(\"cellEditCancelled\");\r\n\r\n\t\tthis.registerTableFunction(\"getEditedCells\", this.getEditedCells.bind(this));\r\n\t\tthis.registerTableFunction(\"clearCellEdited\", this.clearCellEdited.bind(this));\r\n\t\tthis.registerTableFunction(\"navigatePrev\", this.navigatePrev.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateNext\", this.navigateNext.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateLeft\", this.navigateLeft.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateRight\", this.navigateRight.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateUp\", this.navigateUp.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateDown\", this.navigateDown.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"isEdited\", this.cellisEdited.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"clearEdited\", this.clearEdited.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"edit\", this.editCell.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"cancelEdit\", this.cellCancelEdit.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigatePrev\", this.navigatePrev.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateNext\", this.navigateNext.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateLeft\", this.navigateLeft.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateRight\", this.navigateRight.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateUp\", this.navigateUp.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateDown\", this.navigateDown.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-init\", this.bindEditor.bind(this));\r\n\t\tthis.subscribe(\"cell-delete\", this.clearEdited.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumnCheck.bind(this));\r\n\t\tthis.subscribe(\"column-delete\", this.columnDeleteCheck.bind(this));\r\n\t\tthis.subscribe(\"row-deleting\", this.rowDeleteCheck.bind(this));\r\n\t\tthis.subscribe(\"data-refreshing\", this.cancelEdit.bind(this));\r\n\r\n\t\tthis.subscribe(\"keybinding-nav-prev\", this.navigatePrev.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-next\", this.keybindingNavigateNext.bind(this));\r\n\t\tthis.subscribe(\"keybinding-nav-left\", this.navigateLeft.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-right\", this.navigateRight.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-up\", this.navigateUp.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-down\", this.navigateDown.bind(this, undefined));\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t////// Keybinding Functions ///////\r\n\t///////////////////////////////////\r\n\r\n\tkeybindingNavigateNext(e){\r\n\t\tvar cell = this.currentCell,\r\n\t\tnewRow = this.options(\"tabEndNewRow\");\r\n\r\n\t\tif(cell){\r\n\t\t\tif(!this.navigateNext(cell, e)){\r\n\t\t\t\tif(newRow){\r\n\t\t\t\t\tcell.getElement().firstChild.blur();\r\n\r\n\t\t\t\t\tif(newRow === true){\r\n\t\t\t\t\t\tnewRow = this.table.addRow({})\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(typeof newRow == \"function\"){\r\n\t\t\t\t\t\t\tnewRow = this.table.addRow(newRow(cell.row.getComponent()))\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnewRow = this.table.addRow(Object.assign({}, newRow));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tnewRow.then(() => {\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tcell.getComponent().navigateNext();\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Cell Functions //////////\r\n\t///////////////////////////////////\r\n\r\n\tcellisEdited(cell){\r\n\t\treturn !! cell.modules.edit && cell.modules.edit.edited;\r\n\t}\r\n\r\n\tcellCancelEdit(cell){\r\n\t\tif(cell === this.currentCell){\r\n\t\t\tthis.table.modules.edit.cancelEdit();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cancel Editor Error - This cell is not currently being edited \");\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\tclearCellEdited(cells){\r\n\t\tif(!cells){\r\n\t\t\tcells = this.table.modules.edit.getEditedCells();\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\r\n\t\tcells.forEach((cell) => {\r\n\t\t\tthis.table.modules.edit.clearEdited(cell._getSelf());\r\n\t\t});\r\n\t}\r\n\r\n\tnavigatePrev(cell = this.currentCell, e){\r\n\t\tvar nextCell, prevRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tnextCell = this.navigateLeft();\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tprevRow = this.table.rowManager.prevDisplayRow(cell.row, true);\r\n\r\n\t\t\t\tif(prevRow){\r\n\t\t\t\t\tnextCell = this.findNextEditableCell(prevRow, prevRow.cells.length);\r\n\r\n\t\t\t\t\tif(nextCell){\r\n\t\t\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateNext(cell = this.currentCell, e){\r\n\t\tvar nextCell, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tnextCell = this.navigateRight();\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\r\n\r\n\t\t\t\tif(nextRow){\r\n\t\t\t\t\tnextCell = this.findNextEditableCell(nextRow, -1);\r\n\r\n\t\t\t\t\tif(nextCell){\r\n\t\t\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateLeft(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findPrevEditableCell(cell.row, index);\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateRight(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findNextEditableCell(cell.row, index);\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateUp(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.prevDisplayRow(cell.row, true);\r\n\r\n\t\t\tif(nextRow){\r\n\t\t\t\tnextRow.cells[index].getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateDown(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\r\n\r\n\t\t\tif(nextRow){\r\n\t\t\t\tnextRow.cells[index].getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfindNextEditableCell(row, index){\r\n\t\tvar nextCell = false;\r\n\r\n\t\tif(index < row.cells.length-1){\r\n\t\t\tfor(var i = index+1; i < row.cells.length; i++){\r\n\t\t\t\tlet cell = row.cells[i];\r\n\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tlet allowEdit = true;\r\n\r\n\t\t\t\t\tif(typeof cell.column.modules.edit.check == \"function\"){\r\n\t\t\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(allowEdit){\r\n\t\t\t\t\t\tnextCell = cell;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn nextCell;\r\n\t}\r\n\r\n\tfindPrevEditableCell(row, index){\r\n\t\tvar prevCell = false;\r\n\r\n\t\tif(index > 0){\r\n\t\t\tfor(var i = index-1; i >= 0; i--){\r\n\t\t\t\tlet cell = row.cells[i],\r\n\t\t\t\tallowEdit = true;\r\n\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tif(typeof cell.column.modules.edit.check == \"function\"){\r\n\t\t\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(allowEdit){\r\n\t\t\t\t\t\tprevCell = cell;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn prevCell;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(typeof column.definition.editor !== \"undefined\"){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\tcolumnDeleteCheck(column){\r\n\t\tif(this.currentCell && this.currentCell.column === column){\r\n\t\t\tthis.cancelEdit();\r\n\t\t}\r\n\t}\r\n\r\n\trowDeleteCheck(row){\r\n\t\tif(this.currentCell && this.currentCell.row === row){\r\n\t\t\tthis.cancelEdit();\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column editor\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = {\r\n\t\t\teditor:false,\r\n\t\t\tblocked:false,\r\n\t\t\tcheck:column.definition.editable,\r\n\t\t\tparams:column.definition.editorParams || {}\r\n\t\t};\r\n\r\n\t\t//set column editor\r\n\t\tswitch(typeof column.definition.editor){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(this.editors[column.definition.editor]){\r\n\t\t\t\tconfig.editor = this.editors[column.definition.editor];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Editor Error - No such editor found: \", column.definition.editor);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tconfig.editor = column.definition.editor;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"boolean\":\r\n\t\t\tif(column.definition.editor === true){\r\n\t\t\t\tif(typeof column.definition.formatter !== \"function\"){\r\n\t\t\t\t\tif(this.editors[column.definition.formatter]){\r\n\t\t\t\t\t\tconfig.editor = this.editors[column.definition.formatter];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconfig.editor = this.editors[\"input\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Editor Error - Cannot auto lookup editor for a custom formatter: \", column.definition.formatter);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(config.editor){\r\n\t\t\tcolumn.modules.edit = config;\r\n\t\t}\r\n\t}\r\n\r\n\tgetCurrentCell(){\r\n\t\treturn this.currentCell ? this.currentCell.getComponent() : false;\r\n\t}\r\n\r\n\tclearEditor(cancel){\r\n\t\tvar cell = this.currentCell,\r\n\t\tcellEl;\r\n\r\n\t\tthis.invalidEdit = false;\r\n\r\n\t\tif(cell){\r\n\t\t\tthis.currentCell = false;\r\n\r\n\t\t\tcellEl = cell.getElement();\r\n\r\n\t\t\tif(cancel){\r\n\t\t\t\tif(cell.column.modules.validate && this.table.modExists(\"validate\")){\r\n\t\t\t\t\tthis.table.modules.validate.cellValidate(cell);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcellEl.classList.remove(\"tabulator-validation-fail\");\r\n\t\t\t}\r\n\r\n\t\t\tcellEl.classList.remove(\"tabulator-editing\");\r\n\r\n\t\t\twhile(cellEl.firstChild) cellEl.removeChild(cellEl.firstChild);\r\n\r\n\t\t\tcell.row.getElement().classList.remove(\"tabulator-row-editing\");\r\n\t\t}\r\n\t}\r\n\r\n\tcancelEdit(){\r\n\t\tif(this.currentCell){\r\n\t\t\tvar cell = this.currentCell;\r\n\t\t\tvar component = this.currentCell.getComponent();\r\n\r\n\t\t\tthis.clearEditor(true);\r\n\t\t\tcell.setValueActual(cell.getValue());\r\n\t\t\tcell.cellRendered();\r\n\r\n\t\t\tif(cell.column.definition.editor == \"textarea\" || cell.column.definition.variableHeight){\r\n\t\t\t\tcell.row.normalizeHeight(true);\r\n\t\t\t}\r\n\r\n\t\t\tif(cell.column.definition.cellEditCancelled){\r\n\t\t\t\tcell.column.definition.cellEditCancelled.call(this.table, component);\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"edit-cancelled\", cell);\r\n\t\t\tthis.dispatchExternal(\"cellEditCancelled\", component);\r\n\t\t}\r\n\t}\r\n\r\n\t//return a formatted value for a cell\r\n\tbindEditor(cell){\r\n\t\tif(cell.column.modules.edit){\r\n\t\t\tvar self = this,\r\n\t\t\telement = cell.getElement(true);\r\n\r\n\t\t\telement.setAttribute(\"tabindex\", 0);\r\n\r\n\t\t\telement.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(!element.classList.contains(\"tabulator-editing\")){\r\n\t\t\t\t\telement.focus({preventScroll: true});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\telement.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif (e.button === 2) {\r\n\t\t\t\t\te.preventDefault();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.mouseClick = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\telement.addEventListener(\"focus\", function(e){\r\n\t\t\t\tif(!self.recursionBlock){\r\n\t\t\t\t\tself.edit(cell, e, false);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tfocusCellNoEvent(cell, block){\r\n\t\tthis.recursionBlock = true;\r\n\r\n\t\tif(!(block && this.table.browser === \"ie\")){\r\n\t\t\tcell.getElement().focus({preventScroll: true});\r\n\t\t}\r\n\r\n\t\tthis.recursionBlock = false;\r\n\t}\r\n\r\n\teditCell(cell, forceEdit){\r\n\t\tthis.focusCellNoEvent(cell);\r\n\t\tthis.edit(cell, false, forceEdit);\r\n\t}\r\n\r\n\tfocusScrollAdjust(cell){\r\n\t\tif(this.table.rowManager.getRenderMode() == \"virtual\"){\r\n\t\t\tvar topEdge = this.table.rowManager.element.scrollTop,\r\n\t\t\tbottomEdge = this.table.rowManager.element.clientHeight + this.table.rowManager.element.scrollTop,\r\n\t\t\trowEl = cell.row.getElement(),\r\n\t\t\toffset = rowEl.offsetTop;\r\n\r\n\t\t\tif(rowEl.offsetTop < topEdge){\r\n\t\t\t\tthis.table.rowManager.element.scrollTop -= (topEdge - rowEl.offsetTop);\r\n\t\t\t}else{\r\n\t\t\t\tif(rowEl.offsetTop + rowEl.offsetHeight > bottomEdge){\r\n\t\t\t\t\tthis.table.rowManager.element.scrollTop += (rowEl.offsetTop + rowEl.offsetHeight - bottomEdge);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar leftEdge = this.table.rowManager.element.scrollLeft,\r\n\t\t\trightEdge = this.table.rowManager.element.clientWidth + this.table.rowManager.element.scrollLeft,\r\n\t\t\tcellEl = cell.getElement(),\r\n\t\t\toffset = cellEl.offsetLeft;\r\n\r\n\t\t\tif(this.table.modExists(\"frozenColumns\")){\r\n\t\t\t\tleftEdge += parseInt(this.table.modules.frozenColumns.leftMargin);\r\n\t\t\t\trightEdge -= parseInt(this.table.modules.frozenColumns.rightMargin);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.renderHorizontal === \"virtual\"){\r\n\t\t\t\tleftEdge -= parseInt(this.table.columnManager.renderer.vDomPadLeft);\r\n\t\t\t\trightEdge -= parseInt(this.table.columnManager.renderer.vDomPadLeft);\r\n\t\t\t}\r\n\r\n\t\t\tif(cellEl.offsetLeft < leftEdge){\r\n\r\n\t\t\t\tthis.table.rowManager.element.scrollLeft -= (leftEdge - cellEl.offsetLeft);\r\n\t\t\t}else{\r\n\t\t\t\tif(cellEl.offsetLeft + cellEl.offsetWidth > rightEdge){\r\n\t\t\t\t\tthis.table.rowManager.element.scrollLeft += (cellEl.offsetLeft + cellEl.offsetWidth - rightEdge);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tedit(cell, e, forceEdit){\r\n\t\tvar self = this,\r\n\t\tallowEdit = true,\r\n\t\trendered = function(){},\r\n\t\telement = cell.getElement(),\r\n\t\tcellEditor, component, params;\r\n\r\n\t\t//prevent editing if another cell is refusing to leave focus (eg. validation fail)\r\n\t\tif(this.currentCell){\r\n\t\t\tif(!this.invalidEdit){\r\n\t\t\t\tthis.cancelEdit();\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//handle successfull value change\r\n\t\tfunction success(value){\r\n\t\t\tif(self.currentCell === cell){\r\n\t\t\t\tvar valid = true;\r\n\r\n\t\t\t\tif(cell.column.modules.validate && self.table.modExists(\"validate\") && self.table.options.validationMode != \"manual\"){\r\n\t\t\t\t\tvalid = self.table.modules.validate.validate(cell.column.modules.validate, cell, value);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(valid === true || self.table.options.validationMode === \"highlight\"){\r\n\t\t\t\t\tself.clearEditor();\r\n\r\n\r\n\t\t\t\t\tif(!cell.modules.edit){\r\n\t\t\t\t\t\tcell.modules.edit = {};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcell.modules.edit.edited = true;\r\n\r\n\t\t\t\t\tif(self.editedCells.indexOf(cell) == -1){\r\n\t\t\t\t\t\tself.editedCells.push(cell);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcell.setValue(value, true);\r\n\r\n\t\t\t\t\tif(valid !== true){\r\n\t\t\t\t\t\telement.classList.add(\"tabulator-validation-fail\");\r\n\t\t\t\t\t\tself.table.externalEvents.dispatch(\"validationFailed\", cell.getComponent(), value, valid);\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.invalidEdit = true;\r\n\t\t\t\t\telement.classList.add(\"tabulator-validation-fail\");\r\n\t\t\t\t\tself.focusCellNoEvent(cell, true);\r\n\t\t\t\t\trendered();\r\n\t\t\t\t\tself.table.externalEvents.dispatch(\"validationFailed\", cell.getComponent(), value, valid);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t// console.warn(\"Edit Success Error - cannot call success on a cell that is no longer being edited\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//handle aborted edit\r\n\t\tfunction cancel(){\r\n\t\t\tif(self.currentCell === cell){\r\n\t\t\t\tself.cancelEdit();\r\n\t\t\t}else{\r\n\t\t\t\t// console.warn(\"Edit Success Error - cannot call cancel on a cell that is no longer being edited\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\trendered = callback;\r\n\t\t}\r\n\r\n\t\tif(!cell.column.modules.edit.blocked){\r\n\t\t\tif(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t}\r\n\r\n\t\t\tswitch(typeof cell.column.modules.edit.check){\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tallowEdit = cell.column.modules.edit.check;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(allowEdit || forceEdit){\r\n\r\n\t\t\t\tself.cancelEdit();\r\n\r\n\t\t\t\tself.currentCell = cell;\r\n\r\n\t\t\t\tthis.focusScrollAdjust(cell);\r\n\r\n\t\t\t\tcomponent = cell.getComponent();\r\n\r\n\t\t\t\tif(this.mouseClick){\r\n\t\t\t\t\tthis.mouseClick = false;\r\n\r\n\t\t\t\t\tif(cell.column.definition.cellClick){\r\n\t\t\t\t\t\tcell.column.definition.cellClick.call(this.table, e, component);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(cell.column.definition.cellEditing){\r\n\t\t\t\t\tcell.column.definition.cellEditing.call(this.table, component);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.dispatch(\"cell-editing\", cell);\r\n\t\t\t\tthis.dispatchExternal(\"cellEditing\", component);\r\n\r\n\t\t\t\tparams = typeof cell.column.modules.edit.params === \"function\" ? cell.column.modules.edit.params(component) : cell.column.modules.edit.params;\r\n\r\n\t\t\t\tcellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params);\r\n\r\n\t\t\t\t//if editor returned, add to DOM, if false, abort edit\r\n\t\t\t\tif(cellEditor !== false){\r\n\r\n\t\t\t\t\tif(cellEditor instanceof Node){\r\n\t\t\t\t\t\telement.classList.add(\"tabulator-editing\");\r\n\t\t\t\t\t\tcell.row.getElement().classList.add(\"tabulator-row-editing\");\r\n\t\t\t\t\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\t\t\t\t\t\telement.appendChild(cellEditor);\r\n\r\n\t\t\t\t\t\t//trigger onRendered Callback\r\n\t\t\t\t\t\trendered();\r\n\r\n\t\t\t\t\t\t//prevent editing from triggering rowClick event\r\n\t\t\t\t\t\tvar children = element.children;\r\n\r\n\t\t\t\t\t\tfor (var i = 0; i < children.length; i++) {\r\n\t\t\t\t\t\t\tchildren[i].addEventListener(\"click\", function(e){\r\n\t\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Edit Error - Editor should return an instance of Node, the editor returned:\", cellEditor);\r\n\t\t\t\t\t\telement.blur();\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.blur();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tthis.mouseClick = false;\r\n\t\t\t\telement.blur();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.mouseClick = false;\r\n\t\t\telement.blur();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tgetEditedCells(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.editedCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tclearEdited(cell){\r\n\t\tvar editIndex;\r\n\r\n\t\tif(cell.modules.edit && cell.modules.edit.edited){\r\n\t\t\tcell.modules.edit.edited = false;\r\n\r\n\t\t\tif(cell.modules.validate){\r\n\t\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\teditIndex = this.editedCells.indexOf(cell);\r\n\r\n\t\tif(editIndex > -1){\r\n\t\t\tthis.editedCells.splice(editIndex, 1);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nEdit.moduleName = \"edit\";\r\n\r\n//load defaults\r\nEdit.editors = defaultEditors;\r\n\r\n\r\nexport default Edit;\r\n","class ExportRow{\r\n\tconstructor(type, columns, component, indent){\r\n\t\tthis.type = type;\r\n\t\tthis.columns = columns;\r\n\t\tthis.component = component || false;\r\n\t\tthis.indent = indent || 0;\r\n\t}\r\n}\r\n\r\nexport default ExportRow;","class ExportColumn{\r\n\tconstructor(value, component, width, height, depth){\r\n\t\tthis.value = value;\r\n\t\tthis.component = component || false;\r\n\t\tthis.width = width;\r\n\t\tthis.height = height;\r\n\t\tthis.depth = depth;\r\n\t}\r\n}\r\n\r\nexport default ExportColumn;","import Module from '../../core/Module.js';\r\n\r\nimport ExportRow from './ExportRow.js';\r\nimport ExportColumn from './ExportColumn.js';\r\n\r\nclass Export extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.config = {};\r\n\t\tthis.cloneTableStyle = true;\r\n\t\tthis.colVisProp = \"\";\r\n\r\n\t\tthis.registerTableOption(\"htmlOutputConfig\", false); //html outypu config\r\n\r\n\t\tthis.registerColumnOption(\"htmlOutput\");\r\n\t\tthis.registerColumnOption(\"titleHtmlOutput\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"getHtml\", this.getHtml.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tgenerateExportList(config, style, range, colVisProp){\r\n\t\tthis.cloneTableStyle = style;\r\n\t\tthis.config = config || {};\r\n\t\tthis.colVisProp = colVisProp;\r\n\r\n\t\tvar headers = this.config.columnHeaders !== false ? this.headersToExportRows(this.generateColumnGroupHeaders()) : [];\r\n\t\tvar body = this.bodyToExportRows(this.rowLookup(range));\r\n\r\n\t\treturn headers.concat(body);\r\n\t}\r\n\r\n\tgenereateTable(config, style, range, colVisProp){\r\n\t\tvar list = this.generateExportList(config, style, range, colVisProp);\r\n\r\n\t\treturn this.genereateTableElement(list);\r\n\t}\r\n\r\n\trowLookup(range){\r\n\t\tvar rows = [];\r\n\r\n\t\tif(typeof range == \"function\"){\r\n\t\t\trange.call(this.table).forEach((row) =>{\r\n\t\t\t\trow = this.table.rowManager.findRow(row);\r\n\r\n\t\t\t\tif(row){\r\n\t\t\t\t\trows.push(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tswitch(range){\r\n\t\t\t\tcase true:\r\n\t\t\t\tcase \"visible\":\r\n\t\t\t\trows = this.table.rowManager.getVisibleRows(false, true);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"all\":\r\n\t\t\t\trows = this.table.rowManager.rows;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"selected\":\r\n\t\t\t\trows = this.table.modules.selectRow.selectedRows;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"active\":\r\n\t\t\t\tdefault:\r\n\t\t\t\tif(this.table.options.pagination){\r\n\t\t\t\t\trows = this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length - 2);\r\n\t\t\t\t}else{\r\n\t\t\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn Object.assign([], rows);\r\n\t}\r\n\r\n\tgenerateColumnGroupHeaders(){\r\n\t\tvar output = [];\r\n\r\n\t\tvar columns = this.config.columnGroups !== false ? this.table.columnManager.columns : this.table.columnManager.columnsByIndex;\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\tvar colData = this.processColumnGroup(column);\r\n\r\n\t\t\tif(colData){\r\n\t\t\t\toutput.push(colData);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tprocessColumnGroup(column){\r\n\t\tvar subGroups = column.columns,\r\n\t\tmaxDepth = 0,\r\n\t\ttitle = column.definition[\"title\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))] || column.definition.title;\r\n\r\n\t\tvar groupData = {\r\n\t\t\ttitle:title,\r\n\t\t\tcolumn:column,\r\n\t\t\tdepth:1,\r\n\t\t};\r\n\r\n\t\tif(subGroups.length){\r\n\t\t\tgroupData.subGroups = [];\r\n\t\t\tgroupData.width = 0;\r\n\r\n\t\t\tsubGroups.forEach((subGroup) => {\r\n\t\t\t\tvar subGroupData = this.processColumnGroup(subGroup);\r\n\r\n\t\t\t\tif(subGroupData){\r\n\t\t\t\t\tgroupData.width += subGroupData.width;\r\n\t\t\t\t\tgroupData.subGroups.push(subGroupData);\r\n\r\n\t\t\t\t\tif(subGroupData.depth > maxDepth){\r\n\t\t\t\t\t\tmaxDepth = subGroupData.depth;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tgroupData.depth += maxDepth;\r\n\r\n\t\t\tif(!groupData.width){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.columnVisCheck(column)){\r\n\t\t\t\tgroupData.width = 1;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn groupData;\r\n\t}\r\n\r\n\tcolumnVisCheck(column){\r\n\t\treturn column.definition[this.colVisProp] !== false && (column.visible || (!column.visible && column.definition[this.colVisProp]));\r\n\t}\r\n\r\n\theadersToExportRows(columns){\r\n\t\tvar headers = [],\r\n\t\theaderDepth = 0,\r\n\t\texportRows = [];\r\n\r\n\t\tfunction parseColumnGroup(column, level){\r\n\r\n\t\t\tvar depth = headerDepth - level;\r\n\r\n\t\t\tif(typeof headers[level] === \"undefined\"){\r\n\t\t\t\theaders[level] = [];\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.height = column.subGroups ? 1 : (depth - column.depth) + 1;\r\n\r\n\t\t\theaders[level].push(column);\r\n\r\n\t\t\tif(column.height > 1){\r\n\t\t\t\tfor(let i = 1; i < column.height; i ++){\r\n\r\n\t\t\t\t\tif(typeof headers[level + i] === \"undefined\"){\r\n\t\t\t\t\t\theaders[level + i] = [];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\theaders[level + i].push(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(column.width > 1){\r\n\t\t\t\tfor(let i = 1; i < column.width; i ++){\r\n\t\t\t\t\theaders[level].push(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(column.subGroups){\r\n\t\t\t\tcolumn.subGroups.forEach(function(subGroup){\r\n\t\t\t\t\tparseColumnGroup(subGroup, level+1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//calculate maximum header debth\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tif(column.depth > headerDepth){\r\n\t\t\t\theaderDepth = column.depth;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tparseColumnGroup(column,0);\r\n\t\t});\r\n\r\n\t\theaders.forEach((header) => {\r\n\t\t\tvar columns = [];\r\n\r\n\t\t\theader.forEach((col) => {\r\n\t\t\t\tif(col){\r\n\t\t\t\t\tlet title = typeof col.title === \"undefined\" ? \"\" : col.title;\r\n\t\t\t\t\tcolumns.push(new ExportColumn(title, col.column.getComponent(), col.width, col.height, col.depth));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolumns.push(null);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\texportRows.push(new ExportRow(\"header\", columns));\r\n\t\t});\r\n\r\n\t\treturn exportRows;\r\n\t}\r\n\r\n\tbodyToExportRows(rows){\r\n\r\n\t\tvar columns = [];\r\n\t\tvar exportRows = [];\r\n\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tif (this.columnVisCheck(column)) {\r\n\t\t\t\tcolumns.push(column.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(this.config.columnCalcs !== false && this.table.modExists(\"columnCalcs\")){\r\n\t\t\tif(this.table.modules.columnCalcs.topInitialized){\r\n\t\t\t\trows.unshift(this.table.modules.columnCalcs.topRow);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modules.columnCalcs.botInitialized){\r\n\t\t\t\trows.push(this.table.modules.columnCalcs.botRow);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\trows = rows.filter((row) => {\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\treturn this.config.rowGroups !== false;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\treturn this.config.columnCalcs !== false;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\treturn !(this.table.options.dataTree && this.config.dataTree === false && row.modules.dataTree.parent);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\trows.forEach((row, i) => {\r\n\t\t\tvar rowData = row.getData(this.colVisProp);\r\n\t\t\tvar exportCols = [];\r\n\t\t\tvar indent = 0;\r\n\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\tindent = row.level;\r\n\t\t\t\texportCols.push(new ExportColumn(row.key, row.getComponent(), columns.length, 1));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\" :\r\n\t\t\t\tcase \"row\" :\r\n\t\t\t\tcolumns.forEach((col) => {\r\n\t\t\t\t\texportCols.push(new ExportColumn(col._column.getFieldValue(rowData), col, 1, 1));\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\r\n\t\t\t\t\tindent = row.modules.dataTree.index;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\texportRows.push(new ExportRow(row.type, exportCols, row.getComponent(), indent));\r\n\t\t});\r\n\r\n\t\treturn exportRows;\r\n\t}\r\n\r\n\tgenereateTableElement(list){\r\n\t\tvar table = document.createElement(\"table\"),\r\n\t\theaderEl = document.createElement(\"thead\"),\r\n\t\tbodyEl = document.createElement(\"tbody\"),\r\n\t\tstyles = this.lookupTableStyles(),\r\n\t\trowFormatter = this.table.options[\"rowFormatter\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))],\r\n\t\tsetup = {};\r\n\r\n\t\tsetup.rowFormatter = rowFormatter !== null ? rowFormatter : this.table.options.rowFormatter;\r\n\r\n\t\tif(this.table.options.dataTree &&this.config.dataTree !== false && this.table.modExists(\"columnCalcs\")){\r\n\t\t\tsetup.treeElementField = this.table.modules.dataTree.elementField;\r\n\t\t}\r\n\r\n\t\t//assign group header formatter\r\n\t\tsetup.groupHeader = this.table.options[\"groupHeader\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))];\r\n\r\n\t\tif(setup.groupHeader && !Array.isArray(setup.groupHeader)){\r\n\t\t\tsetup.groupHeader = [setup.groupHeader];\r\n\t\t}\r\n\r\n\t\ttable.classList.add(\"tabulator-print-table\");\r\n\r\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\"]);\r\n\r\n\r\n\t\tif(list.length > 1000){\r\n\t\t\tconsole.warn(\"It may take a long time to render an HTML table with more than 1000 rows\");\r\n\t\t}\r\n\r\n\t\tlist.forEach((row, i) => {\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"header\":\r\n\t\t\t\theaderEl.appendChild(this.genereateHeaderElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\tbodyEl.appendChild(this.genereateGroupElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\tbodyEl.appendChild(this.genereateCalcElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\tlet rowEl = this.genereateRowElement(row, setup, styles);\r\n\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\"]);\r\n\t\t\t\tbodyEl.appendChild(rowEl);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(headerEl.innerHTML){\r\n\t\t\ttable.appendChild(headerEl);\r\n\t\t}\r\n\r\n\t\ttable.appendChild(bodyEl);\r\n\r\n\r\n\t\tthis.mapElementStyles(this.table.element, table, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\"]);\r\n\t\treturn table;\r\n\t}\r\n\r\n\tlookupTableStyles(){\r\n\t\tvar styles = {};\r\n\r\n\t\t//lookup row styles\r\n\t\tif(this.cloneTableStyle && window.getComputedStyle){\r\n\t\t\tstyles.oddRow = this.table.element.querySelector(\".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.evenRow = this.table.element.querySelector(\".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.calcRow = this.table.element.querySelector(\".tabulator-row.tabulator-calcs\");\r\n\t\t\tstyles.firstRow = this.table.element.querySelector(\".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.firstGroup = this.table.element.getElementsByClassName(\"tabulator-group\")[0];\r\n\r\n\t\t\tif(styles.firstRow){\r\n\t\t\t\tstyles.styleCells = styles.firstRow.getElementsByClassName(\"tabulator-cell\");\r\n\t\t\t\tstyles.firstCell = styles.styleCells[0];\r\n\t\t\t\tstyles.lastCell = styles.styleCells[styles.styleCells.length - 1];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn styles;\r\n\t}\r\n\r\n\tgenereateHeaderElement(row, setup, styles){\r\n\t\tvar rowEl = document.createElement(\"tr\");\r\n\r\n\t\trow.columns.forEach((column) => {\r\n\t\t\tif(column){\r\n\t\t\t\tvar cellEl = document.createElement(\"th\");\r\n\t\t\t\tvar classNames = column.component._column.definition.cssClass ? column.component._column.definition.cssClass.split(\" \") : [];\r\n\r\n\t\t\t\tcellEl.colSpan = column.width;\r\n\t\t\t\tcellEl.rowSpan = column.height;\r\n\r\n\t\t\t\tcellEl.innerHTML = column.value;\r\n\r\n\t\t\t\tif(this.cloneTableStyle){\r\n\t\t\t\t\tcellEl.style.boxSizing = \"border-box\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tclassNames.forEach(function(className) {\r\n\t\t\t\t\tcellEl.classList.add(className);\r\n\t\t\t\t});\r\n\r\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\"]);\r\n\t\t\t\tthis.mapElementStyles(column.component._column.contentElement, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\"]);\r\n\r\n\t\t\t\tif(column.component._column.visible){\r\n\t\t\t\t\tthis.mapElementStyles(column.component.getElement(), cellEl, [\"width\"]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(column.component._column.definition.width){\r\n\t\t\t\t\t\tcellEl.style.width = column.component._column.definition.width + \"px\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(column.component._column.parent){\r\n\t\t\t\t\tthis.mapElementStyles(column.component._column.parent.groupElement, cellEl, [\"border-top\"]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowEl.appendChild(cellEl);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateGroupElement(row, setup, styles){\r\n\r\n\t\tvar rowEl = document.createElement(\"tr\"),\r\n\t\tcellEl = document.createElement(\"td\"),\r\n\t\tgroup = row.columns[0];\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-row\");\r\n\r\n\t\tif(setup.groupHeader && setup.groupHeader[row.indent]){\r\n\t\t\tgroup.value = setup.groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t}else{\r\n\t\t\tif(setup.groupHeader === false){\r\n\t\t\t\tgroup.value = group.value;\r\n\t\t\t}else{\r\n\t\t\t\tgroup.value = row.component._group.generator(group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcellEl.colSpan = group.width;\r\n\t\tcellEl.innerHTML = group.value;\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-group\");\r\n\t\trowEl.classList.add(\"tabulator-group-level-\" + row.indent);\r\n\r\n\t\tif(group.component.isVisible()){\r\n\t\t\trowEl.classList.add(\"tabulator-group-visible\");\r\n\t\t}\r\n\r\n\t\tthis.mapElementStyles(styles.firstGroup, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\r\n\t\tthis.mapElementStyles(styles.firstGroup, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\"]);\r\n\r\n\t\trowEl.appendChild(cellEl);\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateCalcElement(row, setup, styles){\r\n\t\tvar rowEl = this.genereateRowElement(row, setup, styles);\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-calcs\");\r\n\t\tthis.mapElementStyles(styles.calcRow, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateRowElement(row, setup, styles){\r\n\t\tvar rowEl = document.createElement(\"tr\");\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-row\");\r\n\r\n\t\trow.columns.forEach((col) => {\r\n\t\t\tif(col){\r\n\t\t\t\tvar cellEl = document.createElement(\"td\"),\r\n\t\t\t\tcolumn = col.component._column,\r\n\t\t\t\tindex = this.table.columnManager.findColumnIndex(column),\r\n\t\t\t\tvalue = col.value;\r\n\r\n\t\t\t\tvar cellWrapper = {\r\n\t\t\t\t\tmodules:{},\r\n\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetField:function(){\r\n\t\t\t\t\t\treturn column.definition.field;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\treturn cellEl;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetData:function(){\r\n\t\t\t\t\t\treturn row.component.getData();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\treturn row.component;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetComponent:function(){\r\n\t\t\t\t\t\treturn cellWrapper;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcolumn:column,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tvar classNames = column.definition.cssClass ? column.definition.cssClass.split(\" \") : [];\r\n\r\n\t\t\t\tclassNames.forEach(function(className) {\r\n\t\t\t\t\tcellEl.classList.add(className);\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.modExists(\"format\") && this.config.formatCells !== false){\r\n\t\t\t\t\tvalue = this.table.modules.format.formatExportValue(cellWrapper, this.colVisProp);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tvalue = JSON.stringify(value);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tvalue = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(value instanceof Node){\r\n\t\t\t\t\tcellEl.appendChild(value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcellEl.innerHTML = value;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(styles.styleCells[index] || styles.firstCell){\r\n\t\t\t\t\tthis.mapElementStyles(styles.styleCells[index] || styles.firstCell, 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\"]);\r\n\r\n\t\t\t\t\tif(column.definition.align){\r\n\t\t\t\t\t\tcellEl.style.textAlign = column.definition.align;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\r\n\t\t\t\t\tif((setup.treeElementField && setup.treeElementField == column.field) || (!setup.treeElementField && i == 0)){\r\n\t\t\t\t\t\tif(row.component._row.modules.dataTree.controlEl){\r\n\t\t\t\t\t\t\tcellEl.insertBefore(row.component._row.modules.dataTree.controlEl.cloneNode(true), cellEl.firstChild);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(row.component._row.modules.dataTree.branchEl){\r\n\t\t\t\t\t\t\tcellEl.insertBefore(row.component._row.modules.dataTree.branchEl.cloneNode(true), cellEl.firstChild);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowEl.appendChild(cellEl);\r\n\r\n\t\t\t\tif(cellWrapper.modules.format && cellWrapper.modules.format.renderedCallback){\r\n\t\t\t\t\tcellWrapper.modules.format.renderedCallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(setup.rowFormatter && this.config.formatCells !== false){\r\n\t\t\t\t\tsetup.rowFormatter(row.component);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateHTMLTable(list){\r\n\t\tvar holder = document.createElement(\"div\");\r\n\r\n\t\tholder.appendChild(this.genereateTableElement(list));\r\n\r\n\t\treturn holder.innerHTML;\r\n\t}\r\n\r\n\tgetHtml(visible, style, config, colVisProp){\r\n\t\tvar list = this.generateExportList(config || this.table.options.htmlOutputConfig, style, visible, colVisProp || \"htmlOutput\");\r\n\r\n\t\treturn this.genereateHTMLTable(list);\r\n\t}\r\n\r\n\tmapElementStyles(from, to, props){\r\n\t\tif(this.cloneTableStyle && from && to){\r\n\r\n\t\t\tvar lookup = {\r\n\t\t\t\t\"background-color\" : \"backgroundColor\",\r\n\t\t\t\t\"color\" : \"fontColor\",\r\n\t\t\t\t\"width\" : \"width\",\r\n\t\t\t\t\"font-weight\" : \"fontWeight\",\r\n\t\t\t\t\"font-family\" : \"fontFamily\",\r\n\t\t\t\t\"font-size\" : \"fontSize\",\r\n\t\t\t\t\"text-align\" : \"textAlign\",\r\n\t\t\t\t\"border-top\" : \"borderTop\",\r\n\t\t\t\t\"border-left\" : \"borderLeft\",\r\n\t\t\t\t\"border-right\" : \"borderRight\",\r\n\t\t\t\t\"border-bottom\" : \"borderBottom\",\r\n\t\t\t\t\"padding-top\" : \"paddingTop\",\r\n\t\t\t\t\"padding-left\" : \"paddingLeft\",\r\n\t\t\t\t\"padding-right\" : \"paddingRight\",\r\n\t\t\t\t\"padding-bottom\" : \"paddingBottom\",\r\n\t\t\t};\r\n\r\n\t\t\tif(window.getComputedStyle){\r\n\t\t\t\tvar fromStyle = window.getComputedStyle(from);\r\n\r\n\t\t\t\tprops.forEach(function(prop){\r\n\t\t\t\t\tto.style[lookup[prop]] = fromStyle.getPropertyValue(prop);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nExport.moduleName = \"export\";\r\n\r\nexport default Export;\r\n","export default {\r\n\r\n\t//equal to\r\n\t\"=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal == filterVal ? true : false;\r\n\t},\r\n\r\n\t//less than\r\n\t\"<\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal < filterVal ? true : false;\r\n\t},\r\n\r\n\t//less than or equal to\r\n\t\"<=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal <= filterVal ? true : false;\r\n\t},\r\n\r\n\t//greater than\r\n\t\">\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal > filterVal ? true : false;\r\n\t},\r\n\r\n\t//greater than or equal to\r\n\t\">=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal >= filterVal ? true : false;\r\n\t},\r\n\r\n\t//not equal to\r\n\t\"!=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal != filterVal ? true : false;\r\n\t},\r\n\r\n\t\"regex\":function(filterVal, rowVal, rowData, filterParams){\r\n\r\n\t\tif(typeof filterVal == \"string\"){\r\n\t\t\tfilterVal = new RegExp(filterVal);\r\n\t\t}\r\n\r\n\t\treturn filterVal.test(rowVal);\r\n\t},\r\n\r\n\t//contains the string\r\n\t\"like\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().indexOf(filterVal.toLowerCase()) > -1;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//contains the keywords\r\n\t\"keywords\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tvar keywords = filterVal.toLowerCase().split(typeof filterParams.separator === \"undefined\" ? \" \" : filterParams.separator),\r\n\t\tvalue = String(rowVal === null || typeof rowVal === \"undefined\" ? \"\" : rowVal).toLowerCase(),\r\n\t\tmatches = [];\r\n\r\n\t\tkeywords.forEach((keyword) =>{\r\n\t\t\tif(value.includes(keyword)){\r\n\t\t\t\tmatches.push(true);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn filterParams.matchAll ? matches.length === keywords.length : !!matches.length;\r\n\t},\r\n\r\n\t//starts with the string\r\n\t\"starts\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().startsWith(filterVal.toLowerCase());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//ends with the string\r\n\t\"ends\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().endsWith(filterVal.toLowerCase());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//in array\r\n\t\"in\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(Array.isArray(filterVal)){\r\n\t\t\treturn filterVal.length ? filterVal.indexOf(rowVal) > -1 : true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Filter Error - filter value is not an array:\", filterVal);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultFilters from './defaults/filters.js';\r\n\r\nclass Filter extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.filterList = []; //hold filter list\r\n\t\tthis.headerFilters = {}; //hold column filters\r\n\t\tthis.headerFilterColumns = []; //hold columns that use header filters\r\n\r\n\t\tthis.prevHeaderFilterChangeCheck = \"\";\r\n\t\tthis.prevHeaderFilterChangeCheck = \"{}\";\r\n\r\n\t\tthis.changed = false; //has filtering changed since last render\r\n\t\tthis.tableInitialized = false;\r\n\r\n\t\tthis.registerTableOption(\"filterMode\", \"local\"); //local or remote filtering\r\n\r\n\t\tthis.registerTableOption(\"initialFilter\", false); //initial filtering criteria\r\n\t\tthis.registerTableOption(\"initialHeaderFilter\", false); //initial header filtering criteria\r\n\t\tthis.registerTableOption(\"headerFilterLiveFilterDelay\", 300); //delay before updating column after user types in header filter\r\n\r\n\t\tthis.registerColumnOption(\"headerFilter\");\r\n\t\tthis.registerColumnOption(\"headerFilterPlaceholder\");\r\n\t\tthis.registerColumnOption(\"headerFilterParams\");\r\n\t\tthis.registerColumnOption(\"headerFilterEmptyCheck\");\r\n\t\tthis.registerColumnOption(\"headerFilterFunc\");\r\n\t\tthis.registerColumnOption(\"headerFilterFuncParams\");\r\n\t\tthis.registerColumnOption(\"headerFilterLiveFilter\");\r\n\r\n\t\tthis.registerTableFunction(\"searchRows\", this.searchRows.bind(this));\r\n\t\tthis.registerTableFunction(\"searchData\", this.searchData.bind(this));\r\n\r\n\t\tthis.registerTableFunction(\"setFilter\", this.userSetFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"refreshFilter\", this.userRefreshFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"addFilter\", this.userAddFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"getFilters\", this.getFilters.bind(this));\r\n\t\tthis.registerTableFunction(\"setHeaderFilterFocus\", this.userSetHeaderFilterFocus.bind(this));\r\n\t\tthis.registerTableFunction(\"getHeaderFilterValue\", this.userGetHeaderFilterValue.bind(this));\r\n\t\tthis.registerTableFunction(\"setHeaderFilterValue\", this.userSetHeaderFilterValue.bind(this));\r\n\t\tthis.registerTableFunction(\"getHeaderFilters\", this.getHeaderFilters.bind(this));\r\n\t\tthis.registerTableFunction(\"removeFilter\", this.userRemoveFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"clearFilter\", this.userClearFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"clearHeaderFilter\", this.userClearHeaderFilter.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"column\", \"headerFilterFocus\", this.setHeaderFilterFocus.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"reloadHeaderFilter\", this.reloadHeaderFilter.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"getHeaderFilterValue\", this.getHeaderFilterValue.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"setHeaderFilterValue\", this.setHeaderFilterValue.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumnHeaderFilter.bind(this));\r\n\t\tthis.subscribe(\"column-width-fit-before\", this.hideHeaderFilterElements.bind(this));\r\n\t\tthis.subscribe(\"column-width-fit-after\", this.showHeaderFilterElements.bind(this));\r\n\t\tthis.subscribe(\"table-built\", this.tableBuilt.bind(this));\r\n\r\n\t\tif(this.table.options.filterMode === \"remote\"){\r\n\t\t\tthis.subscribe(\"data-params\", this.remoteFilterParams.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerDataHandler(this.filter.bind(this), 10);\r\n\t}\r\n\r\n\ttableBuilt(){\r\n\t\tif(this.table.options.initialFilter){\r\n\t\t\tthis.setFilter(this.table.options.initialFilter);\r\n\t\t}\r\n\r\n\t\tif(this.table.options.initialHeaderFilter){\r\n\t\t\tthis.table.options.initialHeaderFilter.forEach((item) => {\r\n\r\n\t\t\t\tvar column = this.table.columnManager.findColumn(item.field);\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tthis.setHeaderFilterValue(column, item.value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", item.field);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.tableInitialized = true;\r\n\t}\r\n\r\n\tremoteFilterParams(data, config, silent, params){\r\n\t\tparams.filter = this.getFilters(true, true);\r\n\t\treturn params;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\t//set standard filters\r\n\tuserSetFilter(field, type, value, params){\r\n\t\tthis.setFilter(field, type, value, params);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//set standard filters\r\n\tuserRefreshFilter(){\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//add filter to array\r\n\tuserAddFilter(field, type, value, params){\r\n\t\tthis.addFilter(field, type, value, params);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\tuserSetHeaderFilterFocus(field){\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tthis.setHeaderFilterFocus(column);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Focus Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tuserGetHeaderFilterValue(field) {\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn this.getHeaderFilterValue(column);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", field);\r\n\t\t}\r\n\t}\r\n\r\n\tuserSetHeaderFilterValue(field, value){\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tthis.setHeaderFilterValue(column, value);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//remove filter from array\r\n\tuserRemoveFilter(field, type, value){\r\n\t\tthis.removeFilter(field, type, value);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//clear filters\r\n\tuserClearFilter(all){\r\n\t\tthis.clearFilter(all);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//clear header filters\r\n\tuserClearHeaderFilter(){\r\n\t\tthis.clearHeaderFilter();\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\r\n\t//search for specific row components\r\n\tsearchRows(field, type, value){\r\n\t\treturn this.search(\"rows\", field, type, value);\r\n\t}\r\n\r\n\t//search for specific data\r\n\tsearchData(field, type, value){\r\n\t\treturn this.search(\"data\", field, type, value);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnHeaderFilter(column){\r\n\t\tvar def = column.definition;\r\n\r\n\t\tif(def.headerFilter){\r\n\r\n\t\t\tif(typeof def.headerFilterPlaceholder !== \"undefined\" && def.field){\r\n\t\t\t\tthis.module(\"localize\").setHeaderFilterColumnPlaceholder(def.field, def.headerFilterPlaceholder);\r\n\t\t\t}\r\n\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column header filter\r\n\tinitializeColumn(column, value){\r\n\t\tvar self = this,\r\n\t\tfield = column.getField(),\r\n\t\tparams;\r\n\r\n\t\t//handle successfull value change\r\n\t\tfunction success(value){\r\n\t\t\tvar filterType = (column.modules.filter.tagType == \"input\" && column.modules.filter.attrType == \"text\") || column.modules.filter.tagType == \"textarea\" ? \"partial\" : \"match\",\r\n\t\t\ttype = \"\",\r\n\t\t\tfilterChangeCheck = \"\",\r\n\t\t\tfilterFunc;\r\n\r\n\t\t\tif(typeof column.modules.filter.prevSuccess === \"undefined\" || column.modules.filter.prevSuccess !== value){\r\n\r\n\t\t\t\tcolumn.modules.filter.prevSuccess = value;\r\n\r\n\t\t\t\tif(!column.modules.filter.emptyFunc(value)){\r\n\t\t\t\t\tcolumn.modules.filter.value = value;\r\n\r\n\t\t\t\t\tswitch(typeof column.definition.headerFilterFunc){\r\n\t\t\t\t\t\tcase \"string\":\r\n\t\t\t\t\t\tif(Filter.filters[column.definition.headerFilterFunc]){\r\n\t\t\t\t\t\t\ttype = column.definition.headerFilterFunc;\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\r\n\t\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\t\tparams = typeof params === \"function\" ? params(value, fieldVal, data) : params;\r\n\r\n\t\t\t\t\t\t\t\treturn Filter.filters[column.definition.headerFilterFunc](value, fieldVal, data, params);\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tconsole.warn(\"Header Filter Error - Matching filter function not found: \", column.definition.headerFilterFunc);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\r\n\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\tparams = typeof params === \"function\" ? params(value, fieldVal, data) : params;\r\n\r\n\t\t\t\t\t\t\treturn column.definition.headerFilterFunc(value, fieldVal, data, params);\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\ttype = filterFunc;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(!filterFunc){\r\n\t\t\t\t\t\tswitch(filterType){\r\n\t\t\t\t\t\t\tcase \"partial\":\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\tvar colVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\t\tif(typeof colVal !== 'undefined' && colVal !== null){\r\n\t\t\t\t\t\t\t\t\treturn String(colVal).toLowerCase().indexOf(String(value).toLowerCase()) > -1;\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\ttype = \"like\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\treturn column.getFieldValue(data) == value;\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\ttype = \"=\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tself.headerFilters[field] = {value:value, func:filterFunc, type:type, params:params || {}};\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdelete self.headerFilters[field];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfilterChangeCheck = JSON.stringify(self.headerFilters);\r\n\r\n\t\t\t\tif(self.prevHeaderFilterChangeCheck !== filterChangeCheck){\r\n\t\t\t\t\tself.prevHeaderFilterChangeCheck = filterChangeCheck;\r\n\r\n\t\t\t\t\tself.trackChanges();\r\n\t\t\t\t\tself.refreshFilter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tcolumn.modules.filter = {\r\n\t\t\tsuccess:success,\r\n\t\t\tattrType:false,\r\n\t\t\ttagType:false,\r\n\t\t\temptyFunc:false,\r\n\t\t};\r\n\r\n\t\tthis.generateHeaderFilterElement(column);\r\n\t}\r\n\r\n\tgenerateHeaderFilterElement(column, initialValue, reinitialize){\r\n\t\tvar self = this,\r\n\t\tsuccess = column.modules.filter.success,\r\n\t\tfield = column.getField(),\r\n\t\tfilterElement, editor, editorElement, cellWrapper, typingTimer, searchTrigger, params;\r\n\r\n\t\t//handle aborted edit\r\n\t\tfunction cancel(){}\r\n\r\n\t\tif(column.modules.filter.headerElement && column.modules.filter.headerElement.parentNode){\r\n\t\t\tcolumn.contentElement.removeChild(column.modules.filter.headerElement.parentNode);\r\n\t\t}\r\n\r\n\t\tif(field){\r\n\r\n\t\t\t//set empty value function\r\n\t\t\tcolumn.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function(value){\r\n\t\t\t\treturn !value && value !== \"0\" && value !== 0;\r\n\t\t\t};\r\n\r\n\t\t\tfilterElement = document.createElement(\"div\");\r\n\t\t\tfilterElement.classList.add(\"tabulator-header-filter\");\r\n\r\n\t\t\t//set column editor\r\n\t\t\tswitch(typeof column.definition.headerFilter){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(self.table.modules.edit.editors[column.definition.headerFilter]){\r\n\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.headerFilter];\r\n\r\n\t\t\t\t\tif((column.definition.headerFilter === \"tick\" || column.definition.headerFilter === \"tickCross\") && !column.definition.headerFilterEmptyCheck){\r\n\t\t\t\t\t\tcolumn.modules.filter.emptyFunc = function(value){\r\n\t\t\t\t\t\t\treturn value !== true && value !== false;\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Filter Error - Cannot build header filter, No such editor found: \", column.definition.editor);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\teditor = column.definition.headerFilter;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tif(column.modules.edit && column.modules.edit.editor){\r\n\t\t\t\t\teditor = column.modules.edit.editor;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]){\r\n\t\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.formatter];\r\n\r\n\t\t\t\t\t\tif((column.definition.formatter === \"tick\" || column.definition.formatter === \"tickCross\") && !column.definition.headerFilterEmptyCheck){\r\n\t\t\t\t\t\t\tcolumn.modules.filter.emptyFunc = function(value){\r\n\t\t\t\t\t\t\t\treturn value !== true && value !== false;\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\teditor = self.table.modules.edit.editors[\"input\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(editor){\r\n\r\n\t\t\t\tcellWrapper = {\r\n\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\treturn typeof initialValue !== \"undefined\" ? initialValue : \"\";\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetField:function(){\r\n\t\t\t\t\t\treturn column.definition.field;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\treturn filterElement;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\tnormalizeHeight:function(){\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\tparams = column.definition.headerFilterParams || {};\r\n\r\n\t\t\t\tparams = typeof params === \"function\" ? params.call(self.table, cellWrapper) : params;\r\n\r\n\t\t\t\teditorElement = editor.call(this.table.modules.edit, cellWrapper, function(){}, success, cancel, params);\r\n\r\n\t\t\t\tif(!editorElement){\r\n\t\t\t\t\tconsole.warn(\"Filter Error - Cannot add filter to \" + field + \" column, editor returned a value of false\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!(editorElement instanceof Node)){\r\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);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//set Placeholder Text\r\n\t\t\t\tif(field){\r\n\t\t\t\t\tself.langBind(\"headerFilters|columns|\" + column.definition.field, function(value){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"placeholder\", typeof value !== \"undefined\" && value ? value : self.langText(\"headerFilters|default\"));\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.langBind(\"headerFilters|default\", function(value){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"placeholder\", value);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//focus on element on click\r\n\t\t\t\teditorElement.addEventListener(\"click\", function(e){\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\teditorElement.focus();\r\n\t\t\t\t});\r\n\r\n\t\t\t\teditorElement.addEventListener(\"focus\", (e) => {\r\n\t\t\t\t\tvar left = this.table.columnManager.element.scrollLeft;\r\n\r\n\t\t\t\t\tvar headerPos = this.table.rowManager.element.scrollLeft + parseInt(this.table.columnManager.element.style.marginLeft);\r\n\r\n\t\t\t\t\tif(left !== headerPos){\r\n\t\t\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\t\t\tthis.table.columnManager.scrollHorizontal(left);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\t//live update filters as user types\r\n\t\t\t\ttypingTimer = false;\r\n\r\n\t\t\t\tsearchTrigger = function(e){\r\n\t\t\t\t\tif(typingTimer){\r\n\t\t\t\t\t\tclearTimeout(typingTimer);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ttypingTimer = setTimeout(function(){\r\n\t\t\t\t\t\tsuccess(editorElement.value);\r\n\t\t\t\t\t},self.table.options.headerFilterLiveFilterDelay);\r\n\t\t\t\t};\r\n\r\n\t\t\t\tcolumn.modules.filter.headerElement = editorElement;\r\n\t\t\t\tcolumn.modules.filter.attrType = editorElement.hasAttribute(\"type\") ? editorElement.getAttribute(\"type\").toLowerCase() : \"\" ;\r\n\t\t\t\tcolumn.modules.filter.tagType = editorElement.tagName.toLowerCase();\r\n\r\n\t\t\t\tif(column.definition.headerFilterLiveFilter !== false){\r\n\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\t!(\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === 'autocomplete' ||\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === 'tickCross' ||\r\n\t\t\t\t\t\t\t((column.definition.editor === 'autocomplete' ||\r\n\t\t\t\t\t\t\t\tcolumn.definition.editor === 'tickCross') &&\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === true)\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\teditorElement.addEventListener(\"keyup\", searchTrigger);\r\n\t\t\t\t\teditorElement.addEventListener(\"search\", searchTrigger);\r\n\r\n\r\n\t\t\t\t\t//update number filtered columns on change\r\n\t\t\t\t\tif(column.modules.filter.attrType == \"number\"){\r\n\t\t\t\t\t\teditorElement.addEventListener(\"change\", function(e){\r\n\t\t\t\t\t\t\tsuccess(editorElement.value);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//change text inputs to search inputs to allow for clearing of field\r\n\t\t\t\t\tif(column.modules.filter.attrType == \"text\" && this.table.browser !== \"ie\"){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"type\", \"search\");\r\n\t\t\t\t\t\t// editorElement.off(\"change blur\"); //prevent blur from triggering filter and preventing selection click\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\t//prevent input and select elements from propegating click to column sorters etc\r\n\t\t\t\t\tif(column.modules.filter.tagType == \"input\" || column.modules.filter.tagType == \"select\" || column.modules.filter.tagType == \"textarea\"){\r\n\t\t\t\t\t\teditorElement.addEventListener(\"mousedown\",function(e){\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfilterElement.appendChild(editorElement);\r\n\r\n\t\t\t\tcolumn.contentElement.appendChild(filterElement);\r\n\r\n\t\t\t\tif(!reinitialize){\r\n\t\t\t\t\tself.headerFilterColumns.push(column);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Filter Error - Cannot add header filter, column has no field set:\", column.definition.title);\r\n\t\t}\r\n\t}\r\n\r\n\t//hide all header filter elements (used to ensure correct column widths in \"fitData\" layout mode)\r\n\thideHeaderFilterElements(){\r\n\t\tthis.headerFilterColumns.forEach(function(column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tcolumn.modules.filter.headerElement.style.display = 'none';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//show all header filter elements (used to ensure correct column widths in \"fitData\" layout mode)\r\n\tshowHeaderFilterElements(){\r\n\t\tthis.headerFilterColumns.forEach(function(column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tcolumn.modules.filter.headerElement.style.display = '';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//programatically set focus of header filter\r\n\tsetHeaderFilterFocus(column){\r\n\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\tcolumn.modules.filter.headerElement.focus();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Focus Error - No header filter set on column:\", column.getField());\r\n\t\t}\r\n\t}\r\n\r\n\t//programmatically get value of header filter\r\n\tgetHeaderFilterValue(column){\r\n\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\treturn column.modules.filter.headerElement.value;\r\n\t\t} else {\r\n\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t}\r\n\t}\r\n\r\n\t//programatically set value of header filter\r\n\tsetHeaderFilterValue(column, value){\r\n\t\tif (column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tthis.generateHeaderFilterElement(column, value, true);\r\n\t\t\t\tcolumn.modules.filter.success(value);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treloadHeaderFilter(column){\r\n\t\tif (column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tthis.generateHeaderFilterElement(column, column.modules.filter.value, true);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trefreshFilter(){\r\n\t\tif(this.tableInitialized){\r\n\t\t\tif(this.table.options.filterMode === \"remote\"){\r\n\t\t\t\tthis.reloadData();\r\n\t\t\t}else{\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//TODO - Persist left position of row manager\r\n\t\t// left = this.scrollLeft;\r\n\t\t// this.scrollHorizontal(left);\r\n\t}\r\n\r\n\t//check if the filters has changed since last use\r\n\ttrackChanges(){\r\n\t\tthis.changed = true;\r\n\t\tthis.dispatch(\"filter-changed\");\r\n\t}\r\n\r\n\t//check if the filters has changed since last use\r\n\thasChanged(){\r\n\t\tvar changed = this.changed;\r\n\t\tthis.changed = false;\r\n\t\treturn changed;\r\n\t}\r\n\r\n\t//set standard filters\r\n\tsetFilter(field, type, value, params){\r\n\t\tthis.filterList = [];\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value, params:params}];\r\n\t\t}\r\n\r\n\t\tthis.addFilter(field);\r\n\t}\r\n\r\n\t//add filter to array\r\n\taddFilter(field, type, value, params){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value, params:params}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\tthis.filterList.push(filter);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.trackChanges();\r\n\t\t}\r\n\t}\r\n\r\n\tfindFilter(filter){\r\n\t\tvar column;\r\n\r\n\t\tif(Array.isArray(filter)){\r\n\t\t\treturn this.findSubFilters(filter);\r\n\t\t}\r\n\r\n\t\tvar filterFunc = false;\r\n\r\n\t\tif(typeof filter.field == \"function\"){\r\n\t\t\tfilterFunc = function(data){\r\n\t\t\t\treturn filter.field(data, filter.type || {})// pass params to custom filter function\r\n\t\t\t};\r\n\t\t}else{\r\n\r\n\t\t\tif(Filter.filters[filter.type]){\r\n\r\n\t\t\t\tcolumn = this.table.columnManager.getColumnByField(filter.field);\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\treturn Filter.filters[filter.type](filter.value, column.getFieldValue(data), data, filter.params || {});\r\n\t\t\t\t\t};\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\treturn Filter.filters[filter.type](filter.value, data[filter.field], data, filter.params || {});\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Filter Error - No such filter type found, ignoring: \", filter.type);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfilter.func = filterFunc;\r\n\r\n\t\treturn filter.func ? filter : false;\r\n\t}\r\n\r\n\tfindSubFilters(filters){\r\n\t\tvar output = [];\r\n\r\n\t\tfilters.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\toutput.push(filter);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output.length ? output : false;\r\n\t}\r\n\r\n\t//get all filters\r\n\tgetFilters(all, ajax){\r\n\t\tvar output = [];\r\n\r\n\t\tif(all){\r\n\t\t\toutput = this.getHeaderFilters();\r\n\t\t}\r\n\r\n\t\tif(ajax){\r\n\t\t\toutput.forEach(function(item){\r\n\t\t\t\tif(typeof item.type == \"function\"){\r\n\t\t\t\t\titem.type = \"function\";\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\toutput = output.concat(this.filtersToArray(this.filterList, ajax));\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//filter to Object\r\n\tfiltersToArray(filterList, ajax){\r\n\t\tvar output = [];\r\n\r\n\t\tfilterList.forEach((filter) => {\r\n\t\t\tvar item;\r\n\r\n\t\t\tif(Array.isArray(filter)){\r\n\t\t\t\toutput.push(this.filtersToArray(filter, ajax));\r\n\t\t\t}else{\r\n\t\t\t\titem = {field:filter.field, type:filter.type, value:filter.value}\r\n\r\n\t\t\t\tif(ajax){\r\n\t\t\t\t\tif(typeof item.type == \"function\"){\r\n\t\t\t\t\t\titem.type = \"function\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\toutput.push(item);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//get all filters\r\n\tgetHeaderFilters(){\r\n\t\tvar output = [];\r\n\r\n\t\tfor(var key in this.headerFilters){\r\n\t\t\toutput.push({field:key, type:this.headerFilters[key].type, value:this.headerFilters[key].value});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//remove filter from array\r\n\tremoveFilter(field, type, value){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tvar index = -1;\r\n\r\n\t\t\tif(typeof filter.field == \"object\"){\r\n\t\t\t\tindex = this.filterList.findIndex((element) => {\r\n\t\t\t\t\treturn filter === element;\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tindex = this.filterList.findIndex((element) => {\r\n\t\t\t\t\treturn filter.field === element.field && filter.type === element.type && filter.value === element.value;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.filterList.splice(index, 1);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Filter Error - No matching filter type found, ignoring: \", filter.type);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//clear filters\r\n\tclearFilter(all){\r\n\t\tthis.filterList = [];\r\n\r\n\t\tif(all){\r\n\t\t\tthis.clearHeaderFilter();\r\n\t\t}\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//clear header filters\r\n\tclearHeaderFilter(){\r\n\t\tthis.headerFilters = {};\r\n\t\tthis.prevHeaderFilterChangeCheck = \"{}\";\r\n\r\n\t\tthis.headerFilterColumns.forEach((column) => {\r\n\t\t\tif(typeof column.modules.filter.value !== \"undefined\"){\r\n\t\t\t\tdelete column.modules.filter.value;\r\n\t\t\t}\r\n\t\t\tcolumn.modules.filter.prevSuccess = undefined;\r\n\t\t\tthis.reloadHeaderFilter(column);\r\n\t\t});\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//search data and return matching rows\r\n\tsearch (searchType, field, type, value){\r\n\t\tvar activeRows = [],\r\n\t\tfilterList = [];\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\tfilterList.push(filter);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\tvar match = true;\r\n\r\n\t\t\tfilterList.forEach((filter) => {\r\n\t\t\t\tif(!this.filterRecurse(filter, row.getData())){\r\n\t\t\t\t\tmatch = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tactiveRows.push(searchType === \"data\" ? row.getData(\"data\") : row.getComponent());\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\t\treturn activeRows;\r\n\t}\r\n\r\n\t//filter row array\r\n\tfilter(rowList, filters){\r\n\t\tvar activeRows = [],\r\n\t\tactiveRowComponents = [];\r\n\r\n\t\tif(this.subscribedExternal(\"dataFiltering\")){\r\n\t\t\tthis.dispatchExternal(\"dataFiltering\", this.getFilters());\r\n\t\t}\r\n\r\n\t\tif(this.table.options.filterMode !== \"remote\" && (this.filterList.length || Object.keys(this.headerFilters).length)){\r\n\r\n\t\t\trowList.forEach((row) => {\r\n\t\t\t\tif(this.filterRow(row)){\r\n\t\t\t\t\tactiveRows.push(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t}else{\r\n\t\t\tactiveRows = rowList.slice(0);\r\n\t\t}\r\n\r\n\t\tif(this.subscribedExternal(\"dataFiltered\")){\r\n\r\n\t\t\tactiveRows.forEach((row) => {\r\n\t\t\t\tactiveRowComponents.push(row.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatchExternal(\"dataFiltered\", this.getFilters(), activeRowComponents);\r\n\t\t}\r\n\r\n\t\treturn activeRows;\r\n\t}\r\n\r\n\t//filter individual row\r\n\tfilterRow(row, filters){\r\n\t\tvar match = true,\r\n\t\tdata = row.getData();\r\n\r\n\t\tthis.filterList.forEach((filter) => {\r\n\t\t\tif(!this.filterRecurse(filter, data)){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\tfor(var field in this.headerFilters){\r\n\t\t\tif(!this.headerFilters[field].func(data)){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tfilterRecurse(filter, data){\r\n\t\tvar match = false;\r\n\r\n\t\tif(Array.isArray(filter)){\r\n\t\t\tfilter.forEach((subFilter) => {\r\n\t\t\t\tif(this.filterRecurse(subFilter, data)){\r\n\t\t\t\t\tmatch = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tmatch = filter.func(data);\r\n\t\t}\r\n\r\n\t\treturn match;\r\n\t}\r\n}\r\n\r\nFilter.moduleName = \"filter\";\r\n\r\n//load defaults\r\nFilter.filters = defaultFilters;\r\n\r\nexport default Filter;","export default function(cell, formatterParams, onRendered){\r\n\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn cell.getValue();\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().style.whiteSpace = \"pre-wrap\";\r\n\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar floatVal = parseFloat(cell.getValue()),\r\n\tsign = \"\",\r\n\tnumber, integer, decimal, rgx;\r\n\r\n\tvar decimalSym = formatterParams.decimal || \".\";\r\n\tvar thousandSym = formatterParams.thousand || \",\";\r\n\tvar negativeSign = formatterParams.negativeSign || \"-\";\r\n\tvar symbol = formatterParams.symbol || \"\";\r\n\tvar after = !!formatterParams.symbolAfter;\r\n\tvar precision = typeof formatterParams.precision !== \"undefined\" ? formatterParams.precision : 2;\r\n\r\n\tif(isNaN(floatVal)){\r\n\t\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n\t}\r\n\r\n\tif(floatVal < 0){\r\n\t\tfloatVal = Math.abs(floatVal);\r\n\t\tsign = negativeSign;\r\n\t}\r\n\r\n\tnumber = precision !== false ? floatVal.toFixed(precision) : floatVal;\r\n\tnumber = String(number).split(\".\");\r\n\r\n\tinteger = number[0];\r\n\tdecimal = number.length > 1 ? decimalSym + number[1] : \"\";\r\n\r\n\trgx = /(\\d+)(\\d{3})/;\r\n\r\n\twhile (rgx.test(integer)){\r\n\t\tinteger = integer.replace(rgx, \"$1\" + thousandSym + \"$2\");\r\n\t}\r\n\r\n\treturn after ? sign + integer + decimal + symbol : sign + symbol + integer + decimal;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\turlPrefix = formatterParams.urlPrefix || \"\",\r\n\tdownload = formatterParams.download,\r\n\tlabel = value,\r\n\tel = document.createElement(\"a\"),\r\n\tdata;\r\n\r\n\tif(formatterParams.labelField){\r\n\t\tdata = cell.getData();\r\n\t\tlabel = data[formatterParams.labelField];\r\n\t}\r\n\r\n\tif(formatterParams.label){\r\n\t\tswitch(typeof formatterParams.label){\r\n\t\t\tcase \"string\":\r\n\t\t\tlabel = formatterParams.label;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tlabel = formatterParams.label(cell);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(label){\r\n\t\tif(formatterParams.urlField){\r\n\t\t\tdata = cell.getData();\r\n\t\t\tvalue = data[formatterParams.urlField];\r\n\t\t}\r\n\r\n\t\tif(formatterParams.url){\r\n\t\t\tswitch(typeof formatterParams.url){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tvalue = formatterParams.url;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tvalue = formatterParams.url(cell);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tel.setAttribute(\"href\", urlPrefix + value);\r\n\r\n\t\tif(formatterParams.target){\r\n\t\t\tel.setAttribute(\"target\", formatterParams.target);\r\n\t\t}\r\n\r\n\t\tif(formatterParams.download){\r\n\r\n\t\t\tif(typeof download == \"function\"){\r\n\t\t\t\tdownload = download(cell);\r\n\t\t\t}else{\r\n\t\t\t\tdownload = download === true ? \"\" : download;\r\n\t\t\t}\r\n\r\n\t\t\tel.setAttribute(\"download\", download);\r\n\t\t}\r\n\r\n\t\tel.innerHTML = this.emptyToSpace(this.sanitizeHTML(label));\r\n\r\n\t\treturn el;\r\n\t}else{\r\n\t\treturn \" \";\r\n\t}\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar el = document.createElement(\"img\"),\r\n\tsrc = cell.getValue();\r\n\r\n\tif(formatterParams.urlPrefix){\r\n\t\tsrc = formatterParams.urlPrefix + cell.getValue();\r\n\t}\r\n\r\n\tif(formatterParams.urlSuffix){\r\n\t\tsrc = src + formatterParams.urlSuffix;\r\n\t}\r\n\r\n\tel.setAttribute(\"src\", src);\r\n\r\n\tswitch(typeof formatterParams.height){\r\n\t\tcase \"number\":\r\n\t\tel.style.height = formatterParams.height + \"px\";\r\n\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\tel.style.height = formatterParams.height;\r\n\t\tbreak;\r\n\t}\r\n\r\n\tswitch(typeof formatterParams.width){\r\n\t\tcase \"number\":\r\n\t\tel.style.width = formatterParams.width + \"px\";\r\n\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\tel.style.width = formatterParams.width;\r\n\t\tbreak;\r\n\t}\r\n\r\n\tel.addEventListener(\"load\", function(){\r\n\t\tcell.getRow().normalizeHeight();\r\n\t});\r\n\r\n\treturn el;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\telement = cell.getElement(),\r\n\tempty = formatterParams.allowEmpty,\r\n\ttruthy = formatterParams.allowTruthy,\r\n\ttick = typeof formatterParams.tickElement !== \"undefined\" ? formatterParams.tickElement : '',\r\n\tcross = typeof formatterParams.crossElement !== \"undefined\" ? formatterParams.crossElement : '';\r\n\r\n\tif((truthy && value) || (value === true || value === \"true\" || value === \"True\" || value === 1 || value === \"1\")){\r\n\t\telement.setAttribute(\"aria-checked\", true);\r\n\t\treturn tick || \"\";\r\n\t}else{\r\n\t\tif(empty && (value === \"null\" || value === \"\" || value === null || typeof value === \"undefined\")){\r\n\t\t\telement.setAttribute(\"aria-checked\", \"mixed\");\r\n\t\t\treturn \"\";\r\n\t\t}else{\r\n\t\t\telement.setAttribute(\"aria-checked\", false);\r\n\t\t\treturn cross || \"\";\r\n\t\t}\r\n\t}\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar inputFormat = formatterParams.inputFormat || \"yyyy-MM-dd HH:mm:ss\";\r\n\tvar\toutputFormat = formatterParams.outputFormat || \"dd/MM/yyyy HH:mm:ss\";\r\n\tvar\tinvalid = typeof formatterParams.invalidPlaceholder !== \"undefined\" ? formatterParams.invalidPlaceholder : \"\";\r\n\tvar value = cell.getValue();\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\tvar newDatetime = inputFormat === \"iso\" ? DT.fromISO(String(value)) : DT.fromFormat(String(value), inputFormat);\r\n\r\n\t\tif(newDatetime.isValid){\r\n\t\t\tif(formatterParams.timezone){\r\n\t\t\t\tnewDatetime = newDatetime.setZone(formatterParams.timezone);\r\n\t\t\t}\r\n\r\n\t\t\treturn newDatetime.toFormat(outputFormat);\r\n\t\t}else{\r\n\t\t\tif(invalid === true || !value){\r\n\t\t\t\treturn value;\r\n\t\t\t}else if(typeof invalid === \"function\"){\r\n\t\t\t\treturn invalid(value);\r\n\t\t\t}else{\r\n\t\t\t\treturn invalid;\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tconsole.error(\"Format Error - 'datetime' formatter is dependant on luxon.js\");\r\n\t}\r\n};","export default function (cell, formatterParams, onRendered) {\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar inputFormat = formatterParams.inputFormat || \"yyyy-MM-dd HH:mm:ss\";\r\n\tvar invalid = typeof formatterParams.invalidPlaceholder !== \"undefined\" ? formatterParams.invalidPlaceholder : \"\";\r\n\tvar suffix = typeof formatterParams.suffix !== \"undefined\" ? formatterParams.suffix : false;\r\n\tvar unit = typeof formatterParams.unit !== \"undefined\" ? formatterParams.unit : \"days\";\r\n\tvar humanize = typeof formatterParams.humanize !== \"undefined\" ? formatterParams.humanize : false;\r\n\tvar date = typeof formatterParams.date !== \"undefined\" ? formatterParams.date : DT.now();\r\n\tvar value = cell.getValue();\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\t\r\n\t\tvar newDatetime = inputFormat === \"iso\" ? DT.fromISO(String(value)) : DT.fromFormat(String(value), inputFormat);\r\n\r\n\t\tif (newDatetime.isValid){\r\n\t\t\tif(humanize){\r\n\t\t\t\t// return moment.duration(newDatetime.diff(date)).humanize(suffix);\r\n\t\t\t}else{\r\n\t\t\t\treturn parseInt(newDatetime.diff(date, unit)[unit]) + (suffix ? \" \" + suffix : \"\");\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\tif (invalid === true) {\r\n\t\t\t\treturn value;\r\n\t\t\t} else if (typeof invalid === \"function\") {\r\n\t\t\t\treturn invalid(value);\r\n\t\t\t} else {\r\n\t\t\t\treturn invalid;\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tconsole.error(\"Format Error - 'datetimediff' formatter is dependant on luxon.js\");\r\n\t}\r\n};","export default function (cell, formatterParams, onRendered) {\r\n\tvar value = cell.getValue();\r\n\r\n\tif (typeof formatterParams[value] === \"undefined\") {\r\n\t\tconsole.warn('Missing display value for ' + value);\r\n\t\treturn value;\r\n\t}\r\n\r\n\treturn formatterParams[value];\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\telement = cell.getElement(),\r\n\tmaxStars = formatterParams && formatterParams.stars ? formatterParams.stars : 5,\r\n\tstars = document.createElement(\"span\"),\r\n\tstar = document.createElementNS('http://www.w3.org/2000/svg', \"svg\"),\r\n\tstarActive = '',\r\n\tstarInactive = '';\r\n\r\n\t//style stars holder\r\n\tstars.style.verticalAlign = \"middle\";\r\n\r\n\t//style star\r\n\tstar.setAttribute(\"width\", \"14\");\r\n\tstar.setAttribute(\"height\", \"14\");\r\n\tstar.setAttribute(\"viewBox\", \"0 0 512 512\");\r\n\tstar.setAttribute(\"xml:space\", \"preserve\");\r\n\tstar.style.padding = \"0 1px\";\r\n\r\n\tvalue = value && !isNaN(value) ? parseInt(value) : 0;\r\n\r\n\tvalue = Math.max(0, Math.min(value, maxStars));\r\n\r\n\tfor(var i=1;i<= maxStars;i++){\r\n\t\tvar nextStar = star.cloneNode(true);\r\n\t\tnextStar.innerHTML = i <= value ? starActive : starInactive;\r\n\r\n\t\tstars.appendChild(nextStar);\r\n\t}\r\n\r\n\telement.style.whiteSpace = \"nowrap\";\r\n\telement.style.overflow = \"hidden\";\r\n\telement.style.textOverflow = \"ellipsis\";\r\n\r\n\telement.setAttribute(\"aria-label\", value);\r\n\r\n\treturn stars;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = this.sanitizeHTML(cell.getValue()) || 0,\r\n\tel = document.createElement(\"span\"),\r\n\tmax = formatterParams && formatterParams.max ? formatterParams.max : 100,\r\n\tmin = formatterParams && formatterParams.min ? formatterParams.min : 0,\r\n\tcolors = formatterParams && typeof formatterParams.color !== \"undefined\" ? formatterParams.color : [\"red\", \"orange\", \"green\"],\r\n\tcolor = \"#666666\",\r\n\tpercent, percentValue;\r\n\r\n\tif(isNaN(value) || typeof cell.getValue() === \"undefined\"){\r\n\t\treturn;\r\n\t}\r\n\r\n\tel.classList.add(\"tabulator-traffic-light\");\r\n\r\n\t//make sure value is in range\r\n\tpercentValue = parseFloat(value) <= max ? parseFloat(value) : max;\r\n\tpercentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min;\r\n\r\n\t//workout percentage\r\n\tpercent = (max - min) / 100;\r\n\tpercentValue = Math.round((percentValue - min) / percent);\r\n\r\n\t//set color\r\n\tswitch(typeof colors){\r\n\t\tcase \"string\":\r\n\t\tcolor = colors;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tcolor = colors(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(colors)){\r\n\t\t\tvar unit = 100 / colors.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, colors.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tcolor = colors[index];\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tel.style.backgroundColor = color;\r\n\r\n\treturn el;\r\n};","import CellComponent from '../../../../core/cell/CellComponent.js';\r\n\r\nexport default function(cell, formatterParams, onRendered){ //progress bar\r\n\tvar value = this.sanitizeHTML(cell.getValue()) || 0,\r\n\telement = cell.getElement(),\r\n\tmax = formatterParams && formatterParams.max ? formatterParams.max : 100,\r\n\tmin = formatterParams && formatterParams.min ? formatterParams.min : 0,\r\n\tlegendAlign = formatterParams && formatterParams.legendAlign ? formatterParams.legendAlign : \"center\",\r\n\tpercent, percentValue, color, legend, legendColor, top, left, right, bottom;\r\n\r\n\t//make sure value is in range\r\n\tpercentValue = parseFloat(value) <= max ? parseFloat(value) : max;\r\n\tpercentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min;\r\n\r\n\t//workout percentage\r\n\tpercent = (max - min) / 100;\r\n\tpercentValue = Math.round((percentValue - min) / percent);\r\n\r\n\t//set bar color\r\n\tswitch(typeof formatterParams.color){\r\n\t\tcase \"string\":\r\n\t\tcolor = formatterParams.color;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tcolor = formatterParams.color(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(formatterParams.color)){\r\n\t\t\tvar unit = 100 / formatterParams.color.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, formatterParams.color.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tcolor = formatterParams.color[index];\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tdefault:\r\n\t\tcolor = \"#2DC214\";\r\n\t}\r\n\r\n\t//generate legend\r\n\tswitch(typeof formatterParams.legend){\r\n\t\tcase \"string\":\r\n\t\tlegend = formatterParams.legend;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tlegend = formatterParams.legend(value);\r\n\t\tbreak;\r\n\t\tcase \"boolean\":\r\n\t\tlegend = value;\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\tlegend = false;\r\n\t}\r\n\r\n\t//set legend color\r\n\tswitch(typeof formatterParams.legendColor){\r\n\t\tcase \"string\":\r\n\t\tlegendColor = formatterParams.legendColor;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tlegendColor = formatterParams.legendColor(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(formatterParams.legendColor)){\r\n\t\t\tvar unit = 100 / formatterParams.legendColor.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, formatterParams.legendColor.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tlegendColor = formatterParams.legendColor[index];\r\n\t\t}\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\tlegendColor = \"#000\";\r\n\t}\r\n\r\n\telement.style.minWidth = \"30px\";\r\n\telement.style.position = \"relative\";\r\n\r\n\telement.setAttribute(\"aria-label\", percentValue);\r\n\r\n\tvar barEl = document.createElement(\"div\");\r\n\tbarEl.style.display = \"inline-block\";\r\n\tbarEl.style.position = \"absolute\";\r\n\tbarEl.style.width = percentValue + \"%\";\r\n\tbarEl.style.backgroundColor = color;\r\n\tbarEl.style.height = \"100%\";\r\n\r\n\tbarEl.setAttribute('data-max', max);\r\n\tbarEl.setAttribute('data-min', min);\r\n\r\n\tvar barContainer = document.createElement(\"div\");\r\n\tbarContainer.style.position = \"relative\";\r\n\tbarContainer.style.width = \"100%\";\r\n\tbarContainer.style.height = \"100%\";\r\n\r\n\tif(legend){\r\n\t\tvar legendEl = document.createElement(\"div\");\r\n\t\tlegendEl.style.position = \"absolute\";\r\n\t\tlegendEl.style.top = 0;\r\n\t\tlegendEl.style.left = 0;\r\n\t\tlegendEl.style.textAlign = legendAlign;\r\n\t\tlegendEl.style.width = \"100%\";\r\n\t\tlegendEl.style.color = legendColor;\r\n\t\tlegendEl.innerHTML = legend;\r\n\t}\r\n\r\n\tonRendered(function(){\r\n\r\n\t\t//handle custom element needed if formatter is to be included in printed/downloaded output\r\n\t\tif(!(cell instanceof CellComponent)){\r\n\t\t\tvar holderEl = document.createElement(\"div\");\r\n\t\t\tholderEl.style.position = \"absolute\";\r\n\t\t\tholderEl.style.top = \"4px\";\r\n\t\t\tholderEl.style.bottom = \"4px\";\r\n\t\t\tholderEl.style.left = \"4px\";\r\n\t\t\tholderEl.style.right = \"4px\";\r\n\r\n\t\t\telement.appendChild(holderEl);\r\n\r\n\t\t\telement = holderEl;\r\n\t\t}\r\n\r\n\t\telement.appendChild(barContainer);\r\n\t\tbarContainer.appendChild(barEl);\r\n\r\n\t\tif(legend){\r\n\t\t\tbarContainer.appendChild(legendEl);\r\n\t\t}\r\n\t});\r\n\r\n\treturn \"\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().style.backgroundColor = this.sanitizeHTML(cell.getValue());\r\n\treturn \"\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn '';\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn '';\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn this.table.rowManager.activeRows.indexOf(cell.getRow()._getSelf()) + 1 || \"\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().classList.add(\"tabulator-row-handle\");\r\n\treturn \"
\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar open = false,\r\n\tel = document.createElement(\"div\"),\r\n\tconfig = cell.getRow()._row.modules.responsiveLayout;\r\n\r\n\tel.classList.add(\"tabulator-responsive-collapse-toggle\");\r\n\tel.innerHTML = \"+-\";\r\n\r\n\tcell.getElement().classList.add(\"tabulator-row-handle\");\r\n\r\n\tfunction toggleList(isOpen){\r\n\t\tvar collapseEl = config.element;\r\n\r\n\t\tconfig.open = isOpen;\r\n\r\n\t\tif(collapseEl){\r\n\r\n\t\t\tif(config.open){\r\n\t\t\t\tel.classList.add(\"open\");\r\n\t\t\t\tcollapseEl.style.display = '';\r\n\t\t\t}else{\r\n\t\t\t\tel.classList.remove(\"open\");\r\n\t\t\t\tcollapseEl.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tel.addEventListener(\"click\", function(e){\r\n\t\te.stopImmediatePropagation();\r\n\t\ttoggleList(!config.open);\r\n\t});\r\n\r\n\ttoggleList(config.open);\r\n\r\n\treturn el;\r\n};","import RowComponent from '../../../../core/row/RowComponent.js';\r\n\r\nexport default function(cell, formatterParams, onRendered){\r\n\tvar checkbox = document.createElement(\"input\");\r\n\tvar blocked = false;\r\n\r\n\tcheckbox.type = 'checkbox';\r\n\r\n\tcheckbox.setAttribute(\"aria-label\", \"Select Row\");\r\n\t\r\n\tif(this.table.modExists(\"selectRow\", true)){\r\n\r\n\t\tcheckbox.addEventListener(\"click\", (e) => {\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tif(typeof cell.getRow == 'function'){\r\n\t\t\tvar row = cell.getRow();\r\n\r\n\t\t\tif(row instanceof RowComponent){\r\n\r\n\t\t\t\tcheckbox.addEventListener(\"change\", (e) => {\r\n\t\t\t\t\tif(this.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\t\tif(!blocked){\r\n\t\t\t\t\t\t\trow.toggleSelect();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tblocked = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trow.toggleSelect();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\tcheckbox.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\tblocked = true;\r\n\t\t\t\t\t\tthis.table.modules.selectRow.handleComplexRowClick(row._row, e);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcheckbox.checked = row.isSelected && row.isSelected();\r\n\t\t\t\tthis.table.modules.selectRow.registerRowSelectCheckbox(row, checkbox);\r\n\t\t\t}else{\r\n\t\t\t\tcheckbox = \"\";\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tcheckbox.addEventListener(\"change\", (e) => {\r\n\t\t\t\tif(this.table.modules.selectRow.selectedRows.length){\r\n\t\t\t\t\tthis.table.deselectRow();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis.table.selectRow(formatterParams.rowRange);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.table.modules.selectRow.registerHeaderSelectCheckbox(checkbox);\r\n\t\t}\r\n\t}\r\n\r\n\treturn checkbox;\r\n};","import plaintext from './formatters/plaintext.js';\r\nimport html from './formatters/html.js';\r\nimport textarea from './formatters/textarea.js';\r\nimport money from './formatters/money.js';\r\nimport link from './formatters/link.js';\r\nimport image from './formatters/image.js';\r\nimport tickCross from './formatters/tickCross.js';\r\nimport datetime from './formatters/datetime.js';\r\nimport datetimediff from './formatters/datetimediff.js';\r\nimport lookup from './formatters/lookup.js';\r\nimport star from './formatters/star.js';\r\nimport traffic from './formatters/traffic.js';\r\nimport progress from './formatters/progress.js';\r\nimport color from './formatters/color.js';\r\nimport buttonTick from './formatters/buttonTick.js';\r\nimport buttonCross from './formatters/buttonCross.js';\r\nimport rownum from './formatters/rownum.js';\r\nimport handle from './formatters/handle.js';\r\nimport responsiveCollapse from './formatters/responsiveCollapse.js';\r\nimport rowSelection from './formatters/rowSelection.js';\r\n\r\nexport default {\r\n\tplaintext:plaintext,\r\n\thtml:html,\r\n\ttextarea:textarea,\r\n\tmoney:money,\r\n\tlink:link,\r\n\timage:image,\r\n\ttickCross:tickCross,\r\n\tdatetime:datetime,\r\n\tdatetimediff:datetimediff,\r\n\tlookup:lookup,\r\n\tstar:star,\r\n\ttraffic:traffic,\r\n\tprogress:progress,\r\n\tcolor:color,\r\n\tbuttonTick:buttonTick,\r\n\tbuttonCross:buttonCross,\r\n\trownum:rownum,\r\n\thandle:handle,\r\n\tresponsiveCollapse:responsiveCollapse,\r\n\trowSelection:rowSelection,\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultFormatters from './defaults/formatters.js';\r\n\r\nclass Format extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.registerColumnOption(\"formatter\");\r\n\t\tthis.registerColumnOption(\"formatterParams\");\r\n\r\n\t\tthis.registerColumnOption(\"formatterPrint\");\r\n\t\tthis.registerColumnOption(\"formatterPrintParams\");\r\n\t\tthis.registerColumnOption(\"formatterClipboard\");\r\n\t\tthis.registerColumnOption(\"formatterClipboardParams\");\r\n\t\tthis.registerColumnOption(\"formatterHtmlOutput\");\r\n\t\tthis.registerColumnOption(\"formatterHtmlOutputParams\");\r\n\t\tthis.registerColumnOption(\"titleFormatter\");\r\n\t\tthis.registerColumnOption(\"titleFormatterParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-format\", this.formatValue.bind(this));\r\n\t\tthis.subscribe(\"cell-rendered\", this.cellRendered.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"column-format\", this.formatHeader.bind(this));\r\n\t}\r\n\r\n\t//initialize column formatter\r\n\tinitializeColumn(column){\r\n\t\tcolumn.modules.format = this.lookupFormatter(column, \"\");\r\n\r\n\t\tif(typeof column.definition.formatterPrint !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.print = this.lookupFormatter(column, \"Print\");\r\n\t\t}\r\n\r\n\t\tif(typeof column.definition.formatterClipboard !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.clipboard = this.lookupFormatter(column, \"Clipboard\");\r\n\t\t}\r\n\r\n\t\tif(typeof column.definition.formatterHtmlOutput !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.htmlOutput = this.lookupFormatter(column, \"HtmlOutput\");\r\n\t\t}\r\n\t}\r\n\r\n\tlookupFormatter(column, type){\r\n\t\tvar config = {params:column.definition[\"formatter\" + type + \"Params\"] || {}},\r\n\t\tformatter = column.definition[\"formatter\" + type];\r\n\r\n\t\t//set column formatter\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\tconfig.formatter = Format.formatters[formatter];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tconfig.formatter = formatter;\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn config;\r\n\t}\r\n\r\n\tcellRendered(cell){\r\n\t\tif(cell.modules.format && cell.modules.format.renderedCallback && !cell.modules.format.rendered){\r\n\t\t\tcell.modules.format.renderedCallback();\r\n\t\t\tcell.modules.format.rendered = true;\r\n\t\t}\r\n\t}\r\n\r\n\t//return a formatted value for a column header\r\n\tformatHeader(column, title, el){\r\n\t\tvar formatter, params, onRendered, mockCell;\r\n\r\n\t\tif(column.definition.titleFormatter){\r\n\t\t\tformatter = this.getFormatter(column.definition.titleFormatter);\r\n\r\n\t\t\tonRendered = (callback) => {\r\n\t\t\t\tcolumn.titleFormatterRendered = callback;\r\n\t\t\t};\r\n\r\n\t\t\tmockCell = {\r\n\t\t\t\tgetValue:function(){\r\n\t\t\t\t\treturn title;\r\n\t\t\t\t},\r\n\t\t\t\tgetElement:function(){\r\n\t\t\t\t\treturn el;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tparams = column.definition.titleFormatterParams || {};\r\n\r\n\t\t\tparams = typeof params === \"function\" ? params() : params;\r\n\r\n\t\t\treturn formatter.call(this, mockCell, params, onRendered);\r\n\t\t}else{\r\n\t\t\treturn title;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//return a formatted value for a cell\r\n\tformatValue(cell){\r\n\t\tvar component = cell.getComponent(),\r\n\t\tparams = typeof cell.column.modules.format.params === \"function\" ? cell.column.modules.format.params(component) : cell.column.modules.format.params;\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\tif(!cell.modules.format){\r\n\t\t\t\tcell.modules.format = {};\r\n\t\t\t}\r\n\r\n\t\t\tcell.modules.format.renderedCallback = callback;\r\n\t\t\tcell.modules.format.rendered = false;\r\n\t\t}\r\n\r\n\t\treturn cell.column.modules.format.formatter.call(this, component, params, onRendered);\r\n\t}\r\n\r\n\tformatExportValue(cell, type){\r\n\t\tvar formatter = cell.column.modules.format[type],\r\n\t\tparams;\r\n\r\n\t\tif(formatter){\r\n\t\t\tparams = typeof formatter.params === \"function\" ? formatter.params(component) : formatter.params;\r\n\r\n\t\t\tfunction onRendered(callback){\r\n\t\t\t\tif(!cell.modules.format){\r\n\t\t\t\t\tcell.modules.format = {};\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcell.modules.format.renderedCallback = callback;\r\n\t\t\t\tcell.modules.format.rendered = false;\r\n\t\t\t}\r\n\r\n\t\t\treturn formatter.formatter.call(this, cell.getComponent(), params, onRendered);\r\n\r\n\t\t}else{\r\n\t\t\treturn this.formatValue(cell);\r\n\t\t}\r\n\t}\r\n\r\n\tsanitizeHTML(value){\r\n\t\tif(value){\r\n\t\t\tvar entityMap = {\r\n\t\t\t\t'&': '&',\r\n\t\t\t\t'<': '<',\r\n\t\t\t\t'>': '>',\r\n\t\t\t\t'\"': '"',\r\n\t\t\t\t\"'\": ''',\r\n\t\t\t\t'/': '/',\r\n\t\t\t\t'`': '`',\r\n\t\t\t\t'=': '='\r\n\t\t\t};\r\n\r\n\t\t\treturn String(value).replace(/[&<>\"'`=\\/]/g, function (s) {\r\n\t\t\t\treturn entityMap[s];\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn value;\r\n\t\t}\r\n\t}\r\n\r\n\temptyToSpace(value){\r\n\t\treturn value === null || typeof value === \"undefined\" || value === \"\" ? \" \" : value;\r\n\t}\r\n\r\n\t//get formatter for cell\r\n\tgetFormatter(formatter){\r\n\t\tvar formatter;\r\n\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\tformatter = Format.formatters[formatter]\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tformatter = formatter;\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn formatter;\r\n\t}\r\n}\r\n\r\nFormat.moduleName = \"format\";\r\n\r\n//load defaults\r\nFormat.formatters = defaultFormatters;\r\n\r\nexport default Format;","import Module from '../../core/Module.js';\r\n\r\nclass FrozenColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.leftColumns = [];\r\n\t\tthis.rightColumns = [];\r\n\t\tthis.leftMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.rightPadding = 0;\r\n\t\tthis.initializationMode = \"left\";\r\n\t\tthis.active = false;\r\n\t\tthis.scrollEndTimer = false;\r\n\t\tthis.blocked = true;\r\n\t\t\r\n\t\tthis.registerColumnOption(\"frozen\");\r\n\t}\r\n\t\r\n\t//reset initial state\r\n\treset(){\r\n\t\tthis.initializationMode = \"left\";\r\n\t\tthis.leftColumns = [];\r\n\t\tthis.rightColumns = [];\r\n\t\tthis.leftMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.active = false;\r\n\t\t\r\n\t\tthis.table.columnManager.headersElement.style.marginLeft = 0;\r\n\t\tthis.table.columnManager.element.style.paddingRight = 0;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-layout\", this.layoutCell.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"column-width\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"row-layout-after\", this.layoutRow.bind(this));\r\n\t\tthis.subscribe(\"table-layout\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t\tthis.subscribe(\"columns-loading\", this.reset.bind(this));\r\n\t\tthis.subscribe(\"table-redraw\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"layout-refreshing\", this.blockLayout.bind(this));\r\n\t\tthis.subscribe(\"layout-refreshed\", this.unblockLayout.bind(this));\r\n\t}\r\n\t\r\n\tblockLayout(){\r\n\t\tthis.blocked = true;\r\n\t}\r\n\t\r\n\tunblockLayout(){\r\n\t\tthis.blocked = false;\r\n\t}\r\n\t\r\n\tlayoutCell(cell){\r\n\t\tthis.layoutElement(cell.element, cell.column)\r\n\t}\r\n\t\r\n\t//initialize specific column\r\n\tinitializeColumn(column){\r\n\t\tvar config = {margin:0, edge:false};\r\n\t\t\r\n\t\tif(!column.isGroup){\r\n\t\t\t\r\n\t\t\tif(this.frozenCheck(column)){\r\n\t\t\t\t\r\n\t\t\t\tconfig.position = this.initializationMode;\r\n\t\t\t\t\r\n\t\t\t\tif(this.initializationMode == \"left\"){\r\n\t\t\t\t\tthis.leftColumns.push(column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.rightColumns.unshift(column);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.active = true;\r\n\t\t\t\t\r\n\t\t\t\tcolumn.modules.frozen = config;\r\n\t\t\t}else{\r\n\t\t\t\tthis.initializationMode = \"right\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfrozenCheck(column){\r\n\t\tvar frozen = false;\r\n\t\t\r\n\t\tif(column.parent.isGroup && column.definition.frozen){\r\n\t\t\tconsole.warn(\"Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups\");\r\n\t\t}\r\n\t\t\r\n\t\tif(column.parent.isGroup){\r\n\t\t\treturn this.frozenCheck(column.parent);\r\n\t\t}else{\r\n\t\t\treturn column.definition.frozen;\r\n\t\t}\r\n\t\t\r\n\t\treturn frozen;\r\n\t}\r\n\t\r\n\t//quick layout to smooth horizontal scrolling\r\n\tscrollHorizontal(){\r\n\t\tvar rows;\r\n\t\t\r\n\t\tif(this.active){\r\n\t\t\tclearTimeout(this.scrollEndTimer);\r\n\r\n\t\t\trows = this.table.rowManager.getVisibleRows();\r\n\t\t\t\r\n\t\t\tthis.calcMargins(true);\r\n\t\t\t\r\n\t\t\tthis.layoutColumnPosition();\r\n\t\t\t\r\n\t\t\tthis.layoutCalcRows();\r\n\t\t\t\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\t//calculate margins for rows\r\n\tcalcMargins(scroll){\r\n\t\t\r\n\t\tif(!scroll){\r\n\t\t\tthis.leftMargin = this._calcSpace(this.leftColumns, this.leftColumns.length) + \"px\";\t\t\t\r\n\t\t\tthis.rightMargin = this._calcSpace(this.rightColumns, this.rightColumns.length) + \"px\";\t\r\n\t\t\tthis.table.rowManager.tableElement.style.marginRight = this.rightMargin;\r\n\t\t}\r\n\t\r\n\t\t//calculate right frozen columns\r\n\t\tthis.rightPadding = this.table.rowManager.element.clientWidth + this.table.columnManager.scrollLeft;\r\n\t}\r\n\t\r\n\t//layout calculation rows\r\n\tlayoutCalcRows(){\r\n\t\tif(this.table.modExists(\"columnCalcs\")){\r\n\t\t\tif(this.table.modules.columnCalcs.topInitialized && this.table.modules.columnCalcs.topRow){\r\n\t\t\t\tthis.layoutRow(this.table.modules.columnCalcs.topRow);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.modules.columnCalcs.botInitialized && this.table.modules.columnCalcs.botRow){\r\n\t\t\t\tthis.layoutRow(this.table.modules.columnCalcs.botRow);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.modExists(\"groupRows\")){\r\n\t\t\t\tthis.layoutGroupCalcs(this.table.modules.groupRows.getGroups())\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutGroupCalcs(groups){\r\n\t\tgroups.forEach((group) => {\r\n\t\t\tif(group.calcs.top){\r\n\t\t\t\tthis.layoutRow(group.calcs.top);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(group.calcs.bottom){\r\n\t\t\t\tthis.layoutRow(group.calcs.bottom);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(group.groupList && group.groupList.length){\r\n\t\t\t\tthis.layoutGroupCalcs(group.groupList && group.groupList);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//calculate column positions and layout headers\r\n\tlayoutColumnPosition(allCells){\r\n\t\tvar leftParents = [];\r\n\t\t\r\n\t\tvar leftMargin = 0;\r\n\t\tvar rightMargin = 0;\r\n\t\t\r\n\t\tthis.table.columnManager.headersElement.style.marginLeft = this.leftMargin;\r\n\t\tthis.table.columnManager.element.style.paddingRight = this.rightMargin;\r\n\r\n\t\tthis.leftColumns.forEach((column, i) => {\t\r\n\t\t\tcolumn.modules.frozen.margin = (leftMargin + this.table.columnManager.scrollLeft) + \"px\";\r\n\r\n\t\t\tif(column.visible){\r\n\t\t\t\tleftMargin += column.getWidth();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(i == this.leftColumns.length - 1){\r\n\t\t\t\tcolumn.modules.frozen.edge = true;\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.modules.frozen.edge = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(column.parent.isGroup){\r\n\t\t\t\tvar parentEl = this.getColGroupParentElement(column);\r\n\t\t\t\tif(!leftParents.includes(parentEl)){\r\n\t\t\t\t\tthis.layoutElement(parentEl, column);\r\n\t\t\t\t\tleftParents.push(parentEl);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(column.modules.frozen.edge){\r\n\t\t\t\t\tparentEl.classList.add(\"tabulator-frozen-\" + column.modules.frozen.position);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.layoutElement(column.getElement(), column);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(allCells){\r\n\t\t\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.rightColumns.forEach((column, i) => {\r\n\r\n\t\t\tif(column.visible){\r\n\t\t\t\trightMargin += column.getWidth();\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.modules.frozen.margin = (this.rightPadding - rightMargin) + \"px\";\r\n\t\t\t\r\n\t\t\tif(i == this.rightColumns.length - 1){\r\n\t\t\t\tcolumn.modules.frozen.edge = true;\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.modules.frozen.edge = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(column.parent.isGroup){\r\n\t\t\t\tthis.layoutElement(this.getColGroupParentElement(column), column);\r\n\t\t\t}else{\r\n\t\t\t\tthis.layoutElement(column.getElement(), column);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(allCells){\r\n\t\t\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tgetColGroupParentElement(column){\r\n\t\treturn column.parent.isGroup ? this.getColGroupParentElement(column.parent) : column.getElement();\r\n\t}\r\n\t\r\n\t//layout columns appropriately\r\n\tlayout(){\r\n\t\tif(this.active && !this.blocked){\r\n\t\t\t//calculate row padding\r\n\t\t\tthis.calcMargins();\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) =>{\r\n\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.layoutCalcRows();\r\n\t\t\t\r\n\t\t\t//calculate left columns\r\n\t\t\tthis.layoutColumnPosition(true);\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\t\t\r\n\t\trowEl.style.paddingLeft = this.leftMargin;\r\n\t\t\r\n\t\tif(this.table.options.layout === \"fitDataFill\" && this.rightColumns.length){\r\n\t\t\tthis.table.rowManager.getTableElement().style.minWidth = \"calc(100% - \" + this.rightMargin + \")\";\r\n\t\t}\r\n\t\t\r\n\t\tthis.leftColumns.forEach((column) => {\r\n\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\r\n\t\t\tif(cell){\r\n\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.rightColumns.forEach((column) => {\r\n\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\r\n\t\t\tif(cell){\r\n\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tlayoutElement(element, column){\r\n\t\t\r\n\t\tif(column.modules.frozen){\r\n\t\t\telement.style.position = \"absolute\";\r\n\t\t\telement.style.left = column.modules.frozen.margin;\r\n\t\t\t\r\n\t\t\telement.classList.add(\"tabulator-frozen\");\r\n\t\t\t\r\n\t\t\tif(column.modules.frozen.edge){\r\n\t\t\t\telement.classList.add(\"tabulator-frozen-\" + column.modules.frozen.position);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_calcSpace(columns, index){\r\n\t\tvar width = 0;\r\n\t\t\r\n\t\tfor (let i = 0; i < index; i++){\r\n\t\t\tif(columns[i].visible){\r\n\t\t\t\twidth += columns[i].getWidth();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn width;\r\n\t}\r\n}\r\n\r\nFrozenColumns.moduleName = \"frozenColumns\";\r\n\r\nexport default FrozenColumns;","import Module from '../../core/Module.js';\r\n\r\nclass FrozenRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.topElement = document.createElement(\"div\");\r\n\t\tthis.rows = [];\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"freeze\", this.freezeRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"unfreeze\", this.unfreezeRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isFrozen\", this.isRowFrozen.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.rows = [];\r\n\r\n\t\tthis.topElement.classList.add(\"tabulator-frozen-rows-holder\");\r\n\r\n\t\t// this.table.columnManager.element.append(this.topElement);\r\n\t\tthis.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\r\n\r\n\t\tthis.subscribe(\"row-deleting\", this.detachRow.bind(this));\r\n\t\tthis.subscribe(\"rows-visible\", this.visibleRows.bind(this));\r\n\r\n\t\tthis.registerDisplayHandler(this.getRows.bind(this), 10);\r\n\t}\r\n\r\n\tisRowFrozen(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\t\treturn index > -1;\r\n\t}\r\n\r\n\tisFrozen(){\r\n\t\treturn !!this.rows.length;\r\n\t}\r\n\r\n\tvisibleRows(viewable, rows){\r\n\t\tthis.rows.forEach((row) => {\r\n\t\t\trows.push(row);\r\n\t\t});\r\n\r\n\t\treturn rows;\r\n\t}\r\n\r\n\t//filter frozen rows out of display data\r\n\tgetRows(rows){\r\n\t\tvar self = this,\r\n\t\tfrozen = [],\r\n\t\toutput = rows.slice(0);\r\n\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\tvar index = output.indexOf(row);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\toutput.splice(index, 1);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tfreezeRow(row){\r\n\t\tif(!row.modules.frozen){\r\n\t\t\trow.modules.frozen = true;\r\n\t\t\tthis.topElement.appendChild(row.getElement());\r\n\t\t\trow.initialize();\r\n\t\t\trow.normalizeHeight();\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\tthis.rows.push(row);\r\n\r\n\t\t\tthis.refreshData(false, \"display\")\r\n\r\n\t\t\tthis.styleRows();\r\n\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Freeze Error - Row is already frozen\");\r\n\t\t}\r\n\t}\r\n\r\n\tunfreezeRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\r\n\t\tif(row.modules.frozen){\r\n\r\n\t\t\trow.modules.frozen = false;\r\n\r\n\t\t\tthis.detachRow(row);\r\n\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\tthis.refreshData(false, \"display\")\r\n\r\n\t\t\tif(this.rows.length){\r\n\t\t\t\tthis.styleRows();\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Freeze Error - Row is already unfrozen\");\r\n\t\t}\r\n\t}\r\n\r\n\tdetachRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tvar rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\r\n\t\t\tthis.rows.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\tstyleRows(row){\r\n\t\tthis.rows.forEach((row, i) => {\r\n\t\t\tthis.table.rowManager.styleRow(row, i);\r\n\t\t});\r\n\t}\r\n}\r\n\r\nFrozenRows.moduleName = \"frozenRows\";\r\n\r\nexport default FrozenRows;","//public group object\r\nclass GroupComponent {\r\n\tconstructor (group){\r\n\t\tthis._group = group;\r\n\t\tthis.type = \"GroupComponent\";\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._group.groupManager.table.componentFunctionBinder.handle(\"row\", target._group, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetKey(){\r\n\t\treturn this._group.key;\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._group.field;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._group.element;\r\n\t}\r\n\r\n\tgetRows(){\r\n\t\treturn this._group.getRows(true);\r\n\t}\r\n\r\n\tgetSubGroups(){\r\n\t\treturn this._group.getSubGroups(true);\r\n\t}\r\n\r\n\tgetParentGroup(){\r\n\t\treturn this._group.parent ? this._group.parent.getComponent() : false;\r\n\t}\r\n\r\n\tisVisible(){\r\n\t\treturn this._group.visible;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tthis._group.show();\r\n\t}\r\n\r\n\thide(){\r\n\t\tthis._group.hide();\r\n\t}\r\n\r\n\ttoggle(){\r\n\t\tthis._group.toggleVisibility();\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._group;\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._group.groupManager.table;\r\n\t}\r\n}\r\n\r\nexport default GroupComponent;","import Helpers from '../../core/tools/Helpers.js';\r\nimport GroupComponent from './GroupComponent.js';\r\n\r\n//Group functions\r\nclass Group{\r\n\t\r\n\tconstructor(groupManager, parent, level, key, field, generator, oldGroup){\r\n\t\tthis.groupManager = groupManager;\r\n\t\tthis.parent = parent;\r\n\t\tthis.key = key;\r\n\t\tthis.level = level;\r\n\t\tthis.field = field;\r\n\t\tthis.hasSubGroups = level < (groupManager.groupIDLookups.length - 1);\r\n\t\tthis.addRow = this.hasSubGroups ? this._addRowToGroup : this._addRow;\r\n\t\tthis.type = \"group\"; //type of element\r\n\t\tthis.old = oldGroup;\r\n\t\tthis.rows = [];\r\n\t\tthis.groups = [];\r\n\t\tthis.groupList = [];\r\n\t\tthis.generator = generator;\r\n\t\tthis.element = false;\r\n\t\tthis.elementContents = false;\r\n\t\tthis.height = 0;\r\n\t\tthis.outerHeight = 0;\r\n\t\tthis.initialized = false;\r\n\t\tthis.calcs = {};\r\n\t\tthis.initialized = false;\r\n\t\tthis.modules = {};\r\n\t\tthis.arrowElement = false;\r\n\t\t\r\n\t\tthis.visible = oldGroup ? oldGroup.visible : (typeof groupManager.startOpen[level] !== \"undefined\" ? groupManager.startOpen[level] : groupManager.startOpen[0]);\r\n\t\t\r\n\t\tthis.component = null;\r\n\t\t\r\n\t\tthis.createElements();\r\n\t\tthis.addBindings();\r\n\t\t\r\n\t\tthis.createValueGroups();\r\n\t}\r\n\t\r\n\twipe(){\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\tgroup.wipe();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\tif(row.modules){\r\n\t\t\t\t\tdelete row.modules.group;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\tthis.element = false;\r\n\t\tthis.arrowElement = false;\r\n\t\tthis.elementContents = false;\r\n\t}\r\n\t\r\n\tcreateElements(){\r\n\t\tvar arrow = document.createElement(\"div\");\r\n\t\tarrow.classList.add(\"tabulator-arrow\");\r\n\t\t\r\n\t\tthis.element = document.createElement(\"div\");\r\n\t\tthis.element.classList.add(\"tabulator-row\");\r\n\t\tthis.element.classList.add(\"tabulator-group\");\r\n\t\tthis.element.classList.add(\"tabulator-group-level-\" + this.level);\r\n\t\tthis.element.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\tthis.arrowElement = document.createElement(\"div\");\r\n\t\tthis.arrowElement.classList.add(\"tabulator-group-toggle\");\r\n\t\tthis.arrowElement.appendChild(arrow);\r\n\t\t\r\n\t\t//setup movable rows\r\n\t\tif(this.groupManager.table.options.movableRows !== false && this.groupManager.table.modExists(\"moveRow\")){\r\n\t\t\tthis.groupManager.table.modules.moveRow.initializeGroupHeader(this);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcreateValueGroups(){\r\n\t\tvar level = this.level + 1;\r\n\t\tif(this.groupManager.allowedValues && this.groupManager.allowedValues[level]){\r\n\t\t\tthis.groupManager.allowedValues[level].forEach((value) => {\r\n\t\t\t\tthis._createGroup(value, level);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\taddBindings(){\r\n\t\tvar toggleElement;\r\n\t\t\r\n\t\tif(this.groupManager.table.options.groupToggleElement){\r\n\t\t\ttoggleElement = this.groupManager.table.options.groupToggleElement == \"arrow\" ? this.arrowElement : this.element;\r\n\t\t\t\r\n\t\t\ttoggleElement.addEventListener(\"click\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\tthis.toggleVisibility();\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\t_createGroup(groupID, level){\r\n\t\tvar groupKey = level + \"_\" + groupID;\r\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);\r\n\t\t\r\n\t\tthis.groups[groupKey] = group;\r\n\t\tthis.groupList.push(group);\r\n\t}\r\n\t\r\n\t_addRowToGroup(row){\r\n\t\t\r\n\t\tvar level = this.level + 1;\r\n\t\t\r\n\t\tif(this.hasSubGroups){\r\n\t\t\tvar groupID = this.groupManager.groupIDLookups[level].func(row.getData()),\r\n\t\t\tgroupKey = level + \"_\" + groupID;\r\n\t\t\t\r\n\t\t\tif(this.groupManager.allowedValues && this.groupManager.allowedValues[level]){\r\n\t\t\t\tif(this.groups[groupKey]){\r\n\t\t\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(!this.groups[groupKey]){\r\n\t\t\t\t\tthis._createGroup(groupID, level);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_addRow(row){\r\n\t\tthis.rows.push(row);\r\n\t\trow.modules.group = this;\r\n\t}\r\n\t\r\n\tinsertRow(row, to, after){\r\n\t\tvar data = this.conformRowData({});\r\n\t\t\r\n\t\trow.updateData(data);\r\n\t\t\r\n\t\tvar toIndex = this.rows.indexOf(to);\r\n\t\t\r\n\t\tif(toIndex > -1){\r\n\t\t\tif(after){\r\n\t\t\t\tthis.rows.splice(toIndex+1, 0, row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.splice(toIndex, 0, row);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(after){\r\n\t\t\t\tthis.rows.push(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.unshift(row);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\trow.modules.group = this;\r\n\t\t\r\n\t\tthis.generateGroupHeaderContents();\r\n\t\t\r\n\t\tif(this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\tthis.groupManager.table.modules.columnCalcs.recalcGroup(this);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.updateGroupRows(true);\r\n\t}\r\n\t\r\n\tscrollHeader(left){\r\n\t\tif(this.arrowElement){\r\n\t\t\tthis.arrowElement.style.marginLeft = left;\r\n\t\t\t\r\n\t\t\tthis.groupList.forEach(function(child){\r\n\t\t\t\tchild.scrollHeader(left);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRowIndex(row){}\r\n\t\r\n\t//update row data to match grouping contraints\r\n\tconformRowData(data){\r\n\t\tif(this.field){\r\n\t\t\tdata[this.field] = this.key;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Data Conforming Error - Cannot conform row data to match new group as groupBy is a function\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.parent){\r\n\t\t\tdata = this.parent.conformRowData(data);\r\n\t\t}\r\n\t\t\r\n\t\treturn data;\r\n\t}\r\n\t\r\n\tremoveRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\t\tvar el = row.getElement();\r\n\t\t\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.rows.splice(index, 1);\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.groupManager.table.options.groupValues && !this.rows.length){\r\n\t\t\tif(this.parent){\r\n\t\t\t\tthis.parent.removeGroup(this);\r\n\t\t\t}else{\r\n\t\t\t\tthis.groupManager.removeGroup(this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tif(el.parentNode){\r\n\t\t\t\tel.parentNode.removeChild(el);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.generateGroupHeaderContents();\r\n\t\t\t\r\n\t\t\tif(this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\t\tthis.groupManager.table.modules.columnCalcs.recalcGroup(this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveGroup(group){\r\n\t\tvar groupKey = group.level + \"_\" + group.key,\r\n\t\tindex;\r\n\t\t\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tdelete this.groups[groupKey];\r\n\t\t\t\r\n\t\t\tindex = this.groupList.indexOf(group);\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.groupList.splice(index, 1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!this.groupList.length){\r\n\t\t\t\tif(this.parent){\r\n\t\t\t\t\tthis.parent.removeGroup(this);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.groupManager.removeGroup(this);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetHeadersAndRows(noCalc){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\toutput.push(this);\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(this.visible){\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\t\toutput = output.concat(group.getHeadersAndRows(noCalc));\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tif(!noCalc && this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\r\n\t\t\t\t\tif(this.calcs.top){\r\n\t\t\t\t\t\tthis.calcs.top.detachElement();\r\n\t\t\t\t\t\tthis.calcs.top.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows);\r\n\t\t\t\t\toutput.push(this.calcs.top);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\toutput = output.concat(this.rows);\r\n\t\t\t\t\r\n\t\t\t\tif(!noCalc && this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\r\n\t\t\t\t\tif(this.calcs.bottom){\r\n\t\t\t\t\t\tthis.calcs.bottom.detachElement();\r\n\t\t\t\t\t\tthis.calcs.bottom.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows);\r\n\t\t\t\t\toutput.push(this.calcs.bottom);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!this.groupList.length && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\t\t\r\n\t\t\t\tif(this.groupManager.table.modExists(\"columnCalcs\")){\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!noCalc && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\r\n\t\t\t\t\t\tif(this.calcs.top){\r\n\t\t\t\t\t\t\tthis.calcs.top.detachElement();\r\n\t\t\t\t\t\t\tthis.calcs.top.deleteCells();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.groupManager.table.options.groupClosedShowCalcs){\r\n\t\t\t\t\t\t\tthis.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows);\r\n\t\t\t\t\t\t\toutput.push(this.calcs.top);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!noCalc && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\r\n\t\t\t\t\t\tif(this.calcs.bottom){\r\n\t\t\t\t\t\t\tthis.calcs.bottom.detachElement();\r\n\t\t\t\t\t\t\tthis.calcs.bottom.deleteCells();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.groupManager.table.options.groupClosedShowCalcs){\r\n\t\t\t\t\t\t\tthis.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows);\r\n\t\t\t\t\t\t\toutput.push(this.calcs.bottom);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetData(visible, transform){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(!visible || (visible && this.visible)){\r\n\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\toutput.push(row.getData(transform || \"data\"));\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetRowCount(){\r\n\t\tvar count = 0;\r\n\t\t\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\tcount += group.getRowCount();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tcount = this.rows.length;\r\n\t\t}\r\n\t\treturn count;\r\n\t}\r\n\t\r\n\ttoggleVisibility(){\r\n\t\tif(this.visible){\r\n\t\t\tthis.hide();\r\n\t\t}else{\r\n\t\t\tthis.show();\r\n\t\t}\r\n\t}\r\n\t\r\n\thide(){\r\n\t\tthis.visible = false;\r\n\t\t\r\n\t\tif(this.groupManager.table.rowManager.getRenderMode() == \"classic\" && !this.groupManager.table.options.pagination){\r\n\t\t\t\r\n\t\t\tthis.element.classList.remove(\"tabulator-group-visible\");\r\n\t\t\t\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar rows = group.getHeadersAndRows();\r\n\t\t\t\t\t\r\n\t\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\t\trow.detachElement();\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex());\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth();\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.table.externalEvents.dispatch(\"groupVisibilityChanged\", this.getComponent(), false);\r\n\t}\r\n\t\r\n\tshow(){\r\n\t\tthis.visible = true;\r\n\t\t\r\n\t\tif(this.groupManager.table.rowManager.getRenderMode() == \"classic\" && !this.groupManager.table.options.pagination){\r\n\t\t\t\r\n\t\t\tthis.element.classList.add(\"tabulator-group-visible\");\r\n\t\t\t\r\n\t\t\tvar prev = this.generateElement();\r\n\t\t\t\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\t\tvar rows = group.getHeadersAndRows();\r\n\t\t\t\t\t\r\n\t\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\t\tprev.parentNode.insertBefore(rowEl, prev.nextSibling);\r\n\t\t\t\t\t\trow.initialize();\r\n\t\t\t\t\t\tprev = rowEl;\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\tprev.parentNode.insertBefore(rowEl, prev.nextSibling);\r\n\t\t\t\t\trow.initialize();\r\n\t\t\t\t\tprev = rowEl;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex());\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth();\r\n\t\t}else{\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.table.externalEvents.dispatch(\"groupVisibilityChanged\", this.getComponent(), true);\r\n\t}\r\n\t\r\n\t_visSet(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tif(typeof this.visible == \"function\"){\r\n\t\t\t\r\n\t\t\tthis.rows.forEach(function(row){\r\n\t\t\t\tdata.push(row.getData());\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.visible = this.visible(this.key, this.getRowCount(), data, this.getComponent());\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRowGroup(row){\r\n\t\tvar match = false;\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\tvar result = group.getRowGroup(row);\r\n\t\t\t\t\r\n\t\t\t\tif(result){\r\n\t\t\t\t\tmatch = result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tif(this.rows.find(function(item){\r\n\t\t\t\treturn item === row;\r\n\t\t\t})){\r\n\t\t\t\tmatch = this;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn match;\r\n\t}\r\n\t\r\n\tgetSubGroups(component){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.groupList.forEach(function(child){\r\n\t\t\toutput.push(component ? child.getComponent() : child);\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetRows(compoment){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\toutput.push(compoment ? row.getComponent() : row);\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgenerateGroupHeaderContents(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\tdata.push(row.getData());\r\n\t\t});\r\n\t\t\r\n\t\tthis.elementContents = this.generator(this.key, this.getRowCount(), data, this.getComponent());\r\n\t\t\r\n\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\t\t\r\n\t\tif(typeof this.elementContents === \"string\"){\r\n\t\t\tthis.element.innerHTML = this.elementContents;\r\n\t\t}else{\r\n\t\t\tthis.element.appendChild(this.elementContents);\r\n\t\t}\r\n\t\t\r\n\t\tthis.element.insertBefore(this.arrowElement, this.element.firstChild);\r\n\t}\r\n\t\r\n\tgetPath(path = []) {\r\n\t\tpath.unshift(this.key);\r\n\t\tif(this.parent) {\r\n\t\t\tthis.parent.getPath(path);\r\n\t\t}\r\n\t\treturn path;\r\n\t}\r\n\t\r\n\t////////////// Standard Row Functions //////////////\r\n\t\r\n\tgetElement(){\r\n\t\treturn this.elementContents ? this.element : this.generateElement();\r\n\t}\r\n\t\r\n\tgenerateElement(){\r\n\t\tthis.addBindings = false;\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(this.visible){\r\n\t\t\tthis.element.classList.add(\"tabulator-group-visible\");\r\n\t\t}else{\r\n\t\t\tthis.element.classList.remove(\"tabulator-group-visible\");\r\n\t\t}\r\n\t\t\r\n\t\tfor(var i = 0; i < this.element.childNodes.length; ++i){\r\n\t\t\tthis.element.childNodes[i].parentNode.removeChild(this.element.childNodes[i]);\r\n\t\t}\r\n\t\t\r\n\t\tthis.generateGroupHeaderContents();\r\n\t\t\r\n\t\t// this.addBindings();\r\n\t\t\r\n\t\treturn this.element;\r\n\t}\r\n\t\r\n\tdetachElement(){\r\n\t\tif (this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\t//normalize the height of elements in the row\r\n\tnormalizeHeight(){\r\n\t\tthis.setHeight(this.element.clientHeight);\r\n\t}\r\n\t\r\n\tinitialize(force){\r\n\t\tif(!this.initialized || force){\r\n\t\t\tthis.normalizeHeight();\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitialize(){\r\n\t\tthis.initialized = false;\r\n\t\tthis.height = 0;\r\n\t\t\r\n\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\tthis.initialize(true);\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetHeight(height){\r\n\t\tif(this.height != height){\r\n\t\t\tthis.height = height;\r\n\t\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return rows outer height\r\n\tgetHeight(){\r\n\t\treturn this.outerHeight;\r\n\t}\r\n\t\r\n\tgetGroup(){\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\treinitializeHeight(){}\r\n\t\r\n\tcalcHeight(){}\r\n\t\r\n\tsetCellHeight(){}\r\n\t\r\n\tclearCellHeight(){}\r\n\t\r\n\tdeinitializeHeight(){}\r\n\t\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new GroupComponent(this);\r\n\t\t}\r\n\t\t\r\n\t\treturn this.component;\r\n\t}\r\n}\r\n\r\nexport default Group;","import Module from '../../core/Module.js';\r\n\r\nimport GroupComponent from './GroupComponent.js';\r\nimport Group from './Group.js';\r\n\r\nclass GroupRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.groupIDLookups = false; //enable table grouping and set field to group by\r\n\t\tthis.startOpen = [function(){return false;}]; //starting state of group\r\n\t\tthis.headerGenerator = [function(){return \"\";}];\r\n\t\tthis.groupList = []; //ordered list of groups\r\n\t\tthis.allowedValues = false;\r\n\t\tthis.groups = {}; //hold row groups\r\n\t\tthis.displayIndex = 0; //index in display pipeline\r\n\r\n\t\tthis.displayHandler = this.getRows.bind(this);\r\n\r\n\t\t//register table options\r\n\t\tthis.registerTableOption(\"groupBy\", false); //enable table grouping and set field to group by\r\n\t\tthis.registerTableOption(\"groupStartOpen\", true); //starting state of group\r\n\t\tthis.registerTableOption(\"groupValues\", false);\r\n\t\tthis.registerTableOption(\"groupUpdateOnCellEdit\", false);\r\n\t\tthis.registerTableOption(\"groupHeader\", false); //header generation function\r\n\t\tthis.registerTableOption(\"groupHeaderPrint\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderClipboard\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderHtmlOutput\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderDownload\", null);\r\n\t\tthis.registerTableOption(\"groupToggleElement\", \"arrow\");\r\n\t\tthis.registerTableOption(\"groupClosedShowCalcs\", false);\r\n\r\n\t\t//register table functions\r\n\t\tthis.registerTableFunction(\"setGroupBy\", this.setGroupBy.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupValues\", this.setGroupValues.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupStartOpen\", this.setGroupStartOpen.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupHeader\", this.setGroupHeader.bind(this));\r\n\t\tthis.registerTableFunction(\"getGroups\", this.userGetGroups.bind(this));\r\n\t\tthis.registerTableFunction(\"getGroupedData\", this.userGetGroupedData.bind(this));\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"getGroup\", this.rowGetGroup.bind(this));\r\n\t}\r\n\r\n\t//initialize group configuration\r\n\tinitialize(){\r\n\t\tif(this.table.options.groupBy){\r\n\r\n\t\t\tif(this.table.options.groupUpdateOnCellEdit){\r\n\t\t\t\tthis.subscribe(\"cell-value-updated\", this.cellUpdated.bind(this));\r\n\t\t\t\tthis.subscribe(\"row-data-changed\", this.reassignRowToGroup.bind(this), 0);\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-built\", this.configureGroupSetup.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"row-deleting\", this.rowDeleting.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHeaders.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.wipe.bind(this));\r\n\t\t\tthis.subscribe(\"rows-added\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"row-moving\", this.rowMoving.bind(this));\r\n\t\t\tthis.subscribe(\"row-adding-index\", this.rowAddingIndex.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"rows-sample\", this.rowSample.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"render-virtual-fill\", this.virtualRenderFill.bind(this));\r\n\r\n\t\t\tthis.registerDisplayHandler(this.displayHandler, 20);\r\n\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tconfigureGroupSetup(){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tvar groupBy = this.table.options.groupBy,\r\n\t\t\tstartOpen = this.table.options.groupStartOpen,\r\n\t\t\tgroupHeader = this.table.options.groupHeader;\r\n\r\n\t\t\tthis.allowedValues = this.table.options.groupValues;\r\n\r\n\t\t\tif(Array.isArray(groupBy) && Array.isArray(groupHeader) && groupBy.length > groupHeader.length){\r\n\t\t\t\tconsole.warn(\"Error creating group headers, groupHeader array is shorter than groupBy array\");\r\n\t\t\t}\r\n\r\n\t\t\tthis.headerGenerator = [function(){return \"\";}];\r\n\t\t\tthis.startOpen = [function(){return false;}]; //starting state of group\r\n\r\n\t\t\tthis.langBind(\"groups|item\", (langValue, lang) => {\r\n\t\t\t\tthis.headerGenerator[0] = (value, count, data) => { //header layout function\r\n\t\t\t\t\treturn (typeof value === \"undefined\" ? \"\" : value) + \"(\" + count + \" \" + ((count === 1) ? langValue : lang.groups.items) + \")\";\r\n\t\t\t\t};\r\n\t\t\t});\r\n\r\n\t\t\tthis.groupIDLookups = [];\r\n\r\n\t\t\tif(Array.isArray(groupBy) || groupBy){\r\n\t\t\t\tif(this.table.modExists(\"columnCalcs\") && this.table.options.columnCalcs != \"table\" && this.table.options.columnCalcs != \"both\"){\r\n\t\t\t\t\tthis.table.modules.columnCalcs.removeCalcs();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.modExists(\"columnCalcs\") && this.table.options.columnCalcs != \"group\"){\r\n\r\n\t\t\t\t\tvar cols = this.table.columnManager.getRealColumns();\r\n\r\n\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\tif(col.definition.topCalc){\r\n\t\t\t\t\t\t\tthis.table.modules.columnCalcs.initializeTopRow();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(col.definition.bottomCalc){\r\n\t\t\t\t\t\t\tthis.table.modules.columnCalcs.initializeBottomRow();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(!Array.isArray(groupBy)){\r\n\t\t\t\tgroupBy = [groupBy];\r\n\t\t\t}\r\n\r\n\t\t\tgroupBy.forEach((group, i) => {\r\n\t\t\t\tvar lookupFunc, column;\r\n\r\n\t\t\t\tif(typeof group == \"function\"){\r\n\t\t\t\t\tlookupFunc = group;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolumn = this.table.columnManager.getColumnByField(group);\r\n\r\n\t\t\t\t\tif(column){\r\n\t\t\t\t\t\tlookupFunc = function(data){\r\n\t\t\t\t\t\t\treturn column.getFieldValue(data);\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tlookupFunc = function(data){\r\n\t\t\t\t\t\t\treturn data[group];\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.groupIDLookups.push({\r\n\t\t\t\t\tfield: typeof group === \"function\" ? false : group,\r\n\t\t\t\t\tfunc:lookupFunc,\r\n\t\t\t\t\tvalues:this.allowedValues ? this.allowedValues[i] : false,\r\n\t\t\t\t});\r\n\t\t\t});\r\n\r\n\t\t\tif(startOpen){\r\n\t\t\t\tif(!Array.isArray(startOpen)){\r\n\t\t\t\t\tstartOpen = [startOpen];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstartOpen.forEach((level) => {\r\n\t\t\t\t\tlevel = typeof level == \"function\" ? level : function(){return true;};\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.startOpen = startOpen;\r\n\t\t\t}\r\n\r\n\t\t\tif(groupHeader){\r\n\t\t\t\tthis.headerGenerator = Array.isArray(groupHeader) ? groupHeader : [groupHeader];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trowSample(rows, prevValue){\r\n\t\tvar group = this.getGroups(false)[0];\r\n\r\n\t\tprevValue.push(group.getRows(false)[0]);\r\n\r\n\t\treturn prevValue;\r\n\t}\r\n\r\n\tvirtualRenderFill(){\r\n\t\tvar el = this.table.rowManager.tableElement;\r\n\t\tvar rows = this.table.rowManager.getVisibleRows();\r\n\r\n\t\trows = rows.filter((row) => {\r\n\t\t\treturn row.type !== \"group\";\r\n\t\t});\r\n\r\n\t\tel.style.minWidth = !rows.length ? this.table.columnManager.getWidth() + \"px\" : \"\";\r\n\r\n\t\t// if(this.table.options.groupBy){\r\n\t\t// \tif(this.layoutMode() != \"fitDataFill\" && rowsCount == this.table.modules.groupRows.countGroups()){\r\n\t\t// \t\tel.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t// \t}\r\n\t\t// }\r\n\t}\r\n\r\n\trowAddingIndex(row, index, top){\r\n\t\tthis.assignRowToGroup(row);\r\n\r\n\t\tvar groupRows = row.modules.group.rows;\r\n\r\n\t\tif(groupRows.length > 1){\r\n\t\t\tif(!index || (index && groupRows.indexOf(index) == -1)){\r\n\t\t\t\tif(top){\r\n\t\t\t\t\tif(groupRows[0] !== row){\r\n\t\t\t\t\t\tindex = groupRows[0];\r\n\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(groupRows[groupRows.length -1] !== row){\r\n\t\t\t\t\t\tindex = groupRows[groupRows.length -1];\r\n\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn index;\r\n\t}\r\n\r\n\ttrackChanges(){\r\n\t\tthis.dispatch(\"group-changed\");\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tsetGroupBy(groups){\r\n\t\tthis.table.options.groupBy = groups;\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.initialize();\r\n\t\t}else{\r\n\t\t\tthis.configureGroupSetup();\r\n\t\t}\r\n\r\n\t\tthis.refreshData();\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\tsetGroupValues(groupValues){\r\n\t\tthis.table.options.groupValues = groupValues;\r\n\t\tthis.configureGroupSetup();\r\n\t\tthis.refreshData();\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\tsetGroupStartOpen(values){\r\n\t\tthis.table.options.groupStartOpen = values;\r\n\t\tthis.configureGroupSetup();\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\r\n\t\t\tthis.trackChanges();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Grouping Update - cant refresh view, no groups have been set\");\r\n\t\t}\r\n\t}\r\n\r\n\tsetGroupHeader(values){\r\n\t\tthis.table.options.groupHeader = values;\r\n\t\tthis.configureGroupSetup();\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\r\n\t\t\tthis.trackChanges();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Grouping Update - cant refresh view, no groups have been set\");\r\n\t\t}\r\n\t}\r\n\r\n\tuserGetGroups(values){\r\n\t\treturn this.getGroups(true);\r\n\t}\r\n\r\n\t// get grouped table data in the same format as getData()\r\n\tuserGetGroupedData(){\r\n\t\treturn this.table.options.groupBy ?\r\n\t\tthis.getGroupedData() : this.getData()\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////////\r\n\t///////// Component Functions /////////\r\n\t///////////////////////////////////////\r\n\r\n\trowGetGroup(row){\r\n\t\treturn row.modules.group ? row.modules.group.getComponent() : false;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\trowMoving(from, to, after){\r\n\t\tif(!after && to instanceof Group){\r\n\t\t\tto = this.table.rowManager.prevDisplayRow(from) || to;\r\n\t\t}\r\n\r\n\t\tvar toGroup = to instanceof Group ? to : to.modules.group;\r\n\t\tvar fromGroup = from instanceof Group ? from : from.modules.group;\r\n\r\n\t\tif(toGroup === fromGroup){\r\n\t\t\tthis.table.rowManager.moveRowInArray(toGroup.rows, from, to, after);\r\n\t\t}else{\r\n\t\t\tif(fromGroup){\r\n\t\t\t\tfromGroup.removeRow(from);\r\n\t\t\t}\r\n\r\n\t\t\ttoGroup.insertRow(from, to, after);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trowDeleting(row){\r\n\t\t//remove from group\r\n\t\tif(row.modules.group){\r\n\t\t\trow.modules.group.removeRow(row);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trowsUpdated(row){\r\n\t\tthis.updateGroupRows(true);\r\n\t}\r\n\r\n\tcellUpdated(cell){\r\n\t\tthis.reassignRowToGroup(cell.row);\r\n\t}\r\n\r\n\r\n\tsetDisplayIndex(index){\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\r\n\tgetDisplayIndex(){\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\r\n\t//return appropriate rows with group headers\r\n\tgetRows(rows){\r\n\t\tif(this.table.options.groupBy && this.groupIDLookups.length){\r\n\r\n\t\t\tthis.dispatchExternal(\"dataGrouping\");\r\n\r\n\t\t\tthis.generateGroups(rows);\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataGrouped\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataGrouped\", this.getGroups(true));\r\n\t\t\t}\r\n\r\n\t\t\treturn this.updateGroupRows();\r\n\r\n\t\t}else{\r\n\t\t\treturn rows.slice(0);\r\n\t\t}\r\n\t}\r\n\r\n\tgetGroups(component){\r\n\t\tvar groupComponents = [];\r\n\r\n\t\tthis.groupList.forEach(function(group){\r\n\t\t\tgroupComponents.push(component ? group.getComponent() : group);\r\n\t\t});\r\n\r\n\t\treturn groupComponents;\r\n\t}\r\n\r\n\tgetChildGroups(group){\r\n\t\tvar groupComponents = [];\r\n\r\n\t\tif(!group){\r\n\t\t\tgroup = this;\r\n\t\t}\r\n\r\n\t\tgroup.groupList.forEach((child) => {\r\n\t\t\tif(child.groupList.length){\r\n\t\t\t\tgroupComponents = groupComponents.concat(this.getChildGroups(child));\r\n\t\t\t}else{\r\n\t\t\t\tgroupComponents.push(child);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn groupComponents;\r\n\t}\r\n\r\n\twipe(){\r\n\t\tthis.groupList.forEach(function(group){\r\n\t\t\tgroup.wipe();\r\n\t\t});\r\n\t}\r\n\r\n\tpullGroupListData(groupList) {\r\n\t\tvar groupListData = [];\r\n\r\n\t\tgroupList.forEach((group) => {\r\n\t\t\tvar groupHeader = {};\r\n\t\t\tgroupHeader.level = 0;\r\n\t\t\tgroupHeader.rowCount = 0;\r\n\t\t\tgroupHeader.headerContent = \"\";\r\n\t\t\tvar childData = [];\r\n\r\n\t\t\tif (group.hasSubGroups) {\r\n\t\t\t\tchildData = this.pullGroupListData(group.groupList);\r\n\r\n\t\t\t\tgroupHeader.level = group.level;\r\n\t\t\t\tgroupHeader.rowCount = childData.length - group.groupList.length; // data length minus number of sub-headers\r\n\t\t\t\tgroupHeader.headerContent = group.generator(group.key, groupHeader.rowCount, group.rows, group);\r\n\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\t\t\t\tgroupListData = groupListData.concat(childData);\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tgroupHeader.level = group.level;\r\n\t\t\t\tgroupHeader.headerContent = group.generator(group.key, group.rows.length, group.rows, group);\r\n\t\t\t\tgroupHeader.rowCount = group.getRows().length;\r\n\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\r\n\t\t\t\tgroup.getRows().forEach((row) => {\r\n\t\t\t\t\tgroupListData.push(row.getData(\"data\"));\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn groupListData\r\n\t}\r\n\r\n\tgetGroupedData(){\r\n\r\n\t\treturn this.pullGroupListData(this.groupList);\r\n\t}\r\n\r\n\tgetRowGroup(row){\r\n\t\tvar match = false;\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\tvar result = group.getRowGroup(row);\r\n\r\n\t\t\tif(result){\r\n\t\t\t\tmatch = result;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tcountGroups(){\r\n\t\treturn this.groupList.length;\r\n\t}\r\n\r\n\tgenerateGroups(rows){\r\n\t\tvar oldGroups = this.groups;\r\n\r\n\t\tthis.groups = {};\r\n\t\tthis.groupList = [];\r\n\r\n\t\tif(this.allowedValues && this.allowedValues[0]){\r\n\t\t\tthis.allowedValues[0].forEach((value) => {\r\n\t\t\t\tthis.createGroup(value, 0, oldGroups);\r\n\t\t\t});\r\n\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tthis.assignRowToExistingGroup(row, oldGroups);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tthis.assignRowToGroup(row, oldGroups);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tcreateGroup(groupID, level, oldGroups){\r\n\t\tvar groupKey = level + \"_\" + groupID,\r\n\t\tgroup;\r\n\r\n\t\toldGroups = oldGroups || [];\r\n\r\n\t\tgroup = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]);\r\n\r\n\t\tthis.groups[groupKey] = group;\r\n\t\tthis.groupList.push(group);\r\n\t}\r\n\r\n\tassignRowToExistingGroup(row, oldGroups){\r\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\r\n\t\tgroupKey = \"0_\" + groupID;\r\n\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t}\r\n\t}\r\n\r\n\tassignRowToGroup(row, oldGroups){\r\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\r\n\t\tnewGroupNeeded = !this.groups[\"0_\" + groupID];\r\n\r\n\t\tif(newGroupNeeded){\r\n\t\t\tthis.createGroup(groupID, 0, oldGroups);\r\n\t\t}\r\n\r\n\t\tthis.groups[\"0_\" + groupID].addRow(row);\r\n\r\n\t\treturn !newGroupNeeded;\r\n\t}\r\n\r\n\treassignRowToGroup(row){\r\n\t\tif(row.type === \"row\"){\r\n\t\t\tvar oldRowGroup = row.modules.group,\r\n\t\t\toldGroupPath = oldRowGroup.getPath(),\r\n\t\t\tnewGroupPath = this.getExpectedPath(row),\r\n\t\t\tsamePath = true;\r\n\r\n\t\t\t// figure out if new group path is the same as old group path\r\n\t\t\tvar samePath = (oldGroupPath.length == newGroupPath.length) && oldGroupPath.every((element, index) => {\r\n\t\t\t\treturn element === newGroupPath[index];\r\n\t\t\t});\r\n\r\n\t\t\t// refresh if they new path and old path aren't the same (aka the row's groupings have changed)\r\n\t\t\tif(!samePath) {\r\n\t\t\t\toldRowGroup.removeRow(row);\r\n\t\t\t\tthis.assignRowToGroup(row, this.groups);\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgetExpectedPath(row) {\r\n\t\tvar groupPath = [], rowData = row.getData();\r\n\r\n\t\tthis.groupIDLookups.forEach((groupId) => {\r\n\t\t\tgroupPath.push(groupId.func(rowData));\r\n\t\t});\r\n\r\n\t\treturn groupPath;\r\n\t}\r\n\r\n\tupdateGroupRows(force){\r\n\t\tvar output = [],\r\n\t\toldRowCount;\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\toutput = output.concat(group.getHeadersAndRows());\r\n\t\t});\r\n\r\n\t\tif(force){\r\n\t\t\tthis.refreshData(true, this.displayHandler);\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tscrollHeaders(left){\r\n\t\tif(this.table.options.renderHorizontal === \"virtual\"){\r\n\t\t\tleft -= this.table.columnManager.renderer.vDomPadLeft;\r\n\t\t}\r\n\r\n\t\tleft = left + \"px\";\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\tgroup.scrollHeader(left);\r\n\t\t});\r\n\t}\r\n\r\n\tremoveGroup(group){\r\n\t\tvar groupKey = group.level + \"_\" + group.key,\r\n\t\tindex;\r\n\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tdelete this.groups[groupKey];\r\n\r\n\t\t\tindex = this.groupList.indexOf(group);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.groupList.splice(index, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nGroupRows.moduleName = \"groupRows\";\r\n\r\nexport default GroupRows;","export default {\r\n\tcellEdit: function(action){\r\n\t\taction.component.setValueProcessData(action.data.oldValue);\r\n\t\taction.component.cellRendered();\r\n\t},\r\n\r\n\trowAdd: function(action){\r\n\t\taction.component.deleteActual();\r\n\t},\r\n\r\n\trowDelete: function(action){\r\n\t\tvar newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index);\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tthis.table.modules.groupRows.updateGroupRows(true);\r\n\t\t}\r\n\r\n\t\tthis._rebindRow(action.component, newRow);\r\n\t},\r\n\r\n\trowMove: function(action){\r\n\t\tthis.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posFrom], !action.data.after);\r\n\t\tthis.table.rowManager.redraw();\r\n\t},\r\n};","export default {\r\n\tcellEdit: function(action){\r\n\t\taction.component.setValueProcessData(action.data.newValue);\r\n\t\taction.component.cellRendered();\r\n\t},\r\n\r\n\trowAdd: function(action){\r\n\t\tvar newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index);\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tthis.table.modules.groupRows.updateGroupRows(true);\r\n\t\t}\r\n\r\n\t\tthis._rebindRow(action.component, newRow);\r\n\t},\r\n\r\n\trowDelete:function(action){\r\n\t\taction.component.deleteActual();\r\n\t},\r\n\r\n\trowMove: function(action){\r\n\t\tthis.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posTo], action.data.after);\r\n\t\tthis.table.rowManager.redraw();\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\nimport Row from '../../core/row/Row.js';\r\nimport Cell from '../../core/cell/Cell.js';\r\n\r\nimport defaultUndoers from './defaults/undoers.js';\r\nimport defaultRedoers from './defaults/redoers.js';\r\n\r\nclass History extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.history = [];\r\n\t\tthis.index = -1;\r\n\r\n\t\tthis.registerTableOption(\"history\", false); //enable edit history\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.history){\r\n\t\t\tthis.subscribe(\"cell-value-updated\", this.cellUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"cell-delete\", this.clearComponentHistory.bind(this));\r\n\t\t\tthis.subscribe(\"row-delete\", this.rowDeleted.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.clear.bind(this));\r\n\t\t\tthis.subscribe(\"row-added\", this.rowAdded.bind(this));\r\n\t\t\tthis.subscribe(\"row-move\", this.rowMoved.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"undo\", this.undo.bind(this));\r\n\t\tthis.registerTableFunction(\"redo\", this.redo.bind(this));\r\n\t\tthis.registerTableFunction(\"getHistoryUndoSize\", this.getHistoryUndoSize.bind(this));\r\n\t\tthis.registerTableFunction(\"getHistoryRedoSize\", this.getHistoryRedoSize.bind(this));\r\n\t\tthis.registerTableFunction(\"clearHistory\", this.clear.bind(this));\r\n\t}\r\n\r\n\trowMoved(from, to, after){\r\n\t\tthis.action(\"rowMove\", from, {posFrom:this.table.rowManager.getRowPosition(from), posTo:this.table.rowManager.getRowPosition(to), to:to, after:after});\r\n\t}\r\n\r\n\trowAdded(row, data, pos, index){\r\n\t\tthis.action(\"rowAdd\", row, {data:data, pos:pos, index:index});\r\n\t}\r\n\r\n\trowDeleted(row){\r\n\t\tvar index, rows;\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\r\n\t\t\trows = row.getComponent().getGroup().rows\r\n\t\t\tindex = rows.indexOf(row);\r\n\r\n\t\t\tif(index){\r\n\t\t\t\tindex = rows[index-1];\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tindex = row.table.rowManager.getRowIndex(row);\r\n\r\n\t\t\tif(index){\r\n\t\t\t\tindex = row.table.rowManager.rows[index-1];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.action(\"rowDelete\", row, {data:row.getData(), pos:!index, index:index});\r\n\t}\r\n\r\n\tcellUpdated(cell){\r\n\t\tthis.action(\"cellEdit\", cell, {oldValue:cell.oldValue, newValue:cell.value});\r\n\t}\r\n\r\n\tclear(){\r\n\t\tthis.history = [];\r\n\t\tthis.index = -1;\r\n\t}\r\n\r\n\taction(type, component, data){\r\n\t\tthis.history = this.history.slice(0, this.index + 1);\r\n\r\n\t\tthis.history.push({\r\n\t\t\ttype:type,\r\n\t\t\tcomponent:component,\r\n\t\t\tdata:data,\r\n\t\t});\r\n\r\n\t\tthis.index ++;\r\n\t}\r\n\r\n\tgetHistoryUndoSize(){\r\n\t\treturn this.index + 1;\r\n\t}\r\n\r\n\tgetHistoryRedoSize(){\r\n\t\treturn this.history.length - (this.index + 1);\r\n\t}\r\n\r\n\tclearComponentHistory(component){\r\n\t\tvar index = this.history.findIndex(function(item){\r\n\t\t\treturn item.component === component;\r\n\t\t});\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.history.splice(index, 1);\r\n\t\t\tif(index <= this.index){\r\n\t\t\t\tthis.index--;\r\n\t\t\t}\r\n\r\n\t\t\tthis.clearComponentHistory(component);\r\n\t\t}\r\n\t}\r\n\r\n\tundo(){\r\n\t\tif(this.index > -1){\r\n\t\t\tlet action = this.history[this.index];\r\n\r\n\t\t\tHistory.undoers[action.type].call(this, action);\r\n\r\n\t\t\tthis.index--;\r\n\r\n\t\t\tthis.dispatchExternal(\"historyUndo\", action.type, action.component.getComponent(), action.data);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"History Undo Error - No more history to undo\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tredo(){\r\n\t\tif(this.history.length-1 > this.index){\r\n\r\n\t\t\tthis.index++;\r\n\r\n\t\t\tlet action = this.history[this.index];\r\n\r\n\t\t\tHistory.redoers[action.type].call(this, action);\r\n\r\n\t\t\tthis.dispatchExternal(\"historyRedo\", action.type, action.component.getComponent(), action.data);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"History Redo Error - No more history to redo\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//rebind rows to new element after deletion\r\n\t_rebindRow(oldRow, newRow){\r\n\t\tthis.history.forEach(function(action){\r\n\t\t\tif(action.component instanceof Row){\r\n\t\t\t\tif(action.component === oldRow){\r\n\t\t\t\t\taction.component = newRow;\r\n\t\t\t\t}\r\n\t\t\t}else if(action.component instanceof Cell){\r\n\t\t\t\tif(action.component.row === oldRow){\r\n\t\t\t\t\tvar field = action.component.column.getField();\r\n\r\n\t\t\t\t\tif(field){\r\n\t\t\t\t\t\taction.component = newRow.getCell(field);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}\r\n\r\nHistory.moduleName = \"history\";\r\n\r\n//load defaults\r\nHistory.undoers = defaultUndoers;\r\nHistory.redoers = defaultRedoers;\r\n\r\nexport default History;","import Module from '../../core/Module.js';\r\nimport Column from '../../core/column/Column.js';\r\n\r\nclass HtmlTableImport extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.fieldIndex = [];\r\n\t\tthis.hasIndex = false;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.tableElementCheck();\r\n\t}\r\n\r\n\ttableElementCheck(){\r\n\t\tif(this.table.originalElement && this.table.originalElement.tagName === \"TABLE\"){\r\n\t\t\tthis.parseTable();\r\n\t\t}\r\n\t}\r\n\r\n\tparseTable(){\r\n\t\tvar element = this.table.originalElement,\r\n\t\toptions = this.table.options,\r\n\t\tcolumns = options.columns,\r\n\t\theaders = element.getElementsByTagName(\"th\"),\r\n\t\trows = element.getElementsByTagName(\"tbody\")[0],\r\n\t\tdata = [],\r\n\t\tnewTable;\r\n\r\n\t\tthis.hasIndex = false;\r\n\r\n\t\tthis.dispatchExternal(\"htmlImporting\");\r\n\r\n\t\trows = rows ? rows.getElementsByTagName(\"tr\") : [];\r\n\r\n\t\t//check for Tabulator inline options\r\n\t\tthis._extractOptions(element, options);\r\n\r\n\t\tif(headers.length){\r\n\t\t\tthis._extractHeaders(headers, rows);\r\n\t\t}else{\r\n\t\t\tthis._generateBlankHeaders(headers, rows);\r\n\t\t}\r\n\r\n\t\t//iterate through table rows and build data set\r\n\t\tfor(var index = 0; index < rows.length; index++){\r\n\t\t\tvar row = rows[index],\r\n\t\t\tcells = row.getElementsByTagName(\"td\"),\r\n\t\t\titem = {};\r\n\r\n\t\t\t//create index if the dont exist in table\r\n\t\t\tif(!this.hasIndex){\r\n\t\t\t\titem[options.index] = index;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\tvar cell = cells[i];\r\n\t\t\t\tif(typeof this.fieldIndex[i] !== \"undefined\"){\r\n\t\t\t\t\titem[this.fieldIndex[i]] = cell.innerHTML;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//add row data to item\r\n\t\t\tdata.push(item);\r\n\t\t}\r\n\r\n\t\toptions.data = data;\r\n\r\n\t\tthis.dispatchExternal(\"htmlImported\");\r\n\t}\r\n\r\n\t//extract tabulator attribute options\r\n\t_extractOptions(element, options, defaultOptions){\r\n\t\tvar attributes = element.attributes;\r\n\t\tvar optionsArr = defaultOptions ? Object.keys(defaultOptions) : Object.keys(options);\r\n\t\tvar optionsList = {};\r\n\r\n\t\toptionsArr.forEach((item) => {\r\n\t\t\toptionsList[item.toLowerCase()] = item;\r\n\t\t});\r\n\r\n\t\tfor(var index in attributes){\r\n\t\t\tvar attrib = attributes[index];\r\n\t\t\tvar name;\r\n\r\n\t\t\tif(attrib && typeof attrib == \"object\" && attrib.name && attrib.name.indexOf(\"tabulator-\") === 0){\r\n\t\t\t\tname = attrib.name.replace(\"tabulator-\", \"\");\r\n\r\n\t\t\t\tif(typeof optionsList[name] !== \"undefined\"){\r\n\t\t\t\t\toptions[optionsList[name]] = this._attribValue(attrib.value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//get value of attribute\r\n\t_attribValue(value){\r\n\t\tif(value === \"true\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif(value === \"false\"){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\t//find column if it has already been defined\r\n\t_findCol(title){\r\n\t\tvar match = this.table.options.columns.find((column) => {\r\n\t\t\treturn column.title === title;\r\n\t\t});\r\n\r\n\t\treturn match || false;\r\n\t}\r\n\r\n\t//extract column from headers\r\n\t_extractHeaders(headers, rows){\r\n\t\tfor(var index = 0; index < headers.length; index++){\r\n\t\t\tvar header = headers[index],\r\n\t\t\texists = false,\r\n\t\t\tcol = this._findCol(header.textContent),\r\n\t\t\twidth, attributes;\r\n\r\n\t\t\tif(col){\r\n\t\t\t\texists = true;\r\n\t\t\t}else{\r\n\t\t\t\tcol = {title:header.textContent.trim()};\r\n\t\t\t}\r\n\r\n\t\t\tif(!col.field) {\r\n\t\t\t\tcol.field = header.textContent.trim().toLowerCase().replace(\" \", \"_\");\r\n\t\t\t}\r\n\r\n\t\t\twidth = header.getAttribute(\"width\");\r\n\r\n\t\t\tif(width && !col.width)\t{\r\n\t\t\t\tcol.width = width;\r\n\t\t\t}\r\n\r\n\t\t\t//check for Tabulator inline options\r\n\t\t\tthis._extractOptions(header, col, this.table.columnManager.optionsList.registeredDefaults);\r\n\r\n\t\t\tthis.fieldIndex[index] = col.field;\r\n\r\n\t\t\tif(col.field == this.table.options.index){\r\n\t\t\t\tthis.hasIndex = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(!exists){\r\n\t\t\t\tthis.table.options.columns.push(col);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\r\n\t//generate blank headers\r\n\t_generateBlankHeaders(headers, rows){\r\n\t\tfor(var index = 0; index < headers.length; index++){\r\n\t\t\tvar header = headers[index],\r\n\t\t\tcol = {title:\"\", field:\"col\" + index};\r\n\r\n\t\t\tthis.fieldIndex[index] = col.field;\r\n\r\n\t\t\tvar width = header.getAttribute(\"width\");\r\n\r\n\t\t\tif(width){\r\n\t\t\t\tcol.width = width;\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.options.columns.push(col);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nHtmlTableImport.moduleName = \"htmlTableImport\";\r\n\r\nexport default HtmlTableImport;","function csvImporter(input){\r\n var data = [],\r\n row = 0, \r\n col = 0,\r\n inQuote = false;\r\n \r\n //Iterate over each character\r\n for (let index = 0; index < input.length; index++) {\r\n let char = input[index], \r\n nextChar = input[index+1]; \r\n \r\n //Initialize empty row\r\n if(!data[row]){\r\n data[row] = [];\r\n }\r\n\r\n //Initialize empty column\r\n if(!data[row][col]){\r\n data[row][col] = \"\";\r\n }\r\n \r\n //Handle quotation mark inside string\r\n if (char == '\"' && inQuote && nextChar == '\"') { \r\n data[row][col] += char; \r\n index++;\r\n continue; \r\n }\r\n \r\n //Begin / End Quote\r\n if (char == '\"') { \r\n inQuote = !inQuote;\r\n continue;\r\n }\r\n \r\n //Next column (if not in quote)\r\n if (char == ',' && !inQuote) { \r\n col++;\r\n continue; \r\n }\r\n \r\n //New row if new line and not in quote (CRLF) \r\n if (char == '\\r' && nextChar == '\\n' && !inQuote) { \r\n col = 0; \r\n row++; \r\n index++; \r\n continue; \r\n }\r\n \r\n //New row if new line and not in quote (CR or LF) \r\n if ((char == '\\r' || char == '\\n') && !inQuote) { \r\n col = 0;\r\n row++;\r\n continue; \r\n }\r\n\r\n //Normal Character, append to column\r\n data[row][col] += char;\r\n }\r\n\r\n return data;\r\n}\r\n\r\nexport default csvImporter;","export default function(input){\r\n try {\r\n return JSON.parse(input);\r\n } catch(e) {\r\n console.warn(\"JSON Import Error - File contents is invalid JSON\", e);\r\n return Promise.reject();\r\n }\r\n}","import csv from './importers/csv.js';\r\nimport json from './importers/json.js';\r\n\r\nexport default {\r\n\tcsv:csv,\r\n\tjson:json,\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultImporters from './defaults/importers.js';\r\n\r\nclass Import extends Module{\r\n \r\n constructor(table){\r\n super(table);\r\n \r\n this.registerTableOption(\"importFormat\");\r\n this.registerTableOption(\"importReader\", \"text\");\r\n }\r\n \r\n initialize(){\r\n this.registerTableFunction(\"import\", this.importFromFile.bind(this));\r\n\r\n if(this.table.options.importFormat){\r\n this.subscribe(\"data-loading\", this.loadDataCheck.bind(this), 10);\r\n this.subscribe(\"data-load\", this.loadData.bind(this), 10);\r\n }\r\n }\r\n\r\n loadDataCheck(data){\r\n return typeof data === \"string\";\r\n }\r\n\r\n loadData(data, params, config, silent, previousData){\r\n return this.importData(this.lookupImporter(), data)\r\n .then(this.structureData.bind(this))\r\n .catch((err) => {\r\n console.error(\"Import Error:\", err || \"Unable to import data\")\r\n return Promise.reject(err);\r\n })\r\n }\r\n\r\n lookupImporter(importFormat){\r\n var importer;\r\n \r\n if(!importFormat){\r\n importFormat = this.table.options.importFormat;\r\n }\r\n \r\n if(typeof importFormat === \"string\"){\r\n importer = Import.importers[importFormat];\r\n }else{\r\n importer = importFormat;\r\n }\r\n\r\n if(!importer){\r\n console.error(\"Import Error - Importer not found:\", importFormat);\r\n }\r\n \r\n return importer;\r\n }\r\n \r\n importFromFile(importFormat, extension){\r\n var importer = this.lookupImporter(importFormat);\r\n \r\n if(importer){\r\n return this.pickFile(extension)\r\n .then(this.importData.bind(this, importer))\r\n .then(this.structureData.bind(this))\r\n .then(this.setData.bind(this))\r\n .catch((err) => {\r\n console.error(\"Import Error:\", err || \"Unable to import file\")\r\n return Promise.reject(err);\r\n })\r\n }\r\n }\r\n \r\n pickFile(extensions){\r\n return new Promise((resolve, reject) => {\r\n var input = document.createElement(\"input\");\r\n input.type = \"file\";\r\n input.accept = extensions;\r\n \r\n input.addEventListener(\"change\", (e) => {\r\n var file = input.files[0],\r\n reader = new FileReader(),\r\n data;\r\n \r\n switch(this.table.options.importReader){\r\n case \"buffer\":\r\n reader.readAsArrayBuffer(file);\r\n break;\r\n\r\n case \"binary\":\r\n reader.readAsBinaryString(file);\r\n break;\r\n\r\n case \"url\":\r\n reader.readAsDataURL(file);\r\n break;\r\n\r\n case \"text\":\r\n default:\r\n reader.readAsText(file);\r\n }\r\n \r\n reader.onload = (e) => {\r\n resolve(reader.result)\r\n };\r\n \r\n reader.onerror = (e) => {\r\n console.warn(\"File Load Error - Unable to read file\");\r\n reject();\r\n };\r\n });\r\n \r\n input.click();\r\n });\r\n }\r\n \r\n importData(importer, fileContents){\r\n var data = importer.call(this.table, fileContents);\r\n \r\n if(data instanceof Promise){\r\n return data;\r\n }else{\r\n return data ? Promise.resolve(data) : Promise.reject();\r\n }\r\n }\r\n\r\n structureData(parsedData){\r\n var data = [];\r\n \r\n if(Array.isArray(parsedData) && parsedData.length && Array.isArray(parsedData[0])){\r\n if(this.table.options.autoColumns){\r\n data = this.structureArrayToObject(parsedData);\r\n }else{\r\n data = this.structureArrayToColumns(parsedData);\r\n }\r\n\r\n return data;\r\n }else{\r\n return parsedData;\r\n }\r\n }\r\n\r\n structureArrayToObject(parsedData){\r\n var columns = parsedData.shift();\r\n\r\n var data = parsedData.map((values) => {\r\n var row = {};\r\n\r\n columns.forEach((key, i) => {\r\n row[key] = values[i];\r\n })\r\n\r\n return row;\r\n })\r\n\r\n return data;\r\n }\r\n\r\n structureArrayToColumns(parsedData){\r\n var data = [],\r\n columns = this.table.getColumns();\r\n\r\n //remove first row if it is the column names\r\n if(columns[0] && parsedData[0][0]){\r\n if(columns[0].getDefinition().title === parsedData[0][0]){\r\n parsedData.shift();\r\n }\r\n }\r\n \r\n //convert row arrays to objects\r\n parsedData.forEach((rowData) => {\r\n var row = {};\r\n\r\n rowData.forEach((value, index) => {\r\n var column = columns[index];\r\n\r\n if(column){\r\n row[column.getField()] = value;\r\n }\r\n })\r\n\r\n data.push(row);\r\n });\r\n\r\n return data;\r\n }\r\n \r\n setData(data){\r\n return this.table.setData(data);\r\n }\r\n}\r\n\r\nImport.moduleName = \"import\";\r\n\r\n//load defaults\r\nImport.importers = defaultImporters;\r\n\r\nexport default Import;","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport Cell from '../../core/cell/Cell';\r\nimport Column from '../../core/column/Column';\r\n\r\nclass Interaction extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.eventMap = {\r\n\t\t\t//row events\r\n\t\t\trowClick:\"row-click\",\r\n\t\t\trowDblClick:\"row-dblclick\",\r\n\t\t\trowContext:\"row-contextmenu\",\r\n\t\t\trowMouseEnter:\"row-mouseenter\",\r\n\t\t\trowMouseLeave:\"row-mouseleave\",\r\n\t\t\trowMouseOver:\"row-mouseover\",\r\n\t\t\trowMouseOut:\"row-mouseout\",\r\n\t\t\trowMouseMove:\"row-mousemove\",\r\n\t\t\trowTap:\"row\",\r\n\t\t\trowDblTap:\"row\",\r\n\t\t\trowTapHold:\"row\",\r\n\r\n\t\t\t//cell events\r\n\t\t\tcellClick:\"cell-click\",\r\n\t\t\tcellDblClick:\"cell-dblclick\",\r\n\t\t\tcellContext:\"cell-contextmenu\",\r\n\t\t\tcellMouseEnter:\"cell-mouseenter\",\r\n\t\t\tcellMouseLeave:\"cell-mouseleave\",\r\n\t\t\tcellMouseOver:\"cell-mouseover\",\r\n\t\t\tcellMouseOut:\"cell-mouseout\",\r\n\t\t\tcellMouseMove:\"cell-mousemove\",\r\n\t\t\tcellTap:\"cell\",\r\n\t\t\tcellDblTap:\"cell\",\r\n\t\t\tcellTapHold:\"cell\",\r\n\r\n\t\t\t//column header events\r\n\t\t\theaderClick:\"column-click\",\r\n\t\t\theaderDblClick:\"column-dblclick\",\r\n\t\t\theaderContext:\"column-contextmenu\",\r\n\t\t\theaderMouseEnter:\"column-mouseenter\",\r\n\t\t\theaderMouseLeave:\"column-mouseleave\",\r\n\t\t\theaderMouseOver:\"column-mouseover\",\r\n\t\t\theaderMouseOut:\"column-mouseout\",\r\n\t\t\theaderMouseMove:\"column-mousemove\",\r\n\t\t\theaderTap:\"column\",\r\n\t\t\theaderDblTap:\"column\",\r\n\t\t\theaderTapHold:\"column\",\r\n\r\n\t\t\t//group header\r\n\t\t\tgroupClick:\"group-click\",\r\n\t\t\tgroupDblClick:\"group-dblclick\",\r\n\t\t\tgroupContext:\"group-contextmenu\",\r\n\t\t\tgroupMouseEnter:\"group-mouseenter\",\r\n\t\t\tgroupMouseLeave:\"group-mouseleave\",\r\n\t\t\tgroupMouseOver:\"group-mouseover\",\r\n\t\t\tgroupMouseOut:\"group-mouseout\",\r\n\t\t\tgroupMouseMove:\"group-mousemove\",\r\n\t\t\tgroupTap:\"group\",\r\n\t\t\tgroupDblTap:\"group\",\r\n\t\t\tgroupTapHold:\"group\",\r\n\t\t}\r\n\r\n\t\tthis.subscribers = {};\r\n\r\n\t\tthis.touchSubscribers = {};\r\n\r\n\t\tthis.columnSubscribers = {};\r\n\r\n\t\tthis.touchWatchers = {\r\n\t\t\trow:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tcell:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tcolumn:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tgroup:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.registerColumnOption(\"headerClick\");\r\n\t\tthis.registerColumnOption(\"headerDblClick\");\r\n\t\tthis.registerColumnOption(\"headerContext\");\r\n\t\tthis.registerColumnOption(\"headerMouseEnter\");\r\n\t\tthis.registerColumnOption(\"headerMouseLeave\");\r\n\t\tthis.registerColumnOption(\"headerMouseOver\");\r\n\t\tthis.registerColumnOption(\"headerMouseOut\");\r\n\t\tthis.registerColumnOption(\"headerMouseMove\");\r\n\t\tthis.registerColumnOption(\"headerTap\");\r\n\t\tthis.registerColumnOption(\"headerDblTap\");\r\n\t\tthis.registerColumnOption(\"headerTapHold\");\r\n\r\n\t\tthis.registerColumnOption(\"cellClick\");\r\n\t\tthis.registerColumnOption(\"cellDblClick\");\r\n\t\tthis.registerColumnOption(\"cellContext\");\r\n\t\tthis.registerColumnOption(\"cellMouseEnter\");\r\n\t\tthis.registerColumnOption(\"cellMouseLeave\");\r\n\t\tthis.registerColumnOption(\"cellMouseOver\");\r\n\t\tthis.registerColumnOption(\"cellMouseOut\");\r\n\t\tthis.registerColumnOption(\"cellMouseMove\");\r\n\t\tthis.registerColumnOption(\"cellTap\");\r\n\t\tthis.registerColumnOption(\"cellDblTap\");\r\n\t\tthis.registerColumnOption(\"cellTapHold\");\r\n\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeExternalEvents();\r\n\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this))\r\n\t\tthis.subscribe(\"cell-dblclick\", this.cellContentsSelectionFixer.bind(this))\r\n\t}\r\n\r\n\tcellContentsSelectionFixer(e, cell){\r\n\t\tif(this.table.modExists(\"edit\")){\r\n\t\t\tif (this.table.modules.edit.currentCell === this){\r\n\t\t\t\treturn; //prevent instant selection of editor content\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\ttry{\r\n\t\t\tif (document.selection) { // IE\r\n\t\t\t\tvar range = document.body.createTextRange();\r\n\t\t\t\trange.moveToElementText(this.element);\r\n\t\t\t\trange.select();\r\n\t\t\t} else if (window.getSelection) {\r\n\t\t\t\tvar range = document.createRange();\r\n\t\t\t\trange.selectNode(this.element);\r\n\t\t\t\twindow.getSelection().removeAllRanges();\r\n\t\t\t\twindow.getSelection().addRange(range);\r\n\t\t\t}\r\n\t\t}catch(e){}\r\n\t}\r\n\r\n\tinitializeExternalEvents(){\r\n\t\tfor(let key in this.eventMap){\r\n\t\t\tthis.subscriptionChangeExternal(key, this.subscriptionChanged.bind(this, key))\r\n\t\t}\r\n\t}\r\n\r\n\tsubscriptionChanged(key, added){\r\n\t\tvar index;\r\n\r\n\t\tif(added){\r\n\t\t\tif(!this.subscribers[key]){\r\n\t\t\t\tif(this.eventMap[key].includes(\"-\")){\r\n\t\t\t\t\tthis.subscribers[key] = this.handle.bind(this, key);\r\n\t\t\t\t\tthis.subscribe(this.eventMap[key], this.subscribers[key]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.subscribeTouchEvents(key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.eventMap[key].includes(\"-\")){\r\n\t\t\t\tif(this.subscribers[key] && !this.columnSubscribers[key] && !this.subscribedExternal(key)){\r\n\t\t\t\t\tthis.unsubscribe(this.eventMap[key], this.subscribers[key]);\r\n\t\t\t\t\tdelete this.subscribers[key];\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.unsubscribeTouchEvents(key);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tsubscribeTouchEvents(key){\r\n\t\tvar type = this.eventMap[key];\r\n\r\n\t\tif(!this.touchSubscribers[type + \"-touchstart\"]){\r\n\t\t\tthis.touchSubscribers[type + \"-touchstart\"] = this.handleTouch.bind(this, type, \"start\");\r\n\t\t\tthis.touchSubscribers[type + \"-touchend\"] = this.handleTouch.bind(this, type, \"end\");\r\n\r\n\t\t\tthis.subscribe(type + \"-touchstart\", this.touchSubscribers[type + \"-touchstart\"]);\r\n\t\t\tthis.subscribe(type + \"-touchend\", this.touchSubscribers[type + \"-touchend\"]);\r\n\t\t}\r\n\r\n\t\tthis.subscribers[key] = true;\r\n\t}\r\n\r\n\tunsubscribeTouchEvents(key){\r\n\t\tvar notouch = true,\r\n\t\ttype = this.eventMap[key];\r\n\r\n\t\tif(this.subscribers[key] && !this.subscribedExternal(key)){\r\n\t\t\tdelete this.subscribers[key];\r\n\r\n\t\t\tfor(let i in this.eventMap){\r\n\t\t\t\tif(this.eventMap[i] === type){\r\n\t\t\t\t\tif(this.subscribers[i]){\r\n\t\t\t\t\t\tnotouch = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(notouch){\r\n\t\t\t\tthis.unsubscribe(type + \"-touchstart\", this.touchSubscribers[type + \"-touchstart\"]);\r\n\t\t\t\tthis.unsubscribe(type + \"-touchend\", this.touchSubscribers[type + \"-touchend\"]);\r\n\r\n\t\t\t\tdelete this.touchSubscribers[type + \"-touchstart\"];\r\n\t\t\t\tdelete this.touchSubscribers[type + \"-touchend\"];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition;\r\n\r\n\t\tfor(let key in this.eventMap){\r\n\t\t\tif(def[key]){\r\n\t\t\t\tthis.subscriptionChanged(key, true);\r\n\r\n\t\t\t\tif(!this.columnSubscribers[key]){\r\n\t\t\t\t\tthis.columnSubscribers[key] = [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.columnSubscribers[key].push(column);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\thandle(action, e, component){\r\n\t\tthis.dispatchEvent(action, e, component);\r\n\t}\r\n\r\n\thandleTouch(type, action, e, component){\r\n\t\tvar watchers = this.touchWatchers[type];\r\n\r\n\t\tif(type === \"column\"){\r\n\t\t\ttype = \"header\";\r\n\t\t}\r\n\r\n\t\tswitch(action){\r\n\t\t\tcase \"start\":\r\n\t\t\twatchers.tap = true;\r\n\r\n\t\t\tclearTimeout(watchers.tapHold);\r\n\r\n\t\t\twatchers.tapHold = setTimeout(() => {\r\n\t\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\t\twatchers.tapHold = null;\r\n\r\n\t\t\t\twatchers.tap = null;\r\n\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\tthis.dispatchEvent(type + \"TapHold\", e, component);\r\n\t\t\t}, 1000);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"end\":\r\n\t\t\tif(watchers.tap){\r\n\r\n\t\t\t\twatchers.tap = null;\r\n\t\t\t\tthis.dispatchEvent(type + \"Tap\", e, component);\r\n\t\t\t}\r\n\r\n\t\t\tif(watchers.tapDbl){\r\n\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\tthis.dispatchEvent(type + \"DblTap\", e, component);\r\n\t\t\t}else{\r\n\t\t\t\twatchers.tapDbl = setTimeout(() => {\r\n\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\twatchers.tapDbl = null;\r\n\t\t\t\t}, 300);\r\n\t\t\t}\r\n\r\n\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\twatchers.tapHold = null;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tdispatchEvent(action, e, component){\r\n\t\tvar componentObj = component.getComponent(),\r\n\t\tcallback;\r\n\r\n\t\tif(this.columnSubscribers[action]){\r\n\r\n\t\t\tif(component instanceof Cell){\r\n\t\t\t\tcallback = component.column.definition[action];\r\n\t\t\t}else if(component instanceof Column){\r\n\t\t\t\tcallback = component.definition[action];\r\n\t\t\t}\r\n\r\n\t\t\tif(callback){\r\n\t\t\t\tcallback(e, componentObj);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.dispatchExternal(action, e, componentObj);\r\n\t}\r\n}\r\n\r\nInteraction.moduleName = \"interaction\";\r\n\r\nexport default Interaction;","export default {\r\n\tnavPrev:\"shift + 9\",\r\n\tnavNext:9,\r\n\tnavUp:38,\r\n\tnavDown:40,\r\n\tscrollPageUp:33,\r\n\tscrollPageDown:34,\r\n\tscrollToStart:36,\r\n\tscrollToEnd:35,\r\n\tundo:[\"ctrl + 90\", \"meta + 90\"],\r\n\tredo:[\"ctrl + 89\", \"meta + 89\"],\r\n\tcopyToClipboard:[\"ctrl + 67\", \"meta + 89\"],\r\n};","export default {\r\n\tkeyBlock:function(e){\r\n\t\te.stopPropagation();\r\n\t\te.preventDefault();\r\n\t},\r\n\tscrollPageUp:function(e){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tnewPos = rowManager.scrollTop - rowManager.element.clientHeight,\r\n\t\tscrollMax = rowManager.element.scrollHeight;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\tif(newPos >= 0){\r\n\t\t\t\trowManager.element.scrollTop = newPos;\r\n\t\t\t}else{\r\n\t\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[0]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tscrollPageDown:function(e){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tnewPos = rowManager.scrollTop + rowManager.element.clientHeight,\r\n\t\tscrollMax = rowManager.element.scrollHeight;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\tif(newPos <= scrollMax){\r\n\t\t\t\trowManager.element.scrollTop = newPos;\r\n\t\t\t}else{\r\n\t\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\r\n\t},\r\n\tscrollToStart:function(e){\r\n\t\tvar rowManager = this.table.rowManager;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[0]);\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tscrollToEnd:function(e){\r\n\t\tvar rowManager = this.table.rowManager;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]);\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tnavPrev:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-prev\", e);\r\n\t},\r\n\r\n\tnavNext:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-next\", e);\r\n\t},\r\n\r\n\tnavLeft:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-left\", e);\r\n\t},\r\n\r\n\tnavRight:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-right\", e);\r\n\t},\r\n\r\n\tnavUp:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-up\", e);\r\n\t},\r\n\r\n\tnavDown:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-down\", e);\r\n\t},\r\n\r\n\tundo:function(e){\r\n\t\tvar cell = false;\r\n\t\tif(this.table.options.history && this.table.modExists(\"history\") && this.table.modExists(\"edit\")){\r\n\r\n\t\t\tcell = this.table.modules.edit.currentCell;\r\n\r\n\t\t\tif(!cell){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tthis.table.modules.history.undo();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tredo:function(e){\r\n\t\tvar cell = false;\r\n\t\tif(this.table.options.history && this.table.modExists(\"history\") && this.table.modExists(\"edit\")){\r\n\r\n\t\t\tcell = this.table.modules.edit.currentCell;\r\n\r\n\t\t\tif(!cell){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tthis.table.modules.history.redo();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tcopyToClipboard:function(e){\r\n\t\tif(!this.table.modules.edit.currentCell){\r\n\t\t\tif(this.table.modExists(\"clipboard\", true)){\r\n\t\t\t\tthis.table.modules.clipboard.copy(false, true);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultBindings from './defaults/bindings.js';\r\nimport defaultActions from './defaults/actions.js';\r\n\r\nclass Keybindings extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.watchKeys = null;\r\n\t\tthis.pressedKeys = null;\r\n\t\tthis.keyupBinding = false;\r\n\t\tthis.keydownBinding = false;\r\n\r\n\t\tthis.registerTableOption(\"keybindings\", {}); //array for keybindings\r\n\t\tthis.registerTableOption(\"tabEndNewRow\", false); //create new row when tab to end of table\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tvar bindings = this.table.options.keybindings,\r\n\t\tmergedBindings = {};\r\n\r\n\t\tthis.watchKeys = {};\r\n\t\tthis.pressedKeys = [];\r\n\r\n\t\tif(bindings !== false){\r\n\t\t\tObject.assign(mergedBindings, Keybindings.bindings)\r\n\t\t\tObject.assign(mergedBindings, bindings)\r\n\r\n\t\t\tthis.mapBindings(mergedBindings);\r\n\t\t\tthis.bindEvents();\r\n\t\t}\r\n\r\n\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\r\n\t}\r\n\r\n\tmapBindings(bindings){\r\n\t\tfor(let key in bindings){\r\n\t\t\tif(Keybindings.actions[key]){\r\n\t\t\t\tif(bindings[key]){\r\n\t\t\t\t\tif(typeof bindings[key] !== \"object\"){\r\n\t\t\t\t\t\tbindings[key] = [bindings[key]];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbindings[key].forEach((binding) => {\r\n\t\t\t\t\t\tvar bindingList = Array.isArray(binding) ? binding : [binding];\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tbindingList.forEach((item) => {\r\n\t\t\t\t\t\t\tthis.mapBinding(key, item);\r\n\t\t\t\t\t\t});\t\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Key Binding Error - no such action:\", key);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmapBinding(action, symbolsList){\r\n\t\tvar binding = {\r\n\t\t\taction: Keybindings.actions[action],\r\n\t\t\tkeys: [],\r\n\t\t\tctrl: false,\r\n\t\t\tshift: false,\r\n\t\t\tmeta: false,\r\n\t\t};\r\n\r\n\t\tvar symbols = symbolsList.toString().toLowerCase().split(\" \").join(\"\").split(\"+\");\r\n\r\n\t\tsymbols.forEach((symbol) => {\r\n\t\t\tswitch(symbol){\r\n\t\t\t\tcase \"ctrl\":\r\n\t\t\t\tbinding.ctrl = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"shift\":\r\n\t\t\t\tbinding.shift = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"meta\":\r\n\t\t\t\tbinding.meta = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tsymbol = isNaN(symbol) ? symbol.toUpperCase().charCodeAt(0) : parseInt(symbol);\r\n\t\t\t\tbinding.keys.push(symbol);\r\n\r\n\t\t\t\tif(!this.watchKeys[symbol]){\r\n\t\t\t\t\tthis.watchKeys[symbol] = [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.watchKeys[symbol].push(binding);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tbindEvents(){\r\n\t\tvar self = this;\r\n\r\n\t\tthis.keyupBinding = function(e){\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tvar bindings = self.watchKeys[code];\r\n\r\n\t\t\tif(bindings){\r\n\r\n\t\t\t\tself.pressedKeys.push(code);\r\n\r\n\t\t\t\tbindings.forEach(function(binding){\r\n\t\t\t\t\tself.checkBinding(e, binding);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.keydownBinding = function(e){\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tvar bindings = self.watchKeys[code];\r\n\r\n\t\t\tif(bindings){\r\n\r\n\t\t\t\tvar index = self.pressedKeys.indexOf(code);\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tself.pressedKeys.splice(index, 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.table.element.addEventListener(\"keydown\", this.keyupBinding);\r\n\r\n\t\tthis.table.element.addEventListener(\"keyup\", this.keydownBinding);\r\n\t}\r\n\r\n\tclearBindings(){\r\n\t\tif(this.keyupBinding){\r\n\t\t\tthis.table.element.removeEventListener(\"keydown\", this.keyupBinding);\r\n\t\t}\r\n\r\n\t\tif(this.keydownBinding){\r\n\t\t\tthis.table.element.removeEventListener(\"keyup\", this.keydownBinding);\r\n\t\t}\r\n\t}\r\n\r\n\tcheckBinding(e, binding){\r\n\t\tvar match = true;\r\n\r\n\t\tif(e.ctrlKey == binding.ctrl && e.shiftKey == binding.shift && e.metaKey == binding.meta){\r\n\t\t\tbinding.keys.forEach((key) => {\r\n\t\t\t\tvar index = this.pressedKeys.indexOf(key);\r\n\r\n\t\t\t\tif(index == -1){\r\n\t\t\t\t\tmatch = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tbinding.action.call(this, e);\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nKeybindings.moduleName = \"keybindings\";\r\n\r\n//load defaults\r\nKeybindings.bindings = defaultBindings;\r\nKeybindings.actions = defaultActions;\r\n\r\nexport default Keybindings;","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass Menu extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.menuContainer = null;\r\n\t\tthis.menuElements = [];\r\n\t\tthis.blurEvent = this.hideMenu.bind(this);\r\n\t\tthis.escEvent = this.escMenu.bind(this);\r\n\t\tthis.nestedMenuBlock = false;\r\n\t\tthis.positionReversedX = false;\r\n\t\t\r\n\t\tthis.currentComponent = null;\r\n\t\t\r\n\t\tthis.columnSubscribers = {};\r\n\t\t\r\n\t\tthis.registerTableOption(\"rowContextMenu\", false);\r\n\t\tthis.registerTableOption(\"rowClickMenu\", false);\r\n\t\tthis.registerTableOption(\"groupContextMenu\", false);\r\n\t\tthis.registerTableOption(\"groupClickMenu\", false);\r\n\t\tthis.registerTableOption(\"menuContainer\", false);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"headerContextMenu\");\r\n\t\tthis.registerColumnOption(\"headerClickMenu\");\r\n\t\tthis.registerColumnOption(\"headerMenu\");\r\n\t\tthis.registerColumnOption(\"contextMenu\");\r\n\t\tthis.registerColumnOption(\"clickMenu\");\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.lookupMenuContainer();\r\n\t\t\r\n\t\tthis.initializeRowWatchers();\r\n\t\tthis.initializeGroupWatchers();\r\n\t\t\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t}\r\n\t\r\n\tlookupMenuContainer(){\r\n\t\t\r\n\t\tthis.menuContainer = this.table.options.menuContainer;\r\n\t\t\r\n\t\tif(typeof this.menuContainer === \"string\"){\r\n\t\t\tthis.menuContainer = document.querySelector(this.menuContainer);\r\n\t\t\t\r\n\t\t\tif(!this.menuContainer){\r\n\t\t\t\tconsole.warn(\"Menu Error - no container element found matching selector:\", this.table.options.menuContainer , \"(defaulting to document body)\");\r\n\t\t\t}\r\n\t\t}else if (this.menuContainer === true){\r\n\t\t\tthis.menuContainer = this.table.element;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.menuContainer && !this.checkMenuContainerIsParent(this.menuContainer)){\r\n\t\t\tthis.menuContainer = false;\r\n\t\t\tconsole.warn(\"Menu Error - container element does not contain this table:\", this.table.options.menuContainer , \"(defaulting to document body)\");\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.menuContainer){\r\n\t\t\tthis.menuContainer = document.body;\r\n\t\t}\r\n\t}\r\n\t\r\n\tcheckMenuContainerIsParent(container, element = this.table.element){\r\n\t\tif(container === element){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn element.parentNode ? this.checkMenuContainerIsParent(container, element.parentNode) : false;\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRowWatchers(){\r\n\t\tif(this.table.options.rowContextMenu){\r\n\t\t\tthis.subscribe(\"row-contextmenu\", this.loadMenuEvent.bind(this, this.table.options.rowContextMenu));\r\n\t\t\tthis.table.on(\"rowTapHold\", this.loadMenuEvent.bind(this, this.table.options.rowContextMenu));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.rowClickMenu){\r\n\t\t\tthis.subscribe(\"row-click\", this.loadMenuEvent.bind(this, this.table.options.rowClickMenu));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeGroupWatchers(){\r\n\t\tif(this.table.options.groupContextMenu){\r\n\t\t\tthis.subscribe(\"group-contextmenu\", this.loadMenuEvent.bind(this, this.table.options.groupContextMenu));\r\n\t\t\tthis.table.on(\"groupTapHold\", this.loadMenuEvent.bind(this, this.table.options.groupContextMenu));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.groupClickMenu){\r\n\t\t\tthis.subscribe(\"group-click\", this.loadMenuEvent.bind(this, this.table.options.groupClickMenu));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar options = [\"headerContextMenu\", \"headerClickMenu\"],\r\n\t\tdef = column.definition;\r\n\t\t\r\n\t\t//handle column events\r\n\t\tif(def.headerContextMenu && !this.columnSubscribers.headerContextMenu){\r\n\t\t\tthis.columnSubscribers.headerContextMenu = this.loadMenuTableColumnEvent.bind(this, \"headerContextMenu\");\r\n\t\t\tthis.subscribe(\"column-contextmenu\", this.columnSubscribers.headerContextMenu);\r\n\t\t\tthis.table.on(\"headerTapHold\", this.loadMenuTableColumnEvent.bind(this, \"headerContextMenu\"))\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerClickMenu && !this.columnSubscribers.headerClickMenu){\r\n\t\t\tthis.columnSubscribers.headerClickMenu = this.loadMenuTableColumnEvent.bind(this, \"headerClickMenu\");\r\n\t\t\tthis.subscribe(\"column-click\", this.columnSubscribers.headerClickMenu);\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerMenu){\r\n\t\t\tthis.initializeColumnHeaderMenu(column);\r\n\t\t}\r\n\t\t\r\n\t\t//handle cell events\r\n\t\tif(def.contextMenu && !this.columnSubscribers.contextMenu){\r\n\t\t\tthis.columnSubscribers.contextMenu = this.loadMenuTableCellEvent.bind(this, \"contextMenu\");\r\n\t\t\tthis.subscribe(\"cell-contextmenu\", this.columnSubscribers.contextMenu);\r\n\t\t\tthis.table.on(\"cellTapHold\", this.loadMenuTableCellEvent.bind(this, \"contextMenu\"))\r\n\t\t}\r\n\t\t\r\n\t\tif(def.clickMenu && !this.columnSubscribers.clickMenu){\r\n\t\t\tthis.columnSubscribers.clickMenu = this.loadMenuTableCellEvent.bind(this, \"clickMenu\");\r\n\t\t\tthis.subscribe(\"cell-click\", this.columnSubscribers.clickMenu);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumnHeaderMenu(column){\r\n\t\tvar headerMenuEl;\r\n\t\t\r\n\t\theaderMenuEl = document.createElement(\"span\");\r\n\t\theaderMenuEl.classList.add(\"tabulator-header-menu-button\");\r\n\t\theaderMenuEl.innerHTML = \"⋮\";\r\n\t\t\r\n\t\theaderMenuEl.addEventListener(\"click\", (e) => {\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\t\r\n\t\t\tthis.loadMenuEvent(column.definition.headerMenu, e, column);\r\n\t\t});\r\n\t\t\r\n\t\tcolumn.titleElement.insertBefore(headerMenuEl, column.titleElement.firstChild);\r\n\t}\r\n\t\r\n\tloadMenuTableCellEvent(option, e, cell){\r\n\t\tif(cell._cell){\r\n\t\t\tcell = cell._cell;\r\n\t\t}\r\n\t\t\r\n\t\tif(cell.column.definition[option]){\r\n\t\t\tthis.loadMenuEvent(cell.column.definition[option], e, cell);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadMenuTableColumnEvent(option, e, column){\r\n\t\tif(column._column){\r\n\t\t\tcolumn = column._column;\r\n\t\t}\r\n\t\t\r\n\t\tif(column.definition[option]){\r\n\t\t\tthis.loadMenuEvent(column.definition[option], e, column);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadMenuEvent(menu, e, component){\r\n\t\tif(component._group){\r\n\t\t\tcomponent = component._group;\r\n\t\t}else if(component._row){\r\n\t\t\tcomponent = component._row;\r\n\t\t}\r\n\t\t\r\n\t\tmenu = typeof menu == \"function\" ? menu.call(this.table, component.getComponent(), e) : menu;\r\n\t\t\r\n\t\tthis.loadMenu(e, component, menu);\r\n\t}\r\n\t\r\n\tloadMenu(e, component, menu, parentEl){\r\n\t\tvar touch = !(e instanceof MouseEvent);\r\n\t\t\r\n\t\tvar menuEl = document.createElement(\"div\");\r\n\t\tmenuEl.classList.add(\"tabulator-menu\");\r\n\t\t\r\n\t\tif(!touch){\r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t\t\r\n\t\t//abort if no menu set\r\n\t\tif(!menu || !menu.length){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(!parentEl){\r\n\t\t\tif(this.nestedMenuBlock){\r\n\t\t\t\t//abort if child menu already open\r\n\t\t\t\tif(this.isOpen()){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.nestedMenuBlock = setTimeout(() => {\r\n\t\t\t\t\tthis.nestedMenuBlock = false;\r\n\t\t\t\t}, 100)\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.hideMenu();\r\n\t\t\tthis.menuElements = [];\r\n\t\t}\r\n\t\t\r\n\t\tmenu.forEach((item) => {\r\n\t\t\tvar itemEl = document.createElement(\"div\"),\r\n\t\t\tlabel = item.label,\r\n\t\t\tdisabled = item.disabled;\r\n\t\t\t\r\n\t\t\tif(item.separator){\r\n\t\t\t\titemEl.classList.add(\"tabulator-menu-separator\");\r\n\t\t\t}else{\r\n\t\t\t\titemEl.classList.add(\"tabulator-menu-item\");\r\n\t\t\t\t\r\n\t\t\t\tif(typeof label == \"function\"){\r\n\t\t\t\t\tlabel = label.call(this.table, component.getComponent());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(label instanceof Node){\r\n\t\t\t\t\titemEl.appendChild(label);\r\n\t\t\t\t}else{\r\n\t\t\t\t\titemEl.innerHTML = label;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(typeof disabled == \"function\"){\r\n\t\t\t\t\tdisabled = disabled.call(this.table, component.getComponent());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(disabled){\r\n\t\t\t\t\titemEl.classList.add(\"tabulator-menu-item-disabled\");\r\n\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(item.menu && item.menu.length){\r\n\t\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\tthis.hideOldSubMenus(menuEl);\r\n\t\t\t\t\t\t\tthis.loadMenu(e, component, item.menu, itemEl);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(item.action){\r\n\t\t\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\t\t\titem.action(e, component.getComponent());\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(item.menu && item.menu.length){\r\n\t\t\t\t\titemEl.classList.add(\"tabulator-menu-item-submenu\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tmenuEl.appendChild(itemEl);\r\n\t\t});\r\n\t\t\r\n\t\tmenuEl.addEventListener(\"click\", (e) => {\r\n\t\t\tthis.hideMenu();\r\n\t\t});\r\n\t\t\r\n\t\tthis.menuElements.push(menuEl);\r\n\t\tthis.positionMenu(menuEl, parentEl, touch, e);\r\n\t\t\r\n\t\tthis.currentComponent = component\r\n\t\t\r\n\t\tthis.dispatchExternal(\"menuOpened\", component.getComponent())\r\n\t}\r\n\t\r\n\thideOldSubMenus(menuEl){\r\n\t\tvar index = this.menuElements.indexOf(menuEl);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tfor(let i = this.menuElements.length - 1; i > index; i--){\r\n\t\t\t\tvar el = this.menuElements[i];\r\n\t\t\t\t\r\n\t\t\t\tif(el.parentNode){\r\n\t\t\t\t\tel.parentNode.removeChild(el);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.menuElements.pop();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tpositionMenu(element, parentEl, touch, e){\r\n\t\tvar x, y, parentOffset;\r\n\t\t\r\n\t\tif(!parentEl){\r\n\t\t\tx = touch ? e.touches[0].pageX : e.pageX;\r\n\t\t\ty = touch ? e.touches[0].pageY : e.pageY;\r\n\t\t\t\r\n\t\t\tif(this.menuContainer !== document.body){\r\n\t\t\t\tparentOffset = Helpers.elOffset(this.menuContainer);\r\n\t\t\t\t\r\n\t\t\t\tx -= parentOffset.left;\r\n\t\t\t\ty -= parentOffset.top;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.positionReversedX = false;\r\n\t\t}else{\r\n\t\t\tparentOffset = Helpers.elOffset(parentEl);\r\n\t\t\tx = parentOffset.left + parentEl.offsetWidth;\r\n\t\t\ty = parentOffset.top - 1;\r\n\t\t}\r\n\t\t\r\n\t\telement.style.top = y + \"px\";\r\n\t\telement.style.left = x + \"px\";\r\n\t\t\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.table.rowManager.element.addEventListener(\"scroll\", this.blurEvent);\r\n\t\t\tthis.subscribe(\"cell-editing\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"click\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"contextmenu\", this.blurEvent);\r\n\t\t\twindow.addEventListener(\"resize\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"keydown\", this.escEvent);\r\n\t\t}, 100);\r\n\t\t\r\n\t\tthis.menuContainer.appendChild(element);\r\n\t\t\r\n\t\t//move menu to start on right edge if it is too close to the edge of the screen\r\n\t\tif((x + element.offsetWidth) >= this.menuContainer.offsetWidth || this.positionReversedX){\r\n\t\t\telement.style.left = \"\";\r\n\t\t\t\r\n\t\t\tif(parentEl){\r\n\t\t\t\telement.style.right = (this.menuContainer.offsetWidth - parentOffset.left) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\telement.style.right = (this.menuContainer.offsetWidth - x) + \"px\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.positionReversedX = true;\r\n\t\t}\r\n\t\t\r\n\t\t//move menu to start on bottom edge if it is too close to the edge of the screen\r\n\t\tif((y + element.offsetHeight) > this.menuContainer.offsetHeight) {\r\n\t\t\tif(parentEl){\r\n\t\t\t\telement.style.top = (parseInt(element.style.top) - element.offsetHeight + parentEl.offsetHeight + 1) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\telement.style.top = (parseInt(element.style.top) - element.offsetHeight) + \"px\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tisOpen(){\r\n\t\treturn !!this.menuElements.length;\r\n\t}\r\n\t\r\n\tescMenu(e){\r\n\t\tif(e.keyCode == 27){\r\n\t\t\tthis.hideMenu();\r\n\t\t}\r\n\t}\r\n\t\r\n\thideMenu(){\t\r\n\t\tthis.menuElements.forEach((menuEl) => {\r\n\t\t\tif(menuEl.parentNode){\r\n\t\t\t\tmenuEl.parentNode.removeChild(menuEl);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tdocument.body.removeEventListener(\"keydown\", this.escEvent);\r\n\t\tdocument.body.removeEventListener(\"click\", this.blurEvent);\r\n\t\tdocument.body.removeEventListener(\"contextmenu\", this.blurEvent);\r\n\t\twindow.removeEventListener(\"resize\", this.blurEvent);\r\n\t\tthis.table.rowManager.element.removeEventListener(\"scroll\", this.blurEvent);\r\n\t\tthis.unsubscribe(\"cell-editing\", this.blurEvent);\r\n\t\t\r\n\t\tif(this.currentComponent){\r\n\t\t\tthis.dispatchExternal(\"menuClosed\", this.currentComponent.getComponent());\r\n\t\t\tthis.currentComponent = null;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMenu.moduleName = \"menu\";\r\n\r\nexport default Menu;\r\n","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass MoveColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.placeholderElement = this.createPlaceholderElement();\r\n\t\tthis.hoverElement = false; //floating column header element\r\n\t\tthis.checkTimeout = false; //click check timeout holder\r\n\t\tthis.checkPeriod = 250; //period to wait on mousedown to consider this a move and not a click\r\n\t\tthis.moving = false; //currently moving column\r\n\t\tthis.toCol = false; //destination column\r\n\t\tthis.toColAfter = false; //position of moving column relative to the desitnation column\r\n\t\tthis.startX = 0; //starting position within header element\r\n\t\tthis.autoScrollMargin = 40; //auto scroll on edge when within margin\r\n\t\tthis.autoScrollStep = 5; //auto scroll distance in pixels\r\n\t\tthis.autoScrollTimeout = false; //auto scroll timeout\r\n\t\tthis.touchMove = false;\r\n\t\t\r\n\t\tthis.moveHover = this.moveHover.bind(this);\r\n\t\tthis.endMove = this.endMove.bind(this);\r\n\t\t\r\n\t\tthis.registerTableOption(\"movableColumns\", false); //enable movable columns\r\n\t}\r\n\t\r\n\tcreatePlaceholderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-col\");\r\n\t\tel.classList.add(\"tabulator-col-placeholder\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.movableColumns){\r\n\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\tcolEl;\r\n\t\t\r\n\t\tif(!column.modules.frozen){\r\n\t\t\tcolEl = column.getElement();\r\n\t\t\t\r\n\t\t\tconfig.mousemove = function(e){\r\n\t\t\t\tif(column.parent === self.moving.parent){\r\n\t\t\t\t\tif((((self.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(colEl).left) + self.table.columnManager.element.scrollLeft) > (column.getWidth() / 2)){\r\n\t\t\t\t\t\tif(self.toCol !== column || !self.toColAfter){\r\n\t\t\t\t\t\t\tcolEl.parentNode.insertBefore(self.placeholderElement, colEl.nextSibling);\r\n\t\t\t\t\t\t\tself.moveColumn(column, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(self.toCol !== column || self.toColAfter){\r\n\t\t\t\t\t\t\tcolEl.parentNode.insertBefore(self.placeholderElement, colEl);\r\n\t\t\t\t\t\t\tself.moveColumn(column, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}.bind(self);\r\n\t\t\t\r\n\t\t\tcolEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tself.touchMove = false;\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, column);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tcolEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tself.bindTouchEvents(column);\r\n\t\t}\r\n\t\t\r\n\t\tcolumn.modules.moveColumn = config;\r\n\t}\r\n\t\r\n\tbindTouchEvents(column){\r\n\t\tvar colEl = column.getElement(),\r\n\t\tstartXMove = false, //shifting center position of the cell\r\n\t\tdir = false,\r\n\t\tcurrentCol, nextCol, prevCol, nextColWidth, prevColWidth, nextColWidthLast, prevColWidthLast;\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchstart\", (e) => {\r\n\t\t\tthis.checkTimeout = setTimeout(() => {\r\n\t\t\t\tthis.touchMove = true;\r\n\t\t\t\tcurrentCol = column;\r\n\t\t\t\tnextCol = column.nextColumn();\r\n\t\t\t\tnextColWidth = nextCol ? nextCol.getWidth()/2 : 0;\r\n\t\t\t\tprevCol = column.prevColumn();\r\n\t\t\t\tprevColWidth = prevCol ? prevCol.getWidth()/2 : 0;\r\n\t\t\t\tnextColWidthLast = 0;\r\n\t\t\t\tprevColWidthLast = 0;\r\n\t\t\t\tstartXMove = false;\r\n\t\t\t\t\r\n\t\t\t\tthis.startMove(e, column);\r\n\t\t\t}, this.checkPeriod);\r\n\t\t}, {passive: true});\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchmove\", (e) => {\r\n\t\t\tvar halfCol, diff, moveToCol;\r\n\t\t\t\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.moveHover(e);\r\n\t\t\t\t\r\n\t\t\t\tif(!startXMove){\r\n\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tdiff = e.touches[0].pageX - startXMove;\r\n\t\t\t\t\r\n\t\t\t\tif(diff > 0){\r\n\t\t\t\t\tif(nextCol && diff - nextColWidthLast > nextColWidth){\r\n\t\t\t\t\t\tmoveToCol = nextCol;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(moveToCol !== column){\r\n\t\t\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t\t\t\tmoveToCol.getElement().parentNode.insertBefore(this.placeholderElement, moveToCol.getElement().nextSibling);\r\n\t\t\t\t\t\t\tthis.moveColumn(moveToCol, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(prevCol && -diff - prevColWidthLast > prevColWidth){\r\n\t\t\t\t\t\tmoveToCol = prevCol;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(moveToCol !== column){\r\n\t\t\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t\t\t\tmoveToCol.getElement().parentNode.insertBefore(this.placeholderElement, moveToCol.getElement());\r\n\t\t\t\t\t\t\tthis.moveColumn(moveToCol, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(moveToCol){\r\n\t\t\t\t\tcurrentCol = moveToCol;\r\n\t\t\t\t\tnextCol = moveToCol.nextColumn();\r\n\t\t\t\t\tnextColWidthLast = nextColWidth;\r\n\t\t\t\t\tnextColWidth = nextCol ? nextCol.getWidth() / 2 : 0;\r\n\t\t\t\t\tprevCol = moveToCol.prevColumn();\r\n\t\t\t\t\tprevColWidthLast = prevColWidth;\r\n\t\t\t\t\tprevColWidth = prevCol ? prevCol.getWidth() / 2 : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}, {passive: true});\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchend\", (e) => {\r\n\t\t\tif(this.checkTimeout){\r\n\t\t\t\tclearTimeout(this.checkTimeout);\r\n\t\t\t}\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.endMove(e);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tstartMove(e, column){\r\n\t\tvar element = column.getElement(),\r\n\t\theaderElement = this.table.columnManager.getElement(),\r\n\t\theadersElement = this.table.columnManager.getHeadersElement();\r\n\t\t\r\n\t\tthis.moving = column;\r\n\t\tthis.startX = (this.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(element).left;\r\n\t\t\r\n\t\tthis.table.element.classList.add(\"tabulator-block-select\");\r\n\t\t\r\n\t\t//create placeholder\r\n\t\tthis.placeholderElement.style.width = column.getWidth() + \"px\";\r\n\t\tthis.placeholderElement.style.height = column.getHeight() + \"px\";\r\n\t\t\r\n\t\telement.parentNode.insertBefore(this.placeholderElement, element);\r\n\t\telement.parentNode.removeChild(element);\r\n\t\t\r\n\t\t//create hover element\r\n\t\tthis.hoverElement = element.cloneNode(true);\r\n\t\tthis.hoverElement.classList.add(\"tabulator-moving\");\r\n\t\t\r\n\t\tthis.table.columnManager.getElement().appendChild(this.hoverElement);\r\n\t\t\r\n\t\tthis.hoverElement.style.left = \"0\";\r\n\t\tthis.hoverElement.style.bottom = (headerElement.clientHeight - headersElement.offsetHeight) + \"px\";\r\n\t\t\r\n\t\tif(!this.touchMove){\r\n\t\t\tthis._bindMouseMove();\r\n\t\t\t\r\n\t\t\tdocument.body.addEventListener(\"mousemove\", this.moveHover);\r\n\t\t\tdocument.body.addEventListener(\"mouseup\", this.endMove);\r\n\t\t}\r\n\t\t\r\n\t\tthis.moveHover(e);\r\n\t}\r\n\t\r\n\t_bindMouseMove(){\r\n\t\tthis.table.columnManager.columnsByIndex.forEach(function(column){\r\n\t\t\tif(column.modules.moveColumn.mousemove){\r\n\t\t\t\tcolumn.getElement().addEventListener(\"mousemove\", column.modules.moveColumn.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t_unbindMouseMove(){\r\n\t\tthis.table.columnManager.columnsByIndex.forEach(function(column){\r\n\t\t\tif(column.modules.moveColumn.mousemove){\r\n\t\t\t\tcolumn.getElement().removeEventListener(\"mousemove\", column.modules.moveColumn.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tmoveColumn(column, after){\r\n\t\tvar movingCells = this.moving.getCells();\r\n\t\t\r\n\t\tthis.toCol = column;\r\n\t\tthis.toColAfter = after;\r\n\t\t\r\n\t\tif(after){\r\n\t\t\tcolumn.getCells().forEach(function(cell, i){\r\n\t\t\t\tvar cellEl = cell.getElement(true);\r\n\t\t\t\t\r\n\t\t\t\tif(cellEl.parentNode && movingCells[i]){\r\n\t\t\t\t\tcellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tcolumn.getCells().forEach(function(cell, i){\r\n\t\t\t\tvar cellEl = cell.getElement(true);\r\n\t\t\t\t\r\n\t\t\t\tif(cellEl.parentNode && movingCells[i]){\r\n\t\t\t\t\tcellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tendMove(e){\r\n\t\tif(e.which === 1 || this.touchMove){\r\n\t\t\tthis._unbindMouseMove();\r\n\t\t\t\r\n\t\t\tthis.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling);\r\n\t\t\tthis.placeholderElement.parentNode.removeChild(this.placeholderElement);\r\n\t\t\tthis.hoverElement.parentNode.removeChild(this.hoverElement);\r\n\t\t\t\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-block-select\");\r\n\t\t\t\r\n\t\t\tif(this.toCol){\r\n\t\t\t\tthis.table.columnManager.moveColumnActual(this.moving, this.toCol, this.toColAfter);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.moving = false;\r\n\t\t\tthis.toCol = false;\r\n\t\t\tthis.toColAfter = false;\r\n\t\t\t\r\n\t\t\tif(!this.touchMove){\r\n\t\t\t\tdocument.body.removeEventListener(\"mousemove\", this.moveHover);\r\n\t\t\t\tdocument.body.removeEventListener(\"mouseup\", this.endMove);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tmoveHover(e){\r\n\t\tvar columnHolder = this.table.columnManager.getElement(),\r\n\t\tscrollLeft = columnHolder.scrollLeft,\r\n\t\txPos = ((this.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(columnHolder).left) + scrollLeft,\r\n\t\tscrollPos;\r\n\t\t\r\n\t\tthis.hoverElement.style.left = (xPos - this.startX) + \"px\";\r\n\t\t\r\n\t\tif(xPos - scrollLeft < this.autoScrollMargin){\r\n\t\t\tif(!this.autoScrollTimeout){\r\n\t\t\t\tthis.autoScrollTimeout = setTimeout(() => {\r\n\t\t\t\t\tscrollPos = Math.max(0,scrollLeft-5);\r\n\t\t\t\t\tthis.table.rowManager.getElement().scrollLeft = scrollPos;\r\n\t\t\t\t\tthis.autoScrollTimeout = false;\r\n\t\t\t\t}, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(scrollLeft + columnHolder.clientWidth - xPos < this.autoScrollMargin){\r\n\t\t\tif(!this.autoScrollTimeout){\r\n\t\t\t\tthis.autoScrollTimeout = setTimeout(() => {\r\n\t\t\t\t\tscrollPos = Math.min(columnHolder.clientWidth, scrollLeft+5);\r\n\t\t\t\t\tthis.table.rowManager.getElement().scrollLeft = scrollPos;\r\n\t\t\t\t\tthis.autoScrollTimeout = false;\r\n\t\t\t\t}, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMoveColumns.moduleName = \"moveColumn\";\r\n\r\nexport default MoveColumns;\r\n","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass MoveRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.placeholderElement = this.createPlaceholderElement();\r\n\t\tthis.hoverElement = false; //floating row header element\r\n\t\tthis.checkTimeout = false; //click check timeout holder\r\n\t\tthis.checkPeriod = 150; //period to wait on mousedown to consider this a move and not a click\r\n\t\tthis.moving = false; //currently moving row\r\n\t\tthis.toRow = false; //destination row\r\n\t\tthis.toRowAfter = false; //position of moving row relative to the desitnation row\r\n\t\tthis.hasHandle = false; //row has handle instead of fully movable row\r\n\t\tthis.startY = 0; //starting Y position within header element\r\n\t\tthis.startX = 0; //starting X position within header element\r\n\r\n\t\tthis.moveHover = this.moveHover.bind(this);\r\n\t\tthis.endMove = this.endMove.bind(this);\r\n\t\tthis.tableRowDropEvent = false;\r\n\r\n\t\tthis.touchMove = false;\r\n\r\n\t\tthis.connection = false;\r\n\t\tthis.connectionSelectorsTables = false;\r\n\t\tthis.connectionSelectorsElements = false;\r\n\t\tthis.connectionElements = [];\r\n\t\tthis.connections = [];\r\n\r\n\t\tthis.connectedTable = false;\r\n\t\tthis.connectedRow = false;\r\n\r\n\t\tthis.registerTableOption(\"movableRows\", false); //enable movable rows\r\n\t\tthis.registerTableOption(\"movableRowsConnectedTables\", false); //tables for movable rows to be connected to\r\n\t\tthis.registerTableOption(\"movableRowsConnectedElements\", false); //other elements for movable rows to be connected to\r\n\t\tthis.registerTableOption(\"movableRowsSender\", false);\r\n\t\tthis.registerTableOption(\"movableRowsReceiver\", \"insert\");\r\n\r\n\t\tthis.registerColumnOption(\"rowHandle\");\r\n\t}\r\n\r\n\tcreatePlaceholderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\tel.classList.add(\"tabulator-row-placeholder\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.movableRows){\r\n\t\t\tthis.connectionSelectorsTables = this.table.options.movableRowsConnectedTables;\r\n\t\t\tthis.connectionSelectorsElements = this.table.options.movableRowsConnectedElements;\r\n\r\n\t\t\tthis.connection = this.connectionSelectorsTables || this.connectionSelectorsElements;\r\n\r\n\t\t\tthis.subscribe(\"cell-init\", this.initializeCell.bind(this));\r\n\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeGroupHeader(group){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\trowEl;\r\n\r\n\t\t//inter table drag drop\r\n\t\tconfig.mouseup = function(e){\r\n\t\t\tself.tableRowDrop(e, row);\r\n\t\t}.bind(self);\r\n\r\n\t\t//same table drag drop\r\n\t\tconfig.mousemove = function(e){\r\n\t\t\tif(((e.pageY - Helpers.elOffset(group.element).top) + self.table.rowManager.element.scrollTop) > (group.getHeight() / 2)){\r\n\t\t\t\tif(self.toRow !== group || !self.toRowAfter){\r\n\t\t\t\t\tvar rowEl = group.getElement();\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling);\r\n\t\t\t\t\tself.moveRow(group, true);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(self.toRow !== group || self.toRowAfter){\r\n\t\t\t\t\tvar rowEl = group.getElement();\r\n\t\t\t\t\tif(rowEl.previousSibling){\r\n\t\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl);\r\n\t\t\t\t\t\tself.moveRow(group, false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.bind(self);\r\n\r\n\t\tgroup.modules.moveRow = config;\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\trowEl;\r\n\r\n\t\t//inter table drag drop\r\n\t\tconfig.mouseup = function(e){\r\n\t\t\tself.tableRowDrop(e, row);\r\n\t\t}.bind(self);\r\n\r\n\t\t//same table drag drop\r\n\t\tconfig.mousemove = function(e){\r\n\t\t\tvar rowEl = row.getElement();\r\n\r\n\t\t\tif(((e.pageY - Helpers.elOffset(rowEl).top) + self.table.rowManager.element.scrollTop) > (row.getHeight() / 2)){\r\n\t\t\t\tif(self.toRow !== row || !self.toRowAfter){\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling);\r\n\t\t\t\t\tself.moveRow(row, true);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(self.toRow !== row || self.toRowAfter){\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl);\r\n\t\t\t\t\tself.moveRow(row, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.bind(self);\r\n\r\n\r\n\t\tif(!this.hasHandle){\r\n\r\n\t\t\trowEl = row.getElement();\r\n\r\n\t\t\trowEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, row);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\trowEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.bindTouchEvents(row, row.getElement());\r\n\t\t}\r\n\r\n\t\trow.modules.moveRow = config;\r\n\t}\r\n\r\n\tinitializeColumn(column){\r\n\t\tif(column.definition.rowHandle && this.table.options.movableRows !== false){\r\n\t\t\tthis.hasHandle = true;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeCell(cell){\r\n\t\tif(cell.column.definition.rowHandle && this.table.options.movableRows !== false){\r\n\t\t\tvar self = this,\r\n\t\t\tcellEl = cell.getElement(true);\r\n\r\n\t\t\tcellEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, cell.row);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tcellEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.bindTouchEvents(cell.row, cellEl);\r\n\t\t}\r\n\t}\r\n\r\n\tbindTouchEvents(row, element){\r\n\t\tvar startYMove = false, //shifting center position of the cell\r\n\t\tdir = false,\r\n\t\tcurrentRow, nextRow, prevRow, nextRowHeight, prevRowHeight, nextRowHeightLast, prevRowHeightLast;\r\n\r\n\t\telement.addEventListener(\"touchstart\", (e) => {\r\n\t\t\tthis.checkTimeout = setTimeout(() => {\r\n\t\t\t\tthis.touchMove = true;\r\n\t\t\t\tcurrentRow = row;\r\n\t\t\t\tnextRow = row.nextRow();\r\n\t\t\t\tnextRowHeight = nextRow ? nextRow.getHeight()/2 : 0;\r\n\t\t\t\tprevRow = row.prevRow();\r\n\t\t\t\tprevRowHeight = prevRow ? prevRow.getHeight()/2 : 0;\r\n\t\t\t\tnextRowHeightLast = 0;\r\n\t\t\t\tprevRowHeightLast = 0;\r\n\t\t\t\tstartYMove = false;\r\n\r\n\t\t\t\tthis.startMove(e, row);\r\n\t\t\t}, this.checkPeriod);\r\n\t\t}, {passive: true});\r\n\t\tthis.moving, this.toRow, this.toRowAfter\r\n\t\telement.addEventListener(\"touchmove\", (e) => {\r\n\r\n\t\t\tvar halfCol, diff, moveToRow;\r\n\r\n\t\t\tif(this.moving){\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tthis.moveHover(e);\r\n\r\n\t\t\t\tif(!startYMove){\r\n\t\t\t\t\tstartYMove = e.touches[0].pageY;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdiff = e.touches[0].pageY - startYMove;\r\n\r\n\t\t\t\tif(diff > 0){\r\n\t\t\t\t\tif(nextRow && diff - nextRowHeightLast > nextRowHeight){\r\n\t\t\t\t\t\tmoveToRow = nextRow;\r\n\r\n\t\t\t\t\t\tif(moveToRow !== row){\r\n\t\t\t\t\t\t\tstartYMove = e.touches[0].pageY\r\n\t\t\t\t\t\t\tmoveToRow.getElement().parentNode.insertBefore(this.placeholderElement, moveToRow.getElement().nextSibling);\r\n\t\t\t\t\t\t\tthis.moveRow(moveToRow, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(prevRow && -diff - prevRowHeightLast > prevRowHeight){\r\n\t\t\t\t\t\tmoveToRow = prevRow;\r\n\r\n\t\t\t\t\t\tif(moveToRow !== row){\r\n\t\t\t\t\t\t\tstartYMove = e.touches[0].pageY;\r\n\t\t\t\t\t\t\tmoveToRow.getElement().parentNode.insertBefore(this.placeholderElement, moveToRow.getElement());\r\n\t\t\t\t\t\t\tthis.moveRow(moveToRow, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(moveToRow){\r\n\t\t\t\t\tcurrentRow = moveToRow;\r\n\t\t\t\t\tnextRow = moveToRow.nextRow();\r\n\t\t\t\t\tnextRowHeightLast = nextRowHeight;\r\n\t\t\t\t\tnextRowHeight = nextRow ? nextRow.getHeight() / 2 : 0;\r\n\t\t\t\t\tprevRow = moveToRow.prevRow();\r\n\t\t\t\t\tprevRowHeightLast = prevRowHeight;\r\n\t\t\t\t\tprevRowHeight = prevRow ? prevRow.getHeight() / 2 : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\telement.addEventListener(\"touchend\", (e) => {\r\n\t\t\tif(this.checkTimeout){\r\n\t\t\t\tclearTimeout(this.checkTimeout);\r\n\t\t\t}\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.endMove(e);\r\n\t\t\t\tthis.touchMove = false;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t_bindMouseMove(){\r\n\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\tif((row.type === \"row\" || row.type === \"group\") && row.modules.moveRow && row.modules.moveRow.mousemove){\r\n\t\t\t\trow.getElement().addEventListener(\"mousemove\", row.modules.moveRow.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t_unbindMouseMove(){\r\n\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\tif((row.type === \"row\" || row.type === \"group\") && row.modules.moveRow && row.modules.moveRow.mousemove){\r\n\t\t\t\trow.getElement().removeEventListener(\"mousemove\", row.modules.moveRow.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tstartMove(e, row){\r\n\t\tvar element = row.getElement();\r\n\r\n\t\tthis.setStartPosition(e, row);\r\n\r\n\t\tthis.moving = row;\r\n\r\n\t\tthis.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\t//create placeholder\r\n\t\tthis.placeholderElement.style.width = row.getWidth() + \"px\";\r\n\t\tthis.placeholderElement.style.height = row.getHeight() + \"px\";\r\n\r\n\t\tif(!this.connection){\r\n\t\t\telement.parentNode.insertBefore(this.placeholderElement, element);\r\n\t\t\telement.parentNode.removeChild(element);\r\n\t\t}else{\r\n\t\t\tthis.table.element.classList.add(\"tabulator-movingrow-sending\");\r\n\t\t\tthis.connectToTables(row);\r\n\t\t}\r\n\r\n\t\t//create hover element\r\n\t\tthis.hoverElement = element.cloneNode(true);\r\n\t\tthis.hoverElement.classList.add(\"tabulator-moving\");\r\n\r\n\t\tif(this.connection){\r\n\t\t\tdocument.body.appendChild(this.hoverElement);\r\n\t\t\tthis.hoverElement.style.left = \"0\";\r\n\t\t\tthis.hoverElement.style.top = \"0\";\r\n\t\t\tthis.hoverElement.style.width = this.table.element.clientWidth + \"px\";\r\n\t\t\tthis.hoverElement.style.whiteSpace = \"nowrap\";\r\n\t\t\tthis.hoverElement.style.overflow = \"hidden\";\r\n\t\t\tthis.hoverElement.style.pointerEvents = \"none\";\r\n\t\t}else{\r\n\t\t\tthis.table.rowManager.getTableElement().appendChild(this.hoverElement);\r\n\r\n\t\t\tthis.hoverElement.style.left = \"0\";\r\n\t\t\tthis.hoverElement.style.top = \"0\";\r\n\r\n\t\t\tthis._bindMouseMove();\r\n\t\t}\r\n\r\n\t\tdocument.body.addEventListener(\"mousemove\", this.moveHover);\r\n\t\tdocument.body.addEventListener(\"mouseup\", this.endMove);\r\n\r\n\t\tthis.dispatchExternal(\"rowMoving\", row.getComponent());\r\n\r\n\t\tthis.moveHover(e);\r\n\t}\r\n\r\n\tsetStartPosition(e, row){\r\n\t\tvar pageX = this.touchMove ? e.touches[0].pageX : e.pageX,\r\n\t\tpageY = this.touchMove ? e.touches[0].pageY : e.pageY,\r\n\t\telement, position;\r\n\r\n\t\telement = row.getElement();\r\n\t\tif(this.connection){\r\n\t\t\tposition = element.getBoundingClientRect();\r\n\r\n\t\t\tthis.startX = position.left - pageX + window.pageXOffset;\r\n\t\t\tthis.startY = position.top - pageY + window.pageYOffset;\r\n\t\t}else{\r\n\t\t\tthis.startY = (pageY - element.getBoundingClientRect().top);\r\n\t\t}\r\n\t}\r\n\r\n\tendMove(e){\r\n\t\tif(!e || e.which === 1 || this.touchMove){\r\n\t\t\tthis._unbindMouseMove();\r\n\r\n\t\t\tif(!this.connection){\r\n\t\t\t\tthis.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling);\r\n\t\t\t\tthis.placeholderElement.parentNode.removeChild(this.placeholderElement);\r\n\t\t\t}\r\n\r\n\t\t\tthis.hoverElement.parentNode.removeChild(this.hoverElement);\r\n\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tif(this.toRow){\r\n\t\t\t\tthis.table.rowManager.moveRow(this.moving, this.toRow, this.toRowAfter);\r\n\t\t\t}else{\r\n\t\t\t\tthis.dispatchExternal(\"rowMoveCancelled\", this.moving.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.moving = false;\r\n\t\t\tthis.toRow = false;\r\n\t\t\tthis.toRowAfter = false;\r\n\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", this.moveHover);\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", this.endMove);\r\n\r\n\t\t\tif(this.connection){\r\n\t\t\t\tthis.table.element.classList.remove(\"tabulator-movingrow-sending\");\r\n\t\t\t\tthis.disconnectFromTables();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmoveRow(row, after){\r\n\t\tthis.toRow = row;\r\n\t\tthis.toRowAfter = after;\r\n\t}\r\n\r\n\tmoveHover(e){\r\n\t\tif(this.connection){\r\n\t\t\tthis.moveHoverConnections.call(this, e);\r\n\t\t}else{\r\n\t\t\tthis.moveHoverTable.call(this, e);\r\n\t\t}\r\n\t}\r\n\r\n\tmoveHoverTable(e){\r\n\t\tvar rowHolder = this.table.rowManager.getElement(),\r\n\t\tscrollTop = rowHolder.scrollTop,\r\n\t\tyPos = ((this.touchMove ? e.touches[0].pageY : e.pageY) - rowHolder.getBoundingClientRect().top) + scrollTop,\r\n\t\tscrollPos;\r\n\r\n\t\tthis.hoverElement.style.top = (yPos - this.startY) + \"px\";\r\n\t}\r\n\r\n\tmoveHoverConnections(e){\r\n\t\tthis.hoverElement.style.left = (this.startX + (this.touchMove ? e.touches[0].pageX : e.pageX)) + \"px\";\r\n\t\tthis.hoverElement.style.top = (this.startY + (this.touchMove ? e.touches[0].pageY : e.pageY)) + \"px\";\r\n\t}\r\n\r\n\telementRowDrop(e, element, row){\r\n\t\tthis.dispatchExternal(\"movableRowsElementDrop\", e, element, row ? row.getComponent() : false);\r\n\t}\r\n\r\n\t//establish connection with other tables\r\n\tconnectToTables(row){\r\n\t\tvar connectionTables;\r\n\r\n\t\tif(this.connectionSelectorsTables){\r\n\t\t\tconnectionTables = this.commsConnections(this.connectionSelectorsTables);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSendingStart\", connectionTables);\r\n\r\n\t\t\tthis.commsSend(this.connectionSelectorsTables, \"moveRow\", \"connect\", {\r\n\t\t\t\trow:row,\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.connectionSelectorsElements){\r\n\r\n\t\t\tthis.connectionElements = [];\r\n\r\n\t\t\tif(!Array.isArray(this.connectionSelectorsElements)){\r\n\t\t\t\tthis.connectionSelectorsElements = [this.connectionSelectorsElements];\r\n\t\t\t}\r\n\r\n\t\t\tthis.connectionSelectorsElements.forEach((query) => {\r\n\t\t\t\tif(typeof query === \"string\"){\r\n\t\t\t\t\tthis.connectionElements = this.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(query)));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.connectionElements.push(query);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.connectionElements.forEach((element) => {\r\n\t\t\t\tvar dropEvent = (e) => {\r\n\t\t\t\t\tthis.elementRowDrop(e, element, this.moving);\r\n\t\t\t\t};\r\n\r\n\t\t\t\telement.addEventListener(\"mouseup\", dropEvent);\r\n\t\t\t\telement.tabulatorElementDropEvent = dropEvent;\r\n\r\n\t\t\t\telement.classList.add(\"tabulator-movingrow-receiving\");\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t//disconnect from other tables\r\n\tdisconnectFromTables(){\r\n\t\tvar connectionTables;\r\n\r\n\t\tif(this.connectionSelectorsTables){\r\n\t\t\tconnectionTables = this.commsConnections(this.connectionSelectorsTables);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSendingStop\", connectionTables);\r\n\r\n\t\t\tthis.commsSend(this.connectionSelectorsTables, \"moveRow\", \"disconnect\");\r\n\t\t}\r\n\r\n\t\tthis.connectionElements.forEach((element) => {\r\n\t\t\telement.classList.remove(\"tabulator-movingrow-receiving\");\r\n\t\t\telement.removeEventListener(\"mouseup\", element.tabulatorElementDropEvent);\r\n\t\t\tdelete element.tabulatorElementDropEvent;\r\n\t\t});\r\n\t}\r\n\r\n\t//accept incomming connection\r\n\tconnect(table, row){\r\n\t\tif(!this.connectedTable){\r\n\t\t\tthis.connectedTable = table;\r\n\t\t\tthis.connectedRow = row;\r\n\r\n\t\t\tthis.table.element.classList.add(\"tabulator-movingrow-receiving\");\r\n\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\t\tif(row.type === \"row\" && row.modules.moveRow && row.modules.moveRow.mouseup){\r\n\t\t\t\t\trow.getElement().addEventListener(\"mouseup\", row.modules.moveRow.mouseup);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.tableRowDropEvent = this.tableRowDrop.bind(this);\r\n\r\n\t\t\tthis.table.element.addEventListener(\"mouseup\", this.tableRowDropEvent);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivingStart\", row, table);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Row Error - Table cannot accept connection, already connected to table:\", this.connectedTable);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//close incomming connection\r\n\tdisconnect(table){\r\n\t\tif(table === this.connectedTable){\r\n\t\t\tthis.connectedTable = false;\r\n\t\t\tthis.connectedRow = false;\r\n\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-movingrow-receiving\");\r\n\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) =>{\r\n\t\t\t\tif(row.type === \"row\" && row.modules.moveRow && row.modules.moveRow.mouseup){\r\n\t\t\t\t\trow.getElement().removeEventListener(\"mouseup\", row.modules.moveRow.mouseup);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.table.element.removeEventListener(\"mouseup\", this.tableRowDropEvent);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivingStop\", table);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Row Error - trying to disconnect from non connected table\")\r\n\t\t}\r\n\t}\r\n\r\n\tdropComplete(table, row, success){\r\n\t\tvar sender = false;\r\n\r\n\t\tif(success){\r\n\r\n\t\t\tswitch(typeof this.table.options.movableRowsSender){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tsender = this.senders[this.table.options.movableRowsSender];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tsender = this.table.options.movableRowsSender;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(sender){\r\n\t\t\t\tsender.call(this, this.moving.getComponent(), row ? row.getComponent() : undefined, table)\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.options.movableRowsSender){\r\n\t\t\t\t\tconsole.warn(\"Mover Row Error - no matching sender found:\", this.table.options.movableRowsSender);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSent\", this.moving.getComponent(), row ? row.getComponent() : undefined, table);\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"movableRowsSentFailed\", this.moving.getComponent(), row ? row.getComponent() : undefined, table);\r\n\t\t}\r\n\r\n\t\tthis.endMove();\r\n\t}\r\n\r\n\ttableRowDrop(e, row){\r\n\t\tvar receiver = false,\r\n\t\tsuccess = false;\r\n\r\n\t\te.stopImmediatePropagation();\r\n\r\n\t\tswitch(typeof this.table.options.movableRowsReceiver){\r\n\t\t\tcase \"string\":\r\n\t\t\treceiver = this.receivers[this.table.options.movableRowsReceiver];\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\treceiver = this.table.options.movableRowsReceiver;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(receiver){\r\n\t\t\tsuccess = receiver.call(this, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Mover Row Error - no matching receiver found:\", this.table.options.movableRowsReceiver)\r\n\t\t}\r\n\r\n\t\tif(success){\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceived\", this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable);\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivedFailed\", this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable);\r\n\t\t}\r\n\r\n\t\tthis.commsSend(this.connectedTable, \"moveRow\", \"dropcomplete\", {\r\n\t\t\trow:row,\r\n\t\t\tsuccess:success,\r\n\t\t});\r\n\t}\r\n\r\n\tcommsReceived(table, action, data){\r\n\t\tswitch(action){\r\n\t\t\tcase \"connect\":\r\n\t\t\treturn this.connect(table, data.row);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"disconnect\":\r\n\t\t\treturn this.disconnect(table);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"dropcomplete\":\r\n\t\t\treturn this.dropComplete(table, data.row, data.success);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMoveRows.prototype.receivers = {\r\n\tinsert:function(fromRow, toRow, fromTable){\r\n\t\tthis.table.addRow(fromRow.getData(), undefined, toRow);\r\n\t\treturn true;\r\n\t},\r\n\r\n\tadd:function(fromRow, toRow, fromTable){\r\n\t\tthis.table.addRow(fromRow.getData());\r\n\t\treturn true;\r\n\t},\r\n\r\n\tupdate:function(fromRow, toRow, fromTable){\r\n\t\tif(toRow){\r\n\t\t\ttoRow.update(fromRow.getData());\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\r\n\treplace:function(fromRow, toRow, fromTable){\r\n\t\tif(toRow){\r\n\t\t\tthis.table.addRow(fromRow.getData(), undefined, toRow);\r\n\t\t\ttoRow.delete();\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n};\r\n\r\nMoveRows.prototype.senders = {\r\n\tdelete:function(fromRow, toRow, toTable){\r\n\t\tfromRow.delete();\r\n\t}\r\n};\r\n\r\nMoveRows.moduleName = \"moveRow\";\r\n\r\nexport default MoveRows;","export default {};","import Module from '../../core/Module.js';\r\n\r\nimport defaultMutators from './defaults/mutators.js';\r\n\r\nclass Mutator extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.allowedTypes = [\"\", \"data\", \"edit\", \"clipboard\"]; //list of muatation types\r\n\t\tthis.enabled = true;\r\n\r\n\t\tthis.registerColumnOption(\"mutator\");\r\n\t\tthis.registerColumnOption(\"mutatorParams\");\r\n\t\tthis.registerColumnOption(\"mutatorData\");\r\n\t\tthis.registerColumnOption(\"mutatorDataParams\");\r\n\t\tthis.registerColumnOption(\"mutatorEdit\");\r\n\t\tthis.registerColumnOption(\"mutatorEditParams\");\r\n\t\tthis.registerColumnOption(\"mutatorClipboard\");\r\n\t\tthis.registerColumnOption(\"mutatorClipboardParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-value-changing\", this.transformCell.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"row-data-init-before\", this.rowDataChanged.bind(this));\r\n\t\tthis.subscribe(\"row-data-changing\", this.rowDataChanged.bind(this));\r\n\t}\r\n\r\n\trowDataChanged(row, tempData, updatedData){\r\n\t\treturn this.transformRow(tempData, \"data\", updatedData);\r\n\t}\r\n\r\n\t//initialize column mutator\r\n\tinitializeColumn(column){\r\n\t\tvar match = false,\r\n\t\tconfig = {};\r\n\r\n\t\tthis.allowedTypes.forEach((type) => {\r\n\t\t\tvar key = \"mutator\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\t\tmutator;\r\n\r\n\t\t\tif(column.definition[key]){\r\n\t\t\t\tmutator = this.lookupMutator(column.definition[key]);\r\n\r\n\t\t\t\tif(mutator){\r\n\t\t\t\t\tmatch = true;\r\n\r\n\t\t\t\t\tconfig[key] = {\r\n\t\t\t\t\t\tmutator:mutator,\r\n\t\t\t\t\t\tparams: column.definition[key + \"Params\"] || {},\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tcolumn.modules.mutate = config;\r\n\t\t}\r\n\t}\r\n\r\n\tlookupMutator(value){\r\n\t\tvar mutator = false;\r\n\r\n\t\t//set column mutator\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Mutator.mutators[value]){\r\n\t\t\t\tmutator = Mutator.mutators[value];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Mutator Error - No such mutator found, ignoring: \", value);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tmutator = value;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn mutator;\r\n\t}\r\n\r\n\t//apply mutator to row\r\n\ttransformRow(data, type, updatedData){\r\n\t\tvar key = \"mutator\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\tvalue;\r\n\r\n\t\tif(this.enabled){\r\n\r\n\t\t\tthis.table.columnManager.traverse((column) => {\r\n\t\t\t\tvar mutator, params, component;\r\n\r\n\t\t\t\tif(column.modules.mutate){\r\n\t\t\t\t\tmutator = column.modules.mutate[key] || column.modules.mutate.mutator || false;\r\n\r\n\t\t\t\t\tif(mutator){\r\n\t\t\t\t\t\tvalue = column.getFieldValue(typeof updatedData !== \"undefined\" ? updatedData : data);\r\n\r\n\t\t\t\t\t\tif(type == \"data\" || typeof value !== \"undefined\"){\r\n\t\t\t\t\t\t\tcomponent = column.getComponent();\r\n\t\t\t\t\t\t\tparams = typeof mutator.params === \"function\" ? mutator.params(value, data, type, component) : mutator.params;\r\n\t\t\t\t\t\t\tcolumn.setFieldValue(data, mutator.mutator(value, data, type, params, component));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//apply mutator to new cell value\r\n\ttransformCell(cell, value){\r\n\t\tif(cell.column.modules.mutate){\r\n\t\t\tvar mutator = cell.column.modules.mutate.mutatorEdit || cell.column.modules.mutate.mutator || false,\r\n\t\t\ttempData = {};\r\n\r\n\t\t\tif(mutator){\r\n\t\t\t\ttempData = Object.assign(tempData, cell.row.getData());\r\n\t\t\t\tcell.column.setFieldValue(tempData, value);\r\n\t\t\t\treturn mutator.mutator(value, tempData, \"edit\", mutator.params, cell.getComponent());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\tenable(){\r\n\t\tthis.enabled = true;\r\n\t}\r\n\r\n\tdisable(){\r\n\t\tthis.enabled = false;\r\n\t}\r\n}\r\n\r\nMutator.moduleName = \"mutator\";\r\n\r\n//load defaults\r\nMutator.mutators = defaultMutators;\r\n\r\nexport default Mutator;","export default function(pageSize, currentRow, currentPage, totalRows, totalPages){\r\n\tvar el = document.createElement(\"span\"),\r\n\tshowingEl = document.createElement(\"span\"),\r\n\tvalueEl = document.createElement(\"span\"),\r\n\tofEl = document.createElement(\"span\"),\r\n\ttotalEl = document.createElement(\"span\"),\r\n\trowsEl = document.createElement(\"span\");\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|showing\", (value) => {\r\n\t\tshowingEl.innerHTML = value;\r\n\t});\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|of\", (value) => {\r\n\t\tofEl.innerHTML = value;\r\n\t});\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|rows\", (value) => {\r\n\t\trowsEl.innerHTML = value;\r\n\t});\r\n\r\n\tif(totalRows){\r\n\t\tvalueEl.innerHTML = \" \" + currentRow + \"-\" + Math.min((currentRow + pageSize - 1), totalRows) + \" \";\r\n\t\t\r\n\t\ttotalEl.innerHTML = \" \" + totalRows + \" \";\r\n\t\t\r\n\t\tel.appendChild(showingEl);\r\n\t\tel.appendChild(valueEl);\r\n\t\tel.appendChild(ofEl);\r\n\t\tel.appendChild(totalEl);\r\n\t\tel.appendChild(rowsEl);\r\n\t}else{\r\n\t\tvalueEl.innerHTML = \" 0 \";\r\n\r\n\t\tel.appendChild(showingEl);\r\n\t\tel.appendChild(valueEl);\r\n\t\tel.appendChild(rowsEl);\r\n\t}\r\n\t\r\n\treturn el;\r\n};","export default function(pageSize, currentRow, currentPage, totalRows, totalPages){\r\n\r\n var el = document.createElement(\"span\"),\r\n\tshowingEl = document.createElement(\"span\"),\r\n\tvalueEl = document.createElement(\"span\"),\r\n\tofEl = document.createElement(\"span\"),\r\n\ttotalEl = document.createElement(\"span\"),\r\n\trowsEl = document.createElement(\"span\");\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|showing\", (value) => {\r\n\t\tshowingEl.innerHTML = value;\r\n\t});\r\n\t\r\n\tvalueEl.innerHTML = \" \" + currentPage + \" \";\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|of\", (value) => {\r\n\t\tofEl.innerHTML = value;\r\n\t});\r\n\t\r\n\ttotalEl.innerHTML = \" \" + totalPages + \" \";\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|pages\", (value) => {\r\n\t\trowsEl.innerHTML = value;\r\n\t});\r\n\t\r\n\tel.appendChild(showingEl);\r\n\tel.appendChild(valueEl);\r\n\tel.appendChild(ofEl);\r\n\tel.appendChild(totalEl);\r\n\tel.appendChild(rowsEl);\r\n\t\r\n\treturn el;\r\n};","import rows from './pageCounters/rows.js';\r\nimport pages from './pageCounters/pages.js';\r\n\r\n\r\nexport default {\r\n\trows:rows,\r\n\tpages:pages,\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultPageCounters from './defaults/pageCounters.js';\r\n\r\nclass Page extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.mode = \"local\";\r\n\t\tthis.progressiveLoad = false;\r\n\t\t\r\n\t\tthis.element = null;\r\n\t\tthis.pageCounterElement = null;\r\n\t\tthis.pageCounter = null;\r\n\t\t\r\n\t\tthis.size = 0;\r\n\t\tthis.page = 1;\r\n\t\tthis.count = 5;\r\n\t\tthis.max = 1;\r\n\r\n\t\tthis.remoteRowCountEstimate = null;\r\n\t\t\r\n\t\tthis.displayIndex = 0; //index in display pipeline\r\n\t\t\r\n\t\tthis.initialLoad = true;\r\n\t\tthis.dataChanging = false; //flag to check if data is being changed by this module\r\n\t\t\r\n\t\tthis.pageSizes = [];\r\n\t\t\r\n\t\tthis.registerTableOption(\"pagination\", false); //set pagination type\r\n\t\tthis.registerTableOption(\"paginationMode\", \"local\"); //local or remote pagination\r\n\t\tthis.registerTableOption(\"paginationSize\", false); //set number of rows to a page\r\n\t\tthis.registerTableOption(\"paginationInitialPage\", 1); //initial page to show on load\r\n\t\tthis.registerTableOption(\"paginationCounter\", false); // set pagination counter\r\n\t\tthis.registerTableOption(\"paginationCounterElement\", false); // set pagination counter\r\n\t\tthis.registerTableOption(\"paginationButtonCount\", 5); // set count of page button\r\n\t\tthis.registerTableOption(\"paginationSizeSelector\", false); //add pagination size selector element\r\n\t\tthis.registerTableOption(\"paginationElement\", false); //element to hold pagination numbers\r\n\t\t// this.registerTableOption(\"paginationDataSent\", {}); //pagination data sent to the server\r\n\t\t// this.registerTableOption(\"paginationDataReceived\", {}); //pagination data received from the server\r\n\t\tthis.registerTableOption(\"paginationAddRow\", \"page\"); //add rows on table or page\r\n\t\t\r\n\t\tthis.registerTableOption(\"progressiveLoad\", false); //progressive loading\r\n\t\tthis.registerTableOption(\"progressiveLoadDelay\", 0); //delay between requests\r\n\t\tthis.registerTableOption(\"progressiveLoadScrollMargin\", 0); //margin before scroll begins\r\n\t\t\r\n\t\tthis.registerTableFunction(\"setMaxPage\", this.setMaxPage.bind(this));\r\n\t\tthis.registerTableFunction(\"setPage\", this.setPage.bind(this));\r\n\t\tthis.registerTableFunction(\"setPageToRow\", this.userSetPageToRow.bind(this));\r\n\t\tthis.registerTableFunction(\"setPageSize\", this.userSetPageSize.bind(this));\r\n\t\tthis.registerTableFunction(\"getPageSize\", this.getPageSize.bind(this));\r\n\t\tthis.registerTableFunction(\"previousPage\", this.previousPage.bind(this));\r\n\t\tthis.registerTableFunction(\"nextPage\", this.nextPage.bind(this));\r\n\t\tthis.registerTableFunction(\"getPage\", this.getPage.bind(this));\r\n\t\tthis.registerTableFunction(\"getPageMax\", this.getPageMax.bind(this));\r\n\t\t\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"pageTo\", this.setPageToRow.bind(this));\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"row-added\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"data-processed\", this.initialLoadComplete.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.calculatePageSizes.bind(this));\r\n\r\n\t\t\tif(this.table.options.paginationAddRow == \"page\"){\r\n\t\t\t\tthis.subscribe(\"row-adding-position\", this.rowAddingPosition.bind(this));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.options.paginationMode === \"remote\"){\r\n\t\t\t\tthis.subscribe(\"data-params\", this.remotePageParams.bind(this));\r\n\t\t\t\tthis.subscribe(\"data-loaded\", this._parseRemoteData.bind(this));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.options.progressiveLoad){\r\n\t\t\t\tconsole.error(\"Progressive Load Error - Pagination and progressive load cannot be used at the same time\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.registerDisplayHandler(this.restOnRenderBefore.bind(this), 40);\r\n\t\t\tthis.registerDisplayHandler(this.getRows.bind(this), 50);\r\n\t\t\t\r\n\t\t\tthis.createElements();\r\n\t\t\tthis.initializePageCounter();\r\n\t\t\tthis.initializePaginator();\r\n\t\t}else if(this.table.options.progressiveLoad){\r\n\t\t\tthis.subscribe(\"data-params\", this.remotePageParams.bind(this));\r\n\t\t\tthis.subscribe(\"data-loaded\", this._parseRemoteData.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.calculatePageSizes.bind(this));\r\n\t\t\tthis.subscribe(\"data-processed\", this.initialLoadComplete.bind(this));\r\n\t\t\t\r\n\t\t\tthis.initializeProgressive(this.table.options.progressiveLoad)\r\n\t\t\t\r\n\t\t\tif(this.table.options.progressiveLoad === \"scroll\"){\r\n\t\t\t\tthis.subscribe(\"scroll-vertical\", this.scrollVertical.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trowAddingPosition(row, top){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tdispRows = rowManager.getDisplayRows(),\r\n\t\tindex;\r\n\t\t\r\n\t\tif(top){\r\n\t\t\tif(dispRows.length){\r\n\t\t\t\tindex = dispRows[0];\r\n\t\t\t}else{\r\n\t\t\t\tif(rowManager.activeRows.length){\r\n\t\t\t\t\tindex = rowManager.activeRows[rowManager.activeRows.length-1];\r\n\t\t\t\t\ttop = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(dispRows.length){\r\n\t\t\t\tindex = dispRows[dispRows.length - 1];\r\n\t\t\t\ttop = dispRows.length < this.size ? false : true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn {index, top}\r\n\t}\r\n\t\r\n\tcalculatePageSizes(){\r\n\t\tvar testElRow, testElCell;\r\n\t\t\r\n\t\tif(this.table.options.paginationSize){\r\n\t\t\tthis.size = this.table.options.paginationSize;\r\n\t\t}else{\r\n\t\t\ttestElRow = document.createElement(\"div\");\r\n\t\t\ttestElRow.classList.add(\"tabulator-row\");\r\n\t\t\ttestElRow.style.visibility = \"hidden\";\r\n\t\t\t\r\n\t\t\ttestElCell = document.createElement(\"div\");\r\n\t\t\ttestElCell.classList.add(\"tabulator-cell\");\r\n\t\t\ttestElCell.innerHTML = \"Page Row Test\";\r\n\t\t\t\r\n\t\t\ttestElRow.appendChild(testElCell);\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getTableElement().appendChild(testElRow);\r\n\t\t\t\r\n\t\t\tthis.size = Math.floor(this.table.rowManager.getElement().clientHeight / testElRow.offsetHeight);\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getTableElement().removeChild(testElRow);\r\n\t\t}\r\n\t\t\r\n\t\tthis.generatePageSizeSelectList();\r\n\t}\r\n\t\r\n\tinitialLoadComplete(){\r\n\t\tthis.initialLoad = false;\r\n\t}\r\n\t\r\n\tremotePageParams(data, config, silent, params){\r\n\t\tif(!this.initialLoad){\r\n\t\t\tif((this.progressiveLoad && !silent) || (!this.progressiveLoad && !this.dataChanging)){\r\n\t\t\t\tthis.reset(true);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//configure request params\r\n\t\tparams.page = this.page;\r\n\t\t\r\n\t\t//set page size if defined\r\n\t\tif(this.size){\r\n\t\t\tparams.size = this.size;\r\n\t\t}\r\n\t\t\r\n\t\treturn params;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\tuserSetPageToRow(row){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\trow = this.rowManager.findRow(row);\r\n\t\t\t\r\n\t\t\tif(row){\r\n\t\t\t\treturn this.setPageToRow(row)\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn Promise.reject();\r\n\t}\r\n\t\r\n\tuserSetPageSize(size){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\tthis.setPageSize(size);\r\n\t\t\treturn this.setPage(1);\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\r\n\tscrollVertical(top, dir){\r\n\t\tvar element, diff, margin;\r\n\t\tif(!dir && !this.table.dataLoader.loading){\r\n\t\t\telement = this.table.rowManager.getElement();\r\n\t\t\tdiff = element.scrollHeight - element.clientHeight - top;\r\n\t\t\tmargin = this.table.options.progressiveLoadScrollMargin || (element.clientHeight * 2);\r\n\t\t\t\r\n\t\t\tif(diff < margin){\r\n\t\t\t\tthis.nextPage()\r\n\t\t\t\t.catch(() => {}); //consume the exception thrown when on the last page\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trestOnRenderBefore(rows, renderInPosition){\r\n\t\tif(!renderInPosition){\r\n\t\t\tif(this.mode === \"local\"){\r\n\t\t\t\tthis.reset();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\trowsUpdated(){\r\n\t\tthis.refreshData(true, \"all\");\r\n\t}\r\n\t\r\n\tcreateElements(){\r\n\t\tvar button;\r\n\t\t\r\n\t\tthis.element = document.createElement(\"span\");\r\n\t\tthis.element.classList.add(\"tabulator-paginator\");\r\n\t\t\r\n\t\tthis.pagesElement = document.createElement(\"span\");\r\n\t\tthis.pagesElement.classList.add(\"tabulator-pages\");\r\n\t\t\r\n\t\tbutton = document.createElement(\"button\");\r\n\t\tbutton.classList.add(\"tabulator-page\");\r\n\t\tbutton.setAttribute(\"type\", \"button\");\r\n\t\tbutton.setAttribute(\"role\", \"button\");\r\n\t\tbutton.setAttribute(\"aria-label\", \"\");\r\n\t\tbutton.setAttribute(\"title\", \"\");\r\n\t\t\r\n\t\tthis.firstBut = button.cloneNode(true);\r\n\t\tthis.firstBut.setAttribute(\"data-page\", \"first\");\r\n\t\t\r\n\t\tthis.prevBut = button.cloneNode(true);\r\n\t\tthis.prevBut.setAttribute(\"data-page\", \"prev\");\r\n\t\t\r\n\t\tthis.nextBut = button.cloneNode(true);\r\n\t\tthis.nextBut.setAttribute(\"data-page\", \"next\");\r\n\t\t\r\n\t\tthis.lastBut = button.cloneNode(true);\r\n\t\tthis.lastBut.setAttribute(\"data-page\", \"last\");\r\n\t\t\r\n\t\tif(this.table.options.paginationSizeSelector){\r\n\t\t\tthis.pageSizeSelect = document.createElement(\"select\");\r\n\t\t\tthis.pageSizeSelect.classList.add(\"tabulator-page-size\");\r\n\t\t}\r\n\t}\r\n\t\r\n\tgeneratePageSizeSelectList(){\r\n\t\tvar pageSizes = [];\r\n\t\t\r\n\t\tif(this.pageSizeSelect){\r\n\t\t\t\r\n\t\t\tif(Array.isArray(this.table.options.paginationSizeSelector)){\r\n\t\t\t\tpageSizes = this.table.options.paginationSizeSelector;\r\n\t\t\t\tthis.pageSizes = pageSizes;\r\n\t\t\t\t\r\n\t\t\t\tif(this.pageSizes.indexOf(this.size) == -1){\r\n\t\t\t\t\tpageSizes.unshift(this.size);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t\r\n\t\t\t\tif(this.pageSizes.indexOf(this.size) == -1){\r\n\t\t\t\t\tpageSizes = [];\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (let i = 1; i < 5; i++){\r\n\t\t\t\t\t\tpageSizes.push(this.size * i);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.pageSizes = pageSizes;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tpageSizes = this.pageSizes;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\twhile(this.pageSizeSelect.firstChild) this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);\r\n\t\t\t\r\n\t\t\tpageSizes.forEach((item) => {\r\n\t\t\t\tvar itemEl = document.createElement(\"option\");\r\n\t\t\t\titemEl.value = item;\r\n\t\t\t\t\r\n\t\t\t\tif(item === true){\r\n\t\t\t\t\tthis.langBind(\"pagination|all\", function(value){\r\n\t\t\t\t\t\titemEl.innerHTML = value;\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\titemEl.innerHTML = item;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tthis.pageSizeSelect.appendChild(itemEl);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.pageSizeSelect.value = this.size;\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializePageCounter(){\r\n\t\tvar counter = this.table.options.paginationCounter,\r\n\t\tpageCounter = null;\r\n\t\t\r\n\t\tif(counter){\r\n\t\t\tif(typeof counter === \"function\"){\r\n\t\t\t\tpageCounter = counter;\r\n\t\t\t}else{\r\n\t\t\t\tpageCounter = Page.pageCounters[counter];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(pageCounter){\r\n\t\t\t\tthis.pageCounter = pageCounter;\r\n\t\t\t\t\r\n\t\t\t\tthis.pageCounterElement = document.createElement(\"span\");\r\n\t\t\t\tthis.pageCounterElement.classList.add(\"tabulator-page-counter\");\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Pagination Error - No such page counter found: \", counter);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//setup pagination\r\n\tinitializePaginator(hidden){\r\n\t\tvar pageSelectLabel, paginationCounterHolder;\r\n\t\t\r\n\t\tif(!hidden){\r\n\t\t\t//build pagination element\r\n\t\t\t\r\n\t\t\t//bind localizations\r\n\t\t\tthis.langBind(\"pagination|first\", (value) => {\r\n\t\t\t\tthis.firstBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|first_title\", (value) => {\r\n\t\t\t\tthis.firstBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.firstBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|prev\", (value) => {\r\n\t\t\t\tthis.prevBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|prev_title\", (value) => {\r\n\t\t\t\tthis.prevBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.prevBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|next\", (value) => {\r\n\t\t\t\tthis.nextBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|next_title\", (value) => {\r\n\t\t\t\tthis.nextBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.nextBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|last\", (value) => {\r\n\t\t\t\tthis.lastBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|last_title\", (value) => {\r\n\t\t\t\tthis.lastBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.lastBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t//click bindings\r\n\t\t\tthis.firstBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.setPage(1)\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.prevBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.previousPage()\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.nextBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.nextPage()\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.lastBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.setPage(this.max)\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(this.table.options.paginationElement){\r\n\t\t\t\tthis.element = this.table.options.paginationElement;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.pageSizeSelect){\r\n\t\t\t\tpageSelectLabel = document.createElement(\"label\");\r\n\t\t\t\t\r\n\t\t\t\tthis.langBind(\"pagination|page_size\", (value) => {\r\n\t\t\t\t\tthis.pageSizeSelect.setAttribute(\"aria-label\", value);\r\n\t\t\t\t\tthis.pageSizeSelect.setAttribute(\"title\", value);\r\n\t\t\t\t\tpageSelectLabel.innerHTML = value;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.element.appendChild(pageSelectLabel);\r\n\t\t\t\tthis.element.appendChild(this.pageSizeSelect);\r\n\t\t\t\t\r\n\t\t\t\tthis.pageSizeSelect.addEventListener(\"change\", (e) => {\r\n\t\t\t\t\tthis.setPageSize(this.pageSizeSelect.value == \"true\" ? true : this.pageSizeSelect.value);\r\n\t\t\t\t\tthis.setPage(1)\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//append to DOM\r\n\t\t\tthis.element.appendChild(this.firstBut);\r\n\t\t\tthis.element.appendChild(this.prevBut);\r\n\t\t\tthis.element.appendChild(this.pagesElement);\r\n\t\t\tthis.element.appendChild(this.nextBut);\r\n\t\t\tthis.element.appendChild(this.lastBut);\r\n\t\t\t\r\n\t\t\tif(!this.table.options.paginationElement && !hidden){\r\n\t\t\t\tif(this.table.options.paginationCounter){\r\n\r\n\t\t\t\t\tpaginationCounterHolder \r\n\r\n\t\t\t\t\tif(this.table.options.paginationCounterElement){\r\n\t\t\t\t\t\tif(this.table.options.paginationCounterElement instanceof HTMLElement){\r\n\t\t\t\t\t\t\tthis.table.options.paginationCounterElement.appendChild(this.pageCounterElement);\r\n\t\t\t\t\t\t}else if(typeof this.table.options.paginationCounterElement === \"string\"){\r\n\t\t\t\t\t\t\tpaginationCounterHolder = document.querySelector(this.table.options.paginationCounterElement);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(paginationCounterHolder){\r\n\t\t\t\t\t\t\t\tpaginationCounterHolder.appendChild(this.pageCounterElement);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Pagination Error - Unable to find element matching paginationCounterElement selector:\", this.table.options.paginationCounterElement);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.table.footerManager.append(this.pageCounterElement);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.table.footerManager.append(this.element, this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.page = this.table.options.paginationInitialPage;\r\n\t\t\tthis.count = this.table.options.paginationButtonCount;\r\n\t\t}\r\n\t\t\r\n\t\t//set default values\r\n\t\tthis.mode = this.table.options.paginationMode;\r\n\t}\r\n\t\r\n\tinitializeProgressive(mode){\r\n\t\tthis.initializePaginator(true);\r\n\t\tthis.mode = \"progressive_\" + mode;\r\n\t\tthis.progressiveLoad = true;\r\n\t}\r\n\t\r\n\ttrackChanges(){\r\n\t\tthis.dispatch(\"page-changed\");\r\n\t}\r\n\t\r\n\tsetDisplayIndex(index){\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\t\r\n\tgetDisplayIndex(){\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\t\r\n\t//calculate maximum page from number of rows\r\n\tsetMaxRows(rowCount){\r\n\t\tif(!rowCount){\r\n\t\t\tthis.max = 1;\r\n\t\t}else{\r\n\t\t\tthis.max = this.size === true ? 1 : Math.ceil(rowCount/this.size);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.page > this.max){\r\n\t\t\tthis.page = this.max;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//reset to first page without triggering action\r\n\treset(force){\r\n\t\tif(!this.initialLoad){\r\n\t\t\tif(this.mode == \"local\" || force){\r\n\t\t\t\tthis.page = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set the maximum page\r\n\tsetMaxPage(max){\r\n\t\t\r\n\t\tmax = parseInt(max);\r\n\t\t\r\n\t\tthis.max = max || 1;\r\n\t\t\r\n\t\tif(this.page > this.max){\r\n\t\t\tthis.page = this.max;\r\n\t\t\tthis.trigger();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set current page number\r\n\tsetPage(page){\r\n\t\tswitch(page){\r\n\t\t\tcase \"first\":\r\n\t\t\treturn this.setPage(1);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"prev\":\r\n\t\t\treturn this.previousPage();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"next\":\r\n\t\t\treturn this.nextPage();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"last\":\r\n\t\t\treturn this.setPage(this.max);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tpage = parseInt(page);\r\n\t\t\r\n\t\tif((page > 0 && page <= this.max) || this.mode !== \"local\"){\r\n\t\t\tthis.page = page;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Requested page is out of range of 1 - \" + this.max + \":\", page);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetPageToRow(row){\r\n\t\tvar rows = this.table.rowManager.getDisplayRows(this.displayIndex - 1);\r\n\t\tvar index = rows.indexOf(row);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tvar page = this.size === true ? 1 : Math.ceil((index + 1) / this.size);\r\n\t\t\t\r\n\t\t\treturn this.setPage(page)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Requested row is not visible\");\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetPageSize(size){\r\n\t\tif(size !== true){\r\n\t\t\tsize = parseInt(size);\r\n\t\t}\r\n\t\t\r\n\t\tif(size > 0){\r\n\t\t\tthis.size = size;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.pageSizeSelect){\r\n\t\t\t// this.pageSizeSelect.value = size;\r\n\t\t\tthis.generatePageSizeSelectList();\r\n\t\t}\r\n\t\t\r\n\t\tthis.trackChanges();\r\n\t}\r\n\t\r\n\t_setPageCounter(totalRows, size, currentRow){\r\n\t\tvar content;\r\n\t\t\r\n\t\tif(this.pageCounter){\r\n\r\n\t\t\tif(this.mode === \"remote\"){\r\n\t\t\t\tsize = this.size;\r\n\t\t\t\tcurrentRow = ((this.page - 1) * this.size) + 1;\r\n\t\t\t\ttotalRows = this.remoteRowCountEstimate;\r\n\t\t\t}\r\n\r\n\t\t\tcontent = this.pageCounter.call(this, size, currentRow, this.page, totalRows, this.max);\r\n\t\t\t\r\n\t\t\tswitch(typeof content){\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\tif(content instanceof Node){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//clear previous cell contents\r\n\t\t\t\t\twhile(this.pageCounterElement.firstChild) this.pageCounterElement.removeChild(this.pageCounterElement.firstChild);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.pageCounterElement.appendChild(content);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(content != null){\r\n\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);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"undefined\":\r\n\t\t\t\tcase \"null\":\r\n\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.pageCounterElement.innerHTML = content;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//setup the pagination buttons\r\n\t_setPageButtons(){\r\n\t\tlet leftSize = Math.floor((this.count-1) / 2);\r\n\t\tlet rightSize = Math.ceil((this.count-1) / 2);\r\n\t\tlet min = this.max - this.page + leftSize + 1 < this.count ? this.max-this.count+1: Math.max(this.page-leftSize,1);\r\n\t\tlet max = this.page <= rightSize? Math.min(this.count, this.max) :Math.min(this.page+rightSize, this.max);\r\n\t\t\r\n\t\twhile(this.pagesElement.firstChild) this.pagesElement.removeChild(this.pagesElement.firstChild);\r\n\t\t\r\n\t\tif(this.page == 1){\r\n\t\t\tthis.firstBut.disabled = true;\r\n\t\t\tthis.prevBut.disabled = true;\r\n\t\t}else{\r\n\t\t\tthis.firstBut.disabled = false;\r\n\t\t\tthis.prevBut.disabled = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.page == this.max){\r\n\t\t\tthis.lastBut.disabled = true;\r\n\t\t\tthis.nextBut.disabled = true;\r\n\t\t}else{\r\n\t\t\tthis.lastBut.disabled = false;\r\n\t\t\tthis.nextBut.disabled = false;\r\n\t\t}\r\n\t\t\r\n\t\tfor(let i = min; i <= max; i++){\r\n\t\t\tif(i>0 && i <= this.max){\r\n\t\t\t\tthis.pagesElement.appendChild(this._generatePageButton(i));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.footerRedraw();\r\n\t}\r\n\t\r\n\t_generatePageButton(page){\r\n\t\tvar button = document.createElement(\"button\");\r\n\t\t\r\n\t\tbutton.classList.add(\"tabulator-page\");\r\n\t\tif(page == this.page){\r\n\t\t\tbutton.classList.add(\"active\");\r\n\t\t}\r\n\t\t\r\n\t\tbutton.setAttribute(\"type\", \"button\");\r\n\t\tbutton.setAttribute(\"role\", \"button\");\r\n\t\t\r\n\t\tthis.langBind(\"pagination|page_title\", (value) => {\r\n\t\t\tbutton.setAttribute(\"aria-label\", value + \" \" + page);\r\n\t\t\tbutton.setAttribute(\"title\", value + \" \" + page);\r\n\t\t});\r\n\t\t\r\n\t\tbutton.setAttribute(\"data-page\", page);\r\n\t\tbutton.textContent = page;\r\n\t\t\r\n\t\tbutton.addEventListener(\"click\", (e) => {\r\n\t\t\tthis.setPage(page)\r\n\t\t});\r\n\t\t\r\n\t\treturn button;\r\n\t}\r\n\t\r\n\t//previous page\r\n\tpreviousPage(){\r\n\t\tif(this.page > 1){\r\n\t\t\tthis.page--;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger()\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Previous page would be less than page 1:\", 0);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//next page\r\n\tnextPage(){\r\n\t\tif(this.page < this.max){\r\n\t\t\tthis.page++;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger();\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tif(!this.progressiveLoad){\r\n\t\t\t\tconsole.warn(\"Pagination Error - Next page would be greater than maximum page of \" + this.max + \":\", this.max + 1);\r\n\t\t\t}\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return current page number\r\n\tgetPage(){\r\n\t\treturn this.page;\r\n\t}\r\n\t\r\n\t//return max page number\r\n\tgetPageMax(){\r\n\t\treturn this.max;\r\n\t}\r\n\t\r\n\tgetPageSize(size){\r\n\t\treturn this.size;\r\n\t}\r\n\t\r\n\tgetMode(){\r\n\t\treturn this.mode;\r\n\t}\r\n\t\r\n\t//return appropriate rows for current page\r\n\tgetRows(data){\r\n\t\tvar actualRowPageSize = 0,\r\n\t\toutput, start, end, actualStartRow;\r\n\r\n\t\tvar actualRows = data.filter((row) => {\r\n\t\t\treturn row.type === \"row\";\r\n\t\t});\r\n\t\t\r\n\t\tif(this.mode == \"local\"){\r\n\t\t\toutput = [];\r\n\t\t\t\r\n\t\t\tthis.setMaxRows(data.length);\r\n\t\t\t\r\n\t\t\tif(this.size === true){\r\n\t\t\t\tstart = 0;\r\n\t\t\t\tend = data.length;\r\n\t\t\t}else{\r\n\t\t\t\tstart = this.size * (this.page - 1);\r\n\t\t\t\tend = start + parseInt(this.size);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._setPageButtons();\r\n\t\t\t\r\n\t\t\tfor(let i = start; i < end; i++){\r\n\t\t\t\tlet row = data[i];\r\n\r\n\t\t\t\tif(row){\r\n\t\t\t\t\toutput.push(row);\r\n\r\n\t\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\t\tif(!actualStartRow){\r\n\t\t\t\t\t\t\tactualStartRow = row;\r\n\t\t\t\t\t\t}\t\r\n\r\n\t\t\t\t\t\tactualRowPageSize++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._setPageCounter(actualRows.length, actualRowPageSize, actualStartRow ? (actualRows.indexOf(actualStartRow) + 1) : 0);\r\n\t\t\t\r\n\t\t\treturn output;\r\n\t\t}else{\r\n\t\t\tthis._setPageButtons();\r\n\t\t\tthis._setPageCounter(actualRows.length);\r\n\t\t\t\r\n\t\t\treturn data.slice(0);\r\n\t\t}\r\n\t}\r\n\t\r\n\ttrigger(){\r\n\t\tvar left;\r\n\t\t\r\n\t\tswitch(this.mode){\r\n\t\t\tcase \"local\":\r\n\t\t\tleft = this.table.rowManager.scrollLeft;\r\n\t\t\t\r\n\t\t\tthis.refreshData();\r\n\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\r\n\t\t\t\r\n\t\t\treturn Promise.resolve();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"remote\":\r\n\t\t\tthis.dataChanging = true;\r\n\t\t\treturn this.reloadData(null)\r\n\t\t\t.finally(() => {\r\n\t\t\t\tthis.dataChanging = false;\r\n\t\t\t})\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"progressive_load\":\r\n\t\t\tcase \"progressive_scroll\":\r\n\t\t\treturn this.reloadData(null, true);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\tconsole.warn(\"Pagination Error - no such pagination mode:\", this.mode);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_parseRemoteData(data){\r\n\t\tvar left, data, margin;\r\n\t\t\r\n\t\tif(typeof data.last_page === \"undefined\"){\r\n\t\t\tconsole.warn(\"Remote Pagination Error - Server response missing '\" + (this.options(\"dataReceiveParams\").last_page || \"last_page\") + \"' property\");\r\n\t\t}\r\n\t\t\r\n\t\tif(data.data){\r\n\t\t\tthis.max = parseInt(data.last_page) || 1;\r\n\r\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));\r\n\t\t\t\r\n\t\t\tif(this.progressiveLoad){\r\n\t\t\t\tswitch(this.mode){\r\n\t\t\t\t\tcase \"progressive_load\":\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.page == 1){\r\n\t\t\t\t\t\tthis.table.rowManager.setData(data.data, false, this.page == 1)\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.table.rowManager.addRows(data.data);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.page < this.max){\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tthis.nextPage();\r\n\t\t\t\t\t\t}, this.table.options.progressiveLoadDelay);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"progressive_scroll\":\r\n\t\t\t\t\tdata = this.page === 1 ? data.data : this.table.rowManager.getData().concat(data.data);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.table.rowManager.setData(data, this.page !== 1, this.page == 1);\r\n\t\t\t\t\t\r\n\t\t\t\t\tmargin = this.table.options.progressiveLoadScrollMargin || (this.table.rowManager.element.clientHeight * 2);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.table.rowManager.element.scrollHeight <= (this.table.rowManager.element.clientHeight + margin)){\r\n\t\t\t\t\t\tif(this.page < this.max){\r\n\t\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\t\tthis.nextPage();\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\t// left = this.table.rowManager.scrollLeft;\r\n\t\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\r\n\t\t\t\t// this.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\t// this.table.columnManager.scrollHorizontal(left);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Remote Pagination Error - Server response missing '\" + (this.options(\"dataReceiveParams\").data || \"data\") + \"' property\");\r\n\t\t}\r\n\t\t\r\n\t\treturn data.data;\r\n\t}\r\n\t\r\n\t//handle the footer element being redrawn\r\n\tfooterRedraw(){\r\n\t\tvar footer = this.table.footerManager.containerElement;\r\n\r\n\t\tif((Math.ceil(footer.clientWidth) - footer.scrollWidth) < 0){\r\n\t\t\tthis.pagesElement.style.display = 'none';\r\n\t\t}else{\r\n\t\t\tthis.pagesElement.style.display = '';\r\n\t\t\t\r\n\t\t\tif((Math.ceil(footer.clientWidth) - footer.scrollWidth) < 0){\r\n\t\t\t\tthis.pagesElement.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nPage.moduleName = \"page\";\r\n\r\n//load defaults\r\nPage.pageCounters = defaultPageCounters;\r\n\r\nexport default Page;","// read peristence information from storage\r\nexport default {\r\n\tlocal:function(id, type){\r\n\t\tvar data = localStorage.getItem(id + \"-\" + type);\r\n\r\n\t\treturn data ? JSON.parse(data) : false;\r\n\t},\r\n\tcookie:function(id, type){\r\n\t\tvar cookie = document.cookie,\r\n\t\tkey = id + \"-\" + type,\r\n\t\tcookiePos = cookie.indexOf(key + \"=\"),\r\n\t\tend, data;\r\n\r\n\t\t//if cookie exists, decode and load column data into tabulator\r\n\t\tif(cookiePos > -1){\r\n\t\t\tcookie = cookie.slice(cookiePos);\r\n\r\n\t\t\tend = cookie.indexOf(\";\");\r\n\r\n\t\t\tif(end > -1){\r\n\t\t\t\tcookie = cookie.slice(0, end);\r\n\t\t\t}\r\n\r\n\t\t\tdata = cookie.replace(key + \"=\", \"\");\r\n\t\t}\r\n\r\n\t\treturn data ? JSON.parse(data) : false;\r\n\t}\r\n};\r\n","//write persistence information to storage\r\nexport default {\r\n\tlocal:function(id, type, data){\r\n\t\tlocalStorage.setItem(id + \"-\" + type, JSON.stringify(data));\r\n\t},\r\n\tcookie:function(id, type, data){\r\n\t\tvar expireDate = new Date();\r\n\r\n\t\texpireDate.setDate(expireDate.getDate() + 10000);\r\n\r\n\t\tdocument.cookie = id + \"-\" + type + \"=\" + JSON.stringify(data) + \"; expires=\" + expireDate.toUTCString();\r\n\t}\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultReaders from './defaults/readers.js';\r\nimport defaultWriters from './defaults/writers.js';\r\n\r\nclass Persistence extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.mode = \"\";\r\n\t\tthis.id = \"\";\r\n\t\t// this.persistProps = [\"field\", \"width\", \"visible\"];\r\n\t\tthis.defWatcherBlock = false;\r\n\t\tthis.config = {};\r\n\t\tthis.readFunc = false;\r\n\t\tthis.writeFunc = false;\r\n\r\n\t\tthis.registerTableOption(\"persistence\", false);\r\n\t\tthis.registerTableOption(\"persistenceID\", \"\"); //key for persistent storage\r\n\t\tthis.registerTableOption(\"persistenceMode\", true); //mode for storing persistence information\r\n\t\tthis.registerTableOption(\"persistenceReaderFunc\", false); //function for handling persistence data reading\r\n\t\tthis.registerTableOption(\"persistenceWriterFunc\", false); //function for handling persistence data writing\r\n\t}\r\n\r\n\t// Test for whether localStorage is available for use.\r\n\tlocalStorageTest() {\r\n\t\tvar testKey = \"_tabulator_test\";\r\n\r\n\t\ttry {\r\n\t\t\twindow.localStorage.setItem( testKey, testKey);\r\n\t\t\twindow.localStorage.removeItem( testKey );\r\n\t\t\treturn true;\r\n\t\t} catch(e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//setup parameters\r\n\tinitialize(){\r\n\t\tif(this.table.options.persistence){\r\n\t\t\t//determine persistent layout storage type\r\n\t\t\tvar mode = this.table.options.persistenceMode,\r\n\t\t\tid = this.table.options.persistenceID,\r\n\t\t\tretreivedData;\r\n\r\n\t\t\tthis.mode = mode !== true ? mode : (this.localStorageTest() ? \"local\" : \"cookie\");\r\n\r\n\t\t\tif(this.table.options.persistenceReaderFunc){\r\n\t\t\t\tif(typeof this.table.options.persistenceReaderFunc === \"function\"){\r\n\t\t\t\t\tthis.readFunc = this.table.options.persistenceReaderFunc;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(Persistence.readers[this.table.options.persistenceReaderFunc]){\r\n\t\t\t\t\t\tthis.readFunc = Persistence.readers[this.table.options.persistenceReaderFunc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Persistence Read Error - invalid reader set\", this.table.options.persistenceReaderFunc);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(Persistence.readers[this.mode]){\r\n\t\t\t\t\tthis.readFunc = Persistence.readers[this.mode];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Persistence Read Error - invalid reader set\", this.mode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.persistenceWriterFunc){\r\n\t\t\t\tif(typeof this.table.options.persistenceWriterFunc === \"function\"){\r\n\t\t\t\t\tthis.writeFunc = this.table.options.persistenceWriterFunc;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(Persistence.writers[this.table.options.persistenceWriterFunc]){\r\n\t\t\t\t\t\tthis.writeFunc = Persistence.writers[this.table.options.persistenceWriterFunc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Persistence Write Error - invalid reader set\", this.table.options.persistenceWriterFunc);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(Persistence.writers[this.mode]){\r\n\t\t\t\t\tthis.writeFunc = Persistence.writers[this.mode];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Persistence Write Error - invalid writer set\", this.mode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//set storage tag\r\n\t\t\tthis.id = \"tabulator-\" + (id || (this.table.element.getAttribute(\"id\") || \"\"));\r\n\r\n\t\t\tthis.config = {\r\n\t\t\t\tsort:this.table.options.persistence === true || this.table.options.persistence.sort,\r\n\t\t\t\tfilter:this.table.options.persistence === true || this.table.options.persistence.filter,\r\n\t\t\t\tgroup:this.table.options.persistence === true || this.table.options.persistence.group,\r\n\t\t\t\tpage:this.table.options.persistence === true || this.table.options.persistence.page,\r\n\t\t\t\tcolumns:this.table.options.persistence === true ? [\"title\", \"width\", \"visible\"] : this.table.options.persistence.columns,\r\n\t\t\t};\r\n\r\n\t\t\t//load pagination data if needed\r\n\t\t\tif(this.config.page){\r\n\t\t\t\tretreivedData = this.retreiveData(\"page\");\r\n\r\n\t\t\t\tif(retreivedData){\r\n\t\t\t\t\tif(typeof retreivedData.paginationSize !== \"undefined\" && (this.config.page === true || this.config.page.size)){\r\n\t\t\t\t\t\tthis.table.options.paginationSize = retreivedData.paginationSize;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(typeof retreivedData.paginationInitialPage !== \"undefined\" && (this.config.page === true || this.config.page.page)){\r\n\t\t\t\t\t\tthis.table.options.paginationInitialPage = retreivedData.paginationInitialPage;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//load group data if needed\r\n\t\t\tif(this.config.group){\r\n\t\t\t\tretreivedData = this.retreiveData(\"group\");\r\n\r\n\t\t\t\tif(retreivedData){\r\n\t\t\t\t\tif(typeof retreivedData.groupBy !== \"undefined\" && (this.config.group === true || this.config.group.groupBy)){\r\n\t\t\t\t\t\tthis.table.options.groupBy = retreivedData.groupBy;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retreivedData.groupStartOpen !== \"undefined\" && (this.config.group === true || this.config.group.groupStartOpen)){\r\n\t\t\t\t\t\tthis.table.options.groupStartOpen = retreivedData.groupStartOpen;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retreivedData.groupHeader !== \"undefined\" && (this.config.group === true || this.config.group.groupHeader)){\r\n\t\t\t\t\t\tthis.table.options.groupHeader = retreivedData.groupHeader;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.columns){\r\n\t\t\t\tthis.table.options.columns = this.load(\"columns\", this.table.options.columns);\r\n\t\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t\t\tthis.subscribe(\"column-show\", this.save.bind(this, \"columns\"));\r\n\t\t\t\tthis.subscribe(\"column-hide\", this.save.bind(this, \"columns\"));\r\n\t\t\t\tthis.subscribe(\"column-moved\", this.save.bind(this, \"columns\"));\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-built\", this.tableBuilt.bind(this), 0);\r\n\r\n\t\t\tthis.subscribe(\"table-redraw\", this.tableRedraw.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"filter-changed\", this.eventSave.bind(this, \"filter\"));\r\n\t\t\tthis.subscribe(\"sort-changed\", this.eventSave.bind(this, \"sort\"));\r\n\t\t\tthis.subscribe(\"group-changed\", this.eventSave.bind(this, \"group\"));\r\n\t\t\tthis.subscribe(\"page-changed\", this.eventSave.bind(this, \"page\"));\r\n\t\t\tthis.subscribe(\"column-resized\", this.eventSave.bind(this, \"columns\"));\r\n\t\t\tthis.subscribe(\"layout-refreshed\", this.eventSave.bind(this, \"columns\"));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"getColumnLayout\", this.getColumnLayout.bind(this));\r\n\t\tthis.registerTableFunction(\"setColumnLayout\", this.setColumnLayout.bind(this));\r\n\t}\r\n\r\n\teventSave(type){\r\n\t\tif(this.config[type]){\r\n\t\t\tthis.save(type);\r\n\t\t}\r\n\t}\r\n\r\n\ttableBuilt(){\r\n\t\tvar options = this.table.options,\r\n\t\tsorters, filters;\r\n\r\n\t\tif(this.config.sort){\r\n\t\t\tsorters = this.load(\"sort\");\r\n\r\n\t\t\tif(!sorters === false){\r\n\t\t\t\tthis.table.options.initialSort = sorters;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.config.filter){\r\n\t\t\tfilters = this.load(\"filter\");\r\n\r\n\t\t\tif(!filters === false){\r\n\t\t\t\tthis.table.options.initialFilter = filters;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tif(force && this.config.columns){\r\n\t\t\tthis.save(\"columns\");\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tgetColumnLayout(){\r\n\t\treturn this.parseColumns(this.table.columnManager.getColumns());\r\n\t}\r\n\r\n\tsetColumnLayout(layout){\r\n\t\tthis.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns, layout))\r\n\t\treturn true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumn(column){\r\n\t\tvar def, keys;\r\n\r\n\t\tif(this.config.columns){\r\n\t\t\tthis.defWatcherBlock = true;\r\n\r\n\t\t\tdef = column.getDefinition();\r\n\r\n\t\t\tkeys = this.config.columns === true ? Object.keys(def) : this.config.columns;\r\n\r\n\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\tvar props = Object.getOwnPropertyDescriptor(def, key);\r\n\t\t\t\tvar value = def[key];\r\n\t\t\t\tif(props){\r\n\t\t\t\t\tObject.defineProperty(def, key, {\r\n\t\t\t\t\t\tset: function(newValue){\r\n\t\t\t\t\t\t\tvalue = newValue;\r\n\r\n\t\t\t\t\t\t\tif(!this.defWatcherBlock){\r\n\t\t\t\t\t\t\t\tthis.save(\"columns\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif(props.set){\r\n\t\t\t\t\t\t\t\tprops.set(newValue);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tget:function(){\r\n\t\t\t\t\t\t\tif(props.get){\r\n\t\t\t\t\t\t\t\tprops.get();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.defWatcherBlock = false;\r\n\t\t}\r\n\t}\r\n\r\n\t//load saved definitions\r\n\tload(type, current){\r\n\t\tvar data = this.retreiveData(type);\r\n\r\n\t\tif(current){\r\n\t\t\tdata = data ? this.mergeDefinition(current, data) : current;\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//retreive data from memory\r\n\tretreiveData(type){\r\n\t\treturn this.readFunc ? this.readFunc(this.id, type) : false;\r\n\t}\r\n\r\n\t//merge old and new column definitions\r\n\tmergeDefinition(oldCols, newCols){\r\n\t\tvar output = [];\r\n\r\n\t\tnewCols = newCols || [];\r\n\r\n\t\tnewCols.forEach((column, to) => {\r\n\t\t\tvar from = this._findColumn(oldCols, column),\r\n\t\t\tkeys;\r\n\r\n\t\t\tif(from){\r\n\t\t\t\tif(this.config.columns === true || this.config.columns == undefined){\r\n\t\t\t\t\tkeys = Object.keys(from);\r\n\t\t\t\t\tkeys.push(\"width\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tkeys = this.config.columns;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\t\tif(key !== \"columns\" && typeof column[key] !== \"undefined\"){\r\n\t\t\t\t\t\tfrom[key] = column[key];\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(from.columns){\r\n\t\t\t\t\tfrom.columns = this.mergeDefinition(from.columns, column.columns);\r\n\t\t\t\t}\r\n\r\n\t\t\t\toutput.push(from);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\toldCols.forEach((column, i) => {\r\n\t\t\tvar from = this._findColumn(newCols, column);\r\n\r\n\t\t\tif (!from) {\r\n\t\t\t\tif(output.length>i){\r\n\t\t\t\t\toutput.splice(i, 0, column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput.push(column);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//find matching columns\r\n\t_findColumn(columns, subject){\r\n\t\tvar type = subject.columns ? \"group\" : (subject.field ? \"field\" : \"object\");\r\n\r\n\t\treturn columns.find(function(col){\r\n\t\t\tswitch(type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\treturn col.title === subject.title && col.columns.length === subject.columns.length;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"field\":\r\n\t\t\t\treturn col.field === subject.field;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\treturn col === subject;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//save data\r\n\tsave(type){\r\n\t\tvar data = {};\r\n\r\n\t\tswitch(type){\r\n\t\t\tcase \"columns\":\r\n\t\t\tdata = this.parseColumns(this.table.columnManager.getColumns())\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"filter\":\r\n\t\t\tdata = this.table.modules.filter.getFilters();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"sort\":\r\n\t\t\tdata = this.validateSorters(this.table.modules.sort.getSort());\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tdata = this.getGroupConfig();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"page\":\r\n\t\t\tdata = this.getPageConfig();\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(this.writeFunc){\r\n\t\t\tthis.writeFunc(this.id, type, data);\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t//ensure sorters contain no function data\r\n\tvalidateSorters(data){\r\n\t\tdata.forEach(function(item){\r\n\t\t\titem.column = item.field;\r\n\t\t\tdelete item.field;\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\tgetGroupConfig(){\r\n\t\tvar data = {};\r\n\r\n\t\tif(this.config.group){\r\n\t\t\tif(this.config.group === true || this.config.group.groupBy){\r\n\t\t\t\tdata.groupBy = this.table.options.groupBy;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.group === true || this.config.group.groupStartOpen){\r\n\t\t\t\tdata.groupStartOpen = this.table.options.groupStartOpen;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.group === true || this.config.group.groupHeader){\r\n\t\t\t\tdata.groupHeader = this.table.options.groupHeader;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\tgetPageConfig(){\r\n\t\tvar data = {};\r\n\r\n\t\tif(this.config.page){\r\n\t\t\tif(this.config.page === true || this.config.page.size){\r\n\t\t\t\tdata.paginationSize = this.table.modules.page.getPageSize();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.page === true || this.config.page.page){\r\n\t\t\t\tdata.paginationInitialPage = this.table.modules.page.getPage();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\r\n\t//parse columns for data to store\r\n\tparseColumns(columns){\r\n\t\tvar definitions = [],\r\n\t\texcludedKeys = [\"headerContextMenu\", \"headerMenu\", \"contextMenu\", \"clickMenu\"];\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\tvar defStore = {},\r\n\t\t\tcolDef = column.getDefinition(),\r\n\t\t\tkeys;\r\n\r\n\t\t\tif(column.isGroup){\r\n\t\t\t\tdefStore.title = colDef.title;\r\n\t\t\t\tdefStore.columns = this.parseColumns(column.getColumns());\r\n\t\t\t}else{\r\n\t\t\t\tdefStore.field = column.getField();\r\n\r\n\t\t\t\tif(this.config.columns === true || this.config.columns == undefined){\r\n\t\t\t\t\tkeys = Object.keys(colDef);\r\n\t\t\t\t\tkeys.push(\"width\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tkeys = this.config.columns;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\t\tswitch(key){\r\n\t\t\t\t\t\tcase \"width\":\r\n\t\t\t\t\t\tdefStore.width = column.getWidth();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"visible\":\r\n\t\t\t\t\t\tdefStore.visible = column.visible;\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(typeof colDef[key] !== \"function\" && excludedKeys.indexOf(key) === -1){\r\n\t\t\t\t\t\t\tdefStore[key] = colDef[key];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tdefinitions.push(defStore);\r\n\t\t});\r\n\r\n\t\treturn definitions;\r\n\t}\r\n}\r\n\r\nPersistence.moduleName = \"persistence\";\r\n\r\nPersistence.moduleInitOrder = 1;\r\n\r\n//load defaults\r\nPersistence.readers = defaultReaders;\r\nPersistence.writers = defaultWriters;\r\n\r\nexport default Persistence;","import Module from '../../core/Module.js';\r\n\r\nclass Print extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.manualBlock = false;\r\n\r\n\t\tthis.registerTableOption(\"printAsHtml\", false); //enable print as html\r\n\t\tthis.registerTableOption(\"printFormatter\", false); //printing page formatter\r\n\t\tthis.registerTableOption(\"printHeader\", false); //page header contents\r\n\t\tthis.registerTableOption(\"printFooter\", false); //page footer contents\r\n\t\tthis.registerTableOption(\"printStyled\", true); //enable print as html styling\r\n\t\tthis.registerTableOption(\"printRowRange\", \"visible\"); //restrict print to visible rows only\r\n\t\tthis.registerTableOption(\"printConfig\", {}); //print config options\r\n\r\n\t\tthis.registerColumnOption(\"print\");\r\n\t\tthis.registerColumnOption(\"titlePrint\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.printAsHtml){\r\n\t\t\twindow.addEventListener(\"beforeprint\", this.replaceTable.bind(this));\r\n\t\t\twindow.addEventListener(\"afterprint\", this.cleanup.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"print\", this.printFullscreen.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\treplaceTable(){\r\n\t\tif(!this.manualBlock){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"tabulator-print-table\");\r\n\r\n\t\t\tthis.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig, this.table.options.printStyled, this.table.options.printRowRange, \"print\"));\r\n\r\n\t\t\tthis.table.element.style.display = \"none\";\r\n\r\n\t\t\tthis.table.element.parentNode.insertBefore(this.element, this.table.element);\r\n\t\t}\r\n\t}\r\n\r\n\tcleanup(){\r\n\t\tdocument.body.classList.remove(\"tabulator-print-fullscreen-hide\");\r\n\r\n\t\tif(this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\tthis.table.element.style.display = \"\";\r\n\t\t}\r\n\t}\r\n\r\n\tprintFullscreen(visible, style, config){\r\n\t\tvar scrollX = window.scrollX,\r\n\t\tscrollY = window.scrollY,\r\n\t\theaderEl = document.createElement(\"div\"),\r\n\t\tfooterEl = document.createElement(\"div\"),\r\n\t\ttableEl = this.table.modules.export.genereateTable(typeof config != \"undefined\" ? config : this.table.options.printConfig, typeof style != \"undefined\" ? style : this.table.options.printStyled, visible || this.table.options.printRowRange, \"print\"),\r\n\t\theaderContent, footerContent;\r\n\r\n\t\tthis.manualBlock = true;\r\n\r\n\t\tthis.element = document.createElement(\"div\");\r\n\t\tthis.element.classList.add(\"tabulator-print-fullscreen\");\r\n\r\n\t\tif(this.table.options.printHeader){\r\n\t\t\theaderEl.classList.add(\"tabulator-print-header\");\r\n\r\n\t\t\theaderContent = typeof this.table.options.printHeader == \"function\" ? this.table.options.printHeader.call(this.table) : this.table.options.printHeader;\r\n\r\n\t\t\tif(typeof headerContent == \"string\"){\r\n\t\t\t\theaderEl.innerHTML = headerContent;\r\n\t\t\t}else{\r\n\t\t\t\theaderEl.appendChild(headerContent);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.appendChild(headerEl);\r\n\t\t}\r\n\r\n\t\tthis.element.appendChild(tableEl);\r\n\r\n\t\tif(this.table.options.printFooter){\r\n\t\t\tfooterEl.classList.add(\"tabulator-print-footer\");\r\n\r\n\t\t\tfooterContent = typeof this.table.options.printFooter == \"function\" ? this.table.options.printFooter.call(this.table) : this.table.options.printFooter;\r\n\r\n\r\n\t\t\tif(typeof footerContent == \"string\"){\r\n\t\t\t\tfooterEl.innerHTML = footerContent;\r\n\t\t\t}else{\r\n\t\t\t\tfooterEl.appendChild(footerContent);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.appendChild(footerEl);\r\n\t\t}\r\n\r\n\t\tdocument.body.classList.add(\"tabulator-print-fullscreen-hide\");\r\n\t\tdocument.body.appendChild(this.element);\r\n\r\n\t\tif(this.table.options.printFormatter){\r\n\t\t\tthis.table.options.printFormatter(this.element, tableEl);\r\n\t\t}\r\n\r\n\t\twindow.print();\r\n\r\n\t\tthis.cleanup();\r\n\r\n\t\twindow.scrollTo(scrollX, scrollY);\r\n\r\n\t\tthis.manualBlock = false;\r\n\t}\r\n}\r\n\r\nPrint.moduleName = \"print\";\r\n\r\nexport default Print;","import Module from '../../core/Module.js';\r\n\r\nclass ReactiveData extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.data = false;\r\n\t\tthis.blocked = false; //block reactivity while performing update\r\n\t\tthis.origFuncs = {}; // hold original data array functions to allow replacement after data is done with\r\n\t\tthis.currentVersion = 0;\r\n\r\n\t\tthis.registerTableOption(\"reactiveData\", false); //enable data reactivity\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.reactiveData){\r\n\t\t\tthis.subscribe(\"cell-value-save-before\", this.block.bind(this));\r\n\t\t\tthis.subscribe(\"cell-value-save-after\", this.unblock.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-save-before\", this.block.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-save-after\", this.unblock.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-init-after\", this.watchRow.bind(this));\r\n\t\t\tthis.subscribe(\"data-processing\", this.watchData.bind(this));\r\n\t\t\tthis.subscribe(\"table-destroy\", this.unwatchData.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\twatchData(data){\r\n\t\tvar self = this,\r\n\t\tpushFunc, version;\r\n\r\n\t\tthis.currentVersion ++;\r\n\r\n\t\tversion = this.currentVersion;\r\n\r\n\t\tthis.unwatchData();\r\n\r\n\t\tthis.data = data;\r\n\r\n\t\t//override array push function\r\n\t\tthis.origFuncs.push = data.push;\r\n\r\n\t\tObject.defineProperty(this.data, \"push\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments);\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\targs.forEach((arg) => {\r\n\t\t\t\t\t\tself.table.rowManager.addRowActual(arg, false);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.push.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//override array unshift function\r\n\t\tthis.origFuncs.unshift = data.unshift;\r\n\r\n\t\tObject.defineProperty(this.data, \"unshift\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments);\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\targs.forEach((arg) => {\r\n\t\t\t\t\t\tself.table.rowManager.addRowActual(arg, true);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.unshift.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\t//override array shift function\r\n\t\tthis.origFuncs.shift = data.shift;\r\n\r\n\t\tObject.defineProperty(this.data, \"shift\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar row;\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tif(self.data.length){\r\n\t\t\t\t\t\trow = self.table.rowManager.getRowFromDataObject(self.data[0]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.deleteActual();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.shift.call(data);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//override array pop function\r\n\t\tthis.origFuncs.pop = data.pop;\r\n\r\n\t\tObject.defineProperty(this.data, \"pop\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar row;\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tif(self.data.length){\r\n\t\t\t\t\t\trow = self.table.rowManager.getRowFromDataObject(self.data[self.data.length - 1]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.deleteActual();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn self.origFuncs.pop.call(data);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\t//override array splice function\r\n\t\tthis.origFuncs.splice = data.splice;\r\n\r\n\t\tObject.defineProperty(this.data, \"splice\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments),\r\n\t\t\t\tstart = args[0] < 0 ? data.length + args[0] : args[0],\r\n\t\t\t\tend = args[1],\r\n\t\t\t\tnewRows = args[2] ? args.slice(2) : false,\r\n\t\t\t\tstartRow;\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\r\n\t\t\t\t\t//add new rows\r\n\t\t\t\t\tif(newRows){\r\n\t\t\t\t\t\tstartRow = data[start] ? self.table.rowManager.getRowFromDataObject(data[start]) : false;\r\n\r\n\t\t\t\t\t\tif(startRow){\r\n\t\t\t\t\t\t\tnewRows.forEach((rowData) => {\r\n\t\t\t\t\t\t\t\tself.table.rowManager.addRowActual(rowData, true, startRow, true);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnewRows = newRows.slice().reverse();\r\n\r\n\t\t\t\t\t\t\tnewRows.forEach((rowData) => {\r\n\t\t\t\t\t\t\t\tself.table.rowManager.addRowActual(rowData, true, false, true);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//delete removed rows\r\n\t\t\t\t\tif(end !== 0){\r\n\t\t\t\t\t\tvar oldRows = data.slice(start, typeof args[1] === \"undefined\" ? args[1] : start + end);\r\n\r\n\t\t\t\t\t\toldRows.forEach((rowData, i) => {\r\n\t\t\t\t\t\t\tvar row = self.table.rowManager.getRowFromDataObject(rowData);\r\n\r\n\t\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\t\trow.deleteActual(i !== oldRows.length - 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(newRows || end !== 0){\r\n\t\t\t\t\t\tself.table.rowManager.reRenderInPosition();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.splice.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tunwatchData(){\r\n\t\tif(this.data !== false){\r\n\t\t\tfor(var key in this.origFuncs){\r\n\t\t\t\tObject.defineProperty(this.data, key, {\r\n\t\t\t\t\tenumerable: true,\r\n\t\t\t\t\tconfigurable:true,\r\n\t\t\t\t\twritable:true,\r\n\t\t\t\t\tvalue: this.origFuncs.key,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\twatchRow(row){\r\n\t\tvar data = row.getData();\r\n\r\n\t\tthis.blocked = true;\r\n\r\n\t\tfor(var key in data){\r\n\t\t\tthis.watchKey(row, data, key);\r\n\t\t}\r\n\r\n\t\tif(this.table.options.dataTree){\r\n\t\t\tthis.watchTreeChildren(row);\r\n\t\t}\r\n\r\n\t\tthis.blocked = false;\r\n\t}\r\n\r\n\twatchTreeChildren (row){\r\n\t\tvar childField = row.getData()[this.table.options.dataTreeChildField],\r\n\t\torigFuncs = {};\r\n\r\n\t\tfunction rebuildTree(){\r\n\t\t\tthis.table.modules.dataTree.initializeRow(row);\r\n\t\t\tthis.table.modules.dataTree.layoutRow(row);\r\n\t\t\tthis.table.rowManager.refreshActiveData(\"tree\", false, true);\r\n\t\t}\r\n\r\n\t\tif(childField){\r\n\r\n\t\t\torigFuncs.push = childField.push;\r\n\r\n\t\t\tObject.defineProperty(childField, \"push\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.push.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.unshift = childField.unshift;\r\n\r\n\t\t\tObject.defineProperty(childField, \"unshift\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.unshift.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.shift = childField.shift;\r\n\r\n\t\t\tObject.defineProperty(childField, \"shift\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.shift.call(childField);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.pop = childField.pop;\r\n\r\n\t\t\tObject.defineProperty(childField, \"pop\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.pop.call(childField);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.splice = childField.splice;\r\n\r\n\t\t\tObject.defineProperty(childField, \"splice\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.splice.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\twatchKey(row, data, key){\r\n\t\tvar props = Object.getOwnPropertyDescriptor(data, key),\r\n\t\tvalue = data[key],\r\n\t\tversion = this.currentVersion;\r\n\r\n\t\tObject.defineProperty(data, key, {\r\n\t\t\tset: (newValue) => {\r\n\t\t\t\tvalue = newValue;\r\n\t\t\t\tif(!this.blocked && version === this.currentVersion){\r\n\t\t\t\t\tvar update = {};\r\n\t\t\t\t\tupdate[key] = newValue;\r\n\t\t\t\t\trow.updateData(update);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(props.set){\r\n\t\t\t\t\tprops.set(newValue);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tget:() => {\r\n\r\n\t\t\t\tif(props.get){\r\n\t\t\t\t\tprops.get();\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tunwatchRow(row){\r\n\t\tvar data = row.getData();\r\n\r\n\t\tfor(var key in data){\r\n\t\t\tObject.defineProperty(data, key, {\r\n\t\t\t\tvalue:data[key],\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tblock(){\r\n\t\tthis.blocked = true;\r\n\t}\r\n\r\n\tunblock(){\r\n\t\tthis.blocked = false;\r\n\t}\r\n}\r\n\r\nReactiveData.moduleName = \"reactiveData\";\r\n\r\nexport default ReactiveData;\r\n\r\n\r\n\r\n","import Module from '../../core/Module.js';\r\n\r\nclass ResizeColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.startColumn = false;\r\n\t\tthis.startX = false;\r\n\t\tthis.startWidth = false;\r\n\t\tthis.handle = null;\r\n\t\tthis.prevHandle = null;\r\n\t\t\r\n\t\tthis.registerColumnOption(\"resizable\", true);\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\t// if(this.table.options.resizableColumns){\r\n\t\tthis.subscribe(\"cell-layout\", this.layoutCellHandles.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.layoutColumnHeader.bind(this));\r\n\t\t// }\r\n\t}\r\n\t\r\n\tlayoutCellHandles(cell){\r\n\t\tif(cell.row.type === \"row\"){\r\n\t\t\tthis.initializeColumn(\"cell\", cell.column, cell.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutColumnHeader(column){\r\n\t\tthis.initializeColumn(\"header\", column, column.element);\r\n\t}\r\n\t\r\n\tinitializeColumn(type, column, element){\r\n\t\tvar self = this,\r\n\t\tvariableHeight = false,\r\n\t\tmode = column.definition.resizable;\r\n\t\t\r\n\t\t//set column resize mode\r\n\t\tif(type === \"header\"){\r\n\t\t\tvariableHeight = column.definition.formatter == \"textarea\" || column.definition.variableHeight;\r\n\t\t\tcolumn.modules.resize = {variableHeight:variableHeight};\r\n\t\t}\r\n\t\t\r\n\t\tif(mode === true || mode == type){\r\n\t\t\t\r\n\t\t\tvar handle = document.createElement('div');\r\n\t\t\thandle.className = \"tabulator-col-resize-handle\";\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tvar prevHandle = document.createElement('div');\r\n\t\t\tprevHandle.className = \"tabulator-col-resize-handle prev\";\r\n\t\t\t\r\n\t\t\thandle.addEventListener(\"click\", function(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tvar handleDown = function(e){\r\n\t\t\t\tvar nearestColumn = column.getLastColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn && self._checkResizability(nearestColumn)){\r\n\t\t\t\t\tself.startColumn = column;\r\n\t\t\t\t\tself._mouseDown(e, nearestColumn, handle);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\thandle.addEventListener(\"mousedown\", handleDown);\r\n\t\t\thandle.addEventListener(\"touchstart\", handleDown, {passive: true});\r\n\t\t\t\r\n\t\t\t//reszie column on double click\r\n\t\t\thandle.addEventListener(\"dblclick\", function(e){\r\n\t\t\t\tvar col = column.getLastColumn(),\r\n\t\t\t\toldWidth;\r\n\t\t\t\t\r\n\t\t\t\tif(col && self._checkResizability(col)){\r\n\t\t\t\t\toldWidth = col.getWidth();\r\n\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tcol.reinitializeWidth(true);\r\n\r\n\t\t\t\t\tif(oldWidth !== col.getWidth()){\r\n\t\t\t\t\t\tself.dispatch(\"column-resized\", col);\r\n\t\t\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", col.getComponent());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tprevHandle.addEventListener(\"click\", function(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tvar prevHandleDown = function(e){\r\n\t\t\t\tvar nearestColumn, colIndex, prevColumn;\r\n\t\t\t\t\r\n\t\t\t\tnearestColumn = column.getFirstColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn){\r\n\t\t\t\t\tcolIndex = self.table.columnManager.findColumnIndex(nearestColumn);\r\n\t\t\t\t\tprevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(prevColumn && self._checkResizability(prevColumn)){\r\n\t\t\t\t\t\tself.startColumn = column;\r\n\t\t\t\t\t\tself._mouseDown(e, prevColumn, prevHandle);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tprevHandle.addEventListener(\"mousedown\", prevHandleDown);\r\n\t\t\tprevHandle.addEventListener(\"touchstart\", prevHandleDown, {passive: true});\r\n\t\t\t\r\n\t\t\t//resize column on double click\r\n\t\t\tprevHandle.addEventListener(\"dblclick\", function(e){\r\n\t\t\t\tvar nearestColumn, colIndex, prevColumn;\r\n\t\t\t\t\r\n\t\t\t\tnearestColumn = column.getFirstColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn){\r\n\t\t\t\t\tcolIndex = self.table.columnManager.findColumnIndex(nearestColumn);\r\n\t\t\t\t\tprevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(prevColumn && self._checkResizability(prevColumn)){\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tprevColumn.reinitializeWidth(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\telement.appendChild(handle);\r\n\t\t\telement.appendChild(prevHandle);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_checkResizability(column){\r\n\t\treturn column.definition.resizable;\r\n\t}\r\n\t\r\n\t_mouseDown(e, column, handle){\r\n\t\tvar self = this;\r\n\t\t\r\n\t\tself.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tfunction mouseMove(e){\r\n\t\t\t// self.table.columnManager.tempScrollBlock();\r\n\t\t\t\r\n\t\t\tif(self.table.rtl){\r\n\t\t\t\tcolumn.setWidth(self.startWidth - ((typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX) - self.startX));\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.setWidth(self.startWidth + ((typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX) - self.startX));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself.table.columnManager.renderer.rerenderColumns(true);\r\n\t\t\t\r\n\t\t\tif(!self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight){\r\n\t\t\t\tcolumn.checkCellHeights();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfunction mouseUp(e){\r\n\t\t\t\r\n\t\t\t//block editor from taking action while resizing is taking place\r\n\t\t\tif(self.startColumn.modules.edit){\r\n\t\t\t\tself.startColumn.modules.edit.blocked = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight){\r\n\t\t\t\tcolumn.checkCellHeights();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", mouseUp);\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", mouseMove);\r\n\t\t\t\r\n\t\t\thandle.removeEventListener(\"touchmove\", mouseMove);\r\n\t\t\thandle.removeEventListener(\"touchend\", mouseUp);\r\n\t\t\t\r\n\t\t\tself.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tif(self.startWidth !== column.getWidth()){\r\n\t\t\t\tself.dispatch(\"column-resized\", column);\r\n\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", column.getComponent());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\te.stopPropagation(); //prevent resize from interfereing with movable columns\r\n\t\t\r\n\t\t//block editor from taking action while resizing is taking place\r\n\t\tif(self.startColumn.modules.edit){\r\n\t\t\tself.startColumn.modules.edit.blocked = true;\r\n\t\t}\r\n\t\t\r\n\t\tself.startX = typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX;\r\n\t\tself.startWidth = column.getWidth();\r\n\t\t\r\n\t\tdocument.body.addEventListener(\"mousemove\", mouseMove);\r\n\t\tdocument.body.addEventListener(\"mouseup\", mouseUp);\r\n\t\thandle.addEventListener(\"touchmove\", mouseMove, {passive: true});\r\n\t\thandle.addEventListener(\"touchend\", mouseUp);\r\n\t}\r\n}\r\n\r\nResizeColumns.moduleName = \"resizeColumns\";\r\n\r\nexport default ResizeColumns;","import Module from '../../core/Module.js';\r\n\r\nclass ResizeRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.startColumn = false;\r\n\t\tthis.startY = false;\r\n\t\tthis.startHeight = false;\r\n\t\tthis.handle = null;\r\n\t\tthis.prevHandle = null;\r\n\r\n\t\tthis.registerTableOption(\"resizableRows\", false); //resizable rows\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.resizableRows){\r\n\t\t\tthis.subscribe(\"row-layout-after\", this.initializeRow.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\trowEl = row.getElement();\r\n\r\n\t\tvar handle = document.createElement('div');\r\n\t\thandle.className = \"tabulator-row-resize-handle\";\r\n\r\n\t\tvar prevHandle = document.createElement('div');\r\n\t\tprevHandle.className = \"tabulator-row-resize-handle prev\";\r\n\r\n\t\thandle.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tvar handleDown = function(e){\r\n\t\t\tself.startRow = row;\r\n\t\t\tself._mouseDown(e, row, handle);\r\n\t\t};\r\n\r\n\t\thandle.addEventListener(\"mousedown\", handleDown);\r\n\t\thandle.addEventListener(\"touchstart\", handleDown, {passive: true});\r\n\r\n\t\tprevHandle.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tvar prevHandleDown = function(e){\r\n\t\t\tvar prevRow = self.table.rowManager.prevDisplayRow(row);\r\n\r\n\t\t\tif(prevRow){\r\n\t\t\t\tself.startRow = prevRow;\r\n\t\t\t\tself._mouseDown(e, prevRow, prevHandle);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tprevHandle.addEventListener(\"mousedown\",prevHandleDown);\r\n\t\tprevHandle.addEventListener(\"touchstart\",prevHandleDown, {passive: true});\r\n\r\n\t\trowEl.appendChild(handle);\r\n\t\trowEl.appendChild(prevHandle);\r\n\t}\r\n\r\n\t_mouseDown(e, row, handle){\r\n\t\tvar self = this;\r\n\r\n\t\tself.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tfunction mouseMove(e){\r\n\t\t\trow.setHeight(self.startHeight + ((typeof e.screenY === \"undefined\" ? e.touches[0].screenY : e.screenY) - self.startY));\r\n\t\t}\r\n\r\n\t\tfunction mouseUp(e){\r\n\r\n\t\t\t// //block editor from taking action while resizing is taking place\r\n\t\t\t// if(self.startColumn.modules.edit){\r\n\t\t\t// \tself.startColumn.modules.edit.blocked = false;\r\n\t\t\t// }\r\n\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", mouseMove);\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", mouseMove);\r\n\r\n\t\t\thandle.removeEventListener(\"touchmove\", mouseMove);\r\n\t\t\thandle.removeEventListener(\"touchend\", mouseUp);\r\n\r\n\t\t\tself.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tself.dispatchExternal(\"rowResized\", row.getComponent());\r\n\t\t}\r\n\r\n\t\te.stopPropagation(); //prevent resize from interfereing with movable columns\r\n\r\n\t\t//block editor from taking action while resizing is taking place\r\n\t\t// if(self.startColumn.modules.edit){\r\n\t\t// \tself.startColumn.modules.edit.blocked = true;\r\n\t\t// }\r\n\r\n\t\tself.startY = typeof e.screenY === \"undefined\" ? e.touches[0].screenY : e.screenY;\r\n\t\tself.startHeight = row.getHeight();\r\n\r\n\t\tdocument.body.addEventListener(\"mousemove\", mouseMove);\r\n\t\tdocument.body.addEventListener(\"mouseup\", mouseUp);\r\n\r\n\t\thandle.addEventListener(\"touchmove\", mouseMove, {passive: true});\r\n\t\thandle.addEventListener(\"touchend\", mouseUp);\r\n\t}\r\n}\r\n\r\nResizeRows.moduleName = \"resizeRows\";\r\n\r\nexport default ResizeRows;","import Module from '../../core/Module.js';\r\n\r\nclass ResizeTable extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.binding = false;\r\n\t\tthis.observer = false;\r\n\t\tthis.containerObserver = false;\r\n\r\n\t\tthis.tableHeight = 0;\r\n\t\tthis.tableWidth = 0;\r\n\t\tthis.containerHeight = 0;\r\n\t\tthis.containerWidth = 0;\r\n\r\n\t\tthis.autoResize = false;\r\n\r\n\t\tthis.registerTableOption(\"autoResize\", true); //auto resize table\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.autoResize){\r\n\t\t\tvar table = this.table,\r\n\t\t\ttableStyle;\r\n\r\n\t\t\tthis.tableHeight = table.element.clientHeight;\r\n\t\t\tthis.tableWidth = table.element.clientWidth;\r\n\r\n\t\t\tif(table.element.parentNode){\r\n\t\t\t\tthis.containerHeight = table.element.parentNode.clientHeight;\r\n\t\t\t\tthis.containerWidth = table.element.parentNode.clientWidth;\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof ResizeObserver !== \"undefined\" && table.rowManager.getRenderMode() === \"virtual\"){\r\n\r\n\t\t\t\tthis.autoResize = true;\r\n\r\n\t\t\t\tthis.observer = new ResizeObserver((entry) => {\r\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\tvar nodeHeight = Math.floor(entry[0].contentRect.height);\r\n\t\t\t\t\t\tvar nodeWidth = Math.floor(entry[0].contentRect.width);\r\n\r\n\t\t\t\t\t\tif(this.tableHeight != nodeHeight || this.tableWidth != nodeWidth){\r\n\t\t\t\t\t\t\tthis.tableHeight = nodeHeight;\r\n\t\t\t\t\t\t\tthis.tableWidth = nodeWidth;\r\n\r\n\t\t\t\t\t\t\tif(table.element.parentNode){\r\n\t\t\t\t\t\t\t\tthis.containerHeight = table.element.parentNode.clientHeight;\r\n\t\t\t\t\t\t\t\tthis.containerWidth = table.element.parentNode.clientWidth;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tthis.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.observer.observe(table.element);\r\n\r\n\t\t\t\ttableStyle = window.getComputedStyle(table.element);\r\n\r\n\t\t\t\tif(this.table.element.parentNode && !this.table.rowManager.fixedHeight && (tableStyle.getPropertyValue(\"max-height\") || tableStyle.getPropertyValue(\"min-height\"))){\r\n\r\n\t\t\t\t\tthis.containerObserver = new ResizeObserver((entry) => {\r\n\t\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\t\tvar nodeHeight = Math.floor(entry[0].contentRect.height);\r\n\t\t\t\t\t\t\tvar nodeWidth = Math.floor(entry[0].contentRect.width);\r\n\r\n\t\t\t\t\t\t\tif(this.containerHeight != nodeHeight || this.containerWidth != nodeWidth){\r\n\t\t\t\t\t\t\t\tthis.containerHeight = nodeHeight;\r\n\t\t\t\t\t\t\t\tthis.containerWidth = nodeWidth;\r\n\t\t\t\t\t\t\t\tthis.tableHeight = table.element.clientHeight;\r\n\t\t\t\t\t\t\t\tthis.tableWidth = table.element.clientWidth;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\ttable.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tthis.containerObserver.observe(this.table.element.parentNode);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.subscribe(\"table-resize\", this.tableResized.bind(this));\r\n\r\n\t\t\t}else{\r\n\t\t\t\tthis.binding = function(){\r\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile && !table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\ttable.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\twindow.addEventListener(\"resize\", this.binding);\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\ttableResized(){\r\n\t\tthis.table.rowManager.redraw();\r\n\t}\r\n\r\n\tclearBindings(){\r\n\t\tif(this.binding){\r\n\t\t\twindow.removeEventListener(\"resize\", this.binding);\r\n\t\t}\r\n\r\n\t\tif(this.observer){\r\n\t\t\tthis.observer.unobserve(this.table.element);\r\n\t\t}\r\n\r\n\t\tif(this.containerObserver){\r\n\t\t\tthis.containerObserver.unobserve(this.table.element.parentNode);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nResizeTable.moduleName = \"resizeTable\";\r\n\r\nexport default ResizeTable;","import Module from '../../core/Module.js';\r\n\r\nclass ResponsiveLayout extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.columns = [];\r\n\t\tthis.hiddenColumns = [];\r\n\t\tthis.mode = \"\";\r\n\t\tthis.index = 0;\r\n\t\tthis.collapseFormatter = [];\r\n\t\tthis.collapseStartOpen = true;\r\n\t\tthis.collapseHandleColumn = false;\r\n\r\n\t\tthis.registerTableOption(\"responsiveLayout\", false); //responsive layout flags\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseStartOpen\", true); //start showing collapsed data\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseUseFormatters\", true); //responsive layout collapse formatter\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseFormatter\", false); //responsive layout collapse formatter\r\n\r\n\t\tthis.registerColumnOption(\"responsive\");\r\n\t}\r\n\r\n\t//generate responsive columns list\r\n\tinitialize(){\r\n\t\tvar self = this,\r\n\t\tcolumns = [];\r\n\r\n\t\tif(this.table.options.responsiveLayout){\r\n\t\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\t\tthis.subscribe(\"column-show\", this.updateColumnVisibility.bind(this));\r\n\t\t\tthis.subscribe(\"column-hide\", this.updateColumnVisibility.bind(this));\r\n\t\t\tthis.subscribe(\"columns-loaded\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-moved\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-add\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-delete\", this.initializeResponsivity.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"table-redrawing\", this.tableRedraw.bind(this));\r\n\r\n\t\t\tif(this.table.options.responsiveLayout === \"collapse\"){\r\n\t\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\t\tthis.subscribe(\"row-layout\", this.layoutRow.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tif([\"fitColumns\", \"fitDataStretch\"].indexOf(this.layoutMode()) === -1){\r\n\t\t\tif(!force){\r\n\t\t\t\tthis.update();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeResponsivity(){\r\n\t\tvar columns = [];\r\n\r\n\t\tthis.mode = this.table.options.responsiveLayout;\r\n\t\tthis.collapseFormatter = this.table.options.responsiveLayoutCollapseFormatter || this.formatCollapsedData;\r\n\t\tthis.collapseStartOpen = this.table.options.responsiveLayoutCollapseStartOpen;\r\n\t\tthis.hiddenColumns = [];\r\n\r\n\t\t//determine level of responsivity for each column\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column, i) => {\r\n\t\t\tif(column.modules.responsive){\r\n\t\t\t\tif(column.modules.responsive.order && column.modules.responsive.visible){\r\n\t\t\t\t\tcolumn.modules.responsive.index = i;\r\n\t\t\t\t\tcolumns.push(column);\r\n\r\n\t\t\t\t\tif(!column.visible && this.mode === \"collapse\"){\r\n\t\t\t\t\t\tthis.hiddenColumns.push(column);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//sort list by responsivity\r\n\t\tcolumns = columns.reverse();\r\n\t\tcolumns = columns.sort((a, b) => {\r\n\t\t\tvar diff = b.modules.responsive.order - a.modules.responsive.order;\r\n\t\t\treturn diff || (b.modules.responsive.index - a.modules.responsive.index);\r\n\t\t});\r\n\r\n\t\tthis.columns = columns;\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tthis.generateCollapsedContent();\r\n\t\t}\r\n\r\n\t\t//assign collapse column\r\n\t\tfor (let col of this.table.columnManager.columnsByIndex){\r\n\t\t\tif(col.definition.formatter == \"responsiveCollapse\"){\r\n\t\t\t\tthis.collapseHandleColumn = col;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.collapseHandleColumn){\r\n\t\t\tif(this.hiddenColumns.length){\r\n\t\t\t\tthis.collapseHandleColumn.show();\r\n\t\t\t}else{\r\n\t\t\t\tthis.collapseHandleColumn.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//define layout information\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.getDefinition();\r\n\r\n\t\tcolumn.modules.responsive = {order: typeof def.responsive === \"undefined\" ? 1 : def.responsive, visible:def.visible === false ? false : true};\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar el;\r\n\r\n\t\tif(row.type !== \"calc\"){\r\n\t\t\tel = document.createElement(\"div\");\r\n\t\t\tel.classList.add(\"tabulator-responsive-collapse\");\r\n\r\n\t\t\trow.modules.responsiveLayout = {\r\n\t\t\t\telement:el,\r\n\t\t\t\topen:this.collapseStartOpen,\r\n\t\t\t};\r\n\r\n\t\t\tif(!this.collapseStartOpen){\r\n\t\t\t\tel.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tlayoutRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tif(row.modules.responsiveLayout){\r\n\t\t\trowEl.appendChild(row.modules.responsiveLayout.element);\r\n\t\t\tthis.generateCollapsedRowContent(row);\r\n\t\t}\r\n\t}\r\n\r\n\t//update column visibility\r\n\tupdateColumnVisibility(column, responsiveToggle){\r\n\t\tif(!responsiveToggle && column.modules.responsive){\r\n\t\t\tcolumn.modules.responsive.visible = column.visible;\r\n\t\t\tthis.initializeResponsivity();\r\n\t\t}\r\n\t}\r\n\r\n\thideColumn(column){\r\n\t\tvar colCount = this.hiddenColumns.length;\r\n\r\n\t\tcolumn.hide(false, true);\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tthis.hiddenColumns.unshift(column);\r\n\t\t\tthis.generateCollapsedContent();\r\n\r\n\t\t\tif(this.collapseHandleColumn && !colCount){\r\n\t\t\t\tthis.collapseHandleColumn.show();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tshowColumn(column){\r\n\t\tvar index;\r\n\r\n\t\tcolumn.show(false, true);\r\n\t\t//set column width to prevent calculation loops on uninitialized columns\r\n\t\tcolumn.setWidth(column.getWidth());\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tindex = this.hiddenColumns.indexOf(column);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.hiddenColumns.splice(index, 1);\r\n\t\t\t}\r\n\r\n\t\t\tthis.generateCollapsedContent();\r\n\r\n\t\t\tif(this.collapseHandleColumn && !this.hiddenColumns.length){\r\n\t\t\t\tthis.collapseHandleColumn.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//redraw columns to fit space\r\n\tupdate(){\r\n\t\tvar self = this,\r\n\t\tworking = true;\r\n\r\n\t\twhile(working){\r\n\r\n\t\t\tlet width = self.table.modules.layout.getMode() == \"fitColumns\" ? self.table.columnManager.getFlexBaseWidth() : self.table.columnManager.getWidth();\r\n\r\n\t\t\tlet diff = (self.table.options.headerVisible ? self.table.columnManager.element.clientWidth : self.table.element.clientWidth) - width;\r\n\r\n\t\t\tif(diff < 0){\r\n\t\t\t\t//table is too wide\r\n\t\t\t\tlet column = self.columns[self.index];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tself.hideColumn(column);\r\n\t\t\t\t\tself.index ++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tworking = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\r\n\t\t\t\t//table has spare space\r\n\t\t\t\tlet column = self.columns[self.index -1];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tif(diff > 0){\r\n\t\t\t\t\t\tif(diff >= column.getWidth()){\r\n\t\t\t\t\t\t\tself.showColumn(column);\r\n\t\t\t\t\t\t\tself.index --;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tworking = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tworking = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(!self.table.rowManager.activeRowsCount){\r\n\t\t\t\tself.table.rowManager.renderEmptyScroll();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateCollapsedContent(){\r\n\t\tvar self = this,\r\n\t\trows = this.table.rowManager.getDisplayRows();\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\tself.generateCollapsedRowContent(row);\r\n\t\t});\r\n\t}\r\n\r\n\tgenerateCollapsedRowContent(row){\r\n\t\tvar el, contents;\r\n\r\n\t\tif(row.modules.responsiveLayout){\r\n\t\t\tel = row.modules.responsiveLayout.element;\r\n\r\n\t\t\twhile(el.firstChild) el.removeChild(el.firstChild);\r\n\r\n\t\t\tcontents = this.collapseFormatter(this.generateCollapsedRowData(row));\r\n\t\t\tif(contents){\r\n\t\t\t\tel.appendChild(contents);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateCollapsedRowData(row){\r\n\t\tvar self = this,\r\n\t\tdata = row.getData(),\r\n\t\toutput = [],\r\n\t\tmockCellComponent;\r\n\r\n\t\tthis.hiddenColumns.forEach(function(column){\r\n\t\t\tvar value = column.getFieldValue(data);\r\n\r\n\t\t\tif(column.definition.title && column.field){\r\n\t\t\t\tif(column.modules.format && self.table.options.responsiveLayoutCollapseUseFormatters){\r\n\r\n\t\t\t\t\tmockCellComponent = {\r\n\t\t\t\t\t\tvalue:false,\r\n\t\t\t\t\t\tdata:{},\r\n\t\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetData:function(){\r\n\t\t\t\t\t\t\treturn data;\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\t\treturn document.createElement(\"div\");\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\t\treturn row.getComponent();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tfunction onRendered(callback){\r\n\t\t\t\t\t\tcallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\toutput.push({\r\n\t\t\t\t\t\tfield: column.field,\r\n\t\t\t\t\t\ttitle: column.definition.title,\r\n\t\t\t\t\t\tvalue: column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params, onRendered)\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput.push({\r\n\t\t\t\t\t\tfield: column.field,\r\n\t\t\t\t\t\ttitle: column.definition.title,\r\n\t\t\t\t\t\tvalue: value\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tformatCollapsedData(data){\r\n\t\tvar list = document.createElement(\"table\");\r\n\r\n\t\tdata.forEach(function(item){\r\n\t\t\tvar row = document.createElement(\"tr\");\r\n\t\t\tvar titleData = document.createElement(\"td\");\r\n\t\t\tvar valueData = document.createElement(\"td\");\r\n\t\t\tvar node_content;\r\n\r\n\t\t\tvar titleHighlight = document.createElement(\"strong\");\r\n\t\t\ttitleData.appendChild(titleHighlight);\r\n\t\t\tthis.langBind(\"columns|\" + item.field, function(text){\r\n\t\t\t\ttitleHighlight.innerHTML = text || item.title;\r\n\t\t\t});\r\n\r\n\t\t\tif(item.value instanceof Node){\r\n\t\t\t\tnode_content = document.createElement(\"div\");\r\n\t\t\t\tnode_content.appendChild(item.value);\r\n\t\t\t\tvalueData.appendChild(node_content);\r\n\t\t\t}else{\r\n\t\t\t\tvalueData.innerHTML = item.value;\r\n\t\t\t}\r\n\r\n\t\t\trow.appendChild(titleData);\r\n\t\t\trow.appendChild(valueData);\r\n\t\t\tlist.appendChild(row);\r\n\t\t}, this);\r\n\r\n\t\treturn Object.keys(data).length ? list : \"\";\r\n\t}\r\n}\r\n\r\nResponsiveLayout.moduleName = \"responsiveLayout\";\r\n\r\nexport default ResponsiveLayout;","import Module from '../../core/Module.js';\r\n\r\nclass SelectRow extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.selecting = false; //flag selecting in progress\r\n\t\tthis.lastClickedRow = false; //last clicked row\r\n\t\tthis.selectPrev = []; //hold previously selected element for drag drop selection\r\n\t\tthis.selectedRows = []; //hold selected rows\r\n\t\tthis.headerCheckboxElement = null; // hold header select element\r\n\t\t\r\n\t\tthis.registerTableOption(\"selectable\", \"highlight\"); //highlight rows on hover\r\n\t\tthis.registerTableOption(\"selectableRangeMode\", \"drag\"); //highlight rows on hover\r\n\t\tthis.registerTableOption(\"selectableRollingSelection\", true); //roll selection once maximum number of selectable rows is reached\r\n\t\tthis.registerTableOption(\"selectablePersistence\", true); // maintain selection when table view is updated\r\n\t\tthis.registerTableOption(\"selectableCheck\", function(data, row){return true;}); //check wheather row is selectable\r\n\t\t\r\n\t\tthis.registerTableFunction(\"selectRow\", this.selectRows.bind(this));\r\n\t\tthis.registerTableFunction(\"deselectRow\", this.deselectRows.bind(this));\r\n\t\tthis.registerTableFunction(\"toggleSelectRow\", this.toggleRow.bind(this));\r\n\t\tthis.registerTableFunction(\"getSelectedRows\", this.getSelectedRows.bind(this));\r\n\t\tthis.registerTableFunction(\"getSelectedData\", this.getSelectedData.bind(this));\r\n\t\t\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"select\", this.selectRows.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"deselect\", this.deselectRows.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"toggleSelect\", this.toggleRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isSelected\", this.isRowSelected.bind(this));\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.selectable !== false){\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleting\", this.rowDeleted.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.clearSelectionData.bind(this));\r\n\t\t\tthis.subscribe(\"rows-retrieve\", this.rowRetrieve.bind(this));\r\n\t\t\t\r\n\t\t\tif(this.table.options.selectable && !this.table.options.selectablePersistence){\r\n\t\t\t\tthis.subscribe(\"data-refreshing\", this.deselectRows.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trowRetrieve(type, prevValue){\r\n\t\treturn type === \"selected\" ? this.selectedRows : prevValue;\r\n\t}\r\n\t\r\n\trowDeleted(row){\r\n\t\tthis._deselectRow(row, true);\r\n\t}\r\n\t\r\n\tclearSelectionData(silent){\r\n\t\tthis.selecting = false;\r\n\t\tthis.lastClickedRow = false;\r\n\t\tthis.selectPrev = [];\r\n\t\tthis.selectedRows = [];\r\n\t\t\r\n\t\tif(silent !== true){\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\telement = row.getElement();\r\n\t\t\r\n\t\t// trigger end of row selection\r\n\t\tvar endSelect = function(){\r\n\t\t\t\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tself.selecting = false;\r\n\t\t\t}, 50);\r\n\t\t\t\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", endSelect);\r\n\t\t};\r\n\t\t\r\n\t\trow.modules.select = {selected:false};\r\n\t\t\r\n\t\t//set row selection class\r\n\t\tif(self.table.options.selectableCheck.call(this.table, row.getComponent())){\r\n\t\t\telement.classList.add(\"tabulator-selectable\");\r\n\t\t\telement.classList.remove(\"tabulator-unselectable\");\r\n\t\t\t\r\n\t\t\tif(self.table.options.selectable && self.table.options.selectable != \"highlight\"){\r\n\t\t\t\tif(self.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\telement.addEventListener(\"click\", this.handleComplexRowClick.bind(this, row));\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.addEventListener(\"click\", function(e){\r\n\t\t\t\t\t\tif(!self.table.modExists(\"edit\") || !self.table.modules.edit.getCurrentCell()){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(!self.selecting){\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\t\t\tif(e.shiftKey){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.selecting = true;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.selectPrev = [];\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tdocument.body.addEventListener(\"mouseup\", endSelect);\r\n\t\t\t\t\t\t\tdocument.body.addEventListener(\"keyup\", endSelect);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mouseenter\", function(e){\r\n\t\t\t\t\t\tif(self.selecting){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(self.selectPrev[1] == row){\r\n\t\t\t\t\t\t\t\tself.toggleRow(self.selectPrev[0]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mouseout\", function(e){\r\n\t\t\t\t\t\tif(self.selecting){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\tself.selectPrev.unshift(row);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\telement.classList.add(\"tabulator-unselectable\");\r\n\t\t\telement.classList.remove(\"tabulator-selectable\");\r\n\t\t}\r\n\t}\r\n\t\r\n\thandleComplexRowClick(row, e){\r\n\t\tif(e.shiftKey){\r\n\t\t\tthis.table._clearSelection();\r\n\t\t\tthis.lastClickedRow = this.lastClickedRow || row;\r\n\t\t\t\r\n\t\t\tvar lastClickedRowIdx = this.table.rowManager.getDisplayRowIndex(this.lastClickedRow);\r\n\t\t\tvar rowIdx = this.table.rowManager.getDisplayRowIndex(row);\r\n\t\t\t\r\n\t\t\tvar fromRowIdx = lastClickedRowIdx <= rowIdx ? lastClickedRowIdx : rowIdx;\r\n\t\t\tvar toRowIdx = lastClickedRowIdx >= rowIdx ? lastClickedRowIdx : rowIdx;\r\n\t\t\t\r\n\t\t\tvar rows = this.table.rowManager.getDisplayRows().slice(0);\r\n\t\t\tvar toggledRows = rows.splice(fromRowIdx, toRowIdx - fromRowIdx + 1);\r\n\t\t\t\r\n\t\t\tif(e.ctrlKey || e.metaKey){\r\n\t\t\t\ttoggledRows.forEach((toggledRow)=>{\r\n\t\t\t\t\tif(toggledRow !== this.lastClickedRow){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.table.options.selectable !== true && !this.isRowSelected(row)){\r\n\t\t\t\t\t\t\tif(this.selectedRows.length < this.table.options.selectable){\r\n\t\t\t\t\t\t\t\tthis.toggleRow(toggledRow);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.toggleRow(toggledRow);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tthis.lastClickedRow = row;\r\n\t\t\t}else{\r\n\t\t\t\tthis.deselectRows(undefined, true);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.selectable !== true){\r\n\t\t\t\t\tif(toggledRows.length > this.table.options.selectable){\r\n\t\t\t\t\t\ttoggledRows = toggledRows.slice(0, this.table.options.selectable)\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.selectRows(toggledRows);\r\n\t\t\t}\r\n\t\t\tthis.table._clearSelection();\r\n\t\t}\r\n\t\telse if(e.ctrlKey || e.metaKey){\r\n\t\t\tthis.toggleRow(row);\r\n\t\t\tthis.lastClickedRow = row;\r\n\t\t}else{\r\n\t\t\tthis.deselectRows(undefined, true);\r\n\t\t\tthis.selectRows(row);\r\n\t\t\tthis.lastClickedRow = row;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//toggle row selection\r\n\ttoggleRow(row){\r\n\t\tif(this.table.options.selectableCheck.call(this.table, row.getComponent())){\r\n\t\t\tif(row.modules.select && row.modules.select.selected){\r\n\t\t\t\tthis._deselectRow(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis._selectRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//select a number of rows\r\n\tselectRows(rows){\r\n\t\tvar rowMatch;\r\n\t\t\r\n\t\tswitch(typeof rows){\r\n\t\t\tcase \"undefined\":\r\n\t\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"string\":\r\n\t\t\t\r\n\t\t\trowMatch = this.table.rowManager.findRow(rows);\r\n\t\t\t\r\n\t\t\tif(rowMatch){\r\n\t\t\t\tthis._selectRow(rowMatch, true, true);\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.rowManager.getRows(rows).forEach((row) => {\r\n\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\tif(Array.isArray(rows)){\r\n\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis._rowSelectionChanged();\r\n\t\t\t}else{\r\n\t\t\t\tthis._selectRow(rows, false, true);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//select an individual row\r\n\t_selectRow(rowInfo, silent, force){\r\n\t\tvar index;\r\n\t\t\r\n\t\t//handle max row count\r\n\t\tif(!isNaN(this.table.options.selectable) && this.table.options.selectable !== true && !force){\r\n\t\t\tif(this.selectedRows.length >= this.table.options.selectable){\r\n\t\t\t\tif(this.table.options.selectableRollingSelection){\r\n\t\t\t\t\tthis._deselectRow(this.selectedRows[0]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tvar row = this.table.rowManager.findRow(rowInfo);\r\n\t\t\r\n\t\tif(row){\r\n\t\t\tif(this.selectedRows.indexOf(row) == -1){\r\n\t\t\t\trow.getElement().classList.add(\"tabulator-selected\");\r\n\t\t\t\tif(!row.modules.select){\r\n\t\t\t\t\trow.modules.select = {};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\trow.modules.select.selected = true;\r\n\t\t\t\tif(row.modules.select.checkboxEl){\r\n\t\t\t\t\trow.modules.select.checkboxEl.checked = true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.selectedRows.push(row);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.dataTreeSelectPropagate){\r\n\t\t\t\t\tthis.childRowSelection(row, true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatchExternal(\"rowSelected\", row.getComponent());\r\n\t\t\t\t\r\n\t\t\t\tthis._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Selection Error - No such row found, ignoring selection:\" + rowInfo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tisRowSelected(row){\r\n\t\treturn this.selectedRows.indexOf(row) !== -1;\r\n\t}\r\n\t\r\n\t//deselect a number of rows\r\n\tdeselectRows(rows, silent){\r\n\t\tvar self = this,\r\n\t\trowCount;\r\n\t\t\r\n\t\tif(typeof rows == \"undefined\"){\r\n\t\t\t\r\n\t\t\trowCount = self.selectedRows.length;\r\n\t\t\t\r\n\t\t\tfor(let i = 0; i < rowCount; i++){\r\n\t\t\t\tself._deselectRow(self.selectedRows[0], true);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(rowCount){\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tif(Array.isArray(rows)){\r\n\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\tself._deselectRow(row, true);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}else{\r\n\t\t\t\tself._deselectRow(rows, silent);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//deselect an individual row\r\n\t_deselectRow(rowInfo, silent){\r\n\t\tvar self = this,\r\n\t\trow = self.table.rowManager.findRow(rowInfo),\r\n\t\tindex;\r\n\t\t\r\n\t\tif(row){\r\n\t\t\tindex = self.selectedRows.findIndex(function(selectedRow){\r\n\t\t\t\treturn selectedRow == row;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\t\r\n\t\t\t\trow.getElement().classList.remove(\"tabulator-selected\");\r\n\t\t\t\tif(!row.modules.select){\r\n\t\t\t\t\trow.modules.select = {};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\trow.modules.select.selected = false;\r\n\t\t\t\tif(row.modules.select.checkboxEl){\r\n\t\t\t\t\trow.modules.select.checkboxEl.checked = false;\r\n\t\t\t\t}\r\n\t\t\t\tself.selectedRows.splice(index, 1);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.dataTreeSelectPropagate){\r\n\t\t\t\t\tthis.childRowSelection(row, false);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatchExternal(\"rowDeselected\", row.getComponent());\r\n\t\t\t\t\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Deselection Error - No such row found, ignoring selection:\" + rowInfo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSelectedData(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tthis.selectedRows.forEach(function(row){\r\n\t\t\tdata.push(row.getData());\r\n\t\t});\r\n\t\t\r\n\t\treturn data;\r\n\t}\r\n\t\r\n\tgetSelectedRows(){\r\n\t\t\r\n\t\tvar rows = [];\r\n\t\t\r\n\t\tthis.selectedRows.forEach(function(row){\r\n\t\t\trows.push(row.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t_rowSelectionChanged(silent){\r\n\t\tif(this.headerCheckboxElement){\r\n\t\t\tif(this.selectedRows.length === 0){\r\n\t\t\t\tthis.headerCheckboxElement.checked = false;\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = false;\r\n\t\t\t} else if(this.table.rowManager.rows.length === this.selectedRows.length){\r\n\t\t\t\tthis.headerCheckboxElement.checked = true;\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = false;\r\n\t\t\t} else {\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = true;\r\n\t\t\t\tthis.headerCheckboxElement.checked = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(!silent){\r\n\t\t\tthis.dispatchExternal(\"rowSelectionChanged\", this.getSelectedData(), this.getSelectedRows());\r\n\t\t}\r\n\t}\r\n\t\r\n\tregisterRowSelectCheckbox (row, element) {\r\n\t\tif(!row._row.modules.select){\r\n\t\t\trow._row.modules.select = {};\r\n\t\t}\r\n\t\t\r\n\t\trow._row.modules.select.checkboxEl = element;\r\n\t}\r\n\t\r\n\tregisterHeaderSelectCheckbox (element) {\r\n\t\tthis.headerCheckboxElement = element;\r\n\t}\r\n\t\r\n\tchildRowSelection(row, select){\r\n\t\tvar children = this.table.modules.dataTree.getChildren(row, true);\r\n\t\t\r\n\t\tif(select){\r\n\t\t\tfor(let child of children){\r\n\t\t\t\tthis._selectRow(child, true);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tfor(let child of children){\r\n\t\t\t\tthis._deselectRow(child, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nSelectRow.moduleName = \"selectRow\";\r\n\r\nexport default SelectRow;","//sort numbers\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar decimal = params.decimalSeparator;\r\n\tvar thousand = params.thousandSeparator;\r\n\tvar emptyAlign = 0;\r\n\r\n\ta = String(a);\r\n\tb = String(b);\r\n\r\n\tif(thousand){\r\n\t\ta = a.split(thousand).join(\"\");\r\n\t\tb = b.split(thousand).join(\"\");\r\n\t}\r\n\r\n\tif(decimal){\r\n\t\ta = a.split(decimal).join(\".\");\r\n\t\tb = b.split(decimal).join(\".\");\r\n\t}\r\n\r\n\ta = parseFloat(a);\r\n\tb = parseFloat(b);\r\n\r\n\t//handle non numeric values\r\n\tif(isNaN(a)){\r\n\t\temptyAlign = isNaN(b) ? 0 : -1;\r\n\t}else if(isNaN(b)){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\t\t//compare valid values\r\n\t\treturn a - b;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","//sort strings\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\tvar locale;\r\n\r\n\t//handle empty values\r\n\tif(!a){\r\n\t\temptyAlign = !b ? 0 : -1;\r\n\t}else if(!b){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\t\t//compare valid values\r\n\t\tswitch(typeof params.locale){\r\n\t\t\tcase \"boolean\":\r\n\t\t\tif(params.locale){\r\n\t\t\t\tlocale = this.langLocale();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"string\":\r\n\t\t\tlocale = params.locale;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn String(a).toLowerCase().localeCompare(String(b).toLowerCase(), locale);\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","//sort datetime\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar format = params.format || \"dd/MM/yyyy HH:mm:ss\",\r\n\talignEmptyValues = params.alignEmptyValues,\r\n\temptyAlign = 0;\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\ta = format === \"iso\" ? DT.fromISO(String(a)) : DT.fromFormat(String(a), format);\r\n\t\tb = format === \"iso\" ? DT.fromISO(String(b)) : DT.fromFormat(String(b), format);\r\n\r\n\t\tif(!a.isValid){\r\n\t\t\temptyAlign = !b.isValid ? 0 : -1;\r\n\t\t}else if(!b.isValid){\r\n\t\t\temptyAlign = 1;\r\n\t\t}else{\r\n\t\t\t//compare valid values\r\n\t\t\treturn a - b;\r\n\t\t}\r\n\r\n\t\t//fix empty values in position\r\n\t\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\t\temptyAlign *= -1;\r\n\t\t}\r\n\r\n\t\treturn emptyAlign;\r\n\r\n\t}else{\r\n\t\tconsole.error(\"Sort Error - 'datetime' sorter is dependant on luxon.js\");\r\n\t}\r\n};","import datetime from './datetime.js';\r\n\r\n//sort date\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tif(!params.format){\r\n\t\tparams.format = \"dd/MM/yyyy\";\r\n\t}\r\n\r\n\treturn datetime.call(this, a, b, aRow, bRow, column, dir, params);\r\n};","import datetime from './datetime.js';\r\n\r\n//sort times\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tif(!params.format){\r\n\t\tparams.format = \"HH:mm\";\r\n\t}\r\n\r\n\treturn datetime.call(this, a, b, aRow, bRow, column, dir, params);\r\n};","//sort booleans\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = a === true || a === \"true\" || a === \"True\" || a === 1 ? 1 : 0;\r\n\tvar el2 = b === true || b === \"true\" || b === \"True\" || b === 1 ? 1 : 0;\r\n\r\n\treturn el1 - el2;\r\n};","//sort if element contains any data\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = 0;\r\n\tvar el2 = 0;\r\n\tvar type = params.type || \"length\";\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\r\n\tfunction calc(value){\r\n\r\n\t\tswitch(type){\r\n\t\t\tcase \"length\":\r\n\t\t\treturn value.length;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"sum\":\r\n\t\t\treturn value.reduce(function(c, d){\r\n\t\t\t\treturn c + d;\r\n\t\t\t});\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"max\":\r\n\t\t\treturn Math.max.apply(null, value) ;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"min\":\r\n\t\t\treturn Math.min.apply(null, value) ;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"avg\":\r\n\t\t\treturn value.reduce(function(c, d){\r\n\t\t\t\treturn c + d;\r\n\t\t\t}) / value.length;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t//handle non array values\r\n\tif(!Array.isArray(a)){\r\n\t\talignEmptyValues = !Array.isArray(b) ? 0 : -1;\r\n\t}else if(!Array.isArray(b)){\r\n\t\talignEmptyValues = 1;\r\n\t}else{\r\n\r\n\t\t//compare valid values\r\n\t\tel1 = a ? calc(a) : 0;\r\n\t\tel2 = b ? calc(b) : 0;\r\n\r\n\t\treturn el1 - el2;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","//sort if element contains any data\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = typeof a == \"undefined\" ? 0 : 1;\r\n\tvar el2 = typeof b == \"undefined\" ? 0 : 1;\r\n\r\n\treturn el1 - el2;\r\n};","//sort alpha numeric strings\r\nexport default function(as, bs, aRow, bRow, column, dir, params){\r\n\tvar a, b, a1, b1, i= 0, L, rx = /(\\d+)|(\\D+)/g, rd = /\\d/;\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\r\n\t//handle empty values\r\n\tif(!as && as!== 0){\r\n\t\temptyAlign = !bs && bs!== 0 ? 0 : -1;\r\n\t}else if(!bs && bs!== 0){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\r\n\t\tif(isFinite(as) && isFinite(bs)) return as - bs;\r\n\t\ta = String(as).toLowerCase();\r\n\t\tb = String(bs).toLowerCase();\r\n\t\tif(a === b) return 0;\r\n\t\tif(!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1;\r\n\t\ta = a.match(rx);\r\n\t\tb = b.match(rx);\r\n\t\tL = a.length > b.length ? b.length : a.length;\r\n\t\twhile(i < L){\r\n\t\t\ta1= a[i];\r\n\t\t\tb1= b[i++];\r\n\t\t\tif(a1 !== b1){\r\n\t\t\t\tif(isFinite(a1) && isFinite(b1)){\r\n\t\t\t\t\tif(a1.charAt(0) === \"0\") a1 = \".\" + a1;\r\n\t\t\t\t\tif(b1.charAt(0) === \"0\") b1 = \".\" + b1;\r\n\t\t\t\t\treturn a1 - b1;\r\n\t\t\t\t}\r\n\t\t\t\telse return a1 > b1 ? 1 : -1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn a.length > b.length;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","import number from './sorters/number.js';\r\nimport string from './sorters/string.js';\r\nimport date from './sorters/date.js';\r\nimport time from './sorters/time.js';\r\nimport datetime from './sorters/datetime.js';\r\nimport boolean from './sorters/boolean.js';\r\nimport array from './sorters/array.js';\r\nimport exists from './sorters/exists.js';\r\nimport alphanum from './sorters/alphanum.js';\r\n\r\nexport default {\r\n\tnumber:number,\r\n\tstring:string,\r\n\tdate:date,\r\n\ttime:time,\r\n\tdatetime:datetime,\r\n\tboolean:boolean,\r\n\tarray:array,\r\n\texists:exists,\r\n\talphanum:alphanum\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultSorters from './defaults/sorters.js';\r\n\r\nclass Sort extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t \tthis.sortList = []; //holder current sort\r\n\t \tthis.changed = false; //has the sort changed since last render\r\n\r\n\t \tthis.registerTableOption(\"sortMode\", \"local\"); //local or remote sorting\r\n\r\n\t \tthis.registerTableOption(\"initialSort\", false); //initial sorting criteria\r\n\t \tthis.registerTableOption(\"columnHeaderSortMulti\", true); //multiple or single column sorting\r\n\t \tthis.registerTableOption(\"sortOrderReverse\", false); //reverse internal sort ordering\r\n\t \tthis.registerTableOption(\"headerSortElement\", \"
\"); //header sort element\r\n\r\n\t \tthis.registerColumnOption(\"sorter\");\r\n\t \tthis.registerColumnOption(\"sorterParams\");\r\n\r\n\t \tthis.registerColumnOption(\"headerSort\", true);\r\n\t \tthis.registerColumnOption(\"headerSortStartingDir\");\r\n\t \tthis.registerColumnOption(\"headerSortTristate\");\r\n\r\n\t }\r\n\r\n\t initialize(){\r\n\t \tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t \tthis.subscribe(\"table-built\", this.tableBuilt.bind(this));\r\n\t \tthis.registerDataHandler(this.sort.bind(this), 20);\r\n\r\n\t \tthis.registerTableFunction(\"setSort\", this.userSetSort.bind(this));\r\n\t \tthis.registerTableFunction(\"getSorters\", this.getSort.bind(this));\r\n\t \tthis.registerTableFunction(\"clearSort\", this.clearSort.bind(this));\r\n\r\n\t \tif(this.table.options.sortMode === \"remote\"){\r\n\t \t\tthis.subscribe(\"data-params\", this.remoteSortParams.bind(this));\r\n\t \t}\r\n\t }\r\n\r\n\t tableBuilt(){\r\n\t \tif(this.table.options.initialSort){\r\n\t \t\tthis.setSort(this.table.options.initialSort);\r\n\t \t}\r\n\t }\r\n\r\n\t remoteSortParams(data, config, silent, params){\r\n\t \tvar sorters = this.getSort();\r\n\r\n\t \tsorters.forEach((item) => {\r\n\t \t\tdelete item.column;\r\n\t \t});\r\n\r\n\t \tparams.sort = sorters;\r\n\r\n\t \treturn params;\r\n\t }\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tuserSetSort(sortList, dir){\r\n\t\tthis.setSort(sortList, dir);\r\n\t\t// this.table.rowManager.sorterRefresh();\r\n\t\tthis.refreshSort();\r\n\t}\r\n\r\n\tclearSort(){\r\n\t\tthis.clear();\r\n\t\t// this.table.rowManager.sorterRefresh();\r\n\t\tthis.refreshSort();\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\t//initialize column header for sorting\r\n\tinitializeColumn(column){\r\n\t\tvar sorter = false,\r\n\t\tcolEl,\r\n\t\tarrowEl;\r\n\r\n\t\tswitch(typeof column.definition.sorter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Sort.sorters[column.definition.sorter]){\r\n\t\t\t\tsorter = Sort.sorters[column.definition.sorter];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Sort Error - No such sorter found: \", column.definition.sorter);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tsorter = column.definition.sorter;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tcolumn.modules.sort = {\r\n\t\t\tsorter:sorter, dir:\"none\",\r\n\t\t\tparams:column.definition.sorterParams || {},\r\n\t\t\tstartingDir:column.definition.headerSortStartingDir || \"asc\",\r\n\t\t\ttristate: column.definition.headerSortTristate,\r\n\t\t};\r\n\r\n\t\tif(column.definition.headerSort !== false){\r\n\r\n\t\t\tcolEl = column.getElement();\r\n\r\n\t\t\tcolEl.classList.add(\"tabulator-sortable\");\r\n\r\n\r\n\t\t\tarrowEl = document.createElement(\"div\");\r\n\t\t\tarrowEl.classList.add(\"tabulator-col-sorter\");\r\n\r\n\t\t\tif(typeof this.table.options.headerSortElement == \"object\"){\r\n\t\t\t\tarrowEl.appendChild(this.table.options.headerSortElement);\r\n\t\t\t}else{\r\n\t\t\t\tarrowEl.innerHTML = this.table.options.headerSortElement;\r\n\t\t\t}\r\n\r\n\t\t\t//create sorter arrow\r\n\t\t\tcolumn.titleHolderElement.appendChild(arrowEl);\r\n\r\n\t\t\tcolumn.modules.sort.element = arrowEl;\r\n\r\n\t\t\t//sort on click\r\n\t\t\tcolEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\tvar dir = \"\",\r\n\t\t\t\tsorters=[],\r\n\t\t\t\tmatch = false;\r\n\r\n\t\t\t\tif(column.modules.sort){\r\n\t\t\t\t\tif(column.modules.sort.tristate){\r\n\t\t\t\t\t\tif(column.modules.sort.dir == \"none\"){\r\n\t\t\t\t\t\t\tdir = column.modules.sort.startingDir;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(column.modules.sort.dir == column.modules.sort.startingDir){\r\n\t\t\t\t\t\t\t\tdir = column.modules.sort.dir == \"asc\" ? \"desc\" : \"asc\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tdir = \"none\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswitch(column.modules.sort.dir){\r\n\t\t\t\t\t\t\tcase \"asc\":\r\n\t\t\t\t\t\t\tdir = \"desc\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tcase \"desc\":\r\n\t\t\t\t\t\t\tdir = \"asc\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tdir = column.modules.sort.startingDir;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\tif (this.table.options.columnHeaderSortMulti && (e.shiftKey || e.ctrlKey)) {\r\n\t\t\t\t\t\tsorters = this.getSort();\r\n\r\n\t\t\t\t\t\tmatch = sorters.findIndex((sorter) => {\r\n\t\t\t\t\t\t\treturn sorter.field === column.getField();\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tif(match > -1){\r\n\t\t\t\t\t\t\tsorters[match].dir = dir;\r\n\r\n\t\t\t\t\t\t\tif(match != sorters.length -1){\r\n\t\t\t\t\t\t\t\tmatch = sorters.splice(match, 1)[0];\r\n\t\t\t\t\t\t\t\tif(dir != \"none\"){\r\n\t\t\t\t\t\t\t\t\tsorters.push(match);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(dir != \"none\"){\r\n\t\t\t\t\t\t\t\tsorters.push({column:column, dir:dir});\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t//add to existing sort\r\n\t\t\t\t\t\tthis.setSort(sorters);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(dir == \"none\"){\r\n\t\t\t\t\t\t\tthis.clear();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t//sort by column only\r\n\t\t\t\t\t\t\tthis.setSort(column, dir);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// this.table.rowManager.sorterRefresh(!this.sortList.length);\r\n\t\t\t\t\tthis.refreshSort();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\trefreshSort(){\r\n\t\tif(this.table.options.sortMode === \"remote\"){\r\n\t\t\tthis.reloadData();\r\n\t\t}else{\r\n\t\t\tthis.refreshData(true);\r\n\t\t}\r\n\r\n\t\t//TODO - Persist left position of row manager\r\n\t\t// left = this.scrollLeft;\r\n\t\t// this.scrollHorizontal(left);\r\n\t}\r\n\r\n\t//check if the sorters have changed since last use\r\n\thasChanged(){\r\n\t\tvar changed = this.changed;\r\n\t\tthis.changed = false;\r\n\t\treturn changed;\r\n\t}\r\n\r\n\t//return current sorters\r\n\tgetSort(){\r\n\t\tvar self = this,\r\n\t\tsorters = [];\r\n\r\n\t\tself.sortList.forEach(function(item){\r\n\t\t\tif(item.column){\r\n\t\t\t\tsorters.push({column:item.column.getComponent(), field:item.column.getField(), dir:item.dir});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn sorters;\r\n\t}\r\n\r\n\t//change sort list and trigger sort\r\n\tsetSort(sortList, dir){\r\n\t\tvar self = this,\r\n\t\tnewSortList = [];\r\n\r\n\t\tif(!Array.isArray(sortList)){\r\n\t\t\tsortList = [{column: sortList, dir:dir}];\r\n\t\t}\r\n\r\n\t\tsortList.forEach(function(item){\r\n\t\t\tvar column;\r\n\r\n\t\t\tcolumn = self.table.columnManager.findColumn(item.column);\r\n\r\n\t\t\tif(column){\r\n\t\t\t\titem.column = column;\r\n\t\t\t\tnewSortList.push(item);\r\n\t\t\t\tself.changed = true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Sort Warning - Sort field does not exist and is being ignored: \", item.column);\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\t\tself.sortList = newSortList;\r\n\r\n\t\tthis.dispatch(\"sort-changed\");\r\n\t}\r\n\r\n\t//clear sorters\r\n\tclear(){\r\n\t\tthis.setSort([]);\r\n\t}\r\n\r\n\t//find appropriate sorter for column\r\n\tfindSorter(column){\r\n\t\tvar row = this.table.rowManager.activeRows[0],\r\n\t\tsorter = \"string\",\r\n\t\tfield, value;\r\n\r\n\t\tif(row){\r\n\t\t\trow = row.getData();\r\n\t\t\tfield = column.getField();\r\n\r\n\t\t\tif(field){\r\n\r\n\t\t\t\tvalue = column.getFieldValue(row);\r\n\r\n\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){\r\n\t\t\t\t\t\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn Sort.sorters[sorter];\r\n\t}\r\n\r\n\t//work through sort list sorting data\r\n\tsort(data){\r\n\t\tvar self = this,\r\n\t\tsortList = this.table.options.sortOrderReverse ? self.sortList.slice().reverse() : self.sortList,\r\n\t\tsortListActual = [],\r\n\t\trowComponents = [],\r\n\t\tlastSort;\r\n\r\n\t\tif(this.subscribedExternal(\"dataSorting\")){\r\n\t\t\tthis.dispatchExternal(\"dataSorting\", self.getSort());\r\n\t\t}\r\n\r\n\t\tself.clearColumnHeaders();\r\n\r\n\t\tif(this.table.options.sortMode !== \"remote\"){\r\n\r\n\t\t\t//build list of valid sorters and trigger column specific callbacks before sort begins\r\n\t\t\tsortList.forEach(function(item, i){\r\n\t\t\t\tvar sortObj = item.column.modules.sort;\r\n\r\n\t\t\t\tif(item.column && sortObj){\r\n\r\n\t\t\t\t\t//if no sorter has been defined, take a guess\r\n\t\t\t\t\tif(!sortObj.sorter){\r\n\t\t\t\t\t\tsortObj.sorter = self.findSorter(item.column);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\titem.params = typeof sortObj.params === \"function\" ? sortObj.params(item.column.getComponent(), item.dir) : sortObj.params;\r\n\r\n\t\t\t\t\tsortListActual.push(item);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tself.setColumnHeader(item.column, item.dir);\r\n\t\t\t});\r\n\r\n\t\t\t//sort data\r\n\t\t\tif (sortListActual.length) {\r\n\t\t\t\tself._sortItems(data, sortListActual);\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tsortList.forEach(function(item, i){\r\n\t\t\t\tself.setColumnHeader(item.column, item.dir);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.subscribedExternal(\"dataSorted\")){\r\n\t\t\tdata.forEach((row) => {\r\n\t\t\t\trowComponents.push(row.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatchExternal(\"dataSorted\", self.getSort(), rowComponents);\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//clear sort arrows on columns\r\n\tclearColumnHeaders(){\r\n\t\tthis.table.columnManager.getRealColumns().forEach(function(column){\r\n\t\t\tif(column.modules.sort){\r\n\t\t\t\tcolumn.modules.sort.dir = \"none\";\r\n\t\t\t\tcolumn.getElement().setAttribute(\"aria-sort\", \"none\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//set the column header sort direction\r\n\tsetColumnHeader(column, dir){\r\n\t\tcolumn.modules.sort.dir = dir;\r\n\t\tcolumn.getElement().setAttribute(\"aria-sort\", dir);\r\n\t}\r\n\r\n\t//sort each item in sort list\r\n\t_sortItems(data, sortList){\r\n\t\tvar sorterCount = sortList.length - 1;\r\n\r\n\t\tdata.sort((a, b) => {\r\n\t\t\tvar result;\r\n\r\n\t\t\tfor(var i = sorterCount; i>= 0; i--){\r\n\t\t\t\tlet sortItem = sortList[i];\r\n\r\n\t\t\t\tresult = this._sortRow(a, b, sortItem.column, sortItem.dir, sortItem.params);\r\n\r\n\t\t\t\tif(result !== 0){\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn result;\r\n\t\t});\r\n\t}\r\n\r\n\t//process individual rows for a sort function on active data\r\n\t_sortRow(a, b, column, dir, params){\r\n\t\tvar el1Comp, el2Comp, colComp;\r\n\r\n\t\t//switch elements depending on search direction\r\n\t\tvar el1 = dir == \"asc\" ? a : b;\r\n\t\tvar el2 = dir == \"asc\" ? b : a;\r\n\r\n\t\ta = column.getFieldValue(el1.getData());\r\n\t\tb = column.getFieldValue(el2.getData());\r\n\r\n\t\ta = typeof a !== \"undefined\" ? a : \"\";\r\n\t\tb = typeof b !== \"undefined\" ? b : \"\";\r\n\r\n\t\tel1Comp = el1.getComponent();\r\n\t\tel2Comp = el2.getComponent();\r\n\r\n\t\treturn column.modules.sort.sorter.call(this, a, b, el1Comp, el2Comp, column.getComponent(), dir, params);\r\n\t}\r\n}\r\n\r\nSort.moduleName = \"sort\";\r\n\r\n//load defaults\r\nSort.sorters = defaultSorters;\r\n\r\nexport default Sort;","export default {\r\n\t//is integer\r\n\tinteger: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvalue = Number(value);\r\n\t\treturn typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\r\n\t},\r\n\r\n\t//is float\r\n\tfloat: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvalue = Number(value);\r\n\t\treturn typeof value === 'number' && isFinite(value) && value % 1 !== 0;\r\n\t},\r\n\r\n\t//must be a number\r\n\tnumeric: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn !isNaN(value);\r\n\t},\r\n\r\n\t//must be a string\r\n\tstring: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn isNaN(value);\r\n\t},\r\n\r\n\t//maximum value\r\n\tmax: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn parseFloat(value) <= parameters;\r\n\t},\r\n\r\n\t//minimum value\r\n\tmin: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn parseFloat(value) >= parameters;\r\n\t},\r\n\r\n\t//starts with value\r\n\tstarts: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).toLowerCase().startsWith(String(parameters).toLowerCase());\r\n\t},\r\n\r\n\t//ends with value\r\n\tends: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).toLowerCase().endsWith(String(parameters).toLowerCase());\r\n\t},\r\n\r\n\r\n\t//minimum string length\r\n\tminLength: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).length >= parameters;\r\n\t},\r\n\r\n\t//maximum string length\r\n\tmaxLength: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).length <= parameters;\r\n\t},\r\n\r\n\t//in provided value list\r\n\tin: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif(typeof parameters == \"string\"){\r\n\t\t\tparameters = parameters.split(\"|\");\r\n\t\t}\r\n\r\n\t\treturn value === \"\" || parameters.indexOf(value) > -1;\r\n\t},\r\n\r\n\t//must match provided regex\r\n\tregex: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar reg = new RegExp(parameters);\r\n\r\n\t\treturn reg.test(value);\r\n\t},\r\n\r\n\t//value must be unique in this column\r\n\tunique: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar unique = true;\r\n\r\n\t\tvar cellData = cell.getData();\r\n\t\tvar column = cell.getColumn()._getSelf();\r\n\r\n\t\tthis.table.rowManager.rows.forEach(function(row){\r\n\t\t\tvar data = row.getData();\r\n\r\n\t\t\tif(data !== cellData){\r\n\t\t\t\tif(value == column.getFieldValue(data)){\r\n\t\t\t\t\tunique = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn unique;\r\n\t},\r\n\r\n\t//must have a value\r\n\trequired:function(cell, value, parameters){\r\n\t\treturn value !== \"\" && value !== null && typeof value !== \"undefined\";\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultValidators from './defaults/validators.js';\r\n\r\nclass Validate extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.invalidCells = [];\r\n\r\n\t\tthis.registerTableOption(\"validationMode\", \"blocking\");\r\n\r\n\t\tthis.registerColumnOption(\"validator\");\r\n\r\n\t\tthis.registerTableFunction(\"getInvalidCells\", this.getInvalidCells.bind(this));\r\n\t\tthis.registerTableFunction(\"clearCellValidation\", this.userClearCellValidation.bind(this));\r\n\t\tthis.registerTableFunction(\"validate\", this.userValidate.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"isValid\", this.cellIsValid.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"clearValidation\", this.clearValidation.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"validate\", this.cellValidate.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"column\", \"validate\", this.columnValidate.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"validate\", this.rowValidate.bind(this));\r\n\t}\r\n\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-delete\", this.clearValidation.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumnCheck.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Cell Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tcellIsValid(cell){\r\n\t\treturn cell.modules.validate ? !cell.modules.validate.invalid : true;\r\n\t}\r\n\r\n\tcellValidate(cell){\r\n\t\treturn this.validate(cell.column.modules.validate, cell, cell.getValue());\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Column Functions ////////\r\n\t///////////////////////////////////\r\n\r\n\tcolumnValidate(column){\r\n\t\tvar invalid = [];\r\n\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tif(!this.cellValidate(cell)){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Row Functions //////////\r\n\t///////////////////////////////////\r\n\r\n\trowValidate(row){\r\n\t\tvar invalid = [];\r\n\r\n\t\trow.cells.forEach((cell) => {\r\n\t\t\tif(!this.cellValidate(cell)){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\r\n\tuserClearCellValidation(cells){\r\n\t\tif(!cells){\r\n\t\t\tcells = this.getInvalidCells();\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\r\n\t\tcells.forEach((cell) => {\r\n\t\t\tthis.clearValidation(cell._getSelf());\r\n\t\t});\r\n\t}\r\n\r\n\tuserValidate(cells){\r\n\t\tvar output = [];\r\n\r\n\t\t//clear row data\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\trow = row.getComponent();\r\n\r\n\t\t\tvar valid = row.validate();\r\n\r\n\t\t\tif(valid !== true){\r\n\t\t\t\toutput = output.concat(valid);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output.length ? output : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(typeof column.definition.validator !== \"undefined\"){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//validate\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = [],\r\n\t\tvalidator;\r\n\r\n\t\tif(column.definition.validator){\r\n\r\n\t\t\tif(Array.isArray(column.definition.validator)){\r\n\t\t\t\tcolumn.definition.validator.forEach((item) => {\r\n\t\t\t\t\tvalidator = self._extractValidator(item);\r\n\r\n\t\t\t\t\tif(validator){\r\n\t\t\t\t\t\tconfig.push(validator);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t}else{\r\n\t\t\t\tvalidator = this._extractValidator(column.definition.validator);\r\n\r\n\t\t\t\tif(validator){\r\n\t\t\t\t\tconfig.push(validator);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.modules.validate = config.length ? config : false;\r\n\t\t}\r\n\t}\r\n\r\n\t_extractValidator(value){\r\n\t\tvar type, params, pos;\r\n\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tpos = value.indexOf(':');\r\n\r\n\t\t\tif(pos > -1){\r\n\t\t\t\ttype = value.substring(0,pos);\r\n\t\t\t\tparams = value.substring(pos+1);\r\n\t\t\t}else{\r\n\t\t\t\ttype = value;\r\n\t\t\t}\r\n\r\n\t\t\treturn this._buildValidator(type, params);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\treturn this._buildValidator(value);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"object\":\r\n\t\t\treturn this._buildValidator(value.type, value.parameters);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t_buildValidator(type, params){\r\n\r\n\t\tvar func = typeof type == \"function\" ? type : Validate.validators[type];\r\n\r\n\t\tif(!func){\r\n\t\t\tconsole.warn(\"Validator Setup Error - No matching validator found:\", type);\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn {\r\n\t\t\t\ttype:typeof type == \"function\" ? \"function\" : type,\r\n\t\t\t\tfunc:func,\r\n\t\t\t\tparams:params,\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\tvalidate(validators, cell, value){\r\n\t\tvar self = this,\r\n\t\tvalid = [],\r\n\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\r\n\t\tif(validators){\r\n\t\t\tvalidators.forEach((item) => {\r\n\t\t\t\tif(!item.func.call(self, cell.getComponent(), value, item.params)){\r\n\t\t\t\t\tvalid.push({\r\n\t\t\t\t\t\ttype:item.type,\r\n\t\t\t\t\t\tparameters:item.params\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tvalid = valid.length ? valid : true;\r\n\r\n\t\tif(!cell.modules.validate){\r\n\t\t\tcell.modules.validate = {};\r\n\t\t}\r\n\r\n\t\tif(valid === true){\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\r\n\t\t\tif(invalidIndex > -1){\r\n\t\t\t\tthis.invalidCells.splice(invalidIndex, 1);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcell.modules.validate.invalid = true;\r\n\r\n\t\t\tif(this.table.options.validationMode !== \"manual\"){\r\n\t\t\t\tcell.getElement().classList.add(\"tabulator-validation-fail\");\r\n\t\t\t}\r\n\r\n\t\t\tif(invalidIndex == -1){\r\n\t\t\t\tthis.invalidCells.push(cell);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn valid;\r\n\t}\r\n\r\n\tgetInvalidCells(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.invalidCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tclearValidation(cell){\r\n\t\tvar invalidIndex;\r\n\r\n\t\tif(cell.modules.validate && cell.modules.validate.invalid){\r\n\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\r\n\t\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\r\n\t\t\tif(invalidIndex > -1){\r\n\t\t\t\tthis.invalidCells.splice(invalidIndex, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nValidate.moduleName = \"validate\";\r\n\r\n//load defaults\r\nValidate.validators = defaultValidators;\r\n\r\nexport default Validate;","//tabulator with all modules installed\r\nimport {default as Tabulator} from './Tabulator.js';\r\nimport * as modules from '../core/modules/optional.js';\r\nimport ModuleBinder from './tools/ModuleBinder.js';\r\n\r\nclass TabulatorFull extends Tabulator {};\r\n\r\n//bind modules and static functionality\r\nnew ModuleBinder(TabulatorFull, modules);\r\n\r\nexport default TabulatorFull;"],"names":["debugEventsExternal","debugEventsInternal","debugInvalidOptions","height","minHeight","maxHeight","columnHeaderVertAlign","columns","columnDefaults","data","autoColumns","autoColumnsDefinitions","nestedFieldSeparator","tooltipGenerationMode","footerElement","index","textDirection","addRowPos","headerVisible","renderVertical","renderHorizontal","renderVerticalBuffer","scrollToRowPosition","scrollToRowIfVisible","scrollToColumnPosition","scrollToColumnIfVisible","rowFormatter","rowFormatterPrint","rowFormatterClipboard","rowFormatterHtmlOutput","placeholder","dataLoader","dataLoaderLoading","dataLoaderError","dataLoaderErrorTimeout","dataSendParams","dataReceiveParams","CoreFeature","table","silent","load","undefined","modules","localize","getText","arguments","bind","getLocale","comms","getConnections","send","layout","getMode","eventBus","subscribe","unsubscribe","key","subscribed","subscriptionChange","dispatch","chain","confirm","externalEvents","options","value","module","ColumnComponent","column","_column","type","Proxy","get","target","name","receiver","componentFunctionBinder","handle","getElement","getDefinition","getField","getTitleDownload","cells","forEach","cell","push","getComponent","visible","isGroup","show","hide","output","length","parent","Column","columnManager","scrollToColumn","to","after","toColumn","findColumn","moveColumn","console","warn","nextCol","nextColumn","prevCol","prevColumn","updates","updateDefinition","getWidth","width","result","reinitializeWidth","setWidth","renderer","rerenderColumns","CellComponent","_cell","getValue","getOldValue","initialValue","row","getData","mutate","setValue","setValueActual","checkHeight","Cell","element","oldValue","minWidth","component","loaded","build","generateElement","_configureCell","getFieldValue","document","createElement","className","setAttribute","field","vertAligns","top","bottom","middle","hozAligns","left","right","center","style","textAlign","hozAlign","vertAlign","display","alignItems","justifyContent","definition","cssClass","classNames","split","classList","add","addEventListener","e","_generateTooltip","val","innerHTML","Node","firstChild","removeChild","appendChild","tooltip","containerOnly","layoutElement","changed","setValueProcessData","cellRendered","cellEdited","call","dispatchExternal","subscribedExternal","rowManager","setFieldValue","_generateContents","widthStyled","offsetWidth","minWidthStyled","maxWidth","maxWidthStyled","reinitializeHeight","heightStyled","offsetHeight","redrawBlock","parentNode","deleteCell","calcs","getCellIndex","def","contentElement","titleHolderElement","titleElement","groupElement","createGroupElement","fieldStructure","titleDownload","titleFormatterRendered","mapDefinitions","setField","maxInitialWidth","widthFixed","i","newCol","attachColumn","checkColumnVisibility","registerColumnField","_initialize","bindModuleColumns","el","defaults","optionsList","generate","defaultOptionList","Object","keys","indexOf","title","_getNestedData","_getFlatData","_setNestedData","_setFlatData","registerColumnPosition","reRegisterPosition","headerTooltip","langBind","headerVertical","_bindEvents","_buildColumnHeaderContent","_buildGroupHeader","_buildColumnHeader","setTooltip","dblTap","tapHold","tap","headerClick","headerDblClick","headerContext","headerTap","passive","headerDblTap","clearTimeout","setTimeout","headerTapHold","classeNames","setMinWidth","parseInt","setMaxWidth","headerHozAlign","_buildColumnHeaderTitle","editableTitle","stopPropagation","focus","text","_formatColumnHeaderTitle","contents","dataObj","structure","alignment","parentHeight","getGroupElement","clientHeight","getHeadersElement","paddingTop","verticalAlign","clearVerticalAlign","formatter","rowNumColumn","getFirstColumn","getLastColumn","getTopColumn","updateBranches","colDefs","responsiveToggle","verticalAlignHeaders","matchChildWidths","childWidth","child","splice","setWidthActual","isNaN","Math","floor","clientWidth","max","min","rows","heightInitialized","offsetParent","clearCellHeight","calcHeight","setCellHeight","ceil","getBoundingClientRect","Promise","resolve","reject","cellCount","deregisterColumn","findColumnIndex","_nextVisibleColumn","getColumnByIndex","_prevVisibleColumn","force","fitToData","clearWidth","setTo","assign","addColumn","then","error","defaultOptions","Helpers","box","window","pageYOffset","documentElement","clientTop","pageXOffset","clientLeft","obj","clone","list","objectProto","__proto__","arrayProto","Array","isArray","subject","match","copy","findIndex","item","unshift","deepClone","OptionsList","msgType","registeredDefaults","option","userOptions","hasOwnProperty","Renderer","elementVertical","elementHorizontal","tableElement","verticalFillMode","callback","update","blockRedraw","dir","includingBuffer","getDisplayRows","rowEl","remove","clearRows","clearColumns","renderRows","renderColumns","rerenderRows","position","ifVisible","rowIndex","offset","elVisible","elOffset","scrollToRowNearestTop","scrollToRow","scrollHeight","scrollTop","offsetTop","BaiscHorizontal","VirtualDomHorizontal","leftCol","rightCol","scrollLeft","vDomScrollPosLeft","vDomScrollPosRight","vDomPadLeft","vDomPadRight","fitDataColAvg","windowBuffer","visibleRows","initialized","isFitData","compatibilityCheck","layoutCheck","vertScrollListen","frozen","ok","find","col","startsWith","clearVisRowCache","dataChange","scroll","buffer","columnsByIndex","old","cols","colPos","clear","calcWindowBuffer","config","leftPos","rightPos","fitDataCheck","vdomHoz","paddingLeft","paddingRight","reinitChanged","reinitializeRows","initializeRow","reinitializeRow","change","collsWidth","colEnd","generateCells","layoutRefresh","getVisibleRows","diff","abs","addColRight","removeColLeft","addColLeft","removeColRight","start","end","changes","getCell","fitDataColActualWidthCheck","prepend","ex","message","newWidth","widthDiff","colPositionAdjust","ColumnManager","blockHozScrollEvent","headersElement","columnsByField","defaultColumnOptions","initializeRenderer","createHeadersElement","createHeaderElement","insertBefore","scrollHorizontal","renderClass","renderers","RendererVirtualDomHorizontal","RendererBasicHorizontal","initialize","hozAdjust","scrollWidth","marginLeft","scrollColumns","definitions","sorter","setColumns","_addColumn","_reIndexColumns","redraw","before","nextToColumn","colEl","topColumn","parentIndex","nextEl","nextSibling","columnRendered","getHeight","adjustTableSize","_getSelf","HTMLElement","root","matches","fieldRoot","active","structured","from","moveColumnActual","reinitialize","_moveColumnInArray","getComponents","updateRows","fromIndex","toIndex","concat","adjust","offsetLeft","generateCell","totalWidth","fixedWidth","colWidth","layoutMode","resetScroll","footerManager","RowComponent","_row","transform","getCells","getRowPosition","moveToRow","updateData","normalizeHeight","nextRow","prevRow","Row","manualHeight","outerHeight","created","setData","create","deleteCells","renderRowCells","rerenderRowCells","children","resizableRows","setHeight","clearHeight","updatedData","tempData","newRowData","JSON","parse","attrname","getColumnsByFieldRoot","findCell","nextDisplayRow","prevDisplayRow","toRow","findRow","moveRowActual","refreshActiveData","deleteActual","getRowIndex","detatchModules","deleteRow","group","BaiscVertical","visibility","onlyGroupHeaders","styleRow","rowTop","VirtualDomVertical","vDomRowHeight","vDomTop","vDomBottom","vDomScrollPosTop","vDomScrollPosBottom","vDomTopPad","vDomBottomPad","vDomMaxRenderChain","vDomWindowBuffer","vDomWindowMinTotalRows","vDomWindowMinMarginRows","vDomTopNewRows","vDomBottomNewRows","paddingBottom","_virtualRenderFill","topRow","topOffset","deinitializeHeight","topDiff","bottomDiff","margin","_addTopRow","vDomScrollHeight","_removeBottomRow","_addBottomRow","_removeTopRow","topEdge","bottomEdge","topFound","bottomRow","slice","forceMove","holder","topPad","rowsHeight","heightOccupied","topPadHeight","rowsCount","containerHeight","rowHeight","fillableSpace","addedRows","paddingAdjust","_quickNormalizeRowHeight","removableRows","RowManager","createHolderElement","createTableElement","heightFixer","placeholderContents","firstRender","renderMode","fixedHeight","activeRowsPipeline","activeRows","activeRowsCount","displayRows","displayRowsCount","redrawBlockRestoreConfig","redrawBlockRenderInPosition","dataPipeline","displayPipeline","initializePlaceholder","leftDir","topDir","_positionPlaceholder","scrollRows","renderInPosition","columnsChanged","pagination","_setDataActual","reRenderInPosition","generateColumnsFromRowData","_wipeElements","wipe","allIndex","activeIndex","setActiveRows","displayRowIterator","displayIndex","regenerateRowNumbers","_showPlaceholder","pos","addRowActual","findAddRowPos","reverse","addRow","_clearPlaceholder","chainResult","moveRowInArray","findRowIndex","rowOnly","getDisplayRowIndex","getRows","handler","priority","sort","a","b","skipStage","stage","cascadeOrder","refreshPipelines","renderTable","layoutColumnsOnNewData","resetDisplayRows","setDisplayRows","viewable","RendererVirtualDomVertical","RendererBasicVertical","_clearTable","renderEmptyScroll","initialHeight","otherHeight","external","resize","tableWidth","browser","event","createEvent","initEvent","dispatchEvent","Event","FooterManager","containerElement","createContainerElement","links","initializeElement","querySelector","activate","deactivate","link","footerRedraw","InteractionManager","abortClasses","previousTargets","listeners","componentMap","pseudoTrackers","subscriber","pseudoTracking","buildListenerMap","bindSubscriptionWatchers","listenerMap","listener","components","pseudoMouseEnter","pseudoMouseLeave","leaveList","linkedKeys","filter","includes","values","comp","subscriptionChanged","clearWatchers","added","bindPseudoEvents","updateEventListeners","track","removeEventListener","path","composedPath","targets","findTargets","bindComponents","triggerEvents","abort","elTargets","targetMatches","previousTarget","closest","ComponentFunctionBinder","bindings","funcName","DataLoader","loaderElement","createLoaderElement","msgElement","createMsgElement","loadingElement","errorElement","requestOrder","loading","template","trim","firstElementChild","params","replace","requestNo","showLoader","mapParams","response","objectInvert","rowData","hideLoader","showError","map","shouldLoad","langText","ExternalEventBus","debug","events","subscriptionNotifiers","_debugDispatch","_dispatch","_notifiySubscriptionChange","notifiers","args","shift","callResult","apply","log","InternalEventBus","_debugChain","_chain","_debugConfirm","_confirm","fallback","confirmed","TableRegistry","tables","query","results","querySelectorAll","matchElement","Tabulator","lookupTable","Module","_handler","register","func","registerDataPipelineHandler","registerDisplayPipelineHandler","reinitializeColumnWidths","responsiveLayout","modExists","colsWidth","gap","lastCol","responsive","flexWidth","flexGrowUnits","flexColWidth","flexColumns","fixedShrinkColumns","flexShrinkUnits","overflowWidth","gapFill","calcWidth","scaleColumns","freeSpace","shrinkCols","oversizeCols","oversizeSpace","remainingSpace","nextColWidth","remainingFlexGrowUnits","changeUnits","undersizeCols","calcGrow","widthGrow","calcShrink","widthShrink","fitData","fitDataFill","fitDataGeneral","fitDataTable","fitDataStretch","fitColumns","Layout","mode","registerTableOption","registerColumnOption","modes","moduleName","defaultModes","Localize","locale","lang","langList","langs","headerFilterPlaceholder","setHeaderFilterPlaceholder","installLang","setLocale","registerTableFunction","getLang","headerFilters","_setLangProp","desiredLocale","traverseLang","trans","prop","navigator","language","toLowerCase","prefix","_executeBindings","pathArray","_getLangElement","level","rootPath","binding","defaultLangs","Comms","receive","selectors","connections","connection","con","action","tableComms","commsReceived","ModuleBinder","tabulator","bindStaticFuctionality","bindModules","coreModules","moduleBindings","extendModule","property","source","registerModule","mod","registerModuleBinding","findTable","prototype","orderedMods","unOrderedMods","moduleCore","modulesCore","moduleInitOrder","modulesRegular","core","mods","interactionMonitor","browserSlow","browserMobile","rtl","originalElement","initializeCoreSystems","_create","_clearObjectPointers","_mapDeprecatedFunctionality","InteractionMonitor","getSelection","empty","removeAllRanges","selection","_rtlCheck","_buildElement","_initializeTable","_loadInitialData","getComputedStyle","direction","reactiveData","newElement","tagName","attributes","replaceChild","_detectBrowser","deregister","ua","userAgent","vendor","opera","test","restoreRedraw","blockActiveLoad","clearData","getDataCount","responses","addRows","newRows","getRowFromPosition","foundRows","fromRow","getDefinitionTree","fromColumn","plugin","required","Accessor","allowedTypes","initializeColumn","transformRow","charAt","toUpperCase","accessor","lookupAccessor","accessors","rowComponent","traverse","colCompnent","defautlAccessors","method","generateParamsList","serializeParams","encoded","encodeURIComponent","join","url","contentType","urlGenerator","ajaxContentType","contentTypeFormatters","headers","body","Accept","location","origin","credentials","fetch","json","status","statusText","stringify","form","FormData","append","Ajax","loaderPromise","ajaxRequestFunc","defaultLoaderPromise","ajaxURLGenerator","defaultURLGenerator","ajaxURL","setUrl","setDefaultConfig","ajaxConfig","getUrl","requestDataCheck","requestParams","requestData","ajaxParams","previousData","generateConfig","sendRequest","defaultConfig","ajaxRequesting","ajaxResponse","defaultContentTypeFormatters","updateOrAddData","insert","addData","clipboard","headerFindSuccess","columnMap","Clipboard","pasteParser","pasteAction","customSelection","rowRange","blocked","clipboardCopyRowRange","plain","html","preventDefault","clipboardCopyFormatter","generateExportList","clipboardCopyConfig","clipboardCopyStyled","genereateHTMLTable","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","defaultPasteActions","defaultPasteParsers","CalcComponent","calcParams","precision","reduce","sum","Number","toFixed","parseFloat","String","ColumnCalcs","topCalcs","botCalcs","genColumn","topElement","botElement","botRow","topInitialized","botInitialized","cellValueChanged","initializeColumnCheck","rowsUpdated","recalcActiveRows","recalcActiveRowsRefresh","tableRedraw","getResults","userRecalc","recalc","groupBy","recalcRowGroup","dataTreeStartExpanded","dataTree","recalcAll","topCalc","bottomCalc","columnCalcs","topCalcParams","botCalcParams","bottomCalcParams","calculations","initializeTopRow","botCalc","initializeBottomRow","rowsToData","generateRow","frozenColumns","recalcGroup","groupRows","getRowGroup","groups","getChildGroups","generateRowData","dataTreeChildColumnCalcs","open","getFilteredTreeChildren","disable","enable","format","getFormatter","paramKey","getGroups","getGroupResults","groupObj","subGroups","getSubGroups","subGroupResults","subgroup","defaultCalculations","DataTree","indent","collapseEl","expandEl","branchEl","elementField","startOpen","registerComponentFunction","collapseRow","expandRow","toggleRow","getTreeParent","getRowChildren","addTreeChildRow","isRowExpanded","dummyEl","dataTreeChildField","dataTreeChildIndent","dataTreeBranchElement","dataTreeCollapseElement","tabIndex","dataTreeExpandElement","layoutRow","rowDelete","rowDataChanged","columnMoving","initializeElementField","registerDisplayHandler","firstCol","getFirstVisibleColumn","dataTreeElementColumn","getTreeChildren","redrawNeeded","refreshData","childArray","controlEl","generateControlElement","cloneNode","marginRight","getPropertyValue","oldControl","getChildren","allChildren","generateChildren","dataTreeFilter","dataTreeSort","subChildren","sub","childData","childRow","childIndex","findChildIndex","recurse","setFileContents","delimiter","fileContents","depth","bom","header","autoTableParams","rowGroupStyles","fontStyle","fontSize","cellPadding","fillColor","rowCalcStyles","jsPDFParams","jsPDF","orientation","unit","parseRow","styles","content","colSpan","rowSpan","doc","jspdf","autoTable","didDrawPage","head","documentProcessing","self","sheetName","workbook","XLSX","utils","book_new","tableFeatures","SheetNames","Sheets","generateSheet","merges","worksheet","s","c","r","j","Date","sheet_add_aoa","encode_range","sheetOnly","sheets","sheet","commsSend","intercept","s2ab","buf","ArrayBuffer","view","Uint8Array","charCodeAt","write","bookType","bookSST","csv","jsonLines","pdf","xlsx","Download","blob","download","downloadToTab","filename","interceptCallback","downloadFunc","buildLink","mime","triggerDownload","downloaders","downloadConfig","downloadRowRange","groupHeader","groupHeaderDownload","_group","getRowCount","newTab","Blob","downloadReady","URL","createObjectURL","msSaveOrOpenBlob","click","defaultDownloaders","maskInput","mask","maskLetter","maskLetterChar","maskNumber","maskNumberChar","maskWildcard","maskWildcardChar","fillSymbols","symbol","char","keyCode","maskAutoFill","onRendered","success","cancel","editorParams","cellValue","input","search","padding","boxSizing","elementAttributes","getAttribute","preventScroll","onChange","vertNav","verticalNavigation","count","whiteSpace","getRow","heightNow","selectionStart","stopImmediatePropagation","step","blurFunc","cellEl","initialDisplayValue","defaultValue","listEl","multiselect","dataItems","currentItem","displayItems","currentItems","blurable","blockListShow","searchWord","searchWordTimeout","getUniqueColumnValues","getColumnByField","getColumn","parseItems","inputValues","curentValues","dataList","displayList","processComplexListItem","label","itemParams","setItem","sortValuesList","fillList","listItemFormatter","toggleItem","chooseItem","setCurrentItem","scrollIntoView","behavior","block","inline","fillInput","unsetItem","hideList","chooseItems","unsetItems","len","cancelItem","showList","removeScrollListener","scrollTovalue","character","fromCharCode","cursor","readOnly","uniqueColumnValues","genUniqueColumnValues","filterList","term","intialLoad","items","searchFunc","addNotice","searchingPlaceholder","fillListIfNotEmpty","err","showListOnEmpty","notice","searchEl","clearList","itemList","emptyPlaceholder","current","freetext","allowEmpty","showInputValue","maxStars","getElementsByTagName","size","stars","starsHolder","star","createElementNS","starChange","buildStar","starHolder","nextStar","blur","changeValue","overflow","textOverflow","percent","bar","mouseDrag","mouseDragWidth","updateValue","calcVal","round","backgroundColor","screenX","tristate","indetermValue","indeterminateValue","indetermState","marginTop","indeterminate","checked","textarea","number","autocomplete","progress","tickCross","Edit","mouseClick","recursionBlock","invalidEdit","editedCells","editors","getEditedCells","clearCellEdited","navigatePrev","navigateNext","navigateLeft","navigateRight","navigateUp","navigateDown","cellisEdited","clearEdited","editCell","cellCancelEdit","bindEditor","columnDeleteCheck","rowDeleteCheck","cancelEdit","keybindingNavigateNext","newRow","edited","nextCell","findNextEditableCell","getIndex","findPrevEditableCell","allowEdit","check","prevCell","editor","editable","validate","cellValidate","clearEditor","variableHeight","cellEditCancelled","contains","button","forceEdit","focusCellNoEvent","getRenderMode","leftEdge","rightEdge","leftMargin","rightMargin","rendered","cellEditor","validationMode","focusScrollAdjust","cellClick","cellEditing","editIndex","invalid","defaultEditors","ExportRow","ExportColumn","Export","cloneTableStyle","colVisProp","getHtml","columnHeaders","headersToExportRows","generateColumnGroupHeaders","bodyToExportRows","rowLookup","genereateTableElement","selectRow","selectedRows","columnGroups","colData","processColumnGroup","maxDepth","groupData","subGroup","subGroupData","columnVisCheck","headerDepth","exportRows","parseColumnGroup","rowGroups","exportCols","headerEl","bodyEl","lookupTableStyles","setup","treeElementField","mapElementStyles","genereateHeaderElement","genereateGroupElement","genereateCalcElement","genereateRowElement","evenRow","oddRow","calcRow","firstRow","firstGroup","getElementsByClassName","styleCells","firstCell","lastCell","generator","isVisible","cellWrapper","formatCells","formatExportValue","align","renderedCallback","htmlOutputConfig","props","lookup","fromStyle","filterVal","rowVal","filterParams","RegExp","keywords","separator","keyword","matchAll","endsWith","Filter","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","registerDataHandler","initialFilter","setFilter","initialHeaderFilter","refreshFilter","addFilter","removeFilter","all","clearFilter","clearHeaderFilter","headerFilter","setHeaderFilterColumnPlaceholder","filterType","tagType","attrType","filterChangeCheck","filterFunc","prevSuccess","emptyFunc","headerFilterFunc","filters","headerFilterFuncParams","fieldVal","colVal","trackChanges","generateHeaderFilterElement","filterElement","editorElement","typingTimer","searchTrigger","headerElement","headerFilterEmptyCheck","headerFilterParams","headerPos","headerFilterLiveFilterDelay","hasAttribute","headerFilterLiveFilter","reloadData","findFilter","findSubFilters","ajax","filtersToArray","searchType","filterRecurse","rowList","activeRowComponents","filterRow","subFilter","defaultFilters","formatterParams","emptyToSpace","sanitizeHTML","floatVal","sign","integer","decimal","rgx","decimalSym","thousandSym","thousand","negativeSign","symbolAfter","urlPrefix","labelField","urlField","src","urlSuffix","truthy","allowTruthy","tick","tickElement","cross","crossElement","DT","DateTime","luxon","inputFormat","outputFormat","invalidPlaceholder","newDatetime","fromISO","fromFormat","isValid","timezone","setZone","toFormat","suffix","humanize","date","now","starActive","starInactive","colors","color","percentValue","legendAlign","legend","legendColor","barEl","barContainer","legendEl","holderEl","toggleList","isOpen","checkbox","selectableRangeMode","toggleSelect","handleComplexRowClick","isSelected","registerRowSelectCheckbox","deselectRow","registerHeaderSelectCheckbox","plaintext","money","image","datetime","datetimediff","traffic","buttonTick","buttonCross","rownum","responsiveCollapse","rowSelection","Format","formatValue","formatHeader","lookupFormatter","formatterPrint","print","formatterClipboard","formatterHtmlOutput","htmlOutput","formatters","mockCell","titleFormatter","titleFormatterParams","entityMap","defaultFormatters","FrozenColumns","leftColumns","rightColumns","rightPadding","initializationMode","scrollEndTimer","layoutCell","blockLayout","unblockLayout","edge","frozenCheck","calcMargins","layoutColumnPosition","layoutCalcRows","_calcSpace","layoutGroupCalcs","groupList","allCells","leftParents","parentEl","getColGroupParentElement","getTableElement","FrozenRows","freezeRow","unfreezeRow","isRowFrozen","detachRow","styleRows","GroupComponent","groupManager","toggleVisibility","Group","oldGroup","hasSubGroups","groupIDLookups","_addRowToGroup","_addRow","elementContents","arrowElement","createElements","addBindings","createValueGroups","arrow","movableRows","moveRow","initializeGroupHeader","allowedValues","_createGroup","toggleElement","groupToggleElement","groupID","groupKey","headerGenerator","conformRowData","generateGroupHeaderContents","updateGroupRows","scrollHeader","groupValues","removeGroup","noCalc","_visSet","getHeadersAndRows","hasTopCalcs","detachElement","generateTopRow","hasBottomCalcs","generateBottomRow","groupClosedShowCalcs","getDisplayIndex","checkClassicModeGroupHeaderWidth","prev","compoment","getPath","childNodes","GroupRows","displayHandler","setGroupBy","setGroupValues","setGroupStartOpen","setGroupHeader","userGetGroups","userGetGroupedData","rowGetGroup","groupUpdateOnCellEdit","cellUpdated","reassignRowToGroup","configureGroupSetup","rowDeleting","scrollHeaders","rowMoving","rowAddingIndex","rowSample","virtualRenderFill","groupStartOpen","langValue","removeCalcs","getRealColumns","lookupFunc","prevValue","assignRowToGroup","getGroupedData","toGroup","fromGroup","removeRow","insertRow","generateGroups","groupComponents","groupListData","rowCount","headerContent","pullGroupListData","oldGroups","createGroup","assignRowToExistingGroup","newGroupNeeded","oldRowGroup","oldGroupPath","newGroupPath","getExpectedPath","samePath","every","groupPath","groupId","cellEdit","rowAdd","_rebindRow","rowMove","posFrom","newValue","posTo","History","history","clearComponentHistory","rowDeleted","rowAdded","rowMoved","undo","redo","getHistoryUndoSize","getHistoryRedoSize","getGroup","undoers","redoers","oldRow","defaultUndoers","defaultRedoers","HtmlTableImport","fieldIndex","hasIndex","tableElementCheck","parseTable","_extractOptions","_extractHeaders","_generateBlankHeaders","optionsArr","attrib","_attribValue","exists","_findCol","textContent","csvImporter","inQuote","nextChar","Import","importFromFile","importFormat","loadDataCheck","loadData","importData","lookupImporter","structureData","importer","importers","extension","pickFile","extensions","accept","file","files","reader","FileReader","importReader","readAsArrayBuffer","readAsBinaryString","readAsDataURL","readAsText","onload","onerror","parsedData","structureArrayToObject","structureArrayToColumns","getColumns","defaultImporters","Interaction","eventMap","rowClick","rowDblClick","rowContext","rowMouseEnter","rowMouseLeave","rowMouseOver","rowMouseOut","rowMouseMove","rowTap","rowDblTap","rowTapHold","cellDblClick","cellContext","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellTap","cellDblTap","cellTapHold","headerMouseEnter","headerMouseLeave","headerMouseOver","headerMouseOut","headerMouseMove","groupClick","groupDblClick","groupContext","groupMouseEnter","groupMouseLeave","groupMouseOver","groupMouseOut","groupMouseMove","groupTap","groupDblTap","groupTapHold","subscribers","touchSubscribers","columnSubscribers","touchWatchers","tapDbl","initializeExternalEvents","cellContentsSelectionFixer","selectNode","subscriptionChangeExternal","subscribeTouchEvents","unsubscribeTouchEvents","handleTouch","notouch","watchers","componentObj","navPrev","navNext","navUp","navDown","scrollPageUp","scrollPageDown","scrollToStart","scrollToEnd","copyToClipboard","keyBlock","newPos","scrollMax","navLeft","navRight","Keybindings","watchKeys","pressedKeys","keyupBinding","keydownBinding","keybindings","mergedBindings","mapBindings","bindEvents","clearBindings","actions","bindingList","mapBinding","symbolsList","ctrl","meta","symbols","code","checkBinding","ctrlKey","shiftKey","metaKey","defaultBindings","defaultActions","Menu","menuContainer","menuElements","blurEvent","hideMenu","escEvent","escMenu","nestedMenuBlock","positionReversedX","currentComponent","lookupMenuContainer","initializeRowWatchers","initializeGroupWatchers","checkMenuContainerIsParent","container","rowContextMenu","loadMenuEvent","on","rowClickMenu","groupContextMenu","groupClickMenu","headerContextMenu","loadMenuTableColumnEvent","headerClickMenu","headerMenu","initializeColumnHeaderMenu","contextMenu","loadMenuTableCellEvent","clickMenu","headerMenuEl","menu","loadMenu","touch","MouseEvent","menuEl","itemEl","disabled","hideOldSubMenus","positionMenu","pop","x","y","parentOffset","touches","pageX","pageY","MoveColumns","placeholderElement","createPlaceholderElement","hoverElement","checkTimeout","checkPeriod","moving","toCol","toColAfter","startX","autoScrollMargin","autoScrollStep","autoScrollTimeout","touchMove","moveHover","endMove","movableColumns","mousemove","which","startMove","bindTouchEvents","startXMove","prevColWidth","nextColWidthLast","prevColWidthLast","moveToCol","_bindMouseMove","movingCells","_unbindMouseMove","columnHolder","xPos","scrollPos","MoveRows","toRowAfter","hasHandle","startY","tableRowDropEvent","connectionSelectorsTables","connectionSelectorsElements","connectionElements","connectedTable","connectedRow","movableRowsConnectedTables","movableRowsConnectedElements","initializeCell","mouseup","tableRowDrop","previousSibling","rowHandle","startYMove","nextRowHeight","prevRowHeight","nextRowHeightLast","prevRowHeightLast","setStartPosition","connectToTables","pointerEvents","disconnectFromTables","moveHoverConnections","moveHoverTable","rowHolder","yPos","connectionTables","commsConnections","dropEvent","elementRowDrop","tabulatorElementDropEvent","sender","movableRowsSender","senders","movableRowsReceiver","receivers","connect","disconnect","dropComplete","fromTable","toTable","Mutator","enabled","transformCell","lookupMutator","mutators","mutatorEdit","defaultMutators","pageSize","currentRow","currentPage","totalRows","totalPages","showingEl","valueEl","ofEl","totalEl","rowsEl","pages","Page","progressiveLoad","pageCounterElement","pageCounter","page","remoteRowCountEstimate","initialLoad","dataChanging","pageSizes","setMaxPage","setPage","userSetPageToRow","userSetPageSize","getPageSize","previousPage","nextPage","getPage","getPageMax","setPageToRow","initialLoadComplete","calculatePageSizes","paginationAddRow","rowAddingPosition","paginationMode","remotePageParams","_parseRemoteData","restOnRenderBefore","initializePageCounter","initializePaginator","initializeProgressive","scrollVertical","dispRows","testElRow","testElCell","paginationSize","generatePageSizeSelectList","setPageSize","progressiveLoadScrollMargin","pagesElement","firstBut","prevBut","nextBut","lastBut","paginationSizeSelector","pageSizeSelect","counter","paginationCounter","pageCounters","hidden","pageSelectLabel","paginationCounterHolder","paginationElement","paginationCounterElement","paginationInitialPage","paginationButtonCount","trigger","leftSize","rightSize","_generatePageButton","actualRowPageSize","actualStartRow","actualRows","setMaxRows","_setPageButtons","_setPageCounter","last_page","last_row","progressiveLoadDelay","footer","defaultPageCounters","local","id","localStorage","getItem","cookie","cookiePos","expireDate","setDate","getDate","toUTCString","Persistence","defWatcherBlock","readFunc","writeFunc","testKey","removeItem","persistence","persistenceMode","persistenceID","retreivedData","localStorageTest","persistenceReaderFunc","readers","persistenceWriterFunc","writers","retreiveData","save","eventSave","getColumnLayout","setColumnLayout","sorters","initialSort","parseColumns","mergeDefinition","getOwnPropertyDescriptor","defineProperty","set","oldCols","newCols","_findColumn","validateSorters","getSort","getGroupConfig","getPageConfig","excludedKeys","defStore","colDef","defaultReaders","defaultWriters","Print","manualBlock","printAsHtml","replaceTable","cleanup","printFullscreen","genereateTable","printConfig","printStyled","printRowRange","scrollX","scrollY","footerEl","tableEl","footerContent","printHeader","printFooter","printFormatter","scrollTo","ReactiveData","origFuncs","currentVersion","unblock","watchRow","watchData","unwatchData","version","enumerable","configurable","arg","getRowFromDataObject","startRow","oldRows","writable","watchKey","watchTreeChildren","childField","rebuildTree","ResizeColumns","startColumn","startWidth","prevHandle","layoutCellHandles","layoutColumnHeader","resizable","handleDown","nearestColumn","_checkResizability","_mouseDown","oldWidth","prevHandleDown","colIndex","mouseMove","checkCellHeights","mouseUp","ResizeRows","startHeight","screenY","ResizeTable","observer","containerObserver","tableHeight","containerWidth","autoResize","tableStyle","ResizeObserver","entry","nodeHeight","contentRect","nodeWidth","observe","tableResized","unobserve","ResponsiveLayout","hiddenColumns","collapseFormatter","collapseStartOpen","collapseHandleColumn","updateColumnVisibility","initializeResponsivity","responsiveLayoutCollapseFormatter","formatCollapsedData","responsiveLayoutCollapseStartOpen","order","generateCollapsedContent","generateCollapsedRowContent","colCount","working","getFlexBaseWidth","hideColumn","showColumn","generateCollapsedRowData","mockCellComponent","responsiveLayoutCollapseUseFormatters","titleData","valueData","node_content","titleHighlight","SelectRow","selecting","lastClickedRow","selectPrev","headerCheckboxElement","selectRows","deselectRows","getSelectedRows","getSelectedData","isRowSelected","selectable","clearSelectionData","rowRetrieve","selectablePersistence","_deselectRow","_rowSelectionChanged","endSelect","selected","selectableCheck","getCurrentCell","_clearSelection","lastClickedRowIdx","rowIdx","fromRowIdx","toRowIdx","toggledRows","toggledRow","_selectRow","rowMatch","rowInfo","selectableRollingSelection","checkboxEl","dataTreeSelectPropagate","childRowSelection","selectedRow","aRow","bRow","alignEmptyValues","decimalSeparator","thousandSeparator","emptyAlign","langLocale","localeCompare","el1","el2","calc","d","as","bs","a1","b1","L","rx","rd","isFinite","string","time","boolean","array","alphanum","Sort","sortList","userSetSort","clearSort","sortMode","remoteSortParams","setSort","refreshSort","arrowEl","sorterParams","startingDir","headerSortStartingDir","headerSortTristate","headerSort","headerSortElement","columnHeaderSortMulti","newSortList","sortOrderReverse","sortListActual","rowComponents","clearColumnHeaders","sortObj","findSorter","setColumnHeader","_sortItems","sorterCount","sortItem","_sortRow","el1Comp","el2Comp","defaultSorters","parameters","numeric","starts","ends","minLength","maxLength","regex","reg","unique","cellData","Validate","invalidCells","getInvalidCells","userClearCellValidation","userValidate","cellIsValid","clearValidation","columnValidate","rowValidate","validator","_extractValidator","substring","_buildValidator","validators","invalidIndex","defaultValidators","TabulatorFull"],"mappings":";;;;;;;;;;;;;;;;;;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kB/yE,IAAlB,CAAuBD,IAAvB;EACA;EACD;;EAED,aAAOk8B,KAAP;EACA;;;wCAEgB;EAChB,UAAI37B,MAAM,GAAG,EAAb;EAEA,WAAKyyE,YAAL,CAAkBjzE,OAAlB,CAA0B,UAACC,IAAD,EAAU;EACnCO,QAAAA,MAAM,CAACN,IAAP,CAAYD,IAAI,CAACE,YAAL,EAAZ;EACA,OAFD;EAIA,aAAOK,MAAP;EACA;;;sCAEeP,MAAK;EACpB,UAAI6zE,YAAJ;;EAEA,UAAG7zE,IAAI,CAACzC,OAAL,CAAak3C,QAAb,IAAyBz0C,IAAI,CAACzC,OAAL,CAAak3C,QAAb,CAAsBqB,OAAlD,EAA0D;EAEzD91C,QAAAA,IAAI,CAACN,UAAL,GAAkBoF,SAAlB,CAA4ByM,MAA5B,CAAmC,2BAAnC;EACAvR,QAAAA,IAAI,CAACzC,OAAL,CAAak3C,QAAb,CAAsBqB,OAAtB,GAAgC,KAAhC;EAEA+9B,QAAAA,YAAY,GAAG,KAAKb,YAAL,CAAkBlqE,OAAlB,CAA0B9I,IAA1B,CAAf;;EAEA,YAAG6zE,YAAY,GAAG,CAAC,CAAnB,EAAqB;EACpB,eAAKb,YAAL,CAAkBpmE,MAAlB,CAAyBinE,YAAzB,EAAuC,CAAvC;EACA;EACD;EACD;;;;IAnQqBnoD;;EAsQvBqnD,QAAQ,CAACtkD,UAAT,GAAsB,UAAtB;;EAGAskD,QAAQ,CAACa,UAAT,GAAsBE,iBAAtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MCxQMC;;;;;;;;;;;;IAAsBvoD;;EAG5B,IAAIwF,YAAJ,CAAiB+iD,aAAjB,EAAgCx2E,OAAhC;;;;"} \ No newline at end of file diff --git a/dist/js/tabulator.min.js b/dist/js/tabulator.min.js index b7d18613b..f96950780 100644 --- a/dist/js/tabulator.min.js +++ b/dist/js/tabulator.min.js @@ -1,3 +1,3 @@ -/* Tabulator v5.1.7 (c) Oliver Folkerd 2022 */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Tabulator=t()}(this,(function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var i=0;ie.length)&&(t=e.length);for(var i=0,n=new Array(t);i=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,s=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return r=e.done,e},e:function(e){s=!0,a=e},f:function(){try{r||null==i.return||i.return()}finally{if(s)throw a}}}}var f=function(){function e(i){t(this,e),this.table=i}return o(e,[{key:"reloadData",value:function(e,t){return this.table.dataLoader.load(e,void 0,void 0,void 0,t)}},{key:"langText",value:function(){var e;return(e=this.table.modules.localize).getText.apply(e,arguments)}},{key:"langBind",value:function(){var e;return(e=this.table.modules.localize).bind.apply(e,arguments)}},{key:"langLocale",value:function(){var e;return(e=this.table.modules.localize).getLocale.apply(e,arguments)}},{key:"commsConnections",value:function(){var e;return(e=this.table.modules.comms).getConnections.apply(e,arguments)}},{key:"commsSend",value:function(){var e;return(e=this.table.modules.comms).send.apply(e,arguments)}},{key:"layoutMode",value:function(){return this.table.modules.layout.getMode()}},{key:"layoutRefresh",value:function(){return this.table.modules.layout.layout()}},{key:"subscribe",value:function(){var e;return(e=this.table.eventBus).subscribe.apply(e,arguments)}},{key:"unsubscribe",value:function(){var e;return(e=this.table.eventBus).unsubscribe.apply(e,arguments)}},{key:"subscribed",value:function(e){return this.table.eventBus.subscribed(e)}},{key:"subscriptionChange",value:function(){var e;return(e=this.table.eventBus).subscriptionChange.apply(e,arguments)}},{key:"dispatch",value:function(){var e;return(e=this.table.eventBus).dispatch.apply(e,arguments)}},{key:"chain",value:function(){var e;return(e=this.table.eventBus).chain.apply(e,arguments)}},{key:"confirm",value:function(){var e;return(e=this.table.eventBus).confirm.apply(e,arguments)}},{key:"dispatchExternal",value:function(){var e;return(e=this.table.externalEvents).dispatch.apply(e,arguments)}},{key:"subscribedExternal",value:function(e){return this.table.externalEvents.subscribed(e)}},{key:"subscriptionChangeExternal",value:function(){var e;return(e=this.table.externalEvents).subscriptionChange.apply(e,arguments)}},{key:"options",value:function(e){return this.table.options[e]}},{key:"setOption",value:function(e,t){return void 0!==t&&(this.table.options[e]=t),this.table.options[e]}},{key:"module",value:function(e){return this.table.module(e)}}]),e}(),g=function(){function e(i){return t(this,e),this._column=i,this.type="ColumnComponent",new Proxy(this,{get:function(e,t,i){return void 0!==e[t]?e[t]:e._column.table.componentFunctionBinder.handle("column",e._column,t)}})}return o(e,[{key:"getElement",value:function(){return this._column.getElement()}},{key:"getDefinition",value:function(){return this._column.getDefinition()}},{key:"getField",value:function(){return this._column.getField()}},{key:"getTitleDownload",value:function(){return this._column.getTitleDownload()}},{key:"getCells",value:function(){var e=[];return this._column.cells.forEach((function(t){e.push(t.getComponent())})),e}},{key:"isVisible",value:function(){return this._column.visible}},{key:"show",value:function(){this._column.isGroup?this._column.columns.forEach((function(e){e.show()})):this._column.show()}},{key:"hide",value:function(){this._column.isGroup?this._column.columns.forEach((function(e){e.hide()})):this._column.hide()}},{key:"toggle",value:function(){this._column.visible?this.hide():this.show()}},{key:"delete",value:function(){return this._column.delete()}},{key:"getSubColumns",value:function(){var e=[];return this._column.columns.length&&this._column.columns.forEach((function(t){e.push(t.getComponent())})),e}},{key:"getParentColumn",value:function(){return this._column.parent instanceof w&&this._column.parent.getComponent()}},{key:"_getSelf",value:function(){return this._column}},{key:"scrollTo",value:function(){return this._column.table.columnManager.scrollToColumn(this._column)}},{key:"getTable",value:function(){return this._column.table}},{key:"move",value:function(e,t){var i=this._column.table.columnManager.findColumn(e);i?this._column.table.columnManager.moveColumn(this._column,i,t):console.warn("Move Error - No matching column found:",i)}},{key:"getNextColumn",value:function(){var e=this._column.nextColumn();return!!e&&e.getComponent()}},{key:"getPrevColumn",value:function(){var e=this._column.prevColumn();return!!e&&e.getComponent()}},{key:"updateDefinition",value:function(e){return this._column.updateDefinition(e)}},{key:"getWidth",value:function(){return this._column.getWidth()}},{key:"setWidth",value:function(e){var t;return t=!0===e?this._column.reinitializeWidth(!0):this._column.setWidth(e),this._column.table.columnManager.renderer.rerenderColumns(!0),t}}]),e}(),v={title:void 0,field:void 0,columns:void 0,visible:void 0,hozAlign:void 0,vertAlign:void 0,width:void 0,minWidth:40,maxWidth:void 0,maxInitialWidth:void 0,tooltip:void 0,cssClass:void 0,variableHeight:void 0,headerTooltip:void 0,headerVertical:void 0,headerHozAlign:void 0,editableTitle:void 0},b=function(){function e(i){return t(this,e),this._cell=i,new Proxy(this,{get:function(e,t,i){return void 0!==e[t]?e[t]:e._cell.table.componentFunctionBinder.handle("cell",e._cell,t)}})}return o(e,[{key:"getValue",value:function(){return this._cell.getValue()}},{key:"getOldValue",value:function(){return this._cell.getOldValue()}},{key:"getInitialValue",value:function(){return this._cell.initialValue}},{key:"getElement",value:function(){return this._cell.getElement()}},{key:"getRow",value:function(){return this._cell.row.getComponent()}},{key:"getData",value:function(){return this._cell.row.getData()}},{key:"getField",value:function(){return this._cell.column.getField()}},{key:"getColumn",value:function(){return this._cell.column.getComponent()}},{key:"setValue",value:function(e,t){void 0===t&&(t=!0),this._cell.setValue(e,t)}},{key:"restoreOldValue",value:function(){this._cell.setValueActual(this._cell.getOldValue())}},{key:"restoreInitialValue",value:function(){this._cell.setValueActual(this._cell.initialValue)}},{key:"checkHeight",value:function(){this._cell.checkHeight()}},{key:"getTable",value:function(){return this._cell.table}},{key:"_getSelf",value:function(){return this._cell}}]),e}(),y=function(i){a(r,i);var n=c(r);function r(e,i){var o;return t(this,r),(o=n.call(this,e.table)).table=e.table,o.column=e,o.row=i,o.element=null,o.value=null,o.initialValue,o.oldValue=null,o.modules={},o.height=null,o.width=null,o.minWidth=null,o.component=null,o.loaded=!1,o.build(),o}return o(r,[{key:"build",value:function(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data)),this.initialValue=this.value}},{key:"generateElement",value:function(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell"),this.element=this.element}},{key:"_configureCell",value:function(){var e=this,t=this.element,i=this.column.getField();(t.style.textAlign=this.column.hozAlign,this.column.vertAlign&&(t.style.display="inline-flex",t.style.alignItems={top:"flex-start",bottom:"flex-end",middle:"center"}[this.column.vertAlign]||"",this.column.hozAlign&&(t.style.justifyContent={left:"flex-start",right:"flex-end",center:"center"}[this.column.hozAlign]||"")),i&&t.setAttribute("tabulator-field",i),this.column.definition.cssClass)&&this.column.definition.cssClass.split(" ").forEach((function(e){t.classList.add(e)}));"hover"===this.table.options.tooltipGenerationMode&&t.addEventListener("mouseenter",(function(t){e._generateTooltip()})),this.dispatch("cell-init",this),this.column.visible||this.hide()}},{key:"_generateContents",value:function(){var t,i=this;switch(e(t=this.chain("cell-format",this,null,(function(){return i.element.innerHTML=i.value})))){case"object":if(t instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(t)}else this.element.innerHTML="",null!=t&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",t);break;case"undefined":case"null":this.element.innerHTML="";break;default:this.element.innerHTML=t}}},{key:"cellRendered",value:function(){this.dispatch("cell-rendered",this)}},{key:"_generateTooltip",value:function(){var e=this.column.tooltip;e?(!0===e?e=this.value:"function"==typeof e&&!1===(e=e(this.getComponent()))&&(e=""),void 0===e&&(e=""),this.element.setAttribute("title",e)):this.element.setAttribute("title","")}},{key:"getElement",value:function(e){return this.loaded||(this.loaded=!0,e||this.layoutElement()),this.element}},{key:"getValue",value:function(){return this.value}},{key:"getOldValue",value:function(){return this.oldValue}},{key:"setValue",value:function(e,t){this.setValueProcessData(e,t)&&(this.dispatch("cell-value-updated",this),this.cellRendered(),this.column.definition.cellEdited&&this.column.definition.cellEdited.call(this.table,this.getComponent()),this.dispatchExternal("cellEdited",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()))}},{key:"setValueProcessData",value:function(e,t){var i=!1;return this.value!==e&&(i=!0,t&&(e=this.chain("cell-value-changing",[this,e],null,e))),this.setValueActual(e),i&&this.dispatch("cell-value-changed",this),i}},{key:"setValueActual",value:function(e){this.oldValue=this.value,this.value=e,this.dispatch("cell-value-save-before",this),this.column.setFieldValue(this.row.data,e),this.dispatch("cell-value-save-after",this),this.loaded&&this.layoutElement()}},{key:"layoutElement",value:function(){this._generateContents(),this._generateTooltip(),this.dispatch("cell-layout",this)}},{key:"setWidth",value:function(){this.width=this.column.width,this.element.style.width=this.column.widthStyled}},{key:"clearWidth",value:function(){this.width="",this.element.style.width=""}},{key:"getWidth",value:function(){return this.width||this.element.offsetWidth}},{key:"setMinWidth",value:function(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled}},{key:"setMaxWidth",value:function(){this.maxWidth=this.column.maxWidth,this.element.style.maxWidth=this.column.maxWidthStyled}},{key:"checkHeight",value:function(){this.row.reinitializeHeight()}},{key:"clearHeight",value:function(){this.element.style.height="",this.height=null}},{key:"setHeight",value:function(){this.height=this.row.height,this.element.style.height=this.row.heightStyled}},{key:"getHeight",value:function(){return this.height||this.element.offsetHeight}},{key:"show",value:function(){this.element.style.display=this.column.vertAlign?"inline-flex":""}},{key:"hide",value:function(){this.element.style.display="none"}},{key:"delete",value:function(){this.dispatch("cell-delete",this),!this.table.rowManager.redrawBlock&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.column.deleteCell(this),this.row.deleteCell(this),this.calcs={}}},{key:"getIndex",value:function(){return this.row.getCellIndex(this)}},{key:"getComponent",value:function(){return this.component||(this.component=new b(this)),this.component}}]),r}(f),w=function(i){a(r,i);var n=c(r);function r(e,i){var o;return t(this,r),(o=n.call(this,i.table)).definition=e,o.parent=i,o.type="column",o.columns=[],o.cells=[],o.element=o.createElement(),o.contentElement=!1,o.titleHolderElement=!1,o.titleElement=!1,o.groupElement=o.createGroupElement(),o.isGroup=!1,o.tooltip=!1,o.hozAlign="",o.vertAlign="",o.field="",o.fieldStructure="",o.getFieldValue="",o.setFieldValue="",o.titleDownload=null,o.titleFormatterRendered=!1,o.mapDefinitions(),o.setField(o.definition.field),o.modules={},o.width=null,o.widthStyled="",o.maxWidth=null,o.maxWidthStyled="",o.maxInitialWidth=null,o.minWidth=null,o.minWidthStyled="",o.widthFixed=!1,o.visible=!0,o.component=null,o.definition.columns?(o.isGroup=!0,o.definition.columns.forEach((function(e,t){var i=new r(e,l(o));o.attachColumn(i)})),o.checkColumnVisibility()):i.registerColumnField(l(o)),o._initialize(),o.bindModuleColumns(),o}return o(r,[{key:"createElement",value:function(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),e}},{key:"createGroupElement",value:function(){var e=document.createElement("div");return e.classList.add("tabulator-col-group-cols"),e}},{key:"mapDefinitions",value:function(){var e=this.table.options.columnDefaults;if(e)for(var t in e)void 0===this.definition[t]&&(this.definition[t]=e[t]);this.definition=this.table.columnManager.optionsList.generate(r.defaultOptionList,this.definition)}},{key:"checkDefinition",value:function(){var e=this;Object.keys(this.definition).forEach((function(t){-1===r.defaultOptionList.indexOf(t)&&console.warn("Invalid column definition option in '"+(e.field||e.definition.title)+"' column:",t)}))}},{key:"setField",value:function(e){this.field=e,this.fieldStructure=e?this.table.options.nestedFieldSeparator?e.split(this.table.options.nestedFieldSeparator):[e]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData}},{key:"registerColumnPosition",value:function(e){this.parent.registerColumnPosition(e)}},{key:"registerColumnField",value:function(e){this.parent.registerColumnField(e)}},{key:"reRegisterPosition",value:function(){this.isGroup?this.columns.forEach((function(e){e.reRegisterPosition()})):this.registerColumnPosition(this)}},{key:"_mapDepricatedFunctionality",value:function(){}},{key:"setTooltip",value:function(){var e=this,t=this.definition,i=t.headerTooltip;i?!0===i?t.field?this.langBind("columns|"+t.field,(function(i){e.element.setAttribute("title",i||t.title)})):this.element.setAttribute("title",t.title):("function"==typeof i&&!1===(i=i(this.getComponent()))&&(i=""),this.element.setAttribute("title",i)):this.element.setAttribute("title","")}},{key:"_initialize",value:function(){for(var e=this,t=this.definition;this.element.firstChild;)this.element.removeChild(this.element.firstChild);t.headerVertical&&(this.element.classList.add("tabulator-col-vertical"),"flip"===t.headerVertical&&this.element.classList.add("tabulator-col-vertical-flip")),this.contentElement=this._bindEvents(),this.contentElement=this._buildColumnHeaderContent(),this.element.appendChild(this.contentElement),this.isGroup?this._buildGroupHeader():this._buildColumnHeader(),this.setTooltip(),this.dispatch("column-init",this),this.element.addEventListener("mouseenter",(function(t){e.setTooltip()}))}},{key:"_bindEvents",value:function(){var e,t,i,n=this,o=this.definition;"function"==typeof o.headerClick&&this.element.addEventListener("click",(function(e){o.headerClick(e,n.getComponent())})),"function"==typeof o.headerDblClick&&this.element.addEventListener("dblclick",(function(e){o.headerDblClick(e,n.getComponent())})),"function"==typeof o.headerContext&&this.element.addEventListener("contextmenu",(function(e){o.headerContext(e,n.getComponent())})),"function"==typeof o.headerTap&&(i=!1,this.element.addEventListener("touchstart",(function(e){i=!0}),{passive:!0}),this.element.addEventListener("touchend",(function(e){i&&o.headerTap(e,n.getComponent()),i=!1}))),"function"==typeof o.headerDblTap&&(e=null,this.element.addEventListener("touchend",(function(t){e?(clearTimeout(e),e=null,o.headerDblTap(t,n.getComponent())):e=setTimeout((function(){clearTimeout(e),e=null}),300)}))),"function"==typeof o.headerTapHold&&(t=null,this.element.addEventListener("touchstart",(function(e){clearTimeout(t),t=setTimeout((function(){clearTimeout(t),t=null,i=!1,o.headerTapHold(e,this.getComponent())}),1e3)}),{passive:!0}),this.element.addEventListener("touchend",(function(e){clearTimeout(t),t=null})))}},{key:"_buildColumnHeader",value:function(){var e=this,t=this.definition;this.table;(this.dispatch("column-layout",this),void 0!==t.visible&&(t.visible?this.show(!0):this.hide(!0)),t.cssClass)&&t.cssClass.split(" ").forEach((function(t){e.element.classList.add(t)}));t.field&&this.element.setAttribute("tabulator-field",t.field),this.setMinWidth(parseInt(t.minWidth)),t.maxInitialWidth&&(this.maxInitialWidth=parseInt(t.maxInitialWidth)),t.maxWidth&&this.setMaxWidth(parseInt(t.maxWidth)),this.reinitializeWidth(),this.tooltip=this.definition.tooltip,this.hozAlign=this.definition.hozAlign,this.vertAlign=this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign}},{key:"_buildColumnHeaderContent",value:function(){this.definition,this.table;var e=document.createElement("div");return e.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),e.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),e}},{key:"_buildColumnHeaderTitle",value:function(){var e=this,t=this.definition,i=document.createElement("div");if(i.classList.add("tabulator-col-title"),t.editableTitle){var n=document.createElement("input");n.classList.add("tabulator-title-editor"),n.addEventListener("click",(function(e){e.stopPropagation(),n.focus()})),n.addEventListener("change",(function(){t.title=n.value,e.dispatchExternal("columnTitleChanged",e.getComponent())})),i.appendChild(n),t.field?this.langBind("columns|"+t.field,(function(e){n.value=e||t.title||" "})):n.value=t.title||" "}else t.field?this.langBind("columns|"+t.field,(function(n){e._formatColumnHeaderTitle(i,n||t.title||" ")})):this._formatColumnHeaderTitle(i,t.title||" ");return i}},{key:"_formatColumnHeaderTitle",value:function(t,i){var n=this.chain("column-format",[this,i,t],null,(function(){return i}));switch(e(n)){case"object":n instanceof Node?t.appendChild(n):(t.innerHTML="",console.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:",n));break;case"undefined":case"null":t.innerHTML="";break;default:t.innerHTML=n}}},{key:"_buildGroupHeader",value:function(){var e=this;(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass)&&this.definition.cssClass.split(" ").forEach((function(t){e.element.classList.add(t)}));this.titleElement.style.textAlign=this.definition.headerHozAlign,this.element.appendChild(this.groupElement)}},{key:"_getFlatData",value:function(e){return e[this.field]}},{key:"_getNestedData",value:function(e){for(var t,i=e,n=this.fieldStructure,o=n.length,a=0;a-1&&this.columns.splice(t,1),this.columns.length||this.delete()}},{key:"setWidth",value:function(e){this.widthFixed=!0,this.setWidthActual(e)}},{key:"setWidthActual",value:function(e){isNaN(e)&&(e=Math.floor(this.table.element.clientWidth/100*parseInt(e))),e=Math.max(this.minWidth,e),this.maxWidth&&(e=Math.min(this.maxWidth,e)),this.width=e,this.widthStyled=e?e+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach((function(e){e.setWidth()})),this.parent.isGroup&&this.parent.matchChildWidths(),this.dispatch("column-width",this)}},{key:"checkCellHeights",value:function(){var e=[];this.cells.forEach((function(t){t.row.heightInitialized&&(null!==t.row.getElement().offsetParent?(e.push(t.row),t.row.clearCellHeight()):t.row.heightInitialized=!1)})),e.forEach((function(e){e.calcHeight()})),e.forEach((function(e){e.setCellHeight()}))}},{key:"getWidth",value:function(){var e=0;return this.isGroup?this.columns.forEach((function(t){t.visible&&(e+=t.getWidth())})):e=this.width,e}},{key:"getHeight",value:function(){return Math.ceil(this.element.getBoundingClientRect().height)}},{key:"setMinWidth",value:function(e){this.minWidth=e,this.minWidthStyled=e?e+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach((function(e){e.setMinWidth()}))}},{key:"setMaxWidth",value:function(e){this.maxWidth=e,this.maxWidthStyled=e?e+"px":"",this.element.style.maxWidth=this.maxWidthStyled,this.cells.forEach((function(e){e.setMaxWidth()}))}},{key:"delete",value:function(){var e=this;return new Promise((function(t,i){e.isGroup&&e.columns.forEach((function(e){e.delete()})),e.dispatch("column-delete",e);for(var n=e.cells.length,o=0;o-1&&this._nextVisibleColumn(e+1)}},{key:"_nextVisibleColumn",value:function(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._nextVisibleColumn(e+1)}},{key:"prevColumn",value:function(){var e=this.table.columnManager.findColumnIndex(this);return e>-1&&this._prevVisibleColumn(e-1)}},{key:"_prevVisibleColumn",value:function(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._prevVisibleColumn(e-1)}},{key:"reinitializeWidth",value:function(e){this.widthFixed=!1,void 0===this.definition.width||e||this.setWidth(this.definition.width),this.dispatch("column-width-fit-before",this),this.fitToData(e),this.dispatch("column-width-fit-after",this)}},{key:"fitToData",value:function(e){if(!this.isGroup){this.widthFixed||(this.element.style.width="",this.cells.forEach((function(e){e.clearWidth()})));var t=this.element.offsetWidth;if((!this.width||!this.widthFixed)&&(this.cells.forEach((function(e){var i=e.getWidth();i>t&&(t=i)})),t)){var i=t+1;this.maxInitialWidth&&!e&&(i=Math.min(i,this.maxInitialWidth)),this.setWidthActual(i)}}}},{key:"updateDefinition",value:function(e){var t,i=this;return this.isGroup||this.parent.isGroup?(console.error("Column Update Error - The updateDefinition function is only available on ungrouped columns"),Promise.reject("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(t=Object.assign({},this.getDefinition()),t=Object.assign(t,e),this.table.columnManager.addColumn(t,!1,this).then((function(e){return t.field==i.field&&(i.field=!1),i.delete().then((function(){return e.getComponent()}))})))}},{key:"deleteCell",value:function(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}},{key:"getComponent",value:function(){return this.component||(this.component=new g(this)),this.component}}]),r}(f);w.defaultOptionList=v;var C=function(){function i(){t(this,i)}return o(i,null,[{key:"elVisible",value:function(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)}},{key:"elOffset",value:function(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}}},{key:"deepClone",value:function(t,i){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a={}.__proto__,r=[].__proto__;i||(i=Object.assign(Array.isArray(t)?[]:{},t));var s=function(){var s=t[l],u=void 0,c=void 0;null==s||"object"!==e(s)||s.__proto__!==a&&s.__proto__!==r||((u=o.findIndex((function(e){return e.subject===s})))>-1?i[l]=o[u].copy:(c=Object.assign(Array.isArray(s)?[]:{},s),o.unshift({subject:s,copy:c}),i[l]=n.deepClone(s,c,o)))};for(var l in t)s();return i}}]),i}(),k=function(){function i(e,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t(this,i),this.table=e,this.msgType=n,this.registeredDefaults=Object.assign({},o)}return o(i,[{key:"register",value:function(e,t){this.registeredDefaults[e]=t}},{key:"generate",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign({},this.registeredDefaults);if(Object.assign(n,t),!1!==i.debugInvalidOptions||this.table.options.debugInvalidOptions)for(var o in i)n.hasOwnProperty(o)||console.warn("Invalid "+this.msgType+" option:",o);for(var o in n)o in i?n[o]=i[o]:Array.isArray(n[o])?n[o]=Object.assign([],n[o]):"object"===e(n[o])&&null!==n[o]?n[o]=Object.assign({},n[o]):void 0===n[o]&&delete n[o];return n}}]),i}(),E=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).elementVertical=e.rowManager.element,o.elementHorizontal=e.columnManager.element,o.tableElement=e.rowManager.tableElement,o.verticalFillMode="fit",o}return o(n,[{key:"initialize",value:function(){}},{key:"clearRows",value:function(){}},{key:"clearColumns",value:function(){}},{key:"reinitializeColumnWidths",value:function(e){}},{key:"renderRows",value:function(){}},{key:"renderColumns",value:function(){}},{key:"rerenderRows",value:function(e){e&&e()}},{key:"rerenderColumns",value:function(e,t){}},{key:"renderRowCells",value:function(e){}},{key:"rerenderRowCells",value:function(e,t){}},{key:"scrollColumns",value:function(e,t){}},{key:"scrollRows",value:function(e,t){}},{key:"resize",value:function(){}},{key:"scrollToRow",value:function(e){}},{key:"scrollToRowNearestTop",value:function(e){}},{key:"visibleRows",value:function(e){return[]}},{key:"rows",value:function(){return this.table.rowManager.getDisplayRows()}},{key:"styleRow",value:function(e,t){var i=e.getElement();t%2?(i.classList.add("tabulator-row-even"),i.classList.remove("tabulator-row-odd")):(i.classList.add("tabulator-row-odd"),i.classList.remove("tabulator-row-even"))}},{key:"clear",value:function(){this.clearRows(),this.clearColumns()}},{key:"render",value:function(){this.renderRows(),this.renderColumns()}},{key:"rerender",value:function(e){this.rerenderRows(),this.rerenderColumns()}},{key:"scrollToRowPosition",value:function(e,t,i){var n=this,o=this.rows().indexOf(e),a=e.getElement(),r=0;return new Promise((function(s,l){if(o>-1){if(void 0===i&&(i=n.table.options.scrollToRowIfVisible),!i&&C.elVisible(a)&&(r=C.elOffset(a).top-C.elOffset(n.elementVertical).top)>0&&re&&(e=i)}})),this.windowBuffer=2*e}},{key:"rerenderColumns",value:function(e,t){var i=this,n={cols:this.columns,leftCol:this.leftCol,rightCol:this.rightCol},o=0;e&&!this.initialized||(this.clear(),this.calcWindowBuffer(),this.scrollLeft=this.elementVertical.scrollLeft,this.vDomScrollPosLeft=this.scrollLeft-this.windowBuffer,this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,this.table.columnManager.columnsByIndex.forEach((function(e){var t={};if(e.visible){var n=e.getWidth();t.leftPos=o,t.rightPos=o+n,t.width=n,i.isFitData&&(t.fitDataCheck=!e.modules.vdomHoz||e.modules.vdomHoz.fitDataCheck),o+n>i.vDomScrollPosLeft&&othis.windowBuffer/2?this.rerenderColumns():e>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())}},{key:"colPositionAdjust",value:function(e,t,i){for(var n=e;n=e.columns.length-1?e.vDomPadRight=0:e.vDomPadRight-=i.getWidth())):"break"};;){if("break"===i())break}t&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}},{key:"addColLeft",value:function(){for(var e=this,t=!1,i=function(){var i=e.columns[e.leftCol-1];if(!i)return"break";if(!(i.modules.vdomHoz.rightPos>=e.vDomScrollPosLeft))return"break";t=!0,e.getVisibleRows().forEach((function(e){if("group"!==e.type){var t=e.getCell(i);e.getElement().prepend(t.getElement()),t.cellRendered()}})),e.leftCol--,e.leftCol<=0?e.vDomPadLeft=0:e.vDomPadLeft-=i.getWidth();var n=e.fitDataColActualWidthCheck(i);n&&(e.scrollLeft=e.elementVertical.scrollLeft=e.elementVertical.scrollLeft+n,e.vDomPadRight-=n)};;){if("break"===i())break}t&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}},{key:"removeColRight",value:function(){for(var e=this,t=!1,i=function(){var i=e.columns[e.rightCol];return i&&i.modules.vdomHoz.leftPos>e.vDomScrollPosRight?(t=!0,e.getVisibleRows().forEach((function(e){if("group"!==e.type){var t=e.getCell(i);try{e.getElement().removeChild(t.getElement())}catch(e){console.warn("Could not removeColRight",e.message)}}})),e.vDomPadRight+=i.getWidth(),void e.rightCol--):"break"};;){if("break"===i())break}t&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}},{key:"removeColLeft",value:function(){for(var e=this,t=!1,i=function(){var i=e.columns[e.leftCol];return i&&i.modules.vdomHoz.rightPosi?(t=e-i,this.element.style.marginLeft=-t+"px"):this.element.style.marginLeft=0,this.scrollLeft=e,this.renderer.scrollColumns(e)}},{key:"generateColumnsFromRowData",value:function(t){var i,n,o=[],a=this.table.options.autoColumnsDefinitions;if(t&&t.length){for(var r in i=t[0]){var s={field:r,title:r},l=i[r];switch(e(l)){case"undefined":n="string";break;case"boolean":n="boolean";break;case"object":n=Array.isArray(l)?"array":"string";break;default:n=isNaN(l)||""===l?l.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?"alphanum":"string":"number"}s.sorter=n,o.push(s)}if(a)switch(e(a)){case"function":this.table.options.columns=a.call(this.table,o);break;case"object":Array.isArray(a)?o.forEach((function(e){var t=a.find((function(t){return t.field===e.field}));t&&Object.assign(e,t)})):o.forEach((function(e){a[e.field]&&Object.assign(e,a[e.field])})),this.table.options.columns=o}else this.table.options.columns=o;this.setColumns(this.table.options.columns)}}},{key:"setColumns",value:function(e,t){for(var i=this;this.headersElement.firstChild;)this.headersElement.removeChild(this.headersElement.firstChild);this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.dispatch("columns-loading"),e.forEach((function(e,t){i._addColumn(e)})),this._reIndexColumns(),this.dispatch("columns-loaded"),this.renderer.rerenderColumns(!1,!0),this.redraw(!0)}},{key:"_addColumn",value:function(e,t,i){var n=new w(e,this),o=n.getElement(),a=i?this.findColumnIndex(i):i;if(i&&a>-1){var r=i.getTopColumn(),s=this.columns.indexOf(r),l=r.getElement();t?(this.columns.splice(s,0,n),l.parentNode.insertBefore(o,l)):(this.columns.splice(s+1,0,n),l.parentNode.insertBefore(o,l.nextSibling))}else t?(this.columns.unshift(n),this.headersElement.insertBefore(n.getElement(),this.headersElement.firstChild)):(this.columns.push(n),this.headersElement.appendChild(n.getElement()));return n.columnRendered(),n}},{key:"registerColumnField",value:function(e){e.definition.field&&(this.columnsByField[e.definition.field]=e)}},{key:"registerColumnPosition",value:function(e){this.columnsByIndex.push(e)}},{key:"_reIndexColumns",value:function(){this.columnsByIndex=[],this.columns.forEach((function(e){e.reRegisterPosition()}))}},{key:"verticalAlignHeaders",value:function(){var e=this,t=0;this.columns.forEach((function(e){var i;e.clearVerticalAlign(),(i=e.getHeight())>t&&(t=i)})),this.columns.forEach((function(i){i.verticalAlign(e.table.options.columnHeaderVertAlign,t)})),this.table.rowManager.adjustTableSize()}},{key:"findColumn",value:function(t){return"object"!=e(t)?this.columnsByField[t]||!1:t instanceof w?t:t instanceof g?t._getSelf()||!1:"undefined"!=typeof HTMLElement&&t instanceof HTMLElement&&this.columns.find((function(e){return e.element===t}))||!1}},{key:"getColumnByField",value:function(e){return this.columnsByField[e]}},{key:"getColumnsByFieldRoot",value:function(e){var t=this,i=[];return Object.keys(this.columnsByField).forEach((function(n){n.split(".")[0]===e&&i.push(t.columnsByField[n])})),i}},{key:"getColumnByIndex",value:function(e){return this.columnsByIndex[e]}},{key:"getFirstVisibleColumn",value:function(e){return(e=this.columnsByIndex.findIndex((function(e){return e.visible})))>-1&&this.columnsByIndex[e]}},{key:"getColumns",value:function(){return this.columns}},{key:"findColumnIndex",value:function(e){return this.columnsByIndex.findIndex((function(t){return e===t}))}},{key:"getRealColumns",value:function(){return this.columnsByIndex}},{key:"traverse",value:function(e){this.columnsByIndex.forEach((function(t,i){e(t,i)}))}},{key:"getDefinitions",value:function(e){var t=[];return this.columnsByIndex.forEach((function(i){(!e||e&&i.visible)&&t.push(i.getDefinition())})),t}},{key:"getDefinitionTree",value:function(){var e=[];return this.columns.forEach((function(t){e.push(t.getDefinition(!0))})),e}},{key:"getComponents",value:function(e){var t=[];return(e?this.columns:this.columnsByIndex).forEach((function(e){t.push(e.getComponent())})),t}},{key:"getWidth",value:function(){var e=0;return this.columnsByIndex.forEach((function(t){t.visible&&(e+=t.getWidth())})),e}},{key:"moveColumn",value:function(e,t,i){this.moveColumnActual(e,t,i),t.element.parentNode.insertBefore(e.element,t.element),i&&t.element.parentNode.insertBefore(t.element,e.element),this.verticalAlignHeaders(),this.table.rowManager.reinitialize()}},{key:"moveColumnActual",value:function(e,t,i){e.parent.isGroup?this._moveColumnInArray(e.parent.columns,e,t,i):this._moveColumnInArray(this.columns,e,t,i),this._moveColumnInArray(this.columnsByIndex,e,t,i,!0),this.renderer.rerenderColumns(!0),this.dispatch("column-moved",e,t,i),this.subscribedExternal("columnMoved")&&this.dispatchExternal("columnMoved",e.getComponent(),this.table.columnManager.getComponents())}},{key:"_moveColumnInArray",value:function(e,t,i,n,o){var a,r=e.indexOf(t);r>-1&&(e.splice(r,1),(a=e.indexOf(i))>-1?n&&(a+=1):a=r,e.splice(a,0,t),o&&(this.chain("column-moving-rows",[t,i,n],null,[])||[]).concat(this.table.rowManager.rows).forEach((function(e){if(e.cells.length){var t=e.cells.splice(r,1)[0];e.cells.splice(a,0,t)}})))}},{key:"scrollToColumn",value:function(e,t,i){var n=this,o=0,a=0,r=0,s=e.getElement();return new Promise((function(l,u){if(void 0===t&&(t=n.table.options.scrollToColumnPosition),void 0===i&&(i=n.table.options.scrollToColumnIfVisible),e.visible){switch(t){case"middle":case"center":r=-n.element.clientWidth/2;break;case"right":r=s.clientWidth-n.headersElement.clientWidth}if(!i&&(a=s.offsetLeft)>0&&a+s.offsetWidththis.table.rowManager.element.clientHeight&&(e-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),this.columnsByIndex.forEach((function(i){var n,o,a;i.visible&&(n=i.definition.width||0,o=parseInt(i.minWidth),a="string"==typeof n?n.indexOf("%")>-1?e/100*parseInt(n):parseInt(n):n,t+=a>o?a:o)})),t}},{key:"addColumn",value:function(e,t,i){var n=this;return new Promise((function(o,a){var r=n._addColumn(e,t,i);n._reIndexColumns(),n.dispatch("column-add",e,t,i),"fitColumns"!=n.layoutMode()&&r.reinitializeWidth(),n.redraw(!0),n.table.rowManager.reinitialize(),n.renderer.rerenderColumns(),o(r)}))}},{key:"deregisterColumn",value:function(e){var t,i=e.getField();i&&delete this.columnsByField[i],(t=this.columnsByIndex.indexOf(e))>-1&&this.columnsByIndex.splice(t,1),(t=this.columns.indexOf(e))>-1&&this.columns.splice(t,1),this.verticalAlignHeaders(),this.redraw()}},{key:"redraw",value:function(e){C.elVisible(this.element)&&this.verticalAlignHeaders(),e&&(this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),this.confirm("table-redrawing",e)||this.layoutRefresh(),this.dispatch("table-redraw",e),this.table.footerManager.redraw()}}]),r}(f),M=function(){function e(i){return t(this,e),this._row=i,new Proxy(this,{get:function(e,t,i){return void 0!==e[t]?e[t]:e._row.table.componentFunctionBinder.handle("row",e._row,t)}})}return o(e,[{key:"getData",value:function(e){return this._row.getData(e)}},{key:"getElement",value:function(){return this._row.getElement()}},{key:"getCells",value:function(){var e=[];return this._row.getCells().forEach((function(t){e.push(t.getComponent())})),e}},{key:"getCell",value:function(e){var t=this._row.getCell(e);return!!t&&t.getComponent()}},{key:"getIndex",value:function(){return this._row.getData("data")[this._row.table.options.index]}},{key:"getPosition",value:function(e){return this._row.table.rowManager.getRowPosition(this._row,e)}},{key:"delete",value:function(){return this._row.delete()}},{key:"scrollTo",value:function(){return this._row.table.rowManager.scrollToRow(this._row)}},{key:"move",value:function(e,t){this._row.moveToRow(e,t)}},{key:"update",value:function(e){return this._row.updateData(e)}},{key:"normalizeHeight",value:function(){this._row.normalizeHeight(!0)}},{key:"_getSelf",value:function(){return this._row}},{key:"reformat",value:function(){return this._row.reinitialize()}},{key:"getTable",value:function(){return this._row.table}},{key:"getNextRow",value:function(){var e=this._row.nextRow();return e?e.getComponent():e}},{key:"getPrevRow",value:function(){var e=this._row.prevRow();return e?e.getComponent():e}}]),e}(),L=function(e){a(n,e);var i=c(n);function n(e,o){var a,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"row";return t(this,n),(a=i.call(this,o.table)).parent=o,a.data={},a.type=r,a.element=!1,a.modules={},a.cells=[],a.height=0,a.heightStyled="",a.manualHeight=!1,a.outerHeight=0,a.initialized=!1,a.heightInitialized=!1,a.component=null,a.created=!1,a.setData(e),a}return o(n,[{key:"create",value:function(){this.created||(this.created=!0,this.generateElement())}},{key:"createElement",value:function(){var e=document.createElement("div");e.classList.add("tabulator-row"),e.setAttribute("role","row"),this.element=e}},{key:"getElement",value:function(){return this.create(),this.element}},{key:"detachElement",value:function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}},{key:"generateElement",value:function(){this.createElement(),this.dispatch("row-init",this)}},{key:"generateCells",value:function(){this.cells=this.table.columnManager.generateCells(this)}},{key:"initialize",value:function(e){if(this.create(),!this.initialized||e){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.dispatch("row-layout-before",this),this.generateCells(),this.initialized=!0,this.table.columnManager.renderer.renderRowCells(this),e&&this.normalizeHeight(),this.dispatch("row-layout",this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.dispatch("row-layout-after",this)}else this.table.columnManager.renderer.rerenderRowCells(this)}},{key:"reinitializeHeight",value:function(){this.heightInitialized=!1,this.element&&null!==this.element.offsetParent&&this.normalizeHeight(!0)}},{key:"deinitializeHeight",value:function(){this.heightInitialized=!1}},{key:"reinitialize",value:function(e){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&null!==this.element.offsetParent&&this.initialize(!0),this.dispatch("row-relayout",this)}},{key:"calcHeight",value:function(e){var t=0,i=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach((function(e){var i=e.getHeight();i>t&&(t=i)})),this.height=e?Math.max(t,i):this.manualHeight?this.height:Math.max(t,i),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight}},{key:"setCellHeight",value:function(){this.cells.forEach((function(e){e.setHeight()})),this.heightInitialized=!0}},{key:"clearCellHeight",value:function(){this.cells.forEach((function(e){e.clearHeight()}))}},{key:"normalizeHeight",value:function(e){e&&this.clearCellHeight(),this.calcHeight(e),this.setCellHeight()}},{key:"setHeight",value:function(e,t){(this.height!=e||t)&&(this.manualHeight=!0,this.height=e,this.heightStyled=e?e+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)}},{key:"getHeight",value:function(){return this.outerHeight}},{key:"getWidth",value:function(){return this.element.offsetWidth}},{key:"deleteCell",value:function(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}},{key:"setData",value:function(e){this.data=this.chain("row-data-init-before",[this,e],void 0,e),this.dispatch("row-data-init-after",this)}},{key:"updateData",value:function(e){var t,i=this,n=this.element&&C.elVisible(this.element),o={};return new Promise((function(a,r){for(var s in"string"==typeof e&&(e=JSON.parse(e)),i.dispatch("row-data-save-before",i),i.subscribed("row-data-changing")&&(o=Object.assign(o,i.data),o=Object.assign(o,e)),t=i.chain("row-data-changing",[i,o,e],null,e))i.data[s]=t[s];for(var s in i.dispatch("row-data-save-after",i),e){i.table.columnManager.getColumnsByFieldRoot(s).forEach((function(e){var o=i.getCell(e.getField());if(o){var a=e.getFieldValue(t);o.getValue()!=a&&(o.setValueProcessData(a),n&&o.cellRendered())}}))}n?(i.normalizeHeight(!0),i.table.options.rowFormatter&&i.table.options.rowFormatter(i.getComponent())):(i.initialized=!1,i.height=0,i.heightStyled=""),i.dispatch("row-data-changed",i,n,e),i.dispatchExternal("rowUpdated",i.getComponent()),i.subscribedExternal("dataChanged")&&i.dispatchExternal("dataChanged",i.table.rowManager.getData()),a()}))}},{key:"getData",value:function(e){return e?this.chain("row-data-retrieve",[this,e],null,this.data):this.data}},{key:"getCell",value:function(e){return e=this.table.columnManager.findColumn(e),this.initialized||this.generateCells(),this.cells.find((function(t){return t.column===e}))}},{key:"getCellIndex",value:function(e){return this.cells.findIndex((function(t){return t===e}))}},{key:"findCell",value:function(e){return this.cells.find((function(t){return t.element===e}))}},{key:"getCells",value:function(){return this.initialized||this.generateCells(),this.cells}},{key:"nextRow",value:function(){return this.table.rowManager.nextDisplayRow(this,!0)||!1}},{key:"prevRow",value:function(){return this.table.rowManager.prevDisplayRow(this,!0)||!1}},{key:"moveToRow",value:function(e,t){var i=this.table.rowManager.findRow(e);i?(this.table.rowManager.moveRowActual(this,i,!t),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",e)}},{key:"delete",value:function(){return this.dispatch("row-delete",this),this.deleteActual(),Promise.resolve()}},{key:"deleteActual",value:function(e){this.table.rowManager.getRowIndex(this);this.detatchModules(),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.dispatch("row-deleted",this)}},{key:"detatchModules",value:function(){this.dispatch("row-deleting",this)}},{key:"deleteCells",value:function(){for(var e=this.cells.length,t=0;tMath.abs(this.elementVertical.scrollTop+this.elementVertical.clientHeight-t))}},{key:"scrollToRow",value:function(e){var t=e.getElement();this.elementVertical.scrollTop=C.elOffset(t).top-C.elOffset(this.elementVertical).top+this.elementVertical.scrollTop}},{key:"visibleRows",value:function(e){return this.rows()}}]),n}(E),S=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).verticalFillMode="fill",o.scrollTop=0,o.scrollLeft=0,o.vDomRowHeight=20,o.vDomTop=0,o.vDomBottom=0,o.vDomScrollPosTop=0,o.vDomScrollPosBottom=0,o.vDomTopPad=0,o.vDomBottomPad=0,o.vDomMaxRenderChain=90,o.vDomWindowBuffer=0,o.vDomWindowMinTotalRows=20,o.vDomWindowMinMarginRows=5,o.vDomTopNewRows=[],o.vDomBottomNewRows=[],o}return o(n,[{key:"clearRows",value:function(){for(var e=this.tableElement;e.firstChild;)e.removeChild(e.firstChild);e.style.paddingTop="",e.style.paddingBottom="",e.style.minHeight="",e.style.display="",e.style.visibility="",this.elementVertical.scrollTop=0,this.elementVertical.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0,this.vDomTop=0,this.vDomBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0}},{key:"renderRows",value:function(){this._virtualRenderFill()}},{key:"rerenderRows",value:function(e){for(var t=this.elementVertical.scrollTop,i=!1,n=!1,o=this.table.rowManager.scrollLeft,a=this.rows(),r=this.vDomTop;r<=this.vDomBottom;r++)if(a[r]){var s=t-a[r].getElement().offsetTop;if(!(!1===n||Math.abs(s)o||n>o){var r=this.table.rowManager.scrollLeft;this._virtualRenderFill(Math.floor(this.elementVertical.scrollTop/this.elementVertical.scrollHeight*a.length)),this.scrollColumns(r)}else t?(i<0&&this._addTopRow(a,-i),n<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(a,-n):this.vDomScrollPosBottom=this.scrollTop)):(n>=0&&this._addBottomRow(a,n),i>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(a,i):this.vDomScrollPosTop=this.scrollTop))}},{key:"resize",value:function(){this.vDomWindowBuffer=this.table.options.renderVerticalBuffer||this.elementVertical.clientHeight}},{key:"scrollToRowNearestTop",value:function(e){var t=this.rows().indexOf(e);return!(Math.abs(this.vDomTop-t)>Math.abs(this.vDomBottom-t))}},{key:"scrollToRow",value:function(e){var t=this.rows().indexOf(e);t>-1&&this._virtualRenderFill(t,!0)}},{key:"visibleRows",value:function(e){var t=this.elementVertical.scrollTop,i=this.elementVertical.clientHeight+t,n=!1,o=0,a=0,r=this.rows();if(e)o=this.vDomTop,a=this.vDomBottom;else for(var s=this.vDomTop;s<=this.vDomBottom;s++)if(r[s])if(n){if(!(i-r[s].getElement().offsetTop>=0))break;a=s}else if(t-r[s].getElement().offsetTop>=0)o=s;else{if(n=!0,!(i-r[s].getElement().offsetTop>=0))break;a=s}return r.slice(o,a+1)}},{key:"_virtualRenderFill",value:function(e,t,i){var n=this.tableElement,o=this.elementVertical,a=0,r=0,s=0,l=0,u=0,c=this.rows(),h=c.length,d=this.elementVertical.clientHeight;if(i=i||0,e=e||0){for(;n.firstChild;)n.removeChild(n.firstChild);(s=(h-e+1)*this.vDomRowHeight)this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*m),this.vDomBottom++,u++}e?(this.vDomTopPad=t?this.vDomRowHeight*this.vDomTop+i:this.scrollTop-l,this.vDomBottomPad=this.vDomBottom==h-1?0:Math.max(this.vDomScrollHeight-this.vDomTopPad-r-l,0)):(this.vDomTopPad=0,this.vDomRowHeight=Math.floor((r+l)/u),this.vDomBottomPad=this.vDomRowHeight*(h-this.vDomBottom-1),this.vDomScrollHeight=l+r+this.vDomBottomPad-d),n.style.paddingTop=this.vDomTopPad+"px",n.style.paddingBottom=this.vDomBottomPad+"px",t&&(this.scrollTop=this.vDomTopPad+l+i-(this.elementVertical.scrollWidth>this.elementVertical.clientWidth?this.elementVertical.offsetHeight-d:0)),this.scrollTop=Math.min(this.scrollTop,this.elementVertical.scrollHeight-d),this.elementVertical.scrollWidth>this.elementVertical.offsetWidth&&t&&(this.scrollTop+=this.elementVertical.offsetHeight-d),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,o.scrollTop=this.scrollTop,this.dispatch("render-virtual-fill")}}},{key:"_addTopRow",value:function(e,t){for(var i=this.tableElement,n=[],o=0,a=this.vDomTop-1,r=0;this.vDomTop;){var s=e[a],l=void 0,u=void 0;if(!(s&&r=l))break;this.styleRow(s,a),i.insertBefore(s.getElement(),i.firstChild),s.initialized&&s.heightInitialized||n.push(s),s.initialize(),u||(l=s.getElement().offsetHeight)>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l),t-=l,o+=l,this.vDomTop--,a--,r++}for(var c=0,h=n;c=(r=a.getHeight()||this.vDomRowHeight)))break;this.vDomTop++,t-=r,n+=r,i.push(a),o++}for(var s=0,l=i;s=l))break;this.styleRow(s,a),i.appendChild(s.getElement()),s.initialized&&s.heightInitialized||n.push(s),s.initialize(),u||(l=s.getElement().offsetHeight)>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l),t-=l,o+=l,this.vDomBottom++,a++,r++}for(var c=0,h=n;c=(r=a.getHeight()||this.vDomRowHeight)))break;this.vDomBottom--,t-=r,n+=r,i.push(a),o++}for(var s=0,l=i;st,n=e.element.scrollTop,o=e.scrollTop>n;e.scrollLeft!=t&&(e.scrollLeft=t,e.dispatch("scroll-horizontal",t,i),e.dispatchExternal("scrollHorizontal",t,i),e._positionPlaceholder()),e.scrollTop!=n&&(e.scrollTop=n,e.renderer.scrollRows(n,o),e.dispatch("scroll-vertical",n,o),e.dispatchExternal("scrollVertical",n,o))}))}},{key:"findRow",value:function(t){var i=this;return"object"!=e(t)?null!=t&&(this.rows.find((function(e){return e.data[i.table.options.index]==t}))||!1):t instanceof L?t:t instanceof M?t._getSelf()||!1:"undefined"!=typeof HTMLElement&&t instanceof HTMLElement&&this.rows.find((function(e){return e.getElement()===t}))||!1}},{key:"getRowFromDataObject",value:function(e){return this.rows.find((function(t){return t.data===e}))||!1}},{key:"getRowFromPosition",value:function(e,t){return t?this.activeRows[e]:this.rows[e]}},{key:"scrollToRow",value:function(e,t,i){return this.renderer.scrollToRowPosition(e,t,i)}},{key:"setData",value:function(e,t,i){var n=this;return new Promise((function(o,a){t&&n.getDisplayRows().length?n.table.options.pagination?n._setDataActual(e,!0):n.reRenderInPosition((function(){n._setDataActual(e)})):(n.table.options.autoColumns&&i&&n.table.initialized&&n.table.columnManager.generateColumnsFromRowData(e),n.resetScroll(),n._setDataActual(e)),o()}))}},{key:"_setDataActual",value:function(t,i){var n=this;this.dispatchExternal("dataProcessing",t),this._wipeElements(),Array.isArray(t)?(this.dispatch("data-processing",t),t.forEach((function(t,i){if(t&&"object"===e(t)){var o=new L(t,n);n.rows.push(o)}else console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:",t)})),this.refreshActiveData(!1,!1,i),this.dispatch("data-processed",t),this.dispatchExternal("dataProcessed",t)):console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ",e(t),"\nData: ",t)}},{key:"_wipeElements",value:function(){this.dispatch("rows-wipe"),this.rows.forEach((function(e){e.wipe()})),this.rows=[],this.activeRows=[],this.activeRowsPipeline=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.adjustTableSize()}},{key:"deleteRow",value:function(e,t){var i=this.rows.indexOf(e),n=this.activeRows.indexOf(e);n>-1&&this.activeRows.splice(n,1),i>-1&&this.rows.splice(i,1),this.setActiveRows(this.activeRows),this.displayRowIterator((function(t){var i=t.indexOf(e);i>-1&&t.splice(i,1)})),t||this.reRenderInPosition(),this.regenerateRowNumbers(),this.dispatchExternal("rowDeleted",e.getComponent()),this.displayRowsCount||this._showPlaceholder(),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.getData())}},{key:"addRow",value:function(e,t,i,n){return this.addRowActual(e,t,i,n)}},{key:"addRows",value:function(e,t,i){var n=this,o=[];return new Promise((function(a,r){t=n.findAddRowPos(t),Array.isArray(e)||(e=[e]),e.length,(void 0===i&&t||void 0!==i&&!t)&&e.reverse(),e.forEach((function(a,r){var s=n.addRow(a,t,i,!0);o.push(s),n.dispatch("row-added",s,e,t,i)})),n.refreshActiveData(!1,!1,!0),n.regenerateRowNumbers(),o.length&&n._clearPlaceholder(),a(o)}))}},{key:"findAddRowPos",value:function(e){return void 0===e&&(e=this.table.options.addRowPos),"pos"===e&&(e=!0),"bottom"===e&&(e=!1),e}},{key:"addRowActual",value:function(e,t,i,n){var o,a,r=e instanceof L?e:new L(e||{},this),s=this.findAddRowPos(t),l=-1;return i||(a=this.chain("row-adding-position",[r,s],null,{index:i,top:s}),i=a.index,s=a.top),void 0!==i&&(i=this.findRow(i)),(i=this.chain("row-adding-index",[r,i,s],null,i))&&(l=this.rows.indexOf(i)),i&&l>-1?(o=this.activeRows.indexOf(i),this.displayRowIterator((function(e){var t=e.indexOf(i);t>-1&&e.splice(s?t:t+1,0,r)})),o>-1&&this.activeRows.splice(s?o:o+1,0,r),this.rows.splice(s?l:l+1,0,r)):s?(this.displayRowIterator((function(e){e.unshift(r)})),this.activeRows.unshift(r),this.rows.unshift(r)):(this.displayRowIterator((function(e){e.push(r)})),this.activeRows.push(r),this.rows.push(r)),this.setActiveRows(this.activeRows),this.dispatchExternal("rowAdded",r.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),n||this.reRenderInPosition(),r}},{key:"moveRow",value:function(e,t,i){this.dispatch("row-move",e,t,i),this.moveRowActual(e,t,i),this.regenerateRowNumbers(),this.dispatch("row-moved",e,t,i),this.dispatchExternal("rowMoved",e.getComponent())}},{key:"moveRowActual",value:function(e,t,i){var n=this;this.moveRowInArray(this.rows,e,t,i),this.moveRowInArray(this.activeRows,e,t,i),this.displayRowIterator((function(o){n.moveRowInArray(o,e,t,i)})),this.dispatch("row-moving",e,t,i)}},{key:"moveRowInArray",value:function(e,t,i,n){var o,a,r;if(t!==i&&((o=e.indexOf(t))>-1&&(e.splice(o,1),(a=e.indexOf(i))>-1?n?e.splice(a+1,0,t):e.splice(a,0,t):e.splice(o,0,t)),e===this.getDisplayRows())){r=a>o?a:o+1;for(var s=o-1&&t}},{key:"nextDisplayRow",value:function(e,t){var i=this.getDisplayRowIndex(e),n=!1;return!1!==i&&i-1)&&i}},{key:"getData",value:function(e,t){var i=[];return this.getRows(e).forEach((function(e){"row"==e.type&&i.push(e.getData(t||"data"))})),i}},{key:"getComponents",value:function(e){var t=[];return this.getRows(e).forEach((function(e){t.push(e.getComponent())})),t}},{key:"getDataCount",value:function(e){return this.getRows(e).length}},{key:"scrollHorizontal",value:function(e){this.scrollLeft=e,this.element.scrollLeft=e,this.dispatch("scroll-horizontal",e)}},{key:"registerDataPipelineHandler",value:function(e,t){void 0!==t?(this.dataPipeline.push({handler:e,priority:t}),this.dataPipeline.sort((function(e,t){return e.priority-t.priority}))):console.error("Data pipeline handlers must have a priority in order to be registered")}},{key:"registerDisplayPipelineHandler",value:function(e,t){void 0!==t?(this.displayPipeline.push({handler:e,priority:t}),this.displayPipeline.sort((function(e,t){return e.priority-t.priority}))):console.error("Display pipeline handlers must have a priority in order to be registered")}},{key:"refreshActiveData",value:function(e,t,i){var n=this.table,o="",a=0,r=["all","dataPipeline","display","displayPipeline","end"];if("function"==typeof e)if((a=this.dataPipeline.findIndex((function(t){return t.handler===e})))>-1)o="dataPipeline",t&&(a==this.dataPipeline.length-1?o="display":a++);else{if(!((a=this.displayPipeline.findIndex((function(t){return t.handler===e})))>-1))return void console.error("Unable to refresh data, invalid handler provided",e);o="displayPipeline",t&&(a==this.displayPipeline.length-1?o="end":a++)}else o=e||"all",a=0;this.redrawBlock?(!this.redrawBlockRestoreConfig||this.redrawBlockRestoreConfig&&(this.redrawBlockRestoreConfig.stage===o&&a-1&&(n.splice(o,1),a=!0),"mouseenter"!==t&&"mouseleave"!==t||this.pseudoTracking||this.bindPseudoEvents(),a&&this.updateEventListeners()}},{key:"updateEventListeners",value:function(){for(var e in this.listeners){var t=this.listeners[e];t.components.length?t.handler||(t.handler=this.track.bind(this,e),this.el.addEventListener(e,t.handler)):t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}},{key:"track",value:function(e,t){var i=t.composedPath&&t.composedPath()||t.path,n=this.findTargets(i);n=this.bindComponents(e,n),this.triggerEvents(e,t,n),!this.pseudoTracking||"mouseover"!=e&&"mouseleave"!=e||Object.keys(n).length||this.pseudoMouseLeave("none",t)}},{key:"findTargets",value:function(e){var t,i=this,n={},o=Object.keys(this.componentMap),a=p(e);try{for(a.s();!(t=a.n()).done;){var r=t.value,s=r.classList?h(r.classList):[];if(s.filter((function(e){return i.abortClasses.includes(e)})).length)break;var l,u=p(s.filter((function(e){return o.includes(e)})));try{for(u.s();!(l=u.n()).done;){var c=l.value;n[this.componentMap[c]]=r}}catch(e){u.e(e)}finally{u.f()}}}catch(e){a.e(e)}finally{a.f()}return n.group&&n.group===n.row&&delete n.row,n}},{key:"bindComponents",value:function(e,t){var i,n=this,o=Object.keys(t).reverse(),a=this.listeners[e],r={},s=p(o);try{var l=function(){var e=i.value,o=void 0,s=t[e],l=n.previousTargets[e];if(l&&l.target===s)o=l.component;else switch(e){case"row":case"group":if(a.components.includes("row")||a.components.includes("cell")||a.components.includes("group"))o=n.table.rowManager.getVisibleRows(!0).find((function(e){return e.getElement()===s})),t.row&&t.row.parentNode&&t.row.parentNode.closest(".tabulator-row")&&(t[e]=!1);break;case"column":a.components.includes("column")&&(o=n.table.columnManager.findColumn(s));break;case"cell":a.components.includes("cell")&&(t.row instanceof L?o=t.row.findCell(s):t.row&&console.warn("Event Target Lookup Error - The row this cell is attached to cannot be found, has the table been reinitialized without being destroyed first?"))}o&&(t[e]=o,r[e]={target:s,component:o})};for(s.s();!(i=s.n()).done;)l()}catch(e){s.e(e)}finally{s.f()}return this.previousTargets=r,t}},{key:"triggerEvents",value:function(e,t,i){var n=this.listeners[e];for(var o in i)i[o]&&n.components.includes(o)&&this.dispatch(o+"-"+e,t,i[o])}},{key:"clearWatchers",value:function(){for(var e in this.listeners){var t=this.listeners[e];t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}}]),n}(f),H=function(){function e(i){t(this,e),this.table=i,this.bindings={}}return o(e,[{key:"bind",value:function(e,t,i){this.bindings[e]||(this.bindings[e]={}),this.bindings[e][t]?console.warn("Unable to bind component handler, a matching function name is already bound",e,t,hanlder):this.bindings[e][t]=i}},{key:"handle",value:function(e,t,i){if(this.bindings[e]&&this.bindings[e][i])return this.bindings[e][i].bind(null,t);"then"===i||"string"!=typeof i||i.startsWith("_")||console.error("The "+e+" component does not have a "+i+" function, have you checked that you have the correct Tabulator module installed?")}}]),e}(),A=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).loaderElement=i.createLoaderElement(),i.msgElement=i.createMsgElement(),i.loadingElement=null,i.errorElement=null,i.requestOrder=0,i.loading=!1,i}return o(r,[{key:"initialize",value:function(){var e;this.loaderElement.appendChild(this.msgElement),this.table.options.dataLoaderLoading&&("string"==typeof this.table.options.dataLoaderLoading?((e=document.createElement("template")).innerHTML=this.table.options.dataLoaderLoading.trim(),this.loadingElement=e.firstElementChild):this.loadingElement=this.table.options.dataLoaderLoading),this.table.options.dataLoaderError&&("string"==typeof this.table.options.dataLoaderError?((e=document.createElement("template")).innerHTML=this.table.options.dataLoaderError.trim(),this.errorElement=e.firstElementChild):this.errorElement=this.table.options.dataLoaderError)}},{key:"createLoaderElement",value:function(){var e=document.createElement("div");return e.classList.add("tabulator-loader"),e}},{key:"createMsgElement",value:function(){var e=document.createElement("div");return e.classList.add("tabulator-loader-msg"),e.setAttribute("role","alert"),e}},{key:"load",value:function(t,i,n,o,a){var r=this,s=++this.requestOrder;return this.dispatchExternal("dataLoading",t),!t||0!=t.indexOf("{")&&0!=t.indexOf("[")||(t=JSON.parse(t)),this.confirm("data-loading",[t,i,n,a])?(this.loading=!0,a||this.showLoader(),i=this.chain("data-params",[t,n,a],i||{},i||{}),i=this.mapParams(i,this.table.options.dataSendParams),this.chain("data-load",[t,i,n,a],!1,Promise.resolve([])).then((function(t){Array.isArray(t)||"object"!=e(t)||(t=r.mapParams(t,r.objectInvert(r.table.options.dataReceiveParams)));var i=r.chain("data-loaded",t,null,t);s==r.requestOrder?(r.hideLoader(),!1!==i&&(r.dispatchExternal("dataLoaded",i),r.table.rowManager.setData(i,o,!o))):console.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")})).catch((function(e){console.error("Data Load Error: ",e),r.dispatchExternal("dataLoadError",e),a||r.showError(),setTimeout((function(){r.hideLoader()}),r.table.options.dataLoaderErrorTimeout)})).finally((function(){r.loading=!1}))):(this.dispatchExternal("dataLoaded",t),t||(t=[]),this.table.rowManager.setData(t,o,!o),Promise.resolve())}},{key:"mapParams",value:function(e,t){var i={};for(var n in e)i[t.hasOwnProperty(n)?t[n]:n]=e[n];return i}},{key:"objectInvert",value:function(e){var t={};for(var i in e)t[e[i]]=i;return t}},{key:"blockActiveLoad",value:function(){this.requestOrder++}},{key:"showLoader",value:function(){if("function"==typeof this.table.options.dataLoader?this.table.options.dataLoader():this.table.options.dataLoader){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-error"),this.msgElement.classList.add("tabulator-loading"),this.loadingElement?this.msgElement.appendChild(this.loadingElement):this.msgElement.innerHTML=this.langText("data|loading"),this.table.element.appendChild(this.loaderElement)}}},{key:"showError",value:function(){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-loading"),this.msgElement.classList.add("tabulator-error"),this.errorElement?this.msgElement.appendChild(this.errorElement):this.msgElement.innerHTML=this.langText("data|error"),this.table.element.appendChild(this.loaderElement)}},{key:"hideLoader",value:function(){this.loaderElement.parentNode&&this.loaderElement.parentNode.removeChild(this.loaderElement)}}]),r}(f),O=function(){function e(i,n,o){t(this,e),this.table=i,this.events={},this.optionsList=n||{},this.subscriptionNotifiers={},this.dispatch=o?this._debugDispatch.bind(this):this._dispatch.bind(this),this.debug=o}return o(e,[{key:"subscriptionChange",value:function(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifiySubscriptionChange(e,!0)}},{key:"subscribe",value:function(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t),this._notifiySubscriptionChange(e,!0)}},{key:"unsubscribe",value:function(e,t){var i;if(this.events[e]){if(t){if(!((i=this.events[e].findIndex((function(e){return e===t})))>-1))return void console.warn("Cannot remove event, no matching event found:",e,t);this.events[e].splice(i,1)}else delete this.events[e];this._notifiySubscriptionChange(e,!1)}else console.warn("Cannot remove event, no events set on:",e)}},{key:"subscribed",value:function(e){return this.events[e]&&this.events[e].length}},{key:"_notifiySubscriptionChange",value:function(e,t){var i=this.subscriptionNotifiers[e];i&&i.forEach((function(e){e(t)}))}},{key:"_dispatch",value:function(){var e,t=this,i=Array.from(arguments),n=i.shift();return this.events[n]&&this.events[n].forEach((function(n,o){var a=n.apply(t.table,i);o||(e=a)})),e}},{key:"_debugDispatch",value:function(){var e,t=Array.from(arguments),i=t[0];(t[0]="ExternalEvent:"+t[0],!0===this.debug||this.debug.includes(i))&&(e=console).log.apply(e,h(t));return this._dispatch.apply(this,arguments)}}]),e}(),_=function(){function e(i){t(this,e),this.events={},this.subscriptionNotifiers={},this.dispatch=i?this._debugDispatch.bind(this):this._dispatch.bind(this),this.chain=i?this._debugChain.bind(this):this._chain.bind(this),this.confirm=i?this._debugConfirm.bind(this):this._confirm.bind(this),this.debug=i}return o(e,[{key:"subscriptionChange",value:function(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifiySubscriptionChange(e,!0)}},{key:"subscribe",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e4;this.events[e]||(this.events[e]=[]),this.events[e].push({callback:t,priority:i}),this.events[e].sort((function(e,t){return e.priority-t.priority})),this._notifiySubscriptionChange(e,!0)}},{key:"unsubscribe",value:function(e,t){var i;if(this.events[e]){if(t){if(!((i=this.events[e].findIndex((function(e){return e.callback===t})))>-1))return void console.warn("Cannot remove event, no matching event found:",e,t);this.events[e].splice(i,1)}this._notifiySubscriptionChange(e,!1)}else console.warn("Cannot remove event, no events set on:",e)}},{key:"subscribed",value:function(e){return this.events[e]&&this.events[e].length}},{key:"_chain",value:function(e,t,i,n){var o=this,a=i;return Array.isArray(t)||(t=[t]),this.subscribed(e)?(this.events[e].forEach((function(e,i){a=e.callback.apply(o,t.concat([a]))})),a):"function"==typeof n?n():n}},{key:"_confirm",value:function(e,t){var i=this,n=!1;return Array.isArray(t)||(t=[t]),this.subscribed(e)&&this.events[e].forEach((function(e,o){e.callback.apply(i,t)&&(n=!0)})),n}},{key:"_notifiySubscriptionChange",value:function(e,t){var i=this.subscriptionNotifiers[e];i&&i.forEach((function(e){e(t)}))}},{key:"_dispatch",value:function(){var e=this,t=Array.from(arguments),i=t.shift();this.events[i]&&this.events[i].forEach((function(i){i.callback.apply(e,t)}))}},{key:"_debugDispatch",value:function(){var e,t=Array.from(arguments),i=t[0];(t[0]="InternalEvent:"+i,!0===this.debug||this.debug.includes(i))&&(e=console).log.apply(e,h(t));return this._dispatch.apply(this,arguments)}},{key:"_debugChain",value:function(){var e,t=Array.from(arguments),i=t[0];(t[0]="InternalEvent:"+i,!0===this.debug||this.debug.includes(i))&&(e=console).log.apply(e,h(t));return this._chain.apply(this,arguments)}},{key:"_debugConfirm",value:function(){var e,t=Array.from(arguments),i=t[0];(t[0]="InternalEvent:"+i,!0===this.debug||this.debug.includes(i))&&(e=console).log.apply(e,h(t));return this._confirm.apply(this,arguments)}}]),e}(),B=function(){function e(){t(this,e)}return o(e,null,[{key:"register",value:function(t){e.tables.push(t)}},{key:"deregister",value:function(t){var i=e.tables.indexOf(t);i>-1&&e.tables.splice(i,1)}},{key:"lookupTable",value:function(t,i){var n,o,a=[];if("string"==typeof t){if((n=document.querySelectorAll(t)).length)for(var r=0;r0?a.setWidth(o):a.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(e){var t,i,n=this.table.element.clientWidth,o=0,a=0,r=0,s=[],l=[],u=0,c=0;function h(e){return"string"==typeof e?e.indexOf("%")>-1?n/100*parseInt(e):parseInt(e):e}function d(e,t,i,n){var o=[],a=0,s=0,l=0,u=r,c=0,m=0,p=[];function f(e){return i*(e.column.definition.widthGrow||1)}function g(e){return h(e.width)-i*(e.column.definition.widthShrink||0)}return e.forEach((function(e,a){var r=n?g(e):f(e);e.column.minWidth>=r?o.push(e):e.column.maxWidth&&e.column.maxWidththis.table.rowManager.element.clientHeight&&(n-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),e.forEach((function(e){var t,i,n;e.visible&&(t=e.definition.width,i=parseInt(e.minWidth),t?(n=h(t),o+=n>i?n:i,e.definition.widthShrink&&(l.push({column:e,width:n>i?n:i}),u+=e.definition.widthShrink)):(s.push({column:e,width:0}),r+=e.definition.widthGrow||1))})),a=n-o,t=Math.floor(a/r),c=d(s,a,t,!1),s.length&&c>0&&(s[s.length-1].width+=+c),s.forEach((function(e){a-=e.width})),(i=Math.abs(c)+a)>0&&u&&(c=d(l,i,Math.floor(i/u),!0)),l.length&&(l[l.length-1].width-=c),s.forEach((function(e){e.column.setWidth(e.width)})),l.forEach((function(e){e.column.setWidth(e.width)}))}},W=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e,"layout")).mode=null,o.registerTableOption("layout","fitData"),o.registerTableOption("layoutColumnsOnNewData",!1),o.registerColumnOption("widthGrow"),o.registerColumnOption("widthShrink"),o}return o(n,[{key:"initialize",value:function(){var e=this.table.options.layout;n.modes[e]?this.mode=e:(console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : "+e),this.mode="fitData"),this.table.element.setAttribute("tabulator-layout",this.mode)}},{key:"getMode",value:function(){return this.mode}},{key:"layout",value:function(){this.dispatch("layout-refreshing"),n.modes[this.mode].call(this,this.table.columnManager.columnsByIndex),this.dispatch("layout-refreshed")}}]),n}(N);W.moduleName="layout",W.modes=I;var j=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).locale="default",i.lang=!1,i.bindings={},i.langList={},i.registerTableOption("locale",!1),i.registerTableOption("langs",{}),i}return o(r,[{key:"initialize",value:function(){for(var e in this.langList=C.deepClone(r.langs),!1!==this.table.options.columnDefaults.headerFilterPlaceholder&&this.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder),this.table.options.langs)this.installLang(e,this.table.options.langs[e]);this.setLocale(this.table.options.locale),this.registerTableFunction("setLocale",this.setLocale.bind(this)),this.registerTableFunction("getLocale",this.getLocale.bind(this)),this.registerTableFunction("getLang",this.getLang.bind(this))}},{key:"setHeaderFilterPlaceholder",value:function(e){this.langList.default.headerFilters.default=e}},{key:"setHeaderFilterColumnPlaceholder",value:function(e,t){this.langList.default.headerFilters.columns[e]=t,this.lang&&!this.lang.headerFilters.columns[e]&&(this.lang.headerFilters.columns[e]=t)}},{key:"installLang",value:function(e,t){this.langList[e]?this._setLangProp(this.langList[e],t):this.langList[e]=t}},{key:"_setLangProp",value:function(t,i){for(var n in i)t[n]&&"object"==e(t[n])?this._setLangProp(t[n],i[n]):t[n]=i[n]}},{key:"setLocale",value:function(t){if(!0===(t=t||"default")&&navigator.language&&(t=navigator.language.toLowerCase()),t&&!this.langList[t]){var i=t.split("-")[0];this.langList[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",t,i),t=i):(console.warn("Localization Error - Matching locale not found, using default: ",t),t="default")}this.locale=t,this.lang=C.deepClone(this.langList.default||{}),"default"!=t&&function t(i,n){for(var o in i)"object"==e(i[o])?(n[o]||(n[o]={}),t(i[o],n[o])):n[o]=i[o]}(this.langList[t],this.lang),this.dispatchExternal("localized",this.locale,this.lang),this._executeBindings()}},{key:"getLocale",value:function(e){return this.locale}},{key:"getLang",value:function(e){return e?this.langList[e]:this.lang}},{key:"getText",value:function(e,t){var i=(e=t?e+"|"+t:e).split("|");return this._getLangElement(i,this.locale)||""}},{key:"_getLangElement",value:function(e,t){var i=this.lang;return e.forEach((function(e){var t;i&&(t=i[e],i=void 0!==t&&t)})),i}},{key:"bind",value:function(e,t){this.bindings[e]||(this.bindings[e]=[]),this.bindings[e].push(t),t(this.getText(e),this.lang)}},{key:"_executeBindings",value:function(){var e=this,t=function(t){e.bindings[t].forEach((function(i){i(e.getText(t),e.lang)}))};for(var i in this.bindings)t(i)}}]),r}(N);j.moduleName="localize",j.langs={default:{groups:{item:"item",items:"items"},columns:{},data:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All",counter:{showing:"Showing",of:"of",rows:"rows",pages:"pages"}},headerFilters:{default:"filter column...",columns:{}}}};var G=function(e){a(n,e);var i=c(n);function n(e){return t(this,n),i.call(this,e)}return o(n,[{key:"initialize",value:function(){this.registerTableFunction("tableComms",this.receive.bind(this))}},{key:"getConnections",value:function(e){var t=this,i=[];return B.lookupTable(e).forEach((function(e){t.table!==e&&i.push(e)})),i}},{key:"send",value:function(e,t,i,n){var o=this,a=this.getConnections(e);a.forEach((function(e){e.tableComms(o.table.element,t,i,n)})),!a.length&&e&&console.warn("Table Connection Error - No tables matching selector found",e)}},{key:"receive",value:function(e,t,i,n){if(this.table.modExists(t))return this.table.modules[t].commsReceived(e,i,n);console.warn("Inter-table Comms Error - no such module:",t)}}]),n}(N);G.moduleName="comms";var U=Object.freeze({__proto__:null,LayoutModule:W,LocalizeModule:j,CommsModule:G}),X=function(){function i(e,n){t(this,i),this.bindStaticFuctionality(e),this.bindModules(e,U,!0),n&&this.bindModules(e,n)}return o(i,[{key:"bindStaticFuctionality",value:function(t){t.moduleBindings={},t.extendModule=function(i,n,o){if(t.moduleBindings[i]){var a=t.moduleBindings[i][n];if(a)if("object"==e(o))for(var r in o)a[r]=o[r];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",n)}else console.warn("Module Error - module does not exist:",i)},t.registerModule=function(e){Array.isArray(e)||(e=[e]),e.forEach((function(e){t.registerModuleBinding(e)}))},t.registerModuleBinding=function(e){t.moduleBindings[e.moduleName]=e},t.findTable=function(e){var t=B.lookupTable(e,!0);return!(Array.isArray(t)&&!t.length)&&t},t.prototype.bindModules=function(){var e=[],i=[];for(var n in this.modules={},t.moduleBindings){var o=t.moduleBindings[n],a=new o(this);this.modules[n]=a,o.prototype.moduleCore?this.modulesCore.push(a):o.moduleInitOrder?e.push(a):i.push(a)}e.sort((function(e,t){return e.moduleInitOrder>t.moduleInitOrder?1:-1})),this.modulesRegular=e.concat(i)}}},{key:"bindModules",value:function(e,t,i){var n=Object.values(t);i&&n.forEach((function(e){e.prototype.moduleCore=!0})),e.registerModule(n)}}]),i}(),q=function(){function i(e,n){var o=this;t(this,i),this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.vdomHoz=null,this.externalEvents=null,this.eventBus=null,this.interactionMonitor=!1,this.browser="",this.browserSlow=!1,this.browserMobile=!1,this.rtl=!1,this.originalElement=null,this.componentFunctionBinder=new H(this),this.dataLoader=!1,this.modules={},this.modulesCore=[],this.modulesRegular=[],this.optionsList=new k(this,"table constructor"),this.initialized=!1,this.initializeElement(e)&&(this.initializeCoreSystems(n),setTimeout((function(){o._create()}))),B.register(this)}return o(i,[{key:"initializeElement",value:function(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement?(this.element=e,!0):"string"==typeof e?(this.element=document.querySelector(e),!!this.element||(console.error("Tabulator Creation Error - no element found matching selector: ",e),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",e),!1)}},{key:"initializeCoreSystems",value:function(e){this.columnManager=new T(this),this.rowManager=new F(this),this.footerManager=new P(this),this.dataLoader=new A(this),this.bindModules(),this.options=this.optionsList.generate(i.defaultOptions,e),this._clearObjectPointers(),this._mapDeprecatedFunctionality(),this.externalEvents=new O(this,this.options,this.options.debugEventsExternal),this.eventBus=new _(this.options.debugEventsInternal),this.interactionMonitor=new z(this),this.dataLoader.initialize(),this.footerManager.initialize()}},{key:"_mapDeprecatedFunctionality",value:function(){}},{key:"_clearSelection",value:function(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")}},{key:"_create",value:function(){this.externalEvents.dispatch("tableBuilding"),this.eventBus.dispatch("table-building"),this._rtlCheck(),this._buildElement(),this._initializeTable(),this._loadInitialData(),this.initialized=!0,this.externalEvents.dispatch("tableBuilt")}},{key:"_rtlCheck",value:function(){var e=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if("rtl"!==e.direction)break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}}},{key:"_clearObjectPointers",value:function(){this.options.columns=this.options.columns.slice(0),Array.isArray(this.options.data)&&!this.options.reactiveData&&(this.options.data=this.options.data.slice(0))}},{key:"_buildElement",value:function(){var t,i=this.element,n=this.options;if("TABLE"===i.tagName){this.originalElement=this.element,t=document.createElement("div");var o=i.attributes;for(var a in o)"object"==e(o[a])&&t.setAttribute(o[a].name,o[a].value);i.parentNode.replaceChild(t,i),this.element=i=t}for(i.classList.add("tabulator"),i.setAttribute("role","grid");i.firstChild;)i.removeChild(i.firstChild);n.height&&(n.height=isNaN(n.height)?n.height:n.height+"px",i.style.height=n.height),!1!==n.minHeight&&(n.minHeight=isNaN(n.minHeight)?n.minHeight:n.minHeight+"px",i.style.minHeight=n.minHeight),!1!==n.maxHeight&&(n.maxHeight=isNaN(n.maxHeight)?n.maxHeight:n.maxHeight+"px",i.style.maxHeight=n.maxHeight)}},{key:"_initializeTable",value:function(){var e=this.element,t=this.options;this.interactionMonitor.initialize(),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modulesCore.forEach((function(e){e.initialize()})),e.appendChild(this.columnManager.getElement()),e.appendChild(this.rowManager.getElement()),t.footerElement&&this.footerManager.activate(),t.autoColumns&&t.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modulesRegular.forEach((function(e){e.initialize()})),this.columnManager.setColumns(t.columns),this.eventBus.dispatch("table-built")}},{key:"_loadInitialData",value:function(){this.dataLoader.load(this.options.data)}},{key:"destroy",value:function(){var e=this.element;for(B.deregister(this),this.eventBus.dispatch("table-destroy"),this.rowManager.rows.forEach((function(e){e.wipe()})),this.rowManager.rows=[],this.rowManager.activeRows=[],this.rowManager.displayRows=[];e.firstChild;)e.removeChild(e.firstChild);e.classList.remove("tabulator")}},{key:"_detectBrowser",value:function(){var e=navigator.userAgent||navigator.vendor||window.opera;e.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):e.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):e.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.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(e)||/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(e.slice(0,4))}},{key:"blockRedraw",value:function(){return this.rowManager.blockRedraw()}},{key:"restoreRedraw",value:function(){return this.rowManager.restoreRedraw()}},{key:"setData",value:function(e,t,i){if(this.initialized)return this.dataLoader.load(e,t,i,!1);console.warn("setData failed - table not yet initialized. To set initial data please use the 'data' property in the table constructor.")}},{key:"clearData",value:function(){this.dataLoader.blockActiveLoad(),this.rowManager.clearData()}},{key:"getData",value:function(e){return this.rowManager.getData(e)}},{key:"getDataCount",value:function(e){return this.rowManager.getDataCount(e)}},{key:"replaceData",value:function(e,t,i){if(this.initialized)return this.dataLoader.load(e,t,i,!0,!0);console.warn("replaceData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}},{key:"updateData",value:function(e){var t=this,i=0;if(this.initialized)return new Promise((function(n,o){t.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e?e.forEach((function(e){var o=t.rowManager.findRow(e[t.options.index]);o&&(i++,o.updateData(e).then((function(){--i||n()})))})):(console.warn("Update Error - No data provided"),o("Update Error - No data provided"))}));console.warn("updateData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}},{key:"addData",value:function(e,t,i){var n=this;if(this.initialized)return new Promise((function(o,a){n.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e?n.rowManager.addRows(e,t,i).then((function(e){var t=[];e.forEach((function(e){t.push(e.getComponent())})),o(t)})):(console.warn("Update Error - No data provided"),a("Update Error - No data provided"))}));console.warn("addData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}},{key:"updateOrAddData",value:function(e){var t=this,i=[],n=0;if(this.initialized)return new Promise((function(o,a){t.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e?e.forEach((function(e){var a=t.rowManager.findRow(e[t.options.index]);n++,a?a.updateData(e).then((function(){n--,i.push(a.getComponent()),n||o(i)})):t.rowManager.addRows(e).then((function(e){n--,i.push(e[0].getComponent()),n||o(i)}))})):(console.warn("Update Error - No data provided"),a("Update Error - No data provided"))}));console.warn("updateOrAddData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}},{key:"getRow",value:function(e){var t=this.rowManager.findRow(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}},{key:"getRowFromPosition",value:function(e,t){var i=this.rowManager.getRowFromPosition(e,t);return i?i.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}},{key:"deleteRow",value:function(e){var t=this,i=[];Array.isArray(e)||(e=[e]);var n,o=p(e);try{for(o.s();!(n=o.n()).done;){var a=n.value,r=this.rowManager.findRow(a,!0);if(!r)return console.error("Delete Error - No matching row found:",a),Promise.reject("Delete Error - No matching row found");i.push(r)}}catch(e){o.e(e)}finally{o.f()}return i.sort((function(e,i){return t.rowManager.rows.indexOf(e)>t.rowManager.rows.indexOf(i)?1:-1})),i.forEach((function(e){e.delete()})),this.rowManager.reRenderInPosition(),Promise.resolve()}},{key:"addRow",value:function(e,t,i){if(this.initialized)return"string"==typeof e&&(e=JSON.parse(e)),this.rowManager.addRows(e,t,i).then((function(e){return e[0].getComponent()}));console.warn("addRow failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}},{key:"updateOrAddRow",value:function(e,t){var i=this.rowManager.findRow(e);return"string"==typeof t&&(t=JSON.parse(t)),i?i.updateData(t).then((function(){return i.getComponent()})):this.rowManager.addRows(t).then((function(e){return e[0].getComponent()}))}},{key:"updateRow",value:function(e,t){var i=this.rowManager.findRow(e);return"string"==typeof t&&(t=JSON.parse(t)),i?i.updateData(t).then((function(){return Promise.resolve(i.getComponent())})):(console.warn("Update Error - No matching row found:",e),Promise.reject("Update Error - No matching row found"))}},{key:"scrollToRow",value:function(e,t,i){var n=this.rowManager.findRow(e);return n?this.rowManager.scrollToRow(n,t,i):(console.warn("Scroll Error - No matching row found:",e),Promise.reject("Scroll Error - No matching row found"))}},{key:"moveRow",value:function(e,t,i){var n=this.rowManager.findRow(e);n?n.moveToRow(t,i):console.warn("Move Error - No matching row found:",e)}},{key:"getRows",value:function(e){return this.rowManager.getComponents(e)}},{key:"getRowPosition",value:function(e,t){var i=this.rowManager.findRow(e);return i?this.rowManager.getRowPosition(i,t):(console.warn("Position Error - No matching row found:",e),!1)}},{key:"setColumns",value:function(e){this.initialized?this.columnManager.setColumns(e):console.warn("setColumns failed - table not yet initialized. To set initial data please use the 'columns' property in the table constructor.")}},{key:"getColumns",value:function(e){return this.columnManager.getComponents(e)}},{key:"getColumn",value:function(e){var t=this.columnManager.findColumn(e);return t?t.getComponent():(console.warn("Find Error - No matching column found:",e),!1)}},{key:"getColumnDefinitions",value:function(){return this.columnManager.getDefinitionTree()}},{key:"showColumn",value:function(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Show Error - No matching column found:",e),!1;t.show()}},{key:"hideColumn",value:function(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Hide Error - No matching column found:",e),!1;t.hide()}},{key:"toggleColumn",value:function(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Visibility Toggle Error - No matching column found:",e),!1;t.visible?t.hide():t.show()}},{key:"addColumn",value:function(e,t,i){var n=this.columnManager.findColumn(i);return this.columnManager.addColumn(e,t,n).then((function(e){return e.getComponent()}))}},{key:"deleteColumn",value:function(e){var t=this.columnManager.findColumn(e);return t?t.delete():(console.warn("Column Delete Error - No matching column found:",e),Promise.reject())}},{key:"updateColumnDefinition",value:function(e,t){var i=this.columnManager.findColumn(e);return i?i.updateDefinition(t):(console.warn("Column Update Error - No matching column found:",e),Promise.reject())}},{key:"moveColumn",value:function(e,t,i){var n=this.columnManager.findColumn(e),o=this.columnManager.findColumn(t);n?o?this.columnManager.moveColumn(n,o,i):console.warn("Move Error - No matching column found:",o):console.warn("Move Error - No matching column found:",e)}},{key:"scrollToColumn",value:function(e,t,i){var n=this;return new Promise((function(o,a){var r=n.columnManager.findColumn(e);return r?n.columnManager.scrollToColumn(r,t,i):(console.warn("Scroll Error - No matching column found:",e),Promise.reject("Scroll Error - No matching column found"))}))}},{key:"redraw",value:function(e){this.initialized?(this.columnManager.redraw(e),this.rowManager.redraw(e)):console.warn("redraw failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}},{key:"setHeight",value:function(e){this.options.height=isNaN(e)?e:e+"px",this.element.style.height=this.options.height,this.rowManager.initializeRenderer(),this.rowManager.redraw()}},{key:"on",value:function(e,t){this.externalEvents.subscribe(e,t)}},{key:"off",value:function(e,t){this.externalEvents.unsubscribe(e,t)}},{key:"dispatchEvent",value:function(){var e,t=Array.from(arguments);t.shift();(e=this.externalEvents).dispatch.apply(e,arguments)}},{key:"modExists",value:function(e,t){return!!this.modules[e]||(t&&console.error("Tabulator Module Not Installed: "+e),!1)}},{key:"module",value:function(e){var t=this.modules[e];return t||console.error("Tabulator module not installed: "+e),t}}]),i}();q.defaultOptions={debugEventsExternal:!1,debugEventsInternal:!1,debugInvalidOptions:!0,height:!1,minHeight:!1,maxHeight:!1,columnHeaderVertAlign:"top",columns:[],columnDefaults:{},data:!1,autoColumns:!1,autoColumnsDefinitions:!1,nestedFieldSeparator:".",tooltipGenerationMode:"load",footerElement:!1,index:"id",textDirection:"auto",addRowPos:"bottom",headerVisible:!0,renderVertical:"virtual",renderHorizontal:"basic",renderVerticalBuffer:0,scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,placeholder:!1,dataLoader:!0,dataLoaderLoading:!1,dataLoaderError:!1,dataLoaderErrorTimeout:3e3,dataSendParams:{},dataReceiveParams:{}},new X(q);var K=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).allowedTypes=["","data","download","clipboard","print","htmlOutput"],i.registerColumnOption("accessor"),i.registerColumnOption("accessorParams"),i.registerColumnOption("accessorData"),i.registerColumnOption("accessorDataParams"),i.registerColumnOption("accessorDownload"),i.registerColumnOption("accessorDownloadParams"),i.registerColumnOption("accessorClipboard"),i.registerColumnOption("accessorClipboardParams"),i.registerColumnOption("accessorPrint"),i.registerColumnOption("accessorPrintParams"),i.registerColumnOption("accessorHtmlOutput"),i.registerColumnOption("accessorHtmlOutputParams"),i}return o(r,[{key:"initialize",value:function(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-retrieve",this.transformRow.bind(this))}},{key:"initializeColumn",value:function(e){var t=this,i=!1,n={};this.allowedTypes.forEach((function(o){var a,r="accessor"+(o.charAt(0).toUpperCase()+o.slice(1));e.definition[r]&&(a=t.lookupAccessor(e.definition[r]))&&(i=!0,n[r]={accessor:a,params:e.definition[r+"Params"]||{}})})),i&&(e.modules.accessor=n)}},{key:"lookupAccessor",value:function(t){var i=!1;switch(e(t)){case"string":r.accessors[t]?i=r.accessors[t]:console.warn("Accessor Error - No such accessor found, ignoring: ",t);break;case"function":i=t}return i}},{key:"transformRow",value:function(e,t){var i="accessor"+(t.charAt(0).toUpperCase()+t.slice(1)),n=e.getComponent(),o=C.deepClone(e.data||{});return this.table.columnManager.traverse((function(e){var a,r,s,l;e.modules.accessor&&(r=e.modules.accessor[i]||e.modules.accessor.accessor||!1)&&"undefined"!=(a=e.getFieldValue(o))&&(l=e.getComponent(),s="function"==typeof r.params?r.params(a,o,t,l,n):r.params,e.setFieldValue(o,r.accessor(a,o,t,s,l,n)))})),o}}]),r}(N);K.moduleName="accessor",K.accessors={};function Y(t,i){var n=[];if(i=i||"",Array.isArray(t))t.forEach((function(e,t){n=n.concat(Y(e,i?i+"["+t+"]":t))}));else if("object"===e(t))for(var o in t)n=n.concat(Y(t[o],i?i+"["+o+"]":o));else n.push({key:i,value:t});return n}function J(e){var t=Y(e),i=[];return t.forEach((function(e){i.push(encodeURIComponent(e.key)+"="+encodeURIComponent(e.value))})),i.join("&")}function $(t,i){var n=[];if(i=i||"",Array.isArray(t))t.forEach((function(e,t){n=n.concat($(e,i?i+"["+t+"]":t))}));else if("object"===e(t))for(var o in t)n=n.concat($(t[o],i?i+"["+o+"]":o));else n.push({key:i,value:t});return n}var Q={json:{headers:{"Content-Type":"application/json"},body:function(e,t,i){return JSON.stringify(i)}},form:{headers:{},body:function(e,t,i){var n=$(i),o=new FormData;return n.forEach((function(e){o.append(e.key,e.value)})),o}}},Z=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).config={},o.url="",o.urlGenerator=!1,o.params=!1,o.loaderPromise=!1,o.registerTableOption("ajaxURL",!1),o.registerTableOption("ajaxURLGenerator",!1),o.registerTableOption("ajaxParams",{}),o.registerTableOption("ajaxConfig","get"),o.registerTableOption("ajaxContentType","form"),o.registerTableOption("ajaxRequestFunc",!1),o.registerTableOption("ajaxRequesting",(function(){})),o.registerTableOption("ajaxResponse",!1),o.contentTypeFormatters=n.contentTypeFormatters,o}return o(n,[{key:"initialize",value:function(){this.loaderPromise=this.table.options.ajaxRequestFunc||n.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||n.defaultURLGenerator,this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.setDefaultConfig(this.table.options.ajaxConfig),this.registerTableFunction("getAjaxUrl",this.getUrl.bind(this)),this.subscribe("data-loading",this.requestDataCheck.bind(this)),this.subscribe("data-params",this.requestParams.bind(this)),this.subscribe("data-load",this.requestData.bind(this))}},{key:"requestParams",value:function(e,t,i,n){var o=this.table.options.ajaxParams;return o&&("function"==typeof o&&(o=o.call(this.table)),n=Object.assign(n,o)),n}},{key:"requestDataCheck",value:function(e,t,i,n){return!((e||!this.url)&&"string"!=typeof e)}},{key:"requestData",value:function(e,t,i,n,o){var a;return!o&&this.requestDataCheck(e)?(e&&this.setUrl(e),a=this.generateConfig(i),this.sendRequest(this.url,t,a)):o}},{key:"setDefaultConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=Object.assign({},n.defaultConfig),"string"==typeof e?this.config.method=e:Object.assign(this.config,e)}},{key:"generateConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},this.config);return"string"==typeof e?t.method=e:Object.assign(t,e),t}},{key:"setUrl",value:function(e){this.url=e}},{key:"getUrl",value:function(){return this.url}},{key:"sendRequest",value:function(e,t,i){var n=this;return!1!==this.table.options.ajaxRequesting.call(this.table,e,t)?this.loaderPromise(e,i,t).then((function(i){return n.table.options.ajaxResponse&&(i=n.table.options.ajaxResponse.call(n.table,e,t,i)),i})):Promise.reject()}}]),n}(N);Z.moduleName="ajax",Z.defaultConfig={method:"GET"},Z.defaultURLGenerator=function(e,t,i){return e&&i&&Object.keys(i).length&&(t.method&&"get"!=t.method.toLowerCase()||(t.method="get",e+=(e.includes("?")?"&":"?")+J(i))),e},Z.defaultLoaderPromise=function(t,i,n){var o,a=this;return new Promise((function(r,s){if(t=a.urlGenerator.call(a.table,t,i,n),"GET"!=i.method.toUpperCase())if(o="object"===e(a.table.options.ajaxContentType)?a.table.options.ajaxContentType:a.contentTypeFormatters[a.table.options.ajaxContentType]){for(var l in o.headers)i.headers||(i.headers={}),void 0===i.headers[l]&&(i.headers[l]=o.headers[l]);i.body=o.body.call(a,t,i,n)}else console.warn("Ajax Error - Invalid ajaxContentType value:",a.table.options.ajaxContentType);t?(void 0===i.headers&&(i.headers={}),void 0===i.headers.Accept&&(i.headers.Accept="application/json"),void 0===i.headers["X-Requested-With"]&&(i.headers["X-Requested-With"]="XMLHttpRequest"),void 0===i.mode&&(i.mode="cors"),"cors"==i.mode?(void 0===i.headers.Origin&&(i.headers.Origin=window.location.origin),void 0===i.credentials&&(i.credentials="same-origin")):void 0===i.credentials&&(i.credentials="include"),fetch(t,i).then((function(e){e.ok?e.json().then((function(e){r(e)})).catch((function(e){s(e),console.warn("Ajax Load Error - Invalid JSON returned",e)})):(console.error("Ajax Load Error - Connection Error: "+e.status,e.statusText),s(e))})).catch((function(e){console.error("Ajax Load Error - Connection Error: ",e),s(e)}))):(console.warn("Ajax Load Error - No URL Set"),r([]))}))},Z.contentTypeFormatters=Q;var ee=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).mode=!0,i.pasteParser=function(){},i.pasteAction=function(){},i.customSelection=!1,i.rowRange=!1,i.blocked=!0,i.registerTableOption("clipboard",!1),i.registerTableOption("clipboardCopyStyled",!0),i.registerTableOption("clipboardCopyConfig",!1),i.registerTableOption("clipboardCopyFormatter",!1),i.registerTableOption("clipboardCopyRowRange","active"),i.registerTableOption("clipboardPasteParser","table"),i.registerTableOption("clipboardPasteAction","insert"),i.registerColumnOption("clipboard"),i.registerColumnOption("titleClipboard"),i}return o(r,[{key:"initialize",value:function(){var e=this;this.mode=this.table.options.clipboard,this.rowRange=this.table.options.clipboardCopyRowRange,!0!==this.mode&&"copy"!==this.mode||this.table.element.addEventListener("copy",(function(t){var i,n;if(!e.blocked){if(t.preventDefault(),e.customSelection)i=e.customSelection,e.table.options.clipboardCopyFormatter&&(i=e.table.options.clipboardCopyFormatter("plain",i));else{var o=e.table.modules.export.generateExportList(e.table.options.clipboardCopyConfig,e.table.options.clipboardCopyStyled,e.rowRange,"clipboard");i=(n=e.table.modules.export.genereateHTMLTable(o))?e.generatePlainContent(o):"",e.table.options.clipboardCopyFormatter&&(i=e.table.options.clipboardCopyFormatter("plain",i),n=e.table.options.clipboardCopyFormatter("html",n))}window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",i):t.clipboardData&&t.clipboardData.setData?(t.clipboardData.setData("text/plain",i),n&&t.clipboardData.setData("text/html",n)):t.originalEvent&&t.originalEvent.clipboardData.setData&&(t.originalEvent.clipboardData.setData("text/plain",i),n&&t.originalEvent.clipboardData.setData("text/html",n)),e.dispatchExternal("clipboardCopied",i,n),e.reset()}})),!0!==this.mode&&"paste"!==this.mode||this.table.element.addEventListener("paste",(function(t){e.paste(t)})),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction),this.registerTableFunction("copyToClipboard",this.copy.bind(this))}},{key:"reset",value:function(){this.blocked=!0,this.customSelection=!1}},{key:"generatePlainContent",value:function(t){var i=[];return t.forEach((function(t){var n=[];t.columns.forEach((function(i){var o="";if(i)if("group"===t.type&&(i.value=i.component.getKey()),null===i.value)o="";else switch(e(i.value)){case"object":o=JSON.stringify(i.value);break;case"undefined":o="";break;default:o=i.value}n.push(o)})),i.push(n.join("\t"))})),i.join("\n")}},{key:"copy",value:function(e,t){var i,n;this.blocked=!1,this.customSelection=!1,!0!==this.mode&&"copy"!==this.mode||(this.rowRange=e||this.table.options.clipboardCopyRowRange,void 0!==window.getSelection&&void 0!==document.createRange?((e=document.createRange()).selectNodeContents(this.table.element),(i=window.getSelection()).toString()&&t&&(this.customSelection=i.toString()),i.removeAllRanges(),i.addRange(e)):void 0!==document.selection&&void 0!==document.body.createTextRange&&((n=document.body.createTextRange()).moveToElementText(this.table.element),n.select()),document.execCommand("copy"),i&&i.removeAllRanges())}},{key:"setPasteAction",value:function(t){switch(e(t)){case"string":this.pasteAction=r.pasteActions[t],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",t);break;case"function":this.pasteAction=t}}},{key:"setPasteParser",value:function(t){switch(e(t)){case"string":this.pasteParser=r.pasteParsers[t],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",t);break;case"function":this.pasteParser=t}}},{key:"paste",value:function(e){var t,i,n;this.checkPaseOrigin(e)&&(t=this.getPasteData(e),(i=this.pasteParser.call(this,t))?(e.preventDefault(),this.table.modExists("mutator")&&(i=this.mutateData(i)),n=this.pasteAction.call(this,i),this.dispatchExternal("clipboardPasted",t,i,n)):this.dispatchExternal("clipboardPasteError",t))}},{key:"mutateData",value:function(e){var t=this,i=[];return Array.isArray(e)?e.forEach((function(e){i.push(t.table.modules.mutator.transformRow(e,"clipboard"))})):i=e,i}},{key:"checkPaseOrigin",value:function(e){var t=!0;return("DIV"!=e.target.tagName||this.table.modules.edit.currentCell)&&(t=!1),t}},{key:"getPasteData",value:function(e){var t;return window.clipboardData&&window.clipboardData.getData?t=window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?t=e.clipboardData.getData("text/plain"):e.originalEvent&&e.originalEvent.clipboardData.getData&&(t=e.originalEvent.clipboardData.getData("text/plain")),t}}]),r}(N);ee.moduleName="clipboard",ee.pasteActions={replace:function(e){return this.table.setData(e)},update:function(e){return this.table.updateOrAddData(e)},insert:function(e){return this.table.addData(e)}},ee.pasteParsers={table:function(e){var t=[],i=!0,n=this.table.columnManager.columns,o=[],a=[];return(e=e.split("\n")).forEach((function(e){t.push(e.split("\t"))})),!(!t.length||1===t.length&&t[0].length<2)&&(t[0].forEach((function(e){var t=n.find((function(t){return e&&t.definition.title&&e.trim()&&t.definition.title.trim()===e.trim()}));t?o.push(t):i=!1})),i||(i=!0,o=[],t[0].forEach((function(e){var t=n.find((function(t){return e&&t.field&&e.trim()&&t.field.trim()===e.trim()}));t?o.push(t):i=!1})),i||(o=this.table.columnManager.columnsByIndex)),i&&t.shift(),t.forEach((function(e){var t={};e.forEach((function(e,i){o[i]&&(t[o[i].field]=e)})),a.push(t)})),a)}};var te=function(){function e(i){return t(this,e),this._row=i,new Proxy(this,{get:function(e,t,i){return void 0!==e[t]?e[t]:e._row.table.componentFunctionBinder.handle("row",e._row,t)}})}return o(e,[{key:"getData",value:function(e){return this._row.getData(e)}},{key:"getElement",value:function(){return this._row.getElement()}},{key:"getTable",value:function(){return this._row.table}},{key:"getCells",value:function(){var e=[];return this._row.getCells().forEach((function(t){e.push(t.getComponent())})),e}},{key:"getCell",value:function(e){var t=this._row.getCell(e);return!!t&&t.getComponent()}},{key:"_getSelf",value:function(){return this._row}}]),e}(),ie={avg:function(e,t,i){var n=0,o=void 0!==i.precision?i.precision:2;return e.length&&(n=e.reduce((function(e,t){return Number(e)+Number(t)})),n/=e.length,n=!1!==o?n.toFixed(o):n),parseFloat(n).toString()},max:function(e,t,i){var n=null,o=void 0!==i.precision&&i.precision;return e.forEach((function(e){((e=Number(e))>n||null===n)&&(n=e)})),null!==n?!1!==o?n.toFixed(o):n:""},min:function(e,t,i){var n=null,o=void 0!==i.precision&&i.precision;return e.forEach((function(e){((e=Number(e))"),i.dataTreeExpandElement?"string"==typeof i.dataTreeExpandElement?((t=document.createElement("div")).innerHTML=i.dataTreeExpandElement,this.expandEl=t.firstChild):this.expandEl=i.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="
"),e(i.dataTreeStartExpanded)){case"boolean":this.startOpen=function(e,t){return i.dataTreeStartExpanded};break;case"function":this.startOpen=i.dataTreeStartExpanded;break;default:this.startOpen=function(e,t){return i.dataTreeStartExpanded[t]}}this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("row-deleted",this.rowDelete.bind(this),0),this.subscribe("row-data-changed",this.rowDataChanged.bind(this),10),this.subscribe("cell-value-updated",this.cellValueChanged.bind(this)),this.subscribe("edit-cancelled",this.cellValueChanged.bind(this)),this.subscribe("column-moving-rows",this.columnMoving.bind(this)),this.subscribe("table-built",this.initializeElementField.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),30)}}},{key:"initializeElementField",value:function(){var e=this.table.columnManager.getFirstVisibleColumn();this.elementField=this.table.options.dataTreeElementColumn||!!e&&e.field}},{key:"getRowChildren",value:function(e){return this.getTreeChildren(e,!0)}},{key:"columnMoving",value:function(){var e=this,t=[];return this.table.rowManager.rows.forEach((function(i){t=t.concat(e.getTreeChildren(i,!1,!0))})),t}},{key:"rowDataChanged",value:function(e,t,i){this.redrawNeeded(i)&&(this.initializeRow(e),t&&(this.layoutRow(e),this.refreshData(!0)))}},{key:"cellValueChanged",value:function(e){e.column.getField()===this.elementField&&this.layoutRow(e.row)}},{key:"initializeRow",value:function(t){var i=t.getData()[this.field],n=Array.isArray(i),o=n||!n&&"object"===e(i)&&null!==i;!o&&t.modules.dataTree&&t.modules.dataTree.branchEl&&t.modules.dataTree.branchEl.parentNode.removeChild(t.modules.dataTree.branchEl),!o&&t.modules.dataTree&&t.modules.dataTree.controlEl&&t.modules.dataTree.controlEl.parentNode.removeChild(t.modules.dataTree.controlEl),t.modules.dataTree={index:t.modules.dataTree?t.modules.dataTree.index:0,open:!!o&&(t.modules.dataTree?t.modules.dataTree.open:this.startOpen(t.getComponent(),0)),controlEl:!(!t.modules.dataTree||!o)&&t.modules.dataTree.controlEl,branchEl:!(!t.modules.dataTree||!o)&&t.modules.dataTree.branchEl,parent:!!t.modules.dataTree&&t.modules.dataTree.parent,children:o}}},{key:"reinitializeRowChildren",value:function(e){this.getTreeChildren(e,!1,!0).forEach((function(e){e.reinitialize(!0)}))}},{key:"layoutRow",value:function(e){var t=(this.elementField?e.getCell(this.elementField):e.getCells()[0]).getElement(),i=e.modules.dataTree;i.branchEl&&(i.branchEl.parentNode&&i.branchEl.parentNode.removeChild(i.branchEl),i.branchEl=!1),i.controlEl&&(i.controlEl.parentNode&&i.controlEl.parentNode.removeChild(i.controlEl),i.controlEl=!1),this.generateControlElement(e,t),e.getElement().classList.add("tabulator-tree-level-"+i.index),i.index&&(this.branchEl?(i.branchEl=this.branchEl.cloneNode(!0),t.insertBefore(i.branchEl,t.firstChild),this.table.rtl?i.branchEl.style.marginRight=(i.branchEl.offsetWidth+i.branchEl.style.marginLeft)*(i.index-1)+i.index*this.indent+"px":i.branchEl.style.marginLeft=(i.branchEl.offsetWidth+i.branchEl.style.marginRight)*(i.index-1)+i.index*this.indent+"px"):this.table.rtl?t.style.paddingRight=parseInt(window.getComputedStyle(t,null).getPropertyValue("padding-right"))+i.index*this.indent+"px":t.style.paddingLeft=parseInt(window.getComputedStyle(t,null).getPropertyValue("padding-left"))+i.index*this.indent+"px")}},{key:"generateControlElement",value:function(e,t){var i=this,n=e.modules.dataTree,o=(t=t||e.getCells()[0].getElement(),n.controlEl);!1!==n.children&&(n.open?(n.controlEl=this.collapseEl.cloneNode(!0),n.controlEl.addEventListener("click",(function(t){t.stopPropagation(),i.collapseRow(e)}))):(n.controlEl=this.expandEl.cloneNode(!0),n.controlEl.addEventListener("click",(function(t){t.stopPropagation(),i.expandRow(e)}))),n.controlEl.addEventListener("mousedown",(function(e){e.stopPropagation()})),o&&o.parentNode===t?o.parentNode.replaceChild(n.controlEl,o):t.insertBefore(n.controlEl,t.firstChild))}},{key:"setDisplayIndex",value:function(e){this.displayIndex=e}},{key:"getDisplayIndex",value:function(){return this.displayIndex}},{key:"getRows",value:function(e){var t=this,i=[];return e.forEach((function(e,n){var o;i.push(e),e instanceof L&&(e.create(),(o=e.modules.dataTree.children).index||!1===o.children||t.getChildren(e).forEach((function(e){e.create(),i.push(e)})))})),i}},{key:"getChildren",value:function(e,t){var i=this,n=e.modules.dataTree,o=[],a=[];return!1!==n.children&&(n.open||t)&&(Array.isArray(n.children)||(n.children=this.generateChildren(e)),o=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(n.children):n.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(o),o.forEach((function(e){a.push(e),i.getChildren(e).forEach((function(e){a.push(e)}))}))),a}},{key:"generateChildren",value:function(e){var t=this,i=[],n=e.getData()[this.field];return Array.isArray(n)||(n=[n]),n.forEach((function(n){var o=new L(n||{},t.table.rowManager);o.create(),o.modules.dataTree.index=e.modules.dataTree.index+1,o.modules.dataTree.parent=e,o.modules.dataTree.children&&(o.modules.dataTree.open=t.startOpen(o.getComponent(),o.modules.dataTree.index)),i.push(o)})),i}},{key:"expandRow",value:function(e,t){var i=e.modules.dataTree;!1!==i.children&&(i.open=!0,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowExpanded",e.getComponent(),e.modules.dataTree.index))}},{key:"collapseRow",value:function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open=!1,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowCollapsed",e.getComponent(),e.modules.dataTree.index))}},{key:"toggleRow",value:function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open?this.collapseRow(e):this.expandRow(e))}},{key:"isRowExpanded",value:function(e){return e.modules.dataTree.open}},{key:"getTreeParent",value:function(e){return!!e.modules.dataTree.parent&&e.modules.dataTree.parent.getComponent()}},{key:"getFilteredTreeChildren",value:function(e){var t=e.modules.dataTree,i=[];return t.children&&(Array.isArray(t.children)||(t.children=this.generateChildren(e)),(this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(t.children):t.children).forEach((function(e){e instanceof L&&i.push(e)}))),i}},{key:"rowDelete",value:function(e){var t,i=e.modules.dataTree.parent;i&&(!1!==(t=this.findChildIndex(e,i))&&i.data[this.field].splice(t,1),i.data[this.field].length||delete i.data[this.field],this.initializeRow(i),this.layoutRow(i)),this.refreshData(!0)}},{key:"addTreeChildRow",value:function(e,t,i,n){var o=!1;"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),void 0!==n&&!1!==(o=this.findChildIndex(n,e))&&e.data[this.field].splice(i?o:o+1,0,t),!1===o&&(i?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.refreshData(!0)}},{key:"findChildIndex",value:function(t,i){var n=this,o=!1;return"object"==e(t)?t instanceof L?o=t.data:t instanceof RowComponent?o=t._getSelf().data:"undefined"!=typeof HTMLElement&&t instanceof HTMLElement&&i.modules.dataTree&&(o=i.modules.dataTree.children.find((function(e){return e instanceof L&&e.element===t})))&&(o=o.data):o=null!=t&&i.data[this.field].find((function(e){return e.data[n.table.options.index]==t})),o&&(Array.isArray(i.data[this.field])&&(o=i.data[this.field].indexOf(o)),-1==o&&(o=!1)),o}},{key:"getTreeChildren",value:function(e,t,i){var n=this,o=e.modules.dataTree,a=[];return o.children&&(Array.isArray(o.children)||(o.children=this.generateChildren(e)),o.children.forEach((function(e){e instanceof L&&(a.push(t?e.getComponent():e),i&&(a=a.concat(n.getTreeChildren(e,t,i))))}))),a}},{key:"getChildField",value:function(){return this.field}},{key:"redrawNeeded",value:function(e){return!!this.field&&void 0!==e[this.field]||!!this.elementField&&void 0!==e[this.elementField]}}]),r}(N);oe.moduleName="dataTree";var ae={csv:function(t,i,n){var o=i&&i.delimiter?i.delimiter:",",a=[],r=[];t.forEach((function(t){var i=[];switch(t.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":t.columns.forEach((function(e,t){e&&1===e.depth&&(r[t]=void 0===e.value||null===e.value?"":'"'+String(e.value).split('"').join('""')+'"')}));break;case"row":t.columns.forEach((function(t){if(t){switch(e(t.value)){case"object":t.value=JSON.stringify(t.value);break;case"undefined":case"null":t.value=""}i.push('"'+String(t.value).split('"').join('""')+'"')}})),a.push(i.join(o))}})),r.length&&a.unshift(r.join(o)),a=a.join("\n"),i.bom&&(a="\ufeff"+a),n(a,"text/csv")},json:function(e,t,i){var n=[];e.forEach((function(e){var t={};switch(e.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":e.columns.forEach((function(e){e&&(t[e.component.getTitleDownload()||e.component.getField()]=e.value)})),n.push(t)}})),i(n=JSON.stringify(n,null,"\t"),"application/json")},jsonLines:function(e,t,i){var n=[];e.forEach((function(e){var t={};switch(e.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":e.columns.forEach((function(e){e&&(t[e.component.getTitleDownload()||e.component.getField()]=e.value)})),n.push(JSON.stringify(t))}})),i(n.join("\n"),"application/x-ndjson")},pdf:function(t,i,n){var o=[],a=[],r={},s=i.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},l=i.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},u=i.jsPDF||{},c=i&&i.title?i.title:"";function h(t,i){var n=[];return t.columns.forEach((function(t){var o;if(t){switch(e(t.value)){case"object":t.value=JSON.stringify(t.value);break;case"undefined":case"null":t.value=""}o={content:t.value,colSpan:t.width,rowSpan:t.height},i&&(o.styles=i),n.push(o)}})),n}u.orientation||(u.orientation=i.orientation||"landscape"),u.unit||(u.unit="pt"),t.forEach((function(e){switch(e.type){case"header":o.push(h(e));break;case"group":a.push(h(e,s));break;case"calc":a.push(h(e,l));break;case"row":a.push(h(e))}}));var d=new jspdf.jsPDF(u);i&&i.autoTable&&(r="function"==typeof i.autoTable?i.autoTable(d)||{}:i.autoTable),c&&(r.didDrawPage=function(e){d.text(c,40,30)}),r.head=o,r.body=a,d.autoTable(r),i&&i.documentProcessing&&i.documentProcessing(d),n(d.output("arraybuffer"),"application/pdf")},xlsx:function(t,i,n){var o=i.sheetName||"Sheet1",a=XLSX.utils.book_new(),r=new f(this);function s(){var i=[],n=[],o={},a={s:{c:0,r:0},e:{c:t[0]?t[0].columns.reduce((function(e,t){return e+(t&&t.width?t.width:1)}),0):0,r:t.length}};return t.forEach((function(t,o){var a=[];t.columns.forEach((function(t,i){t?(a.push(t.value instanceof Date||"object"!==e(t.value)?t.value:JSON.stringify(t.value)),(t.width>1||t.height>-1)&&(t.height>1||t.width>1)&&n.push({s:{r:o,c:i},e:{r:o+t.height-1,c:i+t.width-1}})):a.push("")})),i.push(a)})),XLSX.utils.sheet_add_aoa(o,i),o["!ref"]=XLSX.utils.encode_range(a),n.length&&(o["!merges"]=n),o}if(a.SheetNames=[],a.Sheets={},i.sheetOnly)n(s());else{if(i.sheets)for(var l in i.sheets)!0===i.sheets[l]?(a.SheetNames.push(l),a.Sheets[l]=s()):(a.SheetNames.push(l),r.commsSend(i.sheets[l],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:this.active,intercept:function(e){a.Sheets[l]=e}}));else a.SheetNames.push(o),a.Sheets[o]=s();i.documentProcessing&&(a=i.documentProcessing(a)),n(function(e){for(var t=new ArrayBuffer(e.length),i=new Uint8Array(t),n=0;n!=e.length;++n)i[n]=255&e.charCodeAt(n);return t}(XLSX.write(a,{bookType:"xlsx",bookSST:!0,type:"binary"})),"application/octet-stream")}},html:function(e,t,i){this.modExists("export",!0)&&i(this.modules.export.genereateHTMLTable(e),"text/html")}},re=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).registerTableOption("downloadReady",(function(e,t){return t})),o.registerTableOption("downloadConfig",{}),o.registerTableOption("downloadRowRange","active"),o.registerColumnOption("download"),o.registerColumnOption("titleDownload"),o}return o(n,[{key:"initialize",value:function(){this.registerTableFunction("download",this.download.bind(this)),this.registerTableFunction("downloadToTab",this.downloadToTab.bind(this))}},{key:"downloadToTab",value:function(e,t,i,n){this.download(e,t,i,n,!0)}},{key:"download",value:function(e,t,i,o,a){var r=!1;if("function"==typeof e?r=e:n.downloaders[e]?r=n.downloaders[e]:console.warn("Download Error - No such download type found: ",e),r){var s=this.generateExportList(o);r.call(this.table,s,i||{},function(i,n){a?!0===a?this.triggerDownload(i,n,e,t,!0):a(i):this.triggerDownload(i,n,e,t)}.bind(this))}}},{key:"generateExportList",value:function(e){var t=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,e||this.table.options.downloadRowRange,"download"),i=this.table.options.groupHeaderDownload;return i&&!Array.isArray(i)&&(i=[i]),t.forEach((function(e){var t;"group"===e.type&&(t=e.columns[0],i&&i[e.indent]&&(t.value=i[e.indent](t.value,e.component._group.getRowCount(),e.component._group.getData(),e.component)))})),t}},{key:"triggerDownload",value:function(e,t,i,n,o){var a=document.createElement("a"),r=new Blob([e],{type:t});n=n||"Tabulator."+("function"==typeof i?"txt":i);(r=this.table.options.downloadReady(e,r))&&(o?window.open(window.URL.createObjectURL(r)):navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(r,n):(a.setAttribute("href",window.URL.createObjectURL(r)),a.setAttribute("download",n),a.style.display="none",document.body.appendChild(a),a.click(),document.body.removeChild(a)),this.dispatchExternal("downloadComplete"))}},{key:"commsReceived",value:function(e,t,i){switch(t){case"intercept":this.download(i.type,"",i.options,i.active,i.intercept)}}}]),n}(N);function se(e,t){var i=t.mask,n=void 0!==t.maskLetterChar?t.maskLetterChar:"A",o=void 0!==t.maskNumberChar?t.maskNumberChar:"9",a=void 0!==t.maskWildcardChar?t.maskWildcardChar:"*";function r(t){var s=i[t];void 0!==s&&s!==a&&s!==n&&s!==o&&(e.value=e.value+""+s,r(t+1))}e.addEventListener("keydown",(function(t){var r=e.value.length,s=t.key;if(t.keyCode>46){if(r>=i.length)return t.preventDefault(),t.stopPropagation(),!1;switch(i[r]){case n:if(s.toUpperCase()==s.toLowerCase())return t.preventDefault(),t.stopPropagation(),!1;break;case o:if(isNaN(s))return t.preventDefault(),t.stopPropagation(),!1;break;case a:break;default:if(s!==i[r])return t.preventDefault(),t.stopPropagation(),!1}}})),e.addEventListener("keyup",(function(i){i.keyCode>46&&t.maskAutoFill&&r(e.value.length)})),e.placeholder||(e.placeholder=i),t.maskAutoFill&&r(e.value.length)}re.moduleName="download",re.downloaders=ae;var le={input:function(t,i,n,o,a){var r=t.getValue(),s=document.createElement("input");if(s.setAttribute("type",a.search?"search":"text"),s.style.padding="4px",s.style.width="100%",s.style.boxSizing="border-box",a.elementAttributes&&"object"==e(a.elementAttributes))for(var l in a.elementAttributes)"+"==l.charAt(0)?(l=l.slice(1),s.setAttribute(l,s.getAttribute(l)+a.elementAttributes["+"+l])):s.setAttribute(l,a.elementAttributes[l]);function u(e){null==r&&""!==s.value||s.value!==r?n(s.value)&&(r=s.value):o()}return s.value=void 0!==r?r:"",i((function(){s.focus({preventScroll:!0}),s.style.height="100%"})),s.addEventListener("change",u),s.addEventListener("blur",u),s.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:u();break;case 27:o();break;case 35:case 36:e.stopPropagation()}})),a.mask&&se(s,a),s},textarea:function(t,i,n,o,a){var r=t.getValue(),s=a.verticalNavigation||"hybrid",l=String(null!=r?r:""),u=((l.match(/(?:\r\n|\r|\n)/g)||[]).length,document.createElement("textarea")),c=0;if(u.style.display="block",u.style.padding="2px",u.style.height="100%",u.style.width="100%",u.style.boxSizing="border-box",u.style.whiteSpace="pre-wrap",u.style.resize="none",a.elementAttributes&&"object"==e(a.elementAttributes))for(var h in a.elementAttributes)"+"==h.charAt(0)?(h=h.slice(1),u.setAttribute(h,u.getAttribute(h)+a.elementAttributes["+"+h])):u.setAttribute(h,a.elementAttributes[h]);function d(e){null==r&&""!==u.value||u.value!==r?(n(u.value)&&(r=u.value),setTimeout((function(){t.getRow().normalizeHeight()}),300)):o()}return u.value=l,i((function(){u.focus({preventScroll:!0}),u.style.height="100%",u.scrollHeight,u.style.height=u.scrollHeight+"px",t.getRow().normalizeHeight()})),u.addEventListener("change",d),u.addEventListener("blur",d),u.addEventListener("keyup",(function(){u.style.height="";var e=u.scrollHeight;u.style.height=e+"px",e!=c&&(c=e,t.getRow().normalizeHeight())})),u.addEventListener("keydown",(function(e){switch(e.keyCode){case 27:o();break;case 38:("editor"==s||"hybrid"==s&&u.selectionStart)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 40:("editor"==s||"hybrid"==s&&u.selectionStart!==u.value.length)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}})),a.mask&&se(u,a),u},number:function(t,i,n,o,a){var r=t.getValue(),s=a.verticalNavigation||"editor",l=document.createElement("input");if(l.setAttribute("type","number"),void 0!==a.max&&l.setAttribute("max",a.max),void 0!==a.min&&l.setAttribute("min",a.min),void 0!==a.step&&l.setAttribute("step",a.step),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",a.elementAttributes&&"object"==e(a.elementAttributes))for(var u in a.elementAttributes)"+"==u.charAt(0)?(u=u.slice(1),l.setAttribute(u,l.getAttribute(u)+a.elementAttributes["+"+u])):l.setAttribute(u,a.elementAttributes[u]);l.value=r;var c=function(e){h()};function h(){var e=l.value;isNaN(e)||""===e||(e=Number(e)),e!==r?n(e)&&(r=e):o()}return i((function(){l.removeEventListener("blur",c),l.focus({preventScroll:!0}),l.style.height="100%",l.addEventListener("blur",c)})),l.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:h();break;case 27:o();break;case 38:case 40:"editor"==s&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}})),a.mask&&se(l,a),l},range:function(t,i,n,o,a){var r=t.getValue(),s=document.createElement("input");if(s.setAttribute("type","range"),void 0!==a.max&&s.setAttribute("max",a.max),void 0!==a.min&&s.setAttribute("min",a.min),void 0!==a.step&&s.setAttribute("step",a.step),s.style.padding="4px",s.style.width="100%",s.style.boxSizing="border-box",a.elementAttributes&&"object"==e(a.elementAttributes))for(var l in a.elementAttributes)"+"==l.charAt(0)?(l=l.slice(1),s.setAttribute(l,s.getAttribute(l)+a.elementAttributes["+"+l])):s.setAttribute(l,a.elementAttributes[l]);function u(){var e=s.value;isNaN(e)||""===e||(e=Number(e)),e!=r?n(e)&&(r=e):o()}return s.value=r,i((function(){s.focus({preventScroll:!0}),s.style.height="100%"})),s.addEventListener("blur",(function(e){u()})),s.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:u();break;case 27:o()}})),s},select:function(t,i,n,o,a){var r=this,s=this,l=t.getElement(),u=t.getValue(),c=a.verticalNavigation||"editor",h=void 0!==u||null===u?Array.isArray(u)?u:[u]:void 0!==a.defaultValue?a.defaultValue:[],d=document.createElement("input"),m=document.createElement("div"),p=a.multiselect,f=[],g={},v=[],b=[],y=!0,w=!1,k="",E=null;function R(e){var i,n={},o=s.table.getData();return(i=e?s.table.columnManager.getColumnByField(e):t.getColumn()._getSelf())?o.forEach((function(e){var t=i.getFieldValue(e);null!=t&&""!==t&&(n[t]=!0)})):console.warn("unable to find matching column to create select lookup list:",e),Object.keys(n)}function x(i,n){var o=[],r=[];function s(e){e={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1};return n.indexOf(e.value)>-1&&M(e),o.push(e),r.push(e),e}if("function"==typeof i&&(i=i(t)),Array.isArray(i))i.forEach((function(t){var i;"object"===e(t)?t.options?(i={label:t.label,group:!0,itemParams:t.itemParams,elementAttributes:t.elementAttributes,element:!1},r.push(i),t.options.forEach((function(e){s(e)}))):s(t):(i={label:t,value:t,element:!1},n.indexOf(i.value)>-1&&M(i),o.push(i),r.push(i))}));else for(var l in i){var u={label:i[l],value:l,element:!1};n.indexOf(u.value)>-1&&M(u),o.push(u),r.push(u)}a.sortValuesList&&(o.sort((function(e,t){return e.labelt.label?1:0})),r.sort((function(e,t){return e.labelt.label?1:0})),"asc"!==a.sortValuesList&&(o.reverse(),r.reverse())),f=o,v=r,function(){for(;m.firstChild;)m.removeChild(m.firstChild);v.forEach((function(i){var n=i.element;if(!n){if(n=document.createElement("div"),i.label=a.listItemFormatter?a.listItemFormatter(i.value,i.label,t,n,i.itemParams):i.label,i.group?(n.classList.add("tabulator-edit-select-list-group"),n.tabIndex=0,n.innerHTML=""===i.label?" ":i.label):(n.classList.add("tabulator-edit-select-list-item"),n.tabIndex=0,n.innerHTML=""===i.label?" ":i.label,n.addEventListener("click",(function(){w=!0,setTimeout((function(){w=!1}),10),p?(D(i),d.focus()):S(i)})),b.indexOf(i)>-1&&n.classList.add("active")),i.elementAttributes&&"object"==e(i.elementAttributes))for(var o in i.elementAttributes)"+"==o.charAt(0)?(o=o.slice(1),n.setAttribute(o,d.getAttribute(o)+i.elementAttributes["+"+o])):n.setAttribute(o,i.elementAttributes[o]);n.addEventListener("mousedown",(function(){y=!1,setTimeout((function(){y=!0}),10)})),i.element=n}m.appendChild(n)}))}()}function T(e,t){!p&&g&&g.element&&g.element.classList.remove("active"),g&&g.element&&g.element.classList.remove("focused"),g=e,e.element&&(e.element.classList.add("focused"),t&&e.element.classList.add("active")),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function M(e){-1==b.indexOf(e)&&(b.push(e),T(e,!0)),P()}function L(e){var t=b[e];e>-1&&(b.splice(e,1),t.element&&t.element.classList.remove("active"))}function D(e){e||(e=g);var t=b.indexOf(e);t>-1?L(t):(!0!==p&&b.length>=p&&L(0),M(e)),P()}function S(e){H(),e||(e=g),e&&(d.value=e.label,n(e.value)),h=[e.value]}function F(e){e||H();var t=[];b.forEach((function(e){t.push(e.value)})),h=t,n(t)}function P(){var e=[];b.forEach((function(t){e.push(t.label)})),d.value=e.join(", "),!1===s.currentCell&&F(!0)}function z(){H(),o()}function H(){m.parentNode&&m.parentNode.removeChild(m),s.table.rowManager.element.removeEventListener("scroll",z)}if((Array.isArray(a)||!Array.isArray(a)&&"object"===e(a)&&!a.values)&&(console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"),a={values:a}),d.setAttribute("type","text"),d.style.padding="4px",d.style.width="100%",d.style.boxSizing="border-box",d.style.cursor="default",d.readOnly=0!=this.currentCell,a.elementAttributes&&"object"==e(a.elementAttributes))for(var A in a.elementAttributes)"+"==A.charAt(0)?(A=A.slice(1),d.setAttribute(A,d.getAttribute(A)+a.elementAttributes["+"+A])):d.setAttribute(A,a.elementAttributes[A]);return d.value=void 0!==u||null===u?u:"",d.addEventListener("search",(function(e){d.value||(!function(){for(var e=b.length,t=0;t0&&T(f[t-1],!p));break;case 40:t=f.indexOf(g),("editor"==c||"hybrid"==c&&t=38&&e.keyCode<=90&&function(e){clearTimeout(E);var t=String.fromCharCode(event.keyCode).toLowerCase();k+=t.toLowerCase();var i=f.find((function(e){return void 0!==e.label&&e.label.toLowerCase().startsWith(k)}));i&&T(i,!p),E=setTimeout((function(){k=""}),800)}(e.keyCode)}})),d.addEventListener("blur",(function(e){y&&(p?F():z())})),d.addEventListener("focus",(function(e){w||function(){if(b=[],!m.parentNode){!0===a.values?x(R(),h):"string"==typeof a.values?x(R(a.values),h):x(a.values||[],h);var e=C.elOffset(l);m.style.minWidth=l.offsetWidth+"px",m.style.top=e.top+l.offsetHeight+"px",m.style.left=e.left+"px",m.addEventListener("mousedown",(function(e){y=!1,setTimeout((function(){y=!0}),10)})),document.body.appendChild(m)}}()})),(m=document.createElement("div")).classList.add("tabulator-edit-select-list"),i((function(){d.style.height="100%",d.focus({preventScroll:!0})})),setTimeout((function(){r.table.rowManager.element.addEventListener("scroll",z)}),10),d},autocomplete:function(t,i,n,o,a){var r=this,s=this,l=t.getElement(),u=t.getValue(),c=a.verticalNavigation||"editor",h=void 0!==u||null===u?u:void 0!==a.defaultValue?a.defaultValue:"",d=document.createElement("input"),m=document.createElement("div"),p=[],f=!1,g=!0,v=!1;if(d.setAttribute("type","search"),d.style.padding="4px",d.style.width="100%",d.style.boxSizing="border-box",a.elementAttributes&&"object"==e(a.elementAttributes))for(var b in a.elementAttributes)"+"==b.charAt(0)?(b=b.slice(1),d.setAttribute(b,d.getAttribute(b)+a.elementAttributes["+"+b])):d.setAttribute(b,a.elementAttributes[b]);function y(){!0===a.values?v=w():"string"==typeof a.values&&(v=w(a.values))}function w(e){var i,n={},o=s.table.getData();return(i=e?s.table.columnManager.getColumnByField(e):t.getColumn()._getSelf())?(o.forEach((function(e){var t=i.getFieldValue(e);null!=t&&""!==t&&(n[t]=!0)})),n=a.sortValuesList?"asc"==a.sortValuesList?Object.keys(n).sort():Object.keys(n).sort().reverse():Object.keys(n)):console.warn("unable to find matching column to create autocomplete lookup list:",e),n}function k(e,t){var i,n,o=[];i=v||(a.values||[]),a.searchFunc?(o=a.searchFunc(e,i))instanceof Promise?(E(void 0!==a.searchingPlaceholder?a.searchingPlaceholder:"Searching..."),o.then((function(e){T(R(e),t)})).catch((function(e){console.err("error in autocomplete search promise:",e)}))):T(R(o),t):(n=R(i),""===e?a.showListOnEmpty&&(o=n):n.forEach((function(t){null===t.value&&void 0===t.value||(String(t.value).toLowerCase().indexOf(String(e).toLowerCase())>-1||String(t.title).toLowerCase().indexOf(String(e).toLowerCase())>-1)&&o.push(t)})),T(o,t))}function E(e){var t=document.createElement("div");x(),!1!==e&&(t.classList.add("tabulator-edit-select-list-notice"),t.tabIndex=0,e instanceof Node?t.appendChild(e):t.innerHTML=e,m.appendChild(t))}function R(t){var i=[];if(Array.isArray(t))t.forEach((function(t){var n={};"object"===e(t)?(n.title=a.listItemFormatter?a.listItemFormatter(t.value,t.label):t.label,n.value=t.value):(n.title=a.listItemFormatter?a.listItemFormatter(t,t):t,n.value=t),i.push(n)}));else for(var n in t){var o={title:a.listItemFormatter?a.listItemFormatter(n,t[n]):t[n],value:n};i.push(o)}return i}function x(){for(;m.firstChild;)m.removeChild(m.firstChild)}function T(e,t){e.length?function(e,t){var i=!1;x(),(p=e).forEach((function(e){var n=e.element;n||((n=document.createElement("div")).classList.add("tabulator-edit-select-list-item"),n.tabIndex=0,n.innerHTML=e.title,n.addEventListener("click",(function(t){L(e),M()})),n.addEventListener("mousedown",(function(e){g=!1,setTimeout((function(){g=!0}),10)})),e.element=n,t&&e.value==u&&(d.value=e.title,e.element.classList.add("active"),i=!0),e===f&&(e.element.classList.add("active"),i=!0)),m.appendChild(n)})),i||L(!1)}(e,t):a.emptyPlaceholder&&E(a.emptyPlaceholder)}function M(){D(),f?u!==f.value?(u=f.value,d.value=f.title,n(f.value)):o():a.freetext||a.allowEmpty&&""===d.value?(u=d.value,n(d.value)):o()}function L(e,t){f&&f.element&&f.element.classList.remove("active"),f=e,e&&e.element&&e.element.classList.add("active"),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function D(){m.parentNode&&m.parentNode.removeChild(m),s.table.rowManager.element.removeEventListener("scroll",S)}function S(){D(),o()}return m.classList.add("tabulator-edit-select-list"),m.addEventListener("mousedown",(function(e){g=!1,setTimeout((function(){g=!0}),10)})),d.addEventListener("keydown",(function(e){var t;switch(e.keyCode){case 38:t=p.indexOf(f),("editor"==c||"hybrid"==c&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),L(t>0&&p[t-1]));break;case 40:t=p.indexOf(f),("editor"==c||"hybrid"==c&&t'):("ie"==r.table.browser?t.setAttribute("class","tabulator-star-inactive"):t.classList.replace("tabulator-star-active","tabulator-star-inactive"),t.innerHTML='')}))}function f(e){var t=document.createElement("span"),i=m.cloneNode(!0);h.push(i),t.addEventListener("mouseenter",(function(t){t.stopPropagation(),t.stopImmediatePropagation(),p(e)})),t.addEventListener("mousemove",(function(e){e.stopPropagation(),e.stopImmediatePropagation()})),t.addEventListener("click",(function(t){t.stopPropagation(),t.stopImmediatePropagation(),n(e),s.blur()})),t.appendChild(i),d.appendChild(t)}function g(e){l=e,p(e)}if(s.style.whiteSpace="nowrap",s.style.overflow="hidden",s.style.textOverflow="ellipsis",d.style.verticalAlign="middle",d.style.display="inline-block",d.style.padding="4px",m.setAttribute("width",c),m.setAttribute("height",c),m.setAttribute("viewBox","0 0 512 512"),m.setAttribute("xml:space","preserve"),m.style.padding="0 1px",a.elementAttributes&&"object"==e(a.elementAttributes))for(var v in a.elementAttributes)"+"==v.charAt(0)?(v=v.slice(1),d.setAttribute(v,d.getAttribute(v)+a.elementAttributes["+"+v])):d.setAttribute(v,a.elementAttributes[v]);for(var b=1;b<=u;b++)f(b);return p(l=Math.min(parseInt(l),u)),d.addEventListener("mousemove",(function(e){p(0)})),d.addEventListener("click",(function(e){n(0)})),s.addEventListener("blur",(function(e){o()})),s.addEventListener("keydown",(function(e){switch(e.keyCode){case 39:g(l+1);break;case 37:g(l-1);break;case 13:n(l);break;case 27:o()}})),d},progress:function(t,i,n,o,a){var r,s,l=t.getElement(),u=void 0===a.max?l.getElementsByTagName("div")[0]&&l.getElementsByTagName("div")[0].getAttribute("max")||100:a.max,c=void 0===a.min?l.getElementsByTagName("div")[0]&&l.getElementsByTagName("div")[0].getAttribute("min")||0:a.min,h=(u-c)/100,d=t.getValue()||0,m=document.createElement("div"),p=document.createElement("div");function f(){var e=window.getComputedStyle(l,null),t=h*Math.round(p.offsetWidth/((l.clientWidth-parseInt(e.getPropertyValue("padding-left"))-parseInt(e.getPropertyValue("padding-right")))/100))+c;n(t),l.setAttribute("aria-valuenow",t),l.setAttribute("aria-label",d)}if(m.style.position="absolute",m.style.right="0",m.style.top="0",m.style.bottom="0",m.style.width="5px",m.classList.add("tabulator-progress-handle"),p.style.display="inline-block",p.style.position="relative",p.style.height="100%",p.style.backgroundColor="#488CE9",p.style.maxWidth="100%",p.style.minWidth="0%",a.elementAttributes&&"object"==e(a.elementAttributes))for(var g in a.elementAttributes)"+"==g.charAt(0)?(g=g.slice(1),p.setAttribute(g,p.getAttribute(g)+a.elementAttributes["+"+g])):p.setAttribute(g,a.elementAttributes[g]);return l.style.padding="4px 4px",d=Math.min(parseFloat(d),u),d=Math.max(parseFloat(d),c),d=Math.round((d-c)/h),p.style.width=d+"%",l.setAttribute("aria-valuemin",c),l.setAttribute("aria-valuemax",u),p.appendChild(m),m.addEventListener("mousedown",(function(e){r=e.screenX,s=p.offsetWidth})),m.addEventListener("mouseover",(function(){m.style.cursor="ew-resize"})),l.addEventListener("mousemove",(function(e){r&&(p.style.width=s+e.screenX-r+"px")})),l.addEventListener("mouseup",(function(e){r&&(e.stopPropagation(),e.stopImmediatePropagation(),r=!1,s=!1,f())})),l.addEventListener("keydown",(function(e){switch(e.keyCode){case 39:e.preventDefault(),p.style.width=p.clientWidth+l.clientWidth/100+"px";break;case 37:e.preventDefault(),p.style.width=p.clientWidth-l.clientWidth/100+"px";break;case 9:case 13:f();break;case 27:o()}})),l.addEventListener("blur",(function(){o()})),p},tickCross:function(t,i,n,o,a){var r=t.getValue(),s=document.createElement("input"),l=a.tristate,u=void 0===a.indeterminateValue?null:a.indeterminateValue,c=!1;if(s.setAttribute("type","checkbox"),s.style.marginTop="5px",s.style.boxSizing="border-box",a.elementAttributes&&"object"==e(a.elementAttributes))for(var h in a.elementAttributes)"+"==h.charAt(0)?(h=h.slice(1),s.setAttribute(h,s.getAttribute(h)+a.elementAttributes["+"+h])):s.setAttribute(h,a.elementAttributes[h]);function d(e){return l?e?c?u:s.checked:s.checked&&!c?(s.checked=!1,s.indeterminate=!0,c=!0,u):(c=!1,s.checked):s.checked}return s.value=r,!l||void 0!==r&&r!==u&&""!==r||(c=!0,s.indeterminate=!0),"firefox"!=this.table.browser&&i((function(){s.focus({preventScroll:!0})})),s.checked=!0===r||"true"===r||"True"===r||1===r,i((function(){s.focus()})),s.addEventListener("change",(function(e){n(d())})),s.addEventListener("blur",(function(e){n(d(!0))})),s.addEventListener("keydown",(function(e){13==e.keyCode&&n(d()),27==e.keyCode&&o()})),s}},ue=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).currentCell=!1,i.mouseClick=!1,i.recursionBlock=!1,i.invalidEdit=!1,i.editedCells=[],i.editors=r.editors,i.registerColumnOption("editable"),i.registerColumnOption("editor"),i.registerColumnOption("editorParams"),i.registerColumnOption("cellEditing"),i.registerColumnOption("cellEdited"),i.registerColumnOption("cellEditCancelled"),i.registerTableFunction("getEditedCells",i.getEditedCells.bind(l(i))),i.registerTableFunction("clearCellEdited",i.clearCellEdited.bind(l(i))),i.registerTableFunction("navigatePrev",i.navigatePrev.bind(l(i))),i.registerTableFunction("navigateNext",i.navigateNext.bind(l(i))),i.registerTableFunction("navigateLeft",i.navigateLeft.bind(l(i))),i.registerTableFunction("navigateRight",i.navigateRight.bind(l(i))),i.registerTableFunction("navigateUp",i.navigateUp.bind(l(i))),i.registerTableFunction("navigateDown",i.navigateDown.bind(l(i))),i.registerComponentFunction("cell","isEdited",i.cellisEdited.bind(l(i))),i.registerComponentFunction("cell","clearEdited",i.clearEdited.bind(l(i))),i.registerComponentFunction("cell","edit",i.editCell.bind(l(i))),i.registerComponentFunction("cell","cancelEdit",i.cellCancelEdit.bind(l(i))),i.registerComponentFunction("cell","navigatePrev",i.navigatePrev.bind(l(i))),i.registerComponentFunction("cell","navigateNext",i.navigateNext.bind(l(i))),i.registerComponentFunction("cell","navigateLeft",i.navigateLeft.bind(l(i))),i.registerComponentFunction("cell","navigateRight",i.navigateRight.bind(l(i))),i.registerComponentFunction("cell","navigateUp",i.navigateUp.bind(l(i))),i.registerComponentFunction("cell","navigateDown",i.navigateDown.bind(l(i))),i}return o(r,[{key:"initialize",value:function(){this.subscribe("cell-init",this.bindEditor.bind(this)),this.subscribe("cell-delete",this.clearEdited.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this)),this.subscribe("column-delete",this.columnDeleteCheck.bind(this)),this.subscribe("row-deleting",this.rowDeleteCheck.bind(this)),this.subscribe("data-refreshing",this.cancelEdit.bind(this)),this.subscribe("keybinding-nav-prev",this.navigatePrev.bind(this,void 0)),this.subscribe("keybinding-nav-next",this.keybindingNavigateNext.bind(this)),this.subscribe("keybinding-nav-left",this.navigateLeft.bind(this,void 0)),this.subscribe("keybinding-nav-right",this.navigateRight.bind(this,void 0)),this.subscribe("keybinding-nav-up",this.navigateUp.bind(this,void 0)),this.subscribe("keybinding-nav-down",this.navigateDown.bind(this,void 0))}},{key:"keybindingNavigateNext",value:function(e){var t=this.currentCell,i=this.options("tabEndNewRow");t&&(this.navigateNext(t,e)||i&&(t.getElement().firstChild.blur(),(i=!0===i?this.table.addRow({}):"function"==typeof i?this.table.addRow(i(t.row.getComponent())):this.table.addRow(Object.assign({},i))).then((function(){setTimeout((function(){t.getComponent().navigateNext()}))}))))}},{key:"cellisEdited",value:function(e){return!!e.modules.edit&&e.modules.edit.edited}},{key:"cellCancelEdit",value:function(e){e===this.currentCell?this.table.modules.edit.cancelEdit():console.warn("Cancel Editor Error - This cell is not currently being edited ")}},{key:"clearCellEdited",value:function(e){var t=this;e||(e=this.table.modules.edit.getEditedCells()),Array.isArray(e)||(e=[e]),e.forEach((function(e){t.table.modules.edit.clearEdited(e._getSelf())}))}},{key:"navigatePrev",value:function(){var e,t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentCell,n=arguments.length>1?arguments[1]:void 0;if(i){if(n&&n.preventDefault(),e=this.navigateLeft())return!0;if((t=this.table.rowManager.prevDisplayRow(i.row,!0))&&(e=this.findNextEditableCell(t,t.cells.length)))return e.getComponent().edit(),!0}return!1}},{key:"navigateNext",value:function(){var e,t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentCell,n=arguments.length>1?arguments[1]:void 0;if(i){if(n&&n.preventDefault(),e=this.navigateRight())return!0;if((t=this.table.rowManager.nextDisplayRow(i.row,!0))&&(e=this.findNextEditableCell(t,-1)))return e.getComponent().edit(),!0}return!1}},{key:"navigateLeft",value:function(){var e,t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentCell,n=arguments.length>1?arguments[1]:void 0;return!!(i&&(n&&n.preventDefault(),e=i.getIndex(),t=this.findPrevEditableCell(i.row,e)))&&(t.getComponent().edit(),!0)}},{key:"navigateRight",value:function(){var e,t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentCell,n=arguments.length>1?arguments[1]:void 0;return!!(i&&(n&&n.preventDefault(),e=i.getIndex(),t=this.findNextEditableCell(i.row,e)))&&(t.getComponent().edit(),!0)}},{key:"navigateUp",value:function(){var e,t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentCell,n=arguments.length>1?arguments[1]:void 0;return!!(i&&(n&&n.preventDefault(),e=i.getIndex(),t=this.table.rowManager.prevDisplayRow(i.row,!0)))&&(t.cells[e].getComponent().edit(),!0)}},{key:"navigateDown",value:function(){var e,t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentCell,n=arguments.length>1?arguments[1]:void 0;return!!(i&&(n&&n.preventDefault(),e=i.getIndex(),t=this.table.rowManager.nextDisplayRow(i.row,!0)))&&(t.cells[e].getComponent().edit(),!0)}},{key:"findNextEditableCell",value:function(e,t){var i=!1;if(t0)for(var n=t-1;n>=0;n--){var o=e.cells[n],a=!0;if(o.column.modules.edit&&C.elVisible(o.getElement())&&("function"==typeof o.column.modules.edit.check&&(a=o.column.modules.edit.check(o.getComponent())),a)){i=o;break}}return i}},{key:"initializeColumnCheck",value:function(e){void 0!==e.definition.editor&&this.initializeColumn(e)}},{key:"columnDeleteCheck",value:function(e){this.currentCell&&this.currentCell.column===e&&this.cancelEdit()}},{key:"rowDeleteCheck",value:function(e){this.currentCell&&this.currentCell.row===e&&this.cancelEdit()}},{key:"initializeColumn",value:function(t){var i={editor:!1,blocked:!1,check:t.definition.editable,params:t.definition.editorParams||{}};switch(e(t.definition.editor)){case"string":this.editors[t.definition.editor]?i.editor=this.editors[t.definition.editor]:console.warn("Editor Error - No such editor found: ",t.definition.editor);break;case"function":i.editor=t.definition.editor;break;case"boolean":!0===t.definition.editor&&("function"!=typeof t.definition.formatter?this.editors[t.definition.formatter]?i.editor=this.editors[t.definition.formatter]:i.editor=this.editors.input:console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",t.definition.formatter))}i.editor&&(t.modules.edit=i)}},{key:"getCurrentCell",value:function(){return!!this.currentCell&&this.currentCell.getComponent()}},{key:"clearEditor",value:function(e){var t,i=this.currentCell;if(this.invalidEdit=!1,i){for(this.currentCell=!1,t=i.getElement(),e?i.column.modules.validate&&this.table.modExists("validate")&&this.table.modules.validate.cellValidate(i):t.classList.remove("tabulator-validation-fail"),t.classList.remove("tabulator-editing");t.firstChild;)t.removeChild(t.firstChild);i.row.getElement().classList.remove("tabulator-row-editing")}}},{key:"cancelEdit",value:function(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(!0),e.setValueActual(e.getValue()),e.cellRendered(),("textarea"==e.column.definition.editor||e.column.definition.variableHeight)&&e.row.normalizeHeight(!0),e.column.definition.cellEditCancelled&&e.column.definition.cellEditCancelled.call(this.table,t),this.dispatch("edit-cancelled",e),this.dispatchExternal("cellEditCancelled",t)}}},{key:"bindEditor",value:function(e){if(e.column.modules.edit){var t=this,i=e.getElement(!0);i.setAttribute("tabindex",0),i.addEventListener("click",(function(e){i.classList.contains("tabulator-editing")||i.focus({preventScroll:!0})})),i.addEventListener("mousedown",(function(e){2===e.button?e.preventDefault():t.mouseClick=!0})),i.addEventListener("focus",(function(i){t.recursionBlock||t.edit(e,i,!1)}))}}},{key:"focusCellNoEvent",value:function(e,t){this.recursionBlock=!0,t&&"ie"===this.table.browser||e.getElement().focus({preventScroll:!0}),this.recursionBlock=!1}},{key:"editCell",value:function(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)}},{key:"focusScrollAdjust",value:function(e){if("virtual"==this.table.rowManager.getRenderMode()){var t=this.table.rowManager.element.scrollTop,i=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,n=e.row.getElement();n.offsetTop;n.offsetTopi&&(this.table.rowManager.element.scrollTop+=n.offsetTop+n.offsetHeight-i);var o=this.table.rowManager.element.scrollLeft,a=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,r=e.getElement();r.offsetLeft;this.table.modExists("frozenColumns")&&(o+=parseInt(this.table.modules.frozenColumns.leftMargin),a-=parseInt(this.table.modules.frozenColumns.rightMargin)),"virtual"===this.table.options.renderHorizontal&&(o-=parseInt(this.table.columnManager.renderer.vDomPadLeft),a-=parseInt(this.table.columnManager.renderer.vDomPadLeft)),r.offsetLefta&&(this.table.rowManager.element.scrollLeft+=r.offsetLeft+r.offsetWidth-a)}}},{key:"edit",value:function(t,i,n){var o,a,r,s=this,l=!0,u=function(){},c=t.getElement();if(!this.currentCell){if(t.column.modules.edit.blocked)return this.mouseClick=!1,c.blur(),!1;switch(i&&i.stopPropagation(),e(t.column.modules.edit.check)){case"function":l=t.column.modules.edit.check(t.getComponent());break;case"boolean":l=t.column.modules.edit.check}if(l||n){if(s.cancelEdit(),s.currentCell=t,this.focusScrollAdjust(t),a=t.getComponent(),this.mouseClick&&(this.mouseClick=!1,t.column.definition.cellClick&&t.column.definition.cellClick.call(this.table,i,a)),t.column.definition.cellEditing&&t.column.definition.cellEditing.call(this.table,a),this.dispatchExternal("cellEditing",a),r="function"==typeof t.column.modules.edit.params?t.column.modules.edit.params(a):t.column.modules.edit.params,!1===(o=t.column.modules.edit.editor.call(s,a,(function(e){u=e}),(function(e){if(s.currentCell===t){var i=!0;return t.column.modules.validate&&s.table.modExists("validate")&&"manual"!=s.table.options.validationMode&&(i=s.table.modules.validate.validate(t.column.modules.validate,t,e)),!0===i||"highlight"===s.table.options.validationMode?(s.clearEditor(),t.modules.edit||(t.modules.edit={}),t.modules.edit.edited=!0,-1==s.editedCells.indexOf(t)&&s.editedCells.push(t),t.setValue(e,!0),!0===i||(c.classList.add("tabulator-validation-fail"),s.table.externalEvents.dispatch("validationFailed",t.getComponent(),e,i),!1)):(s.invalidEdit=!0,c.classList.add("tabulator-validation-fail"),s.focusCellNoEvent(t,!0),u(),s.table.externalEvents.dispatch("validationFailed",t.getComponent(),e,i),!1)}}),(function(){s.currentCell===t&&s.cancelEdit()}),r)))return c.blur(),!1;if(!(o instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",o),c.blur(),!1;for(c.classList.add("tabulator-editing"),t.row.getElement().classList.add("tabulator-row-editing");c.firstChild;)c.removeChild(c.firstChild);c.appendChild(o),u();for(var h=c.children,d=0;d-1&&this.editedCells.splice(t,1)}}]),r}(N);ue.moduleName="edit",ue.editors=le;var ce=function e(i,n,o,a){t(this,e),this.type=i,this.columns=n,this.component=o||!1,this.indent=a||0},he=function e(i,n,o,a,r){t(this,e),this.value=i,this.component=n||!1,this.width=o,this.height=a,this.depth=r},de=function(n){a(s,n);var r=c(s);function s(e){var i;return t(this,s),(i=r.call(this,e)).config={},i.cloneTableStyle=!0,i.colVisProp="",i.registerTableOption("htmlOutputConfig",!1),i.registerColumnOption("htmlOutput"),i.registerColumnOption("titleHtmlOutput"),i}return o(s,[{key:"initialize",value:function(){this.registerTableFunction("getHtml",this.getHtml.bind(this))}},{key:"generateExportList",value:function(e,t,i,n){this.cloneTableStyle=t,this.config=e||{},this.colVisProp=n;var o=!1!==this.config.columnHeaders?this.headersToExportRows(this.generateColumnGroupHeaders()):[],a=this.bodyToExportRows(this.rowLookup(i));return o.concat(a)}},{key:"genereateTable",value:function(e,t,i,n){var o=this.generateExportList(e,t,i,n);return this.genereateTableElement(o)}},{key:"rowLookup",value:function(e){var t=this,i=[];if("function"==typeof e)e.call(this.table).forEach((function(e){(e=t.table.rowManager.findRow(e))&&i.push(e)}));else switch(e){case!0:case"visible":i=this.table.rowManager.getVisibleRows(!1,!0);break;case"all":i=this.table.rowManager.rows;break;case"selected":i=this.table.modules.selectRow.selectedRows;break;case"active":default:i=this.table.options.pagination?this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length-2):this.table.rowManager.getDisplayRows()}return Object.assign([],i)}},{key:"generateColumnGroupHeaders",value:function(){var e=this,t=[];return(!1!==this.config.columnGroups?this.table.columnManager.columns:this.table.columnManager.columnsByIndex).forEach((function(i){var n=e.processColumnGroup(i);n&&t.push(n)})),t}},{key:"processColumnGroup",value:function(e){var t=this,i=e.columns,n=0,o={title:e.definition["title"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))]||e.definition.title,column:e,depth:1};if(i.length){if(o.subGroups=[],o.width=0,i.forEach((function(e){var i=t.processColumnGroup(e);i&&(o.width+=i.width,o.subGroups.push(i),i.depth>n&&(n=i.depth))})),o.depth+=n,!o.width)return!1}else{if(!this.columnVisCheck(e))return!1;o.width=1}return o}},{key:"columnVisCheck",value:function(e){return!1!==e.definition[this.colVisProp]&&(e.visible||!e.visible&&e.definition[this.colVisProp])}},{key:"headersToExportRows",value:function(e){var t=[],i=0,n=[];function o(e,n){var a=i-n;if(void 0===t[n]&&(t[n]=[]),e.height=e.subGroups?1:a-e.depth+1,t[n].push(e),e.height>1)for(var r=1;r1)for(var s=1;si&&(i=e.depth)})),e.forEach((function(e){o(e,0)})),t.forEach((function(e){var t=[];e.forEach((function(e){if(e){var i=void 0===e.title?"":e.title;t.push(new he(i,e.column.getComponent(),e.width,e.height,e.depth))}else t.push(null)})),n.push(new ce("header",t))})),n}},{key:"bodyToExportRows",value:function(e){var t=this,i=[],n=[];return this.table.columnManager.columnsByIndex.forEach((function(e){t.columnVisCheck(e)&&i.push(e.getComponent())})),!1!==this.config.columnCalcs&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&e.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&e.push(this.table.modules.columnCalcs.botRow)),(e=e.filter((function(e){switch(e.type){case"group":return!1!==t.config.rowGroups;case"calc":return!1!==t.config.columnCalcs;case"row":return!(t.table.options.dataTree&&!1===t.config.dataTree&&e.modules.dataTree.parent)}return!0}))).forEach((function(e,o){var a=e.getData(t.colVisProp),r=[],s=0;switch(e.type){case"group":s=e.level,r.push(new he(e.key,e.getComponent(),i.length,1));break;case"calc":case"row":i.forEach((function(e){r.push(new he(e._column.getFieldValue(a),e,1,1))})),t.table.options.dataTree&&!1!==t.config.dataTree&&(s=e.modules.dataTree.index)}n.push(new ce(e.type,r,e.getComponent(),s))})),n}},{key:"genereateTableElement",value:function(e){var t=this,i=document.createElement("table"),n=document.createElement("thead"),o=document.createElement("tbody"),a=this.lookupTableStyles(),r=this.table.options["rowFormatter"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],s={};return s.rowFormatter=null!==r?r:this.table.options.rowFormatter,this.table.options.dataTree&&!1!==this.config.dataTree&&this.table.modExists("columnCalcs")&&(s.treeElementField=this.table.modules.dataTree.elementField),s.groupHeader=this.table.options["groupHeader"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],s.groupHeader&&!Array.isArray(s.groupHeader)&&(s.groupHeader=[s.groupHeader]),i.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),n,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),e.forEach((function(e,i){switch(e.type){case"header":n.appendChild(t.genereateHeaderElement(e,s,a));break;case"group":o.appendChild(t.genereateGroupElement(e,s,a));break;case"calc":o.appendChild(t.genereateCalcElement(e,s,a));break;case"row":var r=t.genereateRowElement(e,s,a);t.mapElementStyles(i%2&&a.evenRow?a.evenRow:a.oddRow,r,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),o.appendChild(r)}})),n.innerHTML&&i.appendChild(n),i.appendChild(o),this.mapElementStyles(this.table.element,i,["border-top","border-left","border-right","border-bottom"]),i}},{key:"lookupTableStyles",value:function(){var e={};return this.cloneTableStyle&&window.getComputedStyle&&(e.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),e.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),e.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),e.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),e.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],e.firstRow&&(e.styleCells=e.firstRow.getElementsByClassName("tabulator-cell"),e.firstCell=e.styleCells[0],e.lastCell=e.styleCells[e.styleCells.length-1])),e}},{key:"genereateHeaderElement",value:function(e,t,i){var n=this,o=document.createElement("tr");return e.columns.forEach((function(e){if(e){var t=document.createElement("th"),i=e.component._column.definition.cssClass?e.component._column.definition.cssClass.split(" "):[];t.colSpan=e.width,t.rowSpan=e.height,t.innerHTML=e.value,n.cloneTableStyle&&(t.style.boxSizing="border-box"),i.forEach((function(e){t.classList.add(e)})),n.mapElementStyles(e.component.getElement(),t,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),n.mapElementStyles(e.component._column.contentElement,t,["padding-top","padding-left","padding-right","padding-bottom"]),e.component._column.visible?n.mapElementStyles(e.component.getElement(),t,["width"]):e.component._column.definition.width&&(t.style.width=e.component._column.definition.width+"px"),e.component._column.parent&&n.mapElementStyles(e.component._column.parent.groupElement,t,["border-top"]),o.appendChild(t)}})),o}},{key:"genereateGroupElement",value:function(e,t,i){var n=document.createElement("tr"),o=document.createElement("td"),a=e.columns[0];return n.classList.add("tabulator-print-table-row"),t.groupHeader&&t.groupHeader[e.indent]?a.value=t.groupHeader[e.indent](a.value,e.component._group.getRowCount(),e.component._group.getData(),e.component):!1===t.groupHeader?a.value=a.value:a.value=e.component._group.generator(a.value,e.component._group.getRowCount(),e.component._group.getData(),e.component),o.colSpan=a.width,o.innerHTML=a.value,n.classList.add("tabulator-print-table-group"),n.classList.add("tabulator-group-level-"+e.indent),a.component.isVisible()&&n.classList.add("tabulator-group-visible"),this.mapElementStyles(i.firstGroup,n,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(i.firstGroup,o,["padding-top","padding-left","padding-right","padding-bottom"]),n.appendChild(o),n}},{key:"genereateCalcElement",value:function(e,t,i){var n=this.genereateRowElement(e,t,i);return n.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(i.calcRow,n,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),n}},{key:"genereateRowElement",value:function(t,n,o){var a=this,r=document.createElement("tr");return r.classList.add("tabulator-print-table-row"),t.columns.forEach((function(s){if(s){var l=document.createElement("td"),u=s.component._column,c=a.table.columnManager.findColumnIndex(u),h=s.value,d={modules:{},getValue:function(){return h},getField:function(){return u.definition.field},getElement:function(){return l},getColumn:function(){return u.getComponent()},getData:function(){return t.component.getData()},getRow:function(){return t.component},getComponent:function(){return d},column:u};if((u.definition.cssClass?u.definition.cssClass.split(" "):[]).forEach((function(e){l.classList.add(e)})),a.table.modExists("format")&&!1!==a.config.formatCells)h=a.table.modules.format.formatExportValue(d,a.colVisProp);else switch(e(h)){case"object":h=JSON.stringify(h);break;case"undefined":case"null":h="";break;default:h=h}h instanceof Node?l.appendChild(h):l.innerHTML=h,(o.styleCells[c]||o.firstCell)&&(a.mapElementStyles(o.styleCells[c]||o.firstCell,l,["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"]),u.definition.align&&(l.style.textAlign=u.definition.align)),a.table.options.dataTree&&!1!==a.config.dataTree&&(n.treeElementField&&n.treeElementField==u.field||!n.treeElementField&&0==i)&&(t.component._row.modules.dataTree.controlEl&&l.insertBefore(t.component._row.modules.dataTree.controlEl.cloneNode(!0),l.firstChild),t.component._row.modules.dataTree.branchEl&&l.insertBefore(t.component._row.modules.dataTree.branchEl.cloneNode(!0),l.firstChild)),r.appendChild(l),d.modules.format&&d.modules.format.renderedCallback&&d.modules.format.renderedCallback(),n.rowFormatter&&!1!==a.config.formatCells&&n.rowFormatter(t.component)}})),r}},{key:"genereateHTMLTable",value:function(e){var t=document.createElement("div");return t.appendChild(this.genereateTableElement(e)),t.innerHTML}},{key:"getHtml",value:function(e,t,i,n){var o=this.generateExportList(i||this.table.options.htmlOutputConfig,t,e,n||"htmlOutput");return this.genereateHTMLTable(o)}},{key:"mapElementStyles",value:function(e,t,i){if(this.cloneTableStyle&&e&&t){var n={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var o=window.getComputedStyle(e);i.forEach((function(e){t.style[n[e]]=o.getPropertyValue(e)}))}}}}]),s}(N);de.moduleName="export";var me={"=":function(e,t,i,n){return t==e},"<":function(e,t,i,n){return t":function(e,t,i,n){return t>e},">=":function(e,t,i,n){return t>=e},"!=":function(e,t,i,n){return t!=e},regex:function(e,t,i,n){return"string"==typeof e&&(e=new RegExp(e)),e.test(t)},like:function(e,t,i,n){return null==e?t===e:null!=t&&String(t).toLowerCase().indexOf(e.toLowerCase())>-1},keywords:function(e,t,i,n){var o=e.toLowerCase().split(void 0===n.separator?" ":n.separator),a=String(null==t?"":t).toLowerCase(),r=[];return o.forEach((function(e){a.includes(e)&&r.push(!0)})),n.matchAll?r.length===o.length:!!r.length},starts:function(e,t,i,n){return null==e?t===e:null!=t&&String(t).toLowerCase().startsWith(e.toLowerCase())},ends:function(e,t,i,n){return null==e?t===e:null!=t&&String(t).toLowerCase().endsWith(e.toLowerCase())},in:function(e,t,i,n){return Array.isArray(e)?!e.length||e.indexOf(t)>-1:(console.warn("Filter Error - filter value is not an array:",e),!1)}},pe=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).filterList=[],i.headerFilters={},i.headerFilterColumns=[],i.prevHeaderFilterChangeCheck="",i.prevHeaderFilterChangeCheck="{}",i.changed=!1,i.tableInitialized=!1,i.registerTableOption("filterMode","local"),i.registerTableOption("initialFilter",!1),i.registerTableOption("initialHeaderFilter",!1),i.registerTableOption("headerFilterLiveFilterDelay",300),i.registerColumnOption("headerFilter"),i.registerColumnOption("headerFilterPlaceholder"),i.registerColumnOption("headerFilterParams"),i.registerColumnOption("headerFilterEmptyCheck"),i.registerColumnOption("headerFilterFunc"),i.registerColumnOption("headerFilterFuncParams"),i.registerColumnOption("headerFilterLiveFilter"),i.registerTableFunction("searchRows",i.searchRows.bind(l(i))),i.registerTableFunction("searchData",i.searchData.bind(l(i))),i.registerTableFunction("setFilter",i.userSetFilter.bind(l(i))),i.registerTableFunction("refreshFilter",i.userRefreshFilter.bind(l(i))),i.registerTableFunction("addFilter",i.userAddFilter.bind(l(i))),i.registerTableFunction("getFilters",i.getFilters.bind(l(i))),i.registerTableFunction("setHeaderFilterFocus",i.userSetHeaderFilterFocus.bind(l(i))),i.registerTableFunction("getHeaderFilterValue",i.userGetHeaderFilterValue.bind(l(i))),i.registerTableFunction("setHeaderFilterValue",i.userSetHeaderFilterValue.bind(l(i))),i.registerTableFunction("getHeaderFilters",i.getHeaderFilters.bind(l(i))),i.registerTableFunction("removeFilter",i.userRemoveFilter.bind(l(i))),i.registerTableFunction("clearFilter",i.userClearFilter.bind(l(i))),i.registerTableFunction("clearHeaderFilter",i.userClearHeaderFilter.bind(l(i))),i.registerComponentFunction("column","headerFilterFocus",i.setHeaderFilterFocus.bind(l(i))),i.registerComponentFunction("column","reloadHeaderFilter",i.reloadHeaderFilter.bind(l(i))),i.registerComponentFunction("column","getHeaderFilterValue",i.getHeaderFilterValue.bind(l(i))),i.registerComponentFunction("column","setHeaderFilterValue",i.setHeaderFilterValue.bind(l(i))),i}return o(r,[{key:"initialize",value:function(){this.subscribe("column-init",this.initializeColumnHeaderFilter.bind(this)),this.subscribe("column-width-fit-before",this.hideHeaderFilterElements.bind(this)),this.subscribe("column-width-fit-after",this.showHeaderFilterElements.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),"remote"===this.table.options.filterMode&&this.subscribe("data-params",this.remoteFilterParams.bind(this)),this.registerDataHandler(this.filter.bind(this),10)}},{key:"tableBuilt",value:function(){var e=this;this.table.options.initialFilter&&this.setFilter(this.table.options.initialFilter),this.table.options.initialHeaderFilter&&this.table.options.initialHeaderFilter.forEach((function(t){var i=e.table.columnManager.findColumn(t.field);if(!i)return console.warn("Column Filter Error - No matching column found:",t.field),!1;e.setHeaderFilterValue(i,t.value)})),this.tableInitialized=!0}},{key:"remoteFilterParams",value:function(e,t,i,n){return n.filter=this.getFilters(!0,!0),n}},{key:"userSetFilter",value:function(e,t,i,n){this.setFilter(e,t,i,n),this.refreshFilter()}},{key:"userRefreshFilter",value:function(){this.refreshFilter()}},{key:"userAddFilter",value:function(e,t,i,n){this.addFilter(e,t,i,n),this.refreshFilter()}},{key:"userSetHeaderFilterFocus",value:function(e){var t=this.table.columnManager.findColumn(e);if(!t)return console.warn("Column Filter Focus Error - No matching column found:",e),!1;this.setHeaderFilterFocus(t)}},{key:"userGetHeaderFilterValue",value:function(e){var t=this.table.columnManager.findColumn(e);if(t)return this.getHeaderFilterValue(t);console.warn("Column Filter Error - No matching column found:",e)}},{key:"userSetHeaderFilterValue",value:function(e,t){var i=this.table.columnManager.findColumn(e);if(!i)return console.warn("Column Filter Error - No matching column found:",e),!1;this.setHeaderFilterValue(i,t)}},{key:"userRemoveFilter",value:function(e,t,i){this.removeFilter(e,t,i),this.refreshFilter()}},{key:"userClearFilter",value:function(e){this.clearFilter(e),this.refreshFilter()}},{key:"userClearHeaderFilter",value:function(){this.clearHeaderFilter(),this.refreshFilter()}},{key:"searchRows",value:function(e,t,i){return this.search("rows",e,t,i)}},{key:"searchData",value:function(e,t,i){return this.search("data",e,t,i)}},{key:"initializeColumnHeaderFilter",value:function(e){var t=e.definition;t.headerFilter&&(void 0!==t.headerFilterPlaceholder&&t.field&&this.module("localize").setHeaderFilterColumnPlaceholder(t.field,t.headerFilterPlaceholder),this.initializeColumn(e))}},{key:"initializeColumn",value:function(t,i){var n=this,o=t.getField();t.modules.filter={success:function(i){var a,s="input"==t.modules.filter.tagType&&"text"==t.modules.filter.attrType||"textarea"==t.modules.filter.tagType?"partial":"match",l="",u="";if(void 0===t.modules.filter.prevSuccess||t.modules.filter.prevSuccess!==i){if(t.modules.filter.prevSuccess=i,t.modules.filter.emptyFunc(i))delete n.headerFilters[o];else{switch(t.modules.filter.value=i,e(t.definition.headerFilterFunc)){case"string":r.filters[t.definition.headerFilterFunc]?(l=t.definition.headerFilterFunc,a=function(e){var n=t.definition.headerFilterFuncParams||{},o=t.getFieldValue(e);return n="function"==typeof n?n(i,o,e):n,r.filters[t.definition.headerFilterFunc](i,o,e,n)}):console.warn("Header Filter Error - Matching filter function not found: ",t.definition.headerFilterFunc);break;case"function":l=a=function(e){var n=t.definition.headerFilterFuncParams||{},o=t.getFieldValue(e);return n="function"==typeof n?n(i,o,e):n,t.definition.headerFilterFunc(i,o,e,n)}}if(!a)switch(s){case"partial":a=function(e){var n=t.getFieldValue(e);return null!=n&&String(n).toLowerCase().indexOf(String(i).toLowerCase())>-1},l="like";break;default:a=function(e){return t.getFieldValue(e)==i},l="="}n.headerFilters[o]={value:i,func:a,type:l,params:{}}}u=JSON.stringify(n.headerFilters),n.prevHeaderFilterChangeCheck!==u&&(n.prevHeaderFilterChangeCheck=u,n.trackChanges(),n.refreshFilter())}return!0},attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(t)}},{key:"generateHeaderFilterElement",value:function(t,i,n){var o,a,r,s,l,u,c,h=this,d=this,m=t.modules.filter.success,p=t.getField();if(t.modules.filter.headerElement&&t.modules.filter.headerElement.parentNode&&t.contentElement.removeChild(t.modules.filter.headerElement.parentNode),p){switch(t.modules.filter.emptyFunc=t.definition.headerFilterEmptyCheck||function(e){return!e&&"0"!==e&&0!==e},(o=document.createElement("div")).classList.add("tabulator-header-filter"),e(t.definition.headerFilter)){case"string":d.table.modules.edit.editors[t.definition.headerFilter]?(a=d.table.modules.edit.editors[t.definition.headerFilter],"tick"!==t.definition.headerFilter&&"tickCross"!==t.definition.headerFilter||t.definition.headerFilterEmptyCheck||(t.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",t.definition.editor);break;case"function":a=t.definition.headerFilter;break;case"boolean":t.modules.edit&&t.modules.edit.editor?a=t.modules.edit.editor:t.definition.formatter&&d.table.modules.edit.editors[t.definition.formatter]?(a=d.table.modules.edit.editors[t.definition.formatter],"tick"!==t.definition.formatter&&"tickCross"!==t.definition.formatter||t.definition.headerFilterEmptyCheck||(t.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):a=d.table.modules.edit.editors.input}if(a){if(s={getValue:function(){return void 0!==i?i:""},getField:function(){return t.definition.field},getElement:function(){return o},getColumn:function(){return t.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},c="function"==typeof(c=t.definition.headerFilterParams||{})?c.call(d.table,s):c,!(r=a.call(this.table.modules.edit,s,(function(){}),m,(function(){}),c)))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor returned a value of false");if(!(r instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor should return an instance of Node, the editor returned:",r);p?d.langBind("headerFilters|columns|"+t.definition.field,(function(e){r.setAttribute("placeholder",void 0!==e&&e?e:d.langText("headerFilters|default"))})):d.langBind("headerFilters|default",(function(e){r.setAttribute("placeholder",e)})),r.addEventListener("click",(function(e){e.stopPropagation(),r.focus()})),r.addEventListener("focus",(function(e){var t=h.table.columnManager.element.scrollLeft;t!==h.table.rowManager.element.scrollLeft+parseInt(h.table.columnManager.element.style.marginLeft)&&(h.table.rowManager.scrollHorizontal(t),h.table.columnManager.scrollHorizontal(t))})),l=!1,u=function(e){l&&clearTimeout(l),l=setTimeout((function(){m(r.value)}),d.table.options.headerFilterLiveFilterDelay)},t.modules.filter.headerElement=r,t.modules.filter.attrType=r.hasAttribute("type")?r.getAttribute("type").toLowerCase():"",t.modules.filter.tagType=r.tagName.toLowerCase(),!1!==t.definition.headerFilterLiveFilter&&("autocomplete"!==t.definition.headerFilter&&"tickCross"!==t.definition.headerFilter&&("autocomplete"!==t.definition.editor&&"tickCross"!==t.definition.editor||!0!==t.definition.headerFilter)&&(r.addEventListener("keyup",u),r.addEventListener("search",u),"number"==t.modules.filter.attrType&&r.addEventListener("change",(function(e){m(r.value)})),"text"==t.modules.filter.attrType&&"ie"!==this.table.browser&&r.setAttribute("type","search")),"input"!=t.modules.filter.tagType&&"select"!=t.modules.filter.tagType&&"textarea"!=t.modules.filter.tagType||r.addEventListener("mousedown",(function(e){e.stopPropagation()}))),o.appendChild(r),t.contentElement.appendChild(o),n||d.headerFilterColumns.push(t)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",t.definition.title)}},{key:"hideHeaderFilterElements",value:function(){this.headerFilterColumns.forEach((function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="none")}))}},{key:"showHeaderFilterElements",value:function(){this.headerFilterColumns.forEach((function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="")}))}},{key:"setHeaderFilterFocus",value:function(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())}},{key:"getHeaderFilterValue",value:function(e){if(e.modules.filter&&e.modules.filter.headerElement)return e.modules.filter.headerElement.value;console.warn("Column Filter Error - No header filter set on column:",e.getField())}},{key:"setHeaderFilterValue",value:function(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t,!0),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}},{key:"reloadHeaderFilter",value:function(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}},{key:"refreshFilter",value:function(){this.tableInitialized&&("remote"===this.table.options.filterMode?this.reloadData():this.refreshData(!0))}},{key:"trackChanges",value:function(){this.changed=!0,this.dispatch("filter-changed")}},{key:"hasChanged",value:function(){var e=this.changed;return this.changed=!1,e}},{key:"setFilter",value:function(e,t,i,n){this.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:i,params:n}]),this.addFilter(e)}},{key:"addFilter",value:function(e,t,i,n){var o=this,a=!1;Array.isArray(e)||(e=[{field:e,type:t,value:i,params:n}]),e.forEach((function(e){(e=o.findFilter(e))&&(o.filterList.push(e),a=!0)})),a&&this.trackChanges()}},{key:"findFilter",value:function(e){var t;if(Array.isArray(e))return this.findSubFilters(e);var i=!1;return"function"==typeof e.field?i=function(t){return e.field(t,e.type||{})}:r.filters[e.type]?i=(t=this.table.columnManager.getColumnByField(e.field))?function(i){return r.filters[e.type](e.value,t.getFieldValue(i),i,e.params||{})}:function(t){return r.filters[e.type](e.value,t[e.field],t,e.params||{})}:console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=i,!!e.func&&e}},{key:"findSubFilters",value:function(e){var t=this,i=[];return e.forEach((function(e){(e=t.findFilter(e))&&i.push(e)})),!!i.length&&i}},{key:"getFilters",value:function(e,t){var i=[];return e&&(i=this.getHeaderFilters()),t&&i.forEach((function(e){"function"==typeof e.type&&(e.type="function")})),i=i.concat(this.filtersToArray(this.filterList,t))}},{key:"filtersToArray",value:function(e,t){var i=this,n=[];return e.forEach((function(e){var o;Array.isArray(e)?n.push(i.filtersToArray(e,t)):(o={field:e.field,type:e.type,value:e.value},t&&"function"==typeof o.type&&(o.type="function"),n.push(o))})),n}},{key:"getHeaderFilters",value:function(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e}},{key:"removeFilter",value:function(t,i,n){var o=this;Array.isArray(t)||(t=[{field:t,type:i,value:n}]),t.forEach((function(t){var i=-1;(i="object"==e(t.field)?o.filterList.findIndex((function(e){return t===e})):o.filterList.findIndex((function(e){return t.field===e.field&&t.type===e.type&&t.value===e.value})))>-1?o.filterList.splice(i,1):console.warn("Filter Error - No matching filter type found, ignoring: ",t.type)})),this.trackChanges()}},{key:"clearFilter",value:function(e){this.filterList=[],e&&this.clearHeaderFilter(),this.trackChanges()}},{key:"clearHeaderFilter",value:function(){var e=this;this.headerFilters={},this.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach((function(t){void 0!==t.modules.filter.value&&delete t.modules.filter.value,t.modules.filter.prevSuccess=void 0,e.reloadHeaderFilter(t)})),this.trackChanges()}},{key:"search",value:function(e,t,i,n){var o=this,a=[],r=[];return Array.isArray(t)||(t=[{field:t,type:i,value:n}]),t.forEach((function(e){(e=o.findFilter(e))&&r.push(e)})),this.table.rowManager.rows.forEach((function(t){var i=!0;r.forEach((function(e){o.filterRecurse(e,t.getData())||(i=!1)})),i&&a.push("data"===e?t.getData("data"):t.getComponent())})),a}},{key:"filter",value:function(e,t){var i=this,n=[],o=[];return this.subscribedExternal("dataFiltering")&&this.dispatchExternal("dataFiltering",this.getFilters()),"remote"!==this.table.options.filterMode&&(this.filterList.length||Object.keys(this.headerFilters).length)?e.forEach((function(e){i.filterRow(e)&&n.push(e)})):n=e.slice(0),this.subscribedExternal("dataFiltered")&&(n.forEach((function(e){o.push(e.getComponent())})),this.dispatchExternal("dataFiltered",this.getFilters(),o)),n}},{key:"filterRow",value:function(e,t){var i=this,n=!0,o=e.getData();for(var a in this.filterList.forEach((function(e){i.filterRecurse(e,o)||(n=!1)})),this.headerFilters)this.headerFilters[a].func(o)||(n=!1);return n}},{key:"filterRecurse",value:function(e,t){var i=this,n=!1;return Array.isArray(e)?e.forEach((function(e){i.filterRecurse(e,t)&&(n=!0)})):n=e.func(t),n}}]),r}(N);pe.moduleName="filter",pe.filters=me;var fe={plaintext:function(e,t,i){return this.emptyToSpace(this.sanitizeHTML(e.getValue()))},html:function(e,t,i){return e.getValue()},textarea:function(e,t,i){return e.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(e.getValue()))},money:function(e,t,i){var n,o,a,r,s=parseFloat(e.getValue()),l="",u=t.decimal||".",c=t.thousand||",",h=t.negativeSign||"-",d=t.symbol||"",m=!!t.symbolAfter,p=void 0!==t.precision?t.precision:2;if(isNaN(s))return this.emptyToSpace(this.sanitizeHTML(e.getValue()));for(s<0&&(s=Math.abs(s),l=h),n=!1!==p?s.toFixed(p):s,o=(n=String(n).split("."))[0],a=n.length>1?u+n[1]:"",r=/(\d+)(\d{3})/;r.test(o);)o=o.replace(r,"$1"+c+"$2");return m?l+o+a+d:l+d+o+a},link:function(t,i,n){var o=t.getValue(),a=i.urlPrefix||"",r=i.download,s=o,l=document.createElement("a");if(i.labelField&&(s=t.getData()[i.labelField]),i.label)switch(e(i.label)){case"string":s=i.label;break;case"function":s=i.label(t)}if(s){if(i.urlField&&(o=t.getData()[i.urlField]),i.url)switch(e(i.url)){case"string":o=i.url;break;case"function":o=i.url(t)}return l.setAttribute("href",a+o),i.target&&l.setAttribute("target",i.target),i.download&&(r="function"==typeof r?r(t):!0===r?"":r,l.setAttribute("download",r)),l.innerHTML=this.emptyToSpace(this.sanitizeHTML(s)),l}return" "},image:function(t,i,n){var o=document.createElement("img"),a=t.getValue();switch(i.urlPrefix&&(a=i.urlPrefix+t.getValue()),i.urlSuffix&&(a+=i.urlSuffix),o.setAttribute("src",a),e(i.height)){case"number":o.style.height=i.height+"px";break;case"string":o.style.height=i.height}switch(e(i.width)){case"number":o.style.width=i.width+"px";break;case"string":o.style.width=i.width}return o.addEventListener("load",(function(){t.getRow().normalizeHeight()})),o},tickCross:function(e,t,i){var n=e.getValue(),o=e.getElement(),a=t.allowEmpty,r=t.allowTruthy,s=void 0!==t.tickElement?t.tickElement:'',l=void 0!==t.crossElement?t.crossElement:'';return r&&n||!0===n||"true"===n||"True"===n||1===n||"1"===n?(o.setAttribute("aria-checked",!0),s||""):!a||"null"!==n&&""!==n&&null!=n?(o.setAttribute("aria-checked",!1),l||""):(o.setAttribute("aria-checked","mixed"),"")},datetime:function(e,t,i){var n=window.DateTime||luxon.DateTime,o=t.inputFormat||"yyyy-MM-dd HH:mm:ss",a=t.outputFormat||"dd/MM/yyyy HH:mm:ss",r=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",s=e.getValue();if(void 0!==n){var l="iso"===o?n.fromISO(String(s)):n.fromFormat(String(s),o);return l.isValid?(t.timezone&&(l=l.shiftTimezone(t.timezone)),l.toFormat(a)):!0!==r&&s?"function"==typeof r?r(s):r:s}console.error("Format Error - 'datetime' formatter is dependant on luxon.js")},datetimediff:function(e,t,i){var n=window.DateTime||luxon.DateTime,o=t.inputFormat||"yyyy-MM-dd HH:mm:ss",a=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",r=void 0!==t.suffix&&t.suffix,s=void 0!==t.unit?t.unit:"days",l=void 0!==t.humanize&&t.humanize,u=void 0!==t.date?t.date:n.now(),c=e.getValue();if(void 0!==n){var h="iso"===o?n.fromISO(String(c)):n.fromFormat(String(c),o);if(!h.isValid)return!0===a?c:"function"==typeof a?a(c):a;if(!l)return parseInt(h.diff(u,s)[s])+(r?" "+r:"")}else console.error("Format Error - 'datetimediff' formatter is dependant on luxon.js")},lookup:function(e,t,i){var n=e.getValue();return void 0===t[n]?(console.warn("Missing display value for "+n),n):t[n]},star:function(e,t,i){var n=e.getValue(),o=e.getElement(),a=t&&t.stars?t.stars:5,r=document.createElement("span"),s=document.createElementNS("http://www.w3.org/2000/svg","svg");r.style.verticalAlign="middle",s.setAttribute("width","14"),s.setAttribute("height","14"),s.setAttribute("viewBox","0 0 512 512"),s.setAttribute("xml:space","preserve"),s.style.padding="0 1px",n=n&&!isNaN(n)?parseInt(n):0,n=Math.max(0,Math.min(n,a));for(var l=1;l<=a;l++){var u=s.cloneNode(!0);u.innerHTML=l<=n?'':'',r.appendChild(u)}return o.style.whiteSpace="nowrap",o.style.overflow="hidden",o.style.textOverflow="ellipsis",o.setAttribute("aria-label",n),r},traffic:function(t,i,n){var o,a,r=this.sanitizeHTML(t.getValue())||0,s=document.createElement("span"),l=i&&i.max?i.max:100,u=i&&i.min?i.min:0,c=i&&void 0!==i.color?i.color:["red","orange","green"],h="#666666";if(!isNaN(r)&&void 0!==t.getValue()){switch(s.classList.add("tabulator-traffic-light"),a=parseFloat(r)<=l?parseFloat(r):l,a=parseFloat(a)>=u?parseFloat(a):u,o=(l-u)/100,a=Math.round((a-u)/o),e(c)){case"string":h=c;break;case"function":h=c(r);break;case"object":if(Array.isArray(c)){var d=100/c.length,m=Math.floor(a/d);m=Math.min(m,c.length-1),h=c[m=Math.max(m,0)];break}}return s.style.backgroundColor=h,s}},progress:function(t,i,n){var o,a,r,s,l,u=this.sanitizeHTML(t.getValue())||0,c=t.getElement(),h=i&&i.max?i.max:100,d=i&&i.min?i.min:0,m=i&&i.legendAlign?i.legendAlign:"center";switch(a=parseFloat(u)<=h?parseFloat(u):h,a=parseFloat(a)>=d?parseFloat(a):d,o=(h-d)/100,a=Math.round((a-d)/o),e(i.color)){case"string":r=i.color;break;case"function":r=i.color(u);break;case"object":if(Array.isArray(i.color)){var p=100/i.color.length,f=Math.floor(a/p);f=Math.min(f,i.color.length-1),f=Math.max(f,0),r=i.color[f];break}default:r="#2DC214"}switch(e(i.legend)){case"string":s=i.legend;break;case"function":s=i.legend(u);break;case"boolean":s=u;break;default:s=!1}switch(e(i.legendColor)){case"string":l=i.legendColor;break;case"function":l=i.legendColor(u);break;case"object":if(Array.isArray(i.legendColor)){p=100/i.legendColor.length,f=Math.floor(a/p);f=Math.min(f,i.legendColor.length-1),f=Math.max(f,0),l=i.legendColor[f]}break;default:l="#000"}c.style.minWidth="30px",c.style.position="relative",c.setAttribute("aria-label",a);var g=document.createElement("div");g.style.display="inline-block",g.style.position="absolute",g.style.width=a+"%",g.style.backgroundColor=r,g.style.height="100%",g.setAttribute("data-max",h),g.setAttribute("data-min",d);var v=document.createElement("div");if(v.style.position="relative",v.style.width="100%",v.style.height="100%",s){var y=document.createElement("div");y.style.position="absolute",y.style.top=0,y.style.left=0,y.style.textAlign=m,y.style.width="100%",y.style.color=l,y.innerHTML=s}return n((function(){if(!(t instanceof b)){var e=document.createElement("div");e.style.position="absolute",e.style.top="4px",e.style.bottom="4px",e.style.left="4px",e.style.right="4px",c.appendChild(e),c=e}c.appendChild(v),v.appendChild(g),s&&v.appendChild(y)})),""},color:function(e,t,i){return e.getElement().style.backgroundColor=this.sanitizeHTML(e.getValue()),""},buttonTick:function(e,t,i){return''},buttonCross:function(e,t,i){return''},rownum:function(e,t,i){return this.table.rowManager.activeRows.indexOf(e.getRow()._getSelf())+1||""},handle:function(e,t,i){return e.getElement().classList.add("tabulator-row-handle"),"
"},responsiveCollapse:function(e,t,i){var n=document.createElement("div"),o=e.getRow()._row.modules.responsiveLayout;function a(e){var t=o.element;o.open=e,t&&(o.open?(n.classList.add("open"),t.style.display=""):(n.classList.remove("open"),t.style.display="none"))}return n.classList.add("tabulator-responsive-collapse-toggle"),n.innerHTML="+-",e.getElement().classList.add("tabulator-row-handle"),n.addEventListener("click",(function(e){e.stopImmediatePropagation(),a(!o.open)})),a(o.open),n},rowSelection:function(e,t,i){var n=this,o=document.createElement("input"),a=!1;if(o.type="checkbox",o.setAttribute("aria-label","Select Row"),this.table.modExists("selectRow",!0))if(o.addEventListener("click",(function(e){e.stopPropagation()})),"function"==typeof e.getRow){var r=e.getRow();r instanceof M?(o.addEventListener("change",(function(e){"click"===n.table.options.selectableRangeMode&&a?a=!1:r.toggleSelect()})),"click"===this.table.options.selectableRangeMode&&o.addEventListener("click",(function(e){a=!0,n.table.modules.selectRow.handleComplexRowClick(r._row,e)})),o.checked=r.isSelected&&r.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(r,o)):o=""}else o.addEventListener("change",(function(e){n.table.modules.selectRow.selectedRows.length?n.table.deselectRow():n.table.selectRow(t.rowRange)})),this.table.modules.selectRow.registerHeaderSelectCheckbox(o);return o}},ge=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).registerColumnOption("formatter"),i.registerColumnOption("formatterParams"),i.registerColumnOption("formatterPrint"),i.registerColumnOption("formatterPrintParams"),i.registerColumnOption("formatterClipboard"),i.registerColumnOption("formatterClipboardParams"),i.registerColumnOption("formatterHtmlOutput"),i.registerColumnOption("formatterHtmlOutputParams"),i.registerColumnOption("titleFormatter"),i.registerColumnOption("titleFormatterParams"),i}return o(r,[{key:"initialize",value:function(){this.subscribe("cell-format",this.formatValue.bind(this)),this.subscribe("cell-rendered",this.cellRendered.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-format",this.formatHeader.bind(this))}},{key:"initializeColumn",value:function(e){e.modules.format=this.lookupFormatter(e,""),void 0!==e.definition.formatterPrint&&(e.modules.format.print=this.lookupFormatter(e,"Print")),void 0!==e.definition.formatterClipboard&&(e.modules.format.clipboard=this.lookupFormatter(e,"Clipboard")),void 0!==e.definition.formatterHtmlOutput&&(e.modules.format.htmlOutput=this.lookupFormatter(e,"HtmlOutput"))}},{key:"lookupFormatter",value:function(t,i){var n={params:t.definition["formatter"+i+"Params"]||{}},o=t.definition["formatter"+i];switch(e(o)){case"string":r.formatters[o]?n.formatter=r.formatters[o]:(console.warn("Formatter Error - No such formatter found: ",o),n.formatter=r.formatters.plaintext);break;case"function":n.formatter=o;break;default:n.formatter=r.formatters.plaintext}return n}},{key:"cellRendered",value:function(e){e.modules.format&&e.modules.format.renderedCallback&&!e.modules.format.rendered&&(e.modules.format.renderedCallback(),e.modules.format.rendered=!0)}},{key:"formatHeader",value:function(e,t,i){var n,o,a,r;return e.definition.titleFormatter?(n=this.getFormatter(e.definition.titleFormatter),a=function(t){e.titleFormatterRendered=t},r={getValue:function(){return t},getElement:function(){return i}},o="function"==typeof(o=e.definition.titleFormatterParams||{})?o():o,n.call(this,r,o,a)):t}},{key:"formatValue",value:function(e){var t=e.getComponent(),i="function"==typeof e.column.modules.format.params?e.column.modules.format.params(t):e.column.modules.format.params;return e.column.modules.format.formatter.call(this,t,i,(function(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1}))}},{key:"formatExportValue",value:function(e,t){var i,n=e.column.modules.format[t];if(n){return i="function"==typeof n.params?n.params(component):n.params,n.formatter.call(this,e.getComponent(),i,(function(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1}))}return this.formatValue(e)}},{key:"sanitizeHTML",value:function(e){if(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=\/]/g,(function(e){return t[e]}))}return e}},{key:"emptyToSpace",value:function(e){return null==e||""===e?" ":e}},{key:"getFormatter",value:function(t){switch(e(t)){case"string":r.formatters[t]?t=r.formatters[t]:(console.warn("Formatter Error - No such formatter found: ",t),t=r.formatters.plaintext);break;case"function":t=t;break;default:t=r.formatters.plaintext}return t}}]),r}(N);ge.moduleName="format",ge.formatters=fe;var ve=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).leftColumns=[],o.rightColumns=[],o.leftMargin=0,o.rightMargin=0,o.rightPadding=0,o.initializationMode="left",o.active=!1,o.scrollEndTimer=!1,o.blocked=!0,o.registerColumnOption("frozen"),o}return o(n,[{key:"reset",value:function(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightMargin=0,this.active=!1,this.table.columnManager.headersElement.style.marginLeft=0,this.table.columnManager.element.style.paddingRight=0}},{key:"initialize",value:function(){this.subscribe("cell-layout",this.layoutCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-width",this.layout.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("table-layout",this.layout.bind(this)),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("columns-loading",this.reset.bind(this)),this.subscribe("table-redraw",this.layout.bind(this)),this.subscribe("layout-refreshing",this.blockLayout.bind(this)),this.subscribe("layout-refreshed",this.unblockLayout.bind(this))}},{key:"blockLayout",value:function(){this.blocked=!0}},{key:"unblockLayout",value:function(){this.blocked=!1}},{key:"layoutCell",value:function(e){this.layoutElement(e.element,e.column)}},{key:"initializeColumn",value:function(e){var t={margin:0,edge:!1};e.isGroup||(this.frozenCheck(e)?(t.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(e):this.rightColumns.unshift(e),this.active=!0,e.modules.frozen=t):this.initializationMode="right")}},{key:"frozenCheck",value:function(e){return e.parent.isGroup&&e.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),e.parent.isGroup?this.frozenCheck(e.parent):e.definition.frozen}},{key:"scrollHorizontal",value:function(){var e,t=this;this.active&&(clearTimeout(this.scrollEndTimer),e=this.table.rowManager.getVisibleRows(),this.calcMargins(!0),this.layoutColumnPosition(),this.layoutCalcRows(),e.forEach((function(e){"row"===e.type&&t.layoutRow(e)})))}},{key:"calcMargins",value:function(e){e||(this.leftMargin=this._calcSpace(this.leftColumns,this.leftColumns.length)+"px",this.rightMargin=this._calcSpace(this.rightColumns,this.rightColumns.length)+"px",this.table.rowManager.tableElement.style.marginRight=this.rightMargin),this.rightPadding=this.table.rowManager.element.clientWidth+this.table.columnManager.scrollLeft}},{key:"layoutCalcRows",value:function(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow),this.table.modExists("groupRows")&&this.layoutGroupCalcs(this.table.modules.groupRows.getGroups()))}},{key:"layoutGroupCalcs",value:function(e){var t=this;e.forEach((function(e){e.calcs.top&&t.layoutRow(e.calcs.top),e.calcs.bottom&&t.layoutRow(e.calcs.bottom),e.groupList&&e.groupList.length&&t.layoutGroupCalcs(e.groupList&&e.groupList)}))}},{key:"layoutColumnPosition",value:function(e){var t=this,i=[],n=0,o=0;this.table.columnManager.headersElement.style.marginLeft=this.leftMargin,this.table.columnManager.element.style.paddingRight=this.rightMargin,this.leftColumns.forEach((function(o,a){if(o.modules.frozen.margin=n+t.table.columnManager.scrollLeft+"px",o.visible&&(n+=o.getWidth()),a==t.leftColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,o.parent.isGroup){var r=t.getColGroupParentElement(o);i.includes(r)||(t.layoutElement(r,o),i.push(r)),o.modules.frozen.edge&&r.classList.add("tabulator-frozen-"+o.modules.frozen.position)}else t.layoutElement(o.getElement(),o);e&&o.cells.forEach((function(e){t.layoutElement(e.getElement(!0),o)}))})),this.rightColumns.forEach((function(i,n){i.visible&&(o+=i.getWidth()),i.modules.frozen.margin=t.rightPadding-o+"px",n==t.rightColumns.length-1?i.modules.frozen.edge=!0:i.modules.frozen.edge=!1,i.parent.isGroup?t.layoutElement(t.getColGroupParentElement(i),i):t.layoutElement(i.getElement(),i),e&&i.cells.forEach((function(e){t.layoutElement(e.getElement(!0),i)}))}))}},{key:"getColGroupParentElement",value:function(e){return e.parent.isGroup?this.getColGroupParentElement(e.parent):e.getElement()}},{key:"layout",value:function(){var e=this;this.active&&!this.blocked&&(this.calcMargins(),this.table.rowManager.getDisplayRows().forEach((function(t){"row"===t.type&&e.layoutRow(t)})),this.layoutCalcRows(),this.layoutColumnPosition(!0))}},{key:"layoutRow",value:function(e){var t=this;e.getElement().style.paddingLeft=this.leftMargin,"fitDataFill"===this.table.options.layout&&this.rightColumns.length&&(this.table.rowManager.getTableElement().style.minWidth="calc(100% - "+this.rightMargin+")"),this.leftColumns.forEach((function(i){var n=e.getCell(i);n&&t.layoutElement(n.getElement(!0),i)})),this.rightColumns.forEach((function(i){var n=e.getCell(i);n&&t.layoutElement(n.getElement(!0),i)}))}},{key:"layoutElement",value:function(e,t){t.modules.frozen&&(e.style.position="absolute",e.style.left=t.modules.frozen.margin,e.classList.add("tabulator-frozen"),t.modules.frozen.edge&&e.classList.add("tabulator-frozen-"+t.modules.frozen.position))}},{key:"_calcSpace",value:function(e,t){for(var i=0,n=0;n-1}},{key:"isFrozen",value:function(){return!!this.rows.length}},{key:"visibleRows",value:function(e,t){return this.rows.forEach((function(e){t.push(e)})),t}},{key:"getRows",value:function(e){var t=e.slice(0);return this.rows.forEach((function(e){var i=t.indexOf(e);i>-1&&t.splice(i,1)})),t}},{key:"freezeRow",value:function(e){e.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(e.modules.frozen=!0,this.topElement.appendChild(e.getElement()),e.initialize(),e.normalizeHeight(),this.table.rowManager.adjustTableSize(),this.rows.push(e),this.refreshData(!1,"display"),this.styleRows())}},{key:"unfreezeRow",value:function(e){this.rows.indexOf(e);e.modules.frozen?(e.modules.frozen=!1,this.detachRow(e),this.table.rowManager.adjustTableSize(),this.refreshData(!1,"display"),this.rows.length&&this.styleRows()):console.warn("Freeze Error - Row is already unfrozen")}},{key:"detachRow",value:function(e){var t=this.rows.indexOf(e);if(t>-1){var i=e.getElement();i.parentNode&&i.parentNode.removeChild(i),this.rows.splice(t,1)}}},{key:"styleRows",value:function(e){var t=this;this.rows.forEach((function(e,i){t.table.rowManager.styleRow(e,i)}))}}]),n}(N);be.moduleName="frozenRows";var ye=function(){function e(i){return t(this,e),this._group=i,this.type="GroupComponent",new Proxy(this,{get:function(e,t,i){return void 0!==e[t]?e[t]:e._group.groupManager.table.componentFunctionBinder.handle("row",e._group,t)}})}return o(e,[{key:"getKey",value:function(){return this._group.key}},{key:"getField",value:function(){return this._group.field}},{key:"getElement",value:function(){return this._group.element}},{key:"getRows",value:function(){return this._group.getRows(!0)}},{key:"getSubGroups",value:function(){return this._group.getSubGroups(!0)}},{key:"getParentGroup",value:function(){return!!this._group.parent&&this._group.parent.getComponent()}},{key:"isVisible",value:function(){return this._group.visible}},{key:"show",value:function(){this._group.show()}},{key:"hide",value:function(){this._group.hide()}},{key:"toggle",value:function(){this._group.toggleVisibility()}},{key:"_getSelf",value:function(){return this._group}},{key:"getTable",value:function(){return this._group.groupManager.table}}]),e}(),we=function(){function e(i,n,o,a,r,s,l){t(this,e),this.groupManager=i,this.parent=n,this.key=a,this.level=o,this.field=r,this.hasSubGroups=o-1?i?this.rows.splice(o+1,0,e):this.rows.splice(o,0,e):i?this.rows.push(e):this.rows.unshift(e),e.modules.group=this,this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)}},{key:"scrollHeader",value:function(e){this.arrowElement&&(this.arrowElement.style.marginLeft=e,this.groupList.forEach((function(t){t.scrollHeader(e)})))}},{key:"getRowIndex",value:function(e){}},{key:"conformRowData",value:function(e){return this.field?e[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(e=this.parent.conformRowData(e)),e}},{key:"removeRow",value:function(e){var t=this.rows.indexOf(e),i=e.getElement();t>-1&&this.rows.splice(t,1),this.groupManager.table.options.groupValues||this.rows.length?(i.parentNode&&i.parentNode.removeChild(i),this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))}},{key:"removeGroup",value:function(e){var t,i=e.level+"_"+e.key;this.groups[i]&&(delete this.groups[i],(t=this.groupList.indexOf(e))>-1&&this.groupList.splice(t,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))}},{key:"getHeadersAndRows",value:function(e){var t=[];return t.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach((function(i){t=t.concat(i.getHeadersAndRows(e))})):(!e&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top)),t=t.concat(this.rows),!e&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(!e&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top))),!e&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom)))),t}},{key:"getData",value:function(e,t){var i=[];return this._visSet(),(!e||e&&this.visible)&&this.rows.forEach((function(e){i.push(e.getData(t||"data"))})),i}},{key:"getRowCount",value:function(){var e=0;return this.groupList.length?this.groupList.forEach((function(t){e+=t.getRowCount()})):e=this.rows.length,e}},{key:"toggleVisibility",value:function(){this.visible?this.hide():this.show()}},{key:"hide",value:function(){this.visible=!1,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination?this.groupManager.updateGroupRows(!0):(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach((function(e){e.getHeadersAndRows().forEach((function(e){e.detachElement()}))})):this.rows.forEach((function(e){var t=e.getElement();t.parentNode.removeChild(t)})),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()),this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!1)}},{key:"show",value:function(){if(this.visible=!0,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var e=this.generateElement();this.groupList.length?this.groupList.forEach((function(t){t.getHeadersAndRows().forEach((function(t){var i=t.getElement();e.parentNode.insertBefore(i,e.nextSibling),t.initialize(),e=i}))})):this.rows.forEach((function(t){var i=t.getElement();e.parentNode.insertBefore(i,e.nextSibling),t.initialize(),e=i})),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()}this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!0)}},{key:"_visSet",value:function(){var e=[];"function"==typeof this.visible&&(this.rows.forEach((function(t){e.push(t.getData())})),this.visible=this.visible(this.key,this.getRowCount(),e,this.getComponent()))}},{key:"getRowGroup",value:function(e){var t=!1;return this.groupList.length?this.groupList.forEach((function(i){var n=i.getRowGroup(e);n&&(t=n)})):this.rows.find((function(t){return t===e}))&&(t=this),t}},{key:"getSubGroups",value:function(e){var t=[];return this.groupList.forEach((function(i){t.push(e?i.getComponent():i)})),t}},{key:"getRows",value:function(e){var t=[];return this.rows.forEach((function(i){t.push(e?i.getComponent():i)})),t}},{key:"generateGroupHeaderContents",value:function(){var e=[];for(this.rows.forEach((function(t){e.push(t.getData())})),this.elementContents=this.generator(this.key,this.getRowCount(),e,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)}},{key:"getPath",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.unshift(this.key),this.parent&&this.parent.getPath(e),e}},{key:"getElement",value:function(){return this.elementContents?this.element:this.generateElement()}},{key:"generateElement",value:function(){this.addBindings=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var e=0;en.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),this.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],this.langBind("groups|item",(function(t,i){e.headerGenerator[0]=function(e,n,o){return(void 0===e?"":e)+"("+n+" "+(1===n?t:i.groups.items)+")"}})),this.groupIDLookups=[],Array.isArray(t)||t)this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs)this.table.columnManager.getRealColumns().forEach((function(t){t.definition.topCalc&&e.table.modules.columnCalcs.initializeTopRow(),t.definition.bottomCalc&&e.table.modules.columnCalcs.initializeBottomRow()}));Array.isArray(t)||(t=[t]),t.forEach((function(t,i){var n,o;n="function"==typeof t?t:(o=e.table.columnManager.getColumnByField(t))?function(e){return o.getFieldValue(e)}:function(e){return e[t]},e.groupIDLookups.push({field:"function"!=typeof t&&t,func:n,values:!!e.allowedValues&&e.allowedValues[i]})})),i&&(Array.isArray(i)||(i=[i]),i.forEach((function(e){})),this.startOpen=i),n&&(this.headerGenerator=Array.isArray(n)?n:[n])}}},{key:"rowSample",value:function(e,t){var i=this.getGroups(!1)[0];return t.push(i.getRows(!1)[0]),t}},{key:"virtualRenderFill",value:function(){var e=this.table.rowManager.tableElement,t=this.table.rowManager.getVisibleRows();t=t.filter((function(e){return"group"!==e.type})),e.style.minWidth=t.length?"":this.table.columnManager.getWidth()+"px"}},{key:"rowAddingIndex",value:function(e,t,i){this.assignRowToGroup(e);var n=e.modules.group.rows;return n.length>1&&(!t||t&&-1==n.indexOf(t)?i?n[0]!==e&&(t=n[0],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)):n[n.length-1]!==e&&(t=n[n.length-1],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)):this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)),t}},{key:"trackChanges",value:function(){this.dispatch("group-changed")}},{key:"setGroupBy",value:function(e){this.table.options.groupBy=e,this.initialized?this.configureGroupSetup():this.initialize(),this.refreshData(),this.trackChanges()}},{key:"setGroupValues",value:function(e){this.table.options.groupValues=e,this.configureGroupSetup(),this.refreshData(),this.trackChanges()}},{key:"setGroupStartOpen",value:function(e){this.table.options.groupStartOpen=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}},{key:"setGroupHeader",value:function(e){this.table.options.groupHeader=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}},{key:"userGetGroups",value:function(e){return this.getGroups(!0)}},{key:"userGetGroupedData",value:function(){return this.table.options.groupBy?this.getGroupedData():this.getData()}},{key:"rowGetGroup",value:function(e){return!!e.modules.group&&e.modules.group.getComponent()}},{key:"rowMoving",value:function(e,t,i){!i&&t instanceof we&&(t=this.table.rowManager.prevDisplayRow(e)||t);var n=t instanceof we?t:t.modules.group,o=e instanceof we?e:e.modules.group;n===o?this.table.rowManager.moveRowInArray(n.rows,e,t,i):(o&&o.removeRow(e),n.insertRow(e,t,i))}},{key:"rowDeleting",value:function(e){e.modules.group&&e.modules.group.removeRow(e)}},{key:"rowsUpdated",value:function(e){this.updateGroupRows(!0)}},{key:"cellUpdated",value:function(e){this.reassignRowToGroup(e.row)}},{key:"setDisplayIndex",value:function(e){this.displayIndex=e}},{key:"getDisplayIndex",value:function(){return this.displayIndex}},{key:"getRows",value:function(e){return this.table.options.groupBy&&this.groupIDLookups.length?(this.dispatchExternal("dataGrouping"),this.generateGroups(e),this.subscribedExternal("dataGrouped")&&this.dispatchExternal("dataGrouped",this.getGroups(!0)),this.updateGroupRows()):e.slice(0)}},{key:"getGroups",value:function(e){var t=[];return this.groupList.forEach((function(i){t.push(e?i.getComponent():i)})),t}},{key:"getChildGroups",value:function(e){var t=this,i=[];return e||(e=this),e.groupList.forEach((function(e){e.groupList.length?i=i.concat(t.getChildGroups(e)):i.push(e)})),i}},{key:"wipe",value:function(){this.groupList.forEach((function(e){e.wipe()}))}},{key:"pullGroupListData",value:function(e){var t=this,i=[];return e.forEach((function(e){var n={level:0,rowCount:0,headerContent:""},o=[];e.hasSubGroups?(o=t.pullGroupListData(e.groupList),n.level=e.level,n.rowCount=o.length-e.groupList.length,n.headerContent=e.generator(e.key,n.rowCount,e.rows,e),i.push(n),i=i.concat(o)):(n.level=e.level,n.headerContent=e.generator(e.key,e.rows.length,e.rows,e),n.rowCount=e.getRows().length,i.push(n),e.getRows().forEach((function(e){i.push(e.getData("data"))})))})),i}},{key:"getGroupedData",value:function(){return this.pullGroupListData(this.groupList)}},{key:"getRowGroup",value:function(e){var t=!1;return this.groupList.forEach((function(i){var n=i.getRowGroup(e);n&&(t=n)})),t}},{key:"countGroups",value:function(){return this.groupList.length}},{key:"generateGroups",value:function(e){var t=this,i=this.groups;this.groups={},this.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach((function(e){t.createGroup(e,0,i)})),e.forEach((function(e){t.assignRowToExistingGroup(e,i)}))):e.forEach((function(e){t.assignRowToGroup(e,i)}))}},{key:"createGroup",value:function(e,t,i){var n,o=t+"_"+e;i=i||[],n=new we(this,!1,t,e,this.groupIDLookups[0].field,this.headerGenerator[0],i[o]),this.groups[o]=n,this.groupList.push(n)}},{key:"assignRowToExistingGroup",value:function(e,t){var i="0_"+this.groupIDLookups[0].func(e.getData());this.groups[i]&&this.groups[i].addRow(e)}},{key:"assignRowToGroup",value:function(e,t){var i=this.groupIDLookups[0].func(e.getData()),n=!this.groups["0_"+i];return n&&this.createGroup(i,0,t),this.groups["0_"+i].addRow(e),!n}},{key:"reassignRowToGroup",value:function(e){if("row"===e.type){var t=e.modules.group,i=t.getPath(),n=this.getExpectedPath(e);i.length==n.length&&i.every((function(e,t){return e===n[t]}))||(t.removeRow(e),this.assignRowToGroup(e,this.groups),this.refreshData(!0))}}},{key:"getExpectedPath",value:function(e){var t=[],i=e.getData();return this.groupIDLookups.forEach((function(e){t.push(e.func(i))})),t}},{key:"updateGroupRows",value:function(e){var t=[];return this.groupList.forEach((function(e){t=t.concat(e.getHeadersAndRows())})),e&&this.refreshData(!0,this.displayHandler),t}},{key:"scrollHeaders",value:function(e){"virtual"===this.table.options.renderHorizontal&&(e-=this.table.columnManager.renderer.vDomPadLeft),e+="px",this.groupList.forEach((function(t){t.scrollHeader(e)}))}},{key:"removeGroup",value:function(e){var t,i=e.level+"_"+e.key;this.groups[i]&&(delete this.groups[i],(t=this.groupList.indexOf(e))>-1&&this.groupList.splice(t,1))}}]),n}(N);Ce.moduleName="groupRows";var ke=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).history=[],o.index=-1,o.registerTableOption("history",!1),o}return o(n,[{key:"initialize",value:function(){this.table.options.history&&(this.subscribe("cell-value-updated",this.cellUpdated.bind(this)),this.subscribe("cell-delete",this.clearComponentHistory.bind(this)),this.subscribe("row-delete",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clear.bind(this)),this.subscribe("row-added",this.rowAdded.bind(this)),this.subscribe("row-move",this.rowMoved.bind(this))),this.registerTableFunction("undo",this.undo.bind(this)),this.registerTableFunction("redo",this.redo.bind(this)),this.registerTableFunction("getHistoryUndoSize",this.getHistoryUndoSize.bind(this)),this.registerTableFunction("getHistoryRedoSize",this.getHistoryRedoSize.bind(this)),this.registerTableFunction("clearHistory",this.clear.bind(this))}},{key:"rowMoved",value:function(e,t,i){this.action("rowMove",e,{posFrom:this.table.rowManager.getRowPosition(e),posTo:this.table.rowManager.getRowPosition(t),to:t,after:i})}},{key:"rowAdded",value:function(e,t,i,n){this.action("rowAdd",e,{data:t,pos:i,index:n})}},{key:"rowDeleted",value:function(e){var t,i;this.table.options.groupBy?(t=(i=e.getComponent().getGroup().rows).indexOf(e))&&(t=i[t-1]):(t=e.table.rowManager.getRowIndex(e))&&(t=e.table.rowManager.rows[t-1]),this.action("rowDelete",e,{data:e.getData(),pos:!t,index:t})}},{key:"cellUpdated",value:function(e){this.action("cellEdit",e,{oldValue:e.oldValue,newValue:e.value})}},{key:"clear",value:function(){this.history=[],this.index=-1}},{key:"action",value:function(e,t,i){this.history=this.history.slice(0,this.index+1),this.history.push({type:e,component:t,data:i}),this.index++}},{key:"getHistoryUndoSize",value:function(){return this.index+1}},{key:"getHistoryRedoSize",value:function(){return this.history.length-(this.index+1)}},{key:"clearComponentHistory",value:function(e){var t=this.history.findIndex((function(t){return t.component===e}));t>-1&&(this.history.splice(t,1),t<=this.index&&this.index--,this.clearComponentHistory(e))}},{key:"undo",value:function(){if(this.index>-1){var e=this.history[this.index];return n.undoers[e.type].call(this,e),this.index--,this.dispatchExternal("historyUndo",e.type,e.component.getComponent(),e.data),!0}return console.warn("History Undo Error - No more history to undo"),!1}},{key:"redo",value:function(){if(this.history.length-1>this.index){this.index++;var e=this.history[this.index];return n.redoers[e.type].call(this,e),this.dispatchExternal("historyRedo",e.type,e.component.getComponent(),e.data),!0}return console.warn("History Redo Error - No more history to redo"),!1}},{key:"_rebindRow",value:function(e,t){this.history.forEach((function(i){if(i.component instanceof L)i.component===e&&(i.component=t);else if(i.component instanceof y&&i.component.row===e){var n=i.component.column.getField();n&&(i.component=t.getCell(n))}}))}}]),n}(N);ke.moduleName="history",ke.undoers={cellEdit:function(e){e.component.setValueProcessData(e.data.oldValue),e.component.cellRendered()},rowAdd:function(e){e.component.deleteActual()},rowDelete:function(e){var t=this.table.rowManager.addRowActual(e.data.data,e.data.pos,e.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(e.component,t)},rowMove:function(e){this.table.rowManager.moveRowActual(e.component,this.table.rowManager.rows[e.data.posFrom],!e.data.after),this.table.rowManager.redraw()}},ke.redoers={cellEdit:function(e){e.component.setValueProcessData(e.data.newValue),e.component.cellRendered()},rowAdd:function(e){var t=this.table.rowManager.addRowActual(e.data.data,e.data.pos,e.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(e.component,t)},rowDelete:function(e){e.component.deleteActual()},rowMove:function(e){this.table.rowManager.moveRowActual(e.component,this.table.rowManager.rows[e.data.posTo],e.data.after),this.table.rowManager.redraw()}};var Ee=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).fieldIndex=[],i.hasIndex=!1,i}return o(r,[{key:"initialize",value:function(){this.tableElementCheck()}},{key:"tableElementCheck",value:function(){this.table.originalElement&&"TABLE"===this.table.originalElement.tagName&&this.parseTable()}},{key:"parseTable",value:function(){var e=this.table.originalElement,t=this.table.options,i=(t.columns,e.getElementsByTagName("th")),n=e.getElementsByTagName("tbody")[0],o=[];this.hasIndex=!1,this.dispatchExternal("htmlImporting"),n=n?n.getElementsByTagName("tr"):[],this._extractOptions(e,t),i.length?this._extractHeaders(i,n):this._generateBlankHeaders(i,n);for(var a=0;a-1&&e.pressedKeys.splice(n,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)}},{key:"clearBindings",value:function(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)}},{key:"checkBinding",value:function(e,t){var i=this,n=!0;return e.ctrlKey==t.ctrl&&e.shiftKey==t.shift&&e.metaKey==t.meta&&(t.keys.forEach((function(e){-1==i.pressedKeys.indexOf(e)&&(n=!1)})),n&&t.action.call(this,e),!0)}}]),r}(N);Me.moduleName="keybindings",Me.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:["ctrl + 90","meta + 90"],redo:["ctrl + 89","meta + 89"],copyToClipboard:["ctrl + 67","meta + 89"]},Me.actions={keyBlock:function(e){e.stopPropagation(),e.preventDefault()},scrollPageUp:function(e){var t=this.table.rowManager,i=t.scrollTop-t.element.clientHeight;t.element.scrollHeight;e.preventDefault(),t.displayRowsCount&&(i>=0?t.element.scrollTop=i:t.scrollToRow(t.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(e){var t=this.table.rowManager,i=t.scrollTop+t.element.clientHeight,n=t.element.scrollHeight;e.preventDefault(),t.displayRowsCount&&(i<=n?t.element.scrollTop=i:t.scrollToRow(t.getDisplayRows()[t.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(e){var t=this.table.rowManager;e.preventDefault(),t.displayRowsCount&&t.scrollToRow(t.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(e){var t=this.table.rowManager;e.preventDefault(),t.displayRowsCount&&t.scrollToRow(t.getDisplayRows()[t.displayRowsCount-1]),this.table.element.focus()},navPrev:function(e){this.dispatch("keybinding-nav-prev",e)},navNext:function(e){this.dispatch("keybinding-nav-next",e)},navLeft:function(e){this.dispatch("keybinding-nav-left",e)},navRight:function(e){this.dispatch("keybinding-nav-right",e)},navUp:function(e){this.dispatch("keybinding-nav-up",e)},navDown:function(e){this.dispatch("keybinding-nav-down",e)},undo:function(e){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(e.preventDefault(),this.table.modules.history.undo()))},redo:function(e){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(e.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(e){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}};var Le=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).menuContainer=null,o.menuElements=[],o.blurEvent=o.hideMenu.bind(l(o)),o.escEvent=o.escMenu.bind(l(o)),o.nestedMenuBlock=!1,o.positionReversedX=!1,o.currentComponent=null,o.columnSubscribers={},o.registerTableOption("rowContextMenu",!1),o.registerTableOption("rowClickMenu",!1),o.registerTableOption("groupContextMenu",!1),o.registerTableOption("groupClickMenu",!1),o.registerTableOption("menuContainer",!1),o.registerColumnOption("headerContextMenu"),o.registerColumnOption("headerClickMenu"),o.registerColumnOption("headerMenu"),o.registerColumnOption("contextMenu"),o.registerColumnOption("clickMenu"),o}return o(n,[{key:"initialize",value:function(){this.lookupMenuContainer(),this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}},{key:"lookupMenuContainer",value:function(){this.menuContainer=this.table.options.menuContainer,"string"==typeof this.menuContainer?(this.menuContainer=document.querySelector(this.menuContainer),this.menuContainer||console.warn("Menu Error - no container element found matching selector:",this.table.options.menuContainer,"(defaulting to document body)")):!0===this.menuContainer&&(this.menuContainer=this.table.element),this.menuContainer&&!this.checkMenuContainerIsParent(this.menuContainer)&&(this.menuContainer=!1,console.warn("Menu Error - container element does not contain this table:",this.table.options.menuContainer,"(defaulting to document body)")),this.menuContainer||(this.menuContainer=document.body)}},{key:"checkMenuContainerIsParent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.table.element;return e===t||!!t.parentNode&&this.checkMenuContainerIsParent(e,t.parentNode)}},{key:"initializeRowWatchers",value:function(){this.table.options.rowContextMenu&&(this.subscribe("row-contextmenu",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu)),this.table.on("rowTapHold",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu))),this.table.options.rowClickMenu&&this.subscribe("row-click",this.loadMenuEvent.bind(this,this.table.options.rowClickMenu))}},{key:"initializeGroupWatchers",value:function(){this.table.options.groupContextMenu&&(this.subscribe("group-contextmenu",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu)),this.table.on("groupTapHold",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu))),this.table.options.groupClickMenu&&this.subscribe("group-click",this.loadMenuEvent.bind(this,this.table.options.groupClickMenu))}},{key:"initializeColumn",value:function(e){var t=e.definition;t.headerContextMenu&&!this.columnSubscribers.headerContextMenu&&(this.columnSubscribers.headerContextMenu=this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextMenu),this.table.on("headerTapHold",this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"))),t.headerClickMenu&&!this.columnSubscribers.headerClickMenu&&(this.columnSubscribers.headerClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerClickMenu"),this.subscribe("column-click",this.columnSubscribers.headerClickMenu)),t.headerMenu&&this.initializeColumnHeaderMenu(e),t.contextMenu&&!this.columnSubscribers.contextMenu&&(this.columnSubscribers.contextMenu=this.loadMenuTableCellEvent.bind(this,"contextMenu"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextMenu),this.table.on("cellTapHold",this.loadMenuTableCellEvent.bind(this,"contextMenu"))),t.clickMenu&&!this.columnSubscribers.clickMenu&&(this.columnSubscribers.clickMenu=this.loadMenuTableCellEvent.bind(this,"clickMenu"),this.subscribe("cell-click",this.columnSubscribers.clickMenu))}},{key:"initializeColumnHeaderMenu",value:function(e){var t,i=this;(t=document.createElement("span")).classList.add("tabulator-header-menu-button"),t.innerHTML="⋮",t.addEventListener("click",(function(t){t.stopPropagation(),t.preventDefault(),i.loadMenuEvent(e.definition.headerMenu,t,e)})),e.titleElement.insertBefore(t,e.titleElement.firstChild)}},{key:"loadMenuTableCellEvent",value:function(e,t,i){i._cell&&(i=i._cell),i.column.definition[e]&&this.loadMenuEvent(i.column.definition[e],t,i)}},{key:"loadMenuTableColumnEvent",value:function(e,t,i){i._column&&(i=i._column),i.definition[e]&&this.loadMenuEvent(i.definition[e],t,i)}},{key:"loadMenuEvent",value:function(e,t,i){i._group?i=i._group:i._row&&(i=i._row),e="function"==typeof e?e.call(this.table,i.getComponent(),t):e,this.loadMenu(t,i,e)}},{key:"loadMenu",value:function(e,t,i,n){var o=this,a=!(e instanceof MouseEvent),r=document.createElement("div");if(r.classList.add("tabulator-menu"),a||e.preventDefault(),i&&i.length){if(!n){if(this.nestedMenuBlock){if(this.isOpen())return}else this.nestedMenuBlock=setTimeout((function(){o.nestedMenuBlock=!1}),100);this.hideMenu(),this.menuElements=[]}i.forEach((function(e){var i=document.createElement("div"),n=e.label,a=e.disabled;e.separator?i.classList.add("tabulator-menu-separator"):(i.classList.add("tabulator-menu-item"),"function"==typeof n&&(n=n.call(o.table,t.getComponent())),n instanceof Node?i.appendChild(n):i.innerHTML=n,"function"==typeof a&&(a=a.call(o.table,t.getComponent())),a?(i.classList.add("tabulator-menu-item-disabled"),i.addEventListener("click",(function(e){e.stopPropagation()}))):e.menu&&e.menu.length?i.addEventListener("click",(function(n){n.stopPropagation(),o.hideOldSubMenus(r),o.loadMenu(n,t,e.menu,i)})):e.action&&i.addEventListener("click",(function(i){e.action(i,t.getComponent())})),e.menu&&e.menu.length&&i.classList.add("tabulator-menu-item-submenu")),r.appendChild(i)})),r.addEventListener("click",(function(e){o.hideMenu()})),this.menuElements.push(r),this.positionMenu(r,n,a,e),this.currentComponent=t,this.dispatchExternal("menuOpened",t.getComponent())}}},{key:"hideOldSubMenus",value:function(e){var t=this.menuElements.indexOf(e);if(t>-1)for(var i=this.menuElements.length-1;i>t;i--){var n=this.menuElements[i];n.parentNode&&n.parentNode.removeChild(n),this.menuElements.pop()}}},{key:"positionMenu",value:function(e,t,i,n){var o,a,r,s=this;t?(o=(r=C.elOffset(t)).left+t.offsetWidth,a=r.top-1):(o=i?n.touches[0].pageX:n.pageX,a=i?n.touches[0].pageY:n.pageY,this.menuContainer!==document.body&&(o-=(r=C.elOffset(this.menuContainer)).left,a-=r.top),this.positionReversedX=!1),e.style.top=a+"px",e.style.left=o+"px",setTimeout((function(){s.table.rowManager.element.addEventListener("scroll",s.blurEvent),document.body.addEventListener("click",s.blurEvent),document.body.addEventListener("contextmenu",s.blurEvent),window.addEventListener("resize",s.blurEvent),document.body.addEventListener("keydown",s.escEvent)}),100),this.menuContainer.appendChild(e),(o+e.offsetWidth>=this.menuContainer.offsetWidth||this.positionReversedX)&&(e.style.left="",e.style.right=t?this.menuContainer.offsetWidth-r.left+"px":this.menuContainer.offsetWidth-o+"px",this.positionReversedX=!0),a+e.offsetHeight>this.menuContainer.offsetHeight&&(e.style.top=t?parseInt(e.style.top)-e.offsetHeight+t.offsetHeight+1+"px":parseInt(e.style.top)-e.offsetHeight+"px")}},{key:"isOpen",value:function(){return!!this.menuElements.length}},{key:"escMenu",value:function(e){27==e.keyCode&&this.hideMenu()}},{key:"hideMenu",value:function(){this.menuElements.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)})),document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.currentComponent&&(this.dispatchExternal("menuClosed",this.currentComponent.getComponent()),this.currentComponent=null)}}]),n}(N);Le.moduleName="menu";var De=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).placeholderElement=o.createPlaceholderElement(),o.hoverElement=!1,o.checkTimeout=!1,o.checkPeriod=250,o.moving=!1,o.toCol=!1,o.toColAfter=!1,o.startX=0,o.autoScrollMargin=40,o.autoScrollStep=5,o.autoScrollTimeout=!1,o.touchMove=!1,o.moveHover=o.moveHover.bind(l(o)),o.endMove=o.endMove.bind(l(o)),o.registerTableOption("movableColumns",!1),o}return o(n,[{key:"createPlaceholderElement",value:function(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.classList.add("tabulator-col-placeholder"),e}},{key:"initialize",value:function(){this.table.options.movableColumns&&this.subscribe("column-init",this.initializeColumn.bind(this))}},{key:"initializeColumn",value:function(e){var t,i=this,n={};e.modules.frozen||(t=e.getElement(),n.mousemove=function(n){e.parent===i.moving.parent&&((i.touchMove?n.touches[0].pageX:n.pageX)-C.elOffset(t).left+i.table.columnManager.element.scrollLeft>e.getWidth()/2?i.toCol===e&&i.toColAfter||(t.parentNode.insertBefore(i.placeholderElement,t.nextSibling),i.moveColumn(e,!0)):(i.toCol!==e||i.toColAfter)&&(t.parentNode.insertBefore(i.placeholderElement,t),i.moveColumn(e,!1)))}.bind(i),t.addEventListener("mousedown",(function(t){i.touchMove=!1,1===t.which&&(i.checkTimeout=setTimeout((function(){i.startMove(t,e)}),i.checkPeriod))})),t.addEventListener("mouseup",(function(e){1===e.which&&i.checkTimeout&&clearTimeout(i.checkTimeout)})),i.bindTouchEvents(e)),e.modules.moveColumn=n}},{key:"bindTouchEvents",value:function(e){var t,i,n,o,a,r,s=this,l=e.getElement(),u=!1;l.addEventListener("touchstart",(function(l){s.checkTimeout=setTimeout((function(){s.touchMove=!0,t=e.nextColumn(),n=t?t.getWidth()/2:0,i=e.prevColumn(),o=i?i.getWidth()/2:0,a=0,r=0,u=!1,s.startMove(l,e)}),s.checkPeriod)}),{passive:!0}),l.addEventListener("touchmove",(function(l){var c,h;s.moving&&(s.moveHover(l),u||(u=l.touches[0].pageX),(c=l.touches[0].pageX-u)>0?t&&c-a>n&&(h=t)!==e&&(u=l.touches[0].pageX,h.getElement().parentNode.insertBefore(s.placeholderElement,h.getElement().nextSibling),s.moveColumn(h,!0)):i&&-c-r>o&&(h=i)!==e&&(u=l.touches[0].pageX,h.getElement().parentNode.insertBefore(s.placeholderElement,h.getElement()),s.moveColumn(h,!1)),h&&(t=h.nextColumn(),a=n,n=t?t.getWidth()/2:0,i=h.prevColumn(),r=o,o=i?i.getWidth()/2:0))}),{passive:!0}),l.addEventListener("touchend",(function(e){s.checkTimeout&&clearTimeout(s.checkTimeout),s.moving&&s.endMove(e)}))}},{key:"startMove",value:function(e,t){var i=t.getElement(),n=this.table.columnManager.getElement(),o=this.table.columnManager.getHeadersElement();this.moving=t,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-C.elOffset(i).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.table.columnManager.getElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom=n.clientHeight-o.offsetHeight+"px",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(e)}},{key:"_bindMouseMove",value:function(){this.table.columnManager.columnsByIndex.forEach((function(e){e.modules.moveColumn.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveColumn.mousemove)}))}},{key:"_unbindMouseMove",value:function(){this.table.columnManager.columnsByIndex.forEach((function(e){e.modules.moveColumn.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveColumn.mousemove)}))}},{key:"moveColumn",value:function(e,t){var i=this.moving.getCells();this.toCol=e,this.toColAfter=t,t?e.getCells().forEach((function(e,t){var n=e.getElement(!0);n.parentNode&&i[t]&&n.parentNode.insertBefore(i[t].getElement(),n.nextSibling)})):e.getCells().forEach((function(e,t){var n=e.getElement(!0);n.parentNode&&i[t]&&n.parentNode.insertBefore(i[t].getElement(),n)}))}},{key:"endMove",value:function(e){(1===e.which||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))}},{key:"moveHover",value:function(e){var t,i=this,n=this.table.columnManager.getElement(),o=n.scrollLeft,a=(this.touchMove?e.touches[0].pageX:e.pageX)-C.elOffset(n).left+o;this.hoverElement.style.left=a-this.startX+"px",a-oe.getHeight()/2?t.toRow===e&&t.toRowAfter||((n=e.getElement()).parentNode.insertBefore(t.placeholderElement,n.nextSibling),t.moveRow(e,!0)):(t.toRow!==e||t.toRowAfter)&&(n=e.getElement()).previousSibling&&(n.parentNode.insertBefore(t.placeholderElement,n),t.moveRow(e,!1))}.bind(t),e.modules.moveRow=i}},{key:"initializeRow",value:function(e){var t,i=this,n={};n.mouseup=function(t){i.tableRowDrop(t,e)}.bind(i),n.mousemove=function(t){var n=e.getElement();t.pageY-C.elOffset(n).top+i.table.rowManager.element.scrollTop>e.getHeight()/2?i.toRow===e&&i.toRowAfter||(n.parentNode.insertBefore(i.placeholderElement,n.nextSibling),i.moveRow(e,!0)):(i.toRow!==e||i.toRowAfter)&&(n.parentNode.insertBefore(i.placeholderElement,n),i.moveRow(e,!1))}.bind(i),this.hasHandle||((t=e.getElement()).addEventListener("mousedown",(function(t){1===t.which&&(i.checkTimeout=setTimeout((function(){i.startMove(t,e)}),i.checkPeriod))})),t.addEventListener("mouseup",(function(e){1===e.which&&i.checkTimeout&&clearTimeout(i.checkTimeout)})),this.bindTouchEvents(e,e.getElement())),e.modules.moveRow=n}},{key:"initializeColumn",value:function(e){e.definition.rowHandle&&!1!==this.table.options.movableRows&&(this.hasHandle=!0)}},{key:"initializeCell",value:function(e){if(e.column.definition.rowHandle&&!1!==this.table.options.movableRows){var t=this,i=e.getElement(!0);i.addEventListener("mousedown",(function(i){1===i.which&&(t.checkTimeout=setTimeout((function(){t.startMove(i,e.row)}),t.checkPeriod))})),i.addEventListener("mouseup",(function(e){1===e.which&&t.checkTimeout&&clearTimeout(t.checkTimeout)})),this.bindTouchEvents(e.row,i)}}},{key:"bindTouchEvents",value:function(e,t){var i,n,o,a,r,s,l=this,u=!1;t.addEventListener("touchstart",(function(t){l.checkTimeout=setTimeout((function(){l.touchMove=!0,i=e.nextRow(),o=i?i.getHeight()/2:0,n=e.prevRow(),a=n?n.getHeight()/2:0,r=0,s=0,u=!1,l.startMove(t,e)}),l.checkPeriod)}),{passive:!0}),this.moving,this.toRow,this.toRowAfter,t.addEventListener("touchmove",(function(t){var c,h;l.moving&&(t.preventDefault(),l.moveHover(t),u||(u=t.touches[0].pageY),(c=t.touches[0].pageY-u)>0?i&&c-r>o&&(h=i)!==e&&(u=t.touches[0].pageY,h.getElement().parentNode.insertBefore(l.placeholderElement,h.getElement().nextSibling),l.moveRow(h,!0)):n&&-c-s>a&&(h=n)!==e&&(u=t.touches[0].pageY,h.getElement().parentNode.insertBefore(l.placeholderElement,h.getElement()),l.moveRow(h,!1)),h&&(i=h.nextRow(),r=o,o=i?i.getHeight()/2:0,n=h.prevRow(),s=a,a=n?n.getHeight()/2:0))})),t.addEventListener("touchend",(function(e){l.checkTimeout&&clearTimeout(l.checkTimeout),l.moving&&(l.endMove(e),l.touchMove=!1)}))}},{key:"_bindMouseMove",value:function(){this.table.rowManager.getDisplayRows().forEach((function(e){("row"===e.type||"group"===e.type)&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveRow.mousemove)}))}},{key:"_unbindMouseMove",value:function(){this.table.rowManager.getDisplayRows().forEach((function(e){("row"===e.type||"group"===e.type)&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveRow.mousemove)}))}},{key:"startMove",value:function(e,t){var i=t.getElement();this.setStartPosition(e,t),this.moving=t,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(t)):(i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i)),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.dispatchExternal("rowMoving",t.getComponent()),this.moveHover(e)}},{key:"setStartPosition",value:function(e,t){var i,n,o=this.touchMove?e.touches[0].pageX:e.pageX,a=this.touchMove?e.touches[0].pageY:e.pageY;i=t.getElement(),this.connection?(n=i.getBoundingClientRect(),this.startX=n.left-o+window.pageXOffset,this.startY=n.top-a+window.pageYOffset):this.startY=a-i.getBoundingClientRect().top}},{key:"endMove",value:function(e){e&&1!==e.which&&!this.touchMove||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow?this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter):this.dispatchExternal("rowMoveCancelled",this.moving.getComponent()),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))}},{key:"moveRow",value:function(e,t){this.toRow=e,this.toRowAfter=t}},{key:"moveHover",value:function(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)}},{key:"moveHoverTable",value:function(e){var t=this.table.rowManager.getElement(),i=t.scrollTop,n=(this.touchMove?e.touches[0].pageY:e.pageY)-t.getBoundingClientRect().top+i;this.hoverElement.style.top=n-this.startY+"px"}},{key:"moveHoverConnections",value:function(e){this.hoverElement.style.left=this.startX+(this.touchMove?e.touches[0].pageX:e.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?e.touches[0].pageY:e.pageY)+"px"}},{key:"elementRowDrop",value:function(e,t,i){this.dispatchExternal("movableRowsElementDrop",e,t,!!i&&i.getComponent())}},{key:"connectToTables",value:function(e){var t,i=this;this.connectionSelectorsTables&&(t=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStart",t),this.commsSend(this.connectionSelectorsTables,"moveRow","connect",{row:e})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach((function(e){"string"==typeof e?i.connectionElements=i.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(e))):i.connectionElements.push(e)})),this.connectionElements.forEach((function(e){var t=function(t){i.elementRowDrop(t,e,i.moving)};e.addEventListener("mouseup",t),e.tabulatorElementDropEvent=t,e.classList.add("tabulator-movingrow-receiving")})))}},{key:"disconnectFromTables",value:function(){var e;this.connectionSelectorsTables&&(e=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStop",e),this.commsSend(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach((function(e){e.classList.remove("tabulator-movingrow-receiving"),e.removeEventListener("mouseup",e.tabulatorElementDropEvent),delete e.tabulatorElementDropEvent}))}},{key:"connect",value:function(e,t){return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=e,this.connectedRow=t,this.table.element.classList.add("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach((function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().addEventListener("mouseup",e.modules.moveRow.mouseup)})),this.tableRowDropEvent=this.tableRowDrop.bind(this),this.table.element.addEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStart",t,e),!0)}},{key:"disconnect",value:function(e){e===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach((function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().removeEventListener("mouseup",e.modules.moveRow.mouseup)})),this.table.element.removeEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStop",e)):console.warn("Move Row Error - trying to disconnect from non connected table")}},{key:"dropComplete",value:function(t,i,n){var o=!1;if(n){switch(e(this.table.options.movableRowsSender)){case"string":o=this.senders[this.table.options.movableRowsSender];break;case"function":o=this.table.options.movableRowsSender}o?o.call(this,this.moving.getComponent(),i?i.getComponent():void 0,t):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.dispatchExternal("movableRowsSent",this.moving.getComponent(),i?i.getComponent():void 0,t)}else this.dispatchExternal("movableRowsSentFailed",this.moving.getComponent(),i?i.getComponent():void 0,t);this.endMove()}},{key:"tableRowDrop",value:function(t,i){var n=!1,o=!1;switch(t.stopImmediatePropagation(),e(this.table.options.movableRowsReceiver)){case"string":n=this.receivers[this.table.options.movableRowsReceiver];break;case"function":n=this.table.options.movableRowsReceiver}n?o=n.call(this,this.connectedRow.getComponent(),i?i.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),o?this.dispatchExternal("movableRowsReceived",this.connectedRow.getComponent(),i?i.getComponent():void 0,this.connectedTable):this.dispatchExternal("movableRowsReceivedFailed",this.connectedRow.getComponent(),i?i.getComponent():void 0,this.connectedTable),this.commsSend(this.connectedTable,"moveRow","dropcomplete",{row:i,success:o})}},{key:"commsReceived",value:function(e,t,i){switch(t){case"connect":return this.connect(e,i.row);case"disconnect":return this.disconnect(e);case"dropcomplete":return this.dropComplete(e,i.row,i.success)}}}]),r}(N);Se.prototype.receivers={insert:function(e,t,i){return this.table.addRow(e.getData(),void 0,t),!0},add:function(e,t,i){return this.table.addRow(e.getData()),!0},update:function(e,t,i){return!!t&&(t.update(e.getData()),!0)},replace:function(e,t,i){return!!t&&(this.table.addRow(e.getData(),void 0,t),t.delete(),!0)}},Se.prototype.senders={delete:function(e,t,i){e.delete()}},Se.moduleName="moveRow";var Fe=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).allowedTypes=["","data","edit","clipboard"],i.enabled=!0,i.registerColumnOption("mutator"),i.registerColumnOption("mutatorParams"),i.registerColumnOption("mutatorData"),i.registerColumnOption("mutatorDataParams"),i.registerColumnOption("mutatorEdit"),i.registerColumnOption("mutatorEditParams"),i.registerColumnOption("mutatorClipboard"),i.registerColumnOption("mutatorClipboardParams"),i}return o(r,[{key:"initialize",value:function(){this.subscribe("cell-value-changing",this.transformCell.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-init-before",this.rowDataChanged.bind(this)),this.subscribe("row-data-changing",this.rowDataChanged.bind(this))}},{key:"rowDataChanged",value:function(e,t,i){return this.transformRow(t,"data",i)}},{key:"initializeColumn",value:function(e){var t=this,i=!1,n={};this.allowedTypes.forEach((function(o){var a,r="mutator"+(o.charAt(0).toUpperCase()+o.slice(1));e.definition[r]&&(a=t.lookupMutator(e.definition[r]))&&(i=!0,n[r]={mutator:a,params:e.definition[r+"Params"]||{}})})),i&&(e.modules.mutate=n)}},{key:"lookupMutator",value:function(t){var i=!1;switch(e(t)){case"string":r.mutators[t]?i=r.mutators[t]:console.warn("Mutator Error - No such mutator found, ignoring: ",t);break;case"function":i=t}return i}},{key:"transformRow",value:function(e,t,i){var n,o="mutator"+(t.charAt(0).toUpperCase()+t.slice(1));return this.enabled&&this.table.columnManager.traverse((function(a){var r,s,l;a.modules.mutate&&(r=a.modules.mutate[o]||a.modules.mutate.mutator||!1)&&(n=a.getFieldValue(void 0!==i?i:e),"data"!=t&&void 0===n||(l=a.getComponent(),s="function"==typeof r.params?r.params(n,e,t,l):r.params,a.setFieldValue(e,r.mutator(n,e,t,s,l))))})),e}},{key:"transformCell",value:function(e,t){if(e.column.modules.mutate){var i=e.column.modules.mutate.mutatorEdit||e.column.modules.mutate.mutator||!1,n={};if(i)return n=Object.assign(n,e.row.getData()),e.column.setFieldValue(n,t),i.mutator(t,n,"edit",i.params,e.getComponent())}return t}},{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1}}]),r}(N);Fe.moduleName="mutator",Fe.mutators={};var Pe={rows:function(e,t,i,n,o){var a=document.createElement("span"),r=document.createElement("span"),s=document.createElement("span"),l=document.createElement("span"),u=document.createElement("span"),c=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",(function(e){r.innerHTML=e})),this.table.modules.localize.langBind("pagination|counter|of",(function(e){l.innerHTML=e})),this.table.modules.localize.langBind("pagination|counter|rows",(function(e){c.innerHTML=e})),n?(s.innerHTML=" "+t+"-"+Math.min(t+e-1,n)+" ",u.innerHTML=" "+n+" ",a.appendChild(r),a.appendChild(s),a.appendChild(l),a.appendChild(u),a.appendChild(c)):(s.innerHTML=" 0 ",a.appendChild(r),a.appendChild(s),a.appendChild(c)),a},pages:function(e,t,i,n,o){var a=document.createElement("span"),r=document.createElement("span"),s=document.createElement("span"),l=document.createElement("span"),u=document.createElement("span"),c=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",(function(e){r.innerHTML=e})),s.innerHTML=" "+i+" ",this.table.modules.localize.langBind("pagination|counter|of",(function(e){l.innerHTML=e})),u.innerHTML=" "+o+" ",this.table.modules.localize.langBind("pagination|counter|pages",(function(e){c.innerHTML=e})),a.appendChild(r),a.appendChild(s),a.appendChild(l),a.appendChild(u),a.appendChild(c),a}},ze=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).mode="local",i.progressiveLoad=!1,i.element=null,i.pageCounterElement=null,i.pageCounter=null,i.size=0,i.page=1,i.count=5,i.max=1,i.remoteRowCountEstimate=null,i.displayIndex=0,i.initialLoad=!0,i.dataChanging=!1,i.pageSizes=[],i.registerTableOption("pagination",!1),i.registerTableOption("paginationMode","local"),i.registerTableOption("paginationSize",!1),i.registerTableOption("paginationInitialPage",1),i.registerTableOption("paginationCounter",!1),i.registerTableOption("paginationCounterElement",!1),i.registerTableOption("paginationButtonCount",5),i.registerTableOption("paginationSizeSelector",!1),i.registerTableOption("paginationElement",!1),i.registerTableOption("paginationAddRow","page"),i.registerTableOption("progressiveLoad",!1),i.registerTableOption("progressiveLoadDelay",0),i.registerTableOption("progressiveLoadScrollMargin",0),i.registerTableFunction("setMaxPage",i.setMaxPage.bind(l(i))),i.registerTableFunction("setPage",i.setPage.bind(l(i))),i.registerTableFunction("setPageToRow",i.userSetPageToRow.bind(l(i))),i.registerTableFunction("setPageSize",i.userSetPageSize.bind(l(i))),i.registerTableFunction("getPageSize",i.getPageSize.bind(l(i))),i.registerTableFunction("previousPage",i.previousPage.bind(l(i))),i.registerTableFunction("nextPage",i.nextPage.bind(l(i))),i.registerTableFunction("getPage",i.getPage.bind(l(i))),i.registerTableFunction("getPageMax",i.getPageMax.bind(l(i))),i.registerComponentFunction("row","pageTo",i.setPageToRow.bind(l(i))),i}return o(r,[{key:"initialize",value:function(){this.table.options.pagination?(this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),"page"==this.table.options.paginationAddRow&&this.subscribe("row-adding-position",this.rowAddingPosition.bind(this)),"remote"===this.table.options.paginationMode&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this))),this.table.options.progressiveLoad&&console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time"),this.registerDisplayHandler(this.restOnRenderBefore.bind(this),40),this.registerDisplayHandler(this.getRows.bind(this),50),this.createElements(),this.initializePageCounter(),this.initializePaginator()):this.table.options.progressiveLoad&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.initializeProgressive(this.table.options.progressiveLoad),"scroll"===this.table.options.progressiveLoad&&this.subscribe("scroll-vertical",this.scrollVertical.bind(this)))}},{key:"rowAddingPosition",value:function(e,t){var i,n=this.table.rowManager,o=n.getDisplayRows();return t?o.length?i=o[0]:n.activeRows.length&&(i=n.activeRows[n.activeRows.length-1],t=!1):o.length&&(i=o[o.length-1],t=!(o.lengththis.max&&(this.page=this.max)}},{key:"reset",value:function(e){this.initialLoad||("local"==this.mode||e)&&(this.page=1)}},{key:"setMaxPage",value:function(e){e=parseInt(e),this.max=e||1,this.page>this.max&&(this.page=this.max,this.trigger())}},{key:"setPage",value:function(e){switch(e){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return(e=parseInt(e))>0&&e<=this.max||"local"!==this.mode?(this.page=e,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Requested page is out of range of 1 - "+this.max+":",e),Promise.reject())}},{key:"setPageToRow",value:function(e){var t=this.table.rowManager.getDisplayRows(this.displayIndex-1).indexOf(e);if(t>-1){var i=!0===this.size?1:Math.ceil((t+1)/this.size);return this.setPage(i)}return console.warn("Pagination Error - Requested row is not visible"),Promise.reject()}},{key:"setPageSize",value:function(e){!0!==e&&(e=parseInt(e)),e>0&&(this.size=e),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.trackChanges()}},{key:"_setPageCounter",value:function(t,i,n){var o;if(this.pageCounter)switch("remote"===this.mode&&(i=this.size,n=(this.page-1)*this.size+1,t=this.remoteRowCountEstimate),e(o=this.pageCounter.call(this,i,n,this.page,t,this.max))){case"object":if(o instanceof Node){for(;this.pageCounterElement.firstChild;)this.pageCounterElement.removeChild(this.pageCounterElement.firstChild);this.pageCounterElement.appendChild(o)}else this.pageCounterElement.innerHTML="",null!=o&&console.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:",o);break;case"undefined":case"null":this.pageCounterElement.innerHTML="";break;default:this.pageCounterElement.innerHTML=o}}},{key:"_setPageButtons",value:function(){for(var e=Math.floor((this.count-1)/2),t=Math.ceil((this.count-1)/2),i=this.max-this.page+e+10&&o<=this.max&&this.pagesElement.appendChild(this._generatePageButton(o));this.footerRedraw()}},{key:"_generatePageButton",value:function(e){var t=this,i=document.createElement("button");return i.classList.add("tabulator-page"),e==this.page&&i.classList.add("active"),i.setAttribute("type","button"),i.setAttribute("role","button"),this.langBind("pagination|page_title",(function(t){i.setAttribute("aria-label",t+" "+e),i.setAttribute("title",t+" "+e)})),i.setAttribute("data-page",e),i.textContent=e,i.addEventListener("click",(function(i){t.setPage(e)})),i}},{key:"previousPage",value:function(){return this.page>1?(this.page--,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Previous page would be less than page 1:",0),Promise.reject())}},{key:"nextPage",value:function(){return this.page-1&&(o=o.slice(r),(i=o.indexOf(";"))>-1&&(o=o.slice(0,i)),n=o.replace(a+"=","")),!!n&&JSON.parse(n)}},Ae={local:function(e,t,i){localStorage.setItem(e+"-"+t,JSON.stringify(i))},cookie:function(e,t,i){var n=new Date;n.setDate(n.getDate()+1e4),document.cookie=e+"-"+t+"="+JSON.stringify(i)+"; expires="+n.toUTCString()}},Oe=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).mode="",o.id="",o.defWatcherBlock=!1,o.config={},o.readFunc=!1,o.writeFunc=!1,o.registerTableOption("persistence",!1),o.registerTableOption("persistenceID",""),o.registerTableOption("persistenceMode",!0),o.registerTableOption("persistenceReaderFunc",!1),o.registerTableOption("persistenceWriterFunc",!1),o}return o(n,[{key:"localStorageTest",value:function(){var e="_tabulator_test";try{return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}}},{key:"initialize",value:function(){if(this.table.options.persistence){var e,t=this.table.options.persistenceMode,i=this.table.options.persistenceID;this.mode=!0!==t?t:this.localStorageTest()?"local":"cookie",this.table.options.persistenceReaderFunc?"function"==typeof this.table.options.persistenceReaderFunc?this.readFunc=this.table.options.persistenceReaderFunc:n.readers[this.table.options.persistenceReaderFunc]?this.readFunc=n.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):n.readers[this.mode]?this.readFunc=n.readers[this.mode]:console.warn("Persistence Read Error - invalid reader set",this.mode),this.table.options.persistenceWriterFunc?"function"==typeof this.table.options.persistenceWriterFunc?this.writeFunc=this.table.options.persistenceWriterFunc:n.writers[this.table.options.persistenceWriterFunc]?this.writeFunc=n.writers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):n.writers[this.mode]?this.writeFunc=n.writers[this.mode]:console.warn("Persistence Write Error - invalid writer set",this.mode),this.id="tabulator-"+(i||this.table.element.getAttribute("id")||""),this.config={sort:!0===this.table.options.persistence||this.table.options.persistence.sort,filter:!0===this.table.options.persistence||this.table.options.persistence.filter,group:!0===this.table.options.persistence||this.table.options.persistence.group,page:!0===this.table.options.persistence||this.table.options.persistence.page,columns:!0===this.table.options.persistence?["title","width","visible"]:this.table.options.persistence.columns},this.config.page&&(e=this.retreiveData("page"))&&(void 0===e.paginationSize||!0!==this.config.page&&!this.config.page.size||(this.table.options.paginationSize=e.paginationSize),void 0===e.paginationInitialPage||!0!==this.config.page&&!this.config.page.page||(this.table.options.paginationInitialPage=e.paginationInitialPage)),this.config.group&&(e=this.retreiveData("group"))&&(void 0===e.groupBy||!0!==this.config.group&&!this.config.group.groupBy||(this.table.options.groupBy=e.groupBy),void 0===e.groupStartOpen||!0!==this.config.group&&!this.config.group.groupStartOpen||(this.table.options.groupStartOpen=e.groupStartOpen),void 0===e.groupHeader||!0!==this.config.group&&!this.config.group.groupHeader||(this.table.options.groupHeader=e.groupHeader)),this.config.columns&&(this.table.options.columns=this.load("columns",this.table.options.columns),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-show",this.save.bind(this,"columns")),this.subscribe("column-hide",this.save.bind(this,"columns")),this.subscribe("column-moved",this.save.bind(this,"columns"))),this.subscribe("table-built",this.tableBuilt.bind(this),0),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("filter-changed",this.eventSave.bind(this,"filter")),this.subscribe("sort-changed",this.eventSave.bind(this,"sort")),this.subscribe("group-changed",this.eventSave.bind(this,"group")),this.subscribe("page-changed",this.eventSave.bind(this,"page")),this.subscribe("column-resized",this.eventSave.bind(this,"columns")),this.subscribe("layout-refreshed",this.eventSave.bind(this,"columns"))}this.registerTableFunction("getColumnLayout",this.getColumnLayout.bind(this)),this.registerTableFunction("setColumnLayout",this.setColumnLayout.bind(this))}},{key:"eventSave",value:function(e){this.config[e]&&this.save(e)}},{key:"tableBuilt",value:function(){var e,t;this.table.options;this.config.sort&&!1==!(e=this.load("sort"))&&(this.table.options.initialSort=e),this.config.filter&&!1==!(t=this.load("filter"))&&(this.table.options.initialFilter=t)}},{key:"tableRedraw",value:function(e){e&&this.config.columns&&this.save("columns")}},{key:"getColumnLayout",value:function(){return this.parseColumns(this.table.columnManager.getColumns())}},{key:"setColumnLayout",value:function(e){return this.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns,e)),!0}},{key:"initializeColumn",value:function(e){var t;this.config.columns&&(this.defWatcherBlock=!0,t=e.getDefinition(),(!0===this.config.columns?Object.keys(t):this.config.columns).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e),n=t[e];i&&Object.defineProperty(t,e,{set:function(e){n=e,this.defWatcherBlock||this.save("columns"),i.set&&i.set(e)},get:function(){return i.get&&i.get(),n}})})),this.defWatcherBlock=!1)}},{key:"load",value:function(e,t){var i=this.retreiveData(e);return t&&(i=i?this.mergeDefinition(t,i):t),i}},{key:"retreiveData",value:function(e){return!!this.readFunc&&this.readFunc(this.id,e)}},{key:"mergeDefinition",value:function(e,t){var i=this,n=[];return(t=t||[]).forEach((function(t,o){var a,r=i._findColumn(e,t);r&&(!0===i.config.columns||null==i.config.columns?(a=Object.keys(r)).push("width"):a=i.config.columns,a.forEach((function(e){"columns"!==e&&void 0!==t[e]&&(r[e]=t[e])})),r.columns&&(r.columns=i.mergeDefinition(r.columns,t.columns)),n.push(r))})),e.forEach((function(e,o){i._findColumn(t,e)||(n.length>o?n.splice(o,0,e):n.push(e))})),n}},{key:"_findColumn",value:function(e,t){var i=t.columns?"group":t.field?"field":"object";return e.find((function(e){switch(i){case"group":return e.title===t.title&&e.columns.length===t.columns.length;case"field":return e.field===t.field;case"object":return e===t}}))}},{key:"save",value:function(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort());break;case"group":t=this.getGroupConfig();break;case"page":t=this.getPageConfig()}this.writeFunc&&this.writeFunc(this.id,e,t)}},{key:"validateSorters",value:function(e){return e.forEach((function(e){e.column=e.field,delete e.field})),e}},{key:"getGroupConfig",value:function(){var e={};return this.config.group&&((!0===this.config.group||this.config.group.groupBy)&&(e.groupBy=this.table.options.groupBy),(!0===this.config.group||this.config.group.groupStartOpen)&&(e.groupStartOpen=this.table.options.groupStartOpen),(!0===this.config.group||this.config.group.groupHeader)&&(e.groupHeader=this.table.options.groupHeader)),e}},{key:"getPageConfig",value:function(){var e={};return this.config.page&&((!0===this.config.page||this.config.page.size)&&(e.paginationSize=this.table.modules.page.getPageSize()),(!0===this.config.page||this.config.page.page)&&(e.paginationInitialPage=this.table.modules.page.getPage())),e}},{key:"parseColumns",value:function(e){var t=this,i=[],n=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return e.forEach((function(e){var o,a={},r=e.getDefinition();e.isGroup?(a.title=r.title,a.columns=t.parseColumns(e.getColumns())):(a.field=e.getField(),!0===t.config.columns||null==t.config.columns?(o=Object.keys(r)).push("width"):o=t.config.columns,o.forEach((function(t){switch(t){case"width":a.width=e.getWidth();break;case"visible":a.visible=e.visible;break;default:"function"!=typeof r[t]&&-1===n.indexOf(t)&&(a[t]=r[t])}}))),i.push(a)})),i}}]),n}(N);Oe.moduleName="persistence",Oe.moduleInitOrder=1,Oe.readers=He,Oe.writers=Ae;var _e=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).element=!1,o.manualBlock=!1,o.registerTableOption("printAsHtml",!1),o.registerTableOption("printFormatter",!1),o.registerTableOption("printHeader",!1),o.registerTableOption("printFooter",!1),o.registerTableOption("printStyled",!0),o.registerTableOption("printRowRange","visible"),o.registerTableOption("printConfig",{}),o.registerColumnOption("print"),o.registerColumnOption("titlePrint"),o}return o(n,[{key:"initialize",value:function(){this.table.options.printAsHtml&&(window.addEventListener("beforeprint",this.replaceTable.bind(this)),window.addEventListener("afterprint",this.cleanup.bind(this))),this.registerTableFunction("print",this.printFullscreen.bind(this))}},{key:"replaceTable",value:function(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))}},{key:"cleanup",value:function(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")}},{key:"printFullscreen",value:function(e,t,i){var n,o,a=window.scrollX,r=window.scrollY,s=document.createElement("div"),l=document.createElement("div"),u=this.table.modules.export.genereateTable(void 0!==i?i:this.table.options.printConfig,void 0!==t?t:this.table.options.printStyled,e||this.table.options.printRowRange,"print");this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(s.classList.add("tabulator-print-header"),"string"==typeof(n="function"==typeof this.table.options.printHeader?this.table.options.printHeader.call(this.table):this.table.options.printHeader)?s.innerHTML=n:s.appendChild(n),this.element.appendChild(s)),this.element.appendChild(u),this.table.options.printFooter&&(l.classList.add("tabulator-print-footer"),"string"==typeof(o="function"==typeof this.table.options.printFooter?this.table.options.printFooter.call(this.table):this.table.options.printFooter)?l.innerHTML=o:l.appendChild(o),this.element.appendChild(l)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,u),window.print(),this.cleanup(),window.scrollTo(a,r),this.manualBlock=!1}}]),n}(N);_e.moduleName="print";var Be=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).data=!1,o.blocked=!1,o.origFuncs={},o.currentVersion=0,o.registerTableOption("reactiveData",!1),o}return o(n,[{key:"initialize",value:function(){this.table.options.reactiveData&&(this.subscribe("cell-value-save-before",this.block.bind(this)),this.subscribe("cell-value-save-after",this.unblock.bind(this)),this.subscribe("row-data-save-before",this.block.bind(this)),this.subscribe("row-data-save-after",this.unblock.bind(this)),this.subscribe("row-data-init-after",this.watchRow.bind(this)),this.subscribe("data-processing",this.watchData.bind(this)),this.subscribe("table-destroy",this.unwatchData.bind(this)))}},{key:"watchData",value:function(e){var t,i=this;this.currentVersion++,t=this.currentVersion,this.unwatchData(),this.data=e,this.origFuncs.push=e.push,Object.defineProperty(this.data,"push",{enumerable:!1,configurable:!0,value:function(){var n=Array.from(arguments);return i.blocked||t!==i.currentVersion||n.forEach((function(e){i.table.rowManager.addRowActual(e,!1)})),i.origFuncs.push.apply(e,arguments)}}),this.origFuncs.unshift=e.unshift,Object.defineProperty(this.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var n=Array.from(arguments);return i.blocked||t!==i.currentVersion||n.forEach((function(e){i.table.rowManager.addRowActual(e,!0)})),i.origFuncs.unshift.apply(e,arguments)}}),this.origFuncs.shift=e.shift,Object.defineProperty(this.data,"shift",{enumerable:!1,configurable:!0,value:function(){var n;return i.blocked||t!==i.currentVersion||i.data.length&&(n=i.table.rowManager.getRowFromDataObject(i.data[0]))&&n.deleteActual(),i.origFuncs.shift.call(e)}}),this.origFuncs.pop=e.pop,Object.defineProperty(this.data,"pop",{enumerable:!1,configurable:!0,value:function(){var n;return i.blocked||t!==i.currentVersion||i.data.length&&(n=i.table.rowManager.getRowFromDataObject(i.data[i.data.length-1]))&&n.deleteActual(),i.origFuncs.pop.call(e)}}),this.origFuncs.splice=e.splice,Object.defineProperty(this.data,"splice",{enumerable:!1,configurable:!0,value:function(){var n,o=Array.from(arguments),a=o[0]<0?e.length+o[0]:o[0],r=o[1],s=!!o[2]&&o.slice(2);if(!i.blocked&&t===i.currentVersion){if(s&&((n=!!e[a]&&i.table.rowManager.getRowFromDataObject(e[a]))?s.forEach((function(e){i.table.rowManager.addRowActual(e,!0,n,!0)})):(s=s.slice().reverse()).forEach((function(e){i.table.rowManager.addRowActual(e,!0,!1,!0)}))),0!==r){var l=e.slice(a,void 0===o[1]?o[1]:a+r);l.forEach((function(e,t){var n=i.table.rowManager.getRowFromDataObject(e);n&&n.deleteActual(t!==l.length-1)}))}(s||0!==r)&&i.table.rowManager.reRenderInPosition()}return i.origFuncs.splice.apply(e,arguments)}})}},{key:"unwatchData",value:function(){if(!1!==this.data)for(var e in this.origFuncs)Object.defineProperty(this.data,e,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})}},{key:"watchRow",value:function(e){var t=e.getData();for(var i in this.blocked=!0,t)this.watchKey(e,t,i);this.table.options.dataTree&&this.watchTreeChildren(e),this.blocked=!1}},{key:"watchTreeChildren",value:function(e){var t=arguments,i=e.getData()[this.table.options.dataTreeChildField],n={};function o(){this.table.modules.dataTree.initializeRow(e),this.table.modules.dataTree.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)}i&&(n.push=i.push,Object.defineProperty(i,"push",{enumerable:!1,configurable:!0,value:function(){var e=n.push.apply(i,t);return o(),e}}),n.unshift=i.unshift,Object.defineProperty(i,"unshift",{enumerable:!1,configurable:!0,value:function(){var e=n.unshift.apply(i,t);return o(),e}}),n.shift=i.shift,Object.defineProperty(i,"shift",{enumerable:!1,configurable:!0,value:function(){var e=n.shift.call(i);return o(),e}}),n.pop=i.pop,Object.defineProperty(i,"pop",{enumerable:!1,configurable:!0,value:function(){var e=n.pop.call(i);return o(),e}}),n.splice=i.splice,Object.defineProperty(i,"splice",{enumerable:!1,configurable:!0,value:function(){var e=n.splice.apply(i,t);return o(),e}}))}},{key:"watchKey",value:function(e,t,i){var n=this,o=Object.getOwnPropertyDescriptor(t,i),a=t[i],r=this.currentVersion;Object.defineProperty(t,i,{set:function(t){if(a=t,!n.blocked&&r===n.currentVersion){var s={};s[i]=t,e.updateData(s)}o.set&&o.set(t)},get:function(){return o.get&&o.get(),a}})}},{key:"unwatchRow",value:function(e){var t=e.getData();for(var i in t)Object.defineProperty(t,i,{value:t[i]})}},{key:"block",value:function(){this.blocked=!0}},{key:"unblock",value:function(){this.blocked=!1}}]),n}(N);Be.moduleName="reactiveData";var Ne=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).startColumn=!1,o.startX=!1,o.startWidth=!1,o.handle=null,o.prevHandle=null,o.registerColumnOption("resizable",!0),o}return o(n,[{key:"initialize",value:function(){this.subscribe("cell-layout",this.layoutCellHandles.bind(this)),this.subscribe("column-init",this.layoutColumnHeader.bind(this))}},{key:"layoutCellHandles",value:function(e){"row"===e.row.type&&this.initializeColumn("cell",e.column,e.element)}},{key:"layoutColumnHeader",value:function(e){this.initializeColumn("header",e,e.element)}},{key:"initializeColumn",value:function(e,t,i){var n=this,o=!1,a=t.definition.resizable;if("header"===e&&(o="textarea"==t.definition.formatter||t.definition.variableHeight,t.modules.resize={variableHeight:o}),!0===a||a==e){var r=document.createElement("div");r.className="tabulator-col-resize-handle";var s=document.createElement("div");s.className="tabulator-col-resize-handle prev",r.addEventListener("click",(function(e){e.stopPropagation()}));var l=function(e){var i=t.getLastColumn();i&&n._checkResizability(i)&&(n.startColumn=t,n._mouseDown(e,i,r))};r.addEventListener("mousedown",l),r.addEventListener("touchstart",l,{passive:!0}),r.addEventListener("dblclick",(function(e){var i,o=t.getLastColumn();o&&n._checkResizability(o)&&(i=o.getWidth(),e.stopPropagation(),o.reinitializeWidth(!0),i!==o.getWidth()&&(n.dispatch("column-resized",o),n.table.externalEvents.dispatch("columnResized",o.getComponent())))})),s.addEventListener("click",(function(e){e.stopPropagation()}));var u=function(e){var i,o,a;(i=t.getFirstColumn())&&(a=(o=n.table.columnManager.findColumnIndex(i))>0&&n.table.columnManager.getColumnByIndex(o-1))&&n._checkResizability(a)&&(n.startColumn=t,n._mouseDown(e,a,s))};s.addEventListener("mousedown",u),s.addEventListener("touchstart",u,{passive:!0}),s.addEventListener("dblclick",(function(e){var i,o,a;(i=t.getFirstColumn())&&(a=(o=n.table.columnManager.findColumnIndex(i))>0&&n.table.columnManager.getColumnByIndex(o-1))&&n._checkResizability(a)&&(e.stopPropagation(),a.reinitializeWidth(!0))})),i.appendChild(r),i.appendChild(s)}}},{key:"_checkResizability",value:function(e){return e.definition.resizable}},{key:"_mouseDown",value:function(e,t,i){var n=this;function o(e){n.table.rtl?t.setWidth(n.startWidth-((void 0===e.screenX?e.touches[0].screenX:e.screenX)-n.startX)):t.setWidth(n.startWidth+((void 0===e.screenX?e.touches[0].screenX:e.screenX)-n.startX)),n.table.columnManager.renderer.rerenderColumns(!0),!n.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}function a(e){n.startColumn.modules.edit&&(n.startColumn.modules.edit.blocked=!1),n.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",a),document.body.removeEventListener("mousemove",o),i.removeEventListener("touchmove",o),i.removeEventListener("touchend",a),n.table.element.classList.remove("tabulator-block-select"),n.startWidth!==t.getWidth()&&(n.dispatch("column-resized",t),n.table.externalEvents.dispatch("columnResized",t.getComponent()))}n.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),n.startColumn.modules.edit&&(n.startColumn.modules.edit.blocked=!0),n.startX=void 0===e.screenX?e.touches[0].screenX:e.screenX,n.startWidth=t.getWidth(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",a),i.addEventListener("touchmove",o,{passive:!0}),i.addEventListener("touchend",a)}}]),n}(N);Ne.moduleName="resizeColumns";var Ve=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).startColumn=!1,o.startY=!1,o.startHeight=!1,o.handle=null,o.prevHandle=null,o.registerTableOption("resizableRows",!1),o}return o(n,[{key:"initialize",value:function(){this.table.options.resizableRows&&this.subscribe("row-layout-after",this.initializeRow.bind(this))}},{key:"initializeRow",value:function(e){var t=this,i=e.getElement(),n=document.createElement("div");n.className="tabulator-row-resize-handle";var o=document.createElement("div");o.className="tabulator-row-resize-handle prev",n.addEventListener("click",(function(e){e.stopPropagation()}));var a=function(i){t.startRow=e,t._mouseDown(i,e,n)};n.addEventListener("mousedown",a),n.addEventListener("touchstart",a,{passive:!0}),o.addEventListener("click",(function(e){e.stopPropagation()}));var r=function(i){var n=t.table.rowManager.prevDisplayRow(e);n&&(t.startRow=n,t._mouseDown(i,n,o))};o.addEventListener("mousedown",r),o.addEventListener("touchstart",r,{passive:!0}),i.appendChild(n),i.appendChild(o)}},{key:"_mouseDown",value:function(e,t,i){var n=this;function o(e){t.setHeight(n.startHeight+((void 0===e.screenY?e.touches[0].screenY:e.screenY)-n.startY))}function a(e){document.body.removeEventListener("mouseup",o),document.body.removeEventListener("mousemove",o),i.removeEventListener("touchmove",o),i.removeEventListener("touchend",a),n.table.element.classList.remove("tabulator-block-select"),n.dispatchExternal("rowResized",t.getComponent())}n.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),n.startY=void 0===e.screenY?e.touches[0].screenY:e.screenY,n.startHeight=t.getHeight(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",a),i.addEventListener("touchmove",o,{passive:!0}),i.addEventListener("touchend",a)}}]),n}(N);Ve.moduleName="resizeRows";var Ie=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).binding=!1,o.observer=!1,o.containerObserver=!1,o.tableHeight=0,o.tableWidth=0,o.containerHeight=0,o.containerWidth=0,o.autoResize=!1,o.registerTableOption("autoResize",!0),o}return o(n,[{key:"initialize",value:function(){var e=this;if(this.table.options.autoResize){var t,i=this.table;this.tableHeight=i.element.clientHeight,this.tableWidth=i.element.clientWidth,i.element.parentNode&&(this.containerHeight=i.element.parentNode.clientHeight,this.containerWidth=i.element.parentNode.clientWidth),"undefined"!=typeof ResizeObserver&&"virtual"===i.rowManager.getRenderMode()?(this.autoResize=!0,this.observer=new ResizeObserver((function(t){if(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell){var n=Math.floor(t[0].contentRect.height),o=Math.floor(t[0].contentRect.width);e.tableHeight==n&&e.tableWidth==o||(e.tableHeight=n,e.tableWidth=o,i.element.parentNode&&(e.containerHeight=i.element.parentNode.clientHeight,e.containerWidth=i.element.parentNode.clientWidth),e.table.columnManager.renderer.rerenderColumns(!0),i.redraw())}})),this.observer.observe(i.element),t=window.getComputedStyle(i.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(t.getPropertyValue("max-height")||t.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver((function(t){if(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell){var n=Math.floor(t[0].contentRect.height),o=Math.floor(t[0].contentRect.width);e.containerHeight==n&&e.containerWidth==o||(e.containerHeight=n,e.containerWidth=o,e.tableHeight=i.element.clientHeight,e.tableWidth=i.element.clientWidth),i.columnManager.renderer.rerenderColumns(!0),i.redraw()}})),this.containerObserver.observe(this.table.element.parentNode)),this.subscribe("table-resize",this.tableResized.bind(this))):(this.binding=function(){(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell)&&(i.columnManager.renderer.rerenderColumns(!0),i.redraw())},window.addEventListener("resize",this.binding)),this.subscribe("table-destroy",this.clearBindings.bind(this))}}},{key:"tableResized",value:function(){this.table.rowManager.redraw()}},{key:"clearBindings",value:function(){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)}}]),n}(N);Ie.moduleName="resizeTable";var We=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).columns=[],o.hiddenColumns=[],o.mode="",o.index=0,o.collapseFormatter=[],o.collapseStartOpen=!0,o.collapseHandleColumn=!1,o.registerTableOption("responsiveLayout",!1),o.registerTableOption("responsiveLayoutCollapseStartOpen",!0),o.registerTableOption("responsiveLayoutCollapseUseFormatters",!0),o.registerTableOption("responsiveLayoutCollapseFormatter",!1),o.registerColumnOption("responsive"),o}return o(n,[{key:"initialize",value:function(){this.table.options.responsiveLayout&&(this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-show",this.updateColumnVisibility.bind(this)),this.subscribe("column-hide",this.updateColumnVisibility.bind(this)),this.subscribe("columns-loaded",this.initializeResponsivity.bind(this)),this.subscribe("column-moved",this.initializeResponsivity.bind(this)),this.subscribe("column-add",this.initializeResponsivity.bind(this)),this.subscribe("column-delete",this.initializeResponsivity.bind(this)),this.subscribe("table-redrawing",this.tableRedraw.bind(this)),"collapse"===this.table.options.responsiveLayout&&(this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout",this.layoutRow.bind(this))))}},{key:"tableRedraw",value:function(e){-1===["fitColumns","fitDataStretch"].indexOf(this.layoutMode())&&(e||this.update())}},{key:"initializeResponsivity",value:function(){var e=this,t=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach((function(i,n){i.modules.responsive&&i.modules.responsive.order&&i.modules.responsive.visible&&(i.modules.responsive.index=n,t.push(i),i.visible||"collapse"!==e.mode||e.hiddenColumns.push(i))})),t=(t=t.reverse()).sort((function(e,t){return t.modules.responsive.order-e.modules.responsive.order||t.modules.responsive.index-e.modules.responsive.index})),this.columns=t,"collapse"===this.mode&&this.generateCollapsedContent();var i,n=p(this.table.columnManager.columnsByIndex);try{for(n.s();!(i=n.n()).done;){var o=i.value;if("responsiveCollapse"==o.definition.formatter){this.collapseHandleColumn=o;break}}}catch(e){n.e(e)}finally{n.f()}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())}},{key:"initializeColumn",value:function(e){var t=e.getDefinition();e.modules.responsive={order:void 0===t.responsive?1:t.responsive,visible:!1!==t.visible}}},{key:"initializeRow",value:function(e){var t;"calc"!==e.type&&((t=document.createElement("div")).classList.add("tabulator-responsive-collapse"),e.modules.responsiveLayout={element:t,open:this.collapseStartOpen},this.collapseStartOpen||(t.style.display="none"))}},{key:"layoutRow",value:function(e){var t=e.getElement();e.modules.responsiveLayout&&(t.appendChild(e.modules.responsiveLayout.element),this.generateCollapsedRowContent(e))}},{key:"updateColumnVisibility",value:function(e,t){!t&&e.modules.responsive&&(e.modules.responsive.visible=e.visible,this.initializeResponsivity())}},{key:"hideColumn",value:function(e){var t=this.hiddenColumns.length;e.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent(),this.collapseHandleColumn&&!t&&this.collapseHandleColumn.show())}},{key:"showColumn",value:function(e){var t;e.show(!1,!0),e.setWidth(e.getWidth()),"collapse"===this.mode&&((t=this.hiddenColumns.indexOf(e))>-1&&this.hiddenColumns.splice(t,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())}},{key:"update",value:function(){for(var e=this,t=!0;t;){var i="fitColumns"==e.table.modules.layout.getMode()?e.table.columnManager.getFlexBaseWidth():e.table.columnManager.getWidth(),n=(e.table.options.headerVisible?e.table.columnManager.element.clientWidth:e.table.element.clientWidth)-i;if(n<0){var o=e.columns[e.index];o?(e.hideColumn(o),e.index++):t=!1}else{var a=e.columns[e.index-1];a&&n>0&&n>=a.getWidth()?(e.showColumn(a),e.index--):t=!1}e.table.rowManager.activeRowsCount||e.table.rowManager.renderEmptyScroll()}}},{key:"generateCollapsedContent",value:function(){var e=this;this.table.rowManager.getDisplayRows().forEach((function(t){e.generateCollapsedRowContent(t)}))}},{key:"generateCollapsedRowContent",value:function(e){var t,i;if(e.modules.responsiveLayout){for(t=e.modules.responsiveLayout.element;t.firstChild;)t.removeChild(t.firstChild);(i=this.collapseFormatter(this.generateCollapsedRowData(e)))&&t.appendChild(i)}}},{key:"generateCollapsedRowData",value:function(e){var t,i=this,n=e.getData(),o=[];return this.hiddenColumns.forEach((function(a){var r=a.getFieldValue(n);if(a.definition.title&&a.field)if(a.modules.format&&i.table.options.responsiveLayoutCollapseUseFormatters){t={value:!1,data:{},getValue:function(){return r},getData:function(){return n},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return a.getComponent()}},o.push({field:a.field,title:a.definition.title,value:a.modules.format.formatter.call(i.table.modules.format,t,a.modules.format.params,(function(e){e()}))})}else o.push({field:a.field,title:a.definition.title,value:r})})),o}},{key:"formatCollapsedData",value:function(e){var t=document.createElement("table");return e.forEach((function(e){var i,n=document.createElement("tr"),o=document.createElement("td"),a=document.createElement("td"),r=document.createElement("strong");o.appendChild(r),this.langBind("columns|"+e.field,(function(t){r.innerHTML=t||e.title})),e.value instanceof Node?((i=document.createElement("div")).appendChild(e.value),a.appendChild(i)):a.innerHTML=e.value,n.appendChild(o),n.appendChild(a),t.appendChild(n)}),this),Object.keys(e).length?t:""}}]),n}(N);We.moduleName="responsiveLayout";var je=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).selecting=!1,i.lastClickedRow=!1,i.selectPrev=[],i.selectedRows=[],i.headerCheckboxElement=null,i.registerTableOption("selectable","highlight"),i.registerTableOption("selectableRangeMode","drag"),i.registerTableOption("selectableRollingSelection",!0),i.registerTableOption("selectablePersistence",!0),i.registerTableOption("selectableCheck",(function(e,t){return!0})),i.registerTableFunction("selectRow",i.selectRows.bind(l(i))),i.registerTableFunction("deselectRow",i.deselectRows.bind(l(i))),i.registerTableFunction("toggleSelectRow",i.toggleRow.bind(l(i))),i.registerTableFunction("getSelectedRows",i.getSelectedRows.bind(l(i))),i.registerTableFunction("getSelectedData",i.getSelectedData.bind(l(i))),i.registerComponentFunction("row","select",i.selectRows.bind(l(i))),i.registerComponentFunction("row","deselect",i.deselectRows.bind(l(i))),i.registerComponentFunction("row","toggleSelect",i.toggleRow.bind(l(i))),i.registerComponentFunction("row","isSelected",i.isRowSelected.bind(l(i))),i}return o(r,[{key:"initialize",value:function(){!1!==this.table.options.selectable&&(this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-deleting",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clearSelectionData.bind(this)),this.subscribe("rows-retrieve",this.rowRetrieve.bind(this)),this.table.options.selectable&&!this.table.options.selectablePersistence&&this.subscribe("data-refreshing",this.deselectRows.bind(this)))}},{key:"rowRetrieve",value:function(e,t){return"selected"===e?this.selectedRows:t}},{key:"rowDeleted",value:function(e){this._deselectRow(e,!0)}},{key:"clearSelectionData",value:function(e){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],!0!==e&&this._rowSelectionChanged()}},{key:"initializeRow",value:function(e){var t=this,i=e.getElement(),n=function e(){setTimeout((function(){t.selecting=!1}),50),document.body.removeEventListener("mouseup",e)};e.modules.select={selected:!1},t.table.options.selectableCheck.call(this.table,e.getComponent())?(i.classList.add("tabulator-selectable"),i.classList.remove("tabulator-unselectable"),t.table.options.selectable&&"highlight"!=t.table.options.selectable&&("click"===t.table.options.selectableRangeMode?i.addEventListener("click",this.handleComplexRowClick.bind(this,e)):(i.addEventListener("click",(function(i){t.table.modExists("edit")&&t.table.modules.edit.getCurrentCell()||t.table._clearSelection(),t.selecting||t.toggleRow(e)})),i.addEventListener("mousedown",(function(i){if(i.shiftKey)return t.table._clearSelection(),t.selecting=!0,t.selectPrev=[],document.body.addEventListener("mouseup",n),document.body.addEventListener("keyup",n),t.toggleRow(e),!1})),i.addEventListener("mouseenter",(function(i){t.selecting&&(t.table._clearSelection(),t.toggleRow(e),t.selectPrev[1]==e&&t.toggleRow(t.selectPrev[0]))})),i.addEventListener("mouseout",(function(i){t.selecting&&(t.table._clearSelection(),t.selectPrev.unshift(e))}))))):(i.classList.add("tabulator-unselectable"),i.classList.remove("tabulator-selectable"))}},{key:"handleComplexRowClick",value:function(e,t){var i=this;if(t.shiftKey){this.table._clearSelection(),this.lastClickedRow=this.lastClickedRow||e;var n=this.table.rowManager.getDisplayRowIndex(this.lastClickedRow),o=this.table.rowManager.getDisplayRowIndex(e),a=n<=o?n:o,r=n>=o?n:o,s=this.table.rowManager.getDisplayRows().slice(0).splice(a,r-a+1);t.ctrlKey||t.metaKey?(s.forEach((function(t){t!==i.lastClickedRow&&(!0===i.table.options.selectable||i.isRowSelected(e)||i.selectedRows.lengththis.table.options.selectable&&(s=s.slice(0,this.table.options.selectable)),this.selectRows(s)),this.table._clearSelection()}else t.ctrlKey||t.metaKey?(this.toggleRow(e),this.lastClickedRow=e):(this.deselectRows(void 0,!0),this.selectRows(e),this.lastClickedRow=e)}},{key:"toggleRow",value:function(e){this.table.options.selectableCheck.call(this.table,e.getComponent())&&(e.modules.select&&e.modules.select.selected?this._deselectRow(e):this._selectRow(e))}},{key:"selectRows",value:function(t){var i,n=this;switch(e(t)){case"undefined":this.table.rowManager.rows.forEach((function(e){n._selectRow(e,!0,!0)})),this._rowSelectionChanged();break;case"string":(i=this.table.rowManager.findRow(t))?this._selectRow(i,!0,!0):this.table.rowManager.getRows(t).forEach((function(e){n._selectRow(e,!0,!0)})),this._rowSelectionChanged();break;default:Array.isArray(t)?(t.forEach((function(e){n._selectRow(e,!0,!0)})),this._rowSelectionChanged()):this._selectRow(t,!1,!0)}}},{key:"_selectRow",value:function(e,t,i){if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!i&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var n=this.table.rowManager.findRow(e);n?-1==this.selectedRows.indexOf(n)&&(n.getElement().classList.add("tabulator-selected"),n.modules.select||(n.modules.select={}),n.modules.select.selected=!0,n.modules.select.checkboxEl&&(n.modules.select.checkboxEl.checked=!0),this.selectedRows.push(n),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(n,!0),this.dispatchExternal("rowSelected",n.getComponent()),this._rowSelectionChanged(t)):t||console.warn("Selection Error - No such row found, ignoring selection:"+e)}},{key:"isRowSelected",value:function(e){return-1!==this.selectedRows.indexOf(e)}},{key:"deselectRows",value:function(e,t){var i,n=this;if(void 0===e){i=n.selectedRows.length;for(var o=0;o-1&&(o.getElement().classList.remove("tabulator-selected"),o.modules.select||(o.modules.select={}),o.modules.select.selected=!1,o.modules.select.checkboxEl&&(o.modules.select.checkboxEl.checked=!1),n.selectedRows.splice(i,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(o,!1),this.dispatchExternal("rowDeselected",o.getComponent()),n._rowSelectionChanged(t)):t||console.warn("Deselection Error - No such row found, ignoring selection:"+e)}},{key:"getSelectedData",value:function(){var e=[];return this.selectedRows.forEach((function(t){e.push(t.getData())})),e}},{key:"getSelectedRows",value:function(){var e=[];return this.selectedRows.forEach((function(t){e.push(t.getComponent())})),e}},{key:"_rowSelectionChanged",value:function(e){this.headerCheckboxElement&&(0===this.selectedRows.length?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),e||this.dispatchExternal("rowSelectionChanged",this.getSelectedData(),this.getSelectedRows())}},{key:"registerRowSelectCheckbox",value:function(e,t){e._row.modules.select||(e._row.modules.select={}),e._row.modules.select.checkboxEl=t}},{key:"registerHeaderSelectCheckbox",value:function(e){this.headerCheckboxElement=e}},{key:"childRowSelection",value:function(e,t){var i=this.table.modules.dataTree.getChildren(e,!0);if(t){var n,o=p(i);try{for(o.s();!(n=o.n()).done;){var a=n.value;this._selectRow(a,!0)}}catch(e){o.e(e)}finally{o.f()}}else{var r,s=p(i);try{for(s.s();!(r=s.n()).done;){var l=r.value;this._deselectRow(l,!0)}}catch(e){s.e(e)}finally{s.f()}}}}]),r}(N);function Ge(e,t,i,n,o,a,r){var s=window.DateTime||luxon.DateTime,l=r.format||"dd/MM/yyyy HH:mm:ss",u=r.alignEmptyValues,c=0;if(void 0!==s){if(e="iso"===l?s.fromISO(String(e)):s.fromFormat(String(e),l),t="iso"===l?s.fromISO(String(t)):s.fromFormat(String(t),l),e.isValid){if(t.isValid)return e-t;c=1}else c=t.isValid?-1:0;return("top"===u&&"desc"===a||"bottom"===u&&"asc"===a)&&(c*=-1),c}console.error("Sort Error - 'datetime' sorter is dependant on luxon.js")}je.moduleName="selectRow";var Ue={number:function(e,t,i,n,o,a,r){var s=r.alignEmptyValues,l=r.decimalSeparator,u=r.thousandSeparator,c=0;if(e=String(e),t=String(t),u&&(e=e.split(u).join(""),t=t.split(u).join("")),l&&(e=e.split(l).join("."),t=t.split(l).join(".")),e=parseFloat(e),t=parseFloat(t),isNaN(e))c=isNaN(t)?0:-1;else{if(!isNaN(t))return e-t;c=1}return("top"===s&&"desc"===a||"bottom"===s&&"asc"===a)&&(c*=-1),c},string:function(t,i,n,o,a,r,s){var l,u=s.alignEmptyValues,c=0;if(t){if(i){switch(e(s.locale)){case"boolean":s.locale&&(l=this.langLocale());break;case"string":l=s.locale}return String(t).toLowerCase().localeCompare(String(i).toLowerCase(),l)}c=1}else c=i?-1:0;return("top"===u&&"desc"===r||"bottom"===u&&"asc"===r)&&(c*=-1),c},date:function(e,t,i,n,o,a,r){return r.format||(r.format="dd/MM/yyyy"),Ge.call(this,e,t,i,n,o,a,r)},time:function(e,t,i,n,o,a,r){return r.format||(r.format="HH:mm"),Ge.call(this,e,t,i,n,o,a,r)},datetime:Ge,boolean:function(e,t,i,n,o,a,r){return(!0===e||"true"===e||"True"===e||1===e?1:0)-(!0===t||"true"===t||"True"===t||1===t?1:0)},array:function(e,t,i,n,o,a,r){var s=r.type||"length",l=r.alignEmptyValues,u=0;function c(e){switch(s){case"length":return e.length;case"sum":return e.reduce((function(e,t){return e+t}));case"max":return Math.max.apply(null,e);case"min":return Math.min.apply(null,e);case"avg":return e.reduce((function(e,t){return e+t}))/e.length}}if(Array.isArray(e)){if(Array.isArray(t))return(e?c(e):0)-(t?c(t):0);l=1}else l=Array.isArray(t)?-1:0;return("top"===l&&"desc"===a||"bottom"===l&&"asc"===a)&&(u*=-1),u},exists:function(e,t,i,n,o,a,r){return(void 0===e?0:1)-(void 0===t?0:1)},alphanum:function(e,t,i,n,o,a,r){var s,l,u,c,h,d=0,m=/(\d+)|(\D+)/g,p=/\d/,f=r.alignEmptyValues,g=0;if(e||0===e){if(t||0===t){if(isFinite(e)&&isFinite(t))return e-t;if((s=String(e).toLowerCase())===(l=String(t).toLowerCase()))return 0;if(!p.test(s)||!p.test(l))return s>l?1:-1;for(s=s.match(m),l=l.match(m),h=s.length>l.length?l.length:s.length;dc?1:-1;return s.length>l.length}g=1}else g=t||0===t?-1:0;return("top"===f&&"desc"===a||"bottom"===f&&"asc"===a)&&(g*=-1),g}},Xe=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).sortList=[],i.changed=!1,i.registerTableOption("sortMode","local"),i.registerTableOption("initialSort",!1),i.registerTableOption("columnHeaderSortMulti",!0),i.registerTableOption("sortOrderReverse",!1),i.registerTableOption("headerSortElement","
"),i.registerColumnOption("sorter"),i.registerColumnOption("sorterParams"),i.registerColumnOption("headerSort",!0),i.registerColumnOption("headerSortStartingDir"),i.registerColumnOption("headerSortTristate"),i}return o(r,[{key:"initialize",value:function(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),this.registerDataHandler(this.sort.bind(this),20),this.registerTableFunction("setSort",this.userSetSort.bind(this)),this.registerTableFunction("getSorters",this.getSort.bind(this)),this.registerTableFunction("clearSort",this.clearSort.bind(this)),"remote"===this.table.options.sortMode&&this.subscribe("data-params",this.remoteSortParams.bind(this))}},{key:"tableBuilt",value:function(){this.table.options.initialSort&&this.setSort(this.table.options.initialSort)}},{key:"remoteSortParams",value:function(e,t,i,n){var o=this.getSort();return o.forEach((function(e){delete e.column})),n.sort=o,n}},{key:"userSetSort",value:function(e,t){this.setSort(e,t),this.refreshSort()}},{key:"clearSort",value:function(){this.clear(),this.refreshSort()}},{key:"initializeColumn",value:function(t){var i,n,o=this,a=!1;switch(e(t.definition.sorter)){case"string":r.sorters[t.definition.sorter]?a=r.sorters[t.definition.sorter]:console.warn("Sort Error - No such sorter found: ",t.definition.sorter);break;case"function":a=t.definition.sorter}t.modules.sort={sorter:a,dir:"none",params:t.definition.sorterParams||{},startingDir:t.definition.headerSortStartingDir||"asc",tristate:t.definition.headerSortTristate},!1!==t.definition.headerSort&&((i=t.getElement()).classList.add("tabulator-sortable"),(n=document.createElement("div")).classList.add("tabulator-col-sorter"),"object"==e(this.table.options.headerSortElement)?n.appendChild(this.table.options.headerSortElement):n.innerHTML=this.table.options.headerSortElement,t.titleHolderElement.appendChild(n),t.modules.sort.element=n,i.addEventListener("click",(function(e){var i="",n=[],a=!1;if(t.modules.sort){if(t.modules.sort.tristate)i="none"==t.modules.sort.dir?t.modules.sort.startingDir:t.modules.sort.dir==t.modules.sort.startingDir?"asc"==t.modules.sort.dir?"desc":"asc":"none";else switch(t.modules.sort.dir){case"asc":i="desc";break;case"desc":i="asc";break;default:i=t.modules.sort.startingDir}o.table.options.columnHeaderSortMulti&&(e.shiftKey||e.ctrlKey)?((a=(n=o.getSort()).findIndex((function(e){return e.field===t.getField()})))>-1?(n[a].dir=i,a!=n.length-1&&(a=n.splice(a,1)[0],"none"!=i&&n.push(a))):"none"!=i&&n.push({column:t,dir:i}),o.setSort(n)):"none"==i?o.clear():o.setSort(t,i),o.refreshSort()}})))}},{key:"refreshSort",value:function(){"remote"===this.table.options.sortMode?this.reloadData():this.refreshData(!0)}},{key:"hasChanged",value:function(){var e=this.changed;return this.changed=!1,e}},{key:"getSort",value:function(){var e=[];return this.sortList.forEach((function(t){t.column&&e.push({column:t.column.getComponent(),field:t.column.getField(),dir:t.dir})})),e}},{key:"setSort",value:function(e,t){var i=this,n=[];Array.isArray(e)||(e=[{column:e,dir:t}]),e.forEach((function(e){var t;(t=i.table.columnManager.findColumn(e.column))?(e.column=t,n.push(e),i.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",e.column)})),i.sortList=n,this.dispatch("sort-changed")}},{key:"clear",value:function(){this.setSort([])}},{key:"findSorter",value:function(t){var i,n=this.table.rowManager.activeRows[0],o="string";if(n&&(n=n.getData(),t.getField()))switch(e(i=t.getFieldValue(n))){case"undefined":o="string";break;case"boolean":o="boolean";break;default:isNaN(i)||""===i?i.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(o="alphanum"):o="number"}return r.sorters[o]}},{key:"sort",value:function(e){var t=this,i=this.table.options.sortOrderReverse?t.sortList.slice().reverse():t.sortList,n=[],o=[];return this.subscribedExternal("dataSorting")&&this.dispatchExternal("dataSorting",t.getSort()),t.clearColumnHeaders(),"remote"!==this.table.options.sortMode?(i.forEach((function(e,i){var o=e.column.modules.sort;e.column&&o&&(o.sorter||(o.sorter=t.findSorter(e.column)),e.params="function"==typeof o.params?o.params(e.column.getComponent(),e.dir):o.params,n.push(e)),t.setColumnHeader(e.column,e.dir)})),n.length&&t._sortItems(e,n)):i.forEach((function(e,i){t.setColumnHeader(e.column,e.dir)})),this.subscribedExternal("dataSorted")&&(e.forEach((function(e){o.push(e.getComponent())})),this.dispatchExternal("dataSorted",t.getSort(),o)),e}},{key:"clearColumnHeaders",value:function(){this.table.columnManager.getRealColumns().forEach((function(e){e.modules.sort&&(e.modules.sort.dir="none",e.getElement().setAttribute("aria-sort","none"))}))}},{key:"setColumnHeader",value:function(e,t){e.modules.sort.dir=t,e.getElement().setAttribute("aria-sort",t)}},{key:"_sortItems",value:function(e,t){var i=this,n=t.length-1;e.sort((function(e,o){for(var a,r=n;r>=0;r--){var s=t[r];if(0!==(a=i._sortRow(e,o,s.column,s.dir,s.params)))break}return a}))}},{key:"_sortRow",value:function(e,t,i,n,o){var a,r,s="asc"==n?e:t,l="asc"==n?t:e;return e=void 0!==(e=i.getFieldValue(s.getData()))?e:"",t=void 0!==(t=i.getFieldValue(l.getData()))?t:"",a=s.getComponent(),r=l.getComponent(),i.modules.sort.sorter.call(this,e,t,a,r,i.getComponent(),n,o)}}]),r}(N);Xe.moduleName="sort",Xe.sorters=Ue;var qe={integer:function(e,t,i){return""===t||null==t||"number"==typeof(t=Number(t))&&isFinite(t)&&Math.floor(t)===t},float:function(e,t,i){return""===t||null==t||"number"==typeof(t=Number(t))&&isFinite(t)&&t%1!=0},numeric:function(e,t,i){return""===t||null==t||!isNaN(t)},string:function(e,t,i){return""===t||null==t||isNaN(t)},max:function(e,t,i){return""===t||null==t||parseFloat(t)<=i},min:function(e,t,i){return""===t||null==t||parseFloat(t)>=i},starts:function(e,t,i){return""===t||null==t||String(t).toLowerCase().startsWith(String(i).toLowerCase())},ends:function(e,t,i){return""===t||null==t||String(t).toLowerCase().endsWith(String(i).toLowerCase())},minLength:function(e,t,i){return""===t||null==t||String(t).length>=i},maxLength:function(e,t,i){return""===t||null==t||String(t).length<=i},in:function(e,t,i){return""===t||null==t||("string"==typeof i&&(i=i.split("|")),""===t||i.indexOf(t)>-1)},regex:function(e,t,i){return""===t||null==t||new RegExp(i).test(t)},unique:function(e,t,i){if(""===t||null==t)return!0;var n=!0,o=e.getData(),a=e.getColumn()._getSelf();return this.table.rowManager.rows.forEach((function(e){var i=e.getData();i!==o&&t==a.getFieldValue(i)&&(n=!1)})),n},required:function(e,t,i){return""!==t&&null!=t}},Ke=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).invalidCells=[],i.registerTableOption("validationMode","blocking"),i.registerColumnOption("validator"),i.registerTableFunction("getInvalidCells",i.getInvalidCells.bind(l(i))),i.registerTableFunction("clearCellValidation",i.userClearCellValidation.bind(l(i))),i.registerTableFunction("validate",i.userValidate.bind(l(i))),i.registerComponentFunction("cell","isValid",i.cellIsValid.bind(l(i))),i.registerComponentFunction("cell","clearValidation",i.clearValidation.bind(l(i))),i.registerComponentFunction("cell","validate",i.cellValidate.bind(l(i))),i.registerComponentFunction("column","validate",i.columnValidate.bind(l(i))),i.registerComponentFunction("row","validate",i.rowValidate.bind(l(i))),i}return o(r,[{key:"initialize",value:function(){this.subscribe("cell-delete",this.clearValidation.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this))}},{key:"cellIsValid",value:function(e){return!e.modules.validate||!e.modules.validate.invalid}},{key:"cellValidate",value:function(e){return this.validate(e.column.modules.validate,e,e.getValue())}},{key:"columnValidate",value:function(e){var t=this,i=[];return e.cells.forEach((function(e){t.cellValidate(e)||i.push(e.getComponent())})),!i.length||i}},{key:"rowValidate",value:function(e){var t=this,i=[];return e.cells.forEach((function(e){t.cellValidate(e)||i.push(e.getComponent())})),!i.length||i}},{key:"userClearCellValidation",value:function(e){var t=this;e||(e=this.getInvalidCells()),Array.isArray(e)||(e=[e]),e.forEach((function(e){t.clearValidation(e._getSelf())}))}},{key:"userValidate",value:function(e){var t=[];return this.table.rowManager.rows.forEach((function(e){var i=(e=e.getComponent()).validate();!0!==i&&(t=t.concat(i))})),!t.length||t}},{key:"initializeColumnCheck",value:function(e){void 0!==e.definition.validator&&this.initializeColumn(e)}},{key:"initializeColumn",value:function(e){var t,i=this,n=[];e.definition.validator&&(Array.isArray(e.definition.validator)?e.definition.validator.forEach((function(e){(t=i._extractValidator(e))&&n.push(t)})):(t=this._extractValidator(e.definition.validator))&&n.push(t),e.modules.validate=!!n.length&&n)}},{key:"_extractValidator",value:function(t){var i,n,o;switch(e(t)){case"string":return(o=t.indexOf(":"))>-1?(i=t.substring(0,o),n=t.substring(o+1)):i=t,this._buildValidator(i,n);case"function":return this._buildValidator(t);case"object":return this._buildValidator(t.type,t.parameters)}}},{key:"_buildValidator",value:function(e,t){var i="function"==typeof e?e:r.validators[e];return i?{type:"function"==typeof e?"function":e,func:i,params:t}:(console.warn("Validator Setup Error - No matching validator found:",e),!1)}},{key:"validate",value:function(e,t,i){var n=this,o=[],a=this.invalidCells.indexOf(t);return e&&e.forEach((function(e){e.func.call(n,t.getComponent(),i,e.params)||o.push({type:e.type,parameters:e.params})})),o=!o.length||o,t.modules.validate||(t.modules.validate={}),!0===o?(t.modules.validate.invalid=!1,t.getElement().classList.remove("tabulator-validation-fail"),a>-1&&this.invalidCells.splice(a,1)):(t.modules.validate.invalid=!0,"manual"!==this.table.options.validationMode&&t.getElement().classList.add("tabulator-validation-fail"),-1==a&&this.invalidCells.push(t)),o}},{key:"getInvalidCells",value:function(){var e=[];return this.invalidCells.forEach((function(t){e.push(t.getComponent())})),e}},{key:"clearValidation",value:function(e){var t;e.modules.validate&&e.modules.validate.invalid&&(e.getElement().classList.remove("tabulator-validation-fail"),e.modules.validate.invalid=!1,(t=this.invalidCells.indexOf(e))>-1&&this.invalidCells.splice(t,1))}}]),r}(N);Ke.moduleName="validate",Ke.validators=qe;var Ye=Object.freeze({__proto__:null,AccessorModule:K,AjaxModule:Z,ClipboardModule:ee,ColumnCalcsModule:ne,DataTreeModule:oe,DownloadModule:re,EditModule:ue,ExportModule:de,FilterModule:pe,FormatModule:ge,FrozenColumnsModule:ve,FrozenRowsModule:be,GroupRowsModule:Ce,HistoryModule:ke,HtmlTableImportModule:Ee,ImportModule:xe,InteractionModule:Te,KeybindingsModule:Me,MenuModule:Le,MoveColumnsModule:De,MoveRowsModule:Se,MutatorModule:Fe,PageModule:ze,PersistenceModule:Oe,PrintModule:_e,ReactiveDataModule:Be,ResizeColumnsModule:Ne,ResizeRowsModule:Ve,ResizeTableModule:Ie,ResponsiveLayoutModule:We,SelectRowModule:je,SortModule:Xe,ValidateModule:Ke}),Je=function(e){a(n,e);var i=c(n);function n(){return t(this,n),i.apply(this,arguments)}return n}(q);return new X(Je,Ye),Je})); +/* Tabulator v5.1.8 (c) Oliver Folkerd 2022 */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Tabulator=t()}(this,(function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var i=0;ie.length)&&(t=e.length);for(var i=0,n=new Array(t);i=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,s=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return r=e.done,e},e:function(e){s=!0,a=e},f:function(){try{r||null==i.return||i.return()}finally{if(s)throw a}}}}var f=function(){function e(i){t(this,e),this.table=i}return o(e,[{key:"reloadData",value:function(e,t){return this.table.dataLoader.load(e,void 0,void 0,void 0,t)}},{key:"langText",value:function(){var e;return(e=this.table.modules.localize).getText.apply(e,arguments)}},{key:"langBind",value:function(){var e;return(e=this.table.modules.localize).bind.apply(e,arguments)}},{key:"langLocale",value:function(){var e;return(e=this.table.modules.localize).getLocale.apply(e,arguments)}},{key:"commsConnections",value:function(){var e;return(e=this.table.modules.comms).getConnections.apply(e,arguments)}},{key:"commsSend",value:function(){var e;return(e=this.table.modules.comms).send.apply(e,arguments)}},{key:"layoutMode",value:function(){return this.table.modules.layout.getMode()}},{key:"layoutRefresh",value:function(){return this.table.modules.layout.layout()}},{key:"subscribe",value:function(){var e;return(e=this.table.eventBus).subscribe.apply(e,arguments)}},{key:"unsubscribe",value:function(){var e;return(e=this.table.eventBus).unsubscribe.apply(e,arguments)}},{key:"subscribed",value:function(e){return this.table.eventBus.subscribed(e)}},{key:"subscriptionChange",value:function(){var e;return(e=this.table.eventBus).subscriptionChange.apply(e,arguments)}},{key:"dispatch",value:function(){var e;return(e=this.table.eventBus).dispatch.apply(e,arguments)}},{key:"chain",value:function(){var e;return(e=this.table.eventBus).chain.apply(e,arguments)}},{key:"confirm",value:function(){var e;return(e=this.table.eventBus).confirm.apply(e,arguments)}},{key:"dispatchExternal",value:function(){var e;return(e=this.table.externalEvents).dispatch.apply(e,arguments)}},{key:"subscribedExternal",value:function(e){return this.table.externalEvents.subscribed(e)}},{key:"subscriptionChangeExternal",value:function(){var e;return(e=this.table.externalEvents).subscriptionChange.apply(e,arguments)}},{key:"options",value:function(e){return this.table.options[e]}},{key:"setOption",value:function(e,t){return void 0!==t&&(this.table.options[e]=t),this.table.options[e]}},{key:"module",value:function(e){return this.table.module(e)}}]),e}(),g=function(){function e(i){return t(this,e),this._column=i,this.type="ColumnComponent",new Proxy(this,{get:function(e,t,i){return void 0!==e[t]?e[t]:e._column.table.componentFunctionBinder.handle("column",e._column,t)}})}return o(e,[{key:"getElement",value:function(){return this._column.getElement()}},{key:"getDefinition",value:function(){return this._column.getDefinition()}},{key:"getField",value:function(){return this._column.getField()}},{key:"getTitleDownload",value:function(){return this._column.getTitleDownload()}},{key:"getCells",value:function(){var e=[];return this._column.cells.forEach((function(t){e.push(t.getComponent())})),e}},{key:"isVisible",value:function(){return this._column.visible}},{key:"show",value:function(){this._column.isGroup?this._column.columns.forEach((function(e){e.show()})):this._column.show()}},{key:"hide",value:function(){this._column.isGroup?this._column.columns.forEach((function(e){e.hide()})):this._column.hide()}},{key:"toggle",value:function(){this._column.visible?this.hide():this.show()}},{key:"delete",value:function(){return this._column.delete()}},{key:"getSubColumns",value:function(){var e=[];return this._column.columns.length&&this._column.columns.forEach((function(t){e.push(t.getComponent())})),e}},{key:"getParentColumn",value:function(){return this._column.parent instanceof w&&this._column.parent.getComponent()}},{key:"_getSelf",value:function(){return this._column}},{key:"scrollTo",value:function(){return this._column.table.columnManager.scrollToColumn(this._column)}},{key:"getTable",value:function(){return this._column.table}},{key:"move",value:function(e,t){var i=this._column.table.columnManager.findColumn(e);i?this._column.table.columnManager.moveColumn(this._column,i,t):console.warn("Move Error - No matching column found:",i)}},{key:"getNextColumn",value:function(){var e=this._column.nextColumn();return!!e&&e.getComponent()}},{key:"getPrevColumn",value:function(){var e=this._column.prevColumn();return!!e&&e.getComponent()}},{key:"updateDefinition",value:function(e){return this._column.updateDefinition(e)}},{key:"getWidth",value:function(){return this._column.getWidth()}},{key:"setWidth",value:function(e){var t;return t=!0===e?this._column.reinitializeWidth(!0):this._column.setWidth(e),this._column.table.columnManager.renderer.rerenderColumns(!0),t}}]),e}(),v={title:void 0,field:void 0,columns:void 0,visible:void 0,hozAlign:void 0,vertAlign:void 0,width:void 0,minWidth:40,maxWidth:void 0,maxInitialWidth:void 0,tooltip:void 0,cssClass:void 0,variableHeight:void 0,headerTooltip:void 0,headerVertical:void 0,headerHozAlign:void 0,editableTitle:void 0},b=function(){function e(i){return t(this,e),this._cell=i,new Proxy(this,{get:function(e,t,i){return void 0!==e[t]?e[t]:e._cell.table.componentFunctionBinder.handle("cell",e._cell,t)}})}return o(e,[{key:"getValue",value:function(){return this._cell.getValue()}},{key:"getOldValue",value:function(){return this._cell.getOldValue()}},{key:"getInitialValue",value:function(){return this._cell.initialValue}},{key:"getElement",value:function(){return this._cell.getElement()}},{key:"getRow",value:function(){return this._cell.row.getComponent()}},{key:"getData",value:function(){return this._cell.row.getData()}},{key:"getField",value:function(){return this._cell.column.getField()}},{key:"getColumn",value:function(){return this._cell.column.getComponent()}},{key:"setValue",value:function(e,t){void 0===t&&(t=!0),this._cell.setValue(e,t)}},{key:"restoreOldValue",value:function(){this._cell.setValueActual(this._cell.getOldValue())}},{key:"restoreInitialValue",value:function(){this._cell.setValueActual(this._cell.initialValue)}},{key:"checkHeight",value:function(){this._cell.checkHeight()}},{key:"getTable",value:function(){return this._cell.table}},{key:"_getSelf",value:function(){return this._cell}}]),e}(),y=function(i){a(r,i);var n=c(r);function r(e,i){var o;return t(this,r),(o=n.call(this,e.table)).table=e.table,o.column=e,o.row=i,o.element=null,o.value=null,o.initialValue,o.oldValue=null,o.modules={},o.height=null,o.width=null,o.minWidth=null,o.component=null,o.loaded=!1,o.build(),o}return o(r,[{key:"build",value:function(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data)),this.initialValue=this.value}},{key:"generateElement",value:function(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell"),this.element=this.element}},{key:"_configureCell",value:function(){var e=this,t=this.element,i=this.column.getField();(t.style.textAlign=this.column.hozAlign,this.column.vertAlign&&(t.style.display="inline-flex",t.style.alignItems={top:"flex-start",bottom:"flex-end",middle:"center"}[this.column.vertAlign]||"",this.column.hozAlign&&(t.style.justifyContent={left:"flex-start",right:"flex-end",center:"center"}[this.column.hozAlign]||"")),i&&t.setAttribute("tabulator-field",i),this.column.definition.cssClass)&&this.column.definition.cssClass.split(" ").forEach((function(e){t.classList.add(e)}));"hover"===this.table.options.tooltipGenerationMode&&t.addEventListener("mouseenter",(function(t){e._generateTooltip()})),this.dispatch("cell-init",this),this.column.visible||this.hide()}},{key:"_generateContents",value:function(){var t,i=this;switch(e(t=this.chain("cell-format",this,null,(function(){return i.element.innerHTML=i.value})))){case"object":if(t instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(t)}else this.element.innerHTML="",null!=t&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",t);break;case"undefined":case"null":this.element.innerHTML="";break;default:this.element.innerHTML=t}}},{key:"cellRendered",value:function(){this.dispatch("cell-rendered",this)}},{key:"_generateTooltip",value:function(){var e=this.column.tooltip;e?(!0===e?e=this.value:"function"==typeof e&&!1===(e=e(this.getComponent()))&&(e=""),void 0===e&&(e=""),this.element.setAttribute("title",e)):this.element.setAttribute("title","")}},{key:"getElement",value:function(e){return this.loaded||(this.loaded=!0,e||this.layoutElement()),this.element}},{key:"getValue",value:function(){return this.value}},{key:"getOldValue",value:function(){return this.oldValue}},{key:"setValue",value:function(e,t){this.setValueProcessData(e,t)&&(this.dispatch("cell-value-updated",this),this.cellRendered(),this.column.definition.cellEdited&&this.column.definition.cellEdited.call(this.table,this.getComponent()),this.dispatchExternal("cellEdited",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()))}},{key:"setValueProcessData",value:function(e,t){var i=!1;return this.value!==e&&(i=!0,t&&(e=this.chain("cell-value-changing",[this,e],null,e))),this.setValueActual(e),i&&this.dispatch("cell-value-changed",this),i}},{key:"setValueActual",value:function(e){this.oldValue=this.value,this.value=e,this.dispatch("cell-value-save-before",this),this.column.setFieldValue(this.row.data,e),this.dispatch("cell-value-save-after",this),this.loaded&&this.layoutElement()}},{key:"layoutElement",value:function(){this._generateContents(),this._generateTooltip(),this.dispatch("cell-layout",this)}},{key:"setWidth",value:function(){this.width=this.column.width,this.element.style.width=this.column.widthStyled}},{key:"clearWidth",value:function(){this.width="",this.element.style.width=""}},{key:"getWidth",value:function(){return this.width||this.element.offsetWidth}},{key:"setMinWidth",value:function(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled}},{key:"setMaxWidth",value:function(){this.maxWidth=this.column.maxWidth,this.element.style.maxWidth=this.column.maxWidthStyled}},{key:"checkHeight",value:function(){this.row.reinitializeHeight()}},{key:"clearHeight",value:function(){this.element.style.height="",this.height=null}},{key:"setHeight",value:function(){this.height=this.row.height,this.element.style.height=this.row.heightStyled}},{key:"getHeight",value:function(){return this.height||this.element.offsetHeight}},{key:"show",value:function(){this.element.style.display=this.column.vertAlign?"inline-flex":""}},{key:"hide",value:function(){this.element.style.display="none"}},{key:"delete",value:function(){this.dispatch("cell-delete",this),!this.table.rowManager.redrawBlock&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.column.deleteCell(this),this.row.deleteCell(this),this.calcs={}}},{key:"getIndex",value:function(){return this.row.getCellIndex(this)}},{key:"getComponent",value:function(){return this.component||(this.component=new b(this)),this.component}}]),r}(f),w=function(i){a(r,i);var n=c(r);function r(e,i){var o;return t(this,r),(o=n.call(this,i.table)).definition=e,o.parent=i,o.type="column",o.columns=[],o.cells=[],o.element=o.createElement(),o.contentElement=!1,o.titleHolderElement=!1,o.titleElement=!1,o.groupElement=o.createGroupElement(),o.isGroup=!1,o.tooltip=!1,o.hozAlign="",o.vertAlign="",o.field="",o.fieldStructure="",o.getFieldValue="",o.setFieldValue="",o.titleDownload=null,o.titleFormatterRendered=!1,o.mapDefinitions(),o.setField(o.definition.field),o.modules={},o.width=null,o.widthStyled="",o.maxWidth=null,o.maxWidthStyled="",o.maxInitialWidth=null,o.minWidth=null,o.minWidthStyled="",o.widthFixed=!1,o.visible=!0,o.component=null,o.definition.columns?(o.isGroup=!0,o.definition.columns.forEach((function(e,t){var i=new r(e,l(o));o.attachColumn(i)})),o.checkColumnVisibility()):i.registerColumnField(l(o)),o._initialize(),o.bindModuleColumns(),o}return o(r,[{key:"createElement",value:function(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),e}},{key:"createGroupElement",value:function(){var e=document.createElement("div");return e.classList.add("tabulator-col-group-cols"),e}},{key:"mapDefinitions",value:function(){var e=this.table.options.columnDefaults;if(e)for(var t in e)void 0===this.definition[t]&&(this.definition[t]=e[t]);this.definition=this.table.columnManager.optionsList.generate(r.defaultOptionList,this.definition)}},{key:"checkDefinition",value:function(){var e=this;Object.keys(this.definition).forEach((function(t){-1===r.defaultOptionList.indexOf(t)&&console.warn("Invalid column definition option in '"+(e.field||e.definition.title)+"' column:",t)}))}},{key:"setField",value:function(e){this.field=e,this.fieldStructure=e?this.table.options.nestedFieldSeparator?e.split(this.table.options.nestedFieldSeparator):[e]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData}},{key:"registerColumnPosition",value:function(e){this.parent.registerColumnPosition(e)}},{key:"registerColumnField",value:function(e){this.parent.registerColumnField(e)}},{key:"reRegisterPosition",value:function(){this.isGroup?this.columns.forEach((function(e){e.reRegisterPosition()})):this.registerColumnPosition(this)}},{key:"_mapDepricatedFunctionality",value:function(){}},{key:"setTooltip",value:function(){var e=this,t=this.definition,i=t.headerTooltip;i?!0===i?t.field?this.langBind("columns|"+t.field,(function(i){e.element.setAttribute("title",i||t.title)})):this.element.setAttribute("title",t.title):("function"==typeof i&&!1===(i=i(this.getComponent()))&&(i=""),this.element.setAttribute("title",i)):this.element.setAttribute("title","")}},{key:"_initialize",value:function(){for(var e=this,t=this.definition;this.element.firstChild;)this.element.removeChild(this.element.firstChild);t.headerVertical&&(this.element.classList.add("tabulator-col-vertical"),"flip"===t.headerVertical&&this.element.classList.add("tabulator-col-vertical-flip")),this.contentElement=this._bindEvents(),this.contentElement=this._buildColumnHeaderContent(),this.element.appendChild(this.contentElement),this.isGroup?this._buildGroupHeader():this._buildColumnHeader(),this.setTooltip(),this.dispatch("column-init",this),this.element.addEventListener("mouseenter",(function(t){e.setTooltip()}))}},{key:"_bindEvents",value:function(){var e,t,i,n=this,o=this.definition;"function"==typeof o.headerClick&&this.element.addEventListener("click",(function(e){o.headerClick(e,n.getComponent())})),"function"==typeof o.headerDblClick&&this.element.addEventListener("dblclick",(function(e){o.headerDblClick(e,n.getComponent())})),"function"==typeof o.headerContext&&this.element.addEventListener("contextmenu",(function(e){o.headerContext(e,n.getComponent())})),"function"==typeof o.headerTap&&(i=!1,this.element.addEventListener("touchstart",(function(e){i=!0}),{passive:!0}),this.element.addEventListener("touchend",(function(e){i&&o.headerTap(e,n.getComponent()),i=!1}))),"function"==typeof o.headerDblTap&&(e=null,this.element.addEventListener("touchend",(function(t){e?(clearTimeout(e),e=null,o.headerDblTap(t,n.getComponent())):e=setTimeout((function(){clearTimeout(e),e=null}),300)}))),"function"==typeof o.headerTapHold&&(t=null,this.element.addEventListener("touchstart",(function(e){clearTimeout(t),t=setTimeout((function(){clearTimeout(t),t=null,i=!1,o.headerTapHold(e,this.getComponent())}),1e3)}),{passive:!0}),this.element.addEventListener("touchend",(function(e){clearTimeout(t),t=null})))}},{key:"_buildColumnHeader",value:function(){var e=this,t=this.definition;this.table;(this.dispatch("column-layout",this),void 0!==t.visible&&(t.visible?this.show(!0):this.hide(!0)),t.cssClass)&&t.cssClass.split(" ").forEach((function(t){e.element.classList.add(t)}));t.field&&this.element.setAttribute("tabulator-field",t.field),this.setMinWidth(parseInt(t.minWidth)),t.maxInitialWidth&&(this.maxInitialWidth=parseInt(t.maxInitialWidth)),t.maxWidth&&this.setMaxWidth(parseInt(t.maxWidth)),this.reinitializeWidth(),this.tooltip=this.definition.tooltip,this.hozAlign=this.definition.hozAlign,this.vertAlign=this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign}},{key:"_buildColumnHeaderContent",value:function(){this.definition,this.table;var e=document.createElement("div");return e.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),e.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),e}},{key:"_buildColumnHeaderTitle",value:function(){var e=this,t=this.definition,i=document.createElement("div");if(i.classList.add("tabulator-col-title"),t.editableTitle){var n=document.createElement("input");n.classList.add("tabulator-title-editor"),n.addEventListener("click",(function(e){e.stopPropagation(),n.focus()})),n.addEventListener("change",(function(){t.title=n.value,e.dispatchExternal("columnTitleChanged",e.getComponent())})),i.appendChild(n),t.field?this.langBind("columns|"+t.field,(function(e){n.value=e||t.title||" "})):n.value=t.title||" "}else t.field?this.langBind("columns|"+t.field,(function(n){e._formatColumnHeaderTitle(i,n||t.title||" ")})):this._formatColumnHeaderTitle(i,t.title||" ");return i}},{key:"_formatColumnHeaderTitle",value:function(t,i){var n=this.chain("column-format",[this,i,t],null,(function(){return i}));switch(e(n)){case"object":n instanceof Node?t.appendChild(n):(t.innerHTML="",console.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:",n));break;case"undefined":case"null":t.innerHTML="";break;default:t.innerHTML=n}}},{key:"_buildGroupHeader",value:function(){var e=this;(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass)&&this.definition.cssClass.split(" ").forEach((function(t){e.element.classList.add(t)}));this.titleElement.style.textAlign=this.definition.headerHozAlign,this.element.appendChild(this.groupElement)}},{key:"_getFlatData",value:function(e){return e[this.field]}},{key:"_getNestedData",value:function(e){for(var t,i=e,n=this.fieldStructure,o=n.length,a=0;a-1&&this.columns.splice(t,1),this.columns.length||this.delete()}},{key:"setWidth",value:function(e){this.widthFixed=!0,this.setWidthActual(e)}},{key:"setWidthActual",value:function(e){isNaN(e)&&(e=Math.floor(this.table.element.clientWidth/100*parseInt(e))),e=Math.max(this.minWidth,e),this.maxWidth&&(e=Math.min(this.maxWidth,e)),this.width=e,this.widthStyled=e?e+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach((function(e){e.setWidth()})),this.parent.isGroup&&this.parent.matchChildWidths(),this.dispatch("column-width",this)}},{key:"checkCellHeights",value:function(){var e=[];this.cells.forEach((function(t){t.row.heightInitialized&&(null!==t.row.getElement().offsetParent?(e.push(t.row),t.row.clearCellHeight()):t.row.heightInitialized=!1)})),e.forEach((function(e){e.calcHeight()})),e.forEach((function(e){e.setCellHeight()}))}},{key:"getWidth",value:function(){var e=0;return this.isGroup?this.columns.forEach((function(t){t.visible&&(e+=t.getWidth())})):e=this.width,e}},{key:"getHeight",value:function(){return Math.ceil(this.element.getBoundingClientRect().height)}},{key:"setMinWidth",value:function(e){this.minWidth=e,this.minWidthStyled=e?e+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach((function(e){e.setMinWidth()}))}},{key:"setMaxWidth",value:function(e){this.maxWidth=e,this.maxWidthStyled=e?e+"px":"",this.element.style.maxWidth=this.maxWidthStyled,this.cells.forEach((function(e){e.setMaxWidth()}))}},{key:"delete",value:function(){var e=this;return new Promise((function(t,i){e.isGroup&&e.columns.forEach((function(e){e.delete()})),e.dispatch("column-delete",e);for(var n=e.cells.length,o=0;o-1&&this._nextVisibleColumn(e+1)}},{key:"_nextVisibleColumn",value:function(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._nextVisibleColumn(e+1)}},{key:"prevColumn",value:function(){var e=this.table.columnManager.findColumnIndex(this);return e>-1&&this._prevVisibleColumn(e-1)}},{key:"_prevVisibleColumn",value:function(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._prevVisibleColumn(e-1)}},{key:"reinitializeWidth",value:function(e){this.widthFixed=!1,void 0===this.definition.width||e||this.setWidth(this.definition.width),this.dispatch("column-width-fit-before",this),this.fitToData(e),this.dispatch("column-width-fit-after",this)}},{key:"fitToData",value:function(e){if(!this.isGroup){this.widthFixed||(this.element.style.width="",this.cells.forEach((function(e){e.clearWidth()})));var t=this.element.offsetWidth;if((!this.width||!this.widthFixed)&&(this.cells.forEach((function(e){var i=e.getWidth();i>t&&(t=i)})),t)){var i=t+1;this.maxInitialWidth&&!e&&(i=Math.min(i,this.maxInitialWidth)),this.setWidthActual(i)}}}},{key:"updateDefinition",value:function(e){var t,i=this;return this.isGroup||this.parent.isGroup?(console.error("Column Update Error - The updateDefinition function is only available on ungrouped columns"),Promise.reject("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(t=Object.assign({},this.getDefinition()),t=Object.assign(t,e),this.table.columnManager.addColumn(t,!1,this).then((function(e){return t.field==i.field&&(i.field=!1),i.delete().then((function(){return e.getComponent()}))})))}},{key:"deleteCell",value:function(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}},{key:"getComponent",value:function(){return this.component||(this.component=new g(this)),this.component}}]),r}(f);w.defaultOptionList=v;var C=function(){function i(){t(this,i)}return o(i,null,[{key:"elVisible",value:function(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)}},{key:"elOffset",value:function(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}}},{key:"deepClone",value:function(t,i){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a={}.__proto__,r=[].__proto__;i||(i=Object.assign(Array.isArray(t)?[]:{},t));var s=function(){var s=t[l],u=void 0,c=void 0;null==s||"object"!==e(s)||s.__proto__!==a&&s.__proto__!==r||((u=o.findIndex((function(e){return e.subject===s})))>-1?i[l]=o[u].copy:(c=Object.assign(Array.isArray(s)?[]:{},s),o.unshift({subject:s,copy:c}),i[l]=n.deepClone(s,c,o)))};for(var l in t)s();return i}}]),i}(),k=function(){function i(e,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t(this,i),this.table=e,this.msgType=n,this.registeredDefaults=Object.assign({},o)}return o(i,[{key:"register",value:function(e,t){this.registeredDefaults[e]=t}},{key:"generate",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign({},this.registeredDefaults);if(Object.assign(n,t),!1!==i.debugInvalidOptions||this.table.options.debugInvalidOptions)for(var o in i)n.hasOwnProperty(o)||console.warn("Invalid "+this.msgType+" option:",o);for(var o in n)o in i?n[o]=i[o]:Array.isArray(n[o])?n[o]=Object.assign([],n[o]):"object"===e(n[o])&&null!==n[o]?n[o]=Object.assign({},n[o]):void 0===n[o]&&delete n[o];return n}}]),i}(),E=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).elementVertical=e.rowManager.element,o.elementHorizontal=e.columnManager.element,o.tableElement=e.rowManager.tableElement,o.verticalFillMode="fit",o}return o(n,[{key:"initialize",value:function(){}},{key:"clearRows",value:function(){}},{key:"clearColumns",value:function(){}},{key:"reinitializeColumnWidths",value:function(e){}},{key:"renderRows",value:function(){}},{key:"renderColumns",value:function(){}},{key:"rerenderRows",value:function(e){e&&e()}},{key:"rerenderColumns",value:function(e,t){}},{key:"renderRowCells",value:function(e){}},{key:"rerenderRowCells",value:function(e,t){}},{key:"scrollColumns",value:function(e,t){}},{key:"scrollRows",value:function(e,t){}},{key:"resize",value:function(){}},{key:"scrollToRow",value:function(e){}},{key:"scrollToRowNearestTop",value:function(e){}},{key:"visibleRows",value:function(e){return[]}},{key:"rows",value:function(){return this.table.rowManager.getDisplayRows()}},{key:"styleRow",value:function(e,t){var i=e.getElement();t%2?(i.classList.add("tabulator-row-even"),i.classList.remove("tabulator-row-odd")):(i.classList.add("tabulator-row-odd"),i.classList.remove("tabulator-row-even"))}},{key:"clear",value:function(){this.clearRows(),this.clearColumns()}},{key:"render",value:function(){this.renderRows(),this.renderColumns()}},{key:"rerender",value:function(e){this.rerenderRows(),this.rerenderColumns()}},{key:"scrollToRowPosition",value:function(e,t,i){var n=this,o=this.rows().indexOf(e),a=e.getElement(),r=0;return new Promise((function(s,l){if(o>-1){if(void 0===i&&(i=n.table.options.scrollToRowIfVisible),!i&&C.elVisible(a)&&(r=C.elOffset(a).top-C.elOffset(n.elementVertical).top)>0&&re&&(e=i)}})),this.windowBuffer=2*e}},{key:"rerenderColumns",value:function(e,t){var i=this,n={cols:this.columns,leftCol:this.leftCol,rightCol:this.rightCol},o=0;e&&!this.initialized||(this.clear(),this.calcWindowBuffer(),this.scrollLeft=this.elementVertical.scrollLeft,this.vDomScrollPosLeft=this.scrollLeft-this.windowBuffer,this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,this.table.columnManager.columnsByIndex.forEach((function(e){var t={};if(e.visible){var n=e.getWidth();t.leftPos=o,t.rightPos=o+n,t.width=n,i.isFitData&&(t.fitDataCheck=!e.modules.vdomHoz||e.modules.vdomHoz.fitDataCheck),o+n>i.vDomScrollPosLeft&&othis.windowBuffer/2?this.rerenderColumns():e>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())}},{key:"colPositionAdjust",value:function(e,t,i){for(var n=e;n=e.columns.length-1?e.vDomPadRight=0:e.vDomPadRight-=i.getWidth())):"break"};;){if("break"===i())break}t&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}},{key:"addColLeft",value:function(){for(var e=this,t=!1,i=function(){var i=e.columns[e.leftCol-1];if(!i)return"break";if(!(i.modules.vdomHoz.rightPos>=e.vDomScrollPosLeft))return"break";t=!0,e.getVisibleRows().forEach((function(e){if("group"!==e.type){var t=e.getCell(i);e.getElement().prepend(t.getElement()),t.cellRendered()}})),e.leftCol--,e.leftCol<=0?e.vDomPadLeft=0:e.vDomPadLeft-=i.getWidth();var n=e.fitDataColActualWidthCheck(i);n&&(e.scrollLeft=e.elementVertical.scrollLeft=e.elementVertical.scrollLeft+n,e.vDomPadRight-=n)};;){if("break"===i())break}t&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}},{key:"removeColRight",value:function(){for(var e=this,t=!1,i=function(){var i=e.columns[e.rightCol];return i&&i.modules.vdomHoz.leftPos>e.vDomScrollPosRight?(t=!0,e.getVisibleRows().forEach((function(e){if("group"!==e.type){var t=e.getCell(i);try{e.getElement().removeChild(t.getElement())}catch(e){console.warn("Could not removeColRight",e.message)}}})),e.vDomPadRight+=i.getWidth(),void e.rightCol--):"break"};;){if("break"===i())break}t&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}},{key:"removeColLeft",value:function(){for(var e=this,t=!1,i=function(){var i=e.columns[e.leftCol];return i&&i.modules.vdomHoz.rightPosi?(t=e-i,this.element.style.marginLeft=-t+"px"):this.element.style.marginLeft=0,this.scrollLeft=e,this.renderer.scrollColumns(e)}},{key:"generateColumnsFromRowData",value:function(t){var i,n,o=[],a=this.table.options.autoColumnsDefinitions;if(t&&t.length){for(var r in i=t[0]){var s={field:r,title:r},l=i[r];switch(e(l)){case"undefined":n="string";break;case"boolean":n="boolean";break;case"object":n=Array.isArray(l)?"array":"string";break;default:n=isNaN(l)||""===l?l.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?"alphanum":"string":"number"}s.sorter=n,o.push(s)}if(a)switch(e(a)){case"function":this.table.options.columns=a.call(this.table,o);break;case"object":Array.isArray(a)?o.forEach((function(e){var t=a.find((function(t){return t.field===e.field}));t&&Object.assign(e,t)})):o.forEach((function(e){a[e.field]&&Object.assign(e,a[e.field])})),this.table.options.columns=o}else this.table.options.columns=o;this.setColumns(this.table.options.columns)}}},{key:"setColumns",value:function(e,t){for(var i=this;this.headersElement.firstChild;)this.headersElement.removeChild(this.headersElement.firstChild);this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.dispatch("columns-loading"),e.forEach((function(e,t){i._addColumn(e)})),this._reIndexColumns(),this.dispatch("columns-loaded"),this.renderer.rerenderColumns(!1,!0),this.redraw(!0)}},{key:"_addColumn",value:function(e,t,i){var n=new w(e,this),o=n.getElement(),a=i?this.findColumnIndex(i):i;if(i&&a>-1){var r=i.getTopColumn(),s=this.columns.indexOf(r),l=r.getElement();t?(this.columns.splice(s,0,n),l.parentNode.insertBefore(o,l)):(this.columns.splice(s+1,0,n),l.parentNode.insertBefore(o,l.nextSibling))}else t?(this.columns.unshift(n),this.headersElement.insertBefore(n.getElement(),this.headersElement.firstChild)):(this.columns.push(n),this.headersElement.appendChild(n.getElement()));return n.columnRendered(),n}},{key:"registerColumnField",value:function(e){e.definition.field&&(this.columnsByField[e.definition.field]=e)}},{key:"registerColumnPosition",value:function(e){this.columnsByIndex.push(e)}},{key:"_reIndexColumns",value:function(){this.columnsByIndex=[],this.columns.forEach((function(e){e.reRegisterPosition()}))}},{key:"verticalAlignHeaders",value:function(){var e=this,t=0;this.columns.forEach((function(e){var i;e.clearVerticalAlign(),(i=e.getHeight())>t&&(t=i)})),this.columns.forEach((function(i){i.verticalAlign(e.table.options.columnHeaderVertAlign,t)})),this.table.rowManager.adjustTableSize()}},{key:"findColumn",value:function(t){return"object"!=e(t)?this.columnsByField[t]||!1:t instanceof w?t:t instanceof g?t._getSelf()||!1:"undefined"!=typeof HTMLElement&&t instanceof HTMLElement&&this.columns.find((function(e){return e.element===t}))||!1}},{key:"getColumnByField",value:function(e){return this.columnsByField[e]}},{key:"getColumnsByFieldRoot",value:function(e){var t=this,i=[];return Object.keys(this.columnsByField).forEach((function(n){n.split(".")[0]===e&&i.push(t.columnsByField[n])})),i}},{key:"getColumnByIndex",value:function(e){return this.columnsByIndex[e]}},{key:"getFirstVisibleColumn",value:function(e){return(e=this.columnsByIndex.findIndex((function(e){return e.visible})))>-1&&this.columnsByIndex[e]}},{key:"getColumns",value:function(){return this.columns}},{key:"findColumnIndex",value:function(e){return this.columnsByIndex.findIndex((function(t){return e===t}))}},{key:"getRealColumns",value:function(){return this.columnsByIndex}},{key:"traverse",value:function(e){this.columnsByIndex.forEach((function(t,i){e(t,i)}))}},{key:"getDefinitions",value:function(e){var t=[];return this.columnsByIndex.forEach((function(i){(!e||e&&i.visible)&&t.push(i.getDefinition())})),t}},{key:"getDefinitionTree",value:function(){var e=[];return this.columns.forEach((function(t){e.push(t.getDefinition(!0))})),e}},{key:"getComponents",value:function(e){var t=[];return(e?this.columns:this.columnsByIndex).forEach((function(e){t.push(e.getComponent())})),t}},{key:"getWidth",value:function(){var e=0;return this.columnsByIndex.forEach((function(t){t.visible&&(e+=t.getWidth())})),e}},{key:"moveColumn",value:function(e,t,i){this.moveColumnActual(e,t,i),t.element.parentNode.insertBefore(e.element,t.element),i&&t.element.parentNode.insertBefore(t.element,e.element),this.verticalAlignHeaders(),this.table.rowManager.reinitialize()}},{key:"moveColumnActual",value:function(e,t,i){e.parent.isGroup?this._moveColumnInArray(e.parent.columns,e,t,i):this._moveColumnInArray(this.columns,e,t,i),this._moveColumnInArray(this.columnsByIndex,e,t,i,!0),this.renderer.rerenderColumns(!0),this.dispatch("column-moved",e,t,i),this.subscribedExternal("columnMoved")&&this.dispatchExternal("columnMoved",e.getComponent(),this.table.columnManager.getComponents())}},{key:"_moveColumnInArray",value:function(e,t,i,n,o){var a,r=e.indexOf(t);r>-1&&(e.splice(r,1),(a=e.indexOf(i))>-1?n&&(a+=1):a=r,e.splice(a,0,t),o&&(this.chain("column-moving-rows",[t,i,n],null,[])||[]).concat(this.table.rowManager.rows).forEach((function(e){if(e.cells.length){var t=e.cells.splice(r,1)[0];e.cells.splice(a,0,t)}})))}},{key:"scrollToColumn",value:function(e,t,i){var n=this,o=0,a=0,r=0,s=e.getElement();return new Promise((function(l,u){if(void 0===t&&(t=n.table.options.scrollToColumnPosition),void 0===i&&(i=n.table.options.scrollToColumnIfVisible),e.visible){switch(t){case"middle":case"center":r=-n.element.clientWidth/2;break;case"right":r=s.clientWidth-n.headersElement.clientWidth}if(!i&&(a=s.offsetLeft)>0&&a+s.offsetWidththis.table.rowManager.element.clientHeight&&(e-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),this.columnsByIndex.forEach((function(i){var n,o,a;i.visible&&(n=i.definition.width||0,o=parseInt(i.minWidth),a="string"==typeof n?n.indexOf("%")>-1?e/100*parseInt(n):parseInt(n):n,t+=a>o?a:o)})),t}},{key:"addColumn",value:function(e,t,i){var n=this;return new Promise((function(o,a){var r=n._addColumn(e,t,i);n._reIndexColumns(),n.dispatch("column-add",e,t,i),"fitColumns"!=n.layoutMode()&&r.reinitializeWidth(),n.redraw(!0),n.table.rowManager.reinitialize(),n.renderer.rerenderColumns(),o(r)}))}},{key:"deregisterColumn",value:function(e){var t,i=e.getField();i&&delete this.columnsByField[i],(t=this.columnsByIndex.indexOf(e))>-1&&this.columnsByIndex.splice(t,1),(t=this.columns.indexOf(e))>-1&&this.columns.splice(t,1),this.verticalAlignHeaders(),this.redraw()}},{key:"redraw",value:function(e){C.elVisible(this.element)&&this.verticalAlignHeaders(),e&&(this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),this.confirm("table-redrawing",e)||this.layoutRefresh(),this.dispatch("table-redraw",e),this.table.footerManager.redraw()}}]),r}(f),M=function(){function e(i){return t(this,e),this._row=i,new Proxy(this,{get:function(e,t,i){return void 0!==e[t]?e[t]:e._row.table.componentFunctionBinder.handle("row",e._row,t)}})}return o(e,[{key:"getData",value:function(e){return this._row.getData(e)}},{key:"getElement",value:function(){return this._row.getElement()}},{key:"getCells",value:function(){var e=[];return this._row.getCells().forEach((function(t){e.push(t.getComponent())})),e}},{key:"getCell",value:function(e){var t=this._row.getCell(e);return!!t&&t.getComponent()}},{key:"getIndex",value:function(){return this._row.getData("data")[this._row.table.options.index]}},{key:"getPosition",value:function(e){return this._row.table.rowManager.getRowPosition(this._row,e)}},{key:"delete",value:function(){return this._row.delete()}},{key:"scrollTo",value:function(){return this._row.table.rowManager.scrollToRow(this._row)}},{key:"move",value:function(e,t){this._row.moveToRow(e,t)}},{key:"update",value:function(e){return this._row.updateData(e)}},{key:"normalizeHeight",value:function(){this._row.normalizeHeight(!0)}},{key:"_getSelf",value:function(){return this._row}},{key:"reformat",value:function(){return this._row.reinitialize()}},{key:"getTable",value:function(){return this._row.table}},{key:"getNextRow",value:function(){var e=this._row.nextRow();return e?e.getComponent():e}},{key:"getPrevRow",value:function(){var e=this._row.prevRow();return e?e.getComponent():e}}]),e}(),L=function(e){a(n,e);var i=c(n);function n(e,o){var a,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"row";return t(this,n),(a=i.call(this,o.table)).parent=o,a.data={},a.type=r,a.element=!1,a.modules={},a.cells=[],a.height=0,a.heightStyled="",a.manualHeight=!1,a.outerHeight=0,a.initialized=!1,a.heightInitialized=!1,a.component=null,a.created=!1,a.setData(e),a}return o(n,[{key:"create",value:function(){this.created||(this.created=!0,this.generateElement())}},{key:"createElement",value:function(){var e=document.createElement("div");e.classList.add("tabulator-row"),e.setAttribute("role","row"),this.element=e}},{key:"getElement",value:function(){return this.create(),this.element}},{key:"detachElement",value:function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}},{key:"generateElement",value:function(){this.createElement(),this.dispatch("row-init",this)}},{key:"generateCells",value:function(){this.cells=this.table.columnManager.generateCells(this)}},{key:"initialize",value:function(e){if(this.create(),!this.initialized||e){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.dispatch("row-layout-before",this),this.generateCells(),this.initialized=!0,this.table.columnManager.renderer.renderRowCells(this),e&&this.normalizeHeight(),this.dispatch("row-layout",this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.dispatch("row-layout-after",this)}else this.table.columnManager.renderer.rerenderRowCells(this)}},{key:"reinitializeHeight",value:function(){this.heightInitialized=!1,this.element&&null!==this.element.offsetParent&&this.normalizeHeight(!0)}},{key:"deinitializeHeight",value:function(){this.heightInitialized=!1}},{key:"reinitialize",value:function(e){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&null!==this.element.offsetParent&&this.initialize(!0),this.dispatch("row-relayout",this)}},{key:"calcHeight",value:function(e){var t=0,i=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach((function(e){var i=e.getHeight();i>t&&(t=i)})),this.height=e?Math.max(t,i):this.manualHeight?this.height:Math.max(t,i),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight}},{key:"setCellHeight",value:function(){this.cells.forEach((function(e){e.setHeight()})),this.heightInitialized=!0}},{key:"clearCellHeight",value:function(){this.cells.forEach((function(e){e.clearHeight()}))}},{key:"normalizeHeight",value:function(e){e&&this.clearCellHeight(),this.calcHeight(e),this.setCellHeight()}},{key:"setHeight",value:function(e,t){(this.height!=e||t)&&(this.manualHeight=!0,this.height=e,this.heightStyled=e?e+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)}},{key:"getHeight",value:function(){return this.outerHeight}},{key:"getWidth",value:function(){return this.element.offsetWidth}},{key:"deleteCell",value:function(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}},{key:"setData",value:function(e){this.data=this.chain("row-data-init-before",[this,e],void 0,e),this.dispatch("row-data-init-after",this)}},{key:"updateData",value:function(e){var t,i=this,n=this.element&&C.elVisible(this.element),o={};return new Promise((function(a,r){for(var s in"string"==typeof e&&(e=JSON.parse(e)),i.dispatch("row-data-save-before",i),i.subscribed("row-data-changing")&&(o=Object.assign(o,i.data),o=Object.assign(o,e)),t=i.chain("row-data-changing",[i,o,e],null,e))i.data[s]=t[s];for(var s in i.dispatch("row-data-save-after",i),e){i.table.columnManager.getColumnsByFieldRoot(s).forEach((function(e){var o=i.getCell(e.getField());if(o){var a=e.getFieldValue(t);o.getValue()!=a&&(o.setValueProcessData(a),n&&o.cellRendered())}}))}n?(i.normalizeHeight(!0),i.table.options.rowFormatter&&i.table.options.rowFormatter(i.getComponent())):(i.initialized=!1,i.height=0,i.heightStyled=""),i.dispatch("row-data-changed",i,n,e),i.dispatchExternal("rowUpdated",i.getComponent()),i.subscribedExternal("dataChanged")&&i.dispatchExternal("dataChanged",i.table.rowManager.getData()),a()}))}},{key:"getData",value:function(e){return e?this.chain("row-data-retrieve",[this,e],null,this.data):this.data}},{key:"getCell",value:function(e){return e=this.table.columnManager.findColumn(e),this.initialized||this.generateCells(),this.cells.find((function(t){return t.column===e}))}},{key:"getCellIndex",value:function(e){return this.cells.findIndex((function(t){return t===e}))}},{key:"findCell",value:function(e){return this.cells.find((function(t){return t.element===e}))}},{key:"getCells",value:function(){return this.initialized||this.generateCells(),this.cells}},{key:"nextRow",value:function(){return this.table.rowManager.nextDisplayRow(this,!0)||!1}},{key:"prevRow",value:function(){return this.table.rowManager.prevDisplayRow(this,!0)||!1}},{key:"moveToRow",value:function(e,t){var i=this.table.rowManager.findRow(e);i?(this.table.rowManager.moveRowActual(this,i,!t),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",e)}},{key:"delete",value:function(){return this.dispatch("row-delete",this),this.deleteActual(),Promise.resolve()}},{key:"deleteActual",value:function(e){this.table.rowManager.getRowIndex(this);this.detatchModules(),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.dispatch("row-deleted",this)}},{key:"detatchModules",value:function(){this.dispatch("row-deleting",this)}},{key:"deleteCells",value:function(){for(var e=this.cells.length,t=0;tMath.abs(this.elementVertical.scrollTop+this.elementVertical.clientHeight-t))}},{key:"scrollToRow",value:function(e){var t=e.getElement();this.elementVertical.scrollTop=C.elOffset(t).top-C.elOffset(this.elementVertical).top+this.elementVertical.scrollTop}},{key:"visibleRows",value:function(e){return this.rows()}}]),n}(E),S=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).verticalFillMode="fill",o.scrollTop=0,o.scrollLeft=0,o.vDomRowHeight=20,o.vDomTop=0,o.vDomBottom=0,o.vDomScrollPosTop=0,o.vDomScrollPosBottom=0,o.vDomTopPad=0,o.vDomBottomPad=0,o.vDomMaxRenderChain=90,o.vDomWindowBuffer=0,o.vDomWindowMinTotalRows=20,o.vDomWindowMinMarginRows=5,o.vDomTopNewRows=[],o.vDomBottomNewRows=[],o}return o(n,[{key:"clearRows",value:function(){for(var e=this.tableElement;e.firstChild;)e.removeChild(e.firstChild);e.style.paddingTop="",e.style.paddingBottom="",e.style.minHeight="",e.style.display="",e.style.visibility="",this.elementVertical.scrollTop=0,this.elementVertical.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0,this.vDomTop=0,this.vDomBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0}},{key:"renderRows",value:function(){this._virtualRenderFill()}},{key:"rerenderRows",value:function(e){for(var t=this.elementVertical.scrollTop,i=!1,n=!1,o=this.table.rowManager.scrollLeft,a=this.rows(),r=this.vDomTop;r<=this.vDomBottom;r++)if(a[r]){var s=t-a[r].getElement().offsetTop;if(!(!1===n||Math.abs(s)o||n>o){var r=this.table.rowManager.scrollLeft;this._virtualRenderFill(Math.floor(this.elementVertical.scrollTop/this.elementVertical.scrollHeight*a.length)),this.scrollColumns(r)}else t?(i<0&&this._addTopRow(a,-i),n<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(a,-n):this.vDomScrollPosBottom=this.scrollTop)):(n>=0&&this._addBottomRow(a,n),i>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(a,i):this.vDomScrollPosTop=this.scrollTop))}},{key:"resize",value:function(){this.vDomWindowBuffer=this.table.options.renderVerticalBuffer||this.elementVertical.clientHeight}},{key:"scrollToRowNearestTop",value:function(e){var t=this.rows().indexOf(e);return!(Math.abs(this.vDomTop-t)>Math.abs(this.vDomBottom-t))}},{key:"scrollToRow",value:function(e){var t=this.rows().indexOf(e);t>-1&&this._virtualRenderFill(t,!0)}},{key:"visibleRows",value:function(e){var t=this.elementVertical.scrollTop,i=this.elementVertical.clientHeight+t,n=!1,o=0,a=0,r=this.rows();if(e)o=this.vDomTop,a=this.vDomBottom;else for(var s=this.vDomTop;s<=this.vDomBottom;s++)if(r[s])if(n){if(!(i-r[s].getElement().offsetTop>=0))break;a=s}else if(t-r[s].getElement().offsetTop>=0)o=s;else{if(n=!0,!(i-r[s].getElement().offsetTop>=0))break;a=s}return r.slice(o,a+1)}},{key:"_virtualRenderFill",value:function(e,t,i){var n=this.tableElement,o=this.elementVertical,a=0,r=0,s=0,l=0,u=0,c=this.rows(),h=c.length,d=this.elementVertical.clientHeight;if(i=i||0,e=e||0){for(;n.firstChild;)n.removeChild(n.firstChild);(s=(h-e+1)*this.vDomRowHeight)this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*m),this.vDomBottom++,u++}e?(this.vDomTopPad=t?this.vDomRowHeight*this.vDomTop+i:this.scrollTop-l,this.vDomBottomPad=this.vDomBottom==h-1?0:Math.max(this.vDomScrollHeight-this.vDomTopPad-r-l,0)):(this.vDomTopPad=0,this.vDomRowHeight=Math.floor((r+l)/u),this.vDomBottomPad=this.vDomRowHeight*(h-this.vDomBottom-1),this.vDomScrollHeight=l+r+this.vDomBottomPad-d),n.style.paddingTop=this.vDomTopPad+"px",n.style.paddingBottom=this.vDomBottomPad+"px",t&&(this.scrollTop=this.vDomTopPad+l+i-(this.elementVertical.scrollWidth>this.elementVertical.clientWidth?this.elementVertical.offsetHeight-d:0)),this.scrollTop=Math.min(this.scrollTop,this.elementVertical.scrollHeight-d),this.elementVertical.scrollWidth>this.elementVertical.offsetWidth&&t&&(this.scrollTop+=this.elementVertical.offsetHeight-d),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,o.scrollTop=this.scrollTop,this.dispatch("render-virtual-fill")}}},{key:"_addTopRow",value:function(e,t){for(var i=this.tableElement,n=[],o=0,a=this.vDomTop-1,r=0;this.vDomTop;){var s=e[a],l=void 0,u=void 0;if(!(s&&r=l))break;this.styleRow(s,a),i.insertBefore(s.getElement(),i.firstChild),s.initialized&&s.heightInitialized||n.push(s),s.initialize(),u||(l=s.getElement().offsetHeight)>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l),t-=l,o+=l,this.vDomTop--,a--,r++}for(var c=0,h=n;c=(r=a.getHeight()||this.vDomRowHeight)))break;this.vDomTop++,t-=r,n+=r,i.push(a),o++}for(var s=0,l=i;s=l))break;this.styleRow(s,a),i.appendChild(s.getElement()),s.initialized&&s.heightInitialized||n.push(s),s.initialize(),u||(l=s.getElement().offsetHeight)>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l),t-=l,o+=l,this.vDomBottom++,a++,r++}for(var c=0,h=n;c=(r=a.getHeight()||this.vDomRowHeight)))break;this.vDomBottom--,t-=r,n+=r,i.push(a),o++}for(var s=0,l=i;st,n=e.element.scrollTop,o=e.scrollTop>n;e.scrollLeft!=t&&(e.scrollLeft=t,e.dispatch("scroll-horizontal",t,i),e.dispatchExternal("scrollHorizontal",t,i),e._positionPlaceholder()),e.scrollTop!=n&&(e.scrollTop=n,e.renderer.scrollRows(n,o),e.dispatch("scroll-vertical",n,o),e.dispatchExternal("scrollVertical",n,o))}))}},{key:"findRow",value:function(t){var i=this;return"object"!=e(t)?null!=t&&(this.rows.find((function(e){return e.data[i.table.options.index]==t}))||!1):t instanceof L?t:t instanceof M?t._getSelf()||!1:"undefined"!=typeof HTMLElement&&t instanceof HTMLElement&&this.rows.find((function(e){return e.getElement()===t}))||!1}},{key:"getRowFromDataObject",value:function(e){return this.rows.find((function(t){return t.data===e}))||!1}},{key:"getRowFromPosition",value:function(e,t){return t?this.activeRows[e]:this.rows[e]}},{key:"scrollToRow",value:function(e,t,i){return this.renderer.scrollToRowPosition(e,t,i)}},{key:"setData",value:function(e,t,i){var n=this;return new Promise((function(o,a){t&&n.getDisplayRows().length?n.table.options.pagination?n._setDataActual(e,!0):n.reRenderInPosition((function(){n._setDataActual(e)})):(n.table.options.autoColumns&&i&&n.table.initialized&&n.table.columnManager.generateColumnsFromRowData(e),n.resetScroll(),n._setDataActual(e)),o()}))}},{key:"_setDataActual",value:function(t,i){var n=this;this.dispatchExternal("dataProcessing",t),this._wipeElements(),Array.isArray(t)?(this.dispatch("data-processing",t),t.forEach((function(t,i){if(t&&"object"===e(t)){var o=new L(t,n);n.rows.push(o)}else console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:",t)})),this.refreshActiveData(!1,!1,i),this.dispatch("data-processed",t),this.dispatchExternal("dataProcessed",t)):console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ",e(t),"\nData: ",t)}},{key:"_wipeElements",value:function(){this.dispatch("rows-wipe"),this.rows.forEach((function(e){e.wipe()})),this.rows=[],this.activeRows=[],this.activeRowsPipeline=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.adjustTableSize()}},{key:"deleteRow",value:function(e,t){var i=this.rows.indexOf(e),n=this.activeRows.indexOf(e);n>-1&&this.activeRows.splice(n,1),i>-1&&this.rows.splice(i,1),this.setActiveRows(this.activeRows),this.displayRowIterator((function(t){var i=t.indexOf(e);i>-1&&t.splice(i,1)})),t||this.reRenderInPosition(),this.regenerateRowNumbers(),this.dispatchExternal("rowDeleted",e.getComponent()),this.displayRowsCount||this._showPlaceholder(),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.getData())}},{key:"addRow",value:function(e,t,i,n){return this.addRowActual(e,t,i,n)}},{key:"addRows",value:function(e,t,i){var n=this,o=[];return new Promise((function(a,r){t=n.findAddRowPos(t),Array.isArray(e)||(e=[e]),e.length,(void 0===i&&t||void 0!==i&&!t)&&e.reverse(),e.forEach((function(a,r){var s=n.addRow(a,t,i,!0);o.push(s),n.dispatch("row-added",s,e,t,i)})),n.refreshActiveData(!1,!1,!0),n.regenerateRowNumbers(),o.length&&n._clearPlaceholder(),a(o)}))}},{key:"findAddRowPos",value:function(e){return void 0===e&&(e=this.table.options.addRowPos),"pos"===e&&(e=!0),"bottom"===e&&(e=!1),e}},{key:"addRowActual",value:function(e,t,i,n){var o,a,r=e instanceof L?e:new L(e||{},this),s=this.findAddRowPos(t),l=-1;return i||(a=this.chain("row-adding-position",[r,s],null,{index:i,top:s}),i=a.index,s=a.top),void 0!==i&&(i=this.findRow(i)),(i=this.chain("row-adding-index",[r,i,s],null,i))&&(l=this.rows.indexOf(i)),i&&l>-1?(o=this.activeRows.indexOf(i),this.displayRowIterator((function(e){var t=e.indexOf(i);t>-1&&e.splice(s?t:t+1,0,r)})),o>-1&&this.activeRows.splice(s?o:o+1,0,r),this.rows.splice(s?l:l+1,0,r)):s?(this.displayRowIterator((function(e){e.unshift(r)})),this.activeRows.unshift(r),this.rows.unshift(r)):(this.displayRowIterator((function(e){e.push(r)})),this.activeRows.push(r),this.rows.push(r)),this.setActiveRows(this.activeRows),this.dispatchExternal("rowAdded",r.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),n||this.reRenderInPosition(),r}},{key:"moveRow",value:function(e,t,i){this.dispatch("row-move",e,t,i),this.moveRowActual(e,t,i),this.regenerateRowNumbers(),this.dispatch("row-moved",e,t,i),this.dispatchExternal("rowMoved",e.getComponent())}},{key:"moveRowActual",value:function(e,t,i){var n=this;this.moveRowInArray(this.rows,e,t,i),this.moveRowInArray(this.activeRows,e,t,i),this.displayRowIterator((function(o){n.moveRowInArray(o,e,t,i)})),this.dispatch("row-moving",e,t,i)}},{key:"moveRowInArray",value:function(e,t,i,n){var o,a,r;if(t!==i&&((o=e.indexOf(t))>-1&&(e.splice(o,1),(a=e.indexOf(i))>-1?n?e.splice(a+1,0,t):e.splice(a,0,t):e.splice(o,0,t)),e===this.getDisplayRows())){r=a>o?a:o+1;for(var s=o-1&&t}},{key:"nextDisplayRow",value:function(e,t){var i=this.getDisplayRowIndex(e),n=!1;return!1!==i&&i-1)&&i}},{key:"getData",value:function(e,t){var i=[];return this.getRows(e).forEach((function(e){"row"==e.type&&i.push(e.getData(t||"data"))})),i}},{key:"getComponents",value:function(e){var t=[];return this.getRows(e).forEach((function(e){t.push(e.getComponent())})),t}},{key:"getDataCount",value:function(e){return this.getRows(e).length}},{key:"scrollHorizontal",value:function(e){this.scrollLeft=e,this.element.scrollLeft=e,this.dispatch("scroll-horizontal",e)}},{key:"registerDataPipelineHandler",value:function(e,t){void 0!==t?(this.dataPipeline.push({handler:e,priority:t}),this.dataPipeline.sort((function(e,t){return e.priority-t.priority}))):console.error("Data pipeline handlers must have a priority in order to be registered")}},{key:"registerDisplayPipelineHandler",value:function(e,t){void 0!==t?(this.displayPipeline.push({handler:e,priority:t}),this.displayPipeline.sort((function(e,t){return e.priority-t.priority}))):console.error("Display pipeline handlers must have a priority in order to be registered")}},{key:"refreshActiveData",value:function(e,t,i){var n=this.table,o="",a=0,r=["all","dataPipeline","display","displayPipeline","end"];if("function"==typeof e)if((a=this.dataPipeline.findIndex((function(t){return t.handler===e})))>-1)o="dataPipeline",t&&(a==this.dataPipeline.length-1?o="display":a++);else{if(!((a=this.displayPipeline.findIndex((function(t){return t.handler===e})))>-1))return void console.error("Unable to refresh data, invalid handler provided",e);o="displayPipeline",t&&(a==this.displayPipeline.length-1?o="end":a++)}else o=e||"all",a=0;this.redrawBlock?(!this.redrawBlockRestoreConfig||this.redrawBlockRestoreConfig&&(this.redrawBlockRestoreConfig.stage===o&&a-1&&(n.splice(o,1),a=!0),"mouseenter"!==t&&"mouseleave"!==t||this.pseudoTracking||this.bindPseudoEvents(),a&&this.updateEventListeners()}},{key:"updateEventListeners",value:function(){for(var e in this.listeners){var t=this.listeners[e];t.components.length?t.handler||(t.handler=this.track.bind(this,e),this.el.addEventListener(e,t.handler)):t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}},{key:"track",value:function(e,t){var i=t.composedPath&&t.composedPath()||t.path,n=this.findTargets(i);n=this.bindComponents(e,n),this.triggerEvents(e,t,n),!this.pseudoTracking||"mouseover"!=e&&"mouseleave"!=e||Object.keys(n).length||this.pseudoMouseLeave("none",t)}},{key:"findTargets",value:function(e){var t,i=this,n={},o=Object.keys(this.componentMap),a=p(e);try{for(a.s();!(t=a.n()).done;){var r=t.value,s=r.classList?h(r.classList):[];if(s.filter((function(e){return i.abortClasses.includes(e)})).length)break;var l,u=p(s.filter((function(e){return o.includes(e)})));try{for(u.s();!(l=u.n()).done;){var c=l.value;n[this.componentMap[c]]=r}}catch(e){u.e(e)}finally{u.f()}}}catch(e){a.e(e)}finally{a.f()}return n.group&&n.group===n.row&&delete n.row,n}},{key:"bindComponents",value:function(e,t){var i,n=this,o=Object.keys(t).reverse(),a=this.listeners[e],r={},s=p(o);try{var l=function(){var e=i.value,o=void 0,s=t[e],l=n.previousTargets[e];if(l&&l.target===s)o=l.component;else switch(e){case"row":case"group":if(a.components.includes("row")||a.components.includes("cell")||a.components.includes("group"))o=n.table.rowManager.getVisibleRows(!0).find((function(e){return e.getElement()===s})),t.row&&t.row.parentNode&&t.row.parentNode.closest(".tabulator-row")&&(t[e]=!1);break;case"column":a.components.includes("column")&&(o=n.table.columnManager.findColumn(s));break;case"cell":a.components.includes("cell")&&(t.row instanceof L?o=t.row.findCell(s):t.row&&console.warn("Event Target Lookup Error - The row this cell is attached to cannot be found, has the table been reinitialized without being destroyed first?"))}o&&(t[e]=o,r[e]={target:s,component:o})};for(s.s();!(i=s.n()).done;)l()}catch(e){s.e(e)}finally{s.f()}return this.previousTargets=r,t}},{key:"triggerEvents",value:function(e,t,i){var n=this.listeners[e];for(var o in i)i[o]&&n.components.includes(o)&&this.dispatch(o+"-"+e,t,i[o])}},{key:"clearWatchers",value:function(){for(var e in this.listeners){var t=this.listeners[e];t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}}]),n}(f),H=function(){function e(i){t(this,e),this.table=i,this.bindings={}}return o(e,[{key:"bind",value:function(e,t,i){this.bindings[e]||(this.bindings[e]={}),this.bindings[e][t]?console.warn("Unable to bind component handler, a matching function name is already bound",e,t,i):this.bindings[e][t]=i}},{key:"handle",value:function(e,t,i){if(this.bindings[e]&&this.bindings[e][i]&&"function"==typeof this.bindings[e][i].bind)return this.bindings[e][i].bind(null,t);"then"===i||"string"!=typeof i||i.startsWith("_")||console.error("The "+e+" component does not have a "+i+" function, have you checked that you have the correct Tabulator module installed?")}}]),e}(),A=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).loaderElement=i.createLoaderElement(),i.msgElement=i.createMsgElement(),i.loadingElement=null,i.errorElement=null,i.requestOrder=0,i.loading=!1,i}return o(r,[{key:"initialize",value:function(){var e;this.loaderElement.appendChild(this.msgElement),this.table.options.dataLoaderLoading&&("string"==typeof this.table.options.dataLoaderLoading?((e=document.createElement("template")).innerHTML=this.table.options.dataLoaderLoading.trim(),this.loadingElement=e.firstElementChild):this.loadingElement=this.table.options.dataLoaderLoading),this.table.options.dataLoaderError&&("string"==typeof this.table.options.dataLoaderError?((e=document.createElement("template")).innerHTML=this.table.options.dataLoaderError.trim(),this.errorElement=e.firstElementChild):this.errorElement=this.table.options.dataLoaderError)}},{key:"createLoaderElement",value:function(){var e=document.createElement("div");return e.classList.add("tabulator-loader"),e}},{key:"createMsgElement",value:function(){var e=document.createElement("div");return e.classList.add("tabulator-loader-msg"),e.setAttribute("role","alert"),e}},{key:"load",value:function(t,i,n,o,a){var r=this,s=++this.requestOrder;return this.dispatchExternal("dataLoading",t),!t||0!=t.indexOf("{")&&0!=t.indexOf("[")||(t=JSON.parse(t)),this.confirm("data-loading",[t,i,n,a])?(this.loading=!0,a||this.showLoader(),i=this.chain("data-params",[t,n,a],i||{},i||{}),i=this.mapParams(i,this.table.options.dataSendParams),this.chain("data-load",[t,i,n,a],!1,Promise.resolve([])).then((function(t){Array.isArray(t)||"object"!=e(t)||(t=r.mapParams(t,r.objectInvert(r.table.options.dataReceiveParams)));var i=r.chain("data-loaded",t,null,t);s==r.requestOrder?(r.hideLoader(),!1!==i&&(r.dispatchExternal("dataLoaded",i),r.table.rowManager.setData(i,o,!o))):console.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")})).catch((function(e){console.error("Data Load Error: ",e),r.dispatchExternal("dataLoadError",e),a||r.showError(),setTimeout((function(){r.hideLoader()}),r.table.options.dataLoaderErrorTimeout)})).finally((function(){r.loading=!1}))):(this.dispatchExternal("dataLoaded",t),t||(t=[]),this.table.rowManager.setData(t,o,!o),Promise.resolve())}},{key:"mapParams",value:function(e,t){var i={};for(var n in e)i[t.hasOwnProperty(n)?t[n]:n]=e[n];return i}},{key:"objectInvert",value:function(e){var t={};for(var i in e)t[e[i]]=i;return t}},{key:"blockActiveLoad",value:function(){this.requestOrder++}},{key:"showLoader",value:function(){if("function"==typeof this.table.options.dataLoader?this.table.options.dataLoader():this.table.options.dataLoader){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-error"),this.msgElement.classList.add("tabulator-loading"),this.loadingElement?this.msgElement.appendChild(this.loadingElement):this.msgElement.innerHTML=this.langText("data|loading"),this.table.element.appendChild(this.loaderElement)}}},{key:"showError",value:function(){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-loading"),this.msgElement.classList.add("tabulator-error"),this.errorElement?this.msgElement.appendChild(this.errorElement):this.msgElement.innerHTML=this.langText("data|error"),this.table.element.appendChild(this.loaderElement)}},{key:"hideLoader",value:function(){this.loaderElement.parentNode&&this.loaderElement.parentNode.removeChild(this.loaderElement)}}]),r}(f),O=function(){function e(i,n,o){t(this,e),this.table=i,this.events={},this.optionsList=n||{},this.subscriptionNotifiers={},this.dispatch=o?this._debugDispatch.bind(this):this._dispatch.bind(this),this.debug=o}return o(e,[{key:"subscriptionChange",value:function(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifiySubscriptionChange(e,!0)}},{key:"subscribe",value:function(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t),this._notifiySubscriptionChange(e,!0)}},{key:"unsubscribe",value:function(e,t){var i;if(this.events[e]){if(t){if(!((i=this.events[e].findIndex((function(e){return e===t})))>-1))return void console.warn("Cannot remove event, no matching event found:",e,t);this.events[e].splice(i,1)}else delete this.events[e];this._notifiySubscriptionChange(e,!1)}else console.warn("Cannot remove event, no events set on:",e)}},{key:"subscribed",value:function(e){return this.events[e]&&this.events[e].length}},{key:"_notifiySubscriptionChange",value:function(e,t){var i=this.subscriptionNotifiers[e];i&&i.forEach((function(e){e(t)}))}},{key:"_dispatch",value:function(){var e,t=this,i=Array.from(arguments),n=i.shift();return this.events[n]&&this.events[n].forEach((function(n,o){var a=n.apply(t.table,i);o||(e=a)})),e}},{key:"_debugDispatch",value:function(){var e,t=Array.from(arguments),i=t[0];(t[0]="ExternalEvent:"+t[0],!0===this.debug||this.debug.includes(i))&&(e=console).log.apply(e,h(t));return this._dispatch.apply(this,arguments)}}]),e}(),_=function(){function e(i){t(this,e),this.events={},this.subscriptionNotifiers={},this.dispatch=i?this._debugDispatch.bind(this):this._dispatch.bind(this),this.chain=i?this._debugChain.bind(this):this._chain.bind(this),this.confirm=i?this._debugConfirm.bind(this):this._confirm.bind(this),this.debug=i}return o(e,[{key:"subscriptionChange",value:function(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifiySubscriptionChange(e,!0)}},{key:"subscribe",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e4;this.events[e]||(this.events[e]=[]),this.events[e].push({callback:t,priority:i}),this.events[e].sort((function(e,t){return e.priority-t.priority})),this._notifiySubscriptionChange(e,!0)}},{key:"unsubscribe",value:function(e,t){var i;if(this.events[e]){if(t){if(!((i=this.events[e].findIndex((function(e){return e.callback===t})))>-1))return void console.warn("Cannot remove event, no matching event found:",e,t);this.events[e].splice(i,1)}this._notifiySubscriptionChange(e,!1)}else console.warn("Cannot remove event, no events set on:",e)}},{key:"subscribed",value:function(e){return this.events[e]&&this.events[e].length}},{key:"_chain",value:function(e,t,i,n){var o=this,a=i;return Array.isArray(t)||(t=[t]),this.subscribed(e)?(this.events[e].forEach((function(e,i){a=e.callback.apply(o,t.concat([a]))})),a):"function"==typeof n?n():n}},{key:"_confirm",value:function(e,t){var i=this,n=!1;return Array.isArray(t)||(t=[t]),this.subscribed(e)&&this.events[e].forEach((function(e,o){e.callback.apply(i,t)&&(n=!0)})),n}},{key:"_notifiySubscriptionChange",value:function(e,t){var i=this.subscriptionNotifiers[e];i&&i.forEach((function(e){e(t)}))}},{key:"_dispatch",value:function(){var e=this,t=Array.from(arguments),i=t.shift();this.events[i]&&this.events[i].forEach((function(i){i.callback.apply(e,t)}))}},{key:"_debugDispatch",value:function(){var e,t=Array.from(arguments),i=t[0];(t[0]="InternalEvent:"+i,!0===this.debug||this.debug.includes(i))&&(e=console).log.apply(e,h(t));return this._dispatch.apply(this,arguments)}},{key:"_debugChain",value:function(){var e,t=Array.from(arguments),i=t[0];(t[0]="InternalEvent:"+i,!0===this.debug||this.debug.includes(i))&&(e=console).log.apply(e,h(t));return this._chain.apply(this,arguments)}},{key:"_debugConfirm",value:function(){var e,t=Array.from(arguments),i=t[0];(t[0]="InternalEvent:"+i,!0===this.debug||this.debug.includes(i))&&(e=console).log.apply(e,h(t));return this._confirm.apply(this,arguments)}}]),e}(),B=function(){function e(){t(this,e)}return o(e,null,[{key:"register",value:function(t){e.tables.push(t)}},{key:"deregister",value:function(t){var i=e.tables.indexOf(t);i>-1&&e.tables.splice(i,1)}},{key:"lookupTable",value:function(t,i){var n,o,a=[];if("string"==typeof t){if((n=document.querySelectorAll(t)).length)for(var r=0;r0?a.setWidth(o):a.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(e){var t,i,n=this.table.element.clientWidth,o=0,a=0,r=0,s=[],l=[],u=0,c=0;function h(e){return"string"==typeof e?e.indexOf("%")>-1?n/100*parseInt(e):parseInt(e):e}function d(e,t,i,n){var o=[],a=0,s=0,l=0,u=r,c=0,m=0,p=[];function f(e){return i*(e.column.definition.widthGrow||1)}function g(e){return h(e.width)-i*(e.column.definition.widthShrink||0)}return e.forEach((function(e,a){var r=n?g(e):f(e);e.column.minWidth>=r?o.push(e):e.column.maxWidth&&e.column.maxWidththis.table.rowManager.element.clientHeight&&(n-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),e.forEach((function(e){var t,i,n;e.visible&&(t=e.definition.width,i=parseInt(e.minWidth),t?(n=h(t),o+=n>i?n:i,e.definition.widthShrink&&(l.push({column:e,width:n>i?n:i}),u+=e.definition.widthShrink)):(s.push({column:e,width:0}),r+=e.definition.widthGrow||1))})),a=n-o,t=Math.floor(a/r),c=d(s,a,t,!1),s.length&&c>0&&(s[s.length-1].width+=+c),s.forEach((function(e){a-=e.width})),(i=Math.abs(c)+a)>0&&u&&(c=d(l,i,Math.floor(i/u),!0)),l.length&&(l[l.length-1].width-=c),s.forEach((function(e){e.column.setWidth(e.width)})),l.forEach((function(e){e.column.setWidth(e.width)}))}},W=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e,"layout")).mode=null,o.registerTableOption("layout","fitData"),o.registerTableOption("layoutColumnsOnNewData",!1),o.registerColumnOption("widthGrow"),o.registerColumnOption("widthShrink"),o}return o(n,[{key:"initialize",value:function(){var e=this.table.options.layout;n.modes[e]?this.mode=e:(console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : "+e),this.mode="fitData"),this.table.element.setAttribute("tabulator-layout",this.mode)}},{key:"getMode",value:function(){return this.mode}},{key:"layout",value:function(){this.dispatch("layout-refreshing"),n.modes[this.mode].call(this,this.table.columnManager.columnsByIndex),this.dispatch("layout-refreshed")}}]),n}(N);W.moduleName="layout",W.modes=I;var j=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).locale="default",i.lang=!1,i.bindings={},i.langList={},i.registerTableOption("locale",!1),i.registerTableOption("langs",{}),i}return o(r,[{key:"initialize",value:function(){for(var e in this.langList=C.deepClone(r.langs),!1!==this.table.options.columnDefaults.headerFilterPlaceholder&&this.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder),this.table.options.langs)this.installLang(e,this.table.options.langs[e]);this.setLocale(this.table.options.locale),this.registerTableFunction("setLocale",this.setLocale.bind(this)),this.registerTableFunction("getLocale",this.getLocale.bind(this)),this.registerTableFunction("getLang",this.getLang.bind(this))}},{key:"setHeaderFilterPlaceholder",value:function(e){this.langList.default.headerFilters.default=e}},{key:"setHeaderFilterColumnPlaceholder",value:function(e,t){this.langList.default.headerFilters.columns[e]=t,this.lang&&!this.lang.headerFilters.columns[e]&&(this.lang.headerFilters.columns[e]=t)}},{key:"installLang",value:function(e,t){this.langList[e]?this._setLangProp(this.langList[e],t):this.langList[e]=t}},{key:"_setLangProp",value:function(t,i){for(var n in i)t[n]&&"object"==e(t[n])?this._setLangProp(t[n],i[n]):t[n]=i[n]}},{key:"setLocale",value:function(t){if(!0===(t=t||"default")&&navigator.language&&(t=navigator.language.toLowerCase()),t&&!this.langList[t]){var i=t.split("-")[0];this.langList[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",t,i),t=i):(console.warn("Localization Error - Matching locale not found, using default: ",t),t="default")}this.locale=t,this.lang=C.deepClone(this.langList.default||{}),"default"!=t&&function t(i,n){for(var o in i)"object"==e(i[o])?(n[o]||(n[o]={}),t(i[o],n[o])):n[o]=i[o]}(this.langList[t],this.lang),this.dispatchExternal("localized",this.locale,this.lang),this._executeBindings()}},{key:"getLocale",value:function(e){return this.locale}},{key:"getLang",value:function(e){return e?this.langList[e]:this.lang}},{key:"getText",value:function(e,t){var i=(e=t?e+"|"+t:e).split("|");return this._getLangElement(i,this.locale)||""}},{key:"_getLangElement",value:function(e,t){var i=this.lang;return e.forEach((function(e){var t;i&&(t=i[e],i=void 0!==t&&t)})),i}},{key:"bind",value:function(e,t){this.bindings[e]||(this.bindings[e]=[]),this.bindings[e].push(t),t(this.getText(e),this.lang)}},{key:"_executeBindings",value:function(){var e=this,t=function(t){e.bindings[t].forEach((function(i){i(e.getText(t),e.lang)}))};for(var i in this.bindings)t(i)}}]),r}(N);j.moduleName="localize",j.langs={default:{groups:{item:"item",items:"items"},columns:{},data:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All",counter:{showing:"Showing",of:"of",rows:"rows",pages:"pages"}},headerFilters:{default:"filter column...",columns:{}}}};var G=function(e){a(n,e);var i=c(n);function n(e){return t(this,n),i.call(this,e)}return o(n,[{key:"initialize",value:function(){this.registerTableFunction("tableComms",this.receive.bind(this))}},{key:"getConnections",value:function(e){var t=this,i=[];return B.lookupTable(e).forEach((function(e){t.table!==e&&i.push(e)})),i}},{key:"send",value:function(e,t,i,n){var o=this,a=this.getConnections(e);a.forEach((function(e){e.tableComms(o.table.element,t,i,n)})),!a.length&&e&&console.warn("Table Connection Error - No tables matching selector found",e)}},{key:"receive",value:function(e,t,i,n){if(this.table.modExists(t))return this.table.modules[t].commsReceived(e,i,n);console.warn("Inter-table Comms Error - no such module:",t)}}]),n}(N);G.moduleName="comms";var U=Object.freeze({__proto__:null,LayoutModule:W,LocalizeModule:j,CommsModule:G}),X=function(){function i(e,n){t(this,i),this.bindStaticFuctionality(e),this.bindModules(e,U,!0),n&&this.bindModules(e,n)}return o(i,[{key:"bindStaticFuctionality",value:function(t){t.moduleBindings={},t.extendModule=function(i,n,o){if(t.moduleBindings[i]){var a=t.moduleBindings[i][n];if(a)if("object"==e(o))for(var r in o)a[r]=o[r];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",n)}else console.warn("Module Error - module does not exist:",i)},t.registerModule=function(e){Array.isArray(e)||(e=[e]),e.forEach((function(e){t.registerModuleBinding(e)}))},t.registerModuleBinding=function(e){t.moduleBindings[e.moduleName]=e},t.findTable=function(e){var t=B.lookupTable(e,!0);return!(Array.isArray(t)&&!t.length)&&t},t.prototype.bindModules=function(){var e=[],i=[];for(var n in this.modules={},t.moduleBindings){var o=t.moduleBindings[n],a=new o(this);this.modules[n]=a,o.prototype.moduleCore?this.modulesCore.push(a):o.moduleInitOrder?e.push(a):i.push(a)}e.sort((function(e,t){return e.moduleInitOrder>t.moduleInitOrder?1:-1})),this.modulesRegular=e.concat(i)}}},{key:"bindModules",value:function(e,t,i){var n=Object.values(t);i&&n.forEach((function(e){e.prototype.moduleCore=!0})),e.registerModule(n)}}]),i}(),q=function(){function i(e,n){var o=this;t(this,i),this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.vdomHoz=null,this.externalEvents=null,this.eventBus=null,this.interactionMonitor=!1,this.browser="",this.browserSlow=!1,this.browserMobile=!1,this.rtl=!1,this.originalElement=null,this.componentFunctionBinder=new H(this),this.dataLoader=!1,this.modules={},this.modulesCore=[],this.modulesRegular=[],this.optionsList=new k(this,"table constructor"),this.initialized=!1,this.initializeElement(e)&&(this.initializeCoreSystems(n),setTimeout((function(){o._create()}))),B.register(this)}return o(i,[{key:"initializeElement",value:function(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement?(this.element=e,!0):"string"==typeof e?(this.element=document.querySelector(e),!!this.element||(console.error("Tabulator Creation Error - no element found matching selector: ",e),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",e),!1)}},{key:"initializeCoreSystems",value:function(e){this.columnManager=new T(this),this.rowManager=new F(this),this.footerManager=new P(this),this.dataLoader=new A(this),this.bindModules(),this.options=this.optionsList.generate(i.defaultOptions,e),this._clearObjectPointers(),this._mapDeprecatedFunctionality(),this.externalEvents=new O(this,this.options,this.options.debugEventsExternal),this.eventBus=new _(this.options.debugEventsInternal),this.interactionMonitor=new z(this),this.dataLoader.initialize(),this.footerManager.initialize()}},{key:"_mapDeprecatedFunctionality",value:function(){}},{key:"_clearSelection",value:function(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")}},{key:"_create",value:function(){this.externalEvents.dispatch("tableBuilding"),this.eventBus.dispatch("table-building"),this._rtlCheck(),this._buildElement(),this._initializeTable(),this._loadInitialData(),this.initialized=!0,this.externalEvents.dispatch("tableBuilt")}},{key:"_rtlCheck",value:function(){var e=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if("rtl"!==e.direction)break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}}},{key:"_clearObjectPointers",value:function(){this.options.columns=this.options.columns.slice(0),Array.isArray(this.options.data)&&!this.options.reactiveData&&(this.options.data=this.options.data.slice(0))}},{key:"_buildElement",value:function(){var t,i=this.element,n=this.options;if("TABLE"===i.tagName){this.originalElement=this.element,t=document.createElement("div");var o=i.attributes;for(var a in o)"object"==e(o[a])&&t.setAttribute(o[a].name,o[a].value);i.parentNode.replaceChild(t,i),this.element=i=t}for(i.classList.add("tabulator"),i.setAttribute("role","grid");i.firstChild;)i.removeChild(i.firstChild);n.height&&(n.height=isNaN(n.height)?n.height:n.height+"px",i.style.height=n.height),!1!==n.minHeight&&(n.minHeight=isNaN(n.minHeight)?n.minHeight:n.minHeight+"px",i.style.minHeight=n.minHeight),!1!==n.maxHeight&&(n.maxHeight=isNaN(n.maxHeight)?n.maxHeight:n.maxHeight+"px",i.style.maxHeight=n.maxHeight)}},{key:"_initializeTable",value:function(){var e=this.element,t=this.options;this.interactionMonitor.initialize(),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modulesCore.forEach((function(e){e.initialize()})),e.appendChild(this.columnManager.getElement()),e.appendChild(this.rowManager.getElement()),t.footerElement&&this.footerManager.activate(),t.autoColumns&&t.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modulesRegular.forEach((function(e){e.initialize()})),this.columnManager.setColumns(t.columns),this.eventBus.dispatch("table-built")}},{key:"_loadInitialData",value:function(){this.dataLoader.load(this.options.data)}},{key:"destroy",value:function(){var e=this.element;for(B.deregister(this),this.eventBus.dispatch("table-destroy"),this.rowManager.rows.forEach((function(e){e.wipe()})),this.rowManager.rows=[],this.rowManager.activeRows=[],this.rowManager.displayRows=[];e.firstChild;)e.removeChild(e.firstChild);e.classList.remove("tabulator")}},{key:"_detectBrowser",value:function(){var e=navigator.userAgent||navigator.vendor||window.opera;e.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):e.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):e.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.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(e)||/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(e.slice(0,4))}},{key:"blockRedraw",value:function(){return this.rowManager.blockRedraw()}},{key:"restoreRedraw",value:function(){return this.rowManager.restoreRedraw()}},{key:"setData",value:function(e,t,i){if(this.initialized)return this.dataLoader.load(e,t,i,!1);console.warn("setData failed - table not yet initialized. To set initial data please use the 'data' property in the table constructor.")}},{key:"clearData",value:function(){this.dataLoader.blockActiveLoad(),this.rowManager.clearData()}},{key:"getData",value:function(e){return this.rowManager.getData(e)}},{key:"getDataCount",value:function(e){return this.rowManager.getDataCount(e)}},{key:"replaceData",value:function(e,t,i){if(this.initialized)return this.dataLoader.load(e,t,i,!0,!0);console.warn("replaceData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}},{key:"updateData",value:function(e){var t=this,i=0;if(this.initialized)return new Promise((function(n,o){t.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e?e.forEach((function(e){var o=t.rowManager.findRow(e[t.options.index]);o&&(i++,o.updateData(e).then((function(){--i||n()})))})):(console.warn("Update Error - No data provided"),o("Update Error - No data provided"))}));console.warn("updateData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}},{key:"addData",value:function(e,t,i){var n=this;if(this.initialized)return new Promise((function(o,a){n.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e?n.rowManager.addRows(e,t,i).then((function(e){var t=[];e.forEach((function(e){t.push(e.getComponent())})),o(t)})):(console.warn("Update Error - No data provided"),a("Update Error - No data provided"))}));console.warn("addData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}},{key:"updateOrAddData",value:function(e){var t=this,i=[],n=0;if(this.initialized)return new Promise((function(o,a){t.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e?e.forEach((function(e){var a=t.rowManager.findRow(e[t.options.index]);n++,a?a.updateData(e).then((function(){n--,i.push(a.getComponent()),n||o(i)})):t.rowManager.addRows(e).then((function(e){n--,i.push(e[0].getComponent()),n||o(i)}))})):(console.warn("Update Error - No data provided"),a("Update Error - No data provided"))}));console.warn("updateOrAddData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}},{key:"getRow",value:function(e){var t=this.rowManager.findRow(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}},{key:"getRowFromPosition",value:function(e,t){var i=this.rowManager.getRowFromPosition(e,t);return i?i.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}},{key:"deleteRow",value:function(e){var t=this,i=[];Array.isArray(e)||(e=[e]);var n,o=p(e);try{for(o.s();!(n=o.n()).done;){var a=n.value,r=this.rowManager.findRow(a,!0);if(!r)return console.error("Delete Error - No matching row found:",a),Promise.reject("Delete Error - No matching row found");i.push(r)}}catch(e){o.e(e)}finally{o.f()}return i.sort((function(e,i){return t.rowManager.rows.indexOf(e)>t.rowManager.rows.indexOf(i)?1:-1})),i.forEach((function(e){e.delete()})),this.rowManager.reRenderInPosition(),Promise.resolve()}},{key:"addRow",value:function(e,t,i){if(this.initialized)return"string"==typeof e&&(e=JSON.parse(e)),this.rowManager.addRows(e,t,i).then((function(e){return e[0].getComponent()}));console.warn("addRow failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}},{key:"updateOrAddRow",value:function(e,t){var i=this.rowManager.findRow(e);return"string"==typeof t&&(t=JSON.parse(t)),i?i.updateData(t).then((function(){return i.getComponent()})):this.rowManager.addRows(t).then((function(e){return e[0].getComponent()}))}},{key:"updateRow",value:function(e,t){var i=this.rowManager.findRow(e);return"string"==typeof t&&(t=JSON.parse(t)),i?i.updateData(t).then((function(){return Promise.resolve(i.getComponent())})):(console.warn("Update Error - No matching row found:",e),Promise.reject("Update Error - No matching row found"))}},{key:"scrollToRow",value:function(e,t,i){var n=this.rowManager.findRow(e);return n?this.rowManager.scrollToRow(n,t,i):(console.warn("Scroll Error - No matching row found:",e),Promise.reject("Scroll Error - No matching row found"))}},{key:"moveRow",value:function(e,t,i){var n=this.rowManager.findRow(e);n?n.moveToRow(t,i):console.warn("Move Error - No matching row found:",e)}},{key:"getRows",value:function(e){return this.rowManager.getComponents(e)}},{key:"getRowPosition",value:function(e,t){var i=this.rowManager.findRow(e);return i?this.rowManager.getRowPosition(i,t):(console.warn("Position Error - No matching row found:",e),!1)}},{key:"setColumns",value:function(e){this.initialized?this.columnManager.setColumns(e):console.warn("setColumns failed - table not yet initialized. To set initial data please use the 'columns' property in the table constructor.")}},{key:"getColumns",value:function(e){return this.columnManager.getComponents(e)}},{key:"getColumn",value:function(e){var t=this.columnManager.findColumn(e);return t?t.getComponent():(console.warn("Find Error - No matching column found:",e),!1)}},{key:"getColumnDefinitions",value:function(){return this.columnManager.getDefinitionTree()}},{key:"showColumn",value:function(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Show Error - No matching column found:",e),!1;t.show()}},{key:"hideColumn",value:function(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Hide Error - No matching column found:",e),!1;t.hide()}},{key:"toggleColumn",value:function(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Visibility Toggle Error - No matching column found:",e),!1;t.visible?t.hide():t.show()}},{key:"addColumn",value:function(e,t,i){var n=this.columnManager.findColumn(i);return this.columnManager.addColumn(e,t,n).then((function(e){return e.getComponent()}))}},{key:"deleteColumn",value:function(e){var t=this.columnManager.findColumn(e);return t?t.delete():(console.warn("Column Delete Error - No matching column found:",e),Promise.reject())}},{key:"updateColumnDefinition",value:function(e,t){var i=this.columnManager.findColumn(e);return i?i.updateDefinition(t):(console.warn("Column Update Error - No matching column found:",e),Promise.reject())}},{key:"moveColumn",value:function(e,t,i){var n=this.columnManager.findColumn(e),o=this.columnManager.findColumn(t);n?o?this.columnManager.moveColumn(n,o,i):console.warn("Move Error - No matching column found:",o):console.warn("Move Error - No matching column found:",e)}},{key:"scrollToColumn",value:function(e,t,i){var n=this;return new Promise((function(o,a){var r=n.columnManager.findColumn(e);return r?n.columnManager.scrollToColumn(r,t,i):(console.warn("Scroll Error - No matching column found:",e),Promise.reject("Scroll Error - No matching column found"))}))}},{key:"redraw",value:function(e){this.initialized?(this.columnManager.redraw(e),this.rowManager.redraw(e)):console.warn("redraw failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}},{key:"setHeight",value:function(e){this.options.height=isNaN(e)?e:e+"px",this.element.style.height=this.options.height,this.rowManager.initializeRenderer(),this.rowManager.redraw()}},{key:"on",value:function(e,t){this.externalEvents.subscribe(e,t)}},{key:"off",value:function(e,t){this.externalEvents.unsubscribe(e,t)}},{key:"dispatchEvent",value:function(){var e,t=Array.from(arguments);t.shift();(e=this.externalEvents).dispatch.apply(e,arguments)}},{key:"modExists",value:function(e,t){return!!this.modules[e]||(t&&console.error("Tabulator Module Not Installed: "+e),!1)}},{key:"module",value:function(e){var t=this.modules[e];return t||console.error("Tabulator module not installed: "+e),t}}]),i}();q.defaultOptions={debugEventsExternal:!1,debugEventsInternal:!1,debugInvalidOptions:!0,height:!1,minHeight:!1,maxHeight:!1,columnHeaderVertAlign:"top",columns:[],columnDefaults:{},data:!1,autoColumns:!1,autoColumnsDefinitions:!1,nestedFieldSeparator:".",tooltipGenerationMode:"load",footerElement:!1,index:"id",textDirection:"auto",addRowPos:"bottom",headerVisible:!0,renderVertical:"virtual",renderHorizontal:"basic",renderVerticalBuffer:0,scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,placeholder:!1,dataLoader:!0,dataLoaderLoading:!1,dataLoaderError:!1,dataLoaderErrorTimeout:3e3,dataSendParams:{},dataReceiveParams:{}},new X(q);var K=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).allowedTypes=["","data","download","clipboard","print","htmlOutput"],i.registerColumnOption("accessor"),i.registerColumnOption("accessorParams"),i.registerColumnOption("accessorData"),i.registerColumnOption("accessorDataParams"),i.registerColumnOption("accessorDownload"),i.registerColumnOption("accessorDownloadParams"),i.registerColumnOption("accessorClipboard"),i.registerColumnOption("accessorClipboardParams"),i.registerColumnOption("accessorPrint"),i.registerColumnOption("accessorPrintParams"),i.registerColumnOption("accessorHtmlOutput"),i.registerColumnOption("accessorHtmlOutputParams"),i}return o(r,[{key:"initialize",value:function(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-retrieve",this.transformRow.bind(this))}},{key:"initializeColumn",value:function(e){var t=this,i=!1,n={};this.allowedTypes.forEach((function(o){var a,r="accessor"+(o.charAt(0).toUpperCase()+o.slice(1));e.definition[r]&&(a=t.lookupAccessor(e.definition[r]))&&(i=!0,n[r]={accessor:a,params:e.definition[r+"Params"]||{}})})),i&&(e.modules.accessor=n)}},{key:"lookupAccessor",value:function(t){var i=!1;switch(e(t)){case"string":r.accessors[t]?i=r.accessors[t]:console.warn("Accessor Error - No such accessor found, ignoring: ",t);break;case"function":i=t}return i}},{key:"transformRow",value:function(e,t){var i="accessor"+(t.charAt(0).toUpperCase()+t.slice(1)),n=e.getComponent(),o=C.deepClone(e.data||{});return this.table.columnManager.traverse((function(e){var a,r,s,l;e.modules.accessor&&(r=e.modules.accessor[i]||e.modules.accessor.accessor||!1)&&"undefined"!=(a=e.getFieldValue(o))&&(l=e.getComponent(),s="function"==typeof r.params?r.params(a,o,t,l,n):r.params,e.setFieldValue(o,r.accessor(a,o,t,s,l,n)))})),o}}]),r}(N);K.moduleName="accessor",K.accessors={};function Y(t,i){var n=[];if(i=i||"",Array.isArray(t))t.forEach((function(e,t){n=n.concat(Y(e,i?i+"["+t+"]":t))}));else if("object"===e(t))for(var o in t)n=n.concat(Y(t[o],i?i+"["+o+"]":o));else n.push({key:i,value:t});return n}function J(e){var t=Y(e),i=[];return t.forEach((function(e){i.push(encodeURIComponent(e.key)+"="+encodeURIComponent(e.value))})),i.join("&")}function $(t,i){var n=[];if(i=i||"",Array.isArray(t))t.forEach((function(e,t){n=n.concat($(e,i?i+"["+t+"]":t))}));else if("object"===e(t))for(var o in t)n=n.concat($(t[o],i?i+"["+o+"]":o));else n.push({key:i,value:t});return n}var Z={json:{headers:{"Content-Type":"application/json"},body:function(e,t,i){return JSON.stringify(i)}},form:{headers:{},body:function(e,t,i){var n=$(i),o=new FormData;return n.forEach((function(e){o.append(e.key,e.value)})),o}}},Q=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).config={},o.url="",o.urlGenerator=!1,o.params=!1,o.loaderPromise=!1,o.registerTableOption("ajaxURL",!1),o.registerTableOption("ajaxURLGenerator",!1),o.registerTableOption("ajaxParams",{}),o.registerTableOption("ajaxConfig","get"),o.registerTableOption("ajaxContentType","form"),o.registerTableOption("ajaxRequestFunc",!1),o.registerTableOption("ajaxRequesting",(function(){})),o.registerTableOption("ajaxResponse",!1),o.contentTypeFormatters=n.contentTypeFormatters,o}return o(n,[{key:"initialize",value:function(){this.loaderPromise=this.table.options.ajaxRequestFunc||n.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||n.defaultURLGenerator,this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.setDefaultConfig(this.table.options.ajaxConfig),this.registerTableFunction("getAjaxUrl",this.getUrl.bind(this)),this.subscribe("data-loading",this.requestDataCheck.bind(this)),this.subscribe("data-params",this.requestParams.bind(this)),this.subscribe("data-load",this.requestData.bind(this))}},{key:"requestParams",value:function(e,t,i,n){var o=this.table.options.ajaxParams;return o&&("function"==typeof o&&(o=o.call(this.table)),n=Object.assign(n,o)),n}},{key:"requestDataCheck",value:function(e,t,i,n){return!((e||!this.url)&&"string"!=typeof e)}},{key:"requestData",value:function(e,t,i,n,o){var a;return!o&&this.requestDataCheck(e)?(e&&this.setUrl(e),a=this.generateConfig(i),this.sendRequest(this.url,t,a)):o}},{key:"setDefaultConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=Object.assign({},n.defaultConfig),"string"==typeof e?this.config.method=e:Object.assign(this.config,e)}},{key:"generateConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},this.config);return"string"==typeof e?t.method=e:Object.assign(t,e),t}},{key:"setUrl",value:function(e){this.url=e}},{key:"getUrl",value:function(){return this.url}},{key:"sendRequest",value:function(e,t,i){var n=this;return!1!==this.table.options.ajaxRequesting.call(this.table,e,t)?this.loaderPromise(e,i,t).then((function(i){return n.table.options.ajaxResponse&&(i=n.table.options.ajaxResponse.call(n.table,e,t,i)),i})):Promise.reject()}}]),n}(N);Q.moduleName="ajax",Q.defaultConfig={method:"GET"},Q.defaultURLGenerator=function(e,t,i){return e&&i&&Object.keys(i).length&&(t.method&&"get"!=t.method.toLowerCase()||(t.method="get",e+=(e.includes("?")?"&":"?")+J(i))),e},Q.defaultLoaderPromise=function(t,i,n){var o,a=this;return new Promise((function(r,s){if(t=a.urlGenerator.call(a.table,t,i,n),"GET"!=i.method.toUpperCase())if(o="object"===e(a.table.options.ajaxContentType)?a.table.options.ajaxContentType:a.contentTypeFormatters[a.table.options.ajaxContentType]){for(var l in o.headers)i.headers||(i.headers={}),void 0===i.headers[l]&&(i.headers[l]=o.headers[l]);i.body=o.body.call(a,t,i,n)}else console.warn("Ajax Error - Invalid ajaxContentType value:",a.table.options.ajaxContentType);t?(void 0===i.headers&&(i.headers={}),void 0===i.headers.Accept&&(i.headers.Accept="application/json"),void 0===i.headers["X-Requested-With"]&&(i.headers["X-Requested-With"]="XMLHttpRequest"),void 0===i.mode&&(i.mode="cors"),"cors"==i.mode?(void 0===i.headers.Origin&&(i.headers.Origin=window.location.origin),void 0===i.credentials&&(i.credentials="same-origin")):void 0===i.credentials&&(i.credentials="include"),fetch(t,i).then((function(e){e.ok?e.json().then((function(e){r(e)})).catch((function(e){s(e),console.warn("Ajax Load Error - Invalid JSON returned",e)})):(console.error("Ajax Load Error - Connection Error: "+e.status,e.statusText),s(e))})).catch((function(e){console.error("Ajax Load Error - Connection Error: ",e),s(e)}))):(console.warn("Ajax Load Error - No URL Set"),r([]))}))},Q.contentTypeFormatters=Z;var ee=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).mode=!0,i.pasteParser=function(){},i.pasteAction=function(){},i.customSelection=!1,i.rowRange=!1,i.blocked=!0,i.registerTableOption("clipboard",!1),i.registerTableOption("clipboardCopyStyled",!0),i.registerTableOption("clipboardCopyConfig",!1),i.registerTableOption("clipboardCopyFormatter",!1),i.registerTableOption("clipboardCopyRowRange","active"),i.registerTableOption("clipboardPasteParser","table"),i.registerTableOption("clipboardPasteAction","insert"),i.registerColumnOption("clipboard"),i.registerColumnOption("titleClipboard"),i}return o(r,[{key:"initialize",value:function(){var e=this;this.mode=this.table.options.clipboard,this.rowRange=this.table.options.clipboardCopyRowRange,!0!==this.mode&&"copy"!==this.mode||this.table.element.addEventListener("copy",(function(t){var i,n;if(!e.blocked){if(t.preventDefault(),e.customSelection)i=e.customSelection,e.table.options.clipboardCopyFormatter&&(i=e.table.options.clipboardCopyFormatter("plain",i));else{var o=e.table.modules.export.generateExportList(e.table.options.clipboardCopyConfig,e.table.options.clipboardCopyStyled,e.rowRange,"clipboard");i=(n=e.table.modules.export.genereateHTMLTable(o))?e.generatePlainContent(o):"",e.table.options.clipboardCopyFormatter&&(i=e.table.options.clipboardCopyFormatter("plain",i),n=e.table.options.clipboardCopyFormatter("html",n))}window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",i):t.clipboardData&&t.clipboardData.setData?(t.clipboardData.setData("text/plain",i),n&&t.clipboardData.setData("text/html",n)):t.originalEvent&&t.originalEvent.clipboardData.setData&&(t.originalEvent.clipboardData.setData("text/plain",i),n&&t.originalEvent.clipboardData.setData("text/html",n)),e.dispatchExternal("clipboardCopied",i,n),e.reset()}})),!0!==this.mode&&"paste"!==this.mode||this.table.element.addEventListener("paste",(function(t){e.paste(t)})),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction),this.registerTableFunction("copyToClipboard",this.copy.bind(this))}},{key:"reset",value:function(){this.blocked=!0,this.customSelection=!1}},{key:"generatePlainContent",value:function(t){var i=[];return t.forEach((function(t){var n=[];t.columns.forEach((function(i){var o="";if(i)if("group"===t.type&&(i.value=i.component.getKey()),null===i.value)o="";else switch(e(i.value)){case"object":o=JSON.stringify(i.value);break;case"undefined":o="";break;default:o=i.value}n.push(o)})),i.push(n.join("\t"))})),i.join("\n")}},{key:"copy",value:function(e,t){var i,n;this.blocked=!1,this.customSelection=!1,!0!==this.mode&&"copy"!==this.mode||(this.rowRange=e||this.table.options.clipboardCopyRowRange,void 0!==window.getSelection&&void 0!==document.createRange?((e=document.createRange()).selectNodeContents(this.table.element),(i=window.getSelection()).toString()&&t&&(this.customSelection=i.toString()),i.removeAllRanges(),i.addRange(e)):void 0!==document.selection&&void 0!==document.body.createTextRange&&((n=document.body.createTextRange()).moveToElementText(this.table.element),n.select()),document.execCommand("copy"),i&&i.removeAllRanges())}},{key:"setPasteAction",value:function(t){switch(e(t)){case"string":this.pasteAction=r.pasteActions[t],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",t);break;case"function":this.pasteAction=t}}},{key:"setPasteParser",value:function(t){switch(e(t)){case"string":this.pasteParser=r.pasteParsers[t],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",t);break;case"function":this.pasteParser=t}}},{key:"paste",value:function(e){var t,i,n;this.checkPaseOrigin(e)&&(t=this.getPasteData(e),(i=this.pasteParser.call(this,t))?(e.preventDefault(),this.table.modExists("mutator")&&(i=this.mutateData(i)),n=this.pasteAction.call(this,i),this.dispatchExternal("clipboardPasted",t,i,n)):this.dispatchExternal("clipboardPasteError",t))}},{key:"mutateData",value:function(e){var t=this,i=[];return Array.isArray(e)?e.forEach((function(e){i.push(t.table.modules.mutator.transformRow(e,"clipboard"))})):i=e,i}},{key:"checkPaseOrigin",value:function(e){var t=!0;return("DIV"!=e.target.tagName||this.table.modules.edit.currentCell)&&(t=!1),t}},{key:"getPasteData",value:function(e){var t;return window.clipboardData&&window.clipboardData.getData?t=window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?t=e.clipboardData.getData("text/plain"):e.originalEvent&&e.originalEvent.clipboardData.getData&&(t=e.originalEvent.clipboardData.getData("text/plain")),t}}]),r}(N);ee.moduleName="clipboard",ee.pasteActions={replace:function(e){return this.table.setData(e)},update:function(e){return this.table.updateOrAddData(e)},insert:function(e){return this.table.addData(e)}},ee.pasteParsers={table:function(e){var t=[],i=!0,n=this.table.columnManager.columns,o=[],a=[];return(e=e.split("\n")).forEach((function(e){t.push(e.split("\t"))})),!(!t.length||1===t.length&&t[0].length<2)&&(t[0].forEach((function(e){var t=n.find((function(t){return e&&t.definition.title&&e.trim()&&t.definition.title.trim()===e.trim()}));t?o.push(t):i=!1})),i||(i=!0,o=[],t[0].forEach((function(e){var t=n.find((function(t){return e&&t.field&&e.trim()&&t.field.trim()===e.trim()}));t?o.push(t):i=!1})),i||(o=this.table.columnManager.columnsByIndex)),i&&t.shift(),t.forEach((function(e){var t={};e.forEach((function(e,i){o[i]&&(t[o[i].field]=e)})),a.push(t)})),a)}};var te=function(){function e(i){return t(this,e),this._row=i,new Proxy(this,{get:function(e,t,i){return void 0!==e[t]?e[t]:e._row.table.componentFunctionBinder.handle("row",e._row,t)}})}return o(e,[{key:"getData",value:function(e){return this._row.getData(e)}},{key:"getElement",value:function(){return this._row.getElement()}},{key:"getTable",value:function(){return this._row.table}},{key:"getCells",value:function(){var e=[];return this._row.getCells().forEach((function(t){e.push(t.getComponent())})),e}},{key:"getCell",value:function(e){var t=this._row.getCell(e);return!!t&&t.getComponent()}},{key:"_getSelf",value:function(){return this._row}}]),e}(),ie={avg:function(e,t,i){var n=0,o=void 0!==i.precision?i.precision:2;return e.length&&(n=e.reduce((function(e,t){return Number(e)+Number(t)})),n/=e.length,n=!1!==o?n.toFixed(o):n),parseFloat(n).toString()},max:function(e,t,i){var n=null,o=void 0!==i.precision&&i.precision;return e.forEach((function(e){((e=Number(e))>n||null===n)&&(n=e)})),null!==n?!1!==o?n.toFixed(o):n:""},min:function(e,t,i){var n=null,o=void 0!==i.precision&&i.precision;return e.forEach((function(e){((e=Number(e))"),i.dataTreeExpandElement?"string"==typeof i.dataTreeExpandElement?((t=document.createElement("div")).innerHTML=i.dataTreeExpandElement,this.expandEl=t.firstChild):this.expandEl=i.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="
"),e(i.dataTreeStartExpanded)){case"boolean":this.startOpen=function(e,t){return i.dataTreeStartExpanded};break;case"function":this.startOpen=i.dataTreeStartExpanded;break;default:this.startOpen=function(e,t){return i.dataTreeStartExpanded[t]}}this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("row-deleted",this.rowDelete.bind(this),0),this.subscribe("row-data-changed",this.rowDataChanged.bind(this),10),this.subscribe("cell-value-updated",this.cellValueChanged.bind(this)),this.subscribe("edit-cancelled",this.cellValueChanged.bind(this)),this.subscribe("column-moving-rows",this.columnMoving.bind(this)),this.subscribe("table-built",this.initializeElementField.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),30)}}},{key:"initializeElementField",value:function(){var e=this.table.columnManager.getFirstVisibleColumn();this.elementField=this.table.options.dataTreeElementColumn||!!e&&e.field}},{key:"getRowChildren",value:function(e){return this.getTreeChildren(e,!0)}},{key:"columnMoving",value:function(){var e=this,t=[];return this.table.rowManager.rows.forEach((function(i){t=t.concat(e.getTreeChildren(i,!1,!0))})),t}},{key:"rowDataChanged",value:function(e,t,i){this.redrawNeeded(i)&&(this.initializeRow(e),t&&(this.layoutRow(e),this.refreshData(!0)))}},{key:"cellValueChanged",value:function(e){e.column.getField()===this.elementField&&this.layoutRow(e.row)}},{key:"initializeRow",value:function(t){var i=t.getData()[this.field],n=Array.isArray(i),o=n||!n&&"object"===e(i)&&null!==i;!o&&t.modules.dataTree&&t.modules.dataTree.branchEl&&t.modules.dataTree.branchEl.parentNode.removeChild(t.modules.dataTree.branchEl),!o&&t.modules.dataTree&&t.modules.dataTree.controlEl&&t.modules.dataTree.controlEl.parentNode.removeChild(t.modules.dataTree.controlEl),t.modules.dataTree={index:t.modules.dataTree?t.modules.dataTree.index:0,open:!!o&&(t.modules.dataTree?t.modules.dataTree.open:this.startOpen(t.getComponent(),0)),controlEl:!(!t.modules.dataTree||!o)&&t.modules.dataTree.controlEl,branchEl:!(!t.modules.dataTree||!o)&&t.modules.dataTree.branchEl,parent:!!t.modules.dataTree&&t.modules.dataTree.parent,children:o}}},{key:"reinitializeRowChildren",value:function(e){this.getTreeChildren(e,!1,!0).forEach((function(e){e.reinitialize(!0)}))}},{key:"layoutRow",value:function(e){var t=(this.elementField?e.getCell(this.elementField):e.getCells()[0]).getElement(),i=e.modules.dataTree;i.branchEl&&(i.branchEl.parentNode&&i.branchEl.parentNode.removeChild(i.branchEl),i.branchEl=!1),i.controlEl&&(i.controlEl.parentNode&&i.controlEl.parentNode.removeChild(i.controlEl),i.controlEl=!1),this.generateControlElement(e,t),e.getElement().classList.add("tabulator-tree-level-"+i.index),i.index&&(this.branchEl?(i.branchEl=this.branchEl.cloneNode(!0),t.insertBefore(i.branchEl,t.firstChild),this.table.rtl?i.branchEl.style.marginRight=(i.branchEl.offsetWidth+i.branchEl.style.marginLeft)*(i.index-1)+i.index*this.indent+"px":i.branchEl.style.marginLeft=(i.branchEl.offsetWidth+i.branchEl.style.marginRight)*(i.index-1)+i.index*this.indent+"px"):this.table.rtl?t.style.paddingRight=parseInt(window.getComputedStyle(t,null).getPropertyValue("padding-right"))+i.index*this.indent+"px":t.style.paddingLeft=parseInt(window.getComputedStyle(t,null).getPropertyValue("padding-left"))+i.index*this.indent+"px")}},{key:"generateControlElement",value:function(e,t){var i=this,n=e.modules.dataTree,o=(t=t||e.getCells()[0].getElement(),n.controlEl);!1!==n.children&&(n.open?(n.controlEl=this.collapseEl.cloneNode(!0),n.controlEl.addEventListener("click",(function(t){t.stopPropagation(),i.collapseRow(e)}))):(n.controlEl=this.expandEl.cloneNode(!0),n.controlEl.addEventListener("click",(function(t){t.stopPropagation(),i.expandRow(e)}))),n.controlEl.addEventListener("mousedown",(function(e){e.stopPropagation()})),o&&o.parentNode===t?o.parentNode.replaceChild(n.controlEl,o):t.insertBefore(n.controlEl,t.firstChild))}},{key:"setDisplayIndex",value:function(e){this.displayIndex=e}},{key:"getDisplayIndex",value:function(){return this.displayIndex}},{key:"getRows",value:function(e){var t=this,i=[];return e.forEach((function(e,n){var o;i.push(e),e instanceof L&&(e.create(),(o=e.modules.dataTree.children).index||!1===o.children||t.getChildren(e).forEach((function(e){e.create(),i.push(e)})))})),i}},{key:"getChildren",value:function(e,t){var i=this,n=e.modules.dataTree,o=[],a=[];return!1!==n.children&&(n.open||t)&&(Array.isArray(n.children)||(n.children=this.generateChildren(e)),o=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(n.children):n.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(o),o.forEach((function(e){a.push(e),i.getChildren(e).forEach((function(e){a.push(e)}))}))),a}},{key:"generateChildren",value:function(e){var t=this,i=[],n=e.getData()[this.field];return Array.isArray(n)||(n=[n]),n.forEach((function(n){var o=new L(n||{},t.table.rowManager);o.create(),o.modules.dataTree.index=e.modules.dataTree.index+1,o.modules.dataTree.parent=e,o.modules.dataTree.children&&(o.modules.dataTree.open=t.startOpen(o.getComponent(),o.modules.dataTree.index)),i.push(o)})),i}},{key:"expandRow",value:function(e,t){var i=e.modules.dataTree;!1!==i.children&&(i.open=!0,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowExpanded",e.getComponent(),e.modules.dataTree.index))}},{key:"collapseRow",value:function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open=!1,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowCollapsed",e.getComponent(),e.modules.dataTree.index))}},{key:"toggleRow",value:function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open?this.collapseRow(e):this.expandRow(e))}},{key:"isRowExpanded",value:function(e){return e.modules.dataTree.open}},{key:"getTreeParent",value:function(e){return!!e.modules.dataTree.parent&&e.modules.dataTree.parent.getComponent()}},{key:"getFilteredTreeChildren",value:function(e){var t=e.modules.dataTree,i=[];return t.children&&(Array.isArray(t.children)||(t.children=this.generateChildren(e)),(this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(t.children):t.children).forEach((function(e){e instanceof L&&i.push(e)}))),i}},{key:"rowDelete",value:function(e){var t,i=e.modules.dataTree.parent;i&&(!1!==(t=this.findChildIndex(e,i))&&i.data[this.field].splice(t,1),i.data[this.field].length||delete i.data[this.field],this.initializeRow(i),this.layoutRow(i)),this.refreshData(!0)}},{key:"addTreeChildRow",value:function(e,t,i,n){var o=!1;"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),void 0!==n&&!1!==(o=this.findChildIndex(n,e))&&e.data[this.field].splice(i?o:o+1,0,t),!1===o&&(i?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.refreshData(!0)}},{key:"findChildIndex",value:function(t,i){var n=this,o=!1;return"object"==e(t)?t instanceof L?o=t.data:t instanceof RowComponent?o=t._getSelf().data:"undefined"!=typeof HTMLElement&&t instanceof HTMLElement&&i.modules.dataTree&&(o=i.modules.dataTree.children.find((function(e){return e instanceof L&&e.element===t})))&&(o=o.data):o=null!=t&&i.data[this.field].find((function(e){return e.data[n.table.options.index]==t})),o&&(Array.isArray(i.data[this.field])&&(o=i.data[this.field].indexOf(o)),-1==o&&(o=!1)),o}},{key:"getTreeChildren",value:function(e,t,i){var n=this,o=e.modules.dataTree,a=[];return o.children&&(Array.isArray(o.children)||(o.children=this.generateChildren(e)),o.children.forEach((function(e){e instanceof L&&(a.push(t?e.getComponent():e),i&&(a=a.concat(n.getTreeChildren(e,t,i))))}))),a}},{key:"getChildField",value:function(){return this.field}},{key:"redrawNeeded",value:function(e){return!!this.field&&void 0!==e[this.field]||!!this.elementField&&void 0!==e[this.elementField]}}]),r}(N);oe.moduleName="dataTree";var ae={csv:function(t,i,n){var o=i&&i.delimiter?i.delimiter:",",a=[],r=[];t.forEach((function(t){var i=[];switch(t.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":t.columns.forEach((function(e,t){e&&1===e.depth&&(r[t]=void 0===e.value||null===e.value?"":'"'+String(e.value).split('"').join('""')+'"')}));break;case"row":t.columns.forEach((function(t){if(t){switch(e(t.value)){case"object":t.value=JSON.stringify(t.value);break;case"undefined":case"null":t.value=""}i.push('"'+String(t.value).split('"').join('""')+'"')}})),a.push(i.join(o))}})),r.length&&a.unshift(r.join(o)),a=a.join("\n"),i.bom&&(a="\ufeff"+a),n(a,"text/csv")},json:function(e,t,i){var n=[];e.forEach((function(e){var t={};switch(e.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":e.columns.forEach((function(e){e&&(t[e.component.getTitleDownload()||e.component.getField()]=e.value)})),n.push(t)}})),i(n=JSON.stringify(n,null,"\t"),"application/json")},jsonLines:function(e,t,i){var n=[];e.forEach((function(e){var t={};switch(e.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":e.columns.forEach((function(e){e&&(t[e.component.getTitleDownload()||e.component.getField()]=e.value)})),n.push(JSON.stringify(t))}})),i(n.join("\n"),"application/x-ndjson")},pdf:function(t,i,n){var o=[],a=[],r={},s=i.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},l=i.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},u=i.jsPDF||{},c=i&&i.title?i.title:"";function h(t,i){var n=[];return t.columns.forEach((function(t){var o;if(t){switch(e(t.value)){case"object":t.value=JSON.stringify(t.value);break;case"undefined":case"null":t.value=""}o={content:t.value,colSpan:t.width,rowSpan:t.height},i&&(o.styles=i),n.push(o)}})),n}u.orientation||(u.orientation=i.orientation||"landscape"),u.unit||(u.unit="pt"),t.forEach((function(e){switch(e.type){case"header":o.push(h(e));break;case"group":a.push(h(e,s));break;case"calc":a.push(h(e,l));break;case"row":a.push(h(e))}}));var d=new jspdf.jsPDF(u);i&&i.autoTable&&(r="function"==typeof i.autoTable?i.autoTable(d)||{}:i.autoTable),c&&(r.didDrawPage=function(e){d.text(c,40,30)}),r.head=o,r.body=a,d.autoTable(r),i&&i.documentProcessing&&i.documentProcessing(d),n(d.output("arraybuffer"),"application/pdf")},xlsx:function(t,i,n){var o=i.sheetName||"Sheet1",a=XLSX.utils.book_new(),r=new f(this);function s(){var i=[],n=[],o={},a={s:{c:0,r:0},e:{c:t[0]?t[0].columns.reduce((function(e,t){return e+(t&&t.width?t.width:1)}),0):0,r:t.length}};return t.forEach((function(t,o){var a=[];t.columns.forEach((function(t,i){t?(a.push(t.value instanceof Date||"object"!==e(t.value)?t.value:JSON.stringify(t.value)),(t.width>1||t.height>-1)&&(t.height>1||t.width>1)&&n.push({s:{r:o,c:i},e:{r:o+t.height-1,c:i+t.width-1}})):a.push("")})),i.push(a)})),XLSX.utils.sheet_add_aoa(o,i),o["!ref"]=XLSX.utils.encode_range(a),n.length&&(o["!merges"]=n),o}if(a.SheetNames=[],a.Sheets={},i.sheetOnly)n(s());else{if(i.sheets)for(var l in i.sheets)!0===i.sheets[l]?(a.SheetNames.push(l),a.Sheets[l]=s()):(a.SheetNames.push(l),r.commsSend(i.sheets[l],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:this.active,intercept:function(e){a.Sheets[l]=e}}));else a.SheetNames.push(o),a.Sheets[o]=s();i.documentProcessing&&(a=i.documentProcessing(a)),n(function(e){for(var t=new ArrayBuffer(e.length),i=new Uint8Array(t),n=0;n!=e.length;++n)i[n]=255&e.charCodeAt(n);return t}(XLSX.write(a,{bookType:"xlsx",bookSST:!0,type:"binary"})),"application/octet-stream")}},html:function(e,t,i){this.modExists("export",!0)&&i(this.modules.export.genereateHTMLTable(e),"text/html")}},re=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).registerTableOption("downloadReady",(function(e,t){return t})),o.registerTableOption("downloadConfig",{}),o.registerTableOption("downloadRowRange","active"),o.registerColumnOption("download"),o.registerColumnOption("titleDownload"),o}return o(n,[{key:"initialize",value:function(){this.registerTableFunction("download",this.download.bind(this)),this.registerTableFunction("downloadToTab",this.downloadToTab.bind(this))}},{key:"downloadToTab",value:function(e,t,i,n){this.download(e,t,i,n,!0)}},{key:"download",value:function(e,t,i,o,a){var r=!1;if("function"==typeof e?r=e:n.downloaders[e]?r=n.downloaders[e]:console.warn("Download Error - No such download type found: ",e),r){var s=this.generateExportList(o);r.call(this.table,s,i||{},function(i,n){a?!0===a?this.triggerDownload(i,n,e,t,!0):a(i):this.triggerDownload(i,n,e,t)}.bind(this))}}},{key:"generateExportList",value:function(e){var t=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,e||this.table.options.downloadRowRange,"download"),i=this.table.options.groupHeaderDownload;return i&&!Array.isArray(i)&&(i=[i]),t.forEach((function(e){var t;"group"===e.type&&(t=e.columns[0],i&&i[e.indent]&&(t.value=i[e.indent](t.value,e.component._group.getRowCount(),e.component._group.getData(),e.component)))})),t}},{key:"triggerDownload",value:function(e,t,i,n,o){var a=document.createElement("a"),r=new Blob([e],{type:t});n=n||"Tabulator."+("function"==typeof i?"txt":i);(r=this.table.options.downloadReady(e,r))&&(o?window.open(window.URL.createObjectURL(r)):navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(r,n):(a.setAttribute("href",window.URL.createObjectURL(r)),a.setAttribute("download",n),a.style.display="none",document.body.appendChild(a),a.click(),document.body.removeChild(a)),this.dispatchExternal("downloadComplete"))}},{key:"commsReceived",value:function(e,t,i){switch(t){case"intercept":this.download(i.type,"",i.options,i.active,i.intercept)}}}]),n}(N);function se(e,t){var i=t.mask,n=void 0!==t.maskLetterChar?t.maskLetterChar:"A",o=void 0!==t.maskNumberChar?t.maskNumberChar:"9",a=void 0!==t.maskWildcardChar?t.maskWildcardChar:"*";function r(t){var s=i[t];void 0!==s&&s!==a&&s!==n&&s!==o&&(e.value=e.value+""+s,r(t+1))}e.addEventListener("keydown",(function(t){var r=e.value.length,s=t.key;if(t.keyCode>46){if(r>=i.length)return t.preventDefault(),t.stopPropagation(),!1;switch(i[r]){case n:if(s.toUpperCase()==s.toLowerCase())return t.preventDefault(),t.stopPropagation(),!1;break;case o:if(isNaN(s))return t.preventDefault(),t.stopPropagation(),!1;break;case a:break;default:if(s!==i[r])return t.preventDefault(),t.stopPropagation(),!1}}})),e.addEventListener("keyup",(function(i){i.keyCode>46&&t.maskAutoFill&&r(e.value.length)})),e.placeholder||(e.placeholder=i),t.maskAutoFill&&r(e.value.length)}re.moduleName="download",re.downloaders=ae;var le={input:function(t,i,n,o,a){var r=t.getValue(),s=document.createElement("input");if(s.setAttribute("type",a.search?"search":"text"),s.style.padding="4px",s.style.width="100%",s.style.boxSizing="border-box",a.elementAttributes&&"object"==e(a.elementAttributes))for(var l in a.elementAttributes)"+"==l.charAt(0)?(l=l.slice(1),s.setAttribute(l,s.getAttribute(l)+a.elementAttributes["+"+l])):s.setAttribute(l,a.elementAttributes[l]);function u(e){null==r&&""!==s.value||s.value!==r?n(s.value)&&(r=s.value):o()}return s.value=void 0!==r?r:"",i((function(){s.focus({preventScroll:!0}),s.style.height="100%"})),s.addEventListener("change",u),s.addEventListener("blur",u),s.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:u();break;case 27:o();break;case 35:case 36:e.stopPropagation()}})),a.mask&&se(s,a),s},textarea:function(t,i,n,o,a){var r=t.getValue(),s=a.verticalNavigation||"hybrid",l=String(null!=r?r:""),u=((l.match(/(?:\r\n|\r|\n)/g)||[]).length,document.createElement("textarea")),c=0;if(u.style.display="block",u.style.padding="2px",u.style.height="100%",u.style.width="100%",u.style.boxSizing="border-box",u.style.whiteSpace="pre-wrap",u.style.resize="none",a.elementAttributes&&"object"==e(a.elementAttributes))for(var h in a.elementAttributes)"+"==h.charAt(0)?(h=h.slice(1),u.setAttribute(h,u.getAttribute(h)+a.elementAttributes["+"+h])):u.setAttribute(h,a.elementAttributes[h]);function d(e){null==r&&""!==u.value||u.value!==r?(n(u.value)&&(r=u.value),setTimeout((function(){t.getRow().normalizeHeight()}),300)):o()}return u.value=l,i((function(){u.focus({preventScroll:!0}),u.style.height="100%",u.scrollHeight,u.style.height=u.scrollHeight+"px",t.getRow().normalizeHeight()})),u.addEventListener("change",d),u.addEventListener("blur",d),u.addEventListener("keyup",(function(){u.style.height="";var e=u.scrollHeight;u.style.height=e+"px",e!=c&&(c=e,t.getRow().normalizeHeight())})),u.addEventListener("keydown",(function(e){switch(e.keyCode){case 27:o();break;case 38:("editor"==s||"hybrid"==s&&u.selectionStart)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 40:("editor"==s||"hybrid"==s&&u.selectionStart!==u.value.length)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}})),a.mask&&se(u,a),u},number:function(t,i,n,o,a){var r=t.getValue(),s=a.verticalNavigation||"editor",l=document.createElement("input");if(l.setAttribute("type","number"),void 0!==a.max&&l.setAttribute("max",a.max),void 0!==a.min&&l.setAttribute("min",a.min),void 0!==a.step&&l.setAttribute("step",a.step),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",a.elementAttributes&&"object"==e(a.elementAttributes))for(var u in a.elementAttributes)"+"==u.charAt(0)?(u=u.slice(1),l.setAttribute(u,l.getAttribute(u)+a.elementAttributes["+"+u])):l.setAttribute(u,a.elementAttributes[u]);l.value=r;var c=function(e){h()};function h(){var e=l.value;isNaN(e)||""===e||(e=Number(e)),e!==r?n(e)&&(r=e):o()}return i((function(){l.removeEventListener("blur",c),l.focus({preventScroll:!0}),l.style.height="100%",l.addEventListener("blur",c)})),l.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:h();break;case 27:o();break;case 38:case 40:"editor"==s&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}})),a.mask&&se(l,a),l},range:function(t,i,n,o,a){var r=t.getValue(),s=document.createElement("input");if(s.setAttribute("type","range"),void 0!==a.max&&s.setAttribute("max",a.max),void 0!==a.min&&s.setAttribute("min",a.min),void 0!==a.step&&s.setAttribute("step",a.step),s.style.padding="4px",s.style.width="100%",s.style.boxSizing="border-box",a.elementAttributes&&"object"==e(a.elementAttributes))for(var l in a.elementAttributes)"+"==l.charAt(0)?(l=l.slice(1),s.setAttribute(l,s.getAttribute(l)+a.elementAttributes["+"+l])):s.setAttribute(l,a.elementAttributes[l]);function u(){var e=s.value;isNaN(e)||""===e||(e=Number(e)),e!=r?n(e)&&(r=e):o()}return s.value=r,i((function(){s.focus({preventScroll:!0}),s.style.height="100%"})),s.addEventListener("blur",(function(e){u()})),s.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:u();break;case 27:o()}})),s},select:function(t,i,n,o,a){var r=this,s=this,l=t.getElement(),u=t.getValue(),c=a.verticalNavigation||"editor",h=void 0!==u||null===u?Array.isArray(u)?u:[u]:void 0!==a.defaultValue?a.defaultValue:[],d=document.createElement("input"),m=document.createElement("div"),p=a.multiselect,f=[],g={},v=[],b=[],y=!0,w=!1,k="",E=null;function R(e){var i,n={},o=s.table.getData();return(i=e?s.table.columnManager.getColumnByField(e):t.getColumn()._getSelf())?o.forEach((function(e){var t=i.getFieldValue(e);null!=t&&""!==t&&(n[t]=!0)})):console.warn("unable to find matching column to create select lookup list:",e),Object.keys(n)}function x(i,n){var o=[],r=[];function s(e){e={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1};return n.indexOf(e.value)>-1&&M(e),o.push(e),r.push(e),e}if("function"==typeof i&&(i=i(t)),Array.isArray(i))i.forEach((function(t){var i;"object"===e(t)?t.options?(i={label:t.label,group:!0,itemParams:t.itemParams,elementAttributes:t.elementAttributes,element:!1},r.push(i),t.options.forEach((function(e){s(e)}))):s(t):(i={label:t,value:t,element:!1},n.indexOf(i.value)>-1&&M(i),o.push(i),r.push(i))}));else for(var l in i){var u={label:i[l],value:l,element:!1};n.indexOf(u.value)>-1&&M(u),o.push(u),r.push(u)}a.sortValuesList&&(o.sort((function(e,t){return e.labelt.label?1:0})),r.sort((function(e,t){return e.labelt.label?1:0})),"asc"!==a.sortValuesList&&(o.reverse(),r.reverse())),f=o,v=r,function(){for(;m.firstChild;)m.removeChild(m.firstChild);v.forEach((function(i){var n=i.element;if(!n){if(n=document.createElement("div"),i.label=a.listItemFormatter?a.listItemFormatter(i.value,i.label,t,n,i.itemParams):i.label,i.group?(n.classList.add("tabulator-edit-select-list-group"),n.tabIndex=0,n.innerHTML=""===i.label?" ":i.label):(n.classList.add("tabulator-edit-select-list-item"),n.tabIndex=0,n.innerHTML=""===i.label?" ":i.label,n.addEventListener("click",(function(){w=!0,setTimeout((function(){w=!1}),10),p?(D(i),d.focus()):S(i)})),b.indexOf(i)>-1&&n.classList.add("active")),i.elementAttributes&&"object"==e(i.elementAttributes))for(var o in i.elementAttributes)"+"==o.charAt(0)?(o=o.slice(1),n.setAttribute(o,d.getAttribute(o)+i.elementAttributes["+"+o])):n.setAttribute(o,i.elementAttributes[o]);n.addEventListener("mousedown",(function(){y=!1,setTimeout((function(){y=!0}),10)})),i.element=n}m.appendChild(n)}))}()}function T(e,t){!p&&g&&g.element&&g.element.classList.remove("active"),g&&g.element&&g.element.classList.remove("focused"),g=e,e.element&&(e.element.classList.add("focused"),t&&e.element.classList.add("active")),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function M(e){-1==b.indexOf(e)&&(b.push(e),T(e,!0)),P()}function L(e){var t=b[e];e>-1&&(b.splice(e,1),t.element&&t.element.classList.remove("active"))}function D(e){e||(e=g);var t=b.indexOf(e);t>-1?L(t):(!0!==p&&b.length>=p&&L(0),M(e)),P()}function S(e){H(),e||(e=g),e&&(d.value=e.label,n(e.value)),h=[e.value]}function F(e){e||H();var t=[];b.forEach((function(e){t.push(e.value)})),h=t,n(t)}function P(){var e=[];b.forEach((function(t){e.push(t.label)})),d.value=e.join(", "),!1===s.currentCell&&F(!0)}function z(){H(),o()}function H(){m.parentNode&&m.parentNode.removeChild(m),s.table.rowManager.element.removeEventListener("scroll",z)}if((Array.isArray(a)||!Array.isArray(a)&&"object"===e(a)&&!a.values)&&(console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"),a={values:a}),d.setAttribute("type","text"),d.style.padding="4px",d.style.width="100%",d.style.boxSizing="border-box",d.style.cursor="default",d.readOnly=0!=this.currentCell,a.elementAttributes&&"object"==e(a.elementAttributes))for(var A in a.elementAttributes)"+"==A.charAt(0)?(A=A.slice(1),d.setAttribute(A,d.getAttribute(A)+a.elementAttributes["+"+A])):d.setAttribute(A,a.elementAttributes[A]);return d.value=void 0!==u||null===u?u:"",d.addEventListener("search",(function(e){d.value||(!function(){for(var e=b.length,t=0;t0&&T(f[t-1],!p));break;case 40:t=f.indexOf(g),("editor"==c||"hybrid"==c&&t=38&&e.keyCode<=90&&function(e){clearTimeout(E);var t=String.fromCharCode(event.keyCode).toLowerCase();k+=t.toLowerCase();var i=f.find((function(e){return void 0!==e.label&&e.label.toLowerCase().startsWith(k)}));i&&T(i,!p),E=setTimeout((function(){k=""}),800)}(e.keyCode)}})),d.addEventListener("blur",(function(e){y&&(p?F():z())})),d.addEventListener("focus",(function(e){w||function(){if(b=[],!m.parentNode){!0===a.values?x(R(),h):"string"==typeof a.values?x(R(a.values),h):x(a.values||[],h);var e=C.elOffset(l);m.style.minWidth=l.offsetWidth+"px",m.style.top=e.top+l.offsetHeight+"px",m.style.left=e.left+"px",m.addEventListener("mousedown",(function(e){y=!1,setTimeout((function(){y=!0}),10)})),document.body.appendChild(m)}}()})),(m=document.createElement("div")).classList.add("tabulator-edit-select-list"),i((function(){d.style.height="100%",d.focus({preventScroll:!0})})),setTimeout((function(){r.table.rowManager.element.addEventListener("scroll",z)}),10),d},autocomplete:function(t,i,n,o,a){var r=this,s=this,l=t.getElement(),u=t.getValue(),c=a.verticalNavigation||"editor",h=void 0!==u||null===u?u:void 0!==a.defaultValue?a.defaultValue:"",d=document.createElement("input"),m=document.createElement("div"),p=[],f=!1,g=!0,v=!1;if(d.setAttribute("type","search"),d.style.padding="4px",d.style.width="100%",d.style.boxSizing="border-box",a.elementAttributes&&"object"==e(a.elementAttributes))for(var b in a.elementAttributes)"+"==b.charAt(0)?(b=b.slice(1),d.setAttribute(b,d.getAttribute(b)+a.elementAttributes["+"+b])):d.setAttribute(b,a.elementAttributes[b]);function y(){!0===a.values?v=w():"string"==typeof a.values&&(v=w(a.values))}function w(e){var i,n={},o=s.table.getData();return(i=e?s.table.columnManager.getColumnByField(e):t.getColumn()._getSelf())?(o.forEach((function(e){var t=i.getFieldValue(e);null!=t&&""!==t&&(n[t]=!0)})),n=a.sortValuesList?"asc"==a.sortValuesList?Object.keys(n).sort():Object.keys(n).sort().reverse():Object.keys(n)):console.warn("unable to find matching column to create autocomplete lookup list:",e),n}function k(e,t){var i,n,o=[];i=v||(a.values||[]),a.searchFunc?(o=a.searchFunc(e,i))instanceof Promise?(E(void 0!==a.searchingPlaceholder?a.searchingPlaceholder:"Searching..."),o.then((function(e){T(R(e),t)})).catch((function(e){console.err("error in autocomplete search promise:",e)}))):T(R(o),t):(n=R(i),""===e?a.showListOnEmpty&&(o=n):n.forEach((function(t){null===t.value&&void 0===t.value||(String(t.value).toLowerCase().indexOf(String(e).toLowerCase())>-1||String(t.title).toLowerCase().indexOf(String(e).toLowerCase())>-1)&&o.push(t)})),T(o,t))}function E(e){var t=document.createElement("div");x(),!1!==e&&(t.classList.add("tabulator-edit-select-list-notice"),t.tabIndex=0,e instanceof Node?t.appendChild(e):t.innerHTML=e,m.appendChild(t))}function R(t){var i=[];if(Array.isArray(t))t.forEach((function(t){var n={};"object"===e(t)?(n.title=a.listItemFormatter?a.listItemFormatter(t.value,t.label):t.label,n.value=t.value):(n.title=a.listItemFormatter?a.listItemFormatter(t,t):t,n.value=t),i.push(n)}));else for(var n in t){var o={title:a.listItemFormatter?a.listItemFormatter(n,t[n]):t[n],value:n};i.push(o)}return i}function x(){for(;m.firstChild;)m.removeChild(m.firstChild)}function T(e,t){e.length?function(e,t){var i=!1;x(),(p=e).forEach((function(e){var n=e.element;n||((n=document.createElement("div")).classList.add("tabulator-edit-select-list-item"),n.tabIndex=0,n.innerHTML=e.title,n.addEventListener("click",(function(t){L(e),M()})),n.addEventListener("mousedown",(function(e){g=!1,setTimeout((function(){g=!0}),10)})),e.element=n,t&&e.value==u&&(d.value=e.title,e.element.classList.add("active"),i=!0),e===f&&(e.element.classList.add("active"),i=!0)),m.appendChild(n)})),i||L(!1)}(e,t):a.emptyPlaceholder&&E(a.emptyPlaceholder)}function M(){D(),f?u!==f.value?(u=f.value,d.value=f.title,n(f.value)):o():a.freetext||a.allowEmpty&&""===d.value?(u=d.value,n(d.value)):o()}function L(e,t){f&&f.element&&f.element.classList.remove("active"),f=e,e&&e.element&&e.element.classList.add("active"),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function D(){m.parentNode&&m.parentNode.removeChild(m),s.table.rowManager.element.removeEventListener("scroll",S)}function S(){D(),o()}return m.classList.add("tabulator-edit-select-list"),m.addEventListener("mousedown",(function(e){g=!1,setTimeout((function(){g=!0}),10)})),d.addEventListener("keydown",(function(e){var t;switch(e.keyCode){case 38:t=p.indexOf(f),("editor"==c||"hybrid"==c&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),L(t>0&&p[t-1]));break;case 40:t=p.indexOf(f),("editor"==c||"hybrid"==c&&t'):("ie"==r.table.browser?t.setAttribute("class","tabulator-star-inactive"):t.classList.replace("tabulator-star-active","tabulator-star-inactive"),t.innerHTML='')}))}function f(e){var t=document.createElement("span"),i=m.cloneNode(!0);h.push(i),t.addEventListener("mouseenter",(function(t){t.stopPropagation(),t.stopImmediatePropagation(),p(e)})),t.addEventListener("mousemove",(function(e){e.stopPropagation(),e.stopImmediatePropagation()})),t.addEventListener("click",(function(t){t.stopPropagation(),t.stopImmediatePropagation(),n(e),s.blur()})),t.appendChild(i),d.appendChild(t)}function g(e){l=e,p(e)}if(s.style.whiteSpace="nowrap",s.style.overflow="hidden",s.style.textOverflow="ellipsis",d.style.verticalAlign="middle",d.style.display="inline-block",d.style.padding="4px",m.setAttribute("width",c),m.setAttribute("height",c),m.setAttribute("viewBox","0 0 512 512"),m.setAttribute("xml:space","preserve"),m.style.padding="0 1px",a.elementAttributes&&"object"==e(a.elementAttributes))for(var v in a.elementAttributes)"+"==v.charAt(0)?(v=v.slice(1),d.setAttribute(v,d.getAttribute(v)+a.elementAttributes["+"+v])):d.setAttribute(v,a.elementAttributes[v]);for(var b=1;b<=u;b++)f(b);return p(l=Math.min(parseInt(l),u)),d.addEventListener("mousemove",(function(e){p(0)})),d.addEventListener("click",(function(e){n(0)})),s.addEventListener("blur",(function(e){o()})),s.addEventListener("keydown",(function(e){switch(e.keyCode){case 39:g(l+1);break;case 37:g(l-1);break;case 13:n(l);break;case 27:o()}})),d},progress:function(t,i,n,o,a){var r,s,l=t.getElement(),u=void 0===a.max?l.getElementsByTagName("div")[0]&&l.getElementsByTagName("div")[0].getAttribute("max")||100:a.max,c=void 0===a.min?l.getElementsByTagName("div")[0]&&l.getElementsByTagName("div")[0].getAttribute("min")||0:a.min,h=(u-c)/100,d=t.getValue()||0,m=document.createElement("div"),p=document.createElement("div");function f(){var e=window.getComputedStyle(l,null),t=h*Math.round(p.offsetWidth/((l.clientWidth-parseInt(e.getPropertyValue("padding-left"))-parseInt(e.getPropertyValue("padding-right")))/100))+c;n(t),l.setAttribute("aria-valuenow",t),l.setAttribute("aria-label",d)}if(m.style.position="absolute",m.style.right="0",m.style.top="0",m.style.bottom="0",m.style.width="5px",m.classList.add("tabulator-progress-handle"),p.style.display="inline-block",p.style.position="relative",p.style.height="100%",p.style.backgroundColor="#488CE9",p.style.maxWidth="100%",p.style.minWidth="0%",a.elementAttributes&&"object"==e(a.elementAttributes))for(var g in a.elementAttributes)"+"==g.charAt(0)?(g=g.slice(1),p.setAttribute(g,p.getAttribute(g)+a.elementAttributes["+"+g])):p.setAttribute(g,a.elementAttributes[g]);return l.style.padding="4px 4px",d=Math.min(parseFloat(d),u),d=Math.max(parseFloat(d),c),d=Math.round((d-c)/h),p.style.width=d+"%",l.setAttribute("aria-valuemin",c),l.setAttribute("aria-valuemax",u),p.appendChild(m),m.addEventListener("mousedown",(function(e){r=e.screenX,s=p.offsetWidth})),m.addEventListener("mouseover",(function(){m.style.cursor="ew-resize"})),l.addEventListener("mousemove",(function(e){r&&(p.style.width=s+e.screenX-r+"px")})),l.addEventListener("mouseup",(function(e){r&&(e.stopPropagation(),e.stopImmediatePropagation(),r=!1,s=!1,f())})),l.addEventListener("keydown",(function(e){switch(e.keyCode){case 39:e.preventDefault(),p.style.width=p.clientWidth+l.clientWidth/100+"px";break;case 37:e.preventDefault(),p.style.width=p.clientWidth-l.clientWidth/100+"px";break;case 9:case 13:f();break;case 27:o()}})),l.addEventListener("blur",(function(){o()})),p},tickCross:function(t,i,n,o,a){var r=t.getValue(),s=document.createElement("input"),l=a.tristate,u=void 0===a.indeterminateValue?null:a.indeterminateValue,c=!1;if(s.setAttribute("type","checkbox"),s.style.marginTop="5px",s.style.boxSizing="border-box",a.elementAttributes&&"object"==e(a.elementAttributes))for(var h in a.elementAttributes)"+"==h.charAt(0)?(h=h.slice(1),s.setAttribute(h,s.getAttribute(h)+a.elementAttributes["+"+h])):s.setAttribute(h,a.elementAttributes[h]);function d(e){return l?e?c?u:s.checked:s.checked&&!c?(s.checked=!1,s.indeterminate=!0,c=!0,u):(c=!1,s.checked):s.checked}return s.value=r,!l||void 0!==r&&r!==u&&""!==r||(c=!0,s.indeterminate=!0),"firefox"!=this.table.browser&&i((function(){s.focus({preventScroll:!0})})),s.checked=!0===r||"true"===r||"True"===r||1===r,i((function(){s.focus()})),s.addEventListener("change",(function(e){n(d())})),s.addEventListener("blur",(function(e){n(d(!0))})),s.addEventListener("keydown",(function(e){13==e.keyCode&&n(d()),27==e.keyCode&&o()})),s}},ue=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).currentCell=!1,i.mouseClick=!1,i.recursionBlock=!1,i.invalidEdit=!1,i.editedCells=[],i.editors=r.editors,i.registerColumnOption("editable"),i.registerColumnOption("editor"),i.registerColumnOption("editorParams"),i.registerColumnOption("cellEditing"),i.registerColumnOption("cellEdited"),i.registerColumnOption("cellEditCancelled"),i.registerTableFunction("getEditedCells",i.getEditedCells.bind(l(i))),i.registerTableFunction("clearCellEdited",i.clearCellEdited.bind(l(i))),i.registerTableFunction("navigatePrev",i.navigatePrev.bind(l(i))),i.registerTableFunction("navigateNext",i.navigateNext.bind(l(i))),i.registerTableFunction("navigateLeft",i.navigateLeft.bind(l(i))),i.registerTableFunction("navigateRight",i.navigateRight.bind(l(i))),i.registerTableFunction("navigateUp",i.navigateUp.bind(l(i))),i.registerTableFunction("navigateDown",i.navigateDown.bind(l(i))),i.registerComponentFunction("cell","isEdited",i.cellisEdited.bind(l(i))),i.registerComponentFunction("cell","clearEdited",i.clearEdited.bind(l(i))),i.registerComponentFunction("cell","edit",i.editCell.bind(l(i))),i.registerComponentFunction("cell","cancelEdit",i.cellCancelEdit.bind(l(i))),i.registerComponentFunction("cell","navigatePrev",i.navigatePrev.bind(l(i))),i.registerComponentFunction("cell","navigateNext",i.navigateNext.bind(l(i))),i.registerComponentFunction("cell","navigateLeft",i.navigateLeft.bind(l(i))),i.registerComponentFunction("cell","navigateRight",i.navigateRight.bind(l(i))),i.registerComponentFunction("cell","navigateUp",i.navigateUp.bind(l(i))),i.registerComponentFunction("cell","navigateDown",i.navigateDown.bind(l(i))),i}return o(r,[{key:"initialize",value:function(){this.subscribe("cell-init",this.bindEditor.bind(this)),this.subscribe("cell-delete",this.clearEdited.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this)),this.subscribe("column-delete",this.columnDeleteCheck.bind(this)),this.subscribe("row-deleting",this.rowDeleteCheck.bind(this)),this.subscribe("data-refreshing",this.cancelEdit.bind(this)),this.subscribe("keybinding-nav-prev",this.navigatePrev.bind(this,void 0)),this.subscribe("keybinding-nav-next",this.keybindingNavigateNext.bind(this)),this.subscribe("keybinding-nav-left",this.navigateLeft.bind(this,void 0)),this.subscribe("keybinding-nav-right",this.navigateRight.bind(this,void 0)),this.subscribe("keybinding-nav-up",this.navigateUp.bind(this,void 0)),this.subscribe("keybinding-nav-down",this.navigateDown.bind(this,void 0))}},{key:"keybindingNavigateNext",value:function(e){var t=this.currentCell,i=this.options("tabEndNewRow");t&&(this.navigateNext(t,e)||i&&(t.getElement().firstChild.blur(),(i=!0===i?this.table.addRow({}):"function"==typeof i?this.table.addRow(i(t.row.getComponent())):this.table.addRow(Object.assign({},i))).then((function(){setTimeout((function(){t.getComponent().navigateNext()}))}))))}},{key:"cellisEdited",value:function(e){return!!e.modules.edit&&e.modules.edit.edited}},{key:"cellCancelEdit",value:function(e){e===this.currentCell?this.table.modules.edit.cancelEdit():console.warn("Cancel Editor Error - This cell is not currently being edited ")}},{key:"clearCellEdited",value:function(e){var t=this;e||(e=this.table.modules.edit.getEditedCells()),Array.isArray(e)||(e=[e]),e.forEach((function(e){t.table.modules.edit.clearEdited(e._getSelf())}))}},{key:"navigatePrev",value:function(){var e,t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentCell,n=arguments.length>1?arguments[1]:void 0;if(i){if(n&&n.preventDefault(),e=this.navigateLeft())return!0;if((t=this.table.rowManager.prevDisplayRow(i.row,!0))&&(e=this.findNextEditableCell(t,t.cells.length)))return e.getComponent().edit(),!0}return!1}},{key:"navigateNext",value:function(){var e,t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentCell,n=arguments.length>1?arguments[1]:void 0;if(i){if(n&&n.preventDefault(),e=this.navigateRight())return!0;if((t=this.table.rowManager.nextDisplayRow(i.row,!0))&&(e=this.findNextEditableCell(t,-1)))return e.getComponent().edit(),!0}return!1}},{key:"navigateLeft",value:function(){var e,t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentCell,n=arguments.length>1?arguments[1]:void 0;return!!(i&&(n&&n.preventDefault(),e=i.getIndex(),t=this.findPrevEditableCell(i.row,e)))&&(t.getComponent().edit(),!0)}},{key:"navigateRight",value:function(){var e,t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentCell,n=arguments.length>1?arguments[1]:void 0;return!!(i&&(n&&n.preventDefault(),e=i.getIndex(),t=this.findNextEditableCell(i.row,e)))&&(t.getComponent().edit(),!0)}},{key:"navigateUp",value:function(){var e,t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentCell,n=arguments.length>1?arguments[1]:void 0;return!!(i&&(n&&n.preventDefault(),e=i.getIndex(),t=this.table.rowManager.prevDisplayRow(i.row,!0)))&&(t.cells[e].getComponent().edit(),!0)}},{key:"navigateDown",value:function(){var e,t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentCell,n=arguments.length>1?arguments[1]:void 0;return!!(i&&(n&&n.preventDefault(),e=i.getIndex(),t=this.table.rowManager.nextDisplayRow(i.row,!0)))&&(t.cells[e].getComponent().edit(),!0)}},{key:"findNextEditableCell",value:function(e,t){var i=!1;if(t0)for(var n=t-1;n>=0;n--){var o=e.cells[n],a=!0;if(o.column.modules.edit&&C.elVisible(o.getElement())&&("function"==typeof o.column.modules.edit.check&&(a=o.column.modules.edit.check(o.getComponent())),a)){i=o;break}}return i}},{key:"initializeColumnCheck",value:function(e){void 0!==e.definition.editor&&this.initializeColumn(e)}},{key:"columnDeleteCheck",value:function(e){this.currentCell&&this.currentCell.column===e&&this.cancelEdit()}},{key:"rowDeleteCheck",value:function(e){this.currentCell&&this.currentCell.row===e&&this.cancelEdit()}},{key:"initializeColumn",value:function(t){var i={editor:!1,blocked:!1,check:t.definition.editable,params:t.definition.editorParams||{}};switch(e(t.definition.editor)){case"string":this.editors[t.definition.editor]?i.editor=this.editors[t.definition.editor]:console.warn("Editor Error - No such editor found: ",t.definition.editor);break;case"function":i.editor=t.definition.editor;break;case"boolean":!0===t.definition.editor&&("function"!=typeof t.definition.formatter?this.editors[t.definition.formatter]?i.editor=this.editors[t.definition.formatter]:i.editor=this.editors.input:console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",t.definition.formatter))}i.editor&&(t.modules.edit=i)}},{key:"getCurrentCell",value:function(){return!!this.currentCell&&this.currentCell.getComponent()}},{key:"clearEditor",value:function(e){var t,i=this.currentCell;if(this.invalidEdit=!1,i){for(this.currentCell=!1,t=i.getElement(),e?i.column.modules.validate&&this.table.modExists("validate")&&this.table.modules.validate.cellValidate(i):t.classList.remove("tabulator-validation-fail"),t.classList.remove("tabulator-editing");t.firstChild;)t.removeChild(t.firstChild);i.row.getElement().classList.remove("tabulator-row-editing")}}},{key:"cancelEdit",value:function(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(!0),e.setValueActual(e.getValue()),e.cellRendered(),("textarea"==e.column.definition.editor||e.column.definition.variableHeight)&&e.row.normalizeHeight(!0),e.column.definition.cellEditCancelled&&e.column.definition.cellEditCancelled.call(this.table,t),this.dispatch("edit-cancelled",e),this.dispatchExternal("cellEditCancelled",t)}}},{key:"bindEditor",value:function(e){if(e.column.modules.edit){var t=this,i=e.getElement(!0);i.setAttribute("tabindex",0),i.addEventListener("click",(function(e){i.classList.contains("tabulator-editing")||i.focus({preventScroll:!0})})),i.addEventListener("mousedown",(function(e){2===e.button?e.preventDefault():t.mouseClick=!0})),i.addEventListener("focus",(function(i){t.recursionBlock||t.edit(e,i,!1)}))}}},{key:"focusCellNoEvent",value:function(e,t){this.recursionBlock=!0,t&&"ie"===this.table.browser||e.getElement().focus({preventScroll:!0}),this.recursionBlock=!1}},{key:"editCell",value:function(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)}},{key:"focusScrollAdjust",value:function(e){if("virtual"==this.table.rowManager.getRenderMode()){var t=this.table.rowManager.element.scrollTop,i=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,n=e.row.getElement();n.offsetTop;n.offsetTopi&&(this.table.rowManager.element.scrollTop+=n.offsetTop+n.offsetHeight-i);var o=this.table.rowManager.element.scrollLeft,a=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,r=e.getElement();r.offsetLeft;this.table.modExists("frozenColumns")&&(o+=parseInt(this.table.modules.frozenColumns.leftMargin),a-=parseInt(this.table.modules.frozenColumns.rightMargin)),"virtual"===this.table.options.renderHorizontal&&(o-=parseInt(this.table.columnManager.renderer.vDomPadLeft),a-=parseInt(this.table.columnManager.renderer.vDomPadLeft)),r.offsetLefta&&(this.table.rowManager.element.scrollLeft+=r.offsetLeft+r.offsetWidth-a)}}},{key:"edit",value:function(t,i,n){var o,a,r,s=this,l=!0,u=function(){},c=t.getElement();if(!this.currentCell){if(t.column.modules.edit.blocked)return this.mouseClick=!1,c.blur(),!1;switch(i&&i.stopPropagation(),e(t.column.modules.edit.check)){case"function":l=t.column.modules.edit.check(t.getComponent());break;case"boolean":l=t.column.modules.edit.check}if(l||n){if(s.cancelEdit(),s.currentCell=t,this.focusScrollAdjust(t),a=t.getComponent(),this.mouseClick&&(this.mouseClick=!1,t.column.definition.cellClick&&t.column.definition.cellClick.call(this.table,i,a)),t.column.definition.cellEditing&&t.column.definition.cellEditing.call(this.table,a),this.dispatch("cell-editing",t),this.dispatchExternal("cellEditing",a),r="function"==typeof t.column.modules.edit.params?t.column.modules.edit.params(a):t.column.modules.edit.params,!1===(o=t.column.modules.edit.editor.call(s,a,(function(e){u=e}),(function(e){if(s.currentCell===t){var i=!0;return t.column.modules.validate&&s.table.modExists("validate")&&"manual"!=s.table.options.validationMode&&(i=s.table.modules.validate.validate(t.column.modules.validate,t,e)),!0===i||"highlight"===s.table.options.validationMode?(s.clearEditor(),t.modules.edit||(t.modules.edit={}),t.modules.edit.edited=!0,-1==s.editedCells.indexOf(t)&&s.editedCells.push(t),t.setValue(e,!0),!0===i||(c.classList.add("tabulator-validation-fail"),s.table.externalEvents.dispatch("validationFailed",t.getComponent(),e,i),!1)):(s.invalidEdit=!0,c.classList.add("tabulator-validation-fail"),s.focusCellNoEvent(t,!0),u(),s.table.externalEvents.dispatch("validationFailed",t.getComponent(),e,i),!1)}}),(function(){s.currentCell===t&&s.cancelEdit()}),r)))return c.blur(),!1;if(!(o instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",o),c.blur(),!1;for(c.classList.add("tabulator-editing"),t.row.getElement().classList.add("tabulator-row-editing");c.firstChild;)c.removeChild(c.firstChild);c.appendChild(o),u();for(var h=c.children,d=0;d-1&&this.editedCells.splice(t,1)}}]),r}(N);ue.moduleName="edit",ue.editors=le;var ce=function e(i,n,o,a){t(this,e),this.type=i,this.columns=n,this.component=o||!1,this.indent=a||0},he=function e(i,n,o,a,r){t(this,e),this.value=i,this.component=n||!1,this.width=o,this.height=a,this.depth=r},de=function(n){a(s,n);var r=c(s);function s(e){var i;return t(this,s),(i=r.call(this,e)).config={},i.cloneTableStyle=!0,i.colVisProp="",i.registerTableOption("htmlOutputConfig",!1),i.registerColumnOption("htmlOutput"),i.registerColumnOption("titleHtmlOutput"),i}return o(s,[{key:"initialize",value:function(){this.registerTableFunction("getHtml",this.getHtml.bind(this))}},{key:"generateExportList",value:function(e,t,i,n){this.cloneTableStyle=t,this.config=e||{},this.colVisProp=n;var o=!1!==this.config.columnHeaders?this.headersToExportRows(this.generateColumnGroupHeaders()):[],a=this.bodyToExportRows(this.rowLookup(i));return o.concat(a)}},{key:"genereateTable",value:function(e,t,i,n){var o=this.generateExportList(e,t,i,n);return this.genereateTableElement(o)}},{key:"rowLookup",value:function(e){var t=this,i=[];if("function"==typeof e)e.call(this.table).forEach((function(e){(e=t.table.rowManager.findRow(e))&&i.push(e)}));else switch(e){case!0:case"visible":i=this.table.rowManager.getVisibleRows(!1,!0);break;case"all":i=this.table.rowManager.rows;break;case"selected":i=this.table.modules.selectRow.selectedRows;break;case"active":default:i=this.table.options.pagination?this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length-2):this.table.rowManager.getDisplayRows()}return Object.assign([],i)}},{key:"generateColumnGroupHeaders",value:function(){var e=this,t=[];return(!1!==this.config.columnGroups?this.table.columnManager.columns:this.table.columnManager.columnsByIndex).forEach((function(i){var n=e.processColumnGroup(i);n&&t.push(n)})),t}},{key:"processColumnGroup",value:function(e){var t=this,i=e.columns,n=0,o={title:e.definition["title"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))]||e.definition.title,column:e,depth:1};if(i.length){if(o.subGroups=[],o.width=0,i.forEach((function(e){var i=t.processColumnGroup(e);i&&(o.width+=i.width,o.subGroups.push(i),i.depth>n&&(n=i.depth))})),o.depth+=n,!o.width)return!1}else{if(!this.columnVisCheck(e))return!1;o.width=1}return o}},{key:"columnVisCheck",value:function(e){return!1!==e.definition[this.colVisProp]&&(e.visible||!e.visible&&e.definition[this.colVisProp])}},{key:"headersToExportRows",value:function(e){var t=[],i=0,n=[];function o(e,n){var a=i-n;if(void 0===t[n]&&(t[n]=[]),e.height=e.subGroups?1:a-e.depth+1,t[n].push(e),e.height>1)for(var r=1;r1)for(var s=1;si&&(i=e.depth)})),e.forEach((function(e){o(e,0)})),t.forEach((function(e){var t=[];e.forEach((function(e){if(e){var i=void 0===e.title?"":e.title;t.push(new he(i,e.column.getComponent(),e.width,e.height,e.depth))}else t.push(null)})),n.push(new ce("header",t))})),n}},{key:"bodyToExportRows",value:function(e){var t=this,i=[],n=[];return this.table.columnManager.columnsByIndex.forEach((function(e){t.columnVisCheck(e)&&i.push(e.getComponent())})),!1!==this.config.columnCalcs&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&e.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&e.push(this.table.modules.columnCalcs.botRow)),(e=e.filter((function(e){switch(e.type){case"group":return!1!==t.config.rowGroups;case"calc":return!1!==t.config.columnCalcs;case"row":return!(t.table.options.dataTree&&!1===t.config.dataTree&&e.modules.dataTree.parent)}return!0}))).forEach((function(e,o){var a=e.getData(t.colVisProp),r=[],s=0;switch(e.type){case"group":s=e.level,r.push(new he(e.key,e.getComponent(),i.length,1));break;case"calc":case"row":i.forEach((function(e){r.push(new he(e._column.getFieldValue(a),e,1,1))})),t.table.options.dataTree&&!1!==t.config.dataTree&&(s=e.modules.dataTree.index)}n.push(new ce(e.type,r,e.getComponent(),s))})),n}},{key:"genereateTableElement",value:function(e){var t=this,i=document.createElement("table"),n=document.createElement("thead"),o=document.createElement("tbody"),a=this.lookupTableStyles(),r=this.table.options["rowFormatter"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],s={};return s.rowFormatter=null!==r?r:this.table.options.rowFormatter,this.table.options.dataTree&&!1!==this.config.dataTree&&this.table.modExists("columnCalcs")&&(s.treeElementField=this.table.modules.dataTree.elementField),s.groupHeader=this.table.options["groupHeader"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],s.groupHeader&&!Array.isArray(s.groupHeader)&&(s.groupHeader=[s.groupHeader]),i.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),n,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),e.forEach((function(e,i){switch(e.type){case"header":n.appendChild(t.genereateHeaderElement(e,s,a));break;case"group":o.appendChild(t.genereateGroupElement(e,s,a));break;case"calc":o.appendChild(t.genereateCalcElement(e,s,a));break;case"row":var r=t.genereateRowElement(e,s,a);t.mapElementStyles(i%2&&a.evenRow?a.evenRow:a.oddRow,r,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),o.appendChild(r)}})),n.innerHTML&&i.appendChild(n),i.appendChild(o),this.mapElementStyles(this.table.element,i,["border-top","border-left","border-right","border-bottom"]),i}},{key:"lookupTableStyles",value:function(){var e={};return this.cloneTableStyle&&window.getComputedStyle&&(e.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),e.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),e.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),e.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),e.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],e.firstRow&&(e.styleCells=e.firstRow.getElementsByClassName("tabulator-cell"),e.firstCell=e.styleCells[0],e.lastCell=e.styleCells[e.styleCells.length-1])),e}},{key:"genereateHeaderElement",value:function(e,t,i){var n=this,o=document.createElement("tr");return e.columns.forEach((function(e){if(e){var t=document.createElement("th"),i=e.component._column.definition.cssClass?e.component._column.definition.cssClass.split(" "):[];t.colSpan=e.width,t.rowSpan=e.height,t.innerHTML=e.value,n.cloneTableStyle&&(t.style.boxSizing="border-box"),i.forEach((function(e){t.classList.add(e)})),n.mapElementStyles(e.component.getElement(),t,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),n.mapElementStyles(e.component._column.contentElement,t,["padding-top","padding-left","padding-right","padding-bottom"]),e.component._column.visible?n.mapElementStyles(e.component.getElement(),t,["width"]):e.component._column.definition.width&&(t.style.width=e.component._column.definition.width+"px"),e.component._column.parent&&n.mapElementStyles(e.component._column.parent.groupElement,t,["border-top"]),o.appendChild(t)}})),o}},{key:"genereateGroupElement",value:function(e,t,i){var n=document.createElement("tr"),o=document.createElement("td"),a=e.columns[0];return n.classList.add("tabulator-print-table-row"),t.groupHeader&&t.groupHeader[e.indent]?a.value=t.groupHeader[e.indent](a.value,e.component._group.getRowCount(),e.component._group.getData(),e.component):!1===t.groupHeader?a.value=a.value:a.value=e.component._group.generator(a.value,e.component._group.getRowCount(),e.component._group.getData(),e.component),o.colSpan=a.width,o.innerHTML=a.value,n.classList.add("tabulator-print-table-group"),n.classList.add("tabulator-group-level-"+e.indent),a.component.isVisible()&&n.classList.add("tabulator-group-visible"),this.mapElementStyles(i.firstGroup,n,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(i.firstGroup,o,["padding-top","padding-left","padding-right","padding-bottom"]),n.appendChild(o),n}},{key:"genereateCalcElement",value:function(e,t,i){var n=this.genereateRowElement(e,t,i);return n.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(i.calcRow,n,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),n}},{key:"genereateRowElement",value:function(t,n,o){var a=this,r=document.createElement("tr");return r.classList.add("tabulator-print-table-row"),t.columns.forEach((function(s){if(s){var l=document.createElement("td"),u=s.component._column,c=a.table.columnManager.findColumnIndex(u),h=s.value,d={modules:{},getValue:function(){return h},getField:function(){return u.definition.field},getElement:function(){return l},getColumn:function(){return u.getComponent()},getData:function(){return t.component.getData()},getRow:function(){return t.component},getComponent:function(){return d},column:u};if((u.definition.cssClass?u.definition.cssClass.split(" "):[]).forEach((function(e){l.classList.add(e)})),a.table.modExists("format")&&!1!==a.config.formatCells)h=a.table.modules.format.formatExportValue(d,a.colVisProp);else switch(e(h)){case"object":h=JSON.stringify(h);break;case"undefined":case"null":h="";break;default:h=h}h instanceof Node?l.appendChild(h):l.innerHTML=h,(o.styleCells[c]||o.firstCell)&&(a.mapElementStyles(o.styleCells[c]||o.firstCell,l,["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"]),u.definition.align&&(l.style.textAlign=u.definition.align)),a.table.options.dataTree&&!1!==a.config.dataTree&&(n.treeElementField&&n.treeElementField==u.field||!n.treeElementField&&0==i)&&(t.component._row.modules.dataTree.controlEl&&l.insertBefore(t.component._row.modules.dataTree.controlEl.cloneNode(!0),l.firstChild),t.component._row.modules.dataTree.branchEl&&l.insertBefore(t.component._row.modules.dataTree.branchEl.cloneNode(!0),l.firstChild)),r.appendChild(l),d.modules.format&&d.modules.format.renderedCallback&&d.modules.format.renderedCallback(),n.rowFormatter&&!1!==a.config.formatCells&&n.rowFormatter(t.component)}})),r}},{key:"genereateHTMLTable",value:function(e){var t=document.createElement("div");return t.appendChild(this.genereateTableElement(e)),t.innerHTML}},{key:"getHtml",value:function(e,t,i,n){var o=this.generateExportList(i||this.table.options.htmlOutputConfig,t,e,n||"htmlOutput");return this.genereateHTMLTable(o)}},{key:"mapElementStyles",value:function(e,t,i){if(this.cloneTableStyle&&e&&t){var n={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var o=window.getComputedStyle(e);i.forEach((function(e){t.style[n[e]]=o.getPropertyValue(e)}))}}}}]),s}(N);de.moduleName="export";var me={"=":function(e,t,i,n){return t==e},"<":function(e,t,i,n){return t":function(e,t,i,n){return t>e},">=":function(e,t,i,n){return t>=e},"!=":function(e,t,i,n){return t!=e},regex:function(e,t,i,n){return"string"==typeof e&&(e=new RegExp(e)),e.test(t)},like:function(e,t,i,n){return null==e?t===e:null!=t&&String(t).toLowerCase().indexOf(e.toLowerCase())>-1},keywords:function(e,t,i,n){var o=e.toLowerCase().split(void 0===n.separator?" ":n.separator),a=String(null==t?"":t).toLowerCase(),r=[];return o.forEach((function(e){a.includes(e)&&r.push(!0)})),n.matchAll?r.length===o.length:!!r.length},starts:function(e,t,i,n){return null==e?t===e:null!=t&&String(t).toLowerCase().startsWith(e.toLowerCase())},ends:function(e,t,i,n){return null==e?t===e:null!=t&&String(t).toLowerCase().endsWith(e.toLowerCase())},in:function(e,t,i,n){return Array.isArray(e)?!e.length||e.indexOf(t)>-1:(console.warn("Filter Error - filter value is not an array:",e),!1)}},pe=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).filterList=[],i.headerFilters={},i.headerFilterColumns=[],i.prevHeaderFilterChangeCheck="",i.prevHeaderFilterChangeCheck="{}",i.changed=!1,i.tableInitialized=!1,i.registerTableOption("filterMode","local"),i.registerTableOption("initialFilter",!1),i.registerTableOption("initialHeaderFilter",!1),i.registerTableOption("headerFilterLiveFilterDelay",300),i.registerColumnOption("headerFilter"),i.registerColumnOption("headerFilterPlaceholder"),i.registerColumnOption("headerFilterParams"),i.registerColumnOption("headerFilterEmptyCheck"),i.registerColumnOption("headerFilterFunc"),i.registerColumnOption("headerFilterFuncParams"),i.registerColumnOption("headerFilterLiveFilter"),i.registerTableFunction("searchRows",i.searchRows.bind(l(i))),i.registerTableFunction("searchData",i.searchData.bind(l(i))),i.registerTableFunction("setFilter",i.userSetFilter.bind(l(i))),i.registerTableFunction("refreshFilter",i.userRefreshFilter.bind(l(i))),i.registerTableFunction("addFilter",i.userAddFilter.bind(l(i))),i.registerTableFunction("getFilters",i.getFilters.bind(l(i))),i.registerTableFunction("setHeaderFilterFocus",i.userSetHeaderFilterFocus.bind(l(i))),i.registerTableFunction("getHeaderFilterValue",i.userGetHeaderFilterValue.bind(l(i))),i.registerTableFunction("setHeaderFilterValue",i.userSetHeaderFilterValue.bind(l(i))),i.registerTableFunction("getHeaderFilters",i.getHeaderFilters.bind(l(i))),i.registerTableFunction("removeFilter",i.userRemoveFilter.bind(l(i))),i.registerTableFunction("clearFilter",i.userClearFilter.bind(l(i))),i.registerTableFunction("clearHeaderFilter",i.userClearHeaderFilter.bind(l(i))),i.registerComponentFunction("column","headerFilterFocus",i.setHeaderFilterFocus.bind(l(i))),i.registerComponentFunction("column","reloadHeaderFilter",i.reloadHeaderFilter.bind(l(i))),i.registerComponentFunction("column","getHeaderFilterValue",i.getHeaderFilterValue.bind(l(i))),i.registerComponentFunction("column","setHeaderFilterValue",i.setHeaderFilterValue.bind(l(i))),i}return o(r,[{key:"initialize",value:function(){this.subscribe("column-init",this.initializeColumnHeaderFilter.bind(this)),this.subscribe("column-width-fit-before",this.hideHeaderFilterElements.bind(this)),this.subscribe("column-width-fit-after",this.showHeaderFilterElements.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),"remote"===this.table.options.filterMode&&this.subscribe("data-params",this.remoteFilterParams.bind(this)),this.registerDataHandler(this.filter.bind(this),10)}},{key:"tableBuilt",value:function(){var e=this;this.table.options.initialFilter&&this.setFilter(this.table.options.initialFilter),this.table.options.initialHeaderFilter&&this.table.options.initialHeaderFilter.forEach((function(t){var i=e.table.columnManager.findColumn(t.field);if(!i)return console.warn("Column Filter Error - No matching column found:",t.field),!1;e.setHeaderFilterValue(i,t.value)})),this.tableInitialized=!0}},{key:"remoteFilterParams",value:function(e,t,i,n){return n.filter=this.getFilters(!0,!0),n}},{key:"userSetFilter",value:function(e,t,i,n){this.setFilter(e,t,i,n),this.refreshFilter()}},{key:"userRefreshFilter",value:function(){this.refreshFilter()}},{key:"userAddFilter",value:function(e,t,i,n){this.addFilter(e,t,i,n),this.refreshFilter()}},{key:"userSetHeaderFilterFocus",value:function(e){var t=this.table.columnManager.findColumn(e);if(!t)return console.warn("Column Filter Focus Error - No matching column found:",e),!1;this.setHeaderFilterFocus(t)}},{key:"userGetHeaderFilterValue",value:function(e){var t=this.table.columnManager.findColumn(e);if(t)return this.getHeaderFilterValue(t);console.warn("Column Filter Error - No matching column found:",e)}},{key:"userSetHeaderFilterValue",value:function(e,t){var i=this.table.columnManager.findColumn(e);if(!i)return console.warn("Column Filter Error - No matching column found:",e),!1;this.setHeaderFilterValue(i,t)}},{key:"userRemoveFilter",value:function(e,t,i){this.removeFilter(e,t,i),this.refreshFilter()}},{key:"userClearFilter",value:function(e){this.clearFilter(e),this.refreshFilter()}},{key:"userClearHeaderFilter",value:function(){this.clearHeaderFilter(),this.refreshFilter()}},{key:"searchRows",value:function(e,t,i){return this.search("rows",e,t,i)}},{key:"searchData",value:function(e,t,i){return this.search("data",e,t,i)}},{key:"initializeColumnHeaderFilter",value:function(e){var t=e.definition;t.headerFilter&&(void 0!==t.headerFilterPlaceholder&&t.field&&this.module("localize").setHeaderFilterColumnPlaceholder(t.field,t.headerFilterPlaceholder),this.initializeColumn(e))}},{key:"initializeColumn",value:function(t,i){var n=this,o=t.getField();t.modules.filter={success:function(i){var a,s="input"==t.modules.filter.tagType&&"text"==t.modules.filter.attrType||"textarea"==t.modules.filter.tagType?"partial":"match",l="",u="";if(void 0===t.modules.filter.prevSuccess||t.modules.filter.prevSuccess!==i){if(t.modules.filter.prevSuccess=i,t.modules.filter.emptyFunc(i))delete n.headerFilters[o];else{switch(t.modules.filter.value=i,e(t.definition.headerFilterFunc)){case"string":r.filters[t.definition.headerFilterFunc]?(l=t.definition.headerFilterFunc,a=function(e){var n=t.definition.headerFilterFuncParams||{},o=t.getFieldValue(e);return n="function"==typeof n?n(i,o,e):n,r.filters[t.definition.headerFilterFunc](i,o,e,n)}):console.warn("Header Filter Error - Matching filter function not found: ",t.definition.headerFilterFunc);break;case"function":l=a=function(e){var n=t.definition.headerFilterFuncParams||{},o=t.getFieldValue(e);return n="function"==typeof n?n(i,o,e):n,t.definition.headerFilterFunc(i,o,e,n)}}if(!a)switch(s){case"partial":a=function(e){var n=t.getFieldValue(e);return null!=n&&String(n).toLowerCase().indexOf(String(i).toLowerCase())>-1},l="like";break;default:a=function(e){return t.getFieldValue(e)==i},l="="}n.headerFilters[o]={value:i,func:a,type:l,params:{}}}u=JSON.stringify(n.headerFilters),n.prevHeaderFilterChangeCheck!==u&&(n.prevHeaderFilterChangeCheck=u,n.trackChanges(),n.refreshFilter())}return!0},attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(t)}},{key:"generateHeaderFilterElement",value:function(t,i,n){var o,a,r,s,l,u,c,h=this,d=this,m=t.modules.filter.success,p=t.getField();if(t.modules.filter.headerElement&&t.modules.filter.headerElement.parentNode&&t.contentElement.removeChild(t.modules.filter.headerElement.parentNode),p){switch(t.modules.filter.emptyFunc=t.definition.headerFilterEmptyCheck||function(e){return!e&&"0"!==e&&0!==e},(o=document.createElement("div")).classList.add("tabulator-header-filter"),e(t.definition.headerFilter)){case"string":d.table.modules.edit.editors[t.definition.headerFilter]?(a=d.table.modules.edit.editors[t.definition.headerFilter],"tick"!==t.definition.headerFilter&&"tickCross"!==t.definition.headerFilter||t.definition.headerFilterEmptyCheck||(t.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",t.definition.editor);break;case"function":a=t.definition.headerFilter;break;case"boolean":t.modules.edit&&t.modules.edit.editor?a=t.modules.edit.editor:t.definition.formatter&&d.table.modules.edit.editors[t.definition.formatter]?(a=d.table.modules.edit.editors[t.definition.formatter],"tick"!==t.definition.formatter&&"tickCross"!==t.definition.formatter||t.definition.headerFilterEmptyCheck||(t.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):a=d.table.modules.edit.editors.input}if(a){if(s={getValue:function(){return void 0!==i?i:""},getField:function(){return t.definition.field},getElement:function(){return o},getColumn:function(){return t.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},c="function"==typeof(c=t.definition.headerFilterParams||{})?c.call(d.table,s):c,!(r=a.call(this.table.modules.edit,s,(function(){}),m,(function(){}),c)))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor returned a value of false");if(!(r instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor should return an instance of Node, the editor returned:",r);p?d.langBind("headerFilters|columns|"+t.definition.field,(function(e){r.setAttribute("placeholder",void 0!==e&&e?e:d.langText("headerFilters|default"))})):d.langBind("headerFilters|default",(function(e){r.setAttribute("placeholder",e)})),r.addEventListener("click",(function(e){e.stopPropagation(),r.focus()})),r.addEventListener("focus",(function(e){var t=h.table.columnManager.element.scrollLeft;t!==h.table.rowManager.element.scrollLeft+parseInt(h.table.columnManager.element.style.marginLeft)&&(h.table.rowManager.scrollHorizontal(t),h.table.columnManager.scrollHorizontal(t))})),l=!1,u=function(e){l&&clearTimeout(l),l=setTimeout((function(){m(r.value)}),d.table.options.headerFilterLiveFilterDelay)},t.modules.filter.headerElement=r,t.modules.filter.attrType=r.hasAttribute("type")?r.getAttribute("type").toLowerCase():"",t.modules.filter.tagType=r.tagName.toLowerCase(),!1!==t.definition.headerFilterLiveFilter&&("autocomplete"!==t.definition.headerFilter&&"tickCross"!==t.definition.headerFilter&&("autocomplete"!==t.definition.editor&&"tickCross"!==t.definition.editor||!0!==t.definition.headerFilter)&&(r.addEventListener("keyup",u),r.addEventListener("search",u),"number"==t.modules.filter.attrType&&r.addEventListener("change",(function(e){m(r.value)})),"text"==t.modules.filter.attrType&&"ie"!==this.table.browser&&r.setAttribute("type","search")),"input"!=t.modules.filter.tagType&&"select"!=t.modules.filter.tagType&&"textarea"!=t.modules.filter.tagType||r.addEventListener("mousedown",(function(e){e.stopPropagation()}))),o.appendChild(r),t.contentElement.appendChild(o),n||d.headerFilterColumns.push(t)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",t.definition.title)}},{key:"hideHeaderFilterElements",value:function(){this.headerFilterColumns.forEach((function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="none")}))}},{key:"showHeaderFilterElements",value:function(){this.headerFilterColumns.forEach((function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="")}))}},{key:"setHeaderFilterFocus",value:function(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())}},{key:"getHeaderFilterValue",value:function(e){if(e.modules.filter&&e.modules.filter.headerElement)return e.modules.filter.headerElement.value;console.warn("Column Filter Error - No header filter set on column:",e.getField())}},{key:"setHeaderFilterValue",value:function(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t,!0),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}},{key:"reloadHeaderFilter",value:function(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}},{key:"refreshFilter",value:function(){this.tableInitialized&&("remote"===this.table.options.filterMode?this.reloadData():this.refreshData(!0))}},{key:"trackChanges",value:function(){this.changed=!0,this.dispatch("filter-changed")}},{key:"hasChanged",value:function(){var e=this.changed;return this.changed=!1,e}},{key:"setFilter",value:function(e,t,i,n){this.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:i,params:n}]),this.addFilter(e)}},{key:"addFilter",value:function(e,t,i,n){var o=this,a=!1;Array.isArray(e)||(e=[{field:e,type:t,value:i,params:n}]),e.forEach((function(e){(e=o.findFilter(e))&&(o.filterList.push(e),a=!0)})),a&&this.trackChanges()}},{key:"findFilter",value:function(e){var t;if(Array.isArray(e))return this.findSubFilters(e);var i=!1;return"function"==typeof e.field?i=function(t){return e.field(t,e.type||{})}:r.filters[e.type]?i=(t=this.table.columnManager.getColumnByField(e.field))?function(i){return r.filters[e.type](e.value,t.getFieldValue(i),i,e.params||{})}:function(t){return r.filters[e.type](e.value,t[e.field],t,e.params||{})}:console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=i,!!e.func&&e}},{key:"findSubFilters",value:function(e){var t=this,i=[];return e.forEach((function(e){(e=t.findFilter(e))&&i.push(e)})),!!i.length&&i}},{key:"getFilters",value:function(e,t){var i=[];return e&&(i=this.getHeaderFilters()),t&&i.forEach((function(e){"function"==typeof e.type&&(e.type="function")})),i=i.concat(this.filtersToArray(this.filterList,t))}},{key:"filtersToArray",value:function(e,t){var i=this,n=[];return e.forEach((function(e){var o;Array.isArray(e)?n.push(i.filtersToArray(e,t)):(o={field:e.field,type:e.type,value:e.value},t&&"function"==typeof o.type&&(o.type="function"),n.push(o))})),n}},{key:"getHeaderFilters",value:function(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e}},{key:"removeFilter",value:function(t,i,n){var o=this;Array.isArray(t)||(t=[{field:t,type:i,value:n}]),t.forEach((function(t){var i=-1;(i="object"==e(t.field)?o.filterList.findIndex((function(e){return t===e})):o.filterList.findIndex((function(e){return t.field===e.field&&t.type===e.type&&t.value===e.value})))>-1?o.filterList.splice(i,1):console.warn("Filter Error - No matching filter type found, ignoring: ",t.type)})),this.trackChanges()}},{key:"clearFilter",value:function(e){this.filterList=[],e&&this.clearHeaderFilter(),this.trackChanges()}},{key:"clearHeaderFilter",value:function(){var e=this;this.headerFilters={},this.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach((function(t){void 0!==t.modules.filter.value&&delete t.modules.filter.value,t.modules.filter.prevSuccess=void 0,e.reloadHeaderFilter(t)})),this.trackChanges()}},{key:"search",value:function(e,t,i,n){var o=this,a=[],r=[];return Array.isArray(t)||(t=[{field:t,type:i,value:n}]),t.forEach((function(e){(e=o.findFilter(e))&&r.push(e)})),this.table.rowManager.rows.forEach((function(t){var i=!0;r.forEach((function(e){o.filterRecurse(e,t.getData())||(i=!1)})),i&&a.push("data"===e?t.getData("data"):t.getComponent())})),a}},{key:"filter",value:function(e,t){var i=this,n=[],o=[];return this.subscribedExternal("dataFiltering")&&this.dispatchExternal("dataFiltering",this.getFilters()),"remote"!==this.table.options.filterMode&&(this.filterList.length||Object.keys(this.headerFilters).length)?e.forEach((function(e){i.filterRow(e)&&n.push(e)})):n=e.slice(0),this.subscribedExternal("dataFiltered")&&(n.forEach((function(e){o.push(e.getComponent())})),this.dispatchExternal("dataFiltered",this.getFilters(),o)),n}},{key:"filterRow",value:function(e,t){var i=this,n=!0,o=e.getData();for(var a in this.filterList.forEach((function(e){i.filterRecurse(e,o)||(n=!1)})),this.headerFilters)this.headerFilters[a].func(o)||(n=!1);return n}},{key:"filterRecurse",value:function(e,t){var i=this,n=!1;return Array.isArray(e)?e.forEach((function(e){i.filterRecurse(e,t)&&(n=!0)})):n=e.func(t),n}}]),r}(N);pe.moduleName="filter",pe.filters=me;var fe={plaintext:function(e,t,i){return this.emptyToSpace(this.sanitizeHTML(e.getValue()))},html:function(e,t,i){return e.getValue()},textarea:function(e,t,i){return e.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(e.getValue()))},money:function(e,t,i){var n,o,a,r,s=parseFloat(e.getValue()),l="",u=t.decimal||".",c=t.thousand||",",h=t.negativeSign||"-",d=t.symbol||"",m=!!t.symbolAfter,p=void 0!==t.precision?t.precision:2;if(isNaN(s))return this.emptyToSpace(this.sanitizeHTML(e.getValue()));for(s<0&&(s=Math.abs(s),l=h),n=!1!==p?s.toFixed(p):s,o=(n=String(n).split("."))[0],a=n.length>1?u+n[1]:"",r=/(\d+)(\d{3})/;r.test(o);)o=o.replace(r,"$1"+c+"$2");return m?l+o+a+d:l+d+o+a},link:function(t,i,n){var o=t.getValue(),a=i.urlPrefix||"",r=i.download,s=o,l=document.createElement("a");if(i.labelField&&(s=t.getData()[i.labelField]),i.label)switch(e(i.label)){case"string":s=i.label;break;case"function":s=i.label(t)}if(s){if(i.urlField&&(o=t.getData()[i.urlField]),i.url)switch(e(i.url)){case"string":o=i.url;break;case"function":o=i.url(t)}return l.setAttribute("href",a+o),i.target&&l.setAttribute("target",i.target),i.download&&(r="function"==typeof r?r(t):!0===r?"":r,l.setAttribute("download",r)),l.innerHTML=this.emptyToSpace(this.sanitizeHTML(s)),l}return" "},image:function(t,i,n){var o=document.createElement("img"),a=t.getValue();switch(i.urlPrefix&&(a=i.urlPrefix+t.getValue()),i.urlSuffix&&(a+=i.urlSuffix),o.setAttribute("src",a),e(i.height)){case"number":o.style.height=i.height+"px";break;case"string":o.style.height=i.height}switch(e(i.width)){case"number":o.style.width=i.width+"px";break;case"string":o.style.width=i.width}return o.addEventListener("load",(function(){t.getRow().normalizeHeight()})),o},tickCross:function(e,t,i){var n=e.getValue(),o=e.getElement(),a=t.allowEmpty,r=t.allowTruthy,s=void 0!==t.tickElement?t.tickElement:'',l=void 0!==t.crossElement?t.crossElement:'';return r&&n||!0===n||"true"===n||"True"===n||1===n||"1"===n?(o.setAttribute("aria-checked",!0),s||""):!a||"null"!==n&&""!==n&&null!=n?(o.setAttribute("aria-checked",!1),l||""):(o.setAttribute("aria-checked","mixed"),"")},datetime:function(e,t,i){var n=window.DateTime||luxon.DateTime,o=t.inputFormat||"yyyy-MM-dd HH:mm:ss",a=t.outputFormat||"dd/MM/yyyy HH:mm:ss",r=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",s=e.getValue();if(void 0!==n){var l="iso"===o?n.fromISO(String(s)):n.fromFormat(String(s),o);return l.isValid?(t.timezone&&(l=l.setZone(t.timezone)),l.toFormat(a)):!0!==r&&s?"function"==typeof r?r(s):r:s}console.error("Format Error - 'datetime' formatter is dependant on luxon.js")},datetimediff:function(e,t,i){var n=window.DateTime||luxon.DateTime,o=t.inputFormat||"yyyy-MM-dd HH:mm:ss",a=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",r=void 0!==t.suffix&&t.suffix,s=void 0!==t.unit?t.unit:"days",l=void 0!==t.humanize&&t.humanize,u=void 0!==t.date?t.date:n.now(),c=e.getValue();if(void 0!==n){var h="iso"===o?n.fromISO(String(c)):n.fromFormat(String(c),o);if(!h.isValid)return!0===a?c:"function"==typeof a?a(c):a;if(!l)return parseInt(h.diff(u,s)[s])+(r?" "+r:"")}else console.error("Format Error - 'datetimediff' formatter is dependant on luxon.js")},lookup:function(e,t,i){var n=e.getValue();return void 0===t[n]?(console.warn("Missing display value for "+n),n):t[n]},star:function(e,t,i){var n=e.getValue(),o=e.getElement(),a=t&&t.stars?t.stars:5,r=document.createElement("span"),s=document.createElementNS("http://www.w3.org/2000/svg","svg");r.style.verticalAlign="middle",s.setAttribute("width","14"),s.setAttribute("height","14"),s.setAttribute("viewBox","0 0 512 512"),s.setAttribute("xml:space","preserve"),s.style.padding="0 1px",n=n&&!isNaN(n)?parseInt(n):0,n=Math.max(0,Math.min(n,a));for(var l=1;l<=a;l++){var u=s.cloneNode(!0);u.innerHTML=l<=n?'':'',r.appendChild(u)}return o.style.whiteSpace="nowrap",o.style.overflow="hidden",o.style.textOverflow="ellipsis",o.setAttribute("aria-label",n),r},traffic:function(t,i,n){var o,a,r=this.sanitizeHTML(t.getValue())||0,s=document.createElement("span"),l=i&&i.max?i.max:100,u=i&&i.min?i.min:0,c=i&&void 0!==i.color?i.color:["red","orange","green"],h="#666666";if(!isNaN(r)&&void 0!==t.getValue()){switch(s.classList.add("tabulator-traffic-light"),a=parseFloat(r)<=l?parseFloat(r):l,a=parseFloat(a)>=u?parseFloat(a):u,o=(l-u)/100,a=Math.round((a-u)/o),e(c)){case"string":h=c;break;case"function":h=c(r);break;case"object":if(Array.isArray(c)){var d=100/c.length,m=Math.floor(a/d);m=Math.min(m,c.length-1),h=c[m=Math.max(m,0)];break}}return s.style.backgroundColor=h,s}},progress:function(t,i,n){var o,a,r,s,l,u=this.sanitizeHTML(t.getValue())||0,c=t.getElement(),h=i&&i.max?i.max:100,d=i&&i.min?i.min:0,m=i&&i.legendAlign?i.legendAlign:"center";switch(a=parseFloat(u)<=h?parseFloat(u):h,a=parseFloat(a)>=d?parseFloat(a):d,o=(h-d)/100,a=Math.round((a-d)/o),e(i.color)){case"string":r=i.color;break;case"function":r=i.color(u);break;case"object":if(Array.isArray(i.color)){var p=100/i.color.length,f=Math.floor(a/p);f=Math.min(f,i.color.length-1),f=Math.max(f,0),r=i.color[f];break}default:r="#2DC214"}switch(e(i.legend)){case"string":s=i.legend;break;case"function":s=i.legend(u);break;case"boolean":s=u;break;default:s=!1}switch(e(i.legendColor)){case"string":l=i.legendColor;break;case"function":l=i.legendColor(u);break;case"object":if(Array.isArray(i.legendColor)){p=100/i.legendColor.length,f=Math.floor(a/p);f=Math.min(f,i.legendColor.length-1),f=Math.max(f,0),l=i.legendColor[f]}break;default:l="#000"}c.style.minWidth="30px",c.style.position="relative",c.setAttribute("aria-label",a);var g=document.createElement("div");g.style.display="inline-block",g.style.position="absolute",g.style.width=a+"%",g.style.backgroundColor=r,g.style.height="100%",g.setAttribute("data-max",h),g.setAttribute("data-min",d);var v=document.createElement("div");if(v.style.position="relative",v.style.width="100%",v.style.height="100%",s){var y=document.createElement("div");y.style.position="absolute",y.style.top=0,y.style.left=0,y.style.textAlign=m,y.style.width="100%",y.style.color=l,y.innerHTML=s}return n((function(){if(!(t instanceof b)){var e=document.createElement("div");e.style.position="absolute",e.style.top="4px",e.style.bottom="4px",e.style.left="4px",e.style.right="4px",c.appendChild(e),c=e}c.appendChild(v),v.appendChild(g),s&&v.appendChild(y)})),""},color:function(e,t,i){return e.getElement().style.backgroundColor=this.sanitizeHTML(e.getValue()),""},buttonTick:function(e,t,i){return''},buttonCross:function(e,t,i){return''},rownum:function(e,t,i){return this.table.rowManager.activeRows.indexOf(e.getRow()._getSelf())+1||""},handle:function(e,t,i){return e.getElement().classList.add("tabulator-row-handle"),"
"},responsiveCollapse:function(e,t,i){var n=document.createElement("div"),o=e.getRow()._row.modules.responsiveLayout;function a(e){var t=o.element;o.open=e,t&&(o.open?(n.classList.add("open"),t.style.display=""):(n.classList.remove("open"),t.style.display="none"))}return n.classList.add("tabulator-responsive-collapse-toggle"),n.innerHTML="+-",e.getElement().classList.add("tabulator-row-handle"),n.addEventListener("click",(function(e){e.stopImmediatePropagation(),a(!o.open)})),a(o.open),n},rowSelection:function(e,t,i){var n=this,o=document.createElement("input"),a=!1;if(o.type="checkbox",o.setAttribute("aria-label","Select Row"),this.table.modExists("selectRow",!0))if(o.addEventListener("click",(function(e){e.stopPropagation()})),"function"==typeof e.getRow){var r=e.getRow();r instanceof M?(o.addEventListener("change",(function(e){"click"===n.table.options.selectableRangeMode&&a?a=!1:r.toggleSelect()})),"click"===this.table.options.selectableRangeMode&&o.addEventListener("click",(function(e){a=!0,n.table.modules.selectRow.handleComplexRowClick(r._row,e)})),o.checked=r.isSelected&&r.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(r,o)):o=""}else o.addEventListener("change",(function(e){n.table.modules.selectRow.selectedRows.length?n.table.deselectRow():n.table.selectRow(t.rowRange)})),this.table.modules.selectRow.registerHeaderSelectCheckbox(o);return o}},ge=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).registerColumnOption("formatter"),i.registerColumnOption("formatterParams"),i.registerColumnOption("formatterPrint"),i.registerColumnOption("formatterPrintParams"),i.registerColumnOption("formatterClipboard"),i.registerColumnOption("formatterClipboardParams"),i.registerColumnOption("formatterHtmlOutput"),i.registerColumnOption("formatterHtmlOutputParams"),i.registerColumnOption("titleFormatter"),i.registerColumnOption("titleFormatterParams"),i}return o(r,[{key:"initialize",value:function(){this.subscribe("cell-format",this.formatValue.bind(this)),this.subscribe("cell-rendered",this.cellRendered.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-format",this.formatHeader.bind(this))}},{key:"initializeColumn",value:function(e){e.modules.format=this.lookupFormatter(e,""),void 0!==e.definition.formatterPrint&&(e.modules.format.print=this.lookupFormatter(e,"Print")),void 0!==e.definition.formatterClipboard&&(e.modules.format.clipboard=this.lookupFormatter(e,"Clipboard")),void 0!==e.definition.formatterHtmlOutput&&(e.modules.format.htmlOutput=this.lookupFormatter(e,"HtmlOutput"))}},{key:"lookupFormatter",value:function(t,i){var n={params:t.definition["formatter"+i+"Params"]||{}},o=t.definition["formatter"+i];switch(e(o)){case"string":r.formatters[o]?n.formatter=r.formatters[o]:(console.warn("Formatter Error - No such formatter found: ",o),n.formatter=r.formatters.plaintext);break;case"function":n.formatter=o;break;default:n.formatter=r.formatters.plaintext}return n}},{key:"cellRendered",value:function(e){e.modules.format&&e.modules.format.renderedCallback&&!e.modules.format.rendered&&(e.modules.format.renderedCallback(),e.modules.format.rendered=!0)}},{key:"formatHeader",value:function(e,t,i){var n,o,a,r;return e.definition.titleFormatter?(n=this.getFormatter(e.definition.titleFormatter),a=function(t){e.titleFormatterRendered=t},r={getValue:function(){return t},getElement:function(){return i}},o="function"==typeof(o=e.definition.titleFormatterParams||{})?o():o,n.call(this,r,o,a)):t}},{key:"formatValue",value:function(e){var t=e.getComponent(),i="function"==typeof e.column.modules.format.params?e.column.modules.format.params(t):e.column.modules.format.params;return e.column.modules.format.formatter.call(this,t,i,(function(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1}))}},{key:"formatExportValue",value:function(e,t){var i,n=e.column.modules.format[t];if(n){return i="function"==typeof n.params?n.params(component):n.params,n.formatter.call(this,e.getComponent(),i,(function(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1}))}return this.formatValue(e)}},{key:"sanitizeHTML",value:function(e){if(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=\/]/g,(function(e){return t[e]}))}return e}},{key:"emptyToSpace",value:function(e){return null==e||""===e?" ":e}},{key:"getFormatter",value:function(t){switch(e(t)){case"string":r.formatters[t]?t=r.formatters[t]:(console.warn("Formatter Error - No such formatter found: ",t),t=r.formatters.plaintext);break;case"function":t=t;break;default:t=r.formatters.plaintext}return t}}]),r}(N);ge.moduleName="format",ge.formatters=fe;var ve=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).leftColumns=[],o.rightColumns=[],o.leftMargin=0,o.rightMargin=0,o.rightPadding=0,o.initializationMode="left",o.active=!1,o.scrollEndTimer=!1,o.blocked=!0,o.registerColumnOption("frozen"),o}return o(n,[{key:"reset",value:function(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightMargin=0,this.active=!1,this.table.columnManager.headersElement.style.marginLeft=0,this.table.columnManager.element.style.paddingRight=0}},{key:"initialize",value:function(){this.subscribe("cell-layout",this.layoutCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-width",this.layout.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("table-layout",this.layout.bind(this)),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("columns-loading",this.reset.bind(this)),this.subscribe("table-redraw",this.layout.bind(this)),this.subscribe("layout-refreshing",this.blockLayout.bind(this)),this.subscribe("layout-refreshed",this.unblockLayout.bind(this))}},{key:"blockLayout",value:function(){this.blocked=!0}},{key:"unblockLayout",value:function(){this.blocked=!1}},{key:"layoutCell",value:function(e){this.layoutElement(e.element,e.column)}},{key:"initializeColumn",value:function(e){var t={margin:0,edge:!1};e.isGroup||(this.frozenCheck(e)?(t.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(e):this.rightColumns.unshift(e),this.active=!0,e.modules.frozen=t):this.initializationMode="right")}},{key:"frozenCheck",value:function(e){return e.parent.isGroup&&e.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),e.parent.isGroup?this.frozenCheck(e.parent):e.definition.frozen}},{key:"scrollHorizontal",value:function(){var e,t=this;this.active&&(clearTimeout(this.scrollEndTimer),e=this.table.rowManager.getVisibleRows(),this.calcMargins(!0),this.layoutColumnPosition(),this.layoutCalcRows(),e.forEach((function(e){"row"===e.type&&t.layoutRow(e)})))}},{key:"calcMargins",value:function(e){e||(this.leftMargin=this._calcSpace(this.leftColumns,this.leftColumns.length)+"px",this.rightMargin=this._calcSpace(this.rightColumns,this.rightColumns.length)+"px",this.table.rowManager.tableElement.style.marginRight=this.rightMargin),this.rightPadding=this.table.rowManager.element.clientWidth+this.table.columnManager.scrollLeft}},{key:"layoutCalcRows",value:function(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow),this.table.modExists("groupRows")&&this.layoutGroupCalcs(this.table.modules.groupRows.getGroups()))}},{key:"layoutGroupCalcs",value:function(e){var t=this;e.forEach((function(e){e.calcs.top&&t.layoutRow(e.calcs.top),e.calcs.bottom&&t.layoutRow(e.calcs.bottom),e.groupList&&e.groupList.length&&t.layoutGroupCalcs(e.groupList&&e.groupList)}))}},{key:"layoutColumnPosition",value:function(e){var t=this,i=[],n=0,o=0;this.table.columnManager.headersElement.style.marginLeft=this.leftMargin,this.table.columnManager.element.style.paddingRight=this.rightMargin,this.leftColumns.forEach((function(o,a){if(o.modules.frozen.margin=n+t.table.columnManager.scrollLeft+"px",o.visible&&(n+=o.getWidth()),a==t.leftColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,o.parent.isGroup){var r=t.getColGroupParentElement(o);i.includes(r)||(t.layoutElement(r,o),i.push(r)),o.modules.frozen.edge&&r.classList.add("tabulator-frozen-"+o.modules.frozen.position)}else t.layoutElement(o.getElement(),o);e&&o.cells.forEach((function(e){t.layoutElement(e.getElement(!0),o)}))})),this.rightColumns.forEach((function(i,n){i.visible&&(o+=i.getWidth()),i.modules.frozen.margin=t.rightPadding-o+"px",n==t.rightColumns.length-1?i.modules.frozen.edge=!0:i.modules.frozen.edge=!1,i.parent.isGroup?t.layoutElement(t.getColGroupParentElement(i),i):t.layoutElement(i.getElement(),i),e&&i.cells.forEach((function(e){t.layoutElement(e.getElement(!0),i)}))}))}},{key:"getColGroupParentElement",value:function(e){return e.parent.isGroup?this.getColGroupParentElement(e.parent):e.getElement()}},{key:"layout",value:function(){var e=this;this.active&&!this.blocked&&(this.calcMargins(),this.table.rowManager.getDisplayRows().forEach((function(t){"row"===t.type&&e.layoutRow(t)})),this.layoutCalcRows(),this.layoutColumnPosition(!0))}},{key:"layoutRow",value:function(e){var t=this;e.getElement().style.paddingLeft=this.leftMargin,"fitDataFill"===this.table.options.layout&&this.rightColumns.length&&(this.table.rowManager.getTableElement().style.minWidth="calc(100% - "+this.rightMargin+")"),this.leftColumns.forEach((function(i){var n=e.getCell(i);n&&t.layoutElement(n.getElement(!0),i)})),this.rightColumns.forEach((function(i){var n=e.getCell(i);n&&t.layoutElement(n.getElement(!0),i)}))}},{key:"layoutElement",value:function(e,t){t.modules.frozen&&(e.style.position="absolute",e.style.left=t.modules.frozen.margin,e.classList.add("tabulator-frozen"),t.modules.frozen.edge&&e.classList.add("tabulator-frozen-"+t.modules.frozen.position))}},{key:"_calcSpace",value:function(e,t){for(var i=0,n=0;n-1}},{key:"isFrozen",value:function(){return!!this.rows.length}},{key:"visibleRows",value:function(e,t){return this.rows.forEach((function(e){t.push(e)})),t}},{key:"getRows",value:function(e){var t=e.slice(0);return this.rows.forEach((function(e){var i=t.indexOf(e);i>-1&&t.splice(i,1)})),t}},{key:"freezeRow",value:function(e){e.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(e.modules.frozen=!0,this.topElement.appendChild(e.getElement()),e.initialize(),e.normalizeHeight(),this.table.rowManager.adjustTableSize(),this.rows.push(e),this.refreshData(!1,"display"),this.styleRows())}},{key:"unfreezeRow",value:function(e){this.rows.indexOf(e);e.modules.frozen?(e.modules.frozen=!1,this.detachRow(e),this.table.rowManager.adjustTableSize(),this.refreshData(!1,"display"),this.rows.length&&this.styleRows()):console.warn("Freeze Error - Row is already unfrozen")}},{key:"detachRow",value:function(e){var t=this.rows.indexOf(e);if(t>-1){var i=e.getElement();i.parentNode&&i.parentNode.removeChild(i),this.rows.splice(t,1)}}},{key:"styleRows",value:function(e){var t=this;this.rows.forEach((function(e,i){t.table.rowManager.styleRow(e,i)}))}}]),n}(N);be.moduleName="frozenRows";var ye=function(){function e(i){return t(this,e),this._group=i,this.type="GroupComponent",new Proxy(this,{get:function(e,t,i){return void 0!==e[t]?e[t]:e._group.groupManager.table.componentFunctionBinder.handle("row",e._group,t)}})}return o(e,[{key:"getKey",value:function(){return this._group.key}},{key:"getField",value:function(){return this._group.field}},{key:"getElement",value:function(){return this._group.element}},{key:"getRows",value:function(){return this._group.getRows(!0)}},{key:"getSubGroups",value:function(){return this._group.getSubGroups(!0)}},{key:"getParentGroup",value:function(){return!!this._group.parent&&this._group.parent.getComponent()}},{key:"isVisible",value:function(){return this._group.visible}},{key:"show",value:function(){this._group.show()}},{key:"hide",value:function(){this._group.hide()}},{key:"toggle",value:function(){this._group.toggleVisibility()}},{key:"_getSelf",value:function(){return this._group}},{key:"getTable",value:function(){return this._group.groupManager.table}}]),e}(),we=function(){function e(i,n,o,a,r,s,l){t(this,e),this.groupManager=i,this.parent=n,this.key=a,this.level=o,this.field=r,this.hasSubGroups=o-1?i?this.rows.splice(o+1,0,e):this.rows.splice(o,0,e):i?this.rows.push(e):this.rows.unshift(e),e.modules.group=this,this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)}},{key:"scrollHeader",value:function(e){this.arrowElement&&(this.arrowElement.style.marginLeft=e,this.groupList.forEach((function(t){t.scrollHeader(e)})))}},{key:"getRowIndex",value:function(e){}},{key:"conformRowData",value:function(e){return this.field?e[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(e=this.parent.conformRowData(e)),e}},{key:"removeRow",value:function(e){var t=this.rows.indexOf(e),i=e.getElement();t>-1&&this.rows.splice(t,1),this.groupManager.table.options.groupValues||this.rows.length?(i.parentNode&&i.parentNode.removeChild(i),this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))}},{key:"removeGroup",value:function(e){var t,i=e.level+"_"+e.key;this.groups[i]&&(delete this.groups[i],(t=this.groupList.indexOf(e))>-1&&this.groupList.splice(t,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))}},{key:"getHeadersAndRows",value:function(e){var t=[];return t.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach((function(i){t=t.concat(i.getHeadersAndRows(e))})):(!e&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top)),t=t.concat(this.rows),!e&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(!e&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top))),!e&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom)))),t}},{key:"getData",value:function(e,t){var i=[];return this._visSet(),(!e||e&&this.visible)&&this.rows.forEach((function(e){i.push(e.getData(t||"data"))})),i}},{key:"getRowCount",value:function(){var e=0;return this.groupList.length?this.groupList.forEach((function(t){e+=t.getRowCount()})):e=this.rows.length,e}},{key:"toggleVisibility",value:function(){this.visible?this.hide():this.show()}},{key:"hide",value:function(){this.visible=!1,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination?this.groupManager.updateGroupRows(!0):(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach((function(e){e.getHeadersAndRows().forEach((function(e){e.detachElement()}))})):this.rows.forEach((function(e){var t=e.getElement();t.parentNode.removeChild(t)})),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()),this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!1)}},{key:"show",value:function(){if(this.visible=!0,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var e=this.generateElement();this.groupList.length?this.groupList.forEach((function(t){t.getHeadersAndRows().forEach((function(t){var i=t.getElement();e.parentNode.insertBefore(i,e.nextSibling),t.initialize(),e=i}))})):this.rows.forEach((function(t){var i=t.getElement();e.parentNode.insertBefore(i,e.nextSibling),t.initialize(),e=i})),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()}this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!0)}},{key:"_visSet",value:function(){var e=[];"function"==typeof this.visible&&(this.rows.forEach((function(t){e.push(t.getData())})),this.visible=this.visible(this.key,this.getRowCount(),e,this.getComponent()))}},{key:"getRowGroup",value:function(e){var t=!1;return this.groupList.length?this.groupList.forEach((function(i){var n=i.getRowGroup(e);n&&(t=n)})):this.rows.find((function(t){return t===e}))&&(t=this),t}},{key:"getSubGroups",value:function(e){var t=[];return this.groupList.forEach((function(i){t.push(e?i.getComponent():i)})),t}},{key:"getRows",value:function(e){var t=[];return this.rows.forEach((function(i){t.push(e?i.getComponent():i)})),t}},{key:"generateGroupHeaderContents",value:function(){var e=[];for(this.rows.forEach((function(t){e.push(t.getData())})),this.elementContents=this.generator(this.key,this.getRowCount(),e,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)}},{key:"getPath",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.unshift(this.key),this.parent&&this.parent.getPath(e),e}},{key:"getElement",value:function(){return this.elementContents?this.element:this.generateElement()}},{key:"generateElement",value:function(){this.addBindings=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var e=0;en.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),this.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],this.langBind("groups|item",(function(t,i){e.headerGenerator[0]=function(e,n,o){return(void 0===e?"":e)+"("+n+" "+(1===n?t:i.groups.items)+")"}})),this.groupIDLookups=[],Array.isArray(t)||t)this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs)this.table.columnManager.getRealColumns().forEach((function(t){t.definition.topCalc&&e.table.modules.columnCalcs.initializeTopRow(),t.definition.bottomCalc&&e.table.modules.columnCalcs.initializeBottomRow()}));Array.isArray(t)||(t=[t]),t.forEach((function(t,i){var n,o;n="function"==typeof t?t:(o=e.table.columnManager.getColumnByField(t))?function(e){return o.getFieldValue(e)}:function(e){return e[t]},e.groupIDLookups.push({field:"function"!=typeof t&&t,func:n,values:!!e.allowedValues&&e.allowedValues[i]})})),i&&(Array.isArray(i)||(i=[i]),i.forEach((function(e){})),this.startOpen=i),n&&(this.headerGenerator=Array.isArray(n)?n:[n])}}},{key:"rowSample",value:function(e,t){var i=this.getGroups(!1)[0];return t.push(i.getRows(!1)[0]),t}},{key:"virtualRenderFill",value:function(){var e=this.table.rowManager.tableElement,t=this.table.rowManager.getVisibleRows();t=t.filter((function(e){return"group"!==e.type})),e.style.minWidth=t.length?"":this.table.columnManager.getWidth()+"px"}},{key:"rowAddingIndex",value:function(e,t,i){this.assignRowToGroup(e);var n=e.modules.group.rows;return n.length>1&&(!t||t&&-1==n.indexOf(t)?i?n[0]!==e&&(t=n[0],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)):n[n.length-1]!==e&&(t=n[n.length-1],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)):this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)),t}},{key:"trackChanges",value:function(){this.dispatch("group-changed")}},{key:"setGroupBy",value:function(e){this.table.options.groupBy=e,this.initialized?this.configureGroupSetup():this.initialize(),this.refreshData(),this.trackChanges()}},{key:"setGroupValues",value:function(e){this.table.options.groupValues=e,this.configureGroupSetup(),this.refreshData(),this.trackChanges()}},{key:"setGroupStartOpen",value:function(e){this.table.options.groupStartOpen=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}},{key:"setGroupHeader",value:function(e){this.table.options.groupHeader=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}},{key:"userGetGroups",value:function(e){return this.getGroups(!0)}},{key:"userGetGroupedData",value:function(){return this.table.options.groupBy?this.getGroupedData():this.getData()}},{key:"rowGetGroup",value:function(e){return!!e.modules.group&&e.modules.group.getComponent()}},{key:"rowMoving",value:function(e,t,i){!i&&t instanceof we&&(t=this.table.rowManager.prevDisplayRow(e)||t);var n=t instanceof we?t:t.modules.group,o=e instanceof we?e:e.modules.group;n===o?this.table.rowManager.moveRowInArray(n.rows,e,t,i):(o&&o.removeRow(e),n.insertRow(e,t,i))}},{key:"rowDeleting",value:function(e){e.modules.group&&e.modules.group.removeRow(e)}},{key:"rowsUpdated",value:function(e){this.updateGroupRows(!0)}},{key:"cellUpdated",value:function(e){this.reassignRowToGroup(e.row)}},{key:"setDisplayIndex",value:function(e){this.displayIndex=e}},{key:"getDisplayIndex",value:function(){return this.displayIndex}},{key:"getRows",value:function(e){return this.table.options.groupBy&&this.groupIDLookups.length?(this.dispatchExternal("dataGrouping"),this.generateGroups(e),this.subscribedExternal("dataGrouped")&&this.dispatchExternal("dataGrouped",this.getGroups(!0)),this.updateGroupRows()):e.slice(0)}},{key:"getGroups",value:function(e){var t=[];return this.groupList.forEach((function(i){t.push(e?i.getComponent():i)})),t}},{key:"getChildGroups",value:function(e){var t=this,i=[];return e||(e=this),e.groupList.forEach((function(e){e.groupList.length?i=i.concat(t.getChildGroups(e)):i.push(e)})),i}},{key:"wipe",value:function(){this.groupList.forEach((function(e){e.wipe()}))}},{key:"pullGroupListData",value:function(e){var t=this,i=[];return e.forEach((function(e){var n={level:0,rowCount:0,headerContent:""},o=[];e.hasSubGroups?(o=t.pullGroupListData(e.groupList),n.level=e.level,n.rowCount=o.length-e.groupList.length,n.headerContent=e.generator(e.key,n.rowCount,e.rows,e),i.push(n),i=i.concat(o)):(n.level=e.level,n.headerContent=e.generator(e.key,e.rows.length,e.rows,e),n.rowCount=e.getRows().length,i.push(n),e.getRows().forEach((function(e){i.push(e.getData("data"))})))})),i}},{key:"getGroupedData",value:function(){return this.pullGroupListData(this.groupList)}},{key:"getRowGroup",value:function(e){var t=!1;return this.groupList.forEach((function(i){var n=i.getRowGroup(e);n&&(t=n)})),t}},{key:"countGroups",value:function(){return this.groupList.length}},{key:"generateGroups",value:function(e){var t=this,i=this.groups;this.groups={},this.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach((function(e){t.createGroup(e,0,i)})),e.forEach((function(e){t.assignRowToExistingGroup(e,i)}))):e.forEach((function(e){t.assignRowToGroup(e,i)}))}},{key:"createGroup",value:function(e,t,i){var n,o=t+"_"+e;i=i||[],n=new we(this,!1,t,e,this.groupIDLookups[0].field,this.headerGenerator[0],i[o]),this.groups[o]=n,this.groupList.push(n)}},{key:"assignRowToExistingGroup",value:function(e,t){var i="0_"+this.groupIDLookups[0].func(e.getData());this.groups[i]&&this.groups[i].addRow(e)}},{key:"assignRowToGroup",value:function(e,t){var i=this.groupIDLookups[0].func(e.getData()),n=!this.groups["0_"+i];return n&&this.createGroup(i,0,t),this.groups["0_"+i].addRow(e),!n}},{key:"reassignRowToGroup",value:function(e){if("row"===e.type){var t=e.modules.group,i=t.getPath(),n=this.getExpectedPath(e);i.length==n.length&&i.every((function(e,t){return e===n[t]}))||(t.removeRow(e),this.assignRowToGroup(e,this.groups),this.refreshData(!0))}}},{key:"getExpectedPath",value:function(e){var t=[],i=e.getData();return this.groupIDLookups.forEach((function(e){t.push(e.func(i))})),t}},{key:"updateGroupRows",value:function(e){var t=[];return this.groupList.forEach((function(e){t=t.concat(e.getHeadersAndRows())})),e&&this.refreshData(!0,this.displayHandler),t}},{key:"scrollHeaders",value:function(e){"virtual"===this.table.options.renderHorizontal&&(e-=this.table.columnManager.renderer.vDomPadLeft),e+="px",this.groupList.forEach((function(t){t.scrollHeader(e)}))}},{key:"removeGroup",value:function(e){var t,i=e.level+"_"+e.key;this.groups[i]&&(delete this.groups[i],(t=this.groupList.indexOf(e))>-1&&this.groupList.splice(t,1))}}]),n}(N);Ce.moduleName="groupRows";var ke=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).history=[],o.index=-1,o.registerTableOption("history",!1),o}return o(n,[{key:"initialize",value:function(){this.table.options.history&&(this.subscribe("cell-value-updated",this.cellUpdated.bind(this)),this.subscribe("cell-delete",this.clearComponentHistory.bind(this)),this.subscribe("row-delete",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clear.bind(this)),this.subscribe("row-added",this.rowAdded.bind(this)),this.subscribe("row-move",this.rowMoved.bind(this))),this.registerTableFunction("undo",this.undo.bind(this)),this.registerTableFunction("redo",this.redo.bind(this)),this.registerTableFunction("getHistoryUndoSize",this.getHistoryUndoSize.bind(this)),this.registerTableFunction("getHistoryRedoSize",this.getHistoryRedoSize.bind(this)),this.registerTableFunction("clearHistory",this.clear.bind(this))}},{key:"rowMoved",value:function(e,t,i){this.action("rowMove",e,{posFrom:this.table.rowManager.getRowPosition(e),posTo:this.table.rowManager.getRowPosition(t),to:t,after:i})}},{key:"rowAdded",value:function(e,t,i,n){this.action("rowAdd",e,{data:t,pos:i,index:n})}},{key:"rowDeleted",value:function(e){var t,i;this.table.options.groupBy?(t=(i=e.getComponent().getGroup().rows).indexOf(e))&&(t=i[t-1]):(t=e.table.rowManager.getRowIndex(e))&&(t=e.table.rowManager.rows[t-1]),this.action("rowDelete",e,{data:e.getData(),pos:!t,index:t})}},{key:"cellUpdated",value:function(e){this.action("cellEdit",e,{oldValue:e.oldValue,newValue:e.value})}},{key:"clear",value:function(){this.history=[],this.index=-1}},{key:"action",value:function(e,t,i){this.history=this.history.slice(0,this.index+1),this.history.push({type:e,component:t,data:i}),this.index++}},{key:"getHistoryUndoSize",value:function(){return this.index+1}},{key:"getHistoryRedoSize",value:function(){return this.history.length-(this.index+1)}},{key:"clearComponentHistory",value:function(e){var t=this.history.findIndex((function(t){return t.component===e}));t>-1&&(this.history.splice(t,1),t<=this.index&&this.index--,this.clearComponentHistory(e))}},{key:"undo",value:function(){if(this.index>-1){var e=this.history[this.index];return n.undoers[e.type].call(this,e),this.index--,this.dispatchExternal("historyUndo",e.type,e.component.getComponent(),e.data),!0}return console.warn("History Undo Error - No more history to undo"),!1}},{key:"redo",value:function(){if(this.history.length-1>this.index){this.index++;var e=this.history[this.index];return n.redoers[e.type].call(this,e),this.dispatchExternal("historyRedo",e.type,e.component.getComponent(),e.data),!0}return console.warn("History Redo Error - No more history to redo"),!1}},{key:"_rebindRow",value:function(e,t){this.history.forEach((function(i){if(i.component instanceof L)i.component===e&&(i.component=t);else if(i.component instanceof y&&i.component.row===e){var n=i.component.column.getField();n&&(i.component=t.getCell(n))}}))}}]),n}(N);ke.moduleName="history",ke.undoers={cellEdit:function(e){e.component.setValueProcessData(e.data.oldValue),e.component.cellRendered()},rowAdd:function(e){e.component.deleteActual()},rowDelete:function(e){var t=this.table.rowManager.addRowActual(e.data.data,e.data.pos,e.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(e.component,t)},rowMove:function(e){this.table.rowManager.moveRowActual(e.component,this.table.rowManager.rows[e.data.posFrom],!e.data.after),this.table.rowManager.redraw()}},ke.redoers={cellEdit:function(e){e.component.setValueProcessData(e.data.newValue),e.component.cellRendered()},rowAdd:function(e){var t=this.table.rowManager.addRowActual(e.data.data,e.data.pos,e.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(e.component,t)},rowDelete:function(e){e.component.deleteActual()},rowMove:function(e){this.table.rowManager.moveRowActual(e.component,this.table.rowManager.rows[e.data.posTo],e.data.after),this.table.rowManager.redraw()}};var Ee=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).fieldIndex=[],i.hasIndex=!1,i}return o(r,[{key:"initialize",value:function(){this.tableElementCheck()}},{key:"tableElementCheck",value:function(){this.table.originalElement&&"TABLE"===this.table.originalElement.tagName&&this.parseTable()}},{key:"parseTable",value:function(){var e=this.table.originalElement,t=this.table.options,i=(t.columns,e.getElementsByTagName("th")),n=e.getElementsByTagName("tbody")[0],o=[];this.hasIndex=!1,this.dispatchExternal("htmlImporting"),n=n?n.getElementsByTagName("tr"):[],this._extractOptions(e,t),i.length?this._extractHeaders(i,n):this._generateBlankHeaders(i,n);for(var a=0;a-1&&e.pressedKeys.splice(n,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)}},{key:"clearBindings",value:function(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)}},{key:"checkBinding",value:function(e,t){var i=this,n=!0;return e.ctrlKey==t.ctrl&&e.shiftKey==t.shift&&e.metaKey==t.meta&&(t.keys.forEach((function(e){-1==i.pressedKeys.indexOf(e)&&(n=!1)})),n&&t.action.call(this,e),!0)}}]),r}(N);Me.moduleName="keybindings",Me.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:["ctrl + 90","meta + 90"],redo:["ctrl + 89","meta + 89"],copyToClipboard:["ctrl + 67","meta + 89"]},Me.actions={keyBlock:function(e){e.stopPropagation(),e.preventDefault()},scrollPageUp:function(e){var t=this.table.rowManager,i=t.scrollTop-t.element.clientHeight;t.element.scrollHeight;e.preventDefault(),t.displayRowsCount&&(i>=0?t.element.scrollTop=i:t.scrollToRow(t.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(e){var t=this.table.rowManager,i=t.scrollTop+t.element.clientHeight,n=t.element.scrollHeight;e.preventDefault(),t.displayRowsCount&&(i<=n?t.element.scrollTop=i:t.scrollToRow(t.getDisplayRows()[t.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(e){var t=this.table.rowManager;e.preventDefault(),t.displayRowsCount&&t.scrollToRow(t.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(e){var t=this.table.rowManager;e.preventDefault(),t.displayRowsCount&&t.scrollToRow(t.getDisplayRows()[t.displayRowsCount-1]),this.table.element.focus()},navPrev:function(e){this.dispatch("keybinding-nav-prev",e)},navNext:function(e){this.dispatch("keybinding-nav-next",e)},navLeft:function(e){this.dispatch("keybinding-nav-left",e)},navRight:function(e){this.dispatch("keybinding-nav-right",e)},navUp:function(e){this.dispatch("keybinding-nav-up",e)},navDown:function(e){this.dispatch("keybinding-nav-down",e)},undo:function(e){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(e.preventDefault(),this.table.modules.history.undo()))},redo:function(e){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(e.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(e){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}};var Le=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).menuContainer=null,o.menuElements=[],o.blurEvent=o.hideMenu.bind(l(o)),o.escEvent=o.escMenu.bind(l(o)),o.nestedMenuBlock=!1,o.positionReversedX=!1,o.currentComponent=null,o.columnSubscribers={},o.registerTableOption("rowContextMenu",!1),o.registerTableOption("rowClickMenu",!1),o.registerTableOption("groupContextMenu",!1),o.registerTableOption("groupClickMenu",!1),o.registerTableOption("menuContainer",!1),o.registerColumnOption("headerContextMenu"),o.registerColumnOption("headerClickMenu"),o.registerColumnOption("headerMenu"),o.registerColumnOption("contextMenu"),o.registerColumnOption("clickMenu"),o}return o(n,[{key:"initialize",value:function(){this.lookupMenuContainer(),this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}},{key:"lookupMenuContainer",value:function(){this.menuContainer=this.table.options.menuContainer,"string"==typeof this.menuContainer?(this.menuContainer=document.querySelector(this.menuContainer),this.menuContainer||console.warn("Menu Error - no container element found matching selector:",this.table.options.menuContainer,"(defaulting to document body)")):!0===this.menuContainer&&(this.menuContainer=this.table.element),this.menuContainer&&!this.checkMenuContainerIsParent(this.menuContainer)&&(this.menuContainer=!1,console.warn("Menu Error - container element does not contain this table:",this.table.options.menuContainer,"(defaulting to document body)")),this.menuContainer||(this.menuContainer=document.body)}},{key:"checkMenuContainerIsParent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.table.element;return e===t||!!t.parentNode&&this.checkMenuContainerIsParent(e,t.parentNode)}},{key:"initializeRowWatchers",value:function(){this.table.options.rowContextMenu&&(this.subscribe("row-contextmenu",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu)),this.table.on("rowTapHold",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu))),this.table.options.rowClickMenu&&this.subscribe("row-click",this.loadMenuEvent.bind(this,this.table.options.rowClickMenu))}},{key:"initializeGroupWatchers",value:function(){this.table.options.groupContextMenu&&(this.subscribe("group-contextmenu",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu)),this.table.on("groupTapHold",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu))),this.table.options.groupClickMenu&&this.subscribe("group-click",this.loadMenuEvent.bind(this,this.table.options.groupClickMenu))}},{key:"initializeColumn",value:function(e){var t=e.definition;t.headerContextMenu&&!this.columnSubscribers.headerContextMenu&&(this.columnSubscribers.headerContextMenu=this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextMenu),this.table.on("headerTapHold",this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"))),t.headerClickMenu&&!this.columnSubscribers.headerClickMenu&&(this.columnSubscribers.headerClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerClickMenu"),this.subscribe("column-click",this.columnSubscribers.headerClickMenu)),t.headerMenu&&this.initializeColumnHeaderMenu(e),t.contextMenu&&!this.columnSubscribers.contextMenu&&(this.columnSubscribers.contextMenu=this.loadMenuTableCellEvent.bind(this,"contextMenu"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextMenu),this.table.on("cellTapHold",this.loadMenuTableCellEvent.bind(this,"contextMenu"))),t.clickMenu&&!this.columnSubscribers.clickMenu&&(this.columnSubscribers.clickMenu=this.loadMenuTableCellEvent.bind(this,"clickMenu"),this.subscribe("cell-click",this.columnSubscribers.clickMenu))}},{key:"initializeColumnHeaderMenu",value:function(e){var t,i=this;(t=document.createElement("span")).classList.add("tabulator-header-menu-button"),t.innerHTML="⋮",t.addEventListener("click",(function(t){t.stopPropagation(),t.preventDefault(),i.loadMenuEvent(e.definition.headerMenu,t,e)})),e.titleElement.insertBefore(t,e.titleElement.firstChild)}},{key:"loadMenuTableCellEvent",value:function(e,t,i){i._cell&&(i=i._cell),i.column.definition[e]&&this.loadMenuEvent(i.column.definition[e],t,i)}},{key:"loadMenuTableColumnEvent",value:function(e,t,i){i._column&&(i=i._column),i.definition[e]&&this.loadMenuEvent(i.definition[e],t,i)}},{key:"loadMenuEvent",value:function(e,t,i){i._group?i=i._group:i._row&&(i=i._row),e="function"==typeof e?e.call(this.table,i.getComponent(),t):e,this.loadMenu(t,i,e)}},{key:"loadMenu",value:function(e,t,i,n){var o=this,a=!(e instanceof MouseEvent),r=document.createElement("div");if(r.classList.add("tabulator-menu"),a||e.preventDefault(),i&&i.length){if(!n){if(this.nestedMenuBlock){if(this.isOpen())return}else this.nestedMenuBlock=setTimeout((function(){o.nestedMenuBlock=!1}),100);this.hideMenu(),this.menuElements=[]}i.forEach((function(e){var i=document.createElement("div"),n=e.label,a=e.disabled;e.separator?i.classList.add("tabulator-menu-separator"):(i.classList.add("tabulator-menu-item"),"function"==typeof n&&(n=n.call(o.table,t.getComponent())),n instanceof Node?i.appendChild(n):i.innerHTML=n,"function"==typeof a&&(a=a.call(o.table,t.getComponent())),a?(i.classList.add("tabulator-menu-item-disabled"),i.addEventListener("click",(function(e){e.stopPropagation()}))):e.menu&&e.menu.length?i.addEventListener("click",(function(n){n.stopPropagation(),o.hideOldSubMenus(r),o.loadMenu(n,t,e.menu,i)})):e.action&&i.addEventListener("click",(function(i){e.action(i,t.getComponent())})),e.menu&&e.menu.length&&i.classList.add("tabulator-menu-item-submenu")),r.appendChild(i)})),r.addEventListener("click",(function(e){o.hideMenu()})),this.menuElements.push(r),this.positionMenu(r,n,a,e),this.currentComponent=t,this.dispatchExternal("menuOpened",t.getComponent())}}},{key:"hideOldSubMenus",value:function(e){var t=this.menuElements.indexOf(e);if(t>-1)for(var i=this.menuElements.length-1;i>t;i--){var n=this.menuElements[i];n.parentNode&&n.parentNode.removeChild(n),this.menuElements.pop()}}},{key:"positionMenu",value:function(e,t,i,n){var o,a,r,s=this;t?(o=(r=C.elOffset(t)).left+t.offsetWidth,a=r.top-1):(o=i?n.touches[0].pageX:n.pageX,a=i?n.touches[0].pageY:n.pageY,this.menuContainer!==document.body&&(o-=(r=C.elOffset(this.menuContainer)).left,a-=r.top),this.positionReversedX=!1),e.style.top=a+"px",e.style.left=o+"px",setTimeout((function(){s.table.rowManager.element.addEventListener("scroll",s.blurEvent),s.subscribe("cell-editing",s.blurEvent),document.body.addEventListener("click",s.blurEvent),document.body.addEventListener("contextmenu",s.blurEvent),window.addEventListener("resize",s.blurEvent),document.body.addEventListener("keydown",s.escEvent)}),100),this.menuContainer.appendChild(e),(o+e.offsetWidth>=this.menuContainer.offsetWidth||this.positionReversedX)&&(e.style.left="",e.style.right=t?this.menuContainer.offsetWidth-r.left+"px":this.menuContainer.offsetWidth-o+"px",this.positionReversedX=!0),a+e.offsetHeight>this.menuContainer.offsetHeight&&(e.style.top=t?parseInt(e.style.top)-e.offsetHeight+t.offsetHeight+1+"px":parseInt(e.style.top)-e.offsetHeight+"px")}},{key:"isOpen",value:function(){return!!this.menuElements.length}},{key:"escMenu",value:function(e){27==e.keyCode&&this.hideMenu()}},{key:"hideMenu",value:function(){this.menuElements.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)})),document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.unsubscribe("cell-editing",this.blurEvent),this.currentComponent&&(this.dispatchExternal("menuClosed",this.currentComponent.getComponent()),this.currentComponent=null)}}]),n}(N);Le.moduleName="menu";var De=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).placeholderElement=o.createPlaceholderElement(),o.hoverElement=!1,o.checkTimeout=!1,o.checkPeriod=250,o.moving=!1,o.toCol=!1,o.toColAfter=!1,o.startX=0,o.autoScrollMargin=40,o.autoScrollStep=5,o.autoScrollTimeout=!1,o.touchMove=!1,o.moveHover=o.moveHover.bind(l(o)),o.endMove=o.endMove.bind(l(o)),o.registerTableOption("movableColumns",!1),o}return o(n,[{key:"createPlaceholderElement",value:function(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.classList.add("tabulator-col-placeholder"),e}},{key:"initialize",value:function(){this.table.options.movableColumns&&this.subscribe("column-init",this.initializeColumn.bind(this))}},{key:"initializeColumn",value:function(e){var t,i=this,n={};e.modules.frozen||(t=e.getElement(),n.mousemove=function(n){e.parent===i.moving.parent&&((i.touchMove?n.touches[0].pageX:n.pageX)-C.elOffset(t).left+i.table.columnManager.element.scrollLeft>e.getWidth()/2?i.toCol===e&&i.toColAfter||(t.parentNode.insertBefore(i.placeholderElement,t.nextSibling),i.moveColumn(e,!0)):(i.toCol!==e||i.toColAfter)&&(t.parentNode.insertBefore(i.placeholderElement,t),i.moveColumn(e,!1)))}.bind(i),t.addEventListener("mousedown",(function(t){i.touchMove=!1,1===t.which&&(i.checkTimeout=setTimeout((function(){i.startMove(t,e)}),i.checkPeriod))})),t.addEventListener("mouseup",(function(e){1===e.which&&i.checkTimeout&&clearTimeout(i.checkTimeout)})),i.bindTouchEvents(e)),e.modules.moveColumn=n}},{key:"bindTouchEvents",value:function(e){var t,i,n,o,a,r,s=this,l=e.getElement(),u=!1;l.addEventListener("touchstart",(function(l){s.checkTimeout=setTimeout((function(){s.touchMove=!0,t=e.nextColumn(),n=t?t.getWidth()/2:0,i=e.prevColumn(),o=i?i.getWidth()/2:0,a=0,r=0,u=!1,s.startMove(l,e)}),s.checkPeriod)}),{passive:!0}),l.addEventListener("touchmove",(function(l){var c,h;s.moving&&(s.moveHover(l),u||(u=l.touches[0].pageX),(c=l.touches[0].pageX-u)>0?t&&c-a>n&&(h=t)!==e&&(u=l.touches[0].pageX,h.getElement().parentNode.insertBefore(s.placeholderElement,h.getElement().nextSibling),s.moveColumn(h,!0)):i&&-c-r>o&&(h=i)!==e&&(u=l.touches[0].pageX,h.getElement().parentNode.insertBefore(s.placeholderElement,h.getElement()),s.moveColumn(h,!1)),h&&(t=h.nextColumn(),a=n,n=t?t.getWidth()/2:0,i=h.prevColumn(),r=o,o=i?i.getWidth()/2:0))}),{passive:!0}),l.addEventListener("touchend",(function(e){s.checkTimeout&&clearTimeout(s.checkTimeout),s.moving&&s.endMove(e)}))}},{key:"startMove",value:function(e,t){var i=t.getElement(),n=this.table.columnManager.getElement(),o=this.table.columnManager.getHeadersElement();this.moving=t,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-C.elOffset(i).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.table.columnManager.getElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom=n.clientHeight-o.offsetHeight+"px",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(e)}},{key:"_bindMouseMove",value:function(){this.table.columnManager.columnsByIndex.forEach((function(e){e.modules.moveColumn.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveColumn.mousemove)}))}},{key:"_unbindMouseMove",value:function(){this.table.columnManager.columnsByIndex.forEach((function(e){e.modules.moveColumn.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveColumn.mousemove)}))}},{key:"moveColumn",value:function(e,t){var i=this.moving.getCells();this.toCol=e,this.toColAfter=t,t?e.getCells().forEach((function(e,t){var n=e.getElement(!0);n.parentNode&&i[t]&&n.parentNode.insertBefore(i[t].getElement(),n.nextSibling)})):e.getCells().forEach((function(e,t){var n=e.getElement(!0);n.parentNode&&i[t]&&n.parentNode.insertBefore(i[t].getElement(),n)}))}},{key:"endMove",value:function(e){(1===e.which||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))}},{key:"moveHover",value:function(e){var t,i=this,n=this.table.columnManager.getElement(),o=n.scrollLeft,a=(this.touchMove?e.touches[0].pageX:e.pageX)-C.elOffset(n).left+o;this.hoverElement.style.left=a-this.startX+"px",a-oe.getHeight()/2?t.toRow===e&&t.toRowAfter||((n=e.getElement()).parentNode.insertBefore(t.placeholderElement,n.nextSibling),t.moveRow(e,!0)):(t.toRow!==e||t.toRowAfter)&&(n=e.getElement()).previousSibling&&(n.parentNode.insertBefore(t.placeholderElement,n),t.moveRow(e,!1))}.bind(t),e.modules.moveRow=i}},{key:"initializeRow",value:function(e){var t,i=this,n={};n.mouseup=function(t){i.tableRowDrop(t,e)}.bind(i),n.mousemove=function(t){var n=e.getElement();t.pageY-C.elOffset(n).top+i.table.rowManager.element.scrollTop>e.getHeight()/2?i.toRow===e&&i.toRowAfter||(n.parentNode.insertBefore(i.placeholderElement,n.nextSibling),i.moveRow(e,!0)):(i.toRow!==e||i.toRowAfter)&&(n.parentNode.insertBefore(i.placeholderElement,n),i.moveRow(e,!1))}.bind(i),this.hasHandle||((t=e.getElement()).addEventListener("mousedown",(function(t){1===t.which&&(i.checkTimeout=setTimeout((function(){i.startMove(t,e)}),i.checkPeriod))})),t.addEventListener("mouseup",(function(e){1===e.which&&i.checkTimeout&&clearTimeout(i.checkTimeout)})),this.bindTouchEvents(e,e.getElement())),e.modules.moveRow=n}},{key:"initializeColumn",value:function(e){e.definition.rowHandle&&!1!==this.table.options.movableRows&&(this.hasHandle=!0)}},{key:"initializeCell",value:function(e){if(e.column.definition.rowHandle&&!1!==this.table.options.movableRows){var t=this,i=e.getElement(!0);i.addEventListener("mousedown",(function(i){1===i.which&&(t.checkTimeout=setTimeout((function(){t.startMove(i,e.row)}),t.checkPeriod))})),i.addEventListener("mouseup",(function(e){1===e.which&&t.checkTimeout&&clearTimeout(t.checkTimeout)})),this.bindTouchEvents(e.row,i)}}},{key:"bindTouchEvents",value:function(e,t){var i,n,o,a,r,s,l=this,u=!1;t.addEventListener("touchstart",(function(t){l.checkTimeout=setTimeout((function(){l.touchMove=!0,i=e.nextRow(),o=i?i.getHeight()/2:0,n=e.prevRow(),a=n?n.getHeight()/2:0,r=0,s=0,u=!1,l.startMove(t,e)}),l.checkPeriod)}),{passive:!0}),this.moving,this.toRow,this.toRowAfter,t.addEventListener("touchmove",(function(t){var c,h;l.moving&&(t.preventDefault(),l.moveHover(t),u||(u=t.touches[0].pageY),(c=t.touches[0].pageY-u)>0?i&&c-r>o&&(h=i)!==e&&(u=t.touches[0].pageY,h.getElement().parentNode.insertBefore(l.placeholderElement,h.getElement().nextSibling),l.moveRow(h,!0)):n&&-c-s>a&&(h=n)!==e&&(u=t.touches[0].pageY,h.getElement().parentNode.insertBefore(l.placeholderElement,h.getElement()),l.moveRow(h,!1)),h&&(i=h.nextRow(),r=o,o=i?i.getHeight()/2:0,n=h.prevRow(),s=a,a=n?n.getHeight()/2:0))})),t.addEventListener("touchend",(function(e){l.checkTimeout&&clearTimeout(l.checkTimeout),l.moving&&(l.endMove(e),l.touchMove=!1)}))}},{key:"_bindMouseMove",value:function(){this.table.rowManager.getDisplayRows().forEach((function(e){("row"===e.type||"group"===e.type)&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveRow.mousemove)}))}},{key:"_unbindMouseMove",value:function(){this.table.rowManager.getDisplayRows().forEach((function(e){("row"===e.type||"group"===e.type)&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveRow.mousemove)}))}},{key:"startMove",value:function(e,t){var i=t.getElement();this.setStartPosition(e,t),this.moving=t,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(t)):(i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i)),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.dispatchExternal("rowMoving",t.getComponent()),this.moveHover(e)}},{key:"setStartPosition",value:function(e,t){var i,n,o=this.touchMove?e.touches[0].pageX:e.pageX,a=this.touchMove?e.touches[0].pageY:e.pageY;i=t.getElement(),this.connection?(n=i.getBoundingClientRect(),this.startX=n.left-o+window.pageXOffset,this.startY=n.top-a+window.pageYOffset):this.startY=a-i.getBoundingClientRect().top}},{key:"endMove",value:function(e){e&&1!==e.which&&!this.touchMove||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow?this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter):this.dispatchExternal("rowMoveCancelled",this.moving.getComponent()),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))}},{key:"moveRow",value:function(e,t){this.toRow=e,this.toRowAfter=t}},{key:"moveHover",value:function(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)}},{key:"moveHoverTable",value:function(e){var t=this.table.rowManager.getElement(),i=t.scrollTop,n=(this.touchMove?e.touches[0].pageY:e.pageY)-t.getBoundingClientRect().top+i;this.hoverElement.style.top=n-this.startY+"px"}},{key:"moveHoverConnections",value:function(e){this.hoverElement.style.left=this.startX+(this.touchMove?e.touches[0].pageX:e.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?e.touches[0].pageY:e.pageY)+"px"}},{key:"elementRowDrop",value:function(e,t,i){this.dispatchExternal("movableRowsElementDrop",e,t,!!i&&i.getComponent())}},{key:"connectToTables",value:function(e){var t,i=this;this.connectionSelectorsTables&&(t=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStart",t),this.commsSend(this.connectionSelectorsTables,"moveRow","connect",{row:e})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach((function(e){"string"==typeof e?i.connectionElements=i.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(e))):i.connectionElements.push(e)})),this.connectionElements.forEach((function(e){var t=function(t){i.elementRowDrop(t,e,i.moving)};e.addEventListener("mouseup",t),e.tabulatorElementDropEvent=t,e.classList.add("tabulator-movingrow-receiving")})))}},{key:"disconnectFromTables",value:function(){var e;this.connectionSelectorsTables&&(e=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStop",e),this.commsSend(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach((function(e){e.classList.remove("tabulator-movingrow-receiving"),e.removeEventListener("mouseup",e.tabulatorElementDropEvent),delete e.tabulatorElementDropEvent}))}},{key:"connect",value:function(e,t){return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=e,this.connectedRow=t,this.table.element.classList.add("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach((function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().addEventListener("mouseup",e.modules.moveRow.mouseup)})),this.tableRowDropEvent=this.tableRowDrop.bind(this),this.table.element.addEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStart",t,e),!0)}},{key:"disconnect",value:function(e){e===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach((function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().removeEventListener("mouseup",e.modules.moveRow.mouseup)})),this.table.element.removeEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStop",e)):console.warn("Move Row Error - trying to disconnect from non connected table")}},{key:"dropComplete",value:function(t,i,n){var o=!1;if(n){switch(e(this.table.options.movableRowsSender)){case"string":o=this.senders[this.table.options.movableRowsSender];break;case"function":o=this.table.options.movableRowsSender}o?o.call(this,this.moving.getComponent(),i?i.getComponent():void 0,t):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.dispatchExternal("movableRowsSent",this.moving.getComponent(),i?i.getComponent():void 0,t)}else this.dispatchExternal("movableRowsSentFailed",this.moving.getComponent(),i?i.getComponent():void 0,t);this.endMove()}},{key:"tableRowDrop",value:function(t,i){var n=!1,o=!1;switch(t.stopImmediatePropagation(),e(this.table.options.movableRowsReceiver)){case"string":n=this.receivers[this.table.options.movableRowsReceiver];break;case"function":n=this.table.options.movableRowsReceiver}n?o=n.call(this,this.connectedRow.getComponent(),i?i.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),o?this.dispatchExternal("movableRowsReceived",this.connectedRow.getComponent(),i?i.getComponent():void 0,this.connectedTable):this.dispatchExternal("movableRowsReceivedFailed",this.connectedRow.getComponent(),i?i.getComponent():void 0,this.connectedTable),this.commsSend(this.connectedTable,"moveRow","dropcomplete",{row:i,success:o})}},{key:"commsReceived",value:function(e,t,i){switch(t){case"connect":return this.connect(e,i.row);case"disconnect":return this.disconnect(e);case"dropcomplete":return this.dropComplete(e,i.row,i.success)}}}]),r}(N);Se.prototype.receivers={insert:function(e,t,i){return this.table.addRow(e.getData(),void 0,t),!0},add:function(e,t,i){return this.table.addRow(e.getData()),!0},update:function(e,t,i){return!!t&&(t.update(e.getData()),!0)},replace:function(e,t,i){return!!t&&(this.table.addRow(e.getData(),void 0,t),t.delete(),!0)}},Se.prototype.senders={delete:function(e,t,i){e.delete()}},Se.moduleName="moveRow";var Fe=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).allowedTypes=["","data","edit","clipboard"],i.enabled=!0,i.registerColumnOption("mutator"),i.registerColumnOption("mutatorParams"),i.registerColumnOption("mutatorData"),i.registerColumnOption("mutatorDataParams"),i.registerColumnOption("mutatorEdit"),i.registerColumnOption("mutatorEditParams"),i.registerColumnOption("mutatorClipboard"),i.registerColumnOption("mutatorClipboardParams"),i}return o(r,[{key:"initialize",value:function(){this.subscribe("cell-value-changing",this.transformCell.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-init-before",this.rowDataChanged.bind(this)),this.subscribe("row-data-changing",this.rowDataChanged.bind(this))}},{key:"rowDataChanged",value:function(e,t,i){return this.transformRow(t,"data",i)}},{key:"initializeColumn",value:function(e){var t=this,i=!1,n={};this.allowedTypes.forEach((function(o){var a,r="mutator"+(o.charAt(0).toUpperCase()+o.slice(1));e.definition[r]&&(a=t.lookupMutator(e.definition[r]))&&(i=!0,n[r]={mutator:a,params:e.definition[r+"Params"]||{}})})),i&&(e.modules.mutate=n)}},{key:"lookupMutator",value:function(t){var i=!1;switch(e(t)){case"string":r.mutators[t]?i=r.mutators[t]:console.warn("Mutator Error - No such mutator found, ignoring: ",t);break;case"function":i=t}return i}},{key:"transformRow",value:function(e,t,i){var n,o="mutator"+(t.charAt(0).toUpperCase()+t.slice(1));return this.enabled&&this.table.columnManager.traverse((function(a){var r,s,l;a.modules.mutate&&(r=a.modules.mutate[o]||a.modules.mutate.mutator||!1)&&(n=a.getFieldValue(void 0!==i?i:e),"data"!=t&&void 0===n||(l=a.getComponent(),s="function"==typeof r.params?r.params(n,e,t,l):r.params,a.setFieldValue(e,r.mutator(n,e,t,s,l))))})),e}},{key:"transformCell",value:function(e,t){if(e.column.modules.mutate){var i=e.column.modules.mutate.mutatorEdit||e.column.modules.mutate.mutator||!1,n={};if(i)return n=Object.assign(n,e.row.getData()),e.column.setFieldValue(n,t),i.mutator(t,n,"edit",i.params,e.getComponent())}return t}},{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1}}]),r}(N);Fe.moduleName="mutator",Fe.mutators={};var Pe={rows:function(e,t,i,n,o){var a=document.createElement("span"),r=document.createElement("span"),s=document.createElement("span"),l=document.createElement("span"),u=document.createElement("span"),c=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",(function(e){r.innerHTML=e})),this.table.modules.localize.langBind("pagination|counter|of",(function(e){l.innerHTML=e})),this.table.modules.localize.langBind("pagination|counter|rows",(function(e){c.innerHTML=e})),n?(s.innerHTML=" "+t+"-"+Math.min(t+e-1,n)+" ",u.innerHTML=" "+n+" ",a.appendChild(r),a.appendChild(s),a.appendChild(l),a.appendChild(u),a.appendChild(c)):(s.innerHTML=" 0 ",a.appendChild(r),a.appendChild(s),a.appendChild(c)),a},pages:function(e,t,i,n,o){var a=document.createElement("span"),r=document.createElement("span"),s=document.createElement("span"),l=document.createElement("span"),u=document.createElement("span"),c=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",(function(e){r.innerHTML=e})),s.innerHTML=" "+i+" ",this.table.modules.localize.langBind("pagination|counter|of",(function(e){l.innerHTML=e})),u.innerHTML=" "+o+" ",this.table.modules.localize.langBind("pagination|counter|pages",(function(e){c.innerHTML=e})),a.appendChild(r),a.appendChild(s),a.appendChild(l),a.appendChild(u),a.appendChild(c),a}},ze=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).mode="local",i.progressiveLoad=!1,i.element=null,i.pageCounterElement=null,i.pageCounter=null,i.size=0,i.page=1,i.count=5,i.max=1,i.remoteRowCountEstimate=null,i.displayIndex=0,i.initialLoad=!0,i.dataChanging=!1,i.pageSizes=[],i.registerTableOption("pagination",!1),i.registerTableOption("paginationMode","local"),i.registerTableOption("paginationSize",!1),i.registerTableOption("paginationInitialPage",1),i.registerTableOption("paginationCounter",!1),i.registerTableOption("paginationCounterElement",!1),i.registerTableOption("paginationButtonCount",5),i.registerTableOption("paginationSizeSelector",!1),i.registerTableOption("paginationElement",!1),i.registerTableOption("paginationAddRow","page"),i.registerTableOption("progressiveLoad",!1),i.registerTableOption("progressiveLoadDelay",0),i.registerTableOption("progressiveLoadScrollMargin",0),i.registerTableFunction("setMaxPage",i.setMaxPage.bind(l(i))),i.registerTableFunction("setPage",i.setPage.bind(l(i))),i.registerTableFunction("setPageToRow",i.userSetPageToRow.bind(l(i))),i.registerTableFunction("setPageSize",i.userSetPageSize.bind(l(i))),i.registerTableFunction("getPageSize",i.getPageSize.bind(l(i))),i.registerTableFunction("previousPage",i.previousPage.bind(l(i))),i.registerTableFunction("nextPage",i.nextPage.bind(l(i))),i.registerTableFunction("getPage",i.getPage.bind(l(i))),i.registerTableFunction("getPageMax",i.getPageMax.bind(l(i))),i.registerComponentFunction("row","pageTo",i.setPageToRow.bind(l(i))),i}return o(r,[{key:"initialize",value:function(){this.table.options.pagination?(this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),"page"==this.table.options.paginationAddRow&&this.subscribe("row-adding-position",this.rowAddingPosition.bind(this)),"remote"===this.table.options.paginationMode&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this))),this.table.options.progressiveLoad&&console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time"),this.registerDisplayHandler(this.restOnRenderBefore.bind(this),40),this.registerDisplayHandler(this.getRows.bind(this),50),this.createElements(),this.initializePageCounter(),this.initializePaginator()):this.table.options.progressiveLoad&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.initializeProgressive(this.table.options.progressiveLoad),"scroll"===this.table.options.progressiveLoad&&this.subscribe("scroll-vertical",this.scrollVertical.bind(this)))}},{key:"rowAddingPosition",value:function(e,t){var i,n=this.table.rowManager,o=n.getDisplayRows();return t?o.length?i=o[0]:n.activeRows.length&&(i=n.activeRows[n.activeRows.length-1],t=!1):o.length&&(i=o[o.length-1],t=!(o.lengththis.max&&(this.page=this.max)}},{key:"reset",value:function(e){this.initialLoad||("local"==this.mode||e)&&(this.page=1)}},{key:"setMaxPage",value:function(e){e=parseInt(e),this.max=e||1,this.page>this.max&&(this.page=this.max,this.trigger())}},{key:"setPage",value:function(e){switch(e){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return(e=parseInt(e))>0&&e<=this.max||"local"!==this.mode?(this.page=e,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Requested page is out of range of 1 - "+this.max+":",e),Promise.reject())}},{key:"setPageToRow",value:function(e){var t=this.table.rowManager.getDisplayRows(this.displayIndex-1).indexOf(e);if(t>-1){var i=!0===this.size?1:Math.ceil((t+1)/this.size);return this.setPage(i)}return console.warn("Pagination Error - Requested row is not visible"),Promise.reject()}},{key:"setPageSize",value:function(e){!0!==e&&(e=parseInt(e)),e>0&&(this.size=e),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.trackChanges()}},{key:"_setPageCounter",value:function(t,i,n){var o;if(this.pageCounter)switch("remote"===this.mode&&(i=this.size,n=(this.page-1)*this.size+1,t=this.remoteRowCountEstimate),e(o=this.pageCounter.call(this,i,n,this.page,t,this.max))){case"object":if(o instanceof Node){for(;this.pageCounterElement.firstChild;)this.pageCounterElement.removeChild(this.pageCounterElement.firstChild);this.pageCounterElement.appendChild(o)}else this.pageCounterElement.innerHTML="",null!=o&&console.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:",o);break;case"undefined":case"null":this.pageCounterElement.innerHTML="";break;default:this.pageCounterElement.innerHTML=o}}},{key:"_setPageButtons",value:function(){for(var e=Math.floor((this.count-1)/2),t=Math.ceil((this.count-1)/2),i=this.max-this.page+e+10&&o<=this.max&&this.pagesElement.appendChild(this._generatePageButton(o));this.footerRedraw()}},{key:"_generatePageButton",value:function(e){var t=this,i=document.createElement("button");return i.classList.add("tabulator-page"),e==this.page&&i.classList.add("active"),i.setAttribute("type","button"),i.setAttribute("role","button"),this.langBind("pagination|page_title",(function(t){i.setAttribute("aria-label",t+" "+e),i.setAttribute("title",t+" "+e)})),i.setAttribute("data-page",e),i.textContent=e,i.addEventListener("click",(function(i){t.setPage(e)})),i}},{key:"previousPage",value:function(){return this.page>1?(this.page--,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Previous page would be less than page 1:",0),Promise.reject())}},{key:"nextPage",value:function(){return this.page-1&&(o=o.slice(r),(i=o.indexOf(";"))>-1&&(o=o.slice(0,i)),n=o.replace(a+"=","")),!!n&&JSON.parse(n)}},Ae={local:function(e,t,i){localStorage.setItem(e+"-"+t,JSON.stringify(i))},cookie:function(e,t,i){var n=new Date;n.setDate(n.getDate()+1e4),document.cookie=e+"-"+t+"="+JSON.stringify(i)+"; expires="+n.toUTCString()}},Oe=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).mode="",o.id="",o.defWatcherBlock=!1,o.config={},o.readFunc=!1,o.writeFunc=!1,o.registerTableOption("persistence",!1),o.registerTableOption("persistenceID",""),o.registerTableOption("persistenceMode",!0),o.registerTableOption("persistenceReaderFunc",!1),o.registerTableOption("persistenceWriterFunc",!1),o}return o(n,[{key:"localStorageTest",value:function(){var e="_tabulator_test";try{return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}}},{key:"initialize",value:function(){if(this.table.options.persistence){var e,t=this.table.options.persistenceMode,i=this.table.options.persistenceID;this.mode=!0!==t?t:this.localStorageTest()?"local":"cookie",this.table.options.persistenceReaderFunc?"function"==typeof this.table.options.persistenceReaderFunc?this.readFunc=this.table.options.persistenceReaderFunc:n.readers[this.table.options.persistenceReaderFunc]?this.readFunc=n.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):n.readers[this.mode]?this.readFunc=n.readers[this.mode]:console.warn("Persistence Read Error - invalid reader set",this.mode),this.table.options.persistenceWriterFunc?"function"==typeof this.table.options.persistenceWriterFunc?this.writeFunc=this.table.options.persistenceWriterFunc:n.writers[this.table.options.persistenceWriterFunc]?this.writeFunc=n.writers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):n.writers[this.mode]?this.writeFunc=n.writers[this.mode]:console.warn("Persistence Write Error - invalid writer set",this.mode),this.id="tabulator-"+(i||this.table.element.getAttribute("id")||""),this.config={sort:!0===this.table.options.persistence||this.table.options.persistence.sort,filter:!0===this.table.options.persistence||this.table.options.persistence.filter,group:!0===this.table.options.persistence||this.table.options.persistence.group,page:!0===this.table.options.persistence||this.table.options.persistence.page,columns:!0===this.table.options.persistence?["title","width","visible"]:this.table.options.persistence.columns},this.config.page&&(e=this.retreiveData("page"))&&(void 0===e.paginationSize||!0!==this.config.page&&!this.config.page.size||(this.table.options.paginationSize=e.paginationSize),void 0===e.paginationInitialPage||!0!==this.config.page&&!this.config.page.page||(this.table.options.paginationInitialPage=e.paginationInitialPage)),this.config.group&&(e=this.retreiveData("group"))&&(void 0===e.groupBy||!0!==this.config.group&&!this.config.group.groupBy||(this.table.options.groupBy=e.groupBy),void 0===e.groupStartOpen||!0!==this.config.group&&!this.config.group.groupStartOpen||(this.table.options.groupStartOpen=e.groupStartOpen),void 0===e.groupHeader||!0!==this.config.group&&!this.config.group.groupHeader||(this.table.options.groupHeader=e.groupHeader)),this.config.columns&&(this.table.options.columns=this.load("columns",this.table.options.columns),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-show",this.save.bind(this,"columns")),this.subscribe("column-hide",this.save.bind(this,"columns")),this.subscribe("column-moved",this.save.bind(this,"columns"))),this.subscribe("table-built",this.tableBuilt.bind(this),0),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("filter-changed",this.eventSave.bind(this,"filter")),this.subscribe("sort-changed",this.eventSave.bind(this,"sort")),this.subscribe("group-changed",this.eventSave.bind(this,"group")),this.subscribe("page-changed",this.eventSave.bind(this,"page")),this.subscribe("column-resized",this.eventSave.bind(this,"columns")),this.subscribe("layout-refreshed",this.eventSave.bind(this,"columns"))}this.registerTableFunction("getColumnLayout",this.getColumnLayout.bind(this)),this.registerTableFunction("setColumnLayout",this.setColumnLayout.bind(this))}},{key:"eventSave",value:function(e){this.config[e]&&this.save(e)}},{key:"tableBuilt",value:function(){var e,t;this.table.options;this.config.sort&&!1==!(e=this.load("sort"))&&(this.table.options.initialSort=e),this.config.filter&&!1==!(t=this.load("filter"))&&(this.table.options.initialFilter=t)}},{key:"tableRedraw",value:function(e){e&&this.config.columns&&this.save("columns")}},{key:"getColumnLayout",value:function(){return this.parseColumns(this.table.columnManager.getColumns())}},{key:"setColumnLayout",value:function(e){return this.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns,e)),!0}},{key:"initializeColumn",value:function(e){var t;this.config.columns&&(this.defWatcherBlock=!0,t=e.getDefinition(),(!0===this.config.columns?Object.keys(t):this.config.columns).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e),n=t[e];i&&Object.defineProperty(t,e,{set:function(e){n=e,this.defWatcherBlock||this.save("columns"),i.set&&i.set(e)},get:function(){return i.get&&i.get(),n}})})),this.defWatcherBlock=!1)}},{key:"load",value:function(e,t){var i=this.retreiveData(e);return t&&(i=i?this.mergeDefinition(t,i):t),i}},{key:"retreiveData",value:function(e){return!!this.readFunc&&this.readFunc(this.id,e)}},{key:"mergeDefinition",value:function(e,t){var i=this,n=[];return(t=t||[]).forEach((function(t,o){var a,r=i._findColumn(e,t);r&&(!0===i.config.columns||null==i.config.columns?(a=Object.keys(r)).push("width"):a=i.config.columns,a.forEach((function(e){"columns"!==e&&void 0!==t[e]&&(r[e]=t[e])})),r.columns&&(r.columns=i.mergeDefinition(r.columns,t.columns)),n.push(r))})),e.forEach((function(e,o){i._findColumn(t,e)||(n.length>o?n.splice(o,0,e):n.push(e))})),n}},{key:"_findColumn",value:function(e,t){var i=t.columns?"group":t.field?"field":"object";return e.find((function(e){switch(i){case"group":return e.title===t.title&&e.columns.length===t.columns.length;case"field":return e.field===t.field;case"object":return e===t}}))}},{key:"save",value:function(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort());break;case"group":t=this.getGroupConfig();break;case"page":t=this.getPageConfig()}this.writeFunc&&this.writeFunc(this.id,e,t)}},{key:"validateSorters",value:function(e){return e.forEach((function(e){e.column=e.field,delete e.field})),e}},{key:"getGroupConfig",value:function(){var e={};return this.config.group&&((!0===this.config.group||this.config.group.groupBy)&&(e.groupBy=this.table.options.groupBy),(!0===this.config.group||this.config.group.groupStartOpen)&&(e.groupStartOpen=this.table.options.groupStartOpen),(!0===this.config.group||this.config.group.groupHeader)&&(e.groupHeader=this.table.options.groupHeader)),e}},{key:"getPageConfig",value:function(){var e={};return this.config.page&&((!0===this.config.page||this.config.page.size)&&(e.paginationSize=this.table.modules.page.getPageSize()),(!0===this.config.page||this.config.page.page)&&(e.paginationInitialPage=this.table.modules.page.getPage())),e}},{key:"parseColumns",value:function(e){var t=this,i=[],n=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return e.forEach((function(e){var o,a={},r=e.getDefinition();e.isGroup?(a.title=r.title,a.columns=t.parseColumns(e.getColumns())):(a.field=e.getField(),!0===t.config.columns||null==t.config.columns?(o=Object.keys(r)).push("width"):o=t.config.columns,o.forEach((function(t){switch(t){case"width":a.width=e.getWidth();break;case"visible":a.visible=e.visible;break;default:"function"!=typeof r[t]&&-1===n.indexOf(t)&&(a[t]=r[t])}}))),i.push(a)})),i}}]),n}(N);Oe.moduleName="persistence",Oe.moduleInitOrder=1,Oe.readers=He,Oe.writers=Ae;var _e=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).element=!1,o.manualBlock=!1,o.registerTableOption("printAsHtml",!1),o.registerTableOption("printFormatter",!1),o.registerTableOption("printHeader",!1),o.registerTableOption("printFooter",!1),o.registerTableOption("printStyled",!0),o.registerTableOption("printRowRange","visible"),o.registerTableOption("printConfig",{}),o.registerColumnOption("print"),o.registerColumnOption("titlePrint"),o}return o(n,[{key:"initialize",value:function(){this.table.options.printAsHtml&&(window.addEventListener("beforeprint",this.replaceTable.bind(this)),window.addEventListener("afterprint",this.cleanup.bind(this))),this.registerTableFunction("print",this.printFullscreen.bind(this))}},{key:"replaceTable",value:function(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))}},{key:"cleanup",value:function(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")}},{key:"printFullscreen",value:function(e,t,i){var n,o,a=window.scrollX,r=window.scrollY,s=document.createElement("div"),l=document.createElement("div"),u=this.table.modules.export.genereateTable(void 0!==i?i:this.table.options.printConfig,void 0!==t?t:this.table.options.printStyled,e||this.table.options.printRowRange,"print");this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(s.classList.add("tabulator-print-header"),"string"==typeof(n="function"==typeof this.table.options.printHeader?this.table.options.printHeader.call(this.table):this.table.options.printHeader)?s.innerHTML=n:s.appendChild(n),this.element.appendChild(s)),this.element.appendChild(u),this.table.options.printFooter&&(l.classList.add("tabulator-print-footer"),"string"==typeof(o="function"==typeof this.table.options.printFooter?this.table.options.printFooter.call(this.table):this.table.options.printFooter)?l.innerHTML=o:l.appendChild(o),this.element.appendChild(l)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,u),window.print(),this.cleanup(),window.scrollTo(a,r),this.manualBlock=!1}}]),n}(N);_e.moduleName="print";var Be=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).data=!1,o.blocked=!1,o.origFuncs={},o.currentVersion=0,o.registerTableOption("reactiveData",!1),o}return o(n,[{key:"initialize",value:function(){this.table.options.reactiveData&&(this.subscribe("cell-value-save-before",this.block.bind(this)),this.subscribe("cell-value-save-after",this.unblock.bind(this)),this.subscribe("row-data-save-before",this.block.bind(this)),this.subscribe("row-data-save-after",this.unblock.bind(this)),this.subscribe("row-data-init-after",this.watchRow.bind(this)),this.subscribe("data-processing",this.watchData.bind(this)),this.subscribe("table-destroy",this.unwatchData.bind(this)))}},{key:"watchData",value:function(e){var t,i=this;this.currentVersion++,t=this.currentVersion,this.unwatchData(),this.data=e,this.origFuncs.push=e.push,Object.defineProperty(this.data,"push",{enumerable:!1,configurable:!0,value:function(){var n=Array.from(arguments);return i.blocked||t!==i.currentVersion||n.forEach((function(e){i.table.rowManager.addRowActual(e,!1)})),i.origFuncs.push.apply(e,arguments)}}),this.origFuncs.unshift=e.unshift,Object.defineProperty(this.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var n=Array.from(arguments);return i.blocked||t!==i.currentVersion||n.forEach((function(e){i.table.rowManager.addRowActual(e,!0)})),i.origFuncs.unshift.apply(e,arguments)}}),this.origFuncs.shift=e.shift,Object.defineProperty(this.data,"shift",{enumerable:!1,configurable:!0,value:function(){var n;return i.blocked||t!==i.currentVersion||i.data.length&&(n=i.table.rowManager.getRowFromDataObject(i.data[0]))&&n.deleteActual(),i.origFuncs.shift.call(e)}}),this.origFuncs.pop=e.pop,Object.defineProperty(this.data,"pop",{enumerable:!1,configurable:!0,value:function(){var n;return i.blocked||t!==i.currentVersion||i.data.length&&(n=i.table.rowManager.getRowFromDataObject(i.data[i.data.length-1]))&&n.deleteActual(),i.origFuncs.pop.call(e)}}),this.origFuncs.splice=e.splice,Object.defineProperty(this.data,"splice",{enumerable:!1,configurable:!0,value:function(){var n,o=Array.from(arguments),a=o[0]<0?e.length+o[0]:o[0],r=o[1],s=!!o[2]&&o.slice(2);if(!i.blocked&&t===i.currentVersion){if(s&&((n=!!e[a]&&i.table.rowManager.getRowFromDataObject(e[a]))?s.forEach((function(e){i.table.rowManager.addRowActual(e,!0,n,!0)})):(s=s.slice().reverse()).forEach((function(e){i.table.rowManager.addRowActual(e,!0,!1,!0)}))),0!==r){var l=e.slice(a,void 0===o[1]?o[1]:a+r);l.forEach((function(e,t){var n=i.table.rowManager.getRowFromDataObject(e);n&&n.deleteActual(t!==l.length-1)}))}(s||0!==r)&&i.table.rowManager.reRenderInPosition()}return i.origFuncs.splice.apply(e,arguments)}})}},{key:"unwatchData",value:function(){if(!1!==this.data)for(var e in this.origFuncs)Object.defineProperty(this.data,e,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})}},{key:"watchRow",value:function(e){var t=e.getData();for(var i in this.blocked=!0,t)this.watchKey(e,t,i);this.table.options.dataTree&&this.watchTreeChildren(e),this.blocked=!1}},{key:"watchTreeChildren",value:function(e){var t=arguments,i=e.getData()[this.table.options.dataTreeChildField],n={};function o(){this.table.modules.dataTree.initializeRow(e),this.table.modules.dataTree.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)}i&&(n.push=i.push,Object.defineProperty(i,"push",{enumerable:!1,configurable:!0,value:function(){var e=n.push.apply(i,t);return o(),e}}),n.unshift=i.unshift,Object.defineProperty(i,"unshift",{enumerable:!1,configurable:!0,value:function(){var e=n.unshift.apply(i,t);return o(),e}}),n.shift=i.shift,Object.defineProperty(i,"shift",{enumerable:!1,configurable:!0,value:function(){var e=n.shift.call(i);return o(),e}}),n.pop=i.pop,Object.defineProperty(i,"pop",{enumerable:!1,configurable:!0,value:function(){var e=n.pop.call(i);return o(),e}}),n.splice=i.splice,Object.defineProperty(i,"splice",{enumerable:!1,configurable:!0,value:function(){var e=n.splice.apply(i,t);return o(),e}}))}},{key:"watchKey",value:function(e,t,i){var n=this,o=Object.getOwnPropertyDescriptor(t,i),a=t[i],r=this.currentVersion;Object.defineProperty(t,i,{set:function(t){if(a=t,!n.blocked&&r===n.currentVersion){var s={};s[i]=t,e.updateData(s)}o.set&&o.set(t)},get:function(){return o.get&&o.get(),a}})}},{key:"unwatchRow",value:function(e){var t=e.getData();for(var i in t)Object.defineProperty(t,i,{value:t[i]})}},{key:"block",value:function(){this.blocked=!0}},{key:"unblock",value:function(){this.blocked=!1}}]),n}(N);Be.moduleName="reactiveData";var Ne=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).startColumn=!1,o.startX=!1,o.startWidth=!1,o.handle=null,o.prevHandle=null,o.registerColumnOption("resizable",!0),o}return o(n,[{key:"initialize",value:function(){this.subscribe("cell-layout",this.layoutCellHandles.bind(this)),this.subscribe("column-init",this.layoutColumnHeader.bind(this))}},{key:"layoutCellHandles",value:function(e){"row"===e.row.type&&this.initializeColumn("cell",e.column,e.element)}},{key:"layoutColumnHeader",value:function(e){this.initializeColumn("header",e,e.element)}},{key:"initializeColumn",value:function(e,t,i){var n=this,o=!1,a=t.definition.resizable;if("header"===e&&(o="textarea"==t.definition.formatter||t.definition.variableHeight,t.modules.resize={variableHeight:o}),!0===a||a==e){var r=document.createElement("div");r.className="tabulator-col-resize-handle";var s=document.createElement("div");s.className="tabulator-col-resize-handle prev",r.addEventListener("click",(function(e){e.stopPropagation()}));var l=function(e){var i=t.getLastColumn();i&&n._checkResizability(i)&&(n.startColumn=t,n._mouseDown(e,i,r))};r.addEventListener("mousedown",l),r.addEventListener("touchstart",l,{passive:!0}),r.addEventListener("dblclick",(function(e){var i,o=t.getLastColumn();o&&n._checkResizability(o)&&(i=o.getWidth(),e.stopPropagation(),o.reinitializeWidth(!0),i!==o.getWidth()&&(n.dispatch("column-resized",o),n.table.externalEvents.dispatch("columnResized",o.getComponent())))})),s.addEventListener("click",(function(e){e.stopPropagation()}));var u=function(e){var i,o,a;(i=t.getFirstColumn())&&(a=(o=n.table.columnManager.findColumnIndex(i))>0&&n.table.columnManager.getColumnByIndex(o-1))&&n._checkResizability(a)&&(n.startColumn=t,n._mouseDown(e,a,s))};s.addEventListener("mousedown",u),s.addEventListener("touchstart",u,{passive:!0}),s.addEventListener("dblclick",(function(e){var i,o,a;(i=t.getFirstColumn())&&(a=(o=n.table.columnManager.findColumnIndex(i))>0&&n.table.columnManager.getColumnByIndex(o-1))&&n._checkResizability(a)&&(e.stopPropagation(),a.reinitializeWidth(!0))})),i.appendChild(r),i.appendChild(s)}}},{key:"_checkResizability",value:function(e){return e.definition.resizable}},{key:"_mouseDown",value:function(e,t,i){var n=this;function o(e){n.table.rtl?t.setWidth(n.startWidth-((void 0===e.screenX?e.touches[0].screenX:e.screenX)-n.startX)):t.setWidth(n.startWidth+((void 0===e.screenX?e.touches[0].screenX:e.screenX)-n.startX)),n.table.columnManager.renderer.rerenderColumns(!0),!n.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}function a(e){n.startColumn.modules.edit&&(n.startColumn.modules.edit.blocked=!1),n.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",a),document.body.removeEventListener("mousemove",o),i.removeEventListener("touchmove",o),i.removeEventListener("touchend",a),n.table.element.classList.remove("tabulator-block-select"),n.startWidth!==t.getWidth()&&(n.dispatch("column-resized",t),n.table.externalEvents.dispatch("columnResized",t.getComponent()))}n.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),n.startColumn.modules.edit&&(n.startColumn.modules.edit.blocked=!0),n.startX=void 0===e.screenX?e.touches[0].screenX:e.screenX,n.startWidth=t.getWidth(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",a),i.addEventListener("touchmove",o,{passive:!0}),i.addEventListener("touchend",a)}}]),n}(N);Ne.moduleName="resizeColumns";var Ve=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).startColumn=!1,o.startY=!1,o.startHeight=!1,o.handle=null,o.prevHandle=null,o.registerTableOption("resizableRows",!1),o}return o(n,[{key:"initialize",value:function(){this.table.options.resizableRows&&this.subscribe("row-layout-after",this.initializeRow.bind(this))}},{key:"initializeRow",value:function(e){var t=this,i=e.getElement(),n=document.createElement("div");n.className="tabulator-row-resize-handle";var o=document.createElement("div");o.className="tabulator-row-resize-handle prev",n.addEventListener("click",(function(e){e.stopPropagation()}));var a=function(i){t.startRow=e,t._mouseDown(i,e,n)};n.addEventListener("mousedown",a),n.addEventListener("touchstart",a,{passive:!0}),o.addEventListener("click",(function(e){e.stopPropagation()}));var r=function(i){var n=t.table.rowManager.prevDisplayRow(e);n&&(t.startRow=n,t._mouseDown(i,n,o))};o.addEventListener("mousedown",r),o.addEventListener("touchstart",r,{passive:!0}),i.appendChild(n),i.appendChild(o)}},{key:"_mouseDown",value:function(e,t,i){var n=this;function o(e){t.setHeight(n.startHeight+((void 0===e.screenY?e.touches[0].screenY:e.screenY)-n.startY))}function a(e){document.body.removeEventListener("mouseup",o),document.body.removeEventListener("mousemove",o),i.removeEventListener("touchmove",o),i.removeEventListener("touchend",a),n.table.element.classList.remove("tabulator-block-select"),n.dispatchExternal("rowResized",t.getComponent())}n.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),n.startY=void 0===e.screenY?e.touches[0].screenY:e.screenY,n.startHeight=t.getHeight(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",a),i.addEventListener("touchmove",o,{passive:!0}),i.addEventListener("touchend",a)}}]),n}(N);Ve.moduleName="resizeRows";var Ie=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).binding=!1,o.observer=!1,o.containerObserver=!1,o.tableHeight=0,o.tableWidth=0,o.containerHeight=0,o.containerWidth=0,o.autoResize=!1,o.registerTableOption("autoResize",!0),o}return o(n,[{key:"initialize",value:function(){var e=this;if(this.table.options.autoResize){var t,i=this.table;this.tableHeight=i.element.clientHeight,this.tableWidth=i.element.clientWidth,i.element.parentNode&&(this.containerHeight=i.element.parentNode.clientHeight,this.containerWidth=i.element.parentNode.clientWidth),"undefined"!=typeof ResizeObserver&&"virtual"===i.rowManager.getRenderMode()?(this.autoResize=!0,this.observer=new ResizeObserver((function(t){if(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell){var n=Math.floor(t[0].contentRect.height),o=Math.floor(t[0].contentRect.width);e.tableHeight==n&&e.tableWidth==o||(e.tableHeight=n,e.tableWidth=o,i.element.parentNode&&(e.containerHeight=i.element.parentNode.clientHeight,e.containerWidth=i.element.parentNode.clientWidth),e.table.columnManager.renderer.rerenderColumns(!0),i.redraw())}})),this.observer.observe(i.element),t=window.getComputedStyle(i.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(t.getPropertyValue("max-height")||t.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver((function(t){if(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell){var n=Math.floor(t[0].contentRect.height),o=Math.floor(t[0].contentRect.width);e.containerHeight==n&&e.containerWidth==o||(e.containerHeight=n,e.containerWidth=o,e.tableHeight=i.element.clientHeight,e.tableWidth=i.element.clientWidth),i.columnManager.renderer.rerenderColumns(!0),i.redraw()}})),this.containerObserver.observe(this.table.element.parentNode)),this.subscribe("table-resize",this.tableResized.bind(this))):(this.binding=function(){(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell)&&(i.columnManager.renderer.rerenderColumns(!0),i.redraw())},window.addEventListener("resize",this.binding)),this.subscribe("table-destroy",this.clearBindings.bind(this))}}},{key:"tableResized",value:function(){this.table.rowManager.redraw()}},{key:"clearBindings",value:function(){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)}}]),n}(N);Ie.moduleName="resizeTable";var We=function(e){a(n,e);var i=c(n);function n(e){var o;return t(this,n),(o=i.call(this,e)).columns=[],o.hiddenColumns=[],o.mode="",o.index=0,o.collapseFormatter=[],o.collapseStartOpen=!0,o.collapseHandleColumn=!1,o.registerTableOption("responsiveLayout",!1),o.registerTableOption("responsiveLayoutCollapseStartOpen",!0),o.registerTableOption("responsiveLayoutCollapseUseFormatters",!0),o.registerTableOption("responsiveLayoutCollapseFormatter",!1),o.registerColumnOption("responsive"),o}return o(n,[{key:"initialize",value:function(){this.table.options.responsiveLayout&&(this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-show",this.updateColumnVisibility.bind(this)),this.subscribe("column-hide",this.updateColumnVisibility.bind(this)),this.subscribe("columns-loaded",this.initializeResponsivity.bind(this)),this.subscribe("column-moved",this.initializeResponsivity.bind(this)),this.subscribe("column-add",this.initializeResponsivity.bind(this)),this.subscribe("column-delete",this.initializeResponsivity.bind(this)),this.subscribe("table-redrawing",this.tableRedraw.bind(this)),"collapse"===this.table.options.responsiveLayout&&(this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout",this.layoutRow.bind(this))))}},{key:"tableRedraw",value:function(e){-1===["fitColumns","fitDataStretch"].indexOf(this.layoutMode())&&(e||this.update())}},{key:"initializeResponsivity",value:function(){var e=this,t=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach((function(i,n){i.modules.responsive&&i.modules.responsive.order&&i.modules.responsive.visible&&(i.modules.responsive.index=n,t.push(i),i.visible||"collapse"!==e.mode||e.hiddenColumns.push(i))})),t=(t=t.reverse()).sort((function(e,t){return t.modules.responsive.order-e.modules.responsive.order||t.modules.responsive.index-e.modules.responsive.index})),this.columns=t,"collapse"===this.mode&&this.generateCollapsedContent();var i,n=p(this.table.columnManager.columnsByIndex);try{for(n.s();!(i=n.n()).done;){var o=i.value;if("responsiveCollapse"==o.definition.formatter){this.collapseHandleColumn=o;break}}}catch(e){n.e(e)}finally{n.f()}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())}},{key:"initializeColumn",value:function(e){var t=e.getDefinition();e.modules.responsive={order:void 0===t.responsive?1:t.responsive,visible:!1!==t.visible}}},{key:"initializeRow",value:function(e){var t;"calc"!==e.type&&((t=document.createElement("div")).classList.add("tabulator-responsive-collapse"),e.modules.responsiveLayout={element:t,open:this.collapseStartOpen},this.collapseStartOpen||(t.style.display="none"))}},{key:"layoutRow",value:function(e){var t=e.getElement();e.modules.responsiveLayout&&(t.appendChild(e.modules.responsiveLayout.element),this.generateCollapsedRowContent(e))}},{key:"updateColumnVisibility",value:function(e,t){!t&&e.modules.responsive&&(e.modules.responsive.visible=e.visible,this.initializeResponsivity())}},{key:"hideColumn",value:function(e){var t=this.hiddenColumns.length;e.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent(),this.collapseHandleColumn&&!t&&this.collapseHandleColumn.show())}},{key:"showColumn",value:function(e){var t;e.show(!1,!0),e.setWidth(e.getWidth()),"collapse"===this.mode&&((t=this.hiddenColumns.indexOf(e))>-1&&this.hiddenColumns.splice(t,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())}},{key:"update",value:function(){for(var e=this,t=!0;t;){var i="fitColumns"==e.table.modules.layout.getMode()?e.table.columnManager.getFlexBaseWidth():e.table.columnManager.getWidth(),n=(e.table.options.headerVisible?e.table.columnManager.element.clientWidth:e.table.element.clientWidth)-i;if(n<0){var o=e.columns[e.index];o?(e.hideColumn(o),e.index++):t=!1}else{var a=e.columns[e.index-1];a&&n>0&&n>=a.getWidth()?(e.showColumn(a),e.index--):t=!1}e.table.rowManager.activeRowsCount||e.table.rowManager.renderEmptyScroll()}}},{key:"generateCollapsedContent",value:function(){var e=this;this.table.rowManager.getDisplayRows().forEach((function(t){e.generateCollapsedRowContent(t)}))}},{key:"generateCollapsedRowContent",value:function(e){var t,i;if(e.modules.responsiveLayout){for(t=e.modules.responsiveLayout.element;t.firstChild;)t.removeChild(t.firstChild);(i=this.collapseFormatter(this.generateCollapsedRowData(e)))&&t.appendChild(i)}}},{key:"generateCollapsedRowData",value:function(e){var t,i=this,n=e.getData(),o=[];return this.hiddenColumns.forEach((function(a){var r=a.getFieldValue(n);if(a.definition.title&&a.field)if(a.modules.format&&i.table.options.responsiveLayoutCollapseUseFormatters){t={value:!1,data:{},getValue:function(){return r},getData:function(){return n},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return a.getComponent()}},o.push({field:a.field,title:a.definition.title,value:a.modules.format.formatter.call(i.table.modules.format,t,a.modules.format.params,(function(e){e()}))})}else o.push({field:a.field,title:a.definition.title,value:r})})),o}},{key:"formatCollapsedData",value:function(e){var t=document.createElement("table");return e.forEach((function(e){var i,n=document.createElement("tr"),o=document.createElement("td"),a=document.createElement("td"),r=document.createElement("strong");o.appendChild(r),this.langBind("columns|"+e.field,(function(t){r.innerHTML=t||e.title})),e.value instanceof Node?((i=document.createElement("div")).appendChild(e.value),a.appendChild(i)):a.innerHTML=e.value,n.appendChild(o),n.appendChild(a),t.appendChild(n)}),this),Object.keys(e).length?t:""}}]),n}(N);We.moduleName="responsiveLayout";var je=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).selecting=!1,i.lastClickedRow=!1,i.selectPrev=[],i.selectedRows=[],i.headerCheckboxElement=null,i.registerTableOption("selectable","highlight"),i.registerTableOption("selectableRangeMode","drag"),i.registerTableOption("selectableRollingSelection",!0),i.registerTableOption("selectablePersistence",!0),i.registerTableOption("selectableCheck",(function(e,t){return!0})),i.registerTableFunction("selectRow",i.selectRows.bind(l(i))),i.registerTableFunction("deselectRow",i.deselectRows.bind(l(i))),i.registerTableFunction("toggleSelectRow",i.toggleRow.bind(l(i))),i.registerTableFunction("getSelectedRows",i.getSelectedRows.bind(l(i))),i.registerTableFunction("getSelectedData",i.getSelectedData.bind(l(i))),i.registerComponentFunction("row","select",i.selectRows.bind(l(i))),i.registerComponentFunction("row","deselect",i.deselectRows.bind(l(i))),i.registerComponentFunction("row","toggleSelect",i.toggleRow.bind(l(i))),i.registerComponentFunction("row","isSelected",i.isRowSelected.bind(l(i))),i}return o(r,[{key:"initialize",value:function(){!1!==this.table.options.selectable&&(this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-deleting",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clearSelectionData.bind(this)),this.subscribe("rows-retrieve",this.rowRetrieve.bind(this)),this.table.options.selectable&&!this.table.options.selectablePersistence&&this.subscribe("data-refreshing",this.deselectRows.bind(this)))}},{key:"rowRetrieve",value:function(e,t){return"selected"===e?this.selectedRows:t}},{key:"rowDeleted",value:function(e){this._deselectRow(e,!0)}},{key:"clearSelectionData",value:function(e){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],!0!==e&&this._rowSelectionChanged()}},{key:"initializeRow",value:function(e){var t=this,i=e.getElement(),n=function e(){setTimeout((function(){t.selecting=!1}),50),document.body.removeEventListener("mouseup",e)};e.modules.select={selected:!1},t.table.options.selectableCheck.call(this.table,e.getComponent())?(i.classList.add("tabulator-selectable"),i.classList.remove("tabulator-unselectable"),t.table.options.selectable&&"highlight"!=t.table.options.selectable&&("click"===t.table.options.selectableRangeMode?i.addEventListener("click",this.handleComplexRowClick.bind(this,e)):(i.addEventListener("click",(function(i){t.table.modExists("edit")&&t.table.modules.edit.getCurrentCell()||t.table._clearSelection(),t.selecting||t.toggleRow(e)})),i.addEventListener("mousedown",(function(i){if(i.shiftKey)return t.table._clearSelection(),t.selecting=!0,t.selectPrev=[],document.body.addEventListener("mouseup",n),document.body.addEventListener("keyup",n),t.toggleRow(e),!1})),i.addEventListener("mouseenter",(function(i){t.selecting&&(t.table._clearSelection(),t.toggleRow(e),t.selectPrev[1]==e&&t.toggleRow(t.selectPrev[0]))})),i.addEventListener("mouseout",(function(i){t.selecting&&(t.table._clearSelection(),t.selectPrev.unshift(e))}))))):(i.classList.add("tabulator-unselectable"),i.classList.remove("tabulator-selectable"))}},{key:"handleComplexRowClick",value:function(e,t){var i=this;if(t.shiftKey){this.table._clearSelection(),this.lastClickedRow=this.lastClickedRow||e;var n=this.table.rowManager.getDisplayRowIndex(this.lastClickedRow),o=this.table.rowManager.getDisplayRowIndex(e),a=n<=o?n:o,r=n>=o?n:o,s=this.table.rowManager.getDisplayRows().slice(0).splice(a,r-a+1);t.ctrlKey||t.metaKey?(s.forEach((function(t){t!==i.lastClickedRow&&(!0===i.table.options.selectable||i.isRowSelected(e)||i.selectedRows.lengththis.table.options.selectable&&(s=s.slice(0,this.table.options.selectable)),this.selectRows(s)),this.table._clearSelection()}else t.ctrlKey||t.metaKey?(this.toggleRow(e),this.lastClickedRow=e):(this.deselectRows(void 0,!0),this.selectRows(e),this.lastClickedRow=e)}},{key:"toggleRow",value:function(e){this.table.options.selectableCheck.call(this.table,e.getComponent())&&(e.modules.select&&e.modules.select.selected?this._deselectRow(e):this._selectRow(e))}},{key:"selectRows",value:function(t){var i,n=this;switch(e(t)){case"undefined":this.table.rowManager.rows.forEach((function(e){n._selectRow(e,!0,!0)})),this._rowSelectionChanged();break;case"string":(i=this.table.rowManager.findRow(t))?this._selectRow(i,!0,!0):this.table.rowManager.getRows(t).forEach((function(e){n._selectRow(e,!0,!0)})),this._rowSelectionChanged();break;default:Array.isArray(t)?(t.forEach((function(e){n._selectRow(e,!0,!0)})),this._rowSelectionChanged()):this._selectRow(t,!1,!0)}}},{key:"_selectRow",value:function(e,t,i){if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!i&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var n=this.table.rowManager.findRow(e);n?-1==this.selectedRows.indexOf(n)&&(n.getElement().classList.add("tabulator-selected"),n.modules.select||(n.modules.select={}),n.modules.select.selected=!0,n.modules.select.checkboxEl&&(n.modules.select.checkboxEl.checked=!0),this.selectedRows.push(n),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(n,!0),this.dispatchExternal("rowSelected",n.getComponent()),this._rowSelectionChanged(t)):t||console.warn("Selection Error - No such row found, ignoring selection:"+e)}},{key:"isRowSelected",value:function(e){return-1!==this.selectedRows.indexOf(e)}},{key:"deselectRows",value:function(e,t){var i,n=this;if(void 0===e){i=n.selectedRows.length;for(var o=0;o-1&&(o.getElement().classList.remove("tabulator-selected"),o.modules.select||(o.modules.select={}),o.modules.select.selected=!1,o.modules.select.checkboxEl&&(o.modules.select.checkboxEl.checked=!1),n.selectedRows.splice(i,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(o,!1),this.dispatchExternal("rowDeselected",o.getComponent()),n._rowSelectionChanged(t)):t||console.warn("Deselection Error - No such row found, ignoring selection:"+e)}},{key:"getSelectedData",value:function(){var e=[];return this.selectedRows.forEach((function(t){e.push(t.getData())})),e}},{key:"getSelectedRows",value:function(){var e=[];return this.selectedRows.forEach((function(t){e.push(t.getComponent())})),e}},{key:"_rowSelectionChanged",value:function(e){this.headerCheckboxElement&&(0===this.selectedRows.length?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),e||this.dispatchExternal("rowSelectionChanged",this.getSelectedData(),this.getSelectedRows())}},{key:"registerRowSelectCheckbox",value:function(e,t){e._row.modules.select||(e._row.modules.select={}),e._row.modules.select.checkboxEl=t}},{key:"registerHeaderSelectCheckbox",value:function(e){this.headerCheckboxElement=e}},{key:"childRowSelection",value:function(e,t){var i=this.table.modules.dataTree.getChildren(e,!0);if(t){var n,o=p(i);try{for(o.s();!(n=o.n()).done;){var a=n.value;this._selectRow(a,!0)}}catch(e){o.e(e)}finally{o.f()}}else{var r,s=p(i);try{for(s.s();!(r=s.n()).done;){var l=r.value;this._deselectRow(l,!0)}}catch(e){s.e(e)}finally{s.f()}}}}]),r}(N);function Ge(e,t,i,n,o,a,r){var s=window.DateTime||luxon.DateTime,l=r.format||"dd/MM/yyyy HH:mm:ss",u=r.alignEmptyValues,c=0;if(void 0!==s){if(e="iso"===l?s.fromISO(String(e)):s.fromFormat(String(e),l),t="iso"===l?s.fromISO(String(t)):s.fromFormat(String(t),l),e.isValid){if(t.isValid)return e-t;c=1}else c=t.isValid?-1:0;return("top"===u&&"desc"===a||"bottom"===u&&"asc"===a)&&(c*=-1),c}console.error("Sort Error - 'datetime' sorter is dependant on luxon.js")}je.moduleName="selectRow";var Ue={number:function(e,t,i,n,o,a,r){var s=r.alignEmptyValues,l=r.decimalSeparator,u=r.thousandSeparator,c=0;if(e=String(e),t=String(t),u&&(e=e.split(u).join(""),t=t.split(u).join("")),l&&(e=e.split(l).join("."),t=t.split(l).join(".")),e=parseFloat(e),t=parseFloat(t),isNaN(e))c=isNaN(t)?0:-1;else{if(!isNaN(t))return e-t;c=1}return("top"===s&&"desc"===a||"bottom"===s&&"asc"===a)&&(c*=-1),c},string:function(t,i,n,o,a,r,s){var l,u=s.alignEmptyValues,c=0;if(t){if(i){switch(e(s.locale)){case"boolean":s.locale&&(l=this.langLocale());break;case"string":l=s.locale}return String(t).toLowerCase().localeCompare(String(i).toLowerCase(),l)}c=1}else c=i?-1:0;return("top"===u&&"desc"===r||"bottom"===u&&"asc"===r)&&(c*=-1),c},date:function(e,t,i,n,o,a,r){return r.format||(r.format="dd/MM/yyyy"),Ge.call(this,e,t,i,n,o,a,r)},time:function(e,t,i,n,o,a,r){return r.format||(r.format="HH:mm"),Ge.call(this,e,t,i,n,o,a,r)},datetime:Ge,boolean:function(e,t,i,n,o,a,r){return(!0===e||"true"===e||"True"===e||1===e?1:0)-(!0===t||"true"===t||"True"===t||1===t?1:0)},array:function(e,t,i,n,o,a,r){var s=r.type||"length",l=r.alignEmptyValues,u=0;function c(e){switch(s){case"length":return e.length;case"sum":return e.reduce((function(e,t){return e+t}));case"max":return Math.max.apply(null,e);case"min":return Math.min.apply(null,e);case"avg":return e.reduce((function(e,t){return e+t}))/e.length}}if(Array.isArray(e)){if(Array.isArray(t))return(e?c(e):0)-(t?c(t):0);l=1}else l=Array.isArray(t)?-1:0;return("top"===l&&"desc"===a||"bottom"===l&&"asc"===a)&&(u*=-1),u},exists:function(e,t,i,n,o,a,r){return(void 0===e?0:1)-(void 0===t?0:1)},alphanum:function(e,t,i,n,o,a,r){var s,l,u,c,h,d=0,m=/(\d+)|(\D+)/g,p=/\d/,f=r.alignEmptyValues,g=0;if(e||0===e){if(t||0===t){if(isFinite(e)&&isFinite(t))return e-t;if((s=String(e).toLowerCase())===(l=String(t).toLowerCase()))return 0;if(!p.test(s)||!p.test(l))return s>l?1:-1;for(s=s.match(m),l=l.match(m),h=s.length>l.length?l.length:s.length;dc?1:-1;return s.length>l.length}g=1}else g=t||0===t?-1:0;return("top"===f&&"desc"===a||"bottom"===f&&"asc"===a)&&(g*=-1),g}},Xe=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).sortList=[],i.changed=!1,i.registerTableOption("sortMode","local"),i.registerTableOption("initialSort",!1),i.registerTableOption("columnHeaderSortMulti",!0),i.registerTableOption("sortOrderReverse",!1),i.registerTableOption("headerSortElement","
"),i.registerColumnOption("sorter"),i.registerColumnOption("sorterParams"),i.registerColumnOption("headerSort",!0),i.registerColumnOption("headerSortStartingDir"),i.registerColumnOption("headerSortTristate"),i}return o(r,[{key:"initialize",value:function(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),this.registerDataHandler(this.sort.bind(this),20),this.registerTableFunction("setSort",this.userSetSort.bind(this)),this.registerTableFunction("getSorters",this.getSort.bind(this)),this.registerTableFunction("clearSort",this.clearSort.bind(this)),"remote"===this.table.options.sortMode&&this.subscribe("data-params",this.remoteSortParams.bind(this))}},{key:"tableBuilt",value:function(){this.table.options.initialSort&&this.setSort(this.table.options.initialSort)}},{key:"remoteSortParams",value:function(e,t,i,n){var o=this.getSort();return o.forEach((function(e){delete e.column})),n.sort=o,n}},{key:"userSetSort",value:function(e,t){this.setSort(e,t),this.refreshSort()}},{key:"clearSort",value:function(){this.clear(),this.refreshSort()}},{key:"initializeColumn",value:function(t){var i,n,o=this,a=!1;switch(e(t.definition.sorter)){case"string":r.sorters[t.definition.sorter]?a=r.sorters[t.definition.sorter]:console.warn("Sort Error - No such sorter found: ",t.definition.sorter);break;case"function":a=t.definition.sorter}t.modules.sort={sorter:a,dir:"none",params:t.definition.sorterParams||{},startingDir:t.definition.headerSortStartingDir||"asc",tristate:t.definition.headerSortTristate},!1!==t.definition.headerSort&&((i=t.getElement()).classList.add("tabulator-sortable"),(n=document.createElement("div")).classList.add("tabulator-col-sorter"),"object"==e(this.table.options.headerSortElement)?n.appendChild(this.table.options.headerSortElement):n.innerHTML=this.table.options.headerSortElement,t.titleHolderElement.appendChild(n),t.modules.sort.element=n,i.addEventListener("click",(function(e){var i="",n=[],a=!1;if(t.modules.sort){if(t.modules.sort.tristate)i="none"==t.modules.sort.dir?t.modules.sort.startingDir:t.modules.sort.dir==t.modules.sort.startingDir?"asc"==t.modules.sort.dir?"desc":"asc":"none";else switch(t.modules.sort.dir){case"asc":i="desc";break;case"desc":i="asc";break;default:i=t.modules.sort.startingDir}o.table.options.columnHeaderSortMulti&&(e.shiftKey||e.ctrlKey)?((a=(n=o.getSort()).findIndex((function(e){return e.field===t.getField()})))>-1?(n[a].dir=i,a!=n.length-1&&(a=n.splice(a,1)[0],"none"!=i&&n.push(a))):"none"!=i&&n.push({column:t,dir:i}),o.setSort(n)):"none"==i?o.clear():o.setSort(t,i),o.refreshSort()}})))}},{key:"refreshSort",value:function(){"remote"===this.table.options.sortMode?this.reloadData():this.refreshData(!0)}},{key:"hasChanged",value:function(){var e=this.changed;return this.changed=!1,e}},{key:"getSort",value:function(){var e=[];return this.sortList.forEach((function(t){t.column&&e.push({column:t.column.getComponent(),field:t.column.getField(),dir:t.dir})})),e}},{key:"setSort",value:function(e,t){var i=this,n=[];Array.isArray(e)||(e=[{column:e,dir:t}]),e.forEach((function(e){var t;(t=i.table.columnManager.findColumn(e.column))?(e.column=t,n.push(e),i.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",e.column)})),i.sortList=n,this.dispatch("sort-changed")}},{key:"clear",value:function(){this.setSort([])}},{key:"findSorter",value:function(t){var i,n=this.table.rowManager.activeRows[0],o="string";if(n&&(n=n.getData(),t.getField()))switch(e(i=t.getFieldValue(n))){case"undefined":o="string";break;case"boolean":o="boolean";break;default:isNaN(i)||""===i?i.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(o="alphanum"):o="number"}return r.sorters[o]}},{key:"sort",value:function(e){var t=this,i=this.table.options.sortOrderReverse?t.sortList.slice().reverse():t.sortList,n=[],o=[];return this.subscribedExternal("dataSorting")&&this.dispatchExternal("dataSorting",t.getSort()),t.clearColumnHeaders(),"remote"!==this.table.options.sortMode?(i.forEach((function(e,i){var o=e.column.modules.sort;e.column&&o&&(o.sorter||(o.sorter=t.findSorter(e.column)),e.params="function"==typeof o.params?o.params(e.column.getComponent(),e.dir):o.params,n.push(e)),t.setColumnHeader(e.column,e.dir)})),n.length&&t._sortItems(e,n)):i.forEach((function(e,i){t.setColumnHeader(e.column,e.dir)})),this.subscribedExternal("dataSorted")&&(e.forEach((function(e){o.push(e.getComponent())})),this.dispatchExternal("dataSorted",t.getSort(),o)),e}},{key:"clearColumnHeaders",value:function(){this.table.columnManager.getRealColumns().forEach((function(e){e.modules.sort&&(e.modules.sort.dir="none",e.getElement().setAttribute("aria-sort","none"))}))}},{key:"setColumnHeader",value:function(e,t){e.modules.sort.dir=t,e.getElement().setAttribute("aria-sort",t)}},{key:"_sortItems",value:function(e,t){var i=this,n=t.length-1;e.sort((function(e,o){for(var a,r=n;r>=0;r--){var s=t[r];if(0!==(a=i._sortRow(e,o,s.column,s.dir,s.params)))break}return a}))}},{key:"_sortRow",value:function(e,t,i,n,o){var a,r,s="asc"==n?e:t,l="asc"==n?t:e;return e=void 0!==(e=i.getFieldValue(s.getData()))?e:"",t=void 0!==(t=i.getFieldValue(l.getData()))?t:"",a=s.getComponent(),r=l.getComponent(),i.modules.sort.sorter.call(this,e,t,a,r,i.getComponent(),n,o)}}]),r}(N);Xe.moduleName="sort",Xe.sorters=Ue;var qe={integer:function(e,t,i){return""===t||null==t||"number"==typeof(t=Number(t))&&isFinite(t)&&Math.floor(t)===t},float:function(e,t,i){return""===t||null==t||"number"==typeof(t=Number(t))&&isFinite(t)&&t%1!=0},numeric:function(e,t,i){return""===t||null==t||!isNaN(t)},string:function(e,t,i){return""===t||null==t||isNaN(t)},max:function(e,t,i){return""===t||null==t||parseFloat(t)<=i},min:function(e,t,i){return""===t||null==t||parseFloat(t)>=i},starts:function(e,t,i){return""===t||null==t||String(t).toLowerCase().startsWith(String(i).toLowerCase())},ends:function(e,t,i){return""===t||null==t||String(t).toLowerCase().endsWith(String(i).toLowerCase())},minLength:function(e,t,i){return""===t||null==t||String(t).length>=i},maxLength:function(e,t,i){return""===t||null==t||String(t).length<=i},in:function(e,t,i){return""===t||null==t||("string"==typeof i&&(i=i.split("|")),""===t||i.indexOf(t)>-1)},regex:function(e,t,i){return""===t||null==t||new RegExp(i).test(t)},unique:function(e,t,i){if(""===t||null==t)return!0;var n=!0,o=e.getData(),a=e.getColumn()._getSelf();return this.table.rowManager.rows.forEach((function(e){var i=e.getData();i!==o&&t==a.getFieldValue(i)&&(n=!1)})),n},required:function(e,t,i){return""!==t&&null!=t}},Ke=function(i){a(r,i);var n=c(r);function r(e){var i;return t(this,r),(i=n.call(this,e)).invalidCells=[],i.registerTableOption("validationMode","blocking"),i.registerColumnOption("validator"),i.registerTableFunction("getInvalidCells",i.getInvalidCells.bind(l(i))),i.registerTableFunction("clearCellValidation",i.userClearCellValidation.bind(l(i))),i.registerTableFunction("validate",i.userValidate.bind(l(i))),i.registerComponentFunction("cell","isValid",i.cellIsValid.bind(l(i))),i.registerComponentFunction("cell","clearValidation",i.clearValidation.bind(l(i))),i.registerComponentFunction("cell","validate",i.cellValidate.bind(l(i))),i.registerComponentFunction("column","validate",i.columnValidate.bind(l(i))),i.registerComponentFunction("row","validate",i.rowValidate.bind(l(i))),i}return o(r,[{key:"initialize",value:function(){this.subscribe("cell-delete",this.clearValidation.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this))}},{key:"cellIsValid",value:function(e){return!e.modules.validate||!e.modules.validate.invalid}},{key:"cellValidate",value:function(e){return this.validate(e.column.modules.validate,e,e.getValue())}},{key:"columnValidate",value:function(e){var t=this,i=[];return e.cells.forEach((function(e){t.cellValidate(e)||i.push(e.getComponent())})),!i.length||i}},{key:"rowValidate",value:function(e){var t=this,i=[];return e.cells.forEach((function(e){t.cellValidate(e)||i.push(e.getComponent())})),!i.length||i}},{key:"userClearCellValidation",value:function(e){var t=this;e||(e=this.getInvalidCells()),Array.isArray(e)||(e=[e]),e.forEach((function(e){t.clearValidation(e._getSelf())}))}},{key:"userValidate",value:function(e){var t=[];return this.table.rowManager.rows.forEach((function(e){var i=(e=e.getComponent()).validate();!0!==i&&(t=t.concat(i))})),!t.length||t}},{key:"initializeColumnCheck",value:function(e){void 0!==e.definition.validator&&this.initializeColumn(e)}},{key:"initializeColumn",value:function(e){var t,i=this,n=[];e.definition.validator&&(Array.isArray(e.definition.validator)?e.definition.validator.forEach((function(e){(t=i._extractValidator(e))&&n.push(t)})):(t=this._extractValidator(e.definition.validator))&&n.push(t),e.modules.validate=!!n.length&&n)}},{key:"_extractValidator",value:function(t){var i,n,o;switch(e(t)){case"string":return(o=t.indexOf(":"))>-1?(i=t.substring(0,o),n=t.substring(o+1)):i=t,this._buildValidator(i,n);case"function":return this._buildValidator(t);case"object":return this._buildValidator(t.type,t.parameters)}}},{key:"_buildValidator",value:function(e,t){var i="function"==typeof e?e:r.validators[e];return i?{type:"function"==typeof e?"function":e,func:i,params:t}:(console.warn("Validator Setup Error - No matching validator found:",e),!1)}},{key:"validate",value:function(e,t,i){var n=this,o=[],a=this.invalidCells.indexOf(t);return e&&e.forEach((function(e){e.func.call(n,t.getComponent(),i,e.params)||o.push({type:e.type,parameters:e.params})})),o=!o.length||o,t.modules.validate||(t.modules.validate={}),!0===o?(t.modules.validate.invalid=!1,t.getElement().classList.remove("tabulator-validation-fail"),a>-1&&this.invalidCells.splice(a,1)):(t.modules.validate.invalid=!0,"manual"!==this.table.options.validationMode&&t.getElement().classList.add("tabulator-validation-fail"),-1==a&&this.invalidCells.push(t)),o}},{key:"getInvalidCells",value:function(){var e=[];return this.invalidCells.forEach((function(t){e.push(t.getComponent())})),e}},{key:"clearValidation",value:function(e){var t;e.modules.validate&&e.modules.validate.invalid&&(e.getElement().classList.remove("tabulator-validation-fail"),e.modules.validate.invalid=!1,(t=this.invalidCells.indexOf(e))>-1&&this.invalidCells.splice(t,1))}}]),r}(N);Ke.moduleName="validate",Ke.validators=qe;var Ye=Object.freeze({__proto__:null,AccessorModule:K,AjaxModule:Q,ClipboardModule:ee,ColumnCalcsModule:ne,DataTreeModule:oe,DownloadModule:re,EditModule:ue,ExportModule:de,FilterModule:pe,FormatModule:ge,FrozenColumnsModule:ve,FrozenRowsModule:be,GroupRowsModule:Ce,HistoryModule:ke,HtmlTableImportModule:Ee,ImportModule:xe,InteractionModule:Te,KeybindingsModule:Me,MenuModule:Le,MoveColumnsModule:De,MoveRowsModule:Se,MutatorModule:Fe,PageModule:ze,PersistenceModule:Oe,PrintModule:_e,ReactiveDataModule:Be,ResizeColumnsModule:Ne,ResizeRowsModule:Ve,ResizeTableModule:Ie,ResponsiveLayoutModule:We,SelectRowModule:je,SortModule:Xe,ValidateModule:Ke}),Je=function(e){a(n,e);var i=c(n);function n(){return t(this,n),i.apply(this,arguments)}return n}(q);return new X(Je,Ye),Je})); //# sourceMappingURL=tabulator.min.js.map diff --git a/dist/js/tabulator.min.js.map b/dist/js/tabulator.min.js.map index 25bf9cd91..9ad185ed9 100644 --- a/dist/js/tabulator.min.js.map +++ b/dist/js/tabulator.min.js.map @@ -1 +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/TableRegistry.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/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/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/select.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/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/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/Validate/defaults/validators.js","../../src/js/modules/Validate/Validate.js","../../src/js/core/TabulatorFull.js"],"sourcesContent":["export default class CoreFeature{\r\n\r\n\tconstructor(table){\r\n\t\tthis.table = table;\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t/////////////// DataLoad /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\treloadData(data, silent){\r\n\t\treturn this.table.dataLoader.load(data, undefined, undefined, undefined, silent);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t///////////// Localization ///////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tlangText(){\r\n\t\treturn this.table.modules.localize.getText(...arguments);\r\n\t}\r\n\r\n\tlangBind(){\r\n\t\treturn this.table.modules.localize.bind(...arguments);\r\n\t}\r\n\r\n\tlangLocale(){\r\n\t\treturn this.table.modules.localize.getLocale(...arguments);\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t////////// Inter Table Comms /////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tcommsConnections(){\r\n\t\treturn this.table.modules.comms.getConnections(...arguments);\r\n\t}\r\n\r\n\tcommsSend(){\r\n\t\treturn this.table.modules.comms.send(...arguments);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Layout /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tlayoutMode(){\r\n\t\treturn this.table.modules.layout.getMode();\r\n\t}\r\n\r\n\tlayoutRefresh(){\r\n\t\treturn this.table.modules.layout.layout();\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t/////////////// Event Bus ////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tsubscribe(){\r\n\t\treturn this.table.eventBus.subscribe(...arguments);\r\n\t}\r\n\r\n\tunsubscribe(){\r\n\t\treturn this.table.eventBus.unsubscribe(...arguments);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.table.eventBus.subscribed(key);\r\n\t}\r\n\r\n\tsubscriptionChange(){\r\n\t\treturn this.table.eventBus.subscriptionChange(...arguments);\r\n\t}\r\n\r\n\tdispatch(){\r\n\t\treturn this.table.eventBus.dispatch(...arguments);\r\n\t}\r\n\r\n\tchain(){\r\n\t\treturn this.table.eventBus.chain(...arguments);\r\n\t}\r\n\r\n\tconfirm(){\r\n\t\treturn this.table.eventBus.confirm(...arguments);\r\n\t}\r\n\r\n\tdispatchExternal(){\r\n\t\treturn this.table.externalEvents.dispatch(...arguments);\r\n\t}\r\n\r\n\tsubscribedExternal(key){\r\n\t\treturn this.table.externalEvents.subscribed(key);\r\n\t}\r\n\r\n\tsubscriptionChangeExternal(){\r\n\t\treturn this.table.externalEvents.subscriptionChange(...arguments);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Options /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\toptions(key){\r\n\t\treturn this.table.options[key];\r\n\t}\r\n\r\n\tsetOption(key, value){\r\n\t\tif(typeof value !== \"undefined\"){\r\n\t\t\tthis.table.options[key] = value;\r\n\t\t}\r\n\r\n\t\treturn this.table.options[key];\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Modules /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tmodule(key){\r\n\t\treturn this.table.module(key);\r\n\t}\r\n}","import Column from './Column.js';\r\n\r\n//public column object\r\nexport default class ColumnComponent {\r\n\tconstructor (column){\r\n\t\tthis._column = column;\r\n\t\tthis.type = \"ColumnComponent\";\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._column.table.componentFunctionBinder.handle(\"column\", target._column, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._column.getElement();\r\n\t}\r\n\r\n\tgetDefinition(){\r\n\t\treturn this._column.getDefinition();\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._column.getField();\r\n\t}\r\n\r\n\tgetTitleDownload() {\r\n\t\treturn this._column.getTitleDownload();\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._column.cells.forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tisVisible(){\r\n\t\treturn this._column.visible;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tif(this._column.isGroup){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\tcolumn.show();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis._column.show();\r\n\t\t}\r\n\t}\r\n\r\n\thide(){\r\n\t\tif(this._column.isGroup){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\tcolumn.hide();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis._column.hide();\r\n\t\t}\r\n\t}\r\n\r\n\ttoggle(){\r\n\t\tif(this._column.visible){\r\n\t\t\tthis.hide();\r\n\t\t}else{\r\n\t\t\tthis.show();\r\n\t\t}\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn this._column.delete();\r\n\t}\r\n\r\n\tgetSubColumns(){\r\n\t\tvar output = [];\r\n\r\n\t\tif(this._column.columns.length){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\toutput.push(column.getComponent());\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetParentColumn(){\r\n\t\treturn this._column.parent instanceof Column ? this._column.parent.getComponent() : false;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._column;\r\n\t}\r\n\r\n\tscrollTo(){\r\n\t\treturn this._column.table.columnManager.scrollToColumn(this._column);\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._column.table;\r\n\t}\r\n\r\n\tmove(to, after){\r\n\t\tvar toColumn = this._column.table.columnManager.findColumn(to);\r\n\r\n\t\tif(toColumn){\r\n\t\t\tthis._column.table.columnManager.moveColumn(this._column, toColumn, after)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching column found:\", toColumn);\r\n\t\t}\r\n\t}\r\n\r\n\tgetNextColumn(){\r\n\t\tvar nextCol = this._column.nextColumn();\r\n\r\n\t\treturn nextCol ? nextCol.getComponent() : false;\r\n\t}\r\n\r\n\tgetPrevColumn(){\r\n\t\tvar prevCol = this._column.prevColumn();\r\n\r\n\t\treturn prevCol ? prevCol.getComponent() : false;\r\n\t}\r\n\r\n\tupdateDefinition(updates){\r\n\t\treturn this._column.updateDefinition(updates);\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\treturn this._column.getWidth();\r\n\t}\r\n\r\n\tsetWidth(width){\r\n\t\tvar result;\r\n\r\n\t\tif(width === true){\r\n\t\t\tresult = this._column.reinitializeWidth(true);\r\n\t\t}else{\r\n\t\t\tresult = this._column.setWidth(width);\r\n\t\t}\r\n\r\n\t\tthis._column.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\treturn result;\r\n\t}\r\n}","export default {\r\n\t\"title\": undefined,\r\n\t\"field\": undefined,\r\n\t\"columns\": undefined,\r\n\t\"visible\": undefined,\r\n\t\"hozAlign\": undefined,\r\n\t\"vertAlign\": undefined,\r\n\t\"width\": undefined,\r\n\t\"minWidth\": 40,\r\n\t\"maxWidth\": undefined,\r\n\t\"maxInitialWidth\": undefined,\r\n\t\"tooltip\": undefined,\r\n\t\"cssClass\": undefined,\r\n\t\"variableHeight\": undefined,\r\n\t\"headerTooltip\": undefined,\r\n\t\"headerVertical\": undefined,\r\n\t\"headerHozAlign\": undefined,\r\n\t\"editableTitle\": undefined,\r\n}","//public cell object\r\nexport default class CellComponent {\r\n\r\n\tconstructor (cell){\r\n\t\tthis._cell = cell;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._cell.table.componentFunctionBinder.handle(\"cell\", target._cell, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetValue(){\r\n\t\treturn this._cell.getValue();\r\n\t}\r\n\r\n\tgetOldValue(){\r\n\t\treturn this._cell.getOldValue();\r\n\t}\r\n\r\n\tgetInitialValue(){\r\n\t\treturn this._cell.initialValue;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._cell.getElement();\r\n\t}\r\n\r\n\tgetRow(){\r\n\t\treturn this._cell.row.getComponent();\r\n\t}\r\n\r\n\tgetData(){\r\n\t\treturn this._cell.row.getData();\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._cell.column.getField();\r\n\t}\r\n\r\n\tgetColumn(){\r\n\t\treturn this._cell.column.getComponent();\r\n\t}\r\n\r\n\tsetValue(value, mutate){\r\n\t\tif(typeof mutate == \"undefined\"){\r\n\t\t\tmutate = true;\r\n\t\t}\r\n\r\n\t\tthis._cell.setValue(value, mutate);\r\n\t}\r\n\r\n\trestoreOldValue(){\r\n\t\tthis._cell.setValueActual(this._cell.getOldValue());\r\n\t}\r\n\r\n\trestoreInitialValue(){\r\n\t\tthis._cell.setValueActual(this._cell.initialValue);\r\n\t}\r\n\r\n\tcheckHeight(){\r\n\t\tthis._cell.checkHeight();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._cell.table;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._cell;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport CellComponent from './CellComponent.js';\r\n\r\nexport default class Cell extends CoreFeature{\r\n\tconstructor(column, row){\r\n\t\tsuper(column.table);\r\n\r\n\t\tthis.table = column.table;\r\n\t\tthis.column = column;\r\n\t\tthis.row = row;\r\n\t\tthis.element = null;\r\n\t\tthis.value = null;\r\n\t\tthis.initialValue;\r\n\t\tthis.oldValue = null;\r\n\t\tthis.modules = {};\r\n\r\n\t\tthis.height = null;\r\n\t\tthis.width = null;\r\n\t\tthis.minWidth = null;\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\tthis.loaded = false; //track if the cell has been added to the DOM yet\r\n\r\n\t\tthis.build();\r\n\t}\r\n\r\n\t//////////////// Setup Functions /////////////////\r\n\t//generate element\r\n\tbuild(){\r\n\t\tthis.generateElement();\r\n\r\n\t\tthis.setWidth();\r\n\r\n\t\tthis._configureCell();\r\n\r\n\t\tthis.setValueActual(this.column.getFieldValue(this.row.data));\r\n\r\n\t\tthis.initialValue = this.value;\r\n\t}\r\n\r\n\tgenerateElement(){\r\n\t\tthis.element = document.createElement('div');\r\n\t\tthis.element.className = \"tabulator-cell\";\r\n\t\tthis.element.setAttribute(\"role\", \"gridcell\");\r\n\t\tthis.element = this.element;\r\n\t}\r\n\r\n\t_configureCell(){\r\n\t\tvar element = this.element,\r\n\t\tfield = this.column.getField(),\r\n\t\tvertAligns = {\r\n\t\t\ttop:\"flex-start\",\r\n\t\t\tbottom:\"flex-end\",\r\n\t\t\tmiddle:\"center\",\r\n\t\t},\r\n\t\thozAligns = {\r\n\t\t\tleft:\"flex-start\",\r\n\t\t\tright:\"flex-end\",\r\n\t\t\tcenter:\"center\",\r\n\t\t};\r\n\r\n\t\t//set text alignment\r\n\t\telement.style.textAlign = this.column.hozAlign;\r\n\r\n\t\tif(this.column.vertAlign){\r\n\t\t\telement.style.display = \"inline-flex\";\r\n\r\n\t\t\telement.style.alignItems = vertAligns[this.column.vertAlign] || \"\";\r\n\r\n\t\t\tif(this.column.hozAlign){\r\n\t\t\t\telement.style.justifyContent = hozAligns[this.column.hozAlign] || \"\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(field){\r\n\t\t\telement.setAttribute(\"tabulator-field\", field);\r\n\t\t}\r\n\r\n\t\t//add class to cell if needed\r\n\t\tif(this.column.definition.cssClass){\r\n\t\t\tvar classNames = this.column.definition.cssClass.split(\" \")\r\n\t\t\tclassNames.forEach((className) => {\r\n\t\t\t\telement.classList.add(className)\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t//update tooltip on mouse enter\r\n\t\tif (this.table.options.tooltipGenerationMode === \"hover\"){\r\n\t\t\telement.addEventListener(\"mouseenter\", (e) => {\r\n\t\t\t\tthis._generateTooltip();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"cell-init\", this);\r\n\r\n\t\t//hide cell if not visible\r\n\t\tif(!this.column.visible){\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\r\n\t//generate cell contents\r\n\t_generateContents(){\r\n\t\tvar val;\r\n\r\n\t\tval = this.chain(\"cell-format\", this, null, () => {\r\n\t\t\treturn this.element.innerHTML = this.value;\r\n\t\t});\r\n\r\n\t\tswitch(typeof val){\r\n\t\t\tcase \"object\":\r\n\t\t\tif(val instanceof Node){\r\n\r\n\t\t\t\t//clear previous cell contents\r\n\t\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\t\tthis.element.appendChild(val);\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.innerHTML = \"\";\r\n\r\n\t\t\t\tif(val != null){\r\n\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);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\tcase \"null\":\r\n\t\t\tthis.element.innerHTML = \"\";\r\n\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\tthis.element.innerHTML = val;\r\n\t\t}\r\n\t}\r\n\r\n\tcellRendered(){\r\n\t\tthis.dispatch(\"cell-rendered\", this);\r\n\t}\r\n\r\n\t//generate tooltip text\r\n\t_generateTooltip(){\r\n\t\tvar tooltip = this.column.tooltip;\r\n\r\n\t\tif(tooltip){\r\n\t\t\tif(tooltip === true){\r\n\t\t\t\ttooltip = this.value;\r\n\t\t\t}else if(typeof(tooltip) == \"function\"){\r\n\t\t\t\ttooltip = tooltip(this.getComponent());\r\n\r\n\t\t\t\tif(tooltip === false){\r\n\t\t\t\t\ttooltip = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof tooltip === \"undefined\"){\r\n\t\t\t\ttooltip = \"\";\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.setAttribute(\"title\", tooltip);\r\n\t\t}else{\r\n\t\t\tthis.element.setAttribute(\"title\", \"\");\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////////// Getters ////////////////////\r\n\tgetElement(containerOnly){\r\n\t\tif(!this.loaded){\r\n\t\t\tthis.loaded = true;\r\n\t\t\tif(!containerOnly){\r\n\t\t\t\tthis.layoutElement();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tgetValue(){\r\n\t\treturn this.value;\r\n\t}\r\n\r\n\tgetOldValue(){\r\n\t\treturn this.oldValue;\r\n\t}\r\n\r\n\t//////////////////// Actions ////////////////////\r\n\tsetValue(value, mutate){\r\n\t\tvar changed = this.setValueProcessData(value, mutate);\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.dispatch(\"cell-value-updated\", this);\r\n\r\n\t\t\tthis.cellRendered();\r\n\r\n\t\t\tif(this.column.definition.cellEdited){\r\n\t\t\t\tthis.column.definition.cellEdited.call(this.table, this.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"cellEdited\", this.getComponent());\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tsetValueProcessData(value, mutate){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(this.value !== value){\r\n\r\n\t\t\tchanged = true;\r\n\r\n\t\t\tif(mutate){\r\n\t\t\t\tvalue = this.chain(\"cell-value-changing\", [this, value], null, value);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.setValueActual(value);\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.dispatch(\"cell-value-changed\", this);\r\n\t\t}\r\n\r\n\t\treturn changed;\r\n\t}\r\n\r\n\tsetValueActual(value){\r\n\t\tthis.oldValue = this.value;\r\n\r\n\t\tthis.value = value;\r\n\r\n\t\tthis.dispatch(\"cell-value-save-before\", this);\r\n\r\n\t\tthis.column.setFieldValue(this.row.data, value);\r\n\r\n\t\tthis.dispatch(\"cell-value-save-after\", this);\r\n\r\n\t\tif(this.loaded){\r\n\t\t\tthis.layoutElement();\r\n\t\t}\r\n\t}\r\n\r\n\tlayoutElement(){\r\n\t\tthis._generateContents();\r\n\t\tthis._generateTooltip();\r\n\r\n\t\tthis.dispatch(\"cell-layout\", this);\r\n\t}\r\n\r\n\tsetWidth(){\r\n\t\tthis.width = this.column.width;\r\n\t\tthis.element.style.width = this.column.widthStyled;\r\n\t}\r\n\r\n\tclearWidth(){\r\n\t\tthis.width = \"\";\r\n\t\tthis.element.style.width = \"\";\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\treturn this.width || this.element.offsetWidth;\r\n\t}\r\n\r\n\tsetMinWidth(){\r\n\t\tthis.minWidth = this.column.minWidth;\r\n\t\tthis.element.style.minWidth = this.column.minWidthStyled;\r\n\t}\r\n\r\n\tsetMaxWidth(){\r\n\t\tthis.maxWidth = this.column.maxWidth;\r\n\t\tthis.element.style.maxWidth = this.column.maxWidthStyled;\r\n\t}\r\n\r\n\tcheckHeight(){\r\n\t\t// var height = this.element.css(\"height\");\r\n\t\tthis.row.reinitializeHeight();\r\n\t}\r\n\r\n\tclearHeight(){\r\n\t\tthis.element.style.height = \"\";\r\n\t\tthis.height = null;\r\n\t}\r\n\r\n\tsetHeight(){\r\n\t\tthis.height = this.row.height;\r\n\t\tthis.element.style.height = this.row.heightStyled;\r\n\t}\r\n\r\n\tgetHeight(){\r\n\t\treturn this.height || this.element.offsetHeight;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tthis.element.style.display = this.column.vertAlign ? \"inline-flex\" : \"\";\r\n\t}\r\n\r\n\thide(){\r\n\t\tthis.element.style.display = \"none\";\r\n\t}\r\n\r\n\tdelete(){\r\n\t\tthis.dispatch(\"cell-delete\", this);\r\n\r\n\t\tif(!this.table.rowManager.redrawBlock && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.column.deleteCell(this);\r\n\t\tthis.row.deleteCell(this);\r\n\t\tthis.calcs = {};\r\n\t}\r\n\r\n\tgetIndex(){\r\n\t\treturn this.row.getCellIndex(this);\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new CellComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport ColumnComponent from './ColumnComponent.js';\r\nimport defaultOptions from './defaults/options.js';\r\n\r\nimport Cell from '../cell/Cell.js';\r\n\r\nclass Column extends CoreFeature{\r\n\r\n\tconstructor(def, parent){\r\n\t\tsuper(parent.table);\r\n\r\n\t\tthis.definition = def; //column definition\r\n\t\tthis.parent = parent; //hold parent object\r\n\t\tthis.type = \"column\"; //type of element\r\n\t\tthis.columns = []; //child columns\r\n\t\tthis.cells = []; //cells bound to this column\r\n\t\tthis.element = this.createElement(); //column header element\r\n\t\tthis.contentElement = false;\r\n\t\tthis.titleHolderElement = false;\r\n\t\tthis.titleElement = false;\r\n\t\tthis.groupElement = this.createGroupElement(); //column group holder element\r\n\t\tthis.isGroup = false;\r\n\t\tthis.tooltip = false; //hold column tooltip\r\n\t\tthis.hozAlign = \"\"; //horizontal text alignment\r\n\t\tthis.vertAlign = \"\"; //vert text alignment\r\n\r\n\t\t//multi dimensional filed handling\r\n\t\tthis.field =\"\";\r\n\t\tthis.fieldStructure = \"\";\r\n\t\tthis.getFieldValue = \"\";\r\n\t\tthis.setFieldValue = \"\";\r\n\r\n\t\tthis.titleDownload = null;\r\n\t\tthis.titleFormatterRendered = false;\r\n\r\n\t\tthis.mapDefinitions();\r\n\r\n\t\tthis.setField(this.definition.field);\r\n\r\n\t\tthis.modules = {}; //hold module variables;\r\n\r\n\t\tthis.width = null; //column width\r\n\t\tthis.widthStyled = \"\"; //column width prestyled to improve render efficiency\r\n\t\tthis.maxWidth = null; //column maximum width\r\n\t\tthis.maxWidthStyled = \"\"; //column maximum prestyled to improve render efficiency\r\n\t\tthis.maxInitialWidth = null;\r\n\t\tthis.minWidth = null; //column minimum width\r\n\t\tthis.minWidthStyled = \"\"; //column minimum prestyled to improve render efficiency\r\n\t\tthis.widthFixed = false; //user has specified a width for this column\r\n\r\n\t\tthis.visible = true; //default visible state\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\t//initialize column\r\n\t\tif(this.definition.columns){\r\n\r\n\t\t\tthis.isGroup = true;\r\n\r\n\t\t\tthis.definition.columns.forEach((def, i) => {\r\n\t\t\t\tvar newCol = new Column(def, this);\r\n\t\t\t\tthis.attachColumn(newCol);\r\n\t\t\t});\r\n\r\n\t\t\tthis.checkColumnVisibility();\r\n\t\t}else{\r\n\t\t\tparent.registerColumnField(this);\r\n\t\t}\r\n\r\n\t\tthis._initialize();\r\n\r\n\t\tthis.bindModuleColumns();\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-col\");\r\n\t\tel.setAttribute(\"role\", \"columnheader\");\r\n\t\tel.setAttribute(\"aria-sort\", \"none\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateGroupElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-col-group-cols\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tmapDefinitions(){\r\n\t\tvar defaults = this.table.options.columnDefaults;\r\n\r\n\t\t//map columnDefaults onto column definitions\r\n\t\tif(defaults){\r\n\t\t\tfor(let key in defaults){\r\n\t\t\t\tif(typeof this.definition[key] === \"undefined\"){\r\n\t\t\t\t\tthis.definition[key] = defaults[key];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.definition = this.table.columnManager.optionsList.generate(Column.defaultOptionList, this.definition)\r\n\t}\r\n\r\n\tcheckDefinition(){\r\n\t\tObject.keys(this.definition).forEach((key) => {\r\n\t\t\tif(Column.defaultOptionList.indexOf(key) === -1){\r\n\t\t\t\tconsole.warn(\"Invalid column definition option in '\" + (this.field || this.definition.title) + \"' column:\", key)\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tsetField(field){\r\n\t\tthis.field = field;\r\n\t\tthis.fieldStructure = field ? (this.table.options.nestedFieldSeparator ? field.split(this.table.options.nestedFieldSeparator) : [field]) : [];\r\n\t\tthis.getFieldValue = this.fieldStructure.length > 1 ? this._getNestedData : this._getFlatData;\r\n\t\tthis.setFieldValue = this.fieldStructure.length > 1 ? this._setNestedData : this._setFlatData;\r\n\t}\r\n\r\n\t//register column position with column manager\r\n\tregisterColumnPosition(column){\r\n\t\tthis.parent.registerColumnPosition(column);\r\n\t}\r\n\r\n\t//register column position with column manager\r\n\tregisterColumnField(column){\r\n\t\tthis.parent.registerColumnField(column);\r\n\t}\r\n\r\n\t//trigger position registration\r\n\treRegisterPosition(){\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tcolumn.reRegisterPosition();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis.registerColumnPosition(this);\r\n\t\t}\r\n\t}\r\n\r\n\t_mapDepricatedFunctionality(){\r\n\t\t//all previously deprecated functionality removed in the 5.0 release\r\n\t}\r\n\r\n\tsetTooltip(){\r\n\t\tvar def = this.definition;\r\n\r\n\t\t//set header tooltips\r\n\t\tvar tooltip = def.headerTooltip;\r\n\r\n\t\tif(tooltip){\r\n\t\t\tif(tooltip === true){\r\n\t\t\t\tif(def.field){\r\n\t\t\t\t\tthis.langBind(\"columns|\" + def.field, (value) => {\r\n\t\t\t\t\t\tthis.element.setAttribute(\"title\", value || def.title);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.element.setAttribute(\"title\", def.title);\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tif(typeof(tooltip) == \"function\"){\r\n\t\t\t\t\ttooltip = tooltip(this.getComponent());\r\n\r\n\t\t\t\t\tif(tooltip === false){\r\n\t\t\t\t\t\ttooltip = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.element.setAttribute(\"title\", tooltip);\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tthis.element.setAttribute(\"title\", \"\");\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element\r\n\t_initialize(){\r\n\t\tvar def = this.definition;\r\n\r\n\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\tif(def.headerVertical){\r\n\t\t\tthis.element.classList.add(\"tabulator-col-vertical\");\r\n\r\n\t\t\tif(def.headerVertical === \"flip\"){\r\n\t\t\t\tthis.element.classList.add(\"tabulator-col-vertical-flip\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.contentElement = this._bindEvents();\r\n\r\n\t\tthis.contentElement = this._buildColumnHeaderContent();\r\n\r\n\t\tthis.element.appendChild(this.contentElement);\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis._buildGroupHeader();\r\n\t\t}else{\r\n\t\t\tthis._buildColumnHeader();\r\n\t\t}\r\n\r\n\t\tthis.setTooltip();\r\n\r\n\t\tthis.dispatch(\"column-init\", this);\r\n\r\n\t\t//update header tooltip on mouse enter\r\n\t\tthis.element.addEventListener(\"mouseenter\", (e) => {\r\n\t\t\tthis.setTooltip();\r\n\t\t});\r\n\t}\r\n\r\n\t_bindEvents(){\r\n\t\tvar def = this.definition,\r\n\t\tdblTap,\ttapHold, tap;\r\n\r\n\t\t//setup header click event bindings\r\n\t\tif(typeof(def.headerClick) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"click\", (e) => {def.headerClick(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerDblClick) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"dblclick\", (e) => {def.headerDblClick(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerContext) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"contextmenu\", (e) => {def.headerContext(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\t//setup header tap event bindings\r\n\t\tif(typeof(def.headerTap) == \"function\"){\r\n\t\t\ttap = false;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchstart\", (e) => {\r\n\t\t\t\ttap = true;\r\n\t\t\t}, {passive: true});\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\t\t\t\tif(tap){\r\n\t\t\t\t\tdef.headerTap(e, this.getComponent());\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttap = false;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerDblTap) == \"function\"){\r\n\t\t\tdblTap = null;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\r\n\t\t\t\tif(dblTap){\r\n\t\t\t\t\tclearTimeout(dblTap);\r\n\t\t\t\t\tdblTap = null;\r\n\r\n\t\t\t\t\tdef.headerDblTap(e, this.getComponent());\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tdblTap = setTimeout(() => {\r\n\t\t\t\t\t\tclearTimeout(dblTap);\r\n\t\t\t\t\t\tdblTap = null;\r\n\t\t\t\t\t}, 300);\r\n\t\t\t\t}\r\n\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerTapHold) == \"function\"){\r\n\t\t\ttapHold = null;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchstart\", (e) => {\r\n\t\t\t\tclearTimeout(tapHold);\r\n\r\n\t\t\t\ttapHold = setTimeout(function(){\r\n\t\t\t\t\tclearTimeout(tapHold);\r\n\t\t\t\t\ttapHold = null;\r\n\t\t\t\t\ttap = false;\r\n\t\t\t\t\tdef.headerTapHold(e, this.getComponent());\r\n\t\t\t\t}, 1000);\r\n\r\n\t\t\t}, {passive: true});\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\t\t\t\tclearTimeout(tapHold);\r\n\t\t\t\ttapHold = null;\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element for header\r\n\t_buildColumnHeader(){\r\n\t\tvar def = this.definition,\r\n\t\ttable = this.table;\r\n\r\n\t\tthis.dispatch(\"column-layout\", this);\r\n\r\n\t\t//set column visibility\r\n\t\tif(typeof def.visible != \"undefined\"){\r\n\t\t\tif(def.visible){\r\n\t\t\t\tthis.show(true);\r\n\t\t\t}else{\r\n\t\t\t\tthis.hide(true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//asign additional css classes to column header\r\n\t\tif(def.cssClass){\r\n\t\t\tvar classeNames = def.cssClass.split(\" \");\r\n\t\t\tclasseNames.forEach((className) => {\r\n\t\t\t\tthis.element.classList.add(className);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(def.field){\r\n\t\t\tthis.element.setAttribute(\"tabulator-field\", def.field);\r\n\t\t}\r\n\r\n\t\t//set min width if present\r\n\t\tthis.setMinWidth(parseInt(def.minWidth));\r\n\r\n\t\tif (def.maxInitialWidth) {\r\n\t\t\tthis.maxInitialWidth = parseInt(def.maxInitialWidth);\r\n\t\t}\r\n\t\t\r\n\t\tif(def.maxWidth){\r\n\t\t\tthis.setMaxWidth(parseInt(def.maxWidth));\r\n\t\t}\r\n\r\n\t\tthis.reinitializeWidth();\r\n\r\n\t\t//set tooltip if present\r\n\t\tthis.tooltip = this.definition.tooltip;\r\n\r\n\t\t//set orizontal text alignment\r\n\t\tthis.hozAlign = this.definition.hozAlign;\r\n\t\tthis.vertAlign = this.definition.vertAlign;\r\n\r\n\t\tthis.titleElement.style.textAlign = this.definition.headerHozAlign;\r\n\t}\r\n\r\n\t_buildColumnHeaderContent(){\r\n\t\tvar def = this.definition,\r\n\t\ttable = this.table;\r\n\r\n\t\tvar contentElement = document.createElement(\"div\");\r\n\t\tcontentElement.classList.add(\"tabulator-col-content\");\r\n\r\n\t\tthis.titleHolderElement = document.createElement(\"div\");\r\n\t\tthis.titleHolderElement.classList.add(\"tabulator-col-title-holder\");\r\n\r\n\t\tcontentElement.appendChild(this.titleHolderElement);\r\n\r\n\t\tthis.titleElement = this._buildColumnHeaderTitle();\r\n\r\n\t\tthis.titleHolderElement.appendChild(this.titleElement);\r\n\r\n\t\treturn contentElement;\r\n\t}\r\n\r\n\t//build title element of column\r\n\t_buildColumnHeaderTitle(){\r\n\t\tvar def = this.definition,\r\n\t\ttitle;\r\n\r\n\t\tvar titleHolderElement = document.createElement(\"div\");\r\n\t\ttitleHolderElement.classList.add(\"tabulator-col-title\");\r\n\r\n\t\tif(def.editableTitle){\r\n\t\t\tvar titleElement = document.createElement(\"input\");\r\n\t\t\ttitleElement.classList.add(\"tabulator-title-editor\");\r\n\r\n\t\t\ttitleElement.addEventListener(\"click\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\ttitleElement.focus();\r\n\t\t\t});\r\n\r\n\t\t\ttitleElement.addEventListener(\"change\", () => {\r\n\t\t\t\tdef.title = titleElement.value;\r\n\t\t\t\tthis.dispatchExternal(\"columnTitleChanged\", this.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\ttitleHolderElement.appendChild(titleElement);\r\n\r\n\t\t\tif(def.field){\r\n\t\t\t\tthis.langBind(\"columns|\" + def.field, (text) => {\r\n\t\t\t\t\ttitleElement.value = text || (def.title || \" \");\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\ttitleElement.value = def.title || \" \";\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tif(def.field){\r\n\t\t\t\tthis.langBind(\"columns|\" + def.field, (text) => {\r\n\t\t\t\t\tthis._formatColumnHeaderTitle(titleHolderElement, text || (def.title || \" \"));\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tthis._formatColumnHeaderTitle(titleHolderElement, def.title || \" \");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn titleHolderElement;\r\n\t}\r\n\r\n\t_formatColumnHeaderTitle(el, title){\r\n\t\tvar contents = this.chain(\"column-format\", [this, title, el], null, () => {\r\n\t\t\treturn title;\r\n\t\t});\r\n\r\n\t\tswitch(typeof contents){\r\n\t\t\tcase \"object\":\r\n\t\t\tif(contents instanceof Node){\r\n\t\t\t\tel.appendChild(contents);\r\n\t\t\t}else{\r\n\t\t\t\tel.innerHTML = \"\";\r\n\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);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\tcase \"null\":\r\n\t\t\tel.innerHTML = \"\";\r\n\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\tel.innerHTML = contents;\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element for column group\r\n\t_buildGroupHeader(){\r\n\t\tthis.element.classList.add(\"tabulator-col-group\");\r\n\t\tthis.element.setAttribute(\"role\", \"columngroup\");\r\n\t\tthis.element.setAttribute(\"aria-title\", this.definition.title);\r\n\r\n\t\t//asign additional css classes to column header\r\n\t\tif(this.definition.cssClass){\r\n\t\t\tvar classeNames = this.definition.cssClass.split(\" \");\r\n\t\t\tclasseNames.forEach((className) => {\r\n\t\t\t\tthis.element.classList.add(className);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.titleElement.style.textAlign = this.definition.headerHozAlign;\r\n\r\n\t\tthis.element.appendChild(this.groupElement);\r\n\t}\r\n\r\n\t//flat field lookup\r\n\t_getFlatData(data){\r\n\t\treturn data[this.field];\r\n\t}\r\n\r\n\t//nested field lookup\r\n\t_getNestedData(data){\r\n\t\tvar dataObj = data,\r\n\t\tstructure = this.fieldStructure,\r\n\t\tlength = structure.length,\r\n\t\toutput;\r\n\r\n\t\tfor(let i = 0; i < length; i++){\r\n\r\n\t\t\tdataObj = dataObj[structure[i]];\r\n\r\n\t\t\toutput = dataObj;\r\n\r\n\t\t\tif(!dataObj){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//flat field set\r\n\t_setFlatData(data, value){\r\n\t\tif(this.field){\r\n\t\t\tdata[this.field] = value;\r\n\t\t}\r\n\t}\r\n\r\n\t//nested field set\r\n\t_setNestedData(data, value){\r\n\t\tvar dataObj = data,\r\n\t\tstructure = this.fieldStructure,\r\n\t\tlength = structure.length;\r\n\r\n\t\tfor(let i = 0; i < length; i++){\r\n\r\n\t\t\tif(i == length -1){\r\n\t\t\t\tdataObj[structure[i]] = value;\r\n\t\t\t}else{\r\n\t\t\t\tif(!dataObj[structure[i]]){\r\n\t\t\t\t\tif(typeof value !== \"undefined\"){\r\n\t\t\t\t\t\tdataObj[structure[i]] = {};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdataObj = dataObj[structure[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//attach column to this group\r\n\tattachColumn(column){\r\n\t\tif(this.groupElement){\r\n\t\t\tthis.columns.push(column);\r\n\t\t\tthis.groupElement.appendChild(column.getElement());\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Warning - Column being attached to another column instead of column group\");\r\n\t\t}\r\n\t}\r\n\r\n\t//vertically align header in column\r\n\tverticalAlign(alignment, height){\r\n\r\n\t\t//calculate height of column header and group holder element\r\n\t\tvar parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : (height || this.parent.getHeadersElement().clientHeight);\r\n\t\t// var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : this.parent.getHeadersElement().clientHeight;\r\n\r\n\t\tthis.element.style.height = parentHeight + \"px\";\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.groupElement.style.minHeight = (parentHeight - this.contentElement.offsetHeight) + \"px\";\r\n\t\t}\r\n\r\n\t\t//vertically align cell contents\r\n\t\tif(!this.isGroup && alignment !== \"top\"){\r\n\t\t\tif(alignment === \"bottom\"){\r\n\t\t\t\tthis.element.style.paddingTop = (this.element.clientHeight - this.contentElement.offsetHeight) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.paddingTop = ((this.element.clientHeight - this.contentElement.offsetHeight) / 2) + \"px\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.verticalAlign(alignment);\r\n\t\t});\r\n\t}\r\n\r\n\t//clear vertical alignmenet\r\n\tclearVerticalAlign(){\r\n\t\tthis.element.style.paddingTop = \"\";\r\n\t\tthis.element.style.height = \"\";\r\n\t\tthis.element.style.minHeight = \"\";\r\n\t\tthis.groupElement.style.minHeight = \"\";\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.clearVerticalAlign();\r\n\t\t});\r\n\t}\r\n\r\n\tbindModuleColumns (){\r\n\t\t//check if rownum formatter is being used on a column\r\n\t\tif(this.definition.formatter == \"rownum\"){\r\n\t\t\tthis.table.rowManager.rowNumColumn = this;\r\n\t\t}\r\n\t}\r\n\r\n\t//// Retreive Column Information ////\r\n\t//return column header element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\t//return colunm group element\r\n\tgetGroupElement(){\r\n\t\treturn this.groupElement;\r\n\t}\r\n\r\n\t//return field name\r\n\tgetField(){\r\n\t\treturn this.field;\r\n\t}\r\n\r\n\tgetTitleDownload() {\r\n\t\treturn this.titleDownload;\r\n\t}\r\n\r\n\t//return the first column in a group\r\n\tgetFirstColumn(){\r\n\t\tif(!this.isGroup){\r\n\t\t\treturn this;\r\n\t\t}else{\r\n\t\t\tif(this.columns.length){\r\n\t\t\t\treturn this.columns[0].getFirstColumn();\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//return the last column in a group\r\n\tgetLastColumn(){\r\n\t\tif(!this.isGroup){\r\n\t\t\treturn this;\r\n\t\t}else{\r\n\t\t\tif(this.columns.length){\r\n\t\t\t\treturn this.columns[this.columns.length -1].getLastColumn();\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//return all columns in a group\r\n\tgetColumns(){\r\n\t\treturn this.columns;\r\n\t}\r\n\r\n\t//return all columns in a group\r\n\tgetCells(){\r\n\t\treturn this.cells;\r\n\t}\r\n\r\n\t//retreive the top column in a group of columns\r\n\tgetTopColumn(){\r\n\t\tif(this.parent.isGroup){\r\n\t\t\treturn this.parent.getTopColumn();\r\n\t\t}else{\r\n\t\t\treturn this;\r\n\t\t}\r\n\t}\r\n\r\n\t//return column definition object\r\n\tgetDefinition(updateBranches){\r\n\t\tvar colDefs = [];\r\n\r\n\t\tif(this.isGroup && updateBranches){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tcolDefs.push(column.getDefinition(true));\r\n\t\t\t});\r\n\r\n\t\t\tthis.definition.columns = colDefs;\r\n\t\t}\r\n\r\n\t\treturn this.definition;\r\n\t}\r\n\r\n\t//////////////////// Actions ////////////////////\r\n\tcheckColumnVisibility(){\r\n\t\tvar visible = false;\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvisible = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(visible){\r\n\t\t\tthis.show();\r\n\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), false);\r\n\t\t}else{\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\r\n\t//show column\r\n\tshow(silent, responsiveToggle){\r\n\t\tif(!this.visible){\r\n\t\t\tthis.visible = true;\r\n\r\n\t\t\tthis.element.style.display = \"\";\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.checkColumnVisibility();\r\n\t\t\t}\r\n\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.show();\r\n\t\t\t});\r\n\r\n\t\t\tif(!this.isGroup && this.width === null){\r\n\t\t\t\tthis.reinitializeWidth();\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.columnManager.verticalAlignHeaders();\r\n\r\n\t\t\tthis.dispatch(\"column-show\", this, responsiveToggle);\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), true);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\r\n\t\t\tif(!this.silent){\r\n\t\t\t\tthis.table.columnManager.renderer.rerenderColumns();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//hide column\r\n\thide(silent, responsiveToggle){\r\n\t\tif(this.visible){\r\n\t\t\tthis.visible = false;\r\n\r\n\t\t\tthis.element.style.display = \"none\";\r\n\r\n\t\t\tthis.table.columnManager.verticalAlignHeaders();\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.checkColumnVisibility();\r\n\t\t\t}\r\n\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.hide();\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatch(\"column-hide\", this, responsiveToggle);\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), false);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\r\n\t\t\tif(!this.silent){\r\n\t\t\t\tthis.table.columnManager.renderer.rerenderColumns();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmatchChildWidths(){\r\n\t\tvar childWidth = 0;\r\n\r\n\t\tif(this.contentElement && this.columns.length){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tif(column.visible){\r\n\t\t\t\t\tchildWidth += column.getWidth();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.contentElement.style.maxWidth = (childWidth - 1) + \"px\";\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tremoveChild(child){\r\n\t\tvar index = this.columns.indexOf(child);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columns.splice(index, 1);\r\n\t\t}\r\n\r\n\t\tif(!this.columns.length){\r\n\t\t\tthis.delete();\r\n\t\t}\r\n\t}\r\n\r\n\tsetWidth(width){\r\n\t\tthis.widthFixed = true;\r\n\t\tthis.setWidthActual(width);\r\n\t}\r\n\r\n\tsetWidthActual(width){\r\n\t\tif(isNaN(width)){\r\n\t\t\twidth = Math.floor((this.table.element.clientWidth/100) * parseInt(width));\r\n\t\t}\r\n\r\n\t\twidth = Math.max(this.minWidth, width);\r\n\r\n\t\tif(this.maxWidth){\r\n\t\t\twidth = Math.min(this.maxWidth, width);\r\n\t\t}\r\n\r\n\t\tthis.width = width;\r\n\t\tthis.widthStyled = width ? width + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.width = this.widthStyled;\r\n\r\n\t\tif(!this.isGroup){\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.setWidth();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.parent.isGroup){\r\n\t\t\tthis.parent.matchChildWidths();\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"column-width\", this);\r\n\t}\r\n\r\n\tcheckCellHeights(){\r\n\t\tvar rows = [];\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tif(cell.row.heightInitialized){\r\n\t\t\t\tif(cell.row.getElement().offsetParent !== null){\r\n\t\t\t\t\trows.push(cell.row);\r\n\t\t\t\t\tcell.row.clearCellHeight();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcell.row.heightInitialized = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\trow.calcHeight();\r\n\t\t});\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\trow.setCellHeight();\r\n\t\t});\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\tvar width = 0;\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tif(column.visible){\r\n\t\t\t\t\twidth += column.getWidth();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\twidth = this.width;\r\n\t\t}\r\n\r\n\t\treturn width;\r\n\t}\r\n\r\n\tgetHeight(){\r\n\t\treturn Math.ceil(this.element.getBoundingClientRect().height);\r\n\t}\r\n\r\n\tsetMinWidth(minWidth){\r\n\t\tthis.minWidth = minWidth;\r\n\t\tthis.minWidthStyled = minWidth ? minWidth + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.minWidth = this.minWidthStyled;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setMinWidth();\r\n\t\t});\r\n\t}\r\n\r\n\tsetMaxWidth(maxWidth){\r\n\t\tthis.maxWidth = maxWidth;\r\n\t\tthis.maxWidthStyled = maxWidth ? maxWidth + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.maxWidth = this.maxWidthStyled;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setMaxWidth();\r\n\t\t});\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar index;\r\n\r\n\t\t\tif(this.isGroup){\r\n\t\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\t\tcolumn.delete();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"column-delete\", this);\r\n\r\n\t\t\tvar cellCount = this.cells.length;\r\n\r\n\t\t\tfor(let i = 0; i < cellCount; i++){\r\n\t\t\t\tthis.cells[0].delete();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.element.parentNode){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element = false;\r\n\t\t\tthis.contentElement = false;\r\n\t\t\tthis.titleElement = false;\r\n\t\t\tthis.groupElement = false;\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.removeChild(this);\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.columnManager.deregisterColumn(this);\r\n\r\n\t\t\tthis.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\r\n\tcolumnRendered(){\r\n\t\tif(this.titleFormatterRendered){\r\n\t\t\tthis.titleFormatterRendered();\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\t//generate cell for this column\r\n\tgenerateCell(row){\r\n\t\tvar cell = new Cell(this, row);\r\n\r\n\t\tthis.cells.push(cell);\r\n\r\n\t\treturn cell;\r\n\t}\r\n\r\n\tnextColumn(){\r\n\t\tvar index = this.table.columnManager.findColumnIndex(this);\r\n\t\treturn index > -1 ? this._nextVisibleColumn(index + 1) : false;\r\n\t}\r\n\r\n\t_nextVisibleColumn(index){\r\n\t\tvar column = this.table.columnManager.getColumnByIndex(index);\r\n\t\treturn !column || column.visible ? column : this._nextVisibleColumn(index + 1);\r\n\t}\r\n\r\n\tprevColumn(){\r\n\t\tvar index = this.table.columnManager.findColumnIndex(this);\r\n\t\treturn index > -1 ? this._prevVisibleColumn(index - 1) : false;\r\n\t}\r\n\r\n\t_prevVisibleColumn(index){\r\n\t\tvar column = this.table.columnManager.getColumnByIndex(index);\r\n\t\treturn !column || column.visible ? column : this._prevVisibleColumn(index - 1);\r\n\t}\r\n\r\n\treinitializeWidth(force){\r\n\t\tthis.widthFixed = false;\r\n\r\n\t\t//set width if present\r\n\t\tif(typeof this.definition.width !== \"undefined\" && !force){\r\n\t\t\t// maxInitialWidth ignored here as width specified\r\n\t\t\tthis.setWidth(this.definition.width);\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"column-width-fit-before\", this);\r\n\r\n\t\tthis.fitToData(force);\r\n\r\n\t\tthis.dispatch(\"column-width-fit-after\", this);\r\n\t}\r\n\r\n\t//set column width to maximum cell width for non group columns\r\n\tfitToData(force){\r\n\t\tif(this.isGroup){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif(!this.widthFixed){\r\n\t\t\tthis.element.style.width = \"\";\r\n\r\n\t\t\tthis.cells.forEach((cell) => {\r\n\t\t\t\tcell.clearWidth();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tvar maxWidth = this.element.offsetWidth;\r\n\r\n\t\tif(!this.width || !this.widthFixed){\r\n\t\t\tthis.cells.forEach((cell) => {\r\n\t\t\t\tvar width = cell.getWidth();\r\n\r\n\t\t\t\tif(width > maxWidth){\r\n\t\t\t\t\tmaxWidth = width;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(maxWidth){\r\n\t\t\t\tvar setTo = maxWidth + 1;\r\n\t\t\t\tif (this.maxInitialWidth && !force) {\r\n\t\t\t\t\tsetTo = Math.min(setTo, this.maxInitialWidth);\r\n\t\t\t\t}\r\n\t\t\t\tthis.setWidthActual(setTo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateDefinition(updates){\r\n\t\tvar definition;\r\n\r\n\t\tif(!this.isGroup){\r\n\t\t\tif(!this.parent.isGroup){\r\n\t\t\t\tdefinition = Object.assign({}, this.getDefinition());\r\n\t\t\t\tdefinition = Object.assign(definition, updates);\r\n\r\n\t\t\t\treturn this.table.columnManager.addColumn(definition, false, this)\r\n\t\t\t\t.then((column) => {\r\n\r\n\t\t\t\t\tif(definition.field == this.field){\r\n\t\t\t\t\t\tthis.field = false; //cleair field name to prevent deletion of duplicate column from arrays\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn this.delete()\r\n\t\t\t\t\t.then(() => {\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Column Update Error - The updateDefinition function is only available on ungrouped columns\");\r\n\t\t\t\treturn Promise.reject(\"Column Update Error - The updateDefinition function is only available on columns, not column groups\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Column Update Error - The updateDefinition function is only available on ungrouped columns\");\r\n\t\t\treturn Promise.reject(\"Column Update Error - The updateDefinition function is only available on columns, not column groups\");\r\n\t\t}\r\n\t}\r\n\r\n\tdeleteCell(cell){\r\n\t\tvar index = this.cells.indexOf(cell);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.cells.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new ColumnComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}\r\n\r\nColumn.defaultOptionList = defaultOptions;\r\n\r\nexport default Column;","export default class Helpers{\r\n\r\n\tstatic elVisible(el){\r\n\t\treturn !(el.offsetWidth <= 0 && el.offsetHeight <= 0);\r\n\t}\r\n\r\n\tstatic elOffset(el){\r\n\t\tvar box = el.getBoundingClientRect();\r\n\r\n\t\treturn {\r\n\t\t\ttop: box.top + window.pageYOffset - document.documentElement.clientTop,\r\n\t\t\tleft: box.left + window.pageXOffset - document.documentElement.clientLeft\r\n\t\t};\r\n\t}\r\n\r\n\tstatic deepClone(obj, clone, list = []){\r\n\t\tvar objectProto = {}.__proto__,\r\n\t\tarrayProto = [].__proto__;\r\n\r\n\t\tif (!clone){\r\n\t\t\tclone = Object.assign(Array.isArray(obj) ? [] : {}, obj);\r\n\t\t}\r\n\r\n\t\tfor(var i in obj) {\r\n\t\t\tlet subject = obj[i],\r\n\t\t\tmatch, copy;\r\n\r\n\t\t\tif(subject != null && typeof subject === \"object\" && (subject.__proto__ === objectProto || subject.__proto__ === arrayProto)){\r\n\t\t\t\tmatch = list.findIndex((item) => {\r\n\t\t\t\t\treturn item.subject === subject;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(match > -1){\r\n\t\t\t\t\tclone[i] = list[match].copy;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcopy = Object.assign(Array.isArray(subject) ? [] : {}, subject);\r\n\r\n\t\t\t\t\tlist.unshift({subject, copy});\r\n\r\n\t\t\t\t\tclone[i] = this.deepClone(subject, copy, list);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn clone;\r\n\t}\r\n}","export default class OptionsList {\r\n\tconstructor(table, msgType, defaults = {}){\r\n\t\tthis.table = table;\r\n\t\tthis.msgType = msgType;\r\n\t\tthis.registeredDefaults = Object.assign({}, defaults)\r\n\t}\r\n\r\n\tregister(option, value){\r\n\t\tthis.registeredDefaults[option] = value;\r\n\t}\r\n\r\n\tgenerate(defaultOptions, userOptions = {}){\r\n\t\tvar output = Object.assign({}, this.registeredDefaults);\r\n\r\n\t\tObject.assign(output, defaultOptions);\r\n\r\n\t\tif(userOptions.debugInvalidOptions !== false || this.table.options.debugInvalidOptions){\r\n\t\t\tfor (var key in userOptions){\r\n\t\t\t\tif(!output.hasOwnProperty(key)){\r\n\t\t\t\t\tconsole.warn(\"Invalid \" + this.msgType + \" option:\", key)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var key in output){\r\n\t\t\tif(key in userOptions){\r\n\t\t\t\toutput[key] = userOptions[key];\r\n\t\t\t}else{\r\n\t\t\t\tif(Array.isArray(output[key])){\r\n\t\t\t\t\toutput[key] = Object.assign([], output[key]);\r\n\t\t\t\t}else if(typeof output[key] === \"object\" && output[key] !== null){\r\n\t\t\t\t\toutput[key] = Object.assign({}, output[key]);\r\n\t\t\t\t}else if (typeof output[key] === \"undefined\"){\r\n\t\t\t\t\tdelete output[key];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport Helpers from '../tools/Helpers.js';\r\n\r\nexport default class Renderer extends CoreFeature{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.elementVertical = table.rowManager.element;\r\n\t\tthis.elementHorizontal = table.columnManager.element;\r\n\t\tthis.tableElement = table.rowManager.tableElement;\r\n\r\n\t\tthis.verticalFillMode = \"fit\"; // used by row manager to determin how to size the render area (\"fit\" - fits container to the contents, \"fill\" - fills the contianer without resizing it)\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t/////// Internal Bindings /////////\r\n\t///////////////////////////////////\r\n\r\n\tinitialize(){\r\n\t\t//initialize core functionality\r\n\t}\r\n\r\n\tclearRows(){\r\n\t\t//clear down existing rows layout\r\n\t}\r\n\r\n\tclearColumns(){\r\n\t\t//clear down existing columns layout\r\n\t}\r\n\r\n\r\n\treinitializeColumnWidths(columns){\r\n\t\t//resize columns to fit data\r\n\t}\r\n\r\n\r\n\trenderRows(){\r\n\t\t//render rows from a clean slate\r\n\t}\r\n\r\n\trenderColumns(){\r\n\t\t//render columns from a clean slate\r\n\t}\r\n\r\n\trerenderRows(callback){\r\n\t\t// rerender rows and keep position\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\t}\r\n\r\n\trerenderColumns(update, blockRedraw){\r\n\t\t//rerender columns\r\n\t}\r\n\r\n\trenderRowCells(row){\r\n\t\t//render the cells in a row\r\n\t}\r\n\r\n\trerenderRowCells(row, force){\r\n\t\t//rerender the cells in a row\r\n\t}\r\n\r\n\tscrollColumns(left, dir){\r\n\t\t//handle horizontal scrolling\r\n\t}\r\n\r\n\tscrollRows(top, dir){\r\n\t\t//handle vertical scolling\r\n\t}\r\n\r\n\tresize(){\r\n\t\t//container has rezied, carry out any needed recalculations (DO NOT RERENDER IN THIS FUNCTION)\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\t//scroll to a specific row\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\t//determine weather the row is nearest the top or bottom of the table, retur true for top or false for bottom\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\t//return the visible rows\r\n\t\treturn [];\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t//////// Helper Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\trows(){\r\n\t\treturn this.table.rowManager.getDisplayRows();\r\n\t}\r\n\r\n\tstyleRow(row, index){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tif(index % 2){\r\n\t\t\trowEl.classList.add(\"tabulator-row-even\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-odd\");\r\n\t\t}else{\r\n\t\t\trowEl.classList.add(\"tabulator-row-odd\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-even\");\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t/////// External Triggers /////////\r\n\t/////// (DO NOT OVERRIDE) /////////\r\n\t///////////////////////////////////\r\n\r\n\tclear(){\r\n\t\t//clear down existing layout\r\n\t\tthis.clearRows();\r\n\t\tthis.clearColumns();\r\n\t}\r\n\r\n\trender(){\r\n\t\t//render from a clean slate\r\n\t\tthis.renderRows();\r\n\t\tthis.renderColumns();\r\n\t}\r\n\r\n\trerender(callback){\r\n\t\t// rerender and keep position\r\n\t\tthis.rerenderRows();\r\n\t\tthis.rerenderColumns();\r\n\t}\r\n\r\n\tscrollToRowPosition(row, position, ifVisible){\r\n\t\tvar rowIndex = this.rows().indexOf(row),\r\n\t\trowEl = row.getElement(),\r\n\t\toffset = 0;\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tif(rowIndex > -1){\r\n\r\n\t\t\t\tif(typeof ifVisible === \"undefined\"){\r\n\t\t\t\t\tifVisible = this.table.options.scrollToRowIfVisible;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//check row visibility\r\n\t\t\t\tif(!ifVisible){\r\n\t\t\t\t\tif(Helpers.elVisible(rowEl)){\r\n\t\t\t\t\t\toffset = Helpers.elOffset(rowEl).top - Helpers.elOffset(this.elementVertical).top;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(offset > 0 && offset < this.elementVertical.clientHeight - rowEl.offsetHeight){\r\n\t\t\t\t\t\t\tresolve();\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(typeof position === \"undefined\"){\r\n\t\t\t\t\tposition = this.table.options.scrollToRowPosition;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(position === \"nearest\"){\r\n\t\t\t\t\tposition = this.scrollToRowNearestTop(row) ? \"top\" : \"bottom\"\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//scroll to row\r\n\t\t\t\tthis.scrollToRow(row);\r\n\r\n\t\t\t\t//align to correct position\r\n\t\t\t\tswitch(position){\r\n\t\t\t\t\tcase \"middle\":\r\n\t\t\t\t\tcase \"center\":\r\n\r\n\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop + (rowEl.offsetTop - this.elementVertical.scrollTop) - ((this.elementVertical.scrollHeight - rowEl.offsetTop) / 2);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.clientHeight / 2);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"bottom\":\r\n\r\n\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.scrollHeight - rowEl.offsetTop) + rowEl.offsetHeight;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - this.elementVertical.clientHeight + rowEl.offsetHeight;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresolve();\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - Row not visible\");\r\n\t\t\t\treject(\"Scroll Error - Row not visible\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class BaiscHorizontal extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t}\r\n\r\n\trenderRowCells(row){\r\n\t\trow.cells.forEach((cell) => {\r\n\t\t\trow.element.appendChild(cell.getElement());\r\n\t\t\tcell.cellRendered();\r\n\t\t});\r\n\t}\r\n\r\n\treinitializeColumnWidths(columns){\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t});\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class VirtualDomHorizontal extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.leftCol = 0;\r\n\t\tthis.rightCol = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = 0;\r\n\t\tthis.vDomScrollPosRight = 0;\r\n\t\t\r\n\t\tthis.vDomPadLeft = 0;\r\n\t\tthis.vDomPadRight = 0;\r\n\t\t\r\n\t\tthis.fitDataColAvg = 0;\r\n\t\t\r\n\t\tthis.windowBuffer = 200; //pixel margin to make column visible before it is shown on screen\r\n\t\t\r\n\t\tthis.visibleRows = null;\r\n\r\n\t\tthis.initialized = false;\r\n\t\tthis.isFitData = false;\r\n\t\t\r\n\t\tthis.columns = [];\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.compatibilityCheck();\r\n\t\tthis.layoutCheck();\r\n\t\tthis.vertScrollListen();\r\n\t}\r\n\t\r\n\tcompatibilityCheck(){\r\n\t\tvar columns = this.options(\"columns\"),\r\n\t\tfrozen = false,\r\n\t\tok = true;\r\n\t\t\r\n\t\tif(this.options(\"layout\") == \"fitDataTable\"){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with fitDataTable layout mode\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.options(\"responsiveLayout\")){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with responsive columns\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.options(\"rtl\")){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not currently compatible with RTL text direction\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(columns){\r\n\t\t\tfrozen = columns.find((col) => {\r\n\t\t\t\treturn col.frozen;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(frozen){\r\n\t\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with frozen columns\");\r\n\t\t\t\tok = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// if(!ok){\r\n\t\t// \toptions.virtualDomHoz = false;\r\n\t\t// }\r\n\t\t\r\n\t\treturn ok;\r\n\t}\r\n\t\r\n\tlayoutCheck(){\r\n\t\tthis.isFitData = this.options(\"layout\").startsWith('fitData');\r\n\t}\r\n\r\n\tvertScrollListen(){\r\n\t\tthis.subscribe(\"scroll-vertical\", this.clearVisRowCache.bind(this));\r\n\t\tthis.subscribe(\"data-refreshed\", this.clearVisRowCache.bind(this));\r\n\t}\r\n\r\n\tclearVisRowCache(){\r\n\t\tthis.visibleRows = null;\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t///////// Public Functions ///////////\r\n\t//////////////////////////////////////\r\n\t\r\n\trenderColumns(row, force){\r\n\t\tthis.dataChange();\r\n\t}\r\n\r\n\t\r\n\tscrollColumns(left, dir){\r\n\t\tif(this.scrollLeft != left){\r\n\t\t\tthis.scrollLeft = left;\r\n\t\t\t\r\n\t\t\tthis.scroll(left - (this.vDomScrollPosLeft + this.windowBuffer));\r\n\t\t}\r\n\t}\r\n\t\r\n\tcalcWindowBuffer(){\r\n\t\tvar buffer = this.elementVertical.clientWidth;\r\n\t\t\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvar width = column.getWidth();\r\n\t\t\t\t\r\n\t\t\t\tif(width > buffer){\r\n\t\t\t\t\tbuffer = width;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.windowBuffer = buffer * 2;\r\n\t}\r\n\t\r\n\trerenderColumns(update, blockRedraw){\t\t\r\n\t\tvar old = {\r\n\t\t\tcols:this.columns,\r\n\t\t\tleftCol:this.leftCol,\r\n\t\t\trightCol:this.rightCol,\r\n\t\t},\r\n\t\tcolPos = 0;\r\n\t\t\r\n\t\t\r\n\t\tif(update && !this.initialized){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tthis.clear();\r\n\t\t\r\n\t\tthis.calcWindowBuffer();\r\n\t\t\r\n\t\tthis.scrollLeft = this.elementVertical.scrollLeft;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = this.scrollLeft - this.windowBuffer;\r\n\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\r\n\t\t\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tvar config = {};\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvar width = column.getWidth();\r\n\t\t\t\t\r\n\t\t\t\tconfig.leftPos = colPos;\r\n\t\t\t\tconfig.rightPos = colPos + width;\r\n\t\t\t\t\r\n\t\t\t\tconfig.width = width;\r\n\t\t\t\t\r\n\t\t\t\tif (this.isFitData) {\r\n\t\t\t\t\tconfig.fitDataCheck = column.modules.vdomHoz ? column.modules.vdomHoz.fitDataCheck : true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif((colPos + width > this.vDomScrollPosLeft) && (colPos < this.vDomScrollPosRight)){\r\n\t\t\t\t\t//column is visible\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.leftCol == -1){\r\n\t\t\t\t\t\tthis.leftCol = this.columns.length;\r\n\t\t\t\t\t\tthis.vDomPadLeft = colPos;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.rightCol = this.columns.length;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// column is hidden\r\n\t\t\t\t\tif(this.leftCol !== -1){\r\n\t\t\t\t\t\tthis.vDomPadRight += width;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.columns.push(column);\r\n\t\t\t\t\r\n\t\t\t\tcolumn.modules.vdomHoz = config;\r\n\t\t\t\t\r\n\t\t\t\tcolPos += width;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t\r\n\t\tthis.initialized = true;\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tif(!update || this.reinitChanged(old)){\r\n\t\t\t\tthis.reinitializeRows();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.elementVertical.scrollLeft = this.scrollLeft;\r\n\t}\r\n\t\r\n\trenderRowCells(row){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.initializeRow(row);\r\n\t\t}else{\r\n\t\t\trow.cells.forEach((cell) => {\r\n\t\t\t\trow.element.appendChild(cell.getElement());\r\n\t\t\t\tcell.cellRendered();\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\trerenderRowCells(row, force){\r\n\t\tthis.reinitializeRow(row, force);\r\n\t}\r\n\t\r\n\treinitializeColumnWidths(columns){\r\n\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\r\n\t\t\tthis.columns[i].reinitializeWidth();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t//////// Internal Rendering //////////\r\n\t//////////////////////////////////////\r\n\t\r\n\tdeinitialize(){\r\n\t\tthis.initialized = false;\r\n\t}\r\n\t\r\n\tclear(){\r\n\t\tthis.columns = [];\r\n\t\t\r\n\t\tthis.leftCol = -1;\r\n\t\tthis.rightCol = 0;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = 0;\r\n\t\tthis.vDomScrollPosRight = 0;\r\n\t\tthis.vDomPadLeft = 0;\r\n\t\tthis.vDomPadRight = 0;\r\n\t}\r\n\t\r\n\tdataChange(){\r\n\t\tvar change = false,\r\n\t\tcollsWidth = 0,\r\n\t\tcolEnd = 0,\r\n\t\tgroup, row, rowEl;\r\n\t\t\r\n\t\tif(this.isFitData){\r\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\t\tif(!column.definition.width && column.visible){\r\n\t\t\t\t\tchange = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(change){\r\n\t\t\t\tif(change && this.table.rowManager.getDisplayRows().length){\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar row = this.chain(\"rows-sample\", [1], [], () => {\r\n\t\t\t\t\t\treturn this.table.rowManager.getDisplayRows();\r\n\t\t\t\t\t})[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trowEl = row.getElement();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trow.generateCells();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.tableElement.appendChild(rowEl);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfor(var colEnd = 0; colEnd < row.cells.length; colEnd++){\r\n\t\t\t\t\t\t\tlet cell = row.cells[colEnd];\r\n\t\t\t\t\t\t\trowEl.appendChild(cell.getElement());\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcell.column.reinitializeWidth();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcollsWidth += cell.column.getWidth();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// if(collsWidth > this.vDomScrollPosRight){\r\n\t\t\t\t\t\t\t// \tbreak;\r\n\t\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// this.fitDataColAvg = Math.floor(collsWidth / (colEnd + 1));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// for(colEnd; colEnd < this.table.columnManager.columnsByIndex.length; colEnd++){\r\n\t\t\t\t\t\t// \tthis.table.columnManager.columnsByIndex[colEnd].setWidth(this.fitDataColAvg);\r\n\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.rerenderColumns(false, true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.options(\"layout\") === \"fitColumns\"){\r\n\t\t\t\tthis.layoutRefresh();\r\n\t\t\t\tthis.rerenderColumns(false, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitChanged(old){\r\n\t\tvar match = true;\r\n\t\t\r\n\t\tif(old.cols.length !== this.columns.length || old.leftCol !== this.leftCol || old.rightCol !== this.rightCol){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\told.cols.forEach((col, i) => {\r\n\t\t\tif(col !== this.columns[i]){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn !match;\r\n\t}\r\n\t\r\n\treinitializeRows(){\r\n\t\tvar rows = this.getVisibleRows();\r\n\t\trows.forEach((row) => {\r\n\t\t\tthis.reinitializeRow(row, true);\r\n\t\t});\r\n\t}\r\n\t\r\n\tgetVisibleRows(){\r\n\t\tif (!this.visibleRows){\r\n\t\t\tthis.visibleRows = this.table.rowManager.getVisibleRows();\r\n\t\t}\r\n\r\n\t\treturn this.visibleRows;\t\r\n\t}\r\n\t\r\n\tscroll(diff){\r\n\t\tthis.vDomScrollPosLeft += diff;\r\n\t\tthis.vDomScrollPosRight += diff;\r\n\r\n\t\tif(Math.abs(diff) > (this.windowBuffer / 2)){\r\n\t\t\tthis.rerenderColumns();\r\n\t\t}else{\r\n\t\t\tif(diff > 0){\r\n\t\t\t\t//scroll right\r\n\t\t\t\tthis.addColRight();\r\n\t\t\t\tthis.removeColLeft();\r\n\t\t\t}else{\r\n\t\t\t\t//scroll left\r\n\t\t\t\tthis.addColLeft();\r\n\t\t\t\tthis.removeColRight();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tcolPositionAdjust (start, end, diff){\r\n\t\tfor(let i = start; i < end; i++){\r\n\t\t\tlet column = this.columns[i];\r\n\t\t\t\r\n\t\t\tcolumn.modules.vdomHoz.leftPos += diff;\r\n\t\t\tcolumn.modules.vdomHoz.rightPos += diff;\r\n\t\t}\r\n\t}\r\n\t\r\n\taddColRight(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\t\r\n\t\t\tlet column = this.columns[this.rightCol + 1];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.leftPos <= this.vDomScrollPosRight){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\trow.getElement().appendChild(cell.getElement());\r\n\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.fitDataColActualWidthCheck(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.rightCol++; // Don't move this below the >= check below\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.rightCol >= (this.columns.length - 1)){\r\n\t\t\t\t\t\tthis.vDomPadRight = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomPadRight -= column.getWidth();\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\taddColLeft(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.leftCol - 1];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.rightPos >= this.vDomScrollPosLeft){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\trow.getElement().prepend(cell.getElement());\r\n\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.leftCol--; // don't move this below the <= check below\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.leftCol <= 0){ // replicating logic in addColRight\r\n\t\t\t\t\t\tthis.vDomPadLeft = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomPadLeft -= column.getWidth();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tlet diff = this.fitDataColActualWidthCheck(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(diff){\r\n\t\t\t\t\t\tthis.scrollLeft = this.elementVertical.scrollLeft = this.elementVertical.scrollLeft + diff;\r\n\t\t\t\t\t\tthis.vDomPadRight -= diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveColRight(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.rightCol];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.leftPos > this.vDomScrollPosRight){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\trow.getElement().removeChild(cell.getElement());\r\n\t\t\t\t\t\t\t} catch (ex) {\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Could not removeColRight\", ex.message)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomPadRight += column.getWidth();\r\n\t\t\t\t\tthis.rightCol --;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveColLeft(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.leftCol];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.rightPos < this.vDomScrollPosLeft){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\t\t\t\t\t\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\trow.getElement().removeChild(cell.getElement());\r\n\t\t\t\t\t\t\t} catch (ex) {\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Could not removeColLeft\", ex.message)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomPadLeft += column.getWidth();\r\n\t\t\t\t\tthis.leftCol ++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\tfitDataColActualWidthCheck(column){\r\n\t\tvar newWidth, widthDiff;\r\n\t\t\r\n\t\tif(column.modules.vdomHoz.fitDataCheck){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t\t\r\n\t\t\tnewWidth = column.getWidth();\r\n\t\t\twidthDiff = newWidth - column.modules.vdomHoz.width;\r\n\t\t\t\r\n\t\t\tif(widthDiff){\r\n\t\t\t\tcolumn.modules.vdomHoz.rightPos += widthDiff;\r\n\t\t\t\tcolumn.modules.vdomHoz.width = newWidth;\r\n\t\t\t\tthis.colPositionAdjust(this.columns.indexOf(column) + 1, this.columns.length, widthDiff);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcolumn.modules.vdomHoz.fitDataCheck = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn widthDiff;\r\n\t}\r\n\t\r\n\tinitializeRow(row){\r\n\t\tif(row.type !== \"group\"){\r\n\t\t\trow.modules.vdomHoz = {\r\n\t\t\t\tleftCol:this.leftCol,\r\n\t\t\t\trightCol:this.rightCol,\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\r\n\t\t\t\tlet column = this.columns[i];\r\n\t\t\t\t\r\n\t\t\t\tif(column && column.visible){\r\n\t\t\t\t\tlet cell = row.getCell(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\trow.getElement().appendChild(cell.getElement());\r\n\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitializeRow(row, force){\r\n\t\tif(row.type !== \"group\"){\r\n\t\t\tif(force || !row.modules.vdomHoz || row.modules.vdomHoz.leftCol !== this.leftCol || row.modules.vdomHoz.rightCol !== this.rightCol){\r\n\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\twhile(rowEl.firstChild) rowEl.removeChild(rowEl.firstChild);\r\n\t\t\t\t\r\n\t\t\t\tthis.initializeRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\nimport Column from './column/Column.js';\r\nimport ColumnComponent from './column/ColumnComponent.js';\r\nimport Helpers from './tools/Helpers.js';\r\nimport OptionsList from './tools/OptionsList.js';\r\n\r\nimport RendererBasicHorizontal from './rendering/renderers/BasicHorizontal.js';\r\nimport RendererVirtualDomHorizontal from './rendering/renderers/VirtualDomHorizontal.js';\r\n\r\nimport defaultColumnOptions from './column/defaults/options.js';\r\n\r\nexport default class ColumnManager extends CoreFeature {\r\n\r\n\tconstructor (table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.blockHozScrollEvent = false;\r\n\t\tthis.headersElement = null;\r\n\t\tthis.element = null ; //containing element\r\n\t\tthis.columns = []; // column definition object\r\n\t\tthis.columnsByIndex = []; //columns by index\r\n\t\tthis.columnsByField = {}; //columns by field\r\n\t\tthis.scrollLeft = 0;\r\n\t\tthis.optionsList = new OptionsList(this.table, \"column definition\", defaultColumnOptions);\r\n\r\n\t\tthis.renderer = null;\r\n\t}\r\n\r\n\t////////////// Setup Functions /////////////////\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeRenderer();\r\n\r\n\t\tthis.headersElement = this.createHeadersElement();\r\n\t\tthis.element = this.createHeaderElement();\r\n\r\n\t\tthis.element.insertBefore(this.headersElement, this.element.firstChild);\r\n\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t}\r\n\r\n\tinitializeRenderer(){\r\n\t\tvar renderClass;\r\n\r\n\t\tvar renderers = {\r\n\t\t\t\"virtual\": RendererVirtualDomHorizontal,\r\n\t\t\t\"basic\": RendererBasicHorizontal,\r\n\t\t};\r\n\r\n\t\tif(typeof this.table.options.renderHorizontal === \"string\"){\r\n\t\t\trenderClass = renderers[this.table.options.renderHorizontal];\r\n\t\t}else{\r\n\t\t\trenderClass = this.table.options.renderHorizontal;\r\n\t\t}\r\n\r\n\t\tif(renderClass){\r\n\t\t\tthis.renderer = new renderClass(this.table, this.element, this.tableElement);\r\n\t\t\tthis.renderer.initialize();\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Unable to find matching renderer:\", table.options.renderHorizontal);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tcreateHeadersElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-headers\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateHeaderElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-header\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\r\n\t\tif(!this.table.options.headerVisible){\r\n\t\t\tel.classList.add(\"tabulator-header-hidden\");\r\n\t\t}\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\t//return containing element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\t//return header containing element\r\n\tgetHeadersElement(){\r\n\t\treturn this.headersElement;\r\n\t}\r\n\r\n\t//scroll horizontally to match table body\r\n\tscrollHorizontal(left){\r\n\t\tvar hozAdjust = 0,\r\n\t\tscrollWidth = this.element.scrollWidth - this.table.element.clientWidth;\r\n\r\n\t\t// this.tempScrollBlock();\r\n\t\tthis.element.scrollLeft = left;\r\n\r\n\t\t//adjust for vertical scrollbar moving table when present\r\n\t\tif(left > scrollWidth){\r\n\t\t\thozAdjust = left - scrollWidth;\r\n\t\t\tthis.element.style.marginLeft = (-(hozAdjust)) + \"px\";\r\n\t\t}else{\r\n\t\t\tthis.element.style.marginLeft = 0;\r\n\t\t}\r\n\r\n\t\tthis.scrollLeft = left;\r\n\r\n\t\tthis.renderer.scrollColumns(left);\r\n\t}\r\n\r\n\t///////////// Column Setup Functions /////////////\r\n\tgenerateColumnsFromRowData(data){\r\n\t\tvar cols = [],\r\n\t\tdefinitions = this.table.options.autoColumnsDefinitions,\r\n\t\trow, sorter;\r\n\r\n\t\tif(data && data.length){\r\n\r\n\t\t\trow = data[0];\r\n\r\n\t\t\tfor(var key in row){\r\n\t\t\t\tlet col = {\r\n\t\t\t\t\tfield:key,\r\n\t\t\t\t\ttitle:key,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tlet value = row[key];\r\n\r\n\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tif(Array.isArray(value)){\r\n\t\t\t\t\t\tsorter = \"array\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){\r\n\t\t\t\t\t\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcol.sorter = sorter;\r\n\r\n\t\t\t\tcols.push(col);\r\n\t\t\t}\r\n\r\n\t\t\tif(definitions){\r\n\r\n\t\t\t\tswitch(typeof definitions){\r\n\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\tthis.table.options.columns = definitions.call(this.table, cols);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tif(Array.isArray(definitions)){\r\n\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\tvar match = definitions.find((def) => {\r\n\t\t\t\t\t\t\t\treturn def.field === col.field;\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tif(match){\r\n\t\t\t\t\t\t\t\tObject.assign(col, match);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\tif(definitions[col.field]){\r\n\t\t\t\t\t\t\t\tObject.assign(col, definitions[col.field]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.table.options.columns = cols;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.options.columns = cols;\r\n\t\t\t}\r\n\r\n\t\t\tthis.setColumns(this.table.options.columns);\r\n\t\t}\r\n\t}\r\n\r\n\tsetColumns(cols, row){\r\n\t\twhile(this.headersElement.firstChild) this.headersElement.removeChild(this.headersElement.firstChild);\r\n\r\n\t\tthis.columns = [];\r\n\t\tthis.columnsByIndex = [];\r\n\t\tthis.columnsByField = {};\r\n\r\n\t\tthis.dispatch(\"columns-loading\");\r\n\r\n\t\tcols.forEach((def, i) => {\r\n\t\t\tthis._addColumn(def);\r\n\t\t});\r\n\r\n\t\tthis._reIndexColumns();\r\n\r\n\t\tthis.dispatch(\"columns-loaded\");\r\n\r\n\t\tthis.renderer.rerenderColumns(false, true);\r\n\r\n\t\tthis.redraw(true);\r\n\t}\r\n\r\n\t_addColumn(definition, before, nextToColumn){\r\n\t\tvar column = new Column(definition, this),\r\n\t\tcolEl = column.getElement(),\r\n\t\tindex = nextToColumn ? this.findColumnIndex(nextToColumn) : nextToColumn;\r\n\r\n\t\tif(nextToColumn && index > -1){\r\n\t\t\tvar topColumn = nextToColumn.getTopColumn()\r\n\t\t\tvar parentIndex = this.columns.indexOf(topColumn);\r\n\t\t\tvar nextEl = topColumn.getElement();\r\n\r\n\t\t\tif(before){\r\n\t\t\t\tthis.columns.splice(parentIndex, 0, column);\r\n\t\t\t\tnextEl.parentNode.insertBefore(colEl, nextEl);\r\n\t\t\t}else{\r\n\t\t\t\tthis.columns.splice(parentIndex + 1, 0, column);\r\n\t\t\t\tnextEl.parentNode.insertBefore(colEl, nextEl.nextSibling);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(before){\r\n\t\t\t\tthis.columns.unshift(column);\r\n\t\t\t\tthis.headersElement.insertBefore(column.getElement(), this.headersElement.firstChild);\r\n\t\t\t}else{\r\n\t\t\t\tthis.columns.push(column);\r\n\t\t\t\tthis.headersElement.appendChild(column.getElement());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcolumn.columnRendered();\r\n\r\n\t\treturn column;\r\n\t}\r\n\r\n\tregisterColumnField(col){\r\n\t\tif(col.definition.field){\r\n\t\t\tthis.columnsByField[col.definition.field] = col;\r\n\t\t}\r\n\t}\r\n\r\n\tregisterColumnPosition(col){\r\n\t\tthis.columnsByIndex.push(col);\r\n\t}\r\n\r\n\t_reIndexColumns(){\r\n\t\tthis.columnsByIndex = [];\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.reRegisterPosition();\r\n\t\t});\r\n\t}\r\n\r\n\t//ensure column headers take up the correct amount of space in column groups\r\n\tverticalAlignHeaders(){\r\n\t\tvar minHeight = 0;\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\tvar height;\r\n\r\n\t\t\tcolumn.clearVerticalAlign();\r\n\r\n\t\t\theight = column.getHeight();\r\n\r\n\t\t\tif(height > minHeight){\r\n\t\t\t\tminHeight = height;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\tcolumn.verticalAlign(this.table.options.columnHeaderVertAlign, minHeight);\r\n\t\t});\r\n\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\t//////////////// Column Details /////////////////\r\n\tfindColumn(subject){\r\n\t\tif(typeof subject == \"object\"){\r\n\r\n\t\t\tif(subject instanceof Column){\r\n\t\t\t\t//subject is column element\r\n\t\t\t\treturn subject;\r\n\t\t\t}else if(subject instanceof ColumnComponent){\r\n\t\t\t\t//subject is public column component\r\n\t\t\t\treturn subject._getSelf() || false;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\t//subject is a HTML element of the column header\r\n\t\t\t\tlet match = this.columns.find((column) => {\r\n\t\t\t\t\treturn column.element === subject;\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn match || false;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the field name of the column\r\n\t\t\treturn this.columnsByField[subject] || false;\r\n\t\t}\r\n\r\n\t\t//catch all for any other type of input\r\n\t\treturn false;\r\n\t}\r\n\r\n\tgetColumnByField(field){\r\n\t\treturn this.columnsByField[field];\r\n\t}\r\n\r\n\tgetColumnsByFieldRoot(root){\r\n\t\tvar matches = [];\r\n\r\n\t\tObject.keys(this.columnsByField).forEach((field) => {\r\n\t\t\tvar fieldRoot = field.split(\".\")[0];\r\n\t\t\tif(fieldRoot === root){\r\n\t\t\t\tmatches.push(this.columnsByField[field]);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn matches;\r\n\t}\r\n\r\n\tgetColumnByIndex(index){\r\n\t\treturn this.columnsByIndex[index];\r\n\t}\r\n\r\n\tgetFirstVisibleColumn(index){\r\n\t\tvar index = this.columnsByIndex.findIndex((col) => {\r\n\t\t\treturn col.visible;\r\n\t\t});\r\n\r\n\t\treturn index > -1 ? this.columnsByIndex[index] : false;\r\n\t}\r\n\r\n\tgetColumns(){\r\n\t\treturn this.columns;\r\n\t}\r\n\r\n\tfindColumnIndex(column){\r\n\t\treturn this.columnsByIndex.findIndex((col) => {\r\n\t\t\treturn column === col;\r\n\t\t});\r\n\t}\r\n\r\n\t//return all columns that are not groups\r\n\tgetRealColumns(){\r\n\t\treturn this.columnsByIndex;\r\n\t}\r\n\r\n\t//travers across columns and call action\r\n\ttraverse(callback){\r\n\t\tthis.columnsByIndex.forEach((column,i) =>{\r\n\t\t\tcallback(column, i);\r\n\t\t});\r\n\t}\r\n\r\n\t//get defintions of actual columns\r\n\tgetDefinitions(active){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tif(!active || (active && column.visible)){\r\n\t\t\t\toutput.push(column.getDefinition());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//get full nested definition tree\r\n\tgetDefinitionTree(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\toutput.push(column.getDefinition(true));\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetComponents(structured){\r\n\t\tvar output = [],\r\n\t\tcolumns = structured ? this.columns : this.columnsByIndex;\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\toutput.push(column.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\tvar width = 0;\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tif(column.visible){\r\n\t\t\t\twidth += column.getWidth();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn width;\r\n\t}\r\n\r\n\tmoveColumn(from, to, after){\r\n\t\tthis.moveColumnActual(from, to, after);\r\n\r\n\t\tto.element.parentNode.insertBefore(from.element, to.element);\r\n\r\n\t\tif(after){\r\n\t\t\tto.element.parentNode.insertBefore(to.element, from.element);\r\n\t\t}\r\n\r\n\t\tthis.verticalAlignHeaders();\r\n\r\n\t\tthis.table.rowManager.reinitialize();\r\n\t}\r\n\r\n\tmoveColumnActual(from, to, after){\r\n\t\tif(from.parent.isGroup){\r\n\t\t\tthis._moveColumnInArray(from.parent.columns, from, to, after);\r\n\t\t}else{\r\n\t\t\tthis._moveColumnInArray(this.columns, from, to, after);\r\n\t\t}\r\n\r\n\t\tthis._moveColumnInArray(this.columnsByIndex, from, to, after, true);\r\n\r\n\t\tthis.renderer.rerenderColumns(true);\r\n\r\n\t\tthis.dispatch(\"column-moved\", from, to, after);\r\n\r\n\t\tif(this.subscribedExternal(\"columnMoved\")){\r\n\t\t\tthis.dispatchExternal(\"columnMoved\", from.getComponent(), this.table.columnManager.getComponents());\r\n\t\t}\r\n\t}\r\n\r\n\t_moveColumnInArray(columns, from, to, after, updateRows){\r\n\t\tvar\tfromIndex = columns.indexOf(from),\r\n\t\ttoIndex, rows = [];\r\n\r\n\t\tif (fromIndex > -1) {\r\n\r\n\t\t\tcolumns.splice(fromIndex, 1);\r\n\r\n\t\t\ttoIndex = columns.indexOf(to);\r\n\r\n\t\t\tif (toIndex > -1) {\r\n\r\n\t\t\t\tif(after){\r\n\t\t\t\t\ttoIndex = toIndex+1;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\ttoIndex = fromIndex;\r\n\t\t\t}\r\n\r\n\t\t\tcolumns.splice(toIndex, 0, from);\r\n\r\n\t\t\tif(updateRows){\r\n\r\n\t\t\t\trows = this.chain(\"column-moving-rows\", [from, to, after], null, []) || [];\r\n\r\n\t\t\t\trows = rows.concat(this.table.rowManager.rows);\r\n\r\n\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\tif(row.cells.length){\r\n\t\t\t\t\t\tvar cell = row.cells.splice(fromIndex, 1)[0];\r\n\t\t\t\t\t\trow.cells.splice(toIndex, 0, cell);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscrollToColumn(column, position, ifVisible){\r\n\t\tvar left = 0,\r\n\t\toffset = 0,\r\n\t\tadjust = 0,\r\n\t\tcolEl = column.getElement();\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\r\n\t\t\tif(typeof position === \"undefined\"){\r\n\t\t\t\tposition = this.table.options.scrollToColumnPosition;\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof ifVisible === \"undefined\"){\r\n\t\t\t\tifVisible = this.table.options.scrollToColumnIfVisible;\r\n\t\t\t}\r\n\r\n\t\t\tif(column.visible){\r\n\r\n\t\t\t\t//align to correct position\r\n\t\t\t\tswitch(position){\r\n\t\t\t\t\tcase \"middle\":\r\n\t\t\t\t\tcase \"center\":\r\n\t\t\t\t\tadjust = -this.element.clientWidth / 2;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"right\":\r\n\t\t\t\t\tadjust = colEl.clientWidth - this.headersElement.clientWidth;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//check column visibility\r\n\t\t\t\tif(!ifVisible){\r\n\r\n\t\t\t\t\toffset = colEl.offsetLeft;\r\n\r\n\t\t\t\t\tif(offset > 0 && offset + colEl.offsetWidth < this.element.clientWidth){\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//calculate scroll position\r\n\t\t\t\tleft = colEl.offsetLeft + adjust;\r\n\r\n\t\t\t\tleft = Math.max(Math.min(left, this.table.rowManager.element.scrollWidth - this.table.rowManager.element.clientWidth),0);\r\n\r\n\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\tthis.scrollHorizontal(left);\r\n\r\n\t\t\t\tresolve();\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - Column not visible\");\r\n\t\t\t\treject(\"Scroll Error - Column not visible\");\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\tgenerateCells(row){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tcells.push(column.generateCell(row));\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\t//////////////// Column Management /////////////////\r\n\tgetFlexBaseWidth(){\r\n\t\tvar totalWidth = this.table.element.clientWidth, //table element width\r\n\t\tfixedWidth = 0;\r\n\r\n\t\t//adjust for vertical scrollbar if present\r\n\t\tif(this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight){\r\n\t\t\ttotalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth;\r\n\t\t}\r\n\r\n\t\tthis.columnsByIndex.forEach(function(column){\r\n\t\t\tvar width, minWidth, colWidth;\r\n\r\n\t\t\tif(column.visible){\r\n\r\n\t\t\t\twidth = column.definition.width || 0;\r\n\r\n\t\t\t\tminWidth = parseInt(column.minWidth);\r\n\r\n\t\t\t\tif(typeof(width) == \"string\"){\r\n\t\t\t\t\tif(width.indexOf(\"%\") > -1){\r\n\t\t\t\t\t\tcolWidth = (totalWidth / 100) * parseInt(width) ;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tcolWidth = parseInt(width);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolWidth = width;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn fixedWidth;\r\n\t}\r\n\r\n\taddColumn(definition, before, nextToColumn){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar column = this._addColumn(definition, before, nextToColumn);\r\n\r\n\t\t\tthis._reIndexColumns();\r\n\r\n\t\t\tthis.dispatch(\"column-add\", definition, before, nextToColumn);\r\n\r\n\t\t\tif(this.layoutMode() != \"fitColumns\"){\r\n\t\t\t\tcolumn.reinitializeWidth();\r\n\t\t\t}\r\n\r\n\t\t\tthis.redraw(true);\r\n\r\n\t\t\tthis.table.rowManager.reinitialize();\r\n\r\n\t\t\tthis.renderer.rerenderColumns();\r\n\r\n\t\t\tresolve(column);\r\n\t\t});\r\n\t}\r\n\r\n\t//remove column from system\r\n\tderegisterColumn(column){\r\n\t\tvar field = column.getField(),\r\n\t\tindex;\r\n\r\n\t\t//remove from field list\r\n\t\tif(field){\r\n\t\t\tdelete this.columnsByField[field];\r\n\t\t}\r\n\r\n\t\t//remove from index list\r\n\t\tindex = this.columnsByIndex.indexOf(column);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columnsByIndex.splice(index, 1);\r\n\t\t}\r\n\r\n\t\t//remove from column list\r\n\t\tindex = this.columns.indexOf(column);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columns.splice(index, 1);\r\n\t\t}\r\n\r\n\t\tthis.verticalAlignHeaders();\r\n\r\n\t\tthis.redraw();\r\n\t}\r\n\r\n\t//redraw columns\r\n\tredraw(force){\r\n\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\tthis.verticalAlignHeaders();\r\n\t\t}\r\n\r\n\t\tif(force){\r\n\t\t\tthis.table.rowManager.resetScroll();\r\n\t\t\tthis.table.rowManager.reinitialize();\r\n\t\t}\r\n\r\n\t\tif(!this.confirm(\"table-redrawing\", force)){\r\n\t\t\tthis.layoutRefresh();\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"table-redraw\", force);\r\n\r\n\t\tthis.table.footerManager.redraw();\r\n\t}\r\n}","//public row object\r\nexport default class RowComponent {\r\n\r\n\tconstructor (row){\r\n\t\tthis._row = row;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._row.table.componentFunctionBinder.handle(\"row\", target._row, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\treturn this._row.getData(transform);\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._row.getElement();\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._row.getCells().forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar cell = this._row.getCell(column);\r\n\t\treturn cell ? cell.getComponent() : false;\r\n\t}\r\n\r\n\tgetIndex(){\r\n\t\treturn this._row.getData(\"data\")[this._row.table.options.index];\r\n\t}\r\n\r\n\tgetPosition(active){\r\n\t\treturn this._row.table.rowManager.getRowPosition(this._row, active);\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn this._row.delete();\r\n\t}\r\n\r\n\tscrollTo(){\r\n\t\treturn this._row.table.rowManager.scrollToRow(this._row);\r\n\t}\r\n\r\n\tmove(to, after){\r\n\t\tthis._row.moveToRow(to, after);\r\n\t}\r\n\r\n\tupdate(data){\r\n\t\treturn this._row.updateData(data);\r\n\t}\r\n\r\n\tnormalizeHeight(){\r\n\t\tthis._row.normalizeHeight(true);\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._row;\r\n\t}\r\n\r\n\treformat(){\r\n\t\treturn this._row.reinitialize();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._row.table;\r\n\t}\r\n\r\n\tgetNextRow(){\r\n\t\tvar row = this._row.nextRow();\r\n\t\treturn row ? row.getComponent() : row;\r\n\t}\r\n\r\n\tgetPrevRow(){\r\n\t\tvar row = this._row.prevRow();\r\n\t\treturn row ? row.getComponent() : row;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport RowComponent from './RowComponent.js';\r\nimport Helpers from '../tools/Helpers.js';\r\n\r\nexport default class Row extends CoreFeature{\r\n\tconstructor (data, parent, type = \"row\"){\r\n\t\tsuper(parent.table);\r\n\r\n\t\tthis.parent = parent;\r\n\t\tthis.data = {};\r\n\t\tthis.type = type; //type of element\r\n\t\tthis.element = false;\r\n\t\tthis.modules = {}; //hold module variables;\r\n\t\tthis.cells = [];\r\n\t\tthis.height = 0; //hold element height\r\n\t\tthis.heightStyled = \"\"; //hold element height prestyled to improve render efficiency\r\n\t\tthis.manualHeight = false; //user has manually set row height\r\n\t\tthis.outerHeight = 0; //holde lements outer height\r\n\t\tthis.initialized = false; //element has been rendered\r\n\t\tthis.heightInitialized = false; //element has resized cells to fit\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\tthis.created = false;\r\n\r\n\t\tthis.setData(data);\r\n\t}\r\n\r\n\tcreate(){\r\n\t\tif(!this.created){\r\n\t\t\tthis.created = true;\r\n\t\t\tthis.generateElement();\r\n\t\t}\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\r\n\t\tthis.element = el;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\tthis.create();\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tdetachElement(){\r\n\t\tif (this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateElement(){\r\n\t\tthis.createElement();\r\n\t\tthis.dispatch(\"row-init\", this);\r\n\t}\r\n\r\n\tgenerateCells(){\r\n\t\tthis.cells = this.table.columnManager.generateCells(this);\r\n\t}\r\n\r\n\t//functions to setup on first render\r\n\tinitialize(force){\r\n\t\tthis.create();\r\n\r\n\t\tif(!this.initialized || force){\r\n\r\n\t\t\tthis.deleteCells();\r\n\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\tthis.dispatch(\"row-layout-before\", this);\r\n\r\n\t\t\tthis.generateCells();\r\n\r\n\t\t\tthis.initialized = true;\r\n\r\n\t\t\tthis.table.columnManager.renderer.renderRowCells(this);\r\n\r\n\t\t\tif(force){\r\n\t\t\t\tthis.normalizeHeight();\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-layout\", this);\r\n\r\n\t\t\tif(this.table.options.rowFormatter){\r\n\t\t\t\tthis.table.options.rowFormatter(this.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-layout-after\", this);\r\n\t\t}else{\r\n\t\t\tthis.table.columnManager.renderer.rerenderRowCells(this);\r\n\t\t}\r\n\t}\r\n\r\n\treinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\r\n\t\tif(this.element && this.element.offsetParent !== null){\r\n\t\t\tthis.normalizeHeight(true);\r\n\t\t}\r\n\t}\r\n\r\n\tdeinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\t}\r\n\r\n\treinitialize(children){\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\r\n\t\tif(!this.manualHeight){\r\n\t\t\tthis.height = 0;\r\n\t\t\tthis.heightStyled = \"\";\r\n\t\t}\r\n\r\n\t\tif(this.element && this.element.offsetParent !== null){\r\n\t\t\tthis.initialize(true);\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"row-relayout\", this);\r\n\t}\r\n\r\n\t//get heights when doing bulk row style calcs in virtual DOM\r\n\tcalcHeight(force){\r\n\r\n\t\tvar maxHeight = 0,\r\n\t\tminHeight = this.table.options.resizableRows ? this.element.clientHeight : 0;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tvar height = cell.getHeight();\r\n\t\t\tif(height > maxHeight){\r\n\t\t\t\tmaxHeight = height;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(force){\r\n\t\t\tthis.height = Math.max(maxHeight, minHeight);\r\n\t\t}else{\r\n\t\t\tthis.height = this.manualHeight ? this.height : Math.max(maxHeight, minHeight);\r\n\t\t}\r\n\r\n\t\tthis.heightStyled = this.height ? this.height + \"px\" : \"\";\r\n\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t}\r\n\r\n\t//set of cells\r\n\tsetCellHeight(){\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setHeight();\r\n\t\t});\r\n\r\n\t\tthis.heightInitialized = true;\r\n\t}\r\n\r\n\tclearCellHeight(){\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.clearHeight();\r\n\t\t});\r\n\t}\r\n\r\n\t//normalize the height of elements in the row\r\n\tnormalizeHeight(force){\r\n\t\tif(force){\r\n\t\t\tthis.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis.calcHeight(force);\r\n\r\n\t\tthis.setCellHeight();\r\n\t}\r\n\r\n\t//set height of rows\r\n\tsetHeight(height, force){\r\n\t\tif(this.height != height || force){\r\n\r\n\t\t\tthis.manualHeight = true;\r\n\r\n\t\t\tthis.height = height;\r\n\t\t\tthis.heightStyled = height ? height + \"px\" : \"\";\r\n\r\n\t\t\tthis.setCellHeight();\r\n\r\n\t\t\t// this.outerHeight = this.element.outerHeight();\r\n\t\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t\t}\r\n\t}\r\n\r\n\t//return rows outer height\r\n\tgetHeight(){\r\n\t\treturn this.outerHeight;\r\n\t}\r\n\r\n\t//return rows outer Width\r\n\tgetWidth(){\r\n\t\treturn this.element.offsetWidth;\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\tdeleteCell(cell){\r\n\t\tvar index = this.cells.indexOf(cell);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.cells.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Data Management /////////////////\r\n\tsetData(data){\r\n\t\tthis.data = this.chain(\"row-data-init-before\", [this, data], undefined, data);\r\n\r\n\t\tthis.dispatch(\"row-data-init-after\", this);\r\n\t}\r\n\r\n\t//update the rows data\r\n\tupdateData(updatedData){\r\n\t\tvar visible = this.element && Helpers.elVisible(this.element),\r\n\t\ttempData = {},\r\n\t\tnewRowData;\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\r\n\t\t\tif(typeof updatedData === \"string\"){\r\n\t\t\t\tupdatedData = JSON.parse(updatedData);\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-save-before\", this);\r\n\r\n\t\t\tif(this.subscribed(\"row-data-changing\")){\r\n\t\t\t\ttempData = Object.assign(tempData, this.data);\r\n\t\t\t\ttempData = Object.assign(tempData, updatedData);\r\n\t\t\t}\r\n\r\n\t\t\tnewRowData = this.chain(\"row-data-changing\", [this, tempData, updatedData], null, updatedData);\r\n\r\n\t\t\t//set data\r\n\t\t\tfor (var attrname in newRowData) {\r\n\t\t\t\tthis.data[attrname] = newRowData[attrname];\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-save-after\", this);\r\n\r\n\t\t\t//update affected cells only\r\n\t\t\tfor (var attrname in updatedData) {\r\n\r\n\t\t\t\tlet columns = this.table.columnManager.getColumnsByFieldRoot(attrname);\r\n\r\n\t\t\t\tcolumns.forEach((column) => {\r\n\t\t\t\t\tlet cell = this.getCell(column.getField());\r\n\r\n\t\t\t\t\tif(cell){\r\n\t\t\t\t\t\tlet value = column.getFieldValue(newRowData);\r\n\t\t\t\t\t\tif(cell.getValue() != value){\r\n\t\t\t\t\t\t\tcell.setValueProcessData(value);\r\n\r\n\t\t\t\t\t\t\tif(visible){\r\n\t\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t//Partial reinitialization if visible\r\n\t\t\tif(visible){\r\n\t\t\t\tthis.normalizeHeight(true);\r\n\r\n\t\t\t\tif(this.table.options.rowFormatter){\r\n\t\t\t\t\tthis.table.options.rowFormatter(this.getComponent());\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.initialized = false;\r\n\t\t\t\tthis.height = 0;\r\n\t\t\t\tthis.heightStyled = \"\";\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-changed\", this, visible, updatedData);\r\n\r\n\t\t\t//this.reinitialize();\r\n\r\n\t\t\tthis.dispatchExternal(\"rowUpdated\", this.getComponent());\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t\t}\r\n\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\tif(transform){\r\n\t\t\treturn this.chain(\"row-data-retrieve\", [this, transform], null, this.data);\r\n\t\t}\r\n\r\n\t\treturn this.data;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar match = false;\r\n\r\n\t\tcolumn = this.table.columnManager.findColumn(column);\r\n\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\r\n\t\tmatch = this.cells.find(function(cell){\r\n\t\t\treturn cell.column === column;\r\n\t\t});\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tgetCellIndex(findCell){\r\n\t\treturn this.cells.findIndex(function(cell){\r\n\t\t\treturn cell === findCell;\r\n\t\t});\r\n\t}\r\n\r\n\tfindCell(subject){\r\n\t\treturn this.cells.find((cell) => {\r\n\t\t\treturn cell.element === subject;\r\n\t\t});\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\r\n\t\treturn this.cells;\r\n\t}\r\n\r\n\tnextRow(){\r\n\t\tvar row = this.table.rowManager.nextDisplayRow(this, true);\r\n\t\treturn row || false;\r\n\t}\r\n\r\n\tprevRow(){\r\n\t\tvar row = this.table.rowManager.prevDisplayRow(this, true);\r\n\t\treturn row || false;\r\n\t}\r\n\r\n\tmoveToRow(to, before){\r\n\t\tvar toRow = this.table.rowManager.findRow(to);\r\n\r\n\t\tif(toRow){\r\n\t\t\tthis.table.rowManager.moveRowActual(this, toRow, !before);\r\n\t\t\tthis.table.rowManager.refreshActiveData(\"display\", false, true);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching row found:\", to);\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////// Actions /////////////////////\r\n\tdelete(){\r\n\t\tthis.dispatch(\"row-delete\", this);\r\n\r\n\t\tthis.deleteActual();\r\n\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\r\n\tdeleteActual(blockRedraw){\r\n\t\tvar index = this.table.rowManager.getRowIndex(this);\r\n\r\n\t\tthis.detatchModules();\r\n\r\n\t\tthis.table.rowManager.deleteRow(this, blockRedraw);\r\n\r\n\t\tthis.deleteCells();\r\n\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\t\tthis.element = false;\r\n\r\n\t\tthis.dispatch(\"row-deleted\", this);\r\n\t}\r\n\r\n\tdetatchModules(){\r\n\t\tthis.dispatch(\"row-deleting\", this);\r\n\t}\r\n\r\n\tdeleteCells(){\r\n\t\tvar cellCount = this.cells.length;\r\n\r\n\t\tfor(let i = 0; i < cellCount; i++){\r\n\t\t\tthis.cells[0].delete();\r\n\t\t}\r\n\t}\r\n\r\n\twipe(){\r\n\t\tthis.detatchModules();\r\n\t\tthis.deleteCells();\r\n\r\n\t\tif(this.element){\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\tif(this.element.parentNode){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.modules = {};\r\n\t}\r\n\r\n\tgetGroup(){\r\n\t\treturn this.modules.group || false;\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new RowComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class BaiscVertical extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.verticalFillMode = \"fill\";\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t}\r\n\r\n\tclearRows(){\r\n\t\tvar element = this.tableElement;\r\n\r\n\t\t// element.children.detach();\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\telement.scrollTop = 0;\r\n\t\telement.scrollLeft = 0;\r\n\r\n\t\telement.style.minWidth = \"\";\r\n\t\telement.style.minHeight = \"\";\r\n\t\telement.style.display = \"\";\r\n\t\telement.style.visibility = \"\";\r\n\t}\r\n\r\n\trenderRows(){\r\n\t\tvar element = this.tableElement,\r\n\t\tonlyGroupHeaders = true;\r\n\r\n\t\tthis.rows().forEach((row, index) => {\r\n\t\t\tthis.styleRow(row, index);\r\n\t\t\telement.appendChild(row.getElement());\r\n\t\t\trow.initialize(true);\r\n\r\n\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\tonlyGroupHeaders = false;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(onlyGroupHeaders){\r\n\t\t\telement.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t}else{\r\n\t\t\telement.style.minWidth = \"\";\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trerenderRows(callback){\r\n\t\tthis.clearRows();\r\n\t\tthis.renderRows();\r\n\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\tvar rowTop = Helpers.elOffset(row.getElement()).top;\r\n\r\n\t\treturn !(Math.abs(this.elementVertical.scrollTop - rowTop) > Math.abs(this.elementVertical.scrollTop + this.elementVertical.clientHeight - rowTop));\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tthis.elementVertical.scrollTop = Helpers.elOffset(rowEl).top - Helpers.elOffset(this.elementVertical).top + this.elementVertical.scrollTop;\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\treturn this.rows();\r\n\t}\r\n\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class VirtualDomVertical extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.verticalFillMode = \"fill\";\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.vDomRowHeight = 20; //approximation of row heights for padding\r\n\r\n\t\tthis.vDomTop = 0; //hold position for first rendered row in the virtual DOM\r\n\t\tthis.vDomBottom = 0; //hold possition for last rendered row in the virtual DOM\r\n\r\n\t\tthis.vDomScrollPosTop = 0; //last scroll position of the vDom top;\r\n\t\tthis.vDomScrollPosBottom = 0; //last scroll position of the vDom bottom;\r\n\r\n\t\tthis.vDomTopPad = 0; //hold value of padding for top of virtual DOM\r\n\t\tthis.vDomBottomPad = 0; //hold value of padding for bottom of virtual DOM\r\n\r\n\t\tthis.vDomMaxRenderChain = 90; //the maximum number of dom elements that can be rendered in 1 go\r\n\r\n\t\tthis.vDomWindowBuffer = 0; //window row buffer before removing elements, to smooth scrolling\r\n\r\n\t\tthis.vDomWindowMinTotalRows = 20; //minimum number of rows to be generated in virtual dom (prevent buffering issues on tables with tall rows)\r\n\t\tthis.vDomWindowMinMarginRows = 5; //minimum number of rows to be generated in virtual dom margin\r\n\r\n\t\tthis.vDomTopNewRows = []; //rows to normalize after appending to optimize render speed\r\n\t\tthis.vDomBottomNewRows = []; //rows to normalize after appending to optimize render speed\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t///////// Public Functions ///////////\r\n\t//////////////////////////////////////\r\n\r\n\tclearRows(){\r\n\t\tvar element = this.tableElement;\r\n\r\n\t\t// element.children.detach();\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\telement.style.paddingTop = \"\";\r\n\t\telement.style.paddingBottom = \"\";\r\n\t\t// element.style.minWidth = \"\";\r\n\t\telement.style.minHeight = \"\";\r\n\t\telement.style.display = \"\";\r\n\t\telement.style.visibility = \"\";\r\n\r\n\t\tthis.elementVertical.scrollTop = 0;\r\n\t\tthis.elementVertical.scrollLeft = 0;\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.vDomTop = 0;\r\n\t\tthis.vDomBottom = 0;\r\n\t\tthis.vDomTopPad = 0;\r\n\t\tthis.vDomBottomPad = 0;\r\n\t\tthis.vDomScrollPosTop = 0;\r\n\t\tthis.vDomScrollPosBottom = 0;\r\n\t}\r\n\r\n\trenderRows(){\r\n\t\tthis._virtualRenderFill();\r\n\t}\r\n\r\n\trerenderRows(callback){\r\n\t\tvar scrollTop = this.elementVertical.scrollTop;\r\n\t\tvar topRow = false;\r\n\t\tvar topOffset = false;\r\n\r\n\t\tvar left = this.table.rowManager.scrollLeft;\r\n\r\n\t\tvar rows = this.rows();\r\n\r\n\t\tfor(var i = this.vDomTop; i <= this.vDomBottom; i++){\r\n\r\n\t\t\tif(rows[i]){\r\n\t\t\t\tvar diff = scrollTop - rows[i].getElement().offsetTop;\r\n\r\n\t\t\t\tif(topOffset === false || Math.abs(diff) < topOffset){\r\n\t\t\t\t\ttopOffset = diff;\r\n\t\t\t\t\ttopRow = i;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\trows.forEach((row) => {\r\n\t\t\trow.deinitializeHeight();\r\n\t\t});\r\n\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\r\n\t\tthis._virtualRenderFill((topRow === false ? this.rows.length - 1 : topRow), true, topOffset || 0);\r\n\r\n\t\tthis.scrollColumns(left);\r\n\t}\r\n\r\n\tscrollColumns(left){\r\n\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t}\r\n\r\n\tscrollRows(top, dir){\r\n\t\tvar topDiff = top - this.vDomScrollPosTop;\r\n\t\tvar bottomDiff = top - this.vDomScrollPosBottom;\r\n\t\tvar margin = this.vDomWindowBuffer * 2;\r\n\t\tvar rows = this.rows();\r\n\r\n\t\tthis.scrollTop = top;\r\n\r\n\t\tif(-topDiff > margin || bottomDiff > margin){\r\n\t\t\t//if big scroll redraw table;\r\n\t\t\tvar left = this.table.rowManager.scrollLeft;\r\n\t\t\tthis._virtualRenderFill(Math.floor((this.elementVertical.scrollTop / this.elementVertical.scrollHeight) * rows.length));\r\n\t\t\tthis.scrollColumns(left);\r\n\t\t}else{\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\t//scrolling up\r\n\t\t\t\tif(topDiff < 0){\r\n\t\t\t\t\tthis._addTopRow(rows, -topDiff);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(bottomDiff < 0){\r\n\t\t\t\t\t//hide bottom row if needed\r\n\t\t\t\t\tif(this.vDomScrollHeight - this.scrollTop > this.vDomWindowBuffer){\r\n\t\t\t\t\t\tthis._removeBottomRow(rows, -bottomDiff);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomScrollPosBottom = this.scrollTop;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\r\n\t\t\t\tif(bottomDiff >= 0){\r\n\t\t\t\t\tthis._addBottomRow(rows, bottomDiff);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//scrolling down\r\n\t\t\t\tif(topDiff >= 0){\r\n\t\t\t\t\t//hide top row if needed\r\n\t\t\t\t\tif(this.scrollTop > this.vDomWindowBuffer){\r\n\t\t\t\t\t\tthis._removeTopRow(rows, topDiff);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomScrollPosTop = this.scrollTop;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tresize(){\r\n\t\tthis.vDomWindowBuffer = this.table.options.renderVerticalBuffer || this.elementVertical.clientHeight;\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\tvar rowIndex = this.rows().indexOf(row);\r\n\r\n\t\treturn !(Math.abs(this.vDomTop - rowIndex) > Math.abs(this.vDomBottom - rowIndex));\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\tvar index = this.rows().indexOf(row);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis._virtualRenderFill(index, true);\r\n\t\t}\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\tvar topEdge = this.elementVertical.scrollTop,\r\n\t\tbottomEdge = this.elementVertical.clientHeight + topEdge,\r\n\t\ttopFound = false,\r\n\t\ttopRow = 0,\r\n\t\tbottomRow = 0,\r\n\t\trows = this.rows();\r\n\r\n\t\tif(includingBuffer){\r\n\t\t\ttopRow = this.vDomTop;\r\n\t\t\tbottomRow = this.vDomBottom;\r\n\t\t}else{\r\n\t\t\tfor(var i = this.vDomTop; i <= this.vDomBottom; i++){\r\n\t\t\t\tif(rows[i]){\r\n\t\t\t\t\tif(!topFound){\r\n\t\t\t\t\t\tif((topEdge - rows[i].getElement().offsetTop) >= 0){\r\n\t\t\t\t\t\t\ttopRow = i;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\ttopFound = true;\r\n\r\n\t\t\t\t\t\t\tif(bottomEdge - rows[i].getElement().offsetTop >= 0){\r\n\t\t\t\t\t\t\t\tbottomRow = i;\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(bottomEdge - rows[i].getElement().offsetTop >= 0){\r\n\t\t\t\t\t\t\tbottomRow = i;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn rows.slice(topRow, bottomRow + 1);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t//////// Internal Rendering //////////\r\n\t//////////////////////////////////////\r\n\r\n\t//full virtual render\r\n\t_virtualRenderFill(position, forceMove, offset){\r\n\t\tvar\telement = this.tableElement,\r\n\t\tholder = this.elementVertical,\r\n\t\ttopPad = 0,\r\n\t\trowsHeight = 0,\r\n\t\theightOccupied = 0,\r\n\t\ttopPadHeight = 0,\r\n\t\ti = 0,\r\n\t\trows = this.rows(),\r\n\t\trowsCount = rows.length,\r\n\t\tcontainerHeight = this.elementVertical.clientHeight;\r\n\r\n\t\tposition = position || 0;\r\n\r\n\t\toffset = offset || 0;\r\n\r\n\t\tif(!position){\r\n\t\t\tthis.clear();\r\n\t\t}else{\r\n\t\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\t\t//check if position is too close to bottom of table\r\n\t\t\theightOccupied = (rowsCount - position + 1) * this.vDomRowHeight;\r\n\r\n\t\t\tif(heightOccupied < containerHeight){\r\n\t\t\t\tposition -= Math.ceil((containerHeight - heightOccupied) / this.vDomRowHeight);\r\n\t\t\t\tif(position < 0){\r\n\t\t\t\t\tposition = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//calculate initial pad\r\n\t\t\ttopPad = Math.min(Math.max(Math.floor(this.vDomWindowBuffer / this.vDomRowHeight), this.vDomWindowMinMarginRows), position);\r\n\t\t\tposition -= topPad;\r\n\t\t}\r\n\r\n\t\tif(rowsCount && Helpers.elVisible(this.elementVertical)){\r\n\t\t\tthis.vDomTop = position;\r\n\r\n\t\t\tthis.vDomBottom = position -1;\r\n\r\n\t\t\twhile ((rowsHeight <= containerHeight + this.vDomWindowBuffer || i < this.vDomWindowMinTotalRows) && this.vDomBottom < rowsCount -1){\r\n\t\t\t\tvar index = this.vDomBottom + 1,\r\n\t\t\t\trow = rows[index],\r\n\t\t\t\trowHeight = 0;\r\n\r\n\t\t\t\tthis.styleRow(row, index);\r\n\r\n\t\t\t\telement.appendChild(row.getElement());\r\n\r\n\t\t\t\trow.initialize();\r\n\r\n\t\t\t\tif(!row.heightInitialized){\r\n\t\t\t\t\trow.normalizeHeight(true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowHeight = row.getHeight();\r\n\r\n\t\t\t\tif(i < topPad){\r\n\t\t\t\t\ttopPadHeight += rowHeight;\r\n\t\t\t\t}else{\r\n\t\t\t\t\trowsHeight += rowHeight;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.vDomBottom ++;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\r\n\t\t\tif(!position){\r\n\t\t\t\tthis.vDomTopPad = 0;\r\n\t\t\t\t//adjust rowheight to match average of rendered elements\r\n\t\t\t\tthis.vDomRowHeight = Math.floor((rowsHeight + topPadHeight) / i);\r\n\t\t\t\tthis.vDomBottomPad = this.vDomRowHeight * (rowsCount - this.vDomBottom -1);\r\n\r\n\t\t\t\tthis.vDomScrollHeight = topPadHeight + rowsHeight + this.vDomBottomPad - containerHeight;\r\n\t\t\t}else{\r\n\t\t\t\tthis.vDomTopPad = !forceMove ? this.scrollTop - topPadHeight : (this.vDomRowHeight * this.vDomTop) + offset;\r\n\t\t\t\tthis.vDomBottomPad = this.vDomBottom == rowsCount-1 ? 0 : Math.max(this.vDomScrollHeight - this.vDomTopPad - rowsHeight - topPadHeight, 0);\r\n\t\t\t}\r\n\r\n\t\t\telement.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\telement.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\r\n\t\t\tif(forceMove){\r\n\t\t\t\tthis.scrollTop = this.vDomTopPad + (topPadHeight) + offset - (this.elementVertical.scrollWidth > this.elementVertical.clientWidth ? this.elementVertical.offsetHeight - containerHeight : 0);\r\n\t\t\t}\r\n\r\n\t\t\tthis.scrollTop = Math.min(this.scrollTop, this.elementVertical.scrollHeight - containerHeight);\r\n\r\n\t\t\t//adjust for horizontal scrollbar if present (and not at top of table)\r\n\t\t\tif(this.elementVertical.scrollWidth > this.elementVertical.offsetWidth && forceMove){\r\n\t\t\t\tthis.scrollTop += this.elementVertical.offsetHeight - containerHeight;\r\n\t\t\t}\r\n\r\n\t\t\tthis.vDomScrollPosTop = this.scrollTop;\r\n\t\t\tthis.vDomScrollPosBottom = this.scrollTop;\r\n\r\n\t\t\tholder.scrollTop = this.scrollTop;\r\n\r\n\t\t\tthis.dispatch(\"render-virtual-fill\");\r\n\t\t}\r\n\t}\r\n\r\n\t_addTopRow(rows, fillableSpace){\r\n\t\tvar table = this.tableElement,\r\n\t\taddedRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\tindex = this.vDomTop -1,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tif(this.vDomTop){\r\n\t\t\t\tlet row = rows[index],\r\n\t\t\t\trowHeight, initialized;\r\n\r\n\t\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\t\t\t\t\tinitialized = row.initialized;\r\n\r\n\t\t\t\t\tif(fillableSpace >= rowHeight){\r\n\r\n\t\t\t\t\t\tthis.styleRow(row, index);\r\n\t\t\t\t\t\ttable.insertBefore(row.getElement(), table.firstChild);\r\n\r\n\t\t\t\t\t\tif(!row.initialized || !row.heightInitialized){\r\n\t\t\t\t\t\t\taddedRows.push(row);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trow.initialize();\r\n\r\n\t\t\t\t\t\tif(!initialized){\r\n\t\t\t\t\t\t\trowHeight = row.getElement().offsetHeight;\r\n\r\n\t\t\t\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\t\tthis.vDomTop--;\r\n\t\t\t\t\t\tindex--;\r\n\t\t\t\t\t\ti++;\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of addedRows){\r\n\t\t\trow.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis._quickNormalizeRowHeight(addedRows);\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomTopPad -= paddingAdjust;\r\n\r\n\t\t\tif(this.vDomTopPad < 0){\r\n\t\t\t\tthis.vDomTopPad = index * this.vDomRowHeight;\r\n\t\t\t}\r\n\r\n\t\t\tif(index < 1){\r\n\t\t\t\tthis.vDomTopPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\ttable.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\tthis.vDomScrollPosTop -= paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_removeTopRow(rows, fillableSpace){\r\n\t\tvar removableRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[this.vDomTop],\r\n\t\t\trowHeight, diff;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\t\t\t\t\tthis.vDomTop++;\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tremovableRows.push(row);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of removableRows){\r\n\t\t\tlet rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomTopPad += paddingAdjust;\r\n\t\t\tthis.tableElement.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\tthis.vDomScrollPosTop += this.vDomTop ? paddingAdjust : paddingAdjust + this.vDomWindowBuffer;\r\n\t\t}\r\n\t}\r\n\r\n\t_addBottomRow(rows, fillableSpace){\r\n\t\tvar table = this.tableElement,\r\n\t\taddedRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\tindex = this.vDomBottom + 1,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[index],\r\n\t\t\trowHeight, initialized;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\t\t\t\tinitialized = row.initialized;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\r\n\t\t\t\t\tthis.styleRow(row, index);\r\n\t\t\t\t\ttable.appendChild(row.getElement());\r\n\r\n\t\t\t\t\tif(!row.initialized || !row.heightInitialized){\r\n\t\t\t\t\t\taddedRows.push(row);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\trow.initialize();\r\n\r\n\t\t\t\t\tif(!initialized){\r\n\t\t\t\t\t\trowHeight = row.getElement().offsetHeight;\r\n\r\n\t\t\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tthis.vDomBottom++;\r\n\t\t\t\t\tindex++;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of addedRows){\r\n\t\t\trow.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis._quickNormalizeRowHeight(addedRows);\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomBottomPad -= paddingAdjust;\r\n\r\n\t\t\tif(this.vDomBottomPad < 0 || index == rows.length -1){\r\n\t\t\t\tthis.vDomBottomPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\ttable.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\t\t\tthis.vDomScrollPosBottom += paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_removeBottomRow(rows, fillableSpace){\r\n\t\tvar removableRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[this.vDomBottom],\r\n\t\t\trowHeight, diff;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\t\t\t\t\tthis.vDomBottom --;\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tremovableRows.push(row);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of removableRows){\r\n\t\t\tlet rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomBottomPad += paddingAdjust;\r\n\r\n\t\t\tif(this.vDomBottomPad < 0){\r\n\t\t\t\tthis.vDomBottomPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\tthis.tableElement.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\t\t\tthis.vDomScrollPosBottom -= paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_quickNormalizeRowHeight(rows){\r\n\t\tfor(let row of rows){\r\n\t\t\trow.calcHeight();\r\n\t\t}\r\n\r\n\t\tfor(let row of rows){\r\n\t\t\trow.setCellHeight();\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\nimport Row from './row/Row.js';\r\nimport RowComponent from './row/RowComponent.js';\r\nimport Helpers from './tools/Helpers.js';\r\n\r\nimport RendererBasicVertical from './rendering/renderers/BasicVertical.js';\r\nimport RendererVirtualDomVertical from './rendering/renderers/VirtualDomVertical.js';\r\n\r\nexport default class RowManager extends CoreFeature{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.element = this.createHolderElement(); //containing element\r\n\t\tthis.tableElement = this.createTableElement(); //table element\r\n\t\tthis.heightFixer = this.createTableElement(); //table element\r\n\t\tthis.placeholder = null; //placeholder element\r\n\t\tthis.placeholderContents = null; //placeholder element\r\n\t\t\r\n\t\tthis.firstRender = false; //handle first render\r\n\t\tthis.renderMode = \"virtual\"; //current rendering mode\r\n\t\tthis.fixedHeight = false; //current rendering mode\r\n\t\t\r\n\t\tthis.rows = []; //hold row data objects\r\n\t\tthis.activeRowsPipeline = []; //hold calculation of active rows\r\n\t\tthis.activeRows = []; //rows currently available to on display in the table\r\n\t\tthis.activeRowsCount = 0; //count of active rows\r\n\t\t\r\n\t\tthis.displayRows = []; //rows currently on display in the table\r\n\t\tthis.displayRowsCount = 0; //count of display rows\r\n\t\t\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.rowNumColumn = false; //hold column component for row number column\r\n\t\t\r\n\t\tthis.redrawBlock = false; //prevent redraws to allow multiple data manipulations before continuing\r\n\t\tthis.redrawBlockRestoreConfig = false; //store latest redraw function calls for when redraw is needed\r\n\t\tthis.redrawBlockRenderInPosition = false; //store latest redraw function calls for when redraw is needed\r\n\t\t\r\n\t\tthis.dataPipeline = []; //hold data pipeline tasks\r\n\t\tthis.displayPipeline = []; //hold data display pipeline tasks\r\n\t\t\r\n\t\tthis.renderer = null;\r\n\t}\r\n\t\r\n\t//////////////// Setup Functions /////////////////\r\n\t\r\n\tcreateHolderElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-tableholder\");\r\n\t\tel.setAttribute(\"tabindex\", 0);\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tcreateTableElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-table\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tinitializePlaceholder(){\r\n\t\t//configure placeholder element\r\n\t\tif(typeof this.table.options.placeholder == \"string\"){\r\n\t\t\tlet el = document.createElement(\"div\");\r\n\t\t\tel.classList.add(\"tabulator-placeholder\");\r\n\t\t\t\r\n\t\t\tlet contents = document.createElement(\"div\");\r\n\t\t\tcontents.classList.add(\"tabulator-placeholder-contents\");\r\n\t\t\tcontents.innerHTML = this.table.options.placeholder;\r\n\t\t\t\r\n\t\t\tel.appendChild(contents);\r\n\t\t\t\r\n\t\t\tthis.placeholderContents = contents;\r\n\t\t\tthis.placeholder = el;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return containing element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\t\r\n\t//return table element\r\n\tgetTableElement(){\r\n\t\treturn this.tableElement;\r\n\t}\r\n\t\r\n\t//return position of row in table\r\n\tgetRowPosition(row, active){\r\n\t\tif(active){\r\n\t\t\treturn this.activeRows.indexOf(row);\r\n\t\t}else{\r\n\t\t\treturn this.rows.indexOf(row);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.initializePlaceholder()\r\n\t\tthis.initializeRenderer();\r\n\t\t\r\n\t\t//initialize manager\r\n\t\tthis.element.appendChild(this.tableElement);\r\n\t\t\r\n\t\tthis.firstRender = true;\r\n\t\t\r\n\t\t//scroll header along with table body\r\n\t\tthis.element.addEventListener(\"scroll\", () => {\r\n\t\t\tvar left = this.element.scrollLeft,\r\n\t\t\tleftDir = this.scrollLeft > left,\r\n\t\t\ttop = this.element.scrollTop,\r\n\t\t\ttopDir = this.scrollTop > top;\r\n\t\t\t\r\n\t\t\t//handle horizontal scrolling\r\n\t\t\tif(this.scrollLeft != left){\r\n\t\t\t\tthis.scrollLeft = left;\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"scroll-horizontal\", left, leftDir);\r\n\t\t\t\tthis.dispatchExternal(\"scrollHorizontal\", left, leftDir);\r\n\r\n\t\t\t\tthis._positionPlaceholder();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//handle vertical scrolling\r\n\t\t\tif(this.scrollTop != top){\r\n\t\t\t\tthis.scrollTop = top;\r\n\t\t\t\t\r\n\t\t\t\tthis.renderer.scrollRows(top, topDir);\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"scroll-vertical\", top, topDir);\r\n\t\t\t\tthis.dispatchExternal(\"scrollVertical\", top, topDir);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t////////////////// Row Manipulation //////////////////\r\n\tfindRow(subject){\r\n\t\tif(typeof subject == \"object\"){\r\n\t\t\tif(subject instanceof Row){\r\n\t\t\t\t//subject is row element\r\n\t\t\t\treturn subject;\r\n\t\t\t}else if(subject instanceof RowComponent){\r\n\t\t\t\t//subject is public row component\r\n\t\t\t\treturn subject._getSelf() || false;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\t//subject is a HTML element of the row\r\n\t\t\t\tlet match = this.rows.find((row) => {\r\n\t\t\t\t\treturn row.getElement() === subject;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\treturn match || false;\r\n\t\t\t}\r\n\t\t}else if(typeof subject == \"undefined\" || subject === null){\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the index of the row\r\n\t\t\tlet match = this.rows.find((row) => {\r\n\t\t\t\treturn row.data[this.table.options.index] == subject;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\treturn match || false;\r\n\t\t}\r\n\t\t\r\n\t\t//catch all for any other type of input\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tgetRowFromDataObject(data){\r\n\t\tvar match = this.rows.find((row) => {\r\n\t\t\treturn row.data === data;\r\n\t\t});\r\n\t\t\r\n\t\treturn match || false;\r\n\t}\r\n\t\r\n\tgetRowFromPosition(position, active){\r\n\t\tif(active){\r\n\t\t\treturn this.activeRows[position];\r\n\t\t}else{\r\n\t\t\treturn this.rows[position];\r\n\t\t}\r\n\t}\r\n\t\r\n\tscrollToRow(row, position, ifVisible){\r\n\t\treturn this.renderer.scrollToRowPosition(row, position, ifVisible);\r\n\t}\r\n\t\r\n\t////////////////// Data Handling //////////////////\r\n\tsetData(data, renderInPosition, columnsChanged){\r\n\t\treturn new Promise((resolve, reject)=>{\r\n\t\t\tif(renderInPosition && this.getDisplayRows().length){\r\n\t\t\t\tif(this.table.options.pagination){\r\n\t\t\t\t\tthis._setDataActual(data, true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.reRenderInPosition(() => {\r\n\t\t\t\t\t\tthis._setDataActual(data);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.options.autoColumns && columnsChanged && this.table.initialized){\r\n\t\t\t\t\tthis.table.columnManager.generateColumnsFromRowData(data);\r\n\t\t\t\t}\r\n\t\t\t\tthis.resetScroll();\r\n\t\t\t\t\r\n\t\t\t\tthis._setDataActual(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\t\r\n\t_setDataActual(data, renderInPosition){\r\n\t\tthis.dispatchExternal(\"dataProcessing\", data);\r\n\t\t\r\n\t\tthis._wipeElements();\r\n\t\t\r\n\t\tif(Array.isArray(data)){\r\n\t\t\tthis.dispatch(\"data-processing\", data);\r\n\t\t\t\r\n\t\t\tdata.forEach((def, i) => {\r\n\t\t\t\tif(def && typeof def === \"object\"){\r\n\t\t\t\t\tvar row = new Row(def, this);\r\n\t\t\t\t\tthis.rows.push(row);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Data Loading Warning - Invalid row data detected and ignored, expecting object but received:\", def);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.refreshActiveData(false, false, renderInPosition);\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"data-processed\", data);\r\n\t\t\tthis.dispatchExternal(\"dataProcessed\", data);\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Data Loading Error - Unable to process data due to invalid data type \\nExpecting: array \\nReceived: \", typeof data, \"\\nData: \", data);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_wipeElements(){\r\n\t\tthis.dispatch(\"rows-wipe\");\r\n\t\t\r\n\t\tthis.rows.forEach((row) => {\r\n\t\t\trow.wipe();\r\n\t\t});\r\n\t\t\r\n\t\tthis.rows = [];\r\n\t\tthis.activeRows = [];\r\n\t\tthis.activeRowsPipeline = [];\r\n\t\tthis.activeRowsCount = 0;\r\n\t\tthis.displayRows = [];\r\n\t\tthis.displayRowsCount = 0;\r\n\t\t\r\n\t\tthis.adjustTableSize();\r\n\t}\r\n\t\r\n\tdeleteRow(row, blockRedraw){\r\n\t\tvar allIndex = this.rows.indexOf(row),\r\n\t\tactiveIndex = this.activeRows.indexOf(row);\r\n\t\t\r\n\t\tif(activeIndex > -1){\r\n\t\t\tthis.activeRows.splice(activeIndex, 1);\r\n\t\t}\r\n\t\t\r\n\t\tif(allIndex > -1){\r\n\t\t\tthis.rows.splice(allIndex, 1);\r\n\t\t}\r\n\t\t\r\n\t\tthis.setActiveRows(this.activeRows);\r\n\t\t\r\n\t\tthis.displayRowIterator((rows) => {\r\n\t\t\tvar displayIndex = rows.indexOf(row);\r\n\t\t\t\r\n\t\t\tif(displayIndex > -1){\r\n\t\t\t\trows.splice(displayIndex, 1);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t}\r\n\t\t\r\n\t\tthis.regenerateRowNumbers();\r\n\t\t\r\n\t\tthis.dispatchExternal(\"rowDeleted\", row.getComponent());\r\n\t\t\r\n\t\tif(!this.displayRowsCount){\r\n\t\t\tthis._showPlaceholder();\r\n\t\t}\r\n\t\t\r\n\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\tthis.dispatchExternal(\"dataChanged\", this.getData());\r\n\t\t}\r\n\t}\r\n\t\r\n\taddRow(data, pos, index, blockRedraw){\r\n\t\tvar row = this.addRowActual(data, pos, index, blockRedraw);\r\n\t\treturn row;\r\n\t}\r\n\t\r\n\t//add multiple rows\r\n\taddRows(data, pos, index){\r\n\t\tvar length = 0,\r\n\t\trows = [];\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tpos = this.findAddRowPos(pos);\r\n\t\t\t\r\n\t\t\tif(!Array.isArray(data)){\r\n\t\t\t\tdata = [data];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlength = data.length - 1;\r\n\t\t\t\r\n\t\t\tif((typeof index == \"undefined\" && pos) || (typeof index !== \"undefined\" && !pos)){\r\n\t\t\t\tdata.reverse();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdata.forEach((item, i) => {\r\n\t\t\t\tvar row = this.addRow(item, pos, index, true);\r\n\t\t\t\trows.push(row);\r\n\t\t\t\tthis.dispatch(\"row-added\", row, data, pos, index);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.refreshActiveData(false, false, true);\r\n\t\t\t\r\n\t\t\tthis.regenerateRowNumbers();\r\n\t\t\t\r\n\t\t\tif(rows.length){\r\n\t\t\t\tthis._clearPlaceholder();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tresolve(rows);\r\n\t\t});\r\n\t}\r\n\t\r\n\tfindAddRowPos(pos){\r\n\t\tif(typeof pos === \"undefined\"){\r\n\t\t\tpos = this.table.options.addRowPos;\r\n\t\t}\r\n\t\t\r\n\t\tif(pos === \"pos\"){\r\n\t\t\tpos = true;\r\n\t\t}\r\n\t\t\r\n\t\tif(pos === \"bottom\"){\r\n\t\t\tpos = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn pos;\r\n\t}\r\n\t\r\n\taddRowActual(data, pos, index, blockRedraw){\r\n\t\tvar row = data instanceof Row ? data : new Row(data || {}, this),\r\n\t\ttop = this.findAddRowPos(pos),\r\n\t\tallIndex = -1,\r\n\t\tactiveIndex, chainResult;\r\n\t\t\r\n\t\tif(!index){\r\n\t\t\tchainResult = this.chain(\"row-adding-position\", [row, top], null, {index, top});\r\n\t\t\t\r\n\t\t\tindex = chainResult.index;\r\n\t\t\ttop = chainResult.top;\r\n\t\t}\r\n\t\t\r\n\t\tif(typeof index !== \"undefined\"){\r\n\t\t\tindex = this.findRow(index);\r\n\t\t}\r\n\t\t\r\n\t\tindex = this.chain(\"row-adding-index\", [row, index, top], null, index);\r\n\t\t\r\n\t\tif(index){\r\n\t\t\tallIndex = this.rows.indexOf(index);\r\n\t\t}\r\n\t\t\r\n\t\tif(index && allIndex > -1){\r\n\t\t\tactiveIndex = this.activeRows.indexOf(index);\r\n\t\t\t\r\n\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\tvar displayIndex = rows.indexOf(index);\r\n\t\t\t\t\r\n\t\t\t\tif(displayIndex > -1){\r\n\t\t\t\t\trows.splice((top ? displayIndex : displayIndex + 1), 0, row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(activeIndex > -1){\r\n\t\t\t\tthis.activeRows.splice((top ? activeIndex : activeIndex + 1), 0, row);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.rows.splice((top ? allIndex : allIndex + 1), 0, row);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tif(top){\r\n\t\t\t\t\r\n\t\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\t\trows.unshift(row);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRows.unshift(row);\r\n\t\t\t\tthis.rows.unshift(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\t\trows.push(row);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRows.push(row);\r\n\t\t\t\tthis.rows.push(row);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.setActiveRows(this.activeRows);\r\n\t\t\r\n\t\tthis.dispatchExternal(\"rowAdded\", row.getComponent());\r\n\t\t\r\n\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t}\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t}\r\n\t\t\r\n\t\treturn row;\r\n\t}\r\n\t\r\n\tmoveRow(from, to, after){\r\n\t\tthis.dispatch(\"row-move\", from, to, after);\r\n\t\t\r\n\t\tthis.moveRowActual(from, to, after);\r\n\t\t\r\n\t\tthis.regenerateRowNumbers();\r\n\t\t\r\n\t\tthis.dispatch(\"row-moved\", from, to, after);\r\n\t\tthis.dispatchExternal(\"rowMoved\", from.getComponent());\r\n\t}\r\n\t\r\n\tmoveRowActual(from, to, after){\r\n\t\tthis.moveRowInArray(this.rows, from, to, after);\r\n\t\tthis.moveRowInArray(this.activeRows, from, to, after);\r\n\t\t\r\n\t\tthis.displayRowIterator((rows) => {\r\n\t\t\tthis.moveRowInArray(rows, from, to, after);\r\n\t\t});\r\n\t\t\r\n\t\tthis.dispatch(\"row-moving\", from, to, after);\r\n\t}\r\n\t\r\n\tmoveRowInArray(rows, from, to, after){\r\n\t\tvar\tfromIndex, toIndex, start, end;\r\n\t\t\r\n\t\tif(from !== to){\r\n\t\t\t\r\n\t\t\tfromIndex = rows.indexOf(from);\r\n\t\t\t\r\n\t\t\tif (fromIndex > -1) {\r\n\t\t\t\t\r\n\t\t\t\trows.splice(fromIndex, 1);\r\n\t\t\t\t\r\n\t\t\t\ttoIndex = rows.indexOf(to);\r\n\t\t\t\t\r\n\t\t\t\tif (toIndex > -1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(after){\r\n\t\t\t\t\t\trows.splice(toIndex+1, 0, from);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trows.splice(toIndex, 0, from);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\trows.splice(fromIndex, 0, from);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//restyle rows\r\n\t\t\tif(rows === this.getDisplayRows()){\r\n\t\t\t\t\r\n\t\t\t\tstart = fromIndex < toIndex ? fromIndex : toIndex;\r\n\t\t\t\tend = toIndex > fromIndex ? toIndex : fromIndex +1;\r\n\t\t\t\t\r\n\t\t\t\tfor(let i = start; i <= end; i++){\r\n\t\t\t\t\tif(rows[i]){\r\n\t\t\t\t\t\tthis.styleRow(rows[i], i);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tclearData(){\r\n\t\tthis.setData([]);\r\n\t}\r\n\t\r\n\tgetRowIndex(row){\r\n\t\treturn this.findRowIndex(row, this.rows);\r\n\t}\r\n\t\r\n\tgetDisplayRowIndex(row){\r\n\t\tvar index = this.getDisplayRows().indexOf(row);\r\n\t\treturn index > -1 ? index : false;\r\n\t}\r\n\t\r\n\tnextDisplayRow(row, rowOnly){\r\n\t\tvar index = this.getDisplayRowIndex(row),\r\n\t\tnextRow = false;\r\n\t\t\r\n\t\t\r\n\t\tif(index !== false && index < this.displayRowsCount -1){\r\n\t\t\tnextRow = this.getDisplayRows()[index+1];\r\n\t\t}\r\n\t\t\r\n\t\tif(nextRow && (!(nextRow instanceof Row) || nextRow.type != \"row\")){\r\n\t\t\treturn this.nextDisplayRow(nextRow, rowOnly);\r\n\t\t}\r\n\t\t\r\n\t\treturn nextRow;\r\n\t}\r\n\t\r\n\tprevDisplayRow(row, rowOnly){\r\n\t\tvar index = this.getDisplayRowIndex(row),\r\n\t\tprevRow = false;\r\n\t\t\r\n\t\tif(index){\r\n\t\t\tprevRow = this.getDisplayRows()[index-1];\r\n\t\t}\r\n\t\t\r\n\t\tif(rowOnly && prevRow && (!(prevRow instanceof Row) || prevRow.type != \"row\")){\r\n\t\t\treturn this.prevDisplayRow(prevRow, rowOnly);\r\n\t\t}\r\n\t\t\r\n\t\treturn prevRow;\r\n\t}\r\n\t\r\n\tfindRowIndex(row, list){\r\n\t\tvar rowIndex;\r\n\t\t\r\n\t\trow = this.findRow(row);\r\n\t\t\r\n\t\tif(row){\r\n\t\t\trowIndex = list.indexOf(row);\r\n\t\t\t\r\n\t\t\tif(rowIndex > -1){\r\n\t\t\t\treturn rowIndex;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tgetData(active, transform){\r\n\t\tvar output = [],\r\n\t\trows = this.getRows(active);\r\n\t\t\r\n\t\trows.forEach(function(row){\r\n\t\t\tif(row.type == \"row\"){\r\n\t\t\t\toutput.push(row.getData(transform || \"data\"));\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetComponents(active){\r\n\t\tvar\toutput = [],\r\n\t\trows = this.getRows(active);\r\n\t\t\r\n\t\trows.forEach(function(row){\r\n\t\t\toutput.push(row.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetDataCount(active){\r\n\t\tvar rows = this.getRows(active);\r\n\t\t\r\n\t\treturn rows.length;\r\n\t}\r\n\t\r\n\tscrollHorizontal(left){\r\n\t\tthis.scrollLeft = left;\r\n\t\tthis.element.scrollLeft = left;\r\n\t\t\r\n\t\tthis.dispatch(\"scroll-horizontal\", left);\r\n\t}\r\n\t\r\n\tregisterDataPipelineHandler(handler, priority){\r\n\t\tif(typeof priority !== \"undefined\"){\r\n\t\t\tthis.dataPipeline.push({handler, priority})\r\n\t\t\tthis.dataPipeline.sort((a, b) => {\r\n\t\t\t\treturn a.priority - b.priority;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Data pipeline handlers must have a priority in order to be registered\")\r\n\t\t}\r\n\t}\r\n\t\r\n\tregisterDisplayPipelineHandler(handler, priority){\r\n\t\tif(typeof priority !== \"undefined\"){\r\n\t\t\tthis.displayPipeline.push({handler, priority})\r\n\t\t\tthis.displayPipeline.sort((a, b) => {\r\n\t\t\t\treturn a.priority - b.priority;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Display pipeline handlers must have a priority in order to be registered\")\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set active data set\r\n\trefreshActiveData(handler, skipStage, renderInPosition){\r\n\t\tvar table = this.table,\r\n\t\tstage = \"\",\r\n\t\tindex = 0,\r\n\t\tcascadeOrder = [\"all\", \"dataPipeline\", \"display\", \"displayPipeline\", \"end\"],\r\n\t\tdisplayIndex;\r\n\t\t\r\n\t\t\r\n\t\tif(typeof handler === \"function\"){\r\n\t\t\tindex = this.dataPipeline.findIndex((item) => {\r\n\t\t\t\treturn item.handler === handler;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\tstage = \"dataPipeline\";\r\n\t\t\t\t\r\n\t\t\t\tif(skipStage){\r\n\t\t\t\t\tif(index == this.dataPipeline.length - 1){\r\n\t\t\t\t\t\tstage = \"display\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tindex++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tindex = this.displayPipeline.findIndex((item) => {\r\n\t\t\t\t\treturn item.handler === handler;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tstage = \"displayPipeline\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(skipStage){\r\n\t\t\t\t\t\tif(index == this.displayPipeline.length - 1){\r\n\t\t\t\t\t\t\tstage = \"end\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tindex++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.error(\"Unable to refresh data, invalid handler provided\", handler)\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tstage = handler || \"all\";\r\n\t\t\tindex = 0;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.redrawBlock){\r\n\t\t\tif(!this.redrawBlockRestoreConfig || (this.redrawBlockRestoreConfig && ((this.redrawBlockRestoreConfig.stage === stage && index < this.redrawBlockRestoreConfig.index) || (cascadeOrder.indexOf(stage) < cascadeOrder.indexOf(this.redrawBlockRestoreConfig.stage))))){\r\n\t\t\t\tthis.redrawBlockRestoreConfig = {\r\n\t\t\t\t\thandler: handler,\r\n\t\t\t\t\tskipStage: skipStage,\r\n\t\t\t\t\trenderInPosition: renderInPosition,\r\n\t\t\t\t\tstage:stage,\r\n\t\t\t\t\tindex:index,\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn;\r\n\t\t}else{\r\n\t\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\t\tif(renderInPosition){\r\n\t\t\t\t\tthis.reRenderInPosition(this.refreshPipelines.bind(this, handler, stage, index, renderInPosition));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!handler){\r\n\t\t\t\t\t\tthis.table.columnManager.renderer.renderColumns();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.renderTable();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(table.options.layoutColumnsOnNewData){\r\n\t\t\t\t\t\tthis.table.columnManager.redraw(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"data-refreshed\");\r\n\t\t}\r\n\t}\r\n\t\r\n\trefreshPipelines(handler, stage, index, renderInPosition){\r\n\t\tthis.dispatch(\"data-refreshing\");\r\n\t\t\r\n\t\tif(!handler){\r\n\t\t\tthis.activeRowsPipeline[0] = this.rows.slice(0);\r\n\t\t}\r\n\t\t\r\n\t\t//cascade through data refresh stages\r\n\t\tswitch(stage){\r\n\t\t\tcase \"all\":\r\n\t\t\t//handle case where alldata needs refreshing\r\n\t\t\t\r\n\t\t\tcase \"dataPipeline\":\r\n\t\t\t\r\n\t\t\tfor(let i = index; i < this.dataPipeline.length; i++){\r\n\t\t\t\tlet result = this.dataPipeline[i].handler(this.activeRowsPipeline[i].slice(0));\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRowsPipeline[i + 1] = result || this.activeRowsPipeline[i].slice(0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);\r\n\t\t\t\r\n\t\t\tthis.regenerateRowNumbers();\r\n\t\t\t\r\n\t\t\tcase \"display\":\r\n\t\t\tindex = 0;\r\n\t\t\tthis.resetDisplayRows();\r\n\t\t\t\r\n\t\t\tcase \"displayPipeline\":\r\n\t\t\tfor(let i = index; i < this.displayPipeline.length; i++){\r\n\t\t\t\tlet result = this.displayPipeline[i].handler((i ? this.getDisplayRows(i - 1) : this.activeRows).slice(0), renderInPosition);\r\n\t\t\t\t\r\n\t\t\t\tthis.setDisplayRows(result || this.getDisplayRows(i - 1).slice(0), i);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase \"end\":\r\n\t\t\t//case to handle scenario when trying to skip past end stage\r\n\t\t}\r\n\t}\r\n\t\r\n\t//regenerate row numbers for row number formatter if in use\r\n\tregenerateRowNumbers(){\r\n\t\tif(this.rowNumColumn){\r\n\t\t\tthis.activeRows.forEach((row) => {\r\n\t\t\t\tvar cell = row.getCell(this.rowNumColumn);\r\n\t\t\t\t\r\n\t\t\t\tif(cell){\r\n\t\t\t\t\tcell._generateContents();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetActiveRows(activeRows){\r\n\t\tthis.activeRows = activeRows;\r\n\t\tthis.activeRowsCount = this.activeRows.length;\r\n\t}\r\n\t\r\n\t//reset display rows array\r\n\tresetDisplayRows(){\r\n\t\tthis.displayRows = [];\r\n\t\t\r\n\t\tthis.displayRows.push(this.activeRows.slice(0));\r\n\t\t\r\n\t\tthis.displayRowsCount = this.displayRows[0].length;\r\n\t}\r\n\t\r\n\tgetNextDisplayIndex(){\r\n\t\treturn this.displayRows.length;\r\n\t}\r\n\t\r\n\t//set display row pipeline data\r\n\tsetDisplayRows(displayRows, index){\r\n\t\t\r\n\t\tvar output = true;\r\n\t\t\r\n\t\tif(index && typeof this.displayRows[index] != \"undefined\"){\r\n\t\t\tthis.displayRows[index] = displayRows;\r\n\t\t\toutput = true;\r\n\t\t}else{\r\n\t\t\tthis.displayRows.push(displayRows)\r\n\t\t\toutput = index = this.displayRows.length -1;\r\n\t\t}\r\n\t\t\r\n\t\tif(index == this.displayRows.length -1){\r\n\t\t\tthis.displayRowsCount = this.displayRows[this.displayRows.length -1].length;\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetDisplayRows(index){\r\n\t\tif(typeof index == \"undefined\"){\r\n\t\t\treturn this.displayRows.length ? this.displayRows[this.displayRows.length -1] : [];\r\n\t\t}else{\r\n\t\t\treturn this.displayRows[index] || [];\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetVisibleRows(chain, viewable){\r\n\t\tvar rows = Object.assign([], this.renderer.visibleRows(!viewable));\r\n\t\t\r\n\t\tif(chain){\r\n\t\t\trows = this.chain(\"rows-visible\", [viewable], rows, rows);\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t//repeat action accross display rows\r\n\tdisplayRowIterator(callback){\r\n\t\tthis.activeRowsPipeline.forEach(callback);\r\n\t\tthis.displayRows.forEach(callback);\r\n\t\t\r\n\t\tthis.displayRowsCount = this.displayRows[this.displayRows.length -1].length;\r\n\t}\r\n\t\r\n\t//return only actual rows (not group headers etc)\r\n\tgetRows(type){\r\n\t\tvar rows;\r\n\t\t\r\n\t\tswitch(type){\r\n\t\t\tcase \"active\":\r\n\t\t\trows = this.activeRows;\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"display\":\r\n\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"visible\":\r\n\t\t\trows = this.getVisibleRows(false, true);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\trows = this.chain(\"rows-retrieve\", type, null, this.rows) || this.rows;\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t///////////////// Table Rendering /////////////////\r\n\t//trigger rerender of table in current position\r\n\treRenderInPosition(callback){\r\n\t\tif(this.redrawBlock){\r\n\t\t\tif(callback){\r\n\t\t\t\tcallback();\r\n\t\t\t}else{\r\n\t\t\t\tthis.redrawBlockRenderInPosition = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.renderer.rerenderRows(callback);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRenderer(){\r\n\t\tvar renderClass;\r\n\t\t\r\n\t\tvar renderers = {\r\n\t\t\t\"virtual\": RendererVirtualDomVertical,\r\n\t\t\t\"basic\": RendererBasicVertical,\r\n\t\t};\r\n\t\t\r\n\t\tif(typeof this.table.options.renderVertical === \"string\"){\r\n\t\t\trenderClass = renderers[this.table.options.renderVertical];\r\n\t\t}else{\r\n\t\t\trenderClass = this.table.options.renderVertical;\r\n\t\t}\r\n\t\t\r\n\t\tif(renderClass){\r\n\t\t\tthis.renderer = new renderClass(this.table, this.element, this.tableElement);\r\n\t\t\tthis.renderer.initialize();\r\n\t\t\t\r\n\t\t\tif((this.table.element.clientHeight || this.table.options.height)){\r\n\t\t\t\tthis.fixedHeight = true;\r\n\t\t\t}else{\r\n\t\t\t\tthis.fixedHeight = false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Unable to find matching renderer:\", table.options.renderVertical);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRenderMode(){\r\n\t\treturn this.renderMode;\r\n\t}\r\n\t\r\n\trenderTable(){\r\n\t\tthis.dispatchExternal(\"renderStarted\");\r\n\t\t\r\n\t\tthis.element.scrollTop = 0;\r\n\t\t\r\n\t\tthis._clearTable();\r\n\t\t\r\n\t\tif(this.displayRowsCount){\r\n\t\t\tthis.renderer.renderRows();\r\n\t\t\t\r\n\t\t\tif(this.firstRender){\r\n\t\t\t\tthis.firstRender = false;\r\n\t\t\t\tthis.layoutRefresh();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.renderEmptyScroll();\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.fixedHeight){\r\n\t\t\tthis.adjustTableSize();\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatch(\"table-layout\");\r\n\t\t\r\n\t\tif(!this.displayRowsCount){\r\n\t\t\tthis._showPlaceholder();\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatchExternal(\"renderComplete\");\r\n\t}\r\n\t\r\n\t//show scrollbars on empty table div\r\n\trenderEmptyScroll(){\r\n\t\tif(this.placeholder){\r\n\t\t\tthis.tableElement.style.display = \"none\";\r\n\t\t}else{\r\n\t\t\tthis.tableElement.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t\t// this.tableElement.style.minHeight = \"1px\";\r\n\t\t\t// this.tableElement.style.visibility = \"hidden\";\r\n\t\t}\r\n\t}\r\n\t\r\n\t_clearTable(){\r\n\t\tvar element = this.tableElement;\r\n\t\t\r\n\t\tthis._clearPlaceholder();\r\n\t\t\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.renderer.clearRows();\r\n\t}\r\n\t\r\n\t_showPlaceholder(){\r\n\t\tif(this.placeholder){\r\n\t\t\tthis.placeholder.setAttribute(\"tabulator-render-mode\", this.renderMode);\r\n\t\t\t\r\n\t\t\tthis.getElement().appendChild(this.placeholder);\r\n\t\t\tthis._positionPlaceholder();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_clearPlaceholder(){\r\n\t\tif(this.placeholder && this.placeholder.parentNode){\r\n\t\t\tthis.placeholder.parentNode.removeChild(this.placeholder);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_positionPlaceholder(){\r\n\t\tif(this.placeholder && this.placeholder.parentNode){\r\n\t\t\tthis.placeholder.style.width = this.table.columnManager.getWidth() + \"px\";\r\n\t\t\tthis.placeholderContents.style.width = this.table.rowManager.element.clientWidth + \"px\";\r\n\t\t\tthis.placeholderContents.style.marginLeft = this.scrollLeft + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tstyleRow(row, index){\r\n\t\tvar rowEl = row.getElement();\r\n\t\t\r\n\t\tif(index % 2){\r\n\t\t\trowEl.classList.add(\"tabulator-row-even\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-odd\");\r\n\t\t}else{\r\n\t\t\trowEl.classList.add(\"tabulator-row-odd\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-even\");\r\n\t\t}\r\n\t}\r\n\t\r\n\t//normalize height of active rows\r\n\tnormalizeHeight(){\r\n\t\tthis.activeRows.forEach(function(row){\r\n\t\t\trow.normalizeHeight();\r\n\t\t});\r\n\t}\r\n\t\r\n\t//adjust the height of the table holder to fit in the Tabulator element\r\n\tadjustTableSize(){\r\n\t\tvar initialHeight = this.element.clientHeight,\r\n\t\tmodExists;\r\n\t\t\r\n\t\tif(this.renderer.verticalFillMode === \"fill\"){\r\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));\r\n\t\t\t\r\n\t\t\tif(this.fixedHeight){\r\n\t\t\t\tthis.element.style.minHeight = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t\tthis.element.style.height = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t\tthis.element.style.maxHeight = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.height = \"\";\r\n\t\t\t\tthis.element.style.height = (this.table.element.clientHeight - otherHeight) + \"px\";\r\n\t\t\t\tthis.element.scrollTop = this.scrollTop;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.renderer.resize();\r\n\t\t\t\r\n\t\t\t//check if the table has changed size when dealing with variable height tables\r\n\t\t\tif(!this.fixedHeight && initialHeight != this.element.clientHeight){\r\n\t\t\t\tif(this.subscribed(\"table-resize\")){\r\n\t\t\t\t\tthis.dispatch(\"table-resize\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.redraw();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._positionPlaceholder();\r\n\t}\r\n\t\r\n\t//renitialize all rows\r\n\treinitialize(){\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\trow.reinitialize(true);\r\n\t\t});\r\n\t}\r\n\t\r\n\t//prevent table from being redrawn\r\n\tblockRedraw (){\r\n\t\tthis.redrawBlock = true;\r\n\t\tthis.redrawBlockRestoreConfig = false;\r\n\t}\r\n\t\r\n\t//restore table redrawing\r\n\trestoreRedraw (){\r\n\t\tthis.redrawBlock = false;\r\n\t\t\r\n\t\tif(this.redrawBlockRestoreConfig){\r\n\t\t\tthis.refreshActiveData(this.redrawBlockRestoreConfig.handler, this.redrawBlockRestoreConfig.skipStage, this.redrawBlockRestoreConfig.renderInPosition)\r\n\t\t\t\r\n\t\t\tthis.redrawBlockRestoreConfig = false;\r\n\t\t}else{\r\n\t\t\tif(this.redrawBlockRenderInPosition){\r\n\t\t\t\tthis.reRenderInPosition();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.redrawBlockRenderInPosition = false;\r\n\t}\r\n\t\r\n\t//redraw table\r\n\tredraw (force){\r\n\t\tvar pos = 0,\r\n\t\tleft = this.scrollLeft;\r\n\t\t\r\n\t\tthis.adjustTableSize();\r\n\t\t\r\n\t\tthis.table.tableWidth = this.table.element.clientWidth;\r\n\t\t\r\n\t\tif(!force){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t\tthis.scrollHorizontal(left);\r\n\t\t}else{\r\n\t\t\tthis.renderTable();\r\n\t\t}\r\n\t}\r\n\t\r\n\tresetScroll(){\r\n\t\tthis.element.scrollLeft = 0;\r\n\t\tthis.element.scrollTop = 0;\r\n\t\t\r\n\t\tif(this.table.browser === \"ie\"){\r\n\t\t\tvar event = document.createEvent(\"Event\");\r\n\t\t\tevent.initEvent(\"scroll\", false, true);\r\n\t\t\tthis.element.dispatchEvent(event);\r\n\t\t}else{\r\n\t\t\tthis.element.dispatchEvent(new Event('scroll'));\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\n\r\nexport default class FooterManager extends CoreFeature{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.active = false;\r\n\t\tthis.element = this.createElement(); //containing element\r\n\t\tthis.containerElement = this.createContainerElement(); //containing element\r\n\t\tthis.external = false;\r\n\t\tthis.links = [];\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeElement();\r\n\t}\r\n\r\n\tcreateElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-footer\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\t\r\n\tcreateContainerElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-footer-contents\");\r\n\r\n\t\tthis.element.appendChild(el);\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitializeElement(){\r\n\t\tif(this.table.options.footerElement){\r\n\r\n\t\t\tswitch(typeof this.table.options.footerElement){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(this.table.options.footerElement[0] === \"<\"){\r\n\t\t\t\t\tthis.containerElement.innerHTML = this.table.options.footerElement;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.external = true;\r\n\t\t\t\t\tthis.containerElement = document.querySelector(this.table.options.footerElement);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.element = this.table.options.footerElement;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tappend(element, parent){\r\n\t\tthis.activate(parent);\r\n\r\n\t\tthis.containerElement.appendChild(element);\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\tprepend(element, parent){\r\n\t\tthis.activate(parent);\r\n\r\n\t\tthis.element.insertBefore(element, this.element.firstChild);\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\tremove(element){\r\n\t\telement.parentNode.removeChild(element);\r\n\t\tthis.deactivate();\r\n\t}\r\n\r\n\tdeactivate(force){\r\n\t\tif(!this.element.firstChild || force){\r\n\t\t\tif(!this.external){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\t\t\tthis.active = false;\r\n\t\t}\r\n\t}\r\n\r\n\tactivate(parent){\r\n\t\tif(!this.active){\r\n\t\t\tthis.active = true;\r\n\t\t\tif(!this.external){\r\n\t\t\t\tthis.table.element.appendChild(this.getElement());\r\n\t\t\t\tthis.table.element.style.display = '';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(parent){\r\n\t\t\tthis.links.push(parent);\r\n\t\t}\r\n\t}\r\n\r\n\tredraw(){\r\n\t\tthis.links.forEach(function(link){\r\n\t\t\tlink.footerRedraw();\r\n\t\t});\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport Helpers from './Helpers.js';\r\nimport Row from '../row/Row.js';\r\n\r\nexport default class InteractionManager extends CoreFeature {\r\n\t\r\n\tconstructor (table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.el = null;\r\n\t\t\r\n\t\tthis.abortClasses = [\"tabulator-headers\", \"tabulator-table\"];\r\n\t\t\r\n\t\tthis.previousTargets = {};\r\n\t\t\r\n\t\tthis.listeners = [\r\n\t\t\t\"click\",\r\n\t\t\t\"dblclick\",\r\n\t\t\t\"contextmenu\",\r\n\t\t\t\"mouseenter\",\r\n\t\t\t\"mouseleave\",\r\n\t\t\t\"mouseover\",\r\n\t\t\t\"mouseout\",\r\n\t\t\t\"mousemove\",\r\n\t\t\t\"touchstart\",\r\n\t\t\t\"touchend\",\r\n\t\t];\r\n\t\t\r\n\t\tthis.componentMap = {\r\n\t\t\t\"tabulator-cell\":\"cell\",\r\n\t\t\t\"tabulator-row\":\"row\",\r\n\t\t\t\"tabulator-group\":\"group\",\r\n\t\t\t\"tabulator-col\":\"column\",\r\n\t\t};\r\n\t\t\r\n\t\tthis.pseudoTrackers = {\r\n\t\t\t\"row\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"cell\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"group\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"column\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t}\r\n\t\t\r\n\t\tthis.pseudoTracking = false;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.el = this.table.element;\r\n\t\t\r\n\t\tthis.buildListenerMap();\r\n\t\tthis.bindSubscriptionWatchers();\r\n\t}\r\n\t\r\n\tbuildListenerMap(){\r\n\t\tvar listenerMap = {};\r\n\t\t\r\n\t\tthis.listeners.forEach((listener) => {\r\n\t\t\tlistenerMap[listener] = {\r\n\t\t\t\thandler:null,\r\n\t\t\t\tcomponents:[],\r\n\t\t\t}\r\n\t\t})\r\n\t\t\r\n\t\tthis.listeners = listenerMap;\r\n\t}\r\n\t\r\n\tbindPseudoEvents(){\r\n\t\tObject.keys(this.pseudoTrackers).forEach((key) => {\r\n\t\t\tthis.pseudoTrackers[key].subscriber = this.pseudoMouseEnter.bind(this, key);\r\n\t\t\tthis.subscribe(key + \"-mouseover\", this.pseudoTrackers[key].subscriber);\r\n\t\t});\r\n\t\t\r\n\t\tthis.pseudoTracking = true;\r\n\t}\r\n\t\r\n\tpseudoMouseEnter(key, e, target){\r\n\t\tif(this.pseudoTrackers[key].target !== target){\r\n\t\t\t\r\n\t\t\tif(this.pseudoTrackers[key].target){\r\n\t\t\t\tthis.dispatch(key + \"-mouseleave\", e, target);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.pseudoMouseLeave(key, e);\r\n\t\t\t\r\n\t\t\tthis.pseudoTrackers[key].target = target;\r\n\t\t\t\r\n\t\t\tthis.dispatch(key + \"-mouseenter\", e, target);\r\n\t\t}\r\n\t}\r\n\t\r\n\tpseudoMouseLeave(key, e){\r\n\t\tvar leaveList = Object.keys(this.pseudoTrackers),\r\n\t\tlinkedKeys = {\r\n\t\t\t\"row\":[\"cell\"],\r\n\t\t\t\"cell\":[\"row\"],\r\n\t\t};\r\n\t\t\r\n\t\tleaveList = leaveList.filter((item) => {\r\n\t\t\tvar links = linkedKeys[key];\r\n\t\t\treturn item !== key && (!links || (links && !links.includes(item)));\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\tleaveList.forEach((key) => {\r\n\t\t\tvar target = this.pseudoTrackers[key].target;\r\n\t\t\t\r\n\t\t\tif(this.pseudoTrackers[key].target){\r\n\t\t\t\tthis.dispatch(key + \"-mouseleave\", e, target);\r\n\t\t\t\t\r\n\t\t\t\tthis.pseudoTrackers[key].target = null;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t\r\n\tbindSubscriptionWatchers(){\r\n\t\tvar listeners = Object.keys(this.listeners),\r\n\t\tcomponents = Object.values(this.componentMap);\r\n\t\t\r\n\t\tfor(let comp of components){\r\n\t\t\tfor(let listener of listeners){\r\n\t\t\t\tlet key = comp + \"-\" + listener;\r\n\t\t\t\t\r\n\t\t\t\tthis.subscriptionChange(key, this.subscriptionChanged.bind(this, comp, listener));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.subscribe(\"table-destroy\", this.clearWatchers.bind(this))\r\n\t}\r\n\t\r\n\tsubscriptionChanged(component, key, added){\r\n\t\tvar listener = this.listeners[key].components,\r\n\t\tindex = listener.indexOf(component),\r\n\t\tchanged = false;\r\n\t\t\r\n\t\tif(added){\r\n\t\t\tif(index === -1){\r\n\t\t\t\tlistener.push(component);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!this.subscribed(component + \"-\" + key)){\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tlistener.splice(index, 1);\r\n\t\t\t\t\tchanged = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif((key === \"mouseenter\" || key === \"mouseleave\") && !this.pseudoTracking){\r\n\t\t\tthis.bindPseudoEvents();\r\n\t\t}\r\n\t\t\r\n\t\tif(changed){\r\n\t\t\tthis.updateEventListeners();\r\n\t\t}\r\n\t}\r\n\t\r\n\tupdateEventListeners(){\r\n\t\tfor(let key in this.listeners){\r\n\t\t\tlet listener = this.listeners[key];\r\n\t\t\t\r\n\t\t\tif(listener.components.length){\r\n\t\t\t\tif(!listener.handler){\r\n\t\t\t\t\tlistener.handler = this.track.bind(this, key);\r\n\t\t\t\t\tthis.el.addEventListener(key, listener.handler)\r\n\t\t\t\t\t// this.el.addEventListener(key, listener.handler, {passive: true})\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(listener.handler){\r\n\t\t\t\t\tthis.el.removeEventListener(key, listener.handler)\r\n\t\t\t\t\tlistener.handler = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\ttrack(type, e){\r\n\t\tvar path = (e.composedPath && e.composedPath()) || e.path;\r\n\t\t\r\n\t\tvar targets = this.findTargets(path);\r\n\t\ttargets = this.bindComponents(type, targets);\r\n\t\t\r\n\t\tthis.triggerEvents(type, e, targets);\r\n\t\t\r\n\t\tif(this.pseudoTracking && (type == \"mouseover\" || type == \"mouseleave\") && !Object.keys(targets).length){\r\n\t\t\tthis.pseudoMouseLeave(\"none\", e);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfindTargets(path){\r\n\t\tvar targets = {};\r\n\t\t\r\n\t\tlet componentMap = Object.keys(this.componentMap);\r\n\t\t\r\n\t\tfor (let el of path) {\r\n\t\t\tlet classList = el.classList ? [...el.classList] : [];\r\n\t\t\t\r\n\t\t\tlet abort = classList.filter((item) => {\r\n\t\t\t\treturn this.abortClasses.includes(item);\r\n\t\t\t})\r\n\t\t\t\r\n\t\t\tif(abort.length){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlet elTargets = classList.filter((item) => {\r\n\t\t\t\treturn componentMap.includes(item);\r\n\t\t\t})\r\n\t\t\t\r\n\t\t\tfor (let target of elTargets) {\r\n\t\t\t\ttargets[this.componentMap[target]] = el;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(targets.group && targets.group === targets.row){\r\n\t\t\tdelete targets.row;\r\n\t\t}\r\n\t\t\r\n\t\treturn targets;\r\n\t}\r\n\t\r\n\tbindComponents(type, targets){\r\n\t\t//ensure row component is looked up before cell\r\n\t\tvar keys = Object.keys(targets).reverse(),\r\n\t\tlistener = this.listeners[type],\r\n\t\ttargetMatches = {};\r\n\t\t\r\n\t\tfor(let key of keys){\r\n\t\t\tlet component;\r\n\t\t\tlet target = targets[key];\r\n\t\t\tlet previousTarget = this.previousTargets[key];\r\n\t\t\t\r\n\t\t\tif(previousTarget && previousTarget.target === target){\r\n\t\t\t\tcomponent = previousTarget.component;\r\n\t\t\t}else{\r\n\t\t\t\tswitch(key){\r\n\t\t\t\t\tcase \"row\":\r\n\t\t\t\t\tcase \"group\":\r\n\t\t\t\t\tif(listener.components.includes(\"row\") || listener.components.includes(\"cell\") || listener.components.includes(\"group\")){\r\n\t\t\t\t\t\tlet rows = this.table.rowManager.getVisibleRows(true);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcomponent = rows.find((row) => {\r\n\t\t\t\t\t\t\treturn row.getElement() === target;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(targets[\"row\"] && targets[\"row\"].parentNode && targets[\"row\"].parentNode.closest(\".tabulator-row\")){\r\n\t\t\t\t\t\t\ttargets[key] = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"column\":\r\n\t\t\t\t\tif(listener.components.includes(\"column\")){\r\n\t\t\t\t\t\tcomponent = this.table.columnManager.findColumn(target);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"cell\":\r\n\t\t\t\t\tif(listener.components.includes(\"cell\")){\r\n\t\t\t\t\t\tif(targets[\"row\"] instanceof Row){\r\n\t\t\t\t\t\t\tcomponent = targets[\"row\"].findCell(target);\r\n\t\t\t\t\t\t}else{\t\r\n\t\t\t\t\t\t\tif(targets[\"row\"]){\r\n\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?\")\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(component){\r\n\t\t\t\ttargets[key] = component;\r\n\t\t\t\ttargetMatches[key] = {\r\n\t\t\t\t\ttarget:target,\r\n\t\t\t\t\tcomponent:component,\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.previousTargets = targetMatches;\r\n\t\t\r\n\t\treturn targets;\r\n\t}\r\n\t\r\n\ttriggerEvents(type, e, targets){\r\n\t\tvar listener = this.listeners[type];\r\n\t\t\r\n\t\tfor(let key in targets){\r\n\t\t\tif(targets[key] && listener.components.includes(key)){\r\n\t\t\t\tthis.dispatch(key + \"-\" + type, e, targets[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tclearWatchers(){\r\n\t\tfor(let key in this.listeners){\r\n\t\t\tlet listener = this.listeners[key];\r\n\t\t\t\r\n\t\t\tif(listener.handler){\r\n\t\t\t\tthis.el.removeEventListener(key, listener.handler)\r\n\t\t\t\tlistener.handler = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}","export default class ComponentFunctionBinder{\r\n\r\n\tconstructor(table){\r\n\t\tthis.table = table;\r\n\r\n\t\tthis.bindings = {};\r\n\t}\r\n\r\n\tbind(type, funcName, handler){\r\n\t\tif(!this.bindings[type]){\r\n\t\t\tthis.bindings[type] = {};\r\n\t\t}\r\n\r\n\t\tif(this.bindings[type][funcName]){\r\n\t\t\tconsole.warn(\"Unable to bind component handler, a matching function name is already bound\", type, funcName, hanlder)\r\n\t\t}else{\r\n\t\t\tthis.bindings[type][funcName] = handler;\r\n\t\t}\r\n\t}\r\n\r\n\thandle(type, component, name){\r\n\t\tif(this.bindings[type] && this.bindings[type][name]){\r\n\t\t\treturn this.bindings[type][name].bind(null, component);\r\n\t\t}else{\r\n\t\t\tif(name !== \"then\" && typeof name === \"string\" && !name.startsWith(\"_\")){\r\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?\")\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\n\r\nexport default class DataLoader extends CoreFeature{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.loaderElement = this.createLoaderElement(); //loader message div\r\n\t\tthis.msgElement = this.createMsgElement(); //message element\r\n\t\tthis.loadingElement = null;\r\n\t\tthis.errorElement = null;\r\n\r\n\t\tthis.requestOrder = 0; //prevent requests comming out of sequence if overridden by another load request\r\n\t\tthis.loading = false;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tvar template;\r\n\r\n\t\tthis.loaderElement.appendChild(this.msgElement);\r\n\r\n\t\tif(this.table.options.dataLoaderLoading){\r\n\t\t\tif(typeof this.table.options.dataLoaderLoading == \"string\"){\r\n\t\t\t\ttemplate = document.createElement('template');\r\n\t\t\t\ttemplate.innerHTML = this.table.options.dataLoaderLoading.trim();\r\n\t\t\t\tthis.loadingElement = template.firstElementChild;\r\n\t\t\t}else{\r\n\t\t\t\tthis.loadingElement = this.table.options.dataLoaderLoading;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.table.options.dataLoaderError){\r\n\t\t\tif(typeof this.table.options.dataLoaderError == \"string\"){\r\n\t\t\t\ttemplate = document.createElement('template');\r\n\t\t\t\ttemplate.innerHTML = this.table.options.dataLoaderError.trim();\r\n\t\t\t\tthis.errorElement = template.firstElementChild;\r\n\t\t\t}else{\r\n\t\t\t\tthis.errorElement = this.table.options.dataLoaderError;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tcreateLoaderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-loader\");\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateMsgElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-loader-msg\");\r\n\t\tel.setAttribute(\"role\", \"alert\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tload(data, params, config, replace, silent){\r\n\t\tvar requestNo = ++this.requestOrder;\r\n\r\n\t\tthis.dispatchExternal(\"dataLoading\", data);\r\n\r\n\t\t//parse json data to array\r\n\t\tif (data && (data.indexOf(\"{\") == 0 || data.indexOf(\"[\") == 0)){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(this.confirm(\"data-loading\", [data, params, config, silent])){\r\n\t\t\tthis.loading = true;\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.showLoader();\r\n\t\t\t}\r\n\r\n\t\t\t//get params for request\r\n\t\t\tparams = this.chain(\"data-params\", [data, config, silent], params || {}, params || {});\r\n\r\n\t\t\tparams = this.mapParams(params, this.table.options.dataSendParams);\r\n\r\n\t\t\tvar result = this.chain(\"data-load\", [data, params, config, silent], false, Promise.resolve([]));\r\n\t\t\t\r\n\t\t\treturn result.then((response) => {\r\n\t\t\t\tif(!Array.isArray(response) && typeof response == \"object\"){\r\n\t\t\t\t\tresponse = this.mapParams(response, this.objectInvert(this.table.options.dataReceiveParams));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar rowData = this.chain(\"data-loaded\", response, null, response);\r\n\r\n\t\t\t\tif(requestNo == this.requestOrder){\r\n\t\t\t\t\tthis.hideLoader();\r\n\r\n\t\t\t\t\tif(rowData !== false){\r\n\t\t\t\t\t\tthis.dispatchExternal(\"dataLoaded\", rowData);\r\n\t\t\t\t\t\tthis.table.rowManager.setData(rowData, replace, !replace);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\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\");\r\n\t\t\t\t}\r\n\t\t\t}).catch((error) => {\r\n\t\t\t\tconsole.error(\"Data Load Error: \", error);\r\n\t\t\t\tthis.dispatchExternal(\"dataLoadError\", error);\r\n\r\n\t\t\t\tif(!silent){\r\n\t\t\t\t\tthis.showError();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.hideLoader();\r\n\t\t\t\t}, this.table.options.dataLoaderErrorTimeout);\r\n\t\t\t})\r\n\t\t\t.finally(() => {\r\n\t\t\t\tthis.loading = false;\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"dataLoaded\", data);\r\n\r\n\t\t\tif(!data){\r\n\t\t\t\tdata = [];\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.rowManager.setData(data, replace, !replace);\r\n\t\t\treturn Promise.resolve();\r\n\t\t}\r\n\t}\r\n\r\n\tmapParams(params, map){\r\n\t\tvar output = {};\r\n\r\n\t\tfor(let key in params){\r\n\t\t\toutput[map.hasOwnProperty(key) ? map[key] : key] = params[key];\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tobjectInvert(obj){\r\n\t\tvar output = {};\r\n\r\n\t\tfor(let key in obj){\r\n\t\t\toutput[obj[key]] = key;\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tblockActiveLoad(){\r\n\t\tthis.requestOrder++;\r\n\t}\r\n\r\n\tshowLoader(){\r\n\t\tvar shouldLoad = typeof this.table.options.dataLoader === \"function\" ? this.table.options.dataLoader() : this.table.options.dataLoader;\r\n\r\n\t\tif(shouldLoad){\r\n\t\t\tthis.hideLoader();\r\n\r\n\t\t\twhile(this.msgElement.firstChild) this.msgElement.removeChild(this.msgElement.firstChild);\r\n\r\n\t\t\tthis.msgElement.classList.remove(\"tabulator-error\");\r\n\t\t\tthis.msgElement.classList.add(\"tabulator-loading\");\r\n\r\n\t\t\tif(this.loadingElement){\r\n\t\t\t\tthis.msgElement.appendChild(this.loadingElement);\r\n\t\t\t}else{\r\n\t\t\t\tthis.msgElement.innerHTML = this.langText(\"data|loading\");\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.element.appendChild(this.loaderElement);\r\n\t\t}\r\n\t}\r\n\r\n\tshowError(){\r\n\t\tthis.hideLoader();\r\n\r\n\t\twhile(this.msgElement.firstChild) this.msgElement.removeChild(this.msgElement.firstChild);\r\n\t\tthis.msgElement.classList.remove(\"tabulator-loading\");\r\n\t\tthis.msgElement.classList.add(\"tabulator-error\");\r\n\r\n\t\tif(this.errorElement){\r\n\t\t\tthis.msgElement.appendChild(this.errorElement);\r\n\t\t}else{\r\n\t\t\tthis.msgElement.innerHTML = this.langText(\"data|error\");\r\n\t\t}\r\n\r\n\t\tthis.table.element.appendChild(this.loaderElement);\r\n\t}\r\n\r\n\r\n\thideLoader(){\r\n\t\tif(this.loaderElement.parentNode){\r\n\t\t\tthis.loaderElement.parentNode.removeChild(this.loaderElement);\r\n\t\t}\r\n\t}\r\n}","export default class ExternalEventBus {\r\n\r\n\tconstructor(table, optionsList, debug){\r\n\t\tthis.table = table;\r\n\t\tthis.events = {};\r\n\t\tthis.optionsList = optionsList || {};\r\n\t\tthis.subscriptionNotifiers = {};\r\n\r\n\t\tthis.dispatch = debug ? this._debugDispatch.bind(this) : this._dispatch.bind(this);\r\n\t\tthis.debug = debug;\r\n\t}\r\n\r\n\tsubscriptionChange(key, callback){\r\n\t\tif(!this.subscriptionNotifiers[key]){\r\n\t\t\tthis.subscriptionNotifiers[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.subscriptionNotifiers[key].push(callback);\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis._notifiySubscriptionChange(key, true);\r\n\t\t}\r\n\t}\r\n\r\n\tsubscribe(key, callback){\r\n\t\tif(!this.events[key]){\r\n\t\t\tthis.events[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.events[key].push(callback);\r\n\r\n\t\tthis._notifiySubscriptionChange(key, true);\r\n\t}\r\n\r\n\tunsubscribe(key, callback){\r\n\t\tvar index;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tif(callback){\r\n\t\t\t\tindex = this.events[key].findIndex((item) => {\r\n\t\t\t\t\treturn item === callback;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tthis.events[key].splice(index, 1);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Cannot remove event, no matching event found:\", key, callback);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tdelete this.events[key];\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cannot remove event, no events set on:\", key);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._notifiySubscriptionChange(key, false);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.events[key] && this.events[key].length;\r\n\t}\r\n\r\n\t_notifiySubscriptionChange(key, subscribed){\r\n\t\tvar notifiers = this.subscriptionNotifiers[key];\r\n\r\n\t\tif(notifiers){\r\n\t\t\tnotifiers.forEach((callback)=>{\r\n\t\t\t\tcallback(subscribed);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_dispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift(),\r\n\t\tresult;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tthis.events[key].forEach((callback, i) => {\r\n\t\t\t\tlet callResult = callback.apply(this.table, args);\r\n\r\n\t\t\t\tif(!i){\r\n\t\t\t\t\tresult = callResult;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t_debugDispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"ExternalEvent:\" + args[0];\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._dispatch(...arguments)\r\n\t}\r\n}","export default class InternalEventBus {\r\n\r\n\tconstructor(debug){\r\n\t\tthis.events = {};\r\n\t\tthis.subscriptionNotifiers = {};\r\n\r\n\t\tthis.dispatch = debug ? this._debugDispatch.bind(this) : this._dispatch.bind(this);\r\n\t\tthis.chain = debug ? this._debugChain.bind(this) : this._chain.bind(this);\r\n\t\tthis.confirm = debug ? this._debugConfirm.bind(this) : this._confirm.bind(this);\r\n\t\tthis.debug = debug;\r\n\t}\r\n\r\n\tsubscriptionChange(key, callback){\r\n\t\tif(!this.subscriptionNotifiers[key]){\r\n\t\t\tthis.subscriptionNotifiers[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.subscriptionNotifiers[key].push(callback);\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis._notifiySubscriptionChange(key, true);\r\n\t\t}\r\n\t}\r\n\r\n\tsubscribe(key, callback, priority = 10000){\r\n\t\tif(!this.events[key]){\r\n\t\t\tthis.events[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.events[key].push({callback, priority});\r\n\r\n\t\tthis.events[key].sort((a, b) => {\r\n\t\t\treturn a.priority - b.priority;\r\n\t\t});\r\n\r\n\t\tthis._notifiySubscriptionChange(key, true);\r\n\t}\r\n\r\n\tunsubscribe(key, callback){\r\n\t\tvar index;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tif(callback){\r\n\t\t\t\tindex = this.events[key].findIndex((item) => {\r\n\t\t\t\t\treturn item.callback === callback;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tthis.events[key].splice(index, 1);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Cannot remove event, no matching event found:\", key, callback);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cannot remove event, no events set on:\", key);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._notifiySubscriptionChange(key, false);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.events[key] && this.events[key].length;\r\n\t}\r\n\r\n\t_chain(key, args, initialValue, fallback){\r\n\t\tvar value = initialValue;\r\n\r\n\t\tif(!Array.isArray(args)){\r\n\t\t\targs = [args];\r\n\t\t}\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis.events[key].forEach((subscriber, i) => {\r\n\t\t\t\tvalue = subscriber.callback.apply(this, args.concat([value]));\r\n\t\t\t});\r\n\r\n\t\t\treturn value;\r\n\t\t}else{\r\n\t\t\treturn typeof fallback === \"function\" ? fallback() : fallback;\r\n\t\t}\r\n\t}\r\n\r\n\t_confirm(key, args){\r\n\t\tvar confirmed = false;\r\n\r\n\t\tif(!Array.isArray(args)){\r\n\t\t\targs = [args];\r\n\t\t}\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis.events[key].forEach((subscriber, i) => {\r\n\t\t\t\tif(subscriber.callback.apply(this, args)){\r\n\t\t\t\t\tconfirmed = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn confirmed;\r\n\t}\r\n\r\n\t_notifiySubscriptionChange(key, subscribed){\r\n\t\tvar notifiers = this.subscriptionNotifiers[key];\r\n\r\n\t\tif(notifiers){\r\n\t\t\tnotifiers.forEach((callback)=>{\r\n\t\t\t\tcallback(subscribed);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_dispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift();\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tthis.events[key].forEach((subscriber) => {\r\n\t\t\t\tlet callResult = subscriber.callback.apply(this, args);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_debugDispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._dispatch(...arguments);\r\n\t}\r\n\r\n\t_debugChain(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._chain(...arguments);\r\n\t}\r\n\r\n\t_debugConfirm(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._confirm(...arguments);\r\n\t}\r\n}","import Tabulator from '../Tabulator.js';\r\n\r\nclass TableRegistry {\r\n\r\n\tstatic register(table){\r\n\t\tTableRegistry.tables.push(table);\r\n\t}\r\n\r\n\tstatic deregister(table){\r\n\t\tvar index = TableRegistry.tables.indexOf(table);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tTableRegistry.tables.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\tstatic lookupTable(query, silent){\r\n\t\tvar results = [],\r\n\t\tmatches, match;\r\n\r\n\t\tif(typeof query === \"string\"){\r\n\t\t\tmatches = document.querySelectorAll(query);\r\n\r\n\t\t\tif(matches.length){\r\n\t\t\t\tfor(var i = 0; i < matches.length; i++){\r\n\t\t\t\t\tmatch = TableRegistry.matchElement(matches[i]);\r\n\r\n\t\t\t\t\tif(match){\r\n\t\t\t\t\t\tresults.push(match);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}else if((typeof HTMLElement !== \"undefined\" && query instanceof HTMLElement) || query instanceof Tabulator){\r\n\t\t\tmatch = TableRegistry.matchElement(query);\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tresults.push(match);\r\n\t\t\t}\r\n\t\t}else if(Array.isArray(query)){\r\n\t\t\tquery.forEach(function(item){\r\n\t\t\t\tresults = results.concat(TableRegistry.lookupTable(item));\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Table Connection Error - Invalid Selector\", query);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n\r\n\tstatic matchElement(element){\r\n\t\treturn TableRegistry.tables.find(function(table){\r\n\t\t\treturn element instanceof Tabulator ? table === element : table.element === element;\r\n\t\t});\r\n\t}\r\n}\r\n\r\nTableRegistry.tables = [];\r\n\r\nexport default TableRegistry;","import CoreFeature from './CoreFeature.js';\r\n\r\nclass Module extends CoreFeature{\r\n\r\n\tconstructor(table, name){\r\n\t\tsuper(table);\r\n\r\n\t\tthis._handler = null;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\t// setup module when table is initialized, to be overriden in module\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t////// Options Registration ///////\r\n\t///////////////////////////////////\r\n\r\n\tregisterTableOption(key, value){\r\n\t\tthis.table.optionsList.register(key, value);\r\n\t}\r\n\r\n\tregisterColumnOption(key, value){\r\n\t\tthis.table.columnManager.optionsList.register(key, value);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t/// Public Function Registation ///\r\n\t///////////////////////////////////\r\n\r\n\tregisterTableFunction(name, func){\r\n\t\tif(typeof this.table[name] === \"undefined\"){\r\n\t\t\tthis.table[name] = func;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Unable to bind table function, name already in use\", name)\r\n\t\t}\r\n\t}\r\n\r\n\tregisterComponentFunction(component, func, handler){\r\n\t\treturn this.table.componentFunctionBinder.bind(component, func, handler);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Data Pipeline //////////\r\n\t///////////////////////////////////\r\n\r\n\tregisterDataHandler(handler, priority){\r\n\t\tthis.table.rowManager.registerDataPipelineHandler(handler, priority)\r\n\t\tthis._handler = handler;\r\n\t}\r\n\r\n\tregisterDisplayHandler(handler, priority){\r\n\t\tthis.table.rowManager.registerDisplayPipelineHandler(handler, priority)\r\n\t\tthis._handler = handler;\r\n\t}\r\n\r\n\trefreshData(renderInPosition, handler){\r\n\t\tif(!handler){\r\n\t\t\thandler = this._handler;\r\n\t\t}\r\n\r\n\t\tif(handler){\r\n\t\t\tthis.table.rowManager.refreshActiveData(handler, false, renderInPosition);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport default Module;","//resize columns to fit data they contain and stretch row to fill table, also used for fitDataTable\r\nexport default function(columns){\r\n\tcolumns.forEach(function(column){\r\n\t\tcolumn.reinitializeWidth();\r\n\t});\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n};","import fitData from './modes/fitData.js';\r\nimport fitDataGeneral from './modes/fitDataGeneral.js';\r\nimport fitDataStretch from './modes/fitDataStretch.js';\r\nimport fitColumns from './modes/fitColumns.js';\r\n\r\nexport default {\r\n\tfitData:fitData,\r\n\tfitDataFill:fitDataGeneral,\r\n\tfitDataTable:fitDataGeneral,\r\n\tfitDataStretch:fitDataStretch,\r\n\tfitColumns:fitColumns ,\r\n};","//resize columns to fit data they contain\r\nexport default function(columns){\r\n\tthis.table.columnManager.renderer.reinitializeColumnWidths(columns);\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n};","//resize columns to fit data the contain and stretch last column to fill table\r\nexport default function(columns){\r\n\tvar colsWidth = 0,\r\n\ttableWidth = this.table.rowManager.element.clientWidth,\r\n\tgap = 0,\r\n\tlastCol = false;\r\n\r\n\tcolumns.forEach((column, i) => {\r\n\t\tif(!column.widthFixed){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t}\r\n\r\n\t\tif(this.table.options.responsiveLayout ? column.modules.responsive.visible : column.visible){\r\n\t\t\tlastCol = column;\r\n\t\t}\r\n\r\n\t\tif(column.visible){\r\n\t\t\tcolsWidth += column.getWidth();\r\n\t\t}\r\n\t});\r\n\r\n\tif(lastCol){\r\n\t\tgap = tableWidth - colsWidth + lastCol.getWidth();\r\n\r\n\t\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\t\tlastCol.setWidth(0);\r\n\t\t\tthis.table.modules.responsiveLayout.update();\r\n\t\t}\r\n\r\n\t\tif(gap > 0){\r\n\t\t\tlastCol.setWidth(gap);\r\n\t\t}else{\r\n\t\t\tlastCol.reinitializeWidth();\r\n\t\t}\r\n\t}else{\r\n\t\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\t\tthis.table.modules.responsiveLayout.update();\r\n\t\t}\r\n\t}\r\n};","//resize columns to fit\r\nexport default function(columns){\r\n\tvar totalWidth = this.table.element.clientWidth; //table element width\r\n\tvar fixedWidth = 0; //total width of columns with a defined width\r\n\tvar flexWidth = 0; //total width available to flexible columns\r\n\tvar flexGrowUnits = 0; //total number of widthGrow blocks accross all columns\r\n\tvar flexColWidth = 0; //desired width of flexible columns\r\n\tvar flexColumns = []; //array of flexible width columns\r\n\tvar fixedShrinkColumns = []; //array of fixed width columns that can shrink\r\n\tvar flexShrinkUnits = 0; //total number of widthShrink blocks accross all columns\r\n\tvar overflowWidth = 0; //horizontal overflow width\r\n\tvar gapFill=0; //number of pixels to be added to final column to close and half pixel gaps\r\n\r\n\tfunction calcWidth(width){\r\n\t\tvar colWidth;\r\n\r\n\t\tif(typeof(width) == \"string\"){\r\n\t\t\tif(width.indexOf(\"%\") > -1){\r\n\t\t\t\tcolWidth = (totalWidth / 100) * parseInt(width);\r\n\t\t\t}else{\r\n\t\t\t\tcolWidth = parseInt(width);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcolWidth = width;\r\n\t\t}\r\n\r\n\t\treturn colWidth;\r\n\t}\r\n\r\n\t//ensure columns resize to take up the correct amount of space\r\n\tfunction scaleColumns(columns, freeSpace, colWidth, shrinkCols){\r\n\r\n\t\tvar oversizeCols = [],\r\n\t\toversizeSpace = 0,\r\n\t\tremainingSpace = 0,\r\n\t\tnextColWidth = 0,\r\n\t\tremainingFlexGrowUnits = flexGrowUnits,\r\n\t\tgap = 0,\r\n\t\tchangeUnits = 0,\r\n\t\tundersizeCols = [];\r\n\r\n\t\tfunction calcGrow(col){\r\n\t\t\treturn (colWidth * (col.column.definition.widthGrow || 1));\r\n\t\t}\r\n\r\n\t\tfunction calcShrink(col){\r\n\t\t\treturn (calcWidth(col.width) - (colWidth * (col.column.definition.widthShrink || 0)))\r\n\t\t}\r\n\r\n\t\tcolumns.forEach(function(col, i){\r\n\t\t\tvar width = shrinkCols ? calcShrink(col) : calcGrow(col);\r\n\t\t\tif(col.column.minWidth >= width){\r\n\t\t\t\toversizeCols.push(col);\r\n\t\t\t}else{\r\n\t\t\t\tif(col.column.maxWidth && col.column.maxWidth < width){\r\n\t\t\t\t\tcol.width = col.column.maxWidth;\r\n\t\t\t\t\tfreeSpace -= col.column.maxWidth;\r\n\r\n\t\t\t\t\tremainingFlexGrowUnits -= shrinkCols ? (col.column.definition.widthShrink || 1) : (col.column.definition.widthGrow || 1);\r\n\r\n\t\t\t\t\tif(remainingFlexGrowUnits){\r\n\t\t\t\t\t\tcolWidth = Math.floor(freeSpace/remainingFlexGrowUnits);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tundersizeCols.push(col);\r\n\t\t\t\t\tchangeUnits += shrinkCols ? (col.column.definition.widthShrink || 1) : (col.column.definition.widthGrow || 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(oversizeCols.length){\r\n\t\t\toversizeCols.forEach(function(col){\r\n\t\t\t\toversizeSpace += shrinkCols ? col.width - col.column.minWidth : col.column.minWidth;\r\n\t\t\t\tcol.width = col.column.minWidth;\r\n\t\t\t});\r\n\r\n\t\t\tremainingSpace = freeSpace - oversizeSpace;\r\n\r\n\t\t\tnextColWidth = changeUnits ? Math.floor(remainingSpace/changeUnits) : remainingSpace;\r\n\r\n\t\t\tgap = remainingSpace - (nextColWidth * changeUnits);\r\n\r\n\t\t\tgap += scaleColumns(undersizeCols, remainingSpace, nextColWidth, shrinkCols);\r\n\t\t}else{\r\n\t\t\tgap = changeUnits ? freeSpace - (Math.floor(freeSpace/changeUnits) * changeUnits) : freeSpace;\r\n\r\n\t\t\tundersizeCols.forEach(function(column){\r\n\t\t\t\tcolumn.width = shrinkCols ? calcShrink(column) : calcGrow(column);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn gap;\r\n\t}\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n\r\n\t//adjust for vertical scrollbar if present\r\n\tif(this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight){\r\n\t\ttotalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth;\r\n\t}\r\n\r\n\tcolumns.forEach(function(column){\r\n\t\tvar width, minWidth, colWidth;\r\n\r\n\t\tif(column.visible){\r\n\r\n\t\t\twidth = column.definition.width;\r\n\t\t\tminWidth = parseInt(column.minWidth);\r\n\r\n\t\t\tif(width){\r\n\r\n\t\t\t\tcolWidth = calcWidth(width);\r\n\r\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\r\n\r\n\t\t\t\tif(column.definition.widthShrink){\r\n\t\t\t\t\tfixedShrinkColumns.push({\r\n\t\t\t\t\t\tcolumn:column,\r\n\t\t\t\t\t\twidth:colWidth > minWidth ? colWidth : minWidth\r\n\t\t\t\t\t});\r\n\t\t\t\t\tflexShrinkUnits += column.definition.widthShrink;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tflexColumns.push({\r\n\t\t\t\t\tcolumn:column,\r\n\t\t\t\t\twidth:0,\r\n\t\t\t\t});\r\n\t\t\t\tflexGrowUnits += column.definition.widthGrow || 1;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\t//calculate available space\r\n\tflexWidth = totalWidth - fixedWidth;\r\n\r\n\t//calculate correct column size\r\n\tflexColWidth = Math.floor(flexWidth / flexGrowUnits)\r\n\r\n\t//generate column widths\r\n\tvar gapFill = scaleColumns(flexColumns, flexWidth, flexColWidth, false);\r\n\r\n\t//increase width of last column to account for rounding errors\r\n\tif(flexColumns.length && gapFill > 0){\r\n\t\tflexColumns[flexColumns.length-1].width += + gapFill;\r\n\t}\r\n\r\n\t//caculate space for columns to be shrunk into\r\n\tflexColumns.forEach(function(col){\r\n\t\tflexWidth -= col.width;\r\n\t});\r\n\r\n\toverflowWidth = Math.abs(gapFill) + flexWidth;\r\n\r\n\t//shrink oversize columns if there is no available space\r\n\tif(overflowWidth > 0 && flexShrinkUnits){\r\n\t\tgapFill = scaleColumns(fixedShrinkColumns, overflowWidth, Math.floor(overflowWidth / flexShrinkUnits), true);\r\n\t}\r\n\r\n\t//decrease width of last column to account for rounding errors\r\n\tif(fixedShrinkColumns.length){\r\n\t\tfixedShrinkColumns[fixedShrinkColumns.length-1].width -= gapFill;\r\n\t}\r\n\r\n\tflexColumns.forEach(function(col){\r\n\t\tcol.column.setWidth(col.width);\r\n\t});\r\n\r\n\tfixedShrinkColumns.forEach(function(col){\r\n\t\tcol.column.setWidth(col.width);\r\n\t});\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultModes from './defaults/modes.js';\r\n\r\nclass Layout extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table, \"layout\");\r\n\r\n\t\tthis.mode = null;\r\n\r\n\t\tthis.registerTableOption(\"layout\", \"fitData\"); //layout type\r\n\t\tthis.registerTableOption(\"layoutColumnsOnNewData\", false); //update column widths on setData\r\n\r\n\t\tthis.registerColumnOption(\"widthGrow\");\r\n\t\tthis.registerColumnOption(\"widthShrink\");\r\n\t}\r\n\r\n\t//initialize layout system\r\n\tinitialize(){\r\n\t\tvar layout = this.table.options.layout;\r\n\r\n\t\tif(Layout.modes[layout]){\r\n\t\t\tthis.mode = layout;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Layout Error - invalid mode set, defaulting to 'fitData' : \" + layout);\r\n\t\t\tthis.mode = 'fitData';\r\n\t\t}\r\n\r\n\t\tthis.table.element.setAttribute(\"tabulator-layout\", this.mode);\r\n\t}\r\n\r\n\tgetMode(){\r\n\t\treturn this.mode;\r\n\t}\r\n\r\n\t//trigger table layout\r\n\tlayout(){\r\n\t\tthis.dispatch(\"layout-refreshing\")\r\n\t\tLayout.modes[this.mode].call(this, this.table.columnManager.columnsByIndex);\r\n\r\n\t\tthis.dispatch(\"layout-refreshed\")\r\n\t}\r\n}\r\n\r\nLayout.moduleName = \"layout\";\r\n\r\n//load defaults\r\nLayout.modes = defaultModes;\r\n\r\nexport default Layout;","import Module from '../../core/Module.js';\r\n\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defaultLangs from './defaults/langs.js';\r\n\r\nclass Localize extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.locale = \"default\"; //current locale\r\n\t\tthis.lang = false; //current language\r\n\t\tthis.bindings = {}; //update events to call when locale is changed\r\n\t\tthis.langList = {};\r\n\r\n\t\tthis.registerTableOption(\"locale\", false); //current system language\r\n\t\tthis.registerTableOption(\"langs\", {});\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.langList = Helpers.deepClone(Localize.langs);\r\n\r\n\t\tif(this.table.options.columnDefaults.headerFilterPlaceholder !== false){\r\n\t\t\tthis.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder);\r\n\t\t}\r\n\r\n\t\tfor(let locale in this.table.options.langs){\r\n\t\t\tthis.installLang(locale, this.table.options.langs[locale]);\r\n\t\t}\r\n\r\n\t\tthis.setLocale(this.table.options.locale);\r\n\r\n\t\tthis.registerTableFunction(\"setLocale\", this.setLocale.bind(this));\r\n\t\tthis.registerTableFunction(\"getLocale\", this.getLocale.bind(this));\r\n\t\tthis.registerTableFunction(\"getLang\", this.getLang.bind(this));\r\n\t}\r\n\r\n\t//set header placehoder\r\n\tsetHeaderFilterPlaceholder(placeholder){\r\n\t\tthis.langList.default.headerFilters.default = placeholder;\r\n\t}\r\n\r\n\t//set header filter placeholder by column\r\n\tsetHeaderFilterColumnPlaceholder(column, placeholder){\r\n\t\tthis.langList.default.headerFilters.columns[column] = placeholder;\r\n\r\n\t\tif(this.lang && !this.lang.headerFilters.columns[column]){\r\n\t\t\tthis.lang.headerFilters.columns[column] = placeholder;\r\n\t\t}\r\n\t}\r\n\r\n\t//setup a lang description object\r\n\tinstallLang(locale, lang){\r\n\t\tif(this.langList[locale]){\r\n\t\t\tthis._setLangProp(this.langList[locale], lang);\r\n\t\t}else{\r\n\t\t\tthis.langList[locale] = lang;\r\n\t\t}\r\n\t}\r\n\r\n\t_setLangProp(lang, values){\r\n\t\tfor(let key in values){\r\n\t\t\tif(lang[key] && typeof lang[key] == \"object\"){\r\n\t\t\t\tthis._setLangProp(lang[key], values[key])\r\n\t\t\t}else{\r\n\t\t\t\tlang[key] = values[key];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//set current locale\r\n\tsetLocale(desiredLocale){\r\n\t\tdesiredLocale = desiredLocale || \"default\";\r\n\r\n\t\t//fill in any matching languge values\r\n\t\tfunction traverseLang(trans, path){\r\n\t\t\tfor(var prop in trans){\r\n\t\t\t\tif(typeof trans[prop] == \"object\"){\r\n\t\t\t\t\tif(!path[prop]){\r\n\t\t\t\t\t\tpath[prop] = {};\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttraverseLang(trans[prop], path[prop]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tpath[prop] = trans[prop];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//determing correct locale to load\r\n\t\tif(desiredLocale === true && navigator.language){\r\n\t\t\t//get local from system\r\n\t\t\tdesiredLocale = navigator.language.toLowerCase();\r\n\t\t}\r\n\r\n\t\tif(desiredLocale){\r\n\t\t\t//if locale is not set, check for matching top level locale else use default\r\n\t\t\tif(!this.langList[desiredLocale]){\r\n\t\t\t\tlet prefix = desiredLocale.split(\"-\")[0];\r\n\r\n\t\t\t\tif(this.langList[prefix]){\r\n\t\t\t\t\tconsole.warn(\"Localization Error - Exact matching locale not found, using closest match: \", desiredLocale, prefix);\r\n\t\t\t\t\tdesiredLocale = prefix;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Localization Error - Matching locale not found, using default: \", desiredLocale);\r\n\t\t\t\t\tdesiredLocale = \"default\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.locale = desiredLocale;\r\n\r\n\t\t//load default lang template\r\n\t\tthis.lang = Helpers.deepClone(this.langList.default || {});\r\n\r\n\t\tif(desiredLocale != \"default\"){\r\n\t\t\ttraverseLang(this.langList[desiredLocale], this.lang);\r\n\t\t}\r\n\r\n\t\tthis.dispatchExternal(\"localized\", this.locale, this.lang);\r\n\r\n\t\tthis._executeBindings();\r\n\t}\r\n\r\n\t//get current locale\r\n\tgetLocale(locale){\r\n\t\treturn this.locale;\r\n\t}\r\n\r\n\t//get lang object for given local or current if none provided\r\n\tgetLang(locale){\r\n\t\treturn locale ? this.langList[locale] : this.lang;\r\n\t}\r\n\r\n\t//get text for current locale\r\n\tgetText(path, value){\r\n\t\tvar path = value ? path + \"|\" + value : path,\r\n\t\tpathArray = path.split(\"|\"),\r\n\t\ttext = this._getLangElement(pathArray, this.locale);\r\n\r\n\t\t// if(text === false){\r\n\t\t// \tconsole.warn(\"Localization Error - Matching localized text not found for given path: \", path);\r\n\t\t// }\r\n\r\n\t\treturn text || \"\";\r\n\t}\r\n\r\n\t//traverse langs object and find localized copy\r\n\t_getLangElement(path, locale){\r\n\t\tvar root = this.lang;\r\n\r\n\t\tpath.forEach(function(level){\r\n\t\t\tvar rootPath;\r\n\r\n\t\t\tif(root){\r\n\t\t\t\trootPath = root[level];\r\n\r\n\t\t\t\tif(typeof rootPath != \"undefined\"){\r\n\t\t\t\t\troot = rootPath;\r\n\t\t\t\t}else{\r\n\t\t\t\t\troot = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn root;\r\n\t}\r\n\r\n\t//set update binding\r\n\tbind(path, callback){\r\n\t\tif(!this.bindings[path]){\r\n\t\t\tthis.bindings[path] = [];\r\n\t\t}\r\n\r\n\t\tthis.bindings[path].push(callback);\r\n\r\n\t\tcallback(this.getText(path), this.lang);\r\n\t}\r\n\r\n\t//itterate through bindings and trigger updates\r\n\t_executeBindings(){\r\n\t\tfor(let path in this.bindings){\r\n\t\t\tthis.bindings[path].forEach((binding) => {\r\n\t\t\t\tbinding(this.getText(path), this.lang);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}\r\n\r\nLocalize.moduleName = \"localize\";\r\n\r\n//load defaults\r\nLocalize.langs = defaultLangs;\r\n\r\nexport default Localize;","export default {\r\n\t\"default\":{ //hold default locale text\r\n\t\t\"groups\":{\r\n\t\t\t\"item\":\"item\",\r\n\t\t\t\"items\":\"items\",\r\n\t\t},\r\n\t\t\"columns\":{\r\n\t\t},\r\n\t\t\"data\":{\r\n\t\t\t\"loading\":\"Loading\",\r\n\t\t\t\"error\":\"Error\",\r\n\t\t},\r\n\t\t\"pagination\":{\r\n\t\t\t\"page_size\":\"Page Size\",\r\n\t\t\t\"page_title\":\"Show Page\",\r\n\t\t\t\"first\":\"First\",\r\n\t\t\t\"first_title\":\"First Page\",\r\n\t\t\t\"last\":\"Last\",\r\n\t\t\t\"last_title\":\"Last Page\",\r\n\t\t\t\"prev\":\"Prev\",\r\n\t\t\t\"prev_title\":\"Prev Page\",\r\n\t\t\t\"next\":\"Next\",\r\n\t\t\t\"next_title\":\"Next Page\",\r\n\t\t\t\"all\":\"All\",\r\n\t\t\t\"counter\":{\r\n\t\t\t\t\"showing\": \"Showing\",\r\n\t\t\t\t\"of\": \"of\",\r\n\t\t\t\t\"rows\": \"rows\",\r\n\t\t\t\t\"pages\": \"pages\",\r\n\t\t\t}\r\n\t\t},\r\n\t\t\"headerFilters\":{\r\n\t\t\t\"default\":\"filter column...\",\r\n\t\t\t\"columns\":{}\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\nimport TableRegistry from '../../core/tools/TableRegistry.js';\r\n\r\nclass Comms extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"tableComms\", this.receive.bind(this));\r\n\t}\r\n\r\n\tgetConnections(selectors){\r\n\t\tvar connections = [],\r\n\t\tconnection;\r\n\r\n\t\tconnection = TableRegistry.lookupTable(selectors);\r\n\r\n\t\tconnection.forEach((con) =>{\r\n\t\t\tif(this.table !== con){\r\n\t\t\t\tconnections.push(con);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn connections;\r\n\t}\r\n\r\n\tsend(selectors, module, action, data){\r\n\t\tvar connections = this.getConnections(selectors);\r\n\r\n\t\tconnections.forEach((connection) => {\r\n\t\t\tconnection.tableComms(this.table.element, module, action, data);\r\n\t\t});\r\n\r\n\t\tif(!connections.length && selectors){\r\n\t\t\tconsole.warn(\"Table Connection Error - No tables matching selector found\", selectors);\r\n\t\t}\r\n\t}\r\n\r\n\treceive(table, module, action, data){\r\n\t\tif(this.table.modExists(module)){\r\n\t\t\treturn this.table.modules[module].commsReceived(table, action, data);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Inter-table Comms Error - no such module:\", module);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nComms.moduleName = \"comms\";\r\n\r\nexport default Comms;","import * as coreModules from '../modules/core.js';\r\nimport TableRegistry from './TableRegistry.js';\r\n\r\nexport default class ModuleBinder {\r\n\r\n\tconstructor(tabulator, modules){\r\n\t\tthis.bindStaticFuctionality(tabulator);\r\n\t\tthis.bindModules(tabulator, coreModules, true);\r\n\r\n\t\tif(modules){\r\n\t\t\tthis.bindModules(tabulator, modules);\r\n\t\t}\r\n\t}\r\n\r\n\tbindStaticFuctionality(tabulator){\r\n\t\ttabulator.moduleBindings = {};\r\n\r\n\t\ttabulator.extendModule = function(name, property, values){\r\n\t\t\tif(tabulator.moduleBindings[name]){\r\n\t\t\t\tvar source = tabulator.moduleBindings[name][property];\r\n\r\n\t\t\t\tif(source){\r\n\t\t\t\t\tif(typeof values == \"object\"){\r\n\t\t\t\t\t\tfor(let key in values){\r\n\t\t\t\t\t\t\tsource[key] = values[key];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Module Error - Invalid value type, it must be an object\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Module Error - property does not exist:\", property);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Module Error - module does not exist:\", name);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\ttabulator.registerModule = function(modules){\r\n\t\t\tif(!Array.isArray(modules)){\r\n\t\t\t\tmodules = [modules];\r\n\t\t\t}\r\n\r\n\t\t\tmodules.forEach((mod) => {\r\n\t\t\t\ttabulator.registerModuleBinding(mod)\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\ttabulator.registerModuleBinding = function(mod){\r\n\t\t\ttabulator.moduleBindings[mod.moduleName] = mod;\r\n\t\t};\r\n\r\n\t\ttabulator.findTable = function(query){\r\n\t\t\tvar results = TableRegistry.lookupTable(query, true);\r\n\t\t\treturn Array.isArray(results) && !results.length ? false : results;\r\n\t\t}\r\n\r\n\t\t//ensure that module are bound to instantiated function\r\n\t\ttabulator.prototype.bindModules = function(){\r\n\t\t\tvar orderedMods = [],\r\n\t\t\tunOrderedMods = [];\r\n\r\n\t\t\tthis.modules = {};\r\n\r\n\t\t\tfor(var name in tabulator.moduleBindings){\r\n\t\t\t\tlet mod = tabulator.moduleBindings[name];\r\n\t\t\t\tlet module = new mod(this);\r\n\r\n\t\t\t\tthis.modules[name] = module;\r\n\r\n\t\t\t\tif(mod.prototype.moduleCore){\r\n\t\t\t\t\tthis.modulesCore.push(module);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(mod.moduleInitOrder){\r\n\t\t\t\t\t\torderedMods.push(module);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tunOrderedMods.push(module);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\torderedMods.sort((a, b) => a.moduleInitOrder > b.moduleInitOrder ? 1 : -1);\r\n\r\n\t\t\tthis.modulesRegular = orderedMods.concat(unOrderedMods);\r\n\t\t}\r\n\t}\r\n\r\n\tbindModules(tabulator, modules, core){\r\n\t\tvar mods = Object.values(modules);\r\n\r\n\t\tif(core){\r\n\t\t\tmods.forEach((mod) => {\r\n\t\t\t\tmod.prototype.moduleCore = true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\ttabulator.registerModule(mods);\r\n\t}\r\n}","'use strict';\r\n\r\nimport defaultOptions from './defaults/options.js';\r\n\r\nimport ColumnManager from './ColumnManager.js';\r\nimport RowManager from './RowManager.js';\r\nimport FooterManager from './FooterManager.js';\r\n\r\nimport InteractionMonitor from './tools/InteractionMonitor.js';\r\nimport ComponentFunctionBinder from './tools/ComponentFunctionBinder.js';\r\nimport DataLoader from './tools/DataLoader.js';\r\n\r\nimport ExternalEventBus from './tools/ExternalEventBus.js';\r\nimport InternalEventBus from './tools/InternalEventBus.js';\r\n\r\nimport TableRegistry from './tools/TableRegistry.js';\r\nimport ModuleBinder from './tools/ModuleBinder.js';\r\n\r\nimport OptionsList from './tools/OptionsList.js';\r\n\r\nclass Tabulator {\r\n\r\n\tconstructor(element, options){\r\n\r\n\t\tthis.options = {};\r\n\r\n\t\tthis.columnManager = null; // hold Column Manager\r\n\t\tthis.rowManager = null; //hold Row Manager\r\n\t\tthis.footerManager = null; //holder Footer Manager\r\n\t\tthis.vdomHoz = null; //holder horizontal virtual dom\r\n\t\tthis.externalEvents = null; //handle external event messaging\r\n\t\tthis.eventBus = null; //handle internal event messaging\r\n\t\tthis.interactionMonitor = false; //track user interaction\r\n\t\tthis.browser = \"\"; //hold current browser type\r\n\t\tthis.browserSlow = false; //handle reduced functionality for slower browsers\r\n\t\tthis.browserMobile = false; //check if running on mobile, prevent resize cancelling edit on keyboard appearance\r\n\t\tthis.rtl = false; //check if the table is in RTL mode\r\n\t\tthis.originalElement = null; //hold original table element if it has been replaced\r\n\r\n\t\tthis.componentFunctionBinder = new ComponentFunctionBinder(this); //bind component functions\r\n\t\tthis.dataLoader = false; //bind component functions\r\n\r\n\t\tthis.modules = {}; //hold all modules bound to this table\r\n\t\tthis.modulesCore = []; //hold core modules bound to this table (for initialization purposes)\r\n\t\tthis.modulesRegular = []; //hold regular modules bound to this table (for initialization purposes)\r\n\r\n\t\tthis.optionsList = new OptionsList(this, \"table constructor\");\r\n\r\n\t\tthis.initialized = false;\r\n\r\n\t\tif(this.initializeElement(element)){\r\n\r\n\t\t\tthis.initializeCoreSystems(options);\r\n\r\n\t\t\t//delay table creation to allow event bindings immediately after the constructor\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis._create();\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tTableRegistry.register(this); //register table for inter-device communication\r\n\t}\r\n\r\n\tinitializeElement(element){\r\n\t\tif(typeof HTMLElement !== \"undefined\" && element instanceof HTMLElement){\r\n\t\t\tthis.element = element;\r\n\t\t\treturn true;\r\n\t\t}else if(typeof element === \"string\"){\r\n\t\t\tthis.element = document.querySelector(element);\r\n\r\n\t\t\tif(this.element){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Tabulator Creation Error - no element found matching selector: \", element);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Tabulator Creation Error - Invalid element provided:\", element);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeCoreSystems(options){\r\n\t\tthis.columnManager = new ColumnManager(this);\r\n\t\tthis.rowManager = new RowManager(this);\r\n\t\tthis.footerManager = new FooterManager(this);\r\n\t\tthis.dataLoader = new DataLoader(this);\r\n\r\n\t\tthis.bindModules();\r\n\r\n\t\tthis.options = this.optionsList.generate(Tabulator.defaultOptions, options)\r\n\r\n\t\tthis._clearObjectPointers();\r\n\r\n\t\tthis._mapDeprecatedFunctionality();\r\n\r\n\t\tthis.externalEvents = new ExternalEventBus(this, this.options, this.options.debugEventsExternal);\r\n\t\tthis.eventBus = new InternalEventBus(this.options.debugEventsInternal);\r\n\r\n\t\tthis.interactionMonitor = new InteractionMonitor(this);\r\n\r\n\t\tthis.dataLoader.initialize();\r\n\t\t// this.columnManager.initialize();\r\n\t\t// this.rowManager.initialize();\r\n\t\tthis.footerManager.initialize();\r\n\t}\r\n\r\n\t//convert deprecated functionality to new functions\r\n\t_mapDeprecatedFunctionality(){\r\n\t\t//all previously deprecated functionality removed in the 5.0 release\r\n\t}\r\n\r\n\t_clearSelection(){\r\n\r\n\t\tthis.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tif (window.getSelection) {\r\n\t\t if (window.getSelection().empty) { // Chrome\r\n\t\t \twindow.getSelection().empty();\r\n\t\t } else if (window.getSelection().removeAllRanges) { // Firefox\r\n\t\t \twindow.getSelection().removeAllRanges();\r\n\t\t }\r\n\t\t} else if (document.selection) { // IE?\r\n\t\t\tdocument.selection.empty();\r\n\t\t}\r\n\r\n\t\tthis.element.classList.remove(\"tabulator-block-select\");\r\n\t}\r\n\r\n\t//create table\r\n\t_create(){\r\n\t\tthis.externalEvents.dispatch(\"tableBuilding\");\r\n\t\tthis.eventBus.dispatch(\"table-building\");\r\n\r\n\t\tthis._rtlCheck();\r\n\r\n\t\tthis._buildElement();\r\n\r\n\t\tthis._initializeTable();\r\n\r\n\t\tthis._loadInitialData();\r\n\r\n\t\tthis.initialized = true;\r\n\r\n\t\tthis.externalEvents.dispatch(\"tableBuilt\");\r\n\t}\r\n\r\n\t_rtlCheck(){\r\n\t\tvar style = window.getComputedStyle(this.element);\r\n\r\n\t\tswitch(this.options.textDirection){\r\n\t\t\tcase\"auto\":\r\n\t\t\tif(style.direction !== \"rtl\"){\r\n\t\t\t\tbreak;\r\n\t\t\t};\r\n\r\n\t\t\tcase \"rtl\":\r\n\t\t\tthis.element.classList.add(\"tabulator-rtl\");\r\n\t\t\tthis.rtl = true;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"ltr\":\r\n\t\t\tthis.element.classList.add(\"tabulator-ltr\");\r\n\r\n\t\t\tdefault:\r\n\t\t\tthis.rtl = false;\r\n\t\t}\r\n\t}\r\n\r\n\t//clear pointers to objects in default config object\r\n\t_clearObjectPointers(){\r\n\t\tthis.options.columns = this.options.columns.slice(0);\r\n\r\n\t\tif(Array.isArray(this.options.data) && !this.options.reactiveData){\r\n\t\t\tthis.options.data = this.options.data.slice(0);\r\n\t\t}\r\n\t}\r\n\r\n\t//build tabulator element\r\n\t_buildElement(){\r\n\t\tvar element = this.element,\r\n\t\toptions = this.options,\r\n\t\tnewElement;\r\n\r\n\t\tif(element.tagName === \"TABLE\"){\r\n\t\t\tthis.originalElement = this.element;\r\n\t\t\tnewElement = document.createElement(\"div\");\r\n\r\n\t\t\t//transfer attributes to new element\r\n\t\t\tvar attributes = element.attributes;\r\n\r\n\t\t\t// loop through attributes and apply them on div\r\n\t\t\tfor(var i in attributes){\r\n\t\t\t\tif(typeof attributes[i] == \"object\"){\r\n\t\t\t\t\tnewElement.setAttribute(attributes[i].name, attributes[i].value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// replace table with div element\r\n\t\t\telement.parentNode.replaceChild(newElement, element);\r\n\r\n\t\t\tthis.element = element = newElement;\r\n\t\t}\r\n\r\n\t\telement.classList.add(\"tabulator\");\r\n\t\telement.setAttribute(\"role\", \"grid\");\r\n\r\n\t\t//empty element\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\t//set table height\r\n\t\tif(options.height){\r\n\t\t\toptions.height = isNaN(options.height) ? options.height : options.height + \"px\";\r\n\t\t\telement.style.height = options.height;\r\n\t\t}\r\n\r\n\t\t//set table min height\r\n\t\tif(options.minHeight !== false){\r\n\t\t\toptions.minHeight = isNaN(options.minHeight) ? options.minHeight : options.minHeight + \"px\";\r\n\t\t\telement.style.minHeight = options.minHeight;\r\n\t\t}\r\n\r\n\t\t//set table maxHeight\r\n\t\tif(options.maxHeight !== false){\r\n\t\t\toptions.maxHeight = isNaN(options.maxHeight) ? options.maxHeight : options.maxHeight + \"px\";\r\n\t\t\telement.style.maxHeight = options.maxHeight;\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize core systems and modules\r\n\t_initializeTable(){\r\n\t\tvar element = this.element,\r\n\t\toptions = this.options;\r\n\r\n\t\tthis.interactionMonitor.initialize();\r\n\r\n\t\tthis.columnManager.initialize();\r\n\t\tthis.rowManager.initialize();\r\n\r\n\t\tthis._detectBrowser();\r\n\r\n\t\t//initialize core modules\r\n\t\tthis.modulesCore.forEach((mod) => {\r\n\t\t\tmod.initialize();\r\n\t\t})\r\n\r\n\t\t//build table elements\r\n\t\telement.appendChild(this.columnManager.getElement());\r\n\t\telement.appendChild(this.rowManager.getElement());\r\n\r\n\t\tif(options.footerElement){\r\n\t\t\tthis.footerManager.activate();\r\n\t\t}\r\n\r\n\t\tif(options.autoColumns && options.data){\r\n\r\n\t\t\tthis.columnManager.generateColumnsFromRowData(this.options.data);\r\n\t\t}\r\n\r\n\t\t//initialize regular modules\r\n\t\tthis.modulesRegular.forEach((mod) => {\r\n\t\t\tmod.initialize();\r\n\t\t});\r\n\r\n\t\tthis.columnManager.setColumns(options.columns);\r\n\r\n\t\tthis.eventBus.dispatch(\"table-built\");\r\n\t}\r\n\r\n\t_loadInitialData(){\r\n\t\tthis.dataLoader.load(this.options.data);\r\n\t}\r\n\r\n\t//deconstructor\r\n\tdestroy(){\r\n\t\tvar element = this.element;\r\n\r\n\t\tTableRegistry.deregister(this); //deregister table from inter-device communication\r\n\r\n\t\tthis.eventBus.dispatch(\"table-destroy\");\r\n\r\n\t\t//clear row data\r\n\t\tthis.rowManager.rows.forEach(function(row){\r\n\t\t\trow.wipe();\r\n\t\t});\r\n\r\n\t\tthis.rowManager.rows = [];\r\n\t\tthis.rowManager.activeRows = [];\r\n\t\tthis.rowManager.displayRows = [];\r\n\r\n\t\t//clear DOM\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\t\telement.classList.remove(\"tabulator\");\r\n\t}\r\n\r\n\t_detectBrowser(){\r\n\t\tvar ua = navigator.userAgent||navigator.vendor||window.opera;\r\n\r\n\t\tif(ua.indexOf(\"Trident\") > -1){\r\n\t\t\tthis.browser = \"ie\";\r\n\t\t\tthis.browserSlow = true;\r\n\t\t}else if(ua.indexOf(\"Edge\") > -1){\r\n\t\t\tthis.browser = \"edge\";\r\n\t\t\tthis.browserSlow = true;\r\n\t\t}else if(ua.indexOf(\"Firefox\") > -1){\r\n\t\t\tthis.browser = \"firefox\";\r\n\t\t\tthis.browserSlow = false;\r\n\t\t}else{\r\n\t\t\tthis.browser = \"other\";\r\n\t\t\tthis.browserSlow = false;\r\n\t\t}\r\n\r\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));\r\n\t}\r\n\r\n\t////////////////// Data Handling //////////////////\r\n\t//block table redrawing\r\n\tblockRedraw(){\r\n\t\treturn this.rowManager.blockRedraw();\r\n\t}\r\n\r\n\t//restore table redrawing\r\n\trestoreRedraw(){\r\n\t\treturn this.rowManager.restoreRedraw();\r\n\t}\r\n\r\n\t//load data\r\n\tsetData(data, params, config){\r\n\t\tif(this.initialized){\r\n\t\t\treturn this.dataLoader.load(data, params, config, false);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"setData failed - table not yet initialized. To set initial data please use the 'data' property in the table constructor.\")\r\n\t\t}\r\n\t}\r\n\r\n\t//clear data\r\n\tclearData(){\r\n\t\tthis.dataLoader.blockActiveLoad();\r\n\t\tthis.rowManager.clearData();\r\n\t}\r\n\r\n\t//get table data array\r\n\tgetData(active){\r\n\t\treturn this.rowManager.getData(active);\r\n\t}\r\n\r\n\t//get table data array count\r\n\tgetDataCount(active){\r\n\t\treturn this.rowManager.getDataCount(active);\r\n\t}\r\n\r\n\t//replace data, keeping table in position with same sort\r\n\treplaceData(data, params, config){\r\n\t\tif(this.initialized){\r\n\t\t\treturn this.dataLoader.load(data, params, config, true, true);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"replaceData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update table data\r\n\tupdateData(data){\r\n\t\tvar responses = 0;\r\n\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\tresponses++;\r\n\r\n\t\t\t\t\t\t\trow.updateData(item)\r\n\t\t\t\t\t\t\t.then(()=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"updateData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\taddData(data, pos, index){\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tthis.rowManager.addRows(data, pos, index)\r\n\t\t\t\t\t.then((rows) => {\r\n\t\t\t\t\t\tvar output = [];\r\n\r\n\t\t\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\t\t\toutput.push(row.getComponent());\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tresolve(output);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"addData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update table data\r\n\tupdateOrAddData(data){\r\n\t\tvar rows = [],\r\n\t\tresponses = 0;\r\n\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\r\n\t\t\t\t\t\tresponses++;\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.updateData(item)\r\n\t\t\t\t\t\t\t.then(()=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\t\t\t\t\t\t\t\trows.push(row.getComponent());\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve(rows);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.rowManager.addRows(item)\r\n\t\t\t\t\t\t\t.then((newRows)=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\t\t\t\t\t\t\t\trows.push(newRows[0].getComponent());\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve(rows);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"updateOrAddData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//get row object\r\n\tgetRow(index){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching row found:\", index);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//get row object\r\n\tgetRowFromPosition(position, active){\r\n\t\tvar row = this.rowManager.getRowFromPosition(position, active);\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching row found:\", position);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//delete row from table\r\n\tdeleteRow(index){\r\n\t\tvar foundRows = [];\r\n\r\n\t\tif(!Array.isArray(index)){\r\n\t\t\tindex = [index];\r\n\t\t}\r\n\r\n\t\t//find matching rows\r\n\t\tfor(let item of index){\r\n\t\t\tlet row = this.rowManager.findRow(item, true);\r\n\r\n\t\t\tif(row){\r\n\t\t\t\tfoundRows.push(row);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Delete Error - No matching row found:\", item);\r\n\t\t\t\treturn Promise.reject(\"Delete Error - No matching row found\")\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//sort rows into correct order to ensure smooth delete from table\r\n\t\tfoundRows.sort((a, b) => {\r\n\t\t\treturn this.rowManager.rows.indexOf(a) > this.rowManager.rows.indexOf(b) ? 1 : -1;\r\n\t\t});\r\n\r\n\t\t//delete rows\r\n\t\tfoundRows.forEach((row) =>{\r\n\t\t\trow.delete()\r\n\t\t});\r\n\r\n\t\tthis.rowManager.reRenderInPosition();\r\n\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\r\n\t//add row to table\r\n\taddRow(data, pos, index){\r\n\t\tif(this.initialized){\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\r\n\t\t\treturn this.rowManager.addRows(data, pos, index)\r\n\t\t\t.then((rows)=>{\r\n\t\t\t\treturn rows[0].getComponent();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"addRow failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update a row if it exitsts otherwise create it\r\n\tupdateOrAddRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t.then(()=>{\r\n\t\t\t\treturn row.getComponent();\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\treturn this.rowManager.addRows(data)\r\n\t\t\t.then((rows)=>{\r\n\t\t\t\treturn rows[0].getComponent();\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\t//update row data\r\n\tupdateRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t.then(()=>{\r\n\t\t\t\treturn Promise.resolve(row.getComponent());\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Update Error - No matching row found:\", index);\r\n\t\t\treturn Promise.reject(\"Update Error - No matching row found\");\r\n\t\t}\r\n\t}\r\n\r\n\t//scroll to row in DOM\r\n\tscrollToRow(index, position, ifVisible){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn this.rowManager.scrollToRow(row, position, ifVisible)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Scroll Error - No matching row found:\", index);\r\n\t\t\treturn Promise.reject(\"Scroll Error - No matching row found\");\r\n\t\t}\r\n\t}\r\n\r\n\tmoveRow(from, to, after){\r\n\t\tvar fromRow = this.rowManager.findRow(from);\r\n\r\n\t\tif(fromRow){\r\n\t\t\tfromRow.moveToRow(to, after);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching row found:\", from);\r\n\t\t}\r\n\t}\r\n\r\n\tgetRows(active){\r\n\t\treturn this.rowManager.getComponents(active);\r\n\t}\r\n\r\n\t//get position of row in table\r\n\tgetRowPosition(index, active){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn this.rowManager.getRowPosition(row, active);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Position Error - No matching row found:\", index);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t/////////////// Column Functions ///////////////\r\n\tsetColumns(definition){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.columnManager.setColumns(definition);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"setColumns failed - table not yet initialized. To set initial data please use the 'columns' property in the table constructor.\")\r\n\t\t}\r\n\t}\r\n\r\n\tgetColumns(structured){\r\n\t\treturn this.columnManager.getComponents(structured);\r\n\t}\r\n\r\n\tgetColumn(field){\r\n\t\tvar col = this.columnManager.findColumn(field);\r\n\r\n\t\tif(col){\r\n\t\t\treturn col.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tgetColumnDefinitions(){\r\n\t\treturn this.columnManager.getDefinitionTree();\r\n\t}\r\n\r\n\tshowColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tcolumn.show();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Show Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\thideColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tcolumn.hide();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Hide Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\ttoggleColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tif(column.visible){\r\n\t\t\t\tcolumn.hide();\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.show();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Visibility Toggle Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\taddColumn(definition, before, field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\treturn this.columnManager.addColumn(definition, before, column)\r\n\t\t.then((column) => {\r\n\t\t\treturn column.getComponent();\r\n\t\t});\r\n\t}\r\n\r\n\tdeleteColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn column.delete();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Delete Error - No matching column found:\", field);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\r\n\tupdateColumnDefinition(field, definition){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn column.updateDefinition(definition)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Update Error - No matching column found:\", field);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\r\n\tmoveColumn(from, to, after){\r\n\t\tvar fromColumn = this.columnManager.findColumn(from);\r\n\t\tvar toColumn = this.columnManager.findColumn(to);\r\n\r\n\t\tif(fromColumn){\r\n\t\t\tif(toColumn){\r\n\t\t\t\tthis.columnManager.moveColumn(fromColumn, toColumn, after)\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Move Error - No matching column found:\", toColumn);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching column found:\", from);\r\n\t\t}\r\n\t}\r\n\r\n\t//scroll to column in DOM\r\n\tscrollToColumn(field, position, ifVisible){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\t\tif(column){\r\n\t\t\t\treturn this.columnManager.scrollToColumn(column, position, ifVisible)\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - No matching column found:\", field);\r\n\t\t\t\treturn Promise.reject(\"Scroll Error - No matching column found\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//////////// General Public Functions ////////////\r\n\t//redraw list without updating data\r\n\tredraw(force){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.columnManager.redraw(force);\r\n\t\t\tthis.rowManager.redraw(force);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"redraw failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\tsetHeight(height){\r\n\t\tthis.options.height = isNaN(height) ? height : height + \"px\";\r\n\t\tthis.element.style.height = this.options.height;\r\n\t\tthis.rowManager.initializeRenderer();\r\n\t\tthis.rowManager.redraw();\r\n\t}\r\n\r\n\t//////////////////// Event Bus ///////////////////\r\n\r\n\ton(key, callback){\r\n\t\tthis.externalEvents.subscribe(key, callback);\r\n\t}\r\n\r\n\toff(key, callback){\r\n\t\tthis.externalEvents.unsubscribe(key, callback);\r\n\t}\r\n\r\n\tdispatchEvent(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift();\r\n\r\n\t\tthis.externalEvents.dispatch(...arguments)\r\n\t}\r\n\r\n\t////////////// Extension Management //////////////\r\n\tmodExists(plugin, required){\r\n\t\tif(this.modules[plugin]){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tif(required){\r\n\t\t\t\tconsole.error(\"Tabulator Module Not Installed: \" + plugin);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tmodule(key){\r\n\t\tvar mod = this.modules[key];\r\n\r\n\t\tif(!mod){\r\n\t\t\tconsole.error(\"Tabulator module not installed: \" + key);\r\n\t\t}\r\n\r\n\t\treturn mod;\r\n\t}\r\n}\r\n\r\n//default setup options\r\nTabulator.defaultOptions = defaultOptions;\r\n\r\n//bind modules and static functionality\r\nnew ModuleBinder(Tabulator);\r\n\r\nexport default Tabulator;\r\n","export default {\r\n\r\n\tdebugEventsExternal:false, //flag to console log events\r\n\tdebugEventsInternal:false, //flag to console log events\r\n\tdebugInvalidOptions:true, //allow toggling of invalid option warnings\r\n\r\n\theight:false, //height of tabulator\r\n\tminHeight:false, //minimum height of tabulator\r\n\tmaxHeight:false, //maximum height of tabulator\r\n\r\n\tcolumnHeaderVertAlign:\"top\", //vertical alignment of column headers\r\n\r\n\tcolumns:[],//store for colum header info\r\n\tcolumnDefaults:{}, //store column default props\r\n\r\n\tdata:false, //default starting data\r\n\r\n\tautoColumns:false, //build columns from data row structure\r\n\tautoColumnsDefinitions:false,\r\n\r\n\tnestedFieldSeparator:\".\", //separator for nested data\r\n\r\n\ttooltipGenerationMode:\"load\", //when to generate tooltips\r\n\r\n\tfooterElement:false, //hold footer element\r\n\r\n\tindex:\"id\", //filed for row index\r\n\r\n\ttextDirection:\"auto\",\r\n\r\n\taddRowPos:\"bottom\", //position to insert blank rows, top|bottom\r\n\r\n\theaderVisible:true, //hide header\r\n\r\n\trenderVertical:\"virtual\",\r\n\trenderHorizontal:\"basic\",\r\n\trenderVerticalBuffer:0, // set virtual DOM buffer size\r\n\r\n\tscrollToRowPosition:\"top\",\r\n\tscrollToRowIfVisible:true,\r\n\r\n\tscrollToColumnPosition:\"left\",\r\n\tscrollToColumnIfVisible:true,\r\n\r\n\trowFormatter:false,\r\n\trowFormatterPrint:null,\r\n\trowFormatterClipboard:null,\r\n\trowFormatterHtmlOutput:null,\r\n\r\n\tplaceholder:false,\r\n\r\n\tdataLoader:true,\r\n\tdataLoaderLoading:false,\r\n\tdataLoaderError:false,\r\n\tdataLoaderErrorTimeout:3000,\r\n\r\n\tdataSendParams:{},\r\n\r\n\tdataReceiveParams:{},\r\n}\r\n","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defautlAccessors from './defaults/accessors.js';\r\n\r\nclass Accessor extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.allowedTypes = [\"\", \"data\", \"download\", \"clipboard\", \"print\", \"htmlOutput\"] //list of accessor types\r\n\r\n\t\tthis.registerColumnOption(\"accessor\");\r\n\t\tthis.registerColumnOption(\"accessorParams\");\r\n\t\tthis.registerColumnOption(\"accessorData\");\r\n\t\tthis.registerColumnOption(\"accessorDataParams\");\r\n\t\tthis.registerColumnOption(\"accessorDownload\");\r\n\t\tthis.registerColumnOption(\"accessorDownloadParams\");\r\n\t\tthis.registerColumnOption(\"accessorClipboard\");\r\n\t\tthis.registerColumnOption(\"accessorClipboardParams\");\r\n\t\tthis.registerColumnOption(\"accessorPrint\");\r\n\t\tthis.registerColumnOption(\"accessorPrintParams\");\r\n\t\tthis.registerColumnOption(\"accessorHtmlOutput\");\r\n\t\tthis.registerColumnOption(\"accessorHtmlOutputParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"row-data-retrieve\", this.transformRow.bind(this));\r\n\t}\r\n\r\n\t//initialize column accessor\r\n\tinitializeColumn(column){\r\n\t\tvar match = false,\r\n\t\tconfig = {};\r\n\r\n\t\tthis.allowedTypes.forEach((type) => {\r\n\t\t\tvar key = \"accessor\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\t\taccessor;\r\n\r\n\t\t\tif(column.definition[key]){\r\n\t\t\t\taccessor = this.lookupAccessor(column.definition[key]);\r\n\r\n\t\t\t\tif(accessor){\r\n\t\t\t\t\tmatch = true;\r\n\r\n\t\t\t\t\tconfig[key] = {\r\n\t\t\t\t\t\taccessor:accessor,\r\n\t\t\t\t\t\tparams: column.definition[key + \"Params\"] || {},\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tcolumn.modules.accessor = config;\r\n\t\t}\r\n\t}\r\n\r\n\tlookupAccessor(value){\r\n\t\tvar accessor = false;\r\n\r\n\t\t//set column accessor\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Accessor.accessors[value]){\r\n\t\t\t\taccessor = Accessor.accessors[value]\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Accessor Error - No such accessor found, ignoring: \", value);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\taccessor = value;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn accessor;\r\n\t}\r\n\r\n\t//apply accessor to row\r\n\ttransformRow(row, type){\r\n\t\tvar key = \"accessor\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\trowComponent = row.getComponent();\r\n\r\n\t\t//clone data object with deep copy to isolate internal data from returned result\r\n\t\tvar data = Helpers.deepClone(row.data || {});\r\n\r\n\t\tthis.table.columnManager.traverse(function(column){\r\n\t\t\tvar value, accessor, params, colCompnent;\r\n\r\n\t\t\tif(column.modules.accessor){\r\n\r\n\t\t\t\taccessor = column.modules.accessor[key] || column.modules.accessor.accessor || false;\r\n\r\n\t\t\t\tif(accessor){\r\n\t\t\t\t\tvalue = column.getFieldValue(data);\r\n\r\n\t\t\t\t\tif(value != \"undefined\"){\r\n\t\t\t\t\t\tcolCompnent = column.getComponent();\r\n\t\t\t\t\t\tparams = typeof accessor.params === \"function\" ? accessor.params(value, data, type, colCompnent, rowComponent) : accessor.params;\r\n\t\t\t\t\t\tcolumn.setFieldValue(data, accessor.accessor(value, data, type, params, colCompnent, rowComponent));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n}\r\n\r\n//load defaults\r\nAccessor.moduleName = \"accessor\";\r\nAccessor.accessors = defautlAccessors;\r\n\r\nexport default Accessor;","export default {}","function generateParamsList(data, prefix){\r\n\tvar output = [];\r\n\r\n\tprefix = prefix || \"\";\r\n\r\n\tif(Array.isArray(data)){\r\n\t\tdata.forEach((item, i) => {\r\n\t\t\toutput = output.concat(generateParamsList(item, prefix ? prefix + \"[\" + i + \"]\" : i));\r\n\t\t});\r\n\t}else if (typeof data === \"object\"){\r\n\t\tfor (var key in data){\r\n\t\t\toutput = output.concat(generateParamsList(data[key], prefix ? prefix + \"[\" + key + \"]\" : key));\r\n\t\t}\r\n\t}else{\r\n\t\toutput.push({key:prefix, value:data});\r\n\t}\r\n\r\n\treturn output;\r\n}\r\n\r\nfunction serializeParams(params){\r\n\tvar output = generateParamsList(params),\r\n\tencoded = [];\r\n\r\n\toutput.forEach(function(item){\r\n\t\tencoded.push(encodeURIComponent(item.key) + \"=\" + encodeURIComponent(item.value));\r\n\t});\r\n\r\n\treturn encoded.join(\"&\");\r\n}\r\n\r\nexport default function(url, config, params){\r\n\tif(url){\r\n\t\tif(params && Object.keys(params).length){\r\n\t\t\tif(!config.method || config.method.toLowerCase() == \"get\"){\r\n\t\t\t\tconfig.method = \"get\";\r\n\r\n\t\t\t\turl += (url.includes(\"?\") ? \"&\" : \"?\") + serializeParams(params);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn url;\r\n};","function generateParamsList(data, prefix){\r\n\tvar output = [];\r\n\r\n\tprefix = prefix || \"\";\r\n\r\n\tif(Array.isArray(data)){\r\n\t\tdata.forEach((item, i) => {\r\n\t\t\toutput = output.concat(generateParamsList(item, prefix ? prefix + \"[\" + i + \"]\" : i));\r\n\t\t});\r\n\t}else if (typeof data === \"object\"){\r\n\t\tfor (var key in data){\r\n\t\t\toutput = output.concat(generateParamsList(data[key], prefix ? prefix + \"[\" + key + \"]\" : key));\r\n\t\t}\r\n\t}else{\r\n\t\toutput.push({key:prefix, value:data});\r\n\t}\r\n\r\n\treturn output;\r\n}\r\n\r\nexport default {\r\n\t\"json\":{\r\n\t\theaders:{\r\n\t\t\t'Content-Type': 'application/json',\r\n\t\t},\r\n\t\tbody:function(url, config, params){\r\n\t\t\treturn JSON.stringify(params);\r\n\t\t},\r\n\t},\r\n\t\"form\":{\r\n\t\theaders:{\r\n\t\t},\r\n\t\tbody:function(url, config, params){\r\n\r\n\t\t\tvar output = generateParamsList(params),\r\n\t\t\tform = new FormData();\r\n\r\n\t\t\toutput.forEach(function(item){\r\n\t\t\t\tform.append(item.key, item.value);\r\n\t\t\t});\r\n\r\n\t\t\treturn form;\r\n\t\t},\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultConfig from './defaults/config.js';\r\nimport defaultURLGenerator from './defaults/urlGenerator.js';\r\nimport defaultLoaderPromise from './defaults/loaderPromise.js';\r\nimport defaultContentTypeFormatters from './defaults/contentTypeFormatters.js';\r\n\r\nclass Ajax extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.config = {}; //hold config object for ajax request\r\n\t\tthis.url = \"\"; //request URL\r\n\t\tthis.urlGenerator = false;\r\n\t\tthis.params = false; //request parameters\r\n\t\t\r\n\t\tthis.loaderPromise = false;\r\n\t\t\r\n\t\tthis.registerTableOption(\"ajaxURL\", false); //url for ajax loading\r\n\t\tthis.registerTableOption(\"ajaxURLGenerator\", false);\r\n\t\tthis.registerTableOption(\"ajaxParams\", {}); //params for ajax loading\r\n\t\tthis.registerTableOption(\"ajaxConfig\", \"get\"); //ajax request type\r\n\t\tthis.registerTableOption(\"ajaxContentType\", \"form\"); //ajax request type\r\n\t\tthis.registerTableOption(\"ajaxRequestFunc\", false); //promise function\r\n\t\t\r\n\t\tthis.registerTableOption(\"ajaxRequesting\", function(){});\r\n\t\tthis.registerTableOption(\"ajaxResponse\", false);\r\n\t\t\r\n\t\tthis.contentTypeFormatters = Ajax.contentTypeFormatters;\r\n\t}\r\n\t\r\n\t//initialize setup options\r\n\tinitialize(){\r\n\t\tthis.loaderPromise = this.table.options.ajaxRequestFunc || Ajax.defaultLoaderPromise;\r\n\t\tthis.urlGenerator = this.table.options.ajaxURLGenerator || Ajax.defaultURLGenerator;\r\n\t\t\r\n\t\tif(this.table.options.ajaxURL){\r\n\t\t\tthis.setUrl(this.table.options.ajaxURL);\r\n\t\t}\r\n\r\n\r\n\t\tthis.setDefaultConfig(this.table.options.ajaxConfig);\r\n\t\t\r\n\t\tthis.registerTableFunction(\"getAjaxUrl\", this.getUrl.bind(this));\r\n\t\t\r\n\t\tthis.subscribe(\"data-loading\", this.requestDataCheck.bind(this));\r\n\t\tthis.subscribe(\"data-params\", this.requestParams.bind(this));\r\n\t\tthis.subscribe(\"data-load\", this.requestData.bind(this));\r\n\t}\r\n\t\r\n\trequestParams(data, config, silent, params){\r\n\t\tvar ajaxParams = this.table.options.ajaxParams;\r\n\t\t\r\n\t\tif(ajaxParams){\r\n\t\t\tif(typeof ajaxParams === \"function\"){\r\n\t\t\t\tajaxParams = ajaxParams.call(this.table);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tparams = Object.assign(params, ajaxParams);\r\n\t\t}\t\t\r\n\t\t\r\n\t\treturn params;\r\n\t}\r\n\t\r\n\trequestDataCheck(data, params, config, silent){\r\n\t\treturn !!((!data && this.url) || typeof data === \"string\");\r\n\t}\r\n\t\r\n\trequestData(url, params, config, silent, previousData){\r\n\t\tvar ajaxConfig;\r\n\t\t\r\n\t\tif(!previousData && this.requestDataCheck(url)){\r\n\t\t\tif(url){\r\n\t\t\t\tthis.setUrl(url);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tajaxConfig = this.generateConfig(config);\r\n\t\t\t\r\n\t\t\treturn this.sendRequest(this.url, params, ajaxConfig);\r\n\t\t}else{\r\n\t\t\treturn previousData;\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetDefaultConfig(config = {}){\r\n\t\tthis.config = Object.assign({}, Ajax.defaultConfig);\r\n\r\n\t\tif(typeof config == \"string\"){\r\n\t\t\tthis.config.method = config;\r\n\t\t}else{\r\n\t\t\tObject.assign(this.config, config);\r\n\t\t}\r\n\t}\r\n\t\r\n\t//load config object\r\n\tgenerateConfig(config = {}){\r\n\t\tvar ajaxConfig = Object.assign({}, this.config)\r\n\t\t\r\n\t\tif(typeof config == \"string\"){\r\n\t\t\tajaxConfig.method = config;\r\n\t\t}else{\r\n\t\t\tObject.assign(ajaxConfig, config);\r\n\t\t}\r\n\t\t\r\n\t\treturn ajaxConfig;\r\n\t}\r\n\t\r\n\t//set request url\r\n\tsetUrl(url){\r\n\t\tthis.url = url;\r\n\t}\r\n\t\r\n\t//get request url\r\n\tgetUrl(){\r\n\t\treturn this.url;\r\n\t}\r\n\t\r\n\t//send ajax request\r\n\tsendRequest(url, params, config){\r\n\t\tif(this.table.options.ajaxRequesting.call(this.table, url, params) !== false){\r\n\t\t\treturn this.loaderPromise(url, config, params)\r\n\t\t\t.then((data)=>{\r\n\t\t\t\tif(this.table.options.ajaxResponse){\r\n\t\t\t\t\tdata = this.table.options.ajaxResponse.call(this.table, url, params, data);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn data;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n}\r\n\r\nAjax.moduleName = \"ajax\";\r\n\r\n//load defaults\r\nAjax.defaultConfig = defaultConfig;\r\nAjax.defaultURLGenerator = defaultURLGenerator;\r\nAjax.defaultLoaderPromise = defaultLoaderPromise;\r\nAjax.contentTypeFormatters = defaultContentTypeFormatters;\r\n\r\nexport default Ajax;","export default {\r\n\tmethod: \"GET\",\r\n};","export default function(url, config, params){\r\n\tvar contentType;\r\n\r\n\treturn new Promise((resolve, reject) => {\r\n\t\t//set url\r\n\t\turl = this.urlGenerator.call(this.table, url, config, params);\r\n\r\n\t\t//set body content if not GET request\r\n\t\tif(config.method.toUpperCase() != \"GET\"){\r\n\t\t\tcontentType = typeof this.table.options.ajaxContentType === \"object\" ? this.table.options.ajaxContentType : this.contentTypeFormatters[this.table.options.ajaxContentType];\r\n\t\t\tif(contentType){\r\n\r\n\t\t\t\tfor(var key in contentType.headers){\r\n\t\t\t\t\tif(!config.headers){\r\n\t\t\t\t\t\tconfig.headers = {};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(typeof config.headers[key] === \"undefined\"){\r\n\t\t\t\t\t\tconfig.headers[key] = contentType.headers[key];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconfig.body = contentType.body.call(this, url, config, params);\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Ajax Error - Invalid ajaxContentType value:\", this.table.options.ajaxContentType);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(url){\r\n\t\t\t//configure headers\r\n\t\t\tif(typeof config.headers === \"undefined\"){\r\n\t\t\t\tconfig.headers = {};\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.headers.Accept === \"undefined\"){\r\n\t\t\t\tconfig.headers.Accept = \"application/json\";\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.headers[\"X-Requested-With\"] === \"undefined\"){\r\n\t\t\t\tconfig.headers[\"X-Requested-With\"] = \"XMLHttpRequest\";\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.mode === \"undefined\"){\r\n\t\t\t\tconfig.mode = \"cors\";\r\n\t\t\t}\r\n\r\n\t\t\tif(config.mode == \"cors\"){\r\n\t\t\t\tif(typeof config.headers[\"Origin\"] === \"undefined\"){\r\n\t\t\t\t\tconfig.headers[\"Origin\"] = window.location.origin;\r\n\t\t\t\t}\r\n \r\n\t\t\t\tif(typeof config.credentials === \"undefined\"){\r\n\t\t\t\t\tconfig.credentials = 'same-origin';\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(typeof config.credentials === \"undefined\"){\r\n\t\t\t\t\tconfig.credentials = 'include';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//send request\r\n\t\t\tfetch(url, config)\r\n\t\t\t.then((response)=>{\r\n\t\t\t\tif(response.ok) {\r\n\t\t\t\t\tresponse.json()\r\n\t\t\t\t\t.then((data)=>{\r\n\t\t\t\t\t\tresolve(data);\r\n\t\t\t\t\t}).catch((error)=>{\r\n\t\t\t\t\t\treject(error);\r\n\t\t\t\t\t\tconsole.warn(\"Ajax Load Error - Invalid JSON returned\", error);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \" + response.status, response.statusText);\r\n\t\t\t\t\treject(response);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.catch((error)=>{\r\n\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \", error);\r\n\t\t\t\treject(error);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Ajax Load Error - No URL Set\");\r\n\t\t\tresolve([]);\r\n\t\t}\r\n\t});\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultPasteActions from './defaults/pasteActions.js';\r\nimport defaultPasteParsers from './defaults/pasteParsers.js';\r\n\r\nclass Clipboard extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.mode = true;\r\n\t\tthis.pasteParser = function(){};\r\n\t\tthis.pasteAction = function(){};\r\n\t\tthis.customSelection = false;\r\n\t\tthis.rowRange = false;\r\n\t\tthis.blocked = true; //block copy actions not originating from this command\r\n\r\n\t\tthis.registerTableOption(\"clipboard\", false); //enable clipboard\r\n\t\tthis.registerTableOption(\"clipboardCopyStyled\", true); //formatted table data\r\n\t\tthis.registerTableOption(\"clipboardCopyConfig\", false); //clipboard config\r\n\t\tthis.registerTableOption(\"clipboardCopyFormatter\", false); //DEPRICATED - REMOVE in 5.0\r\n\t\tthis.registerTableOption(\"clipboardCopyRowRange\", \"active\"); //restrict clipboard to visible rows only\r\n\t\tthis.registerTableOption(\"clipboardPasteParser\", \"table\"); //convert pasted clipboard data to rows\r\n\t\tthis.registerTableOption(\"clipboardPasteAction\", \"insert\"); //how to insert pasted data into the table\r\n\r\n\t\tthis.registerColumnOption(\"clipboard\");\r\n\t\tthis.registerColumnOption(\"titleClipboard\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.mode = this.table.options.clipboard;\r\n\r\n\t\tthis.rowRange = this.table.options.clipboardCopyRowRange;\r\n\r\n\t\tif(this.mode === true || this.mode === \"copy\"){\r\n\t\t\tthis.table.element.addEventListener(\"copy\", (e) => {\r\n\t\t\t\tvar plain, html, list;\r\n\r\n\t\t\t\tif(!this.blocked){\r\n\t\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\t\tif(this.customSelection){\r\n\t\t\t\t\t\tplain = this.customSelection;\r\n\r\n\t\t\t\t\t\tif(this.table.options.clipboardCopyFormatter){\r\n\t\t\t\t\t\t\tplain = this.table.options.clipboardCopyFormatter(\"plain\", plain);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\r\n\t\t\t\t\t\tvar list = this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig, this.table.options.clipboardCopyStyled, this.rowRange, \"clipboard\");\r\n\r\n\t\t\t\t\t\thtml = this.table.modules.export.genereateHTMLTable(list);\r\n\t\t\t\t\t\tplain = html ? this.generatePlainContent(list) : \"\";\r\n\r\n\t\t\t\t\t\tif(this.table.options.clipboardCopyFormatter){\r\n\t\t\t\t\t\t\tplain = this.table.options.clipboardCopyFormatter(\"plain\", plain);\r\n\t\t\t\t\t\t\thtml = this.table.options.clipboardCopyFormatter(\"html\", html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (window.clipboardData && window.clipboardData.setData) {\r\n\t\t\t\t\t\twindow.clipboardData.setData('Text', plain);\r\n\t\t\t\t\t} else if (e.clipboardData && e.clipboardData.setData) {\r\n\t\t\t\t\t\te.clipboardData.setData('text/plain', plain);\r\n\t\t\t\t\t\tif(html){\r\n\t\t\t\t\t\t\te.clipboardData.setData('text/html', html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (e.originalEvent && e.originalEvent.clipboardData.setData) {\r\n\t\t\t\t\t\te.originalEvent.clipboardData.setData('text/plain', plain);\r\n\t\t\t\t\t\tif(html){\r\n\t\t\t\t\t\t\te.originalEvent.clipboardData.setData('text/html', html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.dispatchExternal(\"clipboardCopied\", plain, html);\r\n\r\n\t\t\t\t\tthis.reset();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.mode === true || this.mode === \"paste\"){\r\n\t\t\tthis.table.element.addEventListener(\"paste\", (e) => {\r\n\t\t\t\tthis.paste(e);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.setPasteParser(this.table.options.clipboardPasteParser);\r\n\t\tthis.setPasteAction(this.table.options.clipboardPasteAction);\r\n\r\n\t\tthis.registerTableFunction(\"copyToClipboard\", this.copy.bind(this));\r\n\t}\r\n\r\n\treset(){\r\n\t\tthis.blocked = true;\r\n\t\tthis.customSelection = false;\r\n\t}\r\n\r\n\tgeneratePlainContent (list) {\r\n\t\tvar output = [];\r\n\r\n\t\tlist.forEach((row) => {\r\n\t\t\tvar rowData = [];\r\n\r\n\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\tvar value = \"\";\r\n\r\n\t\t\t\tif(col){\r\n\r\n\t\t\t\t\tif(row.type === \"group\"){\r\n\t\t\t\t\t\tcol.value = col.component.getKey();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(col.value === null){\r\n\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\t\tvalue = JSON.stringify(col.value);\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tvalue = col.value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowData.push(value);\r\n\t\t\t});\r\n\r\n\t\t\toutput.push(rowData.join(\"\\t\"));\r\n\t\t});\r\n\r\n\t\treturn output.join(\"\\n\");\r\n\t}\r\n\r\n\tcopy (range, internal) {\r\n\t\tvar range, sel, textRange;\r\n\t\tthis.blocked = false;\r\n\t\tthis.customSelection = false;\r\n\r\n\t\tif (this.mode === true || this.mode === \"copy\") {\r\n\r\n\t\t\tthis.rowRange = range || this.table.options.clipboardCopyRowRange;\r\n\r\n\t\t\tif (typeof window.getSelection != \"undefined\" && typeof document.createRange != \"undefined\") {\r\n\t\t\t\trange = document.createRange();\r\n\t\t\t\trange.selectNodeContents(this.table.element);\r\n\t\t\t\tsel = window.getSelection();\r\n\r\n\t\t\t\tif (sel.toString() && internal) {\r\n\t\t\t\t\tthis.customSelection = sel.toString();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsel.removeAllRanges();\r\n\t\t\t\tsel.addRange(range);\r\n\t\t\t} else if (typeof document.selection != \"undefined\" && typeof document.body.createTextRange != \"undefined\") {\r\n\t\t\t\ttextRange = document.body.createTextRange();\r\n\t\t\t\ttextRange.moveToElementText(this.table.element);\r\n\t\t\t\ttextRange.select();\r\n\t\t\t}\r\n\r\n\t\t\tdocument.execCommand('copy');\r\n\r\n\t\t\tif (sel) {\r\n\t\t\t\tsel.removeAllRanges();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//PASTE EVENT HANDLING\r\n\tsetPasteAction(action){\r\n\r\n\t\tswitch(typeof action){\r\n\t\t\tcase \"string\":\r\n\t\t\tthis.pasteAction = Clipboard.pasteActions[action];\r\n\r\n\t\t\tif(!this.pasteAction){\r\n\t\t\t\tconsole.warn(\"Clipboard Error - No such paste action found:\", action);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tthis.pasteAction = action;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tsetPasteParser(parser){\r\n\t\tswitch(typeof parser){\r\n\t\t\tcase \"string\":\r\n\t\t\tthis.pasteParser = Clipboard.pasteParsers[parser];\r\n\r\n\t\t\tif(!this.pasteParser){\r\n\t\t\t\tconsole.warn(\"Clipboard Error - No such paste parser found:\", parser);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tthis.pasteParser = parser;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tpaste(e){\r\n\t\tvar data, rowData, rows;\r\n\r\n\t\tif(this.checkPaseOrigin(e)){\r\n\r\n\t\t\tdata = this.getPasteData(e);\r\n\r\n\t\t\trowData = this.pasteParser.call(this, data);\r\n\r\n\t\t\tif(rowData){\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\t\t\trowData = this.mutateData(rowData);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trows = this.pasteAction.call(this, rowData);\r\n\r\n\t\t\t\tthis.dispatchExternal(\"clipboardPasted\", data, rowData, rows);\r\n\t\t\t}else{\r\n\t\t\t\tthis.dispatchExternal(\"clipboardPasteError\", data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmutateData(data){\r\n\t\tvar output = [];\r\n\r\n\t\tif(Array.isArray(data)){\r\n\t\t\tdata.forEach((row) => {\r\n\t\t\t\toutput.push(this.table.modules.mutator.transformRow(row, \"clipboard\"));\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\toutput = data;\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\r\n\tcheckPaseOrigin(e){\r\n\t\tvar valid = true;\r\n\r\n\t\tif(e.target.tagName != \"DIV\" || this.table.modules.edit.currentCell){\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\r\n\t\treturn valid;\r\n\t}\r\n\r\n\tgetPasteData(e){\r\n\t\tvar data;\r\n\r\n\t\tif (window.clipboardData && window.clipboardData.getData) {\r\n\t\t\tdata = window.clipboardData.getData('Text');\r\n\t\t} else if (e.clipboardData && e.clipboardData.getData) {\r\n\t\t\tdata = e.clipboardData.getData('text/plain');\r\n\t\t} else if (e.originalEvent && e.originalEvent.clipboardData.getData) {\r\n\t\t\tdata = e.originalEvent.clipboardData.getData('text/plain');\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n}\r\n\r\nClipboard.moduleName = \"clipboard\";\r\n\r\n//load defaults\r\nClipboard.pasteActions = defaultPasteActions;\r\nClipboard.pasteParsers = defaultPasteParsers;\r\n\r\nexport default Clipboard;","export default {\r\n\treplace:function(rows){\r\n\t\treturn this.table.setData(rows);\r\n\t},\r\n\tupdate:function(rows){\r\n\t\treturn this.table.updateOrAddData(rows);\r\n\t},\r\n\tinsert:function(rows){\r\n\t\treturn this.table.addData(rows);\r\n\t},\r\n};","export default {\r\n\ttable:function(clipboard){\r\n\t\tvar data = [],\r\n\t\tsuccess = false,\r\n\t\theaderFindSuccess = true,\r\n\t\tcolumns = this.table.columnManager.columns,\r\n\t\tcolumnMap = [],\r\n\t\trows = [];\r\n\r\n\t\t//get data from clipboard into array of columns and rows.\r\n\t\tclipboard = clipboard.split(\"\\n\");\r\n\r\n\t\tclipboard.forEach(function(row){\r\n\t\t\tdata.push(row.split(\"\\t\"));\r\n\t\t});\r\n\r\n\t\tif(data.length && !(data.length === 1 && data[0].length < 2)){\r\n\t\t\tsuccess = true;\r\n\r\n\t\t\t//check if headers are present by title\r\n\t\t\tdata[0].forEach(function(value){\r\n\t\t\t\tvar column = columns.find(function(column){\r\n\t\t\t\t\treturn value && column.definition.title && value.trim() && column.definition.title.trim() === value.trim();\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tcolumnMap.push(column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\theaderFindSuccess = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t//check if column headers are present by field\r\n\t\t\tif(!headerFindSuccess){\r\n\t\t\t\theaderFindSuccess = true;\r\n\t\t\t\tcolumnMap = [];\r\n\r\n\t\t\t\tdata[0].forEach(function(value){\r\n\t\t\t\t\tvar column = columns.find(function(column){\r\n\t\t\t\t\t\treturn value && column.field && value.trim() && column.field.trim() === value.trim();\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(column){\r\n\t\t\t\t\t\tcolumnMap.push(column);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\theaderFindSuccess = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(!headerFindSuccess){\r\n\t\t\t\t\tcolumnMap = this.table.columnManager.columnsByIndex;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//remove header row if found\r\n\t\t\tif(headerFindSuccess){\r\n\t\t\t\tdata.shift();\r\n\t\t\t}\r\n\r\n\t\t\tdata.forEach(function(item){\r\n\t\t\t\tvar row = {};\r\n\r\n\t\t\t\titem.forEach(function(value, i){\r\n\t\t\t\t\tif(columnMap[i]){\r\n\t\t\t\t\t\trow[columnMap[i].field] = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\trows.push(row);\r\n\t\t\t});\r\n\r\n\t\t\treturn rows;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n};","class CalcComponent{\r\n\tconstructor (row){\r\n\t\tthis._row = row;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._row.table.componentFunctionBinder.handle(\"row\", target._row, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\treturn this._row.getData(transform);\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._row.getElement();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._row.table;\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._row.getCells().forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar cell = this._row.getCell(column);\r\n\t\treturn cell ? cell.getComponent() : false;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._row;\r\n\t}\r\n}\r\n\r\nexport default CalcComponent;","export default {\r\n\t\"avg\":function(values, data, calcParams){\r\n\t\tvar output = 0,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : 2\r\n\r\n\t\tif(values.length){\r\n\t\t\toutput = values.reduce(function(sum, value){\r\n\t\t\t\treturn Number(sum) + Number(value);\r\n\t\t\t});\r\n\r\n\t\t\toutput = output / values.length;\r\n\r\n\t\t\toutput = precision !== false ? output.toFixed(precision) : output;\r\n\t\t}\r\n\r\n\t\treturn parseFloat(output).toString();\r\n\t},\r\n\t\"max\":function(values, data, calcParams){\r\n\t\tvar output = null,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tvalues.forEach(function(value){\r\n\r\n\t\t\tvalue = Number(value);\r\n\r\n\t\t\tif(value > output || output === null){\r\n\t\t\t\toutput = value;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output !== null ? (precision !== false ? output.toFixed(precision) : output) : \"\";\r\n\t},\r\n\t\"min\":function(values, data, calcParams){\r\n\t\tvar output = null,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tvalues.forEach(function(value){\r\n\r\n\t\t\tvalue = Number(value);\r\n\r\n\t\t\tif(value < output || output === null){\r\n\t\t\t\toutput = value;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output !== null ? (precision !== false ? output.toFixed(precision) : output) : \"\";\r\n\t},\r\n\t\"sum\":function(values, data, calcParams){\r\n\t\tvar output = 0,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tif(values.length){\r\n\t\t\tvalues.forEach(function(value){\r\n\t\t\t\tvalue = Number(value);\r\n\r\n\t\t\t\toutput += !isNaN(value) ? Number(value) : 0;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn precision !== false ? output.toFixed(precision) : output;\r\n\t},\r\n\t\"concat\":function(values, data, calcParams){\r\n\t\tvar output = 0;\r\n\r\n\t\tif(values.length){\r\n\t\t\toutput = values.reduce(function(sum, value){\r\n\t\t\t\treturn String(sum) + String(value);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t},\r\n\t\"count\":function(values, data, calcParams){\r\n\t\tvar output = 0;\r\n\r\n\t\tif(values.length){\r\n\t\t\tvalues.forEach(function(value){\r\n\t\t\t\tif(value){\r\n\t\t\t\t\toutput ++;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport CalcComponent from './CalcComponent.js';\r\n\r\nimport Cell from '../../core/cell/Cell.js';\r\nimport Column from '../../core/column/Column.js';\r\nimport Row from '../../core/row/Row.js';\r\n\r\nimport defaultCalculations from './defaults/calculations.js';\r\n\r\nclass ColumnCalcs extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.topCalcs = [];\r\n\t\tthis.botCalcs = [];\r\n\t\tthis.genColumn = false;\r\n\t\tthis.topElement = this.createElement();\r\n\t\tthis.botElement = this.createElement();\r\n\t\tthis.topRow = false;\r\n\t\tthis.botRow = false;\r\n\t\tthis.topInitialized = false;\r\n\t\tthis.botInitialized = false;\r\n\r\n\t\tthis.registerTableOption(\"columnCalcs\", true);\r\n\r\n\t\tthis.registerColumnOption(\"topCalc\");\r\n\t\tthis.registerColumnOption(\"topCalcParams\");\r\n\t\tthis.registerColumnOption(\"topCalcFormatter\");\r\n\t\tthis.registerColumnOption(\"topCalcFormatterParams\");\r\n\t\tthis.registerColumnOption(\"bottomCalc\");\r\n\t\tthis.registerColumnOption(\"bottomCalcParams\");\r\n\t\tthis.registerColumnOption(\"bottomCalcFormatter\");\r\n\t\tthis.registerColumnOption(\"bottomCalcFormatterParams\");\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-calcs-holder\");\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.genColumn = new Column({field:\"value\"}, this);\r\n\r\n\t\tthis.subscribe(\"cell-value-changed\", this.cellValueChanged.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumnCheck.bind(this));\r\n\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t\tthis.subscribe(\"row-added\", this.rowsUpdated.bind(this));\r\n\t\tthis.subscribe(\"column-moved\", this.recalcActiveRows.bind(this));\r\n\t\tthis.subscribe(\"column-add\", this.recalcActiveRows.bind(this));\r\n\t\tthis.subscribe(\"data-refreshed\", this.recalcActiveRowsRefresh.bind(this));\r\n\t\tthis.subscribe(\"table-redraw\", this.tableRedraw.bind(this));\r\n\t\tthis.subscribe(\"rows-visible\", this.visibleRows.bind(this));\r\n\r\n\t\tthis.registerTableFunction(\"getCalcResults\", this.getResults.bind(this));\r\n\t\tthis.registerTableFunction(\"recalc\", this.userRecalc.bind(this));\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\r\n\t\tif(force){\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\tuserRecalc(){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tvisibleRows(viewable, rows){\r\n\t\tif(this.topRow){\r\n\t\t\trows.unshift(this.topRow);\r\n\t\t}\r\n\r\n\t\tif(this.botRow){\r\n\t\t\trows.push(this.botRow);\r\n\t\t}\r\n\t\r\n\t\treturn rows;\r\n\t}\r\n\r\n\trowsUpdated(row){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.recalcRowGroup(this);\r\n\t\t}else{\r\n\t\t\tthis.recalcActiveRows();\r\n\t\t}\r\n\t}\r\n\r\n\trecalcActiveRowsRefresh(){\r\n\t\tif(this.table.options.groupBy && this.table.options.dataTreeStartExpanded && this.table.options.dataTree){\r\n\t\t\tthis.recalcAll();\r\n\t\t}else{\r\n\t\t\tthis.recalcActiveRows();\r\n\t\t}\r\n\t}\r\n\r\n\trecalcActiveRows(){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t}\r\n\r\n\tcellValueChanged(cell){\r\n\t\tif(cell.column.definition.topCalc || cell.column.definition.bottomCalc){\r\n\t\t\tif(this.table.options.groupBy){\r\n\t\t\t\tif(this.table.options.columnCalcs == \"table\" || this.table.options.columnCalcs == \"both\"){\r\n\t\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"table\"){\r\n\t\t\t\t\tthis.recalcRowGroup(cell.row);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(column.definition.topCalc || column.definition.bottomCalc){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column calcs\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition\r\n\r\n\t\tvar config = {\r\n\t\t\ttopCalcParams:def.topCalcParams || {},\r\n\t\t\tbotCalcParams:def.bottomCalcParams || {},\r\n\t\t};\r\n\r\n\t\tif(def.topCalc){\r\n\r\n\t\t\tswitch(typeof def.topCalc){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(ColumnCalcs.calculations[def.topCalc]){\r\n\t\t\t\t\tconfig.topCalc = ColumnCalcs.calculations[def.topCalc]\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.topCalc);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tconfig.topCalc = def.topCalc;\r\n\t\t\t\tbreak\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(config.topCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.topCalcs.push(column);\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"group\"){\r\n\t\t\t\t\tthis.initializeTopRow();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tif(def.bottomCalc){\r\n\t\t\tswitch(typeof def.bottomCalc){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(ColumnCalcs.calculations[def.bottomCalc]){\r\n\t\t\t\t\tconfig.botCalc = ColumnCalcs.calculations[def.bottomCalc]\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.bottomCalc);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tconfig.botCalc = def.bottomCalc;\r\n\t\t\t\tbreak\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(config.botCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.botCalcs.push(column);\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"group\"){\r\n\t\t\t\t\tthis.initializeBottomRow();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t//dummy functions to handle being mock column manager\r\n\tregisterColumnField(){};\r\n\r\n\tremoveCalcs(){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(this.topInitialized){\r\n\t\t\tthis.topInitialized = false;\r\n\t\t\tthis.topElement.parentNode.removeChild(this.topElement);\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\r\n\t\tif(this.botInitialized){\r\n\t\t\tthis.botInitialized = false;\r\n\t\t\tthis.table.footerManager.remove(this.botElement);\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeTopRow(){\r\n\t\tif(!this.topInitialized){\r\n\t\t\tthis.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\r\n\t\t\tthis.topInitialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeBottomRow(){\r\n\t\tif(!this.botInitialized){\r\n\t\t\tthis.table.footerManager.prepend(this.botElement);\r\n\t\t\tthis.botInitialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tscrollHorizontal(left){\r\n\t\tif(this.botInitialized && this.botRow){\r\n\t\t\tthis.botRow.getElement().style.marginLeft = (-left) + \"px\";\r\n\t\t}\r\n\t}\r\n\r\n\trecalc(rows){\r\n\t\tvar data, row;\r\n\r\n\t\tif(this.topInitialized || this.botInitialized){\r\n\t\t\tdata = this.rowsToData(rows);\r\n\r\n\t\t\tif(this.topInitialized){\r\n\t\t\t\tif(this.topRow){\r\n\t\t\t\t\tthis.topRow.deleteCells();\r\n\t\t\t\t}\r\n\r\n\t\t\t\trow = this.generateRow(\"top\", this.rowsToData(rows))\r\n\t\t\t\tthis.topRow = row;\r\n\t\t\t\twhile(this.topElement.firstChild) this.topElement.removeChild(this.topElement.firstChild);\r\n\t\t\t\tthis.topElement.appendChild(row.getElement());\r\n\t\t\t\trow.initialize(true);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.botInitialized){\r\n\t\t\t\tif(this.botRow){\r\n\t\t\t\t\tthis.botRow.deleteCells();\r\n\t\t\t\t}\r\n\r\n\t\t\t\trow = this.generateRow(\"bottom\", this.rowsToData(rows))\r\n\t\t\t\tthis.botRow = row;\r\n\t\t\t\twhile(this.botElement.firstChild) this.botElement.removeChild(this.botElement.firstChild);\r\n\t\t\t\tthis.botElement.appendChild(row.getElement());\r\n\t\t\t\trow.initialize(true);\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\t//set resizable handles\r\n\t\t\tif(this.table.modExists(\"frozenColumns\")){\r\n\t\t\t\tthis.table.modules.frozenColumns.layout();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trecalcRowGroup(row){\r\n\t\tthis.recalcGroup(this.table.modules.groupRows.getRowGroup(row));\r\n\t}\r\n\r\n\trecalcAll(){\r\n\t\tif(this.topCalcs.length || this.botCalcs.length){\r\n\t\t\tif(this.table.options.columnCalcs !== \"group\"){\r\n\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.groupBy && this.table.options.columnCalcs !== \"table\"){\r\n\r\n\t\t\t\tvar groups = this.table.modules.groupRows.getChildGroups();\r\n\r\n\t\t\t\tgroups.forEach((group) => {\r\n\t\t\t\t\tthis.recalcGroup(group);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trecalcGroup(group){\r\n\t\tvar data, rowData;\r\n\r\n\t\tif(group){\r\n\t\t\tif(group.calcs){\r\n\t\t\t\tif(group.calcs.bottom){\r\n\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\trowData = this.generateRowData(\"bottom\", data);\r\n\r\n\t\t\t\t\tgroup.calcs.bottom.updateData(rowData);\r\n\t\t\t\t\tgroup.calcs.bottom.reinitialize();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(group.calcs.top){\r\n\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\trowData = this.generateRowData(\"top\", data);\r\n\r\n\t\t\t\t\tgroup.calcs.top.updateData(rowData);\r\n\t\t\t\t\tgroup.calcs.top.reinitialize();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//generate top stats row\r\n\tgenerateTopRow(rows){\r\n\t\treturn this.generateRow(\"top\", this.rowsToData(rows));\r\n\t}\r\n\t//generate bottom stats row\r\n\tgenerateBottomRow(rows){\r\n\t\treturn this.generateRow(\"bottom\", this.rowsToData(rows));\r\n\t}\r\n\r\n\trowsToData(rows){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\trows.forEach((row) => {\r\n\t\t\tdata.push(row.getData());\r\n\r\n\t\t\tif(this.table.options.dataTree && this.table.options.dataTreeChildColumnCalcs){\r\n\t\t\t\tif(row.modules.dataTree && row.modules.dataTree.open){\r\n\t\t\t\t\tvar children = this.rowsToData(this.table.modules.dataTree.getFilteredTreeChildren(row));\r\n\t\t\t\t\tdata = data.concat(children);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//generate stats row\r\n\tgenerateRow(pos, data){\r\n\t\tvar rowData = this.generateRowData(pos, data),\r\n\t\trow;\r\n\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.disable();\r\n\t\t}\r\n\r\n\t\trow = new Row(rowData, this, \"calc\");\r\n\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.enable();\r\n\t\t}\r\n\r\n\t\trow.getElement().classList.add(\"tabulator-calcs\", \"tabulator-calcs-\" + pos);\r\n\r\n\t\trow.component = false;\r\n\r\n\t\trow.getComponent = () => {\r\n\t\t\tif(!row.component){\r\n\t\t\t\trow.component = new CalcComponent(row);\r\n\t\t\t}\r\n\r\n\t\t\treturn row.component;\r\n\t\t};\r\n\r\n\t\trow.generateCells = () => {\r\n\r\n\t\t\tvar cells = [];\r\n\r\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\r\n\t\t\t\t\t//set field name of mock column\r\n\t\t\t\t\tthis.genColumn.setField(column.getField());\r\n\t\t\t\t\tthis.genColumn.hozAlign = column.hozAlign;\r\n\r\n\t\t\t\t\tif(column.definition[pos + \"CalcFormatter\"] && this.table.modExists(\"format\")){\r\n\t\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(column.definition[pos + \"CalcFormatter\"]),\r\n\t\t\t\t\t\t\tparams: column.definition[pos + \"CalcFormatterParams\"] || {},\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(\"plaintext\"),\r\n\t\t\t\t\t\t\tparams:{}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//ensure css class defintion is replicated to calculation cell\r\n\t\t\t\t\tthis.genColumn.definition.cssClass = column.definition.cssClass;\r\n\r\n\t\t\t\t\t//generate cell and assign to correct column\r\n\t\t\t\t\tvar cell = new Cell(this.genColumn, row);\r\n\t\t\t\t\tcell.getElement();\r\n\t\t\t\t\tcell.column = column;\r\n\t\t\t\t\tcell.setWidth();\r\n\r\n\t\t\t\t\tcolumn.cells.push(cell);\r\n\t\t\t\t\tcells.push(cell);\r\n\r\n\t\t\t\t\tif(!column.visible){\r\n\t\t\t\t\t\tcell.hide();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\trow.cells = cells;\r\n\t\t};\r\n\r\n\t\treturn row;\r\n\t}\r\n\r\n\t//generate stats row\r\n\tgenerateRowData(pos, data){\r\n\t\tvar rowData = {},\r\n\t\tcalcs = pos == \"top\" ? this.topCalcs : this.botCalcs,\r\n\t\ttype = pos == \"top\" ? \"topCalc\" : \"botCalc\",\r\n\t\tparams, paramKey;\r\n\r\n\t\tcalcs.forEach(function(column){\r\n\t\t\tvar values = [];\r\n\r\n\t\t\tif(column.modules.columnCalcs && column.modules.columnCalcs[type]){\r\n\t\t\t\tdata.forEach(function(item){\r\n\t\t\t\t\tvalues.push(column.getFieldValue(item));\r\n\t\t\t\t});\r\n\r\n\t\t\t\tparamKey = type + \"Params\";\r\n\t\t\t\tparams = typeof column.modules.columnCalcs[paramKey] === \"function\" ? column.modules.columnCalcs[paramKey](values, data) : column.modules.columnCalcs[paramKey];\r\n\r\n\t\t\t\tcolumn.setFieldValue(rowData, column.modules.columnCalcs[type](values, data, params));\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowData;\r\n\t}\r\n\r\n\thasTopCalcs(){\r\n\t\treturn\t!!(this.topCalcs.length);\r\n\t}\r\n\r\n\thasBottomCalcs(){\r\n\t\treturn\t!!(this.botCalcs.length);\r\n\t}\r\n\r\n\t//handle table redraw\r\n\tredraw(){\r\n\t\tif(this.topRow){\r\n\t\t\tthis.topRow.normalizeHeight(true);\r\n\t\t}\r\n\t\tif(this.botRow){\r\n\t\t\tthis.botRow.normalizeHeight(true);\r\n\t\t}\r\n\t}\r\n\r\n\t//return the calculated\r\n\tgetResults(){\r\n\t\tvar results = {},\r\n\t\tgroups;\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tgroups = this.table.modules.groupRows.getGroups(true);\r\n\r\n\t\t\tgroups.forEach((group) => {\r\n\t\t\t\tresults[group.getKey()] = this.getGroupResults(group);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tresults = {\r\n\t\t\t\ttop: this.topRow ? this.topRow.getData() : {},\r\n\t\t\t\tbottom: this.botRow ? this.botRow.getData() : {},\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n\r\n\t//get results from a group\r\n\tgetGroupResults(group){\r\n\t\tvar groupObj = group._getSelf(),\r\n\t\tsubGroups = group.getSubGroups(),\r\n\t\tsubGroupResults = {},\r\n\t\tresults = {};\r\n\r\n\t\tsubGroups.forEach((subgroup) => {\r\n\t\t\tsubGroupResults[subgroup.getKey()] = this.getGroupResults(subgroup);\r\n\t\t});\r\n\r\n\t\tresults = {\r\n\t\t\ttop: groupObj.calcs.top ? groupObj.calcs.top.getData() : {},\r\n\t\t\tbottom: groupObj.calcs.bottom ? groupObj.calcs.bottom.getData() : {},\r\n\t\t\tgroups: subGroupResults,\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n}\r\n\r\nColumnCalcs.moduleName = \"columnCalcs\";\r\n\r\n//load defaults\r\nColumnCalcs.calculations = defaultCalculations;\r\n\r\nexport default ColumnCalcs;","import Module from '../../core/Module.js';\r\n\r\nimport Row from '../../core/row/Row.js';\r\n\r\nclass DataTree extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.indent = 10;\r\n\t\tthis.field = \"\";\r\n\t\tthis.collapseEl = null;\r\n\t\tthis.expandEl = null;\r\n\t\tthis.branchEl = null;\r\n\t\tthis.elementField = false;\r\n\r\n\t\tthis.startOpen = function(){};\r\n\r\n\t\tthis.displayIndex = 0;\r\n\r\n\t\tthis.registerTableOption(\"dataTree\", false); //enable data tree\r\n\t\tthis.registerTableOption(\"dataTreeFilter\", true); //filter child rows\r\n\t\tthis.registerTableOption(\"dataTreeSort\", true); //sort child rows\r\n\t\tthis.registerTableOption(\"dataTreeElementColumn\", false);\r\n\t\tthis.registerTableOption(\"dataTreeBranchElement\", true);//show data tree branch element\r\n\t\tthis.registerTableOption(\"dataTreeChildIndent\", 9); //data tree child indent in px\r\n\t\tthis.registerTableOption(\"dataTreeChildField\", \"_children\");//data tre column field to look for child rows\r\n\t\tthis.registerTableOption(\"dataTreeCollapseElement\", false);//data tree row collapse element\r\n\t\tthis.registerTableOption(\"dataTreeExpandElement\", false);//data tree row expand element\r\n\t\tthis.registerTableOption(\"dataTreeStartExpanded\", false);\r\n\t\tthis.registerTableOption(\"dataTreeChildColumnCalcs\", false);//include visible data tree rows in column calculations\r\n\t\tthis.registerTableOption(\"dataTreeSelectPropagate\", false);//seleccting a parent row selects its children\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"treeCollapse\", this.collapseRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"treeExpand\", this.expandRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"treeToggle\", this.toggleRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"getTreeParent\", this.getTreeParent.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"getTreeChildren\", this.getRowChildren.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"addTreeChild\", this.addTreeChildRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isTreeExpanded\", this.isRowExpanded.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.dataTree){\r\n\t\t\tvar dummyEl = null,\r\n\t\t\toptions = this.table.options;\r\n\r\n\t\t\tthis.field = options.dataTreeChildField;\r\n\t\t\tthis.indent = options.dataTreeChildIndent;\r\n\r\n\t\t\tif(options.dataTreeBranchElement){\r\n\r\n\t\t\t\tif(options.dataTreeBranchElement === true){\r\n\t\t\t\t\tthis.branchEl = document.createElement(\"div\");\r\n\t\t\t\t\tthis.branchEl.classList.add(\"tabulator-data-tree-branch\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(typeof options.dataTreeBranchElement === \"string\"){\r\n\t\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\t\tdummyEl.innerHTML = options.dataTreeBranchElement;\r\n\t\t\t\t\t\tthis.branchEl = dummyEl.firstChild;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.branchEl = options.dataTreeBranchElement;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(options.dataTreeCollapseElement){\r\n\t\t\t\tif(typeof options.dataTreeCollapseElement === \"string\"){\r\n\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\tdummyEl.innerHTML = options.dataTreeCollapseElement;\r\n\t\t\t\t\tthis.collapseEl = dummyEl.firstChild;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.collapseEl = options.dataTreeCollapseElement;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.collapseEl = document.createElement(\"div\");\r\n\t\t\t\tthis.collapseEl.classList.add(\"tabulator-data-tree-control\");\r\n\t\t\t\tthis.collapseEl.tabIndex = 0;\r\n\t\t\t\tthis.collapseEl.innerHTML = \"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif(options.dataTreeExpandElement){\r\n\t\t\t\tif(typeof options.dataTreeExpandElement === \"string\"){\r\n\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\tdummyEl.innerHTML = options.dataTreeExpandElement;\r\n\t\t\t\t\tthis.expandEl = dummyEl.firstChild;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.expandEl = options.dataTreeExpandElement;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.expandEl = document.createElement(\"div\");\r\n\t\t\t\tthis.expandEl.classList.add(\"tabulator-data-tree-control\");\r\n\t\t\t\tthis.expandEl.tabIndex = 0;\r\n\t\t\t\tthis.expandEl.innerHTML = \"
\";\r\n\t\t\t}\r\n\r\n\r\n\t\t\tswitch(typeof options.dataTreeStartExpanded){\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\treturn options.dataTreeStartExpanded;\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tthis.startOpen = options.dataTreeStartExpanded;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\treturn options.dataTreeStartExpanded[index];\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-layout-after\", this.layoutRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowDelete.bind(this),0);\r\n\t\t\tthis.subscribe(\"row-data-changed\", this.rowDataChanged.bind(this), 10);\r\n\t\t\tthis.subscribe(\"cell-value-updated\", this.cellValueChanged.bind(this));\r\n\t\t\tthis.subscribe(\"edit-cancelled\", this.cellValueChanged.bind(this));\r\n\t\t\tthis.subscribe(\"column-moving-rows\", this.columnMoving.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.initializeElementField.bind(this));\r\n\r\n\t\t\tthis.registerDisplayHandler(this.getRows.bind(this), 30);\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeElementField(){\r\n\t\tvar firstCol = this.table.columnManager.getFirstVisibleColumn();\r\n\r\n\t\tthis.elementField = this.table.options.dataTreeElementColumn || (firstCol ? firstCol.field : false);\r\n\t}\r\n\t\r\n\tgetRowChildren(row){\r\n\t\treturn this.getTreeChildren(row, true);\r\n\t}\r\n\r\n\tcolumnMoving(){\r\n\t\tvar rows = [];\r\n\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\trows = rows.concat(this.getTreeChildren(row, false, true));\r\n\t\t});\r\n\r\n\t\treturn rows;\r\n\t}\r\n\r\n\trowDataChanged(row, visible, updatedData){\r\n\t\tif(this.redrawNeeded(updatedData)){\r\n\t\t\tthis.initializeRow(row);\r\n\r\n\t\t\tif(visible){\r\n\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tcellValueChanged(cell){\r\n\t\tvar field = cell.column.getField();\r\n\r\n\t\tif(field === this.elementField){\r\n\t\t\tthis.layoutRow(cell.row);\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar childArray = row.getData()[this.field];\r\n\t\tvar isArray = Array.isArray(childArray);\r\n\r\n\t\tvar children = isArray || (!isArray && typeof childArray === \"object\" && childArray !== null);\r\n\r\n\t\tif(!children && row.modules.dataTree && row.modules.dataTree.branchEl){\r\n\t\t\trow.modules.dataTree.branchEl.parentNode.removeChild(row.modules.dataTree.branchEl);\r\n\t\t}\r\n\r\n\t\tif(!children && row.modules.dataTree && row.modules.dataTree.controlEl){\r\n\t\t\trow.modules.dataTree.controlEl.parentNode.removeChild(row.modules.dataTree.controlEl);\r\n\t\t}\r\n\r\n\t\trow.modules.dataTree = {\r\n\t\t\tindex: row.modules.dataTree ? row.modules.dataTree.index : 0,\r\n\t\t\topen: children ? (row.modules.dataTree ? row.modules.dataTree.open : this.startOpen(row.getComponent(), 0)) : false,\r\n\t\t\tcontrolEl: row.modules.dataTree && children ? row.modules.dataTree.controlEl : false,\r\n\t\t\tbranchEl: row.modules.dataTree && children ? row.modules.dataTree.branchEl : false,\r\n\t\t\tparent: row.modules.dataTree ? row.modules.dataTree.parent : false,\r\n\t\t\tchildren:children,\r\n\t\t};\r\n\t}\r\n\r\n\treinitializeRowChildren(row){\r\n\t\tvar children = this.getTreeChildren(row, false, true);\r\n\r\n\t\tchildren.forEach(function(child){\r\n\t\t\tchild.reinitialize(true);\r\n\t\t});\r\n\t}\r\n\r\n\tlayoutRow(row){\r\n\t\tvar cell = this.elementField ? row.getCell(this.elementField) : row.getCells()[0],\r\n\t\tel = cell.getElement(),\r\n\t\tconfig = row.modules.dataTree;\r\n\r\n\t\tif(config.branchEl){\r\n\t\t\tif(config.branchEl.parentNode){\r\n\t\t\t\tconfig.branchEl.parentNode.removeChild(config.branchEl);\r\n\t\t\t}\r\n\t\t\tconfig.branchEl = false;\r\n\t\t}\r\n\r\n\t\tif(config.controlEl){\r\n\t\t\tif(config.controlEl.parentNode){\r\n\t\t\t\tconfig.controlEl.parentNode.removeChild(config.controlEl);\r\n\t\t\t}\r\n\t\t\tconfig.controlEl = false;\r\n\t\t}\r\n\r\n\t\tthis.generateControlElement(row, el);\r\n\r\n\t\trow.getElement().classList.add(\"tabulator-tree-level-\" + config.index);\r\n\r\n\t\tif(config.index){\r\n\t\t\tif(this.branchEl){\r\n\t\t\t\tconfig.branchEl = this.branchEl.cloneNode(true);\r\n\t\t\t\tel.insertBefore(config.branchEl, el.firstChild);\r\n\r\n\t\t\t\tif(this.table.rtl){\r\n\t\t\t\t\tconfig.branchEl.style.marginRight = (((config.branchEl.offsetWidth + config.branchEl.style.marginLeft) * (config.index - 1)) + (config.index * this.indent)) + \"px\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.branchEl.style.marginLeft = (((config.branchEl.offsetWidth + config.branchEl.style.marginRight) * (config.index - 1)) + (config.index * this.indent)) + \"px\";\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\r\n\t\t\t\tif(this.table.rtl){\r\n\t\t\t\t\tel.style.paddingRight = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-right')) + (config.index * this.indent) + \"px\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.style.paddingLeft = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-left')) + (config.index * this.indent) + \"px\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateControlElement(row, el){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\tel = el || row.getCells()[0].getElement(),\r\n\t\toldControl = config.controlEl;\r\n\r\n\t\tif(config.children !== false){\r\n\r\n\t\t\tif(config.open){\r\n\t\t\t\tconfig.controlEl = this.collapseEl.cloneNode(true);\r\n\t\t\t\tconfig.controlEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tthis.collapseRow(row);\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconfig.controlEl = this.expandEl.cloneNode(true);\r\n\t\t\t\tconfig.controlEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tthis.expandRow(row);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tconfig.controlEl.addEventListener(\"mousedown\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\r\n\t\t\tif(oldControl && oldControl.parentNode === el){\r\n\t\t\t\toldControl.parentNode.replaceChild(config.controlEl,oldControl);\r\n\t\t\t}else{\r\n\t\t\t\tel.insertBefore(config.controlEl, el.firstChild);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tsetDisplayIndex (index) {\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\r\n\tgetDisplayIndex () {\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\r\n\tgetRows(rows){\r\n\t\tvar output = [];\r\n\r\n\t\trows.forEach((row, i) => {\r\n\t\t\tvar config, children;\r\n\r\n\t\t\toutput.push(row);\r\n\r\n\t\t\tif(row instanceof Row){\r\n\r\n\t\t\t\trow.create();\r\n\r\n\t\t\t\tconfig = row.modules.dataTree.children;\r\n\r\n\t\t\t\tif(!config.index && config.children !== false){\r\n\t\t\t\t\tchildren = this.getChildren(row);\r\n\r\n\t\t\t\t\tchildren.forEach((child) => {\r\n\t\t\t\t\t\tchild.create();\r\n\t\t\t\t\t\toutput.push(child);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetChildren(row, allChildren){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\tchildren = [],\r\n\t\toutput = [];\r\n\r\n\t\tif(config.children !== false && (config.open || allChildren)){\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"filter\") && this.table.options.dataTreeFilter){\r\n\t\t\t\tchildren = this.table.modules.filter.filter(config.children);\r\n\t\t\t}else{\r\n\t\t\t\tchildren = config.children;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"sort\") && this.table.options.dataTreeSort){\r\n\t\t\t\tthis.table.modules.sort.sort(children);\r\n\t\t\t}\r\n\r\n\t\t\tchildren.forEach((child) => {\r\n\t\t\t\toutput.push(child);\r\n\r\n\t\t\t\tvar subChildren = this.getChildren(child);\r\n\r\n\t\t\t\tsubChildren.forEach((sub) => {\r\n\t\t\t\t\toutput.push(sub);\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgenerateChildren(row){\r\n\t\tvar children = [];\r\n\r\n\t\tvar childArray = row.getData()[this.field];\r\n\r\n\t\tif(!Array.isArray(childArray)){\r\n\t\t\tchildArray = [childArray];\r\n\t\t}\r\n\r\n\t\tchildArray.forEach((childData) => {\r\n\t\t\tvar childRow = new Row(childData || {}, this.table.rowManager);\r\n\r\n\t\t\tchildRow.create();\r\n\r\n\t\t\tchildRow.modules.dataTree.index = row.modules.dataTree.index + 1;\r\n\t\t\tchildRow.modules.dataTree.parent = row;\r\n\r\n\t\t\tif(childRow.modules.dataTree.children){\r\n\t\t\t\tchildRow.modules.dataTree.open = this.startOpen(childRow.getComponent(), childRow.modules.dataTree.index);\r\n\t\t\t}\r\n\t\t\tchildren.push(childRow);\r\n\t\t});\r\n\r\n\t\treturn children;\r\n\t}\r\n\r\n\texpandRow(row, silent){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tconfig.open = true;\r\n\r\n\t\t\trow.reinitialize();\r\n\r\n\t\t\tthis.refreshData(true);\r\n\r\n\t\t\tthis.dispatchExternal(\"dataTreeRowExpanded\", row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\t}\r\n\r\n\tcollapseRow(row){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tconfig.open = false;\r\n\r\n\t\t\trow.reinitialize();\r\n\r\n\t\t\tthis.refreshData(true);\r\n\r\n\t\t\tthis.dispatchExternal(\"dataTreeRowCollapsed\", row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\t}\r\n\r\n\ttoggleRow(row){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tif(config.open){\r\n\t\t\t\tthis.collapseRow(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.expandRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tisRowExpanded(row){\r\n\t\treturn row.modules.dataTree.open;\r\n\t}\r\n\r\n\tgetTreeParent(row){\r\n\t\treturn row.modules.dataTree.parent ? row.modules.dataTree.parent.getComponent() : false;\r\n\t}\r\n\r\n\tgetFilteredTreeChildren(row){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\toutput = [], children;\r\n\r\n\t\tif(config.children){\r\n\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"filter\") && this.table.options.dataTreeFilter){\r\n\t\t\t\tchildren = this.table.modules.filter.filter(config.children);\r\n\t\t\t}else{\r\n\t\t\t\tchildren = config.children;\r\n\t\t\t}\r\n\r\n\t\t\tchildren.forEach((childRow) => {\r\n\t\t\t\tif(childRow instanceof Row){\r\n\t\t\t\t\toutput.push(childRow);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\trowDelete(row){\r\n\t\tvar parent = row.modules.dataTree.parent,\r\n\t\tchildIndex;\r\n\r\n\t\tif(parent){\r\n\t\t\tchildIndex = this.findChildIndex(row, parent);\r\n\r\n\t\t\tif(childIndex !== false){\r\n\t\t\t\tparent.data[this.field].splice(childIndex, 1);\r\n\t\t\t}\r\n\r\n\t\t\tif(!parent.data[this.field].length){\r\n\t\t\t\tdelete parent.data[this.field];\r\n\t\t\t}\r\n\r\n\t\t\tthis.initializeRow(parent);\r\n\t\t\tthis.layoutRow(parent);\r\n\t\t}\r\n\r\n\t\tthis.refreshData(true);\r\n\t}\r\n\r\n\taddTreeChildRow(row, data, top, index){\r\n\t\tvar childIndex = false;\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(row.data[this.field])){\r\n\t\t\trow.data[this.field] = [];\r\n\r\n\t\t\trow.modules.dataTree.open = this.startOpen(row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\r\n\t\tif(typeof index !== \"undefined\"){\r\n\t\t\tchildIndex = this.findChildIndex(index, row);\r\n\r\n\t\t\tif(childIndex !== false){\r\n\t\t\t\trow.data[this.field].splice((top ? childIndex : childIndex + 1), 0, data);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(childIndex === false){\r\n\t\t\tif(top){\r\n\t\t\t\trow.data[this.field].unshift(data);\r\n\t\t\t}else{\r\n\t\t\t\trow.data[this.field].push(data);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.initializeRow(row);\r\n\t\tthis.layoutRow(row);\r\n\r\n\t\tthis.refreshData(true);\r\n\t}\r\n\r\n\tfindChildIndex(subject, parent){\r\n\t\tvar match = false;\r\n\r\n\t\tif(typeof subject == \"object\"){\r\n\r\n\t\t\tif(subject instanceof Row){\r\n\t\t\t\t//subject is row element\r\n\t\t\t\tmatch = subject.data;\r\n\t\t\t}else if(subject instanceof RowComponent){\r\n\t\t\t\t//subject is public row component\r\n\t\t\t\tmatch = subject._getSelf().data;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\tif(parent.modules.dataTree){\r\n\t\t\t\t\tmatch = parent.modules.dataTree.children.find((childRow) => {\r\n\t\t\t\t\t\treturn childRow instanceof Row ? childRow.element === subject : false;\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(match){\r\n\t\t\t\t\t\tmatch = match.data;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}else if(typeof subject == \"undefined\" || subject === null){\r\n\t\t\tmatch = false\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the index of the row\r\n\t\t\tmatch = parent.data[this.field].find((row) => {\r\n\t\t\t\treturn row.data[this.table.options.index] == subject;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(match){\r\n\r\n\t\t\tif(Array.isArray(parent.data[this.field])){\r\n\t\t\t\tmatch = parent.data[this.field].indexOf(match);\r\n\t\t\t}\r\n\r\n\t\t\tif(match == -1){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//catch all for any other type of input\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tgetTreeChildren(row, component, recurse){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\toutput = [];\r\n\r\n\t\tif(config.children){\r\n\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tconfig.children.forEach((childRow) => {\r\n\t\t\t\tif(childRow instanceof Row){\r\n\t\t\t\t\toutput.push(component ? childRow.getComponent() : childRow);\r\n\r\n\t\t\t\t\tif(recurse){\r\n\t\t\t\t\t\toutput = output.concat(this.getTreeChildren(childRow, component, recurse));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetChildField(){\r\n\t\treturn this.field;\r\n\t}\r\n\r\n\tredrawNeeded(data){\r\n\t\treturn (this.field ? typeof data[this.field] !== \"undefined\" : false) || (this.elementField ? typeof data[this.elementField] !== \"undefined\" : false);\r\n\t}\r\n}\r\n\r\nDataTree.moduleName = \"dataTree\";\r\n\r\nexport default DataTree;","import csv from './downloaders/csv.js';\r\nimport json from './downloaders/json.js';\r\nimport pdf from './downloaders/pdf.js';\r\nimport xlsx from './downloaders/xlsx.js';\r\nimport html from './downloaders/html.js';\r\nimport jsonLines from './downloaders/jsonLines.js';\r\n\r\nexport default {\r\n\tcsv:csv,\r\n\tjson:json,\r\n\tjsonLines:jsonLines,\r\n\tpdf:pdf,\r\n\txlsx:xlsx,\r\n\thtml:html,\r\n};","export default function(list, options, setFileContents){\r\n\tvar delimiter = options && options.delimiter ? options.delimiter : \",\",\r\n\tfileContents = [],\r\n\theaders = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tvar item = [];\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"group\":\r\n\t\t\tconsole.warn(\"Download Warning - CSV downloader cannot process row groups\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tconsole.warn(\"Download Warning - CSV downloader cannot process column calculations\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"header\":\r\n\t\t\trow.columns.forEach((col, i) => {\r\n\t\t\t\tif(col && col.depth === 1){\r\n\t\t\t\t\theaders[i] = typeof col.value == \"undefined\" || col.value === null ? \"\" : ('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\trow.columns.forEach((col) => {\r\n\r\n\t\t\t\tif(col){\r\n\r\n\t\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tcol.value = JSON.stringify(col.value);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\t\tcol.value = \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\titem.push('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tfileContents.push(item.join(delimiter));\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(headers.length){\r\n\t\tfileContents.unshift(headers.join(delimiter));\r\n\t}\r\n\r\n\tfileContents = fileContents.join(\"\\n\");\r\n\r\n\tif(options.bom){\r\n\t\tfileContents = \"\\ufeff\" + fileContents;\r\n\t}\r\n\r\n\tsetFileContents(fileContents, \"text/csv\");\r\n};","export default function(list, options, setFileContents){\r\n\tvar fileContents = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tvar item = {};\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"header\":\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process row groups\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process column calculations\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\tif(col){\r\n\t\t\t\t\titem[col.component.getTitleDownload() || col.component.getField()] = col.value;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tfileContents.push(item);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tfileContents = JSON.stringify(fileContents, null, '\\t');\r\n\r\n\tsetFileContents(fileContents, \"application/json\");\r\n};","export default function (list, options, setFileContents) {\r\n\tconst fileContents = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tconst item = {};\r\n\r\n\t\tswitch (row.type) {\r\n\t\t\tcase \"header\":\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process row groups\");\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process column calculations\");\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\t\tif (col) {\r\n\t\t\t\t\t\titem[col.component.getTitleDownload() || col.component.getField()] = col.value;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tfileContents.push(JSON.stringify(item));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tsetFileContents(fileContents.join(\"\\n\"), \"application/x-ndjson\");\r\n};","export default function(list, options, setFileContents){\r\n\tvar header = [],\r\n\tbody = [],\r\n\tautoTableParams = {},\r\n\trowGroupStyles = options.rowGroupStyles || {\r\n\t\tfontStyle: \"bold\",\r\n\t\tfontSize: 12,\r\n\t\tcellPadding: 6,\r\n\t\tfillColor: 220,\r\n\t},\r\n\trowCalcStyles = options.rowCalcStyles || {\r\n\t\tfontStyle: \"bold\",\r\n\t\tfontSize: 10,\r\n\t\tcellPadding: 4,\r\n\t\tfillColor: 232,\r\n\t},\r\n\tjsPDFParams = options.jsPDF || {},\r\n\ttitle = options && options.title ? options.title : \"\";\r\n\r\n\tif(!jsPDFParams.orientation){\r\n\t\tjsPDFParams.orientation = options.orientation || \"landscape\";\r\n\t}\r\n\r\n\tif(!jsPDFParams.unit){\r\n\t\tjsPDFParams.unit = \"pt\";\r\n\t}\r\n\r\n\t//parse row list\r\n\tlist.forEach((row) => {\r\n\t\tvar item = {};\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"header\":\r\n\t\t\theader.push(parseRow(row));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tbody.push(parseRow(row, rowGroupStyles));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tbody.push(parseRow(row, rowCalcStyles));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\tbody.push(parseRow(row));\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tfunction parseRow(row, styles){\r\n\t\tvar rowData = [];\r\n\r\n\t\trow.columns.forEach((col) =>{\r\n\t\t\tvar cell;\r\n\r\n\t\t\tif(col){\r\n\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tcol.value = JSON.stringify(col.value);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\tcol.value = \"\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcell = {\r\n\t\t\t\t\tcontent:col.value,\r\n\t\t\t\t\tcolSpan:col.width,\r\n\t\t\t\t\trowSpan:col.height,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tif(styles){\r\n\t\t\t\t\tcell.styles = styles;\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowData.push(cell);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowData;\r\n\t}\r\n\r\n\r\n\t//configure PDF\r\n\tvar doc = new jspdf.jsPDF(jsPDFParams); //set document to landscape, better for most tables\r\n\r\n\tif(options && options.autoTable){\r\n\t\tif(typeof options.autoTable === \"function\"){\r\n\t\t\tautoTableParams = options.autoTable(doc) || {};\r\n\t\t}else{\r\n\t\t\tautoTableParams = options.autoTable;\r\n\t\t}\r\n\t}\r\n\r\n\tif(title){\r\n\t\tautoTableParams.didDrawPage = function(data) {\r\n\t\t\tdoc.text(title, 40, 30);\r\n\t\t};\r\n\t}\r\n\r\n\tautoTableParams.head = header;\r\n\tautoTableParams.body = body;\r\n\r\n\tdoc.autoTable(autoTableParams);\r\n\r\n\tif(options && options.documentProcessing){\r\n\t\toptions.documentProcessing(doc);\r\n\t}\r\n\r\n\tsetFileContents(doc.output(\"arraybuffer\"), \"application/pdf\");\r\n};","import CoreFeature from '../../../../core/CoreFeature.js';\r\n\r\nexport default function(list, options, setFileContents){\r\n\tvar self = this,\r\n\tsheetName = options.sheetName || \"Sheet1\",\r\n\tworkbook = XLSX.utils.book_new(),\r\n\ttableFeatures = new CoreFeature(this),\r\n\toutput;\r\n\r\n\tworkbook.SheetNames = [];\r\n\tworkbook.Sheets = {};\r\n\r\n\tfunction generateSheet(){\r\n\t\tvar rows = [],\r\n\t\tmerges = [],\r\n\t\tworksheet = {},\r\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 }};\r\n\r\n\t\t//parse row list\r\n\t\tlist.forEach((row, i) => {\r\n\t\t\tvar rowData = [];\r\n\r\n\t\t\trow.columns.forEach(function(col, j){\r\n\r\n\t\t\t\tif(col){\r\n\t\t\t\t\trowData.push(!(col.value instanceof Date) && typeof col.value === \"object\" ? JSON.stringify(col.value) : col.value);\r\n\r\n\t\t\t\t\tif(col.width > 1 || col.height > -1){\r\n\t\t\t\t\t\tif(col.height > 1 || col.width > 1){\r\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}});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\trowData.push(\"\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\trows.push(rowData);\r\n\t\t});\r\n\r\n\t\t//convert rows to worksheet\r\n\t\tXLSX.utils.sheet_add_aoa(worksheet, rows);\r\n\r\n\t\tworksheet['!ref'] = XLSX.utils.encode_range(range);\r\n\r\n\t\tif(merges.length){\r\n\t\t\tworksheet[\"!merges\"] = merges;\r\n\t\t}\r\n\r\n\t\treturn worksheet;\r\n\t}\r\n\r\n\tif(options.sheetOnly){\r\n\t\tsetFileContents(generateSheet());\r\n\t\treturn;\r\n\t}\r\n\r\n\tif(options.sheets){\r\n\t\tfor(var sheet in options.sheets){\r\n\r\n\t\t\tif(options.sheets[sheet] === true){\r\n\t\t\t\tworkbook.SheetNames.push(sheet);\r\n\t\t\t\tworkbook.Sheets[sheet] = generateSheet();\r\n\t\t\t}else{\r\n\r\n\t\t\t\tworkbook.SheetNames.push(sheet);\r\n\r\n\t\t\t\ttableFeatures.commsSend(options.sheets[sheet], \"download\", \"intercept\",{\r\n\t\t\t\t\ttype:\"xlsx\",\r\n\t\t\t\t\toptions:{sheetOnly:true},\r\n\t\t\t\t\tactive:self.active,\r\n\t\t\t\t\tintercept:function(data){\r\n\t\t\t\t\t\tworkbook.Sheets[sheet] = data;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tworkbook.SheetNames.push(sheetName);\r\n\t\tworkbook.Sheets[sheetName] = generateSheet();\r\n\t}\r\n\r\n\tif(options.documentProcessing){\r\n\t\tworkbook = options.documentProcessing(workbook);\r\n\t}\r\n\r\n\t//convert workbook to binary array\r\n\tfunction s2ab(s) {\r\n\t\tvar buf = new ArrayBuffer(s.length);\r\n\t\tvar view = new Uint8Array(buf);\r\n\t\tfor (var i=0; i!=s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;\r\n\t\t\treturn buf;\r\n\t}\r\n\r\n\toutput = XLSX.write(workbook, {bookType:'xlsx', bookSST:true, type: 'binary'});\r\n\r\n\tsetFileContents(s2ab(output), \"application/octet-stream\");\r\n};","export default function(list, options, setFileContents){\r\n\tif(this.modExists(\"export\", true)){\r\n\t\tsetFileContents(this.modules.export.genereateHTMLTable(list), \"text/html\");\r\n\t}\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultDownloaders from './defaults/downloaders.js';\r\n\r\nclass Download extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.registerTableOption(\"downloadReady\", function(data, blob){return blob;}); //function to manipulate download data\r\n\t\tthis.registerTableOption(\"downloadConfig\", {}); //download config\r\n\t\tthis.registerTableOption(\"downloadRowRange\", \"active\"); //restrict download to active rows only\r\n\r\n\t\tthis.registerColumnOption(\"download\");\r\n\t\tthis.registerColumnOption(\"titleDownload\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"download\", this.download.bind(this));\r\n\t\tthis.registerTableFunction(\"downloadToTab\", this.downloadToTab.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tdownloadToTab(type, filename, options, active){\r\n\t\tthis.download(type, filename, options, active, true);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\t//trigger file download\r\n\tdownload(type, filename, options, range, interceptCallback){\r\n\t\tvar downloadFunc = false;\r\n\r\n\t\tfunction buildLink(data, mime){\r\n\t\t\tif(interceptCallback){\r\n\t\t\t\tif(interceptCallback === true){\r\n\t\t\t\t\tthis.triggerDownload(data, mime, type, filename, true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tinterceptCallback(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tthis.triggerDownload(data, mime, type, filename);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(typeof type == \"function\"){\r\n\t\t\tdownloadFunc = type;\r\n\t\t}else{\r\n\t\t\tif(Download.downloaders[type]){\r\n\t\t\t\tdownloadFunc = Download.downloaders[type];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Download Error - No such download type found: \", type);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(downloadFunc){\r\n\t\t\tvar list = this.generateExportList(range);\r\n\r\n\t\t\tdownloadFunc.call(this.table, list , options || {}, buildLink.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateExportList(range){\r\n\t\tvar list = this.table.modules.export.generateExportList(this.table.options.downloadConfig, false, range || this.table.options.downloadRowRange, \"download\");\r\n\r\n\t\t//assign group header formatter\r\n\t\tvar groupHeader = this.table.options.groupHeaderDownload;\r\n\r\n\t\tif(groupHeader && !Array.isArray(groupHeader)){\r\n\t\t\tgroupHeader = [groupHeader];\r\n\t\t}\r\n\r\n\t\tlist.forEach((row) => {\r\n\t\t\tvar group;\r\n\r\n\t\t\tif(row.type === \"group\"){\r\n\t\t\t\tgroup = row.columns[0];\r\n\r\n\t\t\t\tif(groupHeader && groupHeader[row.indent]){\r\n\t\t\t\t\tgroup.value = groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn list;\r\n\t}\r\n\r\n\ttriggerDownload(data, mime, type, filename, newTab){\r\n\t\tvar element = document.createElement('a'),\r\n\t\tblob = new Blob([data],{type:mime}),\r\n\t\tfilename = filename || \"Tabulator.\" + (typeof type === \"function\" ? \"txt\" : type);\r\n\r\n\t\tblob = this.table.options.downloadReady(data, blob);\r\n\r\n\t\tif(blob){\r\n\r\n\t\t\tif(newTab){\r\n\t\t\t\twindow.open(window.URL.createObjectURL(blob));\r\n\t\t\t}else{\r\n\t\t\t\tif(navigator.msSaveOrOpenBlob){\r\n\t\t\t\t\tnavigator.msSaveOrOpenBlob(blob, filename);\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.setAttribute('href', window.URL.createObjectURL(blob));\r\n\r\n\t\t\t\t\t//set file title\r\n\t\t\t\t\telement.setAttribute('download', filename);\r\n\r\n\t\t\t\t\t//trigger download\r\n\t\t\t\t\telement.style.display = 'none';\r\n\t\t\t\t\tdocument.body.appendChild(element);\r\n\t\t\t\t\telement.click();\r\n\r\n\t\t\t\t\t//remove temporary link element\r\n\t\t\t\t\tdocument.body.removeChild(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"downloadComplete\");\r\n\t\t}\r\n\t}\r\n\r\n\tcommsReceived(table, action, data){\r\n\t\tswitch(action){\r\n\t\t\tcase \"intercept\":\r\n\t\t\tthis.download(data.type, \"\", data.options, data.active, data.intercept);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nDownload.moduleName = \"download\";\r\n\r\n//load defaults\r\nDownload.downloaders = defaultDownloaders;\r\n\r\nexport default Download;","export default function maskInput(el, options){\r\n\tvar mask = options.mask,\r\n\tmaskLetter = typeof options.maskLetterChar !== \"undefined\" ? options.maskLetterChar : \"A\",\r\n\tmaskNumber = typeof options.maskNumberChar !== \"undefined\" ? options.maskNumberChar : \"9\",\r\n\tmaskWildcard = typeof options.maskWildcardChar !== \"undefined\" ? options.maskWildcardChar : \"*\",\r\n\tsuccess = false;\r\n\r\n\tfunction fillSymbols(index){\r\n\t\tvar symbol = mask[index];\r\n\t\tif(typeof symbol !== \"undefined\" && symbol !== maskWildcard && symbol !== maskLetter && symbol !== maskNumber){\r\n\t\t\tel.value = el.value + \"\" + symbol;\r\n\t\t\tfillSymbols(index+1);\r\n\t\t}\r\n\t}\r\n\r\n\tel.addEventListener(\"keydown\", (e) => {\r\n\t\tvar index = el.value.length,\r\n\t\tchar = e.key;\r\n\r\n\t\tif(e.keyCode > 46){\r\n\t\t\tif(index >= mask.length){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tsuccess = false;\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\tswitch(mask[index]){\r\n\t\t\t\t\tcase maskLetter:\r\n\t\t\t\t\tif(char.toUpperCase() == char.toLowerCase()){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase maskNumber:\r\n\t\t\t\t\tif(isNaN(char)){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase maskWildcard:\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(char !== mask[index]){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\r\n\t\treturn;\r\n\t});\r\n\r\n\tel.addEventListener(\"keyup\", (e) => {\r\n\t\tif(e.keyCode > 46){\r\n\t\t\tif(options.maskAutoFill){\r\n\t\t\t\tfillSymbols(el.value.length);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\r\n\tif(!el.placeholder){\r\n\t\tel.placeholder = mask;\r\n\t}\r\n\r\n\tif(options.maskAutoFill){\r\n\t\tfillSymbols(el.value.length);\r\n\t}\r\n}","import input from './editors/input.js';\r\nimport textarea from './editors/textarea.js';\r\nimport number from './editors/number.js';\r\nimport range from './editors/range.js';\r\nimport select from './editors/select.js';\r\nimport autocomplete from './editors/autocomplete.js';\r\nimport star from './editors/star.js';\r\nimport progress from './editors/progress.js';\r\nimport tickCross from './editors/tickCross.js';\r\n\r\nexport default {\r\n\tinput:input,\r\n\ttextarea:textarea,\r\n number:number,\r\n range:range,\r\n\tselect:select,\r\n\tautocomplete:autocomplete,\r\n\tstar:star,\r\n\tprogress:progress,\r\n\ttickCross:tickCross,\r\n};","import maskInput from '../../inputMask.js';\r\n\r\n//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", editorParams.search ? \"search\" : \"text\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t});\r\n\r\n\tfunction onChange(e){\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\r\n\t\t\tif(success(input.value)){\r\n\t\t\t\tcellValue = input.value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\t// case 9:\r\n\t\t\tcase 13:\r\n\t\t\tonChange(e);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\te.stopPropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\treturn input;\r\n};","import maskInput from '../../inputMask.js';\r\n\r\n//resizable text area element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n var self = this,\r\n cellValue = cell.getValue(),\r\n vertNav = editorParams.verticalNavigation || \"hybrid\",\r\n value = String(cellValue !== null && typeof cellValue !== \"undefined\" ? cellValue : \"\"),\r\n count = (value.match(/(?:\\r\\n|\\r|\\n)/g) || []).length + 1,\r\n input = document.createElement(\"textarea\"),\r\n scrollHeight = 0;\r\n\r\n //create and style input\r\n input.style.display = \"block\";\r\n input.style.padding = \"2px\";\r\n input.style.height = \"100%\";\r\n input.style.width = \"100%\";\r\n input.style.boxSizing = \"border-box\";\r\n input.style.whiteSpace = \"pre-wrap\";\r\n input.style.resize = \"none\";\r\n\r\n if(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n for (let key in editorParams.elementAttributes){\r\n if(key.charAt(0) == \"+\"){\r\n key = key.slice(1);\r\n input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n }else{\r\n input.setAttribute(key, editorParams.elementAttributes[key]);\r\n }\r\n }\r\n }\r\n\r\n input.value = value;\r\n\r\n onRendered(function(){\r\n input.focus({preventScroll: true});\r\n input.style.height = \"100%\";\r\n\r\n input.scrollHeight;\r\n input.style.height = input.scrollHeight + \"px\";\r\n cell.getRow().normalizeHeight();\r\n });\r\n\r\n function onChange(e){\r\n\r\n if(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\r\n\r\n if(success(input.value)){\r\n cellValue = input.value; //persist value if successfully validated incase editor is used as header filter\r\n }\r\n\r\n setTimeout(function(){\r\n cell.getRow().normalizeHeight();\r\n },300)\r\n }else{\r\n cancel();\r\n }\r\n }\r\n\r\n //submit new value on blur or change\r\n input.addEventListener(\"change\", onChange);\r\n input.addEventListener(\"blur\", onChange);\r\n\r\n input.addEventListener(\"keyup\", function(){\r\n\r\n input.style.height = \"\";\r\n\r\n var heightNow = input.scrollHeight;\r\n\r\n input.style.height = heightNow + \"px\";\r\n\r\n if(heightNow != scrollHeight){\r\n scrollHeight = heightNow;\r\n cell.getRow().normalizeHeight();\r\n }\r\n });\r\n\r\n input.addEventListener(\"keydown\", function(e){\r\n\r\n switch(e.keyCode){\r\n case 27:\r\n cancel();\r\n break;\r\n\r\n case 38: //up arrow\r\n if(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart)){\r\n e.stopImmediatePropagation();\r\n e.stopPropagation();\r\n }\r\n\r\n break;\r\n\r\n case 40: //down arrow\r\n if(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart !== input.value.length)){\r\n e.stopImmediatePropagation();\r\n e.stopPropagation();\r\n }\r\n break;\r\n\r\n case 35:\r\n case 36:\r\n e.stopPropagation();\r\n break;\r\n }\r\n });\r\n\r\n if(editorParams.mask){\r\n maskInput(input, editorParams);\r\n }\r\n\r\n return input;\r\n};","import maskInput from '../../inputMask.js';\r\n\r\n//input element with type of number\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar cellValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", \"number\");\r\n\r\n\tif(typeof editorParams.max != \"undefined\"){\r\n\t\tinput.setAttribute(\"max\", editorParams.max);\r\n\t}\r\n\r\n\tif(typeof editorParams.min != \"undefined\"){\r\n\t\tinput.setAttribute(\"min\", editorParams.min);\r\n\t}\r\n\r\n\tif(typeof editorParams.step != \"undefined\"){\r\n\t\tinput.setAttribute(\"step\", editorParams.step);\r\n\t}\r\n\r\n\t//create and style input\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\r\n\tvar blurFunc = function(e){\r\n\t\tonChange();\r\n\t};\r\n\r\n\tonRendered(function () {\r\n\t\t//submit new value on blur\r\n\t\tinput.removeEventListener(\"blur\", blurFunc);\r\n\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\r\n\t\t//submit new value on blur\r\n\t\tinput.addEventListener(\"blur\", blurFunc);\r\n\t});\r\n\r\n\tfunction onChange(){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(!isNaN(value) && value !==\"\"){\r\n\t\t\tvalue = Number(value);\r\n\t\t}\r\n\r\n\t\tif(value !== cellValue){\r\n\t\t\tif(success(value)){\r\n\t\t\t\tcellValue = value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 13:\r\n\t\t\t// case 9:\r\n\t\t\tonChange();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tcase 40: //down arrow\r\n\t\t\tif(vertNav == \"editor\"){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\te.stopPropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\treturn input;\r\n};","//input element with type of number\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", \"range\");\r\n\r\n\tif (typeof editorParams.max != \"undefined\") {\r\n\t\tinput.setAttribute(\"max\", editorParams.max);\r\n\t}\r\n\r\n\tif (typeof editorParams.min != \"undefined\") {\r\n\t\tinput.setAttribute(\"min\", editorParams.min);\r\n\t}\r\n\r\n\tif (typeof editorParams.step != \"undefined\") {\r\n\t\tinput.setAttribute(\"step\", editorParams.step);\r\n\t}\r\n\r\n\t//create and style input\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\r\n\tonRendered(function () {\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t});\r\n\r\n\tfunction onChange(){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(!isNaN(value) && value !==\"\"){\r\n\t\t\tvalue = Number(value);\r\n\t\t}\r\n\r\n\t\tif(value != cellValue){\r\n\t\t\tif(success(value)){\r\n\t\t\t\tcellValue = value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tonChange();\r\n\t});\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 13:\r\n\t\t\t// case 9:\r\n\t\t\tonChange();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\treturn input;\r\n};","import Helpers from '../../../../core/tools/Helpers.js';\r\n\r\n//dropdown select editor\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\tcellEl = cell.getElement(),\r\n\tinitialValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinitialDisplayValue = typeof initialValue !== \"undefined\" || initialValue === null ? (Array.isArray(initialValue) ? initialValue : [initialValue]) : (typeof editorParams.defaultValue !== \"undefined\" ? editorParams.defaultValue : []),\r\n\tinput = document.createElement(\"input\"),\r\n\tlistEl = document.createElement(\"div\"),\r\n\tmultiselect = editorParams.multiselect,\r\n\tdataItems = [],\r\n\tcurrentItem = {},\r\n\tdisplayItems = [],\r\n\tcurrentItems = [],\r\n\tblurable = true,\r\n\tblockListShow = false,\r\n\tsearchWord = \"\",\r\n\tsearchWordTimeout = null;\r\n\r\n\tif(Array.isArray(editorParams) || (!Array.isArray(editorParams) && typeof editorParams === \"object\" && !editorParams.values)){\r\n\t\tconsole.warn(\"DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object\");\r\n\t\teditorParams = {values:editorParams};\r\n\t}\r\n\r\n\tfunction getUniqueColumnValues(field){\r\n\t\tvar output = {},\r\n\t\tdata = self.table.getData(),\r\n\t\tcolumn;\r\n\r\n\t\tif(field){\r\n\t\t\tcolumn = self.table.columnManager.getColumnByField(field);\r\n\t\t}else{\r\n\t\t\tcolumn = cell.getColumn()._getSelf();\r\n\t\t}\r\n\r\n\t\tif(column){\r\n\t\t\tdata.forEach(function(row){\r\n\t\t\t\tvar val = column.getFieldValue(row);\r\n\r\n\t\t\t\tif(val !== null && typeof val !== \"undefined\" && val !== \"\"){\r\n\t\t\t\t\toutput[val] = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"unable to find matching column to create select lookup list:\", field);\r\n\t\t}\r\n\r\n\t\treturn Object.keys(output);\r\n\t}\r\n\r\n\tfunction parseItems(inputValues, curentValues){\r\n\t\tvar dataList = [];\r\n\t\tvar displayList = [];\r\n\r\n\t\tfunction processComplexListItem(item){\r\n\t\t\tvar item = {\r\n\t\t\t\tlabel:item.label,\r\n\t\t\t\tvalue:item.value,\r\n\t\t\t\titemParams:item.itemParams,\r\n\t\t\t\telementAttributes: item.elementAttributes,\r\n\t\t\t\telement:false,\r\n\t\t\t};\r\n\r\n\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t// }\r\n\r\n\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\tsetItem(item);\r\n\t\t\t}\r\n\r\n\t\t\tdataList.push(item);\r\n\t\t\tdisplayList.push(item);\r\n\r\n\t\t\treturn item;\r\n\t\t}\r\n\r\n\t\tif(typeof inputValues == \"function\"){\r\n\t\t\tinputValues = inputValues(cell);\r\n\t\t}\r\n\r\n\t\tif(Array.isArray(inputValues)){\r\n\t\t\tinputValues.forEach(function(value){\r\n\t\t\t\tvar item;\r\n\r\n\t\t\t\tif(typeof value === \"object\"){\r\n\r\n\t\t\t\t\tif(value.options){\r\n\t\t\t\t\t\titem = {\r\n\t\t\t\t\t\t\tlabel:value.label,\r\n\t\t\t\t\t\t\tgroup:true,\r\n\t\t\t\t\t\t\titemParams:value.itemParams,\r\n\t\t\t\t\t\t\telementAttributes:value.elementAttributes,\r\n\t\t\t\t\t\t\telement:false,\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\tdisplayList.push(item);\r\n\r\n\t\t\t\t\t\tvalue.options.forEach(function(item){\r\n\t\t\t\t\t\t\tprocessComplexListItem(item);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tprocessComplexListItem(value);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\titem = {\r\n\t\t\t\t\t\tlabel:value,\r\n\t\t\t\t\t\tvalue:value,\r\n\t\t\t\t\t\telement:false,\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t\t\t// }\r\n\r\n\t\t\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\t\t\tsetItem(item);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdataList.push(item);\r\n\t\t\t\t\tdisplayList.push(item);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tfor(var key in inputValues){\r\n\t\t\t\tvar item = {\r\n\t\t\t\t\tlabel:inputValues[key],\r\n\t\t\t\t\tvalue:key,\r\n\t\t\t\t\telement:false,\r\n\t\t\t\t};\r\n\r\n\t\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t\t// }\r\n\r\n\t\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\t\tsetItem(item);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdataList.push(item);\r\n\t\t\t\tdisplayList.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(editorParams.sortValuesList){\r\n\t\t\tdataList.sort((a, b) => {\r\n\t\t\t\treturn a.label < b.label ? -1 : (a.label > b.label ? 1 : 0);\r\n\t\t\t});\r\n\r\n\t\t\tdisplayList.sort((a, b) => {\r\n\t\t\t\treturn a.label < b.label ? -1 : (a.label > b.label ? 1 : 0);\r\n\t\t\t});\r\n\r\n\t\t\tif(editorParams.sortValuesList !== \"asc\"){\r\n\t\t\t\tdataList.reverse();\r\n\t\t\t\tdisplayList.reverse();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataItems = dataList;\r\n\t\tdisplayItems = displayList;\r\n\r\n\t\tfillList();\r\n\t}\r\n\r\n\tfunction fillList(){\r\n\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\r\n\t\tdisplayItems.forEach(function(item){\r\n\r\n\t\t\tvar el = item.element;\r\n\r\n\t\t\tif(!el){\r\n\t\t\t\tel = document.createElement(\"div\");\r\n\t\t\t\titem.label = editorParams.listItemFormatter ? editorParams.listItemFormatter(item.value, item.label, cell, el, item.itemParams) : item.label;\r\n\t\t\t\tif(item.group){\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-select-list-group\");\r\n\t\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\t\tel.innerHTML = item.label === \"\" ? \" \" : item.label;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-select-list-item\");\r\n\t\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\t\tel.innerHTML = item.label === \"\" ? \" \" : item.label;\r\n\r\n\t\t\t\t\tel.addEventListener(\"click\", function(){\r\n\t\t\t\t\t\tblockListShow = true;\r\n\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tblockListShow = false;\r\n\t\t\t\t\t\t}, 10);\r\n\r\n\t\t\t\t\t\t// setCurrentItem(item);\r\n\t\t\t\t\t\t// chooseItem();\r\n\t\t\t\t\t\tif(multiselect){\r\n\t\t\t\t\t\t\ttoggleItem(item);\r\n\t\t\t\t\t\t\tinput.focus();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tchooseItem(item);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t// if(item === currentItem){\r\n\t\t\t\t\t// \tel.classList.add(\"active\");\r\n\t\t\t\t\t// }\r\n\r\n\t\t\t\t\tif(currentItems.indexOf(item) > -1){\r\n\t\t\t\t\t\tel.classList.add(\"active\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(item.elementAttributes && typeof item.elementAttributes == \"object\"){\r\n\t\t\t\t\tfor (let key in item.elementAttributes){\r\n\t\t\t\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\t\t\t\tkey = key.slice(1);\r\n\t\t\t\t\t\t\tel.setAttribute(key, input.getAttribute(key) + item.elementAttributes[\"+\" + key]);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tel.setAttribute(key, item.elementAttributes[key]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tel.addEventListener(\"mousedown\", function(){\r\n\t\t\t\t\tblurable = false;\r\n\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tblurable = true;\r\n\t\t\t\t\t}, 10);\r\n\t\t\t\t});\r\n\r\n\t\t\t\titem.element = el;\r\n\r\n\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(el);\r\n\t\t});\r\n\t}\r\n\r\n\r\n\tfunction setCurrentItem(item, active){\r\n\r\n\t\tif(!multiselect && currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"active\");\r\n\t\t}\r\n\r\n\t\tif(currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"focused\");\r\n\t\t}\r\n\r\n\t\tcurrentItem = item;\r\n\r\n\t\tif(item.element){\r\n\t\t\titem.element.classList.add(\"focused\");\r\n\t\t\tif(active){\r\n\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(item && item.element && item.element.scrollIntoView){\r\n\t\t\titem.element.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'start'});\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t// function chooseItem(){\r\n\t// \thideList();\r\n\r\n\t// \tif(initialValue !== currentItem.value){\r\n\t// \t\tinitialValue = currentItem.value;\r\n\t// \t\tsuccess(currentItem.value);\r\n\t// \t}else{\r\n\t// \t\tcancel();\r\n\t// \t}\r\n\t// }\r\n\r\n\tfunction setItem(item) {\r\n\t\tvar index = currentItems.indexOf(item);\r\n\r\n\t\tif(index == -1){\r\n\t\t\tcurrentItems.push(item);\r\n\t\t\tsetCurrentItem(item, true);\r\n\t\t}\r\n\r\n\t\tfillInput();\r\n\t}\r\n\r\n\tfunction unsetItem(index) {\r\n\t\tvar item = currentItems[index];\r\n\r\n\t\tif(index > -1){\r\n\t\t\tcurrentItems.splice(index, 1);\r\n\t\t\tif(item.element){\r\n\t\t\t\titem.element.classList.remove(\"active\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction toggleItem(item) {\r\n\t\tif(!item){\r\n\t\t\titem = currentItem;\r\n\t\t}\r\n\r\n\t\tvar index = currentItems.indexOf(item);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tunsetItem(index);\r\n\t\t}else{\r\n\t\t\tif(multiselect !== true && currentItems.length >= multiselect){\r\n\t\t\t\tunsetItem(0);\r\n\t\t\t}\r\n\r\n\t\t\tsetItem(item);\r\n\t\t}\r\n\r\n\t\tfillInput();\r\n\r\n\t}\r\n\r\n\tfunction chooseItem(item){\r\n\t\thideList();\r\n\r\n\t\tif(!item){\r\n\t\t\titem = currentItem;\r\n\t\t}\r\n\r\n\t\tif(item){\r\n\t\t\tinput.value = item.label;\r\n\t\t\tsuccess(item.value);\r\n\t\t}\r\n\r\n\t\tinitialDisplayValue = [item.value];\r\n\t}\r\n\r\n\r\n\tfunction chooseItems(silent){\r\n\t\tif(!silent){\r\n\t\t\thideList();\r\n\t\t}\r\n\r\n\t\tvar output = [];\r\n\r\n\t\tcurrentItems.forEach((item) => {\r\n\t\t\toutput.push(item.value);\r\n\t\t});\r\n\r\n\t\tinitialDisplayValue = output;\r\n\r\n\t\tsuccess(output);\r\n\t}\r\n\r\n\tfunction fillInput(){\r\n\t\tvar output = [];\r\n\r\n\t\tcurrentItems.forEach((item) => {\r\n\t\t\toutput.push(item.label);\r\n\t\t});\r\n\r\n\t\tinput.value = output.join(\", \");\r\n\r\n\t\tif(self.currentCell === false){\r\n\t\t\tchooseItems(true);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tfunction unsetItems() {\r\n\r\n\t\tvar len = currentItems.length;\r\n\r\n\t\tfor(let i = 0; i < len; i++){\r\n\t\t\tunsetItem(0);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction cancelItem(){\r\n\t\thideList();\r\n\t\tcancel();\r\n\t}\r\n\r\n\tfunction showList(){\r\n\t\tcurrentItems = [];\r\n\r\n\t\tif(!listEl.parentNode){\r\n\t\t\tif(editorParams.values === true){\r\n\t\t\t\tparseItems(getUniqueColumnValues(), initialDisplayValue);\r\n\t\t\t}else if(typeof editorParams.values === \"string\"){\r\n\t\t\t\tparseItems(getUniqueColumnValues(editorParams.values), initialDisplayValue);\r\n\t\t\t}else{\r\n\t\t\t\tparseItems(editorParams.values || [], initialDisplayValue);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tvar offset = Helpers.elOffset(cellEl);\r\n\r\n\t\t\tlistEl.style.minWidth = cellEl.offsetWidth + \"px\";\r\n\r\n\t\t\tlistEl.style.top = (offset.top + cellEl.offsetHeight) + \"px\";\r\n\t\t\tlistEl.style.left = offset.left + \"px\";\r\n\r\n\r\n\t\t\tlistEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tblurable = false;\r\n\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tblurable = true;\r\n\t\t\t\t}, 10);\r\n\t\t\t});\r\n\r\n\t\t\tdocument.body.appendChild(listEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction hideList(){\r\n\t\tif(listEl.parentNode){\r\n\t\t\tlistEl.parentNode.removeChild(listEl);\r\n\t\t}\r\n\r\n\t\tremoveScrollListener();\r\n\t}\r\n\r\n\tfunction removeScrollListener() {\r\n\t\tself.table.rowManager.element.removeEventListener(\"scroll\", cancelItem);\r\n\t}\r\n\r\n\tfunction scrollTovalue(char){\r\n\r\n\t\tclearTimeout(searchWordTimeout);\r\n\r\n\t\tvar character = String.fromCharCode(event.keyCode).toLowerCase();\r\n\t\tsearchWord += character.toLowerCase();\r\n\r\n\t\tvar match = dataItems.find((item) => {\r\n\t\t\treturn typeof item.label !== \"undefined\" && item.label.toLowerCase().startsWith(searchWord);\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tsetCurrentItem(match, !multiselect);\r\n\t\t}\r\n\r\n\t\tsearchWordTimeout = setTimeout(() => {\r\n\t\t\tsearchWord = \"\";\r\n\t\t}, 800)\r\n\t}\r\n\r\n\t//style input\r\n\tinput.setAttribute(\"type\", \"text\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\tinput.style.cursor = \"default\";\r\n\tinput.readOnly = (this.currentCell != false);\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = typeof initialValue !== \"undefined\" || initialValue === null ? initialValue : \"\";\r\n\r\n\t// if(editorParams.values === true){\r\n\t// \tparseItems(getUniqueColumnValues(), initialValue);\r\n\t// }else if(typeof editorParams.values === \"string\"){\r\n\t// \tparseItems(getUniqueColumnValues(editorParams.values), initialValue);\r\n\t// }else{\r\n\t// \tparseItems(editorParams.values || [], initialValue);\r\n\t// }\r\n\r\n\tinput.addEventListener(\"search\", function(e){\r\n\t\tif(!input.value){\r\n\t\t\tunsetItems();\r\n\t\t\tchooseItems();\r\n\t\t}\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tvar index;\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tindex = dataItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index > 0){\r\n\t\t\t\t\tsetCurrentItem(dataItems[index - 1], !multiselect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 40: //down arrow\r\n\t\t\tindex = dataItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index < dataItems.length - 1)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index < dataItems.length - 1){\r\n\t\t\t\t\tif(index == -1){\r\n\t\t\t\t\t\tsetCurrentItem(dataItems[0], !multiselect);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsetCurrentItem(dataItems[index + 1], !multiselect);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\t// chooseItem();\r\n\r\n\t\t\tif(multiselect){\r\n\t\t\t\ttoggleItem();\r\n\t\t\t}else{\r\n\t\t\t\tchooseItem();\r\n\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancelItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 9: //tab\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tif(self.currentCell === false){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tif(e.keyCode >= 38 && e.keyCode <= 90){\r\n\t\t\t\tscrollTovalue(e.keyCode);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tif(blurable){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tchooseItems();\r\n\t\t\t}else{\r\n\t\t\t\tcancelItem();\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"focus\", function(e){\r\n\t\tif(!blockListShow){\r\n\t\t\tshowList();\r\n\t\t}\r\n\t});\r\n\r\n\t//style list element\r\n\tlistEl = document.createElement(\"div\");\r\n\tlistEl.classList.add(\"tabulator-edit-select-list\");\r\n\r\n\tonRendered(function(){\r\n\t\tinput.style.height = \"100%\";\r\n\t\tinput.focus({preventScroll: true});\r\n\t});\r\n\r\n\tsetTimeout(() => {\r\n\t\tthis.table.rowManager.element.addEventListener(\"scroll\", cancelItem);\r\n\t}, 10);\r\n\r\n\treturn input;\r\n};","import Helpers from '../../../../core/tools/Helpers.js';\r\nimport maskInput from '../../inputMask.js';\r\n\r\n//autocomplete\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\tcellEl = cell.getElement(),\r\n\tinitialValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinitialDisplayValue = typeof initialValue !== \"undefined\" || initialValue === null ? initialValue : (typeof editorParams.defaultValue !== \"undefined\" ? editorParams.defaultValue : \"\"),\r\n\tinput = document.createElement(\"input\"),\r\n\tlistEl = document.createElement(\"div\"),\r\n\tallItems = [],\r\n\tdisplayItems = [],\r\n\tvalues = [],\r\n\tcurrentItem = false,\r\n\tblurable = true,\r\n\tuniqueColumnValues = false;\r\n\r\n\t//style input\r\n\tinput.setAttribute(\"type\", \"search\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//style list element\r\n\tlistEl.classList.add(\"tabulator-edit-select-list\");\r\n\r\n\tlistEl.addEventListener(\"mousedown\", function(e){\r\n\t\tblurable = false;\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tblurable = true;\r\n\t\t}, 10);\r\n\t});\r\n\r\n\r\n\tfunction genUniqueColumnValues(){\r\n\t\tif(editorParams.values === true){\r\n\t\t\tuniqueColumnValues = getUniqueColumnValues();\r\n\t\t}else if(typeof editorParams.values === \"string\"){\r\n\t\t\tuniqueColumnValues = getUniqueColumnValues(editorParams.values);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getUniqueColumnValues(field){\r\n\t\tvar output = {},\r\n\t\tdata = self.table.getData(),\r\n\t\tcolumn;\r\n\r\n\t\tif(field){\r\n\t\t\tcolumn = self.table.columnManager.getColumnByField(field);\r\n\t\t}else{\r\n\t\t\tcolumn = cell.getColumn()._getSelf();\r\n\t\t}\r\n\r\n\t\tif(column){\r\n\t\t\tdata.forEach(function(row){\r\n\t\t\t\tvar val = column.getFieldValue(row);\r\n\r\n\t\t\t\tif(val !== null && typeof val !== \"undefined\" && val !== \"\"){\r\n\t\t\t\t\toutput[val] = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(editorParams.sortValuesList){\r\n\t\t\t\tif(editorParams.sortValuesList == \"asc\"){\r\n\t\t\t\t\toutput = Object.keys(output).sort();\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput = Object.keys(output).sort().reverse();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\toutput = Object.keys(output);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"unable to find matching column to create autocomplete lookup list:\", field);\r\n\t\t}\r\n\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tfunction filterList(term, intialLoad){\r\n\t\tvar matches = [],\r\n\t\tvalues, items, searchEl;\r\n\r\n\t\t//lookup base values list\r\n\t\tif(uniqueColumnValues){\r\n\t\t\tvalues = uniqueColumnValues;\r\n\t\t}else{\r\n\t\t\tvalues = editorParams.values || [];\r\n\t\t}\r\n\r\n\t\tif(editorParams.searchFunc){\r\n\t\t\tmatches = editorParams.searchFunc(term, values);\r\n\r\n\t\t\tif(matches instanceof Promise){\r\n\r\n\t\t\t\taddNotice(typeof editorParams.searchingPlaceholder !== \"undefined\" ? editorParams.searchingPlaceholder : \"Searching...\");\r\n\r\n\t\t\t\tmatches.then((result) => {\r\n\t\t\t\t\tfillListIfNotEmpty(parseItems(result), intialLoad);\r\n\t\t\t\t}).catch((err) => {\r\n\t\t\t\t\tconsole.err(\"error in autocomplete search promise:\", err);\r\n\t\t\t\t});\r\n\r\n\t\t\t}else{\r\n\t\t\t\tfillListIfNotEmpty(parseItems(matches), intialLoad);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\titems = parseItems(values);\r\n\r\n\t\t\tif(term === \"\"){\r\n\t\t\t\tif(editorParams.showListOnEmpty){\r\n\t\t\t\t\tmatches = items;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\titems.forEach(function(item){\r\n\t\t\t\t\tif(item.value !== null || typeof item.value !== \"undefined\"){\r\n\t\t\t\t\t\tif(String(item.value).toLowerCase().indexOf(String(term).toLowerCase()) > -1 || String(item.title).toLowerCase().indexOf(String(term).toLowerCase()) > -1){\r\n\t\t\t\t\t\t\tmatches.push(item);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tfillListIfNotEmpty(matches, intialLoad);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction addNotice(notice){\r\n\t\tvar searchEl = document.createElement(\"div\");\r\n\r\n\t\tclearList();\r\n\r\n\t\tif(notice !== false){\r\n\t\t\tsearchEl.classList.add(\"tabulator-edit-select-list-notice\");\r\n\t\t\tsearchEl.tabIndex = 0;\r\n\r\n\t\t\tif(notice instanceof Node){\r\n\t\t\t\tsearchEl.appendChild(notice);\r\n\t\t\t}else{\r\n\t\t\t\tsearchEl.innerHTML = notice;\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(searchEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction parseItems(inputValues){\r\n\t\tvar itemList = [];\r\n\r\n\t\tif(Array.isArray(inputValues)){\r\n\t\t\tinputValues.forEach(function(value){\r\n\r\n\t\t\t\tvar item = {};\r\n\r\n\t\t\t\tif(typeof value === \"object\"){\r\n\t\t\t\t\titem.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value.value, value.label) : value.label;\r\n\t\t\t\t\titem.value = value.value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\titem.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value;\r\n\t\t\t\t\titem.value = value;\r\n\t\t\t\t}\r\n\r\n\t\t\t\titemList.push(item);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tfor(var key in inputValues){\r\n\t\t\t\tvar item = {\r\n\t\t\t\t\ttitle:editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : inputValues[key],\r\n\t\t\t\t\tvalue:key,\r\n\t\t\t\t};\r\n\r\n\t\t\t\titemList.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn itemList;\r\n\t}\r\n\r\n\tfunction clearList(){\r\n\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\t}\r\n\r\n\tfunction fillListIfNotEmpty(items, intialLoad){\r\n\t\tif(items.length){\r\n\t\t\tfillList(items, intialLoad);\r\n\t\t}else{\r\n\t\t\tif(editorParams.emptyPlaceholder){\r\n\t\t\t\taddNotice(editorParams.emptyPlaceholder);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fillList(items, intialLoad){\r\n\t\tvar current = false;\r\n\r\n\t\tclearList();\r\n\r\n\t\tdisplayItems = items;\r\n\r\n\t\tdisplayItems.forEach(function(item){\r\n\t\t\tvar el = item.element;\r\n\r\n\t\t\tif(!el){\r\n\t\t\t\tel = document.createElement(\"div\");\r\n\t\t\t\tel.classList.add(\"tabulator-edit-select-list-item\");\r\n\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\tel.innerHTML = item.title;\r\n\r\n\t\t\t\tel.addEventListener(\"click\", function(e){\r\n\t\t\t\t\tsetCurrentItem(item);\r\n\t\t\t\t\tchooseItem();\r\n\t\t\t\t});\r\n\r\n\t\t\t\tel.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\t\tblurable = false;\r\n\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tblurable = true;\r\n\t\t\t\t\t}, 10);\r\n\t\t\t\t});\r\n\r\n\t\t\t\titem.element = el;\r\n\r\n\t\t\t\tif(intialLoad && item.value == initialValue){\r\n\t\t\t\t\tinput.value = item.title;\r\n\t\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t\t\tcurrent = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(item === currentItem){\r\n\t\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t\t\tcurrent = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(el);\r\n\t\t});\r\n\r\n\t\tif(!current){\r\n\t\t\tsetCurrentItem(false);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction chooseItem(){\r\n\t\thideList();\r\n\r\n\t\tif(currentItem){\r\n\t\t\tif(initialValue !== currentItem.value){\r\n\t\t\t\tinitialValue = currentItem.value;\r\n\t\t\t\tinput.value = currentItem.title;\r\n\t\t\t\tsuccess(currentItem.value);\r\n\t\t\t}else{\r\n\t\t\t\tcancel();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(editorParams.freetext){\r\n\t\t\t\tinitialValue = input.value;\r\n\t\t\t\tsuccess(input.value);\r\n\t\t\t}else{\r\n\t\t\t\tif(editorParams.allowEmpty && input.value === \"\"){\r\n\t\t\t\t\tinitialValue = input.value;\r\n\t\t\t\t\tsuccess(input.value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcancel();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction showList(){\r\n\t\tif(!listEl.parentNode){\r\n\t\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\r\n\t\t\tvar offset = Helpers.elOffset(cellEl);\r\n\r\n\t\t\tlistEl.style.minWidth = cellEl.offsetWidth + \"px\";\r\n\r\n\t\t\tlistEl.style.top = (offset.top + cellEl.offsetHeight) + \"px\";\r\n\t\t\tlistEl.style.left = offset.left + \"px\";\r\n\t\t\tdocument.body.appendChild(listEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setCurrentItem(item, showInputValue){\r\n\t\tif(currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"active\");\r\n\t\t}\r\n\r\n\t\tcurrentItem = item;\r\n\r\n\t\tif(item && item.element){\r\n\t\t\titem.element.classList.add(\"active\");\r\n\t\t}\r\n\r\n\t\tif(item && item.element && item.element.scrollIntoView){\r\n\t\t\titem.element.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'start'});\r\n\t\t}\r\n\t}\r\n\r\n\tfunction hideList(){\r\n\t\tif(listEl.parentNode){\r\n\t\t\tlistEl.parentNode.removeChild(listEl);\r\n\t\t}\r\n\r\n\t\tremoveScrollListener();\r\n\t}\r\n\r\n\r\n\tfunction cancelItem(){\r\n\t\thideList();\r\n\t\tcancel();\r\n\t}\r\n\r\n\tfunction removeScrollListener() {\r\n\t\tself.table.rowManager.element.removeEventListener(\"scroll\", cancelItem);\r\n\t}\r\n\r\n\t//allow key based navigation\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tvar index;\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tindex = displayItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index > 0){\r\n\t\t\t\t\tsetCurrentItem(displayItems[index - 1]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tsetCurrentItem(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 40: //down arrow\r\n\r\n\t\t\tindex = displayItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index < displayItems.length - 1)){\r\n\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index < displayItems.length - 1){\r\n\t\t\t\t\tif(index == -1){\r\n\t\t\t\t\t\tsetCurrentItem(displayItems[0]);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsetCurrentItem(displayItems[index + 1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\t// e.preventDefault();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\tchooseItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancelItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 36: //home\r\n\t\t\tcase 35: //end\r\n\t\t\t//prevent table navigation while using input element\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"keyup\", function(e){\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //up arrow\r\n\t\t\tcase 40: //right arrow\r\n\t\t\tcase 13: //enter\r\n\t\t\tcase 27: //escape\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tfilterList(input.value);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\tinput.addEventListener(\"search\", function(e){\r\n\t\tfilterList(input.value);\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tif(blurable){\r\n\t\t\tchooseItem();\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"focus\", function(e){\r\n\t\tvar value = initialDisplayValue;\r\n\t\tgenUniqueColumnValues();\r\n\t\tshowList();\r\n\t\tinput.value = value;\r\n\t\tfilterList(value, true);\r\n\t});\r\n\r\n\r\n\tonRendered(function(){\r\n\t\tinput.style.height = \"100%\";\r\n\t\tinput.focus({preventScroll: true});\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\tsetTimeout(() => {\r\n\t\tthis.table.rowManager.element.addEventListener(\"scroll\", cancelItem);\r\n\t}, 10);\r\n\r\n\tgenUniqueColumnValues();\r\n\tinput.value = initialDisplayValue;\r\n\tfilterList(initialDisplayValue, true);\r\n\r\n\treturn input;\r\n};","//star rating\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\telement = cell.getElement(),\r\n\tvalue = cell.getValue(),\r\n\tmaxStars = element.getElementsByTagName(\"svg\").length || 5,\r\n\tsize = element.getElementsByTagName(\"svg\")[0] ? element.getElementsByTagName(\"svg\")[0].getAttribute(\"width\") : 14,\r\n\tstars = [],\r\n\tstarsHolder = document.createElement(\"div\"),\r\n\tstar = document.createElementNS('http://www.w3.org/2000/svg', \"svg\");\r\n\r\n\r\n\t//change star type\r\n\tfunction starChange(val){\r\n\t\tstars.forEach(function(star, i){\r\n\t\t\tif(i < val){\r\n\t\t\t\tif(self.table.browser == \"ie\"){\r\n\t\t\t\t\tstar.setAttribute(\"class\", \"tabulator-star-active\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tstar.classList.replace(\"tabulator-star-inactive\", \"tabulator-star-active\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstar.innerHTML = '';\r\n\t\t\t}else{\r\n\t\t\t\tif(self.table.browser == \"ie\"){\r\n\t\t\t\t\tstar.setAttribute(\"class\", \"tabulator-star-inactive\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tstar.classList.replace(\"tabulator-star-active\", \"tabulator-star-inactive\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstar.innerHTML = '';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//build stars\r\n\tfunction buildStar(i){\r\n\r\n\t\tvar starHolder = document.createElement(\"span\");\r\n\t\tvar nextStar = star.cloneNode(true);\r\n\r\n\t\tstars.push(nextStar);\r\n\r\n\t\tstarHolder.addEventListener(\"mouseenter\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tstarChange(i);\r\n\t\t});\r\n\r\n\t\tstarHolder.addEventListener(\"mousemove\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t});\r\n\r\n\t\tstarHolder.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tsuccess(i);\r\n\t\t\telement.blur();\r\n\t\t});\r\n\r\n\t\tstarHolder.appendChild(nextStar);\r\n\t\tstarsHolder.appendChild(starHolder);\r\n\r\n\t}\r\n\r\n\t//handle keyboard navigation value change\r\n\tfunction changeValue(val){\r\n\t\tvalue = val;\r\n\t\tstarChange(val);\r\n\t}\r\n\r\n\t//style cell\r\n\telement.style.whiteSpace = \"nowrap\";\r\n\telement.style.overflow = \"hidden\";\r\n\telement.style.textOverflow = \"ellipsis\";\r\n\r\n\t//style holding element\r\n\tstarsHolder.style.verticalAlign = \"middle\";\r\n\tstarsHolder.style.display = \"inline-block\";\r\n\tstarsHolder.style.padding = \"4px\";\r\n\r\n\t//style star\r\n\tstar.setAttribute(\"width\", size);\r\n\tstar.setAttribute(\"height\", size);\r\n\tstar.setAttribute(\"viewBox\", \"0 0 512 512\");\r\n\tstar.setAttribute(\"xml:space\", \"preserve\");\r\n\tstar.style.padding = \"0 1px\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tstarsHolder.setAttribute(key, starsHolder.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tstarsHolder.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//create correct number of stars\r\n\tfor(var i=1;i<= maxStars;i++){\r\n\t\tbuildStar(i);\r\n\t}\r\n\r\n\t//ensure value does not exceed number of stars\r\n\tvalue = Math.min(parseInt(value), maxStars);\r\n\r\n\t// set initial styling of stars\r\n\tstarChange(value);\r\n\r\n\tstarsHolder.addEventListener(\"mousemove\", function(e){\r\n\t\tstarChange(0);\r\n\t});\r\n\r\n\tstarsHolder.addEventListener(\"click\", function(e){\r\n\t\tsuccess(0);\r\n\t});\r\n\r\n\telement.addEventListener(\"blur\", function(e){\r\n\t\tcancel();\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\telement.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 39: //right arrow\r\n\t\t\tchangeValue(value + 1);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tchangeValue(value - 1);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\tsuccess(value);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\treturn starsHolder;\r\n};","//draggable progress bar\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar element = cell.getElement(),\r\n\tmax = typeof editorParams.max === \"undefined\" ? ((element.getElementsByTagName(\"div\")[0] && element.getElementsByTagName(\"div\")[0].getAttribute(\"max\")) || 100) : editorParams.max,\r\n\tmin = typeof editorParams.min === \"undefined\" ? ((element.getElementsByTagName(\"div\")[0] && element.getElementsByTagName(\"div\")[0].getAttribute(\"min\")) || 0) : editorParams.min,\r\n\tpercent = (max - min) / 100,\r\n\tvalue = cell.getValue() || 0,\r\n\thandle = document.createElement(\"div\"),\r\n\tbar = document.createElement(\"div\"),\r\n\tmouseDrag, mouseDragWidth;\r\n\r\n\t//set new value\r\n\tfunction updateValue(){\r\n\t\tvar style = window.getComputedStyle(element, null);\r\n\r\n\t\tvar calcVal = (percent * Math.round(bar.offsetWidth / ((element.clientWidth - parseInt(style.getPropertyValue(\"padding-left\")) - parseInt(style.getPropertyValue(\"padding-right\")))/100))) + min;\r\n\t\tsuccess(calcVal);\r\n\t\telement.setAttribute(\"aria-valuenow\", calcVal);\r\n\t\telement.setAttribute(\"aria-label\", value);\r\n\t}\r\n\r\n\t//style handle\r\n\thandle.style.position = \"absolute\";\r\n\thandle.style.right = \"0\";\r\n\thandle.style.top = \"0\";\r\n\thandle.style.bottom = \"0\";\r\n\thandle.style.width = \"5px\";\r\n\thandle.classList.add(\"tabulator-progress-handle\");\r\n\r\n\t//style bar\r\n\tbar.style.display = \"inline-block\";\r\n\tbar.style.position = \"relative\";\r\n\t// bar.style.top = \"8px\";\r\n\t// bar.style.bottom = \"8px\";\r\n\t// bar.style.left = \"4px\";\r\n\t// bar.style.marginRight = \"4px\";\r\n\tbar.style.height = \"100%\";\r\n\tbar.style.backgroundColor = \"#488CE9\";\r\n\tbar.style.maxWidth = \"100%\";\r\n\tbar.style.minWidth = \"0%\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tbar.setAttribute(key, bar.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tbar.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//style cell\r\n\telement.style.padding = \"4px 4px\";\r\n\r\n\t//make sure value is in range\r\n\tvalue = Math.min(parseFloat(value), max);\r\n\tvalue = Math.max(parseFloat(value), min);\r\n\r\n\t//workout percentage\r\n\tvalue = Math.round((value - min) / percent);\r\n\t// bar.style.right = value + \"%\";\r\n\tbar.style.width = value + \"%\";\r\n\r\n\telement.setAttribute(\"aria-valuemin\", min);\r\n\telement.setAttribute(\"aria-valuemax\", max);\r\n\r\n\tbar.appendChild(handle);\r\n\r\n\thandle.addEventListener(\"mousedown\", function(e){\r\n\t\tmouseDrag = e.screenX;\r\n\t\tmouseDragWidth = bar.offsetWidth;\r\n\t});\r\n\r\n\thandle.addEventListener(\"mouseover\", function(){\r\n\t\thandle.style.cursor = \"ew-resize\";\r\n\t});\r\n\r\n\telement.addEventListener(\"mousemove\", function(e){\r\n\t\tif(mouseDrag){\r\n\t\t\tbar.style.width = (mouseDragWidth + e.screenX - mouseDrag) + \"px\";\r\n\t\t}\r\n\t});\r\n\r\n\telement.addEventListener(\"mouseup\", function(e){\r\n\t\tif(mouseDrag){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\r\n\t\t\tmouseDrag = false;\r\n\t\t\tmouseDragWidth = false;\r\n\r\n\t\t\tupdateValue();\r\n\t\t}\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\telement.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.preventDefault();\r\n\t\t\tbar.style.width = (bar.clientWidth + element.clientWidth/100) + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\te.preventDefault();\r\n\t\t\tbar.style.width = (bar.clientWidth - element.clientWidth/100) + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 9: //tab\r\n\t\t\tcase 13: //enter\r\n\t\t\tupdateValue();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t}\r\n\t});\r\n\r\n\telement.addEventListener(\"blur\", function(){\r\n\t\tcancel();\r\n\t});\r\n\r\n\treturn bar;\r\n};","//checkbox\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar value = cell.getValue(),\r\n\tinput = document.createElement(\"input\"),\r\n\ttristate = editorParams.tristate,\r\n\tindetermValue = typeof editorParams.indeterminateValue === \"undefined\" ? null : editorParams.indeterminateValue,\r\n\tindetermState = false;\r\n\r\n\tinput.setAttribute(\"type\", \"checkbox\");\r\n\tinput.style.marginTop = \"5px\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = value;\r\n\r\n\tif(tristate && (typeof value === \"undefined\" || value === indetermValue || value === \"\")){\r\n\t\tindetermState = true;\r\n\t\tinput.indeterminate = true;\r\n\t}\r\n\r\n\tif(this.table.browser != \"firefox\"){ //prevent blur issue on mac firefox\r\n\t\tonRendered(function(){\r\n\t\t\tinput.focus({preventScroll: true});\r\n\t\t});\r\n\t}\r\n\r\n\tinput.checked = value === true || value === \"true\" || value === \"True\" || value === 1;\r\n\r\n\tonRendered(function(){\r\n\t\tinput.focus();\r\n\t});\r\n\r\n\tfunction setValue(blur){\r\n\t\tif(tristate){\r\n\t\t\tif(!blur){\r\n\t\t\t\tif(input.checked && !indetermState){\r\n\t\t\t\t\tinput.checked = false;\r\n\t\t\t\t\tinput.indeterminate = true;\r\n\t\t\t\t\tindetermState = true;\r\n\t\t\t\t\treturn indetermValue;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tindetermState = false;\r\n\t\t\t\t\treturn input.checked;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(indetermState){\r\n\t\t\t\t\treturn indetermValue;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn input.checked;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn input.checked;\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur\r\n\tinput.addEventListener(\"change\", function(e){\r\n\t\tsuccess(setValue());\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tsuccess(setValue(true));\r\n\t});\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tif(e.keyCode == 13){\r\n\t\t\tsuccess(setValue());\r\n\t\t}\r\n\t\tif(e.keyCode == 27){\r\n\t\t\tcancel();\r\n\t\t}\r\n\t});\r\n\r\n\treturn input;\r\n};","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defaultEditors from './defaults/editors.js';\r\n\r\nclass Edit extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.currentCell = false; //hold currently editing cell\r\n\t\tthis.mouseClick = false; //hold mousedown state to prevent click binding being overriden by editor opening\r\n\t\tthis.recursionBlock = false; //prevent focus recursion\r\n\t\tthis.invalidEdit = false;\r\n\t\tthis.editedCells = [];\r\n\r\n\t\tthis.editors = Edit.editors;\r\n\r\n\t\tthis.registerColumnOption(\"editable\");\r\n\t\tthis.registerColumnOption(\"editor\");\r\n\t\tthis.registerColumnOption(\"editorParams\");\r\n\r\n\t\tthis.registerColumnOption(\"cellEditing\");\r\n\t\tthis.registerColumnOption(\"cellEdited\");\r\n\t\tthis.registerColumnOption(\"cellEditCancelled\");\r\n\r\n\t\tthis.registerTableFunction(\"getEditedCells\", this.getEditedCells.bind(this));\r\n\t\tthis.registerTableFunction(\"clearCellEdited\", this.clearCellEdited.bind(this));\r\n\t\tthis.registerTableFunction(\"navigatePrev\", this.navigatePrev.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateNext\", this.navigateNext.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateLeft\", this.navigateLeft.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateRight\", this.navigateRight.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateUp\", this.navigateUp.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateDown\", this.navigateDown.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"isEdited\", this.cellisEdited.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"clearEdited\", this.clearEdited.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"edit\", this.editCell.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"cancelEdit\", this.cellCancelEdit.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigatePrev\", this.navigatePrev.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateNext\", this.navigateNext.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateLeft\", this.navigateLeft.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateRight\", this.navigateRight.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateUp\", this.navigateUp.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateDown\", this.navigateDown.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-init\", this.bindEditor.bind(this));\r\n\t\tthis.subscribe(\"cell-delete\", this.clearEdited.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumnCheck.bind(this));\r\n\t\tthis.subscribe(\"column-delete\", this.columnDeleteCheck.bind(this));\r\n\t\tthis.subscribe(\"row-deleting\", this.rowDeleteCheck.bind(this));\r\n\t\tthis.subscribe(\"data-refreshing\", this.cancelEdit.bind(this));\r\n\r\n\t\tthis.subscribe(\"keybinding-nav-prev\", this.navigatePrev.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-next\", this.keybindingNavigateNext.bind(this));\r\n\t\tthis.subscribe(\"keybinding-nav-left\", this.navigateLeft.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-right\", this.navigateRight.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-up\", this.navigateUp.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-down\", this.navigateDown.bind(this, undefined));\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t////// Keybinding Functions ///////\r\n\t///////////////////////////////////\r\n\r\n\tkeybindingNavigateNext(e){\r\n\t\tvar cell = this.currentCell,\r\n\t\tnewRow = this.options(\"tabEndNewRow\");\r\n\r\n\t\tif(cell){\r\n\t\t\tif(!this.navigateNext(cell, e)){\r\n\t\t\t\tif(newRow){\r\n\t\t\t\t\tcell.getElement().firstChild.blur();\r\n\r\n\t\t\t\t\tif(newRow === true){\r\n\t\t\t\t\t\tnewRow = this.table.addRow({})\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(typeof newRow == \"function\"){\r\n\t\t\t\t\t\t\tnewRow = this.table.addRow(newRow(cell.row.getComponent()))\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnewRow = this.table.addRow(Object.assign({}, newRow));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tnewRow.then(() => {\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tcell.getComponent().navigateNext();\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Cell Functions //////////\r\n\t///////////////////////////////////\r\n\r\n\tcellisEdited(cell){\r\n\t\treturn !! cell.modules.edit && cell.modules.edit.edited;\r\n\t}\r\n\r\n\tcellCancelEdit(cell){\r\n\t\tif(cell === this.currentCell){\r\n\t\t\tthis.table.modules.edit.cancelEdit();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cancel Editor Error - This cell is not currently being edited \");\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\tclearCellEdited(cells){\r\n\t\tif(!cells){\r\n\t\t\tcells = this.table.modules.edit.getEditedCells();\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\r\n\t\tcells.forEach((cell) => {\r\n\t\t\tthis.table.modules.edit.clearEdited(cell._getSelf());\r\n\t\t});\r\n\t}\r\n\r\n\tnavigatePrev(cell = this.currentCell, e){\r\n\t\tvar nextCell, prevRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tnextCell = this.navigateLeft();\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tprevRow = this.table.rowManager.prevDisplayRow(cell.row, true);\r\n\r\n\t\t\t\tif(prevRow){\r\n\t\t\t\t\tnextCell = this.findNextEditableCell(prevRow, prevRow.cells.length);\r\n\r\n\t\t\t\t\tif(nextCell){\r\n\t\t\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateNext(cell = this.currentCell, e){\r\n\t\tvar nextCell, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tnextCell = this.navigateRight();\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\r\n\r\n\t\t\t\tif(nextRow){\r\n\t\t\t\t\tnextCell = this.findNextEditableCell(nextRow, -1);\r\n\r\n\t\t\t\t\tif(nextCell){\r\n\t\t\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateLeft(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findPrevEditableCell(cell.row, index);\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateRight(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findNextEditableCell(cell.row, index);\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateUp(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.prevDisplayRow(cell.row, true);\r\n\r\n\t\t\tif(nextRow){\r\n\t\t\t\tnextRow.cells[index].getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateDown(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\r\n\r\n\t\t\tif(nextRow){\r\n\t\t\t\tnextRow.cells[index].getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfindNextEditableCell(row, index){\r\n\t\tvar nextCell = false;\r\n\r\n\t\tif(index < row.cells.length-1){\r\n\t\t\tfor(var i = index+1; i < row.cells.length; i++){\r\n\t\t\t\tlet cell = row.cells[i];\r\n\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tlet allowEdit = true;\r\n\r\n\t\t\t\t\tif(typeof cell.column.modules.edit.check == \"function\"){\r\n\t\t\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(allowEdit){\r\n\t\t\t\t\t\tnextCell = cell;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn nextCell;\r\n\t}\r\n\r\n\tfindPrevEditableCell(row, index){\r\n\t\tvar prevCell = false;\r\n\r\n\t\tif(index > 0){\r\n\t\t\tfor(var i = index-1; i >= 0; i--){\r\n\t\t\t\tlet cell = row.cells[i],\r\n\t\t\t\tallowEdit = true;\r\n\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tif(typeof cell.column.modules.edit.check == \"function\"){\r\n\t\t\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(allowEdit){\r\n\t\t\t\t\t\tprevCell = cell;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn prevCell;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(typeof column.definition.editor !== \"undefined\"){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\tcolumnDeleteCheck(column){\r\n\t\tif(this.currentCell && this.currentCell.column === column){\r\n\t\t\tthis.cancelEdit();\r\n\t\t}\r\n\t}\r\n\r\n\trowDeleteCheck(row){\r\n\t\tif(this.currentCell && this.currentCell.row === row){\r\n\t\t\tthis.cancelEdit();\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column editor\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = {\r\n\t\t\teditor:false,\r\n\t\t\tblocked:false,\r\n\t\t\tcheck:column.definition.editable,\r\n\t\t\tparams:column.definition.editorParams || {}\r\n\t\t};\r\n\r\n\t\t//set column editor\r\n\t\tswitch(typeof column.definition.editor){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(this.editors[column.definition.editor]){\r\n\t\t\t\tconfig.editor = this.editors[column.definition.editor];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Editor Error - No such editor found: \", column.definition.editor);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tconfig.editor = column.definition.editor;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"boolean\":\r\n\t\t\tif(column.definition.editor === true){\r\n\t\t\t\tif(typeof column.definition.formatter !== \"function\"){\r\n\t\t\t\t\tif(this.editors[column.definition.formatter]){\r\n\t\t\t\t\t\tconfig.editor = this.editors[column.definition.formatter];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconfig.editor = this.editors[\"input\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Editor Error - Cannot auto lookup editor for a custom formatter: \", column.definition.formatter);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(config.editor){\r\n\t\t\tcolumn.modules.edit = config;\r\n\t\t}\r\n\t}\r\n\r\n\tgetCurrentCell(){\r\n\t\treturn this.currentCell ? this.currentCell.getComponent() : false;\r\n\t}\r\n\r\n\tclearEditor(cancel){\r\n\t\tvar cell = this.currentCell,\r\n\t\tcellEl;\r\n\r\n\t\tthis.invalidEdit = false;\r\n\r\n\t\tif(cell){\r\n\t\t\tthis.currentCell = false;\r\n\r\n\t\t\tcellEl = cell.getElement();\r\n\r\n\t\t\tif(cancel){\r\n\t\t\t\tif(cell.column.modules.validate && this.table.modExists(\"validate\")){\r\n\t\t\t\t\tthis.table.modules.validate.cellValidate(cell);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcellEl.classList.remove(\"tabulator-validation-fail\");\r\n\t\t\t}\r\n\r\n\t\t\tcellEl.classList.remove(\"tabulator-editing\");\r\n\r\n\t\t\twhile(cellEl.firstChild) cellEl.removeChild(cellEl.firstChild);\r\n\r\n\t\t\tcell.row.getElement().classList.remove(\"tabulator-row-editing\");\r\n\t\t}\r\n\t}\r\n\r\n\tcancelEdit(){\r\n\t\tif(this.currentCell){\r\n\t\t\tvar cell = this.currentCell;\r\n\t\t\tvar component = this.currentCell.getComponent();\r\n\r\n\t\t\tthis.clearEditor(true);\r\n\t\t\tcell.setValueActual(cell.getValue());\r\n\t\t\tcell.cellRendered();\r\n\r\n\t\t\tif(cell.column.definition.editor == \"textarea\" || cell.column.definition.variableHeight){\r\n\t\t\t\tcell.row.normalizeHeight(true);\r\n\t\t\t}\r\n\r\n\t\t\tif(cell.column.definition.cellEditCancelled){\r\n\t\t\t\tcell.column.definition.cellEditCancelled.call(this.table, component);\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"edit-cancelled\", cell);\r\n\t\t\tthis.dispatchExternal(\"cellEditCancelled\", component);\r\n\t\t}\r\n\t}\r\n\r\n\t//return a formatted value for a cell\r\n\tbindEditor(cell){\r\n\t\tif(cell.column.modules.edit){\r\n\t\t\tvar self = this,\r\n\t\t\telement = cell.getElement(true);\r\n\r\n\t\t\telement.setAttribute(\"tabindex\", 0);\r\n\r\n\t\t\telement.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(!element.classList.contains(\"tabulator-editing\")){\r\n\t\t\t\t\telement.focus({preventScroll: true});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\telement.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif (e.button === 2) {\r\n\t\t\t\t\te.preventDefault();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.mouseClick = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\telement.addEventListener(\"focus\", function(e){\r\n\t\t\t\tif(!self.recursionBlock){\r\n\t\t\t\t\tself.edit(cell, e, false);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tfocusCellNoEvent(cell, block){\r\n\t\tthis.recursionBlock = true;\r\n\r\n\t\tif(!(block && this.table.browser === \"ie\")){\r\n\t\t\tcell.getElement().focus({preventScroll: true});\r\n\t\t}\r\n\r\n\t\tthis.recursionBlock = false;\r\n\t}\r\n\r\n\teditCell(cell, forceEdit){\r\n\t\tthis.focusCellNoEvent(cell);\r\n\t\tthis.edit(cell, false, forceEdit);\r\n\t}\r\n\r\n\tfocusScrollAdjust(cell){\r\n\t\tif(this.table.rowManager.getRenderMode() == \"virtual\"){\r\n\t\t\tvar topEdge = this.table.rowManager.element.scrollTop,\r\n\t\t\tbottomEdge = this.table.rowManager.element.clientHeight + this.table.rowManager.element.scrollTop,\r\n\t\t\trowEl = cell.row.getElement(),\r\n\t\t\toffset = rowEl.offsetTop;\r\n\r\n\t\t\tif(rowEl.offsetTop < topEdge){\r\n\t\t\t\tthis.table.rowManager.element.scrollTop -= (topEdge - rowEl.offsetTop);\r\n\t\t\t}else{\r\n\t\t\t\tif(rowEl.offsetTop + rowEl.offsetHeight > bottomEdge){\r\n\t\t\t\t\tthis.table.rowManager.element.scrollTop += (rowEl.offsetTop + rowEl.offsetHeight - bottomEdge);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar leftEdge = this.table.rowManager.element.scrollLeft,\r\n\t\t\trightEdge = this.table.rowManager.element.clientWidth + this.table.rowManager.element.scrollLeft,\r\n\t\t\tcellEl = cell.getElement(),\r\n\t\t\toffset = cellEl.offsetLeft;\r\n\r\n\t\t\tif(this.table.modExists(\"frozenColumns\")){\r\n\t\t\t\tleftEdge += parseInt(this.table.modules.frozenColumns.leftMargin);\r\n\t\t\t\trightEdge -= parseInt(this.table.modules.frozenColumns.rightMargin);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.renderHorizontal === \"virtual\"){\r\n\t\t\t\tleftEdge -= parseInt(this.table.columnManager.renderer.vDomPadLeft);\r\n\t\t\t\trightEdge -= parseInt(this.table.columnManager.renderer.vDomPadLeft);\r\n\t\t\t}\r\n\r\n\t\t\tif(cellEl.offsetLeft < leftEdge){\r\n\r\n\t\t\t\tthis.table.rowManager.element.scrollLeft -= (leftEdge - cellEl.offsetLeft);\r\n\t\t\t}else{\r\n\t\t\t\tif(cellEl.offsetLeft + cellEl.offsetWidth > rightEdge){\r\n\t\t\t\t\tthis.table.rowManager.element.scrollLeft += (cellEl.offsetLeft + cellEl.offsetWidth - rightEdge);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tedit(cell, e, forceEdit){\r\n\t\tvar self = this,\r\n\t\tallowEdit = true,\r\n\t\trendered = function(){},\r\n\t\telement = cell.getElement(),\r\n\t\tcellEditor, component, params;\r\n\r\n\t\t//prevent editing if another cell is refusing to leave focus (eg. validation fail)\r\n\t\tif(this.currentCell){\r\n\t\t\tif(!this.invalidEdit){\r\n\t\t\t\tthis.cancelEdit();\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//handle successfull value change\r\n\t\tfunction success(value){\r\n\t\t\tif(self.currentCell === cell){\r\n\t\t\t\tvar valid = true;\r\n\r\n\t\t\t\tif(cell.column.modules.validate && self.table.modExists(\"validate\") && self.table.options.validationMode != \"manual\"){\r\n\t\t\t\t\tvalid = self.table.modules.validate.validate(cell.column.modules.validate, cell, value);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(valid === true || self.table.options.validationMode === \"highlight\"){\r\n\t\t\t\t\tself.clearEditor();\r\n\r\n\r\n\t\t\t\t\tif(!cell.modules.edit){\r\n\t\t\t\t\t\tcell.modules.edit = {};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcell.modules.edit.edited = true;\r\n\r\n\t\t\t\t\tif(self.editedCells.indexOf(cell) == -1){\r\n\t\t\t\t\t\tself.editedCells.push(cell);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcell.setValue(value, true);\r\n\r\n\t\t\t\t\tif(valid !== true){\r\n\t\t\t\t\t\telement.classList.add(\"tabulator-validation-fail\");\r\n\t\t\t\t\t\tself.table.externalEvents.dispatch(\"validationFailed\", cell.getComponent(), value, valid);\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.invalidEdit = true;\r\n\t\t\t\t\telement.classList.add(\"tabulator-validation-fail\");\r\n\t\t\t\t\tself.focusCellNoEvent(cell, true);\r\n\t\t\t\t\trendered();\r\n\t\t\t\t\tself.table.externalEvents.dispatch(\"validationFailed\", cell.getComponent(), value, valid);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t// console.warn(\"Edit Success Error - cannot call success on a cell that is no longer being edited\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//handle aborted edit\r\n\t\tfunction cancel(){\r\n\t\t\tif(self.currentCell === cell){\r\n\t\t\t\tself.cancelEdit();\r\n\t\t\t}else{\r\n\t\t\t\t// console.warn(\"Edit Success Error - cannot call cancel on a cell that is no longer being edited\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\trendered = callback;\r\n\t\t}\r\n\r\n\t\tif(!cell.column.modules.edit.blocked){\r\n\t\t\tif(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t}\r\n\r\n\t\t\tswitch(typeof cell.column.modules.edit.check){\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tallowEdit = cell.column.modules.edit.check;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(allowEdit || forceEdit){\r\n\r\n\t\t\t\tself.cancelEdit();\r\n\r\n\t\t\t\tself.currentCell = cell;\r\n\r\n\t\t\t\tthis.focusScrollAdjust(cell);\r\n\r\n\t\t\t\tcomponent = cell.getComponent();\r\n\r\n\t\t\t\tif(this.mouseClick){\r\n\t\t\t\t\tthis.mouseClick = false;\r\n\r\n\t\t\t\t\tif(cell.column.definition.cellClick){\r\n\t\t\t\t\t\tcell.column.definition.cellClick.call(this.table, e, component);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(cell.column.definition.cellEditing){\r\n\t\t\t\t\tcell.column.definition.cellEditing.call(this.table, component);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.dispatchExternal(\"cellEditing\", component);\r\n\r\n\t\t\t\tparams = typeof cell.column.modules.edit.params === \"function\" ? cell.column.modules.edit.params(component) : cell.column.modules.edit.params;\r\n\r\n\t\t\t\tcellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params);\r\n\r\n\t\t\t\t//if editor returned, add to DOM, if false, abort edit\r\n\t\t\t\tif(cellEditor !== false){\r\n\r\n\t\t\t\t\tif(cellEditor instanceof Node){\r\n\t\t\t\t\t\telement.classList.add(\"tabulator-editing\");\r\n\t\t\t\t\t\tcell.row.getElement().classList.add(\"tabulator-row-editing\");\r\n\t\t\t\t\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\t\t\t\t\t\telement.appendChild(cellEditor);\r\n\r\n\t\t\t\t\t\t//trigger onRendered Callback\r\n\t\t\t\t\t\trendered();\r\n\r\n\t\t\t\t\t\t//prevent editing from triggering rowClick event\r\n\t\t\t\t\t\tvar children = element.children;\r\n\r\n\t\t\t\t\t\tfor (var i = 0; i < children.length; i++) {\r\n\t\t\t\t\t\t\tchildren[i].addEventListener(\"click\", function(e){\r\n\t\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Edit Error - Editor should return an instance of Node, the editor returned:\", cellEditor);\r\n\t\t\t\t\t\telement.blur();\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.blur();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tthis.mouseClick = false;\r\n\t\t\t\telement.blur();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.mouseClick = false;\r\n\t\t\telement.blur();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tgetEditedCells(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.editedCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tclearEdited(cell){\r\n\t\tvar editIndex;\r\n\r\n\t\tif(cell.modules.edit && cell.modules.edit.edited){\r\n\t\t\tcell.modules.edit.edited = false;\r\n\r\n\t\t\tif(cell.modules.validate){\r\n\t\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\teditIndex = this.editedCells.indexOf(cell);\r\n\r\n\t\tif(editIndex > -1){\r\n\t\t\tthis.editedCells.splice(editIndex, 1);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nEdit.moduleName = \"edit\";\r\n\r\n//load defaults\r\nEdit.editors = defaultEditors;\r\n\r\n\r\nexport default Edit;\r\n","class ExportRow{\r\n\tconstructor(type, columns, component, indent){\r\n\t\tthis.type = type;\r\n\t\tthis.columns = columns;\r\n\t\tthis.component = component || false;\r\n\t\tthis.indent = indent || 0;\r\n\t}\r\n}\r\n\r\nexport default ExportRow;","class ExportColumn{\r\n\tconstructor(value, component, width, height, depth){\r\n\t\tthis.value = value;\r\n\t\tthis.component = component || false;\r\n\t\tthis.width = width;\r\n\t\tthis.height = height;\r\n\t\tthis.depth = depth;\r\n\t}\r\n}\r\n\r\nexport default ExportColumn;","import Module from '../../core/Module.js';\r\n\r\nimport ExportRow from './ExportRow.js';\r\nimport ExportColumn from './ExportColumn.js';\r\n\r\nclass Export extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.config = {};\r\n\t\tthis.cloneTableStyle = true;\r\n\t\tthis.colVisProp = \"\";\r\n\r\n\t\tthis.registerTableOption(\"htmlOutputConfig\", false); //html outypu config\r\n\r\n\t\tthis.registerColumnOption(\"htmlOutput\");\r\n\t\tthis.registerColumnOption(\"titleHtmlOutput\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"getHtml\", this.getHtml.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tgenerateExportList(config, style, range, colVisProp){\r\n\t\tthis.cloneTableStyle = style;\r\n\t\tthis.config = config || {};\r\n\t\tthis.colVisProp = colVisProp;\r\n\r\n\t\tvar headers = this.config.columnHeaders !== false ? this.headersToExportRows(this.generateColumnGroupHeaders()) : [];\r\n\t\tvar body = this.bodyToExportRows(this.rowLookup(range));\r\n\r\n\t\treturn headers.concat(body);\r\n\t}\r\n\r\n\tgenereateTable(config, style, range, colVisProp){\r\n\t\tvar list = this.generateExportList(config, style, range, colVisProp);\r\n\r\n\t\treturn this.genereateTableElement(list);\r\n\t}\r\n\r\n\trowLookup(range){\r\n\t\tvar rows = [];\r\n\r\n\t\tif(typeof range == \"function\"){\r\n\t\t\trange.call(this.table).forEach((row) =>{\r\n\t\t\t\trow = this.table.rowManager.findRow(row);\r\n\r\n\t\t\t\tif(row){\r\n\t\t\t\t\trows.push(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tswitch(range){\r\n\t\t\t\tcase true:\r\n\t\t\t\tcase \"visible\":\r\n\t\t\t\trows = this.table.rowManager.getVisibleRows(false, true);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"all\":\r\n\t\t\t\trows = this.table.rowManager.rows;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"selected\":\r\n\t\t\t\trows = this.table.modules.selectRow.selectedRows;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"active\":\r\n\t\t\t\tdefault:\r\n\t\t\t\tif(this.table.options.pagination){\r\n\t\t\t\t\trows = this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length - 2);\r\n\t\t\t\t}else{\r\n\t\t\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn Object.assign([], rows);\r\n\t}\r\n\r\n\tgenerateColumnGroupHeaders(){\r\n\t\tvar output = [];\r\n\r\n\t\tvar columns = this.config.columnGroups !== false ? this.table.columnManager.columns : this.table.columnManager.columnsByIndex;\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\tvar colData = this.processColumnGroup(column);\r\n\r\n\t\t\tif(colData){\r\n\t\t\t\toutput.push(colData);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tprocessColumnGroup(column){\r\n\t\tvar subGroups = column.columns,\r\n\t\tmaxDepth = 0,\r\n\t\ttitle = column.definition[\"title\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))] || column.definition.title;\r\n\r\n\t\tvar groupData = {\r\n\t\t\ttitle:title,\r\n\t\t\tcolumn:column,\r\n\t\t\tdepth:1,\r\n\t\t};\r\n\r\n\t\tif(subGroups.length){\r\n\t\t\tgroupData.subGroups = [];\r\n\t\t\tgroupData.width = 0;\r\n\r\n\t\t\tsubGroups.forEach((subGroup) => {\r\n\t\t\t\tvar subGroupData = this.processColumnGroup(subGroup);\r\n\r\n\t\t\t\tif(subGroupData){\r\n\t\t\t\t\tgroupData.width += subGroupData.width;\r\n\t\t\t\t\tgroupData.subGroups.push(subGroupData);\r\n\r\n\t\t\t\t\tif(subGroupData.depth > maxDepth){\r\n\t\t\t\t\t\tmaxDepth = subGroupData.depth;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tgroupData.depth += maxDepth;\r\n\r\n\t\t\tif(!groupData.width){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.columnVisCheck(column)){\r\n\t\t\t\tgroupData.width = 1;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn groupData;\r\n\t}\r\n\r\n\tcolumnVisCheck(column){\r\n\t\treturn column.definition[this.colVisProp] !== false && (column.visible || (!column.visible && column.definition[this.colVisProp]));\r\n\t}\r\n\r\n\theadersToExportRows(columns){\r\n\t\tvar headers = [],\r\n\t\theaderDepth = 0,\r\n\t\texportRows = [];\r\n\r\n\t\tfunction parseColumnGroup(column, level){\r\n\r\n\t\t\tvar depth = headerDepth - level;\r\n\r\n\t\t\tif(typeof headers[level] === \"undefined\"){\r\n\t\t\t\theaders[level] = [];\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.height = column.subGroups ? 1 : (depth - column.depth) + 1;\r\n\r\n\t\t\theaders[level].push(column);\r\n\r\n\t\t\tif(column.height > 1){\r\n\t\t\t\tfor(let i = 1; i < column.height; i ++){\r\n\r\n\t\t\t\t\tif(typeof headers[level + i] === \"undefined\"){\r\n\t\t\t\t\t\theaders[level + i] = [];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\theaders[level + i].push(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(column.width > 1){\r\n\t\t\t\tfor(let i = 1; i < column.width; i ++){\r\n\t\t\t\t\theaders[level].push(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(column.subGroups){\r\n\t\t\t\tcolumn.subGroups.forEach(function(subGroup){\r\n\t\t\t\t\tparseColumnGroup(subGroup, level+1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//calculate maximum header debth\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tif(column.depth > headerDepth){\r\n\t\t\t\theaderDepth = column.depth;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tparseColumnGroup(column,0);\r\n\t\t});\r\n\r\n\t\theaders.forEach((header) => {\r\n\t\t\tvar columns = [];\r\n\r\n\t\t\theader.forEach((col) => {\r\n\t\t\t\tif(col){\r\n\t\t\t\t\tlet title = typeof col.title === \"undefined\" ? \"\" : col.title;\r\n\t\t\t\t\tcolumns.push(new ExportColumn(title, col.column.getComponent(), col.width, col.height, col.depth));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolumns.push(null);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\texportRows.push(new ExportRow(\"header\", columns));\r\n\t\t});\r\n\r\n\t\treturn exportRows;\r\n\t}\r\n\r\n\tbodyToExportRows(rows){\r\n\r\n\t\tvar columns = [];\r\n\t\tvar exportRows = [];\r\n\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tif (this.columnVisCheck(column)) {\r\n\t\t\t\tcolumns.push(column.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(this.config.columnCalcs !== false && this.table.modExists(\"columnCalcs\")){\r\n\t\t\tif(this.table.modules.columnCalcs.topInitialized){\r\n\t\t\t\trows.unshift(this.table.modules.columnCalcs.topRow);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modules.columnCalcs.botInitialized){\r\n\t\t\t\trows.push(this.table.modules.columnCalcs.botRow);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\trows = rows.filter((row) => {\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\treturn this.config.rowGroups !== false;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\treturn this.config.columnCalcs !== false;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\treturn !(this.table.options.dataTree && this.config.dataTree === false && row.modules.dataTree.parent);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\trows.forEach((row, i) => {\r\n\t\t\tvar rowData = row.getData(this.colVisProp);\r\n\t\t\tvar exportCols = [];\r\n\t\t\tvar indent = 0;\r\n\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\tindent = row.level;\r\n\t\t\t\texportCols.push(new ExportColumn(row.key, row.getComponent(), columns.length, 1));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\" :\r\n\t\t\t\tcase \"row\" :\r\n\t\t\t\tcolumns.forEach((col) => {\r\n\t\t\t\t\texportCols.push(new ExportColumn(col._column.getFieldValue(rowData), col, 1, 1));\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\r\n\t\t\t\t\tindent = row.modules.dataTree.index;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\texportRows.push(new ExportRow(row.type, exportCols, row.getComponent(), indent));\r\n\t\t});\r\n\r\n\t\treturn exportRows;\r\n\t}\r\n\r\n\tgenereateTableElement(list){\r\n\t\tvar table = document.createElement(\"table\"),\r\n\t\theaderEl = document.createElement(\"thead\"),\r\n\t\tbodyEl = document.createElement(\"tbody\"),\r\n\t\tstyles = this.lookupTableStyles(),\r\n\t\trowFormatter = this.table.options[\"rowFormatter\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))],\r\n\t\tsetup = {};\r\n\r\n\t\tsetup.rowFormatter = rowFormatter !== null ? rowFormatter : this.table.options.rowFormatter;\r\n\r\n\t\tif(this.table.options.dataTree &&this.config.dataTree !== false && this.table.modExists(\"columnCalcs\")){\r\n\t\t\tsetup.treeElementField = this.table.modules.dataTree.elementField;\r\n\t\t}\r\n\r\n\t\t//assign group header formatter\r\n\t\tsetup.groupHeader = this.table.options[\"groupHeader\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))];\r\n\r\n\t\tif(setup.groupHeader && !Array.isArray(setup.groupHeader)){\r\n\t\t\tsetup.groupHeader = [setup.groupHeader];\r\n\t\t}\r\n\r\n\t\ttable.classList.add(\"tabulator-print-table\");\r\n\r\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\"]);\r\n\r\n\r\n\t\tif(list.length > 1000){\r\n\t\t\tconsole.warn(\"It may take a long time to render an HTML table with more than 1000 rows\");\r\n\t\t}\r\n\r\n\t\tlist.forEach((row, i) => {\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"header\":\r\n\t\t\t\theaderEl.appendChild(this.genereateHeaderElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\tbodyEl.appendChild(this.genereateGroupElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\tbodyEl.appendChild(this.genereateCalcElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\tlet rowEl = this.genereateRowElement(row, setup, styles);\r\n\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\"]);\r\n\t\t\t\tbodyEl.appendChild(rowEl);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(headerEl.innerHTML){\r\n\t\t\ttable.appendChild(headerEl);\r\n\t\t}\r\n\r\n\t\ttable.appendChild(bodyEl);\r\n\r\n\r\n\t\tthis.mapElementStyles(this.table.element, table, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\"]);\r\n\t\treturn table;\r\n\t}\r\n\r\n\tlookupTableStyles(){\r\n\t\tvar styles = {};\r\n\r\n\t\t//lookup row styles\r\n\t\tif(this.cloneTableStyle && window.getComputedStyle){\r\n\t\t\tstyles.oddRow = this.table.element.querySelector(\".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.evenRow = this.table.element.querySelector(\".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.calcRow = this.table.element.querySelector(\".tabulator-row.tabulator-calcs\");\r\n\t\t\tstyles.firstRow = this.table.element.querySelector(\".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.firstGroup = this.table.element.getElementsByClassName(\"tabulator-group\")[0];\r\n\r\n\t\t\tif(styles.firstRow){\r\n\t\t\t\tstyles.styleCells = styles.firstRow.getElementsByClassName(\"tabulator-cell\");\r\n\t\t\t\tstyles.firstCell = styles.styleCells[0];\r\n\t\t\t\tstyles.lastCell = styles.styleCells[styles.styleCells.length - 1];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn styles;\r\n\t}\r\n\r\n\tgenereateHeaderElement(row, setup, styles){\r\n\t\tvar rowEl = document.createElement(\"tr\");\r\n\r\n\t\trow.columns.forEach((column) => {\r\n\t\t\tif(column){\r\n\t\t\t\tvar cellEl = document.createElement(\"th\");\r\n\t\t\t\tvar classNames = column.component._column.definition.cssClass ? column.component._column.definition.cssClass.split(\" \") : [];\r\n\r\n\t\t\t\tcellEl.colSpan = column.width;\r\n\t\t\t\tcellEl.rowSpan = column.height;\r\n\r\n\t\t\t\tcellEl.innerHTML = column.value;\r\n\r\n\t\t\t\tif(this.cloneTableStyle){\r\n\t\t\t\t\tcellEl.style.boxSizing = \"border-box\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tclassNames.forEach(function(className) {\r\n\t\t\t\t\tcellEl.classList.add(className);\r\n\t\t\t\t});\r\n\r\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\"]);\r\n\t\t\t\tthis.mapElementStyles(column.component._column.contentElement, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\"]);\r\n\r\n\t\t\t\tif(column.component._column.visible){\r\n\t\t\t\t\tthis.mapElementStyles(column.component.getElement(), cellEl, [\"width\"]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(column.component._column.definition.width){\r\n\t\t\t\t\t\tcellEl.style.width = column.component._column.definition.width + \"px\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(column.component._column.parent){\r\n\t\t\t\t\tthis.mapElementStyles(column.component._column.parent.groupElement, cellEl, [\"border-top\"]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowEl.appendChild(cellEl);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateGroupElement(row, setup, styles){\r\n\r\n\t\tvar rowEl = document.createElement(\"tr\"),\r\n\t\tcellEl = document.createElement(\"td\"),\r\n\t\tgroup = row.columns[0];\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-row\");\r\n\r\n\t\tif(setup.groupHeader && setup.groupHeader[row.indent]){\r\n\t\t\tgroup.value = setup.groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t}else{\r\n\t\t\tif(setup.groupHeader === false){\r\n\t\t\t\tgroup.value = group.value;\r\n\t\t\t}else{\r\n\t\t\t\tgroup.value = row.component._group.generator(group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcellEl.colSpan = group.width;\r\n\t\tcellEl.innerHTML = group.value;\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-group\");\r\n\t\trowEl.classList.add(\"tabulator-group-level-\" + row.indent);\r\n\r\n\t\tif(group.component.isVisible()){\r\n\t\t\trowEl.classList.add(\"tabulator-group-visible\");\r\n\t\t}\r\n\r\n\t\tthis.mapElementStyles(styles.firstGroup, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\r\n\t\tthis.mapElementStyles(styles.firstGroup, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\"]);\r\n\r\n\t\trowEl.appendChild(cellEl);\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateCalcElement(row, setup, styles){\r\n\t\tvar rowEl = this.genereateRowElement(row, setup, styles);\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-calcs\");\r\n\t\tthis.mapElementStyles(styles.calcRow, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateRowElement(row, setup, styles){\r\n\t\tvar rowEl = document.createElement(\"tr\");\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-row\");\r\n\r\n\t\trow.columns.forEach((col) => {\r\n\t\t\tif(col){\r\n\t\t\t\tvar cellEl = document.createElement(\"td\"),\r\n\t\t\t\tcolumn = col.component._column,\r\n\t\t\t\tindex = this.table.columnManager.findColumnIndex(column),\r\n\t\t\t\tvalue = col.value;\r\n\r\n\t\t\t\tvar cellWrapper = {\r\n\t\t\t\t\tmodules:{},\r\n\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetField:function(){\r\n\t\t\t\t\t\treturn column.definition.field;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\treturn cellEl;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetData:function(){\r\n\t\t\t\t\t\treturn row.component.getData();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\treturn row.component;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetComponent:function(){\r\n\t\t\t\t\t\treturn cellWrapper;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcolumn:column,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tvar classNames = column.definition.cssClass ? column.definition.cssClass.split(\" \") : [];\r\n\r\n\t\t\t\tclassNames.forEach(function(className) {\r\n\t\t\t\t\tcellEl.classList.add(className);\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.modExists(\"format\") && this.config.formatCells !== false){\r\n\t\t\t\t\tvalue = this.table.modules.format.formatExportValue(cellWrapper, this.colVisProp);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tvalue = JSON.stringify(value);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tvalue = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(value instanceof Node){\r\n\t\t\t\t\tcellEl.appendChild(value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcellEl.innerHTML = value;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(styles.styleCells[index] || styles.firstCell){\r\n\t\t\t\t\tthis.mapElementStyles(styles.styleCells[index] || styles.firstCell, 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\"]);\r\n\r\n\t\t\t\t\tif(column.definition.align){\r\n\t\t\t\t\t\tcellEl.style.textAlign = column.definition.align;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\r\n\t\t\t\t\tif((setup.treeElementField && setup.treeElementField == column.field) || (!setup.treeElementField && i == 0)){\r\n\t\t\t\t\t\tif(row.component._row.modules.dataTree.controlEl){\r\n\t\t\t\t\t\t\tcellEl.insertBefore(row.component._row.modules.dataTree.controlEl.cloneNode(true), cellEl.firstChild);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(row.component._row.modules.dataTree.branchEl){\r\n\t\t\t\t\t\t\tcellEl.insertBefore(row.component._row.modules.dataTree.branchEl.cloneNode(true), cellEl.firstChild);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowEl.appendChild(cellEl);\r\n\r\n\t\t\t\tif(cellWrapper.modules.format && cellWrapper.modules.format.renderedCallback){\r\n\t\t\t\t\tcellWrapper.modules.format.renderedCallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(setup.rowFormatter && this.config.formatCells !== false){\r\n\t\t\t\t\tsetup.rowFormatter(row.component);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateHTMLTable(list){\r\n\t\tvar holder = document.createElement(\"div\");\r\n\r\n\t\tholder.appendChild(this.genereateTableElement(list));\r\n\r\n\t\treturn holder.innerHTML;\r\n\t}\r\n\r\n\tgetHtml(visible, style, config, colVisProp){\r\n\t\tvar list = this.generateExportList(config || this.table.options.htmlOutputConfig, style, visible, colVisProp || \"htmlOutput\");\r\n\r\n\t\treturn this.genereateHTMLTable(list);\r\n\t}\r\n\r\n\tmapElementStyles(from, to, props){\r\n\t\tif(this.cloneTableStyle && from && to){\r\n\r\n\t\t\tvar lookup = {\r\n\t\t\t\t\"background-color\" : \"backgroundColor\",\r\n\t\t\t\t\"color\" : \"fontColor\",\r\n\t\t\t\t\"width\" : \"width\",\r\n\t\t\t\t\"font-weight\" : \"fontWeight\",\r\n\t\t\t\t\"font-family\" : \"fontFamily\",\r\n\t\t\t\t\"font-size\" : \"fontSize\",\r\n\t\t\t\t\"text-align\" : \"textAlign\",\r\n\t\t\t\t\"border-top\" : \"borderTop\",\r\n\t\t\t\t\"border-left\" : \"borderLeft\",\r\n\t\t\t\t\"border-right\" : \"borderRight\",\r\n\t\t\t\t\"border-bottom\" : \"borderBottom\",\r\n\t\t\t\t\"padding-top\" : \"paddingTop\",\r\n\t\t\t\t\"padding-left\" : \"paddingLeft\",\r\n\t\t\t\t\"padding-right\" : \"paddingRight\",\r\n\t\t\t\t\"padding-bottom\" : \"paddingBottom\",\r\n\t\t\t};\r\n\r\n\t\t\tif(window.getComputedStyle){\r\n\t\t\t\tvar fromStyle = window.getComputedStyle(from);\r\n\r\n\t\t\t\tprops.forEach(function(prop){\r\n\t\t\t\t\tto.style[lookup[prop]] = fromStyle.getPropertyValue(prop);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nExport.moduleName = \"export\";\r\n\r\nexport default Export;\r\n","export default {\r\n\r\n\t//equal to\r\n\t\"=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal == filterVal ? true : false;\r\n\t},\r\n\r\n\t//less than\r\n\t\"<\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal < filterVal ? true : false;\r\n\t},\r\n\r\n\t//less than or equal to\r\n\t\"<=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal <= filterVal ? true : false;\r\n\t},\r\n\r\n\t//greater than\r\n\t\">\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal > filterVal ? true : false;\r\n\t},\r\n\r\n\t//greater than or equal to\r\n\t\">=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal >= filterVal ? true : false;\r\n\t},\r\n\r\n\t//not equal to\r\n\t\"!=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal != filterVal ? true : false;\r\n\t},\r\n\r\n\t\"regex\":function(filterVal, rowVal, rowData, filterParams){\r\n\r\n\t\tif(typeof filterVal == \"string\"){\r\n\t\t\tfilterVal = new RegExp(filterVal);\r\n\t\t}\r\n\r\n\t\treturn filterVal.test(rowVal);\r\n\t},\r\n\r\n\t//contains the string\r\n\t\"like\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().indexOf(filterVal.toLowerCase()) > -1;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//contains the keywords\r\n\t\"keywords\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tvar keywords = filterVal.toLowerCase().split(typeof filterParams.separator === \"undefined\" ? \" \" : filterParams.separator),\r\n\t\tvalue = String(rowVal === null || typeof rowVal === \"undefined\" ? \"\" : rowVal).toLowerCase(),\r\n\t\tmatches = [];\r\n\r\n\t\tkeywords.forEach((keyword) =>{\r\n\t\t\tif(value.includes(keyword)){\r\n\t\t\t\tmatches.push(true);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn filterParams.matchAll ? matches.length === keywords.length : !!matches.length;\r\n\t},\r\n\r\n\t//starts with the string\r\n\t\"starts\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().startsWith(filterVal.toLowerCase());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//ends with the string\r\n\t\"ends\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().endsWith(filterVal.toLowerCase());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//in array\r\n\t\"in\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(Array.isArray(filterVal)){\r\n\t\t\treturn filterVal.length ? filterVal.indexOf(rowVal) > -1 : true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Filter Error - filter value is not an array:\", filterVal);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultFilters from './defaults/filters.js';\r\n\r\nclass Filter extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.filterList = []; //hold filter list\r\n\t\tthis.headerFilters = {}; //hold column filters\r\n\t\tthis.headerFilterColumns = []; //hold columns that use header filters\r\n\r\n\t\tthis.prevHeaderFilterChangeCheck = \"\";\r\n\t\tthis.prevHeaderFilterChangeCheck = \"{}\";\r\n\r\n\t\tthis.changed = false; //has filtering changed since last render\r\n\t\tthis.tableInitialized = false;\r\n\r\n\t\tthis.registerTableOption(\"filterMode\", \"local\"); //local or remote filtering\r\n\r\n\t\tthis.registerTableOption(\"initialFilter\", false); //initial filtering criteria\r\n\t\tthis.registerTableOption(\"initialHeaderFilter\", false); //initial header filtering criteria\r\n\t\tthis.registerTableOption(\"headerFilterLiveFilterDelay\", 300); //delay before updating column after user types in header filter\r\n\r\n\t\tthis.registerColumnOption(\"headerFilter\");\r\n\t\tthis.registerColumnOption(\"headerFilterPlaceholder\");\r\n\t\tthis.registerColumnOption(\"headerFilterParams\");\r\n\t\tthis.registerColumnOption(\"headerFilterEmptyCheck\");\r\n\t\tthis.registerColumnOption(\"headerFilterFunc\");\r\n\t\tthis.registerColumnOption(\"headerFilterFuncParams\");\r\n\t\tthis.registerColumnOption(\"headerFilterLiveFilter\");\r\n\r\n\t\tthis.registerTableFunction(\"searchRows\", this.searchRows.bind(this));\r\n\t\tthis.registerTableFunction(\"searchData\", this.searchData.bind(this));\r\n\r\n\t\tthis.registerTableFunction(\"setFilter\", this.userSetFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"refreshFilter\", this.userRefreshFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"addFilter\", this.userAddFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"getFilters\", this.getFilters.bind(this));\r\n\t\tthis.registerTableFunction(\"setHeaderFilterFocus\", this.userSetHeaderFilterFocus.bind(this));\r\n\t\tthis.registerTableFunction(\"getHeaderFilterValue\", this.userGetHeaderFilterValue.bind(this));\r\n\t\tthis.registerTableFunction(\"setHeaderFilterValue\", this.userSetHeaderFilterValue.bind(this));\r\n\t\tthis.registerTableFunction(\"getHeaderFilters\", this.getHeaderFilters.bind(this));\r\n\t\tthis.registerTableFunction(\"removeFilter\", this.userRemoveFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"clearFilter\", this.userClearFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"clearHeaderFilter\", this.userClearHeaderFilter.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"column\", \"headerFilterFocus\", this.setHeaderFilterFocus.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"reloadHeaderFilter\", this.reloadHeaderFilter.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"getHeaderFilterValue\", this.getHeaderFilterValue.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"setHeaderFilterValue\", this.setHeaderFilterValue.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumnHeaderFilter.bind(this));\r\n\t\tthis.subscribe(\"column-width-fit-before\", this.hideHeaderFilterElements.bind(this));\r\n\t\tthis.subscribe(\"column-width-fit-after\", this.showHeaderFilterElements.bind(this));\r\n\t\tthis.subscribe(\"table-built\", this.tableBuilt.bind(this));\r\n\r\n\t\tif(this.table.options.filterMode === \"remote\"){\r\n\t\t\tthis.subscribe(\"data-params\", this.remoteFilterParams.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerDataHandler(this.filter.bind(this), 10);\r\n\t}\r\n\r\n\ttableBuilt(){\r\n\t\tif(this.table.options.initialFilter){\r\n\t\t\tthis.setFilter(this.table.options.initialFilter);\r\n\t\t}\r\n\r\n\t\tif(this.table.options.initialHeaderFilter){\r\n\t\t\tthis.table.options.initialHeaderFilter.forEach((item) => {\r\n\r\n\t\t\t\tvar column = this.table.columnManager.findColumn(item.field);\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tthis.setHeaderFilterValue(column, item.value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", item.field);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.tableInitialized = true;\r\n\t}\r\n\r\n\tremoteFilterParams(data, config, silent, params){\r\n\t\tparams.filter = this.getFilters(true, true);\r\n\t\treturn params;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\t//set standard filters\r\n\tuserSetFilter(field, type, value, params){\r\n\t\tthis.setFilter(field, type, value, params);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//set standard filters\r\n\tuserRefreshFilter(){\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//add filter to array\r\n\tuserAddFilter(field, type, value, params){\r\n\t\tthis.addFilter(field, type, value, params);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\tuserSetHeaderFilterFocus(field){\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tthis.setHeaderFilterFocus(column);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Focus Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tuserGetHeaderFilterValue(field) {\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn this.getHeaderFilterValue(column);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", field);\r\n\t\t}\r\n\t}\r\n\r\n\tuserSetHeaderFilterValue(field, value){\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tthis.setHeaderFilterValue(column, value);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//remove filter from array\r\n\tuserRemoveFilter(field, type, value){\r\n\t\tthis.removeFilter(field, type, value);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//clear filters\r\n\tuserClearFilter(all){\r\n\t\tthis.clearFilter(all);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//clear header filters\r\n\tuserClearHeaderFilter(){\r\n\t\tthis.clearHeaderFilter();\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\r\n\t//search for specific row components\r\n\tsearchRows(field, type, value){\r\n\t\treturn this.search(\"rows\", field, type, value);\r\n\t}\r\n\r\n\t//search for specific data\r\n\tsearchData(field, type, value){\r\n\t\treturn this.search(\"data\", field, type, value);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnHeaderFilter(column){\r\n\t\tvar def = column.definition;\r\n\r\n\t\tif(def.headerFilter){\r\n\r\n\t\t\tif(typeof def.headerFilterPlaceholder !== \"undefined\" && def.field){\r\n\t\t\t\tthis.module(\"localize\").setHeaderFilterColumnPlaceholder(def.field, def.headerFilterPlaceholder);\r\n\t\t\t}\r\n\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column header filter\r\n\tinitializeColumn(column, value){\r\n\t\tvar self = this,\r\n\t\tfield = column.getField(),\r\n\t\tparams;\r\n\r\n\t\t//handle successfull value change\r\n\t\tfunction success(value){\r\n\t\t\tvar filterType = (column.modules.filter.tagType == \"input\" && column.modules.filter.attrType == \"text\") || column.modules.filter.tagType == \"textarea\" ? \"partial\" : \"match\",\r\n\t\t\ttype = \"\",\r\n\t\t\tfilterChangeCheck = \"\",\r\n\t\t\tfilterFunc;\r\n\r\n\t\t\tif(typeof column.modules.filter.prevSuccess === \"undefined\" || column.modules.filter.prevSuccess !== value){\r\n\r\n\t\t\t\tcolumn.modules.filter.prevSuccess = value;\r\n\r\n\t\t\t\tif(!column.modules.filter.emptyFunc(value)){\r\n\t\t\t\t\tcolumn.modules.filter.value = value;\r\n\r\n\t\t\t\t\tswitch(typeof column.definition.headerFilterFunc){\r\n\t\t\t\t\t\tcase \"string\":\r\n\t\t\t\t\t\tif(Filter.filters[column.definition.headerFilterFunc]){\r\n\t\t\t\t\t\t\ttype = column.definition.headerFilterFunc;\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\r\n\t\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\t\tparams = typeof params === \"function\" ? params(value, fieldVal, data) : params;\r\n\r\n\t\t\t\t\t\t\t\treturn Filter.filters[column.definition.headerFilterFunc](value, fieldVal, data, params);\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tconsole.warn(\"Header Filter Error - Matching filter function not found: \", column.definition.headerFilterFunc);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\r\n\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\tparams = typeof params === \"function\" ? params(value, fieldVal, data) : params;\r\n\r\n\t\t\t\t\t\t\treturn column.definition.headerFilterFunc(value, fieldVal, data, params);\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\ttype = filterFunc;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(!filterFunc){\r\n\t\t\t\t\t\tswitch(filterType){\r\n\t\t\t\t\t\t\tcase \"partial\":\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\tvar colVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\t\tif(typeof colVal !== 'undefined' && colVal !== null){\r\n\t\t\t\t\t\t\t\t\treturn String(colVal).toLowerCase().indexOf(String(value).toLowerCase()) > -1;\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\ttype = \"like\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\treturn column.getFieldValue(data) == value;\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\ttype = \"=\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tself.headerFilters[field] = {value:value, func:filterFunc, type:type, params:params || {}};\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdelete self.headerFilters[field];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfilterChangeCheck = JSON.stringify(self.headerFilters);\r\n\r\n\t\t\t\tif(self.prevHeaderFilterChangeCheck !== filterChangeCheck){\r\n\t\t\t\t\tself.prevHeaderFilterChangeCheck = filterChangeCheck;\r\n\r\n\t\t\t\t\tself.trackChanges();\r\n\t\t\t\t\tself.refreshFilter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tcolumn.modules.filter = {\r\n\t\t\tsuccess:success,\r\n\t\t\tattrType:false,\r\n\t\t\ttagType:false,\r\n\t\t\temptyFunc:false,\r\n\t\t};\r\n\r\n\t\tthis.generateHeaderFilterElement(column);\r\n\t}\r\n\r\n\tgenerateHeaderFilterElement(column, initialValue, reinitialize){\r\n\t\tvar self = this,\r\n\t\tsuccess = column.modules.filter.success,\r\n\t\tfield = column.getField(),\r\n\t\tfilterElement, editor, editorElement, cellWrapper, typingTimer, searchTrigger, params;\r\n\r\n\t\t//handle aborted edit\r\n\t\tfunction cancel(){}\r\n\r\n\t\tif(column.modules.filter.headerElement && column.modules.filter.headerElement.parentNode){\r\n\t\t\tcolumn.contentElement.removeChild(column.modules.filter.headerElement.parentNode);\r\n\t\t}\r\n\r\n\t\tif(field){\r\n\r\n\t\t\t//set empty value function\r\n\t\t\tcolumn.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function(value){\r\n\t\t\t\treturn !value && value !== \"0\" && value !== 0;\r\n\t\t\t};\r\n\r\n\t\t\tfilterElement = document.createElement(\"div\");\r\n\t\t\tfilterElement.classList.add(\"tabulator-header-filter\");\r\n\r\n\t\t\t//set column editor\r\n\t\t\tswitch(typeof column.definition.headerFilter){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(self.table.modules.edit.editors[column.definition.headerFilter]){\r\n\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.headerFilter];\r\n\r\n\t\t\t\t\tif((column.definition.headerFilter === \"tick\" || column.definition.headerFilter === \"tickCross\") && !column.definition.headerFilterEmptyCheck){\r\n\t\t\t\t\t\tcolumn.modules.filter.emptyFunc = function(value){\r\n\t\t\t\t\t\t\treturn value !== true && value !== false;\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Filter Error - Cannot build header filter, No such editor found: \", column.definition.editor);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\teditor = column.definition.headerFilter;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tif(column.modules.edit && column.modules.edit.editor){\r\n\t\t\t\t\teditor = column.modules.edit.editor;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]){\r\n\t\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.formatter];\r\n\r\n\t\t\t\t\t\tif((column.definition.formatter === \"tick\" || column.definition.formatter === \"tickCross\") && !column.definition.headerFilterEmptyCheck){\r\n\t\t\t\t\t\t\tcolumn.modules.filter.emptyFunc = function(value){\r\n\t\t\t\t\t\t\t\treturn value !== true && value !== false;\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\teditor = self.table.modules.edit.editors[\"input\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(editor){\r\n\r\n\t\t\t\tcellWrapper = {\r\n\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\treturn typeof initialValue !== \"undefined\" ? initialValue : \"\";\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetField:function(){\r\n\t\t\t\t\t\treturn column.definition.field;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\treturn filterElement;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\tnormalizeHeight:function(){\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\tparams = column.definition.headerFilterParams || {};\r\n\r\n\t\t\t\tparams = typeof params === \"function\" ? params.call(self.table, cellWrapper) : params;\r\n\r\n\t\t\t\teditorElement = editor.call(this.table.modules.edit, cellWrapper, function(){}, success, cancel, params);\r\n\r\n\t\t\t\tif(!editorElement){\r\n\t\t\t\t\tconsole.warn(\"Filter Error - Cannot add filter to \" + field + \" column, editor returned a value of false\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!(editorElement instanceof Node)){\r\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);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//set Placeholder Text\r\n\t\t\t\tif(field){\r\n\t\t\t\t\tself.langBind(\"headerFilters|columns|\" + column.definition.field, function(value){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"placeholder\", typeof value !== \"undefined\" && value ? value : self.langText(\"headerFilters|default\"));\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.langBind(\"headerFilters|default\", function(value){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"placeholder\", value);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//focus on element on click\r\n\t\t\t\teditorElement.addEventListener(\"click\", function(e){\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\teditorElement.focus();\r\n\t\t\t\t});\r\n\r\n\t\t\t\teditorElement.addEventListener(\"focus\", (e) => {\r\n\t\t\t\t\tvar left = this.table.columnManager.element.scrollLeft;\r\n\r\n\t\t\t\t\tvar headerPos = this.table.rowManager.element.scrollLeft + parseInt(this.table.columnManager.element.style.marginLeft);\r\n\r\n\t\t\t\t\tif(left !== headerPos){\r\n\t\t\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\t\t\tthis.table.columnManager.scrollHorizontal(left);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\t//live update filters as user types\r\n\t\t\t\ttypingTimer = false;\r\n\r\n\t\t\t\tsearchTrigger = function(e){\r\n\t\t\t\t\tif(typingTimer){\r\n\t\t\t\t\t\tclearTimeout(typingTimer);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ttypingTimer = setTimeout(function(){\r\n\t\t\t\t\t\tsuccess(editorElement.value);\r\n\t\t\t\t\t},self.table.options.headerFilterLiveFilterDelay);\r\n\t\t\t\t};\r\n\r\n\t\t\t\tcolumn.modules.filter.headerElement = editorElement;\r\n\t\t\t\tcolumn.modules.filter.attrType = editorElement.hasAttribute(\"type\") ? editorElement.getAttribute(\"type\").toLowerCase() : \"\" ;\r\n\t\t\t\tcolumn.modules.filter.tagType = editorElement.tagName.toLowerCase();\r\n\r\n\t\t\t\tif(column.definition.headerFilterLiveFilter !== false){\r\n\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\t!(\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === 'autocomplete' ||\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === 'tickCross' ||\r\n\t\t\t\t\t\t\t((column.definition.editor === 'autocomplete' ||\r\n\t\t\t\t\t\t\t\tcolumn.definition.editor === 'tickCross') &&\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === true)\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\teditorElement.addEventListener(\"keyup\", searchTrigger);\r\n\t\t\t\t\teditorElement.addEventListener(\"search\", searchTrigger);\r\n\r\n\r\n\t\t\t\t\t//update number filtered columns on change\r\n\t\t\t\t\tif(column.modules.filter.attrType == \"number\"){\r\n\t\t\t\t\t\teditorElement.addEventListener(\"change\", function(e){\r\n\t\t\t\t\t\t\tsuccess(editorElement.value);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//change text inputs to search inputs to allow for clearing of field\r\n\t\t\t\t\tif(column.modules.filter.attrType == \"text\" && this.table.browser !== \"ie\"){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"type\", \"search\");\r\n\t\t\t\t\t\t// editorElement.off(\"change blur\"); //prevent blur from triggering filter and preventing selection click\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\t//prevent input and select elements from propegating click to column sorters etc\r\n\t\t\t\t\tif(column.modules.filter.tagType == \"input\" || column.modules.filter.tagType == \"select\" || column.modules.filter.tagType == \"textarea\"){\r\n\t\t\t\t\t\teditorElement.addEventListener(\"mousedown\",function(e){\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfilterElement.appendChild(editorElement);\r\n\r\n\t\t\t\tcolumn.contentElement.appendChild(filterElement);\r\n\r\n\t\t\t\tif(!reinitialize){\r\n\t\t\t\t\tself.headerFilterColumns.push(column);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Filter Error - Cannot add header filter, column has no field set:\", column.definition.title);\r\n\t\t}\r\n\t}\r\n\r\n\t//hide all header filter elements (used to ensure correct column widths in \"fitData\" layout mode)\r\n\thideHeaderFilterElements(){\r\n\t\tthis.headerFilterColumns.forEach(function(column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tcolumn.modules.filter.headerElement.style.display = 'none';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//show all header filter elements (used to ensure correct column widths in \"fitData\" layout mode)\r\n\tshowHeaderFilterElements(){\r\n\t\tthis.headerFilterColumns.forEach(function(column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tcolumn.modules.filter.headerElement.style.display = '';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//programatically set focus of header filter\r\n\tsetHeaderFilterFocus(column){\r\n\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\tcolumn.modules.filter.headerElement.focus();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Focus Error - No header filter set on column:\", column.getField());\r\n\t\t}\r\n\t}\r\n\r\n\t//programmatically get value of header filter\r\n\tgetHeaderFilterValue(column){\r\n\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\treturn column.modules.filter.headerElement.value;\r\n\t\t} else {\r\n\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t}\r\n\t}\r\n\r\n\t//programatically set value of header filter\r\n\tsetHeaderFilterValue(column, value){\r\n\t\tif (column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tthis.generateHeaderFilterElement(column, value, true);\r\n\t\t\t\tcolumn.modules.filter.success(value);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treloadHeaderFilter(column){\r\n\t\tif (column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tthis.generateHeaderFilterElement(column, column.modules.filter.value, true);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trefreshFilter(){\r\n\t\tif(this.tableInitialized){\r\n\t\t\tif(this.table.options.filterMode === \"remote\"){\r\n\t\t\t\tthis.reloadData();\r\n\t\t\t}else{\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//TODO - Persist left position of row manager\r\n\t\t// left = this.scrollLeft;\r\n\t\t// this.scrollHorizontal(left);\r\n\t}\r\n\r\n\t//check if the filters has changed since last use\r\n\ttrackChanges(){\r\n\t\tthis.changed = true;\r\n\t\tthis.dispatch(\"filter-changed\");\r\n\t}\r\n\r\n\t//check if the filters has changed since last use\r\n\thasChanged(){\r\n\t\tvar changed = this.changed;\r\n\t\tthis.changed = false;\r\n\t\treturn changed;\r\n\t}\r\n\r\n\t//set standard filters\r\n\tsetFilter(field, type, value, params){\r\n\t\tthis.filterList = [];\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value, params:params}];\r\n\t\t}\r\n\r\n\t\tthis.addFilter(field);\r\n\t}\r\n\r\n\t//add filter to array\r\n\taddFilter(field, type, value, params){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value, params:params}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\tthis.filterList.push(filter);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.trackChanges();\r\n\t\t}\r\n\t}\r\n\r\n\tfindFilter(filter){\r\n\t\tvar column;\r\n\r\n\t\tif(Array.isArray(filter)){\r\n\t\t\treturn this.findSubFilters(filter);\r\n\t\t}\r\n\r\n\t\tvar filterFunc = false;\r\n\r\n\t\tif(typeof filter.field == \"function\"){\r\n\t\t\tfilterFunc = function(data){\r\n\t\t\t\treturn filter.field(data, filter.type || {})// pass params to custom filter function\r\n\t\t\t};\r\n\t\t}else{\r\n\r\n\t\t\tif(Filter.filters[filter.type]){\r\n\r\n\t\t\t\tcolumn = this.table.columnManager.getColumnByField(filter.field);\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\treturn Filter.filters[filter.type](filter.value, column.getFieldValue(data), data, filter.params || {});\r\n\t\t\t\t\t};\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\treturn Filter.filters[filter.type](filter.value, data[filter.field], data, filter.params || {});\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Filter Error - No such filter type found, ignoring: \", filter.type);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfilter.func = filterFunc;\r\n\r\n\t\treturn filter.func ? filter : false;\r\n\t}\r\n\r\n\tfindSubFilters(filters){\r\n\t\tvar output = [];\r\n\r\n\t\tfilters.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\toutput.push(filter);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output.length ? output : false;\r\n\t}\r\n\r\n\t//get all filters\r\n\tgetFilters(all, ajax){\r\n\t\tvar output = [];\r\n\r\n\t\tif(all){\r\n\t\t\toutput = this.getHeaderFilters();\r\n\t\t}\r\n\r\n\t\tif(ajax){\r\n\t\t\toutput.forEach(function(item){\r\n\t\t\t\tif(typeof item.type == \"function\"){\r\n\t\t\t\t\titem.type = \"function\";\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\toutput = output.concat(this.filtersToArray(this.filterList, ajax));\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//filter to Object\r\n\tfiltersToArray(filterList, ajax){\r\n\t\tvar output = [];\r\n\r\n\t\tfilterList.forEach((filter) => {\r\n\t\t\tvar item;\r\n\r\n\t\t\tif(Array.isArray(filter)){\r\n\t\t\t\toutput.push(this.filtersToArray(filter, ajax));\r\n\t\t\t}else{\r\n\t\t\t\titem = {field:filter.field, type:filter.type, value:filter.value}\r\n\r\n\t\t\t\tif(ajax){\r\n\t\t\t\t\tif(typeof item.type == \"function\"){\r\n\t\t\t\t\t\titem.type = \"function\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\toutput.push(item);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//get all filters\r\n\tgetHeaderFilters(){\r\n\t\tvar output = [];\r\n\r\n\t\tfor(var key in this.headerFilters){\r\n\t\t\toutput.push({field:key, type:this.headerFilters[key].type, value:this.headerFilters[key].value});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//remove filter from array\r\n\tremoveFilter(field, type, value){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tvar index = -1;\r\n\r\n\t\t\tif(typeof filter.field == \"object\"){\r\n\t\t\t\tindex = this.filterList.findIndex((element) => {\r\n\t\t\t\t\treturn filter === element;\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tindex = this.filterList.findIndex((element) => {\r\n\t\t\t\t\treturn filter.field === element.field && filter.type === element.type && filter.value === element.value;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.filterList.splice(index, 1);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Filter Error - No matching filter type found, ignoring: \", filter.type);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//clear filters\r\n\tclearFilter(all){\r\n\t\tthis.filterList = [];\r\n\r\n\t\tif(all){\r\n\t\t\tthis.clearHeaderFilter();\r\n\t\t}\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//clear header filters\r\n\tclearHeaderFilter(){\r\n\t\tthis.headerFilters = {};\r\n\t\tthis.prevHeaderFilterChangeCheck = \"{}\";\r\n\r\n\t\tthis.headerFilterColumns.forEach((column) => {\r\n\t\t\tif(typeof column.modules.filter.value !== \"undefined\"){\r\n\t\t\t\tdelete column.modules.filter.value;\r\n\t\t\t}\r\n\t\t\tcolumn.modules.filter.prevSuccess = undefined;\r\n\t\t\tthis.reloadHeaderFilter(column);\r\n\t\t});\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//search data and return matching rows\r\n\tsearch (searchType, field, type, value){\r\n\t\tvar activeRows = [],\r\n\t\tfilterList = [];\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\tfilterList.push(filter);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\tvar match = true;\r\n\r\n\t\t\tfilterList.forEach((filter) => {\r\n\t\t\t\tif(!this.filterRecurse(filter, row.getData())){\r\n\t\t\t\t\tmatch = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tactiveRows.push(searchType === \"data\" ? row.getData(\"data\") : row.getComponent());\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\t\treturn activeRows;\r\n\t}\r\n\r\n\t//filter row array\r\n\tfilter(rowList, filters){\r\n\t\tvar activeRows = [],\r\n\t\tactiveRowComponents = [];\r\n\r\n\t\tif(this.subscribedExternal(\"dataFiltering\")){\r\n\t\t\tthis.dispatchExternal(\"dataFiltering\", this.getFilters());\r\n\t\t}\r\n\r\n\t\tif(this.table.options.filterMode !== \"remote\" && (this.filterList.length || Object.keys(this.headerFilters).length)){\r\n\r\n\t\t\trowList.forEach((row) => {\r\n\t\t\t\tif(this.filterRow(row)){\r\n\t\t\t\t\tactiveRows.push(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t}else{\r\n\t\t\tactiveRows = rowList.slice(0);\r\n\t\t}\r\n\r\n\t\tif(this.subscribedExternal(\"dataFiltered\")){\r\n\r\n\t\t\tactiveRows.forEach((row) => {\r\n\t\t\t\tactiveRowComponents.push(row.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatchExternal(\"dataFiltered\", this.getFilters(), activeRowComponents);\r\n\t\t}\r\n\r\n\t\treturn activeRows;\r\n\t}\r\n\r\n\t//filter individual row\r\n\tfilterRow(row, filters){\r\n\t\tvar match = true,\r\n\t\tdata = row.getData();\r\n\r\n\t\tthis.filterList.forEach((filter) => {\r\n\t\t\tif(!this.filterRecurse(filter, data)){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\tfor(var field in this.headerFilters){\r\n\t\t\tif(!this.headerFilters[field].func(data)){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tfilterRecurse(filter, data){\r\n\t\tvar match = false;\r\n\r\n\t\tif(Array.isArray(filter)){\r\n\t\t\tfilter.forEach((subFilter) => {\r\n\t\t\t\tif(this.filterRecurse(subFilter, data)){\r\n\t\t\t\t\tmatch = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tmatch = filter.func(data);\r\n\t\t}\r\n\r\n\t\treturn match;\r\n\t}\r\n}\r\n\r\nFilter.moduleName = \"filter\";\r\n\r\n//load defaults\r\nFilter.filters = defaultFilters;\r\n\r\nexport default Filter;","import plaintext from './formatters/plaintext.js';\r\nimport html from './formatters/html.js';\r\nimport textarea from './formatters/textarea.js';\r\nimport money from './formatters/money.js';\r\nimport link from './formatters/link.js';\r\nimport image from './formatters/image.js';\r\nimport tickCross from './formatters/tickCross.js';\r\nimport datetime from './formatters/datetime.js';\r\nimport datetimediff from './formatters/datetimediff.js';\r\nimport lookup from './formatters/lookup.js';\r\nimport star from './formatters/star.js';\r\nimport traffic from './formatters/traffic.js';\r\nimport progress from './formatters/progress.js';\r\nimport color from './formatters/color.js';\r\nimport buttonTick from './formatters/buttonTick.js';\r\nimport buttonCross from './formatters/buttonCross.js';\r\nimport rownum from './formatters/rownum.js';\r\nimport handle from './formatters/handle.js';\r\nimport responsiveCollapse from './formatters/responsiveCollapse.js';\r\nimport rowSelection from './formatters/rowSelection.js';\r\n\r\nexport default {\r\n\tplaintext:plaintext,\r\n\thtml:html,\r\n\ttextarea:textarea,\r\n\tmoney:money,\r\n\tlink:link,\r\n\timage:image,\r\n\ttickCross:tickCross,\r\n\tdatetime:datetime,\r\n\tdatetimediff:datetimediff,\r\n\tlookup:lookup,\r\n\tstar:star,\r\n\ttraffic:traffic,\r\n\tprogress:progress,\r\n\tcolor:color,\r\n\tbuttonTick:buttonTick,\r\n\tbuttonCross:buttonCross,\r\n\trownum:rownum,\r\n\thandle:handle,\r\n\tresponsiveCollapse:responsiveCollapse,\r\n\trowSelection:rowSelection,\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn cell.getValue();\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().style.whiteSpace = \"pre-wrap\";\r\n\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar floatVal = parseFloat(cell.getValue()),\r\n\tsign = \"\",\r\n\tnumber, integer, decimal, rgx;\r\n\r\n\tvar decimalSym = formatterParams.decimal || \".\";\r\n\tvar thousandSym = formatterParams.thousand || \",\";\r\n\tvar negativeSign = formatterParams.negativeSign || \"-\";\r\n\tvar symbol = formatterParams.symbol || \"\";\r\n\tvar after = !!formatterParams.symbolAfter;\r\n\tvar precision = typeof formatterParams.precision !== \"undefined\" ? formatterParams.precision : 2;\r\n\r\n\tif(isNaN(floatVal)){\r\n\t\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n\t}\r\n\r\n\tif(floatVal < 0){\r\n\t\tfloatVal = Math.abs(floatVal);\r\n\t\tsign = negativeSign;\r\n\t}\r\n\r\n\tnumber = precision !== false ? floatVal.toFixed(precision) : floatVal;\r\n\tnumber = String(number).split(\".\");\r\n\r\n\tinteger = number[0];\r\n\tdecimal = number.length > 1 ? decimalSym + number[1] : \"\";\r\n\r\n\trgx = /(\\d+)(\\d{3})/;\r\n\r\n\twhile (rgx.test(integer)){\r\n\t\tinteger = integer.replace(rgx, \"$1\" + thousandSym + \"$2\");\r\n\t}\r\n\r\n\treturn after ? sign + integer + decimal + symbol : sign + symbol + integer + decimal;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\turlPrefix = formatterParams.urlPrefix || \"\",\r\n\tdownload = formatterParams.download,\r\n\tlabel = value,\r\n\tel = document.createElement(\"a\"),\r\n\tdata;\r\n\r\n\tif(formatterParams.labelField){\r\n\t\tdata = cell.getData();\r\n\t\tlabel = data[formatterParams.labelField];\r\n\t}\r\n\r\n\tif(formatterParams.label){\r\n\t\tswitch(typeof formatterParams.label){\r\n\t\t\tcase \"string\":\r\n\t\t\tlabel = formatterParams.label;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tlabel = formatterParams.label(cell);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(label){\r\n\t\tif(formatterParams.urlField){\r\n\t\t\tdata = cell.getData();\r\n\t\t\tvalue = data[formatterParams.urlField];\r\n\t\t}\r\n\r\n\t\tif(formatterParams.url){\r\n\t\t\tswitch(typeof formatterParams.url){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tvalue = formatterParams.url;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tvalue = formatterParams.url(cell);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tel.setAttribute(\"href\", urlPrefix + value);\r\n\r\n\t\tif(formatterParams.target){\r\n\t\t\tel.setAttribute(\"target\", formatterParams.target);\r\n\t\t}\r\n\r\n\t\tif(formatterParams.download){\r\n\r\n\t\t\tif(typeof download == \"function\"){\r\n\t\t\t\tdownload = download(cell);\r\n\t\t\t}else{\r\n\t\t\t\tdownload = download === true ? \"\" : download;\r\n\t\t\t}\r\n\r\n\t\t\tel.setAttribute(\"download\", download);\r\n\t\t}\r\n\r\n\t\tel.innerHTML = this.emptyToSpace(this.sanitizeHTML(label));\r\n\r\n\t\treturn el;\r\n\t}else{\r\n\t\treturn \" \";\r\n\t}\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar el = document.createElement(\"img\"),\r\n\tsrc = cell.getValue();\r\n\r\n\tif(formatterParams.urlPrefix){\r\n\t\tsrc = formatterParams.urlPrefix + cell.getValue();\r\n\t}\r\n\r\n\tif(formatterParams.urlSuffix){\r\n\t\tsrc = src + formatterParams.urlSuffix;\r\n\t}\r\n\r\n\tel.setAttribute(\"src\", src);\r\n\r\n\tswitch(typeof formatterParams.height){\r\n\t\tcase \"number\":\r\n\t\tel.style.height = formatterParams.height + \"px\";\r\n\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\tel.style.height = formatterParams.height;\r\n\t\tbreak;\r\n\t}\r\n\r\n\tswitch(typeof formatterParams.width){\r\n\t\tcase \"number\":\r\n\t\tel.style.width = formatterParams.width + \"px\";\r\n\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\tel.style.width = formatterParams.width;\r\n\t\tbreak;\r\n\t}\r\n\r\n\tel.addEventListener(\"load\", function(){\r\n\t\tcell.getRow().normalizeHeight();\r\n\t});\r\n\r\n\treturn el;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\telement = cell.getElement(),\r\n\tempty = formatterParams.allowEmpty,\r\n\ttruthy = formatterParams.allowTruthy,\r\n\ttick = typeof formatterParams.tickElement !== \"undefined\" ? formatterParams.tickElement : '',\r\n\tcross = typeof formatterParams.crossElement !== \"undefined\" ? formatterParams.crossElement : '';\r\n\r\n\tif((truthy && value) || (value === true || value === \"true\" || value === \"True\" || value === 1 || value === \"1\")){\r\n\t\telement.setAttribute(\"aria-checked\", true);\r\n\t\treturn tick || \"\";\r\n\t}else{\r\n\t\tif(empty && (value === \"null\" || value === \"\" || value === null || typeof value === \"undefined\")){\r\n\t\t\telement.setAttribute(\"aria-checked\", \"mixed\");\r\n\t\t\treturn \"\";\r\n\t\t}else{\r\n\t\t\telement.setAttribute(\"aria-checked\", false);\r\n\t\t\treturn cross || \"\";\r\n\t\t}\r\n\t}\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar inputFormat = formatterParams.inputFormat || \"yyyy-MM-dd HH:mm:ss\";\r\n\tvar\toutputFormat = formatterParams.outputFormat || \"dd/MM/yyyy HH:mm:ss\";\r\n\tvar\tinvalid = typeof formatterParams.invalidPlaceholder !== \"undefined\" ? formatterParams.invalidPlaceholder : \"\";\r\n\tvar value = cell.getValue();\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\tvar newDatetime = inputFormat === \"iso\" ? DT.fromISO(String(value)) : DT.fromFormat(String(value), inputFormat);\r\n\r\n\t\tif(newDatetime.isValid){\r\n\r\n\t\t\tif(formatterParams.timezone){\r\n\t\t\t\tnewDatetime = newDatetime.shiftTimezone(formatterParams.timezone);\r\n\t\t\t}\r\n\r\n\t\t\treturn newDatetime.toFormat(outputFormat);\r\n\t\t}else{\r\n\r\n\t\t\tif(invalid === true || !value){\r\n\t\t\t\treturn value;\r\n\t\t\t}else if(typeof invalid === \"function\"){\r\n\t\t\t\treturn invalid(value);\r\n\t\t\t}else{\r\n\t\t\t\treturn invalid;\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tconsole.error(\"Format Error - 'datetime' formatter is dependant on luxon.js\");\r\n\t}\r\n};","export default function (cell, formatterParams, onRendered) {\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar inputFormat = formatterParams.inputFormat || \"yyyy-MM-dd HH:mm:ss\";\r\n\tvar invalid = typeof formatterParams.invalidPlaceholder !== \"undefined\" ? formatterParams.invalidPlaceholder : \"\";\r\n\tvar suffix = typeof formatterParams.suffix !== \"undefined\" ? formatterParams.suffix : false;\r\n\tvar unit = typeof formatterParams.unit !== \"undefined\" ? formatterParams.unit : \"days\";\r\n\tvar humanize = typeof formatterParams.humanize !== \"undefined\" ? formatterParams.humanize : false;\r\n\tvar date = typeof formatterParams.date !== \"undefined\" ? formatterParams.date : DT.now();\r\n\tvar value = cell.getValue();\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\t\r\n\t\tvar newDatetime = inputFormat === \"iso\" ? DT.fromISO(String(value)) : DT.fromFormat(String(value), inputFormat);\r\n\r\n\t\tif (newDatetime.isValid){\r\n\t\t\tif(humanize){\r\n\t\t\t\t// return moment.duration(newDatetime.diff(date)).humanize(suffix);\r\n\t\t\t}else{\r\n\t\t\t\treturn parseInt(newDatetime.diff(date, unit)[unit]) + (suffix ? \" \" + suffix : \"\");\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\tif (invalid === true) {\r\n\t\t\t\treturn value;\r\n\t\t\t} else if (typeof invalid === \"function\") {\r\n\t\t\t\treturn invalid(value);\r\n\t\t\t} else {\r\n\t\t\t\treturn invalid;\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tconsole.error(\"Format Error - 'datetimediff' formatter is dependant on luxon.js\");\r\n\t}\r\n};","export default function (cell, formatterParams, onRendered) {\r\n\tvar value = cell.getValue();\r\n\r\n\tif (typeof formatterParams[value] === \"undefined\") {\r\n\t\tconsole.warn('Missing display value for ' + value);\r\n\t\treturn value;\r\n\t}\r\n\r\n\treturn formatterParams[value];\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\telement = cell.getElement(),\r\n\tmaxStars = formatterParams && formatterParams.stars ? formatterParams.stars : 5,\r\n\tstars = document.createElement(\"span\"),\r\n\tstar = document.createElementNS('http://www.w3.org/2000/svg', \"svg\"),\r\n\tstarActive = '',\r\n\tstarInactive = '';\r\n\r\n\t//style stars holder\r\n\tstars.style.verticalAlign = \"middle\";\r\n\r\n\t//style star\r\n\tstar.setAttribute(\"width\", \"14\");\r\n\tstar.setAttribute(\"height\", \"14\");\r\n\tstar.setAttribute(\"viewBox\", \"0 0 512 512\");\r\n\tstar.setAttribute(\"xml:space\", \"preserve\");\r\n\tstar.style.padding = \"0 1px\";\r\n\r\n\tvalue = value && !isNaN(value) ? parseInt(value) : 0;\r\n\r\n\tvalue = Math.max(0, Math.min(value, maxStars));\r\n\r\n\tfor(var i=1;i<= maxStars;i++){\r\n\t\tvar nextStar = star.cloneNode(true);\r\n\t\tnextStar.innerHTML = i <= value ? starActive : starInactive;\r\n\r\n\t\tstars.appendChild(nextStar);\r\n\t}\r\n\r\n\telement.style.whiteSpace = \"nowrap\";\r\n\telement.style.overflow = \"hidden\";\r\n\telement.style.textOverflow = \"ellipsis\";\r\n\r\n\telement.setAttribute(\"aria-label\", value);\r\n\r\n\treturn stars;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = this.sanitizeHTML(cell.getValue()) || 0,\r\n\tel = document.createElement(\"span\"),\r\n\tmax = formatterParams && formatterParams.max ? formatterParams.max : 100,\r\n\tmin = formatterParams && formatterParams.min ? formatterParams.min : 0,\r\n\tcolors = formatterParams && typeof formatterParams.color !== \"undefined\" ? formatterParams.color : [\"red\", \"orange\", \"green\"],\r\n\tcolor = \"#666666\",\r\n\tpercent, percentValue;\r\n\r\n\tif(isNaN(value) || typeof cell.getValue() === \"undefined\"){\r\n\t\treturn;\r\n\t}\r\n\r\n\tel.classList.add(\"tabulator-traffic-light\");\r\n\r\n\t//make sure value is in range\r\n\tpercentValue = parseFloat(value) <= max ? parseFloat(value) : max;\r\n\tpercentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min;\r\n\r\n\t//workout percentage\r\n\tpercent = (max - min) / 100;\r\n\tpercentValue = Math.round((percentValue - min) / percent);\r\n\r\n\t//set color\r\n\tswitch(typeof colors){\r\n\t\tcase \"string\":\r\n\t\tcolor = colors;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tcolor = colors(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(colors)){\r\n\t\t\tvar unit = 100 / colors.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, colors.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tcolor = colors[index];\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tel.style.backgroundColor = color;\r\n\r\n\treturn el;\r\n};","import CellComponent from '../../../../core/cell/CellComponent.js';\r\n\r\nexport default function(cell, formatterParams, onRendered){ //progress bar\r\n\tvar value = this.sanitizeHTML(cell.getValue()) || 0,\r\n\telement = cell.getElement(),\r\n\tmax = formatterParams && formatterParams.max ? formatterParams.max : 100,\r\n\tmin = formatterParams && formatterParams.min ? formatterParams.min : 0,\r\n\tlegendAlign = formatterParams && formatterParams.legendAlign ? formatterParams.legendAlign : \"center\",\r\n\tpercent, percentValue, color, legend, legendColor, top, left, right, bottom;\r\n\r\n\t//make sure value is in range\r\n\tpercentValue = parseFloat(value) <= max ? parseFloat(value) : max;\r\n\tpercentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min;\r\n\r\n\t//workout percentage\r\n\tpercent = (max - min) / 100;\r\n\tpercentValue = Math.round((percentValue - min) / percent);\r\n\r\n\t//set bar color\r\n\tswitch(typeof formatterParams.color){\r\n\t\tcase \"string\":\r\n\t\tcolor = formatterParams.color;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tcolor = formatterParams.color(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(formatterParams.color)){\r\n\t\t\tvar unit = 100 / formatterParams.color.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, formatterParams.color.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tcolor = formatterParams.color[index];\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tdefault:\r\n\t\tcolor = \"#2DC214\";\r\n\t}\r\n\r\n\t//generate legend\r\n\tswitch(typeof formatterParams.legend){\r\n\t\tcase \"string\":\r\n\t\tlegend = formatterParams.legend;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tlegend = formatterParams.legend(value);\r\n\t\tbreak;\r\n\t\tcase \"boolean\":\r\n\t\tlegend = value;\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\tlegend = false;\r\n\t}\r\n\r\n\t//set legend color\r\n\tswitch(typeof formatterParams.legendColor){\r\n\t\tcase \"string\":\r\n\t\tlegendColor = formatterParams.legendColor;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tlegendColor = formatterParams.legendColor(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(formatterParams.legendColor)){\r\n\t\t\tvar unit = 100 / formatterParams.legendColor.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, formatterParams.legendColor.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tlegendColor = formatterParams.legendColor[index];\r\n\t\t}\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\tlegendColor = \"#000\";\r\n\t}\r\n\r\n\telement.style.minWidth = \"30px\";\r\n\telement.style.position = \"relative\";\r\n\r\n\telement.setAttribute(\"aria-label\", percentValue);\r\n\r\n\tvar barEl = document.createElement(\"div\");\r\n\tbarEl.style.display = \"inline-block\";\r\n\tbarEl.style.position = \"absolute\";\r\n\tbarEl.style.width = percentValue + \"%\";\r\n\tbarEl.style.backgroundColor = color;\r\n\tbarEl.style.height = \"100%\";\r\n\r\n\tbarEl.setAttribute('data-max', max);\r\n\tbarEl.setAttribute('data-min', min);\r\n\r\n\tvar barContainer = document.createElement(\"div\");\r\n\tbarContainer.style.position = \"relative\";\r\n\tbarContainer.style.width = \"100%\";\r\n\tbarContainer.style.height = \"100%\";\r\n\r\n\tif(legend){\r\n\t\tvar legendEl = document.createElement(\"div\");\r\n\t\tlegendEl.style.position = \"absolute\";\r\n\t\tlegendEl.style.top = 0;\r\n\t\tlegendEl.style.left = 0;\r\n\t\tlegendEl.style.textAlign = legendAlign;\r\n\t\tlegendEl.style.width = \"100%\";\r\n\t\tlegendEl.style.color = legendColor;\r\n\t\tlegendEl.innerHTML = legend;\r\n\t}\r\n\r\n\tonRendered(function(){\r\n\r\n\t\t//handle custom element needed if formatter is to be included in printed/downloaded output\r\n\t\tif(!(cell instanceof CellComponent)){\r\n\t\t\tvar holderEl = document.createElement(\"div\");\r\n\t\t\tholderEl.style.position = \"absolute\";\r\n\t\t\tholderEl.style.top = \"4px\";\r\n\t\t\tholderEl.style.bottom = \"4px\";\r\n\t\t\tholderEl.style.left = \"4px\";\r\n\t\t\tholderEl.style.right = \"4px\";\r\n\r\n\t\t\telement.appendChild(holderEl);\r\n\r\n\t\t\telement = holderEl;\r\n\t\t}\r\n\r\n\t\telement.appendChild(barContainer);\r\n\t\tbarContainer.appendChild(barEl);\r\n\r\n\t\tif(legend){\r\n\t\t\tbarContainer.appendChild(legendEl);\r\n\t\t}\r\n\t});\r\n\r\n\treturn \"\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().style.backgroundColor = this.sanitizeHTML(cell.getValue());\r\n\treturn \"\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn '';\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn '';\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn this.table.rowManager.activeRows.indexOf(cell.getRow()._getSelf()) + 1 || \"\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().classList.add(\"tabulator-row-handle\");\r\n\treturn \"
\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar open = false,\r\n\tel = document.createElement(\"div\"),\r\n\tconfig = cell.getRow()._row.modules.responsiveLayout;\r\n\r\n\tel.classList.add(\"tabulator-responsive-collapse-toggle\");\r\n\tel.innerHTML = \"+-\";\r\n\r\n\tcell.getElement().classList.add(\"tabulator-row-handle\");\r\n\r\n\tfunction toggleList(isOpen){\r\n\t\tvar collapseEl = config.element;\r\n\r\n\t\tconfig.open = isOpen;\r\n\r\n\t\tif(collapseEl){\r\n\r\n\t\t\tif(config.open){\r\n\t\t\t\tel.classList.add(\"open\");\r\n\t\t\t\tcollapseEl.style.display = '';\r\n\t\t\t}else{\r\n\t\t\t\tel.classList.remove(\"open\");\r\n\t\t\t\tcollapseEl.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tel.addEventListener(\"click\", function(e){\r\n\t\te.stopImmediatePropagation();\r\n\t\ttoggleList(!config.open);\r\n\t});\r\n\r\n\ttoggleList(config.open);\r\n\r\n\treturn el;\r\n};","import RowComponent from '../../../../core/row/RowComponent.js';\r\n\r\nexport default function(cell, formatterParams, onRendered){\r\n\tvar checkbox = document.createElement(\"input\");\r\n\tvar blocked = false;\r\n\r\n\tcheckbox.type = 'checkbox';\r\n\r\n\tcheckbox.setAttribute(\"aria-label\", \"Select Row\");\r\n\t\r\n\tif(this.table.modExists(\"selectRow\", true)){\r\n\r\n\t\tcheckbox.addEventListener(\"click\", (e) => {\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tif(typeof cell.getRow == 'function'){\r\n\t\t\tvar row = cell.getRow();\r\n\r\n\t\t\tif(row instanceof RowComponent){\r\n\r\n\t\t\t\tcheckbox.addEventListener(\"change\", (e) => {\r\n\t\t\t\t\tif(this.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\t\tif(!blocked){\r\n\t\t\t\t\t\t\trow.toggleSelect();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tblocked = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trow.toggleSelect();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\tcheckbox.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\tblocked = true;\r\n\t\t\t\t\t\tthis.table.modules.selectRow.handleComplexRowClick(row._row, e);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcheckbox.checked = row.isSelected && row.isSelected();\r\n\t\t\t\tthis.table.modules.selectRow.registerRowSelectCheckbox(row, checkbox);\r\n\t\t\t}else{\r\n\t\t\t\tcheckbox = \"\";\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tcheckbox.addEventListener(\"change\", (e) => {\r\n\t\t\t\tif(this.table.modules.selectRow.selectedRows.length){\r\n\t\t\t\t\tthis.table.deselectRow();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis.table.selectRow(formatterParams.rowRange);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.table.modules.selectRow.registerHeaderSelectCheckbox(checkbox);\r\n\t\t}\r\n\t}\r\n\r\n\treturn checkbox;\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultFormatters from './defaults/formatters.js';\r\n\r\nclass Format extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.registerColumnOption(\"formatter\");\r\n\t\tthis.registerColumnOption(\"formatterParams\");\r\n\r\n\t\tthis.registerColumnOption(\"formatterPrint\");\r\n\t\tthis.registerColumnOption(\"formatterPrintParams\");\r\n\t\tthis.registerColumnOption(\"formatterClipboard\");\r\n\t\tthis.registerColumnOption(\"formatterClipboardParams\");\r\n\t\tthis.registerColumnOption(\"formatterHtmlOutput\");\r\n\t\tthis.registerColumnOption(\"formatterHtmlOutputParams\");\r\n\t\tthis.registerColumnOption(\"titleFormatter\");\r\n\t\tthis.registerColumnOption(\"titleFormatterParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-format\", this.formatValue.bind(this));\r\n\t\tthis.subscribe(\"cell-rendered\", this.cellRendered.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"column-format\", this.formatHeader.bind(this));\r\n\t}\r\n\r\n\t//initialize column formatter\r\n\tinitializeColumn(column){\r\n\t\tcolumn.modules.format = this.lookupFormatter(column, \"\");\r\n\r\n\t\tif(typeof column.definition.formatterPrint !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.print = this.lookupFormatter(column, \"Print\");\r\n\t\t}\r\n\r\n\t\tif(typeof column.definition.formatterClipboard !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.clipboard = this.lookupFormatter(column, \"Clipboard\");\r\n\t\t}\r\n\r\n\t\tif(typeof column.definition.formatterHtmlOutput !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.htmlOutput = this.lookupFormatter(column, \"HtmlOutput\");\r\n\t\t}\r\n\t}\r\n\r\n\tlookupFormatter(column, type){\r\n\t\tvar config = {params:column.definition[\"formatter\" + type + \"Params\"] || {}},\r\n\t\tformatter = column.definition[\"formatter\" + type];\r\n\r\n\t\t//set column formatter\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\tconfig.formatter = Format.formatters[formatter];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tconfig.formatter = formatter;\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn config;\r\n\t}\r\n\r\n\tcellRendered(cell){\r\n\t\tif(cell.modules.format && cell.modules.format.renderedCallback && !cell.modules.format.rendered){\r\n\t\t\tcell.modules.format.renderedCallback();\r\n\t\t\tcell.modules.format.rendered = true;\r\n\t\t}\r\n\t}\r\n\r\n\t//return a formatted value for a column header\r\n\tformatHeader(column, title, el){\r\n\t\tvar formatter, params, onRendered, mockCell;\r\n\r\n\t\tif(column.definition.titleFormatter){\r\n\t\t\tformatter = this.getFormatter(column.definition.titleFormatter);\r\n\r\n\t\t\tonRendered = (callback) => {\r\n\t\t\t\tcolumn.titleFormatterRendered = callback;\r\n\t\t\t};\r\n\r\n\t\t\tmockCell = {\r\n\t\t\t\tgetValue:function(){\r\n\t\t\t\t\treturn title;\r\n\t\t\t\t},\r\n\t\t\t\tgetElement:function(){\r\n\t\t\t\t\treturn el;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tparams = column.definition.titleFormatterParams || {};\r\n\r\n\t\t\tparams = typeof params === \"function\" ? params() : params;\r\n\r\n\t\t\treturn formatter.call(this, mockCell, params, onRendered);\r\n\t\t}else{\r\n\t\t\treturn title;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//return a formatted value for a cell\r\n\tformatValue(cell){\r\n\t\tvar component = cell.getComponent(),\r\n\t\tparams = typeof cell.column.modules.format.params === \"function\" ? cell.column.modules.format.params(component) : cell.column.modules.format.params;\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\tif(!cell.modules.format){\r\n\t\t\t\tcell.modules.format = {};\r\n\t\t\t}\r\n\r\n\t\t\tcell.modules.format.renderedCallback = callback;\r\n\t\t\tcell.modules.format.rendered = false;\r\n\t\t}\r\n\r\n\t\treturn cell.column.modules.format.formatter.call(this, component, params, onRendered);\r\n\t}\r\n\r\n\tformatExportValue(cell, type){\r\n\t\tvar formatter = cell.column.modules.format[type],\r\n\t\tparams;\r\n\r\n\t\tif(formatter){\r\n\t\t\tparams = typeof formatter.params === \"function\" ? formatter.params(component) : formatter.params;\r\n\r\n\t\t\tfunction onRendered(callback){\r\n\t\t\t\tif(!cell.modules.format){\r\n\t\t\t\t\tcell.modules.format = {};\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcell.modules.format.renderedCallback = callback;\r\n\t\t\t\tcell.modules.format.rendered = false;\r\n\t\t\t}\r\n\r\n\t\t\treturn formatter.formatter.call(this, cell.getComponent(), params, onRendered);\r\n\r\n\t\t}else{\r\n\t\t\treturn this.formatValue(cell);\r\n\t\t}\r\n\t}\r\n\r\n\tsanitizeHTML(value){\r\n\t\tif(value){\r\n\t\t\tvar entityMap = {\r\n\t\t\t\t'&': '&',\r\n\t\t\t\t'<': '<',\r\n\t\t\t\t'>': '>',\r\n\t\t\t\t'\"': '"',\r\n\t\t\t\t\"'\": ''',\r\n\t\t\t\t'/': '/',\r\n\t\t\t\t'`': '`',\r\n\t\t\t\t'=': '='\r\n\t\t\t};\r\n\r\n\t\t\treturn String(value).replace(/[&<>\"'`=\\/]/g, function (s) {\r\n\t\t\t\treturn entityMap[s];\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn value;\r\n\t\t}\r\n\t}\r\n\r\n\temptyToSpace(value){\r\n\t\treturn value === null || typeof value === \"undefined\" || value === \"\" ? \" \" : value;\r\n\t}\r\n\r\n\t//get formatter for cell\r\n\tgetFormatter(formatter){\r\n\t\tvar formatter;\r\n\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\tformatter = Format.formatters[formatter]\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tformatter = formatter;\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn formatter;\r\n\t}\r\n}\r\n\r\nFormat.moduleName = \"format\";\r\n\r\n//load defaults\r\nFormat.formatters = defaultFormatters;\r\n\r\nexport default Format;","import Module from '../../core/Module.js';\r\n\r\nclass FrozenColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.leftColumns = [];\r\n\t\tthis.rightColumns = [];\r\n\t\tthis.leftMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.rightPadding = 0;\r\n\t\tthis.initializationMode = \"left\";\r\n\t\tthis.active = false;\r\n\t\tthis.scrollEndTimer = false;\r\n\t\tthis.blocked = true;\r\n\t\t\r\n\t\tthis.registerColumnOption(\"frozen\");\r\n\t}\r\n\t\r\n\t//reset initial state\r\n\treset(){\r\n\t\tthis.initializationMode = \"left\";\r\n\t\tthis.leftColumns = [];\r\n\t\tthis.rightColumns = [];\r\n\t\tthis.leftMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.active = false;\r\n\t\t\r\n\t\tthis.table.columnManager.headersElement.style.marginLeft = 0;\r\n\t\tthis.table.columnManager.element.style.paddingRight = 0;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-layout\", this.layoutCell.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"column-width\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"row-layout-after\", this.layoutRow.bind(this));\r\n\t\tthis.subscribe(\"table-layout\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t\tthis.subscribe(\"columns-loading\", this.reset.bind(this));\r\n\t\tthis.subscribe(\"table-redraw\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"layout-refreshing\", this.blockLayout.bind(this));\r\n\t\tthis.subscribe(\"layout-refreshed\", this.unblockLayout.bind(this));\r\n\t}\r\n\t\r\n\tblockLayout(){\r\n\t\tthis.blocked = true;\r\n\t}\r\n\t\r\n\tunblockLayout(){\r\n\t\tthis.blocked = false;\r\n\t}\r\n\t\r\n\tlayoutCell(cell){\r\n\t\tthis.layoutElement(cell.element, cell.column)\r\n\t}\r\n\t\r\n\t//initialize specific column\r\n\tinitializeColumn(column){\r\n\t\tvar config = {margin:0, edge:false};\r\n\t\t\r\n\t\tif(!column.isGroup){\r\n\t\t\t\r\n\t\t\tif(this.frozenCheck(column)){\r\n\t\t\t\t\r\n\t\t\t\tconfig.position = this.initializationMode;\r\n\t\t\t\t\r\n\t\t\t\tif(this.initializationMode == \"left\"){\r\n\t\t\t\t\tthis.leftColumns.push(column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.rightColumns.unshift(column);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.active = true;\r\n\t\t\t\t\r\n\t\t\t\tcolumn.modules.frozen = config;\r\n\t\t\t}else{\r\n\t\t\t\tthis.initializationMode = \"right\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfrozenCheck(column){\r\n\t\tvar frozen = false;\r\n\t\t\r\n\t\tif(column.parent.isGroup && column.definition.frozen){\r\n\t\t\tconsole.warn(\"Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups\");\r\n\t\t}\r\n\t\t\r\n\t\tif(column.parent.isGroup){\r\n\t\t\treturn this.frozenCheck(column.parent);\r\n\t\t}else{\r\n\t\t\treturn column.definition.frozen;\r\n\t\t}\r\n\t\t\r\n\t\treturn frozen;\r\n\t}\r\n\t\r\n\t//quick layout to smooth horizontal scrolling\r\n\tscrollHorizontal(){\r\n\t\tvar rows;\r\n\t\t\r\n\t\tif(this.active){\r\n\t\t\tclearTimeout(this.scrollEndTimer);\r\n\r\n\t\t\trows = this.table.rowManager.getVisibleRows();\r\n\t\t\t\r\n\t\t\tthis.calcMargins(true);\r\n\t\t\t\r\n\t\t\tthis.layoutColumnPosition();\r\n\t\t\t\r\n\t\t\tthis.layoutCalcRows();\r\n\t\t\t\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\t//calculate margins for rows\r\n\tcalcMargins(scroll){\r\n\t\t\r\n\t\tif(!scroll){\r\n\t\t\tthis.leftMargin = this._calcSpace(this.leftColumns, this.leftColumns.length) + \"px\";\t\t\t\r\n\t\t\tthis.rightMargin = this._calcSpace(this.rightColumns, this.rightColumns.length) + \"px\";\t\r\n\t\t\tthis.table.rowManager.tableElement.style.marginRight = this.rightMargin;\r\n\t\t}\r\n\t\r\n\t\t//calculate right frozen columns\r\n\t\tthis.rightPadding = this.table.rowManager.element.clientWidth + this.table.columnManager.scrollLeft;\r\n\t}\r\n\t\r\n\t//layout calculation rows\r\n\tlayoutCalcRows(){\r\n\t\tif(this.table.modExists(\"columnCalcs\")){\r\n\t\t\tif(this.table.modules.columnCalcs.topInitialized && this.table.modules.columnCalcs.topRow){\r\n\t\t\t\tthis.layoutRow(this.table.modules.columnCalcs.topRow);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.modules.columnCalcs.botInitialized && this.table.modules.columnCalcs.botRow){\r\n\t\t\t\tthis.layoutRow(this.table.modules.columnCalcs.botRow);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.modExists(\"groupRows\")){\r\n\t\t\t\tthis.layoutGroupCalcs(this.table.modules.groupRows.getGroups())\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutGroupCalcs(groups){\r\n\t\tgroups.forEach((group) => {\r\n\t\t\tif(group.calcs.top){\r\n\t\t\t\tthis.layoutRow(group.calcs.top);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(group.calcs.bottom){\r\n\t\t\t\tthis.layoutRow(group.calcs.bottom);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(group.groupList && group.groupList.length){\r\n\t\t\t\tthis.layoutGroupCalcs(group.groupList && group.groupList);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//calculate column positions and layout headers\r\n\tlayoutColumnPosition(allCells){\r\n\t\tvar leftParents = [];\r\n\t\t\r\n\t\tvar leftMargin = 0;\r\n\t\tvar rightMargin = 0;\r\n\t\t\r\n\t\tthis.table.columnManager.headersElement.style.marginLeft = this.leftMargin;\r\n\t\tthis.table.columnManager.element.style.paddingRight = this.rightMargin;\r\n\r\n\t\tthis.leftColumns.forEach((column, i) => {\t\r\n\t\t\tcolumn.modules.frozen.margin = (leftMargin + this.table.columnManager.scrollLeft) + \"px\";\r\n\r\n\t\t\tif(column.visible){\r\n\t\t\t\tleftMargin += column.getWidth();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(i == this.leftColumns.length - 1){\r\n\t\t\t\tcolumn.modules.frozen.edge = true;\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.modules.frozen.edge = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(column.parent.isGroup){\r\n\t\t\t\tvar parentEl = this.getColGroupParentElement(column);\r\n\t\t\t\tif(!leftParents.includes(parentEl)){\r\n\t\t\t\t\tthis.layoutElement(parentEl, column);\r\n\t\t\t\t\tleftParents.push(parentEl);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(column.modules.frozen.edge){\r\n\t\t\t\t\tparentEl.classList.add(\"tabulator-frozen-\" + column.modules.frozen.position);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.layoutElement(column.getElement(), column);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(allCells){\r\n\t\t\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.rightColumns.forEach((column, i) => {\r\n\r\n\t\t\tif(column.visible){\r\n\t\t\t\trightMargin += column.getWidth();\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.modules.frozen.margin = (this.rightPadding - rightMargin) + \"px\";\r\n\t\t\t\r\n\t\t\tif(i == this.rightColumns.length - 1){\r\n\t\t\t\tcolumn.modules.frozen.edge = true;\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.modules.frozen.edge = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(column.parent.isGroup){\r\n\t\t\t\tthis.layoutElement(this.getColGroupParentElement(column), column);\r\n\t\t\t}else{\r\n\t\t\t\tthis.layoutElement(column.getElement(), column);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(allCells){\r\n\t\t\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tgetColGroupParentElement(column){\r\n\t\treturn column.parent.isGroup ? this.getColGroupParentElement(column.parent) : column.getElement();\r\n\t}\r\n\t\r\n\t//layout columns appropriately\r\n\tlayout(){\r\n\t\tif(this.active && !this.blocked){\r\n\t\t\t//calculate row padding\r\n\t\t\tthis.calcMargins();\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) =>{\r\n\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.layoutCalcRows();\r\n\t\t\t\r\n\t\t\t//calculate left columns\r\n\t\t\tthis.layoutColumnPosition(true);\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\t\t\r\n\t\trowEl.style.paddingLeft = this.leftMargin;\r\n\t\t\r\n\t\tif(this.table.options.layout === \"fitDataFill\" && this.rightColumns.length){\r\n\t\t\tthis.table.rowManager.getTableElement().style.minWidth = \"calc(100% - \" + this.rightMargin + \")\";\r\n\t\t}\r\n\t\t\r\n\t\tthis.leftColumns.forEach((column) => {\r\n\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\r\n\t\t\tif(cell){\r\n\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.rightColumns.forEach((column) => {\r\n\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\r\n\t\t\tif(cell){\r\n\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tlayoutElement(element, column){\r\n\t\t\r\n\t\tif(column.modules.frozen){\r\n\t\t\telement.style.position = \"absolute\";\r\n\t\t\telement.style.left = column.modules.frozen.margin;\r\n\t\t\t\r\n\t\t\telement.classList.add(\"tabulator-frozen\");\r\n\t\t\t\r\n\t\t\tif(column.modules.frozen.edge){\r\n\t\t\t\telement.classList.add(\"tabulator-frozen-\" + column.modules.frozen.position);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_calcSpace(columns, index){\r\n\t\tvar width = 0;\r\n\t\t\r\n\t\tfor (let i = 0; i < index; i++){\r\n\t\t\tif(columns[i].visible){\r\n\t\t\t\twidth += columns[i].getWidth();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn width;\r\n\t}\r\n}\r\n\r\nFrozenColumns.moduleName = \"frozenColumns\";\r\n\r\nexport default FrozenColumns;","import Module from '../../core/Module.js';\r\n\r\nclass FrozenRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.topElement = document.createElement(\"div\");\r\n\t\tthis.rows = [];\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"freeze\", this.freezeRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"unfreeze\", this.unfreezeRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isFrozen\", this.isRowFrozen.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.rows = [];\r\n\r\n\t\tthis.topElement.classList.add(\"tabulator-frozen-rows-holder\");\r\n\r\n\t\t// this.table.columnManager.element.append(this.topElement);\r\n\t\tthis.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\r\n\r\n\t\tthis.subscribe(\"row-deleting\", this.detachRow.bind(this));\r\n\t\tthis.subscribe(\"rows-visible\", this.visibleRows.bind(this));\r\n\r\n\t\tthis.registerDisplayHandler(this.getRows.bind(this), 10);\r\n\t}\r\n\r\n\tisRowFrozen(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\t\treturn index > -1;\r\n\t}\r\n\r\n\tisFrozen(){\r\n\t\treturn !!this.rows.length;\r\n\t}\r\n\r\n\tvisibleRows(viewable, rows){\r\n\t\tthis.rows.forEach((row) => {\r\n\t\t\trows.push(row);\r\n\t\t});\r\n\r\n\t\treturn rows;\r\n\t}\r\n\r\n\t//filter frozen rows out of display data\r\n\tgetRows(rows){\r\n\t\tvar self = this,\r\n\t\tfrozen = [],\r\n\t\toutput = rows.slice(0);\r\n\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\tvar index = output.indexOf(row);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\toutput.splice(index, 1);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tfreezeRow(row){\r\n\t\tif(!row.modules.frozen){\r\n\t\t\trow.modules.frozen = true;\r\n\t\t\tthis.topElement.appendChild(row.getElement());\r\n\t\t\trow.initialize();\r\n\t\t\trow.normalizeHeight();\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\tthis.rows.push(row);\r\n\r\n\t\t\tthis.refreshData(false, \"display\")\r\n\r\n\t\t\tthis.styleRows();\r\n\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Freeze Error - Row is already frozen\");\r\n\t\t}\r\n\t}\r\n\r\n\tunfreezeRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\r\n\t\tif(row.modules.frozen){\r\n\r\n\t\t\trow.modules.frozen = false;\r\n\r\n\t\t\tthis.detachRow(row);\r\n\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\tthis.refreshData(false, \"display\")\r\n\r\n\t\t\tif(this.rows.length){\r\n\t\t\t\tthis.styleRows();\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Freeze Error - Row is already unfrozen\");\r\n\t\t}\r\n\t}\r\n\r\n\tdetachRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tvar rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\r\n\t\t\tthis.rows.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\tstyleRows(row){\r\n\t\tthis.rows.forEach((row, i) => {\r\n\t\t\tthis.table.rowManager.styleRow(row, i);\r\n\t\t});\r\n\t}\r\n}\r\n\r\nFrozenRows.moduleName = \"frozenRows\";\r\n\r\nexport default FrozenRows;","//public group object\r\nclass GroupComponent {\r\n\tconstructor (group){\r\n\t\tthis._group = group;\r\n\t\tthis.type = \"GroupComponent\";\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._group.groupManager.table.componentFunctionBinder.handle(\"row\", target._group, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetKey(){\r\n\t\treturn this._group.key;\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._group.field;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._group.element;\r\n\t}\r\n\r\n\tgetRows(){\r\n\t\treturn this._group.getRows(true);\r\n\t}\r\n\r\n\tgetSubGroups(){\r\n\t\treturn this._group.getSubGroups(true);\r\n\t}\r\n\r\n\tgetParentGroup(){\r\n\t\treturn this._group.parent ? this._group.parent.getComponent() : false;\r\n\t}\r\n\r\n\tisVisible(){\r\n\t\treturn this._group.visible;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tthis._group.show();\r\n\t}\r\n\r\n\thide(){\r\n\t\tthis._group.hide();\r\n\t}\r\n\r\n\ttoggle(){\r\n\t\tthis._group.toggleVisibility();\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._group;\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._group.groupManager.table;\r\n\t}\r\n}\r\n\r\nexport default GroupComponent;","import Helpers from '../../core/tools/Helpers.js';\r\nimport GroupComponent from './GroupComponent.js';\r\n\r\n//Group functions\r\nclass Group{\r\n\t\r\n\tconstructor(groupManager, parent, level, key, field, generator, oldGroup){\r\n\t\tthis.groupManager = groupManager;\r\n\t\tthis.parent = parent;\r\n\t\tthis.key = key;\r\n\t\tthis.level = level;\r\n\t\tthis.field = field;\r\n\t\tthis.hasSubGroups = level < (groupManager.groupIDLookups.length - 1);\r\n\t\tthis.addRow = this.hasSubGroups ? this._addRowToGroup : this._addRow;\r\n\t\tthis.type = \"group\"; //type of element\r\n\t\tthis.old = oldGroup;\r\n\t\tthis.rows = [];\r\n\t\tthis.groups = [];\r\n\t\tthis.groupList = [];\r\n\t\tthis.generator = generator;\r\n\t\tthis.element = false;\r\n\t\tthis.elementContents = false;\r\n\t\tthis.height = 0;\r\n\t\tthis.outerHeight = 0;\r\n\t\tthis.initialized = false;\r\n\t\tthis.calcs = {};\r\n\t\tthis.initialized = false;\r\n\t\tthis.modules = {};\r\n\t\tthis.arrowElement = false;\r\n\t\t\r\n\t\tthis.visible = oldGroup ? oldGroup.visible : (typeof groupManager.startOpen[level] !== \"undefined\" ? groupManager.startOpen[level] : groupManager.startOpen[0]);\r\n\t\t\r\n\t\tthis.component = null;\r\n\t\t\r\n\t\tthis.createElements();\r\n\t\tthis.addBindings();\r\n\t\t\r\n\t\tthis.createValueGroups();\r\n\t}\r\n\t\r\n\twipe(){\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\tgroup.wipe();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\tif(row.modules){\r\n\t\t\t\t\tdelete row.modules.group;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\tthis.element = false;\r\n\t\tthis.arrowElement = false;\r\n\t\tthis.elementContents = false;\r\n\t}\r\n\t\r\n\tcreateElements(){\r\n\t\tvar arrow = document.createElement(\"div\");\r\n\t\tarrow.classList.add(\"tabulator-arrow\");\r\n\t\t\r\n\t\tthis.element = document.createElement(\"div\");\r\n\t\tthis.element.classList.add(\"tabulator-row\");\r\n\t\tthis.element.classList.add(\"tabulator-group\");\r\n\t\tthis.element.classList.add(\"tabulator-group-level-\" + this.level);\r\n\t\tthis.element.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\tthis.arrowElement = document.createElement(\"div\");\r\n\t\tthis.arrowElement.classList.add(\"tabulator-group-toggle\");\r\n\t\tthis.arrowElement.appendChild(arrow);\r\n\t\t\r\n\t\t//setup movable rows\r\n\t\tif(this.groupManager.table.options.movableRows !== false && this.groupManager.table.modExists(\"moveRow\")){\r\n\t\t\tthis.groupManager.table.modules.moveRow.initializeGroupHeader(this);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcreateValueGroups(){\r\n\t\tvar level = this.level + 1;\r\n\t\tif(this.groupManager.allowedValues && this.groupManager.allowedValues[level]){\r\n\t\t\tthis.groupManager.allowedValues[level].forEach((value) => {\r\n\t\t\t\tthis._createGroup(value, level);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\taddBindings(){\r\n\t\tvar toggleElement;\r\n\t\t\r\n\t\tif(this.groupManager.table.options.groupToggleElement){\r\n\t\t\ttoggleElement = this.groupManager.table.options.groupToggleElement == \"arrow\" ? this.arrowElement : this.element;\r\n\t\t\t\r\n\t\t\ttoggleElement.addEventListener(\"click\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\tthis.toggleVisibility();\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\t_createGroup(groupID, level){\r\n\t\tvar groupKey = level + \"_\" + groupID;\r\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);\r\n\t\t\r\n\t\tthis.groups[groupKey] = group;\r\n\t\tthis.groupList.push(group);\r\n\t}\r\n\t\r\n\t_addRowToGroup(row){\r\n\t\t\r\n\t\tvar level = this.level + 1;\r\n\t\t\r\n\t\tif(this.hasSubGroups){\r\n\t\t\tvar groupID = this.groupManager.groupIDLookups[level].func(row.getData()),\r\n\t\t\tgroupKey = level + \"_\" + groupID;\r\n\t\t\t\r\n\t\t\tif(this.groupManager.allowedValues && this.groupManager.allowedValues[level]){\r\n\t\t\t\tif(this.groups[groupKey]){\r\n\t\t\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(!this.groups[groupKey]){\r\n\t\t\t\t\tthis._createGroup(groupID, level);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_addRow(row){\r\n\t\tthis.rows.push(row);\r\n\t\trow.modules.group = this;\r\n\t}\r\n\t\r\n\tinsertRow(row, to, after){\r\n\t\tvar data = this.conformRowData({});\r\n\t\t\r\n\t\trow.updateData(data);\r\n\t\t\r\n\t\tvar toIndex = this.rows.indexOf(to);\r\n\t\t\r\n\t\tif(toIndex > -1){\r\n\t\t\tif(after){\r\n\t\t\t\tthis.rows.splice(toIndex+1, 0, row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.splice(toIndex, 0, row);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(after){\r\n\t\t\t\tthis.rows.push(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.unshift(row);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\trow.modules.group = this;\r\n\t\t\r\n\t\tthis.generateGroupHeaderContents();\r\n\t\t\r\n\t\tif(this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\tthis.groupManager.table.modules.columnCalcs.recalcGroup(this);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.updateGroupRows(true);\r\n\t}\r\n\t\r\n\tscrollHeader(left){\r\n\t\tif(this.arrowElement){\r\n\t\t\tthis.arrowElement.style.marginLeft = left;\r\n\t\t\t\r\n\t\t\tthis.groupList.forEach(function(child){\r\n\t\t\t\tchild.scrollHeader(left);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRowIndex(row){}\r\n\t\r\n\t//update row data to match grouping contraints\r\n\tconformRowData(data){\r\n\t\tif(this.field){\r\n\t\t\tdata[this.field] = this.key;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Data Conforming Error - Cannot conform row data to match new group as groupBy is a function\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.parent){\r\n\t\t\tdata = this.parent.conformRowData(data);\r\n\t\t}\r\n\t\t\r\n\t\treturn data;\r\n\t}\r\n\t\r\n\tremoveRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\t\tvar el = row.getElement();\r\n\t\t\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.rows.splice(index, 1);\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.groupManager.table.options.groupValues && !this.rows.length){\r\n\t\t\tif(this.parent){\r\n\t\t\t\tthis.parent.removeGroup(this);\r\n\t\t\t}else{\r\n\t\t\t\tthis.groupManager.removeGroup(this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tif(el.parentNode){\r\n\t\t\t\tel.parentNode.removeChild(el);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.generateGroupHeaderContents();\r\n\t\t\t\r\n\t\t\tif(this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\t\tthis.groupManager.table.modules.columnCalcs.recalcGroup(this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveGroup(group){\r\n\t\tvar groupKey = group.level + \"_\" + group.key,\r\n\t\tindex;\r\n\t\t\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tdelete this.groups[groupKey];\r\n\t\t\t\r\n\t\t\tindex = this.groupList.indexOf(group);\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.groupList.splice(index, 1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!this.groupList.length){\r\n\t\t\t\tif(this.parent){\r\n\t\t\t\t\tthis.parent.removeGroup(this);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.groupManager.removeGroup(this);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetHeadersAndRows(noCalc){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\toutput.push(this);\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(this.visible){\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\t\toutput = output.concat(group.getHeadersAndRows(noCalc));\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tif(!noCalc && this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\r\n\t\t\t\t\tif(this.calcs.top){\r\n\t\t\t\t\t\tthis.calcs.top.detachElement();\r\n\t\t\t\t\t\tthis.calcs.top.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows);\r\n\t\t\t\t\toutput.push(this.calcs.top);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\toutput = output.concat(this.rows);\r\n\t\t\t\t\r\n\t\t\t\tif(!noCalc && this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\r\n\t\t\t\t\tif(this.calcs.bottom){\r\n\t\t\t\t\t\tthis.calcs.bottom.detachElement();\r\n\t\t\t\t\t\tthis.calcs.bottom.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows);\r\n\t\t\t\t\toutput.push(this.calcs.bottom);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!this.groupList.length && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\t\t\r\n\t\t\t\tif(this.groupManager.table.modExists(\"columnCalcs\")){\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!noCalc && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\r\n\t\t\t\t\t\tif(this.calcs.top){\r\n\t\t\t\t\t\t\tthis.calcs.top.detachElement();\r\n\t\t\t\t\t\t\tthis.calcs.top.deleteCells();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.groupManager.table.options.groupClosedShowCalcs){\r\n\t\t\t\t\t\t\tthis.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows);\r\n\t\t\t\t\t\t\toutput.push(this.calcs.top);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!noCalc && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\r\n\t\t\t\t\t\tif(this.calcs.bottom){\r\n\t\t\t\t\t\t\tthis.calcs.bottom.detachElement();\r\n\t\t\t\t\t\t\tthis.calcs.bottom.deleteCells();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.groupManager.table.options.groupClosedShowCalcs){\r\n\t\t\t\t\t\t\tthis.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows);\r\n\t\t\t\t\t\t\toutput.push(this.calcs.bottom);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetData(visible, transform){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(!visible || (visible && this.visible)){\r\n\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\toutput.push(row.getData(transform || \"data\"));\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetRowCount(){\r\n\t\tvar count = 0;\r\n\t\t\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\tcount += group.getRowCount();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tcount = this.rows.length;\r\n\t\t}\r\n\t\treturn count;\r\n\t}\r\n\t\r\n\ttoggleVisibility(){\r\n\t\tif(this.visible){\r\n\t\t\tthis.hide();\r\n\t\t}else{\r\n\t\t\tthis.show();\r\n\t\t}\r\n\t}\r\n\t\r\n\thide(){\r\n\t\tthis.visible = false;\r\n\t\t\r\n\t\tif(this.groupManager.table.rowManager.getRenderMode() == \"classic\" && !this.groupManager.table.options.pagination){\r\n\t\t\t\r\n\t\t\tthis.element.classList.remove(\"tabulator-group-visible\");\r\n\t\t\t\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar rows = group.getHeadersAndRows();\r\n\t\t\t\t\t\r\n\t\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\t\trow.detachElement();\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex());\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth();\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.table.externalEvents.dispatch(\"groupVisibilityChanged\", this.getComponent(), false);\r\n\t}\r\n\t\r\n\tshow(){\r\n\t\tthis.visible = true;\r\n\t\t\r\n\t\tif(this.groupManager.table.rowManager.getRenderMode() == \"classic\" && !this.groupManager.table.options.pagination){\r\n\t\t\t\r\n\t\t\tthis.element.classList.add(\"tabulator-group-visible\");\r\n\t\t\t\r\n\t\t\tvar prev = this.generateElement();\r\n\t\t\t\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\t\tvar rows = group.getHeadersAndRows();\r\n\t\t\t\t\t\r\n\t\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\t\tprev.parentNode.insertBefore(rowEl, prev.nextSibling);\r\n\t\t\t\t\t\trow.initialize();\r\n\t\t\t\t\t\tprev = rowEl;\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\tprev.parentNode.insertBefore(rowEl, prev.nextSibling);\r\n\t\t\t\t\trow.initialize();\r\n\t\t\t\t\tprev = rowEl;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex());\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth();\r\n\t\t}else{\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.table.externalEvents.dispatch(\"groupVisibilityChanged\", this.getComponent(), true);\r\n\t}\r\n\t\r\n\t_visSet(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tif(typeof this.visible == \"function\"){\r\n\t\t\t\r\n\t\t\tthis.rows.forEach(function(row){\r\n\t\t\t\tdata.push(row.getData());\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.visible = this.visible(this.key, this.getRowCount(), data, this.getComponent());\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRowGroup(row){\r\n\t\tvar match = false;\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\tvar result = group.getRowGroup(row);\r\n\t\t\t\t\r\n\t\t\t\tif(result){\r\n\t\t\t\t\tmatch = result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tif(this.rows.find(function(item){\r\n\t\t\t\treturn item === row;\r\n\t\t\t})){\r\n\t\t\t\tmatch = this;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn match;\r\n\t}\r\n\t\r\n\tgetSubGroups(component){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.groupList.forEach(function(child){\r\n\t\t\toutput.push(component ? child.getComponent() : child);\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetRows(compoment){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\toutput.push(compoment ? row.getComponent() : row);\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgenerateGroupHeaderContents(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\tdata.push(row.getData());\r\n\t\t});\r\n\t\t\r\n\t\tthis.elementContents = this.generator(this.key, this.getRowCount(), data, this.getComponent());\r\n\t\t\r\n\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\t\t\r\n\t\tif(typeof this.elementContents === \"string\"){\r\n\t\t\tthis.element.innerHTML = this.elementContents;\r\n\t\t}else{\r\n\t\t\tthis.element.appendChild(this.elementContents);\r\n\t\t}\r\n\t\t\r\n\t\tthis.element.insertBefore(this.arrowElement, this.element.firstChild);\r\n\t}\r\n\t\r\n\tgetPath(path = []) {\r\n\t\tpath.unshift(this.key);\r\n\t\tif(this.parent) {\r\n\t\t\tthis.parent.getPath(path);\r\n\t\t}\r\n\t\treturn path;\r\n\t}\r\n\t\r\n\t////////////// Standard Row Functions //////////////\r\n\t\r\n\tgetElement(){\r\n\t\treturn this.elementContents ? this.element : this.generateElement();\r\n\t}\r\n\t\r\n\tgenerateElement(){\r\n\t\tthis.addBindings = false;\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(this.visible){\r\n\t\t\tthis.element.classList.add(\"tabulator-group-visible\");\r\n\t\t}else{\r\n\t\t\tthis.element.classList.remove(\"tabulator-group-visible\");\r\n\t\t}\r\n\t\t\r\n\t\tfor(var i = 0; i < this.element.childNodes.length; ++i){\r\n\t\t\tthis.element.childNodes[i].parentNode.removeChild(this.element.childNodes[i]);\r\n\t\t}\r\n\t\t\r\n\t\tthis.generateGroupHeaderContents();\r\n\t\t\r\n\t\t// this.addBindings();\r\n\t\t\r\n\t\treturn this.element;\r\n\t}\r\n\t\r\n\tdetachElement(){\r\n\t\tif (this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\t//normalize the height of elements in the row\r\n\tnormalizeHeight(){\r\n\t\tthis.setHeight(this.element.clientHeight);\r\n\t}\r\n\t\r\n\tinitialize(force){\r\n\t\tif(!this.initialized || force){\r\n\t\t\tthis.normalizeHeight();\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitialize(){\r\n\t\tthis.initialized = false;\r\n\t\tthis.height = 0;\r\n\t\t\r\n\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\tthis.initialize(true);\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetHeight(height){\r\n\t\tif(this.height != height){\r\n\t\t\tthis.height = height;\r\n\t\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return rows outer height\r\n\tgetHeight(){\r\n\t\treturn this.outerHeight;\r\n\t}\r\n\t\r\n\tgetGroup(){\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\treinitializeHeight(){}\r\n\t\r\n\tcalcHeight(){}\r\n\t\r\n\tsetCellHeight(){}\r\n\t\r\n\tclearCellHeight(){}\r\n\t\r\n\tdeinitializeHeight(){}\r\n\t\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new GroupComponent(this);\r\n\t\t}\r\n\t\t\r\n\t\treturn this.component;\r\n\t}\r\n}\r\n\r\nexport default Group;","import Module from '../../core/Module.js';\r\n\r\nimport GroupComponent from './GroupComponent.js';\r\nimport Group from './Group.js';\r\n\r\nclass GroupRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.groupIDLookups = false; //enable table grouping and set field to group by\r\n\t\tthis.startOpen = [function(){return false;}]; //starting state of group\r\n\t\tthis.headerGenerator = [function(){return \"\";}];\r\n\t\tthis.groupList = []; //ordered list of groups\r\n\t\tthis.allowedValues = false;\r\n\t\tthis.groups = {}; //hold row groups\r\n\t\tthis.displayIndex = 0; //index in display pipeline\r\n\r\n\t\tthis.displayHandler = this.getRows.bind(this);\r\n\r\n\t\t//register table options\r\n\t\tthis.registerTableOption(\"groupBy\", false); //enable table grouping and set field to group by\r\n\t\tthis.registerTableOption(\"groupStartOpen\", true); //starting state of group\r\n\t\tthis.registerTableOption(\"groupValues\", false);\r\n\t\tthis.registerTableOption(\"groupUpdateOnCellEdit\", false);\r\n\t\tthis.registerTableOption(\"groupHeader\", false); //header generation function\r\n\t\tthis.registerTableOption(\"groupHeaderPrint\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderClipboard\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderHtmlOutput\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderDownload\", null);\r\n\t\tthis.registerTableOption(\"groupToggleElement\", \"arrow\");\r\n\t\tthis.registerTableOption(\"groupClosedShowCalcs\", false);\r\n\r\n\t\t//register table functions\r\n\t\tthis.registerTableFunction(\"setGroupBy\", this.setGroupBy.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupValues\", this.setGroupValues.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupStartOpen\", this.setGroupStartOpen.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupHeader\", this.setGroupHeader.bind(this));\r\n\t\tthis.registerTableFunction(\"getGroups\", this.userGetGroups.bind(this));\r\n\t\tthis.registerTableFunction(\"getGroupedData\", this.userGetGroupedData.bind(this));\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"getGroup\", this.rowGetGroup.bind(this));\r\n\t}\r\n\r\n\t//initialize group configuration\r\n\tinitialize(){\r\n\t\tif(this.table.options.groupBy){\r\n\r\n\t\t\tif(this.table.options.groupUpdateOnCellEdit){\r\n\t\t\t\tthis.subscribe(\"cell-value-updated\", this.cellUpdated.bind(this));\r\n\t\t\t\tthis.subscribe(\"row-data-changed\", this.reassignRowToGroup.bind(this), 0);\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-built\", this.configureGroupSetup.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"row-deleting\", this.rowDeleting.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHeaders.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.wipe.bind(this));\r\n\t\t\tthis.subscribe(\"rows-added\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"row-moving\", this.rowMoving.bind(this));\r\n\t\t\tthis.subscribe(\"row-adding-index\", this.rowAddingIndex.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"rows-sample\", this.rowSample.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"render-virtual-fill\", this.virtualRenderFill.bind(this));\r\n\r\n\t\t\tthis.registerDisplayHandler(this.displayHandler, 20);\r\n\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tconfigureGroupSetup(){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tvar groupBy = this.table.options.groupBy,\r\n\t\t\tstartOpen = this.table.options.groupStartOpen,\r\n\t\t\tgroupHeader = this.table.options.groupHeader;\r\n\r\n\t\t\tthis.allowedValues = this.table.options.groupValues;\r\n\r\n\t\t\tif(Array.isArray(groupBy) && Array.isArray(groupHeader) && groupBy.length > groupHeader.length){\r\n\t\t\t\tconsole.warn(\"Error creating group headers, groupHeader array is shorter than groupBy array\");\r\n\t\t\t}\r\n\r\n\t\t\tthis.headerGenerator = [function(){return \"\";}];\r\n\t\t\tthis.startOpen = [function(){return false;}]; //starting state of group\r\n\r\n\t\t\tthis.langBind(\"groups|item\", (langValue, lang) => {\r\n\t\t\t\tthis.headerGenerator[0] = (value, count, data) => { //header layout function\r\n\t\t\t\t\treturn (typeof value === \"undefined\" ? \"\" : value) + \"(\" + count + \" \" + ((count === 1) ? langValue : lang.groups.items) + \")\";\r\n\t\t\t\t};\r\n\t\t\t});\r\n\r\n\t\t\tthis.groupIDLookups = [];\r\n\r\n\t\t\tif(Array.isArray(groupBy) || groupBy){\r\n\t\t\t\tif(this.table.modExists(\"columnCalcs\") && this.table.options.columnCalcs != \"table\" && this.table.options.columnCalcs != \"both\"){\r\n\t\t\t\t\tthis.table.modules.columnCalcs.removeCalcs();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.modExists(\"columnCalcs\") && this.table.options.columnCalcs != \"group\"){\r\n\r\n\t\t\t\t\tvar cols = this.table.columnManager.getRealColumns();\r\n\r\n\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\tif(col.definition.topCalc){\r\n\t\t\t\t\t\t\tthis.table.modules.columnCalcs.initializeTopRow();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(col.definition.bottomCalc){\r\n\t\t\t\t\t\t\tthis.table.modules.columnCalcs.initializeBottomRow();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(!Array.isArray(groupBy)){\r\n\t\t\t\tgroupBy = [groupBy];\r\n\t\t\t}\r\n\r\n\t\t\tgroupBy.forEach((group, i) => {\r\n\t\t\t\tvar lookupFunc, column;\r\n\r\n\t\t\t\tif(typeof group == \"function\"){\r\n\t\t\t\t\tlookupFunc = group;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolumn = this.table.columnManager.getColumnByField(group);\r\n\r\n\t\t\t\t\tif(column){\r\n\t\t\t\t\t\tlookupFunc = function(data){\r\n\t\t\t\t\t\t\treturn column.getFieldValue(data);\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tlookupFunc = function(data){\r\n\t\t\t\t\t\t\treturn data[group];\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.groupIDLookups.push({\r\n\t\t\t\t\tfield: typeof group === \"function\" ? false : group,\r\n\t\t\t\t\tfunc:lookupFunc,\r\n\t\t\t\t\tvalues:this.allowedValues ? this.allowedValues[i] : false,\r\n\t\t\t\t});\r\n\t\t\t});\r\n\r\n\t\t\tif(startOpen){\r\n\t\t\t\tif(!Array.isArray(startOpen)){\r\n\t\t\t\t\tstartOpen = [startOpen];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstartOpen.forEach((level) => {\r\n\t\t\t\t\tlevel = typeof level == \"function\" ? level : function(){return true;};\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.startOpen = startOpen;\r\n\t\t\t}\r\n\r\n\t\t\tif(groupHeader){\r\n\t\t\t\tthis.headerGenerator = Array.isArray(groupHeader) ? groupHeader : [groupHeader];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trowSample(rows, prevValue){\r\n\t\tvar group = this.getGroups(false)[0];\r\n\r\n\t\tprevValue.push(group.getRows(false)[0]);\r\n\r\n\t\treturn prevValue;\r\n\t}\r\n\r\n\tvirtualRenderFill(){\r\n\t\tvar el = this.table.rowManager.tableElement;\r\n\t\tvar rows = this.table.rowManager.getVisibleRows();\r\n\r\n\t\trows = rows.filter((row) => {\r\n\t\t\treturn row.type !== \"group\";\r\n\t\t});\r\n\r\n\t\tel.style.minWidth = !rows.length ? this.table.columnManager.getWidth() + \"px\" : \"\";\r\n\r\n\t\t// if(this.table.options.groupBy){\r\n\t\t// \tif(this.layoutMode() != \"fitDataFill\" && rowsCount == this.table.modules.groupRows.countGroups()){\r\n\t\t// \t\tel.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t// \t}\r\n\t\t// }\r\n\t}\r\n\r\n\trowAddingIndex(row, index, top){\r\n\t\tthis.assignRowToGroup(row);\r\n\r\n\t\tvar groupRows = row.modules.group.rows;\r\n\r\n\t\tif(groupRows.length > 1){\r\n\t\t\tif(!index || (index && groupRows.indexOf(index) == -1)){\r\n\t\t\t\tif(top){\r\n\t\t\t\t\tif(groupRows[0] !== row){\r\n\t\t\t\t\t\tindex = groupRows[0];\r\n\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(groupRows[groupRows.length -1] !== row){\r\n\t\t\t\t\t\tindex = groupRows[groupRows.length -1];\r\n\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn index;\r\n\t}\r\n\r\n\ttrackChanges(){\r\n\t\tthis.dispatch(\"group-changed\");\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tsetGroupBy(groups){\r\n\t\tthis.table.options.groupBy = groups;\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.initialize();\r\n\t\t}else{\r\n\t\t\tthis.configureGroupSetup();\r\n\t\t}\r\n\r\n\t\tthis.refreshData();\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\tsetGroupValues(groupValues){\r\n\t\tthis.table.options.groupValues = groupValues;\r\n\t\tthis.configureGroupSetup();\r\n\t\tthis.refreshData();\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\tsetGroupStartOpen(values){\r\n\t\tthis.table.options.groupStartOpen = values;\r\n\t\tthis.configureGroupSetup();\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\r\n\t\t\tthis.trackChanges();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Grouping Update - cant refresh view, no groups have been set\");\r\n\t\t}\r\n\t}\r\n\r\n\tsetGroupHeader(values){\r\n\t\tthis.table.options.groupHeader = values;\r\n\t\tthis.configureGroupSetup();\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\r\n\t\t\tthis.trackChanges();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Grouping Update - cant refresh view, no groups have been set\");\r\n\t\t}\r\n\t}\r\n\r\n\tuserGetGroups(values){\r\n\t\treturn this.getGroups(true);\r\n\t}\r\n\r\n\t// get grouped table data in the same format as getData()\r\n\tuserGetGroupedData(){\r\n\t\treturn this.table.options.groupBy ?\r\n\t\tthis.getGroupedData() : this.getData()\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////////\r\n\t///////// Component Functions /////////\r\n\t///////////////////////////////////////\r\n\r\n\trowGetGroup(row){\r\n\t\treturn row.modules.group ? row.modules.group.getComponent() : false;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\trowMoving(from, to, after){\r\n\t\tif(!after && to instanceof Group){\r\n\t\t\tto = this.table.rowManager.prevDisplayRow(from) || to;\r\n\t\t}\r\n\r\n\t\tvar toGroup = to instanceof Group ? to : to.modules.group;\r\n\t\tvar fromGroup = from instanceof Group ? from : from.modules.group;\r\n\r\n\t\tif(toGroup === fromGroup){\r\n\t\t\tthis.table.rowManager.moveRowInArray(toGroup.rows, from, to, after);\r\n\t\t}else{\r\n\t\t\tif(fromGroup){\r\n\t\t\t\tfromGroup.removeRow(from);\r\n\t\t\t}\r\n\r\n\t\t\ttoGroup.insertRow(from, to, after);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trowDeleting(row){\r\n\t\t//remove from group\r\n\t\tif(row.modules.group){\r\n\t\t\trow.modules.group.removeRow(row);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trowsUpdated(row){\r\n\t\tthis.updateGroupRows(true);\r\n\t}\r\n\r\n\tcellUpdated(cell){\r\n\t\tthis.reassignRowToGroup(cell.row);\r\n\t}\r\n\r\n\r\n\tsetDisplayIndex(index){\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\r\n\tgetDisplayIndex(){\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\r\n\t//return appropriate rows with group headers\r\n\tgetRows(rows){\r\n\t\tif(this.table.options.groupBy && this.groupIDLookups.length){\r\n\r\n\t\t\tthis.dispatchExternal(\"dataGrouping\");\r\n\r\n\t\t\tthis.generateGroups(rows);\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataGrouped\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataGrouped\", this.getGroups(true));\r\n\t\t\t}\r\n\r\n\t\t\treturn this.updateGroupRows();\r\n\r\n\t\t}else{\r\n\t\t\treturn rows.slice(0);\r\n\t\t}\r\n\t}\r\n\r\n\tgetGroups(component){\r\n\t\tvar groupComponents = [];\r\n\r\n\t\tthis.groupList.forEach(function(group){\r\n\t\t\tgroupComponents.push(component ? group.getComponent() : group);\r\n\t\t});\r\n\r\n\t\treturn groupComponents;\r\n\t}\r\n\r\n\tgetChildGroups(group){\r\n\t\tvar groupComponents = [];\r\n\r\n\t\tif(!group){\r\n\t\t\tgroup = this;\r\n\t\t}\r\n\r\n\t\tgroup.groupList.forEach((child) => {\r\n\t\t\tif(child.groupList.length){\r\n\t\t\t\tgroupComponents = groupComponents.concat(this.getChildGroups(child));\r\n\t\t\t}else{\r\n\t\t\t\tgroupComponents.push(child);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn groupComponents;\r\n\t}\r\n\r\n\twipe(){\r\n\t\tthis.groupList.forEach(function(group){\r\n\t\t\tgroup.wipe();\r\n\t\t});\r\n\t}\r\n\r\n\tpullGroupListData(groupList) {\r\n\t\tvar groupListData = [];\r\n\r\n\t\tgroupList.forEach((group) => {\r\n\t\t\tvar groupHeader = {};\r\n\t\t\tgroupHeader.level = 0;\r\n\t\t\tgroupHeader.rowCount = 0;\r\n\t\t\tgroupHeader.headerContent = \"\";\r\n\t\t\tvar childData = [];\r\n\r\n\t\t\tif (group.hasSubGroups) {\r\n\t\t\t\tchildData = this.pullGroupListData(group.groupList);\r\n\r\n\t\t\t\tgroupHeader.level = group.level;\r\n\t\t\t\tgroupHeader.rowCount = childData.length - group.groupList.length; // data length minus number of sub-headers\r\n\t\t\t\tgroupHeader.headerContent = group.generator(group.key, groupHeader.rowCount, group.rows, group);\r\n\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\t\t\t\tgroupListData = groupListData.concat(childData);\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tgroupHeader.level = group.level;\r\n\t\t\t\tgroupHeader.headerContent = group.generator(group.key, group.rows.length, group.rows, group);\r\n\t\t\t\tgroupHeader.rowCount = group.getRows().length;\r\n\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\r\n\t\t\t\tgroup.getRows().forEach((row) => {\r\n\t\t\t\t\tgroupListData.push(row.getData(\"data\"));\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn groupListData\r\n\t}\r\n\r\n\tgetGroupedData(){\r\n\r\n\t\treturn this.pullGroupListData(this.groupList);\r\n\t}\r\n\r\n\tgetRowGroup(row){\r\n\t\tvar match = false;\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\tvar result = group.getRowGroup(row);\r\n\r\n\t\t\tif(result){\r\n\t\t\t\tmatch = result;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tcountGroups(){\r\n\t\treturn this.groupList.length;\r\n\t}\r\n\r\n\tgenerateGroups(rows){\r\n\t\tvar oldGroups = this.groups;\r\n\r\n\t\tthis.groups = {};\r\n\t\tthis.groupList = [];\r\n\r\n\t\tif(this.allowedValues && this.allowedValues[0]){\r\n\t\t\tthis.allowedValues[0].forEach((value) => {\r\n\t\t\t\tthis.createGroup(value, 0, oldGroups);\r\n\t\t\t});\r\n\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tthis.assignRowToExistingGroup(row, oldGroups);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tthis.assignRowToGroup(row, oldGroups);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tcreateGroup(groupID, level, oldGroups){\r\n\t\tvar groupKey = level + \"_\" + groupID,\r\n\t\tgroup;\r\n\r\n\t\toldGroups = oldGroups || [];\r\n\r\n\t\tgroup = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]);\r\n\r\n\t\tthis.groups[groupKey] = group;\r\n\t\tthis.groupList.push(group);\r\n\t}\r\n\r\n\tassignRowToExistingGroup(row, oldGroups){\r\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\r\n\t\tgroupKey = \"0_\" + groupID;\r\n\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t}\r\n\t}\r\n\r\n\tassignRowToGroup(row, oldGroups){\r\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\r\n\t\tnewGroupNeeded = !this.groups[\"0_\" + groupID];\r\n\r\n\t\tif(newGroupNeeded){\r\n\t\t\tthis.createGroup(groupID, 0, oldGroups);\r\n\t\t}\r\n\r\n\t\tthis.groups[\"0_\" + groupID].addRow(row);\r\n\r\n\t\treturn !newGroupNeeded;\r\n\t}\r\n\r\n\treassignRowToGroup(row){\r\n\t\tif(row.type === \"row\"){\r\n\t\t\tvar oldRowGroup = row.modules.group,\r\n\t\t\toldGroupPath = oldRowGroup.getPath(),\r\n\t\t\tnewGroupPath = this.getExpectedPath(row),\r\n\t\t\tsamePath = true;\r\n\r\n\t\t\t// figure out if new group path is the same as old group path\r\n\t\t\tvar samePath = (oldGroupPath.length == newGroupPath.length) && oldGroupPath.every((element, index) => {\r\n\t\t\t\treturn element === newGroupPath[index];\r\n\t\t\t});\r\n\r\n\t\t\t// refresh if they new path and old path aren't the same (aka the row's groupings have changed)\r\n\t\t\tif(!samePath) {\r\n\t\t\t\toldRowGroup.removeRow(row);\r\n\t\t\t\tthis.assignRowToGroup(row, this.groups);\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgetExpectedPath(row) {\r\n\t\tvar groupPath = [], rowData = row.getData();\r\n\r\n\t\tthis.groupIDLookups.forEach((groupId) => {\r\n\t\t\tgroupPath.push(groupId.func(rowData));\r\n\t\t});\r\n\r\n\t\treturn groupPath;\r\n\t}\r\n\r\n\tupdateGroupRows(force){\r\n\t\tvar output = [],\r\n\t\toldRowCount;\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\toutput = output.concat(group.getHeadersAndRows());\r\n\t\t});\r\n\r\n\t\tif(force){\r\n\t\t\tthis.refreshData(true, this.displayHandler);\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tscrollHeaders(left){\r\n\t\tif(this.table.options.renderHorizontal === \"virtual\"){\r\n\t\t\tleft -= this.table.columnManager.renderer.vDomPadLeft;\r\n\t\t}\r\n\r\n\t\tleft = left + \"px\";\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\tgroup.scrollHeader(left);\r\n\t\t});\r\n\t}\r\n\r\n\tremoveGroup(group){\r\n\t\tvar groupKey = group.level + \"_\" + group.key,\r\n\t\tindex;\r\n\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tdelete this.groups[groupKey];\r\n\r\n\t\t\tindex = this.groupList.indexOf(group);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.groupList.splice(index, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nGroupRows.moduleName = \"groupRows\";\r\n\r\nexport default GroupRows;","import Module from '../../core/Module.js';\r\nimport Row from '../../core/row/Row.js';\r\nimport Cell from '../../core/cell/Cell.js';\r\n\r\nimport defaultUndoers from './defaults/undoers.js';\r\nimport defaultRedoers from './defaults/redoers.js';\r\n\r\nclass History extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.history = [];\r\n\t\tthis.index = -1;\r\n\r\n\t\tthis.registerTableOption(\"history\", false); //enable edit history\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.history){\r\n\t\t\tthis.subscribe(\"cell-value-updated\", this.cellUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"cell-delete\", this.clearComponentHistory.bind(this));\r\n\t\t\tthis.subscribe(\"row-delete\", this.rowDeleted.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.clear.bind(this));\r\n\t\t\tthis.subscribe(\"row-added\", this.rowAdded.bind(this));\r\n\t\t\tthis.subscribe(\"row-move\", this.rowMoved.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"undo\", this.undo.bind(this));\r\n\t\tthis.registerTableFunction(\"redo\", this.redo.bind(this));\r\n\t\tthis.registerTableFunction(\"getHistoryUndoSize\", this.getHistoryUndoSize.bind(this));\r\n\t\tthis.registerTableFunction(\"getHistoryRedoSize\", this.getHistoryRedoSize.bind(this));\r\n\t\tthis.registerTableFunction(\"clearHistory\", this.clear.bind(this));\r\n\t}\r\n\r\n\trowMoved(from, to, after){\r\n\t\tthis.action(\"rowMove\", from, {posFrom:this.table.rowManager.getRowPosition(from), posTo:this.table.rowManager.getRowPosition(to), to:to, after:after});\r\n\t}\r\n\r\n\trowAdded(row, data, pos, index){\r\n\t\tthis.action(\"rowAdd\", row, {data:data, pos:pos, index:index});\r\n\t}\r\n\r\n\trowDeleted(row){\r\n\t\tvar index, rows;\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\r\n\t\t\trows = row.getComponent().getGroup().rows\r\n\t\t\tindex = rows.indexOf(row);\r\n\r\n\t\t\tif(index){\r\n\t\t\t\tindex = rows[index-1];\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tindex = row.table.rowManager.getRowIndex(row);\r\n\r\n\t\t\tif(index){\r\n\t\t\t\tindex = row.table.rowManager.rows[index-1];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.action(\"rowDelete\", row, {data:row.getData(), pos:!index, index:index});\r\n\t}\r\n\r\n\tcellUpdated(cell){\r\n\t\tthis.action(\"cellEdit\", cell, {oldValue:cell.oldValue, newValue:cell.value});\r\n\t}\r\n\r\n\tclear(){\r\n\t\tthis.history = [];\r\n\t\tthis.index = -1;\r\n\t}\r\n\r\n\taction(type, component, data){\r\n\t\tthis.history = this.history.slice(0, this.index + 1);\r\n\r\n\t\tthis.history.push({\r\n\t\t\ttype:type,\r\n\t\t\tcomponent:component,\r\n\t\t\tdata:data,\r\n\t\t});\r\n\r\n\t\tthis.index ++;\r\n\t}\r\n\r\n\tgetHistoryUndoSize(){\r\n\t\treturn this.index + 1;\r\n\t}\r\n\r\n\tgetHistoryRedoSize(){\r\n\t\treturn this.history.length - (this.index + 1);\r\n\t}\r\n\r\n\tclearComponentHistory(component){\r\n\t\tvar index = this.history.findIndex(function(item){\r\n\t\t\treturn item.component === component;\r\n\t\t});\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.history.splice(index, 1);\r\n\t\t\tif(index <= this.index){\r\n\t\t\t\tthis.index--;\r\n\t\t\t}\r\n\r\n\t\t\tthis.clearComponentHistory(component);\r\n\t\t}\r\n\t}\r\n\r\n\tundo(){\r\n\t\tif(this.index > -1){\r\n\t\t\tlet action = this.history[this.index];\r\n\r\n\t\t\tHistory.undoers[action.type].call(this, action);\r\n\r\n\t\t\tthis.index--;\r\n\r\n\t\t\tthis.dispatchExternal(\"historyUndo\", action.type, action.component.getComponent(), action.data);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"History Undo Error - No more history to undo\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tredo(){\r\n\t\tif(this.history.length-1 > this.index){\r\n\r\n\t\t\tthis.index++;\r\n\r\n\t\t\tlet action = this.history[this.index];\r\n\r\n\t\t\tHistory.redoers[action.type].call(this, action);\r\n\r\n\t\t\tthis.dispatchExternal(\"historyRedo\", action.type, action.component.getComponent(), action.data);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"History Redo Error - No more history to redo\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//rebind rows to new element after deletion\r\n\t_rebindRow(oldRow, newRow){\r\n\t\tthis.history.forEach(function(action){\r\n\t\t\tif(action.component instanceof Row){\r\n\t\t\t\tif(action.component === oldRow){\r\n\t\t\t\t\taction.component = newRow;\r\n\t\t\t\t}\r\n\t\t\t}else if(action.component instanceof Cell){\r\n\t\t\t\tif(action.component.row === oldRow){\r\n\t\t\t\t\tvar field = action.component.column.getField();\r\n\r\n\t\t\t\t\tif(field){\r\n\t\t\t\t\t\taction.component = newRow.getCell(field);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}\r\n\r\nHistory.moduleName = \"history\";\r\n\r\n//load defaults\r\nHistory.undoers = defaultUndoers;\r\nHistory.redoers = defaultRedoers;\r\n\r\nexport default History;","export default {\r\n\tcellEdit: function(action){\r\n\t\taction.component.setValueProcessData(action.data.oldValue);\r\n\t\taction.component.cellRendered();\r\n\t},\r\n\r\n\trowAdd: function(action){\r\n\t\taction.component.deleteActual();\r\n\t},\r\n\r\n\trowDelete: function(action){\r\n\t\tvar newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index);\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tthis.table.modules.groupRows.updateGroupRows(true);\r\n\t\t}\r\n\r\n\t\tthis._rebindRow(action.component, newRow);\r\n\t},\r\n\r\n\trowMove: function(action){\r\n\t\tthis.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posFrom], !action.data.after);\r\n\t\tthis.table.rowManager.redraw();\r\n\t},\r\n};","export default {\r\n\tcellEdit: function(action){\r\n\t\taction.component.setValueProcessData(action.data.newValue);\r\n\t\taction.component.cellRendered();\r\n\t},\r\n\r\n\trowAdd: function(action){\r\n\t\tvar newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index);\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tthis.table.modules.groupRows.updateGroupRows(true);\r\n\t\t}\r\n\r\n\t\tthis._rebindRow(action.component, newRow);\r\n\t},\r\n\r\n\trowDelete:function(action){\r\n\t\taction.component.deleteActual();\r\n\t},\r\n\r\n\trowMove: function(action){\r\n\t\tthis.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posTo], action.data.after);\r\n\t\tthis.table.rowManager.redraw();\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\nimport Column from '../../core/column/Column.js';\r\n\r\nclass HtmlTableImport extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.fieldIndex = [];\r\n\t\tthis.hasIndex = false;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.tableElementCheck();\r\n\t}\r\n\r\n\ttableElementCheck(){\r\n\t\tif(this.table.originalElement && this.table.originalElement.tagName === \"TABLE\"){\r\n\t\t\tthis.parseTable();\r\n\t\t}\r\n\t}\r\n\r\n\tparseTable(){\r\n\t\tvar element = this.table.originalElement,\r\n\t\toptions = this.table.options,\r\n\t\tcolumns = options.columns,\r\n\t\theaders = element.getElementsByTagName(\"th\"),\r\n\t\trows = element.getElementsByTagName(\"tbody\")[0],\r\n\t\tdata = [],\r\n\t\tnewTable;\r\n\r\n\t\tthis.hasIndex = false;\r\n\r\n\t\tthis.dispatchExternal(\"htmlImporting\");\r\n\r\n\t\trows = rows ? rows.getElementsByTagName(\"tr\") : [];\r\n\r\n\t\t//check for Tabulator inline options\r\n\t\tthis._extractOptions(element, options);\r\n\r\n\t\tif(headers.length){\r\n\t\t\tthis._extractHeaders(headers, rows);\r\n\t\t}else{\r\n\t\t\tthis._generateBlankHeaders(headers, rows);\r\n\t\t}\r\n\r\n\t\t//iterate through table rows and build data set\r\n\t\tfor(var index = 0; index < rows.length; index++){\r\n\t\t\tvar row = rows[index],\r\n\t\t\tcells = row.getElementsByTagName(\"td\"),\r\n\t\t\titem = {};\r\n\r\n\t\t\t//create index if the dont exist in table\r\n\t\t\tif(!this.hasIndex){\r\n\t\t\t\titem[options.index] = index;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\tvar cell = cells[i];\r\n\t\t\t\tif(typeof this.fieldIndex[i] !== \"undefined\"){\r\n\t\t\t\t\titem[this.fieldIndex[i]] = cell.innerHTML;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//add row data to item\r\n\t\t\tdata.push(item);\r\n\t\t}\r\n\r\n\t\toptions.data = data;\r\n\r\n\t\tthis.dispatchExternal(\"htmlImported\");\r\n\t}\r\n\r\n\t//extract tabulator attribute options\r\n\t_extractOptions(element, options, defaultOptions){\r\n\t\tvar attributes = element.attributes;\r\n\t\tvar optionsArr = defaultOptions ? Object.keys(defaultOptions) : Object.keys(options);\r\n\t\tvar optionsList = {};\r\n\r\n\t\toptionsArr.forEach((item) => {\r\n\t\t\toptionsList[item.toLowerCase()] = item;\r\n\t\t});\r\n\r\n\t\tfor(var index in attributes){\r\n\t\t\tvar attrib = attributes[index];\r\n\t\t\tvar name;\r\n\r\n\t\t\tif(attrib && typeof attrib == \"object\" && attrib.name && attrib.name.indexOf(\"tabulator-\") === 0){\r\n\t\t\t\tname = attrib.name.replace(\"tabulator-\", \"\");\r\n\r\n\t\t\t\tif(typeof optionsList[name] !== \"undefined\"){\r\n\t\t\t\t\toptions[optionsList[name]] = this._attribValue(attrib.value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//get value of attribute\r\n\t_attribValue(value){\r\n\t\tif(value === \"true\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif(value === \"false\"){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\t//find column if it has already been defined\r\n\t_findCol(title){\r\n\t\tvar match = this.table.options.columns.find((column) => {\r\n\t\t\treturn column.title === title;\r\n\t\t});\r\n\r\n\t\treturn match || false;\r\n\t}\r\n\r\n\t//extract column from headers\r\n\t_extractHeaders(headers, rows){\r\n\t\tfor(var index = 0; index < headers.length; index++){\r\n\t\t\tvar header = headers[index],\r\n\t\t\texists = false,\r\n\t\t\tcol = this._findCol(header.textContent),\r\n\t\t\twidth, attributes;\r\n\r\n\t\t\tif(col){\r\n\t\t\t\texists = true;\r\n\t\t\t}else{\r\n\t\t\t\tcol = {title:header.textContent.trim()};\r\n\t\t\t}\r\n\r\n\t\t\tif(!col.field) {\r\n\t\t\t\tcol.field = header.textContent.trim().toLowerCase().replace(\" \", \"_\");\r\n\t\t\t}\r\n\r\n\t\t\twidth = header.getAttribute(\"width\");\r\n\r\n\t\t\tif(width && !col.width)\t{\r\n\t\t\t\tcol.width = width;\r\n\t\t\t}\r\n\r\n\t\t\t//check for Tabulator inline options\r\n\t\t\tthis._extractOptions(header, col, this.table.columnManager.optionsList.registeredDefaults);\r\n\r\n\t\t\tthis.fieldIndex[index] = col.field;\r\n\r\n\t\t\tif(col.field == this.table.options.index){\r\n\t\t\t\tthis.hasIndex = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(!exists){\r\n\t\t\t\tthis.table.options.columns.push(col);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\r\n\t//generate blank headers\r\n\t_generateBlankHeaders(headers, rows){\r\n\t\tfor(var index = 0; index < headers.length; index++){\r\n\t\t\tvar header = headers[index],\r\n\t\t\tcol = {title:\"\", field:\"col\" + index};\r\n\r\n\t\t\tthis.fieldIndex[index] = col.field;\r\n\r\n\t\t\tvar width = header.getAttribute(\"width\");\r\n\r\n\t\t\tif(width){\r\n\t\t\t\tcol.width = width;\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.options.columns.push(col);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nHtmlTableImport.moduleName = \"htmlTableImport\";\r\n\r\nexport default HtmlTableImport;","import csv from './importers/csv.js';\r\nimport json from './importers/json.js';\r\n\r\nexport default {\r\n\tcsv:csv,\r\n\tjson:json,\r\n};","function csvImporter(input){\r\n var data = [],\r\n row = 0, \r\n col = 0,\r\n inQuote = false;\r\n \r\n //Iterate over each character\r\n for (let index = 0; index < input.length; index++) {\r\n let char = input[index], \r\n nextChar = input[index+1]; \r\n \r\n //Initialize empty row\r\n if(!data[row]){\r\n data[row] = [];\r\n }\r\n\r\n //Initialize empty column\r\n if(!data[row][col]){\r\n data[row][col] = \"\";\r\n }\r\n \r\n //Handle quotation mark inside string\r\n if (char == '\"' && inQuote && nextChar == '\"') { \r\n data[row][col] += char; \r\n index++;\r\n continue; \r\n }\r\n \r\n //Begin / End Quote\r\n if (char == '\"') { \r\n inQuote = !inQuote;\r\n continue;\r\n }\r\n \r\n //Next column (if not in quote)\r\n if (char == ',' && !inQuote) { \r\n col++;\r\n continue; \r\n }\r\n \r\n //New row if new line and not in quote (CRLF) \r\n if (char == '\\r' && nextChar == '\\n' && !inQuote) { \r\n col = 0; \r\n row++; \r\n index++; \r\n continue; \r\n }\r\n \r\n //New row if new line and not in quote (CR or LF) \r\n if ((char == '\\r' || char == '\\n') && !inQuote) { \r\n col = 0;\r\n row++;\r\n continue; \r\n }\r\n\r\n //Normal Character, append to column\r\n data[row][col] += char;\r\n }\r\n\r\n return data;\r\n}\r\n\r\nexport default csvImporter;","export default function(input){\r\n try {\r\n return JSON.parse(input);\r\n } catch(e) {\r\n console.warn(\"JSON Import Error - File contents is invalid JSON\", e);\r\n return Promise.reject();\r\n }\r\n}","import Module from '../../core/Module.js';\r\n\r\nimport defaultImporters from './defaults/importers.js';\r\n\r\nclass Import extends Module{\r\n \r\n constructor(table){\r\n super(table);\r\n \r\n this.registerTableOption(\"importFormat\");\r\n this.registerTableOption(\"importReader\", \"text\");\r\n }\r\n \r\n initialize(){\r\n this.registerTableFunction(\"import\", this.importFromFile.bind(this));\r\n\r\n if(this.table.options.importFormat){\r\n this.subscribe(\"data-loading\", this.loadDataCheck.bind(this), 10);\r\n this.subscribe(\"data-load\", this.loadData.bind(this), 10);\r\n }\r\n }\r\n\r\n loadDataCheck(data){\r\n return typeof data === \"string\";\r\n }\r\n\r\n loadData(data, params, config, silent, previousData){\r\n return this.importData(this.lookupImporter(), data)\r\n .then(this.structureData.bind(this))\r\n .catch((err) => {\r\n console.error(\"Import Error:\", err || \"Unable to import data\")\r\n return Promise.reject(err);\r\n })\r\n }\r\n\r\n lookupImporter(importFormat){\r\n var importer;\r\n \r\n if(!importFormat){\r\n importFormat = this.table.options.importFormat;\r\n }\r\n \r\n if(typeof importFormat === \"string\"){\r\n importer = Import.importers[importFormat];\r\n }else{\r\n importer = importFormat;\r\n }\r\n\r\n if(!importer){\r\n console.error(\"Import Error - Importer not found:\", importFormat);\r\n }\r\n \r\n return importer;\r\n }\r\n \r\n importFromFile(importFormat, extension){\r\n var importer = this.lookupImporter(importFormat);\r\n \r\n if(importer){\r\n return this.pickFile(extension)\r\n .then(this.importData.bind(this, importer))\r\n .then(this.structureData.bind(this))\r\n .then(this.setData.bind(this))\r\n .catch((err) => {\r\n console.error(\"Import Error:\", err || \"Unable to import file\")\r\n return Promise.reject(err);\r\n })\r\n }\r\n }\r\n \r\n pickFile(extensions){\r\n return new Promise((resolve, reject) => {\r\n var input = document.createElement(\"input\");\r\n input.type = \"file\";\r\n input.accept = extensions;\r\n \r\n input.addEventListener(\"change\", (e) => {\r\n var file = input.files[0],\r\n reader = new FileReader(),\r\n data;\r\n \r\n switch(this.table.options.importReader){\r\n case \"buffer\":\r\n reader.readAsArrayBuffer(file);\r\n break;\r\n\r\n case \"binary\":\r\n reader.readAsBinaryString(file);\r\n break;\r\n\r\n case \"url\":\r\n reader.readAsDataURL(file);\r\n break;\r\n\r\n case \"text\":\r\n default:\r\n reader.readAsText(file);\r\n }\r\n \r\n reader.onload = (e) => {\r\n resolve(reader.result)\r\n };\r\n \r\n reader.onerror = (e) => {\r\n console.warn(\"File Load Error - Unable to read file\");\r\n reject();\r\n };\r\n });\r\n \r\n input.click();\r\n });\r\n }\r\n \r\n importData(importer, fileContents){\r\n var data = importer.call(this.table, fileContents);\r\n \r\n if(data instanceof Promise){\r\n return data;\r\n }else{\r\n return data ? Promise.resolve(data) : Promise.reject();\r\n }\r\n }\r\n\r\n structureData(parsedData){\r\n var data = [];\r\n \r\n if(Array.isArray(parsedData) && parsedData.length && Array.isArray(parsedData[0])){\r\n if(this.table.options.autoColumns){\r\n data = this.structureArrayToObject(parsedData);\r\n }else{\r\n data = this.structureArrayToColumns(parsedData);\r\n }\r\n\r\n return data;\r\n }else{\r\n return parsedData;\r\n }\r\n }\r\n\r\n structureArrayToObject(parsedData){\r\n var columns = parsedData.shift();\r\n\r\n var data = parsedData.map((values) => {\r\n var row = {};\r\n\r\n columns.forEach((key, i) => {\r\n row[key] = values[i];\r\n })\r\n\r\n return row;\r\n })\r\n\r\n return data;\r\n }\r\n\r\n structureArrayToColumns(parsedData){\r\n var data = [],\r\n columns = this.table.getColumns();\r\n\r\n //remove first row if it is the column names\r\n if(columns[0] && parsedData[0][0]){\r\n if(columns[0].getDefinition().title === parsedData[0][0]){\r\n parsedData.shift();\r\n }\r\n }\r\n \r\n //convert row arrays to objects\r\n parsedData.forEach((rowData) => {\r\n var row = {};\r\n\r\n rowData.forEach((value, index) => {\r\n var column = columns[index];\r\n\r\n if(column){\r\n row[column.getField()] = value;\r\n }\r\n })\r\n\r\n data.push(row);\r\n });\r\n\r\n return data;\r\n }\r\n \r\n setData(data){\r\n return this.table.setData(data);\r\n }\r\n}\r\n\r\nImport.moduleName = \"import\";\r\n\r\n//load defaults\r\nImport.importers = defaultImporters;\r\n\r\nexport default Import;","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport Cell from '../../core/cell/Cell';\r\nimport Column from '../../core/column/Column';\r\n\r\nclass Interaction extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.eventMap = {\r\n\t\t\t//row events\r\n\t\t\trowClick:\"row-click\",\r\n\t\t\trowDblClick:\"row-dblclick\",\r\n\t\t\trowContext:\"row-contextmenu\",\r\n\t\t\trowMouseEnter:\"row-mouseenter\",\r\n\t\t\trowMouseLeave:\"row-mouseleave\",\r\n\t\t\trowMouseOver:\"row-mouseover\",\r\n\t\t\trowMouseOut:\"row-mouseout\",\r\n\t\t\trowMouseMove:\"row-mousemove\",\r\n\t\t\trowTap:\"row\",\r\n\t\t\trowDblTap:\"row\",\r\n\t\t\trowTapHold:\"row\",\r\n\r\n\t\t\t//cell events\r\n\t\t\tcellClick:\"cell-click\",\r\n\t\t\tcellDblClick:\"cell-dblclick\",\r\n\t\t\tcellContext:\"cell-contextmenu\",\r\n\t\t\tcellMouseEnter:\"cell-mouseenter\",\r\n\t\t\tcellMouseLeave:\"cell-mouseleave\",\r\n\t\t\tcellMouseOver:\"cell-mouseover\",\r\n\t\t\tcellMouseOut:\"cell-mouseout\",\r\n\t\t\tcellMouseMove:\"cell-mousemove\",\r\n\t\t\tcellTap:\"cell\",\r\n\t\t\tcellDblTap:\"cell\",\r\n\t\t\tcellTapHold:\"cell\",\r\n\r\n\t\t\t//column header events\r\n\t\t\theaderClick:\"column-click\",\r\n\t\t\theaderDblClick:\"column-dblclick\",\r\n\t\t\theaderContext:\"column-contextmenu\",\r\n\t\t\theaderMouseEnter:\"column-mouseenter\",\r\n\t\t\theaderMouseLeave:\"column-mouseleave\",\r\n\t\t\theaderMouseOver:\"column-mouseover\",\r\n\t\t\theaderMouseOut:\"column-mouseout\",\r\n\t\t\theaderMouseMove:\"column-mousemove\",\r\n\t\t\theaderTap:\"column\",\r\n\t\t\theaderDblTap:\"column\",\r\n\t\t\theaderTapHold:\"column\",\r\n\r\n\t\t\t//group header\r\n\t\t\tgroupClick:\"group-click\",\r\n\t\t\tgroupDblClick:\"group-dblclick\",\r\n\t\t\tgroupContext:\"group-contextmenu\",\r\n\t\t\tgroupMouseEnter:\"group-mouseenter\",\r\n\t\t\tgroupMouseLeave:\"group-mouseleave\",\r\n\t\t\tgroupMouseOver:\"group-mouseover\",\r\n\t\t\tgroupMouseOut:\"group-mouseout\",\r\n\t\t\tgroupMouseMove:\"group-mousemove\",\r\n\t\t\tgroupTap:\"group\",\r\n\t\t\tgroupDblTap:\"group\",\r\n\t\t\tgroupTapHold:\"group\",\r\n\t\t}\r\n\r\n\t\tthis.subscribers = {};\r\n\r\n\t\tthis.touchSubscribers = {};\r\n\r\n\t\tthis.columnSubscribers = {};\r\n\r\n\t\tthis.touchWatchers = {\r\n\t\t\trow:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tcell:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tcolumn:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tgroup:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.registerColumnOption(\"headerClick\");\r\n\t\tthis.registerColumnOption(\"headerDblClick\");\r\n\t\tthis.registerColumnOption(\"headerContext\");\r\n\t\tthis.registerColumnOption(\"headerMouseEnter\");\r\n\t\tthis.registerColumnOption(\"headerMouseLeave\");\r\n\t\tthis.registerColumnOption(\"headerMouseOver\");\r\n\t\tthis.registerColumnOption(\"headerMouseOut\");\r\n\t\tthis.registerColumnOption(\"headerMouseMove\");\r\n\t\tthis.registerColumnOption(\"headerTap\");\r\n\t\tthis.registerColumnOption(\"headerDblTap\");\r\n\t\tthis.registerColumnOption(\"headerTapHold\");\r\n\r\n\t\tthis.registerColumnOption(\"cellClick\");\r\n\t\tthis.registerColumnOption(\"cellDblClick\");\r\n\t\tthis.registerColumnOption(\"cellContext\");\r\n\t\tthis.registerColumnOption(\"cellMouseEnter\");\r\n\t\tthis.registerColumnOption(\"cellMouseLeave\");\r\n\t\tthis.registerColumnOption(\"cellMouseOver\");\r\n\t\tthis.registerColumnOption(\"cellMouseOut\");\r\n\t\tthis.registerColumnOption(\"cellMouseMove\");\r\n\t\tthis.registerColumnOption(\"cellTap\");\r\n\t\tthis.registerColumnOption(\"cellDblTap\");\r\n\t\tthis.registerColumnOption(\"cellTapHold\");\r\n\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeExternalEvents();\r\n\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this))\r\n\t\tthis.subscribe(\"cell-dblclick\", this.cellContentsSelectionFixer.bind(this))\r\n\t}\r\n\r\n\tcellContentsSelectionFixer(e, cell){\r\n\t\tif(this.table.modExists(\"edit\")){\r\n\t\t\tif (this.table.modules.edit.currentCell === this){\r\n\t\t\t\treturn; //prevent instant selection of editor content\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\ttry{\r\n\t\t\tif (document.selection) { // IE\r\n\t\t\t\tvar range = document.body.createTextRange();\r\n\t\t\t\trange.moveToElementText(this.element);\r\n\t\t\t\trange.select();\r\n\t\t\t} else if (window.getSelection) {\r\n\t\t\t\tvar range = document.createRange();\r\n\t\t\t\trange.selectNode(this.element);\r\n\t\t\t\twindow.getSelection().removeAllRanges();\r\n\t\t\t\twindow.getSelection().addRange(range);\r\n\t\t\t}\r\n\t\t}catch(e){}\r\n\t}\r\n\r\n\tinitializeExternalEvents(){\r\n\t\tfor(let key in this.eventMap){\r\n\t\t\tthis.subscriptionChangeExternal(key, this.subscriptionChanged.bind(this, key))\r\n\t\t}\r\n\t}\r\n\r\n\tsubscriptionChanged(key, added){\r\n\t\tvar index;\r\n\r\n\t\tif(added){\r\n\t\t\tif(!this.subscribers[key]){\r\n\t\t\t\tif(this.eventMap[key].includes(\"-\")){\r\n\t\t\t\t\tthis.subscribers[key] = this.handle.bind(this, key);\r\n\t\t\t\t\tthis.subscribe(this.eventMap[key], this.subscribers[key]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.subscribeTouchEvents(key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.eventMap[key].includes(\"-\")){\r\n\t\t\t\tif(this.subscribers[key] && !this.columnSubscribers[key] && !this.subscribedExternal(key)){\r\n\t\t\t\t\tthis.unsubscribe(this.eventMap[key], this.subscribers[key]);\r\n\t\t\t\t\tdelete this.subscribers[key];\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.unsubscribeTouchEvents(key);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tsubscribeTouchEvents(key){\r\n\t\tvar type = this.eventMap[key];\r\n\r\n\t\tif(!this.touchSubscribers[type + \"-touchstart\"]){\r\n\t\t\tthis.touchSubscribers[type + \"-touchstart\"] = this.handleTouch.bind(this, type, \"start\");\r\n\t\t\tthis.touchSubscribers[type + \"-touchend\"] = this.handleTouch.bind(this, type, \"end\");\r\n\r\n\t\t\tthis.subscribe(type + \"-touchstart\", this.touchSubscribers[type + \"-touchstart\"]);\r\n\t\t\tthis.subscribe(type + \"-touchend\", this.touchSubscribers[type + \"-touchend\"]);\r\n\t\t}\r\n\r\n\t\tthis.subscribers[key] = true;\r\n\t}\r\n\r\n\tunsubscribeTouchEvents(key){\r\n\t\tvar notouch = true,\r\n\t\ttype = this.eventMap[key];\r\n\r\n\t\tif(this.subscribers[key] && !this.subscribedExternal(key)){\r\n\t\t\tdelete this.subscribers[key];\r\n\r\n\t\t\tfor(let i in this.eventMap){\r\n\t\t\t\tif(this.eventMap[i] === type){\r\n\t\t\t\t\tif(this.subscribers[i]){\r\n\t\t\t\t\t\tnotouch = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(notouch){\r\n\t\t\t\tthis.unsubscribe(type + \"-touchstart\", this.touchSubscribers[type + \"-touchstart\"]);\r\n\t\t\t\tthis.unsubscribe(type + \"-touchend\", this.touchSubscribers[type + \"-touchend\"]);\r\n\r\n\t\t\t\tdelete this.touchSubscribers[type + \"-touchstart\"];\r\n\t\t\t\tdelete this.touchSubscribers[type + \"-touchend\"];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition;\r\n\r\n\t\tfor(let key in this.eventMap){\r\n\t\t\tif(def[key]){\r\n\t\t\t\tthis.subscriptionChanged(key, true);\r\n\r\n\t\t\t\tif(!this.columnSubscribers[key]){\r\n\t\t\t\t\tthis.columnSubscribers[key] = [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.columnSubscribers[key].push(column);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\thandle(action, e, component){\r\n\t\tthis.dispatchEvent(action, e, component);\r\n\t}\r\n\r\n\thandleTouch(type, action, e, component){\r\n\t\tvar watchers = this.touchWatchers[type];\r\n\r\n\t\tif(type === \"column\"){\r\n\t\t\ttype = \"header\";\r\n\t\t}\r\n\r\n\t\tswitch(action){\r\n\t\t\tcase \"start\":\r\n\t\t\twatchers.tap = true;\r\n\r\n\t\t\tclearTimeout(watchers.tapHold);\r\n\r\n\t\t\twatchers.tapHold = setTimeout(() => {\r\n\t\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\t\twatchers.tapHold = null;\r\n\r\n\t\t\t\twatchers.tap = null;\r\n\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\tthis.dispatchEvent(type + \"TapHold\", e, component);\r\n\t\t\t}, 1000);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"end\":\r\n\t\t\tif(watchers.tap){\r\n\r\n\t\t\t\twatchers.tap = null;\r\n\t\t\t\tthis.dispatchEvent(type + \"Tap\", e, component);\r\n\t\t\t}\r\n\r\n\t\t\tif(watchers.tapDbl){\r\n\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\tthis.dispatchEvent(type + \"DblTap\", e, component);\r\n\t\t\t}else{\r\n\t\t\t\twatchers.tapDbl = setTimeout(() => {\r\n\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\twatchers.tapDbl = null;\r\n\t\t\t\t}, 300);\r\n\t\t\t}\r\n\r\n\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\twatchers.tapHold = null;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tdispatchEvent(action, e, component){\r\n\t\tvar componentObj = component.getComponent(),\r\n\t\tcallback;\r\n\r\n\t\tif(this.columnSubscribers[action]){\r\n\r\n\t\t\tif(component instanceof Cell){\r\n\t\t\t\tcallback = component.column.definition[action];\r\n\t\t\t}else if(component instanceof Column){\r\n\t\t\t\tcallback = component.definition[action];\r\n\t\t\t}\r\n\r\n\t\t\tif(callback){\r\n\t\t\t\tcallback(e, componentObj);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.dispatchExternal(action, e, componentObj);\r\n\t}\r\n}\r\n\r\nInteraction.moduleName = \"interaction\";\r\n\r\nexport default Interaction;","import Module from '../../core/Module.js';\r\n\r\nimport defaultBindings from './defaults/bindings.js';\r\nimport defaultActions from './defaults/actions.js';\r\n\r\nclass Keybindings extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.watchKeys = null;\r\n\t\tthis.pressedKeys = null;\r\n\t\tthis.keyupBinding = false;\r\n\t\tthis.keydownBinding = false;\r\n\r\n\t\tthis.registerTableOption(\"keybindings\", {}); //array for keybindings\r\n\t\tthis.registerTableOption(\"tabEndNewRow\", false); //create new row when tab to end of table\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tvar bindings = this.table.options.keybindings,\r\n\t\tmergedBindings = {};\r\n\r\n\t\tthis.watchKeys = {};\r\n\t\tthis.pressedKeys = [];\r\n\r\n\t\tif(bindings !== false){\r\n\t\t\tObject.assign(mergedBindings, Keybindings.bindings)\r\n\t\t\tObject.assign(mergedBindings, bindings)\r\n\r\n\t\t\tthis.mapBindings(mergedBindings);\r\n\t\t\tthis.bindEvents();\r\n\t\t}\r\n\r\n\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\r\n\t}\r\n\r\n\tmapBindings(bindings){\r\n\t\tfor(let key in bindings){\r\n\t\t\tif(Keybindings.actions[key]){\r\n\t\t\t\tif(bindings[key]){\r\n\t\t\t\t\tif(typeof bindings[key] !== \"object\"){\r\n\t\t\t\t\t\tbindings[key] = [bindings[key]];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbindings[key].forEach((binding) => {\r\n\t\t\t\t\t\tvar bindingList = Array.isArray(binding) ? binding : [binding];\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tbindingList.forEach((item) => {\r\n\t\t\t\t\t\t\tthis.mapBinding(key, item);\r\n\t\t\t\t\t\t});\t\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Key Binding Error - no such action:\", key);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmapBinding(action, symbolsList){\r\n\t\tvar binding = {\r\n\t\t\taction: Keybindings.actions[action],\r\n\t\t\tkeys: [],\r\n\t\t\tctrl: false,\r\n\t\t\tshift: false,\r\n\t\t\tmeta: false,\r\n\t\t};\r\n\r\n\t\tvar symbols = symbolsList.toString().toLowerCase().split(\" \").join(\"\").split(\"+\");\r\n\r\n\t\tsymbols.forEach((symbol) => {\r\n\t\t\tswitch(symbol){\r\n\t\t\t\tcase \"ctrl\":\r\n\t\t\t\tbinding.ctrl = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"shift\":\r\n\t\t\t\tbinding.shift = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"meta\":\r\n\t\t\t\tbinding.meta = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tsymbol = isNaN(symbol) ? symbol.toUpperCase().charCodeAt(0) : parseInt(symbol);\r\n\t\t\t\tbinding.keys.push(symbol);\r\n\r\n\t\t\t\tif(!this.watchKeys[symbol]){\r\n\t\t\t\t\tthis.watchKeys[symbol] = [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.watchKeys[symbol].push(binding);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tbindEvents(){\r\n\t\tvar self = this;\r\n\r\n\t\tthis.keyupBinding = function(e){\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tvar bindings = self.watchKeys[code];\r\n\r\n\t\t\tif(bindings){\r\n\r\n\t\t\t\tself.pressedKeys.push(code);\r\n\r\n\t\t\t\tbindings.forEach(function(binding){\r\n\t\t\t\t\tself.checkBinding(e, binding);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.keydownBinding = function(e){\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tvar bindings = self.watchKeys[code];\r\n\r\n\t\t\tif(bindings){\r\n\r\n\t\t\t\tvar index = self.pressedKeys.indexOf(code);\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tself.pressedKeys.splice(index, 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.table.element.addEventListener(\"keydown\", this.keyupBinding);\r\n\r\n\t\tthis.table.element.addEventListener(\"keyup\", this.keydownBinding);\r\n\t}\r\n\r\n\tclearBindings(){\r\n\t\tif(this.keyupBinding){\r\n\t\t\tthis.table.element.removeEventListener(\"keydown\", this.keyupBinding);\r\n\t\t}\r\n\r\n\t\tif(this.keydownBinding){\r\n\t\t\tthis.table.element.removeEventListener(\"keyup\", this.keydownBinding);\r\n\t\t}\r\n\t}\r\n\r\n\tcheckBinding(e, binding){\r\n\t\tvar match = true;\r\n\r\n\t\tif(e.ctrlKey == binding.ctrl && e.shiftKey == binding.shift && e.metaKey == binding.meta){\r\n\t\t\tbinding.keys.forEach((key) => {\r\n\t\t\t\tvar index = this.pressedKeys.indexOf(key);\r\n\r\n\t\t\t\tif(index == -1){\r\n\t\t\t\t\tmatch = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tbinding.action.call(this, e);\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nKeybindings.moduleName = \"keybindings\";\r\n\r\n//load defaults\r\nKeybindings.bindings = defaultBindings;\r\nKeybindings.actions = defaultActions;\r\n\r\nexport default Keybindings;","export default {\r\n\tnavPrev:\"shift + 9\",\r\n\tnavNext:9,\r\n\tnavUp:38,\r\n\tnavDown:40,\r\n\tscrollPageUp:33,\r\n\tscrollPageDown:34,\r\n\tscrollToStart:36,\r\n\tscrollToEnd:35,\r\n\tundo:[\"ctrl + 90\", \"meta + 90\"],\r\n\tredo:[\"ctrl + 89\", \"meta + 89\"],\r\n\tcopyToClipboard:[\"ctrl + 67\", \"meta + 89\"],\r\n};","export default {\r\n\tkeyBlock:function(e){\r\n\t\te.stopPropagation();\r\n\t\te.preventDefault();\r\n\t},\r\n\tscrollPageUp:function(e){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tnewPos = rowManager.scrollTop - rowManager.element.clientHeight,\r\n\t\tscrollMax = rowManager.element.scrollHeight;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\tif(newPos >= 0){\r\n\t\t\t\trowManager.element.scrollTop = newPos;\r\n\t\t\t}else{\r\n\t\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[0]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tscrollPageDown:function(e){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tnewPos = rowManager.scrollTop + rowManager.element.clientHeight,\r\n\t\tscrollMax = rowManager.element.scrollHeight;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\tif(newPos <= scrollMax){\r\n\t\t\t\trowManager.element.scrollTop = newPos;\r\n\t\t\t}else{\r\n\t\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\r\n\t},\r\n\tscrollToStart:function(e){\r\n\t\tvar rowManager = this.table.rowManager;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[0]);\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tscrollToEnd:function(e){\r\n\t\tvar rowManager = this.table.rowManager;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]);\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tnavPrev:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-prev\", e);\r\n\t},\r\n\r\n\tnavNext:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-next\", e);\r\n\t},\r\n\r\n\tnavLeft:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-left\", e);\r\n\t},\r\n\r\n\tnavRight:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-right\", e);\r\n\t},\r\n\r\n\tnavUp:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-up\", e);\r\n\t},\r\n\r\n\tnavDown:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-down\", e);\r\n\t},\r\n\r\n\tundo:function(e){\r\n\t\tvar cell = false;\r\n\t\tif(this.table.options.history && this.table.modExists(\"history\") && this.table.modExists(\"edit\")){\r\n\r\n\t\t\tcell = this.table.modules.edit.currentCell;\r\n\r\n\t\t\tif(!cell){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tthis.table.modules.history.undo();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tredo:function(e){\r\n\t\tvar cell = false;\r\n\t\tif(this.table.options.history && this.table.modExists(\"history\") && this.table.modExists(\"edit\")){\r\n\r\n\t\t\tcell = this.table.modules.edit.currentCell;\r\n\r\n\t\t\tif(!cell){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tthis.table.modules.history.redo();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tcopyToClipboard:function(e){\r\n\t\tif(!this.table.modules.edit.currentCell){\r\n\t\t\tif(this.table.modExists(\"clipboard\", true)){\r\n\t\t\t\tthis.table.modules.clipboard.copy(false, true);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass Menu extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.menuContainer = null;\r\n\t\tthis.menuElements = [];\r\n\t\tthis.blurEvent = this.hideMenu.bind(this);\r\n\t\tthis.escEvent = this.escMenu.bind(this);\r\n\t\tthis.nestedMenuBlock = false;\r\n\t\tthis.positionReversedX = false;\r\n\t\t\r\n\t\tthis.currentComponent = null;\r\n\t\t\r\n\t\tthis.columnSubscribers = {};\r\n\t\t\r\n\t\tthis.registerTableOption(\"rowContextMenu\", false);\r\n\t\tthis.registerTableOption(\"rowClickMenu\", false);\r\n\t\tthis.registerTableOption(\"groupContextMenu\", false);\r\n\t\tthis.registerTableOption(\"groupClickMenu\", false);\r\n\t\tthis.registerTableOption(\"menuContainer\", false);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"headerContextMenu\");\r\n\t\tthis.registerColumnOption(\"headerClickMenu\");\r\n\t\tthis.registerColumnOption(\"headerMenu\");\r\n\t\tthis.registerColumnOption(\"contextMenu\");\r\n\t\tthis.registerColumnOption(\"clickMenu\");\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.lookupMenuContainer();\r\n\t\t\r\n\t\tthis.initializeRowWatchers();\r\n\t\tthis.initializeGroupWatchers();\r\n\t\t\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t}\r\n\t\r\n\tlookupMenuContainer(){\r\n\t\t\r\n\t\tthis.menuContainer = this.table.options.menuContainer;\r\n\t\t\r\n\t\tif(typeof this.menuContainer === \"string\"){\r\n\t\t\tthis.menuContainer = document.querySelector(this.menuContainer);\r\n\t\t\t\r\n\t\t\tif(!this.menuContainer){\r\n\t\t\t\tconsole.warn(\"Menu Error - no container element found matching selector:\", this.table.options.menuContainer , \"(defaulting to document body)\");\r\n\t\t\t}\r\n\t\t}else if (this.menuContainer === true){\r\n\t\t\tthis.menuContainer = this.table.element;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.menuContainer && !this.checkMenuContainerIsParent(this.menuContainer)){\r\n\t\t\tthis.menuContainer = false;\r\n\t\t\tconsole.warn(\"Menu Error - container element does not contain this table:\", this.table.options.menuContainer , \"(defaulting to document body)\");\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.menuContainer){\r\n\t\t\tthis.menuContainer = document.body;\r\n\t\t}\r\n\t}\r\n\t\r\n\tcheckMenuContainerIsParent(container, element = this.table.element){\r\n\t\tif(container === element){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn element.parentNode ? this.checkMenuContainerIsParent(container, element.parentNode) : false;\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRowWatchers(){\r\n\t\tif(this.table.options.rowContextMenu){\r\n\t\t\tthis.subscribe(\"row-contextmenu\", this.loadMenuEvent.bind(this, this.table.options.rowContextMenu));\r\n\t\t\tthis.table.on(\"rowTapHold\", this.loadMenuEvent.bind(this, this.table.options.rowContextMenu));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.rowClickMenu){\r\n\t\t\tthis.subscribe(\"row-click\", this.loadMenuEvent.bind(this, this.table.options.rowClickMenu));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeGroupWatchers(){\r\n\t\tif(this.table.options.groupContextMenu){\r\n\t\t\tthis.subscribe(\"group-contextmenu\", this.loadMenuEvent.bind(this, this.table.options.groupContextMenu));\r\n\t\t\tthis.table.on(\"groupTapHold\", this.loadMenuEvent.bind(this, this.table.options.groupContextMenu));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.groupClickMenu){\r\n\t\t\tthis.subscribe(\"group-click\", this.loadMenuEvent.bind(this, this.table.options.groupClickMenu));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar options = [\"headerContextMenu\", \"headerClickMenu\"],\r\n\t\tdef = column.definition;\r\n\t\t\r\n\t\t//handle column events\r\n\t\tif(def.headerContextMenu && !this.columnSubscribers.headerContextMenu){\r\n\t\t\tthis.columnSubscribers.headerContextMenu = this.loadMenuTableColumnEvent.bind(this, \"headerContextMenu\");\r\n\t\t\tthis.subscribe(\"column-contextmenu\", this.columnSubscribers.headerContextMenu);\r\n\t\t\tthis.table.on(\"headerTapHold\", this.loadMenuTableColumnEvent.bind(this, \"headerContextMenu\"))\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerClickMenu && !this.columnSubscribers.headerClickMenu){\r\n\t\t\tthis.columnSubscribers.headerClickMenu = this.loadMenuTableColumnEvent.bind(this, \"headerClickMenu\");\r\n\t\t\tthis.subscribe(\"column-click\", this.columnSubscribers.headerClickMenu);\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerMenu){\r\n\t\t\tthis.initializeColumnHeaderMenu(column);\r\n\t\t}\r\n\t\t\r\n\t\t//handle cell events\r\n\t\tif(def.contextMenu && !this.columnSubscribers.contextMenu){\r\n\t\t\tthis.columnSubscribers.contextMenu = this.loadMenuTableCellEvent.bind(this, \"contextMenu\");\r\n\t\t\tthis.subscribe(\"cell-contextmenu\", this.columnSubscribers.contextMenu);\r\n\t\t\tthis.table.on(\"cellTapHold\", this.loadMenuTableCellEvent.bind(this, \"contextMenu\"))\r\n\t\t}\r\n\t\t\r\n\t\tif(def.clickMenu && !this.columnSubscribers.clickMenu){\r\n\t\t\tthis.columnSubscribers.clickMenu = this.loadMenuTableCellEvent.bind(this, \"clickMenu\");\r\n\t\t\tthis.subscribe(\"cell-click\", this.columnSubscribers.clickMenu);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumnHeaderMenu(column){\r\n\t\tvar headerMenuEl;\r\n\t\t\r\n\t\theaderMenuEl = document.createElement(\"span\");\r\n\t\theaderMenuEl.classList.add(\"tabulator-header-menu-button\");\r\n\t\theaderMenuEl.innerHTML = \"⋮\";\r\n\t\t\r\n\t\theaderMenuEl.addEventListener(\"click\", (e) => {\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\t\r\n\t\t\tthis.loadMenuEvent(column.definition.headerMenu, e, column);\r\n\t\t});\r\n\t\t\r\n\t\tcolumn.titleElement.insertBefore(headerMenuEl, column.titleElement.firstChild);\r\n\t}\r\n\t\r\n\tloadMenuTableCellEvent(option, e, cell){\r\n\t\tif(cell._cell){\r\n\t\t\tcell = cell._cell;\r\n\t\t}\r\n\t\t\r\n\t\tif(cell.column.definition[option]){\r\n\t\t\tthis.loadMenuEvent(cell.column.definition[option], e, cell);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadMenuTableColumnEvent(option, e, column){\r\n\t\tif(column._column){\r\n\t\t\tcolumn = column._column;\r\n\t\t}\r\n\t\t\r\n\t\tif(column.definition[option]){\r\n\t\t\tthis.loadMenuEvent(column.definition[option], e, column);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadMenuEvent(menu, e, component){\r\n\t\tif(component._group){\r\n\t\t\tcomponent = component._group;\r\n\t\t}else if(component._row){\r\n\t\t\tcomponent = component._row;\r\n\t\t}\r\n\t\t\r\n\t\tmenu = typeof menu == \"function\" ? menu.call(this.table, component.getComponent(), e) : menu;\r\n\t\t\r\n\t\tthis.loadMenu(e, component, menu);\r\n\t}\r\n\t\r\n\tloadMenu(e, component, menu, parentEl){\r\n\t\tvar touch = !(e instanceof MouseEvent);\r\n\t\t\r\n\t\tvar menuEl = document.createElement(\"div\");\r\n\t\tmenuEl.classList.add(\"tabulator-menu\");\r\n\t\t\r\n\t\tif(!touch){\r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t\t\r\n\t\t//abort if no menu set\r\n\t\tif(!menu || !menu.length){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(!parentEl){\r\n\t\t\tif(this.nestedMenuBlock){\r\n\t\t\t\t//abort if child menu already open\r\n\t\t\t\tif(this.isOpen()){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.nestedMenuBlock = setTimeout(() => {\r\n\t\t\t\t\tthis.nestedMenuBlock = false;\r\n\t\t\t\t}, 100)\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.hideMenu();\r\n\t\t\tthis.menuElements = [];\r\n\t\t}\r\n\t\t\r\n\t\tmenu.forEach((item) => {\r\n\t\t\tvar itemEl = document.createElement(\"div\"),\r\n\t\t\tlabel = item.label,\r\n\t\t\tdisabled = item.disabled;\r\n\t\t\t\r\n\t\t\tif(item.separator){\r\n\t\t\t\titemEl.classList.add(\"tabulator-menu-separator\");\r\n\t\t\t}else{\r\n\t\t\t\titemEl.classList.add(\"tabulator-menu-item\");\r\n\t\t\t\t\r\n\t\t\t\tif(typeof label == \"function\"){\r\n\t\t\t\t\tlabel = label.call(this.table, component.getComponent());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(label instanceof Node){\r\n\t\t\t\t\titemEl.appendChild(label);\r\n\t\t\t\t}else{\r\n\t\t\t\t\titemEl.innerHTML = label;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(typeof disabled == \"function\"){\r\n\t\t\t\t\tdisabled = disabled.call(this.table, component.getComponent());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(disabled){\r\n\t\t\t\t\titemEl.classList.add(\"tabulator-menu-item-disabled\");\r\n\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(item.menu && item.menu.length){\r\n\t\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\tthis.hideOldSubMenus(menuEl);\r\n\t\t\t\t\t\t\tthis.loadMenu(e, component, item.menu, itemEl);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(item.action){\r\n\t\t\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\t\t\titem.action(e, component.getComponent());\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(item.menu && item.menu.length){\r\n\t\t\t\t\titemEl.classList.add(\"tabulator-menu-item-submenu\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tmenuEl.appendChild(itemEl);\r\n\t\t});\r\n\t\t\r\n\t\tmenuEl.addEventListener(\"click\", (e) => {\r\n\t\t\tthis.hideMenu();\r\n\t\t});\r\n\t\t\r\n\t\tthis.menuElements.push(menuEl);\r\n\t\tthis.positionMenu(menuEl, parentEl, touch, e);\r\n\t\t\r\n\t\tthis.currentComponent = component\r\n\t\t\r\n\t\tthis.dispatchExternal(\"menuOpened\", component.getComponent())\r\n\t}\r\n\t\r\n\thideOldSubMenus(menuEl){\r\n\t\tvar index = this.menuElements.indexOf(menuEl);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tfor(let i = this.menuElements.length - 1; i > index; i--){\r\n\t\t\t\tvar el = this.menuElements[i];\r\n\t\t\t\t\r\n\t\t\t\tif(el.parentNode){\r\n\t\t\t\t\tel.parentNode.removeChild(el);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.menuElements.pop();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tpositionMenu(element, parentEl, touch, e){\r\n\t\tvar x, y, parentOffset;\r\n\t\t\r\n\t\tif(!parentEl){\r\n\t\t\tx = touch ? e.touches[0].pageX : e.pageX;\r\n\t\t\ty = touch ? e.touches[0].pageY : e.pageY;\r\n\t\t\t\r\n\t\t\tif(this.menuContainer !== document.body){\r\n\t\t\t\tparentOffset = Helpers.elOffset(this.menuContainer);\r\n\t\t\t\t\r\n\t\t\t\tx -= parentOffset.left;\r\n\t\t\t\ty -= parentOffset.top;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.positionReversedX = false;\r\n\t\t}else{\r\n\t\t\tparentOffset = Helpers.elOffset(parentEl);\r\n\t\t\tx = parentOffset.left + parentEl.offsetWidth;\r\n\t\t\ty = parentOffset.top - 1;\r\n\t\t}\r\n\t\t\r\n\t\telement.style.top = y + \"px\";\r\n\t\telement.style.left = x + \"px\";\r\n\t\t\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.table.rowManager.element.addEventListener(\"scroll\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"click\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"contextmenu\", this.blurEvent);\r\n\t\t\twindow.addEventListener(\"resize\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"keydown\", this.escEvent);\r\n\t\t}, 100);\r\n\t\t\r\n\t\tthis.menuContainer.appendChild(element);\r\n\t\t\r\n\t\t//move menu to start on right edge if it is too close to the edge of the screen\r\n\t\tif((x + element.offsetWidth) >= this.menuContainer.offsetWidth || this.positionReversedX){\r\n\t\t\telement.style.left = \"\";\r\n\t\t\t\r\n\t\t\tif(parentEl){\r\n\t\t\t\telement.style.right = (this.menuContainer.offsetWidth - parentOffset.left) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\telement.style.right = (this.menuContainer.offsetWidth - x) + \"px\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.positionReversedX = true;\r\n\t\t}\r\n\t\t\r\n\t\t//move menu to start on bottom edge if it is too close to the edge of the screen\r\n\t\tif((y + element.offsetHeight) > this.menuContainer.offsetHeight) {\r\n\t\t\tif(parentEl){\r\n\t\t\t\telement.style.top = (parseInt(element.style.top) - element.offsetHeight + parentEl.offsetHeight + 1) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\telement.style.top = (parseInt(element.style.top) - element.offsetHeight) + \"px\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tisOpen(){\r\n\t\treturn !!this.menuElements.length;\r\n\t}\r\n\t\r\n\tescMenu(e){\r\n\t\tif(e.keyCode == 27){\r\n\t\t\tthis.hideMenu();\r\n\t\t}\r\n\t}\r\n\t\r\n\thideMenu(){\t\r\n\t\tthis.menuElements.forEach((menuEl) => {\r\n\t\t\tif(menuEl.parentNode){\r\n\t\t\t\tmenuEl.parentNode.removeChild(menuEl);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tdocument.body.removeEventListener(\"keydown\", this.escEvent);\r\n\t\tdocument.body.removeEventListener(\"click\", this.blurEvent);\r\n\t\tdocument.body.removeEventListener(\"contextmenu\", this.blurEvent);\r\n\t\twindow.removeEventListener(\"resize\", this.blurEvent);\r\n\t\tthis.table.rowManager.element.removeEventListener(\"scroll\", this.blurEvent);\r\n\t\t\r\n\t\tif(this.currentComponent){\r\n\t\t\tthis.dispatchExternal(\"menuClosed\", this.currentComponent.getComponent());\r\n\t\t\tthis.currentComponent = null;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMenu.moduleName = \"menu\";\r\n\r\nexport default Menu;","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass MoveColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.placeholderElement = this.createPlaceholderElement();\r\n\t\tthis.hoverElement = false; //floating column header element\r\n\t\tthis.checkTimeout = false; //click check timeout holder\r\n\t\tthis.checkPeriod = 250; //period to wait on mousedown to consider this a move and not a click\r\n\t\tthis.moving = false; //currently moving column\r\n\t\tthis.toCol = false; //destination column\r\n\t\tthis.toColAfter = false; //position of moving column relative to the desitnation column\r\n\t\tthis.startX = 0; //starting position within header element\r\n\t\tthis.autoScrollMargin = 40; //auto scroll on edge when within margin\r\n\t\tthis.autoScrollStep = 5; //auto scroll distance in pixels\r\n\t\tthis.autoScrollTimeout = false; //auto scroll timeout\r\n\t\tthis.touchMove = false;\r\n\t\t\r\n\t\tthis.moveHover = this.moveHover.bind(this);\r\n\t\tthis.endMove = this.endMove.bind(this);\r\n\t\t\r\n\t\tthis.registerTableOption(\"movableColumns\", false); //enable movable columns\r\n\t}\r\n\t\r\n\tcreatePlaceholderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-col\");\r\n\t\tel.classList.add(\"tabulator-col-placeholder\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.movableColumns){\r\n\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\tcolEl;\r\n\t\t\r\n\t\tif(!column.modules.frozen){\r\n\t\t\tcolEl = column.getElement();\r\n\t\t\t\r\n\t\t\tconfig.mousemove = function(e){\r\n\t\t\t\tif(column.parent === self.moving.parent){\r\n\t\t\t\t\tif((((self.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(colEl).left) + self.table.columnManager.element.scrollLeft) > (column.getWidth() / 2)){\r\n\t\t\t\t\t\tif(self.toCol !== column || !self.toColAfter){\r\n\t\t\t\t\t\t\tcolEl.parentNode.insertBefore(self.placeholderElement, colEl.nextSibling);\r\n\t\t\t\t\t\t\tself.moveColumn(column, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(self.toCol !== column || self.toColAfter){\r\n\t\t\t\t\t\t\tcolEl.parentNode.insertBefore(self.placeholderElement, colEl);\r\n\t\t\t\t\t\t\tself.moveColumn(column, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}.bind(self);\r\n\t\t\t\r\n\t\t\tcolEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tself.touchMove = false;\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, column);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tcolEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tself.bindTouchEvents(column);\r\n\t\t}\r\n\t\t\r\n\t\tcolumn.modules.moveColumn = config;\r\n\t}\r\n\t\r\n\tbindTouchEvents(column){\r\n\t\tvar colEl = column.getElement(),\r\n\t\tstartXMove = false, //shifting center position of the cell\r\n\t\tdir = false,\r\n\t\tcurrentCol, nextCol, prevCol, nextColWidth, prevColWidth, nextColWidthLast, prevColWidthLast;\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchstart\", (e) => {\r\n\t\t\tthis.checkTimeout = setTimeout(() => {\r\n\t\t\t\tthis.touchMove = true;\r\n\t\t\t\tcurrentCol = column;\r\n\t\t\t\tnextCol = column.nextColumn();\r\n\t\t\t\tnextColWidth = nextCol ? nextCol.getWidth()/2 : 0;\r\n\t\t\t\tprevCol = column.prevColumn();\r\n\t\t\t\tprevColWidth = prevCol ? prevCol.getWidth()/2 : 0;\r\n\t\t\t\tnextColWidthLast = 0;\r\n\t\t\t\tprevColWidthLast = 0;\r\n\t\t\t\tstartXMove = false;\r\n\t\t\t\t\r\n\t\t\t\tthis.startMove(e, column);\r\n\t\t\t}, this.checkPeriod);\r\n\t\t}, {passive: true});\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchmove\", (e) => {\r\n\t\t\tvar halfCol, diff, moveToCol;\r\n\t\t\t\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.moveHover(e);\r\n\t\t\t\t\r\n\t\t\t\tif(!startXMove){\r\n\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tdiff = e.touches[0].pageX - startXMove;\r\n\t\t\t\t\r\n\t\t\t\tif(diff > 0){\r\n\t\t\t\t\tif(nextCol && diff - nextColWidthLast > nextColWidth){\r\n\t\t\t\t\t\tmoveToCol = nextCol;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(moveToCol !== column){\r\n\t\t\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t\t\t\tmoveToCol.getElement().parentNode.insertBefore(this.placeholderElement, moveToCol.getElement().nextSibling);\r\n\t\t\t\t\t\t\tthis.moveColumn(moveToCol, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(prevCol && -diff - prevColWidthLast > prevColWidth){\r\n\t\t\t\t\t\tmoveToCol = prevCol;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(moveToCol !== column){\r\n\t\t\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t\t\t\tmoveToCol.getElement().parentNode.insertBefore(this.placeholderElement, moveToCol.getElement());\r\n\t\t\t\t\t\t\tthis.moveColumn(moveToCol, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(moveToCol){\r\n\t\t\t\t\tcurrentCol = moveToCol;\r\n\t\t\t\t\tnextCol = moveToCol.nextColumn();\r\n\t\t\t\t\tnextColWidthLast = nextColWidth;\r\n\t\t\t\t\tnextColWidth = nextCol ? nextCol.getWidth() / 2 : 0;\r\n\t\t\t\t\tprevCol = moveToCol.prevColumn();\r\n\t\t\t\t\tprevColWidthLast = prevColWidth;\r\n\t\t\t\t\tprevColWidth = prevCol ? prevCol.getWidth() / 2 : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}, {passive: true});\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchend\", (e) => {\r\n\t\t\tif(this.checkTimeout){\r\n\t\t\t\tclearTimeout(this.checkTimeout);\r\n\t\t\t}\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.endMove(e);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tstartMove(e, column){\r\n\t\tvar element = column.getElement(),\r\n\t\theaderElement = this.table.columnManager.getElement(),\r\n\t\theadersElement = this.table.columnManager.getHeadersElement();\r\n\t\t\r\n\t\tthis.moving = column;\r\n\t\tthis.startX = (this.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(element).left;\r\n\t\t\r\n\t\tthis.table.element.classList.add(\"tabulator-block-select\");\r\n\t\t\r\n\t\t//create placeholder\r\n\t\tthis.placeholderElement.style.width = column.getWidth() + \"px\";\r\n\t\tthis.placeholderElement.style.height = column.getHeight() + \"px\";\r\n\t\t\r\n\t\telement.parentNode.insertBefore(this.placeholderElement, element);\r\n\t\telement.parentNode.removeChild(element);\r\n\t\t\r\n\t\t//create hover element\r\n\t\tthis.hoverElement = element.cloneNode(true);\r\n\t\tthis.hoverElement.classList.add(\"tabulator-moving\");\r\n\t\t\r\n\t\tthis.table.columnManager.getElement().appendChild(this.hoverElement);\r\n\t\t\r\n\t\tthis.hoverElement.style.left = \"0\";\r\n\t\tthis.hoverElement.style.bottom = (headerElement.clientHeight - headersElement.offsetHeight) + \"px\";\r\n\t\t\r\n\t\tif(!this.touchMove){\r\n\t\t\tthis._bindMouseMove();\r\n\t\t\t\r\n\t\t\tdocument.body.addEventListener(\"mousemove\", this.moveHover);\r\n\t\t\tdocument.body.addEventListener(\"mouseup\", this.endMove);\r\n\t\t}\r\n\t\t\r\n\t\tthis.moveHover(e);\r\n\t}\r\n\t\r\n\t_bindMouseMove(){\r\n\t\tthis.table.columnManager.columnsByIndex.forEach(function(column){\r\n\t\t\tif(column.modules.moveColumn.mousemove){\r\n\t\t\t\tcolumn.getElement().addEventListener(\"mousemove\", column.modules.moveColumn.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t_unbindMouseMove(){\r\n\t\tthis.table.columnManager.columnsByIndex.forEach(function(column){\r\n\t\t\tif(column.modules.moveColumn.mousemove){\r\n\t\t\t\tcolumn.getElement().removeEventListener(\"mousemove\", column.modules.moveColumn.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tmoveColumn(column, after){\r\n\t\tvar movingCells = this.moving.getCells();\r\n\t\t\r\n\t\tthis.toCol = column;\r\n\t\tthis.toColAfter = after;\r\n\t\t\r\n\t\tif(after){\r\n\t\t\tcolumn.getCells().forEach(function(cell, i){\r\n\t\t\t\tvar cellEl = cell.getElement(true);\r\n\t\t\t\t\r\n\t\t\t\tif(cellEl.parentNode && movingCells[i]){\r\n\t\t\t\t\tcellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tcolumn.getCells().forEach(function(cell, i){\r\n\t\t\t\tvar cellEl = cell.getElement(true);\r\n\t\t\t\t\r\n\t\t\t\tif(cellEl.parentNode && movingCells[i]){\r\n\t\t\t\t\tcellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tendMove(e){\r\n\t\tif(e.which === 1 || this.touchMove){\r\n\t\t\tthis._unbindMouseMove();\r\n\t\t\t\r\n\t\t\tthis.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling);\r\n\t\t\tthis.placeholderElement.parentNode.removeChild(this.placeholderElement);\r\n\t\t\tthis.hoverElement.parentNode.removeChild(this.hoverElement);\r\n\t\t\t\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-block-select\");\r\n\t\t\t\r\n\t\t\tif(this.toCol){\r\n\t\t\t\tthis.table.columnManager.moveColumnActual(this.moving, this.toCol, this.toColAfter);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.moving = false;\r\n\t\t\tthis.toCol = false;\r\n\t\t\tthis.toColAfter = false;\r\n\t\t\t\r\n\t\t\tif(!this.touchMove){\r\n\t\t\t\tdocument.body.removeEventListener(\"mousemove\", this.moveHover);\r\n\t\t\t\tdocument.body.removeEventListener(\"mouseup\", this.endMove);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tmoveHover(e){\r\n\t\tvar columnHolder = this.table.columnManager.getElement(),\r\n\t\tscrollLeft = columnHolder.scrollLeft,\r\n\t\txPos = ((this.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(columnHolder).left) + scrollLeft,\r\n\t\tscrollPos;\r\n\t\t\r\n\t\tthis.hoverElement.style.left = (xPos - this.startX) + \"px\";\r\n\t\t\r\n\t\tif(xPos - scrollLeft < this.autoScrollMargin){\r\n\t\t\tif(!this.autoScrollTimeout){\r\n\t\t\t\tthis.autoScrollTimeout = setTimeout(() => {\r\n\t\t\t\t\tscrollPos = Math.max(0,scrollLeft-5);\r\n\t\t\t\t\tthis.table.rowManager.getElement().scrollLeft = scrollPos;\r\n\t\t\t\t\tthis.autoScrollTimeout = false;\r\n\t\t\t\t}, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(scrollLeft + columnHolder.clientWidth - xPos < this.autoScrollMargin){\r\n\t\t\tif(!this.autoScrollTimeout){\r\n\t\t\t\tthis.autoScrollTimeout = setTimeout(() => {\r\n\t\t\t\t\tscrollPos = Math.min(columnHolder.clientWidth, scrollLeft+5);\r\n\t\t\t\t\tthis.table.rowManager.getElement().scrollLeft = scrollPos;\r\n\t\t\t\t\tthis.autoScrollTimeout = false;\r\n\t\t\t\t}, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMoveColumns.moduleName = \"moveColumn\";\r\n\r\nexport default MoveColumns;\r\n","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass MoveRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.placeholderElement = this.createPlaceholderElement();\r\n\t\tthis.hoverElement = false; //floating row header element\r\n\t\tthis.checkTimeout = false; //click check timeout holder\r\n\t\tthis.checkPeriod = 150; //period to wait on mousedown to consider this a move and not a click\r\n\t\tthis.moving = false; //currently moving row\r\n\t\tthis.toRow = false; //destination row\r\n\t\tthis.toRowAfter = false; //position of moving row relative to the desitnation row\r\n\t\tthis.hasHandle = false; //row has handle instead of fully movable row\r\n\t\tthis.startY = 0; //starting Y position within header element\r\n\t\tthis.startX = 0; //starting X position within header element\r\n\r\n\t\tthis.moveHover = this.moveHover.bind(this);\r\n\t\tthis.endMove = this.endMove.bind(this);\r\n\t\tthis.tableRowDropEvent = false;\r\n\r\n\t\tthis.touchMove = false;\r\n\r\n\t\tthis.connection = false;\r\n\t\tthis.connectionSelectorsTables = false;\r\n\t\tthis.connectionSelectorsElements = false;\r\n\t\tthis.connectionElements = [];\r\n\t\tthis.connections = [];\r\n\r\n\t\tthis.connectedTable = false;\r\n\t\tthis.connectedRow = false;\r\n\r\n\t\tthis.registerTableOption(\"movableRows\", false); //enable movable rows\r\n\t\tthis.registerTableOption(\"movableRowsConnectedTables\", false); //tables for movable rows to be connected to\r\n\t\tthis.registerTableOption(\"movableRowsConnectedElements\", false); //other elements for movable rows to be connected to\r\n\t\tthis.registerTableOption(\"movableRowsSender\", false);\r\n\t\tthis.registerTableOption(\"movableRowsReceiver\", \"insert\");\r\n\r\n\t\tthis.registerColumnOption(\"rowHandle\");\r\n\t}\r\n\r\n\tcreatePlaceholderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\tel.classList.add(\"tabulator-row-placeholder\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.movableRows){\r\n\t\t\tthis.connectionSelectorsTables = this.table.options.movableRowsConnectedTables;\r\n\t\t\tthis.connectionSelectorsElements = this.table.options.movableRowsConnectedElements;\r\n\r\n\t\t\tthis.connection = this.connectionSelectorsTables || this.connectionSelectorsElements;\r\n\r\n\t\t\tthis.subscribe(\"cell-init\", this.initializeCell.bind(this));\r\n\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeGroupHeader(group){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\trowEl;\r\n\r\n\t\t//inter table drag drop\r\n\t\tconfig.mouseup = function(e){\r\n\t\t\tself.tableRowDrop(e, row);\r\n\t\t}.bind(self);\r\n\r\n\t\t//same table drag drop\r\n\t\tconfig.mousemove = function(e){\r\n\t\t\tif(((e.pageY - Helpers.elOffset(group.element).top) + self.table.rowManager.element.scrollTop) > (group.getHeight() / 2)){\r\n\t\t\t\tif(self.toRow !== group || !self.toRowAfter){\r\n\t\t\t\t\tvar rowEl = group.getElement();\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling);\r\n\t\t\t\t\tself.moveRow(group, true);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(self.toRow !== group || self.toRowAfter){\r\n\t\t\t\t\tvar rowEl = group.getElement();\r\n\t\t\t\t\tif(rowEl.previousSibling){\r\n\t\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl);\r\n\t\t\t\t\t\tself.moveRow(group, false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.bind(self);\r\n\r\n\t\tgroup.modules.moveRow = config;\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\trowEl;\r\n\r\n\t\t//inter table drag drop\r\n\t\tconfig.mouseup = function(e){\r\n\t\t\tself.tableRowDrop(e, row);\r\n\t\t}.bind(self);\r\n\r\n\t\t//same table drag drop\r\n\t\tconfig.mousemove = function(e){\r\n\t\t\tvar rowEl = row.getElement();\r\n\r\n\t\t\tif(((e.pageY - Helpers.elOffset(rowEl).top) + self.table.rowManager.element.scrollTop) > (row.getHeight() / 2)){\r\n\t\t\t\tif(self.toRow !== row || !self.toRowAfter){\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling);\r\n\t\t\t\t\tself.moveRow(row, true);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(self.toRow !== row || self.toRowAfter){\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl);\r\n\t\t\t\t\tself.moveRow(row, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.bind(self);\r\n\r\n\r\n\t\tif(!this.hasHandle){\r\n\r\n\t\t\trowEl = row.getElement();\r\n\r\n\t\t\trowEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, row);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\trowEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.bindTouchEvents(row, row.getElement());\r\n\t\t}\r\n\r\n\t\trow.modules.moveRow = config;\r\n\t}\r\n\r\n\tinitializeColumn(column){\r\n\t\tif(column.definition.rowHandle && this.table.options.movableRows !== false){\r\n\t\t\tthis.hasHandle = true;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeCell(cell){\r\n\t\tif(cell.column.definition.rowHandle && this.table.options.movableRows !== false){\r\n\t\t\tvar self = this,\r\n\t\t\tcellEl = cell.getElement(true);\r\n\r\n\t\t\tcellEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, cell.row);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tcellEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.bindTouchEvents(cell.row, cellEl);\r\n\t\t}\r\n\t}\r\n\r\n\tbindTouchEvents(row, element){\r\n\t\tvar startYMove = false, //shifting center position of the cell\r\n\t\tdir = false,\r\n\t\tcurrentRow, nextRow, prevRow, nextRowHeight, prevRowHeight, nextRowHeightLast, prevRowHeightLast;\r\n\r\n\t\telement.addEventListener(\"touchstart\", (e) => {\r\n\t\t\tthis.checkTimeout = setTimeout(() => {\r\n\t\t\t\tthis.touchMove = true;\r\n\t\t\t\tcurrentRow = row;\r\n\t\t\t\tnextRow = row.nextRow();\r\n\t\t\t\tnextRowHeight = nextRow ? nextRow.getHeight()/2 : 0;\r\n\t\t\t\tprevRow = row.prevRow();\r\n\t\t\t\tprevRowHeight = prevRow ? prevRow.getHeight()/2 : 0;\r\n\t\t\t\tnextRowHeightLast = 0;\r\n\t\t\t\tprevRowHeightLast = 0;\r\n\t\t\t\tstartYMove = false;\r\n\r\n\t\t\t\tthis.startMove(e, row);\r\n\t\t\t}, this.checkPeriod);\r\n\t\t}, {passive: true});\r\n\t\tthis.moving, this.toRow, this.toRowAfter\r\n\t\telement.addEventListener(\"touchmove\", (e) => {\r\n\r\n\t\t\tvar halfCol, diff, moveToRow;\r\n\r\n\t\t\tif(this.moving){\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tthis.moveHover(e);\r\n\r\n\t\t\t\tif(!startYMove){\r\n\t\t\t\t\tstartYMove = e.touches[0].pageY;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdiff = e.touches[0].pageY - startYMove;\r\n\r\n\t\t\t\tif(diff > 0){\r\n\t\t\t\t\tif(nextRow && diff - nextRowHeightLast > nextRowHeight){\r\n\t\t\t\t\t\tmoveToRow = nextRow;\r\n\r\n\t\t\t\t\t\tif(moveToRow !== row){\r\n\t\t\t\t\t\t\tstartYMove = e.touches[0].pageY\r\n\t\t\t\t\t\t\tmoveToRow.getElement().parentNode.insertBefore(this.placeholderElement, moveToRow.getElement().nextSibling);\r\n\t\t\t\t\t\t\tthis.moveRow(moveToRow, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(prevRow && -diff - prevRowHeightLast > prevRowHeight){\r\n\t\t\t\t\t\tmoveToRow = prevRow;\r\n\r\n\t\t\t\t\t\tif(moveToRow !== row){\r\n\t\t\t\t\t\t\tstartYMove = e.touches[0].pageY;\r\n\t\t\t\t\t\t\tmoveToRow.getElement().parentNode.insertBefore(this.placeholderElement, moveToRow.getElement());\r\n\t\t\t\t\t\t\tthis.moveRow(moveToRow, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(moveToRow){\r\n\t\t\t\t\tcurrentRow = moveToRow;\r\n\t\t\t\t\tnextRow = moveToRow.nextRow();\r\n\t\t\t\t\tnextRowHeightLast = nextRowHeight;\r\n\t\t\t\t\tnextRowHeight = nextRow ? nextRow.getHeight() / 2 : 0;\r\n\t\t\t\t\tprevRow = moveToRow.prevRow();\r\n\t\t\t\t\tprevRowHeightLast = prevRowHeight;\r\n\t\t\t\t\tprevRowHeight = prevRow ? prevRow.getHeight() / 2 : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\telement.addEventListener(\"touchend\", (e) => {\r\n\t\t\tif(this.checkTimeout){\r\n\t\t\t\tclearTimeout(this.checkTimeout);\r\n\t\t\t}\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.endMove(e);\r\n\t\t\t\tthis.touchMove = false;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t_bindMouseMove(){\r\n\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\tif((row.type === \"row\" || row.type === \"group\") && row.modules.moveRow && row.modules.moveRow.mousemove){\r\n\t\t\t\trow.getElement().addEventListener(\"mousemove\", row.modules.moveRow.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t_unbindMouseMove(){\r\n\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\tif((row.type === \"row\" || row.type === \"group\") && row.modules.moveRow && row.modules.moveRow.mousemove){\r\n\t\t\t\trow.getElement().removeEventListener(\"mousemove\", row.modules.moveRow.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tstartMove(e, row){\r\n\t\tvar element = row.getElement();\r\n\r\n\t\tthis.setStartPosition(e, row);\r\n\r\n\t\tthis.moving = row;\r\n\r\n\t\tthis.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\t//create placeholder\r\n\t\tthis.placeholderElement.style.width = row.getWidth() + \"px\";\r\n\t\tthis.placeholderElement.style.height = row.getHeight() + \"px\";\r\n\r\n\t\tif(!this.connection){\r\n\t\t\telement.parentNode.insertBefore(this.placeholderElement, element);\r\n\t\t\telement.parentNode.removeChild(element);\r\n\t\t}else{\r\n\t\t\tthis.table.element.classList.add(\"tabulator-movingrow-sending\");\r\n\t\t\tthis.connectToTables(row);\r\n\t\t}\r\n\r\n\t\t//create hover element\r\n\t\tthis.hoverElement = element.cloneNode(true);\r\n\t\tthis.hoverElement.classList.add(\"tabulator-moving\");\r\n\r\n\t\tif(this.connection){\r\n\t\t\tdocument.body.appendChild(this.hoverElement);\r\n\t\t\tthis.hoverElement.style.left = \"0\";\r\n\t\t\tthis.hoverElement.style.top = \"0\";\r\n\t\t\tthis.hoverElement.style.width = this.table.element.clientWidth + \"px\";\r\n\t\t\tthis.hoverElement.style.whiteSpace = \"nowrap\";\r\n\t\t\tthis.hoverElement.style.overflow = \"hidden\";\r\n\t\t\tthis.hoverElement.style.pointerEvents = \"none\";\r\n\t\t}else{\r\n\t\t\tthis.table.rowManager.getTableElement().appendChild(this.hoverElement);\r\n\r\n\t\t\tthis.hoverElement.style.left = \"0\";\r\n\t\t\tthis.hoverElement.style.top = \"0\";\r\n\r\n\t\t\tthis._bindMouseMove();\r\n\t\t}\r\n\r\n\t\tdocument.body.addEventListener(\"mousemove\", this.moveHover);\r\n\t\tdocument.body.addEventListener(\"mouseup\", this.endMove);\r\n\r\n\t\tthis.dispatchExternal(\"rowMoving\", row.getComponent());\r\n\r\n\t\tthis.moveHover(e);\r\n\t}\r\n\r\n\tsetStartPosition(e, row){\r\n\t\tvar pageX = this.touchMove ? e.touches[0].pageX : e.pageX,\r\n\t\tpageY = this.touchMove ? e.touches[0].pageY : e.pageY,\r\n\t\telement, position;\r\n\r\n\t\telement = row.getElement();\r\n\t\tif(this.connection){\r\n\t\t\tposition = element.getBoundingClientRect();\r\n\r\n\t\t\tthis.startX = position.left - pageX + window.pageXOffset;\r\n\t\t\tthis.startY = position.top - pageY + window.pageYOffset;\r\n\t\t}else{\r\n\t\t\tthis.startY = (pageY - element.getBoundingClientRect().top);\r\n\t\t}\r\n\t}\r\n\r\n\tendMove(e){\r\n\t\tif(!e || e.which === 1 || this.touchMove){\r\n\t\t\tthis._unbindMouseMove();\r\n\r\n\t\t\tif(!this.connection){\r\n\t\t\t\tthis.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling);\r\n\t\t\t\tthis.placeholderElement.parentNode.removeChild(this.placeholderElement);\r\n\t\t\t}\r\n\r\n\t\t\tthis.hoverElement.parentNode.removeChild(this.hoverElement);\r\n\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tif(this.toRow){\r\n\t\t\t\tthis.table.rowManager.moveRow(this.moving, this.toRow, this.toRowAfter);\r\n\t\t\t}else{\r\n\t\t\t\tthis.dispatchExternal(\"rowMoveCancelled\", this.moving.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.moving = false;\r\n\t\t\tthis.toRow = false;\r\n\t\t\tthis.toRowAfter = false;\r\n\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", this.moveHover);\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", this.endMove);\r\n\r\n\t\t\tif(this.connection){\r\n\t\t\t\tthis.table.element.classList.remove(\"tabulator-movingrow-sending\");\r\n\t\t\t\tthis.disconnectFromTables();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmoveRow(row, after){\r\n\t\tthis.toRow = row;\r\n\t\tthis.toRowAfter = after;\r\n\t}\r\n\r\n\tmoveHover(e){\r\n\t\tif(this.connection){\r\n\t\t\tthis.moveHoverConnections.call(this, e);\r\n\t\t}else{\r\n\t\t\tthis.moveHoverTable.call(this, e);\r\n\t\t}\r\n\t}\r\n\r\n\tmoveHoverTable(e){\r\n\t\tvar rowHolder = this.table.rowManager.getElement(),\r\n\t\tscrollTop = rowHolder.scrollTop,\r\n\t\tyPos = ((this.touchMove ? e.touches[0].pageY : e.pageY) - rowHolder.getBoundingClientRect().top) + scrollTop,\r\n\t\tscrollPos;\r\n\r\n\t\tthis.hoverElement.style.top = (yPos - this.startY) + \"px\";\r\n\t}\r\n\r\n\tmoveHoverConnections(e){\r\n\t\tthis.hoverElement.style.left = (this.startX + (this.touchMove ? e.touches[0].pageX : e.pageX)) + \"px\";\r\n\t\tthis.hoverElement.style.top = (this.startY + (this.touchMove ? e.touches[0].pageY : e.pageY)) + \"px\";\r\n\t}\r\n\r\n\telementRowDrop(e, element, row){\r\n\t\tthis.dispatchExternal(\"movableRowsElementDrop\", e, element, row ? row.getComponent() : false);\r\n\t}\r\n\r\n\t//establish connection with other tables\r\n\tconnectToTables(row){\r\n\t\tvar connectionTables;\r\n\r\n\t\tif(this.connectionSelectorsTables){\r\n\t\t\tconnectionTables = this.commsConnections(this.connectionSelectorsTables);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSendingStart\", connectionTables);\r\n\r\n\t\t\tthis.commsSend(this.connectionSelectorsTables, \"moveRow\", \"connect\", {\r\n\t\t\t\trow:row,\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.connectionSelectorsElements){\r\n\r\n\t\t\tthis.connectionElements = [];\r\n\r\n\t\t\tif(!Array.isArray(this.connectionSelectorsElements)){\r\n\t\t\t\tthis.connectionSelectorsElements = [this.connectionSelectorsElements];\r\n\t\t\t}\r\n\r\n\t\t\tthis.connectionSelectorsElements.forEach((query) => {\r\n\t\t\t\tif(typeof query === \"string\"){\r\n\t\t\t\t\tthis.connectionElements = this.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(query)));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.connectionElements.push(query);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.connectionElements.forEach((element) => {\r\n\t\t\t\tvar dropEvent = (e) => {\r\n\t\t\t\t\tthis.elementRowDrop(e, element, this.moving);\r\n\t\t\t\t};\r\n\r\n\t\t\t\telement.addEventListener(\"mouseup\", dropEvent);\r\n\t\t\t\telement.tabulatorElementDropEvent = dropEvent;\r\n\r\n\t\t\t\telement.classList.add(\"tabulator-movingrow-receiving\");\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t//disconnect from other tables\r\n\tdisconnectFromTables(){\r\n\t\tvar connectionTables;\r\n\r\n\t\tif(this.connectionSelectorsTables){\r\n\t\t\tconnectionTables = this.commsConnections(this.connectionSelectorsTables);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSendingStop\", connectionTables);\r\n\r\n\t\t\tthis.commsSend(this.connectionSelectorsTables, \"moveRow\", \"disconnect\");\r\n\t\t}\r\n\r\n\t\tthis.connectionElements.forEach((element) => {\r\n\t\t\telement.classList.remove(\"tabulator-movingrow-receiving\");\r\n\t\t\telement.removeEventListener(\"mouseup\", element.tabulatorElementDropEvent);\r\n\t\t\tdelete element.tabulatorElementDropEvent;\r\n\t\t});\r\n\t}\r\n\r\n\t//accept incomming connection\r\n\tconnect(table, row){\r\n\t\tif(!this.connectedTable){\r\n\t\t\tthis.connectedTable = table;\r\n\t\t\tthis.connectedRow = row;\r\n\r\n\t\t\tthis.table.element.classList.add(\"tabulator-movingrow-receiving\");\r\n\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\t\tif(row.type === \"row\" && row.modules.moveRow && row.modules.moveRow.mouseup){\r\n\t\t\t\t\trow.getElement().addEventListener(\"mouseup\", row.modules.moveRow.mouseup);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.tableRowDropEvent = this.tableRowDrop.bind(this);\r\n\r\n\t\t\tthis.table.element.addEventListener(\"mouseup\", this.tableRowDropEvent);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivingStart\", row, table);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Row Error - Table cannot accept connection, already connected to table:\", this.connectedTable);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//close incomming connection\r\n\tdisconnect(table){\r\n\t\tif(table === this.connectedTable){\r\n\t\t\tthis.connectedTable = false;\r\n\t\t\tthis.connectedRow = false;\r\n\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-movingrow-receiving\");\r\n\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) =>{\r\n\t\t\t\tif(row.type === \"row\" && row.modules.moveRow && row.modules.moveRow.mouseup){\r\n\t\t\t\t\trow.getElement().removeEventListener(\"mouseup\", row.modules.moveRow.mouseup);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.table.element.removeEventListener(\"mouseup\", this.tableRowDropEvent);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivingStop\", table);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Row Error - trying to disconnect from non connected table\")\r\n\t\t}\r\n\t}\r\n\r\n\tdropComplete(table, row, success){\r\n\t\tvar sender = false;\r\n\r\n\t\tif(success){\r\n\r\n\t\t\tswitch(typeof this.table.options.movableRowsSender){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tsender = this.senders[this.table.options.movableRowsSender];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tsender = this.table.options.movableRowsSender;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(sender){\r\n\t\t\t\tsender.call(this, this.moving.getComponent(), row ? row.getComponent() : undefined, table)\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.options.movableRowsSender){\r\n\t\t\t\t\tconsole.warn(\"Mover Row Error - no matching sender found:\", this.table.options.movableRowsSender);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSent\", this.moving.getComponent(), row ? row.getComponent() : undefined, table);\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"movableRowsSentFailed\", this.moving.getComponent(), row ? row.getComponent() : undefined, table);\r\n\t\t}\r\n\r\n\t\tthis.endMove();\r\n\t}\r\n\r\n\ttableRowDrop(e, row){\r\n\t\tvar receiver = false,\r\n\t\tsuccess = false;\r\n\r\n\t\te.stopImmediatePropagation();\r\n\r\n\t\tswitch(typeof this.table.options.movableRowsReceiver){\r\n\t\t\tcase \"string\":\r\n\t\t\treceiver = this.receivers[this.table.options.movableRowsReceiver];\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\treceiver = this.table.options.movableRowsReceiver;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(receiver){\r\n\t\t\tsuccess = receiver.call(this, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Mover Row Error - no matching receiver found:\", this.table.options.movableRowsReceiver)\r\n\t\t}\r\n\r\n\t\tif(success){\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceived\", this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable);\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivedFailed\", this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable);\r\n\t\t}\r\n\r\n\t\tthis.commsSend(this.connectedTable, \"moveRow\", \"dropcomplete\", {\r\n\t\t\trow:row,\r\n\t\t\tsuccess:success,\r\n\t\t});\r\n\t}\r\n\r\n\tcommsReceived(table, action, data){\r\n\t\tswitch(action){\r\n\t\t\tcase \"connect\":\r\n\t\t\treturn this.connect(table, data.row);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"disconnect\":\r\n\t\t\treturn this.disconnect(table);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"dropcomplete\":\r\n\t\t\treturn this.dropComplete(table, data.row, data.success);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMoveRows.prototype.receivers = {\r\n\tinsert:function(fromRow, toRow, fromTable){\r\n\t\tthis.table.addRow(fromRow.getData(), undefined, toRow);\r\n\t\treturn true;\r\n\t},\r\n\r\n\tadd:function(fromRow, toRow, fromTable){\r\n\t\tthis.table.addRow(fromRow.getData());\r\n\t\treturn true;\r\n\t},\r\n\r\n\tupdate:function(fromRow, toRow, fromTable){\r\n\t\tif(toRow){\r\n\t\t\ttoRow.update(fromRow.getData());\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\r\n\treplace:function(fromRow, toRow, fromTable){\r\n\t\tif(toRow){\r\n\t\t\tthis.table.addRow(fromRow.getData(), undefined, toRow);\r\n\t\t\ttoRow.delete();\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n};\r\n\r\nMoveRows.prototype.senders = {\r\n\tdelete:function(fromRow, toRow, toTable){\r\n\t\tfromRow.delete();\r\n\t}\r\n};\r\n\r\nMoveRows.moduleName = \"moveRow\";\r\n\r\nexport default MoveRows;","import Module from '../../core/Module.js';\r\n\r\nimport defaultMutators from './defaults/mutators.js';\r\n\r\nclass Mutator extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.allowedTypes = [\"\", \"data\", \"edit\", \"clipboard\"]; //list of muatation types\r\n\t\tthis.enabled = true;\r\n\r\n\t\tthis.registerColumnOption(\"mutator\");\r\n\t\tthis.registerColumnOption(\"mutatorParams\");\r\n\t\tthis.registerColumnOption(\"mutatorData\");\r\n\t\tthis.registerColumnOption(\"mutatorDataParams\");\r\n\t\tthis.registerColumnOption(\"mutatorEdit\");\r\n\t\tthis.registerColumnOption(\"mutatorEditParams\");\r\n\t\tthis.registerColumnOption(\"mutatorClipboard\");\r\n\t\tthis.registerColumnOption(\"mutatorClipboardParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-value-changing\", this.transformCell.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"row-data-init-before\", this.rowDataChanged.bind(this));\r\n\t\tthis.subscribe(\"row-data-changing\", this.rowDataChanged.bind(this));\r\n\t}\r\n\r\n\trowDataChanged(row, tempData, updatedData){\r\n\t\treturn this.transformRow(tempData, \"data\", updatedData);\r\n\t}\r\n\r\n\t//initialize column mutator\r\n\tinitializeColumn(column){\r\n\t\tvar match = false,\r\n\t\tconfig = {};\r\n\r\n\t\tthis.allowedTypes.forEach((type) => {\r\n\t\t\tvar key = \"mutator\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\t\tmutator;\r\n\r\n\t\t\tif(column.definition[key]){\r\n\t\t\t\tmutator = this.lookupMutator(column.definition[key]);\r\n\r\n\t\t\t\tif(mutator){\r\n\t\t\t\t\tmatch = true;\r\n\r\n\t\t\t\t\tconfig[key] = {\r\n\t\t\t\t\t\tmutator:mutator,\r\n\t\t\t\t\t\tparams: column.definition[key + \"Params\"] || {},\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tcolumn.modules.mutate = config;\r\n\t\t}\r\n\t}\r\n\r\n\tlookupMutator(value){\r\n\t\tvar mutator = false;\r\n\r\n\t\t//set column mutator\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Mutator.mutators[value]){\r\n\t\t\t\tmutator = Mutator.mutators[value];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Mutator Error - No such mutator found, ignoring: \", value);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tmutator = value;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn mutator;\r\n\t}\r\n\r\n\t//apply mutator to row\r\n\ttransformRow(data, type, updatedData){\r\n\t\tvar key = \"mutator\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\tvalue;\r\n\r\n\t\tif(this.enabled){\r\n\r\n\t\t\tthis.table.columnManager.traverse((column) => {\r\n\t\t\t\tvar mutator, params, component;\r\n\r\n\t\t\t\tif(column.modules.mutate){\r\n\t\t\t\t\tmutator = column.modules.mutate[key] || column.modules.mutate.mutator || false;\r\n\r\n\t\t\t\t\tif(mutator){\r\n\t\t\t\t\t\tvalue = column.getFieldValue(typeof updatedData !== \"undefined\" ? updatedData : data);\r\n\r\n\t\t\t\t\t\tif(type == \"data\" || typeof value !== \"undefined\"){\r\n\t\t\t\t\t\t\tcomponent = column.getComponent();\r\n\t\t\t\t\t\t\tparams = typeof mutator.params === \"function\" ? mutator.params(value, data, type, component) : mutator.params;\r\n\t\t\t\t\t\t\tcolumn.setFieldValue(data, mutator.mutator(value, data, type, params, component));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//apply mutator to new cell value\r\n\ttransformCell(cell, value){\r\n\t\tif(cell.column.modules.mutate){\r\n\t\t\tvar mutator = cell.column.modules.mutate.mutatorEdit || cell.column.modules.mutate.mutator || false,\r\n\t\t\ttempData = {};\r\n\r\n\t\t\tif(mutator){\r\n\t\t\t\ttempData = Object.assign(tempData, cell.row.getData());\r\n\t\t\t\tcell.column.setFieldValue(tempData, value);\r\n\t\t\t\treturn mutator.mutator(value, tempData, \"edit\", mutator.params, cell.getComponent());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\tenable(){\r\n\t\tthis.enabled = true;\r\n\t}\r\n\r\n\tdisable(){\r\n\t\tthis.enabled = false;\r\n\t}\r\n}\r\n\r\nMutator.moduleName = \"mutator\";\r\n\r\n//load defaults\r\nMutator.mutators = defaultMutators;\r\n\r\nexport default Mutator;","export default {};","import rows from './pageCounters/rows.js';\r\nimport pages from './pageCounters/pages.js';\r\n\r\n\r\nexport default {\r\n\trows:rows,\r\n\tpages:pages,\r\n};","export default function(pageSize, currentRow, currentPage, totalRows, totalPages){\r\n\tvar el = document.createElement(\"span\"),\r\n\tshowingEl = document.createElement(\"span\"),\r\n\tvalueEl = document.createElement(\"span\"),\r\n\tofEl = document.createElement(\"span\"),\r\n\ttotalEl = document.createElement(\"span\"),\r\n\trowsEl = document.createElement(\"span\");\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|showing\", (value) => {\r\n\t\tshowingEl.innerHTML = value;\r\n\t});\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|of\", (value) => {\r\n\t\tofEl.innerHTML = value;\r\n\t});\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|rows\", (value) => {\r\n\t\trowsEl.innerHTML = value;\r\n\t});\r\n\r\n\tif(totalRows){\r\n\t\tvalueEl.innerHTML = \" \" + currentRow + \"-\" + Math.min((currentRow + pageSize - 1), totalRows) + \" \";\r\n\t\t\r\n\t\ttotalEl.innerHTML = \" \" + totalRows + \" \";\r\n\t\t\r\n\t\tel.appendChild(showingEl);\r\n\t\tel.appendChild(valueEl);\r\n\t\tel.appendChild(ofEl);\r\n\t\tel.appendChild(totalEl);\r\n\t\tel.appendChild(rowsEl);\r\n\t}else{\r\n\t\tvalueEl.innerHTML = \" 0 \";\r\n\r\n\t\tel.appendChild(showingEl);\r\n\t\tel.appendChild(valueEl);\r\n\t\tel.appendChild(rowsEl);\r\n\t}\r\n\t\r\n\treturn el;\r\n};","export default function(pageSize, currentRow, currentPage, totalRows, totalPages){\r\n\r\n var el = document.createElement(\"span\"),\r\n\tshowingEl = document.createElement(\"span\"),\r\n\tvalueEl = document.createElement(\"span\"),\r\n\tofEl = document.createElement(\"span\"),\r\n\ttotalEl = document.createElement(\"span\"),\r\n\trowsEl = document.createElement(\"span\");\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|showing\", (value) => {\r\n\t\tshowingEl.innerHTML = value;\r\n\t});\r\n\t\r\n\tvalueEl.innerHTML = \" \" + currentPage + \" \";\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|of\", (value) => {\r\n\t\tofEl.innerHTML = value;\r\n\t});\r\n\t\r\n\ttotalEl.innerHTML = \" \" + totalPages + \" \";\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|pages\", (value) => {\r\n\t\trowsEl.innerHTML = value;\r\n\t});\r\n\t\r\n\tel.appendChild(showingEl);\r\n\tel.appendChild(valueEl);\r\n\tel.appendChild(ofEl);\r\n\tel.appendChild(totalEl);\r\n\tel.appendChild(rowsEl);\r\n\t\r\n\treturn el;\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultPageCounters from './defaults/pageCounters.js';\r\n\r\nclass Page extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.mode = \"local\";\r\n\t\tthis.progressiveLoad = false;\r\n\t\t\r\n\t\tthis.element = null;\r\n\t\tthis.pageCounterElement = null;\r\n\t\tthis.pageCounter = null;\r\n\t\t\r\n\t\tthis.size = 0;\r\n\t\tthis.page = 1;\r\n\t\tthis.count = 5;\r\n\t\tthis.max = 1;\r\n\r\n\t\tthis.remoteRowCountEstimate = null;\r\n\t\t\r\n\t\tthis.displayIndex = 0; //index in display pipeline\r\n\t\t\r\n\t\tthis.initialLoad = true;\r\n\t\tthis.dataChanging = false; //flag to check if data is being changed by this module\r\n\t\t\r\n\t\tthis.pageSizes = [];\r\n\t\t\r\n\t\tthis.registerTableOption(\"pagination\", false); //set pagination type\r\n\t\tthis.registerTableOption(\"paginationMode\", \"local\"); //local or remote pagination\r\n\t\tthis.registerTableOption(\"paginationSize\", false); //set number of rows to a page\r\n\t\tthis.registerTableOption(\"paginationInitialPage\", 1); //initial page to show on load\r\n\t\tthis.registerTableOption(\"paginationCounter\", false); // set pagination counter\r\n\t\tthis.registerTableOption(\"paginationCounterElement\", false); // set pagination counter\r\n\t\tthis.registerTableOption(\"paginationButtonCount\", 5); // set count of page button\r\n\t\tthis.registerTableOption(\"paginationSizeSelector\", false); //add pagination size selector element\r\n\t\tthis.registerTableOption(\"paginationElement\", false); //element to hold pagination numbers\r\n\t\t// this.registerTableOption(\"paginationDataSent\", {}); //pagination data sent to the server\r\n\t\t// this.registerTableOption(\"paginationDataReceived\", {}); //pagination data received from the server\r\n\t\tthis.registerTableOption(\"paginationAddRow\", \"page\"); //add rows on table or page\r\n\t\t\r\n\t\tthis.registerTableOption(\"progressiveLoad\", false); //progressive loading\r\n\t\tthis.registerTableOption(\"progressiveLoadDelay\", 0); //delay between requests\r\n\t\tthis.registerTableOption(\"progressiveLoadScrollMargin\", 0); //margin before scroll begins\r\n\t\t\r\n\t\tthis.registerTableFunction(\"setMaxPage\", this.setMaxPage.bind(this));\r\n\t\tthis.registerTableFunction(\"setPage\", this.setPage.bind(this));\r\n\t\tthis.registerTableFunction(\"setPageToRow\", this.userSetPageToRow.bind(this));\r\n\t\tthis.registerTableFunction(\"setPageSize\", this.userSetPageSize.bind(this));\r\n\t\tthis.registerTableFunction(\"getPageSize\", this.getPageSize.bind(this));\r\n\t\tthis.registerTableFunction(\"previousPage\", this.previousPage.bind(this));\r\n\t\tthis.registerTableFunction(\"nextPage\", this.nextPage.bind(this));\r\n\t\tthis.registerTableFunction(\"getPage\", this.getPage.bind(this));\r\n\t\tthis.registerTableFunction(\"getPageMax\", this.getPageMax.bind(this));\r\n\t\t\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"pageTo\", this.setPageToRow.bind(this));\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"row-added\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"data-processed\", this.initialLoadComplete.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.calculatePageSizes.bind(this));\r\n\r\n\t\t\tif(this.table.options.paginationAddRow == \"page\"){\r\n\t\t\t\tthis.subscribe(\"row-adding-position\", this.rowAddingPosition.bind(this));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.options.paginationMode === \"remote\"){\r\n\t\t\t\tthis.subscribe(\"data-params\", this.remotePageParams.bind(this));\r\n\t\t\t\tthis.subscribe(\"data-loaded\", this._parseRemoteData.bind(this));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.options.progressiveLoad){\r\n\t\t\t\tconsole.error(\"Progressive Load Error - Pagination and progressive load cannot be used at the same time\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.registerDisplayHandler(this.restOnRenderBefore.bind(this), 40);\r\n\t\t\tthis.registerDisplayHandler(this.getRows.bind(this), 50);\r\n\t\t\t\r\n\t\t\tthis.createElements();\r\n\t\t\tthis.initializePageCounter();\r\n\t\t\tthis.initializePaginator();\r\n\t\t}else if(this.table.options.progressiveLoad){\r\n\t\t\tthis.subscribe(\"data-params\", this.remotePageParams.bind(this));\r\n\t\t\tthis.subscribe(\"data-loaded\", this._parseRemoteData.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.calculatePageSizes.bind(this));\r\n\t\t\tthis.subscribe(\"data-processed\", this.initialLoadComplete.bind(this));\r\n\t\t\t\r\n\t\t\tthis.initializeProgressive(this.table.options.progressiveLoad)\r\n\t\t\t\r\n\t\t\tif(this.table.options.progressiveLoad === \"scroll\"){\r\n\t\t\t\tthis.subscribe(\"scroll-vertical\", this.scrollVertical.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trowAddingPosition(row, top){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tdispRows = rowManager.getDisplayRows(),\r\n\t\tindex;\r\n\t\t\r\n\t\tif(top){\r\n\t\t\tif(dispRows.length){\r\n\t\t\t\tindex = dispRows[0];\r\n\t\t\t}else{\r\n\t\t\t\tif(rowManager.activeRows.length){\r\n\t\t\t\t\tindex = rowManager.activeRows[rowManager.activeRows.length-1];\r\n\t\t\t\t\ttop = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(dispRows.length){\r\n\t\t\t\tindex = dispRows[dispRows.length - 1];\r\n\t\t\t\ttop = dispRows.length < this.size ? false : true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn {index, top}\r\n\t}\r\n\t\r\n\tcalculatePageSizes(){\r\n\t\tvar testElRow, testElCell;\r\n\t\t\r\n\t\tif(this.table.options.paginationSize){\r\n\t\t\tthis.size = this.table.options.paginationSize;\r\n\t\t}else{\r\n\t\t\ttestElRow = document.createElement(\"div\");\r\n\t\t\ttestElRow.classList.add(\"tabulator-row\");\r\n\t\t\ttestElRow.style.visibility = \"hidden\";\r\n\t\t\t\r\n\t\t\ttestElCell = document.createElement(\"div\");\r\n\t\t\ttestElCell.classList.add(\"tabulator-cell\");\r\n\t\t\ttestElCell.innerHTML = \"Page Row Test\";\r\n\t\t\t\r\n\t\t\ttestElRow.appendChild(testElCell);\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getTableElement().appendChild(testElRow);\r\n\t\t\t\r\n\t\t\tthis.size = Math.floor(this.table.rowManager.getElement().clientHeight / testElRow.offsetHeight);\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getTableElement().removeChild(testElRow);\r\n\t\t}\r\n\t\t\r\n\t\tthis.generatePageSizeSelectList();\r\n\t}\r\n\t\r\n\tinitialLoadComplete(){\r\n\t\tthis.initialLoad = false;\r\n\t}\r\n\t\r\n\tremotePageParams(data, config, silent, params){\r\n\t\tif(!this.initialLoad){\r\n\t\t\tif((this.progressiveLoad && !silent) || (!this.progressiveLoad && !this.dataChanging)){\r\n\t\t\t\tthis.reset(true);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//configure request params\r\n\t\tparams.page = this.page;\r\n\t\t\r\n\t\t//set page size if defined\r\n\t\tif(this.size){\r\n\t\t\tparams.size = this.size;\r\n\t\t}\r\n\t\t\r\n\t\treturn params;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\tuserSetPageToRow(row){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\trow = this.rowManager.findRow(row);\r\n\t\t\t\r\n\t\t\tif(row){\r\n\t\t\t\treturn this.setPageToRow(row)\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn Promise.reject();\r\n\t}\r\n\t\r\n\tuserSetPageSize(size){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\tthis.setPageSize(size);\r\n\t\t\treturn this.setPage(1);\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\r\n\tscrollVertical(top, dir){\r\n\t\tvar element, diff, margin;\r\n\t\tif(!dir && !this.table.dataLoader.loading){\r\n\t\t\telement = this.table.rowManager.getElement();\r\n\t\t\tdiff = element.scrollHeight - element.clientHeight - top;\r\n\t\t\tmargin = this.table.options.progressiveLoadScrollMargin || (element.clientHeight * 2);\r\n\t\t\t\r\n\t\t\tif(diff < margin){\r\n\t\t\t\tthis.nextPage()\r\n\t\t\t\t.catch(() => {}); //consume the exception thrown when on the last page\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trestOnRenderBefore(rows, renderInPosition){\r\n\t\tif(!renderInPosition){\r\n\t\t\tif(this.mode === \"local\"){\r\n\t\t\t\tthis.reset();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\trowsUpdated(){\r\n\t\tthis.refreshData(true, \"all\");\r\n\t}\r\n\t\r\n\tcreateElements(){\r\n\t\tvar button;\r\n\t\t\r\n\t\tthis.element = document.createElement(\"span\");\r\n\t\tthis.element.classList.add(\"tabulator-paginator\");\r\n\t\t\r\n\t\tthis.pagesElement = document.createElement(\"span\");\r\n\t\tthis.pagesElement.classList.add(\"tabulator-pages\");\r\n\t\t\r\n\t\tbutton = document.createElement(\"button\");\r\n\t\tbutton.classList.add(\"tabulator-page\");\r\n\t\tbutton.setAttribute(\"type\", \"button\");\r\n\t\tbutton.setAttribute(\"role\", \"button\");\r\n\t\tbutton.setAttribute(\"aria-label\", \"\");\r\n\t\tbutton.setAttribute(\"title\", \"\");\r\n\t\t\r\n\t\tthis.firstBut = button.cloneNode(true);\r\n\t\tthis.firstBut.setAttribute(\"data-page\", \"first\");\r\n\t\t\r\n\t\tthis.prevBut = button.cloneNode(true);\r\n\t\tthis.prevBut.setAttribute(\"data-page\", \"prev\");\r\n\t\t\r\n\t\tthis.nextBut = button.cloneNode(true);\r\n\t\tthis.nextBut.setAttribute(\"data-page\", \"next\");\r\n\t\t\r\n\t\tthis.lastBut = button.cloneNode(true);\r\n\t\tthis.lastBut.setAttribute(\"data-page\", \"last\");\r\n\t\t\r\n\t\tif(this.table.options.paginationSizeSelector){\r\n\t\t\tthis.pageSizeSelect = document.createElement(\"select\");\r\n\t\t\tthis.pageSizeSelect.classList.add(\"tabulator-page-size\");\r\n\t\t}\r\n\t}\r\n\t\r\n\tgeneratePageSizeSelectList(){\r\n\t\tvar pageSizes = [];\r\n\t\t\r\n\t\tif(this.pageSizeSelect){\r\n\t\t\t\r\n\t\t\tif(Array.isArray(this.table.options.paginationSizeSelector)){\r\n\t\t\t\tpageSizes = this.table.options.paginationSizeSelector;\r\n\t\t\t\tthis.pageSizes = pageSizes;\r\n\t\t\t\t\r\n\t\t\t\tif(this.pageSizes.indexOf(this.size) == -1){\r\n\t\t\t\t\tpageSizes.unshift(this.size);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t\r\n\t\t\t\tif(this.pageSizes.indexOf(this.size) == -1){\r\n\t\t\t\t\tpageSizes = [];\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (let i = 1; i < 5; i++){\r\n\t\t\t\t\t\tpageSizes.push(this.size * i);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.pageSizes = pageSizes;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tpageSizes = this.pageSizes;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\twhile(this.pageSizeSelect.firstChild) this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);\r\n\t\t\t\r\n\t\t\tpageSizes.forEach((item) => {\r\n\t\t\t\tvar itemEl = document.createElement(\"option\");\r\n\t\t\t\titemEl.value = item;\r\n\t\t\t\t\r\n\t\t\t\tif(item === true){\r\n\t\t\t\t\tthis.langBind(\"pagination|all\", function(value){\r\n\t\t\t\t\t\titemEl.innerHTML = value;\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\titemEl.innerHTML = item;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tthis.pageSizeSelect.appendChild(itemEl);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.pageSizeSelect.value = this.size;\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializePageCounter(){\r\n\t\tvar counter = this.table.options.paginationCounter,\r\n\t\tpageCounter = null;\r\n\t\t\r\n\t\tif(counter){\r\n\t\t\tif(typeof counter === \"function\"){\r\n\t\t\t\tpageCounter = counter;\r\n\t\t\t}else{\r\n\t\t\t\tpageCounter = Page.pageCounters[counter];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(pageCounter){\r\n\t\t\t\tthis.pageCounter = pageCounter;\r\n\t\t\t\t\r\n\t\t\t\tthis.pageCounterElement = document.createElement(\"span\");\r\n\t\t\t\tthis.pageCounterElement.classList.add(\"tabulator-page-counter\");\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Pagination Error - No such page counter found: \", counter);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//setup pagination\r\n\tinitializePaginator(hidden){\r\n\t\tvar pageSelectLabel, paginationCounterHolder;\r\n\t\t\r\n\t\tif(!hidden){\r\n\t\t\t//build pagination element\r\n\t\t\t\r\n\t\t\t//bind localizations\r\n\t\t\tthis.langBind(\"pagination|first\", (value) => {\r\n\t\t\t\tthis.firstBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|first_title\", (value) => {\r\n\t\t\t\tthis.firstBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.firstBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|prev\", (value) => {\r\n\t\t\t\tthis.prevBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|prev_title\", (value) => {\r\n\t\t\t\tthis.prevBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.prevBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|next\", (value) => {\r\n\t\t\t\tthis.nextBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|next_title\", (value) => {\r\n\t\t\t\tthis.nextBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.nextBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|last\", (value) => {\r\n\t\t\t\tthis.lastBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|last_title\", (value) => {\r\n\t\t\t\tthis.lastBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.lastBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t//click bindings\r\n\t\t\tthis.firstBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.setPage(1)\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.prevBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.previousPage()\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.nextBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.nextPage()\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.lastBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.setPage(this.max)\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(this.table.options.paginationElement){\r\n\t\t\t\tthis.element = this.table.options.paginationElement;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.pageSizeSelect){\r\n\t\t\t\tpageSelectLabel = document.createElement(\"label\");\r\n\t\t\t\t\r\n\t\t\t\tthis.langBind(\"pagination|page_size\", (value) => {\r\n\t\t\t\t\tthis.pageSizeSelect.setAttribute(\"aria-label\", value);\r\n\t\t\t\t\tthis.pageSizeSelect.setAttribute(\"title\", value);\r\n\t\t\t\t\tpageSelectLabel.innerHTML = value;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.element.appendChild(pageSelectLabel);\r\n\t\t\t\tthis.element.appendChild(this.pageSizeSelect);\r\n\t\t\t\t\r\n\t\t\t\tthis.pageSizeSelect.addEventListener(\"change\", (e) => {\r\n\t\t\t\t\tthis.setPageSize(this.pageSizeSelect.value == \"true\" ? true : this.pageSizeSelect.value);\r\n\t\t\t\t\tthis.setPage(1)\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//append to DOM\r\n\t\t\tthis.element.appendChild(this.firstBut);\r\n\t\t\tthis.element.appendChild(this.prevBut);\r\n\t\t\tthis.element.appendChild(this.pagesElement);\r\n\t\t\tthis.element.appendChild(this.nextBut);\r\n\t\t\tthis.element.appendChild(this.lastBut);\r\n\t\t\t\r\n\t\t\tif(!this.table.options.paginationElement && !hidden){\r\n\t\t\t\tif(this.table.options.paginationCounter){\r\n\r\n\t\t\t\t\tpaginationCounterHolder \r\n\r\n\t\t\t\t\tif(this.table.options.paginationCounterElement){\r\n\t\t\t\t\t\tif(this.table.options.paginationCounterElement instanceof HTMLElement){\r\n\t\t\t\t\t\t\tthis.table.options.paginationCounterElement.appendChild(this.pageCounterElement);\r\n\t\t\t\t\t\t}else if(typeof this.table.options.paginationCounterElement === \"string\"){\r\n\t\t\t\t\t\t\tpaginationCounterHolder = document.querySelector(this.table.options.paginationCounterElement);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(paginationCounterHolder){\r\n\t\t\t\t\t\t\t\tpaginationCounterHolder.appendChild(this.pageCounterElement);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Pagination Error - Unable to find element matching paginationCounterElement selector:\", this.table.options.paginationCounterElement);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.table.footerManager.append(this.pageCounterElement);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.table.footerManager.append(this.element, this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.page = this.table.options.paginationInitialPage;\r\n\t\t\tthis.count = this.table.options.paginationButtonCount;\r\n\t\t}\r\n\t\t\r\n\t\t//set default values\r\n\t\tthis.mode = this.table.options.paginationMode;\r\n\t}\r\n\t\r\n\tinitializeProgressive(mode){\r\n\t\tthis.initializePaginator(true);\r\n\t\tthis.mode = \"progressive_\" + mode;\r\n\t\tthis.progressiveLoad = true;\r\n\t}\r\n\t\r\n\ttrackChanges(){\r\n\t\tthis.dispatch(\"page-changed\");\r\n\t}\r\n\t\r\n\tsetDisplayIndex(index){\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\t\r\n\tgetDisplayIndex(){\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\t\r\n\t//calculate maximum page from number of rows\r\n\tsetMaxRows(rowCount){\r\n\t\tif(!rowCount){\r\n\t\t\tthis.max = 1;\r\n\t\t}else{\r\n\t\t\tthis.max = this.size === true ? 1 : Math.ceil(rowCount/this.size);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.page > this.max){\r\n\t\t\tthis.page = this.max;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//reset to first page without triggering action\r\n\treset(force){\r\n\t\tif(!this.initialLoad){\r\n\t\t\tif(this.mode == \"local\" || force){\r\n\t\t\t\tthis.page = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set the maximum page\r\n\tsetMaxPage(max){\r\n\t\t\r\n\t\tmax = parseInt(max);\r\n\t\t\r\n\t\tthis.max = max || 1;\r\n\t\t\r\n\t\tif(this.page > this.max){\r\n\t\t\tthis.page = this.max;\r\n\t\t\tthis.trigger();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set current page number\r\n\tsetPage(page){\r\n\t\tswitch(page){\r\n\t\t\tcase \"first\":\r\n\t\t\treturn this.setPage(1);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"prev\":\r\n\t\t\treturn this.previousPage();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"next\":\r\n\t\t\treturn this.nextPage();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"last\":\r\n\t\t\treturn this.setPage(this.max);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tpage = parseInt(page);\r\n\t\t\r\n\t\tif((page > 0 && page <= this.max) || this.mode !== \"local\"){\r\n\t\t\tthis.page = page;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Requested page is out of range of 1 - \" + this.max + \":\", page);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetPageToRow(row){\r\n\t\tvar rows = this.table.rowManager.getDisplayRows(this.displayIndex - 1);\r\n\t\tvar index = rows.indexOf(row);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tvar page = this.size === true ? 1 : Math.ceil((index + 1) / this.size);\r\n\t\t\t\r\n\t\t\treturn this.setPage(page)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Requested row is not visible\");\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetPageSize(size){\r\n\t\tif(size !== true){\r\n\t\t\tsize = parseInt(size);\r\n\t\t}\r\n\t\t\r\n\t\tif(size > 0){\r\n\t\t\tthis.size = size;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.pageSizeSelect){\r\n\t\t\t// this.pageSizeSelect.value = size;\r\n\t\t\tthis.generatePageSizeSelectList();\r\n\t\t}\r\n\t\t\r\n\t\tthis.trackChanges();\r\n\t}\r\n\t\r\n\t_setPageCounter(totalRows, size, currentRow){\r\n\t\tvar content;\r\n\t\t\r\n\t\tif(this.pageCounter){\r\n\r\n\t\t\tif(this.mode === \"remote\"){\r\n\t\t\t\tsize = this.size;\r\n\t\t\t\tcurrentRow = ((this.page - 1) * this.size) + 1;\r\n\t\t\t\ttotalRows = this.remoteRowCountEstimate;\r\n\t\t\t}\r\n\r\n\t\t\tcontent = this.pageCounter.call(this, size, currentRow, this.page, totalRows, this.max);\r\n\t\t\t\r\n\t\t\tswitch(typeof content){\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\tif(content instanceof Node){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//clear previous cell contents\r\n\t\t\t\t\twhile(this.pageCounterElement.firstChild) this.pageCounterElement.removeChild(this.pageCounterElement.firstChild);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.pageCounterElement.appendChild(content);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(content != null){\r\n\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);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"undefined\":\r\n\t\t\t\tcase \"null\":\r\n\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.pageCounterElement.innerHTML = content;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//setup the pagination buttons\r\n\t_setPageButtons(){\r\n\t\tlet leftSize = Math.floor((this.count-1) / 2);\r\n\t\tlet rightSize = Math.ceil((this.count-1) / 2);\r\n\t\tlet min = this.max - this.page + leftSize + 1 < this.count ? this.max-this.count+1: Math.max(this.page-leftSize,1);\r\n\t\tlet max = this.page <= rightSize? Math.min(this.count, this.max) :Math.min(this.page+rightSize, this.max);\r\n\t\t\r\n\t\twhile(this.pagesElement.firstChild) this.pagesElement.removeChild(this.pagesElement.firstChild);\r\n\t\t\r\n\t\tif(this.page == 1){\r\n\t\t\tthis.firstBut.disabled = true;\r\n\t\t\tthis.prevBut.disabled = true;\r\n\t\t}else{\r\n\t\t\tthis.firstBut.disabled = false;\r\n\t\t\tthis.prevBut.disabled = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.page == this.max){\r\n\t\t\tthis.lastBut.disabled = true;\r\n\t\t\tthis.nextBut.disabled = true;\r\n\t\t}else{\r\n\t\t\tthis.lastBut.disabled = false;\r\n\t\t\tthis.nextBut.disabled = false;\r\n\t\t}\r\n\t\t\r\n\t\tfor(let i = min; i <= max; i++){\r\n\t\t\tif(i>0 && i <= this.max){\r\n\t\t\t\tthis.pagesElement.appendChild(this._generatePageButton(i));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.footerRedraw();\r\n\t}\r\n\t\r\n\t_generatePageButton(page){\r\n\t\tvar button = document.createElement(\"button\");\r\n\t\t\r\n\t\tbutton.classList.add(\"tabulator-page\");\r\n\t\tif(page == this.page){\r\n\t\t\tbutton.classList.add(\"active\");\r\n\t\t}\r\n\t\t\r\n\t\tbutton.setAttribute(\"type\", \"button\");\r\n\t\tbutton.setAttribute(\"role\", \"button\");\r\n\t\t\r\n\t\tthis.langBind(\"pagination|page_title\", (value) => {\r\n\t\t\tbutton.setAttribute(\"aria-label\", value + \" \" + page);\r\n\t\t\tbutton.setAttribute(\"title\", value + \" \" + page);\r\n\t\t});\r\n\t\t\r\n\t\tbutton.setAttribute(\"data-page\", page);\r\n\t\tbutton.textContent = page;\r\n\t\t\r\n\t\tbutton.addEventListener(\"click\", (e) => {\r\n\t\t\tthis.setPage(page)\r\n\t\t});\r\n\t\t\r\n\t\treturn button;\r\n\t}\r\n\t\r\n\t//previous page\r\n\tpreviousPage(){\r\n\t\tif(this.page > 1){\r\n\t\t\tthis.page--;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger()\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Previous page would be less than page 1:\", 0);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//next page\r\n\tnextPage(){\r\n\t\tif(this.page < this.max){\r\n\t\t\tthis.page++;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger();\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tif(!this.progressiveLoad){\r\n\t\t\t\tconsole.warn(\"Pagination Error - Next page would be greater than maximum page of \" + this.max + \":\", this.max + 1);\r\n\t\t\t}\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return current page number\r\n\tgetPage(){\r\n\t\treturn this.page;\r\n\t}\r\n\t\r\n\t//return max page number\r\n\tgetPageMax(){\r\n\t\treturn this.max;\r\n\t}\r\n\t\r\n\tgetPageSize(size){\r\n\t\treturn this.size;\r\n\t}\r\n\t\r\n\tgetMode(){\r\n\t\treturn this.mode;\r\n\t}\r\n\t\r\n\t//return appropriate rows for current page\r\n\tgetRows(data){\r\n\t\tvar actualRowPageSize = 0,\r\n\t\toutput, start, end, actualStartRow;\r\n\r\n\t\tvar actualRows = data.filter((row) => {\r\n\t\t\treturn row.type === \"row\";\r\n\t\t});\r\n\t\t\r\n\t\tif(this.mode == \"local\"){\r\n\t\t\toutput = [];\r\n\t\t\t\r\n\t\t\tthis.setMaxRows(data.length);\r\n\t\t\t\r\n\t\t\tif(this.size === true){\r\n\t\t\t\tstart = 0;\r\n\t\t\t\tend = data.length;\r\n\t\t\t}else{\r\n\t\t\t\tstart = this.size * (this.page - 1);\r\n\t\t\t\tend = start + parseInt(this.size);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._setPageButtons();\r\n\t\t\t\r\n\t\t\tfor(let i = start; i < end; i++){\r\n\t\t\t\tlet row = data[i];\r\n\r\n\t\t\t\tif(row){\r\n\t\t\t\t\toutput.push(row);\r\n\r\n\t\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\t\tif(!actualStartRow){\r\n\t\t\t\t\t\t\tactualStartRow = row;\r\n\t\t\t\t\t\t}\t\r\n\r\n\t\t\t\t\t\tactualRowPageSize++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._setPageCounter(actualRows.length, actualRowPageSize, actualStartRow ? (actualRows.indexOf(actualStartRow) + 1) : 0);\r\n\t\t\t\r\n\t\t\treturn output;\r\n\t\t}else{\r\n\t\t\tthis._setPageButtons();\r\n\t\t\tthis._setPageCounter(actualRows.length);\r\n\t\t\t\r\n\t\t\treturn data.slice(0);\r\n\t\t}\r\n\t}\r\n\t\r\n\ttrigger(){\r\n\t\tvar left;\r\n\t\t\r\n\t\tswitch(this.mode){\r\n\t\t\tcase \"local\":\r\n\t\t\tleft = this.table.rowManager.scrollLeft;\r\n\t\t\t\r\n\t\t\tthis.refreshData();\r\n\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\r\n\t\t\t\r\n\t\t\treturn Promise.resolve();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"remote\":\r\n\t\t\tthis.dataChanging = true;\r\n\t\t\treturn this.reloadData(null)\r\n\t\t\t.finally(() => {\r\n\t\t\t\tthis.dataChanging = false;\r\n\t\t\t})\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"progressive_load\":\r\n\t\t\tcase \"progressive_scroll\":\r\n\t\t\treturn this.reloadData(null, true);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\tconsole.warn(\"Pagination Error - no such pagination mode:\", this.mode);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_parseRemoteData(data){\r\n\t\tvar left, data, margin;\r\n\t\t\r\n\t\tif(typeof data.last_page === \"undefined\"){\r\n\t\t\tconsole.warn(\"Remote Pagination Error - Server response missing '\" + (this.options(\"dataReceiveParams\").last_page || \"last_page\") + \"' property\");\r\n\t\t}\r\n\t\t\r\n\t\tif(data.data){\r\n\t\t\tthis.max = parseInt(data.last_page) || 1;\r\n\r\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));\r\n\t\t\t\r\n\t\t\tif(this.progressiveLoad){\r\n\t\t\t\tswitch(this.mode){\r\n\t\t\t\t\tcase \"progressive_load\":\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.page == 1){\r\n\t\t\t\t\t\tthis.table.rowManager.setData(data.data, false, this.page == 1)\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.table.rowManager.addRows(data.data);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.page < this.max){\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tthis.nextPage();\r\n\t\t\t\t\t\t}, this.table.options.progressiveLoadDelay);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"progressive_scroll\":\r\n\t\t\t\t\tdata = this.page === 1 ? data.data : this.table.rowManager.getData().concat(data.data);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.table.rowManager.setData(data, this.page !== 1, this.page == 1);\r\n\t\t\t\t\t\r\n\t\t\t\t\tmargin = this.table.options.progressiveLoadScrollMargin || (this.table.rowManager.element.clientHeight * 2);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.table.rowManager.element.scrollHeight <= (this.table.rowManager.element.clientHeight + margin)){\r\n\t\t\t\t\t\tif(this.page < this.max){\r\n\t\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\t\tthis.nextPage();\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\t// left = this.table.rowManager.scrollLeft;\r\n\t\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\r\n\t\t\t\t// this.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\t// this.table.columnManager.scrollHorizontal(left);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Remote Pagination Error - Server response missing '\" + (this.options(\"dataReceiveParams\").data || \"data\") + \"' property\");\r\n\t\t}\r\n\t\t\r\n\t\treturn data.data;\r\n\t}\r\n\t\r\n\t//handle the footer element being redrawn\r\n\tfooterRedraw(){\r\n\t\tvar footer = this.table.footerManager.containerElement;\r\n\r\n\t\tif((Math.ceil(footer.clientWidth) - footer.scrollWidth) < 0){\r\n\t\t\tthis.pagesElement.style.display = 'none';\r\n\t\t}else{\r\n\t\t\tthis.pagesElement.style.display = '';\r\n\t\t\t\r\n\t\t\tif((Math.ceil(footer.clientWidth) - footer.scrollWidth) < 0){\r\n\t\t\t\tthis.pagesElement.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nPage.moduleName = \"page\";\r\n\r\n//load defaults\r\nPage.pageCounters = defaultPageCounters;\r\n\r\nexport default Page;","// read peristence information from storage\r\nexport default {\r\n\tlocal:function(id, type){\r\n\t\tvar data = localStorage.getItem(id + \"-\" + type);\r\n\r\n\t\treturn data ? JSON.parse(data) : false;\r\n\t},\r\n\tcookie:function(id, type){\r\n\t\tvar cookie = document.cookie,\r\n\t\tkey = id + \"-\" + type,\r\n\t\tcookiePos = cookie.indexOf(key + \"=\"),\r\n\t\tend, data;\r\n\r\n\t\t//if cookie exists, decode and load column data into tabulator\r\n\t\tif(cookiePos > -1){\r\n\t\t\tcookie = cookie.slice(cookiePos);\r\n\r\n\t\t\tend = cookie.indexOf(\";\");\r\n\r\n\t\t\tif(end > -1){\r\n\t\t\t\tcookie = cookie.slice(0, end);\r\n\t\t\t}\r\n\r\n\t\t\tdata = cookie.replace(key + \"=\", \"\");\r\n\t\t}\r\n\r\n\t\treturn data ? JSON.parse(data) : false;\r\n\t}\r\n};\r\n","//write persistence information to storage\r\nexport default {\r\n\tlocal:function(id, type, data){\r\n\t\tlocalStorage.setItem(id + \"-\" + type, JSON.stringify(data));\r\n\t},\r\n\tcookie:function(id, type, data){\r\n\t\tvar expireDate = new Date();\r\n\r\n\t\texpireDate.setDate(expireDate.getDate() + 10000);\r\n\r\n\t\tdocument.cookie = id + \"-\" + type + \"=\" + JSON.stringify(data) + \"; expires=\" + expireDate.toUTCString();\r\n\t}\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultReaders from './defaults/readers.js';\r\nimport defaultWriters from './defaults/writers.js';\r\n\r\nclass Persistence extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.mode = \"\";\r\n\t\tthis.id = \"\";\r\n\t\t// this.persistProps = [\"field\", \"width\", \"visible\"];\r\n\t\tthis.defWatcherBlock = false;\r\n\t\tthis.config = {};\r\n\t\tthis.readFunc = false;\r\n\t\tthis.writeFunc = false;\r\n\r\n\t\tthis.registerTableOption(\"persistence\", false);\r\n\t\tthis.registerTableOption(\"persistenceID\", \"\"); //key for persistent storage\r\n\t\tthis.registerTableOption(\"persistenceMode\", true); //mode for storing persistence information\r\n\t\tthis.registerTableOption(\"persistenceReaderFunc\", false); //function for handling persistence data reading\r\n\t\tthis.registerTableOption(\"persistenceWriterFunc\", false); //function for handling persistence data writing\r\n\t}\r\n\r\n\t// Test for whether localStorage is available for use.\r\n\tlocalStorageTest() {\r\n\t\tvar testKey = \"_tabulator_test\";\r\n\r\n\t\ttry {\r\n\t\t\twindow.localStorage.setItem( testKey, testKey);\r\n\t\t\twindow.localStorage.removeItem( testKey );\r\n\t\t\treturn true;\r\n\t\t} catch(e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//setup parameters\r\n\tinitialize(){\r\n\t\tif(this.table.options.persistence){\r\n\t\t\t//determine persistent layout storage type\r\n\t\t\tvar mode = this.table.options.persistenceMode,\r\n\t\t\tid = this.table.options.persistenceID,\r\n\t\t\tretreivedData;\r\n\r\n\t\t\tthis.mode = mode !== true ? mode : (this.localStorageTest() ? \"local\" : \"cookie\");\r\n\r\n\t\t\tif(this.table.options.persistenceReaderFunc){\r\n\t\t\t\tif(typeof this.table.options.persistenceReaderFunc === \"function\"){\r\n\t\t\t\t\tthis.readFunc = this.table.options.persistenceReaderFunc;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(Persistence.readers[this.table.options.persistenceReaderFunc]){\r\n\t\t\t\t\t\tthis.readFunc = Persistence.readers[this.table.options.persistenceReaderFunc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Persistence Read Error - invalid reader set\", this.table.options.persistenceReaderFunc);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(Persistence.readers[this.mode]){\r\n\t\t\t\t\tthis.readFunc = Persistence.readers[this.mode];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Persistence Read Error - invalid reader set\", this.mode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.persistenceWriterFunc){\r\n\t\t\t\tif(typeof this.table.options.persistenceWriterFunc === \"function\"){\r\n\t\t\t\t\tthis.writeFunc = this.table.options.persistenceWriterFunc;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(Persistence.writers[this.table.options.persistenceWriterFunc]){\r\n\t\t\t\t\t\tthis.writeFunc = Persistence.writers[this.table.options.persistenceWriterFunc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Persistence Write Error - invalid reader set\", this.table.options.persistenceWriterFunc);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(Persistence.writers[this.mode]){\r\n\t\t\t\t\tthis.writeFunc = Persistence.writers[this.mode];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Persistence Write Error - invalid writer set\", this.mode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//set storage tag\r\n\t\t\tthis.id = \"tabulator-\" + (id || (this.table.element.getAttribute(\"id\") || \"\"));\r\n\r\n\t\t\tthis.config = {\r\n\t\t\t\tsort:this.table.options.persistence === true || this.table.options.persistence.sort,\r\n\t\t\t\tfilter:this.table.options.persistence === true || this.table.options.persistence.filter,\r\n\t\t\t\tgroup:this.table.options.persistence === true || this.table.options.persistence.group,\r\n\t\t\t\tpage:this.table.options.persistence === true || this.table.options.persistence.page,\r\n\t\t\t\tcolumns:this.table.options.persistence === true ? [\"title\", \"width\", \"visible\"] : this.table.options.persistence.columns,\r\n\t\t\t};\r\n\r\n\t\t\t//load pagination data if needed\r\n\t\t\tif(this.config.page){\r\n\t\t\t\tretreivedData = this.retreiveData(\"page\");\r\n\r\n\t\t\t\tif(retreivedData){\r\n\t\t\t\t\tif(typeof retreivedData.paginationSize !== \"undefined\" && (this.config.page === true || this.config.page.size)){\r\n\t\t\t\t\t\tthis.table.options.paginationSize = retreivedData.paginationSize;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(typeof retreivedData.paginationInitialPage !== \"undefined\" && (this.config.page === true || this.config.page.page)){\r\n\t\t\t\t\t\tthis.table.options.paginationInitialPage = retreivedData.paginationInitialPage;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//load group data if needed\r\n\t\t\tif(this.config.group){\r\n\t\t\t\tretreivedData = this.retreiveData(\"group\");\r\n\r\n\t\t\t\tif(retreivedData){\r\n\t\t\t\t\tif(typeof retreivedData.groupBy !== \"undefined\" && (this.config.group === true || this.config.group.groupBy)){\r\n\t\t\t\t\t\tthis.table.options.groupBy = retreivedData.groupBy;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retreivedData.groupStartOpen !== \"undefined\" && (this.config.group === true || this.config.group.groupStartOpen)){\r\n\t\t\t\t\t\tthis.table.options.groupStartOpen = retreivedData.groupStartOpen;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retreivedData.groupHeader !== \"undefined\" && (this.config.group === true || this.config.group.groupHeader)){\r\n\t\t\t\t\t\tthis.table.options.groupHeader = retreivedData.groupHeader;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.columns){\r\n\t\t\t\tthis.table.options.columns = this.load(\"columns\", this.table.options.columns);\r\n\t\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t\t\tthis.subscribe(\"column-show\", this.save.bind(this, \"columns\"));\r\n\t\t\t\tthis.subscribe(\"column-hide\", this.save.bind(this, \"columns\"));\r\n\t\t\t\tthis.subscribe(\"column-moved\", this.save.bind(this, \"columns\"));\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-built\", this.tableBuilt.bind(this), 0);\r\n\r\n\t\t\tthis.subscribe(\"table-redraw\", this.tableRedraw.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"filter-changed\", this.eventSave.bind(this, \"filter\"));\r\n\t\t\tthis.subscribe(\"sort-changed\", this.eventSave.bind(this, \"sort\"));\r\n\t\t\tthis.subscribe(\"group-changed\", this.eventSave.bind(this, \"group\"));\r\n\t\t\tthis.subscribe(\"page-changed\", this.eventSave.bind(this, \"page\"));\r\n\t\t\tthis.subscribe(\"column-resized\", this.eventSave.bind(this, \"columns\"));\r\n\t\t\tthis.subscribe(\"layout-refreshed\", this.eventSave.bind(this, \"columns\"));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"getColumnLayout\", this.getColumnLayout.bind(this));\r\n\t\tthis.registerTableFunction(\"setColumnLayout\", this.setColumnLayout.bind(this));\r\n\t}\r\n\r\n\teventSave(type){\r\n\t\tif(this.config[type]){\r\n\t\t\tthis.save(type);\r\n\t\t}\r\n\t}\r\n\r\n\ttableBuilt(){\r\n\t\tvar options = this.table.options,\r\n\t\tsorters, filters;\r\n\r\n\t\tif(this.config.sort){\r\n\t\t\tsorters = this.load(\"sort\");\r\n\r\n\t\t\tif(!sorters === false){\r\n\t\t\t\tthis.table.options.initialSort = sorters;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.config.filter){\r\n\t\t\tfilters = this.load(\"filter\");\r\n\r\n\t\t\tif(!filters === false){\r\n\t\t\t\tthis.table.options.initialFilter = filters;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tif(force && this.config.columns){\r\n\t\t\tthis.save(\"columns\");\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tgetColumnLayout(){\r\n\t\treturn this.parseColumns(this.table.columnManager.getColumns());\r\n\t}\r\n\r\n\tsetColumnLayout(layout){\r\n\t\tthis.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns, layout))\r\n\t\treturn true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumn(column){\r\n\t\tvar def, keys;\r\n\r\n\t\tif(this.config.columns){\r\n\t\t\tthis.defWatcherBlock = true;\r\n\r\n\t\t\tdef = column.getDefinition();\r\n\r\n\t\t\tkeys = this.config.columns === true ? Object.keys(def) : this.config.columns;\r\n\r\n\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\tvar props = Object.getOwnPropertyDescriptor(def, key);\r\n\t\t\t\tvar value = def[key];\r\n\t\t\t\tif(props){\r\n\t\t\t\t\tObject.defineProperty(def, key, {\r\n\t\t\t\t\t\tset: function(newValue){\r\n\t\t\t\t\t\t\tvalue = newValue;\r\n\r\n\t\t\t\t\t\t\tif(!this.defWatcherBlock){\r\n\t\t\t\t\t\t\t\tthis.save(\"columns\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif(props.set){\r\n\t\t\t\t\t\t\t\tprops.set(newValue);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tget:function(){\r\n\t\t\t\t\t\t\tif(props.get){\r\n\t\t\t\t\t\t\t\tprops.get();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.defWatcherBlock = false;\r\n\t\t}\r\n\t}\r\n\r\n\t//load saved definitions\r\n\tload(type, current){\r\n\t\tvar data = this.retreiveData(type);\r\n\r\n\t\tif(current){\r\n\t\t\tdata = data ? this.mergeDefinition(current, data) : current;\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//retreive data from memory\r\n\tretreiveData(type){\r\n\t\treturn this.readFunc ? this.readFunc(this.id, type) : false;\r\n\t}\r\n\r\n\t//merge old and new column definitions\r\n\tmergeDefinition(oldCols, newCols){\r\n\t\tvar output = [];\r\n\r\n\t\tnewCols = newCols || [];\r\n\r\n\t\tnewCols.forEach((column, to) => {\r\n\t\t\tvar from = this._findColumn(oldCols, column),\r\n\t\t\tkeys;\r\n\r\n\t\t\tif(from){\r\n\t\t\t\tif(this.config.columns === true || this.config.columns == undefined){\r\n\t\t\t\t\tkeys = Object.keys(from);\r\n\t\t\t\t\tkeys.push(\"width\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tkeys = this.config.columns;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\t\tif(key !== \"columns\" && typeof column[key] !== \"undefined\"){\r\n\t\t\t\t\t\tfrom[key] = column[key];\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(from.columns){\r\n\t\t\t\t\tfrom.columns = this.mergeDefinition(from.columns, column.columns);\r\n\t\t\t\t}\r\n\r\n\t\t\t\toutput.push(from);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\toldCols.forEach((column, i) => {\r\n\t\t\tvar from = this._findColumn(newCols, column);\r\n\r\n\t\t\tif (!from) {\r\n\t\t\t\tif(output.length>i){\r\n\t\t\t\t\toutput.splice(i, 0, column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput.push(column);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//find matching columns\r\n\t_findColumn(columns, subject){\r\n\t\tvar type = subject.columns ? \"group\" : (subject.field ? \"field\" : \"object\");\r\n\r\n\t\treturn columns.find(function(col){\r\n\t\t\tswitch(type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\treturn col.title === subject.title && col.columns.length === subject.columns.length;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"field\":\r\n\t\t\t\treturn col.field === subject.field;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\treturn col === subject;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//save data\r\n\tsave(type){\r\n\t\tvar data = {};\r\n\r\n\t\tswitch(type){\r\n\t\t\tcase \"columns\":\r\n\t\t\tdata = this.parseColumns(this.table.columnManager.getColumns())\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"filter\":\r\n\t\t\tdata = this.table.modules.filter.getFilters();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"sort\":\r\n\t\t\tdata = this.validateSorters(this.table.modules.sort.getSort());\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tdata = this.getGroupConfig();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"page\":\r\n\t\t\tdata = this.getPageConfig();\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(this.writeFunc){\r\n\t\t\tthis.writeFunc(this.id, type, data);\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t//ensure sorters contain no function data\r\n\tvalidateSorters(data){\r\n\t\tdata.forEach(function(item){\r\n\t\t\titem.column = item.field;\r\n\t\t\tdelete item.field;\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\tgetGroupConfig(){\r\n\t\tvar data = {};\r\n\r\n\t\tif(this.config.group){\r\n\t\t\tif(this.config.group === true || this.config.group.groupBy){\r\n\t\t\t\tdata.groupBy = this.table.options.groupBy;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.group === true || this.config.group.groupStartOpen){\r\n\t\t\t\tdata.groupStartOpen = this.table.options.groupStartOpen;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.group === true || this.config.group.groupHeader){\r\n\t\t\t\tdata.groupHeader = this.table.options.groupHeader;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\tgetPageConfig(){\r\n\t\tvar data = {};\r\n\r\n\t\tif(this.config.page){\r\n\t\t\tif(this.config.page === true || this.config.page.size){\r\n\t\t\t\tdata.paginationSize = this.table.modules.page.getPageSize();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.page === true || this.config.page.page){\r\n\t\t\t\tdata.paginationInitialPage = this.table.modules.page.getPage();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\r\n\t//parse columns for data to store\r\n\tparseColumns(columns){\r\n\t\tvar definitions = [],\r\n\t\texcludedKeys = [\"headerContextMenu\", \"headerMenu\", \"contextMenu\", \"clickMenu\"];\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\tvar defStore = {},\r\n\t\t\tcolDef = column.getDefinition(),\r\n\t\t\tkeys;\r\n\r\n\t\t\tif(column.isGroup){\r\n\t\t\t\tdefStore.title = colDef.title;\r\n\t\t\t\tdefStore.columns = this.parseColumns(column.getColumns());\r\n\t\t\t}else{\r\n\t\t\t\tdefStore.field = column.getField();\r\n\r\n\t\t\t\tif(this.config.columns === true || this.config.columns == undefined){\r\n\t\t\t\t\tkeys = Object.keys(colDef);\r\n\t\t\t\t\tkeys.push(\"width\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tkeys = this.config.columns;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\t\tswitch(key){\r\n\t\t\t\t\t\tcase \"width\":\r\n\t\t\t\t\t\tdefStore.width = column.getWidth();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"visible\":\r\n\t\t\t\t\t\tdefStore.visible = column.visible;\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(typeof colDef[key] !== \"function\" && excludedKeys.indexOf(key) === -1){\r\n\t\t\t\t\t\t\tdefStore[key] = colDef[key];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tdefinitions.push(defStore);\r\n\t\t});\r\n\r\n\t\treturn definitions;\r\n\t}\r\n}\r\n\r\nPersistence.moduleName = \"persistence\";\r\n\r\nPersistence.moduleInitOrder = 1;\r\n\r\n//load defaults\r\nPersistence.readers = defaultReaders;\r\nPersistence.writers = defaultWriters;\r\n\r\nexport default Persistence;","import Module from '../../core/Module.js';\r\n\r\nclass Print extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.manualBlock = false;\r\n\r\n\t\tthis.registerTableOption(\"printAsHtml\", false); //enable print as html\r\n\t\tthis.registerTableOption(\"printFormatter\", false); //printing page formatter\r\n\t\tthis.registerTableOption(\"printHeader\", false); //page header contents\r\n\t\tthis.registerTableOption(\"printFooter\", false); //page footer contents\r\n\t\tthis.registerTableOption(\"printStyled\", true); //enable print as html styling\r\n\t\tthis.registerTableOption(\"printRowRange\", \"visible\"); //restrict print to visible rows only\r\n\t\tthis.registerTableOption(\"printConfig\", {}); //print config options\r\n\r\n\t\tthis.registerColumnOption(\"print\");\r\n\t\tthis.registerColumnOption(\"titlePrint\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.printAsHtml){\r\n\t\t\twindow.addEventListener(\"beforeprint\", this.replaceTable.bind(this));\r\n\t\t\twindow.addEventListener(\"afterprint\", this.cleanup.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"print\", this.printFullscreen.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\treplaceTable(){\r\n\t\tif(!this.manualBlock){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"tabulator-print-table\");\r\n\r\n\t\t\tthis.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig, this.table.options.printStyled, this.table.options.printRowRange, \"print\"));\r\n\r\n\t\t\tthis.table.element.style.display = \"none\";\r\n\r\n\t\t\tthis.table.element.parentNode.insertBefore(this.element, this.table.element);\r\n\t\t}\r\n\t}\r\n\r\n\tcleanup(){\r\n\t\tdocument.body.classList.remove(\"tabulator-print-fullscreen-hide\");\r\n\r\n\t\tif(this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\tthis.table.element.style.display = \"\";\r\n\t\t}\r\n\t}\r\n\r\n\tprintFullscreen(visible, style, config){\r\n\t\tvar scrollX = window.scrollX,\r\n\t\tscrollY = window.scrollY,\r\n\t\theaderEl = document.createElement(\"div\"),\r\n\t\tfooterEl = document.createElement(\"div\"),\r\n\t\ttableEl = this.table.modules.export.genereateTable(typeof config != \"undefined\" ? config : this.table.options.printConfig, typeof style != \"undefined\" ? style : this.table.options.printStyled, visible || this.table.options.printRowRange, \"print\"),\r\n\t\theaderContent, footerContent;\r\n\r\n\t\tthis.manualBlock = true;\r\n\r\n\t\tthis.element = document.createElement(\"div\");\r\n\t\tthis.element.classList.add(\"tabulator-print-fullscreen\");\r\n\r\n\t\tif(this.table.options.printHeader){\r\n\t\t\theaderEl.classList.add(\"tabulator-print-header\");\r\n\r\n\t\t\theaderContent = typeof this.table.options.printHeader == \"function\" ? this.table.options.printHeader.call(this.table) : this.table.options.printHeader;\r\n\r\n\t\t\tif(typeof headerContent == \"string\"){\r\n\t\t\t\theaderEl.innerHTML = headerContent;\r\n\t\t\t}else{\r\n\t\t\t\theaderEl.appendChild(headerContent);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.appendChild(headerEl);\r\n\t\t}\r\n\r\n\t\tthis.element.appendChild(tableEl);\r\n\r\n\t\tif(this.table.options.printFooter){\r\n\t\t\tfooterEl.classList.add(\"tabulator-print-footer\");\r\n\r\n\t\t\tfooterContent = typeof this.table.options.printFooter == \"function\" ? this.table.options.printFooter.call(this.table) : this.table.options.printFooter;\r\n\r\n\r\n\t\t\tif(typeof footerContent == \"string\"){\r\n\t\t\t\tfooterEl.innerHTML = footerContent;\r\n\t\t\t}else{\r\n\t\t\t\tfooterEl.appendChild(footerContent);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.appendChild(footerEl);\r\n\t\t}\r\n\r\n\t\tdocument.body.classList.add(\"tabulator-print-fullscreen-hide\");\r\n\t\tdocument.body.appendChild(this.element);\r\n\r\n\t\tif(this.table.options.printFormatter){\r\n\t\t\tthis.table.options.printFormatter(this.element, tableEl);\r\n\t\t}\r\n\r\n\t\twindow.print();\r\n\r\n\t\tthis.cleanup();\r\n\r\n\t\twindow.scrollTo(scrollX, scrollY);\r\n\r\n\t\tthis.manualBlock = false;\r\n\t}\r\n}\r\n\r\nPrint.moduleName = \"print\";\r\n\r\nexport default Print;","import Module from '../../core/Module.js';\r\n\r\nclass ReactiveData extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.data = false;\r\n\t\tthis.blocked = false; //block reactivity while performing update\r\n\t\tthis.origFuncs = {}; // hold original data array functions to allow replacement after data is done with\r\n\t\tthis.currentVersion = 0;\r\n\r\n\t\tthis.registerTableOption(\"reactiveData\", false); //enable data reactivity\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.reactiveData){\r\n\t\t\tthis.subscribe(\"cell-value-save-before\", this.block.bind(this));\r\n\t\t\tthis.subscribe(\"cell-value-save-after\", this.unblock.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-save-before\", this.block.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-save-after\", this.unblock.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-init-after\", this.watchRow.bind(this));\r\n\t\t\tthis.subscribe(\"data-processing\", this.watchData.bind(this));\r\n\t\t\tthis.subscribe(\"table-destroy\", this.unwatchData.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\twatchData(data){\r\n\t\tvar self = this,\r\n\t\tpushFunc, version;\r\n\r\n\t\tthis.currentVersion ++;\r\n\r\n\t\tversion = this.currentVersion;\r\n\r\n\t\tthis.unwatchData();\r\n\r\n\t\tthis.data = data;\r\n\r\n\t\t//override array push function\r\n\t\tthis.origFuncs.push = data.push;\r\n\r\n\t\tObject.defineProperty(this.data, \"push\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments);\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\targs.forEach((arg) => {\r\n\t\t\t\t\t\tself.table.rowManager.addRowActual(arg, false);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.push.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//override array unshift function\r\n\t\tthis.origFuncs.unshift = data.unshift;\r\n\r\n\t\tObject.defineProperty(this.data, \"unshift\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments);\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\targs.forEach((arg) => {\r\n\t\t\t\t\t\tself.table.rowManager.addRowActual(arg, true);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.unshift.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\t//override array shift function\r\n\t\tthis.origFuncs.shift = data.shift;\r\n\r\n\t\tObject.defineProperty(this.data, \"shift\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar row;\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tif(self.data.length){\r\n\t\t\t\t\t\trow = self.table.rowManager.getRowFromDataObject(self.data[0]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.deleteActual();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.shift.call(data);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//override array pop function\r\n\t\tthis.origFuncs.pop = data.pop;\r\n\r\n\t\tObject.defineProperty(this.data, \"pop\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar row;\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tif(self.data.length){\r\n\t\t\t\t\t\trow = self.table.rowManager.getRowFromDataObject(self.data[self.data.length - 1]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.deleteActual();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn self.origFuncs.pop.call(data);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\t//override array splice function\r\n\t\tthis.origFuncs.splice = data.splice;\r\n\r\n\t\tObject.defineProperty(this.data, \"splice\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments),\r\n\t\t\t\tstart = args[0] < 0 ? data.length + args[0] : args[0],\r\n\t\t\t\tend = args[1],\r\n\t\t\t\tnewRows = args[2] ? args.slice(2) : false,\r\n\t\t\t\tstartRow;\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\r\n\t\t\t\t\t//add new rows\r\n\t\t\t\t\tif(newRows){\r\n\t\t\t\t\t\tstartRow = data[start] ? self.table.rowManager.getRowFromDataObject(data[start]) : false;\r\n\r\n\t\t\t\t\t\tif(startRow){\r\n\t\t\t\t\t\t\tnewRows.forEach((rowData) => {\r\n\t\t\t\t\t\t\t\tself.table.rowManager.addRowActual(rowData, true, startRow, true);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnewRows = newRows.slice().reverse();\r\n\r\n\t\t\t\t\t\t\tnewRows.forEach((rowData) => {\r\n\t\t\t\t\t\t\t\tself.table.rowManager.addRowActual(rowData, true, false, true);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//delete removed rows\r\n\t\t\t\t\tif(end !== 0){\r\n\t\t\t\t\t\tvar oldRows = data.slice(start, typeof args[1] === \"undefined\" ? args[1] : start + end);\r\n\r\n\t\t\t\t\t\toldRows.forEach((rowData, i) => {\r\n\t\t\t\t\t\t\tvar row = self.table.rowManager.getRowFromDataObject(rowData);\r\n\r\n\t\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\t\trow.deleteActual(i !== oldRows.length - 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(newRows || end !== 0){\r\n\t\t\t\t\t\tself.table.rowManager.reRenderInPosition();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.splice.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tunwatchData(){\r\n\t\tif(this.data !== false){\r\n\t\t\tfor(var key in this.origFuncs){\r\n\t\t\t\tObject.defineProperty(this.data, key, {\r\n\t\t\t\t\tenumerable: true,\r\n\t\t\t\t\tconfigurable:true,\r\n\t\t\t\t\twritable:true,\r\n\t\t\t\t\tvalue: this.origFuncs.key,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\twatchRow(row){\r\n\t\tvar data = row.getData();\r\n\r\n\t\tthis.blocked = true;\r\n\r\n\t\tfor(var key in data){\r\n\t\t\tthis.watchKey(row, data, key);\r\n\t\t}\r\n\r\n\t\tif(this.table.options.dataTree){\r\n\t\t\tthis.watchTreeChildren(row);\r\n\t\t}\r\n\r\n\t\tthis.blocked = false;\r\n\t}\r\n\r\n\twatchTreeChildren (row){\r\n\t\tvar childField = row.getData()[this.table.options.dataTreeChildField],\r\n\t\torigFuncs = {};\r\n\r\n\t\tfunction rebuildTree(){\r\n\t\t\tthis.table.modules.dataTree.initializeRow(row);\r\n\t\t\tthis.table.modules.dataTree.layoutRow(row);\r\n\t\t\tthis.table.rowManager.refreshActiveData(\"tree\", false, true);\r\n\t\t}\r\n\r\n\t\tif(childField){\r\n\r\n\t\t\torigFuncs.push = childField.push;\r\n\r\n\t\t\tObject.defineProperty(childField, \"push\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.push.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.unshift = childField.unshift;\r\n\r\n\t\t\tObject.defineProperty(childField, \"unshift\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.unshift.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.shift = childField.shift;\r\n\r\n\t\t\tObject.defineProperty(childField, \"shift\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.shift.call(childField);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.pop = childField.pop;\r\n\r\n\t\t\tObject.defineProperty(childField, \"pop\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.pop.call(childField);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.splice = childField.splice;\r\n\r\n\t\t\tObject.defineProperty(childField, \"splice\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.splice.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\twatchKey(row, data, key){\r\n\t\tvar props = Object.getOwnPropertyDescriptor(data, key),\r\n\t\tvalue = data[key],\r\n\t\tversion = this.currentVersion;\r\n\r\n\t\tObject.defineProperty(data, key, {\r\n\t\t\tset: (newValue) => {\r\n\t\t\t\tvalue = newValue;\r\n\t\t\t\tif(!this.blocked && version === this.currentVersion){\r\n\t\t\t\t\tvar update = {};\r\n\t\t\t\t\tupdate[key] = newValue;\r\n\t\t\t\t\trow.updateData(update);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(props.set){\r\n\t\t\t\t\tprops.set(newValue);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tget:() => {\r\n\r\n\t\t\t\tif(props.get){\r\n\t\t\t\t\tprops.get();\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tunwatchRow(row){\r\n\t\tvar data = row.getData();\r\n\r\n\t\tfor(var key in data){\r\n\t\t\tObject.defineProperty(data, key, {\r\n\t\t\t\tvalue:data[key],\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tblock(){\r\n\t\tthis.blocked = true;\r\n\t}\r\n\r\n\tunblock(){\r\n\t\tthis.blocked = false;\r\n\t}\r\n}\r\n\r\nReactiveData.moduleName = \"reactiveData\";\r\n\r\nexport default ReactiveData;\r\n\r\n\r\n\r\n","import Module from '../../core/Module.js';\r\n\r\nclass ResizeColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.startColumn = false;\r\n\t\tthis.startX = false;\r\n\t\tthis.startWidth = false;\r\n\t\tthis.handle = null;\r\n\t\tthis.prevHandle = null;\r\n\t\t\r\n\t\tthis.registerColumnOption(\"resizable\", true);\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\t// if(this.table.options.resizableColumns){\r\n\t\tthis.subscribe(\"cell-layout\", this.layoutCellHandles.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.layoutColumnHeader.bind(this));\r\n\t\t// }\r\n\t}\r\n\t\r\n\tlayoutCellHandles(cell){\r\n\t\tif(cell.row.type === \"row\"){\r\n\t\t\tthis.initializeColumn(\"cell\", cell.column, cell.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutColumnHeader(column){\r\n\t\tthis.initializeColumn(\"header\", column, column.element);\r\n\t}\r\n\t\r\n\tinitializeColumn(type, column, element){\r\n\t\tvar self = this,\r\n\t\tvariableHeight = false,\r\n\t\tmode = column.definition.resizable;\r\n\t\t\r\n\t\t//set column resize mode\r\n\t\tif(type === \"header\"){\r\n\t\t\tvariableHeight = column.definition.formatter == \"textarea\" || column.definition.variableHeight;\r\n\t\t\tcolumn.modules.resize = {variableHeight:variableHeight};\r\n\t\t}\r\n\t\t\r\n\t\tif(mode === true || mode == type){\r\n\t\t\t\r\n\t\t\tvar handle = document.createElement('div');\r\n\t\t\thandle.className = \"tabulator-col-resize-handle\";\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tvar prevHandle = document.createElement('div');\r\n\t\t\tprevHandle.className = \"tabulator-col-resize-handle prev\";\r\n\t\t\t\r\n\t\t\thandle.addEventListener(\"click\", function(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tvar handleDown = function(e){\r\n\t\t\t\tvar nearestColumn = column.getLastColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn && self._checkResizability(nearestColumn)){\r\n\t\t\t\t\tself.startColumn = column;\r\n\t\t\t\t\tself._mouseDown(e, nearestColumn, handle);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\thandle.addEventListener(\"mousedown\", handleDown);\r\n\t\t\thandle.addEventListener(\"touchstart\", handleDown, {passive: true});\r\n\t\t\t\r\n\t\t\t//reszie column on double click\r\n\t\t\thandle.addEventListener(\"dblclick\", function(e){\r\n\t\t\t\tvar col = column.getLastColumn(),\r\n\t\t\t\toldWidth;\r\n\t\t\t\t\r\n\t\t\t\tif(col && self._checkResizability(col)){\r\n\t\t\t\t\toldWidth = col.getWidth();\r\n\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tcol.reinitializeWidth(true);\r\n\r\n\t\t\t\t\tif(oldWidth !== col.getWidth()){\r\n\t\t\t\t\t\tself.dispatch(\"column-resized\", col);\r\n\t\t\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", col.getComponent());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tprevHandle.addEventListener(\"click\", function(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tvar prevHandleDown = function(e){\r\n\t\t\t\tvar nearestColumn, colIndex, prevColumn;\r\n\t\t\t\t\r\n\t\t\t\tnearestColumn = column.getFirstColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn){\r\n\t\t\t\t\tcolIndex = self.table.columnManager.findColumnIndex(nearestColumn);\r\n\t\t\t\t\tprevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(prevColumn && self._checkResizability(prevColumn)){\r\n\t\t\t\t\t\tself.startColumn = column;\r\n\t\t\t\t\t\tself._mouseDown(e, prevColumn, prevHandle);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tprevHandle.addEventListener(\"mousedown\", prevHandleDown);\r\n\t\t\tprevHandle.addEventListener(\"touchstart\", prevHandleDown, {passive: true});\r\n\t\t\t\r\n\t\t\t//resize column on double click\r\n\t\t\tprevHandle.addEventListener(\"dblclick\", function(e){\r\n\t\t\t\tvar nearestColumn, colIndex, prevColumn;\r\n\t\t\t\t\r\n\t\t\t\tnearestColumn = column.getFirstColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn){\r\n\t\t\t\t\tcolIndex = self.table.columnManager.findColumnIndex(nearestColumn);\r\n\t\t\t\t\tprevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(prevColumn && self._checkResizability(prevColumn)){\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tprevColumn.reinitializeWidth(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\telement.appendChild(handle);\r\n\t\t\telement.appendChild(prevHandle);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_checkResizability(column){\r\n\t\treturn column.definition.resizable;\r\n\t}\r\n\t\r\n\t_mouseDown(e, column, handle){\r\n\t\tvar self = this;\r\n\t\t\r\n\t\tself.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tfunction mouseMove(e){\r\n\t\t\t// self.table.columnManager.tempScrollBlock();\r\n\t\t\t\r\n\t\t\tif(self.table.rtl){\r\n\t\t\t\tcolumn.setWidth(self.startWidth - ((typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX) - self.startX));\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.setWidth(self.startWidth + ((typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX) - self.startX));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself.table.columnManager.renderer.rerenderColumns(true);\r\n\t\t\t\r\n\t\t\tif(!self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight){\r\n\t\t\t\tcolumn.checkCellHeights();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfunction mouseUp(e){\r\n\t\t\t\r\n\t\t\t//block editor from taking action while resizing is taking place\r\n\t\t\tif(self.startColumn.modules.edit){\r\n\t\t\t\tself.startColumn.modules.edit.blocked = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight){\r\n\t\t\t\tcolumn.checkCellHeights();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", mouseUp);\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", mouseMove);\r\n\t\t\t\r\n\t\t\thandle.removeEventListener(\"touchmove\", mouseMove);\r\n\t\t\thandle.removeEventListener(\"touchend\", mouseUp);\r\n\t\t\t\r\n\t\t\tself.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tif(self.startWidth !== column.getWidth()){\r\n\t\t\t\tself.dispatch(\"column-resized\", column);\r\n\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", column.getComponent());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\te.stopPropagation(); //prevent resize from interfereing with movable columns\r\n\t\t\r\n\t\t//block editor from taking action while resizing is taking place\r\n\t\tif(self.startColumn.modules.edit){\r\n\t\t\tself.startColumn.modules.edit.blocked = true;\r\n\t\t}\r\n\t\t\r\n\t\tself.startX = typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX;\r\n\t\tself.startWidth = column.getWidth();\r\n\t\t\r\n\t\tdocument.body.addEventListener(\"mousemove\", mouseMove);\r\n\t\tdocument.body.addEventListener(\"mouseup\", mouseUp);\r\n\t\thandle.addEventListener(\"touchmove\", mouseMove, {passive: true});\r\n\t\thandle.addEventListener(\"touchend\", mouseUp);\r\n\t}\r\n}\r\n\r\nResizeColumns.moduleName = \"resizeColumns\";\r\n\r\nexport default ResizeColumns;","import Module from '../../core/Module.js';\r\n\r\nclass ResizeRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.startColumn = false;\r\n\t\tthis.startY = false;\r\n\t\tthis.startHeight = false;\r\n\t\tthis.handle = null;\r\n\t\tthis.prevHandle = null;\r\n\r\n\t\tthis.registerTableOption(\"resizableRows\", false); //resizable rows\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.resizableRows){\r\n\t\t\tthis.subscribe(\"row-layout-after\", this.initializeRow.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\trowEl = row.getElement();\r\n\r\n\t\tvar handle = document.createElement('div');\r\n\t\thandle.className = \"tabulator-row-resize-handle\";\r\n\r\n\t\tvar prevHandle = document.createElement('div');\r\n\t\tprevHandle.className = \"tabulator-row-resize-handle prev\";\r\n\r\n\t\thandle.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tvar handleDown = function(e){\r\n\t\t\tself.startRow = row;\r\n\t\t\tself._mouseDown(e, row, handle);\r\n\t\t};\r\n\r\n\t\thandle.addEventListener(\"mousedown\", handleDown);\r\n\t\thandle.addEventListener(\"touchstart\", handleDown, {passive: true});\r\n\r\n\t\tprevHandle.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tvar prevHandleDown = function(e){\r\n\t\t\tvar prevRow = self.table.rowManager.prevDisplayRow(row);\r\n\r\n\t\t\tif(prevRow){\r\n\t\t\t\tself.startRow = prevRow;\r\n\t\t\t\tself._mouseDown(e, prevRow, prevHandle);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tprevHandle.addEventListener(\"mousedown\",prevHandleDown);\r\n\t\tprevHandle.addEventListener(\"touchstart\",prevHandleDown, {passive: true});\r\n\r\n\t\trowEl.appendChild(handle);\r\n\t\trowEl.appendChild(prevHandle);\r\n\t}\r\n\r\n\t_mouseDown(e, row, handle){\r\n\t\tvar self = this;\r\n\r\n\t\tself.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tfunction mouseMove(e){\r\n\t\t\trow.setHeight(self.startHeight + ((typeof e.screenY === \"undefined\" ? e.touches[0].screenY : e.screenY) - self.startY));\r\n\t\t}\r\n\r\n\t\tfunction mouseUp(e){\r\n\r\n\t\t\t// //block editor from taking action while resizing is taking place\r\n\t\t\t// if(self.startColumn.modules.edit){\r\n\t\t\t// \tself.startColumn.modules.edit.blocked = false;\r\n\t\t\t// }\r\n\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", mouseMove);\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", mouseMove);\r\n\r\n\t\t\thandle.removeEventListener(\"touchmove\", mouseMove);\r\n\t\t\thandle.removeEventListener(\"touchend\", mouseUp);\r\n\r\n\t\t\tself.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tself.dispatchExternal(\"rowResized\", row.getComponent());\r\n\t\t}\r\n\r\n\t\te.stopPropagation(); //prevent resize from interfereing with movable columns\r\n\r\n\t\t//block editor from taking action while resizing is taking place\r\n\t\t// if(self.startColumn.modules.edit){\r\n\t\t// \tself.startColumn.modules.edit.blocked = true;\r\n\t\t// }\r\n\r\n\t\tself.startY = typeof e.screenY === \"undefined\" ? e.touches[0].screenY : e.screenY;\r\n\t\tself.startHeight = row.getHeight();\r\n\r\n\t\tdocument.body.addEventListener(\"mousemove\", mouseMove);\r\n\t\tdocument.body.addEventListener(\"mouseup\", mouseUp);\r\n\r\n\t\thandle.addEventListener(\"touchmove\", mouseMove, {passive: true});\r\n\t\thandle.addEventListener(\"touchend\", mouseUp);\r\n\t}\r\n}\r\n\r\nResizeRows.moduleName = \"resizeRows\";\r\n\r\nexport default ResizeRows;","import Module from '../../core/Module.js';\r\n\r\nclass ResizeTable extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.binding = false;\r\n\t\tthis.observer = false;\r\n\t\tthis.containerObserver = false;\r\n\r\n\t\tthis.tableHeight = 0;\r\n\t\tthis.tableWidth = 0;\r\n\t\tthis.containerHeight = 0;\r\n\t\tthis.containerWidth = 0;\r\n\r\n\t\tthis.autoResize = false;\r\n\r\n\t\tthis.registerTableOption(\"autoResize\", true); //auto resize table\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.autoResize){\r\n\t\t\tvar table = this.table,\r\n\t\t\ttableStyle;\r\n\r\n\t\t\tthis.tableHeight = table.element.clientHeight;\r\n\t\t\tthis.tableWidth = table.element.clientWidth;\r\n\r\n\t\t\tif(table.element.parentNode){\r\n\t\t\t\tthis.containerHeight = table.element.parentNode.clientHeight;\r\n\t\t\t\tthis.containerWidth = table.element.parentNode.clientWidth;\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof ResizeObserver !== \"undefined\" && table.rowManager.getRenderMode() === \"virtual\"){\r\n\r\n\t\t\t\tthis.autoResize = true;\r\n\r\n\t\t\t\tthis.observer = new ResizeObserver((entry) => {\r\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\tvar nodeHeight = Math.floor(entry[0].contentRect.height);\r\n\t\t\t\t\t\tvar nodeWidth = Math.floor(entry[0].contentRect.width);\r\n\r\n\t\t\t\t\t\tif(this.tableHeight != nodeHeight || this.tableWidth != nodeWidth){\r\n\t\t\t\t\t\t\tthis.tableHeight = nodeHeight;\r\n\t\t\t\t\t\t\tthis.tableWidth = nodeWidth;\r\n\r\n\t\t\t\t\t\t\tif(table.element.parentNode){\r\n\t\t\t\t\t\t\t\tthis.containerHeight = table.element.parentNode.clientHeight;\r\n\t\t\t\t\t\t\t\tthis.containerWidth = table.element.parentNode.clientWidth;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tthis.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.observer.observe(table.element);\r\n\r\n\t\t\t\ttableStyle = window.getComputedStyle(table.element);\r\n\r\n\t\t\t\tif(this.table.element.parentNode && !this.table.rowManager.fixedHeight && (tableStyle.getPropertyValue(\"max-height\") || tableStyle.getPropertyValue(\"min-height\"))){\r\n\r\n\t\t\t\t\tthis.containerObserver = new ResizeObserver((entry) => {\r\n\t\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\t\tvar nodeHeight = Math.floor(entry[0].contentRect.height);\r\n\t\t\t\t\t\t\tvar nodeWidth = Math.floor(entry[0].contentRect.width);\r\n\r\n\t\t\t\t\t\t\tif(this.containerHeight != nodeHeight || this.containerWidth != nodeWidth){\r\n\t\t\t\t\t\t\t\tthis.containerHeight = nodeHeight;\r\n\t\t\t\t\t\t\t\tthis.containerWidth = nodeWidth;\r\n\t\t\t\t\t\t\t\tthis.tableHeight = table.element.clientHeight;\r\n\t\t\t\t\t\t\t\tthis.tableWidth = table.element.clientWidth;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\ttable.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tthis.containerObserver.observe(this.table.element.parentNode);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.subscribe(\"table-resize\", this.tableResized.bind(this));\r\n\r\n\t\t\t}else{\r\n\t\t\t\tthis.binding = function(){\r\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile && !table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\ttable.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\twindow.addEventListener(\"resize\", this.binding);\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\ttableResized(){\r\n\t\tthis.table.rowManager.redraw();\r\n\t}\r\n\r\n\tclearBindings(){\r\n\t\tif(this.binding){\r\n\t\t\twindow.removeEventListener(\"resize\", this.binding);\r\n\t\t}\r\n\r\n\t\tif(this.observer){\r\n\t\t\tthis.observer.unobserve(this.table.element);\r\n\t\t}\r\n\r\n\t\tif(this.containerObserver){\r\n\t\t\tthis.containerObserver.unobserve(this.table.element.parentNode);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nResizeTable.moduleName = \"resizeTable\";\r\n\r\nexport default ResizeTable;","import Module from '../../core/Module.js';\r\n\r\nclass ResponsiveLayout extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.columns = [];\r\n\t\tthis.hiddenColumns = [];\r\n\t\tthis.mode = \"\";\r\n\t\tthis.index = 0;\r\n\t\tthis.collapseFormatter = [];\r\n\t\tthis.collapseStartOpen = true;\r\n\t\tthis.collapseHandleColumn = false;\r\n\r\n\t\tthis.registerTableOption(\"responsiveLayout\", false); //responsive layout flags\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseStartOpen\", true); //start showing collapsed data\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseUseFormatters\", true); //responsive layout collapse formatter\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseFormatter\", false); //responsive layout collapse formatter\r\n\r\n\t\tthis.registerColumnOption(\"responsive\");\r\n\t}\r\n\r\n\t//generate responsive columns list\r\n\tinitialize(){\r\n\t\tvar self = this,\r\n\t\tcolumns = [];\r\n\r\n\t\tif(this.table.options.responsiveLayout){\r\n\t\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\t\tthis.subscribe(\"column-show\", this.updateColumnVisibility.bind(this));\r\n\t\t\tthis.subscribe(\"column-hide\", this.updateColumnVisibility.bind(this));\r\n\t\t\tthis.subscribe(\"columns-loaded\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-moved\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-add\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-delete\", this.initializeResponsivity.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"table-redrawing\", this.tableRedraw.bind(this));\r\n\r\n\t\t\tif(this.table.options.responsiveLayout === \"collapse\"){\r\n\t\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\t\tthis.subscribe(\"row-layout\", this.layoutRow.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tif([\"fitColumns\", \"fitDataStretch\"].indexOf(this.layoutMode()) === -1){\r\n\t\t\tif(!force){\r\n\t\t\t\tthis.update();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeResponsivity(){\r\n\t\tvar columns = [];\r\n\r\n\t\tthis.mode = this.table.options.responsiveLayout;\r\n\t\tthis.collapseFormatter = this.table.options.responsiveLayoutCollapseFormatter || this.formatCollapsedData;\r\n\t\tthis.collapseStartOpen = this.table.options.responsiveLayoutCollapseStartOpen;\r\n\t\tthis.hiddenColumns = [];\r\n\r\n\t\t//determine level of responsivity for each column\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column, i) => {\r\n\t\t\tif(column.modules.responsive){\r\n\t\t\t\tif(column.modules.responsive.order && column.modules.responsive.visible){\r\n\t\t\t\t\tcolumn.modules.responsive.index = i;\r\n\t\t\t\t\tcolumns.push(column);\r\n\r\n\t\t\t\t\tif(!column.visible && this.mode === \"collapse\"){\r\n\t\t\t\t\t\tthis.hiddenColumns.push(column);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//sort list by responsivity\r\n\t\tcolumns = columns.reverse();\r\n\t\tcolumns = columns.sort((a, b) => {\r\n\t\t\tvar diff = b.modules.responsive.order - a.modules.responsive.order;\r\n\t\t\treturn diff || (b.modules.responsive.index - a.modules.responsive.index);\r\n\t\t});\r\n\r\n\t\tthis.columns = columns;\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tthis.generateCollapsedContent();\r\n\t\t}\r\n\r\n\t\t//assign collapse column\r\n\t\tfor (let col of this.table.columnManager.columnsByIndex){\r\n\t\t\tif(col.definition.formatter == \"responsiveCollapse\"){\r\n\t\t\t\tthis.collapseHandleColumn = col;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.collapseHandleColumn){\r\n\t\t\tif(this.hiddenColumns.length){\r\n\t\t\t\tthis.collapseHandleColumn.show();\r\n\t\t\t}else{\r\n\t\t\t\tthis.collapseHandleColumn.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//define layout information\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.getDefinition();\r\n\r\n\t\tcolumn.modules.responsive = {order: typeof def.responsive === \"undefined\" ? 1 : def.responsive, visible:def.visible === false ? false : true};\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar el;\r\n\r\n\t\tif(row.type !== \"calc\"){\r\n\t\t\tel = document.createElement(\"div\");\r\n\t\t\tel.classList.add(\"tabulator-responsive-collapse\");\r\n\r\n\t\t\trow.modules.responsiveLayout = {\r\n\t\t\t\telement:el,\r\n\t\t\t\topen:this.collapseStartOpen,\r\n\t\t\t};\r\n\r\n\t\t\tif(!this.collapseStartOpen){\r\n\t\t\t\tel.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tlayoutRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tif(row.modules.responsiveLayout){\r\n\t\t\trowEl.appendChild(row.modules.responsiveLayout.element);\r\n\t\t\tthis.generateCollapsedRowContent(row);\r\n\t\t}\r\n\t}\r\n\r\n\t//update column visibility\r\n\tupdateColumnVisibility(column, responsiveToggle){\r\n\t\tif(!responsiveToggle && column.modules.responsive){\r\n\t\t\tcolumn.modules.responsive.visible = column.visible;\r\n\t\t\tthis.initializeResponsivity();\r\n\t\t}\r\n\t}\r\n\r\n\thideColumn(column){\r\n\t\tvar colCount = this.hiddenColumns.length;\r\n\r\n\t\tcolumn.hide(false, true);\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tthis.hiddenColumns.unshift(column);\r\n\t\t\tthis.generateCollapsedContent();\r\n\r\n\t\t\tif(this.collapseHandleColumn && !colCount){\r\n\t\t\t\tthis.collapseHandleColumn.show();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tshowColumn(column){\r\n\t\tvar index;\r\n\r\n\t\tcolumn.show(false, true);\r\n\t\t//set column width to prevent calculation loops on uninitialized columns\r\n\t\tcolumn.setWidth(column.getWidth());\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tindex = this.hiddenColumns.indexOf(column);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.hiddenColumns.splice(index, 1);\r\n\t\t\t}\r\n\r\n\t\t\tthis.generateCollapsedContent();\r\n\r\n\t\t\tif(this.collapseHandleColumn && !this.hiddenColumns.length){\r\n\t\t\t\tthis.collapseHandleColumn.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//redraw columns to fit space\r\n\tupdate(){\r\n\t\tvar self = this,\r\n\t\tworking = true;\r\n\r\n\t\twhile(working){\r\n\r\n\t\t\tlet width = self.table.modules.layout.getMode() == \"fitColumns\" ? self.table.columnManager.getFlexBaseWidth() : self.table.columnManager.getWidth();\r\n\r\n\t\t\tlet diff = (self.table.options.headerVisible ? self.table.columnManager.element.clientWidth : self.table.element.clientWidth) - width;\r\n\r\n\t\t\tif(diff < 0){\r\n\t\t\t\t//table is too wide\r\n\t\t\t\tlet column = self.columns[self.index];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tself.hideColumn(column);\r\n\t\t\t\t\tself.index ++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tworking = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\r\n\t\t\t\t//table has spare space\r\n\t\t\t\tlet column = self.columns[self.index -1];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tif(diff > 0){\r\n\t\t\t\t\t\tif(diff >= column.getWidth()){\r\n\t\t\t\t\t\t\tself.showColumn(column);\r\n\t\t\t\t\t\t\tself.index --;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tworking = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tworking = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(!self.table.rowManager.activeRowsCount){\r\n\t\t\t\tself.table.rowManager.renderEmptyScroll();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateCollapsedContent(){\r\n\t\tvar self = this,\r\n\t\trows = this.table.rowManager.getDisplayRows();\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\tself.generateCollapsedRowContent(row);\r\n\t\t});\r\n\t}\r\n\r\n\tgenerateCollapsedRowContent(row){\r\n\t\tvar el, contents;\r\n\r\n\t\tif(row.modules.responsiveLayout){\r\n\t\t\tel = row.modules.responsiveLayout.element;\r\n\r\n\t\t\twhile(el.firstChild) el.removeChild(el.firstChild);\r\n\r\n\t\t\tcontents = this.collapseFormatter(this.generateCollapsedRowData(row));\r\n\t\t\tif(contents){\r\n\t\t\t\tel.appendChild(contents);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateCollapsedRowData(row){\r\n\t\tvar self = this,\r\n\t\tdata = row.getData(),\r\n\t\toutput = [],\r\n\t\tmockCellComponent;\r\n\r\n\t\tthis.hiddenColumns.forEach(function(column){\r\n\t\t\tvar value = column.getFieldValue(data);\r\n\r\n\t\t\tif(column.definition.title && column.field){\r\n\t\t\t\tif(column.modules.format && self.table.options.responsiveLayoutCollapseUseFormatters){\r\n\r\n\t\t\t\t\tmockCellComponent = {\r\n\t\t\t\t\t\tvalue:false,\r\n\t\t\t\t\t\tdata:{},\r\n\t\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetData:function(){\r\n\t\t\t\t\t\t\treturn data;\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\t\treturn document.createElement(\"div\");\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\t\treturn row.getComponent();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tfunction onRendered(callback){\r\n\t\t\t\t\t\tcallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\toutput.push({\r\n\t\t\t\t\t\tfield: column.field,\r\n\t\t\t\t\t\ttitle: column.definition.title,\r\n\t\t\t\t\t\tvalue: column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params, onRendered)\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput.push({\r\n\t\t\t\t\t\tfield: column.field,\r\n\t\t\t\t\t\ttitle: column.definition.title,\r\n\t\t\t\t\t\tvalue: value\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tformatCollapsedData(data){\r\n\t\tvar list = document.createElement(\"table\");\r\n\r\n\t\tdata.forEach(function(item){\r\n\t\t\tvar row = document.createElement(\"tr\");\r\n\t\t\tvar titleData = document.createElement(\"td\");\r\n\t\t\tvar valueData = document.createElement(\"td\");\r\n\t\t\tvar node_content;\r\n\r\n\t\t\tvar titleHighlight = document.createElement(\"strong\");\r\n\t\t\ttitleData.appendChild(titleHighlight);\r\n\t\t\tthis.langBind(\"columns|\" + item.field, function(text){\r\n\t\t\t\ttitleHighlight.innerHTML = text || item.title;\r\n\t\t\t});\r\n\r\n\t\t\tif(item.value instanceof Node){\r\n\t\t\t\tnode_content = document.createElement(\"div\");\r\n\t\t\t\tnode_content.appendChild(item.value);\r\n\t\t\t\tvalueData.appendChild(node_content);\r\n\t\t\t}else{\r\n\t\t\t\tvalueData.innerHTML = item.value;\r\n\t\t\t}\r\n\r\n\t\t\trow.appendChild(titleData);\r\n\t\t\trow.appendChild(valueData);\r\n\t\t\tlist.appendChild(row);\r\n\t\t}, this);\r\n\r\n\t\treturn Object.keys(data).length ? list : \"\";\r\n\t}\r\n}\r\n\r\nResponsiveLayout.moduleName = \"responsiveLayout\";\r\n\r\nexport default ResponsiveLayout;","import Module from '../../core/Module.js';\r\n\r\nclass SelectRow extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.selecting = false; //flag selecting in progress\r\n\t\tthis.lastClickedRow = false; //last clicked row\r\n\t\tthis.selectPrev = []; //hold previously selected element for drag drop selection\r\n\t\tthis.selectedRows = []; //hold selected rows\r\n\t\tthis.headerCheckboxElement = null; // hold header select element\r\n\t\t\r\n\t\tthis.registerTableOption(\"selectable\", \"highlight\"); //highlight rows on hover\r\n\t\tthis.registerTableOption(\"selectableRangeMode\", \"drag\"); //highlight rows on hover\r\n\t\tthis.registerTableOption(\"selectableRollingSelection\", true); //roll selection once maximum number of selectable rows is reached\r\n\t\tthis.registerTableOption(\"selectablePersistence\", true); // maintain selection when table view is updated\r\n\t\tthis.registerTableOption(\"selectableCheck\", function(data, row){return true;}); //check wheather row is selectable\r\n\t\t\r\n\t\tthis.registerTableFunction(\"selectRow\", this.selectRows.bind(this));\r\n\t\tthis.registerTableFunction(\"deselectRow\", this.deselectRows.bind(this));\r\n\t\tthis.registerTableFunction(\"toggleSelectRow\", this.toggleRow.bind(this));\r\n\t\tthis.registerTableFunction(\"getSelectedRows\", this.getSelectedRows.bind(this));\r\n\t\tthis.registerTableFunction(\"getSelectedData\", this.getSelectedData.bind(this));\r\n\t\t\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"select\", this.selectRows.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"deselect\", this.deselectRows.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"toggleSelect\", this.toggleRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isSelected\", this.isRowSelected.bind(this));\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.selectable !== false){\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleting\", this.rowDeleted.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.clearSelectionData.bind(this));\r\n\t\t\tthis.subscribe(\"rows-retrieve\", this.rowRetrieve.bind(this));\r\n\t\t\t\r\n\t\t\tif(this.table.options.selectable && !this.table.options.selectablePersistence){\r\n\t\t\t\tthis.subscribe(\"data-refreshing\", this.deselectRows.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trowRetrieve(type, prevValue){\r\n\t\treturn type === \"selected\" ? this.selectedRows : prevValue;\r\n\t}\r\n\t\r\n\trowDeleted(row){\r\n\t\tthis._deselectRow(row, true);\r\n\t}\r\n\t\r\n\tclearSelectionData(silent){\r\n\t\tthis.selecting = false;\r\n\t\tthis.lastClickedRow = false;\r\n\t\tthis.selectPrev = [];\r\n\t\tthis.selectedRows = [];\r\n\t\t\r\n\t\tif(silent !== true){\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\telement = row.getElement();\r\n\t\t\r\n\t\t// trigger end of row selection\r\n\t\tvar endSelect = function(){\r\n\t\t\t\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tself.selecting = false;\r\n\t\t\t}, 50);\r\n\t\t\t\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", endSelect);\r\n\t\t};\r\n\t\t\r\n\t\trow.modules.select = {selected:false};\r\n\t\t\r\n\t\t//set row selection class\r\n\t\tif(self.table.options.selectableCheck.call(this.table, row.getComponent())){\r\n\t\t\telement.classList.add(\"tabulator-selectable\");\r\n\t\t\telement.classList.remove(\"tabulator-unselectable\");\r\n\t\t\t\r\n\t\t\tif(self.table.options.selectable && self.table.options.selectable != \"highlight\"){\r\n\t\t\t\tif(self.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\telement.addEventListener(\"click\", this.handleComplexRowClick.bind(this, row));\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.addEventListener(\"click\", function(e){\r\n\t\t\t\t\t\tif(!self.table.modExists(\"edit\") || !self.table.modules.edit.getCurrentCell()){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(!self.selecting){\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\t\t\tif(e.shiftKey){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.selecting = true;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.selectPrev = [];\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tdocument.body.addEventListener(\"mouseup\", endSelect);\r\n\t\t\t\t\t\t\tdocument.body.addEventListener(\"keyup\", endSelect);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mouseenter\", function(e){\r\n\t\t\t\t\t\tif(self.selecting){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(self.selectPrev[1] == row){\r\n\t\t\t\t\t\t\t\tself.toggleRow(self.selectPrev[0]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mouseout\", function(e){\r\n\t\t\t\t\t\tif(self.selecting){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\tself.selectPrev.unshift(row);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\telement.classList.add(\"tabulator-unselectable\");\r\n\t\t\telement.classList.remove(\"tabulator-selectable\");\r\n\t\t}\r\n\t}\r\n\t\r\n\thandleComplexRowClick(row, e){\r\n\t\tif(e.shiftKey){\r\n\t\t\tthis.table._clearSelection();\r\n\t\t\tthis.lastClickedRow = this.lastClickedRow || row;\r\n\t\t\t\r\n\t\t\tvar lastClickedRowIdx = this.table.rowManager.getDisplayRowIndex(this.lastClickedRow);\r\n\t\t\tvar rowIdx = this.table.rowManager.getDisplayRowIndex(row);\r\n\t\t\t\r\n\t\t\tvar fromRowIdx = lastClickedRowIdx <= rowIdx ? lastClickedRowIdx : rowIdx;\r\n\t\t\tvar toRowIdx = lastClickedRowIdx >= rowIdx ? lastClickedRowIdx : rowIdx;\r\n\t\t\t\r\n\t\t\tvar rows = this.table.rowManager.getDisplayRows().slice(0);\r\n\t\t\tvar toggledRows = rows.splice(fromRowIdx, toRowIdx - fromRowIdx + 1);\r\n\t\t\t\r\n\t\t\tif(e.ctrlKey || e.metaKey){\r\n\t\t\t\ttoggledRows.forEach((toggledRow)=>{\r\n\t\t\t\t\tif(toggledRow !== this.lastClickedRow){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.table.options.selectable !== true && !this.isRowSelected(row)){\r\n\t\t\t\t\t\t\tif(this.selectedRows.length < this.table.options.selectable){\r\n\t\t\t\t\t\t\t\tthis.toggleRow(toggledRow);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.toggleRow(toggledRow);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tthis.lastClickedRow = row;\r\n\t\t\t}else{\r\n\t\t\t\tthis.deselectRows(undefined, true);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.selectable !== true){\r\n\t\t\t\t\tif(toggledRows.length > this.table.options.selectable){\r\n\t\t\t\t\t\ttoggledRows = toggledRows.slice(0, this.table.options.selectable)\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.selectRows(toggledRows);\r\n\t\t\t}\r\n\t\t\tthis.table._clearSelection();\r\n\t\t}\r\n\t\telse if(e.ctrlKey || e.metaKey){\r\n\t\t\tthis.toggleRow(row);\r\n\t\t\tthis.lastClickedRow = row;\r\n\t\t}else{\r\n\t\t\tthis.deselectRows(undefined, true);\r\n\t\t\tthis.selectRows(row);\r\n\t\t\tthis.lastClickedRow = row;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//toggle row selection\r\n\ttoggleRow(row){\r\n\t\tif(this.table.options.selectableCheck.call(this.table, row.getComponent())){\r\n\t\t\tif(row.modules.select && row.modules.select.selected){\r\n\t\t\t\tthis._deselectRow(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis._selectRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//select a number of rows\r\n\tselectRows(rows){\r\n\t\tvar rowMatch;\r\n\t\t\r\n\t\tswitch(typeof rows){\r\n\t\t\tcase \"undefined\":\r\n\t\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"string\":\r\n\t\t\t\r\n\t\t\trowMatch = this.table.rowManager.findRow(rows);\r\n\t\t\t\r\n\t\t\tif(rowMatch){\r\n\t\t\t\tthis._selectRow(rowMatch, true, true);\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.rowManager.getRows(rows).forEach((row) => {\r\n\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\tif(Array.isArray(rows)){\r\n\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis._rowSelectionChanged();\r\n\t\t\t}else{\r\n\t\t\t\tthis._selectRow(rows, false, true);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//select an individual row\r\n\t_selectRow(rowInfo, silent, force){\r\n\t\tvar index;\r\n\t\t\r\n\t\t//handle max row count\r\n\t\tif(!isNaN(this.table.options.selectable) && this.table.options.selectable !== true && !force){\r\n\t\t\tif(this.selectedRows.length >= this.table.options.selectable){\r\n\t\t\t\tif(this.table.options.selectableRollingSelection){\r\n\t\t\t\t\tthis._deselectRow(this.selectedRows[0]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tvar row = this.table.rowManager.findRow(rowInfo);\r\n\t\t\r\n\t\tif(row){\r\n\t\t\tif(this.selectedRows.indexOf(row) == -1){\r\n\t\t\t\trow.getElement().classList.add(\"tabulator-selected\");\r\n\t\t\t\tif(!row.modules.select){\r\n\t\t\t\t\trow.modules.select = {};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\trow.modules.select.selected = true;\r\n\t\t\t\tif(row.modules.select.checkboxEl){\r\n\t\t\t\t\trow.modules.select.checkboxEl.checked = true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.selectedRows.push(row);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.dataTreeSelectPropagate){\r\n\t\t\t\t\tthis.childRowSelection(row, true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatchExternal(\"rowSelected\", row.getComponent());\r\n\t\t\t\t\r\n\t\t\t\tthis._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Selection Error - No such row found, ignoring selection:\" + rowInfo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tisRowSelected(row){\r\n\t\treturn this.selectedRows.indexOf(row) !== -1;\r\n\t}\r\n\t\r\n\t//deselect a number of rows\r\n\tdeselectRows(rows, silent){\r\n\t\tvar self = this,\r\n\t\trowCount;\r\n\t\t\r\n\t\tif(typeof rows == \"undefined\"){\r\n\t\t\t\r\n\t\t\trowCount = self.selectedRows.length;\r\n\t\t\t\r\n\t\t\tfor(let i = 0; i < rowCount; i++){\r\n\t\t\t\tself._deselectRow(self.selectedRows[0], true);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(rowCount){\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tif(Array.isArray(rows)){\r\n\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\tself._deselectRow(row, true);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}else{\r\n\t\t\t\tself._deselectRow(rows, silent);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//deselect an individual row\r\n\t_deselectRow(rowInfo, silent){\r\n\t\tvar self = this,\r\n\t\trow = self.table.rowManager.findRow(rowInfo),\r\n\t\tindex;\r\n\t\t\r\n\t\tif(row){\r\n\t\t\tindex = self.selectedRows.findIndex(function(selectedRow){\r\n\t\t\t\treturn selectedRow == row;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\t\r\n\t\t\t\trow.getElement().classList.remove(\"tabulator-selected\");\r\n\t\t\t\tif(!row.modules.select){\r\n\t\t\t\t\trow.modules.select = {};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\trow.modules.select.selected = false;\r\n\t\t\t\tif(row.modules.select.checkboxEl){\r\n\t\t\t\t\trow.modules.select.checkboxEl.checked = false;\r\n\t\t\t\t}\r\n\t\t\t\tself.selectedRows.splice(index, 1);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.dataTreeSelectPropagate){\r\n\t\t\t\t\tthis.childRowSelection(row, false);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatchExternal(\"rowDeselected\", row.getComponent());\r\n\t\t\t\t\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Deselection Error - No such row found, ignoring selection:\" + rowInfo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSelectedData(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tthis.selectedRows.forEach(function(row){\r\n\t\t\tdata.push(row.getData());\r\n\t\t});\r\n\t\t\r\n\t\treturn data;\r\n\t}\r\n\t\r\n\tgetSelectedRows(){\r\n\t\t\r\n\t\tvar rows = [];\r\n\t\t\r\n\t\tthis.selectedRows.forEach(function(row){\r\n\t\t\trows.push(row.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t_rowSelectionChanged(silent){\r\n\t\tif(this.headerCheckboxElement){\r\n\t\t\tif(this.selectedRows.length === 0){\r\n\t\t\t\tthis.headerCheckboxElement.checked = false;\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = false;\r\n\t\t\t} else if(this.table.rowManager.rows.length === this.selectedRows.length){\r\n\t\t\t\tthis.headerCheckboxElement.checked = true;\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = false;\r\n\t\t\t} else {\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = true;\r\n\t\t\t\tthis.headerCheckboxElement.checked = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(!silent){\r\n\t\t\tthis.dispatchExternal(\"rowSelectionChanged\", this.getSelectedData(), this.getSelectedRows());\r\n\t\t}\r\n\t}\r\n\t\r\n\tregisterRowSelectCheckbox (row, element) {\r\n\t\tif(!row._row.modules.select){\r\n\t\t\trow._row.modules.select = {};\r\n\t\t}\r\n\t\t\r\n\t\trow._row.modules.select.checkboxEl = element;\r\n\t}\r\n\t\r\n\tregisterHeaderSelectCheckbox (element) {\r\n\t\tthis.headerCheckboxElement = element;\r\n\t}\r\n\t\r\n\tchildRowSelection(row, select){\r\n\t\tvar children = this.table.modules.dataTree.getChildren(row, true);\r\n\t\t\r\n\t\tif(select){\r\n\t\t\tfor(let child of children){\r\n\t\t\t\tthis._selectRow(child, true);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tfor(let child of children){\r\n\t\t\t\tthis._deselectRow(child, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nSelectRow.moduleName = \"selectRow\";\r\n\r\nexport default SelectRow;","//sort datetime\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar format = params.format || \"dd/MM/yyyy HH:mm:ss\",\r\n\talignEmptyValues = params.alignEmptyValues,\r\n\temptyAlign = 0;\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\ta = format === \"iso\" ? DT.fromISO(String(a)) : DT.fromFormat(String(a), format);\r\n\t\tb = format === \"iso\" ? DT.fromISO(String(b)) : DT.fromFormat(String(b), format);\r\n\r\n\t\tif(!a.isValid){\r\n\t\t\temptyAlign = !b.isValid ? 0 : -1;\r\n\t\t}else if(!b.isValid){\r\n\t\t\temptyAlign = 1;\r\n\t\t}else{\r\n\t\t\t//compare valid values\r\n\t\t\treturn a - b;\r\n\t\t}\r\n\r\n\t\t//fix empty values in position\r\n\t\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\t\temptyAlign *= -1;\r\n\t\t}\r\n\r\n\t\treturn emptyAlign;\r\n\r\n\t}else{\r\n\t\tconsole.error(\"Sort Error - 'datetime' sorter is dependant on luxon.js\");\r\n\t}\r\n};","import number from './sorters/number.js';\r\nimport string from './sorters/string.js';\r\nimport date from './sorters/date.js';\r\nimport time from './sorters/time.js';\r\nimport datetime from './sorters/datetime.js';\r\nimport boolean from './sorters/boolean.js';\r\nimport array from './sorters/array.js';\r\nimport exists from './sorters/exists.js';\r\nimport alphanum from './sorters/alphanum.js';\r\n\r\nexport default {\r\n\tnumber:number,\r\n\tstring:string,\r\n\tdate:date,\r\n\ttime:time,\r\n\tdatetime:datetime,\r\n\tboolean:boolean,\r\n\tarray:array,\r\n\texists:exists,\r\n\talphanum:alphanum\r\n};","//sort numbers\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar decimal = params.decimalSeparator;\r\n\tvar thousand = params.thousandSeparator;\r\n\tvar emptyAlign = 0;\r\n\r\n\ta = String(a);\r\n\tb = String(b);\r\n\r\n\tif(thousand){\r\n\t\ta = a.split(thousand).join(\"\");\r\n\t\tb = b.split(thousand).join(\"\");\r\n\t}\r\n\r\n\tif(decimal){\r\n\t\ta = a.split(decimal).join(\".\");\r\n\t\tb = b.split(decimal).join(\".\");\r\n\t}\r\n\r\n\ta = parseFloat(a);\r\n\tb = parseFloat(b);\r\n\r\n\t//handle non numeric values\r\n\tif(isNaN(a)){\r\n\t\temptyAlign = isNaN(b) ? 0 : -1;\r\n\t}else if(isNaN(b)){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\t\t//compare valid values\r\n\t\treturn a - b;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","//sort strings\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\tvar locale;\r\n\r\n\t//handle empty values\r\n\tif(!a){\r\n\t\temptyAlign = !b ? 0 : -1;\r\n\t}else if(!b){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\t\t//compare valid values\r\n\t\tswitch(typeof params.locale){\r\n\t\t\tcase \"boolean\":\r\n\t\t\tif(params.locale){\r\n\t\t\t\tlocale = this.langLocale();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"string\":\r\n\t\t\tlocale = params.locale;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn String(a).toLowerCase().localeCompare(String(b).toLowerCase(), locale);\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","import datetime from './datetime.js';\r\n\r\n//sort date\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tif(!params.format){\r\n\t\tparams.format = \"dd/MM/yyyy\";\r\n\t}\r\n\r\n\treturn datetime.call(this, a, b, aRow, bRow, column, dir, params);\r\n};","import datetime from './datetime.js';\r\n\r\n//sort times\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tif(!params.format){\r\n\t\tparams.format = \"HH:mm\";\r\n\t}\r\n\r\n\treturn datetime.call(this, a, b, aRow, bRow, column, dir, params);\r\n};","//sort booleans\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = a === true || a === \"true\" || a === \"True\" || a === 1 ? 1 : 0;\r\n\tvar el2 = b === true || b === \"true\" || b === \"True\" || b === 1 ? 1 : 0;\r\n\r\n\treturn el1 - el2;\r\n};","//sort if element contains any data\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = 0;\r\n\tvar el2 = 0;\r\n\tvar type = params.type || \"length\";\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\r\n\tfunction calc(value){\r\n\r\n\t\tswitch(type){\r\n\t\t\tcase \"length\":\r\n\t\t\treturn value.length;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"sum\":\r\n\t\t\treturn value.reduce(function(c, d){\r\n\t\t\t\treturn c + d;\r\n\t\t\t});\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"max\":\r\n\t\t\treturn Math.max.apply(null, value) ;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"min\":\r\n\t\t\treturn Math.min.apply(null, value) ;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"avg\":\r\n\t\t\treturn value.reduce(function(c, d){\r\n\t\t\t\treturn c + d;\r\n\t\t\t}) / value.length;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t//handle non array values\r\n\tif(!Array.isArray(a)){\r\n\t\talignEmptyValues = !Array.isArray(b) ? 0 : -1;\r\n\t}else if(!Array.isArray(b)){\r\n\t\talignEmptyValues = 1;\r\n\t}else{\r\n\r\n\t\t//compare valid values\r\n\t\tel1 = a ? calc(a) : 0;\r\n\t\tel2 = b ? calc(b) : 0;\r\n\r\n\t\treturn el1 - el2;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","//sort if element contains any data\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = typeof a == \"undefined\" ? 0 : 1;\r\n\tvar el2 = typeof b == \"undefined\" ? 0 : 1;\r\n\r\n\treturn el1 - el2;\r\n};","//sort alpha numeric strings\r\nexport default function(as, bs, aRow, bRow, column, dir, params){\r\n\tvar a, b, a1, b1, i= 0, L, rx = /(\\d+)|(\\D+)/g, rd = /\\d/;\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\r\n\t//handle empty values\r\n\tif(!as && as!== 0){\r\n\t\temptyAlign = !bs && bs!== 0 ? 0 : -1;\r\n\t}else if(!bs && bs!== 0){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\r\n\t\tif(isFinite(as) && isFinite(bs)) return as - bs;\r\n\t\ta = String(as).toLowerCase();\r\n\t\tb = String(bs).toLowerCase();\r\n\t\tif(a === b) return 0;\r\n\t\tif(!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1;\r\n\t\ta = a.match(rx);\r\n\t\tb = b.match(rx);\r\n\t\tL = a.length > b.length ? b.length : a.length;\r\n\t\twhile(i < L){\r\n\t\t\ta1= a[i];\r\n\t\t\tb1= b[i++];\r\n\t\t\tif(a1 !== b1){\r\n\t\t\t\tif(isFinite(a1) && isFinite(b1)){\r\n\t\t\t\t\tif(a1.charAt(0) === \"0\") a1 = \".\" + a1;\r\n\t\t\t\t\tif(b1.charAt(0) === \"0\") b1 = \".\" + b1;\r\n\t\t\t\t\treturn a1 - b1;\r\n\t\t\t\t}\r\n\t\t\t\telse return a1 > b1 ? 1 : -1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn a.length > b.length;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultSorters from './defaults/sorters.js';\r\n\r\nclass Sort extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t \tthis.sortList = []; //holder current sort\r\n\t \tthis.changed = false; //has the sort changed since last render\r\n\r\n\t \tthis.registerTableOption(\"sortMode\", \"local\"); //local or remote sorting\r\n\r\n\t \tthis.registerTableOption(\"initialSort\", false); //initial sorting criteria\r\n\t \tthis.registerTableOption(\"columnHeaderSortMulti\", true); //multiple or single column sorting\r\n\t \tthis.registerTableOption(\"sortOrderReverse\", false); //reverse internal sort ordering\r\n\t \tthis.registerTableOption(\"headerSortElement\", \"
\"); //header sort element\r\n\r\n\t \tthis.registerColumnOption(\"sorter\");\r\n\t \tthis.registerColumnOption(\"sorterParams\");\r\n\r\n\t \tthis.registerColumnOption(\"headerSort\", true);\r\n\t \tthis.registerColumnOption(\"headerSortStartingDir\");\r\n\t \tthis.registerColumnOption(\"headerSortTristate\");\r\n\r\n\t }\r\n\r\n\t initialize(){\r\n\t \tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t \tthis.subscribe(\"table-built\", this.tableBuilt.bind(this));\r\n\t \tthis.registerDataHandler(this.sort.bind(this), 20);\r\n\r\n\t \tthis.registerTableFunction(\"setSort\", this.userSetSort.bind(this));\r\n\t \tthis.registerTableFunction(\"getSorters\", this.getSort.bind(this));\r\n\t \tthis.registerTableFunction(\"clearSort\", this.clearSort.bind(this));\r\n\r\n\t \tif(this.table.options.sortMode === \"remote\"){\r\n\t \t\tthis.subscribe(\"data-params\", this.remoteSortParams.bind(this));\r\n\t \t}\r\n\t }\r\n\r\n\t tableBuilt(){\r\n\t \tif(this.table.options.initialSort){\r\n\t \t\tthis.setSort(this.table.options.initialSort);\r\n\t \t}\r\n\t }\r\n\r\n\t remoteSortParams(data, config, silent, params){\r\n\t \tvar sorters = this.getSort();\r\n\r\n\t \tsorters.forEach((item) => {\r\n\t \t\tdelete item.column;\r\n\t \t});\r\n\r\n\t \tparams.sort = sorters;\r\n\r\n\t \treturn params;\r\n\t }\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tuserSetSort(sortList, dir){\r\n\t\tthis.setSort(sortList, dir);\r\n\t\t// this.table.rowManager.sorterRefresh();\r\n\t\tthis.refreshSort();\r\n\t}\r\n\r\n\tclearSort(){\r\n\t\tthis.clear();\r\n\t\t// this.table.rowManager.sorterRefresh();\r\n\t\tthis.refreshSort();\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\t//initialize column header for sorting\r\n\tinitializeColumn(column){\r\n\t\tvar sorter = false,\r\n\t\tcolEl,\r\n\t\tarrowEl;\r\n\r\n\t\tswitch(typeof column.definition.sorter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Sort.sorters[column.definition.sorter]){\r\n\t\t\t\tsorter = Sort.sorters[column.definition.sorter];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Sort Error - No such sorter found: \", column.definition.sorter);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tsorter = column.definition.sorter;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tcolumn.modules.sort = {\r\n\t\t\tsorter:sorter, dir:\"none\",\r\n\t\t\tparams:column.definition.sorterParams || {},\r\n\t\t\tstartingDir:column.definition.headerSortStartingDir || \"asc\",\r\n\t\t\ttristate: column.definition.headerSortTristate,\r\n\t\t};\r\n\r\n\t\tif(column.definition.headerSort !== false){\r\n\r\n\t\t\tcolEl = column.getElement();\r\n\r\n\t\t\tcolEl.classList.add(\"tabulator-sortable\");\r\n\r\n\r\n\t\t\tarrowEl = document.createElement(\"div\");\r\n\t\t\tarrowEl.classList.add(\"tabulator-col-sorter\");\r\n\r\n\t\t\tif(typeof this.table.options.headerSortElement == \"object\"){\r\n\t\t\t\tarrowEl.appendChild(this.table.options.headerSortElement);\r\n\t\t\t}else{\r\n\t\t\t\tarrowEl.innerHTML = this.table.options.headerSortElement;\r\n\t\t\t}\r\n\r\n\t\t\t//create sorter arrow\r\n\t\t\tcolumn.titleHolderElement.appendChild(arrowEl);\r\n\r\n\t\t\tcolumn.modules.sort.element = arrowEl;\r\n\r\n\t\t\t//sort on click\r\n\t\t\tcolEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\tvar dir = \"\",\r\n\t\t\t\tsorters=[],\r\n\t\t\t\tmatch = false;\r\n\r\n\t\t\t\tif(column.modules.sort){\r\n\t\t\t\t\tif(column.modules.sort.tristate){\r\n\t\t\t\t\t\tif(column.modules.sort.dir == \"none\"){\r\n\t\t\t\t\t\t\tdir = column.modules.sort.startingDir;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(column.modules.sort.dir == column.modules.sort.startingDir){\r\n\t\t\t\t\t\t\t\tdir = column.modules.sort.dir == \"asc\" ? \"desc\" : \"asc\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tdir = \"none\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswitch(column.modules.sort.dir){\r\n\t\t\t\t\t\t\tcase \"asc\":\r\n\t\t\t\t\t\t\tdir = \"desc\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tcase \"desc\":\r\n\t\t\t\t\t\t\tdir = \"asc\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tdir = column.modules.sort.startingDir;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\tif (this.table.options.columnHeaderSortMulti && (e.shiftKey || e.ctrlKey)) {\r\n\t\t\t\t\t\tsorters = this.getSort();\r\n\r\n\t\t\t\t\t\tmatch = sorters.findIndex((sorter) => {\r\n\t\t\t\t\t\t\treturn sorter.field === column.getField();\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tif(match > -1){\r\n\t\t\t\t\t\t\tsorters[match].dir = dir;\r\n\r\n\t\t\t\t\t\t\tif(match != sorters.length -1){\r\n\t\t\t\t\t\t\t\tmatch = sorters.splice(match, 1)[0];\r\n\t\t\t\t\t\t\t\tif(dir != \"none\"){\r\n\t\t\t\t\t\t\t\t\tsorters.push(match);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(dir != \"none\"){\r\n\t\t\t\t\t\t\t\tsorters.push({column:column, dir:dir});\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t//add to existing sort\r\n\t\t\t\t\t\tthis.setSort(sorters);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(dir == \"none\"){\r\n\t\t\t\t\t\t\tthis.clear();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t//sort by column only\r\n\t\t\t\t\t\t\tthis.setSort(column, dir);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// this.table.rowManager.sorterRefresh(!this.sortList.length);\r\n\t\t\t\t\tthis.refreshSort();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\trefreshSort(){\r\n\t\tif(this.table.options.sortMode === \"remote\"){\r\n\t\t\tthis.reloadData();\r\n\t\t}else{\r\n\t\t\tthis.refreshData(true);\r\n\t\t}\r\n\r\n\t\t//TODO - Persist left position of row manager\r\n\t\t// left = this.scrollLeft;\r\n\t\t// this.scrollHorizontal(left);\r\n\t}\r\n\r\n\t//check if the sorters have changed since last use\r\n\thasChanged(){\r\n\t\tvar changed = this.changed;\r\n\t\tthis.changed = false;\r\n\t\treturn changed;\r\n\t}\r\n\r\n\t//return current sorters\r\n\tgetSort(){\r\n\t\tvar self = this,\r\n\t\tsorters = [];\r\n\r\n\t\tself.sortList.forEach(function(item){\r\n\t\t\tif(item.column){\r\n\t\t\t\tsorters.push({column:item.column.getComponent(), field:item.column.getField(), dir:item.dir});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn sorters;\r\n\t}\r\n\r\n\t//change sort list and trigger sort\r\n\tsetSort(sortList, dir){\r\n\t\tvar self = this,\r\n\t\tnewSortList = [];\r\n\r\n\t\tif(!Array.isArray(sortList)){\r\n\t\t\tsortList = [{column: sortList, dir:dir}];\r\n\t\t}\r\n\r\n\t\tsortList.forEach(function(item){\r\n\t\t\tvar column;\r\n\r\n\t\t\tcolumn = self.table.columnManager.findColumn(item.column);\r\n\r\n\t\t\tif(column){\r\n\t\t\t\titem.column = column;\r\n\t\t\t\tnewSortList.push(item);\r\n\t\t\t\tself.changed = true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Sort Warning - Sort field does not exist and is being ignored: \", item.column);\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\t\tself.sortList = newSortList;\r\n\r\n\t\tthis.dispatch(\"sort-changed\");\r\n\t}\r\n\r\n\t//clear sorters\r\n\tclear(){\r\n\t\tthis.setSort([]);\r\n\t}\r\n\r\n\t//find appropriate sorter for column\r\n\tfindSorter(column){\r\n\t\tvar row = this.table.rowManager.activeRows[0],\r\n\t\tsorter = \"string\",\r\n\t\tfield, value;\r\n\r\n\t\tif(row){\r\n\t\t\trow = row.getData();\r\n\t\t\tfield = column.getField();\r\n\r\n\t\t\tif(field){\r\n\r\n\t\t\t\tvalue = column.getFieldValue(row);\r\n\r\n\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){\r\n\t\t\t\t\t\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn Sort.sorters[sorter];\r\n\t}\r\n\r\n\t//work through sort list sorting data\r\n\tsort(data){\r\n\t\tvar self = this,\r\n\t\tsortList = this.table.options.sortOrderReverse ? self.sortList.slice().reverse() : self.sortList,\r\n\t\tsortListActual = [],\r\n\t\trowComponents = [],\r\n\t\tlastSort;\r\n\r\n\t\tif(this.subscribedExternal(\"dataSorting\")){\r\n\t\t\tthis.dispatchExternal(\"dataSorting\", self.getSort());\r\n\t\t}\r\n\r\n\t\tself.clearColumnHeaders();\r\n\r\n\t\tif(this.table.options.sortMode !== \"remote\"){\r\n\r\n\t\t\t//build list of valid sorters and trigger column specific callbacks before sort begins\r\n\t\t\tsortList.forEach(function(item, i){\r\n\t\t\t\tvar sortObj = item.column.modules.sort;\r\n\r\n\t\t\t\tif(item.column && sortObj){\r\n\r\n\t\t\t\t\t//if no sorter has been defined, take a guess\r\n\t\t\t\t\tif(!sortObj.sorter){\r\n\t\t\t\t\t\tsortObj.sorter = self.findSorter(item.column);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\titem.params = typeof sortObj.params === \"function\" ? sortObj.params(item.column.getComponent(), item.dir) : sortObj.params;\r\n\r\n\t\t\t\t\tsortListActual.push(item);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tself.setColumnHeader(item.column, item.dir);\r\n\t\t\t});\r\n\r\n\t\t\t//sort data\r\n\t\t\tif (sortListActual.length) {\r\n\t\t\t\tself._sortItems(data, sortListActual);\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tsortList.forEach(function(item, i){\r\n\t\t\t\tself.setColumnHeader(item.column, item.dir);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.subscribedExternal(\"dataSorted\")){\r\n\t\t\tdata.forEach((row) => {\r\n\t\t\t\trowComponents.push(row.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatchExternal(\"dataSorted\", self.getSort(), rowComponents);\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//clear sort arrows on columns\r\n\tclearColumnHeaders(){\r\n\t\tthis.table.columnManager.getRealColumns().forEach(function(column){\r\n\t\t\tif(column.modules.sort){\r\n\t\t\t\tcolumn.modules.sort.dir = \"none\";\r\n\t\t\t\tcolumn.getElement().setAttribute(\"aria-sort\", \"none\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//set the column header sort direction\r\n\tsetColumnHeader(column, dir){\r\n\t\tcolumn.modules.sort.dir = dir;\r\n\t\tcolumn.getElement().setAttribute(\"aria-sort\", dir);\r\n\t}\r\n\r\n\t//sort each item in sort list\r\n\t_sortItems(data, sortList){\r\n\t\tvar sorterCount = sortList.length - 1;\r\n\r\n\t\tdata.sort((a, b) => {\r\n\t\t\tvar result;\r\n\r\n\t\t\tfor(var i = sorterCount; i>= 0; i--){\r\n\t\t\t\tlet sortItem = sortList[i];\r\n\r\n\t\t\t\tresult = this._sortRow(a, b, sortItem.column, sortItem.dir, sortItem.params);\r\n\r\n\t\t\t\tif(result !== 0){\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn result;\r\n\t\t});\r\n\t}\r\n\r\n\t//process individual rows for a sort function on active data\r\n\t_sortRow(a, b, column, dir, params){\r\n\t\tvar el1Comp, el2Comp, colComp;\r\n\r\n\t\t//switch elements depending on search direction\r\n\t\tvar el1 = dir == \"asc\" ? a : b;\r\n\t\tvar el2 = dir == \"asc\" ? b : a;\r\n\r\n\t\ta = column.getFieldValue(el1.getData());\r\n\t\tb = column.getFieldValue(el2.getData());\r\n\r\n\t\ta = typeof a !== \"undefined\" ? a : \"\";\r\n\t\tb = typeof b !== \"undefined\" ? b : \"\";\r\n\r\n\t\tel1Comp = el1.getComponent();\r\n\t\tel2Comp = el2.getComponent();\r\n\r\n\t\treturn column.modules.sort.sorter.call(this, a, b, el1Comp, el2Comp, column.getComponent(), dir, params);\r\n\t}\r\n}\r\n\r\nSort.moduleName = \"sort\";\r\n\r\n//load defaults\r\nSort.sorters = defaultSorters;\r\n\r\nexport default Sort;","export default {\r\n\t//is integer\r\n\tinteger: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvalue = Number(value);\r\n\t\treturn typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\r\n\t},\r\n\r\n\t//is float\r\n\tfloat: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvalue = Number(value);\r\n\t\treturn typeof value === 'number' && isFinite(value) && value % 1 !== 0;\r\n\t},\r\n\r\n\t//must be a number\r\n\tnumeric: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn !isNaN(value);\r\n\t},\r\n\r\n\t//must be a string\r\n\tstring: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn isNaN(value);\r\n\t},\r\n\r\n\t//maximum value\r\n\tmax: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn parseFloat(value) <= parameters;\r\n\t},\r\n\r\n\t//minimum value\r\n\tmin: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn parseFloat(value) >= parameters;\r\n\t},\r\n\r\n\t//starts with value\r\n\tstarts: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).toLowerCase().startsWith(String(parameters).toLowerCase());\r\n\t},\r\n\r\n\t//ends with value\r\n\tends: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).toLowerCase().endsWith(String(parameters).toLowerCase());\r\n\t},\r\n\r\n\r\n\t//minimum string length\r\n\tminLength: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).length >= parameters;\r\n\t},\r\n\r\n\t//maximum string length\r\n\tmaxLength: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).length <= parameters;\r\n\t},\r\n\r\n\t//in provided value list\r\n\tin: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif(typeof parameters == \"string\"){\r\n\t\t\tparameters = parameters.split(\"|\");\r\n\t\t}\r\n\r\n\t\treturn value === \"\" || parameters.indexOf(value) > -1;\r\n\t},\r\n\r\n\t//must match provided regex\r\n\tregex: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar reg = new RegExp(parameters);\r\n\r\n\t\treturn reg.test(value);\r\n\t},\r\n\r\n\t//value must be unique in this column\r\n\tunique: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar unique = true;\r\n\r\n\t\tvar cellData = cell.getData();\r\n\t\tvar column = cell.getColumn()._getSelf();\r\n\r\n\t\tthis.table.rowManager.rows.forEach(function(row){\r\n\t\t\tvar data = row.getData();\r\n\r\n\t\t\tif(data !== cellData){\r\n\t\t\t\tif(value == column.getFieldValue(data)){\r\n\t\t\t\t\tunique = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn unique;\r\n\t},\r\n\r\n\t//must have a value\r\n\trequired:function(cell, value, parameters){\r\n\t\treturn value !== \"\" && value !== null && typeof value !== \"undefined\";\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultValidators from './defaults/validators.js';\r\n\r\nclass Validate extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.invalidCells = [];\r\n\r\n\t\tthis.registerTableOption(\"validationMode\", \"blocking\");\r\n\r\n\t\tthis.registerColumnOption(\"validator\");\r\n\r\n\t\tthis.registerTableFunction(\"getInvalidCells\", this.getInvalidCells.bind(this));\r\n\t\tthis.registerTableFunction(\"clearCellValidation\", this.userClearCellValidation.bind(this));\r\n\t\tthis.registerTableFunction(\"validate\", this.userValidate.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"isValid\", this.cellIsValid.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"clearValidation\", this.clearValidation.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"validate\", this.cellValidate.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"column\", \"validate\", this.columnValidate.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"validate\", this.rowValidate.bind(this));\r\n\t}\r\n\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-delete\", this.clearValidation.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumnCheck.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Cell Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tcellIsValid(cell){\r\n\t\treturn cell.modules.validate ? !cell.modules.validate.invalid : true;\r\n\t}\r\n\r\n\tcellValidate(cell){\r\n\t\treturn this.validate(cell.column.modules.validate, cell, cell.getValue());\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Column Functions ////////\r\n\t///////////////////////////////////\r\n\r\n\tcolumnValidate(column){\r\n\t\tvar invalid = [];\r\n\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tif(!this.cellValidate(cell)){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Row Functions //////////\r\n\t///////////////////////////////////\r\n\r\n\trowValidate(row){\r\n\t\tvar invalid = [];\r\n\r\n\t\trow.cells.forEach((cell) => {\r\n\t\t\tif(!this.cellValidate(cell)){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\r\n\tuserClearCellValidation(cells){\r\n\t\tif(!cells){\r\n\t\t\tcells = this.getInvalidCells();\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\r\n\t\tcells.forEach((cell) => {\r\n\t\t\tthis.clearValidation(cell._getSelf());\r\n\t\t});\r\n\t}\r\n\r\n\tuserValidate(cells){\r\n\t\tvar output = [];\r\n\r\n\t\t//clear row data\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\trow = row.getComponent();\r\n\r\n\t\t\tvar valid = row.validate();\r\n\r\n\t\t\tif(valid !== true){\r\n\t\t\t\toutput = output.concat(valid);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output.length ? output : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(typeof column.definition.validator !== \"undefined\"){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//validate\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = [],\r\n\t\tvalidator;\r\n\r\n\t\tif(column.definition.validator){\r\n\r\n\t\t\tif(Array.isArray(column.definition.validator)){\r\n\t\t\t\tcolumn.definition.validator.forEach((item) => {\r\n\t\t\t\t\tvalidator = self._extractValidator(item);\r\n\r\n\t\t\t\t\tif(validator){\r\n\t\t\t\t\t\tconfig.push(validator);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t}else{\r\n\t\t\t\tvalidator = this._extractValidator(column.definition.validator);\r\n\r\n\t\t\t\tif(validator){\r\n\t\t\t\t\tconfig.push(validator);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.modules.validate = config.length ? config : false;\r\n\t\t}\r\n\t}\r\n\r\n\t_extractValidator(value){\r\n\t\tvar type, params, pos;\r\n\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tpos = value.indexOf(':');\r\n\r\n\t\t\tif(pos > -1){\r\n\t\t\t\ttype = value.substring(0,pos);\r\n\t\t\t\tparams = value.substring(pos+1);\r\n\t\t\t}else{\r\n\t\t\t\ttype = value;\r\n\t\t\t}\r\n\r\n\t\t\treturn this._buildValidator(type, params);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\treturn this._buildValidator(value);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"object\":\r\n\t\t\treturn this._buildValidator(value.type, value.parameters);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t_buildValidator(type, params){\r\n\r\n\t\tvar func = typeof type == \"function\" ? type : Validate.validators[type];\r\n\r\n\t\tif(!func){\r\n\t\t\tconsole.warn(\"Validator Setup Error - No matching validator found:\", type);\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn {\r\n\t\t\t\ttype:typeof type == \"function\" ? \"function\" : type,\r\n\t\t\t\tfunc:func,\r\n\t\t\t\tparams:params,\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\tvalidate(validators, cell, value){\r\n\t\tvar self = this,\r\n\t\tvalid = [],\r\n\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\r\n\t\tif(validators){\r\n\t\t\tvalidators.forEach((item) => {\r\n\t\t\t\tif(!item.func.call(self, cell.getComponent(), value, item.params)){\r\n\t\t\t\t\tvalid.push({\r\n\t\t\t\t\t\ttype:item.type,\r\n\t\t\t\t\t\tparameters:item.params\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tvalid = valid.length ? valid : true;\r\n\r\n\t\tif(!cell.modules.validate){\r\n\t\t\tcell.modules.validate = {};\r\n\t\t}\r\n\r\n\t\tif(valid === true){\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\r\n\t\t\tif(invalidIndex > -1){\r\n\t\t\t\tthis.invalidCells.splice(invalidIndex, 1);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcell.modules.validate.invalid = true;\r\n\r\n\t\t\tif(this.table.options.validationMode !== \"manual\"){\r\n\t\t\t\tcell.getElement().classList.add(\"tabulator-validation-fail\");\r\n\t\t\t}\r\n\r\n\t\t\tif(invalidIndex == -1){\r\n\t\t\t\tthis.invalidCells.push(cell);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn valid;\r\n\t}\r\n\r\n\tgetInvalidCells(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.invalidCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tclearValidation(cell){\r\n\t\tvar invalidIndex;\r\n\r\n\t\tif(cell.modules.validate && cell.modules.validate.invalid){\r\n\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\r\n\t\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\r\n\t\t\tif(invalidIndex > -1){\r\n\t\t\t\tthis.invalidCells.splice(invalidIndex, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nValidate.moduleName = \"validate\";\r\n\r\n//load defaults\r\nValidate.validators = defaultValidators;\r\n\r\nexport default Validate;","//tabulator with all modules installed\r\nimport {default as Tabulator} from './Tabulator.js';\r\nimport * as modules from '../core/modules/optional.js';\r\nimport ModuleBinder from './tools/ModuleBinder.js';\r\n\r\nclass TabulatorFull extends Tabulator {};\r\n\r\n//bind modules and static functionality\r\nnew ModuleBinder(TabulatorFull, modules);\r\n\r\nexport default TabulatorFull;"],"names":["CoreFeature","table","data","silent","this","dataLoader","load","undefined","modules","localize","getText","arguments","bind","getLocale","comms","getConnections","send","layout","getMode","eventBus","subscribe","unsubscribe","key","subscribed","subscriptionChange","dispatch","chain","confirm","externalEvents","options","value","module","ColumnComponent","column","_column","type","Proxy","get","target","name","receiver","componentFunctionBinder","handle","getElement","getDefinition","getField","getTitleDownload","cells","forEach","cell","push","getComponent","visible","isGroup","columns","show","hide","output","length","parent","Column","columnManager","scrollToColumn","to","after","toColumn","findColumn","moveColumn","console","warn","nextCol","nextColumn","prevCol","prevColumn","updates","updateDefinition","getWidth","width","result","reinitializeWidth","setWidth","renderer","rerenderColumns","CellComponent","_cell","getValue","getOldValue","initialValue","row","getData","mutate","setValue","setValueActual","checkHeight","Cell","element","oldValue","height","minWidth","component","loaded","build","generateElement","_configureCell","getFieldValue","document","createElement","className","setAttribute","field","style","textAlign","hozAlign","vertAlign","display","alignItems","top","bottom","middle","justifyContent","left","right","center","definition","cssClass","split","classList","add","tooltipGenerationMode","addEventListener","e","_this2","_generateTooltip","val","_this3","innerHTML","Node","firstChild","removeChild","appendChild","tooltip","containerOnly","layoutElement","setValueProcessData","cellRendered","cellEdited","call","dispatchExternal","subscribedExternal","rowManager","changed","setFieldValue","_generateContents","widthStyled","offsetWidth","minWidthStyled","maxWidth","maxWidthStyled","reinitializeHeight","heightStyled","offsetHeight","redrawBlock","parentNode","deleteCell","calcs","getCellIndex","def","_this","contentElement","titleHolderElement","titleElement","groupElement","createGroupElement","fieldStructure","titleDownload","titleFormatterRendered","mapDefinitions","setField","maxInitialWidth","widthFixed","i","newCol","attachColumn","checkColumnVisibility","registerColumnField","_initialize","bindModuleColumns","el","defaults","columnDefaults","optionsList","generate","defaultOptionList","Object","keys","indexOf","title","nestedFieldSeparator","_getNestedData","_getFlatData","_setNestedData","_setFlatData","registerColumnPosition","reRegisterPosition","headerTooltip","langBind","headerVertical","_bindEvents","_buildColumnHeaderContent","_buildGroupHeader","_buildColumnHeader","setTooltip","_this4","dblTap","tapHold","tap","headerClick","_this5","headerDblClick","headerContext","headerTap","passive","headerDblTap","clearTimeout","setTimeout","headerTapHold","_this6","setMinWidth","parseInt","setMaxWidth","headerHozAlign","_buildColumnHeaderTitle","editableTitle","stopPropagation","focus","_this7","text","_formatColumnHeaderTitle","contents","_this8","dataObj","structure","alignment","parentHeight","getGroupElement","clientHeight","getHeadersElement","minHeight","paddingTop","verticalAlign","clearVerticalAlign","formatter","rowNumColumn","getFirstColumn","getLastColumn","getTopColumn","updateBranches","colDefs","responsiveToggle","verticalAlignHeaders","matchChildWidths","childWidth","child","index","splice","setWidthActual","isNaN","Math","floor","clientWidth","max","min","rows","heightInitialized","offsetParent","clearCellHeight","calcHeight","setCellHeight","ceil","getBoundingClientRect","Promise","resolve","reject","_this9","cellCount","deregisterColumn","findColumnIndex","_nextVisibleColumn","getColumnByIndex","_prevVisibleColumn","force","fitToData","clearWidth","setTo","error","assign","addColumn","then","_this10","defaultOptions","Helpers","box","window","pageYOffset","documentElement","clientTop","pageXOffset","clientLeft","obj","clone","list","objectProto","__proto__","arrayProto","Array","isArray","subject","match","copy","_typeof","findIndex","item","unshift","deepClone","OptionsList","msgType","registeredDefaults","option","userOptions","debugInvalidOptions","hasOwnProperty","Renderer","elementVertical","elementHorizontal","tableElement","verticalFillMode","callback","update","blockRedraw","dir","includingBuffer","getDisplayRows","rowEl","remove","clearRows","clearColumns","renderRows","renderColumns","rerenderRows","position","ifVisible","rowIndex","offset","scrollToRowIfVisible","elVisible","elOffset","scrollToRowPosition","scrollToRowNearestTop","scrollToRow","scrollHeight","scrollTop","offsetTop","BaiscHorizontal","VirtualDomHorizontal","leftCol","rightCol","scrollLeft","vDomScrollPosLeft","vDomScrollPosRight","vDomPadLeft","vDomPadRight","fitDataColAvg","windowBuffer","visibleRows","initialized","isFitData","compatibilityCheck","layoutCheck","vertScrollListen","ok","find","col","frozen","startsWith","clearVisRowCache","dataChange","scroll","buffer","columnsByIndex","old","cols","colPos","clear","calcWindowBuffer","config","leftPos","rightPos","fitDataCheck","vdomHoz","paddingLeft","paddingRight","reinitChanged","reinitializeRows","initializeRow","reinitializeRow","change","colEnd","generateCells","layoutRefresh","getVisibleRows","diff","abs","addColRight","removeColLeft","addColLeft","removeColRight","start","end","changes","getCell","fitDataColActualWidthCheck","prepend","ex","message","newWidth","widthDiff","colPositionAdjust","ColumnManager","blockHozScrollEvent","headersElement","columnsByField","defaultColumnOptions","initializeRenderer","createHeadersElement","createHeaderElement","insertBefore","scrollHorizontal","renderClass","renderers","RendererVirtualDomHorizontal","RendererBasicHorizontal","renderHorizontal","initialize","headerVisible","hozAdjust","scrollWidth","marginLeft","scrollColumns","sorter","definitions","autoColumnsDefinitions","setColumns","_addColumn","_reIndexColumns","redraw","before","nextToColumn","colEl","topColumn","parentIndex","nextEl","nextSibling","columnRendered","getHeight","columnHeaderVertAlign","adjustTableSize","_getSelf","HTMLElement","root","matches","active","structured","from","moveColumnActual","reinitialize","_moveColumnInArray","getComponents","updateRows","toIndex","fromIndex","concat","adjust","scrollToColumnPosition","scrollToColumnIfVisible","offsetLeft","generateCell","totalWidth","fixedWidth","colWidth","layoutMode","resetScroll","footerManager","RowComponent","_row","transform","getCells","getRowPosition","moveToRow","updateData","normalizeHeight","nextRow","prevRow","Row","manualHeight","outerHeight","created","setData","create","deleteCells","renderRowCells","rowFormatter","rerenderRowCells","children","maxHeight","resizableRows","setHeight","clearHeight","updatedData","newRowData","tempData","attrname","JSON","parse","getColumnsByFieldRoot","findCell","nextDisplayRow","prevDisplayRow","toRow","findRow","moveRowActual","refreshActiveData","deleteActual","getRowIndex","detatchModules","deleteRow","group","BaiscVertical","visibility","onlyGroupHeaders","styleRow","rowTop","VirtualDomVertical","vDomRowHeight","vDomTop","vDomBottom","vDomScrollPosTop","vDomScrollPosBottom","vDomTopPad","vDomBottomPad","vDomMaxRenderChain","vDomWindowBuffer","vDomWindowMinTotalRows","vDomWindowMinMarginRows","vDomTopNewRows","vDomBottomNewRows","paddingBottom","_virtualRenderFill","topRow","topOffset","deinitializeHeight","topDiff","bottomDiff","margin","_addTopRow","vDomScrollHeight","_removeBottomRow","_addBottomRow","_removeTopRow","renderVerticalBuffer","topEdge","bottomEdge","topFound","bottomRow","slice","forceMove","holder","topPad","rowsHeight","heightOccupied","topPadHeight","rowsCount","containerHeight","rowHeight","fillableSpace","addedRows","paddingAdjust","_quickNormalizeRowHeight","removableRows","RowManager","createHolderElement","createTableElement","heightFixer","placeholder","placeholderContents","firstRender","renderMode","fixedHeight","activeRowsPipeline","activeRows","activeRowsCount","displayRows","displayRowsCount","redrawBlockRestoreConfig","redrawBlockRenderInPosition","dataPipeline","displayPipeline","initializePlaceholder","leftDir","topDir","_positionPlaceholder","scrollRows","renderInPosition","columnsChanged","pagination","_setDataActual","reRenderInPosition","autoColumns","generateColumnsFromRowData","_wipeElements","wipe","allIndex","activeIndex","setActiveRows","displayRowIterator","displayIndex","regenerateRowNumbers","_showPlaceholder","pos","addRowActual","findAddRowPos","reverse","addRow","_clearPlaceholder","addRowPos","chainResult","moveRowInArray","findRowIndex","rowOnly","getDisplayRowIndex","getRows","handler","priority","sort","a","b","skipStage","stage","cascadeOrder","refreshPipelines","renderTable","layoutColumnsOnNewData","resetDisplayRows","setDisplayRows","viewable","RendererVirtualDomVertical","RendererBasicVertical","renderVertical","_clearTable","renderEmptyScroll","initialHeight","otherHeight","external","resize","tableWidth","browser","event","createEvent","initEvent","dispatchEvent","Event","FooterManager","containerElement","createContainerElement","links","initializeElement","footerElement","querySelector","activate","deactivate","link","footerRedraw","InteractionManager","abortClasses","previousTargets","listeners","componentMap","pseudoTrackers","subscriber","pseudoTracking","buildListenerMap","bindSubscriptionWatchers","listenerMap","listener","components","pseudoMouseEnter","pseudoMouseLeave","leaveList","linkedKeys","filter","includes","values","comp","subscriptionChanged","clearWatchers","added","bindPseudoEvents","updateEventListeners","track","removeEventListener","path","composedPath","targets","findTargets","bindComponents","triggerEvents","targetMatches","previousTarget","closest","ComponentFunctionBinder","bindings","funcName","hanlder","DataLoader","loaderElement","createLoaderElement","msgElement","createMsgElement","loadingElement","errorElement","requestOrder","loading","template","dataLoaderLoading","trim","firstElementChild","dataLoaderError","params","replace","requestNo","showLoader","mapParams","dataSendParams","response","objectInvert","dataReceiveParams","rowData","hideLoader","showError","dataLoaderErrorTimeout","map","langText","ExternalEventBus","debug","events","subscriptionNotifiers","_debugDispatch","_dispatch","_notifiySubscriptionChange","notifiers","args","shift","callResult","apply","log","InternalEventBus","_debugChain","_chain","_debugConfirm","_confirm","fallback","confirmed","TableRegistry","tables","query","results","querySelectorAll","matchElement","Tabulator","lookupTable","Module","_handler","register","func","registerDataPipelineHandler","registerDisplayPipelineHandler","responsiveLayout","modExists","fitData","reinitializeColumnWidths","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","registerTableOption","registerColumnOption","modes","moduleName","defaultModes","Localize","locale","lang","langList","langs","headerFilterPlaceholder","setHeaderFilterPlaceholder","installLang","setLocale","registerTableFunction","getLang","headerFilters","_setLangProp","desiredLocale","navigator","language","toLowerCase","prefix","traverseLang","trans","prop","_executeBindings","pathArray","_getLangElement","level","rootPath","binding","Comms","receive","selectors","connections","con","action","connection","tableComms","commsReceived","ModuleBinder","tabulator","bindStaticFuctionality","bindModules","coreModules","moduleBindings","extendModule","property","source","registerModule","mod","registerModuleBinding","findTable","prototype","orderedMods","unOrderedMods","moduleCore","modulesCore","moduleInitOrder","modulesRegular","core","mods","interactionMonitor","browserSlow","browserMobile","rtl","originalElement","initializeCoreSystems","_create","_clearObjectPointers","_mapDeprecatedFunctionality","debugEventsExternal","debugEventsInternal","InteractionMonitor","getSelection","empty","removeAllRanges","selection","_rtlCheck","_buildElement","_initializeTable","_loadInitialData","getComputedStyle","textDirection","direction","reactiveData","newElement","tagName","attributes","replaceChild","_detectBrowser","deregister","ua","userAgent","vendor","opera","test","restoreRedraw","blockActiveLoad","clearData","getDataCount","responses","addRows","newRows","getRowFromPosition","foundRows","fromRow","getDefinitionTree","fromColumn","plugin","required","rowFormatterPrint","rowFormatterClipboard","rowFormatterHtmlOutput","Accessor","allowedTypes","initializeColumn","transformRow","accessor","charAt","toUpperCase","lookupAccessor","accessors","rowComponent","traverse","colCompnent","generateParamsList","serializeParams","encoded","encodeURIComponent","join","headers","body","url","stringify","form","FormData","append","Ajax","urlGenerator","loaderPromise","contentTypeFormatters","ajaxRequestFunc","defaultLoaderPromise","ajaxURLGenerator","defaultURLGenerator","ajaxURL","setUrl","setDefaultConfig","ajaxConfig","getUrl","requestDataCheck","requestParams","requestData","ajaxParams","previousData","generateConfig","sendRequest","defaultConfig","method","ajaxRequesting","ajaxResponse","contentType","ajaxContentType","Accept","location","origin","credentials","fetch","json","status","statusText","defaultContentTypeFormatters","Clipboard","pasteParser","pasteAction","customSelection","rowRange","blocked","clipboard","clipboardCopyRowRange","plain","html","preventDefault","clipboardCopyFormatter","generateExportList","clipboardCopyConfig","clipboardCopyStyled","genereateHTMLTable","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","updateOrAddData","insert","addData","headerFindSuccess","columnMap","CalcComponent","calcParams","precision","reduce","sum","Number","toFixed","parseFloat","String","ColumnCalcs","topCalcs","botCalcs","genColumn","topElement","botElement","botRow","topInitialized","botInitialized","cellValueChanged","initializeColumnCheck","rowsUpdated","recalcActiveRows","recalcActiveRowsRefresh","tableRedraw","getResults","userRecalc","recalc","groupBy","recalcRowGroup","dataTreeStartExpanded","dataTree","recalcAll","topCalc","bottomCalc","columnCalcs","topCalcParams","botCalcParams","bottomCalcParams","calculations","initializeTopRow","botCalc","initializeBottomRow","rowsToData","generateRow","frozenColumns","recalcGroup","groupRows","getRowGroup","getChildGroups","generateRowData","dataTreeChildColumnCalcs","open","getFilteredTreeChildren","disable","enable","format","getFormatter","paramKey","getGroups","getGroupResults","groupObj","subGroups","getSubGroups","subGroupResults","subgroup","groups","defaultCalculations","DataTree","indent","collapseEl","expandEl","branchEl","elementField","startOpen","registerComponentFunction","collapseRow","expandRow","toggleRow","getTreeParent","getRowChildren","addTreeChildRow","isRowExpanded","dummyEl","dataTreeChildField","dataTreeChildIndent","dataTreeBranchElement","dataTreeCollapseElement","tabIndex","dataTreeExpandElement","layoutRow","rowDelete","rowDataChanged","columnMoving","initializeElementField","registerDisplayHandler","firstCol","getFirstVisibleColumn","dataTreeElementColumn","getTreeChildren","redrawNeeded","refreshData","childArray","controlEl","generateControlElement","cloneNode","marginRight","getPropertyValue","oldControl","getChildren","allChildren","generateChildren","dataTreeFilter","dataTreeSort","sub","childData","childRow","childIndex","findChildIndex","recurse","csv","setFileContents","delimiter","fileContents","depth","bom","jsonLines","pdf","header","autoTableParams","rowGroupStyles","fontStyle","fontSize","cellPadding","fillColor","rowCalcStyles","jsPDFParams","jsPDF","parseRow","styles","content","colSpan","rowSpan","orientation","unit","doc","jspdf","autoTable","didDrawPage","head","documentProcessing","xlsx","sheetName","workbook","XLSX","utils","book_new","tableFeatures","generateSheet","merges","worksheet","s","c","r","j","Date","sheet_add_aoa","encode_range","SheetNames","Sheets","sheetOnly","sheets","sheet","commsSend","intercept","buf","ArrayBuffer","view","Uint8Array","charCodeAt","s2ab","write","bookType","bookSST","Download","blob","download","downloadToTab","filename","interceptCallback","downloadFunc","downloaders","mime","triggerDownload","downloadConfig","downloadRowRange","groupHeader","groupHeaderDownload","_group","getRowCount","newTab","Blob","downloadReady","URL","createObjectURL","msSaveOrOpenBlob","click","maskInput","mask","maskLetter","maskLetterChar","maskNumber","maskNumberChar","maskWildcard","maskWildcardChar","fillSymbols","symbol","char","keyCode","maskAutoFill","defaultDownloaders","input","onRendered","success","cancel","editorParams","cellValue","search","padding","boxSizing","elementAttributes","getAttribute","onChange","preventScroll","textarea","vertNav","verticalNavigation","whiteSpace","getRow","heightNow","selectionStart","stopImmediatePropagation","number","step","blurFunc","self","cellEl","initialDisplayValue","defaultValue","listEl","multiselect","dataItems","currentItem","displayItems","currentItems","blurable","blockListShow","searchWord","searchWordTimeout","getUniqueColumnValues","getColumnByField","getColumn","parseItems","inputValues","curentValues","dataList","displayList","processComplexListItem","label","itemParams","setItem","sortValuesList","listItemFormatter","toggleItem","chooseItem","fillList","setCurrentItem","scrollIntoView","behavior","block","inline","fillInput","unsetItem","hideList","chooseItems","cancelItem","cursor","readOnly","len","unsetItems","character","fromCharCode","scrollTovalue","showList","autocomplete","uniqueColumnValues","genUniqueColumnValues","filterList","term","intialLoad","items","searchFunc","addNotice","searchingPlaceholder","fillListIfNotEmpty","err","showListOnEmpty","notice","searchEl","clearList","itemList","current","emptyPlaceholder","freetext","allowEmpty","showInputValue","star","maxStars","getElementsByTagName","size","stars","starsHolder","createElementNS","starChange","buildStar","starHolder","nextStar","blur","changeValue","overflow","textOverflow","progress","mouseDrag","mouseDragWidth","percent","bar","updateValue","calcVal","round","backgroundColor","screenX","tickCross","tristate","indetermValue","indeterminateValue","indetermState","marginTop","checked","indeterminate","Edit","mouseClick","recursionBlock","invalidEdit","editedCells","editors","getEditedCells","clearCellEdited","navigatePrev","navigateNext","navigateLeft","navigateRight","navigateUp","navigateDown","cellisEdited","clearEdited","editCell","cellCancelEdit","bindEditor","columnDeleteCheck","rowDeleteCheck","cancelEdit","keybindingNavigateNext","newRow","edited","nextCell","findNextEditableCell","getIndex","findPrevEditableCell","allowEdit","check","prevCell","editor","editable","validate","cellValidate","clearEditor","variableHeight","cellEditCancelled","contains","button","forceEdit","focusCellNoEvent","getRenderMode","leftEdge","rightEdge","leftMargin","rightMargin","cellEditor","rendered","focusScrollAdjust","cellClick","cellEditing","validationMode","editIndex","invalid","defaultEditors","ExportRow","ExportColumn","Export","cloneTableStyle","colVisProp","getHtml","columnHeaders","headersToExportRows","generateColumnGroupHeaders","bodyToExportRows","rowLookup","genereateTableElement","selectRow","selectedRows","columnGroups","colData","processColumnGroup","maxDepth","groupData","subGroup","subGroupData","columnVisCheck","headerDepth","exportRows","parseColumnGroup","rowGroups","exportCols","headerEl","bodyEl","lookupTableStyles","setup","treeElementField","mapElementStyles","genereateHeaderElement","genereateGroupElement","genereateCalcElement","genereateRowElement","evenRow","oddRow","calcRow","firstRow","firstGroup","getElementsByClassName","styleCells","firstCell","lastCell","classNames","generator","isVisible","cellWrapper","formatCells","formatExportValue","align","renderedCallback","htmlOutputConfig","props","lookup","fromStyle","filterVal","rowVal","filterParams","RegExp","keywords","separator","keyword","matchAll","endsWith","Filter","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","registerDataHandler","initialFilter","setFilter","initialHeaderFilter","refreshFilter","addFilter","removeFilter","all","clearFilter","clearHeaderFilter","headerFilter","setHeaderFilterColumnPlaceholder","filterFunc","filterType","tagType","attrType","filterChangeCheck","prevSuccess","emptyFunc","headerFilterFunc","filters","headerFilterFuncParams","fieldVal","colVal","trackChanges","generateHeaderFilterElement","filterElement","editorElement","typingTimer","searchTrigger","headerElement","headerFilterEmptyCheck","headerFilterParams","headerFilterLiveFilterDelay","hasAttribute","headerFilterLiveFilter","reloadData","findFilter","findSubFilters","ajax","filtersToArray","searchType","filterRecurse","rowList","activeRowComponents","filterRow","_this11","subFilter","_this12","defaultFilters","plaintext","formatterParams","emptyToSpace","sanitizeHTML","money","integer","decimal","rgx","floatVal","sign","decimalSym","thousandSym","thousand","negativeSign","symbolAfter","urlPrefix","labelField","urlField","image","src","urlSuffix","truthy","allowTruthy","tick","tickElement","cross","crossElement","datetime","DT","DateTime","luxon","inputFormat","outputFormat","invalidPlaceholder","newDatetime","fromISO","fromFormat","isValid","timezone","shiftTimezone","toFormat","datetimediff","suffix","humanize","date","now","traffic","percentValue","colors","color","legend","legendColor","legendAlign","barEl","barContainer","legendEl","holderEl","buttonTick","buttonCross","rownum","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","leftColumns","rightColumns","rightPadding","initializationMode","scrollEndTimer","layoutCell","blockLayout","unblockLayout","edge","frozenCheck","calcMargins","layoutColumnPosition","layoutCalcRows","_calcSpace","layoutGroupCalcs","groupList","allCells","leftParents","parentEl","getColGroupParentElement","getTableElement","FrozenRows","freezeRow","unfreezeRow","isRowFrozen","detachRow","styleRows","GroupComponent","groupManager","toggleVisibility","Group","oldGroup","hasSubGroups","groupIDLookups","_addRowToGroup","_addRow","elementContents","arrowElement","createElements","addBindings","createValueGroups","arrow","movableRows","moveRow","initializeGroupHeader","allowedValues","_createGroup","groupToggleElement","groupID","groupKey","headerGenerator","conformRowData","generateGroupHeaderContents","updateGroupRows","scrollHeader","groupValues","removeGroup","noCalc","_visSet","getHeadersAndRows","hasTopCalcs","detachElement","generateTopRow","hasBottomCalcs","generateBottomRow","groupClosedShowCalcs","count","getDisplayIndex","checkClassicModeGroupHeaderWidth","prev","compoment","getPath","childNodes","GroupRows","displayHandler","setGroupBy","setGroupValues","setGroupStartOpen","setGroupHeader","userGetGroups","userGetGroupedData","rowGetGroup","groupUpdateOnCellEdit","cellUpdated","reassignRowToGroup","configureGroupSetup","rowDeleting","scrollHeaders","rowMoving","rowAddingIndex","rowSample","virtualRenderFill","groupStartOpen","langValue","removeCalcs","getRealColumns","lookupFunc","prevValue","assignRowToGroup","getGroupedData","toGroup","fromGroup","removeRow","insertRow","generateGroups","groupComponents","groupListData","pullGroupListData","rowCount","headerContent","oldGroups","createGroup","assignRowToExistingGroup","newGroupNeeded","oldRowGroup","oldGroupPath","newGroupPath","getExpectedPath","every","groupPath","groupId","History","history","clearComponentHistory","rowDeleted","rowAdded","rowMoved","undo","redo","getHistoryUndoSize","getHistoryRedoSize","posFrom","posTo","getGroup","newValue","undoers","redoers","oldRow","cellEdit","rowAdd","_rebindRow","rowMove","HtmlTableImport","fieldIndex","hasIndex","tableElementCheck","parseTable","_extractOptions","_extractHeaders","_generateBlankHeaders","optionsArr","attrib","_attribValue","exists","_findCol","textContent","inQuote","nextChar","Import","importFromFile","importFormat","loadDataCheck","loadData","importData","lookupImporter","structureData","importer","importers","extension","pickFile","extensions","accept","file","files","reader","FileReader","importReader","readAsArrayBuffer","readAsBinaryString","readAsDataURL","readAsText","onload","onerror","parsedData","structureArrayToObject","structureArrayToColumns","getColumns","defaultImporters","Interaction","eventMap","rowClick","rowDblClick","rowContext","rowMouseEnter","rowMouseLeave","rowMouseOver","rowMouseOut","rowMouseMove","rowTap","rowDblTap","rowTapHold","cellDblClick","cellContext","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellTap","cellDblTap","cellTapHold","headerMouseEnter","headerMouseLeave","headerMouseOver","headerMouseOut","headerMouseMove","groupClick","groupDblClick","groupContext","groupMouseEnter","groupMouseLeave","groupMouseOver","groupMouseOut","groupMouseMove","groupTap","groupDblTap","groupTapHold","subscribers","touchSubscribers","columnSubscribers","touchWatchers","tapDbl","initializeExternalEvents","cellContentsSelectionFixer","selectNode","subscriptionChangeExternal","subscribeTouchEvents","unsubscribeTouchEvents","handleTouch","notouch","watchers","componentObj","Keybindings","watchKeys","pressedKeys","keyupBinding","keydownBinding","keybindings","mergedBindings","mapBindings","bindEvents","clearBindings","actions","mapBinding","symbolsList","ctrl","meta","code","checkBinding","ctrlKey","shiftKey","metaKey","navPrev","navNext","navUp","navDown","scrollPageUp","scrollPageDown","scrollToStart","scrollToEnd","copyToClipboard","keyBlock","newPos","scrollMax","navLeft","navRight","Menu","menuContainer","menuElements","blurEvent","hideMenu","escEvent","escMenu","nestedMenuBlock","positionReversedX","currentComponent","lookupMenuContainer","initializeRowWatchers","initializeGroupWatchers","checkMenuContainerIsParent","container","rowContextMenu","loadMenuEvent","on","rowClickMenu","groupContextMenu","groupClickMenu","headerContextMenu","loadMenuTableColumnEvent","headerClickMenu","headerMenu","initializeColumnHeaderMenu","contextMenu","loadMenuTableCellEvent","clickMenu","headerMenuEl","menu","loadMenu","touch","MouseEvent","menuEl","itemEl","disabled","hideOldSubMenus","positionMenu","pop","x","y","parentOffset","touches","pageX","pageY","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","moveToCol","_bindMouseMove","movingCells","_unbindMouseMove","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","connectionTables","commsConnections","dropEvent","elementRowDrop","tabulatorElementDropEvent","sender","movableRowsSender","senders","movableRowsReceiver","receivers","connect","disconnect","dropComplete","fromTable","toTable","Mutator","enabled","transformCell","lookupMutator","mutators","mutatorEdit","pageSize","currentRow","currentPage","totalRows","totalPages","showingEl","valueEl","ofEl","totalEl","rowsEl","pages","Page","progressiveLoad","pageCounterElement","pageCounter","page","remoteRowCountEstimate","initialLoad","dataChanging","pageSizes","setMaxPage","setPage","userSetPageToRow","userSetPageSize","getPageSize","previousPage","nextPage","getPage","getPageMax","setPageToRow","initialLoadComplete","calculatePageSizes","paginationAddRow","rowAddingPosition","paginationMode","remotePageParams","_parseRemoteData","restOnRenderBefore","initializePageCounter","initializePaginator","initializeProgressive","scrollVertical","dispRows","testElRow","testElCell","paginationSize","generatePageSizeSelectList","setPageSize","progressiveLoadScrollMargin","pagesElement","firstBut","prevBut","nextBut","lastBut","paginationSizeSelector","pageSizeSelect","counter","paginationCounter","pageCounters","hidden","pageSelectLabel","paginationCounterHolder","paginationElement","paginationCounterElement","paginationInitialPage","paginationButtonCount","trigger","leftSize","rightSize","_generatePageButton","actualStartRow","actualRowPageSize","actualRows","setMaxRows","_setPageButtons","_setPageCounter","last_page","last_row","progressiveLoadDelay","footer","defaultPageCounters","local","id","localStorage","getItem","cookie","cookiePos","expireDate","setDate","getDate","toUTCString","Persistence","defWatcherBlock","readFunc","writeFunc","testKey","removeItem","persistence","retreivedData","persistenceMode","persistenceID","localStorageTest","persistenceReaderFunc","readers","persistenceWriterFunc","writers","retreiveData","save","eventSave","getColumnLayout","setColumnLayout","sorters","initialSort","parseColumns","mergeDefinition","getOwnPropertyDescriptor","defineProperty","set","oldCols","newCols","_findColumn","validateSorters","getSort","getGroupConfig","getPageConfig","excludedKeys","defStore","colDef","defaultReaders","defaultWriters","Print","manualBlock","printAsHtml","replaceTable","cleanup","printFullscreen","genereateTable","printConfig","printStyled","printRowRange","footerContent","scrollX","scrollY","footerEl","tableEl","printHeader","printFooter","printFormatter","scrollTo","ReactiveData","origFuncs","currentVersion","unblock","watchRow","watchData","unwatchData","version","enumerable","configurable","arg","getRowFromDataObject","startRow","oldRows","writable","watchKey","watchTreeChildren","childField","rebuildTree","ResizeColumns","startColumn","startWidth","prevHandle","layoutCellHandles","layoutColumnHeader","resizable","handleDown","nearestColumn","_checkResizability","_mouseDown","oldWidth","prevHandleDown","colIndex","mouseMove","checkCellHeights","mouseUp","ResizeRows","startHeight","screenY","ResizeTable","observer","containerObserver","tableHeight","containerWidth","autoResize","tableStyle","ResizeObserver","entry","nodeHeight","contentRect","nodeWidth","observe","tableResized","unobserve","ResponsiveLayout","hiddenColumns","collapseFormatter","collapseStartOpen","collapseHandleColumn","updateColumnVisibility","initializeResponsivity","responsiveLayoutCollapseFormatter","formatCollapsedData","responsiveLayoutCollapseStartOpen","order","generateCollapsedContent","generateCollapsedRowContent","colCount","working","getFlexBaseWidth","hideColumn","showColumn","generateCollapsedRowData","mockCellComponent","responsiveLayoutCollapseUseFormatters","node_content","titleData","valueData","titleHighlight","SelectRow","selecting","lastClickedRow","selectPrev","headerCheckboxElement","selectRows","deselectRows","getSelectedRows","getSelectedData","isRowSelected","selectable","clearSelectionData","rowRetrieve","selectablePersistence","_deselectRow","_rowSelectionChanged","endSelect","selected","selectableCheck","getCurrentCell","_clearSelection","lastClickedRowIdx","rowIdx","fromRowIdx","toRowIdx","toggledRows","toggledRow","_selectRow","rowMatch","rowInfo","selectableRollingSelection","checkboxEl","dataTreeSelectPropagate","childRowSelection","selectedRow","aRow","bRow","alignEmptyValues","emptyAlign","decimalSeparator","thousandSeparator","string","langLocale","localeCompare","time","array","calc","d","alphanum","as","bs","a1","b1","L","rx","rd","isFinite","Sort","sortList","userSetSort","clearSort","sortMode","remoteSortParams","setSort","refreshSort","arrowEl","sorterParams","startingDir","headerSortStartingDir","headerSortTristate","headerSort","headerSortElement","columnHeaderSortMulti","newSortList","sortOrderReverse","sortListActual","rowComponents","clearColumnHeaders","sortObj","findSorter","setColumnHeader","_sortItems","sorterCount","sortItem","_sortRow","el1Comp","el2Comp","el1","el2","defaultSorters","parameters","numeric","starts","ends","minLength","maxLength","regex","unique","cellData","Validate","invalidCells","getInvalidCells","userClearCellValidation","userValidate","cellIsValid","clearValidation","columnValidate","rowValidate","validator","_extractValidator","substring","_buildValidator","validators","invalidIndex","defaultValidators","TabulatorFull"],"mappings":";upGAAqBA,wBAERC,kBACNA,MAAQA,+CAOHC,EAAMC,UACTC,KAAKH,MAAMI,WAAWC,KAAKJ,OAAMK,OAAWA,OAAWA,EAAWJ,0DAQ7DF,MAAMO,QAAQC,UAASC,gBAAWC,kEAIlCV,MAAMO,QAAQC,UAASG,aAAQD,oEAI/BV,MAAMO,QAAQC,UAASI,kBAAaF,0EASpCV,MAAMO,QAAQM,OAAMC,uBAAkBJ,mEAItCV,MAAMO,QAAQM,OAAME,aAAQL,uDAQjCP,KAAKH,MAAMO,QAAQS,OAAOC,yDAI1Bd,KAAKH,MAAMO,QAAQS,OAAOA,iEASrBhB,MAAMkB,UAASC,kBAAaT,qEAI5BV,MAAMkB,UAASE,oBAAeV,8CAGhCW,UACHlB,KAAKH,MAAMkB,SAASI,WAAWD,oEAI1BrB,MAAMkB,UAASK,2BAAsBb,kEAIrCV,MAAMkB,UAASM,iBAAYd,+DAI3BV,MAAMkB,UAASO,cAASf,iEAIxBV,MAAMkB,UAASQ,gBAAWhB,0EAI1BV,MAAM2B,gBAAeH,iBAAYd,sDAG3BW,UACXlB,KAAKH,MAAM2B,eAAeL,WAAWD,4EAIhCrB,MAAM2B,gBAAeJ,2BAAsBb,2CAOhDW,UACAlB,KAAKH,MAAM4B,QAAQP,qCAGjBA,EAAKQ,eACM,IAAVA,S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5nB,KAAK4nC,EAAM7tC,EAAKE,eAAgBrB,EAAOmS,EAAK+Z,SACzDkT,EAAMh+B,KAAK,CACVf,KAAK8R,EAAK9R,KACVu0E,WAAWziE,EAAK+Z,YAMpBkT,GAAQA,EAAMx9B,QAASw9B,EAEnBj+B,EAAKzC,QAAQg5C,WAChBv2C,EAAKzC,QAAQg5C,SAAW,KAGZ,IAAVtY,GACFj+B,EAAKzC,QAAQg5C,SAASqB,SAAU,EAChC53C,EAAKN,aAAamF,UAAUyN,OAAO,6BAEhC0iE,GAAgB,QACbb,aAAa5mE,OAAOynE,EAAc,KAGxCh1E,EAAKzC,QAAQg5C,SAASqB,SAAU,EAES,WAAtCz6C,KAAKH,MAAM4B,QAAQ84C,gBACrB13C,EAAKN,aAAamF,UAAUC,IAAI,8BAGb,GAAjBkwE,QACGb,aAAal0E,KAAKD,IAIlBi+B,gDAIHz9B,EAAS,eAER2zE,aAAap0E,SAAQ,SAACC,GAC1BQ,EAAOP,KAAKD,EAAKE,mBAGXM,0CAGQR,OACXg1E,EAEDh1E,EAAKzC,QAAQg5C,UAAYv2C,EAAKzC,QAAQg5C,SAASqB,UAEjD53C,EAAKN,aAAamF,UAAUyN,OAAO,6BACnCtS,EAAKzC,QAAQg5C,SAASqB,SAAU,GAEhCo9B,EAAe73E,KAAKg3E,aAAajrE,QAAQlJ,KAEtB,QACbm0E,aAAa5mE,OAAOynE,EAAc,WAhQpBtnD,GAsQvBwmD,GAASzjD,WAAa,WAGtByjD,GAASa,WAAaE,+oBCxQhBC,iGAAsB1nD,UAG5B,IAAIuF,EAAamiD,GAAe33E"} \ No newline at end of file +{"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/TableRegistry.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/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/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/select.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/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/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/Validate/defaults/validators.js","../../src/js/modules/Validate/Validate.js","../../src/js/core/TabulatorFull.js"],"sourcesContent":["export default class CoreFeature{\r\n\r\n\tconstructor(table){\r\n\t\tthis.table = table;\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t/////////////// DataLoad /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\treloadData(data, silent){\r\n\t\treturn this.table.dataLoader.load(data, undefined, undefined, undefined, silent);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t///////////// Localization ///////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tlangText(){\r\n\t\treturn this.table.modules.localize.getText(...arguments);\r\n\t}\r\n\r\n\tlangBind(){\r\n\t\treturn this.table.modules.localize.bind(...arguments);\r\n\t}\r\n\r\n\tlangLocale(){\r\n\t\treturn this.table.modules.localize.getLocale(...arguments);\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t////////// Inter Table Comms /////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tcommsConnections(){\r\n\t\treturn this.table.modules.comms.getConnections(...arguments);\r\n\t}\r\n\r\n\tcommsSend(){\r\n\t\treturn this.table.modules.comms.send(...arguments);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Layout /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tlayoutMode(){\r\n\t\treturn this.table.modules.layout.getMode();\r\n\t}\r\n\r\n\tlayoutRefresh(){\r\n\t\treturn this.table.modules.layout.layout();\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t/////////////// Event Bus ////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tsubscribe(){\r\n\t\treturn this.table.eventBus.subscribe(...arguments);\r\n\t}\r\n\r\n\tunsubscribe(){\r\n\t\treturn this.table.eventBus.unsubscribe(...arguments);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.table.eventBus.subscribed(key);\r\n\t}\r\n\r\n\tsubscriptionChange(){\r\n\t\treturn this.table.eventBus.subscriptionChange(...arguments);\r\n\t}\r\n\r\n\tdispatch(){\r\n\t\treturn this.table.eventBus.dispatch(...arguments);\r\n\t}\r\n\r\n\tchain(){\r\n\t\treturn this.table.eventBus.chain(...arguments);\r\n\t}\r\n\r\n\tconfirm(){\r\n\t\treturn this.table.eventBus.confirm(...arguments);\r\n\t}\r\n\r\n\tdispatchExternal(){\r\n\t\treturn this.table.externalEvents.dispatch(...arguments);\r\n\t}\r\n\r\n\tsubscribedExternal(key){\r\n\t\treturn this.table.externalEvents.subscribed(key);\r\n\t}\r\n\r\n\tsubscriptionChangeExternal(){\r\n\t\treturn this.table.externalEvents.subscriptionChange(...arguments);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Options /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\toptions(key){\r\n\t\treturn this.table.options[key];\r\n\t}\r\n\r\n\tsetOption(key, value){\r\n\t\tif(typeof value !== \"undefined\"){\r\n\t\t\tthis.table.options[key] = value;\r\n\t\t}\r\n\r\n\t\treturn this.table.options[key];\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Modules /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tmodule(key){\r\n\t\treturn this.table.module(key);\r\n\t}\r\n}","import Column from './Column.js';\r\n\r\n//public column object\r\nexport default class ColumnComponent {\r\n\tconstructor (column){\r\n\t\tthis._column = column;\r\n\t\tthis.type = \"ColumnComponent\";\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._column.table.componentFunctionBinder.handle(\"column\", target._column, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._column.getElement();\r\n\t}\r\n\r\n\tgetDefinition(){\r\n\t\treturn this._column.getDefinition();\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._column.getField();\r\n\t}\r\n\r\n\tgetTitleDownload() {\r\n\t\treturn this._column.getTitleDownload();\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._column.cells.forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tisVisible(){\r\n\t\treturn this._column.visible;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tif(this._column.isGroup){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\tcolumn.show();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis._column.show();\r\n\t\t}\r\n\t}\r\n\r\n\thide(){\r\n\t\tif(this._column.isGroup){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\tcolumn.hide();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis._column.hide();\r\n\t\t}\r\n\t}\r\n\r\n\ttoggle(){\r\n\t\tif(this._column.visible){\r\n\t\t\tthis.hide();\r\n\t\t}else{\r\n\t\t\tthis.show();\r\n\t\t}\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn this._column.delete();\r\n\t}\r\n\r\n\tgetSubColumns(){\r\n\t\tvar output = [];\r\n\r\n\t\tif(this._column.columns.length){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\toutput.push(column.getComponent());\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetParentColumn(){\r\n\t\treturn this._column.parent instanceof Column ? this._column.parent.getComponent() : false;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._column;\r\n\t}\r\n\r\n\tscrollTo(){\r\n\t\treturn this._column.table.columnManager.scrollToColumn(this._column);\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._column.table;\r\n\t}\r\n\r\n\tmove(to, after){\r\n\t\tvar toColumn = this._column.table.columnManager.findColumn(to);\r\n\r\n\t\tif(toColumn){\r\n\t\t\tthis._column.table.columnManager.moveColumn(this._column, toColumn, after)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching column found:\", toColumn);\r\n\t\t}\r\n\t}\r\n\r\n\tgetNextColumn(){\r\n\t\tvar nextCol = this._column.nextColumn();\r\n\r\n\t\treturn nextCol ? nextCol.getComponent() : false;\r\n\t}\r\n\r\n\tgetPrevColumn(){\r\n\t\tvar prevCol = this._column.prevColumn();\r\n\r\n\t\treturn prevCol ? prevCol.getComponent() : false;\r\n\t}\r\n\r\n\tupdateDefinition(updates){\r\n\t\treturn this._column.updateDefinition(updates);\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\treturn this._column.getWidth();\r\n\t}\r\n\r\n\tsetWidth(width){\r\n\t\tvar result;\r\n\r\n\t\tif(width === true){\r\n\t\t\tresult = this._column.reinitializeWidth(true);\r\n\t\t}else{\r\n\t\t\tresult = this._column.setWidth(width);\r\n\t\t}\r\n\r\n\t\tthis._column.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\treturn result;\r\n\t}\r\n}","export default {\r\n\t\"title\": undefined,\r\n\t\"field\": undefined,\r\n\t\"columns\": undefined,\r\n\t\"visible\": undefined,\r\n\t\"hozAlign\": undefined,\r\n\t\"vertAlign\": undefined,\r\n\t\"width\": undefined,\r\n\t\"minWidth\": 40,\r\n\t\"maxWidth\": undefined,\r\n\t\"maxInitialWidth\": undefined,\r\n\t\"tooltip\": undefined,\r\n\t\"cssClass\": undefined,\r\n\t\"variableHeight\": undefined,\r\n\t\"headerTooltip\": undefined,\r\n\t\"headerVertical\": undefined,\r\n\t\"headerHozAlign\": undefined,\r\n\t\"editableTitle\": undefined,\r\n}","//public cell object\r\nexport default class CellComponent {\r\n\r\n\tconstructor (cell){\r\n\t\tthis._cell = cell;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._cell.table.componentFunctionBinder.handle(\"cell\", target._cell, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetValue(){\r\n\t\treturn this._cell.getValue();\r\n\t}\r\n\r\n\tgetOldValue(){\r\n\t\treturn this._cell.getOldValue();\r\n\t}\r\n\r\n\tgetInitialValue(){\r\n\t\treturn this._cell.initialValue;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._cell.getElement();\r\n\t}\r\n\r\n\tgetRow(){\r\n\t\treturn this._cell.row.getComponent();\r\n\t}\r\n\r\n\tgetData(){\r\n\t\treturn this._cell.row.getData();\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._cell.column.getField();\r\n\t}\r\n\r\n\tgetColumn(){\r\n\t\treturn this._cell.column.getComponent();\r\n\t}\r\n\r\n\tsetValue(value, mutate){\r\n\t\tif(typeof mutate == \"undefined\"){\r\n\t\t\tmutate = true;\r\n\t\t}\r\n\r\n\t\tthis._cell.setValue(value, mutate);\r\n\t}\r\n\r\n\trestoreOldValue(){\r\n\t\tthis._cell.setValueActual(this._cell.getOldValue());\r\n\t}\r\n\r\n\trestoreInitialValue(){\r\n\t\tthis._cell.setValueActual(this._cell.initialValue);\r\n\t}\r\n\r\n\tcheckHeight(){\r\n\t\tthis._cell.checkHeight();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._cell.table;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._cell;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport CellComponent from './CellComponent.js';\r\n\r\nexport default class Cell extends CoreFeature{\r\n\tconstructor(column, row){\r\n\t\tsuper(column.table);\r\n\r\n\t\tthis.table = column.table;\r\n\t\tthis.column = column;\r\n\t\tthis.row = row;\r\n\t\tthis.element = null;\r\n\t\tthis.value = null;\r\n\t\tthis.initialValue;\r\n\t\tthis.oldValue = null;\r\n\t\tthis.modules = {};\r\n\r\n\t\tthis.height = null;\r\n\t\tthis.width = null;\r\n\t\tthis.minWidth = null;\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\tthis.loaded = false; //track if the cell has been added to the DOM yet\r\n\r\n\t\tthis.build();\r\n\t}\r\n\r\n\t//////////////// Setup Functions /////////////////\r\n\t//generate element\r\n\tbuild(){\r\n\t\tthis.generateElement();\r\n\r\n\t\tthis.setWidth();\r\n\r\n\t\tthis._configureCell();\r\n\r\n\t\tthis.setValueActual(this.column.getFieldValue(this.row.data));\r\n\r\n\t\tthis.initialValue = this.value;\r\n\t}\r\n\r\n\tgenerateElement(){\r\n\t\tthis.element = document.createElement('div');\r\n\t\tthis.element.className = \"tabulator-cell\";\r\n\t\tthis.element.setAttribute(\"role\", \"gridcell\");\r\n\t\tthis.element = this.element;\r\n\t}\r\n\r\n\t_configureCell(){\r\n\t\tvar element = this.element,\r\n\t\tfield = this.column.getField(),\r\n\t\tvertAligns = {\r\n\t\t\ttop:\"flex-start\",\r\n\t\t\tbottom:\"flex-end\",\r\n\t\t\tmiddle:\"center\",\r\n\t\t},\r\n\t\thozAligns = {\r\n\t\t\tleft:\"flex-start\",\r\n\t\t\tright:\"flex-end\",\r\n\t\t\tcenter:\"center\",\r\n\t\t};\r\n\r\n\t\t//set text alignment\r\n\t\telement.style.textAlign = this.column.hozAlign;\r\n\r\n\t\tif(this.column.vertAlign){\r\n\t\t\telement.style.display = \"inline-flex\";\r\n\r\n\t\t\telement.style.alignItems = vertAligns[this.column.vertAlign] || \"\";\r\n\r\n\t\t\tif(this.column.hozAlign){\r\n\t\t\t\telement.style.justifyContent = hozAligns[this.column.hozAlign] || \"\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(field){\r\n\t\t\telement.setAttribute(\"tabulator-field\", field);\r\n\t\t}\r\n\r\n\t\t//add class to cell if needed\r\n\t\tif(this.column.definition.cssClass){\r\n\t\t\tvar classNames = this.column.definition.cssClass.split(\" \")\r\n\t\t\tclassNames.forEach((className) => {\r\n\t\t\t\telement.classList.add(className)\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t//update tooltip on mouse enter\r\n\t\tif (this.table.options.tooltipGenerationMode === \"hover\"){\r\n\t\t\telement.addEventListener(\"mouseenter\", (e) => {\r\n\t\t\t\tthis._generateTooltip();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"cell-init\", this);\r\n\r\n\t\t//hide cell if not visible\r\n\t\tif(!this.column.visible){\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\r\n\t//generate cell contents\r\n\t_generateContents(){\r\n\t\tvar val;\r\n\r\n\t\tval = this.chain(\"cell-format\", this, null, () => {\r\n\t\t\treturn this.element.innerHTML = this.value;\r\n\t\t});\r\n\r\n\t\tswitch(typeof val){\r\n\t\t\tcase \"object\":\r\n\t\t\tif(val instanceof Node){\r\n\r\n\t\t\t\t//clear previous cell contents\r\n\t\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\t\tthis.element.appendChild(val);\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.innerHTML = \"\";\r\n\r\n\t\t\t\tif(val != null){\r\n\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);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\tcase \"null\":\r\n\t\t\tthis.element.innerHTML = \"\";\r\n\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\tthis.element.innerHTML = val;\r\n\t\t}\r\n\t}\r\n\r\n\tcellRendered(){\r\n\t\tthis.dispatch(\"cell-rendered\", this);\r\n\t}\r\n\r\n\t//generate tooltip text\r\n\t_generateTooltip(){\r\n\t\tvar tooltip = this.column.tooltip;\r\n\r\n\t\tif(tooltip){\r\n\t\t\tif(tooltip === true){\r\n\t\t\t\ttooltip = this.value;\r\n\t\t\t}else if(typeof(tooltip) == \"function\"){\r\n\t\t\t\ttooltip = tooltip(this.getComponent());\r\n\r\n\t\t\t\tif(tooltip === false){\r\n\t\t\t\t\ttooltip = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof tooltip === \"undefined\"){\r\n\t\t\t\ttooltip = \"\";\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.setAttribute(\"title\", tooltip);\r\n\t\t}else{\r\n\t\t\tthis.element.setAttribute(\"title\", \"\");\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////////// Getters ////////////////////\r\n\tgetElement(containerOnly){\r\n\t\tif(!this.loaded){\r\n\t\t\tthis.loaded = true;\r\n\t\t\tif(!containerOnly){\r\n\t\t\t\tthis.layoutElement();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tgetValue(){\r\n\t\treturn this.value;\r\n\t}\r\n\r\n\tgetOldValue(){\r\n\t\treturn this.oldValue;\r\n\t}\r\n\r\n\t//////////////////// Actions ////////////////////\r\n\tsetValue(value, mutate){\r\n\t\tvar changed = this.setValueProcessData(value, mutate);\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.dispatch(\"cell-value-updated\", this);\r\n\r\n\t\t\tthis.cellRendered();\r\n\r\n\t\t\tif(this.column.definition.cellEdited){\r\n\t\t\t\tthis.column.definition.cellEdited.call(this.table, this.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"cellEdited\", this.getComponent());\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tsetValueProcessData(value, mutate){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(this.value !== value){\r\n\r\n\t\t\tchanged = true;\r\n\r\n\t\t\tif(mutate){\r\n\t\t\t\tvalue = this.chain(\"cell-value-changing\", [this, value], null, value);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.setValueActual(value);\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.dispatch(\"cell-value-changed\", this);\r\n\t\t}\r\n\r\n\t\treturn changed;\r\n\t}\r\n\r\n\tsetValueActual(value){\r\n\t\tthis.oldValue = this.value;\r\n\r\n\t\tthis.value = value;\r\n\r\n\t\tthis.dispatch(\"cell-value-save-before\", this);\r\n\r\n\t\tthis.column.setFieldValue(this.row.data, value);\r\n\r\n\t\tthis.dispatch(\"cell-value-save-after\", this);\r\n\r\n\t\tif(this.loaded){\r\n\t\t\tthis.layoutElement();\r\n\t\t}\r\n\t}\r\n\r\n\tlayoutElement(){\r\n\t\tthis._generateContents();\r\n\t\tthis._generateTooltip();\r\n\r\n\t\tthis.dispatch(\"cell-layout\", this);\r\n\t}\r\n\r\n\tsetWidth(){\r\n\t\tthis.width = this.column.width;\r\n\t\tthis.element.style.width = this.column.widthStyled;\r\n\t}\r\n\r\n\tclearWidth(){\r\n\t\tthis.width = \"\";\r\n\t\tthis.element.style.width = \"\";\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\treturn this.width || this.element.offsetWidth;\r\n\t}\r\n\r\n\tsetMinWidth(){\r\n\t\tthis.minWidth = this.column.minWidth;\r\n\t\tthis.element.style.minWidth = this.column.minWidthStyled;\r\n\t}\r\n\r\n\tsetMaxWidth(){\r\n\t\tthis.maxWidth = this.column.maxWidth;\r\n\t\tthis.element.style.maxWidth = this.column.maxWidthStyled;\r\n\t}\r\n\r\n\tcheckHeight(){\r\n\t\t// var height = this.element.css(\"height\");\r\n\t\tthis.row.reinitializeHeight();\r\n\t}\r\n\r\n\tclearHeight(){\r\n\t\tthis.element.style.height = \"\";\r\n\t\tthis.height = null;\r\n\t}\r\n\r\n\tsetHeight(){\r\n\t\tthis.height = this.row.height;\r\n\t\tthis.element.style.height = this.row.heightStyled;\r\n\t}\r\n\r\n\tgetHeight(){\r\n\t\treturn this.height || this.element.offsetHeight;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tthis.element.style.display = this.column.vertAlign ? \"inline-flex\" : \"\";\r\n\t}\r\n\r\n\thide(){\r\n\t\tthis.element.style.display = \"none\";\r\n\t}\r\n\r\n\tdelete(){\r\n\t\tthis.dispatch(\"cell-delete\", this);\r\n\r\n\t\tif(!this.table.rowManager.redrawBlock && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.column.deleteCell(this);\r\n\t\tthis.row.deleteCell(this);\r\n\t\tthis.calcs = {};\r\n\t}\r\n\r\n\tgetIndex(){\r\n\t\treturn this.row.getCellIndex(this);\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new CellComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport ColumnComponent from './ColumnComponent.js';\r\nimport defaultOptions from './defaults/options.js';\r\n\r\nimport Cell from '../cell/Cell.js';\r\n\r\nclass Column extends CoreFeature{\r\n\r\n\tconstructor(def, parent){\r\n\t\tsuper(parent.table);\r\n\r\n\t\tthis.definition = def; //column definition\r\n\t\tthis.parent = parent; //hold parent object\r\n\t\tthis.type = \"column\"; //type of element\r\n\t\tthis.columns = []; //child columns\r\n\t\tthis.cells = []; //cells bound to this column\r\n\t\tthis.element = this.createElement(); //column header element\r\n\t\tthis.contentElement = false;\r\n\t\tthis.titleHolderElement = false;\r\n\t\tthis.titleElement = false;\r\n\t\tthis.groupElement = this.createGroupElement(); //column group holder element\r\n\t\tthis.isGroup = false;\r\n\t\tthis.tooltip = false; //hold column tooltip\r\n\t\tthis.hozAlign = \"\"; //horizontal text alignment\r\n\t\tthis.vertAlign = \"\"; //vert text alignment\r\n\r\n\t\t//multi dimensional filed handling\r\n\t\tthis.field =\"\";\r\n\t\tthis.fieldStructure = \"\";\r\n\t\tthis.getFieldValue = \"\";\r\n\t\tthis.setFieldValue = \"\";\r\n\r\n\t\tthis.titleDownload = null;\r\n\t\tthis.titleFormatterRendered = false;\r\n\r\n\t\tthis.mapDefinitions();\r\n\r\n\t\tthis.setField(this.definition.field);\r\n\r\n\t\tthis.modules = {}; //hold module variables;\r\n\r\n\t\tthis.width = null; //column width\r\n\t\tthis.widthStyled = \"\"; //column width prestyled to improve render efficiency\r\n\t\tthis.maxWidth = null; //column maximum width\r\n\t\tthis.maxWidthStyled = \"\"; //column maximum prestyled to improve render efficiency\r\n\t\tthis.maxInitialWidth = null;\r\n\t\tthis.minWidth = null; //column minimum width\r\n\t\tthis.minWidthStyled = \"\"; //column minimum prestyled to improve render efficiency\r\n\t\tthis.widthFixed = false; //user has specified a width for this column\r\n\r\n\t\tthis.visible = true; //default visible state\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\t//initialize column\r\n\t\tif(this.definition.columns){\r\n\r\n\t\t\tthis.isGroup = true;\r\n\r\n\t\t\tthis.definition.columns.forEach((def, i) => {\r\n\t\t\t\tvar newCol = new Column(def, this);\r\n\t\t\t\tthis.attachColumn(newCol);\r\n\t\t\t});\r\n\r\n\t\t\tthis.checkColumnVisibility();\r\n\t\t}else{\r\n\t\t\tparent.registerColumnField(this);\r\n\t\t}\r\n\r\n\t\tthis._initialize();\r\n\r\n\t\tthis.bindModuleColumns();\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-col\");\r\n\t\tel.setAttribute(\"role\", \"columnheader\");\r\n\t\tel.setAttribute(\"aria-sort\", \"none\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateGroupElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-col-group-cols\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tmapDefinitions(){\r\n\t\tvar defaults = this.table.options.columnDefaults;\r\n\r\n\t\t//map columnDefaults onto column definitions\r\n\t\tif(defaults){\r\n\t\t\tfor(let key in defaults){\r\n\t\t\t\tif(typeof this.definition[key] === \"undefined\"){\r\n\t\t\t\t\tthis.definition[key] = defaults[key];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.definition = this.table.columnManager.optionsList.generate(Column.defaultOptionList, this.definition)\r\n\t}\r\n\r\n\tcheckDefinition(){\r\n\t\tObject.keys(this.definition).forEach((key) => {\r\n\t\t\tif(Column.defaultOptionList.indexOf(key) === -1){\r\n\t\t\t\tconsole.warn(\"Invalid column definition option in '\" + (this.field || this.definition.title) + \"' column:\", key)\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tsetField(field){\r\n\t\tthis.field = field;\r\n\t\tthis.fieldStructure = field ? (this.table.options.nestedFieldSeparator ? field.split(this.table.options.nestedFieldSeparator) : [field]) : [];\r\n\t\tthis.getFieldValue = this.fieldStructure.length > 1 ? this._getNestedData : this._getFlatData;\r\n\t\tthis.setFieldValue = this.fieldStructure.length > 1 ? this._setNestedData : this._setFlatData;\r\n\t}\r\n\r\n\t//register column position with column manager\r\n\tregisterColumnPosition(column){\r\n\t\tthis.parent.registerColumnPosition(column);\r\n\t}\r\n\r\n\t//register column position with column manager\r\n\tregisterColumnField(column){\r\n\t\tthis.parent.registerColumnField(column);\r\n\t}\r\n\r\n\t//trigger position registration\r\n\treRegisterPosition(){\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tcolumn.reRegisterPosition();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis.registerColumnPosition(this);\r\n\t\t}\r\n\t}\r\n\r\n\t_mapDepricatedFunctionality(){\r\n\t\t//all previously deprecated functionality removed in the 5.0 release\r\n\t}\r\n\r\n\tsetTooltip(){\r\n\t\tvar def = this.definition;\r\n\r\n\t\t//set header tooltips\r\n\t\tvar tooltip = def.headerTooltip;\r\n\r\n\t\tif(tooltip){\r\n\t\t\tif(tooltip === true){\r\n\t\t\t\tif(def.field){\r\n\t\t\t\t\tthis.langBind(\"columns|\" + def.field, (value) => {\r\n\t\t\t\t\t\tthis.element.setAttribute(\"title\", value || def.title);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.element.setAttribute(\"title\", def.title);\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tif(typeof(tooltip) == \"function\"){\r\n\t\t\t\t\ttooltip = tooltip(this.getComponent());\r\n\r\n\t\t\t\t\tif(tooltip === false){\r\n\t\t\t\t\t\ttooltip = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.element.setAttribute(\"title\", tooltip);\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tthis.element.setAttribute(\"title\", \"\");\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element\r\n\t_initialize(){\r\n\t\tvar def = this.definition;\r\n\r\n\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\tif(def.headerVertical){\r\n\t\t\tthis.element.classList.add(\"tabulator-col-vertical\");\r\n\r\n\t\t\tif(def.headerVertical === \"flip\"){\r\n\t\t\t\tthis.element.classList.add(\"tabulator-col-vertical-flip\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.contentElement = this._bindEvents();\r\n\r\n\t\tthis.contentElement = this._buildColumnHeaderContent();\r\n\r\n\t\tthis.element.appendChild(this.contentElement);\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis._buildGroupHeader();\r\n\t\t}else{\r\n\t\t\tthis._buildColumnHeader();\r\n\t\t}\r\n\r\n\t\tthis.setTooltip();\r\n\r\n\t\tthis.dispatch(\"column-init\", this);\r\n\r\n\t\t//update header tooltip on mouse enter\r\n\t\tthis.element.addEventListener(\"mouseenter\", (e) => {\r\n\t\t\tthis.setTooltip();\r\n\t\t});\r\n\t}\r\n\r\n\t_bindEvents(){\r\n\t\tvar def = this.definition,\r\n\t\tdblTap,\ttapHold, tap;\r\n\r\n\t\t//setup header click event bindings\r\n\t\tif(typeof(def.headerClick) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"click\", (e) => {def.headerClick(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerDblClick) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"dblclick\", (e) => {def.headerDblClick(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerContext) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"contextmenu\", (e) => {def.headerContext(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\t//setup header tap event bindings\r\n\t\tif(typeof(def.headerTap) == \"function\"){\r\n\t\t\ttap = false;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchstart\", (e) => {\r\n\t\t\t\ttap = true;\r\n\t\t\t}, {passive: true});\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\t\t\t\tif(tap){\r\n\t\t\t\t\tdef.headerTap(e, this.getComponent());\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttap = false;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerDblTap) == \"function\"){\r\n\t\t\tdblTap = null;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\r\n\t\t\t\tif(dblTap){\r\n\t\t\t\t\tclearTimeout(dblTap);\r\n\t\t\t\t\tdblTap = null;\r\n\r\n\t\t\t\t\tdef.headerDblTap(e, this.getComponent());\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tdblTap = setTimeout(() => {\r\n\t\t\t\t\t\tclearTimeout(dblTap);\r\n\t\t\t\t\t\tdblTap = null;\r\n\t\t\t\t\t}, 300);\r\n\t\t\t\t}\r\n\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerTapHold) == \"function\"){\r\n\t\t\ttapHold = null;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchstart\", (e) => {\r\n\t\t\t\tclearTimeout(tapHold);\r\n\r\n\t\t\t\ttapHold = setTimeout(function(){\r\n\t\t\t\t\tclearTimeout(tapHold);\r\n\t\t\t\t\ttapHold = null;\r\n\t\t\t\t\ttap = false;\r\n\t\t\t\t\tdef.headerTapHold(e, this.getComponent());\r\n\t\t\t\t}, 1000);\r\n\r\n\t\t\t}, {passive: true});\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\t\t\t\tclearTimeout(tapHold);\r\n\t\t\t\ttapHold = null;\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element for header\r\n\t_buildColumnHeader(){\r\n\t\tvar def = this.definition,\r\n\t\ttable = this.table;\r\n\r\n\t\tthis.dispatch(\"column-layout\", this);\r\n\r\n\t\t//set column visibility\r\n\t\tif(typeof def.visible != \"undefined\"){\r\n\t\t\tif(def.visible){\r\n\t\t\t\tthis.show(true);\r\n\t\t\t}else{\r\n\t\t\t\tthis.hide(true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//asign additional css classes to column header\r\n\t\tif(def.cssClass){\r\n\t\t\tvar classeNames = def.cssClass.split(\" \");\r\n\t\t\tclasseNames.forEach((className) => {\r\n\t\t\t\tthis.element.classList.add(className);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(def.field){\r\n\t\t\tthis.element.setAttribute(\"tabulator-field\", def.field);\r\n\t\t}\r\n\r\n\t\t//set min width if present\r\n\t\tthis.setMinWidth(parseInt(def.minWidth));\r\n\r\n\t\tif (def.maxInitialWidth) {\r\n\t\t\tthis.maxInitialWidth = parseInt(def.maxInitialWidth);\r\n\t\t}\r\n\t\t\r\n\t\tif(def.maxWidth){\r\n\t\t\tthis.setMaxWidth(parseInt(def.maxWidth));\r\n\t\t}\r\n\r\n\t\tthis.reinitializeWidth();\r\n\r\n\t\t//set tooltip if present\r\n\t\tthis.tooltip = this.definition.tooltip;\r\n\r\n\t\t//set orizontal text alignment\r\n\t\tthis.hozAlign = this.definition.hozAlign;\r\n\t\tthis.vertAlign = this.definition.vertAlign;\r\n\r\n\t\tthis.titleElement.style.textAlign = this.definition.headerHozAlign;\r\n\t}\r\n\r\n\t_buildColumnHeaderContent(){\r\n\t\tvar def = this.definition,\r\n\t\ttable = this.table;\r\n\r\n\t\tvar contentElement = document.createElement(\"div\");\r\n\t\tcontentElement.classList.add(\"tabulator-col-content\");\r\n\r\n\t\tthis.titleHolderElement = document.createElement(\"div\");\r\n\t\tthis.titleHolderElement.classList.add(\"tabulator-col-title-holder\");\r\n\r\n\t\tcontentElement.appendChild(this.titleHolderElement);\r\n\r\n\t\tthis.titleElement = this._buildColumnHeaderTitle();\r\n\r\n\t\tthis.titleHolderElement.appendChild(this.titleElement);\r\n\r\n\t\treturn contentElement;\r\n\t}\r\n\r\n\t//build title element of column\r\n\t_buildColumnHeaderTitle(){\r\n\t\tvar def = this.definition,\r\n\t\ttitle;\r\n\r\n\t\tvar titleHolderElement = document.createElement(\"div\");\r\n\t\ttitleHolderElement.classList.add(\"tabulator-col-title\");\r\n\r\n\t\tif(def.editableTitle){\r\n\t\t\tvar titleElement = document.createElement(\"input\");\r\n\t\t\ttitleElement.classList.add(\"tabulator-title-editor\");\r\n\r\n\t\t\ttitleElement.addEventListener(\"click\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\ttitleElement.focus();\r\n\t\t\t});\r\n\r\n\t\t\ttitleElement.addEventListener(\"change\", () => {\r\n\t\t\t\tdef.title = titleElement.value;\r\n\t\t\t\tthis.dispatchExternal(\"columnTitleChanged\", this.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\ttitleHolderElement.appendChild(titleElement);\r\n\r\n\t\t\tif(def.field){\r\n\t\t\t\tthis.langBind(\"columns|\" + def.field, (text) => {\r\n\t\t\t\t\ttitleElement.value = text || (def.title || \" \");\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\ttitleElement.value = def.title || \" \";\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tif(def.field){\r\n\t\t\t\tthis.langBind(\"columns|\" + def.field, (text) => {\r\n\t\t\t\t\tthis._formatColumnHeaderTitle(titleHolderElement, text || (def.title || \" \"));\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tthis._formatColumnHeaderTitle(titleHolderElement, def.title || \" \");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn titleHolderElement;\r\n\t}\r\n\r\n\t_formatColumnHeaderTitle(el, title){\r\n\t\tvar contents = this.chain(\"column-format\", [this, title, el], null, () => {\r\n\t\t\treturn title;\r\n\t\t});\r\n\r\n\t\tswitch(typeof contents){\r\n\t\t\tcase \"object\":\r\n\t\t\tif(contents instanceof Node){\r\n\t\t\t\tel.appendChild(contents);\r\n\t\t\t}else{\r\n\t\t\t\tel.innerHTML = \"\";\r\n\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);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\tcase \"null\":\r\n\t\t\tel.innerHTML = \"\";\r\n\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\tel.innerHTML = contents;\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element for column group\r\n\t_buildGroupHeader(){\r\n\t\tthis.element.classList.add(\"tabulator-col-group\");\r\n\t\tthis.element.setAttribute(\"role\", \"columngroup\");\r\n\t\tthis.element.setAttribute(\"aria-title\", this.definition.title);\r\n\r\n\t\t//asign additional css classes to column header\r\n\t\tif(this.definition.cssClass){\r\n\t\t\tvar classeNames = this.definition.cssClass.split(\" \");\r\n\t\t\tclasseNames.forEach((className) => {\r\n\t\t\t\tthis.element.classList.add(className);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.titleElement.style.textAlign = this.definition.headerHozAlign;\r\n\r\n\t\tthis.element.appendChild(this.groupElement);\r\n\t}\r\n\r\n\t//flat field lookup\r\n\t_getFlatData(data){\r\n\t\treturn data[this.field];\r\n\t}\r\n\r\n\t//nested field lookup\r\n\t_getNestedData(data){\r\n\t\tvar dataObj = data,\r\n\t\tstructure = this.fieldStructure,\r\n\t\tlength = structure.length,\r\n\t\toutput;\r\n\r\n\t\tfor(let i = 0; i < length; i++){\r\n\r\n\t\t\tdataObj = dataObj[structure[i]];\r\n\r\n\t\t\toutput = dataObj;\r\n\r\n\t\t\tif(!dataObj){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//flat field set\r\n\t_setFlatData(data, value){\r\n\t\tif(this.field){\r\n\t\t\tdata[this.field] = value;\r\n\t\t}\r\n\t}\r\n\r\n\t//nested field set\r\n\t_setNestedData(data, value){\r\n\t\tvar dataObj = data,\r\n\t\tstructure = this.fieldStructure,\r\n\t\tlength = structure.length;\r\n\r\n\t\tfor(let i = 0; i < length; i++){\r\n\r\n\t\t\tif(i == length -1){\r\n\t\t\t\tdataObj[structure[i]] = value;\r\n\t\t\t}else{\r\n\t\t\t\tif(!dataObj[structure[i]]){\r\n\t\t\t\t\tif(typeof value !== \"undefined\"){\r\n\t\t\t\t\t\tdataObj[structure[i]] = {};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdataObj = dataObj[structure[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//attach column to this group\r\n\tattachColumn(column){\r\n\t\tif(this.groupElement){\r\n\t\t\tthis.columns.push(column);\r\n\t\t\tthis.groupElement.appendChild(column.getElement());\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Warning - Column being attached to another column instead of column group\");\r\n\t\t}\r\n\t}\r\n\r\n\t//vertically align header in column\r\n\tverticalAlign(alignment, height){\r\n\r\n\t\t//calculate height of column header and group holder element\r\n\t\tvar parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : (height || this.parent.getHeadersElement().clientHeight);\r\n\t\t// var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : this.parent.getHeadersElement().clientHeight;\r\n\r\n\t\tthis.element.style.height = parentHeight + \"px\";\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.groupElement.style.minHeight = (parentHeight - this.contentElement.offsetHeight) + \"px\";\r\n\t\t}\r\n\r\n\t\t//vertically align cell contents\r\n\t\tif(!this.isGroup && alignment !== \"top\"){\r\n\t\t\tif(alignment === \"bottom\"){\r\n\t\t\t\tthis.element.style.paddingTop = (this.element.clientHeight - this.contentElement.offsetHeight) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.paddingTop = ((this.element.clientHeight - this.contentElement.offsetHeight) / 2) + \"px\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.verticalAlign(alignment);\r\n\t\t});\r\n\t}\r\n\r\n\t//clear vertical alignmenet\r\n\tclearVerticalAlign(){\r\n\t\tthis.element.style.paddingTop = \"\";\r\n\t\tthis.element.style.height = \"\";\r\n\t\tthis.element.style.minHeight = \"\";\r\n\t\tthis.groupElement.style.minHeight = \"\";\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.clearVerticalAlign();\r\n\t\t});\r\n\t}\r\n\r\n\tbindModuleColumns (){\r\n\t\t//check if rownum formatter is being used on a column\r\n\t\tif(this.definition.formatter == \"rownum\"){\r\n\t\t\tthis.table.rowManager.rowNumColumn = this;\r\n\t\t}\r\n\t}\r\n\r\n\t//// Retreive Column Information ////\r\n\t//return column header element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\t//return colunm group element\r\n\tgetGroupElement(){\r\n\t\treturn this.groupElement;\r\n\t}\r\n\r\n\t//return field name\r\n\tgetField(){\r\n\t\treturn this.field;\r\n\t}\r\n\r\n\tgetTitleDownload() {\r\n\t\treturn this.titleDownload;\r\n\t}\r\n\r\n\t//return the first column in a group\r\n\tgetFirstColumn(){\r\n\t\tif(!this.isGroup){\r\n\t\t\treturn this;\r\n\t\t}else{\r\n\t\t\tif(this.columns.length){\r\n\t\t\t\treturn this.columns[0].getFirstColumn();\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//return the last column in a group\r\n\tgetLastColumn(){\r\n\t\tif(!this.isGroup){\r\n\t\t\treturn this;\r\n\t\t}else{\r\n\t\t\tif(this.columns.length){\r\n\t\t\t\treturn this.columns[this.columns.length -1].getLastColumn();\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//return all columns in a group\r\n\tgetColumns(){\r\n\t\treturn this.columns;\r\n\t}\r\n\r\n\t//return all columns in a group\r\n\tgetCells(){\r\n\t\treturn this.cells;\r\n\t}\r\n\r\n\t//retreive the top column in a group of columns\r\n\tgetTopColumn(){\r\n\t\tif(this.parent.isGroup){\r\n\t\t\treturn this.parent.getTopColumn();\r\n\t\t}else{\r\n\t\t\treturn this;\r\n\t\t}\r\n\t}\r\n\r\n\t//return column definition object\r\n\tgetDefinition(updateBranches){\r\n\t\tvar colDefs = [];\r\n\r\n\t\tif(this.isGroup && updateBranches){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tcolDefs.push(column.getDefinition(true));\r\n\t\t\t});\r\n\r\n\t\t\tthis.definition.columns = colDefs;\r\n\t\t}\r\n\r\n\t\treturn this.definition;\r\n\t}\r\n\r\n\t//////////////////// Actions ////////////////////\r\n\tcheckColumnVisibility(){\r\n\t\tvar visible = false;\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvisible = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(visible){\r\n\t\t\tthis.show();\r\n\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), false);\r\n\t\t}else{\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\r\n\t//show column\r\n\tshow(silent, responsiveToggle){\r\n\t\tif(!this.visible){\r\n\t\t\tthis.visible = true;\r\n\r\n\t\t\tthis.element.style.display = \"\";\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.checkColumnVisibility();\r\n\t\t\t}\r\n\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.show();\r\n\t\t\t});\r\n\r\n\t\t\tif(!this.isGroup && this.width === null){\r\n\t\t\t\tthis.reinitializeWidth();\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.columnManager.verticalAlignHeaders();\r\n\r\n\t\t\tthis.dispatch(\"column-show\", this, responsiveToggle);\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), true);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\r\n\t\t\tif(!this.silent){\r\n\t\t\t\tthis.table.columnManager.renderer.rerenderColumns();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//hide column\r\n\thide(silent, responsiveToggle){\r\n\t\tif(this.visible){\r\n\t\t\tthis.visible = false;\r\n\r\n\t\t\tthis.element.style.display = \"none\";\r\n\r\n\t\t\tthis.table.columnManager.verticalAlignHeaders();\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.checkColumnVisibility();\r\n\t\t\t}\r\n\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.hide();\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatch(\"column-hide\", this, responsiveToggle);\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), false);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\r\n\t\t\tif(!this.silent){\r\n\t\t\t\tthis.table.columnManager.renderer.rerenderColumns();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmatchChildWidths(){\r\n\t\tvar childWidth = 0;\r\n\r\n\t\tif(this.contentElement && this.columns.length){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tif(column.visible){\r\n\t\t\t\t\tchildWidth += column.getWidth();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.contentElement.style.maxWidth = (childWidth - 1) + \"px\";\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tremoveChild(child){\r\n\t\tvar index = this.columns.indexOf(child);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columns.splice(index, 1);\r\n\t\t}\r\n\r\n\t\tif(!this.columns.length){\r\n\t\t\tthis.delete();\r\n\t\t}\r\n\t}\r\n\r\n\tsetWidth(width){\r\n\t\tthis.widthFixed = true;\r\n\t\tthis.setWidthActual(width);\r\n\t}\r\n\r\n\tsetWidthActual(width){\r\n\t\tif(isNaN(width)){\r\n\t\t\twidth = Math.floor((this.table.element.clientWidth/100) * parseInt(width));\r\n\t\t}\r\n\r\n\t\twidth = Math.max(this.minWidth, width);\r\n\r\n\t\tif(this.maxWidth){\r\n\t\t\twidth = Math.min(this.maxWidth, width);\r\n\t\t}\r\n\r\n\t\tthis.width = width;\r\n\t\tthis.widthStyled = width ? width + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.width = this.widthStyled;\r\n\r\n\t\tif(!this.isGroup){\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.setWidth();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.parent.isGroup){\r\n\t\t\tthis.parent.matchChildWidths();\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"column-width\", this);\r\n\t}\r\n\r\n\tcheckCellHeights(){\r\n\t\tvar rows = [];\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tif(cell.row.heightInitialized){\r\n\t\t\t\tif(cell.row.getElement().offsetParent !== null){\r\n\t\t\t\t\trows.push(cell.row);\r\n\t\t\t\t\tcell.row.clearCellHeight();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcell.row.heightInitialized = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\trow.calcHeight();\r\n\t\t});\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\trow.setCellHeight();\r\n\t\t});\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\tvar width = 0;\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tif(column.visible){\r\n\t\t\t\t\twidth += column.getWidth();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\twidth = this.width;\r\n\t\t}\r\n\r\n\t\treturn width;\r\n\t}\r\n\r\n\tgetHeight(){\r\n\t\treturn Math.ceil(this.element.getBoundingClientRect().height);\r\n\t}\r\n\r\n\tsetMinWidth(minWidth){\r\n\t\tthis.minWidth = minWidth;\r\n\t\tthis.minWidthStyled = minWidth ? minWidth + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.minWidth = this.minWidthStyled;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setMinWidth();\r\n\t\t});\r\n\t}\r\n\r\n\tsetMaxWidth(maxWidth){\r\n\t\tthis.maxWidth = maxWidth;\r\n\t\tthis.maxWidthStyled = maxWidth ? maxWidth + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.maxWidth = this.maxWidthStyled;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setMaxWidth();\r\n\t\t});\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar index;\r\n\r\n\t\t\tif(this.isGroup){\r\n\t\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\t\tcolumn.delete();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"column-delete\", this);\r\n\r\n\t\t\tvar cellCount = this.cells.length;\r\n\r\n\t\t\tfor(let i = 0; i < cellCount; i++){\r\n\t\t\t\tthis.cells[0].delete();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.element.parentNode){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element = false;\r\n\t\t\tthis.contentElement = false;\r\n\t\t\tthis.titleElement = false;\r\n\t\t\tthis.groupElement = false;\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.removeChild(this);\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.columnManager.deregisterColumn(this);\r\n\r\n\t\t\tthis.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\r\n\tcolumnRendered(){\r\n\t\tif(this.titleFormatterRendered){\r\n\t\t\tthis.titleFormatterRendered();\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\t//generate cell for this column\r\n\tgenerateCell(row){\r\n\t\tvar cell = new Cell(this, row);\r\n\r\n\t\tthis.cells.push(cell);\r\n\r\n\t\treturn cell;\r\n\t}\r\n\r\n\tnextColumn(){\r\n\t\tvar index = this.table.columnManager.findColumnIndex(this);\r\n\t\treturn index > -1 ? this._nextVisibleColumn(index + 1) : false;\r\n\t}\r\n\r\n\t_nextVisibleColumn(index){\r\n\t\tvar column = this.table.columnManager.getColumnByIndex(index);\r\n\t\treturn !column || column.visible ? column : this._nextVisibleColumn(index + 1);\r\n\t}\r\n\r\n\tprevColumn(){\r\n\t\tvar index = this.table.columnManager.findColumnIndex(this);\r\n\t\treturn index > -1 ? this._prevVisibleColumn(index - 1) : false;\r\n\t}\r\n\r\n\t_prevVisibleColumn(index){\r\n\t\tvar column = this.table.columnManager.getColumnByIndex(index);\r\n\t\treturn !column || column.visible ? column : this._prevVisibleColumn(index - 1);\r\n\t}\r\n\r\n\treinitializeWidth(force){\r\n\t\tthis.widthFixed = false;\r\n\r\n\t\t//set width if present\r\n\t\tif(typeof this.definition.width !== \"undefined\" && !force){\r\n\t\t\t// maxInitialWidth ignored here as width specified\r\n\t\t\tthis.setWidth(this.definition.width);\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"column-width-fit-before\", this);\r\n\r\n\t\tthis.fitToData(force);\r\n\r\n\t\tthis.dispatch(\"column-width-fit-after\", this);\r\n\t}\r\n\r\n\t//set column width to maximum cell width for non group columns\r\n\tfitToData(force){\r\n\t\tif(this.isGroup){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif(!this.widthFixed){\r\n\t\t\tthis.element.style.width = \"\";\r\n\r\n\t\t\tthis.cells.forEach((cell) => {\r\n\t\t\t\tcell.clearWidth();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tvar maxWidth = this.element.offsetWidth;\r\n\r\n\t\tif(!this.width || !this.widthFixed){\r\n\t\t\tthis.cells.forEach((cell) => {\r\n\t\t\t\tvar width = cell.getWidth();\r\n\r\n\t\t\t\tif(width > maxWidth){\r\n\t\t\t\t\tmaxWidth = width;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(maxWidth){\r\n\t\t\t\tvar setTo = maxWidth + 1;\r\n\t\t\t\tif (this.maxInitialWidth && !force) {\r\n\t\t\t\t\tsetTo = Math.min(setTo, this.maxInitialWidth);\r\n\t\t\t\t}\r\n\t\t\t\tthis.setWidthActual(setTo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateDefinition(updates){\r\n\t\tvar definition;\r\n\r\n\t\tif(!this.isGroup){\r\n\t\t\tif(!this.parent.isGroup){\r\n\t\t\t\tdefinition = Object.assign({}, this.getDefinition());\r\n\t\t\t\tdefinition = Object.assign(definition, updates);\r\n\r\n\t\t\t\treturn this.table.columnManager.addColumn(definition, false, this)\r\n\t\t\t\t.then((column) => {\r\n\r\n\t\t\t\t\tif(definition.field == this.field){\r\n\t\t\t\t\t\tthis.field = false; //cleair field name to prevent deletion of duplicate column from arrays\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn this.delete()\r\n\t\t\t\t\t.then(() => {\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Column Update Error - The updateDefinition function is only available on ungrouped columns\");\r\n\t\t\t\treturn Promise.reject(\"Column Update Error - The updateDefinition function is only available on columns, not column groups\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Column Update Error - The updateDefinition function is only available on ungrouped columns\");\r\n\t\t\treturn Promise.reject(\"Column Update Error - The updateDefinition function is only available on columns, not column groups\");\r\n\t\t}\r\n\t}\r\n\r\n\tdeleteCell(cell){\r\n\t\tvar index = this.cells.indexOf(cell);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.cells.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new ColumnComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}\r\n\r\nColumn.defaultOptionList = defaultOptions;\r\n\r\nexport default Column;","export default class Helpers{\r\n\r\n\tstatic elVisible(el){\r\n\t\treturn !(el.offsetWidth <= 0 && el.offsetHeight <= 0);\r\n\t}\r\n\r\n\tstatic elOffset(el){\r\n\t\tvar box = el.getBoundingClientRect();\r\n\r\n\t\treturn {\r\n\t\t\ttop: box.top + window.pageYOffset - document.documentElement.clientTop,\r\n\t\t\tleft: box.left + window.pageXOffset - document.documentElement.clientLeft\r\n\t\t};\r\n\t}\r\n\r\n\tstatic deepClone(obj, clone, list = []){\r\n\t\tvar objectProto = {}.__proto__,\r\n\t\tarrayProto = [].__proto__;\r\n\r\n\t\tif (!clone){\r\n\t\t\tclone = Object.assign(Array.isArray(obj) ? [] : {}, obj);\r\n\t\t}\r\n\r\n\t\tfor(var i in obj) {\r\n\t\t\tlet subject = obj[i],\r\n\t\t\tmatch, copy;\r\n\r\n\t\t\tif(subject != null && typeof subject === \"object\" && (subject.__proto__ === objectProto || subject.__proto__ === arrayProto)){\r\n\t\t\t\tmatch = list.findIndex((item) => {\r\n\t\t\t\t\treturn item.subject === subject;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(match > -1){\r\n\t\t\t\t\tclone[i] = list[match].copy;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcopy = Object.assign(Array.isArray(subject) ? [] : {}, subject);\r\n\r\n\t\t\t\t\tlist.unshift({subject, copy});\r\n\r\n\t\t\t\t\tclone[i] = this.deepClone(subject, copy, list);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn clone;\r\n\t}\r\n}","export default class OptionsList {\r\n\tconstructor(table, msgType, defaults = {}){\r\n\t\tthis.table = table;\r\n\t\tthis.msgType = msgType;\r\n\t\tthis.registeredDefaults = Object.assign({}, defaults)\r\n\t}\r\n\r\n\tregister(option, value){\r\n\t\tthis.registeredDefaults[option] = value;\r\n\t}\r\n\r\n\tgenerate(defaultOptions, userOptions = {}){\r\n\t\tvar output = Object.assign({}, this.registeredDefaults);\r\n\r\n\t\tObject.assign(output, defaultOptions);\r\n\r\n\t\tif(userOptions.debugInvalidOptions !== false || this.table.options.debugInvalidOptions){\r\n\t\t\tfor (var key in userOptions){\r\n\t\t\t\tif(!output.hasOwnProperty(key)){\r\n\t\t\t\t\tconsole.warn(\"Invalid \" + this.msgType + \" option:\", key)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var key in output){\r\n\t\t\tif(key in userOptions){\r\n\t\t\t\toutput[key] = userOptions[key];\r\n\t\t\t}else{\r\n\t\t\t\tif(Array.isArray(output[key])){\r\n\t\t\t\t\toutput[key] = Object.assign([], output[key]);\r\n\t\t\t\t}else if(typeof output[key] === \"object\" && output[key] !== null){\r\n\t\t\t\t\toutput[key] = Object.assign({}, output[key]);\r\n\t\t\t\t}else if (typeof output[key] === \"undefined\"){\r\n\t\t\t\t\tdelete output[key];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport Helpers from '../tools/Helpers.js';\r\n\r\nexport default class Renderer extends CoreFeature{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.elementVertical = table.rowManager.element;\r\n\t\tthis.elementHorizontal = table.columnManager.element;\r\n\t\tthis.tableElement = table.rowManager.tableElement;\r\n\r\n\t\tthis.verticalFillMode = \"fit\"; // used by row manager to determin how to size the render area (\"fit\" - fits container to the contents, \"fill\" - fills the contianer without resizing it)\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t/////// Internal Bindings /////////\r\n\t///////////////////////////////////\r\n\r\n\tinitialize(){\r\n\t\t//initialize core functionality\r\n\t}\r\n\r\n\tclearRows(){\r\n\t\t//clear down existing rows layout\r\n\t}\r\n\r\n\tclearColumns(){\r\n\t\t//clear down existing columns layout\r\n\t}\r\n\r\n\r\n\treinitializeColumnWidths(columns){\r\n\t\t//resize columns to fit data\r\n\t}\r\n\r\n\r\n\trenderRows(){\r\n\t\t//render rows from a clean slate\r\n\t}\r\n\r\n\trenderColumns(){\r\n\t\t//render columns from a clean slate\r\n\t}\r\n\r\n\trerenderRows(callback){\r\n\t\t// rerender rows and keep position\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\t}\r\n\r\n\trerenderColumns(update, blockRedraw){\r\n\t\t//rerender columns\r\n\t}\r\n\r\n\trenderRowCells(row){\r\n\t\t//render the cells in a row\r\n\t}\r\n\r\n\trerenderRowCells(row, force){\r\n\t\t//rerender the cells in a row\r\n\t}\r\n\r\n\tscrollColumns(left, dir){\r\n\t\t//handle horizontal scrolling\r\n\t}\r\n\r\n\tscrollRows(top, dir){\r\n\t\t//handle vertical scolling\r\n\t}\r\n\r\n\tresize(){\r\n\t\t//container has rezied, carry out any needed recalculations (DO NOT RERENDER IN THIS FUNCTION)\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\t//scroll to a specific row\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\t//determine weather the row is nearest the top or bottom of the table, retur true for top or false for bottom\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\t//return the visible rows\r\n\t\treturn [];\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t//////// Helper Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\trows(){\r\n\t\treturn this.table.rowManager.getDisplayRows();\r\n\t}\r\n\r\n\tstyleRow(row, index){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tif(index % 2){\r\n\t\t\trowEl.classList.add(\"tabulator-row-even\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-odd\");\r\n\t\t}else{\r\n\t\t\trowEl.classList.add(\"tabulator-row-odd\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-even\");\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t/////// External Triggers /////////\r\n\t/////// (DO NOT OVERRIDE) /////////\r\n\t///////////////////////////////////\r\n\r\n\tclear(){\r\n\t\t//clear down existing layout\r\n\t\tthis.clearRows();\r\n\t\tthis.clearColumns();\r\n\t}\r\n\r\n\trender(){\r\n\t\t//render from a clean slate\r\n\t\tthis.renderRows();\r\n\t\tthis.renderColumns();\r\n\t}\r\n\r\n\trerender(callback){\r\n\t\t// rerender and keep position\r\n\t\tthis.rerenderRows();\r\n\t\tthis.rerenderColumns();\r\n\t}\r\n\r\n\tscrollToRowPosition(row, position, ifVisible){\r\n\t\tvar rowIndex = this.rows().indexOf(row),\r\n\t\trowEl = row.getElement(),\r\n\t\toffset = 0;\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tif(rowIndex > -1){\r\n\r\n\t\t\t\tif(typeof ifVisible === \"undefined\"){\r\n\t\t\t\t\tifVisible = this.table.options.scrollToRowIfVisible;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//check row visibility\r\n\t\t\t\tif(!ifVisible){\r\n\t\t\t\t\tif(Helpers.elVisible(rowEl)){\r\n\t\t\t\t\t\toffset = Helpers.elOffset(rowEl).top - Helpers.elOffset(this.elementVertical).top;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(offset > 0 && offset < this.elementVertical.clientHeight - rowEl.offsetHeight){\r\n\t\t\t\t\t\t\tresolve();\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(typeof position === \"undefined\"){\r\n\t\t\t\t\tposition = this.table.options.scrollToRowPosition;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(position === \"nearest\"){\r\n\t\t\t\t\tposition = this.scrollToRowNearestTop(row) ? \"top\" : \"bottom\"\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//scroll to row\r\n\t\t\t\tthis.scrollToRow(row);\r\n\r\n\t\t\t\t//align to correct position\r\n\t\t\t\tswitch(position){\r\n\t\t\t\t\tcase \"middle\":\r\n\t\t\t\t\tcase \"center\":\r\n\r\n\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop + (rowEl.offsetTop - this.elementVertical.scrollTop) - ((this.elementVertical.scrollHeight - rowEl.offsetTop) / 2);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.clientHeight / 2);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"bottom\":\r\n\r\n\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.scrollHeight - rowEl.offsetTop) + rowEl.offsetHeight;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - this.elementVertical.clientHeight + rowEl.offsetHeight;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresolve();\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - Row not visible\");\r\n\t\t\t\treject(\"Scroll Error - Row not visible\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class BaiscHorizontal extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t}\r\n\r\n\trenderRowCells(row){\r\n\t\trow.cells.forEach((cell) => {\r\n\t\t\trow.element.appendChild(cell.getElement());\r\n\t\t\tcell.cellRendered();\r\n\t\t});\r\n\t}\r\n\r\n\treinitializeColumnWidths(columns){\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t});\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class VirtualDomHorizontal extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.leftCol = 0;\r\n\t\tthis.rightCol = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = 0;\r\n\t\tthis.vDomScrollPosRight = 0;\r\n\t\t\r\n\t\tthis.vDomPadLeft = 0;\r\n\t\tthis.vDomPadRight = 0;\r\n\t\t\r\n\t\tthis.fitDataColAvg = 0;\r\n\t\t\r\n\t\tthis.windowBuffer = 200; //pixel margin to make column visible before it is shown on screen\r\n\t\t\r\n\t\tthis.visibleRows = null;\r\n\r\n\t\tthis.initialized = false;\r\n\t\tthis.isFitData = false;\r\n\t\t\r\n\t\tthis.columns = [];\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.compatibilityCheck();\r\n\t\tthis.layoutCheck();\r\n\t\tthis.vertScrollListen();\r\n\t}\r\n\t\r\n\tcompatibilityCheck(){\r\n\t\tvar columns = this.options(\"columns\"),\r\n\t\tfrozen = false,\r\n\t\tok = true;\r\n\t\t\r\n\t\tif(this.options(\"layout\") == \"fitDataTable\"){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with fitDataTable layout mode\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.options(\"responsiveLayout\")){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with responsive columns\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.options(\"rtl\")){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not currently compatible with RTL text direction\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(columns){\r\n\t\t\tfrozen = columns.find((col) => {\r\n\t\t\t\treturn col.frozen;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(frozen){\r\n\t\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with frozen columns\");\r\n\t\t\t\tok = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// if(!ok){\r\n\t\t// \toptions.virtualDomHoz = false;\r\n\t\t// }\r\n\t\t\r\n\t\treturn ok;\r\n\t}\r\n\t\r\n\tlayoutCheck(){\r\n\t\tthis.isFitData = this.options(\"layout\").startsWith('fitData');\r\n\t}\r\n\r\n\tvertScrollListen(){\r\n\t\tthis.subscribe(\"scroll-vertical\", this.clearVisRowCache.bind(this));\r\n\t\tthis.subscribe(\"data-refreshed\", this.clearVisRowCache.bind(this));\r\n\t}\r\n\r\n\tclearVisRowCache(){\r\n\t\tthis.visibleRows = null;\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t///////// Public Functions ///////////\r\n\t//////////////////////////////////////\r\n\t\r\n\trenderColumns(row, force){\r\n\t\tthis.dataChange();\r\n\t}\r\n\r\n\t\r\n\tscrollColumns(left, dir){\r\n\t\tif(this.scrollLeft != left){\r\n\t\t\tthis.scrollLeft = left;\r\n\t\t\t\r\n\t\t\tthis.scroll(left - (this.vDomScrollPosLeft + this.windowBuffer));\r\n\t\t}\r\n\t}\r\n\t\r\n\tcalcWindowBuffer(){\r\n\t\tvar buffer = this.elementVertical.clientWidth;\r\n\t\t\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvar width = column.getWidth();\r\n\t\t\t\t\r\n\t\t\t\tif(width > buffer){\r\n\t\t\t\t\tbuffer = width;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.windowBuffer = buffer * 2;\r\n\t}\r\n\t\r\n\trerenderColumns(update, blockRedraw){\t\t\r\n\t\tvar old = {\r\n\t\t\tcols:this.columns,\r\n\t\t\tleftCol:this.leftCol,\r\n\t\t\trightCol:this.rightCol,\r\n\t\t},\r\n\t\tcolPos = 0;\r\n\t\t\r\n\t\t\r\n\t\tif(update && !this.initialized){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tthis.clear();\r\n\t\t\r\n\t\tthis.calcWindowBuffer();\r\n\t\t\r\n\t\tthis.scrollLeft = this.elementVertical.scrollLeft;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = this.scrollLeft - this.windowBuffer;\r\n\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\r\n\t\t\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tvar config = {};\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvar width = column.getWidth();\r\n\t\t\t\t\r\n\t\t\t\tconfig.leftPos = colPos;\r\n\t\t\t\tconfig.rightPos = colPos + width;\r\n\t\t\t\t\r\n\t\t\t\tconfig.width = width;\r\n\t\t\t\t\r\n\t\t\t\tif (this.isFitData) {\r\n\t\t\t\t\tconfig.fitDataCheck = column.modules.vdomHoz ? column.modules.vdomHoz.fitDataCheck : true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif((colPos + width > this.vDomScrollPosLeft) && (colPos < this.vDomScrollPosRight)){\r\n\t\t\t\t\t//column is visible\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.leftCol == -1){\r\n\t\t\t\t\t\tthis.leftCol = this.columns.length;\r\n\t\t\t\t\t\tthis.vDomPadLeft = colPos;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.rightCol = this.columns.length;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// column is hidden\r\n\t\t\t\t\tif(this.leftCol !== -1){\r\n\t\t\t\t\t\tthis.vDomPadRight += width;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.columns.push(column);\r\n\t\t\t\t\r\n\t\t\t\tcolumn.modules.vdomHoz = config;\r\n\t\t\t\t\r\n\t\t\t\tcolPos += width;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t\r\n\t\tthis.initialized = true;\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tif(!update || this.reinitChanged(old)){\r\n\t\t\t\tthis.reinitializeRows();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.elementVertical.scrollLeft = this.scrollLeft;\r\n\t}\r\n\t\r\n\trenderRowCells(row){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.initializeRow(row);\r\n\t\t}else{\r\n\t\t\trow.cells.forEach((cell) => {\r\n\t\t\t\trow.element.appendChild(cell.getElement());\r\n\t\t\t\tcell.cellRendered();\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\trerenderRowCells(row, force){\r\n\t\tthis.reinitializeRow(row, force);\r\n\t}\r\n\t\r\n\treinitializeColumnWidths(columns){\r\n\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\r\n\t\t\tthis.columns[i].reinitializeWidth();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t//////// Internal Rendering //////////\r\n\t//////////////////////////////////////\r\n\t\r\n\tdeinitialize(){\r\n\t\tthis.initialized = false;\r\n\t}\r\n\t\r\n\tclear(){\r\n\t\tthis.columns = [];\r\n\t\t\r\n\t\tthis.leftCol = -1;\r\n\t\tthis.rightCol = 0;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = 0;\r\n\t\tthis.vDomScrollPosRight = 0;\r\n\t\tthis.vDomPadLeft = 0;\r\n\t\tthis.vDomPadRight = 0;\r\n\t}\r\n\t\r\n\tdataChange(){\r\n\t\tvar change = false,\r\n\t\tcollsWidth = 0,\r\n\t\tcolEnd = 0,\r\n\t\tgroup, row, rowEl;\r\n\t\t\r\n\t\tif(this.isFitData){\r\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\t\tif(!column.definition.width && column.visible){\r\n\t\t\t\t\tchange = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(change){\r\n\t\t\t\tif(change && this.table.rowManager.getDisplayRows().length){\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar row = this.chain(\"rows-sample\", [1], [], () => {\r\n\t\t\t\t\t\treturn this.table.rowManager.getDisplayRows();\r\n\t\t\t\t\t})[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trowEl = row.getElement();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trow.generateCells();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.tableElement.appendChild(rowEl);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfor(var colEnd = 0; colEnd < row.cells.length; colEnd++){\r\n\t\t\t\t\t\t\tlet cell = row.cells[colEnd];\r\n\t\t\t\t\t\t\trowEl.appendChild(cell.getElement());\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcell.column.reinitializeWidth();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcollsWidth += cell.column.getWidth();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// if(collsWidth > this.vDomScrollPosRight){\r\n\t\t\t\t\t\t\t// \tbreak;\r\n\t\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// this.fitDataColAvg = Math.floor(collsWidth / (colEnd + 1));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// for(colEnd; colEnd < this.table.columnManager.columnsByIndex.length; colEnd++){\r\n\t\t\t\t\t\t// \tthis.table.columnManager.columnsByIndex[colEnd].setWidth(this.fitDataColAvg);\r\n\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.rerenderColumns(false, true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.options(\"layout\") === \"fitColumns\"){\r\n\t\t\t\tthis.layoutRefresh();\r\n\t\t\t\tthis.rerenderColumns(false, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitChanged(old){\r\n\t\tvar match = true;\r\n\t\t\r\n\t\tif(old.cols.length !== this.columns.length || old.leftCol !== this.leftCol || old.rightCol !== this.rightCol){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\told.cols.forEach((col, i) => {\r\n\t\t\tif(col !== this.columns[i]){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn !match;\r\n\t}\r\n\t\r\n\treinitializeRows(){\r\n\t\tvar rows = this.getVisibleRows();\r\n\t\trows.forEach((row) => {\r\n\t\t\tthis.reinitializeRow(row, true);\r\n\t\t});\r\n\t}\r\n\t\r\n\tgetVisibleRows(){\r\n\t\tif (!this.visibleRows){\r\n\t\t\tthis.visibleRows = this.table.rowManager.getVisibleRows();\r\n\t\t}\r\n\r\n\t\treturn this.visibleRows;\t\r\n\t}\r\n\t\r\n\tscroll(diff){\r\n\t\tthis.vDomScrollPosLeft += diff;\r\n\t\tthis.vDomScrollPosRight += diff;\r\n\r\n\t\tif(Math.abs(diff) > (this.windowBuffer / 2)){\r\n\t\t\tthis.rerenderColumns();\r\n\t\t}else{\r\n\t\t\tif(diff > 0){\r\n\t\t\t\t//scroll right\r\n\t\t\t\tthis.addColRight();\r\n\t\t\t\tthis.removeColLeft();\r\n\t\t\t}else{\r\n\t\t\t\t//scroll left\r\n\t\t\t\tthis.addColLeft();\r\n\t\t\t\tthis.removeColRight();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tcolPositionAdjust (start, end, diff){\r\n\t\tfor(let i = start; i < end; i++){\r\n\t\t\tlet column = this.columns[i];\r\n\t\t\t\r\n\t\t\tcolumn.modules.vdomHoz.leftPos += diff;\r\n\t\t\tcolumn.modules.vdomHoz.rightPos += diff;\r\n\t\t}\r\n\t}\r\n\t\r\n\taddColRight(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\t\r\n\t\t\tlet column = this.columns[this.rightCol + 1];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.leftPos <= this.vDomScrollPosRight){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\trow.getElement().appendChild(cell.getElement());\r\n\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.fitDataColActualWidthCheck(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.rightCol++; // Don't move this below the >= check below\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.rightCol >= (this.columns.length - 1)){\r\n\t\t\t\t\t\tthis.vDomPadRight = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomPadRight -= column.getWidth();\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\taddColLeft(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.leftCol - 1];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.rightPos >= this.vDomScrollPosLeft){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\trow.getElement().prepend(cell.getElement());\r\n\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.leftCol--; // don't move this below the <= check below\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.leftCol <= 0){ // replicating logic in addColRight\r\n\t\t\t\t\t\tthis.vDomPadLeft = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomPadLeft -= column.getWidth();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tlet diff = this.fitDataColActualWidthCheck(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(diff){\r\n\t\t\t\t\t\tthis.scrollLeft = this.elementVertical.scrollLeft = this.elementVertical.scrollLeft + diff;\r\n\t\t\t\t\t\tthis.vDomPadRight -= diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveColRight(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.rightCol];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.leftPos > this.vDomScrollPosRight){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\trow.getElement().removeChild(cell.getElement());\r\n\t\t\t\t\t\t\t} catch (ex) {\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Could not removeColRight\", ex.message)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomPadRight += column.getWidth();\r\n\t\t\t\t\tthis.rightCol --;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveColLeft(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.leftCol];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.rightPos < this.vDomScrollPosLeft){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\t\t\t\t\t\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\trow.getElement().removeChild(cell.getElement());\r\n\t\t\t\t\t\t\t} catch (ex) {\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Could not removeColLeft\", ex.message)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomPadLeft += column.getWidth();\r\n\t\t\t\t\tthis.leftCol ++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\tfitDataColActualWidthCheck(column){\r\n\t\tvar newWidth, widthDiff;\r\n\t\t\r\n\t\tif(column.modules.vdomHoz.fitDataCheck){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t\t\r\n\t\t\tnewWidth = column.getWidth();\r\n\t\t\twidthDiff = newWidth - column.modules.vdomHoz.width;\r\n\t\t\t\r\n\t\t\tif(widthDiff){\r\n\t\t\t\tcolumn.modules.vdomHoz.rightPos += widthDiff;\r\n\t\t\t\tcolumn.modules.vdomHoz.width = newWidth;\r\n\t\t\t\tthis.colPositionAdjust(this.columns.indexOf(column) + 1, this.columns.length, widthDiff);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcolumn.modules.vdomHoz.fitDataCheck = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn widthDiff;\r\n\t}\r\n\t\r\n\tinitializeRow(row){\r\n\t\tif(row.type !== \"group\"){\r\n\t\t\trow.modules.vdomHoz = {\r\n\t\t\t\tleftCol:this.leftCol,\r\n\t\t\t\trightCol:this.rightCol,\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\r\n\t\t\t\tlet column = this.columns[i];\r\n\t\t\t\t\r\n\t\t\t\tif(column && column.visible){\r\n\t\t\t\t\tlet cell = row.getCell(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\trow.getElement().appendChild(cell.getElement());\r\n\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitializeRow(row, force){\r\n\t\tif(row.type !== \"group\"){\r\n\t\t\tif(force || !row.modules.vdomHoz || row.modules.vdomHoz.leftCol !== this.leftCol || row.modules.vdomHoz.rightCol !== this.rightCol){\r\n\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\twhile(rowEl.firstChild) rowEl.removeChild(rowEl.firstChild);\r\n\t\t\t\t\r\n\t\t\t\tthis.initializeRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\nimport Column from './column/Column.js';\r\nimport ColumnComponent from './column/ColumnComponent.js';\r\nimport Helpers from './tools/Helpers.js';\r\nimport OptionsList from './tools/OptionsList.js';\r\n\r\nimport RendererBasicHorizontal from './rendering/renderers/BasicHorizontal.js';\r\nimport RendererVirtualDomHorizontal from './rendering/renderers/VirtualDomHorizontal.js';\r\n\r\nimport defaultColumnOptions from './column/defaults/options.js';\r\n\r\nexport default class ColumnManager extends CoreFeature {\r\n\r\n\tconstructor (table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.blockHozScrollEvent = false;\r\n\t\tthis.headersElement = null;\r\n\t\tthis.element = null ; //containing element\r\n\t\tthis.columns = []; // column definition object\r\n\t\tthis.columnsByIndex = []; //columns by index\r\n\t\tthis.columnsByField = {}; //columns by field\r\n\t\tthis.scrollLeft = 0;\r\n\t\tthis.optionsList = new OptionsList(this.table, \"column definition\", defaultColumnOptions);\r\n\r\n\t\tthis.renderer = null;\r\n\t}\r\n\r\n\t////////////// Setup Functions /////////////////\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeRenderer();\r\n\r\n\t\tthis.headersElement = this.createHeadersElement();\r\n\t\tthis.element = this.createHeaderElement();\r\n\r\n\t\tthis.element.insertBefore(this.headersElement, this.element.firstChild);\r\n\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t}\r\n\r\n\tinitializeRenderer(){\r\n\t\tvar renderClass;\r\n\r\n\t\tvar renderers = {\r\n\t\t\t\"virtual\": RendererVirtualDomHorizontal,\r\n\t\t\t\"basic\": RendererBasicHorizontal,\r\n\t\t};\r\n\r\n\t\tif(typeof this.table.options.renderHorizontal === \"string\"){\r\n\t\t\trenderClass = renderers[this.table.options.renderHorizontal];\r\n\t\t}else{\r\n\t\t\trenderClass = this.table.options.renderHorizontal;\r\n\t\t}\r\n\r\n\t\tif(renderClass){\r\n\t\t\tthis.renderer = new renderClass(this.table, this.element, this.tableElement);\r\n\t\t\tthis.renderer.initialize();\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Unable to find matching renderer:\", table.options.renderHorizontal);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tcreateHeadersElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-headers\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateHeaderElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-header\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\r\n\t\tif(!this.table.options.headerVisible){\r\n\t\t\tel.classList.add(\"tabulator-header-hidden\");\r\n\t\t}\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\t//return containing element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\t//return header containing element\r\n\tgetHeadersElement(){\r\n\t\treturn this.headersElement;\r\n\t}\r\n\r\n\t//scroll horizontally to match table body\r\n\tscrollHorizontal(left){\r\n\t\tvar hozAdjust = 0,\r\n\t\tscrollWidth = this.element.scrollWidth - this.table.element.clientWidth;\r\n\r\n\t\t// this.tempScrollBlock();\r\n\t\tthis.element.scrollLeft = left;\r\n\r\n\t\t//adjust for vertical scrollbar moving table when present\r\n\t\tif(left > scrollWidth){\r\n\t\t\thozAdjust = left - scrollWidth;\r\n\t\t\tthis.element.style.marginLeft = (-(hozAdjust)) + \"px\";\r\n\t\t}else{\r\n\t\t\tthis.element.style.marginLeft = 0;\r\n\t\t}\r\n\r\n\t\tthis.scrollLeft = left;\r\n\r\n\t\tthis.renderer.scrollColumns(left);\r\n\t}\r\n\r\n\t///////////// Column Setup Functions /////////////\r\n\tgenerateColumnsFromRowData(data){\r\n\t\tvar cols = [],\r\n\t\tdefinitions = this.table.options.autoColumnsDefinitions,\r\n\t\trow, sorter;\r\n\r\n\t\tif(data && data.length){\r\n\r\n\t\t\trow = data[0];\r\n\r\n\t\t\tfor(var key in row){\r\n\t\t\t\tlet col = {\r\n\t\t\t\t\tfield:key,\r\n\t\t\t\t\ttitle:key,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tlet value = row[key];\r\n\r\n\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tif(Array.isArray(value)){\r\n\t\t\t\t\t\tsorter = \"array\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){\r\n\t\t\t\t\t\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcol.sorter = sorter;\r\n\r\n\t\t\t\tcols.push(col);\r\n\t\t\t}\r\n\r\n\t\t\tif(definitions){\r\n\r\n\t\t\t\tswitch(typeof definitions){\r\n\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\tthis.table.options.columns = definitions.call(this.table, cols);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tif(Array.isArray(definitions)){\r\n\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\tvar match = definitions.find((def) => {\r\n\t\t\t\t\t\t\t\treturn def.field === col.field;\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tif(match){\r\n\t\t\t\t\t\t\t\tObject.assign(col, match);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\tif(definitions[col.field]){\r\n\t\t\t\t\t\t\t\tObject.assign(col, definitions[col.field]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.table.options.columns = cols;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.options.columns = cols;\r\n\t\t\t}\r\n\r\n\t\t\tthis.setColumns(this.table.options.columns);\r\n\t\t}\r\n\t}\r\n\r\n\tsetColumns(cols, row){\r\n\t\twhile(this.headersElement.firstChild) this.headersElement.removeChild(this.headersElement.firstChild);\r\n\r\n\t\tthis.columns = [];\r\n\t\tthis.columnsByIndex = [];\r\n\t\tthis.columnsByField = {};\r\n\r\n\t\tthis.dispatch(\"columns-loading\");\r\n\r\n\t\tcols.forEach((def, i) => {\r\n\t\t\tthis._addColumn(def);\r\n\t\t});\r\n\r\n\t\tthis._reIndexColumns();\r\n\r\n\t\tthis.dispatch(\"columns-loaded\");\r\n\r\n\t\tthis.renderer.rerenderColumns(false, true);\r\n\r\n\t\tthis.redraw(true);\r\n\t}\r\n\r\n\t_addColumn(definition, before, nextToColumn){\r\n\t\tvar column = new Column(definition, this),\r\n\t\tcolEl = column.getElement(),\r\n\t\tindex = nextToColumn ? this.findColumnIndex(nextToColumn) : nextToColumn;\r\n\r\n\t\tif(nextToColumn && index > -1){\r\n\t\t\tvar topColumn = nextToColumn.getTopColumn()\r\n\t\t\tvar parentIndex = this.columns.indexOf(topColumn);\r\n\t\t\tvar nextEl = topColumn.getElement();\r\n\r\n\t\t\tif(before){\r\n\t\t\t\tthis.columns.splice(parentIndex, 0, column);\r\n\t\t\t\tnextEl.parentNode.insertBefore(colEl, nextEl);\r\n\t\t\t}else{\r\n\t\t\t\tthis.columns.splice(parentIndex + 1, 0, column);\r\n\t\t\t\tnextEl.parentNode.insertBefore(colEl, nextEl.nextSibling);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(before){\r\n\t\t\t\tthis.columns.unshift(column);\r\n\t\t\t\tthis.headersElement.insertBefore(column.getElement(), this.headersElement.firstChild);\r\n\t\t\t}else{\r\n\t\t\t\tthis.columns.push(column);\r\n\t\t\t\tthis.headersElement.appendChild(column.getElement());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcolumn.columnRendered();\r\n\r\n\t\treturn column;\r\n\t}\r\n\r\n\tregisterColumnField(col){\r\n\t\tif(col.definition.field){\r\n\t\t\tthis.columnsByField[col.definition.field] = col;\r\n\t\t}\r\n\t}\r\n\r\n\tregisterColumnPosition(col){\r\n\t\tthis.columnsByIndex.push(col);\r\n\t}\r\n\r\n\t_reIndexColumns(){\r\n\t\tthis.columnsByIndex = [];\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.reRegisterPosition();\r\n\t\t});\r\n\t}\r\n\r\n\t//ensure column headers take up the correct amount of space in column groups\r\n\tverticalAlignHeaders(){\r\n\t\tvar minHeight = 0;\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\tvar height;\r\n\r\n\t\t\tcolumn.clearVerticalAlign();\r\n\r\n\t\t\theight = column.getHeight();\r\n\r\n\t\t\tif(height > minHeight){\r\n\t\t\t\tminHeight = height;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\tcolumn.verticalAlign(this.table.options.columnHeaderVertAlign, minHeight);\r\n\t\t});\r\n\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\t//////////////// Column Details /////////////////\r\n\tfindColumn(subject){\r\n\t\tif(typeof subject == \"object\"){\r\n\r\n\t\t\tif(subject instanceof Column){\r\n\t\t\t\t//subject is column element\r\n\t\t\t\treturn subject;\r\n\t\t\t}else if(subject instanceof ColumnComponent){\r\n\t\t\t\t//subject is public column component\r\n\t\t\t\treturn subject._getSelf() || false;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\t//subject is a HTML element of the column header\r\n\t\t\t\tlet match = this.columns.find((column) => {\r\n\t\t\t\t\treturn column.element === subject;\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn match || false;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the field name of the column\r\n\t\t\treturn this.columnsByField[subject] || false;\r\n\t\t}\r\n\r\n\t\t//catch all for any other type of input\r\n\t\treturn false;\r\n\t}\r\n\r\n\tgetColumnByField(field){\r\n\t\treturn this.columnsByField[field];\r\n\t}\r\n\r\n\tgetColumnsByFieldRoot(root){\r\n\t\tvar matches = [];\r\n\r\n\t\tObject.keys(this.columnsByField).forEach((field) => {\r\n\t\t\tvar fieldRoot = field.split(\".\")[0];\r\n\t\t\tif(fieldRoot === root){\r\n\t\t\t\tmatches.push(this.columnsByField[field]);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn matches;\r\n\t}\r\n\r\n\tgetColumnByIndex(index){\r\n\t\treturn this.columnsByIndex[index];\r\n\t}\r\n\r\n\tgetFirstVisibleColumn(index){\r\n\t\tvar index = this.columnsByIndex.findIndex((col) => {\r\n\t\t\treturn col.visible;\r\n\t\t});\r\n\r\n\t\treturn index > -1 ? this.columnsByIndex[index] : false;\r\n\t}\r\n\r\n\tgetColumns(){\r\n\t\treturn this.columns;\r\n\t}\r\n\r\n\tfindColumnIndex(column){\r\n\t\treturn this.columnsByIndex.findIndex((col) => {\r\n\t\t\treturn column === col;\r\n\t\t});\r\n\t}\r\n\r\n\t//return all columns that are not groups\r\n\tgetRealColumns(){\r\n\t\treturn this.columnsByIndex;\r\n\t}\r\n\r\n\t//travers across columns and call action\r\n\ttraverse(callback){\r\n\t\tthis.columnsByIndex.forEach((column,i) =>{\r\n\t\t\tcallback(column, i);\r\n\t\t});\r\n\t}\r\n\r\n\t//get defintions of actual columns\r\n\tgetDefinitions(active){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tif(!active || (active && column.visible)){\r\n\t\t\t\toutput.push(column.getDefinition());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//get full nested definition tree\r\n\tgetDefinitionTree(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\toutput.push(column.getDefinition(true));\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetComponents(structured){\r\n\t\tvar output = [],\r\n\t\tcolumns = structured ? this.columns : this.columnsByIndex;\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\toutput.push(column.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\tvar width = 0;\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tif(column.visible){\r\n\t\t\t\twidth += column.getWidth();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn width;\r\n\t}\r\n\r\n\tmoveColumn(from, to, after){\r\n\t\tthis.moveColumnActual(from, to, after);\r\n\r\n\t\tto.element.parentNode.insertBefore(from.element, to.element);\r\n\r\n\t\tif(after){\r\n\t\t\tto.element.parentNode.insertBefore(to.element, from.element);\r\n\t\t}\r\n\r\n\t\tthis.verticalAlignHeaders();\r\n\r\n\t\tthis.table.rowManager.reinitialize();\r\n\t}\r\n\r\n\tmoveColumnActual(from, to, after){\r\n\t\tif(from.parent.isGroup){\r\n\t\t\tthis._moveColumnInArray(from.parent.columns, from, to, after);\r\n\t\t}else{\r\n\t\t\tthis._moveColumnInArray(this.columns, from, to, after);\r\n\t\t}\r\n\r\n\t\tthis._moveColumnInArray(this.columnsByIndex, from, to, after, true);\r\n\r\n\t\tthis.renderer.rerenderColumns(true);\r\n\r\n\t\tthis.dispatch(\"column-moved\", from, to, after);\r\n\r\n\t\tif(this.subscribedExternal(\"columnMoved\")){\r\n\t\t\tthis.dispatchExternal(\"columnMoved\", from.getComponent(), this.table.columnManager.getComponents());\r\n\t\t}\r\n\t}\r\n\r\n\t_moveColumnInArray(columns, from, to, after, updateRows){\r\n\t\tvar\tfromIndex = columns.indexOf(from),\r\n\t\ttoIndex, rows = [];\r\n\r\n\t\tif (fromIndex > -1) {\r\n\r\n\t\t\tcolumns.splice(fromIndex, 1);\r\n\r\n\t\t\ttoIndex = columns.indexOf(to);\r\n\r\n\t\t\tif (toIndex > -1) {\r\n\r\n\t\t\t\tif(after){\r\n\t\t\t\t\ttoIndex = toIndex+1;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\ttoIndex = fromIndex;\r\n\t\t\t}\r\n\r\n\t\t\tcolumns.splice(toIndex, 0, from);\r\n\r\n\t\t\tif(updateRows){\r\n\r\n\t\t\t\trows = this.chain(\"column-moving-rows\", [from, to, after], null, []) || [];\r\n\r\n\t\t\t\trows = rows.concat(this.table.rowManager.rows);\r\n\r\n\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\tif(row.cells.length){\r\n\t\t\t\t\t\tvar cell = row.cells.splice(fromIndex, 1)[0];\r\n\t\t\t\t\t\trow.cells.splice(toIndex, 0, cell);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscrollToColumn(column, position, ifVisible){\r\n\t\tvar left = 0,\r\n\t\toffset = 0,\r\n\t\tadjust = 0,\r\n\t\tcolEl = column.getElement();\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\r\n\t\t\tif(typeof position === \"undefined\"){\r\n\t\t\t\tposition = this.table.options.scrollToColumnPosition;\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof ifVisible === \"undefined\"){\r\n\t\t\t\tifVisible = this.table.options.scrollToColumnIfVisible;\r\n\t\t\t}\r\n\r\n\t\t\tif(column.visible){\r\n\r\n\t\t\t\t//align to correct position\r\n\t\t\t\tswitch(position){\r\n\t\t\t\t\tcase \"middle\":\r\n\t\t\t\t\tcase \"center\":\r\n\t\t\t\t\tadjust = -this.element.clientWidth / 2;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"right\":\r\n\t\t\t\t\tadjust = colEl.clientWidth - this.headersElement.clientWidth;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//check column visibility\r\n\t\t\t\tif(!ifVisible){\r\n\r\n\t\t\t\t\toffset = colEl.offsetLeft;\r\n\r\n\t\t\t\t\tif(offset > 0 && offset + colEl.offsetWidth < this.element.clientWidth){\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//calculate scroll position\r\n\t\t\t\tleft = colEl.offsetLeft + adjust;\r\n\r\n\t\t\t\tleft = Math.max(Math.min(left, this.table.rowManager.element.scrollWidth - this.table.rowManager.element.clientWidth),0);\r\n\r\n\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\tthis.scrollHorizontal(left);\r\n\r\n\t\t\t\tresolve();\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - Column not visible\");\r\n\t\t\t\treject(\"Scroll Error - Column not visible\");\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\tgenerateCells(row){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tcells.push(column.generateCell(row));\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\t//////////////// Column Management /////////////////\r\n\tgetFlexBaseWidth(){\r\n\t\tvar totalWidth = this.table.element.clientWidth, //table element width\r\n\t\tfixedWidth = 0;\r\n\r\n\t\t//adjust for vertical scrollbar if present\r\n\t\tif(this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight){\r\n\t\t\ttotalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth;\r\n\t\t}\r\n\r\n\t\tthis.columnsByIndex.forEach(function(column){\r\n\t\t\tvar width, minWidth, colWidth;\r\n\r\n\t\t\tif(column.visible){\r\n\r\n\t\t\t\twidth = column.definition.width || 0;\r\n\r\n\t\t\t\tminWidth = parseInt(column.minWidth);\r\n\r\n\t\t\t\tif(typeof(width) == \"string\"){\r\n\t\t\t\t\tif(width.indexOf(\"%\") > -1){\r\n\t\t\t\t\t\tcolWidth = (totalWidth / 100) * parseInt(width) ;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tcolWidth = parseInt(width);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolWidth = width;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn fixedWidth;\r\n\t}\r\n\r\n\taddColumn(definition, before, nextToColumn){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar column = this._addColumn(definition, before, nextToColumn);\r\n\r\n\t\t\tthis._reIndexColumns();\r\n\r\n\t\t\tthis.dispatch(\"column-add\", definition, before, nextToColumn);\r\n\r\n\t\t\tif(this.layoutMode() != \"fitColumns\"){\r\n\t\t\t\tcolumn.reinitializeWidth();\r\n\t\t\t}\r\n\r\n\t\t\tthis.redraw(true);\r\n\r\n\t\t\tthis.table.rowManager.reinitialize();\r\n\r\n\t\t\tthis.renderer.rerenderColumns();\r\n\r\n\t\t\tresolve(column);\r\n\t\t});\r\n\t}\r\n\r\n\t//remove column from system\r\n\tderegisterColumn(column){\r\n\t\tvar field = column.getField(),\r\n\t\tindex;\r\n\r\n\t\t//remove from field list\r\n\t\tif(field){\r\n\t\t\tdelete this.columnsByField[field];\r\n\t\t}\r\n\r\n\t\t//remove from index list\r\n\t\tindex = this.columnsByIndex.indexOf(column);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columnsByIndex.splice(index, 1);\r\n\t\t}\r\n\r\n\t\t//remove from column list\r\n\t\tindex = this.columns.indexOf(column);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columns.splice(index, 1);\r\n\t\t}\r\n\r\n\t\tthis.verticalAlignHeaders();\r\n\r\n\t\tthis.redraw();\r\n\t}\r\n\r\n\t//redraw columns\r\n\tredraw(force){\r\n\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\tthis.verticalAlignHeaders();\r\n\t\t}\r\n\r\n\t\tif(force){\r\n\t\t\tthis.table.rowManager.resetScroll();\r\n\t\t\tthis.table.rowManager.reinitialize();\r\n\t\t}\r\n\r\n\t\tif(!this.confirm(\"table-redrawing\", force)){\r\n\t\t\tthis.layoutRefresh();\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"table-redraw\", force);\r\n\r\n\t\tthis.table.footerManager.redraw();\r\n\t}\r\n}","//public row object\r\nexport default class RowComponent {\r\n\r\n\tconstructor (row){\r\n\t\tthis._row = row;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._row.table.componentFunctionBinder.handle(\"row\", target._row, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\treturn this._row.getData(transform);\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._row.getElement();\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._row.getCells().forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar cell = this._row.getCell(column);\r\n\t\treturn cell ? cell.getComponent() : false;\r\n\t}\r\n\r\n\tgetIndex(){\r\n\t\treturn this._row.getData(\"data\")[this._row.table.options.index];\r\n\t}\r\n\r\n\tgetPosition(active){\r\n\t\treturn this._row.table.rowManager.getRowPosition(this._row, active);\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn this._row.delete();\r\n\t}\r\n\r\n\tscrollTo(){\r\n\t\treturn this._row.table.rowManager.scrollToRow(this._row);\r\n\t}\r\n\r\n\tmove(to, after){\r\n\t\tthis._row.moveToRow(to, after);\r\n\t}\r\n\r\n\tupdate(data){\r\n\t\treturn this._row.updateData(data);\r\n\t}\r\n\r\n\tnormalizeHeight(){\r\n\t\tthis._row.normalizeHeight(true);\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._row;\r\n\t}\r\n\r\n\treformat(){\r\n\t\treturn this._row.reinitialize();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._row.table;\r\n\t}\r\n\r\n\tgetNextRow(){\r\n\t\tvar row = this._row.nextRow();\r\n\t\treturn row ? row.getComponent() : row;\r\n\t}\r\n\r\n\tgetPrevRow(){\r\n\t\tvar row = this._row.prevRow();\r\n\t\treturn row ? row.getComponent() : row;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport RowComponent from './RowComponent.js';\r\nimport Helpers from '../tools/Helpers.js';\r\n\r\nexport default class Row extends CoreFeature{\r\n\tconstructor (data, parent, type = \"row\"){\r\n\t\tsuper(parent.table);\r\n\r\n\t\tthis.parent = parent;\r\n\t\tthis.data = {};\r\n\t\tthis.type = type; //type of element\r\n\t\tthis.element = false;\r\n\t\tthis.modules = {}; //hold module variables;\r\n\t\tthis.cells = [];\r\n\t\tthis.height = 0; //hold element height\r\n\t\tthis.heightStyled = \"\"; //hold element height prestyled to improve render efficiency\r\n\t\tthis.manualHeight = false; //user has manually set row height\r\n\t\tthis.outerHeight = 0; //holde lements outer height\r\n\t\tthis.initialized = false; //element has been rendered\r\n\t\tthis.heightInitialized = false; //element has resized cells to fit\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\tthis.created = false;\r\n\r\n\t\tthis.setData(data);\r\n\t}\r\n\r\n\tcreate(){\r\n\t\tif(!this.created){\r\n\t\t\tthis.created = true;\r\n\t\t\tthis.generateElement();\r\n\t\t}\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\r\n\t\tthis.element = el;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\tthis.create();\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tdetachElement(){\r\n\t\tif (this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateElement(){\r\n\t\tthis.createElement();\r\n\t\tthis.dispatch(\"row-init\", this);\r\n\t}\r\n\r\n\tgenerateCells(){\r\n\t\tthis.cells = this.table.columnManager.generateCells(this);\r\n\t}\r\n\r\n\t//functions to setup on first render\r\n\tinitialize(force){\r\n\t\tthis.create();\r\n\r\n\t\tif(!this.initialized || force){\r\n\r\n\t\t\tthis.deleteCells();\r\n\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\tthis.dispatch(\"row-layout-before\", this);\r\n\r\n\t\t\tthis.generateCells();\r\n\r\n\t\t\tthis.initialized = true;\r\n\r\n\t\t\tthis.table.columnManager.renderer.renderRowCells(this);\r\n\r\n\t\t\tif(force){\r\n\t\t\t\tthis.normalizeHeight();\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-layout\", this);\r\n\r\n\t\t\tif(this.table.options.rowFormatter){\r\n\t\t\t\tthis.table.options.rowFormatter(this.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-layout-after\", this);\r\n\t\t}else{\r\n\t\t\tthis.table.columnManager.renderer.rerenderRowCells(this);\r\n\t\t}\r\n\t}\r\n\r\n\treinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\r\n\t\tif(this.element && this.element.offsetParent !== null){\r\n\t\t\tthis.normalizeHeight(true);\r\n\t\t}\r\n\t}\r\n\r\n\tdeinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\t}\r\n\r\n\treinitialize(children){\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\r\n\t\tif(!this.manualHeight){\r\n\t\t\tthis.height = 0;\r\n\t\t\tthis.heightStyled = \"\";\r\n\t\t}\r\n\r\n\t\tif(this.element && this.element.offsetParent !== null){\r\n\t\t\tthis.initialize(true);\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"row-relayout\", this);\r\n\t}\r\n\r\n\t//get heights when doing bulk row style calcs in virtual DOM\r\n\tcalcHeight(force){\r\n\r\n\t\tvar maxHeight = 0,\r\n\t\tminHeight = this.table.options.resizableRows ? this.element.clientHeight : 0;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tvar height = cell.getHeight();\r\n\t\t\tif(height > maxHeight){\r\n\t\t\t\tmaxHeight = height;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(force){\r\n\t\t\tthis.height = Math.max(maxHeight, minHeight);\r\n\t\t}else{\r\n\t\t\tthis.height = this.manualHeight ? this.height : Math.max(maxHeight, minHeight);\r\n\t\t}\r\n\r\n\t\tthis.heightStyled = this.height ? this.height + \"px\" : \"\";\r\n\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t}\r\n\r\n\t//set of cells\r\n\tsetCellHeight(){\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setHeight();\r\n\t\t});\r\n\r\n\t\tthis.heightInitialized = true;\r\n\t}\r\n\r\n\tclearCellHeight(){\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.clearHeight();\r\n\t\t});\r\n\t}\r\n\r\n\t//normalize the height of elements in the row\r\n\tnormalizeHeight(force){\r\n\t\tif(force){\r\n\t\t\tthis.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis.calcHeight(force);\r\n\r\n\t\tthis.setCellHeight();\r\n\t}\r\n\r\n\t//set height of rows\r\n\tsetHeight(height, force){\r\n\t\tif(this.height != height || force){\r\n\r\n\t\t\tthis.manualHeight = true;\r\n\r\n\t\t\tthis.height = height;\r\n\t\t\tthis.heightStyled = height ? height + \"px\" : \"\";\r\n\r\n\t\t\tthis.setCellHeight();\r\n\r\n\t\t\t// this.outerHeight = this.element.outerHeight();\r\n\t\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t\t}\r\n\t}\r\n\r\n\t//return rows outer height\r\n\tgetHeight(){\r\n\t\treturn this.outerHeight;\r\n\t}\r\n\r\n\t//return rows outer Width\r\n\tgetWidth(){\r\n\t\treturn this.element.offsetWidth;\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\tdeleteCell(cell){\r\n\t\tvar index = this.cells.indexOf(cell);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.cells.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Data Management /////////////////\r\n\tsetData(data){\r\n\t\tthis.data = this.chain(\"row-data-init-before\", [this, data], undefined, data);\r\n\r\n\t\tthis.dispatch(\"row-data-init-after\", this);\r\n\t}\r\n\r\n\t//update the rows data\r\n\tupdateData(updatedData){\r\n\t\tvar visible = this.element && Helpers.elVisible(this.element),\r\n\t\ttempData = {},\r\n\t\tnewRowData;\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\r\n\t\t\tif(typeof updatedData === \"string\"){\r\n\t\t\t\tupdatedData = JSON.parse(updatedData);\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-save-before\", this);\r\n\r\n\t\t\tif(this.subscribed(\"row-data-changing\")){\r\n\t\t\t\ttempData = Object.assign(tempData, this.data);\r\n\t\t\t\ttempData = Object.assign(tempData, updatedData);\r\n\t\t\t}\r\n\r\n\t\t\tnewRowData = this.chain(\"row-data-changing\", [this, tempData, updatedData], null, updatedData);\r\n\r\n\t\t\t//set data\r\n\t\t\tfor (var attrname in newRowData) {\r\n\t\t\t\tthis.data[attrname] = newRowData[attrname];\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-save-after\", this);\r\n\r\n\t\t\t//update affected cells only\r\n\t\t\tfor (var attrname in updatedData) {\r\n\r\n\t\t\t\tlet columns = this.table.columnManager.getColumnsByFieldRoot(attrname);\r\n\r\n\t\t\t\tcolumns.forEach((column) => {\r\n\t\t\t\t\tlet cell = this.getCell(column.getField());\r\n\r\n\t\t\t\t\tif(cell){\r\n\t\t\t\t\t\tlet value = column.getFieldValue(newRowData);\r\n\t\t\t\t\t\tif(cell.getValue() != value){\r\n\t\t\t\t\t\t\tcell.setValueProcessData(value);\r\n\r\n\t\t\t\t\t\t\tif(visible){\r\n\t\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t//Partial reinitialization if visible\r\n\t\t\tif(visible){\r\n\t\t\t\tthis.normalizeHeight(true);\r\n\r\n\t\t\t\tif(this.table.options.rowFormatter){\r\n\t\t\t\t\tthis.table.options.rowFormatter(this.getComponent());\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.initialized = false;\r\n\t\t\t\tthis.height = 0;\r\n\t\t\t\tthis.heightStyled = \"\";\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-changed\", this, visible, updatedData);\r\n\r\n\t\t\t//this.reinitialize();\r\n\r\n\t\t\tthis.dispatchExternal(\"rowUpdated\", this.getComponent());\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t\t}\r\n\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\tif(transform){\r\n\t\t\treturn this.chain(\"row-data-retrieve\", [this, transform], null, this.data);\r\n\t\t}\r\n\r\n\t\treturn this.data;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar match = false;\r\n\r\n\t\tcolumn = this.table.columnManager.findColumn(column);\r\n\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\r\n\t\tmatch = this.cells.find(function(cell){\r\n\t\t\treturn cell.column === column;\r\n\t\t});\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tgetCellIndex(findCell){\r\n\t\treturn this.cells.findIndex(function(cell){\r\n\t\t\treturn cell === findCell;\r\n\t\t});\r\n\t}\r\n\r\n\tfindCell(subject){\r\n\t\treturn this.cells.find((cell) => {\r\n\t\t\treturn cell.element === subject;\r\n\t\t});\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\r\n\t\treturn this.cells;\r\n\t}\r\n\r\n\tnextRow(){\r\n\t\tvar row = this.table.rowManager.nextDisplayRow(this, true);\r\n\t\treturn row || false;\r\n\t}\r\n\r\n\tprevRow(){\r\n\t\tvar row = this.table.rowManager.prevDisplayRow(this, true);\r\n\t\treturn row || false;\r\n\t}\r\n\r\n\tmoveToRow(to, before){\r\n\t\tvar toRow = this.table.rowManager.findRow(to);\r\n\r\n\t\tif(toRow){\r\n\t\t\tthis.table.rowManager.moveRowActual(this, toRow, !before);\r\n\t\t\tthis.table.rowManager.refreshActiveData(\"display\", false, true);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching row found:\", to);\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////// Actions /////////////////////\r\n\tdelete(){\r\n\t\tthis.dispatch(\"row-delete\", this);\r\n\r\n\t\tthis.deleteActual();\r\n\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\r\n\tdeleteActual(blockRedraw){\r\n\t\tvar index = this.table.rowManager.getRowIndex(this);\r\n\r\n\t\tthis.detatchModules();\r\n\r\n\t\tthis.table.rowManager.deleteRow(this, blockRedraw);\r\n\r\n\t\tthis.deleteCells();\r\n\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\t\tthis.element = false;\r\n\r\n\t\tthis.dispatch(\"row-deleted\", this);\r\n\t}\r\n\r\n\tdetatchModules(){\r\n\t\tthis.dispatch(\"row-deleting\", this);\r\n\t}\r\n\r\n\tdeleteCells(){\r\n\t\tvar cellCount = this.cells.length;\r\n\r\n\t\tfor(let i = 0; i < cellCount; i++){\r\n\t\t\tthis.cells[0].delete();\r\n\t\t}\r\n\t}\r\n\r\n\twipe(){\r\n\t\tthis.detatchModules();\r\n\t\tthis.deleteCells();\r\n\r\n\t\tif(this.element){\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\tif(this.element.parentNode){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.modules = {};\r\n\t}\r\n\r\n\tgetGroup(){\r\n\t\treturn this.modules.group || false;\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new RowComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class BaiscVertical extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.verticalFillMode = \"fill\";\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t}\r\n\r\n\tclearRows(){\r\n\t\tvar element = this.tableElement;\r\n\r\n\t\t// element.children.detach();\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\telement.scrollTop = 0;\r\n\t\telement.scrollLeft = 0;\r\n\r\n\t\telement.style.minWidth = \"\";\r\n\t\telement.style.minHeight = \"\";\r\n\t\telement.style.display = \"\";\r\n\t\telement.style.visibility = \"\";\r\n\t}\r\n\r\n\trenderRows(){\r\n\t\tvar element = this.tableElement,\r\n\t\tonlyGroupHeaders = true;\r\n\r\n\t\tthis.rows().forEach((row, index) => {\r\n\t\t\tthis.styleRow(row, index);\r\n\t\t\telement.appendChild(row.getElement());\r\n\t\t\trow.initialize(true);\r\n\r\n\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\tonlyGroupHeaders = false;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(onlyGroupHeaders){\r\n\t\t\telement.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t}else{\r\n\t\t\telement.style.minWidth = \"\";\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trerenderRows(callback){\r\n\t\tthis.clearRows();\r\n\t\tthis.renderRows();\r\n\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\tvar rowTop = Helpers.elOffset(row.getElement()).top;\r\n\r\n\t\treturn !(Math.abs(this.elementVertical.scrollTop - rowTop) > Math.abs(this.elementVertical.scrollTop + this.elementVertical.clientHeight - rowTop));\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tthis.elementVertical.scrollTop = Helpers.elOffset(rowEl).top - Helpers.elOffset(this.elementVertical).top + this.elementVertical.scrollTop;\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\treturn this.rows();\r\n\t}\r\n\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class VirtualDomVertical extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.verticalFillMode = \"fill\";\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.vDomRowHeight = 20; //approximation of row heights for padding\r\n\r\n\t\tthis.vDomTop = 0; //hold position for first rendered row in the virtual DOM\r\n\t\tthis.vDomBottom = 0; //hold possition for last rendered row in the virtual DOM\r\n\r\n\t\tthis.vDomScrollPosTop = 0; //last scroll position of the vDom top;\r\n\t\tthis.vDomScrollPosBottom = 0; //last scroll position of the vDom bottom;\r\n\r\n\t\tthis.vDomTopPad = 0; //hold value of padding for top of virtual DOM\r\n\t\tthis.vDomBottomPad = 0; //hold value of padding for bottom of virtual DOM\r\n\r\n\t\tthis.vDomMaxRenderChain = 90; //the maximum number of dom elements that can be rendered in 1 go\r\n\r\n\t\tthis.vDomWindowBuffer = 0; //window row buffer before removing elements, to smooth scrolling\r\n\r\n\t\tthis.vDomWindowMinTotalRows = 20; //minimum number of rows to be generated in virtual dom (prevent buffering issues on tables with tall rows)\r\n\t\tthis.vDomWindowMinMarginRows = 5; //minimum number of rows to be generated in virtual dom margin\r\n\r\n\t\tthis.vDomTopNewRows = []; //rows to normalize after appending to optimize render speed\r\n\t\tthis.vDomBottomNewRows = []; //rows to normalize after appending to optimize render speed\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t///////// Public Functions ///////////\r\n\t//////////////////////////////////////\r\n\r\n\tclearRows(){\r\n\t\tvar element = this.tableElement;\r\n\r\n\t\t// element.children.detach();\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\telement.style.paddingTop = \"\";\r\n\t\telement.style.paddingBottom = \"\";\r\n\t\t// element.style.minWidth = \"\";\r\n\t\telement.style.minHeight = \"\";\r\n\t\telement.style.display = \"\";\r\n\t\telement.style.visibility = \"\";\r\n\r\n\t\tthis.elementVertical.scrollTop = 0;\r\n\t\tthis.elementVertical.scrollLeft = 0;\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.vDomTop = 0;\r\n\t\tthis.vDomBottom = 0;\r\n\t\tthis.vDomTopPad = 0;\r\n\t\tthis.vDomBottomPad = 0;\r\n\t\tthis.vDomScrollPosTop = 0;\r\n\t\tthis.vDomScrollPosBottom = 0;\r\n\t}\r\n\r\n\trenderRows(){\r\n\t\tthis._virtualRenderFill();\r\n\t}\r\n\r\n\trerenderRows(callback){\r\n\t\tvar scrollTop = this.elementVertical.scrollTop;\r\n\t\tvar topRow = false;\r\n\t\tvar topOffset = false;\r\n\r\n\t\tvar left = this.table.rowManager.scrollLeft;\r\n\r\n\t\tvar rows = this.rows();\r\n\r\n\t\tfor(var i = this.vDomTop; i <= this.vDomBottom; i++){\r\n\r\n\t\t\tif(rows[i]){\r\n\t\t\t\tvar diff = scrollTop - rows[i].getElement().offsetTop;\r\n\r\n\t\t\t\tif(topOffset === false || Math.abs(diff) < topOffset){\r\n\t\t\t\t\ttopOffset = diff;\r\n\t\t\t\t\ttopRow = i;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\trows.forEach((row) => {\r\n\t\t\trow.deinitializeHeight();\r\n\t\t});\r\n\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\r\n\t\tthis._virtualRenderFill((topRow === false ? this.rows.length - 1 : topRow), true, topOffset || 0);\r\n\r\n\t\tthis.scrollColumns(left);\r\n\t}\r\n\r\n\tscrollColumns(left){\r\n\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t}\r\n\r\n\tscrollRows(top, dir){\r\n\t\tvar topDiff = top - this.vDomScrollPosTop;\r\n\t\tvar bottomDiff = top - this.vDomScrollPosBottom;\r\n\t\tvar margin = this.vDomWindowBuffer * 2;\r\n\t\tvar rows = this.rows();\r\n\r\n\t\tthis.scrollTop = top;\r\n\r\n\t\tif(-topDiff > margin || bottomDiff > margin){\r\n\t\t\t//if big scroll redraw table;\r\n\t\t\tvar left = this.table.rowManager.scrollLeft;\r\n\t\t\tthis._virtualRenderFill(Math.floor((this.elementVertical.scrollTop / this.elementVertical.scrollHeight) * rows.length));\r\n\t\t\tthis.scrollColumns(left);\r\n\t\t}else{\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\t//scrolling up\r\n\t\t\t\tif(topDiff < 0){\r\n\t\t\t\t\tthis._addTopRow(rows, -topDiff);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(bottomDiff < 0){\r\n\t\t\t\t\t//hide bottom row if needed\r\n\t\t\t\t\tif(this.vDomScrollHeight - this.scrollTop > this.vDomWindowBuffer){\r\n\t\t\t\t\t\tthis._removeBottomRow(rows, -bottomDiff);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomScrollPosBottom = this.scrollTop;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\r\n\t\t\t\tif(bottomDiff >= 0){\r\n\t\t\t\t\tthis._addBottomRow(rows, bottomDiff);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//scrolling down\r\n\t\t\t\tif(topDiff >= 0){\r\n\t\t\t\t\t//hide top row if needed\r\n\t\t\t\t\tif(this.scrollTop > this.vDomWindowBuffer){\r\n\t\t\t\t\t\tthis._removeTopRow(rows, topDiff);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomScrollPosTop = this.scrollTop;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tresize(){\r\n\t\tthis.vDomWindowBuffer = this.table.options.renderVerticalBuffer || this.elementVertical.clientHeight;\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\tvar rowIndex = this.rows().indexOf(row);\r\n\r\n\t\treturn !(Math.abs(this.vDomTop - rowIndex) > Math.abs(this.vDomBottom - rowIndex));\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\tvar index = this.rows().indexOf(row);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis._virtualRenderFill(index, true);\r\n\t\t}\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\tvar topEdge = this.elementVertical.scrollTop,\r\n\t\tbottomEdge = this.elementVertical.clientHeight + topEdge,\r\n\t\ttopFound = false,\r\n\t\ttopRow = 0,\r\n\t\tbottomRow = 0,\r\n\t\trows = this.rows();\r\n\r\n\t\tif(includingBuffer){\r\n\t\t\ttopRow = this.vDomTop;\r\n\t\t\tbottomRow = this.vDomBottom;\r\n\t\t}else{\r\n\t\t\tfor(var i = this.vDomTop; i <= this.vDomBottom; i++){\r\n\t\t\t\tif(rows[i]){\r\n\t\t\t\t\tif(!topFound){\r\n\t\t\t\t\t\tif((topEdge - rows[i].getElement().offsetTop) >= 0){\r\n\t\t\t\t\t\t\ttopRow = i;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\ttopFound = true;\r\n\r\n\t\t\t\t\t\t\tif(bottomEdge - rows[i].getElement().offsetTop >= 0){\r\n\t\t\t\t\t\t\t\tbottomRow = i;\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(bottomEdge - rows[i].getElement().offsetTop >= 0){\r\n\t\t\t\t\t\t\tbottomRow = i;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn rows.slice(topRow, bottomRow + 1);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t//////// Internal Rendering //////////\r\n\t//////////////////////////////////////\r\n\r\n\t//full virtual render\r\n\t_virtualRenderFill(position, forceMove, offset){\r\n\t\tvar\telement = this.tableElement,\r\n\t\tholder = this.elementVertical,\r\n\t\ttopPad = 0,\r\n\t\trowsHeight = 0,\r\n\t\theightOccupied = 0,\r\n\t\ttopPadHeight = 0,\r\n\t\ti = 0,\r\n\t\trows = this.rows(),\r\n\t\trowsCount = rows.length,\r\n\t\tcontainerHeight = this.elementVertical.clientHeight;\r\n\r\n\t\tposition = position || 0;\r\n\r\n\t\toffset = offset || 0;\r\n\r\n\t\tif(!position){\r\n\t\t\tthis.clear();\r\n\t\t}else{\r\n\t\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\t\t//check if position is too close to bottom of table\r\n\t\t\theightOccupied = (rowsCount - position + 1) * this.vDomRowHeight;\r\n\r\n\t\t\tif(heightOccupied < containerHeight){\r\n\t\t\t\tposition -= Math.ceil((containerHeight - heightOccupied) / this.vDomRowHeight);\r\n\t\t\t\tif(position < 0){\r\n\t\t\t\t\tposition = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//calculate initial pad\r\n\t\t\ttopPad = Math.min(Math.max(Math.floor(this.vDomWindowBuffer / this.vDomRowHeight), this.vDomWindowMinMarginRows), position);\r\n\t\t\tposition -= topPad;\r\n\t\t}\r\n\r\n\t\tif(rowsCount && Helpers.elVisible(this.elementVertical)){\r\n\t\t\tthis.vDomTop = position;\r\n\r\n\t\t\tthis.vDomBottom = position -1;\r\n\r\n\t\t\twhile ((rowsHeight <= containerHeight + this.vDomWindowBuffer || i < this.vDomWindowMinTotalRows) && this.vDomBottom < rowsCount -1){\r\n\t\t\t\tvar index = this.vDomBottom + 1,\r\n\t\t\t\trow = rows[index],\r\n\t\t\t\trowHeight = 0;\r\n\r\n\t\t\t\tthis.styleRow(row, index);\r\n\r\n\t\t\t\telement.appendChild(row.getElement());\r\n\r\n\t\t\t\trow.initialize();\r\n\r\n\t\t\t\tif(!row.heightInitialized){\r\n\t\t\t\t\trow.normalizeHeight(true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowHeight = row.getHeight();\r\n\r\n\t\t\t\tif(i < topPad){\r\n\t\t\t\t\ttopPadHeight += rowHeight;\r\n\t\t\t\t}else{\r\n\t\t\t\t\trowsHeight += rowHeight;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.vDomBottom ++;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\r\n\t\t\tif(!position){\r\n\t\t\t\tthis.vDomTopPad = 0;\r\n\t\t\t\t//adjust rowheight to match average of rendered elements\r\n\t\t\t\tthis.vDomRowHeight = Math.floor((rowsHeight + topPadHeight) / i);\r\n\t\t\t\tthis.vDomBottomPad = this.vDomRowHeight * (rowsCount - this.vDomBottom -1);\r\n\r\n\t\t\t\tthis.vDomScrollHeight = topPadHeight + rowsHeight + this.vDomBottomPad - containerHeight;\r\n\t\t\t}else{\r\n\t\t\t\tthis.vDomTopPad = !forceMove ? this.scrollTop - topPadHeight : (this.vDomRowHeight * this.vDomTop) + offset;\r\n\t\t\t\tthis.vDomBottomPad = this.vDomBottom == rowsCount-1 ? 0 : Math.max(this.vDomScrollHeight - this.vDomTopPad - rowsHeight - topPadHeight, 0);\r\n\t\t\t}\r\n\r\n\t\t\telement.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\telement.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\r\n\t\t\tif(forceMove){\r\n\t\t\t\tthis.scrollTop = this.vDomTopPad + (topPadHeight) + offset - (this.elementVertical.scrollWidth > this.elementVertical.clientWidth ? this.elementVertical.offsetHeight - containerHeight : 0);\r\n\t\t\t}\r\n\r\n\t\t\tthis.scrollTop = Math.min(this.scrollTop, this.elementVertical.scrollHeight - containerHeight);\r\n\r\n\t\t\t//adjust for horizontal scrollbar if present (and not at top of table)\r\n\t\t\tif(this.elementVertical.scrollWidth > this.elementVertical.offsetWidth && forceMove){\r\n\t\t\t\tthis.scrollTop += this.elementVertical.offsetHeight - containerHeight;\r\n\t\t\t}\r\n\r\n\t\t\tthis.vDomScrollPosTop = this.scrollTop;\r\n\t\t\tthis.vDomScrollPosBottom = this.scrollTop;\r\n\r\n\t\t\tholder.scrollTop = this.scrollTop;\r\n\r\n\t\t\tthis.dispatch(\"render-virtual-fill\");\r\n\t\t}\r\n\t}\r\n\r\n\t_addTopRow(rows, fillableSpace){\r\n\t\tvar table = this.tableElement,\r\n\t\taddedRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\tindex = this.vDomTop -1,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tif(this.vDomTop){\r\n\t\t\t\tlet row = rows[index],\r\n\t\t\t\trowHeight, initialized;\r\n\r\n\t\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\t\t\t\t\tinitialized = row.initialized;\r\n\r\n\t\t\t\t\tif(fillableSpace >= rowHeight){\r\n\r\n\t\t\t\t\t\tthis.styleRow(row, index);\r\n\t\t\t\t\t\ttable.insertBefore(row.getElement(), table.firstChild);\r\n\r\n\t\t\t\t\t\tif(!row.initialized || !row.heightInitialized){\r\n\t\t\t\t\t\t\taddedRows.push(row);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trow.initialize();\r\n\r\n\t\t\t\t\t\tif(!initialized){\r\n\t\t\t\t\t\t\trowHeight = row.getElement().offsetHeight;\r\n\r\n\t\t\t\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\t\tthis.vDomTop--;\r\n\t\t\t\t\t\tindex--;\r\n\t\t\t\t\t\ti++;\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of addedRows){\r\n\t\t\trow.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis._quickNormalizeRowHeight(addedRows);\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomTopPad -= paddingAdjust;\r\n\r\n\t\t\tif(this.vDomTopPad < 0){\r\n\t\t\t\tthis.vDomTopPad = index * this.vDomRowHeight;\r\n\t\t\t}\r\n\r\n\t\t\tif(index < 1){\r\n\t\t\t\tthis.vDomTopPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\ttable.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\tthis.vDomScrollPosTop -= paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_removeTopRow(rows, fillableSpace){\r\n\t\tvar removableRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[this.vDomTop],\r\n\t\t\trowHeight, diff;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\t\t\t\t\tthis.vDomTop++;\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tremovableRows.push(row);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of removableRows){\r\n\t\t\tlet rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomTopPad += paddingAdjust;\r\n\t\t\tthis.tableElement.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\tthis.vDomScrollPosTop += this.vDomTop ? paddingAdjust : paddingAdjust + this.vDomWindowBuffer;\r\n\t\t}\r\n\t}\r\n\r\n\t_addBottomRow(rows, fillableSpace){\r\n\t\tvar table = this.tableElement,\r\n\t\taddedRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\tindex = this.vDomBottom + 1,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[index],\r\n\t\t\trowHeight, initialized;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\t\t\t\tinitialized = row.initialized;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\r\n\t\t\t\t\tthis.styleRow(row, index);\r\n\t\t\t\t\ttable.appendChild(row.getElement());\r\n\r\n\t\t\t\t\tif(!row.initialized || !row.heightInitialized){\r\n\t\t\t\t\t\taddedRows.push(row);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\trow.initialize();\r\n\r\n\t\t\t\t\tif(!initialized){\r\n\t\t\t\t\t\trowHeight = row.getElement().offsetHeight;\r\n\r\n\t\t\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tthis.vDomBottom++;\r\n\t\t\t\t\tindex++;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of addedRows){\r\n\t\t\trow.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis._quickNormalizeRowHeight(addedRows);\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomBottomPad -= paddingAdjust;\r\n\r\n\t\t\tif(this.vDomBottomPad < 0 || index == rows.length -1){\r\n\t\t\t\tthis.vDomBottomPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\ttable.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\t\t\tthis.vDomScrollPosBottom += paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_removeBottomRow(rows, fillableSpace){\r\n\t\tvar removableRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[this.vDomBottom],\r\n\t\t\trowHeight, diff;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\t\t\t\t\tthis.vDomBottom --;\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tremovableRows.push(row);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of removableRows){\r\n\t\t\tlet rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomBottomPad += paddingAdjust;\r\n\r\n\t\t\tif(this.vDomBottomPad < 0){\r\n\t\t\t\tthis.vDomBottomPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\tthis.tableElement.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\t\t\tthis.vDomScrollPosBottom -= paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_quickNormalizeRowHeight(rows){\r\n\t\tfor(let row of rows){\r\n\t\t\trow.calcHeight();\r\n\t\t}\r\n\r\n\t\tfor(let row of rows){\r\n\t\t\trow.setCellHeight();\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\nimport Row from './row/Row.js';\r\nimport RowComponent from './row/RowComponent.js';\r\nimport Helpers from './tools/Helpers.js';\r\n\r\nimport RendererBasicVertical from './rendering/renderers/BasicVertical.js';\r\nimport RendererVirtualDomVertical from './rendering/renderers/VirtualDomVertical.js';\r\n\r\nexport default class RowManager extends CoreFeature{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.element = this.createHolderElement(); //containing element\r\n\t\tthis.tableElement = this.createTableElement(); //table element\r\n\t\tthis.heightFixer = this.createTableElement(); //table element\r\n\t\tthis.placeholder = null; //placeholder element\r\n\t\tthis.placeholderContents = null; //placeholder element\r\n\t\t\r\n\t\tthis.firstRender = false; //handle first render\r\n\t\tthis.renderMode = \"virtual\"; //current rendering mode\r\n\t\tthis.fixedHeight = false; //current rendering mode\r\n\t\t\r\n\t\tthis.rows = []; //hold row data objects\r\n\t\tthis.activeRowsPipeline = []; //hold calculation of active rows\r\n\t\tthis.activeRows = []; //rows currently available to on display in the table\r\n\t\tthis.activeRowsCount = 0; //count of active rows\r\n\t\t\r\n\t\tthis.displayRows = []; //rows currently on display in the table\r\n\t\tthis.displayRowsCount = 0; //count of display rows\r\n\t\t\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.rowNumColumn = false; //hold column component for row number column\r\n\t\t\r\n\t\tthis.redrawBlock = false; //prevent redraws to allow multiple data manipulations before continuing\r\n\t\tthis.redrawBlockRestoreConfig = false; //store latest redraw function calls for when redraw is needed\r\n\t\tthis.redrawBlockRenderInPosition = false; //store latest redraw function calls for when redraw is needed\r\n\t\t\r\n\t\tthis.dataPipeline = []; //hold data pipeline tasks\r\n\t\tthis.displayPipeline = []; //hold data display pipeline tasks\r\n\t\t\r\n\t\tthis.renderer = null;\r\n\t}\r\n\t\r\n\t//////////////// Setup Functions /////////////////\r\n\t\r\n\tcreateHolderElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-tableholder\");\r\n\t\tel.setAttribute(\"tabindex\", 0);\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tcreateTableElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-table\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tinitializePlaceholder(){\r\n\t\t//configure placeholder element\r\n\t\tif(typeof this.table.options.placeholder == \"string\"){\r\n\t\t\tlet el = document.createElement(\"div\");\r\n\t\t\tel.classList.add(\"tabulator-placeholder\");\r\n\t\t\t\r\n\t\t\tlet contents = document.createElement(\"div\");\r\n\t\t\tcontents.classList.add(\"tabulator-placeholder-contents\");\r\n\t\t\tcontents.innerHTML = this.table.options.placeholder;\r\n\t\t\t\r\n\t\t\tel.appendChild(contents);\r\n\t\t\t\r\n\t\t\tthis.placeholderContents = contents;\r\n\t\t\tthis.placeholder = el;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return containing element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\t\r\n\t//return table element\r\n\tgetTableElement(){\r\n\t\treturn this.tableElement;\r\n\t}\r\n\t\r\n\t//return position of row in table\r\n\tgetRowPosition(row, active){\r\n\t\tif(active){\r\n\t\t\treturn this.activeRows.indexOf(row);\r\n\t\t}else{\r\n\t\t\treturn this.rows.indexOf(row);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.initializePlaceholder()\r\n\t\tthis.initializeRenderer();\r\n\t\t\r\n\t\t//initialize manager\r\n\t\tthis.element.appendChild(this.tableElement);\r\n\t\t\r\n\t\tthis.firstRender = true;\r\n\t\t\r\n\t\t//scroll header along with table body\r\n\t\tthis.element.addEventListener(\"scroll\", () => {\r\n\t\t\tvar left = this.element.scrollLeft,\r\n\t\t\tleftDir = this.scrollLeft > left,\r\n\t\t\ttop = this.element.scrollTop,\r\n\t\t\ttopDir = this.scrollTop > top;\r\n\t\t\t\r\n\t\t\t//handle horizontal scrolling\r\n\t\t\tif(this.scrollLeft != left){\r\n\t\t\t\tthis.scrollLeft = left;\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"scroll-horizontal\", left, leftDir);\r\n\t\t\t\tthis.dispatchExternal(\"scrollHorizontal\", left, leftDir);\r\n\r\n\t\t\t\tthis._positionPlaceholder();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//handle vertical scrolling\r\n\t\t\tif(this.scrollTop != top){\r\n\t\t\t\tthis.scrollTop = top;\r\n\t\t\t\t\r\n\t\t\t\tthis.renderer.scrollRows(top, topDir);\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"scroll-vertical\", top, topDir);\r\n\t\t\t\tthis.dispatchExternal(\"scrollVertical\", top, topDir);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t////////////////// Row Manipulation //////////////////\r\n\tfindRow(subject){\r\n\t\tif(typeof subject == \"object\"){\r\n\t\t\tif(subject instanceof Row){\r\n\t\t\t\t//subject is row element\r\n\t\t\t\treturn subject;\r\n\t\t\t}else if(subject instanceof RowComponent){\r\n\t\t\t\t//subject is public row component\r\n\t\t\t\treturn subject._getSelf() || false;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\t//subject is a HTML element of the row\r\n\t\t\t\tlet match = this.rows.find((row) => {\r\n\t\t\t\t\treturn row.getElement() === subject;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\treturn match || false;\r\n\t\t\t}\r\n\t\t}else if(typeof subject == \"undefined\" || subject === null){\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the index of the row\r\n\t\t\tlet match = this.rows.find((row) => {\r\n\t\t\t\treturn row.data[this.table.options.index] == subject;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\treturn match || false;\r\n\t\t}\r\n\t\t\r\n\t\t//catch all for any other type of input\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tgetRowFromDataObject(data){\r\n\t\tvar match = this.rows.find((row) => {\r\n\t\t\treturn row.data === data;\r\n\t\t});\r\n\t\t\r\n\t\treturn match || false;\r\n\t}\r\n\t\r\n\tgetRowFromPosition(position, active){\r\n\t\tif(active){\r\n\t\t\treturn this.activeRows[position];\r\n\t\t}else{\r\n\t\t\treturn this.rows[position];\r\n\t\t}\r\n\t}\r\n\t\r\n\tscrollToRow(row, position, ifVisible){\r\n\t\treturn this.renderer.scrollToRowPosition(row, position, ifVisible);\r\n\t}\r\n\t\r\n\t////////////////// Data Handling //////////////////\r\n\tsetData(data, renderInPosition, columnsChanged){\r\n\t\treturn new Promise((resolve, reject)=>{\r\n\t\t\tif(renderInPosition && this.getDisplayRows().length){\r\n\t\t\t\tif(this.table.options.pagination){\r\n\t\t\t\t\tthis._setDataActual(data, true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.reRenderInPosition(() => {\r\n\t\t\t\t\t\tthis._setDataActual(data);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.options.autoColumns && columnsChanged && this.table.initialized){\r\n\t\t\t\t\tthis.table.columnManager.generateColumnsFromRowData(data);\r\n\t\t\t\t}\r\n\t\t\t\tthis.resetScroll();\r\n\t\t\t\t\r\n\t\t\t\tthis._setDataActual(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\t\r\n\t_setDataActual(data, renderInPosition){\r\n\t\tthis.dispatchExternal(\"dataProcessing\", data);\r\n\t\t\r\n\t\tthis._wipeElements();\r\n\t\t\r\n\t\tif(Array.isArray(data)){\r\n\t\t\tthis.dispatch(\"data-processing\", data);\r\n\t\t\t\r\n\t\t\tdata.forEach((def, i) => {\r\n\t\t\t\tif(def && typeof def === \"object\"){\r\n\t\t\t\t\tvar row = new Row(def, this);\r\n\t\t\t\t\tthis.rows.push(row);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Data Loading Warning - Invalid row data detected and ignored, expecting object but received:\", def);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.refreshActiveData(false, false, renderInPosition);\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"data-processed\", data);\r\n\t\t\tthis.dispatchExternal(\"dataProcessed\", data);\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Data Loading Error - Unable to process data due to invalid data type \\nExpecting: array \\nReceived: \", typeof data, \"\\nData: \", data);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_wipeElements(){\r\n\t\tthis.dispatch(\"rows-wipe\");\r\n\t\t\r\n\t\tthis.rows.forEach((row) => {\r\n\t\t\trow.wipe();\r\n\t\t});\r\n\t\t\r\n\t\tthis.rows = [];\r\n\t\tthis.activeRows = [];\r\n\t\tthis.activeRowsPipeline = [];\r\n\t\tthis.activeRowsCount = 0;\r\n\t\tthis.displayRows = [];\r\n\t\tthis.displayRowsCount = 0;\r\n\t\t\r\n\t\tthis.adjustTableSize();\r\n\t}\r\n\t\r\n\tdeleteRow(row, blockRedraw){\r\n\t\tvar allIndex = this.rows.indexOf(row),\r\n\t\tactiveIndex = this.activeRows.indexOf(row);\r\n\t\t\r\n\t\tif(activeIndex > -1){\r\n\t\t\tthis.activeRows.splice(activeIndex, 1);\r\n\t\t}\r\n\t\t\r\n\t\tif(allIndex > -1){\r\n\t\t\tthis.rows.splice(allIndex, 1);\r\n\t\t}\r\n\t\t\r\n\t\tthis.setActiveRows(this.activeRows);\r\n\t\t\r\n\t\tthis.displayRowIterator((rows) => {\r\n\t\t\tvar displayIndex = rows.indexOf(row);\r\n\t\t\t\r\n\t\t\tif(displayIndex > -1){\r\n\t\t\t\trows.splice(displayIndex, 1);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t}\r\n\t\t\r\n\t\tthis.regenerateRowNumbers();\r\n\t\t\r\n\t\tthis.dispatchExternal(\"rowDeleted\", row.getComponent());\r\n\t\t\r\n\t\tif(!this.displayRowsCount){\r\n\t\t\tthis._showPlaceholder();\r\n\t\t}\r\n\t\t\r\n\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\tthis.dispatchExternal(\"dataChanged\", this.getData());\r\n\t\t}\r\n\t}\r\n\t\r\n\taddRow(data, pos, index, blockRedraw){\r\n\t\tvar row = this.addRowActual(data, pos, index, blockRedraw);\r\n\t\treturn row;\r\n\t}\r\n\t\r\n\t//add multiple rows\r\n\taddRows(data, pos, index){\r\n\t\tvar length = 0,\r\n\t\trows = [];\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tpos = this.findAddRowPos(pos);\r\n\t\t\t\r\n\t\t\tif(!Array.isArray(data)){\r\n\t\t\t\tdata = [data];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlength = data.length - 1;\r\n\t\t\t\r\n\t\t\tif((typeof index == \"undefined\" && pos) || (typeof index !== \"undefined\" && !pos)){\r\n\t\t\t\tdata.reverse();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdata.forEach((item, i) => {\r\n\t\t\t\tvar row = this.addRow(item, pos, index, true);\r\n\t\t\t\trows.push(row);\r\n\t\t\t\tthis.dispatch(\"row-added\", row, data, pos, index);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.refreshActiveData(false, false, true);\r\n\t\t\t\r\n\t\t\tthis.regenerateRowNumbers();\r\n\t\t\t\r\n\t\t\tif(rows.length){\r\n\t\t\t\tthis._clearPlaceholder();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tresolve(rows);\r\n\t\t});\r\n\t}\r\n\t\r\n\tfindAddRowPos(pos){\r\n\t\tif(typeof pos === \"undefined\"){\r\n\t\t\tpos = this.table.options.addRowPos;\r\n\t\t}\r\n\t\t\r\n\t\tif(pos === \"pos\"){\r\n\t\t\tpos = true;\r\n\t\t}\r\n\t\t\r\n\t\tif(pos === \"bottom\"){\r\n\t\t\tpos = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn pos;\r\n\t}\r\n\t\r\n\taddRowActual(data, pos, index, blockRedraw){\r\n\t\tvar row = data instanceof Row ? data : new Row(data || {}, this),\r\n\t\ttop = this.findAddRowPos(pos),\r\n\t\tallIndex = -1,\r\n\t\tactiveIndex, chainResult;\r\n\t\t\r\n\t\tif(!index){\r\n\t\t\tchainResult = this.chain(\"row-adding-position\", [row, top], null, {index, top});\r\n\t\t\t\r\n\t\t\tindex = chainResult.index;\r\n\t\t\ttop = chainResult.top;\r\n\t\t}\r\n\t\t\r\n\t\tif(typeof index !== \"undefined\"){\r\n\t\t\tindex = this.findRow(index);\r\n\t\t}\r\n\t\t\r\n\t\tindex = this.chain(\"row-adding-index\", [row, index, top], null, index);\r\n\t\t\r\n\t\tif(index){\r\n\t\t\tallIndex = this.rows.indexOf(index);\r\n\t\t}\r\n\t\t\r\n\t\tif(index && allIndex > -1){\r\n\t\t\tactiveIndex = this.activeRows.indexOf(index);\r\n\t\t\t\r\n\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\tvar displayIndex = rows.indexOf(index);\r\n\t\t\t\t\r\n\t\t\t\tif(displayIndex > -1){\r\n\t\t\t\t\trows.splice((top ? displayIndex : displayIndex + 1), 0, row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(activeIndex > -1){\r\n\t\t\t\tthis.activeRows.splice((top ? activeIndex : activeIndex + 1), 0, row);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.rows.splice((top ? allIndex : allIndex + 1), 0, row);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tif(top){\r\n\t\t\t\t\r\n\t\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\t\trows.unshift(row);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRows.unshift(row);\r\n\t\t\t\tthis.rows.unshift(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\t\trows.push(row);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRows.push(row);\r\n\t\t\t\tthis.rows.push(row);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.setActiveRows(this.activeRows);\r\n\t\t\r\n\t\tthis.dispatchExternal(\"rowAdded\", row.getComponent());\r\n\t\t\r\n\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t}\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t}\r\n\t\t\r\n\t\treturn row;\r\n\t}\r\n\t\r\n\tmoveRow(from, to, after){\r\n\t\tthis.dispatch(\"row-move\", from, to, after);\r\n\t\t\r\n\t\tthis.moveRowActual(from, to, after);\r\n\t\t\r\n\t\tthis.regenerateRowNumbers();\r\n\t\t\r\n\t\tthis.dispatch(\"row-moved\", from, to, after);\r\n\t\tthis.dispatchExternal(\"rowMoved\", from.getComponent());\r\n\t}\r\n\t\r\n\tmoveRowActual(from, to, after){\r\n\t\tthis.moveRowInArray(this.rows, from, to, after);\r\n\t\tthis.moveRowInArray(this.activeRows, from, to, after);\r\n\t\t\r\n\t\tthis.displayRowIterator((rows) => {\r\n\t\t\tthis.moveRowInArray(rows, from, to, after);\r\n\t\t});\r\n\t\t\r\n\t\tthis.dispatch(\"row-moving\", from, to, after);\r\n\t}\r\n\t\r\n\tmoveRowInArray(rows, from, to, after){\r\n\t\tvar\tfromIndex, toIndex, start, end;\r\n\t\t\r\n\t\tif(from !== to){\r\n\t\t\t\r\n\t\t\tfromIndex = rows.indexOf(from);\r\n\t\t\t\r\n\t\t\tif (fromIndex > -1) {\r\n\t\t\t\t\r\n\t\t\t\trows.splice(fromIndex, 1);\r\n\t\t\t\t\r\n\t\t\t\ttoIndex = rows.indexOf(to);\r\n\t\t\t\t\r\n\t\t\t\tif (toIndex > -1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(after){\r\n\t\t\t\t\t\trows.splice(toIndex+1, 0, from);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trows.splice(toIndex, 0, from);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\trows.splice(fromIndex, 0, from);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//restyle rows\r\n\t\t\tif(rows === this.getDisplayRows()){\r\n\t\t\t\t\r\n\t\t\t\tstart = fromIndex < toIndex ? fromIndex : toIndex;\r\n\t\t\t\tend = toIndex > fromIndex ? toIndex : fromIndex +1;\r\n\t\t\t\t\r\n\t\t\t\tfor(let i = start; i <= end; i++){\r\n\t\t\t\t\tif(rows[i]){\r\n\t\t\t\t\t\tthis.styleRow(rows[i], i);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tclearData(){\r\n\t\tthis.setData([]);\r\n\t}\r\n\t\r\n\tgetRowIndex(row){\r\n\t\treturn this.findRowIndex(row, this.rows);\r\n\t}\r\n\t\r\n\tgetDisplayRowIndex(row){\r\n\t\tvar index = this.getDisplayRows().indexOf(row);\r\n\t\treturn index > -1 ? index : false;\r\n\t}\r\n\t\r\n\tnextDisplayRow(row, rowOnly){\r\n\t\tvar index = this.getDisplayRowIndex(row),\r\n\t\tnextRow = false;\r\n\t\t\r\n\t\t\r\n\t\tif(index !== false && index < this.displayRowsCount -1){\r\n\t\t\tnextRow = this.getDisplayRows()[index+1];\r\n\t\t}\r\n\t\t\r\n\t\tif(nextRow && (!(nextRow instanceof Row) || nextRow.type != \"row\")){\r\n\t\t\treturn this.nextDisplayRow(nextRow, rowOnly);\r\n\t\t}\r\n\t\t\r\n\t\treturn nextRow;\r\n\t}\r\n\t\r\n\tprevDisplayRow(row, rowOnly){\r\n\t\tvar index = this.getDisplayRowIndex(row),\r\n\t\tprevRow = false;\r\n\t\t\r\n\t\tif(index){\r\n\t\t\tprevRow = this.getDisplayRows()[index-1];\r\n\t\t}\r\n\t\t\r\n\t\tif(rowOnly && prevRow && (!(prevRow instanceof Row) || prevRow.type != \"row\")){\r\n\t\t\treturn this.prevDisplayRow(prevRow, rowOnly);\r\n\t\t}\r\n\t\t\r\n\t\treturn prevRow;\r\n\t}\r\n\t\r\n\tfindRowIndex(row, list){\r\n\t\tvar rowIndex;\r\n\t\t\r\n\t\trow = this.findRow(row);\r\n\t\t\r\n\t\tif(row){\r\n\t\t\trowIndex = list.indexOf(row);\r\n\t\t\t\r\n\t\t\tif(rowIndex > -1){\r\n\t\t\t\treturn rowIndex;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tgetData(active, transform){\r\n\t\tvar output = [],\r\n\t\trows = this.getRows(active);\r\n\t\t\r\n\t\trows.forEach(function(row){\r\n\t\t\tif(row.type == \"row\"){\r\n\t\t\t\toutput.push(row.getData(transform || \"data\"));\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetComponents(active){\r\n\t\tvar\toutput = [],\r\n\t\trows = this.getRows(active);\r\n\t\t\r\n\t\trows.forEach(function(row){\r\n\t\t\toutput.push(row.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetDataCount(active){\r\n\t\tvar rows = this.getRows(active);\r\n\t\t\r\n\t\treturn rows.length;\r\n\t}\r\n\t\r\n\tscrollHorizontal(left){\r\n\t\tthis.scrollLeft = left;\r\n\t\tthis.element.scrollLeft = left;\r\n\t\t\r\n\t\tthis.dispatch(\"scroll-horizontal\", left);\r\n\t}\r\n\t\r\n\tregisterDataPipelineHandler(handler, priority){\r\n\t\tif(typeof priority !== \"undefined\"){\r\n\t\t\tthis.dataPipeline.push({handler, priority})\r\n\t\t\tthis.dataPipeline.sort((a, b) => {\r\n\t\t\t\treturn a.priority - b.priority;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Data pipeline handlers must have a priority in order to be registered\")\r\n\t\t}\r\n\t}\r\n\t\r\n\tregisterDisplayPipelineHandler(handler, priority){\r\n\t\tif(typeof priority !== \"undefined\"){\r\n\t\t\tthis.displayPipeline.push({handler, priority})\r\n\t\t\tthis.displayPipeline.sort((a, b) => {\r\n\t\t\t\treturn a.priority - b.priority;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Display pipeline handlers must have a priority in order to be registered\")\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set active data set\r\n\trefreshActiveData(handler, skipStage, renderInPosition){\r\n\t\tvar table = this.table,\r\n\t\tstage = \"\",\r\n\t\tindex = 0,\r\n\t\tcascadeOrder = [\"all\", \"dataPipeline\", \"display\", \"displayPipeline\", \"end\"],\r\n\t\tdisplayIndex;\r\n\t\t\r\n\t\t\r\n\t\tif(typeof handler === \"function\"){\r\n\t\t\tindex = this.dataPipeline.findIndex((item) => {\r\n\t\t\t\treturn item.handler === handler;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\tstage = \"dataPipeline\";\r\n\t\t\t\t\r\n\t\t\t\tif(skipStage){\r\n\t\t\t\t\tif(index == this.dataPipeline.length - 1){\r\n\t\t\t\t\t\tstage = \"display\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tindex++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tindex = this.displayPipeline.findIndex((item) => {\r\n\t\t\t\t\treturn item.handler === handler;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tstage = \"displayPipeline\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(skipStage){\r\n\t\t\t\t\t\tif(index == this.displayPipeline.length - 1){\r\n\t\t\t\t\t\t\tstage = \"end\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tindex++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.error(\"Unable to refresh data, invalid handler provided\", handler)\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tstage = handler || \"all\";\r\n\t\t\tindex = 0;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.redrawBlock){\r\n\t\t\tif(!this.redrawBlockRestoreConfig || (this.redrawBlockRestoreConfig && ((this.redrawBlockRestoreConfig.stage === stage && index < this.redrawBlockRestoreConfig.index) || (cascadeOrder.indexOf(stage) < cascadeOrder.indexOf(this.redrawBlockRestoreConfig.stage))))){\r\n\t\t\t\tthis.redrawBlockRestoreConfig = {\r\n\t\t\t\t\thandler: handler,\r\n\t\t\t\t\tskipStage: skipStage,\r\n\t\t\t\t\trenderInPosition: renderInPosition,\r\n\t\t\t\t\tstage:stage,\r\n\t\t\t\t\tindex:index,\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn;\r\n\t\t}else{\r\n\t\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\t\tif(renderInPosition){\r\n\t\t\t\t\tthis.reRenderInPosition(this.refreshPipelines.bind(this, handler, stage, index, renderInPosition));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!handler){\r\n\t\t\t\t\t\tthis.table.columnManager.renderer.renderColumns();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.renderTable();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(table.options.layoutColumnsOnNewData){\r\n\t\t\t\t\t\tthis.table.columnManager.redraw(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"data-refreshed\");\r\n\t\t}\r\n\t}\r\n\t\r\n\trefreshPipelines(handler, stage, index, renderInPosition){\r\n\t\tthis.dispatch(\"data-refreshing\");\r\n\t\t\r\n\t\tif(!handler){\r\n\t\t\tthis.activeRowsPipeline[0] = this.rows.slice(0);\r\n\t\t}\r\n\t\t\r\n\t\t//cascade through data refresh stages\r\n\t\tswitch(stage){\r\n\t\t\tcase \"all\":\r\n\t\t\t//handle case where alldata needs refreshing\r\n\t\t\t\r\n\t\t\tcase \"dataPipeline\":\r\n\t\t\t\r\n\t\t\tfor(let i = index; i < this.dataPipeline.length; i++){\r\n\t\t\t\tlet result = this.dataPipeline[i].handler(this.activeRowsPipeline[i].slice(0));\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRowsPipeline[i + 1] = result || this.activeRowsPipeline[i].slice(0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);\r\n\t\t\t\r\n\t\t\tthis.regenerateRowNumbers();\r\n\t\t\t\r\n\t\t\tcase \"display\":\r\n\t\t\tindex = 0;\r\n\t\t\tthis.resetDisplayRows();\r\n\t\t\t\r\n\t\t\tcase \"displayPipeline\":\r\n\t\t\tfor(let i = index; i < this.displayPipeline.length; i++){\r\n\t\t\t\tlet result = this.displayPipeline[i].handler((i ? this.getDisplayRows(i - 1) : this.activeRows).slice(0), renderInPosition);\r\n\t\t\t\t\r\n\t\t\t\tthis.setDisplayRows(result || this.getDisplayRows(i - 1).slice(0), i);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase \"end\":\r\n\t\t\t//case to handle scenario when trying to skip past end stage\r\n\t\t}\r\n\t}\r\n\t\r\n\t//regenerate row numbers for row number formatter if in use\r\n\tregenerateRowNumbers(){\r\n\t\tif(this.rowNumColumn){\r\n\t\t\tthis.activeRows.forEach((row) => {\r\n\t\t\t\tvar cell = row.getCell(this.rowNumColumn);\r\n\t\t\t\t\r\n\t\t\t\tif(cell){\r\n\t\t\t\t\tcell._generateContents();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetActiveRows(activeRows){\r\n\t\tthis.activeRows = activeRows;\r\n\t\tthis.activeRowsCount = this.activeRows.length;\r\n\t}\r\n\t\r\n\t//reset display rows array\r\n\tresetDisplayRows(){\r\n\t\tthis.displayRows = [];\r\n\t\t\r\n\t\tthis.displayRows.push(this.activeRows.slice(0));\r\n\t\t\r\n\t\tthis.displayRowsCount = this.displayRows[0].length;\r\n\t}\r\n\t\r\n\tgetNextDisplayIndex(){\r\n\t\treturn this.displayRows.length;\r\n\t}\r\n\t\r\n\t//set display row pipeline data\r\n\tsetDisplayRows(displayRows, index){\r\n\t\t\r\n\t\tvar output = true;\r\n\t\t\r\n\t\tif(index && typeof this.displayRows[index] != \"undefined\"){\r\n\t\t\tthis.displayRows[index] = displayRows;\r\n\t\t\toutput = true;\r\n\t\t}else{\r\n\t\t\tthis.displayRows.push(displayRows)\r\n\t\t\toutput = index = this.displayRows.length -1;\r\n\t\t}\r\n\t\t\r\n\t\tif(index == this.displayRows.length -1){\r\n\t\t\tthis.displayRowsCount = this.displayRows[this.displayRows.length -1].length;\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetDisplayRows(index){\r\n\t\tif(typeof index == \"undefined\"){\r\n\t\t\treturn this.displayRows.length ? this.displayRows[this.displayRows.length -1] : [];\r\n\t\t}else{\r\n\t\t\treturn this.displayRows[index] || [];\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetVisibleRows(chain, viewable){\r\n\t\tvar rows = Object.assign([], this.renderer.visibleRows(!viewable));\r\n\t\t\r\n\t\tif(chain){\r\n\t\t\trows = this.chain(\"rows-visible\", [viewable], rows, rows);\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t//repeat action accross display rows\r\n\tdisplayRowIterator(callback){\r\n\t\tthis.activeRowsPipeline.forEach(callback);\r\n\t\tthis.displayRows.forEach(callback);\r\n\t\t\r\n\t\tthis.displayRowsCount = this.displayRows[this.displayRows.length -1].length;\r\n\t}\r\n\t\r\n\t//return only actual rows (not group headers etc)\r\n\tgetRows(type){\r\n\t\tvar rows;\r\n\t\t\r\n\t\tswitch(type){\r\n\t\t\tcase \"active\":\r\n\t\t\trows = this.activeRows;\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"display\":\r\n\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"visible\":\r\n\t\t\trows = this.getVisibleRows(false, true);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\trows = this.chain(\"rows-retrieve\", type, null, this.rows) || this.rows;\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t///////////////// Table Rendering /////////////////\r\n\t//trigger rerender of table in current position\r\n\treRenderInPosition(callback){\r\n\t\tif(this.redrawBlock){\r\n\t\t\tif(callback){\r\n\t\t\t\tcallback();\r\n\t\t\t}else{\r\n\t\t\t\tthis.redrawBlockRenderInPosition = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.renderer.rerenderRows(callback);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRenderer(){\r\n\t\tvar renderClass;\r\n\t\t\r\n\t\tvar renderers = {\r\n\t\t\t\"virtual\": RendererVirtualDomVertical,\r\n\t\t\t\"basic\": RendererBasicVertical,\r\n\t\t};\r\n\t\t\r\n\t\tif(typeof this.table.options.renderVertical === \"string\"){\r\n\t\t\trenderClass = renderers[this.table.options.renderVertical];\r\n\t\t}else{\r\n\t\t\trenderClass = this.table.options.renderVertical;\r\n\t\t}\r\n\t\t\r\n\t\tif(renderClass){\r\n\t\t\tthis.renderer = new renderClass(this.table, this.element, this.tableElement);\r\n\t\t\tthis.renderer.initialize();\r\n\t\t\t\r\n\t\t\tif((this.table.element.clientHeight || this.table.options.height)){\r\n\t\t\t\tthis.fixedHeight = true;\r\n\t\t\t}else{\r\n\t\t\t\tthis.fixedHeight = false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Unable to find matching renderer:\", table.options.renderVertical);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRenderMode(){\r\n\t\treturn this.renderMode;\r\n\t}\r\n\t\r\n\trenderTable(){\r\n\t\tthis.dispatchExternal(\"renderStarted\");\r\n\t\t\r\n\t\tthis.element.scrollTop = 0;\r\n\t\t\r\n\t\tthis._clearTable();\r\n\t\t\r\n\t\tif(this.displayRowsCount){\r\n\t\t\tthis.renderer.renderRows();\r\n\t\t\t\r\n\t\t\tif(this.firstRender){\r\n\t\t\t\tthis.firstRender = false;\r\n\t\t\t\tthis.layoutRefresh();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.renderEmptyScroll();\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.fixedHeight){\r\n\t\t\tthis.adjustTableSize();\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatch(\"table-layout\");\r\n\t\t\r\n\t\tif(!this.displayRowsCount){\r\n\t\t\tthis._showPlaceholder();\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatchExternal(\"renderComplete\");\r\n\t}\r\n\t\r\n\t//show scrollbars on empty table div\r\n\trenderEmptyScroll(){\r\n\t\tif(this.placeholder){\r\n\t\t\tthis.tableElement.style.display = \"none\";\r\n\t\t}else{\r\n\t\t\tthis.tableElement.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t\t// this.tableElement.style.minHeight = \"1px\";\r\n\t\t\t// this.tableElement.style.visibility = \"hidden\";\r\n\t\t}\r\n\t}\r\n\t\r\n\t_clearTable(){\r\n\t\tvar element = this.tableElement;\r\n\t\t\r\n\t\tthis._clearPlaceholder();\r\n\t\t\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.renderer.clearRows();\r\n\t}\r\n\t\r\n\t_showPlaceholder(){\r\n\t\tif(this.placeholder){\r\n\t\t\tthis.placeholder.setAttribute(\"tabulator-render-mode\", this.renderMode);\r\n\t\t\t\r\n\t\t\tthis.getElement().appendChild(this.placeholder);\r\n\t\t\tthis._positionPlaceholder();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_clearPlaceholder(){\r\n\t\tif(this.placeholder && this.placeholder.parentNode){\r\n\t\t\tthis.placeholder.parentNode.removeChild(this.placeholder);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_positionPlaceholder(){\r\n\t\tif(this.placeholder && this.placeholder.parentNode){\r\n\t\t\tthis.placeholder.style.width = this.table.columnManager.getWidth() + \"px\";\r\n\t\t\tthis.placeholderContents.style.width = this.table.rowManager.element.clientWidth + \"px\";\r\n\t\t\tthis.placeholderContents.style.marginLeft = this.scrollLeft + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tstyleRow(row, index){\r\n\t\tvar rowEl = row.getElement();\r\n\t\t\r\n\t\tif(index % 2){\r\n\t\t\trowEl.classList.add(\"tabulator-row-even\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-odd\");\r\n\t\t}else{\r\n\t\t\trowEl.classList.add(\"tabulator-row-odd\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-even\");\r\n\t\t}\r\n\t}\r\n\t\r\n\t//normalize height of active rows\r\n\tnormalizeHeight(){\r\n\t\tthis.activeRows.forEach(function(row){\r\n\t\t\trow.normalizeHeight();\r\n\t\t});\r\n\t}\r\n\t\r\n\t//adjust the height of the table holder to fit in the Tabulator element\r\n\tadjustTableSize(){\r\n\t\tvar initialHeight = this.element.clientHeight,\r\n\t\tmodExists;\r\n\t\t\r\n\t\tif(this.renderer.verticalFillMode === \"fill\"){\r\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));\r\n\t\t\t\r\n\t\t\tif(this.fixedHeight){\r\n\t\t\t\tthis.element.style.minHeight = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t\tthis.element.style.height = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t\tthis.element.style.maxHeight = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.height = \"\";\r\n\t\t\t\tthis.element.style.height = (this.table.element.clientHeight - otherHeight) + \"px\";\r\n\t\t\t\tthis.element.scrollTop = this.scrollTop;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.renderer.resize();\r\n\t\t\t\r\n\t\t\t//check if the table has changed size when dealing with variable height tables\r\n\t\t\tif(!this.fixedHeight && initialHeight != this.element.clientHeight){\r\n\t\t\t\tif(this.subscribed(\"table-resize\")){\r\n\t\t\t\t\tthis.dispatch(\"table-resize\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.redraw();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._positionPlaceholder();\r\n\t}\r\n\t\r\n\t//renitialize all rows\r\n\treinitialize(){\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\trow.reinitialize(true);\r\n\t\t});\r\n\t}\r\n\t\r\n\t//prevent table from being redrawn\r\n\tblockRedraw (){\r\n\t\tthis.redrawBlock = true;\r\n\t\tthis.redrawBlockRestoreConfig = false;\r\n\t}\r\n\t\r\n\t//restore table redrawing\r\n\trestoreRedraw (){\r\n\t\tthis.redrawBlock = false;\r\n\t\t\r\n\t\tif(this.redrawBlockRestoreConfig){\r\n\t\t\tthis.refreshActiveData(this.redrawBlockRestoreConfig.handler, this.redrawBlockRestoreConfig.skipStage, this.redrawBlockRestoreConfig.renderInPosition)\r\n\t\t\t\r\n\t\t\tthis.redrawBlockRestoreConfig = false;\r\n\t\t}else{\r\n\t\t\tif(this.redrawBlockRenderInPosition){\r\n\t\t\t\tthis.reRenderInPosition();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.redrawBlockRenderInPosition = false;\r\n\t}\r\n\t\r\n\t//redraw table\r\n\tredraw (force){\r\n\t\tvar pos = 0,\r\n\t\tleft = this.scrollLeft;\r\n\t\t\r\n\t\tthis.adjustTableSize();\r\n\t\t\r\n\t\tthis.table.tableWidth = this.table.element.clientWidth;\r\n\t\t\r\n\t\tif(!force){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t\tthis.scrollHorizontal(left);\r\n\t\t}else{\r\n\t\t\tthis.renderTable();\r\n\t\t}\r\n\t}\r\n\t\r\n\tresetScroll(){\r\n\t\tthis.element.scrollLeft = 0;\r\n\t\tthis.element.scrollTop = 0;\r\n\t\t\r\n\t\tif(this.table.browser === \"ie\"){\r\n\t\t\tvar event = document.createEvent(\"Event\");\r\n\t\t\tevent.initEvent(\"scroll\", false, true);\r\n\t\t\tthis.element.dispatchEvent(event);\r\n\t\t}else{\r\n\t\t\tthis.element.dispatchEvent(new Event('scroll'));\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\n\r\nexport default class FooterManager extends CoreFeature{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.active = false;\r\n\t\tthis.element = this.createElement(); //containing element\r\n\t\tthis.containerElement = this.createContainerElement(); //containing element\r\n\t\tthis.external = false;\r\n\t\tthis.links = [];\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeElement();\r\n\t}\r\n\r\n\tcreateElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-footer\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\t\r\n\tcreateContainerElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-footer-contents\");\r\n\r\n\t\tthis.element.appendChild(el);\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitializeElement(){\r\n\t\tif(this.table.options.footerElement){\r\n\r\n\t\t\tswitch(typeof this.table.options.footerElement){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(this.table.options.footerElement[0] === \"<\"){\r\n\t\t\t\t\tthis.containerElement.innerHTML = this.table.options.footerElement;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.external = true;\r\n\t\t\t\t\tthis.containerElement = document.querySelector(this.table.options.footerElement);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.element = this.table.options.footerElement;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tappend(element, parent){\r\n\t\tthis.activate(parent);\r\n\r\n\t\tthis.containerElement.appendChild(element);\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\tprepend(element, parent){\r\n\t\tthis.activate(parent);\r\n\r\n\t\tthis.element.insertBefore(element, this.element.firstChild);\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\tremove(element){\r\n\t\telement.parentNode.removeChild(element);\r\n\t\tthis.deactivate();\r\n\t}\r\n\r\n\tdeactivate(force){\r\n\t\tif(!this.element.firstChild || force){\r\n\t\t\tif(!this.external){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\t\t\tthis.active = false;\r\n\t\t}\r\n\t}\r\n\r\n\tactivate(parent){\r\n\t\tif(!this.active){\r\n\t\t\tthis.active = true;\r\n\t\t\tif(!this.external){\r\n\t\t\t\tthis.table.element.appendChild(this.getElement());\r\n\t\t\t\tthis.table.element.style.display = '';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(parent){\r\n\t\t\tthis.links.push(parent);\r\n\t\t}\r\n\t}\r\n\r\n\tredraw(){\r\n\t\tthis.links.forEach(function(link){\r\n\t\t\tlink.footerRedraw();\r\n\t\t});\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport Helpers from './Helpers.js';\r\nimport Row from '../row/Row.js';\r\n\r\nexport default class InteractionManager extends CoreFeature {\r\n\t\r\n\tconstructor (table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.el = null;\r\n\t\t\r\n\t\tthis.abortClasses = [\"tabulator-headers\", \"tabulator-table\"];\r\n\t\t\r\n\t\tthis.previousTargets = {};\r\n\t\t\r\n\t\tthis.listeners = [\r\n\t\t\t\"click\",\r\n\t\t\t\"dblclick\",\r\n\t\t\t\"contextmenu\",\r\n\t\t\t\"mouseenter\",\r\n\t\t\t\"mouseleave\",\r\n\t\t\t\"mouseover\",\r\n\t\t\t\"mouseout\",\r\n\t\t\t\"mousemove\",\r\n\t\t\t\"touchstart\",\r\n\t\t\t\"touchend\",\r\n\t\t];\r\n\t\t\r\n\t\tthis.componentMap = {\r\n\t\t\t\"tabulator-cell\":\"cell\",\r\n\t\t\t\"tabulator-row\":\"row\",\r\n\t\t\t\"tabulator-group\":\"group\",\r\n\t\t\t\"tabulator-col\":\"column\",\r\n\t\t};\r\n\t\t\r\n\t\tthis.pseudoTrackers = {\r\n\t\t\t\"row\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"cell\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"group\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"column\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t}\r\n\t\t\r\n\t\tthis.pseudoTracking = false;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.el = this.table.element;\r\n\t\t\r\n\t\tthis.buildListenerMap();\r\n\t\tthis.bindSubscriptionWatchers();\r\n\t}\r\n\t\r\n\tbuildListenerMap(){\r\n\t\tvar listenerMap = {};\r\n\t\t\r\n\t\tthis.listeners.forEach((listener) => {\r\n\t\t\tlistenerMap[listener] = {\r\n\t\t\t\thandler:null,\r\n\t\t\t\tcomponents:[],\r\n\t\t\t}\r\n\t\t})\r\n\t\t\r\n\t\tthis.listeners = listenerMap;\r\n\t}\r\n\t\r\n\tbindPseudoEvents(){\r\n\t\tObject.keys(this.pseudoTrackers).forEach((key) => {\r\n\t\t\tthis.pseudoTrackers[key].subscriber = this.pseudoMouseEnter.bind(this, key);\r\n\t\t\tthis.subscribe(key + \"-mouseover\", this.pseudoTrackers[key].subscriber);\r\n\t\t});\r\n\t\t\r\n\t\tthis.pseudoTracking = true;\r\n\t}\r\n\t\r\n\tpseudoMouseEnter(key, e, target){\r\n\t\tif(this.pseudoTrackers[key].target !== target){\r\n\t\t\t\r\n\t\t\tif(this.pseudoTrackers[key].target){\r\n\t\t\t\tthis.dispatch(key + \"-mouseleave\", e, target);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.pseudoMouseLeave(key, e);\r\n\t\t\t\r\n\t\t\tthis.pseudoTrackers[key].target = target;\r\n\t\t\t\r\n\t\t\tthis.dispatch(key + \"-mouseenter\", e, target);\r\n\t\t}\r\n\t}\r\n\t\r\n\tpseudoMouseLeave(key, e){\r\n\t\tvar leaveList = Object.keys(this.pseudoTrackers),\r\n\t\tlinkedKeys = {\r\n\t\t\t\"row\":[\"cell\"],\r\n\t\t\t\"cell\":[\"row\"],\r\n\t\t};\r\n\t\t\r\n\t\tleaveList = leaveList.filter((item) => {\r\n\t\t\tvar links = linkedKeys[key];\r\n\t\t\treturn item !== key && (!links || (links && !links.includes(item)));\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\tleaveList.forEach((key) => {\r\n\t\t\tvar target = this.pseudoTrackers[key].target;\r\n\t\t\t\r\n\t\t\tif(this.pseudoTrackers[key].target){\r\n\t\t\t\tthis.dispatch(key + \"-mouseleave\", e, target);\r\n\t\t\t\t\r\n\t\t\t\tthis.pseudoTrackers[key].target = null;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t\r\n\tbindSubscriptionWatchers(){\r\n\t\tvar listeners = Object.keys(this.listeners),\r\n\t\tcomponents = Object.values(this.componentMap);\r\n\t\t\r\n\t\tfor(let comp of components){\r\n\t\t\tfor(let listener of listeners){\r\n\t\t\t\tlet key = comp + \"-\" + listener;\r\n\t\t\t\t\r\n\t\t\t\tthis.subscriptionChange(key, this.subscriptionChanged.bind(this, comp, listener));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.subscribe(\"table-destroy\", this.clearWatchers.bind(this))\r\n\t}\r\n\t\r\n\tsubscriptionChanged(component, key, added){\r\n\t\tvar listener = this.listeners[key].components,\r\n\t\tindex = listener.indexOf(component),\r\n\t\tchanged = false;\r\n\t\t\r\n\t\tif(added){\r\n\t\t\tif(index === -1){\r\n\t\t\t\tlistener.push(component);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!this.subscribed(component + \"-\" + key)){\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tlistener.splice(index, 1);\r\n\t\t\t\t\tchanged = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif((key === \"mouseenter\" || key === \"mouseleave\") && !this.pseudoTracking){\r\n\t\t\tthis.bindPseudoEvents();\r\n\t\t}\r\n\t\t\r\n\t\tif(changed){\r\n\t\t\tthis.updateEventListeners();\r\n\t\t}\r\n\t}\r\n\t\r\n\tupdateEventListeners(){\r\n\t\tfor(let key in this.listeners){\r\n\t\t\tlet listener = this.listeners[key];\r\n\t\t\t\r\n\t\t\tif(listener.components.length){\r\n\t\t\t\tif(!listener.handler){\r\n\t\t\t\t\tlistener.handler = this.track.bind(this, key);\r\n\t\t\t\t\tthis.el.addEventListener(key, listener.handler)\r\n\t\t\t\t\t// this.el.addEventListener(key, listener.handler, {passive: true})\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(listener.handler){\r\n\t\t\t\t\tthis.el.removeEventListener(key, listener.handler)\r\n\t\t\t\t\tlistener.handler = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\ttrack(type, e){\r\n\t\tvar path = (e.composedPath && e.composedPath()) || e.path;\r\n\t\t\r\n\t\tvar targets = this.findTargets(path);\r\n\t\ttargets = this.bindComponents(type, targets);\r\n\t\t\r\n\t\tthis.triggerEvents(type, e, targets);\r\n\t\t\r\n\t\tif(this.pseudoTracking && (type == \"mouseover\" || type == \"mouseleave\") && !Object.keys(targets).length){\r\n\t\t\tthis.pseudoMouseLeave(\"none\", e);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfindTargets(path){\r\n\t\tvar targets = {};\r\n\t\t\r\n\t\tlet componentMap = Object.keys(this.componentMap);\r\n\t\t\r\n\t\tfor (let el of path) {\r\n\t\t\tlet classList = el.classList ? [...el.classList] : [];\r\n\t\t\t\r\n\t\t\tlet abort = classList.filter((item) => {\r\n\t\t\t\treturn this.abortClasses.includes(item);\r\n\t\t\t})\r\n\t\t\t\r\n\t\t\tif(abort.length){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlet elTargets = classList.filter((item) => {\r\n\t\t\t\treturn componentMap.includes(item);\r\n\t\t\t})\r\n\t\t\t\r\n\t\t\tfor (let target of elTargets) {\r\n\t\t\t\ttargets[this.componentMap[target]] = el;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(targets.group && targets.group === targets.row){\r\n\t\t\tdelete targets.row;\r\n\t\t}\r\n\t\t\r\n\t\treturn targets;\r\n\t}\r\n\t\r\n\tbindComponents(type, targets){\r\n\t\t//ensure row component is looked up before cell\r\n\t\tvar keys = Object.keys(targets).reverse(),\r\n\t\tlistener = this.listeners[type],\r\n\t\ttargetMatches = {};\r\n\t\t\r\n\t\tfor(let key of keys){\r\n\t\t\tlet component;\r\n\t\t\tlet target = targets[key];\r\n\t\t\tlet previousTarget = this.previousTargets[key];\r\n\t\t\t\r\n\t\t\tif(previousTarget && previousTarget.target === target){\r\n\t\t\t\tcomponent = previousTarget.component;\r\n\t\t\t}else{\r\n\t\t\t\tswitch(key){\r\n\t\t\t\t\tcase \"row\":\r\n\t\t\t\t\tcase \"group\":\r\n\t\t\t\t\tif(listener.components.includes(\"row\") || listener.components.includes(\"cell\") || listener.components.includes(\"group\")){\r\n\t\t\t\t\t\tlet rows = this.table.rowManager.getVisibleRows(true);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcomponent = rows.find((row) => {\r\n\t\t\t\t\t\t\treturn row.getElement() === target;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(targets[\"row\"] && targets[\"row\"].parentNode && targets[\"row\"].parentNode.closest(\".tabulator-row\")){\r\n\t\t\t\t\t\t\ttargets[key] = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"column\":\r\n\t\t\t\t\tif(listener.components.includes(\"column\")){\r\n\t\t\t\t\t\tcomponent = this.table.columnManager.findColumn(target);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"cell\":\r\n\t\t\t\t\tif(listener.components.includes(\"cell\")){\r\n\t\t\t\t\t\tif(targets[\"row\"] instanceof Row){\r\n\t\t\t\t\t\t\tcomponent = targets[\"row\"].findCell(target);\r\n\t\t\t\t\t\t}else{\t\r\n\t\t\t\t\t\t\tif(targets[\"row\"]){\r\n\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?\")\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(component){\r\n\t\t\t\ttargets[key] = component;\r\n\t\t\t\ttargetMatches[key] = {\r\n\t\t\t\t\ttarget:target,\r\n\t\t\t\t\tcomponent:component,\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.previousTargets = targetMatches;\r\n\t\t\r\n\t\treturn targets;\r\n\t}\r\n\t\r\n\ttriggerEvents(type, e, targets){\r\n\t\tvar listener = this.listeners[type];\r\n\t\t\r\n\t\tfor(let key in targets){\r\n\t\t\tif(targets[key] && listener.components.includes(key)){\r\n\t\t\t\tthis.dispatch(key + \"-\" + type, e, targets[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tclearWatchers(){\r\n\t\tfor(let key in this.listeners){\r\n\t\t\tlet listener = this.listeners[key];\r\n\t\t\t\r\n\t\t\tif(listener.handler){\r\n\t\t\t\tthis.el.removeEventListener(key, listener.handler)\r\n\t\t\t\tlistener.handler = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}","export default class ComponentFunctionBinder{\r\n\r\n\tconstructor(table){\r\n\t\tthis.table = table;\r\n\r\n\t\tthis.bindings = {};\r\n\t}\r\n\r\n\tbind(type, funcName, handler){\r\n\t\tif(!this.bindings[type]){\r\n\t\t\tthis.bindings[type] = {};\r\n\t\t}\r\n\r\n\t\tif(this.bindings[type][funcName]){\r\n\t\t\tconsole.warn(\"Unable to bind component handler, a matching function name is already bound\", type, funcName, handler)\r\n\t\t}else{\r\n\t\t\tthis.bindings[type][funcName] = handler;\r\n\t\t}\r\n\t}\r\n\r\n\thandle(type, component, name){\r\n\t\tif(this.bindings[type] && this.bindings[type][name] && typeof this.bindings[type][name].bind === 'function'){\r\n\t\t\treturn this.bindings[type][name].bind(null, component);\r\n\t\t}else{\r\n\t\t\tif(name !== \"then\" && typeof name === \"string\" && !name.startsWith(\"_\")){\r\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?\")\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","import CoreFeature from '../CoreFeature.js';\r\n\r\nexport default class DataLoader extends CoreFeature{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.loaderElement = this.createLoaderElement(); //loader message div\r\n\t\tthis.msgElement = this.createMsgElement(); //message element\r\n\t\tthis.loadingElement = null;\r\n\t\tthis.errorElement = null;\r\n\r\n\t\tthis.requestOrder = 0; //prevent requests comming out of sequence if overridden by another load request\r\n\t\tthis.loading = false;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tvar template;\r\n\r\n\t\tthis.loaderElement.appendChild(this.msgElement);\r\n\r\n\t\tif(this.table.options.dataLoaderLoading){\r\n\t\t\tif(typeof this.table.options.dataLoaderLoading == \"string\"){\r\n\t\t\t\ttemplate = document.createElement('template');\r\n\t\t\t\ttemplate.innerHTML = this.table.options.dataLoaderLoading.trim();\r\n\t\t\t\tthis.loadingElement = template.firstElementChild;\r\n\t\t\t}else{\r\n\t\t\t\tthis.loadingElement = this.table.options.dataLoaderLoading;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.table.options.dataLoaderError){\r\n\t\t\tif(typeof this.table.options.dataLoaderError == \"string\"){\r\n\t\t\t\ttemplate = document.createElement('template');\r\n\t\t\t\ttemplate.innerHTML = this.table.options.dataLoaderError.trim();\r\n\t\t\t\tthis.errorElement = template.firstElementChild;\r\n\t\t\t}else{\r\n\t\t\t\tthis.errorElement = this.table.options.dataLoaderError;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tcreateLoaderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-loader\");\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateMsgElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-loader-msg\");\r\n\t\tel.setAttribute(\"role\", \"alert\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tload(data, params, config, replace, silent){\r\n\t\tvar requestNo = ++this.requestOrder;\r\n\r\n\t\tthis.dispatchExternal(\"dataLoading\", data);\r\n\r\n\t\t//parse json data to array\r\n\t\tif (data && (data.indexOf(\"{\") == 0 || data.indexOf(\"[\") == 0)){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(this.confirm(\"data-loading\", [data, params, config, silent])){\r\n\t\t\tthis.loading = true;\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.showLoader();\r\n\t\t\t}\r\n\r\n\t\t\t//get params for request\r\n\t\t\tparams = this.chain(\"data-params\", [data, config, silent], params || {}, params || {});\r\n\r\n\t\t\tparams = this.mapParams(params, this.table.options.dataSendParams);\r\n\r\n\t\t\tvar result = this.chain(\"data-load\", [data, params, config, silent], false, Promise.resolve([]));\r\n\t\t\t\r\n\t\t\treturn result.then((response) => {\r\n\t\t\t\tif(!Array.isArray(response) && typeof response == \"object\"){\r\n\t\t\t\t\tresponse = this.mapParams(response, this.objectInvert(this.table.options.dataReceiveParams));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar rowData = this.chain(\"data-loaded\", response, null, response);\r\n\r\n\t\t\t\tif(requestNo == this.requestOrder){\r\n\t\t\t\t\tthis.hideLoader();\r\n\r\n\t\t\t\t\tif(rowData !== false){\r\n\t\t\t\t\t\tthis.dispatchExternal(\"dataLoaded\", rowData);\r\n\t\t\t\t\t\tthis.table.rowManager.setData(rowData, replace, !replace);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\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\");\r\n\t\t\t\t}\r\n\t\t\t}).catch((error) => {\r\n\t\t\t\tconsole.error(\"Data Load Error: \", error);\r\n\t\t\t\tthis.dispatchExternal(\"dataLoadError\", error);\r\n\r\n\t\t\t\tif(!silent){\r\n\t\t\t\t\tthis.showError();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.hideLoader();\r\n\t\t\t\t}, this.table.options.dataLoaderErrorTimeout);\r\n\t\t\t})\r\n\t\t\t.finally(() => {\r\n\t\t\t\tthis.loading = false;\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"dataLoaded\", data);\r\n\r\n\t\t\tif(!data){\r\n\t\t\t\tdata = [];\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.rowManager.setData(data, replace, !replace);\r\n\t\t\treturn Promise.resolve();\r\n\t\t}\r\n\t}\r\n\r\n\tmapParams(params, map){\r\n\t\tvar output = {};\r\n\r\n\t\tfor(let key in params){\r\n\t\t\toutput[map.hasOwnProperty(key) ? map[key] : key] = params[key];\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tobjectInvert(obj){\r\n\t\tvar output = {};\r\n\r\n\t\tfor(let key in obj){\r\n\t\t\toutput[obj[key]] = key;\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tblockActiveLoad(){\r\n\t\tthis.requestOrder++;\r\n\t}\r\n\r\n\tshowLoader(){\r\n\t\tvar shouldLoad = typeof this.table.options.dataLoader === \"function\" ? this.table.options.dataLoader() : this.table.options.dataLoader;\r\n\r\n\t\tif(shouldLoad){\r\n\t\t\tthis.hideLoader();\r\n\r\n\t\t\twhile(this.msgElement.firstChild) this.msgElement.removeChild(this.msgElement.firstChild);\r\n\r\n\t\t\tthis.msgElement.classList.remove(\"tabulator-error\");\r\n\t\t\tthis.msgElement.classList.add(\"tabulator-loading\");\r\n\r\n\t\t\tif(this.loadingElement){\r\n\t\t\t\tthis.msgElement.appendChild(this.loadingElement);\r\n\t\t\t}else{\r\n\t\t\t\tthis.msgElement.innerHTML = this.langText(\"data|loading\");\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.element.appendChild(this.loaderElement);\r\n\t\t}\r\n\t}\r\n\r\n\tshowError(){\r\n\t\tthis.hideLoader();\r\n\r\n\t\twhile(this.msgElement.firstChild) this.msgElement.removeChild(this.msgElement.firstChild);\r\n\t\tthis.msgElement.classList.remove(\"tabulator-loading\");\r\n\t\tthis.msgElement.classList.add(\"tabulator-error\");\r\n\r\n\t\tif(this.errorElement){\r\n\t\t\tthis.msgElement.appendChild(this.errorElement);\r\n\t\t}else{\r\n\t\t\tthis.msgElement.innerHTML = this.langText(\"data|error\");\r\n\t\t}\r\n\r\n\t\tthis.table.element.appendChild(this.loaderElement);\r\n\t}\r\n\r\n\r\n\thideLoader(){\r\n\t\tif(this.loaderElement.parentNode){\r\n\t\t\tthis.loaderElement.parentNode.removeChild(this.loaderElement);\r\n\t\t}\r\n\t}\r\n}","export default class ExternalEventBus {\r\n\r\n\tconstructor(table, optionsList, debug){\r\n\t\tthis.table = table;\r\n\t\tthis.events = {};\r\n\t\tthis.optionsList = optionsList || {};\r\n\t\tthis.subscriptionNotifiers = {};\r\n\r\n\t\tthis.dispatch = debug ? this._debugDispatch.bind(this) : this._dispatch.bind(this);\r\n\t\tthis.debug = debug;\r\n\t}\r\n\r\n\tsubscriptionChange(key, callback){\r\n\t\tif(!this.subscriptionNotifiers[key]){\r\n\t\t\tthis.subscriptionNotifiers[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.subscriptionNotifiers[key].push(callback);\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis._notifiySubscriptionChange(key, true);\r\n\t\t}\r\n\t}\r\n\r\n\tsubscribe(key, callback){\r\n\t\tif(!this.events[key]){\r\n\t\t\tthis.events[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.events[key].push(callback);\r\n\r\n\t\tthis._notifiySubscriptionChange(key, true);\r\n\t}\r\n\r\n\tunsubscribe(key, callback){\r\n\t\tvar index;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tif(callback){\r\n\t\t\t\tindex = this.events[key].findIndex((item) => {\r\n\t\t\t\t\treturn item === callback;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tthis.events[key].splice(index, 1);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Cannot remove event, no matching event found:\", key, callback);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tdelete this.events[key];\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cannot remove event, no events set on:\", key);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._notifiySubscriptionChange(key, false);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.events[key] && this.events[key].length;\r\n\t}\r\n\r\n\t_notifiySubscriptionChange(key, subscribed){\r\n\t\tvar notifiers = this.subscriptionNotifiers[key];\r\n\r\n\t\tif(notifiers){\r\n\t\t\tnotifiers.forEach((callback)=>{\r\n\t\t\t\tcallback(subscribed);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_dispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift(),\r\n\t\tresult;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tthis.events[key].forEach((callback, i) => {\r\n\t\t\t\tlet callResult = callback.apply(this.table, args);\r\n\r\n\t\t\t\tif(!i){\r\n\t\t\t\t\tresult = callResult;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t_debugDispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"ExternalEvent:\" + args[0];\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._dispatch(...arguments)\r\n\t}\r\n}","export default class InternalEventBus {\r\n\r\n\tconstructor(debug){\r\n\t\tthis.events = {};\r\n\t\tthis.subscriptionNotifiers = {};\r\n\r\n\t\tthis.dispatch = debug ? this._debugDispatch.bind(this) : this._dispatch.bind(this);\r\n\t\tthis.chain = debug ? this._debugChain.bind(this) : this._chain.bind(this);\r\n\t\tthis.confirm = debug ? this._debugConfirm.bind(this) : this._confirm.bind(this);\r\n\t\tthis.debug = debug;\r\n\t}\r\n\r\n\tsubscriptionChange(key, callback){\r\n\t\tif(!this.subscriptionNotifiers[key]){\r\n\t\t\tthis.subscriptionNotifiers[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.subscriptionNotifiers[key].push(callback);\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis._notifiySubscriptionChange(key, true);\r\n\t\t}\r\n\t}\r\n\r\n\tsubscribe(key, callback, priority = 10000){\r\n\t\tif(!this.events[key]){\r\n\t\t\tthis.events[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.events[key].push({callback, priority});\r\n\r\n\t\tthis.events[key].sort((a, b) => {\r\n\t\t\treturn a.priority - b.priority;\r\n\t\t});\r\n\r\n\t\tthis._notifiySubscriptionChange(key, true);\r\n\t}\r\n\r\n\tunsubscribe(key, callback){\r\n\t\tvar index;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tif(callback){\r\n\t\t\t\tindex = this.events[key].findIndex((item) => {\r\n\t\t\t\t\treturn item.callback === callback;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tthis.events[key].splice(index, 1);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Cannot remove event, no matching event found:\", key, callback);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cannot remove event, no events set on:\", key);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._notifiySubscriptionChange(key, false);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.events[key] && this.events[key].length;\r\n\t}\r\n\r\n\t_chain(key, args, initialValue, fallback){\r\n\t\tvar value = initialValue;\r\n\r\n\t\tif(!Array.isArray(args)){\r\n\t\t\targs = [args];\r\n\t\t}\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis.events[key].forEach((subscriber, i) => {\r\n\t\t\t\tvalue = subscriber.callback.apply(this, args.concat([value]));\r\n\t\t\t});\r\n\r\n\t\t\treturn value;\r\n\t\t}else{\r\n\t\t\treturn typeof fallback === \"function\" ? fallback() : fallback;\r\n\t\t}\r\n\t}\r\n\r\n\t_confirm(key, args){\r\n\t\tvar confirmed = false;\r\n\r\n\t\tif(!Array.isArray(args)){\r\n\t\t\targs = [args];\r\n\t\t}\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis.events[key].forEach((subscriber, i) => {\r\n\t\t\t\tif(subscriber.callback.apply(this, args)){\r\n\t\t\t\t\tconfirmed = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn confirmed;\r\n\t}\r\n\r\n\t_notifiySubscriptionChange(key, subscribed){\r\n\t\tvar notifiers = this.subscriptionNotifiers[key];\r\n\r\n\t\tif(notifiers){\r\n\t\t\tnotifiers.forEach((callback)=>{\r\n\t\t\t\tcallback(subscribed);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_dispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift();\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tthis.events[key].forEach((subscriber) => {\r\n\t\t\t\tlet callResult = subscriber.callback.apply(this, args);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_debugDispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._dispatch(...arguments);\r\n\t}\r\n\r\n\t_debugChain(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._chain(...arguments);\r\n\t}\r\n\r\n\t_debugConfirm(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._confirm(...arguments);\r\n\t}\r\n}","import Tabulator from '../Tabulator.js';\r\n\r\nclass TableRegistry {\r\n\r\n\tstatic register(table){\r\n\t\tTableRegistry.tables.push(table);\r\n\t}\r\n\r\n\tstatic deregister(table){\r\n\t\tvar index = TableRegistry.tables.indexOf(table);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tTableRegistry.tables.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\tstatic lookupTable(query, silent){\r\n\t\tvar results = [],\r\n\t\tmatches, match;\r\n\r\n\t\tif(typeof query === \"string\"){\r\n\t\t\tmatches = document.querySelectorAll(query);\r\n\r\n\t\t\tif(matches.length){\r\n\t\t\t\tfor(var i = 0; i < matches.length; i++){\r\n\t\t\t\t\tmatch = TableRegistry.matchElement(matches[i]);\r\n\r\n\t\t\t\t\tif(match){\r\n\t\t\t\t\t\tresults.push(match);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}else if((typeof HTMLElement !== \"undefined\" && query instanceof HTMLElement) || query instanceof Tabulator){\r\n\t\t\tmatch = TableRegistry.matchElement(query);\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tresults.push(match);\r\n\t\t\t}\r\n\t\t}else if(Array.isArray(query)){\r\n\t\t\tquery.forEach(function(item){\r\n\t\t\t\tresults = results.concat(TableRegistry.lookupTable(item));\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Table Connection Error - Invalid Selector\", query);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n\r\n\tstatic matchElement(element){\r\n\t\treturn TableRegistry.tables.find(function(table){\r\n\t\t\treturn element instanceof Tabulator ? table === element : table.element === element;\r\n\t\t});\r\n\t}\r\n}\r\n\r\nTableRegistry.tables = [];\r\n\r\nexport default TableRegistry;","import CoreFeature from './CoreFeature.js';\r\n\r\nclass Module extends CoreFeature{\r\n\r\n\tconstructor(table, name){\r\n\t\tsuper(table);\r\n\r\n\t\tthis._handler = null;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\t// setup module when table is initialized, to be overriden in module\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t////// Options Registration ///////\r\n\t///////////////////////////////////\r\n\r\n\tregisterTableOption(key, value){\r\n\t\tthis.table.optionsList.register(key, value);\r\n\t}\r\n\r\n\tregisterColumnOption(key, value){\r\n\t\tthis.table.columnManager.optionsList.register(key, value);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t/// Public Function Registation ///\r\n\t///////////////////////////////////\r\n\r\n\tregisterTableFunction(name, func){\r\n\t\tif(typeof this.table[name] === \"undefined\"){\r\n\t\t\tthis.table[name] = func;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Unable to bind table function, name already in use\", name)\r\n\t\t}\r\n\t}\r\n\r\n\tregisterComponentFunction(component, func, handler){\r\n\t\treturn this.table.componentFunctionBinder.bind(component, func, handler);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Data Pipeline //////////\r\n\t///////////////////////////////////\r\n\r\n\tregisterDataHandler(handler, priority){\r\n\t\tthis.table.rowManager.registerDataPipelineHandler(handler, priority)\r\n\t\tthis._handler = handler;\r\n\t}\r\n\r\n\tregisterDisplayHandler(handler, priority){\r\n\t\tthis.table.rowManager.registerDisplayPipelineHandler(handler, priority)\r\n\t\tthis._handler = handler;\r\n\t}\r\n\r\n\trefreshData(renderInPosition, handler){\r\n\t\tif(!handler){\r\n\t\t\thandler = this._handler;\r\n\t\t}\r\n\r\n\t\tif(handler){\r\n\t\t\tthis.table.rowManager.refreshActiveData(handler, false, renderInPosition);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport default Module;","//resize columns to fit data they contain and stretch row to fill table, also used for fitDataTable\r\nexport default function(columns){\r\n\tcolumns.forEach(function(column){\r\n\t\tcolumn.reinitializeWidth();\r\n\t});\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n};","import fitData from './modes/fitData.js';\r\nimport fitDataGeneral from './modes/fitDataGeneral.js';\r\nimport fitDataStretch from './modes/fitDataStretch.js';\r\nimport fitColumns from './modes/fitColumns.js';\r\n\r\nexport default {\r\n\tfitData:fitData,\r\n\tfitDataFill:fitDataGeneral,\r\n\tfitDataTable:fitDataGeneral,\r\n\tfitDataStretch:fitDataStretch,\r\n\tfitColumns:fitColumns ,\r\n};","//resize columns to fit data they contain\r\nexport default function(columns){\r\n\tthis.table.columnManager.renderer.reinitializeColumnWidths(columns);\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n};","//resize columns to fit data the contain and stretch last column to fill table\r\nexport default function(columns){\r\n\tvar colsWidth = 0,\r\n\ttableWidth = this.table.rowManager.element.clientWidth,\r\n\tgap = 0,\r\n\tlastCol = false;\r\n\r\n\tcolumns.forEach((column, i) => {\r\n\t\tif(!column.widthFixed){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t}\r\n\r\n\t\tif(this.table.options.responsiveLayout ? column.modules.responsive.visible : column.visible){\r\n\t\t\tlastCol = column;\r\n\t\t}\r\n\r\n\t\tif(column.visible){\r\n\t\t\tcolsWidth += column.getWidth();\r\n\t\t}\r\n\t});\r\n\r\n\tif(lastCol){\r\n\t\tgap = tableWidth - colsWidth + lastCol.getWidth();\r\n\r\n\t\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\t\tlastCol.setWidth(0);\r\n\t\t\tthis.table.modules.responsiveLayout.update();\r\n\t\t}\r\n\r\n\t\tif(gap > 0){\r\n\t\t\tlastCol.setWidth(gap);\r\n\t\t}else{\r\n\t\t\tlastCol.reinitializeWidth();\r\n\t\t}\r\n\t}else{\r\n\t\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\t\tthis.table.modules.responsiveLayout.update();\r\n\t\t}\r\n\t}\r\n};","//resize columns to fit\r\nexport default function(columns){\r\n\tvar totalWidth = this.table.element.clientWidth; //table element width\r\n\tvar fixedWidth = 0; //total width of columns with a defined width\r\n\tvar flexWidth = 0; //total width available to flexible columns\r\n\tvar flexGrowUnits = 0; //total number of widthGrow blocks accross all columns\r\n\tvar flexColWidth = 0; //desired width of flexible columns\r\n\tvar flexColumns = []; //array of flexible width columns\r\n\tvar fixedShrinkColumns = []; //array of fixed width columns that can shrink\r\n\tvar flexShrinkUnits = 0; //total number of widthShrink blocks accross all columns\r\n\tvar overflowWidth = 0; //horizontal overflow width\r\n\tvar gapFill=0; //number of pixels to be added to final column to close and half pixel gaps\r\n\r\n\tfunction calcWidth(width){\r\n\t\tvar colWidth;\r\n\r\n\t\tif(typeof(width) == \"string\"){\r\n\t\t\tif(width.indexOf(\"%\") > -1){\r\n\t\t\t\tcolWidth = (totalWidth / 100) * parseInt(width);\r\n\t\t\t}else{\r\n\t\t\t\tcolWidth = parseInt(width);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcolWidth = width;\r\n\t\t}\r\n\r\n\t\treturn colWidth;\r\n\t}\r\n\r\n\t//ensure columns resize to take up the correct amount of space\r\n\tfunction scaleColumns(columns, freeSpace, colWidth, shrinkCols){\r\n\r\n\t\tvar oversizeCols = [],\r\n\t\toversizeSpace = 0,\r\n\t\tremainingSpace = 0,\r\n\t\tnextColWidth = 0,\r\n\t\tremainingFlexGrowUnits = flexGrowUnits,\r\n\t\tgap = 0,\r\n\t\tchangeUnits = 0,\r\n\t\tundersizeCols = [];\r\n\r\n\t\tfunction calcGrow(col){\r\n\t\t\treturn (colWidth * (col.column.definition.widthGrow || 1));\r\n\t\t}\r\n\r\n\t\tfunction calcShrink(col){\r\n\t\t\treturn (calcWidth(col.width) - (colWidth * (col.column.definition.widthShrink || 0)))\r\n\t\t}\r\n\r\n\t\tcolumns.forEach(function(col, i){\r\n\t\t\tvar width = shrinkCols ? calcShrink(col) : calcGrow(col);\r\n\t\t\tif(col.column.minWidth >= width){\r\n\t\t\t\toversizeCols.push(col);\r\n\t\t\t}else{\r\n\t\t\t\tif(col.column.maxWidth && col.column.maxWidth < width){\r\n\t\t\t\t\tcol.width = col.column.maxWidth;\r\n\t\t\t\t\tfreeSpace -= col.column.maxWidth;\r\n\r\n\t\t\t\t\tremainingFlexGrowUnits -= shrinkCols ? (col.column.definition.widthShrink || 1) : (col.column.definition.widthGrow || 1);\r\n\r\n\t\t\t\t\tif(remainingFlexGrowUnits){\r\n\t\t\t\t\t\tcolWidth = Math.floor(freeSpace/remainingFlexGrowUnits);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tundersizeCols.push(col);\r\n\t\t\t\t\tchangeUnits += shrinkCols ? (col.column.definition.widthShrink || 1) : (col.column.definition.widthGrow || 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(oversizeCols.length){\r\n\t\t\toversizeCols.forEach(function(col){\r\n\t\t\t\toversizeSpace += shrinkCols ? col.width - col.column.minWidth : col.column.minWidth;\r\n\t\t\t\tcol.width = col.column.minWidth;\r\n\t\t\t});\r\n\r\n\t\t\tremainingSpace = freeSpace - oversizeSpace;\r\n\r\n\t\t\tnextColWidth = changeUnits ? Math.floor(remainingSpace/changeUnits) : remainingSpace;\r\n\r\n\t\t\tgap = remainingSpace - (nextColWidth * changeUnits);\r\n\r\n\t\t\tgap += scaleColumns(undersizeCols, remainingSpace, nextColWidth, shrinkCols);\r\n\t\t}else{\r\n\t\t\tgap = changeUnits ? freeSpace - (Math.floor(freeSpace/changeUnits) * changeUnits) : freeSpace;\r\n\r\n\t\t\tundersizeCols.forEach(function(column){\r\n\t\t\t\tcolumn.width = shrinkCols ? calcShrink(column) : calcGrow(column);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn gap;\r\n\t}\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n\r\n\t//adjust for vertical scrollbar if present\r\n\tif(this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight){\r\n\t\ttotalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth;\r\n\t}\r\n\r\n\tcolumns.forEach(function(column){\r\n\t\tvar width, minWidth, colWidth;\r\n\r\n\t\tif(column.visible){\r\n\r\n\t\t\twidth = column.definition.width;\r\n\t\t\tminWidth = parseInt(column.minWidth);\r\n\r\n\t\t\tif(width){\r\n\r\n\t\t\t\tcolWidth = calcWidth(width);\r\n\r\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\r\n\r\n\t\t\t\tif(column.definition.widthShrink){\r\n\t\t\t\t\tfixedShrinkColumns.push({\r\n\t\t\t\t\t\tcolumn:column,\r\n\t\t\t\t\t\twidth:colWidth > minWidth ? colWidth : minWidth\r\n\t\t\t\t\t});\r\n\t\t\t\t\tflexShrinkUnits += column.definition.widthShrink;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tflexColumns.push({\r\n\t\t\t\t\tcolumn:column,\r\n\t\t\t\t\twidth:0,\r\n\t\t\t\t});\r\n\t\t\t\tflexGrowUnits += column.definition.widthGrow || 1;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\t//calculate available space\r\n\tflexWidth = totalWidth - fixedWidth;\r\n\r\n\t//calculate correct column size\r\n\tflexColWidth = Math.floor(flexWidth / flexGrowUnits)\r\n\r\n\t//generate column widths\r\n\tvar gapFill = scaleColumns(flexColumns, flexWidth, flexColWidth, false);\r\n\r\n\t//increase width of last column to account for rounding errors\r\n\tif(flexColumns.length && gapFill > 0){\r\n\t\tflexColumns[flexColumns.length-1].width += + gapFill;\r\n\t}\r\n\r\n\t//caculate space for columns to be shrunk into\r\n\tflexColumns.forEach(function(col){\r\n\t\tflexWidth -= col.width;\r\n\t});\r\n\r\n\toverflowWidth = Math.abs(gapFill) + flexWidth;\r\n\r\n\t//shrink oversize columns if there is no available space\r\n\tif(overflowWidth > 0 && flexShrinkUnits){\r\n\t\tgapFill = scaleColumns(fixedShrinkColumns, overflowWidth, Math.floor(overflowWidth / flexShrinkUnits), true);\r\n\t}\r\n\r\n\t//decrease width of last column to account for rounding errors\r\n\tif(fixedShrinkColumns.length){\r\n\t\tfixedShrinkColumns[fixedShrinkColumns.length-1].width -= gapFill;\r\n\t}\r\n\r\n\tflexColumns.forEach(function(col){\r\n\t\tcol.column.setWidth(col.width);\r\n\t});\r\n\r\n\tfixedShrinkColumns.forEach(function(col){\r\n\t\tcol.column.setWidth(col.width);\r\n\t});\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultModes from './defaults/modes.js';\r\n\r\nclass Layout extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table, \"layout\");\r\n\r\n\t\tthis.mode = null;\r\n\r\n\t\tthis.registerTableOption(\"layout\", \"fitData\"); //layout type\r\n\t\tthis.registerTableOption(\"layoutColumnsOnNewData\", false); //update column widths on setData\r\n\r\n\t\tthis.registerColumnOption(\"widthGrow\");\r\n\t\tthis.registerColumnOption(\"widthShrink\");\r\n\t}\r\n\r\n\t//initialize layout system\r\n\tinitialize(){\r\n\t\tvar layout = this.table.options.layout;\r\n\r\n\t\tif(Layout.modes[layout]){\r\n\t\t\tthis.mode = layout;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Layout Error - invalid mode set, defaulting to 'fitData' : \" + layout);\r\n\t\t\tthis.mode = 'fitData';\r\n\t\t}\r\n\r\n\t\tthis.table.element.setAttribute(\"tabulator-layout\", this.mode);\r\n\t}\r\n\r\n\tgetMode(){\r\n\t\treturn this.mode;\r\n\t}\r\n\r\n\t//trigger table layout\r\n\tlayout(){\r\n\t\tthis.dispatch(\"layout-refreshing\")\r\n\t\tLayout.modes[this.mode].call(this, this.table.columnManager.columnsByIndex);\r\n\r\n\t\tthis.dispatch(\"layout-refreshed\")\r\n\t}\r\n}\r\n\r\nLayout.moduleName = \"layout\";\r\n\r\n//load defaults\r\nLayout.modes = defaultModes;\r\n\r\nexport default Layout;","import Module from '../../core/Module.js';\r\n\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defaultLangs from './defaults/langs.js';\r\n\r\nclass Localize extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.locale = \"default\"; //current locale\r\n\t\tthis.lang = false; //current language\r\n\t\tthis.bindings = {}; //update events to call when locale is changed\r\n\t\tthis.langList = {};\r\n\r\n\t\tthis.registerTableOption(\"locale\", false); //current system language\r\n\t\tthis.registerTableOption(\"langs\", {});\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.langList = Helpers.deepClone(Localize.langs);\r\n\r\n\t\tif(this.table.options.columnDefaults.headerFilterPlaceholder !== false){\r\n\t\t\tthis.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder);\r\n\t\t}\r\n\r\n\t\tfor(let locale in this.table.options.langs){\r\n\t\t\tthis.installLang(locale, this.table.options.langs[locale]);\r\n\t\t}\r\n\r\n\t\tthis.setLocale(this.table.options.locale);\r\n\r\n\t\tthis.registerTableFunction(\"setLocale\", this.setLocale.bind(this));\r\n\t\tthis.registerTableFunction(\"getLocale\", this.getLocale.bind(this));\r\n\t\tthis.registerTableFunction(\"getLang\", this.getLang.bind(this));\r\n\t}\r\n\r\n\t//set header placehoder\r\n\tsetHeaderFilterPlaceholder(placeholder){\r\n\t\tthis.langList.default.headerFilters.default = placeholder;\r\n\t}\r\n\r\n\t//set header filter placeholder by column\r\n\tsetHeaderFilterColumnPlaceholder(column, placeholder){\r\n\t\tthis.langList.default.headerFilters.columns[column] = placeholder;\r\n\r\n\t\tif(this.lang && !this.lang.headerFilters.columns[column]){\r\n\t\t\tthis.lang.headerFilters.columns[column] = placeholder;\r\n\t\t}\r\n\t}\r\n\r\n\t//setup a lang description object\r\n\tinstallLang(locale, lang){\r\n\t\tif(this.langList[locale]){\r\n\t\t\tthis._setLangProp(this.langList[locale], lang);\r\n\t\t}else{\r\n\t\t\tthis.langList[locale] = lang;\r\n\t\t}\r\n\t}\r\n\r\n\t_setLangProp(lang, values){\r\n\t\tfor(let key in values){\r\n\t\t\tif(lang[key] && typeof lang[key] == \"object\"){\r\n\t\t\t\tthis._setLangProp(lang[key], values[key])\r\n\t\t\t}else{\r\n\t\t\t\tlang[key] = values[key];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//set current locale\r\n\tsetLocale(desiredLocale){\r\n\t\tdesiredLocale = desiredLocale || \"default\";\r\n\r\n\t\t//fill in any matching languge values\r\n\t\tfunction traverseLang(trans, path){\r\n\t\t\tfor(var prop in trans){\r\n\t\t\t\tif(typeof trans[prop] == \"object\"){\r\n\t\t\t\t\tif(!path[prop]){\r\n\t\t\t\t\t\tpath[prop] = {};\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttraverseLang(trans[prop], path[prop]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tpath[prop] = trans[prop];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//determing correct locale to load\r\n\t\tif(desiredLocale === true && navigator.language){\r\n\t\t\t//get local from system\r\n\t\t\tdesiredLocale = navigator.language.toLowerCase();\r\n\t\t}\r\n\r\n\t\tif(desiredLocale){\r\n\t\t\t//if locale is not set, check for matching top level locale else use default\r\n\t\t\tif(!this.langList[desiredLocale]){\r\n\t\t\t\tlet prefix = desiredLocale.split(\"-\")[0];\r\n\r\n\t\t\t\tif(this.langList[prefix]){\r\n\t\t\t\t\tconsole.warn(\"Localization Error - Exact matching locale not found, using closest match: \", desiredLocale, prefix);\r\n\t\t\t\t\tdesiredLocale = prefix;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Localization Error - Matching locale not found, using default: \", desiredLocale);\r\n\t\t\t\t\tdesiredLocale = \"default\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.locale = desiredLocale;\r\n\r\n\t\t//load default lang template\r\n\t\tthis.lang = Helpers.deepClone(this.langList.default || {});\r\n\r\n\t\tif(desiredLocale != \"default\"){\r\n\t\t\ttraverseLang(this.langList[desiredLocale], this.lang);\r\n\t\t}\r\n\r\n\t\tthis.dispatchExternal(\"localized\", this.locale, this.lang);\r\n\r\n\t\tthis._executeBindings();\r\n\t}\r\n\r\n\t//get current locale\r\n\tgetLocale(locale){\r\n\t\treturn this.locale;\r\n\t}\r\n\r\n\t//get lang object for given local or current if none provided\r\n\tgetLang(locale){\r\n\t\treturn locale ? this.langList[locale] : this.lang;\r\n\t}\r\n\r\n\t//get text for current locale\r\n\tgetText(path, value){\r\n\t\tvar path = value ? path + \"|\" + value : path,\r\n\t\tpathArray = path.split(\"|\"),\r\n\t\ttext = this._getLangElement(pathArray, this.locale);\r\n\r\n\t\t// if(text === false){\r\n\t\t// \tconsole.warn(\"Localization Error - Matching localized text not found for given path: \", path);\r\n\t\t// }\r\n\r\n\t\treturn text || \"\";\r\n\t}\r\n\r\n\t//traverse langs object and find localized copy\r\n\t_getLangElement(path, locale){\r\n\t\tvar root = this.lang;\r\n\r\n\t\tpath.forEach(function(level){\r\n\t\t\tvar rootPath;\r\n\r\n\t\t\tif(root){\r\n\t\t\t\trootPath = root[level];\r\n\r\n\t\t\t\tif(typeof rootPath != \"undefined\"){\r\n\t\t\t\t\troot = rootPath;\r\n\t\t\t\t}else{\r\n\t\t\t\t\troot = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn root;\r\n\t}\r\n\r\n\t//set update binding\r\n\tbind(path, callback){\r\n\t\tif(!this.bindings[path]){\r\n\t\t\tthis.bindings[path] = [];\r\n\t\t}\r\n\r\n\t\tthis.bindings[path].push(callback);\r\n\r\n\t\tcallback(this.getText(path), this.lang);\r\n\t}\r\n\r\n\t//itterate through bindings and trigger updates\r\n\t_executeBindings(){\r\n\t\tfor(let path in this.bindings){\r\n\t\t\tthis.bindings[path].forEach((binding) => {\r\n\t\t\t\tbinding(this.getText(path), this.lang);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}\r\n\r\nLocalize.moduleName = \"localize\";\r\n\r\n//load defaults\r\nLocalize.langs = defaultLangs;\r\n\r\nexport default Localize;","export default {\r\n\t\"default\":{ //hold default locale text\r\n\t\t\"groups\":{\r\n\t\t\t\"item\":\"item\",\r\n\t\t\t\"items\":\"items\",\r\n\t\t},\r\n\t\t\"columns\":{\r\n\t\t},\r\n\t\t\"data\":{\r\n\t\t\t\"loading\":\"Loading\",\r\n\t\t\t\"error\":\"Error\",\r\n\t\t},\r\n\t\t\"pagination\":{\r\n\t\t\t\"page_size\":\"Page Size\",\r\n\t\t\t\"page_title\":\"Show Page\",\r\n\t\t\t\"first\":\"First\",\r\n\t\t\t\"first_title\":\"First Page\",\r\n\t\t\t\"last\":\"Last\",\r\n\t\t\t\"last_title\":\"Last Page\",\r\n\t\t\t\"prev\":\"Prev\",\r\n\t\t\t\"prev_title\":\"Prev Page\",\r\n\t\t\t\"next\":\"Next\",\r\n\t\t\t\"next_title\":\"Next Page\",\r\n\t\t\t\"all\":\"All\",\r\n\t\t\t\"counter\":{\r\n\t\t\t\t\"showing\": \"Showing\",\r\n\t\t\t\t\"of\": \"of\",\r\n\t\t\t\t\"rows\": \"rows\",\r\n\t\t\t\t\"pages\": \"pages\",\r\n\t\t\t}\r\n\t\t},\r\n\t\t\"headerFilters\":{\r\n\t\t\t\"default\":\"filter column...\",\r\n\t\t\t\"columns\":{}\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\nimport TableRegistry from '../../core/tools/TableRegistry.js';\r\n\r\nclass Comms extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"tableComms\", this.receive.bind(this));\r\n\t}\r\n\r\n\tgetConnections(selectors){\r\n\t\tvar connections = [],\r\n\t\tconnection;\r\n\r\n\t\tconnection = TableRegistry.lookupTable(selectors);\r\n\r\n\t\tconnection.forEach((con) =>{\r\n\t\t\tif(this.table !== con){\r\n\t\t\t\tconnections.push(con);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn connections;\r\n\t}\r\n\r\n\tsend(selectors, module, action, data){\r\n\t\tvar connections = this.getConnections(selectors);\r\n\r\n\t\tconnections.forEach((connection) => {\r\n\t\t\tconnection.tableComms(this.table.element, module, action, data);\r\n\t\t});\r\n\r\n\t\tif(!connections.length && selectors){\r\n\t\t\tconsole.warn(\"Table Connection Error - No tables matching selector found\", selectors);\r\n\t\t}\r\n\t}\r\n\r\n\treceive(table, module, action, data){\r\n\t\tif(this.table.modExists(module)){\r\n\t\t\treturn this.table.modules[module].commsReceived(table, action, data);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Inter-table Comms Error - no such module:\", module);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nComms.moduleName = \"comms\";\r\n\r\nexport default Comms;","import * as coreModules from '../modules/core.js';\r\nimport TableRegistry from './TableRegistry.js';\r\n\r\nexport default class ModuleBinder {\r\n\r\n\tconstructor(tabulator, modules){\r\n\t\tthis.bindStaticFuctionality(tabulator);\r\n\t\tthis.bindModules(tabulator, coreModules, true);\r\n\r\n\t\tif(modules){\r\n\t\t\tthis.bindModules(tabulator, modules);\r\n\t\t}\r\n\t}\r\n\r\n\tbindStaticFuctionality(tabulator){\r\n\t\ttabulator.moduleBindings = {};\r\n\r\n\t\ttabulator.extendModule = function(name, property, values){\r\n\t\t\tif(tabulator.moduleBindings[name]){\r\n\t\t\t\tvar source = tabulator.moduleBindings[name][property];\r\n\r\n\t\t\t\tif(source){\r\n\t\t\t\t\tif(typeof values == \"object\"){\r\n\t\t\t\t\t\tfor(let key in values){\r\n\t\t\t\t\t\t\tsource[key] = values[key];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Module Error - Invalid value type, it must be an object\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Module Error - property does not exist:\", property);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Module Error - module does not exist:\", name);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\ttabulator.registerModule = function(modules){\r\n\t\t\tif(!Array.isArray(modules)){\r\n\t\t\t\tmodules = [modules];\r\n\t\t\t}\r\n\r\n\t\t\tmodules.forEach((mod) => {\r\n\t\t\t\ttabulator.registerModuleBinding(mod)\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\ttabulator.registerModuleBinding = function(mod){\r\n\t\t\ttabulator.moduleBindings[mod.moduleName] = mod;\r\n\t\t};\r\n\r\n\t\ttabulator.findTable = function(query){\r\n\t\t\tvar results = TableRegistry.lookupTable(query, true);\r\n\t\t\treturn Array.isArray(results) && !results.length ? false : results;\r\n\t\t}\r\n\r\n\t\t//ensure that module are bound to instantiated function\r\n\t\ttabulator.prototype.bindModules = function(){\r\n\t\t\tvar orderedMods = [],\r\n\t\t\tunOrderedMods = [];\r\n\r\n\t\t\tthis.modules = {};\r\n\r\n\t\t\tfor(var name in tabulator.moduleBindings){\r\n\t\t\t\tlet mod = tabulator.moduleBindings[name];\r\n\t\t\t\tlet module = new mod(this);\r\n\r\n\t\t\t\tthis.modules[name] = module;\r\n\r\n\t\t\t\tif(mod.prototype.moduleCore){\r\n\t\t\t\t\tthis.modulesCore.push(module);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(mod.moduleInitOrder){\r\n\t\t\t\t\t\torderedMods.push(module);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tunOrderedMods.push(module);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\torderedMods.sort((a, b) => a.moduleInitOrder > b.moduleInitOrder ? 1 : -1);\r\n\r\n\t\t\tthis.modulesRegular = orderedMods.concat(unOrderedMods);\r\n\t\t}\r\n\t}\r\n\r\n\tbindModules(tabulator, modules, core){\r\n\t\tvar mods = Object.values(modules);\r\n\r\n\t\tif(core){\r\n\t\t\tmods.forEach((mod) => {\r\n\t\t\t\tmod.prototype.moduleCore = true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\ttabulator.registerModule(mods);\r\n\t}\r\n}","'use strict';\r\n\r\nimport defaultOptions from './defaults/options.js';\r\n\r\nimport ColumnManager from './ColumnManager.js';\r\nimport RowManager from './RowManager.js';\r\nimport FooterManager from './FooterManager.js';\r\n\r\nimport InteractionMonitor from './tools/InteractionMonitor.js';\r\nimport ComponentFunctionBinder from './tools/ComponentFunctionBinder.js';\r\nimport DataLoader from './tools/DataLoader.js';\r\n\r\nimport ExternalEventBus from './tools/ExternalEventBus.js';\r\nimport InternalEventBus from './tools/InternalEventBus.js';\r\n\r\nimport TableRegistry from './tools/TableRegistry.js';\r\nimport ModuleBinder from './tools/ModuleBinder.js';\r\n\r\nimport OptionsList from './tools/OptionsList.js';\r\n\r\nclass Tabulator {\r\n\r\n\tconstructor(element, options){\r\n\r\n\t\tthis.options = {};\r\n\r\n\t\tthis.columnManager = null; // hold Column Manager\r\n\t\tthis.rowManager = null; //hold Row Manager\r\n\t\tthis.footerManager = null; //holder Footer Manager\r\n\t\tthis.vdomHoz = null; //holder horizontal virtual dom\r\n\t\tthis.externalEvents = null; //handle external event messaging\r\n\t\tthis.eventBus = null; //handle internal event messaging\r\n\t\tthis.interactionMonitor = false; //track user interaction\r\n\t\tthis.browser = \"\"; //hold current browser type\r\n\t\tthis.browserSlow = false; //handle reduced functionality for slower browsers\r\n\t\tthis.browserMobile = false; //check if running on mobile, prevent resize cancelling edit on keyboard appearance\r\n\t\tthis.rtl = false; //check if the table is in RTL mode\r\n\t\tthis.originalElement = null; //hold original table element if it has been replaced\r\n\r\n\t\tthis.componentFunctionBinder = new ComponentFunctionBinder(this); //bind component functions\r\n\t\tthis.dataLoader = false; //bind component functions\r\n\r\n\t\tthis.modules = {}; //hold all modules bound to this table\r\n\t\tthis.modulesCore = []; //hold core modules bound to this table (for initialization purposes)\r\n\t\tthis.modulesRegular = []; //hold regular modules bound to this table (for initialization purposes)\r\n\r\n\t\tthis.optionsList = new OptionsList(this, \"table constructor\");\r\n\r\n\t\tthis.initialized = false;\r\n\r\n\t\tif(this.initializeElement(element)){\r\n\r\n\t\t\tthis.initializeCoreSystems(options);\r\n\r\n\t\t\t//delay table creation to allow event bindings immediately after the constructor\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis._create();\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tTableRegistry.register(this); //register table for inter-device communication\r\n\t}\r\n\r\n\tinitializeElement(element){\r\n\t\tif(typeof HTMLElement !== \"undefined\" && element instanceof HTMLElement){\r\n\t\t\tthis.element = element;\r\n\t\t\treturn true;\r\n\t\t}else if(typeof element === \"string\"){\r\n\t\t\tthis.element = document.querySelector(element);\r\n\r\n\t\t\tif(this.element){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Tabulator Creation Error - no element found matching selector: \", element);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Tabulator Creation Error - Invalid element provided:\", element);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeCoreSystems(options){\r\n\t\tthis.columnManager = new ColumnManager(this);\r\n\t\tthis.rowManager = new RowManager(this);\r\n\t\tthis.footerManager = new FooterManager(this);\r\n\t\tthis.dataLoader = new DataLoader(this);\r\n\r\n\t\tthis.bindModules();\r\n\r\n\t\tthis.options = this.optionsList.generate(Tabulator.defaultOptions, options)\r\n\r\n\t\tthis._clearObjectPointers();\r\n\r\n\t\tthis._mapDeprecatedFunctionality();\r\n\r\n\t\tthis.externalEvents = new ExternalEventBus(this, this.options, this.options.debugEventsExternal);\r\n\t\tthis.eventBus = new InternalEventBus(this.options.debugEventsInternal);\r\n\r\n\t\tthis.interactionMonitor = new InteractionMonitor(this);\r\n\r\n\t\tthis.dataLoader.initialize();\r\n\t\t// this.columnManager.initialize();\r\n\t\t// this.rowManager.initialize();\r\n\t\tthis.footerManager.initialize();\r\n\t}\r\n\r\n\t//convert deprecated functionality to new functions\r\n\t_mapDeprecatedFunctionality(){\r\n\t\t//all previously deprecated functionality removed in the 5.0 release\r\n\t}\r\n\r\n\t_clearSelection(){\r\n\r\n\t\tthis.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tif (window.getSelection) {\r\n\t\t if (window.getSelection().empty) { // Chrome\r\n\t\t \twindow.getSelection().empty();\r\n\t\t } else if (window.getSelection().removeAllRanges) { // Firefox\r\n\t\t \twindow.getSelection().removeAllRanges();\r\n\t\t }\r\n\t\t} else if (document.selection) { // IE?\r\n\t\t\tdocument.selection.empty();\r\n\t\t}\r\n\r\n\t\tthis.element.classList.remove(\"tabulator-block-select\");\r\n\t}\r\n\r\n\t//create table\r\n\t_create(){\r\n\t\tthis.externalEvents.dispatch(\"tableBuilding\");\r\n\t\tthis.eventBus.dispatch(\"table-building\");\r\n\r\n\t\tthis._rtlCheck();\r\n\r\n\t\tthis._buildElement();\r\n\r\n\t\tthis._initializeTable();\r\n\r\n\t\tthis._loadInitialData();\r\n\r\n\t\tthis.initialized = true;\r\n\r\n\t\tthis.externalEvents.dispatch(\"tableBuilt\");\r\n\t}\r\n\r\n\t_rtlCheck(){\r\n\t\tvar style = window.getComputedStyle(this.element);\r\n\r\n\t\tswitch(this.options.textDirection){\r\n\t\t\tcase\"auto\":\r\n\t\t\tif(style.direction !== \"rtl\"){\r\n\t\t\t\tbreak;\r\n\t\t\t};\r\n\r\n\t\t\tcase \"rtl\":\r\n\t\t\tthis.element.classList.add(\"tabulator-rtl\");\r\n\t\t\tthis.rtl = true;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"ltr\":\r\n\t\t\tthis.element.classList.add(\"tabulator-ltr\");\r\n\r\n\t\t\tdefault:\r\n\t\t\tthis.rtl = false;\r\n\t\t}\r\n\t}\r\n\r\n\t//clear pointers to objects in default config object\r\n\t_clearObjectPointers(){\r\n\t\tthis.options.columns = this.options.columns.slice(0);\r\n\r\n\t\tif(Array.isArray(this.options.data) && !this.options.reactiveData){\r\n\t\t\tthis.options.data = this.options.data.slice(0);\r\n\t\t}\r\n\t}\r\n\r\n\t//build tabulator element\r\n\t_buildElement(){\r\n\t\tvar element = this.element,\r\n\t\toptions = this.options,\r\n\t\tnewElement;\r\n\r\n\t\tif(element.tagName === \"TABLE\"){\r\n\t\t\tthis.originalElement = this.element;\r\n\t\t\tnewElement = document.createElement(\"div\");\r\n\r\n\t\t\t//transfer attributes to new element\r\n\t\t\tvar attributes = element.attributes;\r\n\r\n\t\t\t// loop through attributes and apply them on div\r\n\t\t\tfor(var i in attributes){\r\n\t\t\t\tif(typeof attributes[i] == \"object\"){\r\n\t\t\t\t\tnewElement.setAttribute(attributes[i].name, attributes[i].value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// replace table with div element\r\n\t\t\telement.parentNode.replaceChild(newElement, element);\r\n\r\n\t\t\tthis.element = element = newElement;\r\n\t\t}\r\n\r\n\t\telement.classList.add(\"tabulator\");\r\n\t\telement.setAttribute(\"role\", \"grid\");\r\n\r\n\t\t//empty element\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\t//set table height\r\n\t\tif(options.height){\r\n\t\t\toptions.height = isNaN(options.height) ? options.height : options.height + \"px\";\r\n\t\t\telement.style.height = options.height;\r\n\t\t}\r\n\r\n\t\t//set table min height\r\n\t\tif(options.minHeight !== false){\r\n\t\t\toptions.minHeight = isNaN(options.minHeight) ? options.minHeight : options.minHeight + \"px\";\r\n\t\t\telement.style.minHeight = options.minHeight;\r\n\t\t}\r\n\r\n\t\t//set table maxHeight\r\n\t\tif(options.maxHeight !== false){\r\n\t\t\toptions.maxHeight = isNaN(options.maxHeight) ? options.maxHeight : options.maxHeight + \"px\";\r\n\t\t\telement.style.maxHeight = options.maxHeight;\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize core systems and modules\r\n\t_initializeTable(){\r\n\t\tvar element = this.element,\r\n\t\toptions = this.options;\r\n\r\n\t\tthis.interactionMonitor.initialize();\r\n\r\n\t\tthis.columnManager.initialize();\r\n\t\tthis.rowManager.initialize();\r\n\r\n\t\tthis._detectBrowser();\r\n\r\n\t\t//initialize core modules\r\n\t\tthis.modulesCore.forEach((mod) => {\r\n\t\t\tmod.initialize();\r\n\t\t})\r\n\r\n\t\t//build table elements\r\n\t\telement.appendChild(this.columnManager.getElement());\r\n\t\telement.appendChild(this.rowManager.getElement());\r\n\r\n\t\tif(options.footerElement){\r\n\t\t\tthis.footerManager.activate();\r\n\t\t}\r\n\r\n\t\tif(options.autoColumns && options.data){\r\n\r\n\t\t\tthis.columnManager.generateColumnsFromRowData(this.options.data);\r\n\t\t}\r\n\r\n\t\t//initialize regular modules\r\n\t\tthis.modulesRegular.forEach((mod) => {\r\n\t\t\tmod.initialize();\r\n\t\t});\r\n\r\n\t\tthis.columnManager.setColumns(options.columns);\r\n\r\n\t\tthis.eventBus.dispatch(\"table-built\");\r\n\t}\r\n\r\n\t_loadInitialData(){\r\n\t\tthis.dataLoader.load(this.options.data);\r\n\t}\r\n\r\n\t//deconstructor\r\n\tdestroy(){\r\n\t\tvar element = this.element;\r\n\r\n\t\tTableRegistry.deregister(this); //deregister table from inter-device communication\r\n\r\n\t\tthis.eventBus.dispatch(\"table-destroy\");\r\n\r\n\t\t//clear row data\r\n\t\tthis.rowManager.rows.forEach(function(row){\r\n\t\t\trow.wipe();\r\n\t\t});\r\n\r\n\t\tthis.rowManager.rows = [];\r\n\t\tthis.rowManager.activeRows = [];\r\n\t\tthis.rowManager.displayRows = [];\r\n\r\n\t\t//clear DOM\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\t\telement.classList.remove(\"tabulator\");\r\n\t}\r\n\r\n\t_detectBrowser(){\r\n\t\tvar ua = navigator.userAgent||navigator.vendor||window.opera;\r\n\r\n\t\tif(ua.indexOf(\"Trident\") > -1){\r\n\t\t\tthis.browser = \"ie\";\r\n\t\t\tthis.browserSlow = true;\r\n\t\t}else if(ua.indexOf(\"Edge\") > -1){\r\n\t\t\tthis.browser = \"edge\";\r\n\t\t\tthis.browserSlow = true;\r\n\t\t}else if(ua.indexOf(\"Firefox\") > -1){\r\n\t\t\tthis.browser = \"firefox\";\r\n\t\t\tthis.browserSlow = false;\r\n\t\t}else{\r\n\t\t\tthis.browser = \"other\";\r\n\t\t\tthis.browserSlow = false;\r\n\t\t}\r\n\r\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));\r\n\t}\r\n\r\n\t////////////////// Data Handling //////////////////\r\n\t//block table redrawing\r\n\tblockRedraw(){\r\n\t\treturn this.rowManager.blockRedraw();\r\n\t}\r\n\r\n\t//restore table redrawing\r\n\trestoreRedraw(){\r\n\t\treturn this.rowManager.restoreRedraw();\r\n\t}\r\n\r\n\t//load data\r\n\tsetData(data, params, config){\r\n\t\tif(this.initialized){\r\n\t\t\treturn this.dataLoader.load(data, params, config, false);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"setData failed - table not yet initialized. To set initial data please use the 'data' property in the table constructor.\")\r\n\t\t}\r\n\t}\r\n\r\n\t//clear data\r\n\tclearData(){\r\n\t\tthis.dataLoader.blockActiveLoad();\r\n\t\tthis.rowManager.clearData();\r\n\t}\r\n\r\n\t//get table data array\r\n\tgetData(active){\r\n\t\treturn this.rowManager.getData(active);\r\n\t}\r\n\r\n\t//get table data array count\r\n\tgetDataCount(active){\r\n\t\treturn this.rowManager.getDataCount(active);\r\n\t}\r\n\r\n\t//replace data, keeping table in position with same sort\r\n\treplaceData(data, params, config){\r\n\t\tif(this.initialized){\r\n\t\t\treturn this.dataLoader.load(data, params, config, true, true);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"replaceData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update table data\r\n\tupdateData(data){\r\n\t\tvar responses = 0;\r\n\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\tresponses++;\r\n\r\n\t\t\t\t\t\t\trow.updateData(item)\r\n\t\t\t\t\t\t\t.then(()=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"updateData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\taddData(data, pos, index){\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tthis.rowManager.addRows(data, pos, index)\r\n\t\t\t\t\t.then((rows) => {\r\n\t\t\t\t\t\tvar output = [];\r\n\r\n\t\t\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\t\t\toutput.push(row.getComponent());\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tresolve(output);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"addData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update table data\r\n\tupdateOrAddData(data){\r\n\t\tvar rows = [],\r\n\t\tresponses = 0;\r\n\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\r\n\t\t\t\t\t\tresponses++;\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.updateData(item)\r\n\t\t\t\t\t\t\t.then(()=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\t\t\t\t\t\t\t\trows.push(row.getComponent());\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve(rows);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.rowManager.addRows(item)\r\n\t\t\t\t\t\t\t.then((newRows)=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\t\t\t\t\t\t\t\trows.push(newRows[0].getComponent());\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve(rows);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"updateOrAddData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//get row object\r\n\tgetRow(index){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching row found:\", index);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//get row object\r\n\tgetRowFromPosition(position, active){\r\n\t\tvar row = this.rowManager.getRowFromPosition(position, active);\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching row found:\", position);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//delete row from table\r\n\tdeleteRow(index){\r\n\t\tvar foundRows = [];\r\n\r\n\t\tif(!Array.isArray(index)){\r\n\t\t\tindex = [index];\r\n\t\t}\r\n\r\n\t\t//find matching rows\r\n\t\tfor(let item of index){\r\n\t\t\tlet row = this.rowManager.findRow(item, true);\r\n\r\n\t\t\tif(row){\r\n\t\t\t\tfoundRows.push(row);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Delete Error - No matching row found:\", item);\r\n\t\t\t\treturn Promise.reject(\"Delete Error - No matching row found\")\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//sort rows into correct order to ensure smooth delete from table\r\n\t\tfoundRows.sort((a, b) => {\r\n\t\t\treturn this.rowManager.rows.indexOf(a) > this.rowManager.rows.indexOf(b) ? 1 : -1;\r\n\t\t});\r\n\r\n\t\t//delete rows\r\n\t\tfoundRows.forEach((row) =>{\r\n\t\t\trow.delete()\r\n\t\t});\r\n\r\n\t\tthis.rowManager.reRenderInPosition();\r\n\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\r\n\t//add row to table\r\n\taddRow(data, pos, index){\r\n\t\tif(this.initialized){\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\r\n\t\t\treturn this.rowManager.addRows(data, pos, index)\r\n\t\t\t.then((rows)=>{\r\n\t\t\t\treturn rows[0].getComponent();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"addRow failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update a row if it exitsts otherwise create it\r\n\tupdateOrAddRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t.then(()=>{\r\n\t\t\t\treturn row.getComponent();\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\treturn this.rowManager.addRows(data)\r\n\t\t\t.then((rows)=>{\r\n\t\t\t\treturn rows[0].getComponent();\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\t//update row data\r\n\tupdateRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t.then(()=>{\r\n\t\t\t\treturn Promise.resolve(row.getComponent());\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Update Error - No matching row found:\", index);\r\n\t\t\treturn Promise.reject(\"Update Error - No matching row found\");\r\n\t\t}\r\n\t}\r\n\r\n\t//scroll to row in DOM\r\n\tscrollToRow(index, position, ifVisible){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn this.rowManager.scrollToRow(row, position, ifVisible)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Scroll Error - No matching row found:\", index);\r\n\t\t\treturn Promise.reject(\"Scroll Error - No matching row found\");\r\n\t\t}\r\n\t}\r\n\r\n\tmoveRow(from, to, after){\r\n\t\tvar fromRow = this.rowManager.findRow(from);\r\n\r\n\t\tif(fromRow){\r\n\t\t\tfromRow.moveToRow(to, after);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching row found:\", from);\r\n\t\t}\r\n\t}\r\n\r\n\tgetRows(active){\r\n\t\treturn this.rowManager.getComponents(active);\r\n\t}\r\n\r\n\t//get position of row in table\r\n\tgetRowPosition(index, active){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn this.rowManager.getRowPosition(row, active);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Position Error - No matching row found:\", index);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t/////////////// Column Functions ///////////////\r\n\tsetColumns(definition){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.columnManager.setColumns(definition);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"setColumns failed - table not yet initialized. To set initial data please use the 'columns' property in the table constructor.\")\r\n\t\t}\r\n\t}\r\n\r\n\tgetColumns(structured){\r\n\t\treturn this.columnManager.getComponents(structured);\r\n\t}\r\n\r\n\tgetColumn(field){\r\n\t\tvar col = this.columnManager.findColumn(field);\r\n\r\n\t\tif(col){\r\n\t\t\treturn col.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tgetColumnDefinitions(){\r\n\t\treturn this.columnManager.getDefinitionTree();\r\n\t}\r\n\r\n\tshowColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tcolumn.show();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Show Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\thideColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tcolumn.hide();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Hide Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\ttoggleColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tif(column.visible){\r\n\t\t\t\tcolumn.hide();\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.show();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Visibility Toggle Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\taddColumn(definition, before, field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\treturn this.columnManager.addColumn(definition, before, column)\r\n\t\t.then((column) => {\r\n\t\t\treturn column.getComponent();\r\n\t\t});\r\n\t}\r\n\r\n\tdeleteColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn column.delete();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Delete Error - No matching column found:\", field);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\r\n\tupdateColumnDefinition(field, definition){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn column.updateDefinition(definition)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Update Error - No matching column found:\", field);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\r\n\tmoveColumn(from, to, after){\r\n\t\tvar fromColumn = this.columnManager.findColumn(from);\r\n\t\tvar toColumn = this.columnManager.findColumn(to);\r\n\r\n\t\tif(fromColumn){\r\n\t\t\tif(toColumn){\r\n\t\t\t\tthis.columnManager.moveColumn(fromColumn, toColumn, after)\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Move Error - No matching column found:\", toColumn);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching column found:\", from);\r\n\t\t}\r\n\t}\r\n\r\n\t//scroll to column in DOM\r\n\tscrollToColumn(field, position, ifVisible){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\t\tif(column){\r\n\t\t\t\treturn this.columnManager.scrollToColumn(column, position, ifVisible)\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - No matching column found:\", field);\r\n\t\t\t\treturn Promise.reject(\"Scroll Error - No matching column found\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//////////// General Public Functions ////////////\r\n\t//redraw list without updating data\r\n\tredraw(force){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.columnManager.redraw(force);\r\n\t\t\tthis.rowManager.redraw(force);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"redraw failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\tsetHeight(height){\r\n\t\tthis.options.height = isNaN(height) ? height : height + \"px\";\r\n\t\tthis.element.style.height = this.options.height;\r\n\t\tthis.rowManager.initializeRenderer();\r\n\t\tthis.rowManager.redraw();\r\n\t}\r\n\r\n\t//////////////////// Event Bus ///////////////////\r\n\r\n\ton(key, callback){\r\n\t\tthis.externalEvents.subscribe(key, callback);\r\n\t}\r\n\r\n\toff(key, callback){\r\n\t\tthis.externalEvents.unsubscribe(key, callback);\r\n\t}\r\n\r\n\tdispatchEvent(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift();\r\n\r\n\t\tthis.externalEvents.dispatch(...arguments)\r\n\t}\r\n\r\n\t////////////// Extension Management //////////////\r\n\tmodExists(plugin, required){\r\n\t\tif(this.modules[plugin]){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tif(required){\r\n\t\t\t\tconsole.error(\"Tabulator Module Not Installed: \" + plugin);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tmodule(key){\r\n\t\tvar mod = this.modules[key];\r\n\r\n\t\tif(!mod){\r\n\t\t\tconsole.error(\"Tabulator module not installed: \" + key);\r\n\t\t}\r\n\r\n\t\treturn mod;\r\n\t}\r\n}\r\n\r\n//default setup options\r\nTabulator.defaultOptions = defaultOptions;\r\n\r\n//bind modules and static functionality\r\nnew ModuleBinder(Tabulator);\r\n\r\nexport default Tabulator;\r\n","export default {\r\n\r\n\tdebugEventsExternal:false, //flag to console log events\r\n\tdebugEventsInternal:false, //flag to console log events\r\n\tdebugInvalidOptions:true, //allow toggling of invalid option warnings\r\n\r\n\theight:false, //height of tabulator\r\n\tminHeight:false, //minimum height of tabulator\r\n\tmaxHeight:false, //maximum height of tabulator\r\n\r\n\tcolumnHeaderVertAlign:\"top\", //vertical alignment of column headers\r\n\r\n\tcolumns:[],//store for colum header info\r\n\tcolumnDefaults:{}, //store column default props\r\n\r\n\tdata:false, //default starting data\r\n\r\n\tautoColumns:false, //build columns from data row structure\r\n\tautoColumnsDefinitions:false,\r\n\r\n\tnestedFieldSeparator:\".\", //separator for nested data\r\n\r\n\ttooltipGenerationMode:\"load\", //when to generate tooltips\r\n\r\n\tfooterElement:false, //hold footer element\r\n\r\n\tindex:\"id\", //filed for row index\r\n\r\n\ttextDirection:\"auto\",\r\n\r\n\taddRowPos:\"bottom\", //position to insert blank rows, top|bottom\r\n\r\n\theaderVisible:true, //hide header\r\n\r\n\trenderVertical:\"virtual\",\r\n\trenderHorizontal:\"basic\",\r\n\trenderVerticalBuffer:0, // set virtual DOM buffer size\r\n\r\n\tscrollToRowPosition:\"top\",\r\n\tscrollToRowIfVisible:true,\r\n\r\n\tscrollToColumnPosition:\"left\",\r\n\tscrollToColumnIfVisible:true,\r\n\r\n\trowFormatter:false,\r\n\trowFormatterPrint:null,\r\n\trowFormatterClipboard:null,\r\n\trowFormatterHtmlOutput:null,\r\n\r\n\tplaceholder:false,\r\n\r\n\tdataLoader:true,\r\n\tdataLoaderLoading:false,\r\n\tdataLoaderError:false,\r\n\tdataLoaderErrorTimeout:3000,\r\n\r\n\tdataSendParams:{},\r\n\r\n\tdataReceiveParams:{},\r\n}\r\n","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defautlAccessors from './defaults/accessors.js';\r\n\r\nclass Accessor extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.allowedTypes = [\"\", \"data\", \"download\", \"clipboard\", \"print\", \"htmlOutput\"] //list of accessor types\r\n\r\n\t\tthis.registerColumnOption(\"accessor\");\r\n\t\tthis.registerColumnOption(\"accessorParams\");\r\n\t\tthis.registerColumnOption(\"accessorData\");\r\n\t\tthis.registerColumnOption(\"accessorDataParams\");\r\n\t\tthis.registerColumnOption(\"accessorDownload\");\r\n\t\tthis.registerColumnOption(\"accessorDownloadParams\");\r\n\t\tthis.registerColumnOption(\"accessorClipboard\");\r\n\t\tthis.registerColumnOption(\"accessorClipboardParams\");\r\n\t\tthis.registerColumnOption(\"accessorPrint\");\r\n\t\tthis.registerColumnOption(\"accessorPrintParams\");\r\n\t\tthis.registerColumnOption(\"accessorHtmlOutput\");\r\n\t\tthis.registerColumnOption(\"accessorHtmlOutputParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"row-data-retrieve\", this.transformRow.bind(this));\r\n\t}\r\n\r\n\t//initialize column accessor\r\n\tinitializeColumn(column){\r\n\t\tvar match = false,\r\n\t\tconfig = {};\r\n\r\n\t\tthis.allowedTypes.forEach((type) => {\r\n\t\t\tvar key = \"accessor\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\t\taccessor;\r\n\r\n\t\t\tif(column.definition[key]){\r\n\t\t\t\taccessor = this.lookupAccessor(column.definition[key]);\r\n\r\n\t\t\t\tif(accessor){\r\n\t\t\t\t\tmatch = true;\r\n\r\n\t\t\t\t\tconfig[key] = {\r\n\t\t\t\t\t\taccessor:accessor,\r\n\t\t\t\t\t\tparams: column.definition[key + \"Params\"] || {},\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tcolumn.modules.accessor = config;\r\n\t\t}\r\n\t}\r\n\r\n\tlookupAccessor(value){\r\n\t\tvar accessor = false;\r\n\r\n\t\t//set column accessor\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Accessor.accessors[value]){\r\n\t\t\t\taccessor = Accessor.accessors[value]\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Accessor Error - No such accessor found, ignoring: \", value);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\taccessor = value;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn accessor;\r\n\t}\r\n\r\n\t//apply accessor to row\r\n\ttransformRow(row, type){\r\n\t\tvar key = \"accessor\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\trowComponent = row.getComponent();\r\n\r\n\t\t//clone data object with deep copy to isolate internal data from returned result\r\n\t\tvar data = Helpers.deepClone(row.data || {});\r\n\r\n\t\tthis.table.columnManager.traverse(function(column){\r\n\t\t\tvar value, accessor, params, colCompnent;\r\n\r\n\t\t\tif(column.modules.accessor){\r\n\r\n\t\t\t\taccessor = column.modules.accessor[key] || column.modules.accessor.accessor || false;\r\n\r\n\t\t\t\tif(accessor){\r\n\t\t\t\t\tvalue = column.getFieldValue(data);\r\n\r\n\t\t\t\t\tif(value != \"undefined\"){\r\n\t\t\t\t\t\tcolCompnent = column.getComponent();\r\n\t\t\t\t\t\tparams = typeof accessor.params === \"function\" ? accessor.params(value, data, type, colCompnent, rowComponent) : accessor.params;\r\n\t\t\t\t\t\tcolumn.setFieldValue(data, accessor.accessor(value, data, type, params, colCompnent, rowComponent));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n}\r\n\r\n//load defaults\r\nAccessor.moduleName = \"accessor\";\r\nAccessor.accessors = defautlAccessors;\r\n\r\nexport default Accessor;","export default {}","function generateParamsList(data, prefix){\r\n\tvar output = [];\r\n\r\n\tprefix = prefix || \"\";\r\n\r\n\tif(Array.isArray(data)){\r\n\t\tdata.forEach((item, i) => {\r\n\t\t\toutput = output.concat(generateParamsList(item, prefix ? prefix + \"[\" + i + \"]\" : i));\r\n\t\t});\r\n\t}else if (typeof data === \"object\"){\r\n\t\tfor (var key in data){\r\n\t\t\toutput = output.concat(generateParamsList(data[key], prefix ? prefix + \"[\" + key + \"]\" : key));\r\n\t\t}\r\n\t}else{\r\n\t\toutput.push({key:prefix, value:data});\r\n\t}\r\n\r\n\treturn output;\r\n}\r\n\r\nfunction serializeParams(params){\r\n\tvar output = generateParamsList(params),\r\n\tencoded = [];\r\n\r\n\toutput.forEach(function(item){\r\n\t\tencoded.push(encodeURIComponent(item.key) + \"=\" + encodeURIComponent(item.value));\r\n\t});\r\n\r\n\treturn encoded.join(\"&\");\r\n}\r\n\r\nexport default function(url, config, params){\r\n\tif(url){\r\n\t\tif(params && Object.keys(params).length){\r\n\t\t\tif(!config.method || config.method.toLowerCase() == \"get\"){\r\n\t\t\t\tconfig.method = \"get\";\r\n\r\n\t\t\t\turl += (url.includes(\"?\") ? \"&\" : \"?\") + serializeParams(params);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn url;\r\n};","function generateParamsList(data, prefix){\r\n\tvar output = [];\r\n\r\n\tprefix = prefix || \"\";\r\n\r\n\tif(Array.isArray(data)){\r\n\t\tdata.forEach((item, i) => {\r\n\t\t\toutput = output.concat(generateParamsList(item, prefix ? prefix + \"[\" + i + \"]\" : i));\r\n\t\t});\r\n\t}else if (typeof data === \"object\"){\r\n\t\tfor (var key in data){\r\n\t\t\toutput = output.concat(generateParamsList(data[key], prefix ? prefix + \"[\" + key + \"]\" : key));\r\n\t\t}\r\n\t}else{\r\n\t\toutput.push({key:prefix, value:data});\r\n\t}\r\n\r\n\treturn output;\r\n}\r\n\r\nexport default {\r\n\t\"json\":{\r\n\t\theaders:{\r\n\t\t\t'Content-Type': 'application/json',\r\n\t\t},\r\n\t\tbody:function(url, config, params){\r\n\t\t\treturn JSON.stringify(params);\r\n\t\t},\r\n\t},\r\n\t\"form\":{\r\n\t\theaders:{\r\n\t\t},\r\n\t\tbody:function(url, config, params){\r\n\r\n\t\t\tvar output = generateParamsList(params),\r\n\t\t\tform = new FormData();\r\n\r\n\t\t\toutput.forEach(function(item){\r\n\t\t\t\tform.append(item.key, item.value);\r\n\t\t\t});\r\n\r\n\t\t\treturn form;\r\n\t\t},\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultConfig from './defaults/config.js';\r\nimport defaultURLGenerator from './defaults/urlGenerator.js';\r\nimport defaultLoaderPromise from './defaults/loaderPromise.js';\r\nimport defaultContentTypeFormatters from './defaults/contentTypeFormatters.js';\r\n\r\nclass Ajax extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.config = {}; //hold config object for ajax request\r\n\t\tthis.url = \"\"; //request URL\r\n\t\tthis.urlGenerator = false;\r\n\t\tthis.params = false; //request parameters\r\n\t\t\r\n\t\tthis.loaderPromise = false;\r\n\t\t\r\n\t\tthis.registerTableOption(\"ajaxURL\", false); //url for ajax loading\r\n\t\tthis.registerTableOption(\"ajaxURLGenerator\", false);\r\n\t\tthis.registerTableOption(\"ajaxParams\", {}); //params for ajax loading\r\n\t\tthis.registerTableOption(\"ajaxConfig\", \"get\"); //ajax request type\r\n\t\tthis.registerTableOption(\"ajaxContentType\", \"form\"); //ajax request type\r\n\t\tthis.registerTableOption(\"ajaxRequestFunc\", false); //promise function\r\n\t\t\r\n\t\tthis.registerTableOption(\"ajaxRequesting\", function(){});\r\n\t\tthis.registerTableOption(\"ajaxResponse\", false);\r\n\t\t\r\n\t\tthis.contentTypeFormatters = Ajax.contentTypeFormatters;\r\n\t}\r\n\t\r\n\t//initialize setup options\r\n\tinitialize(){\r\n\t\tthis.loaderPromise = this.table.options.ajaxRequestFunc || Ajax.defaultLoaderPromise;\r\n\t\tthis.urlGenerator = this.table.options.ajaxURLGenerator || Ajax.defaultURLGenerator;\r\n\t\t\r\n\t\tif(this.table.options.ajaxURL){\r\n\t\t\tthis.setUrl(this.table.options.ajaxURL);\r\n\t\t}\r\n\r\n\r\n\t\tthis.setDefaultConfig(this.table.options.ajaxConfig);\r\n\t\t\r\n\t\tthis.registerTableFunction(\"getAjaxUrl\", this.getUrl.bind(this));\r\n\t\t\r\n\t\tthis.subscribe(\"data-loading\", this.requestDataCheck.bind(this));\r\n\t\tthis.subscribe(\"data-params\", this.requestParams.bind(this));\r\n\t\tthis.subscribe(\"data-load\", this.requestData.bind(this));\r\n\t}\r\n\t\r\n\trequestParams(data, config, silent, params){\r\n\t\tvar ajaxParams = this.table.options.ajaxParams;\r\n\t\t\r\n\t\tif(ajaxParams){\r\n\t\t\tif(typeof ajaxParams === \"function\"){\r\n\t\t\t\tajaxParams = ajaxParams.call(this.table);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tparams = Object.assign(params, ajaxParams);\r\n\t\t}\t\t\r\n\t\t\r\n\t\treturn params;\r\n\t}\r\n\t\r\n\trequestDataCheck(data, params, config, silent){\r\n\t\treturn !!((!data && this.url) || typeof data === \"string\");\r\n\t}\r\n\t\r\n\trequestData(url, params, config, silent, previousData){\r\n\t\tvar ajaxConfig;\r\n\t\t\r\n\t\tif(!previousData && this.requestDataCheck(url)){\r\n\t\t\tif(url){\r\n\t\t\t\tthis.setUrl(url);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tajaxConfig = this.generateConfig(config);\r\n\t\t\t\r\n\t\t\treturn this.sendRequest(this.url, params, ajaxConfig);\r\n\t\t}else{\r\n\t\t\treturn previousData;\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetDefaultConfig(config = {}){\r\n\t\tthis.config = Object.assign({}, Ajax.defaultConfig);\r\n\r\n\t\tif(typeof config == \"string\"){\r\n\t\t\tthis.config.method = config;\r\n\t\t}else{\r\n\t\t\tObject.assign(this.config, config);\r\n\t\t}\r\n\t}\r\n\t\r\n\t//load config object\r\n\tgenerateConfig(config = {}){\r\n\t\tvar ajaxConfig = Object.assign({}, this.config)\r\n\t\t\r\n\t\tif(typeof config == \"string\"){\r\n\t\t\tajaxConfig.method = config;\r\n\t\t}else{\r\n\t\t\tObject.assign(ajaxConfig, config);\r\n\t\t}\r\n\t\t\r\n\t\treturn ajaxConfig;\r\n\t}\r\n\t\r\n\t//set request url\r\n\tsetUrl(url){\r\n\t\tthis.url = url;\r\n\t}\r\n\t\r\n\t//get request url\r\n\tgetUrl(){\r\n\t\treturn this.url;\r\n\t}\r\n\t\r\n\t//send ajax request\r\n\tsendRequest(url, params, config){\r\n\t\tif(this.table.options.ajaxRequesting.call(this.table, url, params) !== false){\r\n\t\t\treturn this.loaderPromise(url, config, params)\r\n\t\t\t.then((data)=>{\r\n\t\t\t\tif(this.table.options.ajaxResponse){\r\n\t\t\t\t\tdata = this.table.options.ajaxResponse.call(this.table, url, params, data);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn data;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n}\r\n\r\nAjax.moduleName = \"ajax\";\r\n\r\n//load defaults\r\nAjax.defaultConfig = defaultConfig;\r\nAjax.defaultURLGenerator = defaultURLGenerator;\r\nAjax.defaultLoaderPromise = defaultLoaderPromise;\r\nAjax.contentTypeFormatters = defaultContentTypeFormatters;\r\n\r\nexport default Ajax;","export default {\r\n\tmethod: \"GET\",\r\n};","export default function(url, config, params){\r\n\tvar contentType;\r\n\r\n\treturn new Promise((resolve, reject) => {\r\n\t\t//set url\r\n\t\turl = this.urlGenerator.call(this.table, url, config, params);\r\n\r\n\t\t//set body content if not GET request\r\n\t\tif(config.method.toUpperCase() != \"GET\"){\r\n\t\t\tcontentType = typeof this.table.options.ajaxContentType === \"object\" ? this.table.options.ajaxContentType : this.contentTypeFormatters[this.table.options.ajaxContentType];\r\n\t\t\tif(contentType){\r\n\r\n\t\t\t\tfor(var key in contentType.headers){\r\n\t\t\t\t\tif(!config.headers){\r\n\t\t\t\t\t\tconfig.headers = {};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(typeof config.headers[key] === \"undefined\"){\r\n\t\t\t\t\t\tconfig.headers[key] = contentType.headers[key];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconfig.body = contentType.body.call(this, url, config, params);\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Ajax Error - Invalid ajaxContentType value:\", this.table.options.ajaxContentType);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(url){\r\n\t\t\t//configure headers\r\n\t\t\tif(typeof config.headers === \"undefined\"){\r\n\t\t\t\tconfig.headers = {};\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.headers.Accept === \"undefined\"){\r\n\t\t\t\tconfig.headers.Accept = \"application/json\";\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.headers[\"X-Requested-With\"] === \"undefined\"){\r\n\t\t\t\tconfig.headers[\"X-Requested-With\"] = \"XMLHttpRequest\";\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.mode === \"undefined\"){\r\n\t\t\t\tconfig.mode = \"cors\";\r\n\t\t\t}\r\n\r\n\t\t\tif(config.mode == \"cors\"){\r\n\t\t\t\tif(typeof config.headers[\"Origin\"] === \"undefined\"){\r\n\t\t\t\t\tconfig.headers[\"Origin\"] = window.location.origin;\r\n\t\t\t\t}\r\n \r\n\t\t\t\tif(typeof config.credentials === \"undefined\"){\r\n\t\t\t\t\tconfig.credentials = 'same-origin';\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(typeof config.credentials === \"undefined\"){\r\n\t\t\t\t\tconfig.credentials = 'include';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//send request\r\n\t\t\tfetch(url, config)\r\n\t\t\t.then((response)=>{\r\n\t\t\t\tif(response.ok) {\r\n\t\t\t\t\tresponse.json()\r\n\t\t\t\t\t.then((data)=>{\r\n\t\t\t\t\t\tresolve(data);\r\n\t\t\t\t\t}).catch((error)=>{\r\n\t\t\t\t\t\treject(error);\r\n\t\t\t\t\t\tconsole.warn(\"Ajax Load Error - Invalid JSON returned\", error);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \" + response.status, response.statusText);\r\n\t\t\t\t\treject(response);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.catch((error)=>{\r\n\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \", error);\r\n\t\t\t\treject(error);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Ajax Load Error - No URL Set\");\r\n\t\t\tresolve([]);\r\n\t\t}\r\n\t});\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultPasteActions from './defaults/pasteActions.js';\r\nimport defaultPasteParsers from './defaults/pasteParsers.js';\r\n\r\nclass Clipboard extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.mode = true;\r\n\t\tthis.pasteParser = function(){};\r\n\t\tthis.pasteAction = function(){};\r\n\t\tthis.customSelection = false;\r\n\t\tthis.rowRange = false;\r\n\t\tthis.blocked = true; //block copy actions not originating from this command\r\n\r\n\t\tthis.registerTableOption(\"clipboard\", false); //enable clipboard\r\n\t\tthis.registerTableOption(\"clipboardCopyStyled\", true); //formatted table data\r\n\t\tthis.registerTableOption(\"clipboardCopyConfig\", false); //clipboard config\r\n\t\tthis.registerTableOption(\"clipboardCopyFormatter\", false); //DEPRICATED - REMOVE in 5.0\r\n\t\tthis.registerTableOption(\"clipboardCopyRowRange\", \"active\"); //restrict clipboard to visible rows only\r\n\t\tthis.registerTableOption(\"clipboardPasteParser\", \"table\"); //convert pasted clipboard data to rows\r\n\t\tthis.registerTableOption(\"clipboardPasteAction\", \"insert\"); //how to insert pasted data into the table\r\n\r\n\t\tthis.registerColumnOption(\"clipboard\");\r\n\t\tthis.registerColumnOption(\"titleClipboard\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.mode = this.table.options.clipboard;\r\n\r\n\t\tthis.rowRange = this.table.options.clipboardCopyRowRange;\r\n\r\n\t\tif(this.mode === true || this.mode === \"copy\"){\r\n\t\t\tthis.table.element.addEventListener(\"copy\", (e) => {\r\n\t\t\t\tvar plain, html, list;\r\n\r\n\t\t\t\tif(!this.blocked){\r\n\t\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\t\tif(this.customSelection){\r\n\t\t\t\t\t\tplain = this.customSelection;\r\n\r\n\t\t\t\t\t\tif(this.table.options.clipboardCopyFormatter){\r\n\t\t\t\t\t\t\tplain = this.table.options.clipboardCopyFormatter(\"plain\", plain);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\r\n\t\t\t\t\t\tvar list = this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig, this.table.options.clipboardCopyStyled, this.rowRange, \"clipboard\");\r\n\r\n\t\t\t\t\t\thtml = this.table.modules.export.genereateHTMLTable(list);\r\n\t\t\t\t\t\tplain = html ? this.generatePlainContent(list) : \"\";\r\n\r\n\t\t\t\t\t\tif(this.table.options.clipboardCopyFormatter){\r\n\t\t\t\t\t\t\tplain = this.table.options.clipboardCopyFormatter(\"plain\", plain);\r\n\t\t\t\t\t\t\thtml = this.table.options.clipboardCopyFormatter(\"html\", html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (window.clipboardData && window.clipboardData.setData) {\r\n\t\t\t\t\t\twindow.clipboardData.setData('Text', plain);\r\n\t\t\t\t\t} else if (e.clipboardData && e.clipboardData.setData) {\r\n\t\t\t\t\t\te.clipboardData.setData('text/plain', plain);\r\n\t\t\t\t\t\tif(html){\r\n\t\t\t\t\t\t\te.clipboardData.setData('text/html', html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (e.originalEvent && e.originalEvent.clipboardData.setData) {\r\n\t\t\t\t\t\te.originalEvent.clipboardData.setData('text/plain', plain);\r\n\t\t\t\t\t\tif(html){\r\n\t\t\t\t\t\t\te.originalEvent.clipboardData.setData('text/html', html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.dispatchExternal(\"clipboardCopied\", plain, html);\r\n\r\n\t\t\t\t\tthis.reset();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.mode === true || this.mode === \"paste\"){\r\n\t\t\tthis.table.element.addEventListener(\"paste\", (e) => {\r\n\t\t\t\tthis.paste(e);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.setPasteParser(this.table.options.clipboardPasteParser);\r\n\t\tthis.setPasteAction(this.table.options.clipboardPasteAction);\r\n\r\n\t\tthis.registerTableFunction(\"copyToClipboard\", this.copy.bind(this));\r\n\t}\r\n\r\n\treset(){\r\n\t\tthis.blocked = true;\r\n\t\tthis.customSelection = false;\r\n\t}\r\n\r\n\tgeneratePlainContent (list) {\r\n\t\tvar output = [];\r\n\r\n\t\tlist.forEach((row) => {\r\n\t\t\tvar rowData = [];\r\n\r\n\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\tvar value = \"\";\r\n\r\n\t\t\t\tif(col){\r\n\r\n\t\t\t\t\tif(row.type === \"group\"){\r\n\t\t\t\t\t\tcol.value = col.component.getKey();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(col.value === null){\r\n\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\t\tvalue = JSON.stringify(col.value);\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tvalue = col.value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowData.push(value);\r\n\t\t\t});\r\n\r\n\t\t\toutput.push(rowData.join(\"\\t\"));\r\n\t\t});\r\n\r\n\t\treturn output.join(\"\\n\");\r\n\t}\r\n\r\n\tcopy (range, internal) {\r\n\t\tvar range, sel, textRange;\r\n\t\tthis.blocked = false;\r\n\t\tthis.customSelection = false;\r\n\r\n\t\tif (this.mode === true || this.mode === \"copy\") {\r\n\r\n\t\t\tthis.rowRange = range || this.table.options.clipboardCopyRowRange;\r\n\r\n\t\t\tif (typeof window.getSelection != \"undefined\" && typeof document.createRange != \"undefined\") {\r\n\t\t\t\trange = document.createRange();\r\n\t\t\t\trange.selectNodeContents(this.table.element);\r\n\t\t\t\tsel = window.getSelection();\r\n\r\n\t\t\t\tif (sel.toString() && internal) {\r\n\t\t\t\t\tthis.customSelection = sel.toString();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsel.removeAllRanges();\r\n\t\t\t\tsel.addRange(range);\r\n\t\t\t} else if (typeof document.selection != \"undefined\" && typeof document.body.createTextRange != \"undefined\") {\r\n\t\t\t\ttextRange = document.body.createTextRange();\r\n\t\t\t\ttextRange.moveToElementText(this.table.element);\r\n\t\t\t\ttextRange.select();\r\n\t\t\t}\r\n\r\n\t\t\tdocument.execCommand('copy');\r\n\r\n\t\t\tif (sel) {\r\n\t\t\t\tsel.removeAllRanges();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//PASTE EVENT HANDLING\r\n\tsetPasteAction(action){\r\n\r\n\t\tswitch(typeof action){\r\n\t\t\tcase \"string\":\r\n\t\t\tthis.pasteAction = Clipboard.pasteActions[action];\r\n\r\n\t\t\tif(!this.pasteAction){\r\n\t\t\t\tconsole.warn(\"Clipboard Error - No such paste action found:\", action);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tthis.pasteAction = action;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tsetPasteParser(parser){\r\n\t\tswitch(typeof parser){\r\n\t\t\tcase \"string\":\r\n\t\t\tthis.pasteParser = Clipboard.pasteParsers[parser];\r\n\r\n\t\t\tif(!this.pasteParser){\r\n\t\t\t\tconsole.warn(\"Clipboard Error - No such paste parser found:\", parser);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tthis.pasteParser = parser;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tpaste(e){\r\n\t\tvar data, rowData, rows;\r\n\r\n\t\tif(this.checkPaseOrigin(e)){\r\n\r\n\t\t\tdata = this.getPasteData(e);\r\n\r\n\t\t\trowData = this.pasteParser.call(this, data);\r\n\r\n\t\t\tif(rowData){\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\t\t\trowData = this.mutateData(rowData);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trows = this.pasteAction.call(this, rowData);\r\n\r\n\t\t\t\tthis.dispatchExternal(\"clipboardPasted\", data, rowData, rows);\r\n\t\t\t}else{\r\n\t\t\t\tthis.dispatchExternal(\"clipboardPasteError\", data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmutateData(data){\r\n\t\tvar output = [];\r\n\r\n\t\tif(Array.isArray(data)){\r\n\t\t\tdata.forEach((row) => {\r\n\t\t\t\toutput.push(this.table.modules.mutator.transformRow(row, \"clipboard\"));\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\toutput = data;\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\r\n\tcheckPaseOrigin(e){\r\n\t\tvar valid = true;\r\n\r\n\t\tif(e.target.tagName != \"DIV\" || this.table.modules.edit.currentCell){\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\r\n\t\treturn valid;\r\n\t}\r\n\r\n\tgetPasteData(e){\r\n\t\tvar data;\r\n\r\n\t\tif (window.clipboardData && window.clipboardData.getData) {\r\n\t\t\tdata = window.clipboardData.getData('Text');\r\n\t\t} else if (e.clipboardData && e.clipboardData.getData) {\r\n\t\t\tdata = e.clipboardData.getData('text/plain');\r\n\t\t} else if (e.originalEvent && e.originalEvent.clipboardData.getData) {\r\n\t\t\tdata = e.originalEvent.clipboardData.getData('text/plain');\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n}\r\n\r\nClipboard.moduleName = \"clipboard\";\r\n\r\n//load defaults\r\nClipboard.pasteActions = defaultPasteActions;\r\nClipboard.pasteParsers = defaultPasteParsers;\r\n\r\nexport default Clipboard;","export default {\r\n\treplace:function(rows){\r\n\t\treturn this.table.setData(rows);\r\n\t},\r\n\tupdate:function(rows){\r\n\t\treturn this.table.updateOrAddData(rows);\r\n\t},\r\n\tinsert:function(rows){\r\n\t\treturn this.table.addData(rows);\r\n\t},\r\n};","export default {\r\n\ttable:function(clipboard){\r\n\t\tvar data = [],\r\n\t\tsuccess = false,\r\n\t\theaderFindSuccess = true,\r\n\t\tcolumns = this.table.columnManager.columns,\r\n\t\tcolumnMap = [],\r\n\t\trows = [];\r\n\r\n\t\t//get data from clipboard into array of columns and rows.\r\n\t\tclipboard = clipboard.split(\"\\n\");\r\n\r\n\t\tclipboard.forEach(function(row){\r\n\t\t\tdata.push(row.split(\"\\t\"));\r\n\t\t});\r\n\r\n\t\tif(data.length && !(data.length === 1 && data[0].length < 2)){\r\n\t\t\tsuccess = true;\r\n\r\n\t\t\t//check if headers are present by title\r\n\t\t\tdata[0].forEach(function(value){\r\n\t\t\t\tvar column = columns.find(function(column){\r\n\t\t\t\t\treturn value && column.definition.title && value.trim() && column.definition.title.trim() === value.trim();\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tcolumnMap.push(column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\theaderFindSuccess = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t//check if column headers are present by field\r\n\t\t\tif(!headerFindSuccess){\r\n\t\t\t\theaderFindSuccess = true;\r\n\t\t\t\tcolumnMap = [];\r\n\r\n\t\t\t\tdata[0].forEach(function(value){\r\n\t\t\t\t\tvar column = columns.find(function(column){\r\n\t\t\t\t\t\treturn value && column.field && value.trim() && column.field.trim() === value.trim();\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(column){\r\n\t\t\t\t\t\tcolumnMap.push(column);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\theaderFindSuccess = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(!headerFindSuccess){\r\n\t\t\t\t\tcolumnMap = this.table.columnManager.columnsByIndex;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//remove header row if found\r\n\t\t\tif(headerFindSuccess){\r\n\t\t\t\tdata.shift();\r\n\t\t\t}\r\n\r\n\t\t\tdata.forEach(function(item){\r\n\t\t\t\tvar row = {};\r\n\r\n\t\t\t\titem.forEach(function(value, i){\r\n\t\t\t\t\tif(columnMap[i]){\r\n\t\t\t\t\t\trow[columnMap[i].field] = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\trows.push(row);\r\n\t\t\t});\r\n\r\n\t\t\treturn rows;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n};","class CalcComponent{\r\n\tconstructor (row){\r\n\t\tthis._row = row;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._row.table.componentFunctionBinder.handle(\"row\", target._row, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\treturn this._row.getData(transform);\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._row.getElement();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._row.table;\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._row.getCells().forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar cell = this._row.getCell(column);\r\n\t\treturn cell ? cell.getComponent() : false;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._row;\r\n\t}\r\n}\r\n\r\nexport default CalcComponent;","export default {\r\n\t\"avg\":function(values, data, calcParams){\r\n\t\tvar output = 0,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : 2\r\n\r\n\t\tif(values.length){\r\n\t\t\toutput = values.reduce(function(sum, value){\r\n\t\t\t\treturn Number(sum) + Number(value);\r\n\t\t\t});\r\n\r\n\t\t\toutput = output / values.length;\r\n\r\n\t\t\toutput = precision !== false ? output.toFixed(precision) : output;\r\n\t\t}\r\n\r\n\t\treturn parseFloat(output).toString();\r\n\t},\r\n\t\"max\":function(values, data, calcParams){\r\n\t\tvar output = null,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tvalues.forEach(function(value){\r\n\r\n\t\t\tvalue = Number(value);\r\n\r\n\t\t\tif(value > output || output === null){\r\n\t\t\t\toutput = value;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output !== null ? (precision !== false ? output.toFixed(precision) : output) : \"\";\r\n\t},\r\n\t\"min\":function(values, data, calcParams){\r\n\t\tvar output = null,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tvalues.forEach(function(value){\r\n\r\n\t\t\tvalue = Number(value);\r\n\r\n\t\t\tif(value < output || output === null){\r\n\t\t\t\toutput = value;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output !== null ? (precision !== false ? output.toFixed(precision) : output) : \"\";\r\n\t},\r\n\t\"sum\":function(values, data, calcParams){\r\n\t\tvar output = 0,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tif(values.length){\r\n\t\t\tvalues.forEach(function(value){\r\n\t\t\t\tvalue = Number(value);\r\n\r\n\t\t\t\toutput += !isNaN(value) ? Number(value) : 0;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn precision !== false ? output.toFixed(precision) : output;\r\n\t},\r\n\t\"concat\":function(values, data, calcParams){\r\n\t\tvar output = 0;\r\n\r\n\t\tif(values.length){\r\n\t\t\toutput = values.reduce(function(sum, value){\r\n\t\t\t\treturn String(sum) + String(value);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t},\r\n\t\"count\":function(values, data, calcParams){\r\n\t\tvar output = 0;\r\n\r\n\t\tif(values.length){\r\n\t\t\tvalues.forEach(function(value){\r\n\t\t\t\tif(value){\r\n\t\t\t\t\toutput ++;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport CalcComponent from './CalcComponent.js';\r\n\r\nimport Cell from '../../core/cell/Cell.js';\r\nimport Column from '../../core/column/Column.js';\r\nimport Row from '../../core/row/Row.js';\r\n\r\nimport defaultCalculations from './defaults/calculations.js';\r\n\r\nclass ColumnCalcs extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.topCalcs = [];\r\n\t\tthis.botCalcs = [];\r\n\t\tthis.genColumn = false;\r\n\t\tthis.topElement = this.createElement();\r\n\t\tthis.botElement = this.createElement();\r\n\t\tthis.topRow = false;\r\n\t\tthis.botRow = false;\r\n\t\tthis.topInitialized = false;\r\n\t\tthis.botInitialized = false;\r\n\r\n\t\tthis.registerTableOption(\"columnCalcs\", true);\r\n\r\n\t\tthis.registerColumnOption(\"topCalc\");\r\n\t\tthis.registerColumnOption(\"topCalcParams\");\r\n\t\tthis.registerColumnOption(\"topCalcFormatter\");\r\n\t\tthis.registerColumnOption(\"topCalcFormatterParams\");\r\n\t\tthis.registerColumnOption(\"bottomCalc\");\r\n\t\tthis.registerColumnOption(\"bottomCalcParams\");\r\n\t\tthis.registerColumnOption(\"bottomCalcFormatter\");\r\n\t\tthis.registerColumnOption(\"bottomCalcFormatterParams\");\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-calcs-holder\");\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.genColumn = new Column({field:\"value\"}, this);\r\n\r\n\t\tthis.subscribe(\"cell-value-changed\", this.cellValueChanged.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumnCheck.bind(this));\r\n\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t\tthis.subscribe(\"row-added\", this.rowsUpdated.bind(this));\r\n\t\tthis.subscribe(\"column-moved\", this.recalcActiveRows.bind(this));\r\n\t\tthis.subscribe(\"column-add\", this.recalcActiveRows.bind(this));\r\n\t\tthis.subscribe(\"data-refreshed\", this.recalcActiveRowsRefresh.bind(this));\r\n\t\tthis.subscribe(\"table-redraw\", this.tableRedraw.bind(this));\r\n\t\tthis.subscribe(\"rows-visible\", this.visibleRows.bind(this));\r\n\r\n\t\tthis.registerTableFunction(\"getCalcResults\", this.getResults.bind(this));\r\n\t\tthis.registerTableFunction(\"recalc\", this.userRecalc.bind(this));\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\r\n\t\tif(force){\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\tuserRecalc(){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tvisibleRows(viewable, rows){\r\n\t\tif(this.topRow){\r\n\t\t\trows.unshift(this.topRow);\r\n\t\t}\r\n\r\n\t\tif(this.botRow){\r\n\t\t\trows.push(this.botRow);\r\n\t\t}\r\n\t\r\n\t\treturn rows;\r\n\t}\r\n\r\n\trowsUpdated(row){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.recalcRowGroup(this);\r\n\t\t}else{\r\n\t\t\tthis.recalcActiveRows();\r\n\t\t}\r\n\t}\r\n\r\n\trecalcActiveRowsRefresh(){\r\n\t\tif(this.table.options.groupBy && this.table.options.dataTreeStartExpanded && this.table.options.dataTree){\r\n\t\t\tthis.recalcAll();\r\n\t\t}else{\r\n\t\t\tthis.recalcActiveRows();\r\n\t\t}\r\n\t}\r\n\r\n\trecalcActiveRows(){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t}\r\n\r\n\tcellValueChanged(cell){\r\n\t\tif(cell.column.definition.topCalc || cell.column.definition.bottomCalc){\r\n\t\t\tif(this.table.options.groupBy){\r\n\t\t\t\tif(this.table.options.columnCalcs == \"table\" || this.table.options.columnCalcs == \"both\"){\r\n\t\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"table\"){\r\n\t\t\t\t\tthis.recalcRowGroup(cell.row);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(column.definition.topCalc || column.definition.bottomCalc){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column calcs\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition\r\n\r\n\t\tvar config = {\r\n\t\t\ttopCalcParams:def.topCalcParams || {},\r\n\t\t\tbotCalcParams:def.bottomCalcParams || {},\r\n\t\t};\r\n\r\n\t\tif(def.topCalc){\r\n\r\n\t\t\tswitch(typeof def.topCalc){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(ColumnCalcs.calculations[def.topCalc]){\r\n\t\t\t\t\tconfig.topCalc = ColumnCalcs.calculations[def.topCalc]\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.topCalc);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tconfig.topCalc = def.topCalc;\r\n\t\t\t\tbreak\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(config.topCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.topCalcs.push(column);\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"group\"){\r\n\t\t\t\t\tthis.initializeTopRow();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tif(def.bottomCalc){\r\n\t\t\tswitch(typeof def.bottomCalc){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(ColumnCalcs.calculations[def.bottomCalc]){\r\n\t\t\t\t\tconfig.botCalc = ColumnCalcs.calculations[def.bottomCalc]\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.bottomCalc);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tconfig.botCalc = def.bottomCalc;\r\n\t\t\t\tbreak\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(config.botCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.botCalcs.push(column);\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"group\"){\r\n\t\t\t\t\tthis.initializeBottomRow();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t//dummy functions to handle being mock column manager\r\n\tregisterColumnField(){};\r\n\r\n\tremoveCalcs(){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(this.topInitialized){\r\n\t\t\tthis.topInitialized = false;\r\n\t\t\tthis.topElement.parentNode.removeChild(this.topElement);\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\r\n\t\tif(this.botInitialized){\r\n\t\t\tthis.botInitialized = false;\r\n\t\t\tthis.table.footerManager.remove(this.botElement);\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeTopRow(){\r\n\t\tif(!this.topInitialized){\r\n\t\t\tthis.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\r\n\t\t\tthis.topInitialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeBottomRow(){\r\n\t\tif(!this.botInitialized){\r\n\t\t\tthis.table.footerManager.prepend(this.botElement);\r\n\t\t\tthis.botInitialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tscrollHorizontal(left){\r\n\t\tif(this.botInitialized && this.botRow){\r\n\t\t\tthis.botRow.getElement().style.marginLeft = (-left) + \"px\";\r\n\t\t}\r\n\t}\r\n\r\n\trecalc(rows){\r\n\t\tvar data, row;\r\n\r\n\t\tif(this.topInitialized || this.botInitialized){\r\n\t\t\tdata = this.rowsToData(rows);\r\n\r\n\t\t\tif(this.topInitialized){\r\n\t\t\t\tif(this.topRow){\r\n\t\t\t\t\tthis.topRow.deleteCells();\r\n\t\t\t\t}\r\n\r\n\t\t\t\trow = this.generateRow(\"top\", this.rowsToData(rows))\r\n\t\t\t\tthis.topRow = row;\r\n\t\t\t\twhile(this.topElement.firstChild) this.topElement.removeChild(this.topElement.firstChild);\r\n\t\t\t\tthis.topElement.appendChild(row.getElement());\r\n\t\t\t\trow.initialize(true);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.botInitialized){\r\n\t\t\t\tif(this.botRow){\r\n\t\t\t\t\tthis.botRow.deleteCells();\r\n\t\t\t\t}\r\n\r\n\t\t\t\trow = this.generateRow(\"bottom\", this.rowsToData(rows))\r\n\t\t\t\tthis.botRow = row;\r\n\t\t\t\twhile(this.botElement.firstChild) this.botElement.removeChild(this.botElement.firstChild);\r\n\t\t\t\tthis.botElement.appendChild(row.getElement());\r\n\t\t\t\trow.initialize(true);\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\t//set resizable handles\r\n\t\t\tif(this.table.modExists(\"frozenColumns\")){\r\n\t\t\t\tthis.table.modules.frozenColumns.layout();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trecalcRowGroup(row){\r\n\t\tthis.recalcGroup(this.table.modules.groupRows.getRowGroup(row));\r\n\t}\r\n\r\n\trecalcAll(){\r\n\t\tif(this.topCalcs.length || this.botCalcs.length){\r\n\t\t\tif(this.table.options.columnCalcs !== \"group\"){\r\n\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.groupBy && this.table.options.columnCalcs !== \"table\"){\r\n\r\n\t\t\t\tvar groups = this.table.modules.groupRows.getChildGroups();\r\n\r\n\t\t\t\tgroups.forEach((group) => {\r\n\t\t\t\t\tthis.recalcGroup(group);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trecalcGroup(group){\r\n\t\tvar data, rowData;\r\n\r\n\t\tif(group){\r\n\t\t\tif(group.calcs){\r\n\t\t\t\tif(group.calcs.bottom){\r\n\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\trowData = this.generateRowData(\"bottom\", data);\r\n\r\n\t\t\t\t\tgroup.calcs.bottom.updateData(rowData);\r\n\t\t\t\t\tgroup.calcs.bottom.reinitialize();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(group.calcs.top){\r\n\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\trowData = this.generateRowData(\"top\", data);\r\n\r\n\t\t\t\t\tgroup.calcs.top.updateData(rowData);\r\n\t\t\t\t\tgroup.calcs.top.reinitialize();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//generate top stats row\r\n\tgenerateTopRow(rows){\r\n\t\treturn this.generateRow(\"top\", this.rowsToData(rows));\r\n\t}\r\n\t//generate bottom stats row\r\n\tgenerateBottomRow(rows){\r\n\t\treturn this.generateRow(\"bottom\", this.rowsToData(rows));\r\n\t}\r\n\r\n\trowsToData(rows){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\trows.forEach((row) => {\r\n\t\t\tdata.push(row.getData());\r\n\r\n\t\t\tif(this.table.options.dataTree && this.table.options.dataTreeChildColumnCalcs){\r\n\t\t\t\tif(row.modules.dataTree && row.modules.dataTree.open){\r\n\t\t\t\t\tvar children = this.rowsToData(this.table.modules.dataTree.getFilteredTreeChildren(row));\r\n\t\t\t\t\tdata = data.concat(children);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//generate stats row\r\n\tgenerateRow(pos, data){\r\n\t\tvar rowData = this.generateRowData(pos, data),\r\n\t\trow;\r\n\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.disable();\r\n\t\t}\r\n\r\n\t\trow = new Row(rowData, this, \"calc\");\r\n\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.enable();\r\n\t\t}\r\n\r\n\t\trow.getElement().classList.add(\"tabulator-calcs\", \"tabulator-calcs-\" + pos);\r\n\r\n\t\trow.component = false;\r\n\r\n\t\trow.getComponent = () => {\r\n\t\t\tif(!row.component){\r\n\t\t\t\trow.component = new CalcComponent(row);\r\n\t\t\t}\r\n\r\n\t\t\treturn row.component;\r\n\t\t};\r\n\r\n\t\trow.generateCells = () => {\r\n\r\n\t\t\tvar cells = [];\r\n\r\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\r\n\t\t\t\t\t//set field name of mock column\r\n\t\t\t\t\tthis.genColumn.setField(column.getField());\r\n\t\t\t\t\tthis.genColumn.hozAlign = column.hozAlign;\r\n\r\n\t\t\t\t\tif(column.definition[pos + \"CalcFormatter\"] && this.table.modExists(\"format\")){\r\n\t\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(column.definition[pos + \"CalcFormatter\"]),\r\n\t\t\t\t\t\t\tparams: column.definition[pos + \"CalcFormatterParams\"] || {},\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(\"plaintext\"),\r\n\t\t\t\t\t\t\tparams:{}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//ensure css class defintion is replicated to calculation cell\r\n\t\t\t\t\tthis.genColumn.definition.cssClass = column.definition.cssClass;\r\n\r\n\t\t\t\t\t//generate cell and assign to correct column\r\n\t\t\t\t\tvar cell = new Cell(this.genColumn, row);\r\n\t\t\t\t\tcell.getElement();\r\n\t\t\t\t\tcell.column = column;\r\n\t\t\t\t\tcell.setWidth();\r\n\r\n\t\t\t\t\tcolumn.cells.push(cell);\r\n\t\t\t\t\tcells.push(cell);\r\n\r\n\t\t\t\t\tif(!column.visible){\r\n\t\t\t\t\t\tcell.hide();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\trow.cells = cells;\r\n\t\t};\r\n\r\n\t\treturn row;\r\n\t}\r\n\r\n\t//generate stats row\r\n\tgenerateRowData(pos, data){\r\n\t\tvar rowData = {},\r\n\t\tcalcs = pos == \"top\" ? this.topCalcs : this.botCalcs,\r\n\t\ttype = pos == \"top\" ? \"topCalc\" : \"botCalc\",\r\n\t\tparams, paramKey;\r\n\r\n\t\tcalcs.forEach(function(column){\r\n\t\t\tvar values = [];\r\n\r\n\t\t\tif(column.modules.columnCalcs && column.modules.columnCalcs[type]){\r\n\t\t\t\tdata.forEach(function(item){\r\n\t\t\t\t\tvalues.push(column.getFieldValue(item));\r\n\t\t\t\t});\r\n\r\n\t\t\t\tparamKey = type + \"Params\";\r\n\t\t\t\tparams = typeof column.modules.columnCalcs[paramKey] === \"function\" ? column.modules.columnCalcs[paramKey](values, data) : column.modules.columnCalcs[paramKey];\r\n\r\n\t\t\t\tcolumn.setFieldValue(rowData, column.modules.columnCalcs[type](values, data, params));\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowData;\r\n\t}\r\n\r\n\thasTopCalcs(){\r\n\t\treturn\t!!(this.topCalcs.length);\r\n\t}\r\n\r\n\thasBottomCalcs(){\r\n\t\treturn\t!!(this.botCalcs.length);\r\n\t}\r\n\r\n\t//handle table redraw\r\n\tredraw(){\r\n\t\tif(this.topRow){\r\n\t\t\tthis.topRow.normalizeHeight(true);\r\n\t\t}\r\n\t\tif(this.botRow){\r\n\t\t\tthis.botRow.normalizeHeight(true);\r\n\t\t}\r\n\t}\r\n\r\n\t//return the calculated\r\n\tgetResults(){\r\n\t\tvar results = {},\r\n\t\tgroups;\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tgroups = this.table.modules.groupRows.getGroups(true);\r\n\r\n\t\t\tgroups.forEach((group) => {\r\n\t\t\t\tresults[group.getKey()] = this.getGroupResults(group);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tresults = {\r\n\t\t\t\ttop: this.topRow ? this.topRow.getData() : {},\r\n\t\t\t\tbottom: this.botRow ? this.botRow.getData() : {},\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n\r\n\t//get results from a group\r\n\tgetGroupResults(group){\r\n\t\tvar groupObj = group._getSelf(),\r\n\t\tsubGroups = group.getSubGroups(),\r\n\t\tsubGroupResults = {},\r\n\t\tresults = {};\r\n\r\n\t\tsubGroups.forEach((subgroup) => {\r\n\t\t\tsubGroupResults[subgroup.getKey()] = this.getGroupResults(subgroup);\r\n\t\t});\r\n\r\n\t\tresults = {\r\n\t\t\ttop: groupObj.calcs.top ? groupObj.calcs.top.getData() : {},\r\n\t\t\tbottom: groupObj.calcs.bottom ? groupObj.calcs.bottom.getData() : {},\r\n\t\t\tgroups: subGroupResults,\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n}\r\n\r\nColumnCalcs.moduleName = \"columnCalcs\";\r\n\r\n//load defaults\r\nColumnCalcs.calculations = defaultCalculations;\r\n\r\nexport default ColumnCalcs;","import Module from '../../core/Module.js';\r\n\r\nimport Row from '../../core/row/Row.js';\r\n\r\nclass DataTree extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.indent = 10;\r\n\t\tthis.field = \"\";\r\n\t\tthis.collapseEl = null;\r\n\t\tthis.expandEl = null;\r\n\t\tthis.branchEl = null;\r\n\t\tthis.elementField = false;\r\n\r\n\t\tthis.startOpen = function(){};\r\n\r\n\t\tthis.displayIndex = 0;\r\n\r\n\t\tthis.registerTableOption(\"dataTree\", false); //enable data tree\r\n\t\tthis.registerTableOption(\"dataTreeFilter\", true); //filter child rows\r\n\t\tthis.registerTableOption(\"dataTreeSort\", true); //sort child rows\r\n\t\tthis.registerTableOption(\"dataTreeElementColumn\", false);\r\n\t\tthis.registerTableOption(\"dataTreeBranchElement\", true);//show data tree branch element\r\n\t\tthis.registerTableOption(\"dataTreeChildIndent\", 9); //data tree child indent in px\r\n\t\tthis.registerTableOption(\"dataTreeChildField\", \"_children\");//data tre column field to look for child rows\r\n\t\tthis.registerTableOption(\"dataTreeCollapseElement\", false);//data tree row collapse element\r\n\t\tthis.registerTableOption(\"dataTreeExpandElement\", false);//data tree row expand element\r\n\t\tthis.registerTableOption(\"dataTreeStartExpanded\", false);\r\n\t\tthis.registerTableOption(\"dataTreeChildColumnCalcs\", false);//include visible data tree rows in column calculations\r\n\t\tthis.registerTableOption(\"dataTreeSelectPropagate\", false);//seleccting a parent row selects its children\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"treeCollapse\", this.collapseRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"treeExpand\", this.expandRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"treeToggle\", this.toggleRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"getTreeParent\", this.getTreeParent.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"getTreeChildren\", this.getRowChildren.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"addTreeChild\", this.addTreeChildRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isTreeExpanded\", this.isRowExpanded.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.dataTree){\r\n\t\t\tvar dummyEl = null,\r\n\t\t\toptions = this.table.options;\r\n\r\n\t\t\tthis.field = options.dataTreeChildField;\r\n\t\t\tthis.indent = options.dataTreeChildIndent;\r\n\r\n\t\t\tif(options.dataTreeBranchElement){\r\n\r\n\t\t\t\tif(options.dataTreeBranchElement === true){\r\n\t\t\t\t\tthis.branchEl = document.createElement(\"div\");\r\n\t\t\t\t\tthis.branchEl.classList.add(\"tabulator-data-tree-branch\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(typeof options.dataTreeBranchElement === \"string\"){\r\n\t\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\t\tdummyEl.innerHTML = options.dataTreeBranchElement;\r\n\t\t\t\t\t\tthis.branchEl = dummyEl.firstChild;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.branchEl = options.dataTreeBranchElement;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(options.dataTreeCollapseElement){\r\n\t\t\t\tif(typeof options.dataTreeCollapseElement === \"string\"){\r\n\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\tdummyEl.innerHTML = options.dataTreeCollapseElement;\r\n\t\t\t\t\tthis.collapseEl = dummyEl.firstChild;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.collapseEl = options.dataTreeCollapseElement;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.collapseEl = document.createElement(\"div\");\r\n\t\t\t\tthis.collapseEl.classList.add(\"tabulator-data-tree-control\");\r\n\t\t\t\tthis.collapseEl.tabIndex = 0;\r\n\t\t\t\tthis.collapseEl.innerHTML = \"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif(options.dataTreeExpandElement){\r\n\t\t\t\tif(typeof options.dataTreeExpandElement === \"string\"){\r\n\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\tdummyEl.innerHTML = options.dataTreeExpandElement;\r\n\t\t\t\t\tthis.expandEl = dummyEl.firstChild;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.expandEl = options.dataTreeExpandElement;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.expandEl = document.createElement(\"div\");\r\n\t\t\t\tthis.expandEl.classList.add(\"tabulator-data-tree-control\");\r\n\t\t\t\tthis.expandEl.tabIndex = 0;\r\n\t\t\t\tthis.expandEl.innerHTML = \"
\";\r\n\t\t\t}\r\n\r\n\r\n\t\t\tswitch(typeof options.dataTreeStartExpanded){\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\treturn options.dataTreeStartExpanded;\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tthis.startOpen = options.dataTreeStartExpanded;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\treturn options.dataTreeStartExpanded[index];\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-layout-after\", this.layoutRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowDelete.bind(this),0);\r\n\t\t\tthis.subscribe(\"row-data-changed\", this.rowDataChanged.bind(this), 10);\r\n\t\t\tthis.subscribe(\"cell-value-updated\", this.cellValueChanged.bind(this));\r\n\t\t\tthis.subscribe(\"edit-cancelled\", this.cellValueChanged.bind(this));\r\n\t\t\tthis.subscribe(\"column-moving-rows\", this.columnMoving.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.initializeElementField.bind(this));\r\n\r\n\t\t\tthis.registerDisplayHandler(this.getRows.bind(this), 30);\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeElementField(){\r\n\t\tvar firstCol = this.table.columnManager.getFirstVisibleColumn();\r\n\r\n\t\tthis.elementField = this.table.options.dataTreeElementColumn || (firstCol ? firstCol.field : false);\r\n\t}\r\n\t\r\n\tgetRowChildren(row){\r\n\t\treturn this.getTreeChildren(row, true);\r\n\t}\r\n\r\n\tcolumnMoving(){\r\n\t\tvar rows = [];\r\n\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\trows = rows.concat(this.getTreeChildren(row, false, true));\r\n\t\t});\r\n\r\n\t\treturn rows;\r\n\t}\r\n\r\n\trowDataChanged(row, visible, updatedData){\r\n\t\tif(this.redrawNeeded(updatedData)){\r\n\t\t\tthis.initializeRow(row);\r\n\r\n\t\t\tif(visible){\r\n\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tcellValueChanged(cell){\r\n\t\tvar field = cell.column.getField();\r\n\r\n\t\tif(field === this.elementField){\r\n\t\t\tthis.layoutRow(cell.row);\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar childArray = row.getData()[this.field];\r\n\t\tvar isArray = Array.isArray(childArray);\r\n\r\n\t\tvar children = isArray || (!isArray && typeof childArray === \"object\" && childArray !== null);\r\n\r\n\t\tif(!children && row.modules.dataTree && row.modules.dataTree.branchEl){\r\n\t\t\trow.modules.dataTree.branchEl.parentNode.removeChild(row.modules.dataTree.branchEl);\r\n\t\t}\r\n\r\n\t\tif(!children && row.modules.dataTree && row.modules.dataTree.controlEl){\r\n\t\t\trow.modules.dataTree.controlEl.parentNode.removeChild(row.modules.dataTree.controlEl);\r\n\t\t}\r\n\r\n\t\trow.modules.dataTree = {\r\n\t\t\tindex: row.modules.dataTree ? row.modules.dataTree.index : 0,\r\n\t\t\topen: children ? (row.modules.dataTree ? row.modules.dataTree.open : this.startOpen(row.getComponent(), 0)) : false,\r\n\t\t\tcontrolEl: row.modules.dataTree && children ? row.modules.dataTree.controlEl : false,\r\n\t\t\tbranchEl: row.modules.dataTree && children ? row.modules.dataTree.branchEl : false,\r\n\t\t\tparent: row.modules.dataTree ? row.modules.dataTree.parent : false,\r\n\t\t\tchildren:children,\r\n\t\t};\r\n\t}\r\n\r\n\treinitializeRowChildren(row){\r\n\t\tvar children = this.getTreeChildren(row, false, true);\r\n\r\n\t\tchildren.forEach(function(child){\r\n\t\t\tchild.reinitialize(true);\r\n\t\t});\r\n\t}\r\n\r\n\tlayoutRow(row){\r\n\t\tvar cell = this.elementField ? row.getCell(this.elementField) : row.getCells()[0],\r\n\t\tel = cell.getElement(),\r\n\t\tconfig = row.modules.dataTree;\r\n\r\n\t\tif(config.branchEl){\r\n\t\t\tif(config.branchEl.parentNode){\r\n\t\t\t\tconfig.branchEl.parentNode.removeChild(config.branchEl);\r\n\t\t\t}\r\n\t\t\tconfig.branchEl = false;\r\n\t\t}\r\n\r\n\t\tif(config.controlEl){\r\n\t\t\tif(config.controlEl.parentNode){\r\n\t\t\t\tconfig.controlEl.parentNode.removeChild(config.controlEl);\r\n\t\t\t}\r\n\t\t\tconfig.controlEl = false;\r\n\t\t}\r\n\r\n\t\tthis.generateControlElement(row, el);\r\n\r\n\t\trow.getElement().classList.add(\"tabulator-tree-level-\" + config.index);\r\n\r\n\t\tif(config.index){\r\n\t\t\tif(this.branchEl){\r\n\t\t\t\tconfig.branchEl = this.branchEl.cloneNode(true);\r\n\t\t\t\tel.insertBefore(config.branchEl, el.firstChild);\r\n\r\n\t\t\t\tif(this.table.rtl){\r\n\t\t\t\t\tconfig.branchEl.style.marginRight = (((config.branchEl.offsetWidth + config.branchEl.style.marginLeft) * (config.index - 1)) + (config.index * this.indent)) + \"px\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.branchEl.style.marginLeft = (((config.branchEl.offsetWidth + config.branchEl.style.marginRight) * (config.index - 1)) + (config.index * this.indent)) + \"px\";\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\r\n\t\t\t\tif(this.table.rtl){\r\n\t\t\t\t\tel.style.paddingRight = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-right')) + (config.index * this.indent) + \"px\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.style.paddingLeft = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-left')) + (config.index * this.indent) + \"px\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateControlElement(row, el){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\tel = el || row.getCells()[0].getElement(),\r\n\t\toldControl = config.controlEl;\r\n\r\n\t\tif(config.children !== false){\r\n\r\n\t\t\tif(config.open){\r\n\t\t\t\tconfig.controlEl = this.collapseEl.cloneNode(true);\r\n\t\t\t\tconfig.controlEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tthis.collapseRow(row);\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconfig.controlEl = this.expandEl.cloneNode(true);\r\n\t\t\t\tconfig.controlEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tthis.expandRow(row);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tconfig.controlEl.addEventListener(\"mousedown\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\r\n\t\t\tif(oldControl && oldControl.parentNode === el){\r\n\t\t\t\toldControl.parentNode.replaceChild(config.controlEl,oldControl);\r\n\t\t\t}else{\r\n\t\t\t\tel.insertBefore(config.controlEl, el.firstChild);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tsetDisplayIndex (index) {\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\r\n\tgetDisplayIndex () {\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\r\n\tgetRows(rows){\r\n\t\tvar output = [];\r\n\r\n\t\trows.forEach((row, i) => {\r\n\t\t\tvar config, children;\r\n\r\n\t\t\toutput.push(row);\r\n\r\n\t\t\tif(row instanceof Row){\r\n\r\n\t\t\t\trow.create();\r\n\r\n\t\t\t\tconfig = row.modules.dataTree.children;\r\n\r\n\t\t\t\tif(!config.index && config.children !== false){\r\n\t\t\t\t\tchildren = this.getChildren(row);\r\n\r\n\t\t\t\t\tchildren.forEach((child) => {\r\n\t\t\t\t\t\tchild.create();\r\n\t\t\t\t\t\toutput.push(child);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetChildren(row, allChildren){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\tchildren = [],\r\n\t\toutput = [];\r\n\r\n\t\tif(config.children !== false && (config.open || allChildren)){\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"filter\") && this.table.options.dataTreeFilter){\r\n\t\t\t\tchildren = this.table.modules.filter.filter(config.children);\r\n\t\t\t}else{\r\n\t\t\t\tchildren = config.children;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"sort\") && this.table.options.dataTreeSort){\r\n\t\t\t\tthis.table.modules.sort.sort(children);\r\n\t\t\t}\r\n\r\n\t\t\tchildren.forEach((child) => {\r\n\t\t\t\toutput.push(child);\r\n\r\n\t\t\t\tvar subChildren = this.getChildren(child);\r\n\r\n\t\t\t\tsubChildren.forEach((sub) => {\r\n\t\t\t\t\toutput.push(sub);\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgenerateChildren(row){\r\n\t\tvar children = [];\r\n\r\n\t\tvar childArray = row.getData()[this.field];\r\n\r\n\t\tif(!Array.isArray(childArray)){\r\n\t\t\tchildArray = [childArray];\r\n\t\t}\r\n\r\n\t\tchildArray.forEach((childData) => {\r\n\t\t\tvar childRow = new Row(childData || {}, this.table.rowManager);\r\n\r\n\t\t\tchildRow.create();\r\n\r\n\t\t\tchildRow.modules.dataTree.index = row.modules.dataTree.index + 1;\r\n\t\t\tchildRow.modules.dataTree.parent = row;\r\n\r\n\t\t\tif(childRow.modules.dataTree.children){\r\n\t\t\t\tchildRow.modules.dataTree.open = this.startOpen(childRow.getComponent(), childRow.modules.dataTree.index);\r\n\t\t\t}\r\n\t\t\tchildren.push(childRow);\r\n\t\t});\r\n\r\n\t\treturn children;\r\n\t}\r\n\r\n\texpandRow(row, silent){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tconfig.open = true;\r\n\r\n\t\t\trow.reinitialize();\r\n\r\n\t\t\tthis.refreshData(true);\r\n\r\n\t\t\tthis.dispatchExternal(\"dataTreeRowExpanded\", row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\t}\r\n\r\n\tcollapseRow(row){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tconfig.open = false;\r\n\r\n\t\t\trow.reinitialize();\r\n\r\n\t\t\tthis.refreshData(true);\r\n\r\n\t\t\tthis.dispatchExternal(\"dataTreeRowCollapsed\", row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\t}\r\n\r\n\ttoggleRow(row){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tif(config.open){\r\n\t\t\t\tthis.collapseRow(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.expandRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tisRowExpanded(row){\r\n\t\treturn row.modules.dataTree.open;\r\n\t}\r\n\r\n\tgetTreeParent(row){\r\n\t\treturn row.modules.dataTree.parent ? row.modules.dataTree.parent.getComponent() : false;\r\n\t}\r\n\r\n\tgetFilteredTreeChildren(row){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\toutput = [], children;\r\n\r\n\t\tif(config.children){\r\n\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"filter\") && this.table.options.dataTreeFilter){\r\n\t\t\t\tchildren = this.table.modules.filter.filter(config.children);\r\n\t\t\t}else{\r\n\t\t\t\tchildren = config.children;\r\n\t\t\t}\r\n\r\n\t\t\tchildren.forEach((childRow) => {\r\n\t\t\t\tif(childRow instanceof Row){\r\n\t\t\t\t\toutput.push(childRow);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\trowDelete(row){\r\n\t\tvar parent = row.modules.dataTree.parent,\r\n\t\tchildIndex;\r\n\r\n\t\tif(parent){\r\n\t\t\tchildIndex = this.findChildIndex(row, parent);\r\n\r\n\t\t\tif(childIndex !== false){\r\n\t\t\t\tparent.data[this.field].splice(childIndex, 1);\r\n\t\t\t}\r\n\r\n\t\t\tif(!parent.data[this.field].length){\r\n\t\t\t\tdelete parent.data[this.field];\r\n\t\t\t}\r\n\r\n\t\t\tthis.initializeRow(parent);\r\n\t\t\tthis.layoutRow(parent);\r\n\t\t}\r\n\r\n\t\tthis.refreshData(true);\r\n\t}\r\n\r\n\taddTreeChildRow(row, data, top, index){\r\n\t\tvar childIndex = false;\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(row.data[this.field])){\r\n\t\t\trow.data[this.field] = [];\r\n\r\n\t\t\trow.modules.dataTree.open = this.startOpen(row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\r\n\t\tif(typeof index !== \"undefined\"){\r\n\t\t\tchildIndex = this.findChildIndex(index, row);\r\n\r\n\t\t\tif(childIndex !== false){\r\n\t\t\t\trow.data[this.field].splice((top ? childIndex : childIndex + 1), 0, data);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(childIndex === false){\r\n\t\t\tif(top){\r\n\t\t\t\trow.data[this.field].unshift(data);\r\n\t\t\t}else{\r\n\t\t\t\trow.data[this.field].push(data);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.initializeRow(row);\r\n\t\tthis.layoutRow(row);\r\n\r\n\t\tthis.refreshData(true);\r\n\t}\r\n\r\n\tfindChildIndex(subject, parent){\r\n\t\tvar match = false;\r\n\r\n\t\tif(typeof subject == \"object\"){\r\n\r\n\t\t\tif(subject instanceof Row){\r\n\t\t\t\t//subject is row element\r\n\t\t\t\tmatch = subject.data;\r\n\t\t\t}else if(subject instanceof RowComponent){\r\n\t\t\t\t//subject is public row component\r\n\t\t\t\tmatch = subject._getSelf().data;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\tif(parent.modules.dataTree){\r\n\t\t\t\t\tmatch = parent.modules.dataTree.children.find((childRow) => {\r\n\t\t\t\t\t\treturn childRow instanceof Row ? childRow.element === subject : false;\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(match){\r\n\t\t\t\t\t\tmatch = match.data;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}else if(typeof subject == \"undefined\" || subject === null){\r\n\t\t\tmatch = false\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the index of the row\r\n\t\t\tmatch = parent.data[this.field].find((row) => {\r\n\t\t\t\treturn row.data[this.table.options.index] == subject;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(match){\r\n\r\n\t\t\tif(Array.isArray(parent.data[this.field])){\r\n\t\t\t\tmatch = parent.data[this.field].indexOf(match);\r\n\t\t\t}\r\n\r\n\t\t\tif(match == -1){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//catch all for any other type of input\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tgetTreeChildren(row, component, recurse){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\toutput = [];\r\n\r\n\t\tif(config.children){\r\n\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tconfig.children.forEach((childRow) => {\r\n\t\t\t\tif(childRow instanceof Row){\r\n\t\t\t\t\toutput.push(component ? childRow.getComponent() : childRow);\r\n\r\n\t\t\t\t\tif(recurse){\r\n\t\t\t\t\t\toutput = output.concat(this.getTreeChildren(childRow, component, recurse));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetChildField(){\r\n\t\treturn this.field;\r\n\t}\r\n\r\n\tredrawNeeded(data){\r\n\t\treturn (this.field ? typeof data[this.field] !== \"undefined\" : false) || (this.elementField ? typeof data[this.elementField] !== \"undefined\" : false);\r\n\t}\r\n}\r\n\r\nDataTree.moduleName = \"dataTree\";\r\n\r\nexport default DataTree;","import csv from './downloaders/csv.js';\r\nimport json from './downloaders/json.js';\r\nimport pdf from './downloaders/pdf.js';\r\nimport xlsx from './downloaders/xlsx.js';\r\nimport html from './downloaders/html.js';\r\nimport jsonLines from './downloaders/jsonLines.js';\r\n\r\nexport default {\r\n\tcsv:csv,\r\n\tjson:json,\r\n\tjsonLines:jsonLines,\r\n\tpdf:pdf,\r\n\txlsx:xlsx,\r\n\thtml:html,\r\n};","export default function(list, options, setFileContents){\r\n\tvar delimiter = options && options.delimiter ? options.delimiter : \",\",\r\n\tfileContents = [],\r\n\theaders = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tvar item = [];\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"group\":\r\n\t\t\tconsole.warn(\"Download Warning - CSV downloader cannot process row groups\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tconsole.warn(\"Download Warning - CSV downloader cannot process column calculations\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"header\":\r\n\t\t\trow.columns.forEach((col, i) => {\r\n\t\t\t\tif(col && col.depth === 1){\r\n\t\t\t\t\theaders[i] = typeof col.value == \"undefined\" || col.value === null ? \"\" : ('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\trow.columns.forEach((col) => {\r\n\r\n\t\t\t\tif(col){\r\n\r\n\t\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tcol.value = JSON.stringify(col.value);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\t\tcol.value = \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\titem.push('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tfileContents.push(item.join(delimiter));\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(headers.length){\r\n\t\tfileContents.unshift(headers.join(delimiter));\r\n\t}\r\n\r\n\tfileContents = fileContents.join(\"\\n\");\r\n\r\n\tif(options.bom){\r\n\t\tfileContents = \"\\ufeff\" + fileContents;\r\n\t}\r\n\r\n\tsetFileContents(fileContents, \"text/csv\");\r\n};","export default function(list, options, setFileContents){\r\n\tvar fileContents = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tvar item = {};\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"header\":\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process row groups\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process column calculations\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\tif(col){\r\n\t\t\t\t\titem[col.component.getTitleDownload() || col.component.getField()] = col.value;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tfileContents.push(item);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tfileContents = JSON.stringify(fileContents, null, '\\t');\r\n\r\n\tsetFileContents(fileContents, \"application/json\");\r\n};","export default function (list, options, setFileContents) {\r\n\tconst fileContents = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tconst item = {};\r\n\r\n\t\tswitch (row.type) {\r\n\t\t\tcase \"header\":\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process row groups\");\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process column calculations\");\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\t\tif (col) {\r\n\t\t\t\t\t\titem[col.component.getTitleDownload() || col.component.getField()] = col.value;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tfileContents.push(JSON.stringify(item));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tsetFileContents(fileContents.join(\"\\n\"), \"application/x-ndjson\");\r\n};","export default function(list, options, setFileContents){\r\n\tvar header = [],\r\n\tbody = [],\r\n\tautoTableParams = {},\r\n\trowGroupStyles = options.rowGroupStyles || {\r\n\t\tfontStyle: \"bold\",\r\n\t\tfontSize: 12,\r\n\t\tcellPadding: 6,\r\n\t\tfillColor: 220,\r\n\t},\r\n\trowCalcStyles = options.rowCalcStyles || {\r\n\t\tfontStyle: \"bold\",\r\n\t\tfontSize: 10,\r\n\t\tcellPadding: 4,\r\n\t\tfillColor: 232,\r\n\t},\r\n\tjsPDFParams = options.jsPDF || {},\r\n\ttitle = options && options.title ? options.title : \"\";\r\n\r\n\tif(!jsPDFParams.orientation){\r\n\t\tjsPDFParams.orientation = options.orientation || \"landscape\";\r\n\t}\r\n\r\n\tif(!jsPDFParams.unit){\r\n\t\tjsPDFParams.unit = \"pt\";\r\n\t}\r\n\r\n\t//parse row list\r\n\tlist.forEach((row) => {\r\n\t\tvar item = {};\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"header\":\r\n\t\t\theader.push(parseRow(row));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tbody.push(parseRow(row, rowGroupStyles));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tbody.push(parseRow(row, rowCalcStyles));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\tbody.push(parseRow(row));\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tfunction parseRow(row, styles){\r\n\t\tvar rowData = [];\r\n\r\n\t\trow.columns.forEach((col) =>{\r\n\t\t\tvar cell;\r\n\r\n\t\t\tif(col){\r\n\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tcol.value = JSON.stringify(col.value);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\tcol.value = \"\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcell = {\r\n\t\t\t\t\tcontent:col.value,\r\n\t\t\t\t\tcolSpan:col.width,\r\n\t\t\t\t\trowSpan:col.height,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tif(styles){\r\n\t\t\t\t\tcell.styles = styles;\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowData.push(cell);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowData;\r\n\t}\r\n\r\n\r\n\t//configure PDF\r\n\tvar doc = new jspdf.jsPDF(jsPDFParams); //set document to landscape, better for most tables\r\n\r\n\tif(options && options.autoTable){\r\n\t\tif(typeof options.autoTable === \"function\"){\r\n\t\t\tautoTableParams = options.autoTable(doc) || {};\r\n\t\t}else{\r\n\t\t\tautoTableParams = options.autoTable;\r\n\t\t}\r\n\t}\r\n\r\n\tif(title){\r\n\t\tautoTableParams.didDrawPage = function(data) {\r\n\t\t\tdoc.text(title, 40, 30);\r\n\t\t};\r\n\t}\r\n\r\n\tautoTableParams.head = header;\r\n\tautoTableParams.body = body;\r\n\r\n\tdoc.autoTable(autoTableParams);\r\n\r\n\tif(options && options.documentProcessing){\r\n\t\toptions.documentProcessing(doc);\r\n\t}\r\n\r\n\tsetFileContents(doc.output(\"arraybuffer\"), \"application/pdf\");\r\n};","import CoreFeature from '../../../../core/CoreFeature.js';\r\n\r\nexport default function(list, options, setFileContents){\r\n\tvar self = this,\r\n\tsheetName = options.sheetName || \"Sheet1\",\r\n\tworkbook = XLSX.utils.book_new(),\r\n\ttableFeatures = new CoreFeature(this),\r\n\toutput;\r\n\r\n\tworkbook.SheetNames = [];\r\n\tworkbook.Sheets = {};\r\n\r\n\tfunction generateSheet(){\r\n\t\tvar rows = [],\r\n\t\tmerges = [],\r\n\t\tworksheet = {},\r\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 }};\r\n\r\n\t\t//parse row list\r\n\t\tlist.forEach((row, i) => {\r\n\t\t\tvar rowData = [];\r\n\r\n\t\t\trow.columns.forEach(function(col, j){\r\n\r\n\t\t\t\tif(col){\r\n\t\t\t\t\trowData.push(!(col.value instanceof Date) && typeof col.value === \"object\" ? JSON.stringify(col.value) : col.value);\r\n\r\n\t\t\t\t\tif(col.width > 1 || col.height > -1){\r\n\t\t\t\t\t\tif(col.height > 1 || col.width > 1){\r\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}});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\trowData.push(\"\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\trows.push(rowData);\r\n\t\t});\r\n\r\n\t\t//convert rows to worksheet\r\n\t\tXLSX.utils.sheet_add_aoa(worksheet, rows);\r\n\r\n\t\tworksheet['!ref'] = XLSX.utils.encode_range(range);\r\n\r\n\t\tif(merges.length){\r\n\t\t\tworksheet[\"!merges\"] = merges;\r\n\t\t}\r\n\r\n\t\treturn worksheet;\r\n\t}\r\n\r\n\tif(options.sheetOnly){\r\n\t\tsetFileContents(generateSheet());\r\n\t\treturn;\r\n\t}\r\n\r\n\tif(options.sheets){\r\n\t\tfor(var sheet in options.sheets){\r\n\r\n\t\t\tif(options.sheets[sheet] === true){\r\n\t\t\t\tworkbook.SheetNames.push(sheet);\r\n\t\t\t\tworkbook.Sheets[sheet] = generateSheet();\r\n\t\t\t}else{\r\n\r\n\t\t\t\tworkbook.SheetNames.push(sheet);\r\n\r\n\t\t\t\ttableFeatures.commsSend(options.sheets[sheet], \"download\", \"intercept\",{\r\n\t\t\t\t\ttype:\"xlsx\",\r\n\t\t\t\t\toptions:{sheetOnly:true},\r\n\t\t\t\t\tactive:self.active,\r\n\t\t\t\t\tintercept:function(data){\r\n\t\t\t\t\t\tworkbook.Sheets[sheet] = data;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tworkbook.SheetNames.push(sheetName);\r\n\t\tworkbook.Sheets[sheetName] = generateSheet();\r\n\t}\r\n\r\n\tif(options.documentProcessing){\r\n\t\tworkbook = options.documentProcessing(workbook);\r\n\t}\r\n\r\n\t//convert workbook to binary array\r\n\tfunction s2ab(s) {\r\n\t\tvar buf = new ArrayBuffer(s.length);\r\n\t\tvar view = new Uint8Array(buf);\r\n\t\tfor (var i=0; i!=s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;\r\n\t\t\treturn buf;\r\n\t}\r\n\r\n\toutput = XLSX.write(workbook, {bookType:'xlsx', bookSST:true, type: 'binary'});\r\n\r\n\tsetFileContents(s2ab(output), \"application/octet-stream\");\r\n};","export default function(list, options, setFileContents){\r\n\tif(this.modExists(\"export\", true)){\r\n\t\tsetFileContents(this.modules.export.genereateHTMLTable(list), \"text/html\");\r\n\t}\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultDownloaders from './defaults/downloaders.js';\r\n\r\nclass Download extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.registerTableOption(\"downloadReady\", function(data, blob){return blob;}); //function to manipulate download data\r\n\t\tthis.registerTableOption(\"downloadConfig\", {}); //download config\r\n\t\tthis.registerTableOption(\"downloadRowRange\", \"active\"); //restrict download to active rows only\r\n\r\n\t\tthis.registerColumnOption(\"download\");\r\n\t\tthis.registerColumnOption(\"titleDownload\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"download\", this.download.bind(this));\r\n\t\tthis.registerTableFunction(\"downloadToTab\", this.downloadToTab.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tdownloadToTab(type, filename, options, active){\r\n\t\tthis.download(type, filename, options, active, true);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\t//trigger file download\r\n\tdownload(type, filename, options, range, interceptCallback){\r\n\t\tvar downloadFunc = false;\r\n\r\n\t\tfunction buildLink(data, mime){\r\n\t\t\tif(interceptCallback){\r\n\t\t\t\tif(interceptCallback === true){\r\n\t\t\t\t\tthis.triggerDownload(data, mime, type, filename, true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tinterceptCallback(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tthis.triggerDownload(data, mime, type, filename);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(typeof type == \"function\"){\r\n\t\t\tdownloadFunc = type;\r\n\t\t}else{\r\n\t\t\tif(Download.downloaders[type]){\r\n\t\t\t\tdownloadFunc = Download.downloaders[type];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Download Error - No such download type found: \", type);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(downloadFunc){\r\n\t\t\tvar list = this.generateExportList(range);\r\n\r\n\t\t\tdownloadFunc.call(this.table, list , options || {}, buildLink.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateExportList(range){\r\n\t\tvar list = this.table.modules.export.generateExportList(this.table.options.downloadConfig, false, range || this.table.options.downloadRowRange, \"download\");\r\n\r\n\t\t//assign group header formatter\r\n\t\tvar groupHeader = this.table.options.groupHeaderDownload;\r\n\r\n\t\tif(groupHeader && !Array.isArray(groupHeader)){\r\n\t\t\tgroupHeader = [groupHeader];\r\n\t\t}\r\n\r\n\t\tlist.forEach((row) => {\r\n\t\t\tvar group;\r\n\r\n\t\t\tif(row.type === \"group\"){\r\n\t\t\t\tgroup = row.columns[0];\r\n\r\n\t\t\t\tif(groupHeader && groupHeader[row.indent]){\r\n\t\t\t\t\tgroup.value = groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn list;\r\n\t}\r\n\r\n\ttriggerDownload(data, mime, type, filename, newTab){\r\n\t\tvar element = document.createElement('a'),\r\n\t\tblob = new Blob([data],{type:mime}),\r\n\t\tfilename = filename || \"Tabulator.\" + (typeof type === \"function\" ? \"txt\" : type);\r\n\r\n\t\tblob = this.table.options.downloadReady(data, blob);\r\n\r\n\t\tif(blob){\r\n\r\n\t\t\tif(newTab){\r\n\t\t\t\twindow.open(window.URL.createObjectURL(blob));\r\n\t\t\t}else{\r\n\t\t\t\tif(navigator.msSaveOrOpenBlob){\r\n\t\t\t\t\tnavigator.msSaveOrOpenBlob(blob, filename);\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.setAttribute('href', window.URL.createObjectURL(blob));\r\n\r\n\t\t\t\t\t//set file title\r\n\t\t\t\t\telement.setAttribute('download', filename);\r\n\r\n\t\t\t\t\t//trigger download\r\n\t\t\t\t\telement.style.display = 'none';\r\n\t\t\t\t\tdocument.body.appendChild(element);\r\n\t\t\t\t\telement.click();\r\n\r\n\t\t\t\t\t//remove temporary link element\r\n\t\t\t\t\tdocument.body.removeChild(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"downloadComplete\");\r\n\t\t}\r\n\t}\r\n\r\n\tcommsReceived(table, action, data){\r\n\t\tswitch(action){\r\n\t\t\tcase \"intercept\":\r\n\t\t\tthis.download(data.type, \"\", data.options, data.active, data.intercept);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nDownload.moduleName = \"download\";\r\n\r\n//load defaults\r\nDownload.downloaders = defaultDownloaders;\r\n\r\nexport default Download;","export default function maskInput(el, options){\r\n\tvar mask = options.mask,\r\n\tmaskLetter = typeof options.maskLetterChar !== \"undefined\" ? options.maskLetterChar : \"A\",\r\n\tmaskNumber = typeof options.maskNumberChar !== \"undefined\" ? options.maskNumberChar : \"9\",\r\n\tmaskWildcard = typeof options.maskWildcardChar !== \"undefined\" ? options.maskWildcardChar : \"*\",\r\n\tsuccess = false;\r\n\r\n\tfunction fillSymbols(index){\r\n\t\tvar symbol = mask[index];\r\n\t\tif(typeof symbol !== \"undefined\" && symbol !== maskWildcard && symbol !== maskLetter && symbol !== maskNumber){\r\n\t\t\tel.value = el.value + \"\" + symbol;\r\n\t\t\tfillSymbols(index+1);\r\n\t\t}\r\n\t}\r\n\r\n\tel.addEventListener(\"keydown\", (e) => {\r\n\t\tvar index = el.value.length,\r\n\t\tchar = e.key;\r\n\r\n\t\tif(e.keyCode > 46){\r\n\t\t\tif(index >= mask.length){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tsuccess = false;\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\tswitch(mask[index]){\r\n\t\t\t\t\tcase maskLetter:\r\n\t\t\t\t\tif(char.toUpperCase() == char.toLowerCase()){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase maskNumber:\r\n\t\t\t\t\tif(isNaN(char)){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase maskWildcard:\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(char !== mask[index]){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\r\n\t\treturn;\r\n\t});\r\n\r\n\tel.addEventListener(\"keyup\", (e) => {\r\n\t\tif(e.keyCode > 46){\r\n\t\t\tif(options.maskAutoFill){\r\n\t\t\t\tfillSymbols(el.value.length);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\r\n\tif(!el.placeholder){\r\n\t\tel.placeholder = mask;\r\n\t}\r\n\r\n\tif(options.maskAutoFill){\r\n\t\tfillSymbols(el.value.length);\r\n\t}\r\n}","import input from './editors/input.js';\r\nimport textarea from './editors/textarea.js';\r\nimport number from './editors/number.js';\r\nimport range from './editors/range.js';\r\nimport select from './editors/select.js';\r\nimport autocomplete from './editors/autocomplete.js';\r\nimport star from './editors/star.js';\r\nimport progress from './editors/progress.js';\r\nimport tickCross from './editors/tickCross.js';\r\n\r\nexport default {\r\n\tinput:input,\r\n\ttextarea:textarea,\r\n number:number,\r\n range:range,\r\n\tselect:select,\r\n\tautocomplete:autocomplete,\r\n\tstar:star,\r\n\tprogress:progress,\r\n\ttickCross:tickCross,\r\n};","import maskInput from '../../inputMask.js';\r\n\r\n//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", editorParams.search ? \"search\" : \"text\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t});\r\n\r\n\tfunction onChange(e){\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\r\n\t\t\tif(success(input.value)){\r\n\t\t\t\tcellValue = input.value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\t// case 9:\r\n\t\t\tcase 13:\r\n\t\t\tonChange(e);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\te.stopPropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\treturn input;\r\n};","import maskInput from '../../inputMask.js';\r\n\r\n//resizable text area element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n var self = this,\r\n cellValue = cell.getValue(),\r\n vertNav = editorParams.verticalNavigation || \"hybrid\",\r\n value = String(cellValue !== null && typeof cellValue !== \"undefined\" ? cellValue : \"\"),\r\n count = (value.match(/(?:\\r\\n|\\r|\\n)/g) || []).length + 1,\r\n input = document.createElement(\"textarea\"),\r\n scrollHeight = 0;\r\n\r\n //create and style input\r\n input.style.display = \"block\";\r\n input.style.padding = \"2px\";\r\n input.style.height = \"100%\";\r\n input.style.width = \"100%\";\r\n input.style.boxSizing = \"border-box\";\r\n input.style.whiteSpace = \"pre-wrap\";\r\n input.style.resize = \"none\";\r\n\r\n if(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n for (let key in editorParams.elementAttributes){\r\n if(key.charAt(0) == \"+\"){\r\n key = key.slice(1);\r\n input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n }else{\r\n input.setAttribute(key, editorParams.elementAttributes[key]);\r\n }\r\n }\r\n }\r\n\r\n input.value = value;\r\n\r\n onRendered(function(){\r\n input.focus({preventScroll: true});\r\n input.style.height = \"100%\";\r\n\r\n input.scrollHeight;\r\n input.style.height = input.scrollHeight + \"px\";\r\n cell.getRow().normalizeHeight();\r\n });\r\n\r\n function onChange(e){\r\n\r\n if(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\r\n\r\n if(success(input.value)){\r\n cellValue = input.value; //persist value if successfully validated incase editor is used as header filter\r\n }\r\n\r\n setTimeout(function(){\r\n cell.getRow().normalizeHeight();\r\n },300)\r\n }else{\r\n cancel();\r\n }\r\n }\r\n\r\n //submit new value on blur or change\r\n input.addEventListener(\"change\", onChange);\r\n input.addEventListener(\"blur\", onChange);\r\n\r\n input.addEventListener(\"keyup\", function(){\r\n\r\n input.style.height = \"\";\r\n\r\n var heightNow = input.scrollHeight;\r\n\r\n input.style.height = heightNow + \"px\";\r\n\r\n if(heightNow != scrollHeight){\r\n scrollHeight = heightNow;\r\n cell.getRow().normalizeHeight();\r\n }\r\n });\r\n\r\n input.addEventListener(\"keydown\", function(e){\r\n\r\n switch(e.keyCode){\r\n case 27:\r\n cancel();\r\n break;\r\n\r\n case 38: //up arrow\r\n if(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart)){\r\n e.stopImmediatePropagation();\r\n e.stopPropagation();\r\n }\r\n\r\n break;\r\n\r\n case 40: //down arrow\r\n if(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart !== input.value.length)){\r\n e.stopImmediatePropagation();\r\n e.stopPropagation();\r\n }\r\n break;\r\n\r\n case 35:\r\n case 36:\r\n e.stopPropagation();\r\n break;\r\n }\r\n });\r\n\r\n if(editorParams.mask){\r\n maskInput(input, editorParams);\r\n }\r\n\r\n return input;\r\n};","import maskInput from '../../inputMask.js';\r\n\r\n//input element with type of number\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar cellValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", \"number\");\r\n\r\n\tif(typeof editorParams.max != \"undefined\"){\r\n\t\tinput.setAttribute(\"max\", editorParams.max);\r\n\t}\r\n\r\n\tif(typeof editorParams.min != \"undefined\"){\r\n\t\tinput.setAttribute(\"min\", editorParams.min);\r\n\t}\r\n\r\n\tif(typeof editorParams.step != \"undefined\"){\r\n\t\tinput.setAttribute(\"step\", editorParams.step);\r\n\t}\r\n\r\n\t//create and style input\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\r\n\tvar blurFunc = function(e){\r\n\t\tonChange();\r\n\t};\r\n\r\n\tonRendered(function () {\r\n\t\t//submit new value on blur\r\n\t\tinput.removeEventListener(\"blur\", blurFunc);\r\n\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\r\n\t\t//submit new value on blur\r\n\t\tinput.addEventListener(\"blur\", blurFunc);\r\n\t});\r\n\r\n\tfunction onChange(){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(!isNaN(value) && value !==\"\"){\r\n\t\t\tvalue = Number(value);\r\n\t\t}\r\n\r\n\t\tif(value !== cellValue){\r\n\t\t\tif(success(value)){\r\n\t\t\t\tcellValue = value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 13:\r\n\t\t\t// case 9:\r\n\t\t\tonChange();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tcase 40: //down arrow\r\n\t\t\tif(vertNav == \"editor\"){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\te.stopPropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\treturn input;\r\n};","//input element with type of number\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", \"range\");\r\n\r\n\tif (typeof editorParams.max != \"undefined\") {\r\n\t\tinput.setAttribute(\"max\", editorParams.max);\r\n\t}\r\n\r\n\tif (typeof editorParams.min != \"undefined\") {\r\n\t\tinput.setAttribute(\"min\", editorParams.min);\r\n\t}\r\n\r\n\tif (typeof editorParams.step != \"undefined\") {\r\n\t\tinput.setAttribute(\"step\", editorParams.step);\r\n\t}\r\n\r\n\t//create and style input\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\r\n\tonRendered(function () {\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t});\r\n\r\n\tfunction onChange(){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(!isNaN(value) && value !==\"\"){\r\n\t\t\tvalue = Number(value);\r\n\t\t}\r\n\r\n\t\tif(value != cellValue){\r\n\t\t\tif(success(value)){\r\n\t\t\t\tcellValue = value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tonChange();\r\n\t});\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 13:\r\n\t\t\t// case 9:\r\n\t\t\tonChange();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\treturn input;\r\n};","import Helpers from '../../../../core/tools/Helpers.js';\r\n\r\n//dropdown select editor\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\tcellEl = cell.getElement(),\r\n\tinitialValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinitialDisplayValue = typeof initialValue !== \"undefined\" || initialValue === null ? (Array.isArray(initialValue) ? initialValue : [initialValue]) : (typeof editorParams.defaultValue !== \"undefined\" ? editorParams.defaultValue : []),\r\n\tinput = document.createElement(\"input\"),\r\n\tlistEl = document.createElement(\"div\"),\r\n\tmultiselect = editorParams.multiselect,\r\n\tdataItems = [],\r\n\tcurrentItem = {},\r\n\tdisplayItems = [],\r\n\tcurrentItems = [],\r\n\tblurable = true,\r\n\tblockListShow = false,\r\n\tsearchWord = \"\",\r\n\tsearchWordTimeout = null;\r\n\r\n\tif(Array.isArray(editorParams) || (!Array.isArray(editorParams) && typeof editorParams === \"object\" && !editorParams.values)){\r\n\t\tconsole.warn(\"DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object\");\r\n\t\teditorParams = {values:editorParams};\r\n\t}\r\n\r\n\tfunction getUniqueColumnValues(field){\r\n\t\tvar output = {},\r\n\t\tdata = self.table.getData(),\r\n\t\tcolumn;\r\n\r\n\t\tif(field){\r\n\t\t\tcolumn = self.table.columnManager.getColumnByField(field);\r\n\t\t}else{\r\n\t\t\tcolumn = cell.getColumn()._getSelf();\r\n\t\t}\r\n\r\n\t\tif(column){\r\n\t\t\tdata.forEach(function(row){\r\n\t\t\t\tvar val = column.getFieldValue(row);\r\n\r\n\t\t\t\tif(val !== null && typeof val !== \"undefined\" && val !== \"\"){\r\n\t\t\t\t\toutput[val] = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"unable to find matching column to create select lookup list:\", field);\r\n\t\t}\r\n\r\n\t\treturn Object.keys(output);\r\n\t}\r\n\r\n\tfunction parseItems(inputValues, curentValues){\r\n\t\tvar dataList = [];\r\n\t\tvar displayList = [];\r\n\r\n\t\tfunction processComplexListItem(item){\r\n\t\t\tvar item = {\r\n\t\t\t\tlabel:item.label,\r\n\t\t\t\tvalue:item.value,\r\n\t\t\t\titemParams:item.itemParams,\r\n\t\t\t\telementAttributes: item.elementAttributes,\r\n\t\t\t\telement:false,\r\n\t\t\t};\r\n\r\n\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t// }\r\n\r\n\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\tsetItem(item);\r\n\t\t\t}\r\n\r\n\t\t\tdataList.push(item);\r\n\t\t\tdisplayList.push(item);\r\n\r\n\t\t\treturn item;\r\n\t\t}\r\n\r\n\t\tif(typeof inputValues == \"function\"){\r\n\t\t\tinputValues = inputValues(cell);\r\n\t\t}\r\n\r\n\t\tif(Array.isArray(inputValues)){\r\n\t\t\tinputValues.forEach(function(value){\r\n\t\t\t\tvar item;\r\n\r\n\t\t\t\tif(typeof value === \"object\"){\r\n\r\n\t\t\t\t\tif(value.options){\r\n\t\t\t\t\t\titem = {\r\n\t\t\t\t\t\t\tlabel:value.label,\r\n\t\t\t\t\t\t\tgroup:true,\r\n\t\t\t\t\t\t\titemParams:value.itemParams,\r\n\t\t\t\t\t\t\telementAttributes:value.elementAttributes,\r\n\t\t\t\t\t\t\telement:false,\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\tdisplayList.push(item);\r\n\r\n\t\t\t\t\t\tvalue.options.forEach(function(item){\r\n\t\t\t\t\t\t\tprocessComplexListItem(item);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tprocessComplexListItem(value);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\titem = {\r\n\t\t\t\t\t\tlabel:value,\r\n\t\t\t\t\t\tvalue:value,\r\n\t\t\t\t\t\telement:false,\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t\t\t// }\r\n\r\n\t\t\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\t\t\tsetItem(item);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdataList.push(item);\r\n\t\t\t\t\tdisplayList.push(item);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tfor(var key in inputValues){\r\n\t\t\t\tvar item = {\r\n\t\t\t\t\tlabel:inputValues[key],\r\n\t\t\t\t\tvalue:key,\r\n\t\t\t\t\telement:false,\r\n\t\t\t\t};\r\n\r\n\t\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t\t// }\r\n\r\n\t\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\t\tsetItem(item);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdataList.push(item);\r\n\t\t\t\tdisplayList.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(editorParams.sortValuesList){\r\n\t\t\tdataList.sort((a, b) => {\r\n\t\t\t\treturn a.label < b.label ? -1 : (a.label > b.label ? 1 : 0);\r\n\t\t\t});\r\n\r\n\t\t\tdisplayList.sort((a, b) => {\r\n\t\t\t\treturn a.label < b.label ? -1 : (a.label > b.label ? 1 : 0);\r\n\t\t\t});\r\n\r\n\t\t\tif(editorParams.sortValuesList !== \"asc\"){\r\n\t\t\t\tdataList.reverse();\r\n\t\t\t\tdisplayList.reverse();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataItems = dataList;\r\n\t\tdisplayItems = displayList;\r\n\r\n\t\tfillList();\r\n\t}\r\n\r\n\tfunction fillList(){\r\n\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\r\n\t\tdisplayItems.forEach(function(item){\r\n\r\n\t\t\tvar el = item.element;\r\n\r\n\t\t\tif(!el){\r\n\t\t\t\tel = document.createElement(\"div\");\r\n\t\t\t\titem.label = editorParams.listItemFormatter ? editorParams.listItemFormatter(item.value, item.label, cell, el, item.itemParams) : item.label;\r\n\t\t\t\tif(item.group){\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-select-list-group\");\r\n\t\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\t\tel.innerHTML = item.label === \"\" ? \" \" : item.label;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-select-list-item\");\r\n\t\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\t\tel.innerHTML = item.label === \"\" ? \" \" : item.label;\r\n\r\n\t\t\t\t\tel.addEventListener(\"click\", function(){\r\n\t\t\t\t\t\tblockListShow = true;\r\n\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tblockListShow = false;\r\n\t\t\t\t\t\t}, 10);\r\n\r\n\t\t\t\t\t\t// setCurrentItem(item);\r\n\t\t\t\t\t\t// chooseItem();\r\n\t\t\t\t\t\tif(multiselect){\r\n\t\t\t\t\t\t\ttoggleItem(item);\r\n\t\t\t\t\t\t\tinput.focus();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tchooseItem(item);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t// if(item === currentItem){\r\n\t\t\t\t\t// \tel.classList.add(\"active\");\r\n\t\t\t\t\t// }\r\n\r\n\t\t\t\t\tif(currentItems.indexOf(item) > -1){\r\n\t\t\t\t\t\tel.classList.add(\"active\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(item.elementAttributes && typeof item.elementAttributes == \"object\"){\r\n\t\t\t\t\tfor (let key in item.elementAttributes){\r\n\t\t\t\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\t\t\t\tkey = key.slice(1);\r\n\t\t\t\t\t\t\tel.setAttribute(key, input.getAttribute(key) + item.elementAttributes[\"+\" + key]);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tel.setAttribute(key, item.elementAttributes[key]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tel.addEventListener(\"mousedown\", function(){\r\n\t\t\t\t\tblurable = false;\r\n\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tblurable = true;\r\n\t\t\t\t\t}, 10);\r\n\t\t\t\t});\r\n\r\n\t\t\t\titem.element = el;\r\n\r\n\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(el);\r\n\t\t});\r\n\t}\r\n\r\n\r\n\tfunction setCurrentItem(item, active){\r\n\r\n\t\tif(!multiselect && currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"active\");\r\n\t\t}\r\n\r\n\t\tif(currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"focused\");\r\n\t\t}\r\n\r\n\t\tcurrentItem = item;\r\n\r\n\t\tif(item.element){\r\n\t\t\titem.element.classList.add(\"focused\");\r\n\t\t\tif(active){\r\n\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(item && item.element && item.element.scrollIntoView){\r\n\t\t\titem.element.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'start'});\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t// function chooseItem(){\r\n\t// \thideList();\r\n\r\n\t// \tif(initialValue !== currentItem.value){\r\n\t// \t\tinitialValue = currentItem.value;\r\n\t// \t\tsuccess(currentItem.value);\r\n\t// \t}else{\r\n\t// \t\tcancel();\r\n\t// \t}\r\n\t// }\r\n\r\n\tfunction setItem(item) {\r\n\t\tvar index = currentItems.indexOf(item);\r\n\r\n\t\tif(index == -1){\r\n\t\t\tcurrentItems.push(item);\r\n\t\t\tsetCurrentItem(item, true);\r\n\t\t}\r\n\r\n\t\tfillInput();\r\n\t}\r\n\r\n\tfunction unsetItem(index) {\r\n\t\tvar item = currentItems[index];\r\n\r\n\t\tif(index > -1){\r\n\t\t\tcurrentItems.splice(index, 1);\r\n\t\t\tif(item.element){\r\n\t\t\t\titem.element.classList.remove(\"active\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction toggleItem(item) {\r\n\t\tif(!item){\r\n\t\t\titem = currentItem;\r\n\t\t}\r\n\r\n\t\tvar index = currentItems.indexOf(item);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tunsetItem(index);\r\n\t\t}else{\r\n\t\t\tif(multiselect !== true && currentItems.length >= multiselect){\r\n\t\t\t\tunsetItem(0);\r\n\t\t\t}\r\n\r\n\t\t\tsetItem(item);\r\n\t\t}\r\n\r\n\t\tfillInput();\r\n\r\n\t}\r\n\r\n\tfunction chooseItem(item){\r\n\t\thideList();\r\n\r\n\t\tif(!item){\r\n\t\t\titem = currentItem;\r\n\t\t}\r\n\r\n\t\tif(item){\r\n\t\t\tinput.value = item.label;\r\n\t\t\tsuccess(item.value);\r\n\t\t}\r\n\r\n\t\tinitialDisplayValue = [item.value];\r\n\t}\r\n\r\n\r\n\tfunction chooseItems(silent){\r\n\t\tif(!silent){\r\n\t\t\thideList();\r\n\t\t}\r\n\r\n\t\tvar output = [];\r\n\r\n\t\tcurrentItems.forEach((item) => {\r\n\t\t\toutput.push(item.value);\r\n\t\t});\r\n\r\n\t\tinitialDisplayValue = output;\r\n\r\n\t\tsuccess(output);\r\n\t}\r\n\r\n\tfunction fillInput(){\r\n\t\tvar output = [];\r\n\r\n\t\tcurrentItems.forEach((item) => {\r\n\t\t\toutput.push(item.label);\r\n\t\t});\r\n\r\n\t\tinput.value = output.join(\", \");\r\n\r\n\t\tif(self.currentCell === false){\r\n\t\t\tchooseItems(true);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tfunction unsetItems() {\r\n\r\n\t\tvar len = currentItems.length;\r\n\r\n\t\tfor(let i = 0; i < len; i++){\r\n\t\t\tunsetItem(0);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction cancelItem(){\r\n\t\thideList();\r\n\t\tcancel();\r\n\t}\r\n\r\n\tfunction showList(){\r\n\t\tcurrentItems = [];\r\n\r\n\t\tif(!listEl.parentNode){\r\n\t\t\tif(editorParams.values === true){\r\n\t\t\t\tparseItems(getUniqueColumnValues(), initialDisplayValue);\r\n\t\t\t}else if(typeof editorParams.values === \"string\"){\r\n\t\t\t\tparseItems(getUniqueColumnValues(editorParams.values), initialDisplayValue);\r\n\t\t\t}else{\r\n\t\t\t\tparseItems(editorParams.values || [], initialDisplayValue);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tvar offset = Helpers.elOffset(cellEl);\r\n\r\n\t\t\tlistEl.style.minWidth = cellEl.offsetWidth + \"px\";\r\n\r\n\t\t\tlistEl.style.top = (offset.top + cellEl.offsetHeight) + \"px\";\r\n\t\t\tlistEl.style.left = offset.left + \"px\";\r\n\r\n\r\n\t\t\tlistEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tblurable = false;\r\n\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tblurable = true;\r\n\t\t\t\t}, 10);\r\n\t\t\t});\r\n\r\n\t\t\tdocument.body.appendChild(listEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction hideList(){\r\n\t\tif(listEl.parentNode){\r\n\t\t\tlistEl.parentNode.removeChild(listEl);\r\n\t\t}\r\n\r\n\t\tremoveScrollListener();\r\n\t}\r\n\r\n\tfunction removeScrollListener() {\r\n\t\tself.table.rowManager.element.removeEventListener(\"scroll\", cancelItem);\r\n\t}\r\n\r\n\tfunction scrollTovalue(char){\r\n\r\n\t\tclearTimeout(searchWordTimeout);\r\n\r\n\t\tvar character = String.fromCharCode(event.keyCode).toLowerCase();\r\n\t\tsearchWord += character.toLowerCase();\r\n\r\n\t\tvar match = dataItems.find((item) => {\r\n\t\t\treturn typeof item.label !== \"undefined\" && item.label.toLowerCase().startsWith(searchWord);\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tsetCurrentItem(match, !multiselect);\r\n\t\t}\r\n\r\n\t\tsearchWordTimeout = setTimeout(() => {\r\n\t\t\tsearchWord = \"\";\r\n\t\t}, 800)\r\n\t}\r\n\r\n\t//style input\r\n\tinput.setAttribute(\"type\", \"text\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\tinput.style.cursor = \"default\";\r\n\tinput.readOnly = (this.currentCell != false);\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = typeof initialValue !== \"undefined\" || initialValue === null ? initialValue : \"\";\r\n\r\n\t// if(editorParams.values === true){\r\n\t// \tparseItems(getUniqueColumnValues(), initialValue);\r\n\t// }else if(typeof editorParams.values === \"string\"){\r\n\t// \tparseItems(getUniqueColumnValues(editorParams.values), initialValue);\r\n\t// }else{\r\n\t// \tparseItems(editorParams.values || [], initialValue);\r\n\t// }\r\n\r\n\tinput.addEventListener(\"search\", function(e){\r\n\t\tif(!input.value){\r\n\t\t\tunsetItems();\r\n\t\t\tchooseItems();\r\n\t\t}\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tvar index;\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tindex = dataItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index > 0){\r\n\t\t\t\t\tsetCurrentItem(dataItems[index - 1], !multiselect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 40: //down arrow\r\n\t\t\tindex = dataItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index < dataItems.length - 1)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index < dataItems.length - 1){\r\n\t\t\t\t\tif(index == -1){\r\n\t\t\t\t\t\tsetCurrentItem(dataItems[0], !multiselect);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsetCurrentItem(dataItems[index + 1], !multiselect);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\t// chooseItem();\r\n\r\n\t\t\tif(multiselect){\r\n\t\t\t\ttoggleItem();\r\n\t\t\t}else{\r\n\t\t\t\tchooseItem();\r\n\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancelItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 9: //tab\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tif(self.currentCell === false){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tif(e.keyCode >= 38 && e.keyCode <= 90){\r\n\t\t\t\tscrollTovalue(e.keyCode);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tif(blurable){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tchooseItems();\r\n\t\t\t}else{\r\n\t\t\t\tcancelItem();\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"focus\", function(e){\r\n\t\tif(!blockListShow){\r\n\t\t\tshowList();\r\n\t\t}\r\n\t});\r\n\r\n\t//style list element\r\n\tlistEl = document.createElement(\"div\");\r\n\tlistEl.classList.add(\"tabulator-edit-select-list\");\r\n\r\n\tonRendered(function(){\r\n\t\tinput.style.height = \"100%\";\r\n\t\tinput.focus({preventScroll: true});\r\n\t});\r\n\r\n\tsetTimeout(() => {\r\n\t\tthis.table.rowManager.element.addEventListener(\"scroll\", cancelItem);\r\n\t}, 10);\r\n\r\n\treturn input;\r\n};","import Helpers from '../../../../core/tools/Helpers.js';\r\nimport maskInput from '../../inputMask.js';\r\n\r\n//autocomplete\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\tcellEl = cell.getElement(),\r\n\tinitialValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinitialDisplayValue = typeof initialValue !== \"undefined\" || initialValue === null ? initialValue : (typeof editorParams.defaultValue !== \"undefined\" ? editorParams.defaultValue : \"\"),\r\n\tinput = document.createElement(\"input\"),\r\n\tlistEl = document.createElement(\"div\"),\r\n\tallItems = [],\r\n\tdisplayItems = [],\r\n\tvalues = [],\r\n\tcurrentItem = false,\r\n\tblurable = true,\r\n\tuniqueColumnValues = false;\r\n\r\n\t//style input\r\n\tinput.setAttribute(\"type\", \"search\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//style list element\r\n\tlistEl.classList.add(\"tabulator-edit-select-list\");\r\n\r\n\tlistEl.addEventListener(\"mousedown\", function(e){\r\n\t\tblurable = false;\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tblurable = true;\r\n\t\t}, 10);\r\n\t});\r\n\r\n\r\n\tfunction genUniqueColumnValues(){\r\n\t\tif(editorParams.values === true){\r\n\t\t\tuniqueColumnValues = getUniqueColumnValues();\r\n\t\t}else if(typeof editorParams.values === \"string\"){\r\n\t\t\tuniqueColumnValues = getUniqueColumnValues(editorParams.values);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getUniqueColumnValues(field){\r\n\t\tvar output = {},\r\n\t\tdata = self.table.getData(),\r\n\t\tcolumn;\r\n\r\n\t\tif(field){\r\n\t\t\tcolumn = self.table.columnManager.getColumnByField(field);\r\n\t\t}else{\r\n\t\t\tcolumn = cell.getColumn()._getSelf();\r\n\t\t}\r\n\r\n\t\tif(column){\r\n\t\t\tdata.forEach(function(row){\r\n\t\t\t\tvar val = column.getFieldValue(row);\r\n\r\n\t\t\t\tif(val !== null && typeof val !== \"undefined\" && val !== \"\"){\r\n\t\t\t\t\toutput[val] = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(editorParams.sortValuesList){\r\n\t\t\t\tif(editorParams.sortValuesList == \"asc\"){\r\n\t\t\t\t\toutput = Object.keys(output).sort();\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput = Object.keys(output).sort().reverse();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\toutput = Object.keys(output);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"unable to find matching column to create autocomplete lookup list:\", field);\r\n\t\t}\r\n\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tfunction filterList(term, intialLoad){\r\n\t\tvar matches = [],\r\n\t\tvalues, items, searchEl;\r\n\r\n\t\t//lookup base values list\r\n\t\tif(uniqueColumnValues){\r\n\t\t\tvalues = uniqueColumnValues;\r\n\t\t}else{\r\n\t\t\tvalues = editorParams.values || [];\r\n\t\t}\r\n\r\n\t\tif(editorParams.searchFunc){\r\n\t\t\tmatches = editorParams.searchFunc(term, values);\r\n\r\n\t\t\tif(matches instanceof Promise){\r\n\r\n\t\t\t\taddNotice(typeof editorParams.searchingPlaceholder !== \"undefined\" ? editorParams.searchingPlaceholder : \"Searching...\");\r\n\r\n\t\t\t\tmatches.then((result) => {\r\n\t\t\t\t\tfillListIfNotEmpty(parseItems(result), intialLoad);\r\n\t\t\t\t}).catch((err) => {\r\n\t\t\t\t\tconsole.err(\"error in autocomplete search promise:\", err);\r\n\t\t\t\t});\r\n\r\n\t\t\t}else{\r\n\t\t\t\tfillListIfNotEmpty(parseItems(matches), intialLoad);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\titems = parseItems(values);\r\n\r\n\t\t\tif(term === \"\"){\r\n\t\t\t\tif(editorParams.showListOnEmpty){\r\n\t\t\t\t\tmatches = items;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\titems.forEach(function(item){\r\n\t\t\t\t\tif(item.value !== null || typeof item.value !== \"undefined\"){\r\n\t\t\t\t\t\tif(String(item.value).toLowerCase().indexOf(String(term).toLowerCase()) > -1 || String(item.title).toLowerCase().indexOf(String(term).toLowerCase()) > -1){\r\n\t\t\t\t\t\t\tmatches.push(item);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tfillListIfNotEmpty(matches, intialLoad);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction addNotice(notice){\r\n\t\tvar searchEl = document.createElement(\"div\");\r\n\r\n\t\tclearList();\r\n\r\n\t\tif(notice !== false){\r\n\t\t\tsearchEl.classList.add(\"tabulator-edit-select-list-notice\");\r\n\t\t\tsearchEl.tabIndex = 0;\r\n\r\n\t\t\tif(notice instanceof Node){\r\n\t\t\t\tsearchEl.appendChild(notice);\r\n\t\t\t}else{\r\n\t\t\t\tsearchEl.innerHTML = notice;\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(searchEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction parseItems(inputValues){\r\n\t\tvar itemList = [];\r\n\r\n\t\tif(Array.isArray(inputValues)){\r\n\t\t\tinputValues.forEach(function(value){\r\n\r\n\t\t\t\tvar item = {};\r\n\r\n\t\t\t\tif(typeof value === \"object\"){\r\n\t\t\t\t\titem.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value.value, value.label) : value.label;\r\n\t\t\t\t\titem.value = value.value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\titem.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value;\r\n\t\t\t\t\titem.value = value;\r\n\t\t\t\t}\r\n\r\n\t\t\t\titemList.push(item);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tfor(var key in inputValues){\r\n\t\t\t\tvar item = {\r\n\t\t\t\t\ttitle:editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : inputValues[key],\r\n\t\t\t\t\tvalue:key,\r\n\t\t\t\t};\r\n\r\n\t\t\t\titemList.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn itemList;\r\n\t}\r\n\r\n\tfunction clearList(){\r\n\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\t}\r\n\r\n\tfunction fillListIfNotEmpty(items, intialLoad){\r\n\t\tif(items.length){\r\n\t\t\tfillList(items, intialLoad);\r\n\t\t}else{\r\n\t\t\tif(editorParams.emptyPlaceholder){\r\n\t\t\t\taddNotice(editorParams.emptyPlaceholder);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fillList(items, intialLoad){\r\n\t\tvar current = false;\r\n\r\n\t\tclearList();\r\n\r\n\t\tdisplayItems = items;\r\n\r\n\t\tdisplayItems.forEach(function(item){\r\n\t\t\tvar el = item.element;\r\n\r\n\t\t\tif(!el){\r\n\t\t\t\tel = document.createElement(\"div\");\r\n\t\t\t\tel.classList.add(\"tabulator-edit-select-list-item\");\r\n\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\tel.innerHTML = item.title;\r\n\r\n\t\t\t\tel.addEventListener(\"click\", function(e){\r\n\t\t\t\t\tsetCurrentItem(item);\r\n\t\t\t\t\tchooseItem();\r\n\t\t\t\t});\r\n\r\n\t\t\t\tel.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\t\tblurable = false;\r\n\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tblurable = true;\r\n\t\t\t\t\t}, 10);\r\n\t\t\t\t});\r\n\r\n\t\t\t\titem.element = el;\r\n\r\n\t\t\t\tif(intialLoad && item.value == initialValue){\r\n\t\t\t\t\tinput.value = item.title;\r\n\t\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t\t\tcurrent = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(item === currentItem){\r\n\t\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t\t\tcurrent = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(el);\r\n\t\t});\r\n\r\n\t\tif(!current){\r\n\t\t\tsetCurrentItem(false);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction chooseItem(){\r\n\t\thideList();\r\n\r\n\t\tif(currentItem){\r\n\t\t\tif(initialValue !== currentItem.value){\r\n\t\t\t\tinitialValue = currentItem.value;\r\n\t\t\t\tinput.value = currentItem.title;\r\n\t\t\t\tsuccess(currentItem.value);\r\n\t\t\t}else{\r\n\t\t\t\tcancel();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(editorParams.freetext){\r\n\t\t\t\tinitialValue = input.value;\r\n\t\t\t\tsuccess(input.value);\r\n\t\t\t}else{\r\n\t\t\t\tif(editorParams.allowEmpty && input.value === \"\"){\r\n\t\t\t\t\tinitialValue = input.value;\r\n\t\t\t\t\tsuccess(input.value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcancel();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction showList(){\r\n\t\tif(!listEl.parentNode){\r\n\t\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\r\n\t\t\tvar offset = Helpers.elOffset(cellEl);\r\n\r\n\t\t\tlistEl.style.minWidth = cellEl.offsetWidth + \"px\";\r\n\r\n\t\t\tlistEl.style.top = (offset.top + cellEl.offsetHeight) + \"px\";\r\n\t\t\tlistEl.style.left = offset.left + \"px\";\r\n\t\t\tdocument.body.appendChild(listEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setCurrentItem(item, showInputValue){\r\n\t\tif(currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"active\");\r\n\t\t}\r\n\r\n\t\tcurrentItem = item;\r\n\r\n\t\tif(item && item.element){\r\n\t\t\titem.element.classList.add(\"active\");\r\n\t\t}\r\n\r\n\t\tif(item && item.element && item.element.scrollIntoView){\r\n\t\t\titem.element.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'start'});\r\n\t\t}\r\n\t}\r\n\r\n\tfunction hideList(){\r\n\t\tif(listEl.parentNode){\r\n\t\t\tlistEl.parentNode.removeChild(listEl);\r\n\t\t}\r\n\r\n\t\tremoveScrollListener();\r\n\t}\r\n\r\n\r\n\tfunction cancelItem(){\r\n\t\thideList();\r\n\t\tcancel();\r\n\t}\r\n\r\n\tfunction removeScrollListener() {\r\n\t\tself.table.rowManager.element.removeEventListener(\"scroll\", cancelItem);\r\n\t}\r\n\r\n\t//allow key based navigation\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tvar index;\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tindex = displayItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index > 0){\r\n\t\t\t\t\tsetCurrentItem(displayItems[index - 1]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tsetCurrentItem(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 40: //down arrow\r\n\r\n\t\t\tindex = displayItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index < displayItems.length - 1)){\r\n\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index < displayItems.length - 1){\r\n\t\t\t\t\tif(index == -1){\r\n\t\t\t\t\t\tsetCurrentItem(displayItems[0]);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsetCurrentItem(displayItems[index + 1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\t// e.preventDefault();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\tchooseItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancelItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 36: //home\r\n\t\t\tcase 35: //end\r\n\t\t\t//prevent table navigation while using input element\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"keyup\", function(e){\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //up arrow\r\n\t\t\tcase 40: //right arrow\r\n\t\t\tcase 13: //enter\r\n\t\t\tcase 27: //escape\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tfilterList(input.value);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\tinput.addEventListener(\"search\", function(e){\r\n\t\tfilterList(input.value);\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tif(blurable){\r\n\t\t\tchooseItem();\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"focus\", function(e){\r\n\t\tvar value = initialDisplayValue;\r\n\t\tgenUniqueColumnValues();\r\n\t\tshowList();\r\n\t\tinput.value = value;\r\n\t\tfilterList(value, true);\r\n\t});\r\n\r\n\r\n\tonRendered(function(){\r\n\t\tinput.style.height = \"100%\";\r\n\t\tinput.focus({preventScroll: true});\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\tsetTimeout(() => {\r\n\t\tthis.table.rowManager.element.addEventListener(\"scroll\", cancelItem);\r\n\t}, 10);\r\n\r\n\tgenUniqueColumnValues();\r\n\tinput.value = initialDisplayValue;\r\n\tfilterList(initialDisplayValue, true);\r\n\r\n\treturn input;\r\n};","//star rating\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\telement = cell.getElement(),\r\n\tvalue = cell.getValue(),\r\n\tmaxStars = element.getElementsByTagName(\"svg\").length || 5,\r\n\tsize = element.getElementsByTagName(\"svg\")[0] ? element.getElementsByTagName(\"svg\")[0].getAttribute(\"width\") : 14,\r\n\tstars = [],\r\n\tstarsHolder = document.createElement(\"div\"),\r\n\tstar = document.createElementNS('http://www.w3.org/2000/svg', \"svg\");\r\n\r\n\r\n\t//change star type\r\n\tfunction starChange(val){\r\n\t\tstars.forEach(function(star, i){\r\n\t\t\tif(i < val){\r\n\t\t\t\tif(self.table.browser == \"ie\"){\r\n\t\t\t\t\tstar.setAttribute(\"class\", \"tabulator-star-active\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tstar.classList.replace(\"tabulator-star-inactive\", \"tabulator-star-active\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstar.innerHTML = '';\r\n\t\t\t}else{\r\n\t\t\t\tif(self.table.browser == \"ie\"){\r\n\t\t\t\t\tstar.setAttribute(\"class\", \"tabulator-star-inactive\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tstar.classList.replace(\"tabulator-star-active\", \"tabulator-star-inactive\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstar.innerHTML = '';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//build stars\r\n\tfunction buildStar(i){\r\n\r\n\t\tvar starHolder = document.createElement(\"span\");\r\n\t\tvar nextStar = star.cloneNode(true);\r\n\r\n\t\tstars.push(nextStar);\r\n\r\n\t\tstarHolder.addEventListener(\"mouseenter\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tstarChange(i);\r\n\t\t});\r\n\r\n\t\tstarHolder.addEventListener(\"mousemove\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t});\r\n\r\n\t\tstarHolder.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tsuccess(i);\r\n\t\t\telement.blur();\r\n\t\t});\r\n\r\n\t\tstarHolder.appendChild(nextStar);\r\n\t\tstarsHolder.appendChild(starHolder);\r\n\r\n\t}\r\n\r\n\t//handle keyboard navigation value change\r\n\tfunction changeValue(val){\r\n\t\tvalue = val;\r\n\t\tstarChange(val);\r\n\t}\r\n\r\n\t//style cell\r\n\telement.style.whiteSpace = \"nowrap\";\r\n\telement.style.overflow = \"hidden\";\r\n\telement.style.textOverflow = \"ellipsis\";\r\n\r\n\t//style holding element\r\n\tstarsHolder.style.verticalAlign = \"middle\";\r\n\tstarsHolder.style.display = \"inline-block\";\r\n\tstarsHolder.style.padding = \"4px\";\r\n\r\n\t//style star\r\n\tstar.setAttribute(\"width\", size);\r\n\tstar.setAttribute(\"height\", size);\r\n\tstar.setAttribute(\"viewBox\", \"0 0 512 512\");\r\n\tstar.setAttribute(\"xml:space\", \"preserve\");\r\n\tstar.style.padding = \"0 1px\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tstarsHolder.setAttribute(key, starsHolder.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tstarsHolder.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//create correct number of stars\r\n\tfor(var i=1;i<= maxStars;i++){\r\n\t\tbuildStar(i);\r\n\t}\r\n\r\n\t//ensure value does not exceed number of stars\r\n\tvalue = Math.min(parseInt(value), maxStars);\r\n\r\n\t// set initial styling of stars\r\n\tstarChange(value);\r\n\r\n\tstarsHolder.addEventListener(\"mousemove\", function(e){\r\n\t\tstarChange(0);\r\n\t});\r\n\r\n\tstarsHolder.addEventListener(\"click\", function(e){\r\n\t\tsuccess(0);\r\n\t});\r\n\r\n\telement.addEventListener(\"blur\", function(e){\r\n\t\tcancel();\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\telement.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 39: //right arrow\r\n\t\t\tchangeValue(value + 1);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tchangeValue(value - 1);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\tsuccess(value);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\treturn starsHolder;\r\n};","//draggable progress bar\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar element = cell.getElement(),\r\n\tmax = typeof editorParams.max === \"undefined\" ? ((element.getElementsByTagName(\"div\")[0] && element.getElementsByTagName(\"div\")[0].getAttribute(\"max\")) || 100) : editorParams.max,\r\n\tmin = typeof editorParams.min === \"undefined\" ? ((element.getElementsByTagName(\"div\")[0] && element.getElementsByTagName(\"div\")[0].getAttribute(\"min\")) || 0) : editorParams.min,\r\n\tpercent = (max - min) / 100,\r\n\tvalue = cell.getValue() || 0,\r\n\thandle = document.createElement(\"div\"),\r\n\tbar = document.createElement(\"div\"),\r\n\tmouseDrag, mouseDragWidth;\r\n\r\n\t//set new value\r\n\tfunction updateValue(){\r\n\t\tvar style = window.getComputedStyle(element, null);\r\n\r\n\t\tvar calcVal = (percent * Math.round(bar.offsetWidth / ((element.clientWidth - parseInt(style.getPropertyValue(\"padding-left\")) - parseInt(style.getPropertyValue(\"padding-right\")))/100))) + min;\r\n\t\tsuccess(calcVal);\r\n\t\telement.setAttribute(\"aria-valuenow\", calcVal);\r\n\t\telement.setAttribute(\"aria-label\", value);\r\n\t}\r\n\r\n\t//style handle\r\n\thandle.style.position = \"absolute\";\r\n\thandle.style.right = \"0\";\r\n\thandle.style.top = \"0\";\r\n\thandle.style.bottom = \"0\";\r\n\thandle.style.width = \"5px\";\r\n\thandle.classList.add(\"tabulator-progress-handle\");\r\n\r\n\t//style bar\r\n\tbar.style.display = \"inline-block\";\r\n\tbar.style.position = \"relative\";\r\n\t// bar.style.top = \"8px\";\r\n\t// bar.style.bottom = \"8px\";\r\n\t// bar.style.left = \"4px\";\r\n\t// bar.style.marginRight = \"4px\";\r\n\tbar.style.height = \"100%\";\r\n\tbar.style.backgroundColor = \"#488CE9\";\r\n\tbar.style.maxWidth = \"100%\";\r\n\tbar.style.minWidth = \"0%\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tbar.setAttribute(key, bar.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tbar.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//style cell\r\n\telement.style.padding = \"4px 4px\";\r\n\r\n\t//make sure value is in range\r\n\tvalue = Math.min(parseFloat(value), max);\r\n\tvalue = Math.max(parseFloat(value), min);\r\n\r\n\t//workout percentage\r\n\tvalue = Math.round((value - min) / percent);\r\n\t// bar.style.right = value + \"%\";\r\n\tbar.style.width = value + \"%\";\r\n\r\n\telement.setAttribute(\"aria-valuemin\", min);\r\n\telement.setAttribute(\"aria-valuemax\", max);\r\n\r\n\tbar.appendChild(handle);\r\n\r\n\thandle.addEventListener(\"mousedown\", function(e){\r\n\t\tmouseDrag = e.screenX;\r\n\t\tmouseDragWidth = bar.offsetWidth;\r\n\t});\r\n\r\n\thandle.addEventListener(\"mouseover\", function(){\r\n\t\thandle.style.cursor = \"ew-resize\";\r\n\t});\r\n\r\n\telement.addEventListener(\"mousemove\", function(e){\r\n\t\tif(mouseDrag){\r\n\t\t\tbar.style.width = (mouseDragWidth + e.screenX - mouseDrag) + \"px\";\r\n\t\t}\r\n\t});\r\n\r\n\telement.addEventListener(\"mouseup\", function(e){\r\n\t\tif(mouseDrag){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\r\n\t\t\tmouseDrag = false;\r\n\t\t\tmouseDragWidth = false;\r\n\r\n\t\t\tupdateValue();\r\n\t\t}\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\telement.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.preventDefault();\r\n\t\t\tbar.style.width = (bar.clientWidth + element.clientWidth/100) + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\te.preventDefault();\r\n\t\t\tbar.style.width = (bar.clientWidth - element.clientWidth/100) + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 9: //tab\r\n\t\t\tcase 13: //enter\r\n\t\t\tupdateValue();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t}\r\n\t});\r\n\r\n\telement.addEventListener(\"blur\", function(){\r\n\t\tcancel();\r\n\t});\r\n\r\n\treturn bar;\r\n};","//checkbox\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar value = cell.getValue(),\r\n\tinput = document.createElement(\"input\"),\r\n\ttristate = editorParams.tristate,\r\n\tindetermValue = typeof editorParams.indeterminateValue === \"undefined\" ? null : editorParams.indeterminateValue,\r\n\tindetermState = false;\r\n\r\n\tinput.setAttribute(\"type\", \"checkbox\");\r\n\tinput.style.marginTop = \"5px\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = value;\r\n\r\n\tif(tristate && (typeof value === \"undefined\" || value === indetermValue || value === \"\")){\r\n\t\tindetermState = true;\r\n\t\tinput.indeterminate = true;\r\n\t}\r\n\r\n\tif(this.table.browser != \"firefox\"){ //prevent blur issue on mac firefox\r\n\t\tonRendered(function(){\r\n\t\t\tinput.focus({preventScroll: true});\r\n\t\t});\r\n\t}\r\n\r\n\tinput.checked = value === true || value === \"true\" || value === \"True\" || value === 1;\r\n\r\n\tonRendered(function(){\r\n\t\tinput.focus();\r\n\t});\r\n\r\n\tfunction setValue(blur){\r\n\t\tif(tristate){\r\n\t\t\tif(!blur){\r\n\t\t\t\tif(input.checked && !indetermState){\r\n\t\t\t\t\tinput.checked = false;\r\n\t\t\t\t\tinput.indeterminate = true;\r\n\t\t\t\t\tindetermState = true;\r\n\t\t\t\t\treturn indetermValue;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tindetermState = false;\r\n\t\t\t\t\treturn input.checked;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(indetermState){\r\n\t\t\t\t\treturn indetermValue;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn input.checked;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn input.checked;\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur\r\n\tinput.addEventListener(\"change\", function(e){\r\n\t\tsuccess(setValue());\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tsuccess(setValue(true));\r\n\t});\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tif(e.keyCode == 13){\r\n\t\t\tsuccess(setValue());\r\n\t\t}\r\n\t\tif(e.keyCode == 27){\r\n\t\t\tcancel();\r\n\t\t}\r\n\t});\r\n\r\n\treturn input;\r\n};","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defaultEditors from './defaults/editors.js';\r\n\r\nclass Edit extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.currentCell = false; //hold currently editing cell\r\n\t\tthis.mouseClick = false; //hold mousedown state to prevent click binding being overriden by editor opening\r\n\t\tthis.recursionBlock = false; //prevent focus recursion\r\n\t\tthis.invalidEdit = false;\r\n\t\tthis.editedCells = [];\r\n\r\n\t\tthis.editors = Edit.editors;\r\n\r\n\t\tthis.registerColumnOption(\"editable\");\r\n\t\tthis.registerColumnOption(\"editor\");\r\n\t\tthis.registerColumnOption(\"editorParams\");\r\n\r\n\t\tthis.registerColumnOption(\"cellEditing\");\r\n\t\tthis.registerColumnOption(\"cellEdited\");\r\n\t\tthis.registerColumnOption(\"cellEditCancelled\");\r\n\r\n\t\tthis.registerTableFunction(\"getEditedCells\", this.getEditedCells.bind(this));\r\n\t\tthis.registerTableFunction(\"clearCellEdited\", this.clearCellEdited.bind(this));\r\n\t\tthis.registerTableFunction(\"navigatePrev\", this.navigatePrev.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateNext\", this.navigateNext.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateLeft\", this.navigateLeft.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateRight\", this.navigateRight.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateUp\", this.navigateUp.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateDown\", this.navigateDown.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"isEdited\", this.cellisEdited.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"clearEdited\", this.clearEdited.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"edit\", this.editCell.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"cancelEdit\", this.cellCancelEdit.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigatePrev\", this.navigatePrev.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateNext\", this.navigateNext.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateLeft\", this.navigateLeft.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateRight\", this.navigateRight.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateUp\", this.navigateUp.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateDown\", this.navigateDown.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-init\", this.bindEditor.bind(this));\r\n\t\tthis.subscribe(\"cell-delete\", this.clearEdited.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumnCheck.bind(this));\r\n\t\tthis.subscribe(\"column-delete\", this.columnDeleteCheck.bind(this));\r\n\t\tthis.subscribe(\"row-deleting\", this.rowDeleteCheck.bind(this));\r\n\t\tthis.subscribe(\"data-refreshing\", this.cancelEdit.bind(this));\r\n\r\n\t\tthis.subscribe(\"keybinding-nav-prev\", this.navigatePrev.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-next\", this.keybindingNavigateNext.bind(this));\r\n\t\tthis.subscribe(\"keybinding-nav-left\", this.navigateLeft.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-right\", this.navigateRight.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-up\", this.navigateUp.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-down\", this.navigateDown.bind(this, undefined));\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t////// Keybinding Functions ///////\r\n\t///////////////////////////////////\r\n\r\n\tkeybindingNavigateNext(e){\r\n\t\tvar cell = this.currentCell,\r\n\t\tnewRow = this.options(\"tabEndNewRow\");\r\n\r\n\t\tif(cell){\r\n\t\t\tif(!this.navigateNext(cell, e)){\r\n\t\t\t\tif(newRow){\r\n\t\t\t\t\tcell.getElement().firstChild.blur();\r\n\r\n\t\t\t\t\tif(newRow === true){\r\n\t\t\t\t\t\tnewRow = this.table.addRow({})\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(typeof newRow == \"function\"){\r\n\t\t\t\t\t\t\tnewRow = this.table.addRow(newRow(cell.row.getComponent()))\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnewRow = this.table.addRow(Object.assign({}, newRow));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tnewRow.then(() => {\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tcell.getComponent().navigateNext();\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Cell Functions //////////\r\n\t///////////////////////////////////\r\n\r\n\tcellisEdited(cell){\r\n\t\treturn !! cell.modules.edit && cell.modules.edit.edited;\r\n\t}\r\n\r\n\tcellCancelEdit(cell){\r\n\t\tif(cell === this.currentCell){\r\n\t\t\tthis.table.modules.edit.cancelEdit();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cancel Editor Error - This cell is not currently being edited \");\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\tclearCellEdited(cells){\r\n\t\tif(!cells){\r\n\t\t\tcells = this.table.modules.edit.getEditedCells();\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\r\n\t\tcells.forEach((cell) => {\r\n\t\t\tthis.table.modules.edit.clearEdited(cell._getSelf());\r\n\t\t});\r\n\t}\r\n\r\n\tnavigatePrev(cell = this.currentCell, e){\r\n\t\tvar nextCell, prevRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tnextCell = this.navigateLeft();\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tprevRow = this.table.rowManager.prevDisplayRow(cell.row, true);\r\n\r\n\t\t\t\tif(prevRow){\r\n\t\t\t\t\tnextCell = this.findNextEditableCell(prevRow, prevRow.cells.length);\r\n\r\n\t\t\t\t\tif(nextCell){\r\n\t\t\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateNext(cell = this.currentCell, e){\r\n\t\tvar nextCell, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tnextCell = this.navigateRight();\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\r\n\r\n\t\t\t\tif(nextRow){\r\n\t\t\t\t\tnextCell = this.findNextEditableCell(nextRow, -1);\r\n\r\n\t\t\t\t\tif(nextCell){\r\n\t\t\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateLeft(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findPrevEditableCell(cell.row, index);\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateRight(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findNextEditableCell(cell.row, index);\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateUp(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.prevDisplayRow(cell.row, true);\r\n\r\n\t\t\tif(nextRow){\r\n\t\t\t\tnextRow.cells[index].getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateDown(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\r\n\r\n\t\t\tif(nextRow){\r\n\t\t\t\tnextRow.cells[index].getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfindNextEditableCell(row, index){\r\n\t\tvar nextCell = false;\r\n\r\n\t\tif(index < row.cells.length-1){\r\n\t\t\tfor(var i = index+1; i < row.cells.length; i++){\r\n\t\t\t\tlet cell = row.cells[i];\r\n\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tlet allowEdit = true;\r\n\r\n\t\t\t\t\tif(typeof cell.column.modules.edit.check == \"function\"){\r\n\t\t\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(allowEdit){\r\n\t\t\t\t\t\tnextCell = cell;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn nextCell;\r\n\t}\r\n\r\n\tfindPrevEditableCell(row, index){\r\n\t\tvar prevCell = false;\r\n\r\n\t\tif(index > 0){\r\n\t\t\tfor(var i = index-1; i >= 0; i--){\r\n\t\t\t\tlet cell = row.cells[i],\r\n\t\t\t\tallowEdit = true;\r\n\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tif(typeof cell.column.modules.edit.check == \"function\"){\r\n\t\t\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(allowEdit){\r\n\t\t\t\t\t\tprevCell = cell;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn prevCell;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(typeof column.definition.editor !== \"undefined\"){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\tcolumnDeleteCheck(column){\r\n\t\tif(this.currentCell && this.currentCell.column === column){\r\n\t\t\tthis.cancelEdit();\r\n\t\t}\r\n\t}\r\n\r\n\trowDeleteCheck(row){\r\n\t\tif(this.currentCell && this.currentCell.row === row){\r\n\t\t\tthis.cancelEdit();\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column editor\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = {\r\n\t\t\teditor:false,\r\n\t\t\tblocked:false,\r\n\t\t\tcheck:column.definition.editable,\r\n\t\t\tparams:column.definition.editorParams || {}\r\n\t\t};\r\n\r\n\t\t//set column editor\r\n\t\tswitch(typeof column.definition.editor){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(this.editors[column.definition.editor]){\r\n\t\t\t\tconfig.editor = this.editors[column.definition.editor];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Editor Error - No such editor found: \", column.definition.editor);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tconfig.editor = column.definition.editor;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"boolean\":\r\n\t\t\tif(column.definition.editor === true){\r\n\t\t\t\tif(typeof column.definition.formatter !== \"function\"){\r\n\t\t\t\t\tif(this.editors[column.definition.formatter]){\r\n\t\t\t\t\t\tconfig.editor = this.editors[column.definition.formatter];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconfig.editor = this.editors[\"input\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Editor Error - Cannot auto lookup editor for a custom formatter: \", column.definition.formatter);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(config.editor){\r\n\t\t\tcolumn.modules.edit = config;\r\n\t\t}\r\n\t}\r\n\r\n\tgetCurrentCell(){\r\n\t\treturn this.currentCell ? this.currentCell.getComponent() : false;\r\n\t}\r\n\r\n\tclearEditor(cancel){\r\n\t\tvar cell = this.currentCell,\r\n\t\tcellEl;\r\n\r\n\t\tthis.invalidEdit = false;\r\n\r\n\t\tif(cell){\r\n\t\t\tthis.currentCell = false;\r\n\r\n\t\t\tcellEl = cell.getElement();\r\n\r\n\t\t\tif(cancel){\r\n\t\t\t\tif(cell.column.modules.validate && this.table.modExists(\"validate\")){\r\n\t\t\t\t\tthis.table.modules.validate.cellValidate(cell);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcellEl.classList.remove(\"tabulator-validation-fail\");\r\n\t\t\t}\r\n\r\n\t\t\tcellEl.classList.remove(\"tabulator-editing\");\r\n\r\n\t\t\twhile(cellEl.firstChild) cellEl.removeChild(cellEl.firstChild);\r\n\r\n\t\t\tcell.row.getElement().classList.remove(\"tabulator-row-editing\");\r\n\t\t}\r\n\t}\r\n\r\n\tcancelEdit(){\r\n\t\tif(this.currentCell){\r\n\t\t\tvar cell = this.currentCell;\r\n\t\t\tvar component = this.currentCell.getComponent();\r\n\r\n\t\t\tthis.clearEditor(true);\r\n\t\t\tcell.setValueActual(cell.getValue());\r\n\t\t\tcell.cellRendered();\r\n\r\n\t\t\tif(cell.column.definition.editor == \"textarea\" || cell.column.definition.variableHeight){\r\n\t\t\t\tcell.row.normalizeHeight(true);\r\n\t\t\t}\r\n\r\n\t\t\tif(cell.column.definition.cellEditCancelled){\r\n\t\t\t\tcell.column.definition.cellEditCancelled.call(this.table, component);\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"edit-cancelled\", cell);\r\n\t\t\tthis.dispatchExternal(\"cellEditCancelled\", component);\r\n\t\t}\r\n\t}\r\n\r\n\t//return a formatted value for a cell\r\n\tbindEditor(cell){\r\n\t\tif(cell.column.modules.edit){\r\n\t\t\tvar self = this,\r\n\t\t\telement = cell.getElement(true);\r\n\r\n\t\t\telement.setAttribute(\"tabindex\", 0);\r\n\r\n\t\t\telement.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(!element.classList.contains(\"tabulator-editing\")){\r\n\t\t\t\t\telement.focus({preventScroll: true});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\telement.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif (e.button === 2) {\r\n\t\t\t\t\te.preventDefault();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.mouseClick = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\telement.addEventListener(\"focus\", function(e){\r\n\t\t\t\tif(!self.recursionBlock){\r\n\t\t\t\t\tself.edit(cell, e, false);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tfocusCellNoEvent(cell, block){\r\n\t\tthis.recursionBlock = true;\r\n\r\n\t\tif(!(block && this.table.browser === \"ie\")){\r\n\t\t\tcell.getElement().focus({preventScroll: true});\r\n\t\t}\r\n\r\n\t\tthis.recursionBlock = false;\r\n\t}\r\n\r\n\teditCell(cell, forceEdit){\r\n\t\tthis.focusCellNoEvent(cell);\r\n\t\tthis.edit(cell, false, forceEdit);\r\n\t}\r\n\r\n\tfocusScrollAdjust(cell){\r\n\t\tif(this.table.rowManager.getRenderMode() == \"virtual\"){\r\n\t\t\tvar topEdge = this.table.rowManager.element.scrollTop,\r\n\t\t\tbottomEdge = this.table.rowManager.element.clientHeight + this.table.rowManager.element.scrollTop,\r\n\t\t\trowEl = cell.row.getElement(),\r\n\t\t\toffset = rowEl.offsetTop;\r\n\r\n\t\t\tif(rowEl.offsetTop < topEdge){\r\n\t\t\t\tthis.table.rowManager.element.scrollTop -= (topEdge - rowEl.offsetTop);\r\n\t\t\t}else{\r\n\t\t\t\tif(rowEl.offsetTop + rowEl.offsetHeight > bottomEdge){\r\n\t\t\t\t\tthis.table.rowManager.element.scrollTop += (rowEl.offsetTop + rowEl.offsetHeight - bottomEdge);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar leftEdge = this.table.rowManager.element.scrollLeft,\r\n\t\t\trightEdge = this.table.rowManager.element.clientWidth + this.table.rowManager.element.scrollLeft,\r\n\t\t\tcellEl = cell.getElement(),\r\n\t\t\toffset = cellEl.offsetLeft;\r\n\r\n\t\t\tif(this.table.modExists(\"frozenColumns\")){\r\n\t\t\t\tleftEdge += parseInt(this.table.modules.frozenColumns.leftMargin);\r\n\t\t\t\trightEdge -= parseInt(this.table.modules.frozenColumns.rightMargin);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.renderHorizontal === \"virtual\"){\r\n\t\t\t\tleftEdge -= parseInt(this.table.columnManager.renderer.vDomPadLeft);\r\n\t\t\t\trightEdge -= parseInt(this.table.columnManager.renderer.vDomPadLeft);\r\n\t\t\t}\r\n\r\n\t\t\tif(cellEl.offsetLeft < leftEdge){\r\n\r\n\t\t\t\tthis.table.rowManager.element.scrollLeft -= (leftEdge - cellEl.offsetLeft);\r\n\t\t\t}else{\r\n\t\t\t\tif(cellEl.offsetLeft + cellEl.offsetWidth > rightEdge){\r\n\t\t\t\t\tthis.table.rowManager.element.scrollLeft += (cellEl.offsetLeft + cellEl.offsetWidth - rightEdge);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tedit(cell, e, forceEdit){\r\n\t\tvar self = this,\r\n\t\tallowEdit = true,\r\n\t\trendered = function(){},\r\n\t\telement = cell.getElement(),\r\n\t\tcellEditor, component, params;\r\n\r\n\t\t//prevent editing if another cell is refusing to leave focus (eg. validation fail)\r\n\t\tif(this.currentCell){\r\n\t\t\tif(!this.invalidEdit){\r\n\t\t\t\tthis.cancelEdit();\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//handle successfull value change\r\n\t\tfunction success(value){\r\n\t\t\tif(self.currentCell === cell){\r\n\t\t\t\tvar valid = true;\r\n\r\n\t\t\t\tif(cell.column.modules.validate && self.table.modExists(\"validate\") && self.table.options.validationMode != \"manual\"){\r\n\t\t\t\t\tvalid = self.table.modules.validate.validate(cell.column.modules.validate, cell, value);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(valid === true || self.table.options.validationMode === \"highlight\"){\r\n\t\t\t\t\tself.clearEditor();\r\n\r\n\r\n\t\t\t\t\tif(!cell.modules.edit){\r\n\t\t\t\t\t\tcell.modules.edit = {};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcell.modules.edit.edited = true;\r\n\r\n\t\t\t\t\tif(self.editedCells.indexOf(cell) == -1){\r\n\t\t\t\t\t\tself.editedCells.push(cell);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcell.setValue(value, true);\r\n\r\n\t\t\t\t\tif(valid !== true){\r\n\t\t\t\t\t\telement.classList.add(\"tabulator-validation-fail\");\r\n\t\t\t\t\t\tself.table.externalEvents.dispatch(\"validationFailed\", cell.getComponent(), value, valid);\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.invalidEdit = true;\r\n\t\t\t\t\telement.classList.add(\"tabulator-validation-fail\");\r\n\t\t\t\t\tself.focusCellNoEvent(cell, true);\r\n\t\t\t\t\trendered();\r\n\t\t\t\t\tself.table.externalEvents.dispatch(\"validationFailed\", cell.getComponent(), value, valid);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t// console.warn(\"Edit Success Error - cannot call success on a cell that is no longer being edited\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//handle aborted edit\r\n\t\tfunction cancel(){\r\n\t\t\tif(self.currentCell === cell){\r\n\t\t\t\tself.cancelEdit();\r\n\t\t\t}else{\r\n\t\t\t\t// console.warn(\"Edit Success Error - cannot call cancel on a cell that is no longer being edited\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\trendered = callback;\r\n\t\t}\r\n\r\n\t\tif(!cell.column.modules.edit.blocked){\r\n\t\t\tif(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t}\r\n\r\n\t\t\tswitch(typeof cell.column.modules.edit.check){\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tallowEdit = cell.column.modules.edit.check;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(allowEdit || forceEdit){\r\n\r\n\t\t\t\tself.cancelEdit();\r\n\r\n\t\t\t\tself.currentCell = cell;\r\n\r\n\t\t\t\tthis.focusScrollAdjust(cell);\r\n\r\n\t\t\t\tcomponent = cell.getComponent();\r\n\r\n\t\t\t\tif(this.mouseClick){\r\n\t\t\t\t\tthis.mouseClick = false;\r\n\r\n\t\t\t\t\tif(cell.column.definition.cellClick){\r\n\t\t\t\t\t\tcell.column.definition.cellClick.call(this.table, e, component);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(cell.column.definition.cellEditing){\r\n\t\t\t\t\tcell.column.definition.cellEditing.call(this.table, component);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.dispatch(\"cell-editing\", cell);\r\n\t\t\t\tthis.dispatchExternal(\"cellEditing\", component);\r\n\r\n\t\t\t\tparams = typeof cell.column.modules.edit.params === \"function\" ? cell.column.modules.edit.params(component) : cell.column.modules.edit.params;\r\n\r\n\t\t\t\tcellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params);\r\n\r\n\t\t\t\t//if editor returned, add to DOM, if false, abort edit\r\n\t\t\t\tif(cellEditor !== false){\r\n\r\n\t\t\t\t\tif(cellEditor instanceof Node){\r\n\t\t\t\t\t\telement.classList.add(\"tabulator-editing\");\r\n\t\t\t\t\t\tcell.row.getElement().classList.add(\"tabulator-row-editing\");\r\n\t\t\t\t\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\t\t\t\t\t\telement.appendChild(cellEditor);\r\n\r\n\t\t\t\t\t\t//trigger onRendered Callback\r\n\t\t\t\t\t\trendered();\r\n\r\n\t\t\t\t\t\t//prevent editing from triggering rowClick event\r\n\t\t\t\t\t\tvar children = element.children;\r\n\r\n\t\t\t\t\t\tfor (var i = 0; i < children.length; i++) {\r\n\t\t\t\t\t\t\tchildren[i].addEventListener(\"click\", function(e){\r\n\t\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Edit Error - Editor should return an instance of Node, the editor returned:\", cellEditor);\r\n\t\t\t\t\t\telement.blur();\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.blur();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tthis.mouseClick = false;\r\n\t\t\t\telement.blur();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.mouseClick = false;\r\n\t\t\telement.blur();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tgetEditedCells(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.editedCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tclearEdited(cell){\r\n\t\tvar editIndex;\r\n\r\n\t\tif(cell.modules.edit && cell.modules.edit.edited){\r\n\t\t\tcell.modules.edit.edited = false;\r\n\r\n\t\t\tif(cell.modules.validate){\r\n\t\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\teditIndex = this.editedCells.indexOf(cell);\r\n\r\n\t\tif(editIndex > -1){\r\n\t\t\tthis.editedCells.splice(editIndex, 1);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nEdit.moduleName = \"edit\";\r\n\r\n//load defaults\r\nEdit.editors = defaultEditors;\r\n\r\n\r\nexport default Edit;\r\n","class ExportRow{\r\n\tconstructor(type, columns, component, indent){\r\n\t\tthis.type = type;\r\n\t\tthis.columns = columns;\r\n\t\tthis.component = component || false;\r\n\t\tthis.indent = indent || 0;\r\n\t}\r\n}\r\n\r\nexport default ExportRow;","class ExportColumn{\r\n\tconstructor(value, component, width, height, depth){\r\n\t\tthis.value = value;\r\n\t\tthis.component = component || false;\r\n\t\tthis.width = width;\r\n\t\tthis.height = height;\r\n\t\tthis.depth = depth;\r\n\t}\r\n}\r\n\r\nexport default ExportColumn;","import Module from '../../core/Module.js';\r\n\r\nimport ExportRow from './ExportRow.js';\r\nimport ExportColumn from './ExportColumn.js';\r\n\r\nclass Export extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.config = {};\r\n\t\tthis.cloneTableStyle = true;\r\n\t\tthis.colVisProp = \"\";\r\n\r\n\t\tthis.registerTableOption(\"htmlOutputConfig\", false); //html outypu config\r\n\r\n\t\tthis.registerColumnOption(\"htmlOutput\");\r\n\t\tthis.registerColumnOption(\"titleHtmlOutput\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"getHtml\", this.getHtml.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tgenerateExportList(config, style, range, colVisProp){\r\n\t\tthis.cloneTableStyle = style;\r\n\t\tthis.config = config || {};\r\n\t\tthis.colVisProp = colVisProp;\r\n\r\n\t\tvar headers = this.config.columnHeaders !== false ? this.headersToExportRows(this.generateColumnGroupHeaders()) : [];\r\n\t\tvar body = this.bodyToExportRows(this.rowLookup(range));\r\n\r\n\t\treturn headers.concat(body);\r\n\t}\r\n\r\n\tgenereateTable(config, style, range, colVisProp){\r\n\t\tvar list = this.generateExportList(config, style, range, colVisProp);\r\n\r\n\t\treturn this.genereateTableElement(list);\r\n\t}\r\n\r\n\trowLookup(range){\r\n\t\tvar rows = [];\r\n\r\n\t\tif(typeof range == \"function\"){\r\n\t\t\trange.call(this.table).forEach((row) =>{\r\n\t\t\t\trow = this.table.rowManager.findRow(row);\r\n\r\n\t\t\t\tif(row){\r\n\t\t\t\t\trows.push(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tswitch(range){\r\n\t\t\t\tcase true:\r\n\t\t\t\tcase \"visible\":\r\n\t\t\t\trows = this.table.rowManager.getVisibleRows(false, true);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"all\":\r\n\t\t\t\trows = this.table.rowManager.rows;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"selected\":\r\n\t\t\t\trows = this.table.modules.selectRow.selectedRows;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"active\":\r\n\t\t\t\tdefault:\r\n\t\t\t\tif(this.table.options.pagination){\r\n\t\t\t\t\trows = this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length - 2);\r\n\t\t\t\t}else{\r\n\t\t\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn Object.assign([], rows);\r\n\t}\r\n\r\n\tgenerateColumnGroupHeaders(){\r\n\t\tvar output = [];\r\n\r\n\t\tvar columns = this.config.columnGroups !== false ? this.table.columnManager.columns : this.table.columnManager.columnsByIndex;\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\tvar colData = this.processColumnGroup(column);\r\n\r\n\t\t\tif(colData){\r\n\t\t\t\toutput.push(colData);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tprocessColumnGroup(column){\r\n\t\tvar subGroups = column.columns,\r\n\t\tmaxDepth = 0,\r\n\t\ttitle = column.definition[\"title\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))] || column.definition.title;\r\n\r\n\t\tvar groupData = {\r\n\t\t\ttitle:title,\r\n\t\t\tcolumn:column,\r\n\t\t\tdepth:1,\r\n\t\t};\r\n\r\n\t\tif(subGroups.length){\r\n\t\t\tgroupData.subGroups = [];\r\n\t\t\tgroupData.width = 0;\r\n\r\n\t\t\tsubGroups.forEach((subGroup) => {\r\n\t\t\t\tvar subGroupData = this.processColumnGroup(subGroup);\r\n\r\n\t\t\t\tif(subGroupData){\r\n\t\t\t\t\tgroupData.width += subGroupData.width;\r\n\t\t\t\t\tgroupData.subGroups.push(subGroupData);\r\n\r\n\t\t\t\t\tif(subGroupData.depth > maxDepth){\r\n\t\t\t\t\t\tmaxDepth = subGroupData.depth;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tgroupData.depth += maxDepth;\r\n\r\n\t\t\tif(!groupData.width){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.columnVisCheck(column)){\r\n\t\t\t\tgroupData.width = 1;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn groupData;\r\n\t}\r\n\r\n\tcolumnVisCheck(column){\r\n\t\treturn column.definition[this.colVisProp] !== false && (column.visible || (!column.visible && column.definition[this.colVisProp]));\r\n\t}\r\n\r\n\theadersToExportRows(columns){\r\n\t\tvar headers = [],\r\n\t\theaderDepth = 0,\r\n\t\texportRows = [];\r\n\r\n\t\tfunction parseColumnGroup(column, level){\r\n\r\n\t\t\tvar depth = headerDepth - level;\r\n\r\n\t\t\tif(typeof headers[level] === \"undefined\"){\r\n\t\t\t\theaders[level] = [];\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.height = column.subGroups ? 1 : (depth - column.depth) + 1;\r\n\r\n\t\t\theaders[level].push(column);\r\n\r\n\t\t\tif(column.height > 1){\r\n\t\t\t\tfor(let i = 1; i < column.height; i ++){\r\n\r\n\t\t\t\t\tif(typeof headers[level + i] === \"undefined\"){\r\n\t\t\t\t\t\theaders[level + i] = [];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\theaders[level + i].push(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(column.width > 1){\r\n\t\t\t\tfor(let i = 1; i < column.width; i ++){\r\n\t\t\t\t\theaders[level].push(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(column.subGroups){\r\n\t\t\t\tcolumn.subGroups.forEach(function(subGroup){\r\n\t\t\t\t\tparseColumnGroup(subGroup, level+1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//calculate maximum header debth\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tif(column.depth > headerDepth){\r\n\t\t\t\theaderDepth = column.depth;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tparseColumnGroup(column,0);\r\n\t\t});\r\n\r\n\t\theaders.forEach((header) => {\r\n\t\t\tvar columns = [];\r\n\r\n\t\t\theader.forEach((col) => {\r\n\t\t\t\tif(col){\r\n\t\t\t\t\tlet title = typeof col.title === \"undefined\" ? \"\" : col.title;\r\n\t\t\t\t\tcolumns.push(new ExportColumn(title, col.column.getComponent(), col.width, col.height, col.depth));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolumns.push(null);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\texportRows.push(new ExportRow(\"header\", columns));\r\n\t\t});\r\n\r\n\t\treturn exportRows;\r\n\t}\r\n\r\n\tbodyToExportRows(rows){\r\n\r\n\t\tvar columns = [];\r\n\t\tvar exportRows = [];\r\n\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tif (this.columnVisCheck(column)) {\r\n\t\t\t\tcolumns.push(column.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(this.config.columnCalcs !== false && this.table.modExists(\"columnCalcs\")){\r\n\t\t\tif(this.table.modules.columnCalcs.topInitialized){\r\n\t\t\t\trows.unshift(this.table.modules.columnCalcs.topRow);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modules.columnCalcs.botInitialized){\r\n\t\t\t\trows.push(this.table.modules.columnCalcs.botRow);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\trows = rows.filter((row) => {\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\treturn this.config.rowGroups !== false;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\treturn this.config.columnCalcs !== false;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\treturn !(this.table.options.dataTree && this.config.dataTree === false && row.modules.dataTree.parent);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\trows.forEach((row, i) => {\r\n\t\t\tvar rowData = row.getData(this.colVisProp);\r\n\t\t\tvar exportCols = [];\r\n\t\t\tvar indent = 0;\r\n\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\tindent = row.level;\r\n\t\t\t\texportCols.push(new ExportColumn(row.key, row.getComponent(), columns.length, 1));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\" :\r\n\t\t\t\tcase \"row\" :\r\n\t\t\t\tcolumns.forEach((col) => {\r\n\t\t\t\t\texportCols.push(new ExportColumn(col._column.getFieldValue(rowData), col, 1, 1));\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\r\n\t\t\t\t\tindent = row.modules.dataTree.index;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\texportRows.push(new ExportRow(row.type, exportCols, row.getComponent(), indent));\r\n\t\t});\r\n\r\n\t\treturn exportRows;\r\n\t}\r\n\r\n\tgenereateTableElement(list){\r\n\t\tvar table = document.createElement(\"table\"),\r\n\t\theaderEl = document.createElement(\"thead\"),\r\n\t\tbodyEl = document.createElement(\"tbody\"),\r\n\t\tstyles = this.lookupTableStyles(),\r\n\t\trowFormatter = this.table.options[\"rowFormatter\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))],\r\n\t\tsetup = {};\r\n\r\n\t\tsetup.rowFormatter = rowFormatter !== null ? rowFormatter : this.table.options.rowFormatter;\r\n\r\n\t\tif(this.table.options.dataTree &&this.config.dataTree !== false && this.table.modExists(\"columnCalcs\")){\r\n\t\t\tsetup.treeElementField = this.table.modules.dataTree.elementField;\r\n\t\t}\r\n\r\n\t\t//assign group header formatter\r\n\t\tsetup.groupHeader = this.table.options[\"groupHeader\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))];\r\n\r\n\t\tif(setup.groupHeader && !Array.isArray(setup.groupHeader)){\r\n\t\t\tsetup.groupHeader = [setup.groupHeader];\r\n\t\t}\r\n\r\n\t\ttable.classList.add(\"tabulator-print-table\");\r\n\r\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\"]);\r\n\r\n\r\n\t\tif(list.length > 1000){\r\n\t\t\tconsole.warn(\"It may take a long time to render an HTML table with more than 1000 rows\");\r\n\t\t}\r\n\r\n\t\tlist.forEach((row, i) => {\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"header\":\r\n\t\t\t\theaderEl.appendChild(this.genereateHeaderElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\tbodyEl.appendChild(this.genereateGroupElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\tbodyEl.appendChild(this.genereateCalcElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\tlet rowEl = this.genereateRowElement(row, setup, styles);\r\n\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\"]);\r\n\t\t\t\tbodyEl.appendChild(rowEl);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(headerEl.innerHTML){\r\n\t\t\ttable.appendChild(headerEl);\r\n\t\t}\r\n\r\n\t\ttable.appendChild(bodyEl);\r\n\r\n\r\n\t\tthis.mapElementStyles(this.table.element, table, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\"]);\r\n\t\treturn table;\r\n\t}\r\n\r\n\tlookupTableStyles(){\r\n\t\tvar styles = {};\r\n\r\n\t\t//lookup row styles\r\n\t\tif(this.cloneTableStyle && window.getComputedStyle){\r\n\t\t\tstyles.oddRow = this.table.element.querySelector(\".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.evenRow = this.table.element.querySelector(\".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.calcRow = this.table.element.querySelector(\".tabulator-row.tabulator-calcs\");\r\n\t\t\tstyles.firstRow = this.table.element.querySelector(\".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.firstGroup = this.table.element.getElementsByClassName(\"tabulator-group\")[0];\r\n\r\n\t\t\tif(styles.firstRow){\r\n\t\t\t\tstyles.styleCells = styles.firstRow.getElementsByClassName(\"tabulator-cell\");\r\n\t\t\t\tstyles.firstCell = styles.styleCells[0];\r\n\t\t\t\tstyles.lastCell = styles.styleCells[styles.styleCells.length - 1];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn styles;\r\n\t}\r\n\r\n\tgenereateHeaderElement(row, setup, styles){\r\n\t\tvar rowEl = document.createElement(\"tr\");\r\n\r\n\t\trow.columns.forEach((column) => {\r\n\t\t\tif(column){\r\n\t\t\t\tvar cellEl = document.createElement(\"th\");\r\n\t\t\t\tvar classNames = column.component._column.definition.cssClass ? column.component._column.definition.cssClass.split(\" \") : [];\r\n\r\n\t\t\t\tcellEl.colSpan = column.width;\r\n\t\t\t\tcellEl.rowSpan = column.height;\r\n\r\n\t\t\t\tcellEl.innerHTML = column.value;\r\n\r\n\t\t\t\tif(this.cloneTableStyle){\r\n\t\t\t\t\tcellEl.style.boxSizing = \"border-box\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tclassNames.forEach(function(className) {\r\n\t\t\t\t\tcellEl.classList.add(className);\r\n\t\t\t\t});\r\n\r\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\"]);\r\n\t\t\t\tthis.mapElementStyles(column.component._column.contentElement, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\"]);\r\n\r\n\t\t\t\tif(column.component._column.visible){\r\n\t\t\t\t\tthis.mapElementStyles(column.component.getElement(), cellEl, [\"width\"]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(column.component._column.definition.width){\r\n\t\t\t\t\t\tcellEl.style.width = column.component._column.definition.width + \"px\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(column.component._column.parent){\r\n\t\t\t\t\tthis.mapElementStyles(column.component._column.parent.groupElement, cellEl, [\"border-top\"]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowEl.appendChild(cellEl);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateGroupElement(row, setup, styles){\r\n\r\n\t\tvar rowEl = document.createElement(\"tr\"),\r\n\t\tcellEl = document.createElement(\"td\"),\r\n\t\tgroup = row.columns[0];\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-row\");\r\n\r\n\t\tif(setup.groupHeader && setup.groupHeader[row.indent]){\r\n\t\t\tgroup.value = setup.groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t}else{\r\n\t\t\tif(setup.groupHeader === false){\r\n\t\t\t\tgroup.value = group.value;\r\n\t\t\t}else{\r\n\t\t\t\tgroup.value = row.component._group.generator(group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcellEl.colSpan = group.width;\r\n\t\tcellEl.innerHTML = group.value;\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-group\");\r\n\t\trowEl.classList.add(\"tabulator-group-level-\" + row.indent);\r\n\r\n\t\tif(group.component.isVisible()){\r\n\t\t\trowEl.classList.add(\"tabulator-group-visible\");\r\n\t\t}\r\n\r\n\t\tthis.mapElementStyles(styles.firstGroup, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\r\n\t\tthis.mapElementStyles(styles.firstGroup, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\"]);\r\n\r\n\t\trowEl.appendChild(cellEl);\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateCalcElement(row, setup, styles){\r\n\t\tvar rowEl = this.genereateRowElement(row, setup, styles);\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-calcs\");\r\n\t\tthis.mapElementStyles(styles.calcRow, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateRowElement(row, setup, styles){\r\n\t\tvar rowEl = document.createElement(\"tr\");\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-row\");\r\n\r\n\t\trow.columns.forEach((col) => {\r\n\t\t\tif(col){\r\n\t\t\t\tvar cellEl = document.createElement(\"td\"),\r\n\t\t\t\tcolumn = col.component._column,\r\n\t\t\t\tindex = this.table.columnManager.findColumnIndex(column),\r\n\t\t\t\tvalue = col.value;\r\n\r\n\t\t\t\tvar cellWrapper = {\r\n\t\t\t\t\tmodules:{},\r\n\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetField:function(){\r\n\t\t\t\t\t\treturn column.definition.field;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\treturn cellEl;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetData:function(){\r\n\t\t\t\t\t\treturn row.component.getData();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\treturn row.component;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetComponent:function(){\r\n\t\t\t\t\t\treturn cellWrapper;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcolumn:column,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tvar classNames = column.definition.cssClass ? column.definition.cssClass.split(\" \") : [];\r\n\r\n\t\t\t\tclassNames.forEach(function(className) {\r\n\t\t\t\t\tcellEl.classList.add(className);\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.modExists(\"format\") && this.config.formatCells !== false){\r\n\t\t\t\t\tvalue = this.table.modules.format.formatExportValue(cellWrapper, this.colVisProp);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tvalue = JSON.stringify(value);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tvalue = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(value instanceof Node){\r\n\t\t\t\t\tcellEl.appendChild(value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcellEl.innerHTML = value;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(styles.styleCells[index] || styles.firstCell){\r\n\t\t\t\t\tthis.mapElementStyles(styles.styleCells[index] || styles.firstCell, 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\"]);\r\n\r\n\t\t\t\t\tif(column.definition.align){\r\n\t\t\t\t\t\tcellEl.style.textAlign = column.definition.align;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\r\n\t\t\t\t\tif((setup.treeElementField && setup.treeElementField == column.field) || (!setup.treeElementField && i == 0)){\r\n\t\t\t\t\t\tif(row.component._row.modules.dataTree.controlEl){\r\n\t\t\t\t\t\t\tcellEl.insertBefore(row.component._row.modules.dataTree.controlEl.cloneNode(true), cellEl.firstChild);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(row.component._row.modules.dataTree.branchEl){\r\n\t\t\t\t\t\t\tcellEl.insertBefore(row.component._row.modules.dataTree.branchEl.cloneNode(true), cellEl.firstChild);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowEl.appendChild(cellEl);\r\n\r\n\t\t\t\tif(cellWrapper.modules.format && cellWrapper.modules.format.renderedCallback){\r\n\t\t\t\t\tcellWrapper.modules.format.renderedCallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(setup.rowFormatter && this.config.formatCells !== false){\r\n\t\t\t\t\tsetup.rowFormatter(row.component);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateHTMLTable(list){\r\n\t\tvar holder = document.createElement(\"div\");\r\n\r\n\t\tholder.appendChild(this.genereateTableElement(list));\r\n\r\n\t\treturn holder.innerHTML;\r\n\t}\r\n\r\n\tgetHtml(visible, style, config, colVisProp){\r\n\t\tvar list = this.generateExportList(config || this.table.options.htmlOutputConfig, style, visible, colVisProp || \"htmlOutput\");\r\n\r\n\t\treturn this.genereateHTMLTable(list);\r\n\t}\r\n\r\n\tmapElementStyles(from, to, props){\r\n\t\tif(this.cloneTableStyle && from && to){\r\n\r\n\t\t\tvar lookup = {\r\n\t\t\t\t\"background-color\" : \"backgroundColor\",\r\n\t\t\t\t\"color\" : \"fontColor\",\r\n\t\t\t\t\"width\" : \"width\",\r\n\t\t\t\t\"font-weight\" : \"fontWeight\",\r\n\t\t\t\t\"font-family\" : \"fontFamily\",\r\n\t\t\t\t\"font-size\" : \"fontSize\",\r\n\t\t\t\t\"text-align\" : \"textAlign\",\r\n\t\t\t\t\"border-top\" : \"borderTop\",\r\n\t\t\t\t\"border-left\" : \"borderLeft\",\r\n\t\t\t\t\"border-right\" : \"borderRight\",\r\n\t\t\t\t\"border-bottom\" : \"borderBottom\",\r\n\t\t\t\t\"padding-top\" : \"paddingTop\",\r\n\t\t\t\t\"padding-left\" : \"paddingLeft\",\r\n\t\t\t\t\"padding-right\" : \"paddingRight\",\r\n\t\t\t\t\"padding-bottom\" : \"paddingBottom\",\r\n\t\t\t};\r\n\r\n\t\t\tif(window.getComputedStyle){\r\n\t\t\t\tvar fromStyle = window.getComputedStyle(from);\r\n\r\n\t\t\t\tprops.forEach(function(prop){\r\n\t\t\t\t\tto.style[lookup[prop]] = fromStyle.getPropertyValue(prop);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nExport.moduleName = \"export\";\r\n\r\nexport default Export;\r\n","export default {\r\n\r\n\t//equal to\r\n\t\"=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal == filterVal ? true : false;\r\n\t},\r\n\r\n\t//less than\r\n\t\"<\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal < filterVal ? true : false;\r\n\t},\r\n\r\n\t//less than or equal to\r\n\t\"<=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal <= filterVal ? true : false;\r\n\t},\r\n\r\n\t//greater than\r\n\t\">\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal > filterVal ? true : false;\r\n\t},\r\n\r\n\t//greater than or equal to\r\n\t\">=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal >= filterVal ? true : false;\r\n\t},\r\n\r\n\t//not equal to\r\n\t\"!=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal != filterVal ? true : false;\r\n\t},\r\n\r\n\t\"regex\":function(filterVal, rowVal, rowData, filterParams){\r\n\r\n\t\tif(typeof filterVal == \"string\"){\r\n\t\t\tfilterVal = new RegExp(filterVal);\r\n\t\t}\r\n\r\n\t\treturn filterVal.test(rowVal);\r\n\t},\r\n\r\n\t//contains the string\r\n\t\"like\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().indexOf(filterVal.toLowerCase()) > -1;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//contains the keywords\r\n\t\"keywords\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tvar keywords = filterVal.toLowerCase().split(typeof filterParams.separator === \"undefined\" ? \" \" : filterParams.separator),\r\n\t\tvalue = String(rowVal === null || typeof rowVal === \"undefined\" ? \"\" : rowVal).toLowerCase(),\r\n\t\tmatches = [];\r\n\r\n\t\tkeywords.forEach((keyword) =>{\r\n\t\t\tif(value.includes(keyword)){\r\n\t\t\t\tmatches.push(true);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn filterParams.matchAll ? matches.length === keywords.length : !!matches.length;\r\n\t},\r\n\r\n\t//starts with the string\r\n\t\"starts\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().startsWith(filterVal.toLowerCase());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//ends with the string\r\n\t\"ends\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().endsWith(filterVal.toLowerCase());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//in array\r\n\t\"in\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(Array.isArray(filterVal)){\r\n\t\t\treturn filterVal.length ? filterVal.indexOf(rowVal) > -1 : true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Filter Error - filter value is not an array:\", filterVal);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultFilters from './defaults/filters.js';\r\n\r\nclass Filter extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.filterList = []; //hold filter list\r\n\t\tthis.headerFilters = {}; //hold column filters\r\n\t\tthis.headerFilterColumns = []; //hold columns that use header filters\r\n\r\n\t\tthis.prevHeaderFilterChangeCheck = \"\";\r\n\t\tthis.prevHeaderFilterChangeCheck = \"{}\";\r\n\r\n\t\tthis.changed = false; //has filtering changed since last render\r\n\t\tthis.tableInitialized = false;\r\n\r\n\t\tthis.registerTableOption(\"filterMode\", \"local\"); //local or remote filtering\r\n\r\n\t\tthis.registerTableOption(\"initialFilter\", false); //initial filtering criteria\r\n\t\tthis.registerTableOption(\"initialHeaderFilter\", false); //initial header filtering criteria\r\n\t\tthis.registerTableOption(\"headerFilterLiveFilterDelay\", 300); //delay before updating column after user types in header filter\r\n\r\n\t\tthis.registerColumnOption(\"headerFilter\");\r\n\t\tthis.registerColumnOption(\"headerFilterPlaceholder\");\r\n\t\tthis.registerColumnOption(\"headerFilterParams\");\r\n\t\tthis.registerColumnOption(\"headerFilterEmptyCheck\");\r\n\t\tthis.registerColumnOption(\"headerFilterFunc\");\r\n\t\tthis.registerColumnOption(\"headerFilterFuncParams\");\r\n\t\tthis.registerColumnOption(\"headerFilterLiveFilter\");\r\n\r\n\t\tthis.registerTableFunction(\"searchRows\", this.searchRows.bind(this));\r\n\t\tthis.registerTableFunction(\"searchData\", this.searchData.bind(this));\r\n\r\n\t\tthis.registerTableFunction(\"setFilter\", this.userSetFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"refreshFilter\", this.userRefreshFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"addFilter\", this.userAddFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"getFilters\", this.getFilters.bind(this));\r\n\t\tthis.registerTableFunction(\"setHeaderFilterFocus\", this.userSetHeaderFilterFocus.bind(this));\r\n\t\tthis.registerTableFunction(\"getHeaderFilterValue\", this.userGetHeaderFilterValue.bind(this));\r\n\t\tthis.registerTableFunction(\"setHeaderFilterValue\", this.userSetHeaderFilterValue.bind(this));\r\n\t\tthis.registerTableFunction(\"getHeaderFilters\", this.getHeaderFilters.bind(this));\r\n\t\tthis.registerTableFunction(\"removeFilter\", this.userRemoveFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"clearFilter\", this.userClearFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"clearHeaderFilter\", this.userClearHeaderFilter.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"column\", \"headerFilterFocus\", this.setHeaderFilterFocus.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"reloadHeaderFilter\", this.reloadHeaderFilter.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"getHeaderFilterValue\", this.getHeaderFilterValue.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"setHeaderFilterValue\", this.setHeaderFilterValue.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumnHeaderFilter.bind(this));\r\n\t\tthis.subscribe(\"column-width-fit-before\", this.hideHeaderFilterElements.bind(this));\r\n\t\tthis.subscribe(\"column-width-fit-after\", this.showHeaderFilterElements.bind(this));\r\n\t\tthis.subscribe(\"table-built\", this.tableBuilt.bind(this));\r\n\r\n\t\tif(this.table.options.filterMode === \"remote\"){\r\n\t\t\tthis.subscribe(\"data-params\", this.remoteFilterParams.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerDataHandler(this.filter.bind(this), 10);\r\n\t}\r\n\r\n\ttableBuilt(){\r\n\t\tif(this.table.options.initialFilter){\r\n\t\t\tthis.setFilter(this.table.options.initialFilter);\r\n\t\t}\r\n\r\n\t\tif(this.table.options.initialHeaderFilter){\r\n\t\t\tthis.table.options.initialHeaderFilter.forEach((item) => {\r\n\r\n\t\t\t\tvar column = this.table.columnManager.findColumn(item.field);\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tthis.setHeaderFilterValue(column, item.value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", item.field);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.tableInitialized = true;\r\n\t}\r\n\r\n\tremoteFilterParams(data, config, silent, params){\r\n\t\tparams.filter = this.getFilters(true, true);\r\n\t\treturn params;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\t//set standard filters\r\n\tuserSetFilter(field, type, value, params){\r\n\t\tthis.setFilter(field, type, value, params);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//set standard filters\r\n\tuserRefreshFilter(){\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//add filter to array\r\n\tuserAddFilter(field, type, value, params){\r\n\t\tthis.addFilter(field, type, value, params);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\tuserSetHeaderFilterFocus(field){\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tthis.setHeaderFilterFocus(column);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Focus Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tuserGetHeaderFilterValue(field) {\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn this.getHeaderFilterValue(column);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", field);\r\n\t\t}\r\n\t}\r\n\r\n\tuserSetHeaderFilterValue(field, value){\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tthis.setHeaderFilterValue(column, value);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//remove filter from array\r\n\tuserRemoveFilter(field, type, value){\r\n\t\tthis.removeFilter(field, type, value);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//clear filters\r\n\tuserClearFilter(all){\r\n\t\tthis.clearFilter(all);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//clear header filters\r\n\tuserClearHeaderFilter(){\r\n\t\tthis.clearHeaderFilter();\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\r\n\t//search for specific row components\r\n\tsearchRows(field, type, value){\r\n\t\treturn this.search(\"rows\", field, type, value);\r\n\t}\r\n\r\n\t//search for specific data\r\n\tsearchData(field, type, value){\r\n\t\treturn this.search(\"data\", field, type, value);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnHeaderFilter(column){\r\n\t\tvar def = column.definition;\r\n\r\n\t\tif(def.headerFilter){\r\n\r\n\t\t\tif(typeof def.headerFilterPlaceholder !== \"undefined\" && def.field){\r\n\t\t\t\tthis.module(\"localize\").setHeaderFilterColumnPlaceholder(def.field, def.headerFilterPlaceholder);\r\n\t\t\t}\r\n\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column header filter\r\n\tinitializeColumn(column, value){\r\n\t\tvar self = this,\r\n\t\tfield = column.getField(),\r\n\t\tparams;\r\n\r\n\t\t//handle successfull value change\r\n\t\tfunction success(value){\r\n\t\t\tvar filterType = (column.modules.filter.tagType == \"input\" && column.modules.filter.attrType == \"text\") || column.modules.filter.tagType == \"textarea\" ? \"partial\" : \"match\",\r\n\t\t\ttype = \"\",\r\n\t\t\tfilterChangeCheck = \"\",\r\n\t\t\tfilterFunc;\r\n\r\n\t\t\tif(typeof column.modules.filter.prevSuccess === \"undefined\" || column.modules.filter.prevSuccess !== value){\r\n\r\n\t\t\t\tcolumn.modules.filter.prevSuccess = value;\r\n\r\n\t\t\t\tif(!column.modules.filter.emptyFunc(value)){\r\n\t\t\t\t\tcolumn.modules.filter.value = value;\r\n\r\n\t\t\t\t\tswitch(typeof column.definition.headerFilterFunc){\r\n\t\t\t\t\t\tcase \"string\":\r\n\t\t\t\t\t\tif(Filter.filters[column.definition.headerFilterFunc]){\r\n\t\t\t\t\t\t\ttype = column.definition.headerFilterFunc;\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\r\n\t\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\t\tparams = typeof params === \"function\" ? params(value, fieldVal, data) : params;\r\n\r\n\t\t\t\t\t\t\t\treturn Filter.filters[column.definition.headerFilterFunc](value, fieldVal, data, params);\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tconsole.warn(\"Header Filter Error - Matching filter function not found: \", column.definition.headerFilterFunc);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\r\n\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\tparams = typeof params === \"function\" ? params(value, fieldVal, data) : params;\r\n\r\n\t\t\t\t\t\t\treturn column.definition.headerFilterFunc(value, fieldVal, data, params);\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\ttype = filterFunc;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(!filterFunc){\r\n\t\t\t\t\t\tswitch(filterType){\r\n\t\t\t\t\t\t\tcase \"partial\":\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\tvar colVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\t\tif(typeof colVal !== 'undefined' && colVal !== null){\r\n\t\t\t\t\t\t\t\t\treturn String(colVal).toLowerCase().indexOf(String(value).toLowerCase()) > -1;\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\ttype = \"like\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\treturn column.getFieldValue(data) == value;\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\ttype = \"=\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tself.headerFilters[field] = {value:value, func:filterFunc, type:type, params:params || {}};\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdelete self.headerFilters[field];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfilterChangeCheck = JSON.stringify(self.headerFilters);\r\n\r\n\t\t\t\tif(self.prevHeaderFilterChangeCheck !== filterChangeCheck){\r\n\t\t\t\t\tself.prevHeaderFilterChangeCheck = filterChangeCheck;\r\n\r\n\t\t\t\t\tself.trackChanges();\r\n\t\t\t\t\tself.refreshFilter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tcolumn.modules.filter = {\r\n\t\t\tsuccess:success,\r\n\t\t\tattrType:false,\r\n\t\t\ttagType:false,\r\n\t\t\temptyFunc:false,\r\n\t\t};\r\n\r\n\t\tthis.generateHeaderFilterElement(column);\r\n\t}\r\n\r\n\tgenerateHeaderFilterElement(column, initialValue, reinitialize){\r\n\t\tvar self = this,\r\n\t\tsuccess = column.modules.filter.success,\r\n\t\tfield = column.getField(),\r\n\t\tfilterElement, editor, editorElement, cellWrapper, typingTimer, searchTrigger, params;\r\n\r\n\t\t//handle aborted edit\r\n\t\tfunction cancel(){}\r\n\r\n\t\tif(column.modules.filter.headerElement && column.modules.filter.headerElement.parentNode){\r\n\t\t\tcolumn.contentElement.removeChild(column.modules.filter.headerElement.parentNode);\r\n\t\t}\r\n\r\n\t\tif(field){\r\n\r\n\t\t\t//set empty value function\r\n\t\t\tcolumn.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function(value){\r\n\t\t\t\treturn !value && value !== \"0\" && value !== 0;\r\n\t\t\t};\r\n\r\n\t\t\tfilterElement = document.createElement(\"div\");\r\n\t\t\tfilterElement.classList.add(\"tabulator-header-filter\");\r\n\r\n\t\t\t//set column editor\r\n\t\t\tswitch(typeof column.definition.headerFilter){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(self.table.modules.edit.editors[column.definition.headerFilter]){\r\n\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.headerFilter];\r\n\r\n\t\t\t\t\tif((column.definition.headerFilter === \"tick\" || column.definition.headerFilter === \"tickCross\") && !column.definition.headerFilterEmptyCheck){\r\n\t\t\t\t\t\tcolumn.modules.filter.emptyFunc = function(value){\r\n\t\t\t\t\t\t\treturn value !== true && value !== false;\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Filter Error - Cannot build header filter, No such editor found: \", column.definition.editor);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\teditor = column.definition.headerFilter;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tif(column.modules.edit && column.modules.edit.editor){\r\n\t\t\t\t\teditor = column.modules.edit.editor;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]){\r\n\t\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.formatter];\r\n\r\n\t\t\t\t\t\tif((column.definition.formatter === \"tick\" || column.definition.formatter === \"tickCross\") && !column.definition.headerFilterEmptyCheck){\r\n\t\t\t\t\t\t\tcolumn.modules.filter.emptyFunc = function(value){\r\n\t\t\t\t\t\t\t\treturn value !== true && value !== false;\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\teditor = self.table.modules.edit.editors[\"input\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(editor){\r\n\r\n\t\t\t\tcellWrapper = {\r\n\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\treturn typeof initialValue !== \"undefined\" ? initialValue : \"\";\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetField:function(){\r\n\t\t\t\t\t\treturn column.definition.field;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\treturn filterElement;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\tnormalizeHeight:function(){\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\tparams = column.definition.headerFilterParams || {};\r\n\r\n\t\t\t\tparams = typeof params === \"function\" ? params.call(self.table, cellWrapper) : params;\r\n\r\n\t\t\t\teditorElement = editor.call(this.table.modules.edit, cellWrapper, function(){}, success, cancel, params);\r\n\r\n\t\t\t\tif(!editorElement){\r\n\t\t\t\t\tconsole.warn(\"Filter Error - Cannot add filter to \" + field + \" column, editor returned a value of false\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!(editorElement instanceof Node)){\r\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);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//set Placeholder Text\r\n\t\t\t\tif(field){\r\n\t\t\t\t\tself.langBind(\"headerFilters|columns|\" + column.definition.field, function(value){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"placeholder\", typeof value !== \"undefined\" && value ? value : self.langText(\"headerFilters|default\"));\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.langBind(\"headerFilters|default\", function(value){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"placeholder\", value);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//focus on element on click\r\n\t\t\t\teditorElement.addEventListener(\"click\", function(e){\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\teditorElement.focus();\r\n\t\t\t\t});\r\n\r\n\t\t\t\teditorElement.addEventListener(\"focus\", (e) => {\r\n\t\t\t\t\tvar left = this.table.columnManager.element.scrollLeft;\r\n\r\n\t\t\t\t\tvar headerPos = this.table.rowManager.element.scrollLeft + parseInt(this.table.columnManager.element.style.marginLeft);\r\n\r\n\t\t\t\t\tif(left !== headerPos){\r\n\t\t\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\t\t\tthis.table.columnManager.scrollHorizontal(left);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\t//live update filters as user types\r\n\t\t\t\ttypingTimer = false;\r\n\r\n\t\t\t\tsearchTrigger = function(e){\r\n\t\t\t\t\tif(typingTimer){\r\n\t\t\t\t\t\tclearTimeout(typingTimer);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ttypingTimer = setTimeout(function(){\r\n\t\t\t\t\t\tsuccess(editorElement.value);\r\n\t\t\t\t\t},self.table.options.headerFilterLiveFilterDelay);\r\n\t\t\t\t};\r\n\r\n\t\t\t\tcolumn.modules.filter.headerElement = editorElement;\r\n\t\t\t\tcolumn.modules.filter.attrType = editorElement.hasAttribute(\"type\") ? editorElement.getAttribute(\"type\").toLowerCase() : \"\" ;\r\n\t\t\t\tcolumn.modules.filter.tagType = editorElement.tagName.toLowerCase();\r\n\r\n\t\t\t\tif(column.definition.headerFilterLiveFilter !== false){\r\n\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\t!(\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === 'autocomplete' ||\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === 'tickCross' ||\r\n\t\t\t\t\t\t\t((column.definition.editor === 'autocomplete' ||\r\n\t\t\t\t\t\t\t\tcolumn.definition.editor === 'tickCross') &&\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === true)\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\teditorElement.addEventListener(\"keyup\", searchTrigger);\r\n\t\t\t\t\teditorElement.addEventListener(\"search\", searchTrigger);\r\n\r\n\r\n\t\t\t\t\t//update number filtered columns on change\r\n\t\t\t\t\tif(column.modules.filter.attrType == \"number\"){\r\n\t\t\t\t\t\teditorElement.addEventListener(\"change\", function(e){\r\n\t\t\t\t\t\t\tsuccess(editorElement.value);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//change text inputs to search inputs to allow for clearing of field\r\n\t\t\t\t\tif(column.modules.filter.attrType == \"text\" && this.table.browser !== \"ie\"){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"type\", \"search\");\r\n\t\t\t\t\t\t// editorElement.off(\"change blur\"); //prevent blur from triggering filter and preventing selection click\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\t//prevent input and select elements from propegating click to column sorters etc\r\n\t\t\t\t\tif(column.modules.filter.tagType == \"input\" || column.modules.filter.tagType == \"select\" || column.modules.filter.tagType == \"textarea\"){\r\n\t\t\t\t\t\teditorElement.addEventListener(\"mousedown\",function(e){\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfilterElement.appendChild(editorElement);\r\n\r\n\t\t\t\tcolumn.contentElement.appendChild(filterElement);\r\n\r\n\t\t\t\tif(!reinitialize){\r\n\t\t\t\t\tself.headerFilterColumns.push(column);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Filter Error - Cannot add header filter, column has no field set:\", column.definition.title);\r\n\t\t}\r\n\t}\r\n\r\n\t//hide all header filter elements (used to ensure correct column widths in \"fitData\" layout mode)\r\n\thideHeaderFilterElements(){\r\n\t\tthis.headerFilterColumns.forEach(function(column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tcolumn.modules.filter.headerElement.style.display = 'none';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//show all header filter elements (used to ensure correct column widths in \"fitData\" layout mode)\r\n\tshowHeaderFilterElements(){\r\n\t\tthis.headerFilterColumns.forEach(function(column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tcolumn.modules.filter.headerElement.style.display = '';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//programatically set focus of header filter\r\n\tsetHeaderFilterFocus(column){\r\n\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\tcolumn.modules.filter.headerElement.focus();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Focus Error - No header filter set on column:\", column.getField());\r\n\t\t}\r\n\t}\r\n\r\n\t//programmatically get value of header filter\r\n\tgetHeaderFilterValue(column){\r\n\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\treturn column.modules.filter.headerElement.value;\r\n\t\t} else {\r\n\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t}\r\n\t}\r\n\r\n\t//programatically set value of header filter\r\n\tsetHeaderFilterValue(column, value){\r\n\t\tif (column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tthis.generateHeaderFilterElement(column, value, true);\r\n\t\t\t\tcolumn.modules.filter.success(value);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treloadHeaderFilter(column){\r\n\t\tif (column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tthis.generateHeaderFilterElement(column, column.modules.filter.value, true);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trefreshFilter(){\r\n\t\tif(this.tableInitialized){\r\n\t\t\tif(this.table.options.filterMode === \"remote\"){\r\n\t\t\t\tthis.reloadData();\r\n\t\t\t}else{\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//TODO - Persist left position of row manager\r\n\t\t// left = this.scrollLeft;\r\n\t\t// this.scrollHorizontal(left);\r\n\t}\r\n\r\n\t//check if the filters has changed since last use\r\n\ttrackChanges(){\r\n\t\tthis.changed = true;\r\n\t\tthis.dispatch(\"filter-changed\");\r\n\t}\r\n\r\n\t//check if the filters has changed since last use\r\n\thasChanged(){\r\n\t\tvar changed = this.changed;\r\n\t\tthis.changed = false;\r\n\t\treturn changed;\r\n\t}\r\n\r\n\t//set standard filters\r\n\tsetFilter(field, type, value, params){\r\n\t\tthis.filterList = [];\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value, params:params}];\r\n\t\t}\r\n\r\n\t\tthis.addFilter(field);\r\n\t}\r\n\r\n\t//add filter to array\r\n\taddFilter(field, type, value, params){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value, params:params}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\tthis.filterList.push(filter);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.trackChanges();\r\n\t\t}\r\n\t}\r\n\r\n\tfindFilter(filter){\r\n\t\tvar column;\r\n\r\n\t\tif(Array.isArray(filter)){\r\n\t\t\treturn this.findSubFilters(filter);\r\n\t\t}\r\n\r\n\t\tvar filterFunc = false;\r\n\r\n\t\tif(typeof filter.field == \"function\"){\r\n\t\t\tfilterFunc = function(data){\r\n\t\t\t\treturn filter.field(data, filter.type || {})// pass params to custom filter function\r\n\t\t\t};\r\n\t\t}else{\r\n\r\n\t\t\tif(Filter.filters[filter.type]){\r\n\r\n\t\t\t\tcolumn = this.table.columnManager.getColumnByField(filter.field);\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\treturn Filter.filters[filter.type](filter.value, column.getFieldValue(data), data, filter.params || {});\r\n\t\t\t\t\t};\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\treturn Filter.filters[filter.type](filter.value, data[filter.field], data, filter.params || {});\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Filter Error - No such filter type found, ignoring: \", filter.type);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfilter.func = filterFunc;\r\n\r\n\t\treturn filter.func ? filter : false;\r\n\t}\r\n\r\n\tfindSubFilters(filters){\r\n\t\tvar output = [];\r\n\r\n\t\tfilters.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\toutput.push(filter);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output.length ? output : false;\r\n\t}\r\n\r\n\t//get all filters\r\n\tgetFilters(all, ajax){\r\n\t\tvar output = [];\r\n\r\n\t\tif(all){\r\n\t\t\toutput = this.getHeaderFilters();\r\n\t\t}\r\n\r\n\t\tif(ajax){\r\n\t\t\toutput.forEach(function(item){\r\n\t\t\t\tif(typeof item.type == \"function\"){\r\n\t\t\t\t\titem.type = \"function\";\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\toutput = output.concat(this.filtersToArray(this.filterList, ajax));\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//filter to Object\r\n\tfiltersToArray(filterList, ajax){\r\n\t\tvar output = [];\r\n\r\n\t\tfilterList.forEach((filter) => {\r\n\t\t\tvar item;\r\n\r\n\t\t\tif(Array.isArray(filter)){\r\n\t\t\t\toutput.push(this.filtersToArray(filter, ajax));\r\n\t\t\t}else{\r\n\t\t\t\titem = {field:filter.field, type:filter.type, value:filter.value}\r\n\r\n\t\t\t\tif(ajax){\r\n\t\t\t\t\tif(typeof item.type == \"function\"){\r\n\t\t\t\t\t\titem.type = \"function\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\toutput.push(item);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//get all filters\r\n\tgetHeaderFilters(){\r\n\t\tvar output = [];\r\n\r\n\t\tfor(var key in this.headerFilters){\r\n\t\t\toutput.push({field:key, type:this.headerFilters[key].type, value:this.headerFilters[key].value});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//remove filter from array\r\n\tremoveFilter(field, type, value){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tvar index = -1;\r\n\r\n\t\t\tif(typeof filter.field == \"object\"){\r\n\t\t\t\tindex = this.filterList.findIndex((element) => {\r\n\t\t\t\t\treturn filter === element;\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tindex = this.filterList.findIndex((element) => {\r\n\t\t\t\t\treturn filter.field === element.field && filter.type === element.type && filter.value === element.value;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.filterList.splice(index, 1);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Filter Error - No matching filter type found, ignoring: \", filter.type);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//clear filters\r\n\tclearFilter(all){\r\n\t\tthis.filterList = [];\r\n\r\n\t\tif(all){\r\n\t\t\tthis.clearHeaderFilter();\r\n\t\t}\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//clear header filters\r\n\tclearHeaderFilter(){\r\n\t\tthis.headerFilters = {};\r\n\t\tthis.prevHeaderFilterChangeCheck = \"{}\";\r\n\r\n\t\tthis.headerFilterColumns.forEach((column) => {\r\n\t\t\tif(typeof column.modules.filter.value !== \"undefined\"){\r\n\t\t\t\tdelete column.modules.filter.value;\r\n\t\t\t}\r\n\t\t\tcolumn.modules.filter.prevSuccess = undefined;\r\n\t\t\tthis.reloadHeaderFilter(column);\r\n\t\t});\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//search data and return matching rows\r\n\tsearch (searchType, field, type, value){\r\n\t\tvar activeRows = [],\r\n\t\tfilterList = [];\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\tfilterList.push(filter);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\tvar match = true;\r\n\r\n\t\t\tfilterList.forEach((filter) => {\r\n\t\t\t\tif(!this.filterRecurse(filter, row.getData())){\r\n\t\t\t\t\tmatch = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tactiveRows.push(searchType === \"data\" ? row.getData(\"data\") : row.getComponent());\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\t\treturn activeRows;\r\n\t}\r\n\r\n\t//filter row array\r\n\tfilter(rowList, filters){\r\n\t\tvar activeRows = [],\r\n\t\tactiveRowComponents = [];\r\n\r\n\t\tif(this.subscribedExternal(\"dataFiltering\")){\r\n\t\t\tthis.dispatchExternal(\"dataFiltering\", this.getFilters());\r\n\t\t}\r\n\r\n\t\tif(this.table.options.filterMode !== \"remote\" && (this.filterList.length || Object.keys(this.headerFilters).length)){\r\n\r\n\t\t\trowList.forEach((row) => {\r\n\t\t\t\tif(this.filterRow(row)){\r\n\t\t\t\t\tactiveRows.push(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t}else{\r\n\t\t\tactiveRows = rowList.slice(0);\r\n\t\t}\r\n\r\n\t\tif(this.subscribedExternal(\"dataFiltered\")){\r\n\r\n\t\t\tactiveRows.forEach((row) => {\r\n\t\t\t\tactiveRowComponents.push(row.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatchExternal(\"dataFiltered\", this.getFilters(), activeRowComponents);\r\n\t\t}\r\n\r\n\t\treturn activeRows;\r\n\t}\r\n\r\n\t//filter individual row\r\n\tfilterRow(row, filters){\r\n\t\tvar match = true,\r\n\t\tdata = row.getData();\r\n\r\n\t\tthis.filterList.forEach((filter) => {\r\n\t\t\tif(!this.filterRecurse(filter, data)){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\tfor(var field in this.headerFilters){\r\n\t\t\tif(!this.headerFilters[field].func(data)){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tfilterRecurse(filter, data){\r\n\t\tvar match = false;\r\n\r\n\t\tif(Array.isArray(filter)){\r\n\t\t\tfilter.forEach((subFilter) => {\r\n\t\t\t\tif(this.filterRecurse(subFilter, data)){\r\n\t\t\t\t\tmatch = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tmatch = filter.func(data);\r\n\t\t}\r\n\r\n\t\treturn match;\r\n\t}\r\n}\r\n\r\nFilter.moduleName = \"filter\";\r\n\r\n//load defaults\r\nFilter.filters = defaultFilters;\r\n\r\nexport default Filter;","import plaintext from './formatters/plaintext.js';\r\nimport html from './formatters/html.js';\r\nimport textarea from './formatters/textarea.js';\r\nimport money from './formatters/money.js';\r\nimport link from './formatters/link.js';\r\nimport image from './formatters/image.js';\r\nimport tickCross from './formatters/tickCross.js';\r\nimport datetime from './formatters/datetime.js';\r\nimport datetimediff from './formatters/datetimediff.js';\r\nimport lookup from './formatters/lookup.js';\r\nimport star from './formatters/star.js';\r\nimport traffic from './formatters/traffic.js';\r\nimport progress from './formatters/progress.js';\r\nimport color from './formatters/color.js';\r\nimport buttonTick from './formatters/buttonTick.js';\r\nimport buttonCross from './formatters/buttonCross.js';\r\nimport rownum from './formatters/rownum.js';\r\nimport handle from './formatters/handle.js';\r\nimport responsiveCollapse from './formatters/responsiveCollapse.js';\r\nimport rowSelection from './formatters/rowSelection.js';\r\n\r\nexport default {\r\n\tplaintext:plaintext,\r\n\thtml:html,\r\n\ttextarea:textarea,\r\n\tmoney:money,\r\n\tlink:link,\r\n\timage:image,\r\n\ttickCross:tickCross,\r\n\tdatetime:datetime,\r\n\tdatetimediff:datetimediff,\r\n\tlookup:lookup,\r\n\tstar:star,\r\n\ttraffic:traffic,\r\n\tprogress:progress,\r\n\tcolor:color,\r\n\tbuttonTick:buttonTick,\r\n\tbuttonCross:buttonCross,\r\n\trownum:rownum,\r\n\thandle:handle,\r\n\tresponsiveCollapse:responsiveCollapse,\r\n\trowSelection:rowSelection,\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn cell.getValue();\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().style.whiteSpace = \"pre-wrap\";\r\n\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar floatVal = parseFloat(cell.getValue()),\r\n\tsign = \"\",\r\n\tnumber, integer, decimal, rgx;\r\n\r\n\tvar decimalSym = formatterParams.decimal || \".\";\r\n\tvar thousandSym = formatterParams.thousand || \",\";\r\n\tvar negativeSign = formatterParams.negativeSign || \"-\";\r\n\tvar symbol = formatterParams.symbol || \"\";\r\n\tvar after = !!formatterParams.symbolAfter;\r\n\tvar precision = typeof formatterParams.precision !== \"undefined\" ? formatterParams.precision : 2;\r\n\r\n\tif(isNaN(floatVal)){\r\n\t\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n\t}\r\n\r\n\tif(floatVal < 0){\r\n\t\tfloatVal = Math.abs(floatVal);\r\n\t\tsign = negativeSign;\r\n\t}\r\n\r\n\tnumber = precision !== false ? floatVal.toFixed(precision) : floatVal;\r\n\tnumber = String(number).split(\".\");\r\n\r\n\tinteger = number[0];\r\n\tdecimal = number.length > 1 ? decimalSym + number[1] : \"\";\r\n\r\n\trgx = /(\\d+)(\\d{3})/;\r\n\r\n\twhile (rgx.test(integer)){\r\n\t\tinteger = integer.replace(rgx, \"$1\" + thousandSym + \"$2\");\r\n\t}\r\n\r\n\treturn after ? sign + integer + decimal + symbol : sign + symbol + integer + decimal;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\turlPrefix = formatterParams.urlPrefix || \"\",\r\n\tdownload = formatterParams.download,\r\n\tlabel = value,\r\n\tel = document.createElement(\"a\"),\r\n\tdata;\r\n\r\n\tif(formatterParams.labelField){\r\n\t\tdata = cell.getData();\r\n\t\tlabel = data[formatterParams.labelField];\r\n\t}\r\n\r\n\tif(formatterParams.label){\r\n\t\tswitch(typeof formatterParams.label){\r\n\t\t\tcase \"string\":\r\n\t\t\tlabel = formatterParams.label;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tlabel = formatterParams.label(cell);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(label){\r\n\t\tif(formatterParams.urlField){\r\n\t\t\tdata = cell.getData();\r\n\t\t\tvalue = data[formatterParams.urlField];\r\n\t\t}\r\n\r\n\t\tif(formatterParams.url){\r\n\t\t\tswitch(typeof formatterParams.url){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tvalue = formatterParams.url;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tvalue = formatterParams.url(cell);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tel.setAttribute(\"href\", urlPrefix + value);\r\n\r\n\t\tif(formatterParams.target){\r\n\t\t\tel.setAttribute(\"target\", formatterParams.target);\r\n\t\t}\r\n\r\n\t\tif(formatterParams.download){\r\n\r\n\t\t\tif(typeof download == \"function\"){\r\n\t\t\t\tdownload = download(cell);\r\n\t\t\t}else{\r\n\t\t\t\tdownload = download === true ? \"\" : download;\r\n\t\t\t}\r\n\r\n\t\t\tel.setAttribute(\"download\", download);\r\n\t\t}\r\n\r\n\t\tel.innerHTML = this.emptyToSpace(this.sanitizeHTML(label));\r\n\r\n\t\treturn el;\r\n\t}else{\r\n\t\treturn \" \";\r\n\t}\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar el = document.createElement(\"img\"),\r\n\tsrc = cell.getValue();\r\n\r\n\tif(formatterParams.urlPrefix){\r\n\t\tsrc = formatterParams.urlPrefix + cell.getValue();\r\n\t}\r\n\r\n\tif(formatterParams.urlSuffix){\r\n\t\tsrc = src + formatterParams.urlSuffix;\r\n\t}\r\n\r\n\tel.setAttribute(\"src\", src);\r\n\r\n\tswitch(typeof formatterParams.height){\r\n\t\tcase \"number\":\r\n\t\tel.style.height = formatterParams.height + \"px\";\r\n\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\tel.style.height = formatterParams.height;\r\n\t\tbreak;\r\n\t}\r\n\r\n\tswitch(typeof formatterParams.width){\r\n\t\tcase \"number\":\r\n\t\tel.style.width = formatterParams.width + \"px\";\r\n\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\tel.style.width = formatterParams.width;\r\n\t\tbreak;\r\n\t}\r\n\r\n\tel.addEventListener(\"load\", function(){\r\n\t\tcell.getRow().normalizeHeight();\r\n\t});\r\n\r\n\treturn el;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\telement = cell.getElement(),\r\n\tempty = formatterParams.allowEmpty,\r\n\ttruthy = formatterParams.allowTruthy,\r\n\ttick = typeof formatterParams.tickElement !== \"undefined\" ? formatterParams.tickElement : '',\r\n\tcross = typeof formatterParams.crossElement !== \"undefined\" ? formatterParams.crossElement : '';\r\n\r\n\tif((truthy && value) || (value === true || value === \"true\" || value === \"True\" || value === 1 || value === \"1\")){\r\n\t\telement.setAttribute(\"aria-checked\", true);\r\n\t\treturn tick || \"\";\r\n\t}else{\r\n\t\tif(empty && (value === \"null\" || value === \"\" || value === null || typeof value === \"undefined\")){\r\n\t\t\telement.setAttribute(\"aria-checked\", \"mixed\");\r\n\t\t\treturn \"\";\r\n\t\t}else{\r\n\t\t\telement.setAttribute(\"aria-checked\", false);\r\n\t\t\treturn cross || \"\";\r\n\t\t}\r\n\t}\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar inputFormat = formatterParams.inputFormat || \"yyyy-MM-dd HH:mm:ss\";\r\n\tvar\toutputFormat = formatterParams.outputFormat || \"dd/MM/yyyy HH:mm:ss\";\r\n\tvar\tinvalid = typeof formatterParams.invalidPlaceholder !== \"undefined\" ? formatterParams.invalidPlaceholder : \"\";\r\n\tvar value = cell.getValue();\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\tvar newDatetime = inputFormat === \"iso\" ? DT.fromISO(String(value)) : DT.fromFormat(String(value), inputFormat);\r\n\r\n\t\tif(newDatetime.isValid){\r\n\t\t\tif(formatterParams.timezone){\r\n\t\t\t\tnewDatetime = newDatetime.setZone(formatterParams.timezone);\r\n\t\t\t}\r\n\r\n\t\t\treturn newDatetime.toFormat(outputFormat);\r\n\t\t}else{\r\n\t\t\tif(invalid === true || !value){\r\n\t\t\t\treturn value;\r\n\t\t\t}else if(typeof invalid === \"function\"){\r\n\t\t\t\treturn invalid(value);\r\n\t\t\t}else{\r\n\t\t\t\treturn invalid;\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tconsole.error(\"Format Error - 'datetime' formatter is dependant on luxon.js\");\r\n\t}\r\n};","export default function (cell, formatterParams, onRendered) {\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar inputFormat = formatterParams.inputFormat || \"yyyy-MM-dd HH:mm:ss\";\r\n\tvar invalid = typeof formatterParams.invalidPlaceholder !== \"undefined\" ? formatterParams.invalidPlaceholder : \"\";\r\n\tvar suffix = typeof formatterParams.suffix !== \"undefined\" ? formatterParams.suffix : false;\r\n\tvar unit = typeof formatterParams.unit !== \"undefined\" ? formatterParams.unit : \"days\";\r\n\tvar humanize = typeof formatterParams.humanize !== \"undefined\" ? formatterParams.humanize : false;\r\n\tvar date = typeof formatterParams.date !== \"undefined\" ? formatterParams.date : DT.now();\r\n\tvar value = cell.getValue();\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\t\r\n\t\tvar newDatetime = inputFormat === \"iso\" ? DT.fromISO(String(value)) : DT.fromFormat(String(value), inputFormat);\r\n\r\n\t\tif (newDatetime.isValid){\r\n\t\t\tif(humanize){\r\n\t\t\t\t// return moment.duration(newDatetime.diff(date)).humanize(suffix);\r\n\t\t\t}else{\r\n\t\t\t\treturn parseInt(newDatetime.diff(date, unit)[unit]) + (suffix ? \" \" + suffix : \"\");\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\tif (invalid === true) {\r\n\t\t\t\treturn value;\r\n\t\t\t} else if (typeof invalid === \"function\") {\r\n\t\t\t\treturn invalid(value);\r\n\t\t\t} else {\r\n\t\t\t\treturn invalid;\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tconsole.error(\"Format Error - 'datetimediff' formatter is dependant on luxon.js\");\r\n\t}\r\n};","export default function (cell, formatterParams, onRendered) {\r\n\tvar value = cell.getValue();\r\n\r\n\tif (typeof formatterParams[value] === \"undefined\") {\r\n\t\tconsole.warn('Missing display value for ' + value);\r\n\t\treturn value;\r\n\t}\r\n\r\n\treturn formatterParams[value];\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\telement = cell.getElement(),\r\n\tmaxStars = formatterParams && formatterParams.stars ? formatterParams.stars : 5,\r\n\tstars = document.createElement(\"span\"),\r\n\tstar = document.createElementNS('http://www.w3.org/2000/svg', \"svg\"),\r\n\tstarActive = '',\r\n\tstarInactive = '';\r\n\r\n\t//style stars holder\r\n\tstars.style.verticalAlign = \"middle\";\r\n\r\n\t//style star\r\n\tstar.setAttribute(\"width\", \"14\");\r\n\tstar.setAttribute(\"height\", \"14\");\r\n\tstar.setAttribute(\"viewBox\", \"0 0 512 512\");\r\n\tstar.setAttribute(\"xml:space\", \"preserve\");\r\n\tstar.style.padding = \"0 1px\";\r\n\r\n\tvalue = value && !isNaN(value) ? parseInt(value) : 0;\r\n\r\n\tvalue = Math.max(0, Math.min(value, maxStars));\r\n\r\n\tfor(var i=1;i<= maxStars;i++){\r\n\t\tvar nextStar = star.cloneNode(true);\r\n\t\tnextStar.innerHTML = i <= value ? starActive : starInactive;\r\n\r\n\t\tstars.appendChild(nextStar);\r\n\t}\r\n\r\n\telement.style.whiteSpace = \"nowrap\";\r\n\telement.style.overflow = \"hidden\";\r\n\telement.style.textOverflow = \"ellipsis\";\r\n\r\n\telement.setAttribute(\"aria-label\", value);\r\n\r\n\treturn stars;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = this.sanitizeHTML(cell.getValue()) || 0,\r\n\tel = document.createElement(\"span\"),\r\n\tmax = formatterParams && formatterParams.max ? formatterParams.max : 100,\r\n\tmin = formatterParams && formatterParams.min ? formatterParams.min : 0,\r\n\tcolors = formatterParams && typeof formatterParams.color !== \"undefined\" ? formatterParams.color : [\"red\", \"orange\", \"green\"],\r\n\tcolor = \"#666666\",\r\n\tpercent, percentValue;\r\n\r\n\tif(isNaN(value) || typeof cell.getValue() === \"undefined\"){\r\n\t\treturn;\r\n\t}\r\n\r\n\tel.classList.add(\"tabulator-traffic-light\");\r\n\r\n\t//make sure value is in range\r\n\tpercentValue = parseFloat(value) <= max ? parseFloat(value) : max;\r\n\tpercentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min;\r\n\r\n\t//workout percentage\r\n\tpercent = (max - min) / 100;\r\n\tpercentValue = Math.round((percentValue - min) / percent);\r\n\r\n\t//set color\r\n\tswitch(typeof colors){\r\n\t\tcase \"string\":\r\n\t\tcolor = colors;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tcolor = colors(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(colors)){\r\n\t\t\tvar unit = 100 / colors.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, colors.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tcolor = colors[index];\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tel.style.backgroundColor = color;\r\n\r\n\treturn el;\r\n};","import CellComponent from '../../../../core/cell/CellComponent.js';\r\n\r\nexport default function(cell, formatterParams, onRendered){ //progress bar\r\n\tvar value = this.sanitizeHTML(cell.getValue()) || 0,\r\n\telement = cell.getElement(),\r\n\tmax = formatterParams && formatterParams.max ? formatterParams.max : 100,\r\n\tmin = formatterParams && formatterParams.min ? formatterParams.min : 0,\r\n\tlegendAlign = formatterParams && formatterParams.legendAlign ? formatterParams.legendAlign : \"center\",\r\n\tpercent, percentValue, color, legend, legendColor, top, left, right, bottom;\r\n\r\n\t//make sure value is in range\r\n\tpercentValue = parseFloat(value) <= max ? parseFloat(value) : max;\r\n\tpercentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min;\r\n\r\n\t//workout percentage\r\n\tpercent = (max - min) / 100;\r\n\tpercentValue = Math.round((percentValue - min) / percent);\r\n\r\n\t//set bar color\r\n\tswitch(typeof formatterParams.color){\r\n\t\tcase \"string\":\r\n\t\tcolor = formatterParams.color;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tcolor = formatterParams.color(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(formatterParams.color)){\r\n\t\t\tvar unit = 100 / formatterParams.color.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, formatterParams.color.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tcolor = formatterParams.color[index];\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tdefault:\r\n\t\tcolor = \"#2DC214\";\r\n\t}\r\n\r\n\t//generate legend\r\n\tswitch(typeof formatterParams.legend){\r\n\t\tcase \"string\":\r\n\t\tlegend = formatterParams.legend;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tlegend = formatterParams.legend(value);\r\n\t\tbreak;\r\n\t\tcase \"boolean\":\r\n\t\tlegend = value;\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\tlegend = false;\r\n\t}\r\n\r\n\t//set legend color\r\n\tswitch(typeof formatterParams.legendColor){\r\n\t\tcase \"string\":\r\n\t\tlegendColor = formatterParams.legendColor;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tlegendColor = formatterParams.legendColor(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(formatterParams.legendColor)){\r\n\t\t\tvar unit = 100 / formatterParams.legendColor.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, formatterParams.legendColor.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tlegendColor = formatterParams.legendColor[index];\r\n\t\t}\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\tlegendColor = \"#000\";\r\n\t}\r\n\r\n\telement.style.minWidth = \"30px\";\r\n\telement.style.position = \"relative\";\r\n\r\n\telement.setAttribute(\"aria-label\", percentValue);\r\n\r\n\tvar barEl = document.createElement(\"div\");\r\n\tbarEl.style.display = \"inline-block\";\r\n\tbarEl.style.position = \"absolute\";\r\n\tbarEl.style.width = percentValue + \"%\";\r\n\tbarEl.style.backgroundColor = color;\r\n\tbarEl.style.height = \"100%\";\r\n\r\n\tbarEl.setAttribute('data-max', max);\r\n\tbarEl.setAttribute('data-min', min);\r\n\r\n\tvar barContainer = document.createElement(\"div\");\r\n\tbarContainer.style.position = \"relative\";\r\n\tbarContainer.style.width = \"100%\";\r\n\tbarContainer.style.height = \"100%\";\r\n\r\n\tif(legend){\r\n\t\tvar legendEl = document.createElement(\"div\");\r\n\t\tlegendEl.style.position = \"absolute\";\r\n\t\tlegendEl.style.top = 0;\r\n\t\tlegendEl.style.left = 0;\r\n\t\tlegendEl.style.textAlign = legendAlign;\r\n\t\tlegendEl.style.width = \"100%\";\r\n\t\tlegendEl.style.color = legendColor;\r\n\t\tlegendEl.innerHTML = legend;\r\n\t}\r\n\r\n\tonRendered(function(){\r\n\r\n\t\t//handle custom element needed if formatter is to be included in printed/downloaded output\r\n\t\tif(!(cell instanceof CellComponent)){\r\n\t\t\tvar holderEl = document.createElement(\"div\");\r\n\t\t\tholderEl.style.position = \"absolute\";\r\n\t\t\tholderEl.style.top = \"4px\";\r\n\t\t\tholderEl.style.bottom = \"4px\";\r\n\t\t\tholderEl.style.left = \"4px\";\r\n\t\t\tholderEl.style.right = \"4px\";\r\n\r\n\t\t\telement.appendChild(holderEl);\r\n\r\n\t\t\telement = holderEl;\r\n\t\t}\r\n\r\n\t\telement.appendChild(barContainer);\r\n\t\tbarContainer.appendChild(barEl);\r\n\r\n\t\tif(legend){\r\n\t\t\tbarContainer.appendChild(legendEl);\r\n\t\t}\r\n\t});\r\n\r\n\treturn \"\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().style.backgroundColor = this.sanitizeHTML(cell.getValue());\r\n\treturn \"\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn '';\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn '';\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn this.table.rowManager.activeRows.indexOf(cell.getRow()._getSelf()) + 1 || \"\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().classList.add(\"tabulator-row-handle\");\r\n\treturn \"
\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar open = false,\r\n\tel = document.createElement(\"div\"),\r\n\tconfig = cell.getRow()._row.modules.responsiveLayout;\r\n\r\n\tel.classList.add(\"tabulator-responsive-collapse-toggle\");\r\n\tel.innerHTML = \"+-\";\r\n\r\n\tcell.getElement().classList.add(\"tabulator-row-handle\");\r\n\r\n\tfunction toggleList(isOpen){\r\n\t\tvar collapseEl = config.element;\r\n\r\n\t\tconfig.open = isOpen;\r\n\r\n\t\tif(collapseEl){\r\n\r\n\t\t\tif(config.open){\r\n\t\t\t\tel.classList.add(\"open\");\r\n\t\t\t\tcollapseEl.style.display = '';\r\n\t\t\t}else{\r\n\t\t\t\tel.classList.remove(\"open\");\r\n\t\t\t\tcollapseEl.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tel.addEventListener(\"click\", function(e){\r\n\t\te.stopImmediatePropagation();\r\n\t\ttoggleList(!config.open);\r\n\t});\r\n\r\n\ttoggleList(config.open);\r\n\r\n\treturn el;\r\n};","import RowComponent from '../../../../core/row/RowComponent.js';\r\n\r\nexport default function(cell, formatterParams, onRendered){\r\n\tvar checkbox = document.createElement(\"input\");\r\n\tvar blocked = false;\r\n\r\n\tcheckbox.type = 'checkbox';\r\n\r\n\tcheckbox.setAttribute(\"aria-label\", \"Select Row\");\r\n\t\r\n\tif(this.table.modExists(\"selectRow\", true)){\r\n\r\n\t\tcheckbox.addEventListener(\"click\", (e) => {\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tif(typeof cell.getRow == 'function'){\r\n\t\t\tvar row = cell.getRow();\r\n\r\n\t\t\tif(row instanceof RowComponent){\r\n\r\n\t\t\t\tcheckbox.addEventListener(\"change\", (e) => {\r\n\t\t\t\t\tif(this.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\t\tif(!blocked){\r\n\t\t\t\t\t\t\trow.toggleSelect();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tblocked = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trow.toggleSelect();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\tcheckbox.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\tblocked = true;\r\n\t\t\t\t\t\tthis.table.modules.selectRow.handleComplexRowClick(row._row, e);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcheckbox.checked = row.isSelected && row.isSelected();\r\n\t\t\t\tthis.table.modules.selectRow.registerRowSelectCheckbox(row, checkbox);\r\n\t\t\t}else{\r\n\t\t\t\tcheckbox = \"\";\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tcheckbox.addEventListener(\"change\", (e) => {\r\n\t\t\t\tif(this.table.modules.selectRow.selectedRows.length){\r\n\t\t\t\t\tthis.table.deselectRow();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis.table.selectRow(formatterParams.rowRange);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.table.modules.selectRow.registerHeaderSelectCheckbox(checkbox);\r\n\t\t}\r\n\t}\r\n\r\n\treturn checkbox;\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultFormatters from './defaults/formatters.js';\r\n\r\nclass Format extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.registerColumnOption(\"formatter\");\r\n\t\tthis.registerColumnOption(\"formatterParams\");\r\n\r\n\t\tthis.registerColumnOption(\"formatterPrint\");\r\n\t\tthis.registerColumnOption(\"formatterPrintParams\");\r\n\t\tthis.registerColumnOption(\"formatterClipboard\");\r\n\t\tthis.registerColumnOption(\"formatterClipboardParams\");\r\n\t\tthis.registerColumnOption(\"formatterHtmlOutput\");\r\n\t\tthis.registerColumnOption(\"formatterHtmlOutputParams\");\r\n\t\tthis.registerColumnOption(\"titleFormatter\");\r\n\t\tthis.registerColumnOption(\"titleFormatterParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-format\", this.formatValue.bind(this));\r\n\t\tthis.subscribe(\"cell-rendered\", this.cellRendered.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"column-format\", this.formatHeader.bind(this));\r\n\t}\r\n\r\n\t//initialize column formatter\r\n\tinitializeColumn(column){\r\n\t\tcolumn.modules.format = this.lookupFormatter(column, \"\");\r\n\r\n\t\tif(typeof column.definition.formatterPrint !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.print = this.lookupFormatter(column, \"Print\");\r\n\t\t}\r\n\r\n\t\tif(typeof column.definition.formatterClipboard !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.clipboard = this.lookupFormatter(column, \"Clipboard\");\r\n\t\t}\r\n\r\n\t\tif(typeof column.definition.formatterHtmlOutput !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.htmlOutput = this.lookupFormatter(column, \"HtmlOutput\");\r\n\t\t}\r\n\t}\r\n\r\n\tlookupFormatter(column, type){\r\n\t\tvar config = {params:column.definition[\"formatter\" + type + \"Params\"] || {}},\r\n\t\tformatter = column.definition[\"formatter\" + type];\r\n\r\n\t\t//set column formatter\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\tconfig.formatter = Format.formatters[formatter];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tconfig.formatter = formatter;\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn config;\r\n\t}\r\n\r\n\tcellRendered(cell){\r\n\t\tif(cell.modules.format && cell.modules.format.renderedCallback && !cell.modules.format.rendered){\r\n\t\t\tcell.modules.format.renderedCallback();\r\n\t\t\tcell.modules.format.rendered = true;\r\n\t\t}\r\n\t}\r\n\r\n\t//return a formatted value for a column header\r\n\tformatHeader(column, title, el){\r\n\t\tvar formatter, params, onRendered, mockCell;\r\n\r\n\t\tif(column.definition.titleFormatter){\r\n\t\t\tformatter = this.getFormatter(column.definition.titleFormatter);\r\n\r\n\t\t\tonRendered = (callback) => {\r\n\t\t\t\tcolumn.titleFormatterRendered = callback;\r\n\t\t\t};\r\n\r\n\t\t\tmockCell = {\r\n\t\t\t\tgetValue:function(){\r\n\t\t\t\t\treturn title;\r\n\t\t\t\t},\r\n\t\t\t\tgetElement:function(){\r\n\t\t\t\t\treturn el;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tparams = column.definition.titleFormatterParams || {};\r\n\r\n\t\t\tparams = typeof params === \"function\" ? params() : params;\r\n\r\n\t\t\treturn formatter.call(this, mockCell, params, onRendered);\r\n\t\t}else{\r\n\t\t\treturn title;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//return a formatted value for a cell\r\n\tformatValue(cell){\r\n\t\tvar component = cell.getComponent(),\r\n\t\tparams = typeof cell.column.modules.format.params === \"function\" ? cell.column.modules.format.params(component) : cell.column.modules.format.params;\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\tif(!cell.modules.format){\r\n\t\t\t\tcell.modules.format = {};\r\n\t\t\t}\r\n\r\n\t\t\tcell.modules.format.renderedCallback = callback;\r\n\t\t\tcell.modules.format.rendered = false;\r\n\t\t}\r\n\r\n\t\treturn cell.column.modules.format.formatter.call(this, component, params, onRendered);\r\n\t}\r\n\r\n\tformatExportValue(cell, type){\r\n\t\tvar formatter = cell.column.modules.format[type],\r\n\t\tparams;\r\n\r\n\t\tif(formatter){\r\n\t\t\tparams = typeof formatter.params === \"function\" ? formatter.params(component) : formatter.params;\r\n\r\n\t\t\tfunction onRendered(callback){\r\n\t\t\t\tif(!cell.modules.format){\r\n\t\t\t\t\tcell.modules.format = {};\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcell.modules.format.renderedCallback = callback;\r\n\t\t\t\tcell.modules.format.rendered = false;\r\n\t\t\t}\r\n\r\n\t\t\treturn formatter.formatter.call(this, cell.getComponent(), params, onRendered);\r\n\r\n\t\t}else{\r\n\t\t\treturn this.formatValue(cell);\r\n\t\t}\r\n\t}\r\n\r\n\tsanitizeHTML(value){\r\n\t\tif(value){\r\n\t\t\tvar entityMap = {\r\n\t\t\t\t'&': '&',\r\n\t\t\t\t'<': '<',\r\n\t\t\t\t'>': '>',\r\n\t\t\t\t'\"': '"',\r\n\t\t\t\t\"'\": ''',\r\n\t\t\t\t'/': '/',\r\n\t\t\t\t'`': '`',\r\n\t\t\t\t'=': '='\r\n\t\t\t};\r\n\r\n\t\t\treturn String(value).replace(/[&<>\"'`=\\/]/g, function (s) {\r\n\t\t\t\treturn entityMap[s];\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn value;\r\n\t\t}\r\n\t}\r\n\r\n\temptyToSpace(value){\r\n\t\treturn value === null || typeof value === \"undefined\" || value === \"\" ? \" \" : value;\r\n\t}\r\n\r\n\t//get formatter for cell\r\n\tgetFormatter(formatter){\r\n\t\tvar formatter;\r\n\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\tformatter = Format.formatters[formatter]\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tformatter = formatter;\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn formatter;\r\n\t}\r\n}\r\n\r\nFormat.moduleName = \"format\";\r\n\r\n//load defaults\r\nFormat.formatters = defaultFormatters;\r\n\r\nexport default Format;","import Module from '../../core/Module.js';\r\n\r\nclass FrozenColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.leftColumns = [];\r\n\t\tthis.rightColumns = [];\r\n\t\tthis.leftMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.rightPadding = 0;\r\n\t\tthis.initializationMode = \"left\";\r\n\t\tthis.active = false;\r\n\t\tthis.scrollEndTimer = false;\r\n\t\tthis.blocked = true;\r\n\t\t\r\n\t\tthis.registerColumnOption(\"frozen\");\r\n\t}\r\n\t\r\n\t//reset initial state\r\n\treset(){\r\n\t\tthis.initializationMode = \"left\";\r\n\t\tthis.leftColumns = [];\r\n\t\tthis.rightColumns = [];\r\n\t\tthis.leftMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.active = false;\r\n\t\t\r\n\t\tthis.table.columnManager.headersElement.style.marginLeft = 0;\r\n\t\tthis.table.columnManager.element.style.paddingRight = 0;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-layout\", this.layoutCell.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"column-width\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"row-layout-after\", this.layoutRow.bind(this));\r\n\t\tthis.subscribe(\"table-layout\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t\tthis.subscribe(\"columns-loading\", this.reset.bind(this));\r\n\t\tthis.subscribe(\"table-redraw\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"layout-refreshing\", this.blockLayout.bind(this));\r\n\t\tthis.subscribe(\"layout-refreshed\", this.unblockLayout.bind(this));\r\n\t}\r\n\t\r\n\tblockLayout(){\r\n\t\tthis.blocked = true;\r\n\t}\r\n\t\r\n\tunblockLayout(){\r\n\t\tthis.blocked = false;\r\n\t}\r\n\t\r\n\tlayoutCell(cell){\r\n\t\tthis.layoutElement(cell.element, cell.column)\r\n\t}\r\n\t\r\n\t//initialize specific column\r\n\tinitializeColumn(column){\r\n\t\tvar config = {margin:0, edge:false};\r\n\t\t\r\n\t\tif(!column.isGroup){\r\n\t\t\t\r\n\t\t\tif(this.frozenCheck(column)){\r\n\t\t\t\t\r\n\t\t\t\tconfig.position = this.initializationMode;\r\n\t\t\t\t\r\n\t\t\t\tif(this.initializationMode == \"left\"){\r\n\t\t\t\t\tthis.leftColumns.push(column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.rightColumns.unshift(column);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.active = true;\r\n\t\t\t\t\r\n\t\t\t\tcolumn.modules.frozen = config;\r\n\t\t\t}else{\r\n\t\t\t\tthis.initializationMode = \"right\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfrozenCheck(column){\r\n\t\tvar frozen = false;\r\n\t\t\r\n\t\tif(column.parent.isGroup && column.definition.frozen){\r\n\t\t\tconsole.warn(\"Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups\");\r\n\t\t}\r\n\t\t\r\n\t\tif(column.parent.isGroup){\r\n\t\t\treturn this.frozenCheck(column.parent);\r\n\t\t}else{\r\n\t\t\treturn column.definition.frozen;\r\n\t\t}\r\n\t\t\r\n\t\treturn frozen;\r\n\t}\r\n\t\r\n\t//quick layout to smooth horizontal scrolling\r\n\tscrollHorizontal(){\r\n\t\tvar rows;\r\n\t\t\r\n\t\tif(this.active){\r\n\t\t\tclearTimeout(this.scrollEndTimer);\r\n\r\n\t\t\trows = this.table.rowManager.getVisibleRows();\r\n\t\t\t\r\n\t\t\tthis.calcMargins(true);\r\n\t\t\t\r\n\t\t\tthis.layoutColumnPosition();\r\n\t\t\t\r\n\t\t\tthis.layoutCalcRows();\r\n\t\t\t\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\t//calculate margins for rows\r\n\tcalcMargins(scroll){\r\n\t\t\r\n\t\tif(!scroll){\r\n\t\t\tthis.leftMargin = this._calcSpace(this.leftColumns, this.leftColumns.length) + \"px\";\t\t\t\r\n\t\t\tthis.rightMargin = this._calcSpace(this.rightColumns, this.rightColumns.length) + \"px\";\t\r\n\t\t\tthis.table.rowManager.tableElement.style.marginRight = this.rightMargin;\r\n\t\t}\r\n\t\r\n\t\t//calculate right frozen columns\r\n\t\tthis.rightPadding = this.table.rowManager.element.clientWidth + this.table.columnManager.scrollLeft;\r\n\t}\r\n\t\r\n\t//layout calculation rows\r\n\tlayoutCalcRows(){\r\n\t\tif(this.table.modExists(\"columnCalcs\")){\r\n\t\t\tif(this.table.modules.columnCalcs.topInitialized && this.table.modules.columnCalcs.topRow){\r\n\t\t\t\tthis.layoutRow(this.table.modules.columnCalcs.topRow);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.modules.columnCalcs.botInitialized && this.table.modules.columnCalcs.botRow){\r\n\t\t\t\tthis.layoutRow(this.table.modules.columnCalcs.botRow);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.modExists(\"groupRows\")){\r\n\t\t\t\tthis.layoutGroupCalcs(this.table.modules.groupRows.getGroups())\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutGroupCalcs(groups){\r\n\t\tgroups.forEach((group) => {\r\n\t\t\tif(group.calcs.top){\r\n\t\t\t\tthis.layoutRow(group.calcs.top);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(group.calcs.bottom){\r\n\t\t\t\tthis.layoutRow(group.calcs.bottom);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(group.groupList && group.groupList.length){\r\n\t\t\t\tthis.layoutGroupCalcs(group.groupList && group.groupList);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//calculate column positions and layout headers\r\n\tlayoutColumnPosition(allCells){\r\n\t\tvar leftParents = [];\r\n\t\t\r\n\t\tvar leftMargin = 0;\r\n\t\tvar rightMargin = 0;\r\n\t\t\r\n\t\tthis.table.columnManager.headersElement.style.marginLeft = this.leftMargin;\r\n\t\tthis.table.columnManager.element.style.paddingRight = this.rightMargin;\r\n\r\n\t\tthis.leftColumns.forEach((column, i) => {\t\r\n\t\t\tcolumn.modules.frozen.margin = (leftMargin + this.table.columnManager.scrollLeft) + \"px\";\r\n\r\n\t\t\tif(column.visible){\r\n\t\t\t\tleftMargin += column.getWidth();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(i == this.leftColumns.length - 1){\r\n\t\t\t\tcolumn.modules.frozen.edge = true;\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.modules.frozen.edge = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(column.parent.isGroup){\r\n\t\t\t\tvar parentEl = this.getColGroupParentElement(column);\r\n\t\t\t\tif(!leftParents.includes(parentEl)){\r\n\t\t\t\t\tthis.layoutElement(parentEl, column);\r\n\t\t\t\t\tleftParents.push(parentEl);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(column.modules.frozen.edge){\r\n\t\t\t\t\tparentEl.classList.add(\"tabulator-frozen-\" + column.modules.frozen.position);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.layoutElement(column.getElement(), column);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(allCells){\r\n\t\t\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.rightColumns.forEach((column, i) => {\r\n\r\n\t\t\tif(column.visible){\r\n\t\t\t\trightMargin += column.getWidth();\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.modules.frozen.margin = (this.rightPadding - rightMargin) + \"px\";\r\n\t\t\t\r\n\t\t\tif(i == this.rightColumns.length - 1){\r\n\t\t\t\tcolumn.modules.frozen.edge = true;\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.modules.frozen.edge = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(column.parent.isGroup){\r\n\t\t\t\tthis.layoutElement(this.getColGroupParentElement(column), column);\r\n\t\t\t}else{\r\n\t\t\t\tthis.layoutElement(column.getElement(), column);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(allCells){\r\n\t\t\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tgetColGroupParentElement(column){\r\n\t\treturn column.parent.isGroup ? this.getColGroupParentElement(column.parent) : column.getElement();\r\n\t}\r\n\t\r\n\t//layout columns appropriately\r\n\tlayout(){\r\n\t\tif(this.active && !this.blocked){\r\n\t\t\t//calculate row padding\r\n\t\t\tthis.calcMargins();\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) =>{\r\n\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.layoutCalcRows();\r\n\t\t\t\r\n\t\t\t//calculate left columns\r\n\t\t\tthis.layoutColumnPosition(true);\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\t\t\r\n\t\trowEl.style.paddingLeft = this.leftMargin;\r\n\t\t\r\n\t\tif(this.table.options.layout === \"fitDataFill\" && this.rightColumns.length){\r\n\t\t\tthis.table.rowManager.getTableElement().style.minWidth = \"calc(100% - \" + this.rightMargin + \")\";\r\n\t\t}\r\n\t\t\r\n\t\tthis.leftColumns.forEach((column) => {\r\n\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\r\n\t\t\tif(cell){\r\n\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.rightColumns.forEach((column) => {\r\n\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\r\n\t\t\tif(cell){\r\n\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tlayoutElement(element, column){\r\n\t\t\r\n\t\tif(column.modules.frozen){\r\n\t\t\telement.style.position = \"absolute\";\r\n\t\t\telement.style.left = column.modules.frozen.margin;\r\n\t\t\t\r\n\t\t\telement.classList.add(\"tabulator-frozen\");\r\n\t\t\t\r\n\t\t\tif(column.modules.frozen.edge){\r\n\t\t\t\telement.classList.add(\"tabulator-frozen-\" + column.modules.frozen.position);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_calcSpace(columns, index){\r\n\t\tvar width = 0;\r\n\t\t\r\n\t\tfor (let i = 0; i < index; i++){\r\n\t\t\tif(columns[i].visible){\r\n\t\t\t\twidth += columns[i].getWidth();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn width;\r\n\t}\r\n}\r\n\r\nFrozenColumns.moduleName = \"frozenColumns\";\r\n\r\nexport default FrozenColumns;","import Module from '../../core/Module.js';\r\n\r\nclass FrozenRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.topElement = document.createElement(\"div\");\r\n\t\tthis.rows = [];\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"freeze\", this.freezeRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"unfreeze\", this.unfreezeRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isFrozen\", this.isRowFrozen.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.rows = [];\r\n\r\n\t\tthis.topElement.classList.add(\"tabulator-frozen-rows-holder\");\r\n\r\n\t\t// this.table.columnManager.element.append(this.topElement);\r\n\t\tthis.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\r\n\r\n\t\tthis.subscribe(\"row-deleting\", this.detachRow.bind(this));\r\n\t\tthis.subscribe(\"rows-visible\", this.visibleRows.bind(this));\r\n\r\n\t\tthis.registerDisplayHandler(this.getRows.bind(this), 10);\r\n\t}\r\n\r\n\tisRowFrozen(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\t\treturn index > -1;\r\n\t}\r\n\r\n\tisFrozen(){\r\n\t\treturn !!this.rows.length;\r\n\t}\r\n\r\n\tvisibleRows(viewable, rows){\r\n\t\tthis.rows.forEach((row) => {\r\n\t\t\trows.push(row);\r\n\t\t});\r\n\r\n\t\treturn rows;\r\n\t}\r\n\r\n\t//filter frozen rows out of display data\r\n\tgetRows(rows){\r\n\t\tvar self = this,\r\n\t\tfrozen = [],\r\n\t\toutput = rows.slice(0);\r\n\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\tvar index = output.indexOf(row);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\toutput.splice(index, 1);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tfreezeRow(row){\r\n\t\tif(!row.modules.frozen){\r\n\t\t\trow.modules.frozen = true;\r\n\t\t\tthis.topElement.appendChild(row.getElement());\r\n\t\t\trow.initialize();\r\n\t\t\trow.normalizeHeight();\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\tthis.rows.push(row);\r\n\r\n\t\t\tthis.refreshData(false, \"display\")\r\n\r\n\t\t\tthis.styleRows();\r\n\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Freeze Error - Row is already frozen\");\r\n\t\t}\r\n\t}\r\n\r\n\tunfreezeRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\r\n\t\tif(row.modules.frozen){\r\n\r\n\t\t\trow.modules.frozen = false;\r\n\r\n\t\t\tthis.detachRow(row);\r\n\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\tthis.refreshData(false, \"display\")\r\n\r\n\t\t\tif(this.rows.length){\r\n\t\t\t\tthis.styleRows();\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Freeze Error - Row is already unfrozen\");\r\n\t\t}\r\n\t}\r\n\r\n\tdetachRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tvar rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\r\n\t\t\tthis.rows.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\tstyleRows(row){\r\n\t\tthis.rows.forEach((row, i) => {\r\n\t\t\tthis.table.rowManager.styleRow(row, i);\r\n\t\t});\r\n\t}\r\n}\r\n\r\nFrozenRows.moduleName = \"frozenRows\";\r\n\r\nexport default FrozenRows;","//public group object\r\nclass GroupComponent {\r\n\tconstructor (group){\r\n\t\tthis._group = group;\r\n\t\tthis.type = \"GroupComponent\";\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._group.groupManager.table.componentFunctionBinder.handle(\"row\", target._group, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetKey(){\r\n\t\treturn this._group.key;\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._group.field;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._group.element;\r\n\t}\r\n\r\n\tgetRows(){\r\n\t\treturn this._group.getRows(true);\r\n\t}\r\n\r\n\tgetSubGroups(){\r\n\t\treturn this._group.getSubGroups(true);\r\n\t}\r\n\r\n\tgetParentGroup(){\r\n\t\treturn this._group.parent ? this._group.parent.getComponent() : false;\r\n\t}\r\n\r\n\tisVisible(){\r\n\t\treturn this._group.visible;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tthis._group.show();\r\n\t}\r\n\r\n\thide(){\r\n\t\tthis._group.hide();\r\n\t}\r\n\r\n\ttoggle(){\r\n\t\tthis._group.toggleVisibility();\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._group;\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._group.groupManager.table;\r\n\t}\r\n}\r\n\r\nexport default GroupComponent;","import Helpers from '../../core/tools/Helpers.js';\r\nimport GroupComponent from './GroupComponent.js';\r\n\r\n//Group functions\r\nclass Group{\r\n\t\r\n\tconstructor(groupManager, parent, level, key, field, generator, oldGroup){\r\n\t\tthis.groupManager = groupManager;\r\n\t\tthis.parent = parent;\r\n\t\tthis.key = key;\r\n\t\tthis.level = level;\r\n\t\tthis.field = field;\r\n\t\tthis.hasSubGroups = level < (groupManager.groupIDLookups.length - 1);\r\n\t\tthis.addRow = this.hasSubGroups ? this._addRowToGroup : this._addRow;\r\n\t\tthis.type = \"group\"; //type of element\r\n\t\tthis.old = oldGroup;\r\n\t\tthis.rows = [];\r\n\t\tthis.groups = [];\r\n\t\tthis.groupList = [];\r\n\t\tthis.generator = generator;\r\n\t\tthis.element = false;\r\n\t\tthis.elementContents = false;\r\n\t\tthis.height = 0;\r\n\t\tthis.outerHeight = 0;\r\n\t\tthis.initialized = false;\r\n\t\tthis.calcs = {};\r\n\t\tthis.initialized = false;\r\n\t\tthis.modules = {};\r\n\t\tthis.arrowElement = false;\r\n\t\t\r\n\t\tthis.visible = oldGroup ? oldGroup.visible : (typeof groupManager.startOpen[level] !== \"undefined\" ? groupManager.startOpen[level] : groupManager.startOpen[0]);\r\n\t\t\r\n\t\tthis.component = null;\r\n\t\t\r\n\t\tthis.createElements();\r\n\t\tthis.addBindings();\r\n\t\t\r\n\t\tthis.createValueGroups();\r\n\t}\r\n\t\r\n\twipe(){\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\tgroup.wipe();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\tif(row.modules){\r\n\t\t\t\t\tdelete row.modules.group;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\tthis.element = false;\r\n\t\tthis.arrowElement = false;\r\n\t\tthis.elementContents = false;\r\n\t}\r\n\t\r\n\tcreateElements(){\r\n\t\tvar arrow = document.createElement(\"div\");\r\n\t\tarrow.classList.add(\"tabulator-arrow\");\r\n\t\t\r\n\t\tthis.element = document.createElement(\"div\");\r\n\t\tthis.element.classList.add(\"tabulator-row\");\r\n\t\tthis.element.classList.add(\"tabulator-group\");\r\n\t\tthis.element.classList.add(\"tabulator-group-level-\" + this.level);\r\n\t\tthis.element.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\tthis.arrowElement = document.createElement(\"div\");\r\n\t\tthis.arrowElement.classList.add(\"tabulator-group-toggle\");\r\n\t\tthis.arrowElement.appendChild(arrow);\r\n\t\t\r\n\t\t//setup movable rows\r\n\t\tif(this.groupManager.table.options.movableRows !== false && this.groupManager.table.modExists(\"moveRow\")){\r\n\t\t\tthis.groupManager.table.modules.moveRow.initializeGroupHeader(this);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcreateValueGroups(){\r\n\t\tvar level = this.level + 1;\r\n\t\tif(this.groupManager.allowedValues && this.groupManager.allowedValues[level]){\r\n\t\t\tthis.groupManager.allowedValues[level].forEach((value) => {\r\n\t\t\t\tthis._createGroup(value, level);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\taddBindings(){\r\n\t\tvar toggleElement;\r\n\t\t\r\n\t\tif(this.groupManager.table.options.groupToggleElement){\r\n\t\t\ttoggleElement = this.groupManager.table.options.groupToggleElement == \"arrow\" ? this.arrowElement : this.element;\r\n\t\t\t\r\n\t\t\ttoggleElement.addEventListener(\"click\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\tthis.toggleVisibility();\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\t_createGroup(groupID, level){\r\n\t\tvar groupKey = level + \"_\" + groupID;\r\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);\r\n\t\t\r\n\t\tthis.groups[groupKey] = group;\r\n\t\tthis.groupList.push(group);\r\n\t}\r\n\t\r\n\t_addRowToGroup(row){\r\n\t\t\r\n\t\tvar level = this.level + 1;\r\n\t\t\r\n\t\tif(this.hasSubGroups){\r\n\t\t\tvar groupID = this.groupManager.groupIDLookups[level].func(row.getData()),\r\n\t\t\tgroupKey = level + \"_\" + groupID;\r\n\t\t\t\r\n\t\t\tif(this.groupManager.allowedValues && this.groupManager.allowedValues[level]){\r\n\t\t\t\tif(this.groups[groupKey]){\r\n\t\t\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(!this.groups[groupKey]){\r\n\t\t\t\t\tthis._createGroup(groupID, level);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_addRow(row){\r\n\t\tthis.rows.push(row);\r\n\t\trow.modules.group = this;\r\n\t}\r\n\t\r\n\tinsertRow(row, to, after){\r\n\t\tvar data = this.conformRowData({});\r\n\t\t\r\n\t\trow.updateData(data);\r\n\t\t\r\n\t\tvar toIndex = this.rows.indexOf(to);\r\n\t\t\r\n\t\tif(toIndex > -1){\r\n\t\t\tif(after){\r\n\t\t\t\tthis.rows.splice(toIndex+1, 0, row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.splice(toIndex, 0, row);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(after){\r\n\t\t\t\tthis.rows.push(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.unshift(row);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\trow.modules.group = this;\r\n\t\t\r\n\t\tthis.generateGroupHeaderContents();\r\n\t\t\r\n\t\tif(this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\tthis.groupManager.table.modules.columnCalcs.recalcGroup(this);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.updateGroupRows(true);\r\n\t}\r\n\t\r\n\tscrollHeader(left){\r\n\t\tif(this.arrowElement){\r\n\t\t\tthis.arrowElement.style.marginLeft = left;\r\n\t\t\t\r\n\t\t\tthis.groupList.forEach(function(child){\r\n\t\t\t\tchild.scrollHeader(left);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRowIndex(row){}\r\n\t\r\n\t//update row data to match grouping contraints\r\n\tconformRowData(data){\r\n\t\tif(this.field){\r\n\t\t\tdata[this.field] = this.key;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Data Conforming Error - Cannot conform row data to match new group as groupBy is a function\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.parent){\r\n\t\t\tdata = this.parent.conformRowData(data);\r\n\t\t}\r\n\t\t\r\n\t\treturn data;\r\n\t}\r\n\t\r\n\tremoveRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\t\tvar el = row.getElement();\r\n\t\t\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.rows.splice(index, 1);\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.groupManager.table.options.groupValues && !this.rows.length){\r\n\t\t\tif(this.parent){\r\n\t\t\t\tthis.parent.removeGroup(this);\r\n\t\t\t}else{\r\n\t\t\t\tthis.groupManager.removeGroup(this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tif(el.parentNode){\r\n\t\t\t\tel.parentNode.removeChild(el);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.generateGroupHeaderContents();\r\n\t\t\t\r\n\t\t\tif(this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\t\tthis.groupManager.table.modules.columnCalcs.recalcGroup(this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveGroup(group){\r\n\t\tvar groupKey = group.level + \"_\" + group.key,\r\n\t\tindex;\r\n\t\t\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tdelete this.groups[groupKey];\r\n\t\t\t\r\n\t\t\tindex = this.groupList.indexOf(group);\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.groupList.splice(index, 1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!this.groupList.length){\r\n\t\t\t\tif(this.parent){\r\n\t\t\t\t\tthis.parent.removeGroup(this);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.groupManager.removeGroup(this);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetHeadersAndRows(noCalc){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\toutput.push(this);\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(this.visible){\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\t\toutput = output.concat(group.getHeadersAndRows(noCalc));\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tif(!noCalc && this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\r\n\t\t\t\t\tif(this.calcs.top){\r\n\t\t\t\t\t\tthis.calcs.top.detachElement();\r\n\t\t\t\t\t\tthis.calcs.top.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows);\r\n\t\t\t\t\toutput.push(this.calcs.top);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\toutput = output.concat(this.rows);\r\n\t\t\t\t\r\n\t\t\t\tif(!noCalc && this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\r\n\t\t\t\t\tif(this.calcs.bottom){\r\n\t\t\t\t\t\tthis.calcs.bottom.detachElement();\r\n\t\t\t\t\t\tthis.calcs.bottom.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows);\r\n\t\t\t\t\toutput.push(this.calcs.bottom);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!this.groupList.length && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\t\t\r\n\t\t\t\tif(this.groupManager.table.modExists(\"columnCalcs\")){\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!noCalc && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\r\n\t\t\t\t\t\tif(this.calcs.top){\r\n\t\t\t\t\t\t\tthis.calcs.top.detachElement();\r\n\t\t\t\t\t\t\tthis.calcs.top.deleteCells();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.groupManager.table.options.groupClosedShowCalcs){\r\n\t\t\t\t\t\t\tthis.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows);\r\n\t\t\t\t\t\t\toutput.push(this.calcs.top);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!noCalc && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\r\n\t\t\t\t\t\tif(this.calcs.bottom){\r\n\t\t\t\t\t\t\tthis.calcs.bottom.detachElement();\r\n\t\t\t\t\t\t\tthis.calcs.bottom.deleteCells();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.groupManager.table.options.groupClosedShowCalcs){\r\n\t\t\t\t\t\t\tthis.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows);\r\n\t\t\t\t\t\t\toutput.push(this.calcs.bottom);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetData(visible, transform){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(!visible || (visible && this.visible)){\r\n\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\toutput.push(row.getData(transform || \"data\"));\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetRowCount(){\r\n\t\tvar count = 0;\r\n\t\t\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\tcount += group.getRowCount();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tcount = this.rows.length;\r\n\t\t}\r\n\t\treturn count;\r\n\t}\r\n\t\r\n\ttoggleVisibility(){\r\n\t\tif(this.visible){\r\n\t\t\tthis.hide();\r\n\t\t}else{\r\n\t\t\tthis.show();\r\n\t\t}\r\n\t}\r\n\t\r\n\thide(){\r\n\t\tthis.visible = false;\r\n\t\t\r\n\t\tif(this.groupManager.table.rowManager.getRenderMode() == \"classic\" && !this.groupManager.table.options.pagination){\r\n\t\t\t\r\n\t\t\tthis.element.classList.remove(\"tabulator-group-visible\");\r\n\t\t\t\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar rows = group.getHeadersAndRows();\r\n\t\t\t\t\t\r\n\t\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\t\trow.detachElement();\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex());\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth();\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.table.externalEvents.dispatch(\"groupVisibilityChanged\", this.getComponent(), false);\r\n\t}\r\n\t\r\n\tshow(){\r\n\t\tthis.visible = true;\r\n\t\t\r\n\t\tif(this.groupManager.table.rowManager.getRenderMode() == \"classic\" && !this.groupManager.table.options.pagination){\r\n\t\t\t\r\n\t\t\tthis.element.classList.add(\"tabulator-group-visible\");\r\n\t\t\t\r\n\t\t\tvar prev = this.generateElement();\r\n\t\t\t\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\t\tvar rows = group.getHeadersAndRows();\r\n\t\t\t\t\t\r\n\t\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\t\tprev.parentNode.insertBefore(rowEl, prev.nextSibling);\r\n\t\t\t\t\t\trow.initialize();\r\n\t\t\t\t\t\tprev = rowEl;\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\tprev.parentNode.insertBefore(rowEl, prev.nextSibling);\r\n\t\t\t\t\trow.initialize();\r\n\t\t\t\t\tprev = rowEl;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex());\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth();\r\n\t\t}else{\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.table.externalEvents.dispatch(\"groupVisibilityChanged\", this.getComponent(), true);\r\n\t}\r\n\t\r\n\t_visSet(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tif(typeof this.visible == \"function\"){\r\n\t\t\t\r\n\t\t\tthis.rows.forEach(function(row){\r\n\t\t\t\tdata.push(row.getData());\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.visible = this.visible(this.key, this.getRowCount(), data, this.getComponent());\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRowGroup(row){\r\n\t\tvar match = false;\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\tvar result = group.getRowGroup(row);\r\n\t\t\t\t\r\n\t\t\t\tif(result){\r\n\t\t\t\t\tmatch = result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tif(this.rows.find(function(item){\r\n\t\t\t\treturn item === row;\r\n\t\t\t})){\r\n\t\t\t\tmatch = this;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn match;\r\n\t}\r\n\t\r\n\tgetSubGroups(component){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.groupList.forEach(function(child){\r\n\t\t\toutput.push(component ? child.getComponent() : child);\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetRows(compoment){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\toutput.push(compoment ? row.getComponent() : row);\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgenerateGroupHeaderContents(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\tdata.push(row.getData());\r\n\t\t});\r\n\t\t\r\n\t\tthis.elementContents = this.generator(this.key, this.getRowCount(), data, this.getComponent());\r\n\t\t\r\n\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\t\t\r\n\t\tif(typeof this.elementContents === \"string\"){\r\n\t\t\tthis.element.innerHTML = this.elementContents;\r\n\t\t}else{\r\n\t\t\tthis.element.appendChild(this.elementContents);\r\n\t\t}\r\n\t\t\r\n\t\tthis.element.insertBefore(this.arrowElement, this.element.firstChild);\r\n\t}\r\n\t\r\n\tgetPath(path = []) {\r\n\t\tpath.unshift(this.key);\r\n\t\tif(this.parent) {\r\n\t\t\tthis.parent.getPath(path);\r\n\t\t}\r\n\t\treturn path;\r\n\t}\r\n\t\r\n\t////////////// Standard Row Functions //////////////\r\n\t\r\n\tgetElement(){\r\n\t\treturn this.elementContents ? this.element : this.generateElement();\r\n\t}\r\n\t\r\n\tgenerateElement(){\r\n\t\tthis.addBindings = false;\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(this.visible){\r\n\t\t\tthis.element.classList.add(\"tabulator-group-visible\");\r\n\t\t}else{\r\n\t\t\tthis.element.classList.remove(\"tabulator-group-visible\");\r\n\t\t}\r\n\t\t\r\n\t\tfor(var i = 0; i < this.element.childNodes.length; ++i){\r\n\t\t\tthis.element.childNodes[i].parentNode.removeChild(this.element.childNodes[i]);\r\n\t\t}\r\n\t\t\r\n\t\tthis.generateGroupHeaderContents();\r\n\t\t\r\n\t\t// this.addBindings();\r\n\t\t\r\n\t\treturn this.element;\r\n\t}\r\n\t\r\n\tdetachElement(){\r\n\t\tif (this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\t//normalize the height of elements in the row\r\n\tnormalizeHeight(){\r\n\t\tthis.setHeight(this.element.clientHeight);\r\n\t}\r\n\t\r\n\tinitialize(force){\r\n\t\tif(!this.initialized || force){\r\n\t\t\tthis.normalizeHeight();\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitialize(){\r\n\t\tthis.initialized = false;\r\n\t\tthis.height = 0;\r\n\t\t\r\n\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\tthis.initialize(true);\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetHeight(height){\r\n\t\tif(this.height != height){\r\n\t\t\tthis.height = height;\r\n\t\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return rows outer height\r\n\tgetHeight(){\r\n\t\treturn this.outerHeight;\r\n\t}\r\n\t\r\n\tgetGroup(){\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\treinitializeHeight(){}\r\n\t\r\n\tcalcHeight(){}\r\n\t\r\n\tsetCellHeight(){}\r\n\t\r\n\tclearCellHeight(){}\r\n\t\r\n\tdeinitializeHeight(){}\r\n\t\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new GroupComponent(this);\r\n\t\t}\r\n\t\t\r\n\t\treturn this.component;\r\n\t}\r\n}\r\n\r\nexport default Group;","import Module from '../../core/Module.js';\r\n\r\nimport GroupComponent from './GroupComponent.js';\r\nimport Group from './Group.js';\r\n\r\nclass GroupRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.groupIDLookups = false; //enable table grouping and set field to group by\r\n\t\tthis.startOpen = [function(){return false;}]; //starting state of group\r\n\t\tthis.headerGenerator = [function(){return \"\";}];\r\n\t\tthis.groupList = []; //ordered list of groups\r\n\t\tthis.allowedValues = false;\r\n\t\tthis.groups = {}; //hold row groups\r\n\t\tthis.displayIndex = 0; //index in display pipeline\r\n\r\n\t\tthis.displayHandler = this.getRows.bind(this);\r\n\r\n\t\t//register table options\r\n\t\tthis.registerTableOption(\"groupBy\", false); //enable table grouping and set field to group by\r\n\t\tthis.registerTableOption(\"groupStartOpen\", true); //starting state of group\r\n\t\tthis.registerTableOption(\"groupValues\", false);\r\n\t\tthis.registerTableOption(\"groupUpdateOnCellEdit\", false);\r\n\t\tthis.registerTableOption(\"groupHeader\", false); //header generation function\r\n\t\tthis.registerTableOption(\"groupHeaderPrint\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderClipboard\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderHtmlOutput\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderDownload\", null);\r\n\t\tthis.registerTableOption(\"groupToggleElement\", \"arrow\");\r\n\t\tthis.registerTableOption(\"groupClosedShowCalcs\", false);\r\n\r\n\t\t//register table functions\r\n\t\tthis.registerTableFunction(\"setGroupBy\", this.setGroupBy.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupValues\", this.setGroupValues.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupStartOpen\", this.setGroupStartOpen.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupHeader\", this.setGroupHeader.bind(this));\r\n\t\tthis.registerTableFunction(\"getGroups\", this.userGetGroups.bind(this));\r\n\t\tthis.registerTableFunction(\"getGroupedData\", this.userGetGroupedData.bind(this));\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"getGroup\", this.rowGetGroup.bind(this));\r\n\t}\r\n\r\n\t//initialize group configuration\r\n\tinitialize(){\r\n\t\tif(this.table.options.groupBy){\r\n\r\n\t\t\tif(this.table.options.groupUpdateOnCellEdit){\r\n\t\t\t\tthis.subscribe(\"cell-value-updated\", this.cellUpdated.bind(this));\r\n\t\t\t\tthis.subscribe(\"row-data-changed\", this.reassignRowToGroup.bind(this), 0);\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-built\", this.configureGroupSetup.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"row-deleting\", this.rowDeleting.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHeaders.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.wipe.bind(this));\r\n\t\t\tthis.subscribe(\"rows-added\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"row-moving\", this.rowMoving.bind(this));\r\n\t\t\tthis.subscribe(\"row-adding-index\", this.rowAddingIndex.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"rows-sample\", this.rowSample.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"render-virtual-fill\", this.virtualRenderFill.bind(this));\r\n\r\n\t\t\tthis.registerDisplayHandler(this.displayHandler, 20);\r\n\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tconfigureGroupSetup(){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tvar groupBy = this.table.options.groupBy,\r\n\t\t\tstartOpen = this.table.options.groupStartOpen,\r\n\t\t\tgroupHeader = this.table.options.groupHeader;\r\n\r\n\t\t\tthis.allowedValues = this.table.options.groupValues;\r\n\r\n\t\t\tif(Array.isArray(groupBy) && Array.isArray(groupHeader) && groupBy.length > groupHeader.length){\r\n\t\t\t\tconsole.warn(\"Error creating group headers, groupHeader array is shorter than groupBy array\");\r\n\t\t\t}\r\n\r\n\t\t\tthis.headerGenerator = [function(){return \"\";}];\r\n\t\t\tthis.startOpen = [function(){return false;}]; //starting state of group\r\n\r\n\t\t\tthis.langBind(\"groups|item\", (langValue, lang) => {\r\n\t\t\t\tthis.headerGenerator[0] = (value, count, data) => { //header layout function\r\n\t\t\t\t\treturn (typeof value === \"undefined\" ? \"\" : value) + \"(\" + count + \" \" + ((count === 1) ? langValue : lang.groups.items) + \")\";\r\n\t\t\t\t};\r\n\t\t\t});\r\n\r\n\t\t\tthis.groupIDLookups = [];\r\n\r\n\t\t\tif(Array.isArray(groupBy) || groupBy){\r\n\t\t\t\tif(this.table.modExists(\"columnCalcs\") && this.table.options.columnCalcs != \"table\" && this.table.options.columnCalcs != \"both\"){\r\n\t\t\t\t\tthis.table.modules.columnCalcs.removeCalcs();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.modExists(\"columnCalcs\") && this.table.options.columnCalcs != \"group\"){\r\n\r\n\t\t\t\t\tvar cols = this.table.columnManager.getRealColumns();\r\n\r\n\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\tif(col.definition.topCalc){\r\n\t\t\t\t\t\t\tthis.table.modules.columnCalcs.initializeTopRow();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(col.definition.bottomCalc){\r\n\t\t\t\t\t\t\tthis.table.modules.columnCalcs.initializeBottomRow();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(!Array.isArray(groupBy)){\r\n\t\t\t\tgroupBy = [groupBy];\r\n\t\t\t}\r\n\r\n\t\t\tgroupBy.forEach((group, i) => {\r\n\t\t\t\tvar lookupFunc, column;\r\n\r\n\t\t\t\tif(typeof group == \"function\"){\r\n\t\t\t\t\tlookupFunc = group;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolumn = this.table.columnManager.getColumnByField(group);\r\n\r\n\t\t\t\t\tif(column){\r\n\t\t\t\t\t\tlookupFunc = function(data){\r\n\t\t\t\t\t\t\treturn column.getFieldValue(data);\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tlookupFunc = function(data){\r\n\t\t\t\t\t\t\treturn data[group];\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.groupIDLookups.push({\r\n\t\t\t\t\tfield: typeof group === \"function\" ? false : group,\r\n\t\t\t\t\tfunc:lookupFunc,\r\n\t\t\t\t\tvalues:this.allowedValues ? this.allowedValues[i] : false,\r\n\t\t\t\t});\r\n\t\t\t});\r\n\r\n\t\t\tif(startOpen){\r\n\t\t\t\tif(!Array.isArray(startOpen)){\r\n\t\t\t\t\tstartOpen = [startOpen];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstartOpen.forEach((level) => {\r\n\t\t\t\t\tlevel = typeof level == \"function\" ? level : function(){return true;};\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.startOpen = startOpen;\r\n\t\t\t}\r\n\r\n\t\t\tif(groupHeader){\r\n\t\t\t\tthis.headerGenerator = Array.isArray(groupHeader) ? groupHeader : [groupHeader];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trowSample(rows, prevValue){\r\n\t\tvar group = this.getGroups(false)[0];\r\n\r\n\t\tprevValue.push(group.getRows(false)[0]);\r\n\r\n\t\treturn prevValue;\r\n\t}\r\n\r\n\tvirtualRenderFill(){\r\n\t\tvar el = this.table.rowManager.tableElement;\r\n\t\tvar rows = this.table.rowManager.getVisibleRows();\r\n\r\n\t\trows = rows.filter((row) => {\r\n\t\t\treturn row.type !== \"group\";\r\n\t\t});\r\n\r\n\t\tel.style.minWidth = !rows.length ? this.table.columnManager.getWidth() + \"px\" : \"\";\r\n\r\n\t\t// if(this.table.options.groupBy){\r\n\t\t// \tif(this.layoutMode() != \"fitDataFill\" && rowsCount == this.table.modules.groupRows.countGroups()){\r\n\t\t// \t\tel.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t// \t}\r\n\t\t// }\r\n\t}\r\n\r\n\trowAddingIndex(row, index, top){\r\n\t\tthis.assignRowToGroup(row);\r\n\r\n\t\tvar groupRows = row.modules.group.rows;\r\n\r\n\t\tif(groupRows.length > 1){\r\n\t\t\tif(!index || (index && groupRows.indexOf(index) == -1)){\r\n\t\t\t\tif(top){\r\n\t\t\t\t\tif(groupRows[0] !== row){\r\n\t\t\t\t\t\tindex = groupRows[0];\r\n\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(groupRows[groupRows.length -1] !== row){\r\n\t\t\t\t\t\tindex = groupRows[groupRows.length -1];\r\n\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn index;\r\n\t}\r\n\r\n\ttrackChanges(){\r\n\t\tthis.dispatch(\"group-changed\");\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tsetGroupBy(groups){\r\n\t\tthis.table.options.groupBy = groups;\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.initialize();\r\n\t\t}else{\r\n\t\t\tthis.configureGroupSetup();\r\n\t\t}\r\n\r\n\t\tthis.refreshData();\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\tsetGroupValues(groupValues){\r\n\t\tthis.table.options.groupValues = groupValues;\r\n\t\tthis.configureGroupSetup();\r\n\t\tthis.refreshData();\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\tsetGroupStartOpen(values){\r\n\t\tthis.table.options.groupStartOpen = values;\r\n\t\tthis.configureGroupSetup();\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\r\n\t\t\tthis.trackChanges();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Grouping Update - cant refresh view, no groups have been set\");\r\n\t\t}\r\n\t}\r\n\r\n\tsetGroupHeader(values){\r\n\t\tthis.table.options.groupHeader = values;\r\n\t\tthis.configureGroupSetup();\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\r\n\t\t\tthis.trackChanges();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Grouping Update - cant refresh view, no groups have been set\");\r\n\t\t}\r\n\t}\r\n\r\n\tuserGetGroups(values){\r\n\t\treturn this.getGroups(true);\r\n\t}\r\n\r\n\t// get grouped table data in the same format as getData()\r\n\tuserGetGroupedData(){\r\n\t\treturn this.table.options.groupBy ?\r\n\t\tthis.getGroupedData() : this.getData()\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////////\r\n\t///////// Component Functions /////////\r\n\t///////////////////////////////////////\r\n\r\n\trowGetGroup(row){\r\n\t\treturn row.modules.group ? row.modules.group.getComponent() : false;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\trowMoving(from, to, after){\r\n\t\tif(!after && to instanceof Group){\r\n\t\t\tto = this.table.rowManager.prevDisplayRow(from) || to;\r\n\t\t}\r\n\r\n\t\tvar toGroup = to instanceof Group ? to : to.modules.group;\r\n\t\tvar fromGroup = from instanceof Group ? from : from.modules.group;\r\n\r\n\t\tif(toGroup === fromGroup){\r\n\t\t\tthis.table.rowManager.moveRowInArray(toGroup.rows, from, to, after);\r\n\t\t}else{\r\n\t\t\tif(fromGroup){\r\n\t\t\t\tfromGroup.removeRow(from);\r\n\t\t\t}\r\n\r\n\t\t\ttoGroup.insertRow(from, to, after);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trowDeleting(row){\r\n\t\t//remove from group\r\n\t\tif(row.modules.group){\r\n\t\t\trow.modules.group.removeRow(row);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trowsUpdated(row){\r\n\t\tthis.updateGroupRows(true);\r\n\t}\r\n\r\n\tcellUpdated(cell){\r\n\t\tthis.reassignRowToGroup(cell.row);\r\n\t}\r\n\r\n\r\n\tsetDisplayIndex(index){\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\r\n\tgetDisplayIndex(){\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\r\n\t//return appropriate rows with group headers\r\n\tgetRows(rows){\r\n\t\tif(this.table.options.groupBy && this.groupIDLookups.length){\r\n\r\n\t\t\tthis.dispatchExternal(\"dataGrouping\");\r\n\r\n\t\t\tthis.generateGroups(rows);\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataGrouped\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataGrouped\", this.getGroups(true));\r\n\t\t\t}\r\n\r\n\t\t\treturn this.updateGroupRows();\r\n\r\n\t\t}else{\r\n\t\t\treturn rows.slice(0);\r\n\t\t}\r\n\t}\r\n\r\n\tgetGroups(component){\r\n\t\tvar groupComponents = [];\r\n\r\n\t\tthis.groupList.forEach(function(group){\r\n\t\t\tgroupComponents.push(component ? group.getComponent() : group);\r\n\t\t});\r\n\r\n\t\treturn groupComponents;\r\n\t}\r\n\r\n\tgetChildGroups(group){\r\n\t\tvar groupComponents = [];\r\n\r\n\t\tif(!group){\r\n\t\t\tgroup = this;\r\n\t\t}\r\n\r\n\t\tgroup.groupList.forEach((child) => {\r\n\t\t\tif(child.groupList.length){\r\n\t\t\t\tgroupComponents = groupComponents.concat(this.getChildGroups(child));\r\n\t\t\t}else{\r\n\t\t\t\tgroupComponents.push(child);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn groupComponents;\r\n\t}\r\n\r\n\twipe(){\r\n\t\tthis.groupList.forEach(function(group){\r\n\t\t\tgroup.wipe();\r\n\t\t});\r\n\t}\r\n\r\n\tpullGroupListData(groupList) {\r\n\t\tvar groupListData = [];\r\n\r\n\t\tgroupList.forEach((group) => {\r\n\t\t\tvar groupHeader = {};\r\n\t\t\tgroupHeader.level = 0;\r\n\t\t\tgroupHeader.rowCount = 0;\r\n\t\t\tgroupHeader.headerContent = \"\";\r\n\t\t\tvar childData = [];\r\n\r\n\t\t\tif (group.hasSubGroups) {\r\n\t\t\t\tchildData = this.pullGroupListData(group.groupList);\r\n\r\n\t\t\t\tgroupHeader.level = group.level;\r\n\t\t\t\tgroupHeader.rowCount = childData.length - group.groupList.length; // data length minus number of sub-headers\r\n\t\t\t\tgroupHeader.headerContent = group.generator(group.key, groupHeader.rowCount, group.rows, group);\r\n\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\t\t\t\tgroupListData = groupListData.concat(childData);\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tgroupHeader.level = group.level;\r\n\t\t\t\tgroupHeader.headerContent = group.generator(group.key, group.rows.length, group.rows, group);\r\n\t\t\t\tgroupHeader.rowCount = group.getRows().length;\r\n\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\r\n\t\t\t\tgroup.getRows().forEach((row) => {\r\n\t\t\t\t\tgroupListData.push(row.getData(\"data\"));\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn groupListData\r\n\t}\r\n\r\n\tgetGroupedData(){\r\n\r\n\t\treturn this.pullGroupListData(this.groupList);\r\n\t}\r\n\r\n\tgetRowGroup(row){\r\n\t\tvar match = false;\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\tvar result = group.getRowGroup(row);\r\n\r\n\t\t\tif(result){\r\n\t\t\t\tmatch = result;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tcountGroups(){\r\n\t\treturn this.groupList.length;\r\n\t}\r\n\r\n\tgenerateGroups(rows){\r\n\t\tvar oldGroups = this.groups;\r\n\r\n\t\tthis.groups = {};\r\n\t\tthis.groupList = [];\r\n\r\n\t\tif(this.allowedValues && this.allowedValues[0]){\r\n\t\t\tthis.allowedValues[0].forEach((value) => {\r\n\t\t\t\tthis.createGroup(value, 0, oldGroups);\r\n\t\t\t});\r\n\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tthis.assignRowToExistingGroup(row, oldGroups);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tthis.assignRowToGroup(row, oldGroups);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tcreateGroup(groupID, level, oldGroups){\r\n\t\tvar groupKey = level + \"_\" + groupID,\r\n\t\tgroup;\r\n\r\n\t\toldGroups = oldGroups || [];\r\n\r\n\t\tgroup = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]);\r\n\r\n\t\tthis.groups[groupKey] = group;\r\n\t\tthis.groupList.push(group);\r\n\t}\r\n\r\n\tassignRowToExistingGroup(row, oldGroups){\r\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\r\n\t\tgroupKey = \"0_\" + groupID;\r\n\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t}\r\n\t}\r\n\r\n\tassignRowToGroup(row, oldGroups){\r\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\r\n\t\tnewGroupNeeded = !this.groups[\"0_\" + groupID];\r\n\r\n\t\tif(newGroupNeeded){\r\n\t\t\tthis.createGroup(groupID, 0, oldGroups);\r\n\t\t}\r\n\r\n\t\tthis.groups[\"0_\" + groupID].addRow(row);\r\n\r\n\t\treturn !newGroupNeeded;\r\n\t}\r\n\r\n\treassignRowToGroup(row){\r\n\t\tif(row.type === \"row\"){\r\n\t\t\tvar oldRowGroup = row.modules.group,\r\n\t\t\toldGroupPath = oldRowGroup.getPath(),\r\n\t\t\tnewGroupPath = this.getExpectedPath(row),\r\n\t\t\tsamePath = true;\r\n\r\n\t\t\t// figure out if new group path is the same as old group path\r\n\t\t\tvar samePath = (oldGroupPath.length == newGroupPath.length) && oldGroupPath.every((element, index) => {\r\n\t\t\t\treturn element === newGroupPath[index];\r\n\t\t\t});\r\n\r\n\t\t\t// refresh if they new path and old path aren't the same (aka the row's groupings have changed)\r\n\t\t\tif(!samePath) {\r\n\t\t\t\toldRowGroup.removeRow(row);\r\n\t\t\t\tthis.assignRowToGroup(row, this.groups);\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgetExpectedPath(row) {\r\n\t\tvar groupPath = [], rowData = row.getData();\r\n\r\n\t\tthis.groupIDLookups.forEach((groupId) => {\r\n\t\t\tgroupPath.push(groupId.func(rowData));\r\n\t\t});\r\n\r\n\t\treturn groupPath;\r\n\t}\r\n\r\n\tupdateGroupRows(force){\r\n\t\tvar output = [],\r\n\t\toldRowCount;\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\toutput = output.concat(group.getHeadersAndRows());\r\n\t\t});\r\n\r\n\t\tif(force){\r\n\t\t\tthis.refreshData(true, this.displayHandler);\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tscrollHeaders(left){\r\n\t\tif(this.table.options.renderHorizontal === \"virtual\"){\r\n\t\t\tleft -= this.table.columnManager.renderer.vDomPadLeft;\r\n\t\t}\r\n\r\n\t\tleft = left + \"px\";\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\tgroup.scrollHeader(left);\r\n\t\t});\r\n\t}\r\n\r\n\tremoveGroup(group){\r\n\t\tvar groupKey = group.level + \"_\" + group.key,\r\n\t\tindex;\r\n\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tdelete this.groups[groupKey];\r\n\r\n\t\t\tindex = this.groupList.indexOf(group);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.groupList.splice(index, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nGroupRows.moduleName = \"groupRows\";\r\n\r\nexport default GroupRows;","import Module from '../../core/Module.js';\r\nimport Row from '../../core/row/Row.js';\r\nimport Cell from '../../core/cell/Cell.js';\r\n\r\nimport defaultUndoers from './defaults/undoers.js';\r\nimport defaultRedoers from './defaults/redoers.js';\r\n\r\nclass History extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.history = [];\r\n\t\tthis.index = -1;\r\n\r\n\t\tthis.registerTableOption(\"history\", false); //enable edit history\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.history){\r\n\t\t\tthis.subscribe(\"cell-value-updated\", this.cellUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"cell-delete\", this.clearComponentHistory.bind(this));\r\n\t\t\tthis.subscribe(\"row-delete\", this.rowDeleted.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.clear.bind(this));\r\n\t\t\tthis.subscribe(\"row-added\", this.rowAdded.bind(this));\r\n\t\t\tthis.subscribe(\"row-move\", this.rowMoved.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"undo\", this.undo.bind(this));\r\n\t\tthis.registerTableFunction(\"redo\", this.redo.bind(this));\r\n\t\tthis.registerTableFunction(\"getHistoryUndoSize\", this.getHistoryUndoSize.bind(this));\r\n\t\tthis.registerTableFunction(\"getHistoryRedoSize\", this.getHistoryRedoSize.bind(this));\r\n\t\tthis.registerTableFunction(\"clearHistory\", this.clear.bind(this));\r\n\t}\r\n\r\n\trowMoved(from, to, after){\r\n\t\tthis.action(\"rowMove\", from, {posFrom:this.table.rowManager.getRowPosition(from), posTo:this.table.rowManager.getRowPosition(to), to:to, after:after});\r\n\t}\r\n\r\n\trowAdded(row, data, pos, index){\r\n\t\tthis.action(\"rowAdd\", row, {data:data, pos:pos, index:index});\r\n\t}\r\n\r\n\trowDeleted(row){\r\n\t\tvar index, rows;\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\r\n\t\t\trows = row.getComponent().getGroup().rows\r\n\t\t\tindex = rows.indexOf(row);\r\n\r\n\t\t\tif(index){\r\n\t\t\t\tindex = rows[index-1];\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tindex = row.table.rowManager.getRowIndex(row);\r\n\r\n\t\t\tif(index){\r\n\t\t\t\tindex = row.table.rowManager.rows[index-1];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.action(\"rowDelete\", row, {data:row.getData(), pos:!index, index:index});\r\n\t}\r\n\r\n\tcellUpdated(cell){\r\n\t\tthis.action(\"cellEdit\", cell, {oldValue:cell.oldValue, newValue:cell.value});\r\n\t}\r\n\r\n\tclear(){\r\n\t\tthis.history = [];\r\n\t\tthis.index = -1;\r\n\t}\r\n\r\n\taction(type, component, data){\r\n\t\tthis.history = this.history.slice(0, this.index + 1);\r\n\r\n\t\tthis.history.push({\r\n\t\t\ttype:type,\r\n\t\t\tcomponent:component,\r\n\t\t\tdata:data,\r\n\t\t});\r\n\r\n\t\tthis.index ++;\r\n\t}\r\n\r\n\tgetHistoryUndoSize(){\r\n\t\treturn this.index + 1;\r\n\t}\r\n\r\n\tgetHistoryRedoSize(){\r\n\t\treturn this.history.length - (this.index + 1);\r\n\t}\r\n\r\n\tclearComponentHistory(component){\r\n\t\tvar index = this.history.findIndex(function(item){\r\n\t\t\treturn item.component === component;\r\n\t\t});\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.history.splice(index, 1);\r\n\t\t\tif(index <= this.index){\r\n\t\t\t\tthis.index--;\r\n\t\t\t}\r\n\r\n\t\t\tthis.clearComponentHistory(component);\r\n\t\t}\r\n\t}\r\n\r\n\tundo(){\r\n\t\tif(this.index > -1){\r\n\t\t\tlet action = this.history[this.index];\r\n\r\n\t\t\tHistory.undoers[action.type].call(this, action);\r\n\r\n\t\t\tthis.index--;\r\n\r\n\t\t\tthis.dispatchExternal(\"historyUndo\", action.type, action.component.getComponent(), action.data);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"History Undo Error - No more history to undo\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tredo(){\r\n\t\tif(this.history.length-1 > this.index){\r\n\r\n\t\t\tthis.index++;\r\n\r\n\t\t\tlet action = this.history[this.index];\r\n\r\n\t\t\tHistory.redoers[action.type].call(this, action);\r\n\r\n\t\t\tthis.dispatchExternal(\"historyRedo\", action.type, action.component.getComponent(), action.data);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"History Redo Error - No more history to redo\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//rebind rows to new element after deletion\r\n\t_rebindRow(oldRow, newRow){\r\n\t\tthis.history.forEach(function(action){\r\n\t\t\tif(action.component instanceof Row){\r\n\t\t\t\tif(action.component === oldRow){\r\n\t\t\t\t\taction.component = newRow;\r\n\t\t\t\t}\r\n\t\t\t}else if(action.component instanceof Cell){\r\n\t\t\t\tif(action.component.row === oldRow){\r\n\t\t\t\t\tvar field = action.component.column.getField();\r\n\r\n\t\t\t\t\tif(field){\r\n\t\t\t\t\t\taction.component = newRow.getCell(field);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}\r\n\r\nHistory.moduleName = \"history\";\r\n\r\n//load defaults\r\nHistory.undoers = defaultUndoers;\r\nHistory.redoers = defaultRedoers;\r\n\r\nexport default History;","export default {\r\n\tcellEdit: function(action){\r\n\t\taction.component.setValueProcessData(action.data.oldValue);\r\n\t\taction.component.cellRendered();\r\n\t},\r\n\r\n\trowAdd: function(action){\r\n\t\taction.component.deleteActual();\r\n\t},\r\n\r\n\trowDelete: function(action){\r\n\t\tvar newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index);\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tthis.table.modules.groupRows.updateGroupRows(true);\r\n\t\t}\r\n\r\n\t\tthis._rebindRow(action.component, newRow);\r\n\t},\r\n\r\n\trowMove: function(action){\r\n\t\tthis.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posFrom], !action.data.after);\r\n\t\tthis.table.rowManager.redraw();\r\n\t},\r\n};","export default {\r\n\tcellEdit: function(action){\r\n\t\taction.component.setValueProcessData(action.data.newValue);\r\n\t\taction.component.cellRendered();\r\n\t},\r\n\r\n\trowAdd: function(action){\r\n\t\tvar newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index);\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tthis.table.modules.groupRows.updateGroupRows(true);\r\n\t\t}\r\n\r\n\t\tthis._rebindRow(action.component, newRow);\r\n\t},\r\n\r\n\trowDelete:function(action){\r\n\t\taction.component.deleteActual();\r\n\t},\r\n\r\n\trowMove: function(action){\r\n\t\tthis.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posTo], action.data.after);\r\n\t\tthis.table.rowManager.redraw();\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\nimport Column from '../../core/column/Column.js';\r\n\r\nclass HtmlTableImport extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.fieldIndex = [];\r\n\t\tthis.hasIndex = false;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.tableElementCheck();\r\n\t}\r\n\r\n\ttableElementCheck(){\r\n\t\tif(this.table.originalElement && this.table.originalElement.tagName === \"TABLE\"){\r\n\t\t\tthis.parseTable();\r\n\t\t}\r\n\t}\r\n\r\n\tparseTable(){\r\n\t\tvar element = this.table.originalElement,\r\n\t\toptions = this.table.options,\r\n\t\tcolumns = options.columns,\r\n\t\theaders = element.getElementsByTagName(\"th\"),\r\n\t\trows = element.getElementsByTagName(\"tbody\")[0],\r\n\t\tdata = [],\r\n\t\tnewTable;\r\n\r\n\t\tthis.hasIndex = false;\r\n\r\n\t\tthis.dispatchExternal(\"htmlImporting\");\r\n\r\n\t\trows = rows ? rows.getElementsByTagName(\"tr\") : [];\r\n\r\n\t\t//check for Tabulator inline options\r\n\t\tthis._extractOptions(element, options);\r\n\r\n\t\tif(headers.length){\r\n\t\t\tthis._extractHeaders(headers, rows);\r\n\t\t}else{\r\n\t\t\tthis._generateBlankHeaders(headers, rows);\r\n\t\t}\r\n\r\n\t\t//iterate through table rows and build data set\r\n\t\tfor(var index = 0; index < rows.length; index++){\r\n\t\t\tvar row = rows[index],\r\n\t\t\tcells = row.getElementsByTagName(\"td\"),\r\n\t\t\titem = {};\r\n\r\n\t\t\t//create index if the dont exist in table\r\n\t\t\tif(!this.hasIndex){\r\n\t\t\t\titem[options.index] = index;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\tvar cell = cells[i];\r\n\t\t\t\tif(typeof this.fieldIndex[i] !== \"undefined\"){\r\n\t\t\t\t\titem[this.fieldIndex[i]] = cell.innerHTML;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//add row data to item\r\n\t\t\tdata.push(item);\r\n\t\t}\r\n\r\n\t\toptions.data = data;\r\n\r\n\t\tthis.dispatchExternal(\"htmlImported\");\r\n\t}\r\n\r\n\t//extract tabulator attribute options\r\n\t_extractOptions(element, options, defaultOptions){\r\n\t\tvar attributes = element.attributes;\r\n\t\tvar optionsArr = defaultOptions ? Object.keys(defaultOptions) : Object.keys(options);\r\n\t\tvar optionsList = {};\r\n\r\n\t\toptionsArr.forEach((item) => {\r\n\t\t\toptionsList[item.toLowerCase()] = item;\r\n\t\t});\r\n\r\n\t\tfor(var index in attributes){\r\n\t\t\tvar attrib = attributes[index];\r\n\t\t\tvar name;\r\n\r\n\t\t\tif(attrib && typeof attrib == \"object\" && attrib.name && attrib.name.indexOf(\"tabulator-\") === 0){\r\n\t\t\t\tname = attrib.name.replace(\"tabulator-\", \"\");\r\n\r\n\t\t\t\tif(typeof optionsList[name] !== \"undefined\"){\r\n\t\t\t\t\toptions[optionsList[name]] = this._attribValue(attrib.value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//get value of attribute\r\n\t_attribValue(value){\r\n\t\tif(value === \"true\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif(value === \"false\"){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\t//find column if it has already been defined\r\n\t_findCol(title){\r\n\t\tvar match = this.table.options.columns.find((column) => {\r\n\t\t\treturn column.title === title;\r\n\t\t});\r\n\r\n\t\treturn match || false;\r\n\t}\r\n\r\n\t//extract column from headers\r\n\t_extractHeaders(headers, rows){\r\n\t\tfor(var index = 0; index < headers.length; index++){\r\n\t\t\tvar header = headers[index],\r\n\t\t\texists = false,\r\n\t\t\tcol = this._findCol(header.textContent),\r\n\t\t\twidth, attributes;\r\n\r\n\t\t\tif(col){\r\n\t\t\t\texists = true;\r\n\t\t\t}else{\r\n\t\t\t\tcol = {title:header.textContent.trim()};\r\n\t\t\t}\r\n\r\n\t\t\tif(!col.field) {\r\n\t\t\t\tcol.field = header.textContent.trim().toLowerCase().replace(\" \", \"_\");\r\n\t\t\t}\r\n\r\n\t\t\twidth = header.getAttribute(\"width\");\r\n\r\n\t\t\tif(width && !col.width)\t{\r\n\t\t\t\tcol.width = width;\r\n\t\t\t}\r\n\r\n\t\t\t//check for Tabulator inline options\r\n\t\t\tthis._extractOptions(header, col, this.table.columnManager.optionsList.registeredDefaults);\r\n\r\n\t\t\tthis.fieldIndex[index] = col.field;\r\n\r\n\t\t\tif(col.field == this.table.options.index){\r\n\t\t\t\tthis.hasIndex = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(!exists){\r\n\t\t\t\tthis.table.options.columns.push(col);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\r\n\t//generate blank headers\r\n\t_generateBlankHeaders(headers, rows){\r\n\t\tfor(var index = 0; index < headers.length; index++){\r\n\t\t\tvar header = headers[index],\r\n\t\t\tcol = {title:\"\", field:\"col\" + index};\r\n\r\n\t\t\tthis.fieldIndex[index] = col.field;\r\n\r\n\t\t\tvar width = header.getAttribute(\"width\");\r\n\r\n\t\t\tif(width){\r\n\t\t\t\tcol.width = width;\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.options.columns.push(col);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nHtmlTableImport.moduleName = \"htmlTableImport\";\r\n\r\nexport default HtmlTableImport;","import csv from './importers/csv.js';\r\nimport json from './importers/json.js';\r\n\r\nexport default {\r\n\tcsv:csv,\r\n\tjson:json,\r\n};","function csvImporter(input){\r\n var data = [],\r\n row = 0, \r\n col = 0,\r\n inQuote = false;\r\n \r\n //Iterate over each character\r\n for (let index = 0; index < input.length; index++) {\r\n let char = input[index], \r\n nextChar = input[index+1]; \r\n \r\n //Initialize empty row\r\n if(!data[row]){\r\n data[row] = [];\r\n }\r\n\r\n //Initialize empty column\r\n if(!data[row][col]){\r\n data[row][col] = \"\";\r\n }\r\n \r\n //Handle quotation mark inside string\r\n if (char == '\"' && inQuote && nextChar == '\"') { \r\n data[row][col] += char; \r\n index++;\r\n continue; \r\n }\r\n \r\n //Begin / End Quote\r\n if (char == '\"') { \r\n inQuote = !inQuote;\r\n continue;\r\n }\r\n \r\n //Next column (if not in quote)\r\n if (char == ',' && !inQuote) { \r\n col++;\r\n continue; \r\n }\r\n \r\n //New row if new line and not in quote (CRLF) \r\n if (char == '\\r' && nextChar == '\\n' && !inQuote) { \r\n col = 0; \r\n row++; \r\n index++; \r\n continue; \r\n }\r\n \r\n //New row if new line and not in quote (CR or LF) \r\n if ((char == '\\r' || char == '\\n') && !inQuote) { \r\n col = 0;\r\n row++;\r\n continue; \r\n }\r\n\r\n //Normal Character, append to column\r\n data[row][col] += char;\r\n }\r\n\r\n return data;\r\n}\r\n\r\nexport default csvImporter;","export default function(input){\r\n try {\r\n return JSON.parse(input);\r\n } catch(e) {\r\n console.warn(\"JSON Import Error - File contents is invalid JSON\", e);\r\n return Promise.reject();\r\n }\r\n}","import Module from '../../core/Module.js';\r\n\r\nimport defaultImporters from './defaults/importers.js';\r\n\r\nclass Import extends Module{\r\n \r\n constructor(table){\r\n super(table);\r\n \r\n this.registerTableOption(\"importFormat\");\r\n this.registerTableOption(\"importReader\", \"text\");\r\n }\r\n \r\n initialize(){\r\n this.registerTableFunction(\"import\", this.importFromFile.bind(this));\r\n\r\n if(this.table.options.importFormat){\r\n this.subscribe(\"data-loading\", this.loadDataCheck.bind(this), 10);\r\n this.subscribe(\"data-load\", this.loadData.bind(this), 10);\r\n }\r\n }\r\n\r\n loadDataCheck(data){\r\n return typeof data === \"string\";\r\n }\r\n\r\n loadData(data, params, config, silent, previousData){\r\n return this.importData(this.lookupImporter(), data)\r\n .then(this.structureData.bind(this))\r\n .catch((err) => {\r\n console.error(\"Import Error:\", err || \"Unable to import data\")\r\n return Promise.reject(err);\r\n })\r\n }\r\n\r\n lookupImporter(importFormat){\r\n var importer;\r\n \r\n if(!importFormat){\r\n importFormat = this.table.options.importFormat;\r\n }\r\n \r\n if(typeof importFormat === \"string\"){\r\n importer = Import.importers[importFormat];\r\n }else{\r\n importer = importFormat;\r\n }\r\n\r\n if(!importer){\r\n console.error(\"Import Error - Importer not found:\", importFormat);\r\n }\r\n \r\n return importer;\r\n }\r\n \r\n importFromFile(importFormat, extension){\r\n var importer = this.lookupImporter(importFormat);\r\n \r\n if(importer){\r\n return this.pickFile(extension)\r\n .then(this.importData.bind(this, importer))\r\n .then(this.structureData.bind(this))\r\n .then(this.setData.bind(this))\r\n .catch((err) => {\r\n console.error(\"Import Error:\", err || \"Unable to import file\")\r\n return Promise.reject(err);\r\n })\r\n }\r\n }\r\n \r\n pickFile(extensions){\r\n return new Promise((resolve, reject) => {\r\n var input = document.createElement(\"input\");\r\n input.type = \"file\";\r\n input.accept = extensions;\r\n \r\n input.addEventListener(\"change\", (e) => {\r\n var file = input.files[0],\r\n reader = new FileReader(),\r\n data;\r\n \r\n switch(this.table.options.importReader){\r\n case \"buffer\":\r\n reader.readAsArrayBuffer(file);\r\n break;\r\n\r\n case \"binary\":\r\n reader.readAsBinaryString(file);\r\n break;\r\n\r\n case \"url\":\r\n reader.readAsDataURL(file);\r\n break;\r\n\r\n case \"text\":\r\n default:\r\n reader.readAsText(file);\r\n }\r\n \r\n reader.onload = (e) => {\r\n resolve(reader.result)\r\n };\r\n \r\n reader.onerror = (e) => {\r\n console.warn(\"File Load Error - Unable to read file\");\r\n reject();\r\n };\r\n });\r\n \r\n input.click();\r\n });\r\n }\r\n \r\n importData(importer, fileContents){\r\n var data = importer.call(this.table, fileContents);\r\n \r\n if(data instanceof Promise){\r\n return data;\r\n }else{\r\n return data ? Promise.resolve(data) : Promise.reject();\r\n }\r\n }\r\n\r\n structureData(parsedData){\r\n var data = [];\r\n \r\n if(Array.isArray(parsedData) && parsedData.length && Array.isArray(parsedData[0])){\r\n if(this.table.options.autoColumns){\r\n data = this.structureArrayToObject(parsedData);\r\n }else{\r\n data = this.structureArrayToColumns(parsedData);\r\n }\r\n\r\n return data;\r\n }else{\r\n return parsedData;\r\n }\r\n }\r\n\r\n structureArrayToObject(parsedData){\r\n var columns = parsedData.shift();\r\n\r\n var data = parsedData.map((values) => {\r\n var row = {};\r\n\r\n columns.forEach((key, i) => {\r\n row[key] = values[i];\r\n })\r\n\r\n return row;\r\n })\r\n\r\n return data;\r\n }\r\n\r\n structureArrayToColumns(parsedData){\r\n var data = [],\r\n columns = this.table.getColumns();\r\n\r\n //remove first row if it is the column names\r\n if(columns[0] && parsedData[0][0]){\r\n if(columns[0].getDefinition().title === parsedData[0][0]){\r\n parsedData.shift();\r\n }\r\n }\r\n \r\n //convert row arrays to objects\r\n parsedData.forEach((rowData) => {\r\n var row = {};\r\n\r\n rowData.forEach((value, index) => {\r\n var column = columns[index];\r\n\r\n if(column){\r\n row[column.getField()] = value;\r\n }\r\n })\r\n\r\n data.push(row);\r\n });\r\n\r\n return data;\r\n }\r\n \r\n setData(data){\r\n return this.table.setData(data);\r\n }\r\n}\r\n\r\nImport.moduleName = \"import\";\r\n\r\n//load defaults\r\nImport.importers = defaultImporters;\r\n\r\nexport default Import;","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport Cell from '../../core/cell/Cell';\r\nimport Column from '../../core/column/Column';\r\n\r\nclass Interaction extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.eventMap = {\r\n\t\t\t//row events\r\n\t\t\trowClick:\"row-click\",\r\n\t\t\trowDblClick:\"row-dblclick\",\r\n\t\t\trowContext:\"row-contextmenu\",\r\n\t\t\trowMouseEnter:\"row-mouseenter\",\r\n\t\t\trowMouseLeave:\"row-mouseleave\",\r\n\t\t\trowMouseOver:\"row-mouseover\",\r\n\t\t\trowMouseOut:\"row-mouseout\",\r\n\t\t\trowMouseMove:\"row-mousemove\",\r\n\t\t\trowTap:\"row\",\r\n\t\t\trowDblTap:\"row\",\r\n\t\t\trowTapHold:\"row\",\r\n\r\n\t\t\t//cell events\r\n\t\t\tcellClick:\"cell-click\",\r\n\t\t\tcellDblClick:\"cell-dblclick\",\r\n\t\t\tcellContext:\"cell-contextmenu\",\r\n\t\t\tcellMouseEnter:\"cell-mouseenter\",\r\n\t\t\tcellMouseLeave:\"cell-mouseleave\",\r\n\t\t\tcellMouseOver:\"cell-mouseover\",\r\n\t\t\tcellMouseOut:\"cell-mouseout\",\r\n\t\t\tcellMouseMove:\"cell-mousemove\",\r\n\t\t\tcellTap:\"cell\",\r\n\t\t\tcellDblTap:\"cell\",\r\n\t\t\tcellTapHold:\"cell\",\r\n\r\n\t\t\t//column header events\r\n\t\t\theaderClick:\"column-click\",\r\n\t\t\theaderDblClick:\"column-dblclick\",\r\n\t\t\theaderContext:\"column-contextmenu\",\r\n\t\t\theaderMouseEnter:\"column-mouseenter\",\r\n\t\t\theaderMouseLeave:\"column-mouseleave\",\r\n\t\t\theaderMouseOver:\"column-mouseover\",\r\n\t\t\theaderMouseOut:\"column-mouseout\",\r\n\t\t\theaderMouseMove:\"column-mousemove\",\r\n\t\t\theaderTap:\"column\",\r\n\t\t\theaderDblTap:\"column\",\r\n\t\t\theaderTapHold:\"column\",\r\n\r\n\t\t\t//group header\r\n\t\t\tgroupClick:\"group-click\",\r\n\t\t\tgroupDblClick:\"group-dblclick\",\r\n\t\t\tgroupContext:\"group-contextmenu\",\r\n\t\t\tgroupMouseEnter:\"group-mouseenter\",\r\n\t\t\tgroupMouseLeave:\"group-mouseleave\",\r\n\t\t\tgroupMouseOver:\"group-mouseover\",\r\n\t\t\tgroupMouseOut:\"group-mouseout\",\r\n\t\t\tgroupMouseMove:\"group-mousemove\",\r\n\t\t\tgroupTap:\"group\",\r\n\t\t\tgroupDblTap:\"group\",\r\n\t\t\tgroupTapHold:\"group\",\r\n\t\t}\r\n\r\n\t\tthis.subscribers = {};\r\n\r\n\t\tthis.touchSubscribers = {};\r\n\r\n\t\tthis.columnSubscribers = {};\r\n\r\n\t\tthis.touchWatchers = {\r\n\t\t\trow:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tcell:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tcolumn:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tgroup:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.registerColumnOption(\"headerClick\");\r\n\t\tthis.registerColumnOption(\"headerDblClick\");\r\n\t\tthis.registerColumnOption(\"headerContext\");\r\n\t\tthis.registerColumnOption(\"headerMouseEnter\");\r\n\t\tthis.registerColumnOption(\"headerMouseLeave\");\r\n\t\tthis.registerColumnOption(\"headerMouseOver\");\r\n\t\tthis.registerColumnOption(\"headerMouseOut\");\r\n\t\tthis.registerColumnOption(\"headerMouseMove\");\r\n\t\tthis.registerColumnOption(\"headerTap\");\r\n\t\tthis.registerColumnOption(\"headerDblTap\");\r\n\t\tthis.registerColumnOption(\"headerTapHold\");\r\n\r\n\t\tthis.registerColumnOption(\"cellClick\");\r\n\t\tthis.registerColumnOption(\"cellDblClick\");\r\n\t\tthis.registerColumnOption(\"cellContext\");\r\n\t\tthis.registerColumnOption(\"cellMouseEnter\");\r\n\t\tthis.registerColumnOption(\"cellMouseLeave\");\r\n\t\tthis.registerColumnOption(\"cellMouseOver\");\r\n\t\tthis.registerColumnOption(\"cellMouseOut\");\r\n\t\tthis.registerColumnOption(\"cellMouseMove\");\r\n\t\tthis.registerColumnOption(\"cellTap\");\r\n\t\tthis.registerColumnOption(\"cellDblTap\");\r\n\t\tthis.registerColumnOption(\"cellTapHold\");\r\n\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeExternalEvents();\r\n\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this))\r\n\t\tthis.subscribe(\"cell-dblclick\", this.cellContentsSelectionFixer.bind(this))\r\n\t}\r\n\r\n\tcellContentsSelectionFixer(e, cell){\r\n\t\tif(this.table.modExists(\"edit\")){\r\n\t\t\tif (this.table.modules.edit.currentCell === this){\r\n\t\t\t\treturn; //prevent instant selection of editor content\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\ttry{\r\n\t\t\tif (document.selection) { // IE\r\n\t\t\t\tvar range = document.body.createTextRange();\r\n\t\t\t\trange.moveToElementText(this.element);\r\n\t\t\t\trange.select();\r\n\t\t\t} else if (window.getSelection) {\r\n\t\t\t\tvar range = document.createRange();\r\n\t\t\t\trange.selectNode(this.element);\r\n\t\t\t\twindow.getSelection().removeAllRanges();\r\n\t\t\t\twindow.getSelection().addRange(range);\r\n\t\t\t}\r\n\t\t}catch(e){}\r\n\t}\r\n\r\n\tinitializeExternalEvents(){\r\n\t\tfor(let key in this.eventMap){\r\n\t\t\tthis.subscriptionChangeExternal(key, this.subscriptionChanged.bind(this, key))\r\n\t\t}\r\n\t}\r\n\r\n\tsubscriptionChanged(key, added){\r\n\t\tvar index;\r\n\r\n\t\tif(added){\r\n\t\t\tif(!this.subscribers[key]){\r\n\t\t\t\tif(this.eventMap[key].includes(\"-\")){\r\n\t\t\t\t\tthis.subscribers[key] = this.handle.bind(this, key);\r\n\t\t\t\t\tthis.subscribe(this.eventMap[key], this.subscribers[key]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.subscribeTouchEvents(key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.eventMap[key].includes(\"-\")){\r\n\t\t\t\tif(this.subscribers[key] && !this.columnSubscribers[key] && !this.subscribedExternal(key)){\r\n\t\t\t\t\tthis.unsubscribe(this.eventMap[key], this.subscribers[key]);\r\n\t\t\t\t\tdelete this.subscribers[key];\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.unsubscribeTouchEvents(key);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tsubscribeTouchEvents(key){\r\n\t\tvar type = this.eventMap[key];\r\n\r\n\t\tif(!this.touchSubscribers[type + \"-touchstart\"]){\r\n\t\t\tthis.touchSubscribers[type + \"-touchstart\"] = this.handleTouch.bind(this, type, \"start\");\r\n\t\t\tthis.touchSubscribers[type + \"-touchend\"] = this.handleTouch.bind(this, type, \"end\");\r\n\r\n\t\t\tthis.subscribe(type + \"-touchstart\", this.touchSubscribers[type + \"-touchstart\"]);\r\n\t\t\tthis.subscribe(type + \"-touchend\", this.touchSubscribers[type + \"-touchend\"]);\r\n\t\t}\r\n\r\n\t\tthis.subscribers[key] = true;\r\n\t}\r\n\r\n\tunsubscribeTouchEvents(key){\r\n\t\tvar notouch = true,\r\n\t\ttype = this.eventMap[key];\r\n\r\n\t\tif(this.subscribers[key] && !this.subscribedExternal(key)){\r\n\t\t\tdelete this.subscribers[key];\r\n\r\n\t\t\tfor(let i in this.eventMap){\r\n\t\t\t\tif(this.eventMap[i] === type){\r\n\t\t\t\t\tif(this.subscribers[i]){\r\n\t\t\t\t\t\tnotouch = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(notouch){\r\n\t\t\t\tthis.unsubscribe(type + \"-touchstart\", this.touchSubscribers[type + \"-touchstart\"]);\r\n\t\t\t\tthis.unsubscribe(type + \"-touchend\", this.touchSubscribers[type + \"-touchend\"]);\r\n\r\n\t\t\t\tdelete this.touchSubscribers[type + \"-touchstart\"];\r\n\t\t\t\tdelete this.touchSubscribers[type + \"-touchend\"];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition;\r\n\r\n\t\tfor(let key in this.eventMap){\r\n\t\t\tif(def[key]){\r\n\t\t\t\tthis.subscriptionChanged(key, true);\r\n\r\n\t\t\t\tif(!this.columnSubscribers[key]){\r\n\t\t\t\t\tthis.columnSubscribers[key] = [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.columnSubscribers[key].push(column);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\thandle(action, e, component){\r\n\t\tthis.dispatchEvent(action, e, component);\r\n\t}\r\n\r\n\thandleTouch(type, action, e, component){\r\n\t\tvar watchers = this.touchWatchers[type];\r\n\r\n\t\tif(type === \"column\"){\r\n\t\t\ttype = \"header\";\r\n\t\t}\r\n\r\n\t\tswitch(action){\r\n\t\t\tcase \"start\":\r\n\t\t\twatchers.tap = true;\r\n\r\n\t\t\tclearTimeout(watchers.tapHold);\r\n\r\n\t\t\twatchers.tapHold = setTimeout(() => {\r\n\t\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\t\twatchers.tapHold = null;\r\n\r\n\t\t\t\twatchers.tap = null;\r\n\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\tthis.dispatchEvent(type + \"TapHold\", e, component);\r\n\t\t\t}, 1000);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"end\":\r\n\t\t\tif(watchers.tap){\r\n\r\n\t\t\t\twatchers.tap = null;\r\n\t\t\t\tthis.dispatchEvent(type + \"Tap\", e, component);\r\n\t\t\t}\r\n\r\n\t\t\tif(watchers.tapDbl){\r\n\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\tthis.dispatchEvent(type + \"DblTap\", e, component);\r\n\t\t\t}else{\r\n\t\t\t\twatchers.tapDbl = setTimeout(() => {\r\n\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\twatchers.tapDbl = null;\r\n\t\t\t\t}, 300);\r\n\t\t\t}\r\n\r\n\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\twatchers.tapHold = null;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tdispatchEvent(action, e, component){\r\n\t\tvar componentObj = component.getComponent(),\r\n\t\tcallback;\r\n\r\n\t\tif(this.columnSubscribers[action]){\r\n\r\n\t\t\tif(component instanceof Cell){\r\n\t\t\t\tcallback = component.column.definition[action];\r\n\t\t\t}else if(component instanceof Column){\r\n\t\t\t\tcallback = component.definition[action];\r\n\t\t\t}\r\n\r\n\t\t\tif(callback){\r\n\t\t\t\tcallback(e, componentObj);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.dispatchExternal(action, e, componentObj);\r\n\t}\r\n}\r\n\r\nInteraction.moduleName = \"interaction\";\r\n\r\nexport default Interaction;","import Module from '../../core/Module.js';\r\n\r\nimport defaultBindings from './defaults/bindings.js';\r\nimport defaultActions from './defaults/actions.js';\r\n\r\nclass Keybindings extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.watchKeys = null;\r\n\t\tthis.pressedKeys = null;\r\n\t\tthis.keyupBinding = false;\r\n\t\tthis.keydownBinding = false;\r\n\r\n\t\tthis.registerTableOption(\"keybindings\", {}); //array for keybindings\r\n\t\tthis.registerTableOption(\"tabEndNewRow\", false); //create new row when tab to end of table\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tvar bindings = this.table.options.keybindings,\r\n\t\tmergedBindings = {};\r\n\r\n\t\tthis.watchKeys = {};\r\n\t\tthis.pressedKeys = [];\r\n\r\n\t\tif(bindings !== false){\r\n\t\t\tObject.assign(mergedBindings, Keybindings.bindings)\r\n\t\t\tObject.assign(mergedBindings, bindings)\r\n\r\n\t\t\tthis.mapBindings(mergedBindings);\r\n\t\t\tthis.bindEvents();\r\n\t\t}\r\n\r\n\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\r\n\t}\r\n\r\n\tmapBindings(bindings){\r\n\t\tfor(let key in bindings){\r\n\t\t\tif(Keybindings.actions[key]){\r\n\t\t\t\tif(bindings[key]){\r\n\t\t\t\t\tif(typeof bindings[key] !== \"object\"){\r\n\t\t\t\t\t\tbindings[key] = [bindings[key]];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbindings[key].forEach((binding) => {\r\n\t\t\t\t\t\tvar bindingList = Array.isArray(binding) ? binding : [binding];\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tbindingList.forEach((item) => {\r\n\t\t\t\t\t\t\tthis.mapBinding(key, item);\r\n\t\t\t\t\t\t});\t\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Key Binding Error - no such action:\", key);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmapBinding(action, symbolsList){\r\n\t\tvar binding = {\r\n\t\t\taction: Keybindings.actions[action],\r\n\t\t\tkeys: [],\r\n\t\t\tctrl: false,\r\n\t\t\tshift: false,\r\n\t\t\tmeta: false,\r\n\t\t};\r\n\r\n\t\tvar symbols = symbolsList.toString().toLowerCase().split(\" \").join(\"\").split(\"+\");\r\n\r\n\t\tsymbols.forEach((symbol) => {\r\n\t\t\tswitch(symbol){\r\n\t\t\t\tcase \"ctrl\":\r\n\t\t\t\tbinding.ctrl = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"shift\":\r\n\t\t\t\tbinding.shift = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"meta\":\r\n\t\t\t\tbinding.meta = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tsymbol = isNaN(symbol) ? symbol.toUpperCase().charCodeAt(0) : parseInt(symbol);\r\n\t\t\t\tbinding.keys.push(symbol);\r\n\r\n\t\t\t\tif(!this.watchKeys[symbol]){\r\n\t\t\t\t\tthis.watchKeys[symbol] = [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.watchKeys[symbol].push(binding);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tbindEvents(){\r\n\t\tvar self = this;\r\n\r\n\t\tthis.keyupBinding = function(e){\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tvar bindings = self.watchKeys[code];\r\n\r\n\t\t\tif(bindings){\r\n\r\n\t\t\t\tself.pressedKeys.push(code);\r\n\r\n\t\t\t\tbindings.forEach(function(binding){\r\n\t\t\t\t\tself.checkBinding(e, binding);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.keydownBinding = function(e){\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tvar bindings = self.watchKeys[code];\r\n\r\n\t\t\tif(bindings){\r\n\r\n\t\t\t\tvar index = self.pressedKeys.indexOf(code);\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tself.pressedKeys.splice(index, 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.table.element.addEventListener(\"keydown\", this.keyupBinding);\r\n\r\n\t\tthis.table.element.addEventListener(\"keyup\", this.keydownBinding);\r\n\t}\r\n\r\n\tclearBindings(){\r\n\t\tif(this.keyupBinding){\r\n\t\t\tthis.table.element.removeEventListener(\"keydown\", this.keyupBinding);\r\n\t\t}\r\n\r\n\t\tif(this.keydownBinding){\r\n\t\t\tthis.table.element.removeEventListener(\"keyup\", this.keydownBinding);\r\n\t\t}\r\n\t}\r\n\r\n\tcheckBinding(e, binding){\r\n\t\tvar match = true;\r\n\r\n\t\tif(e.ctrlKey == binding.ctrl && e.shiftKey == binding.shift && e.metaKey == binding.meta){\r\n\t\t\tbinding.keys.forEach((key) => {\r\n\t\t\t\tvar index = this.pressedKeys.indexOf(key);\r\n\r\n\t\t\t\tif(index == -1){\r\n\t\t\t\t\tmatch = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tbinding.action.call(this, e);\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nKeybindings.moduleName = \"keybindings\";\r\n\r\n//load defaults\r\nKeybindings.bindings = defaultBindings;\r\nKeybindings.actions = defaultActions;\r\n\r\nexport default Keybindings;","export default {\r\n\tnavPrev:\"shift + 9\",\r\n\tnavNext:9,\r\n\tnavUp:38,\r\n\tnavDown:40,\r\n\tscrollPageUp:33,\r\n\tscrollPageDown:34,\r\n\tscrollToStart:36,\r\n\tscrollToEnd:35,\r\n\tundo:[\"ctrl + 90\", \"meta + 90\"],\r\n\tredo:[\"ctrl + 89\", \"meta + 89\"],\r\n\tcopyToClipboard:[\"ctrl + 67\", \"meta + 89\"],\r\n};","export default {\r\n\tkeyBlock:function(e){\r\n\t\te.stopPropagation();\r\n\t\te.preventDefault();\r\n\t},\r\n\tscrollPageUp:function(e){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tnewPos = rowManager.scrollTop - rowManager.element.clientHeight,\r\n\t\tscrollMax = rowManager.element.scrollHeight;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\tif(newPos >= 0){\r\n\t\t\t\trowManager.element.scrollTop = newPos;\r\n\t\t\t}else{\r\n\t\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[0]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tscrollPageDown:function(e){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tnewPos = rowManager.scrollTop + rowManager.element.clientHeight,\r\n\t\tscrollMax = rowManager.element.scrollHeight;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\tif(newPos <= scrollMax){\r\n\t\t\t\trowManager.element.scrollTop = newPos;\r\n\t\t\t}else{\r\n\t\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\r\n\t},\r\n\tscrollToStart:function(e){\r\n\t\tvar rowManager = this.table.rowManager;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[0]);\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tscrollToEnd:function(e){\r\n\t\tvar rowManager = this.table.rowManager;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]);\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tnavPrev:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-prev\", e);\r\n\t},\r\n\r\n\tnavNext:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-next\", e);\r\n\t},\r\n\r\n\tnavLeft:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-left\", e);\r\n\t},\r\n\r\n\tnavRight:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-right\", e);\r\n\t},\r\n\r\n\tnavUp:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-up\", e);\r\n\t},\r\n\r\n\tnavDown:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-down\", e);\r\n\t},\r\n\r\n\tundo:function(e){\r\n\t\tvar cell = false;\r\n\t\tif(this.table.options.history && this.table.modExists(\"history\") && this.table.modExists(\"edit\")){\r\n\r\n\t\t\tcell = this.table.modules.edit.currentCell;\r\n\r\n\t\t\tif(!cell){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tthis.table.modules.history.undo();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tredo:function(e){\r\n\t\tvar cell = false;\r\n\t\tif(this.table.options.history && this.table.modExists(\"history\") && this.table.modExists(\"edit\")){\r\n\r\n\t\t\tcell = this.table.modules.edit.currentCell;\r\n\r\n\t\t\tif(!cell){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tthis.table.modules.history.redo();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tcopyToClipboard:function(e){\r\n\t\tif(!this.table.modules.edit.currentCell){\r\n\t\t\tif(this.table.modExists(\"clipboard\", true)){\r\n\t\t\t\tthis.table.modules.clipboard.copy(false, true);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass Menu extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.menuContainer = null;\r\n\t\tthis.menuElements = [];\r\n\t\tthis.blurEvent = this.hideMenu.bind(this);\r\n\t\tthis.escEvent = this.escMenu.bind(this);\r\n\t\tthis.nestedMenuBlock = false;\r\n\t\tthis.positionReversedX = false;\r\n\t\t\r\n\t\tthis.currentComponent = null;\r\n\t\t\r\n\t\tthis.columnSubscribers = {};\r\n\t\t\r\n\t\tthis.registerTableOption(\"rowContextMenu\", false);\r\n\t\tthis.registerTableOption(\"rowClickMenu\", false);\r\n\t\tthis.registerTableOption(\"groupContextMenu\", false);\r\n\t\tthis.registerTableOption(\"groupClickMenu\", false);\r\n\t\tthis.registerTableOption(\"menuContainer\", false);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"headerContextMenu\");\r\n\t\tthis.registerColumnOption(\"headerClickMenu\");\r\n\t\tthis.registerColumnOption(\"headerMenu\");\r\n\t\tthis.registerColumnOption(\"contextMenu\");\r\n\t\tthis.registerColumnOption(\"clickMenu\");\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.lookupMenuContainer();\r\n\t\t\r\n\t\tthis.initializeRowWatchers();\r\n\t\tthis.initializeGroupWatchers();\r\n\t\t\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t}\r\n\t\r\n\tlookupMenuContainer(){\r\n\t\t\r\n\t\tthis.menuContainer = this.table.options.menuContainer;\r\n\t\t\r\n\t\tif(typeof this.menuContainer === \"string\"){\r\n\t\t\tthis.menuContainer = document.querySelector(this.menuContainer);\r\n\t\t\t\r\n\t\t\tif(!this.menuContainer){\r\n\t\t\t\tconsole.warn(\"Menu Error - no container element found matching selector:\", this.table.options.menuContainer , \"(defaulting to document body)\");\r\n\t\t\t}\r\n\t\t}else if (this.menuContainer === true){\r\n\t\t\tthis.menuContainer = this.table.element;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.menuContainer && !this.checkMenuContainerIsParent(this.menuContainer)){\r\n\t\t\tthis.menuContainer = false;\r\n\t\t\tconsole.warn(\"Menu Error - container element does not contain this table:\", this.table.options.menuContainer , \"(defaulting to document body)\");\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.menuContainer){\r\n\t\t\tthis.menuContainer = document.body;\r\n\t\t}\r\n\t}\r\n\t\r\n\tcheckMenuContainerIsParent(container, element = this.table.element){\r\n\t\tif(container === element){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn element.parentNode ? this.checkMenuContainerIsParent(container, element.parentNode) : false;\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRowWatchers(){\r\n\t\tif(this.table.options.rowContextMenu){\r\n\t\t\tthis.subscribe(\"row-contextmenu\", this.loadMenuEvent.bind(this, this.table.options.rowContextMenu));\r\n\t\t\tthis.table.on(\"rowTapHold\", this.loadMenuEvent.bind(this, this.table.options.rowContextMenu));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.rowClickMenu){\r\n\t\t\tthis.subscribe(\"row-click\", this.loadMenuEvent.bind(this, this.table.options.rowClickMenu));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeGroupWatchers(){\r\n\t\tif(this.table.options.groupContextMenu){\r\n\t\t\tthis.subscribe(\"group-contextmenu\", this.loadMenuEvent.bind(this, this.table.options.groupContextMenu));\r\n\t\t\tthis.table.on(\"groupTapHold\", this.loadMenuEvent.bind(this, this.table.options.groupContextMenu));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.groupClickMenu){\r\n\t\t\tthis.subscribe(\"group-click\", this.loadMenuEvent.bind(this, this.table.options.groupClickMenu));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar options = [\"headerContextMenu\", \"headerClickMenu\"],\r\n\t\tdef = column.definition;\r\n\t\t\r\n\t\t//handle column events\r\n\t\tif(def.headerContextMenu && !this.columnSubscribers.headerContextMenu){\r\n\t\t\tthis.columnSubscribers.headerContextMenu = this.loadMenuTableColumnEvent.bind(this, \"headerContextMenu\");\r\n\t\t\tthis.subscribe(\"column-contextmenu\", this.columnSubscribers.headerContextMenu);\r\n\t\t\tthis.table.on(\"headerTapHold\", this.loadMenuTableColumnEvent.bind(this, \"headerContextMenu\"))\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerClickMenu && !this.columnSubscribers.headerClickMenu){\r\n\t\t\tthis.columnSubscribers.headerClickMenu = this.loadMenuTableColumnEvent.bind(this, \"headerClickMenu\");\r\n\t\t\tthis.subscribe(\"column-click\", this.columnSubscribers.headerClickMenu);\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerMenu){\r\n\t\t\tthis.initializeColumnHeaderMenu(column);\r\n\t\t}\r\n\t\t\r\n\t\t//handle cell events\r\n\t\tif(def.contextMenu && !this.columnSubscribers.contextMenu){\r\n\t\t\tthis.columnSubscribers.contextMenu = this.loadMenuTableCellEvent.bind(this, \"contextMenu\");\r\n\t\t\tthis.subscribe(\"cell-contextmenu\", this.columnSubscribers.contextMenu);\r\n\t\t\tthis.table.on(\"cellTapHold\", this.loadMenuTableCellEvent.bind(this, \"contextMenu\"))\r\n\t\t}\r\n\t\t\r\n\t\tif(def.clickMenu && !this.columnSubscribers.clickMenu){\r\n\t\t\tthis.columnSubscribers.clickMenu = this.loadMenuTableCellEvent.bind(this, \"clickMenu\");\r\n\t\t\tthis.subscribe(\"cell-click\", this.columnSubscribers.clickMenu);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumnHeaderMenu(column){\r\n\t\tvar headerMenuEl;\r\n\t\t\r\n\t\theaderMenuEl = document.createElement(\"span\");\r\n\t\theaderMenuEl.classList.add(\"tabulator-header-menu-button\");\r\n\t\theaderMenuEl.innerHTML = \"⋮\";\r\n\t\t\r\n\t\theaderMenuEl.addEventListener(\"click\", (e) => {\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\t\r\n\t\t\tthis.loadMenuEvent(column.definition.headerMenu, e, column);\r\n\t\t});\r\n\t\t\r\n\t\tcolumn.titleElement.insertBefore(headerMenuEl, column.titleElement.firstChild);\r\n\t}\r\n\t\r\n\tloadMenuTableCellEvent(option, e, cell){\r\n\t\tif(cell._cell){\r\n\t\t\tcell = cell._cell;\r\n\t\t}\r\n\t\t\r\n\t\tif(cell.column.definition[option]){\r\n\t\t\tthis.loadMenuEvent(cell.column.definition[option], e, cell);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadMenuTableColumnEvent(option, e, column){\r\n\t\tif(column._column){\r\n\t\t\tcolumn = column._column;\r\n\t\t}\r\n\t\t\r\n\t\tif(column.definition[option]){\r\n\t\t\tthis.loadMenuEvent(column.definition[option], e, column);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadMenuEvent(menu, e, component){\r\n\t\tif(component._group){\r\n\t\t\tcomponent = component._group;\r\n\t\t}else if(component._row){\r\n\t\t\tcomponent = component._row;\r\n\t\t}\r\n\t\t\r\n\t\tmenu = typeof menu == \"function\" ? menu.call(this.table, component.getComponent(), e) : menu;\r\n\t\t\r\n\t\tthis.loadMenu(e, component, menu);\r\n\t}\r\n\t\r\n\tloadMenu(e, component, menu, parentEl){\r\n\t\tvar touch = !(e instanceof MouseEvent);\r\n\t\t\r\n\t\tvar menuEl = document.createElement(\"div\");\r\n\t\tmenuEl.classList.add(\"tabulator-menu\");\r\n\t\t\r\n\t\tif(!touch){\r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t\t\r\n\t\t//abort if no menu set\r\n\t\tif(!menu || !menu.length){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(!parentEl){\r\n\t\t\tif(this.nestedMenuBlock){\r\n\t\t\t\t//abort if child menu already open\r\n\t\t\t\tif(this.isOpen()){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.nestedMenuBlock = setTimeout(() => {\r\n\t\t\t\t\tthis.nestedMenuBlock = false;\r\n\t\t\t\t}, 100)\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.hideMenu();\r\n\t\t\tthis.menuElements = [];\r\n\t\t}\r\n\t\t\r\n\t\tmenu.forEach((item) => {\r\n\t\t\tvar itemEl = document.createElement(\"div\"),\r\n\t\t\tlabel = item.label,\r\n\t\t\tdisabled = item.disabled;\r\n\t\t\t\r\n\t\t\tif(item.separator){\r\n\t\t\t\titemEl.classList.add(\"tabulator-menu-separator\");\r\n\t\t\t}else{\r\n\t\t\t\titemEl.classList.add(\"tabulator-menu-item\");\r\n\t\t\t\t\r\n\t\t\t\tif(typeof label == \"function\"){\r\n\t\t\t\t\tlabel = label.call(this.table, component.getComponent());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(label instanceof Node){\r\n\t\t\t\t\titemEl.appendChild(label);\r\n\t\t\t\t}else{\r\n\t\t\t\t\titemEl.innerHTML = label;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(typeof disabled == \"function\"){\r\n\t\t\t\t\tdisabled = disabled.call(this.table, component.getComponent());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(disabled){\r\n\t\t\t\t\titemEl.classList.add(\"tabulator-menu-item-disabled\");\r\n\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(item.menu && item.menu.length){\r\n\t\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\tthis.hideOldSubMenus(menuEl);\r\n\t\t\t\t\t\t\tthis.loadMenu(e, component, item.menu, itemEl);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(item.action){\r\n\t\t\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\t\t\titem.action(e, component.getComponent());\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(item.menu && item.menu.length){\r\n\t\t\t\t\titemEl.classList.add(\"tabulator-menu-item-submenu\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tmenuEl.appendChild(itemEl);\r\n\t\t});\r\n\t\t\r\n\t\tmenuEl.addEventListener(\"click\", (e) => {\r\n\t\t\tthis.hideMenu();\r\n\t\t});\r\n\t\t\r\n\t\tthis.menuElements.push(menuEl);\r\n\t\tthis.positionMenu(menuEl, parentEl, touch, e);\r\n\t\t\r\n\t\tthis.currentComponent = component\r\n\t\t\r\n\t\tthis.dispatchExternal(\"menuOpened\", component.getComponent())\r\n\t}\r\n\t\r\n\thideOldSubMenus(menuEl){\r\n\t\tvar index = this.menuElements.indexOf(menuEl);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tfor(let i = this.menuElements.length - 1; i > index; i--){\r\n\t\t\t\tvar el = this.menuElements[i];\r\n\t\t\t\t\r\n\t\t\t\tif(el.parentNode){\r\n\t\t\t\t\tel.parentNode.removeChild(el);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.menuElements.pop();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tpositionMenu(element, parentEl, touch, e){\r\n\t\tvar x, y, parentOffset;\r\n\t\t\r\n\t\tif(!parentEl){\r\n\t\t\tx = touch ? e.touches[0].pageX : e.pageX;\r\n\t\t\ty = touch ? e.touches[0].pageY : e.pageY;\r\n\t\t\t\r\n\t\t\tif(this.menuContainer !== document.body){\r\n\t\t\t\tparentOffset = Helpers.elOffset(this.menuContainer);\r\n\t\t\t\t\r\n\t\t\t\tx -= parentOffset.left;\r\n\t\t\t\ty -= parentOffset.top;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.positionReversedX = false;\r\n\t\t}else{\r\n\t\t\tparentOffset = Helpers.elOffset(parentEl);\r\n\t\t\tx = parentOffset.left + parentEl.offsetWidth;\r\n\t\t\ty = parentOffset.top - 1;\r\n\t\t}\r\n\t\t\r\n\t\telement.style.top = y + \"px\";\r\n\t\telement.style.left = x + \"px\";\r\n\t\t\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.table.rowManager.element.addEventListener(\"scroll\", this.blurEvent);\r\n\t\t\tthis.subscribe(\"cell-editing\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"click\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"contextmenu\", this.blurEvent);\r\n\t\t\twindow.addEventListener(\"resize\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"keydown\", this.escEvent);\r\n\t\t}, 100);\r\n\t\t\r\n\t\tthis.menuContainer.appendChild(element);\r\n\t\t\r\n\t\t//move menu to start on right edge if it is too close to the edge of the screen\r\n\t\tif((x + element.offsetWidth) >= this.menuContainer.offsetWidth || this.positionReversedX){\r\n\t\t\telement.style.left = \"\";\r\n\t\t\t\r\n\t\t\tif(parentEl){\r\n\t\t\t\telement.style.right = (this.menuContainer.offsetWidth - parentOffset.left) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\telement.style.right = (this.menuContainer.offsetWidth - x) + \"px\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.positionReversedX = true;\r\n\t\t}\r\n\t\t\r\n\t\t//move menu to start on bottom edge if it is too close to the edge of the screen\r\n\t\tif((y + element.offsetHeight) > this.menuContainer.offsetHeight) {\r\n\t\t\tif(parentEl){\r\n\t\t\t\telement.style.top = (parseInt(element.style.top) - element.offsetHeight + parentEl.offsetHeight + 1) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\telement.style.top = (parseInt(element.style.top) - element.offsetHeight) + \"px\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tisOpen(){\r\n\t\treturn !!this.menuElements.length;\r\n\t}\r\n\t\r\n\tescMenu(e){\r\n\t\tif(e.keyCode == 27){\r\n\t\t\tthis.hideMenu();\r\n\t\t}\r\n\t}\r\n\t\r\n\thideMenu(){\t\r\n\t\tthis.menuElements.forEach((menuEl) => {\r\n\t\t\tif(menuEl.parentNode){\r\n\t\t\t\tmenuEl.parentNode.removeChild(menuEl);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tdocument.body.removeEventListener(\"keydown\", this.escEvent);\r\n\t\tdocument.body.removeEventListener(\"click\", this.blurEvent);\r\n\t\tdocument.body.removeEventListener(\"contextmenu\", this.blurEvent);\r\n\t\twindow.removeEventListener(\"resize\", this.blurEvent);\r\n\t\tthis.table.rowManager.element.removeEventListener(\"scroll\", this.blurEvent);\r\n\t\tthis.unsubscribe(\"cell-editing\", this.blurEvent);\r\n\t\t\r\n\t\tif(this.currentComponent){\r\n\t\t\tthis.dispatchExternal(\"menuClosed\", this.currentComponent.getComponent());\r\n\t\t\tthis.currentComponent = null;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMenu.moduleName = \"menu\";\r\n\r\nexport default Menu;\r\n","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass MoveColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.placeholderElement = this.createPlaceholderElement();\r\n\t\tthis.hoverElement = false; //floating column header element\r\n\t\tthis.checkTimeout = false; //click check timeout holder\r\n\t\tthis.checkPeriod = 250; //period to wait on mousedown to consider this a move and not a click\r\n\t\tthis.moving = false; //currently moving column\r\n\t\tthis.toCol = false; //destination column\r\n\t\tthis.toColAfter = false; //position of moving column relative to the desitnation column\r\n\t\tthis.startX = 0; //starting position within header element\r\n\t\tthis.autoScrollMargin = 40; //auto scroll on edge when within margin\r\n\t\tthis.autoScrollStep = 5; //auto scroll distance in pixels\r\n\t\tthis.autoScrollTimeout = false; //auto scroll timeout\r\n\t\tthis.touchMove = false;\r\n\t\t\r\n\t\tthis.moveHover = this.moveHover.bind(this);\r\n\t\tthis.endMove = this.endMove.bind(this);\r\n\t\t\r\n\t\tthis.registerTableOption(\"movableColumns\", false); //enable movable columns\r\n\t}\r\n\t\r\n\tcreatePlaceholderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-col\");\r\n\t\tel.classList.add(\"tabulator-col-placeholder\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.movableColumns){\r\n\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\tcolEl;\r\n\t\t\r\n\t\tif(!column.modules.frozen){\r\n\t\t\tcolEl = column.getElement();\r\n\t\t\t\r\n\t\t\tconfig.mousemove = function(e){\r\n\t\t\t\tif(column.parent === self.moving.parent){\r\n\t\t\t\t\tif((((self.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(colEl).left) + self.table.columnManager.element.scrollLeft) > (column.getWidth() / 2)){\r\n\t\t\t\t\t\tif(self.toCol !== column || !self.toColAfter){\r\n\t\t\t\t\t\t\tcolEl.parentNode.insertBefore(self.placeholderElement, colEl.nextSibling);\r\n\t\t\t\t\t\t\tself.moveColumn(column, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(self.toCol !== column || self.toColAfter){\r\n\t\t\t\t\t\t\tcolEl.parentNode.insertBefore(self.placeholderElement, colEl);\r\n\t\t\t\t\t\t\tself.moveColumn(column, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}.bind(self);\r\n\t\t\t\r\n\t\t\tcolEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tself.touchMove = false;\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, column);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tcolEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tself.bindTouchEvents(column);\r\n\t\t}\r\n\t\t\r\n\t\tcolumn.modules.moveColumn = config;\r\n\t}\r\n\t\r\n\tbindTouchEvents(column){\r\n\t\tvar colEl = column.getElement(),\r\n\t\tstartXMove = false, //shifting center position of the cell\r\n\t\tdir = false,\r\n\t\tcurrentCol, nextCol, prevCol, nextColWidth, prevColWidth, nextColWidthLast, prevColWidthLast;\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchstart\", (e) => {\r\n\t\t\tthis.checkTimeout = setTimeout(() => {\r\n\t\t\t\tthis.touchMove = true;\r\n\t\t\t\tcurrentCol = column;\r\n\t\t\t\tnextCol = column.nextColumn();\r\n\t\t\t\tnextColWidth = nextCol ? nextCol.getWidth()/2 : 0;\r\n\t\t\t\tprevCol = column.prevColumn();\r\n\t\t\t\tprevColWidth = prevCol ? prevCol.getWidth()/2 : 0;\r\n\t\t\t\tnextColWidthLast = 0;\r\n\t\t\t\tprevColWidthLast = 0;\r\n\t\t\t\tstartXMove = false;\r\n\t\t\t\t\r\n\t\t\t\tthis.startMove(e, column);\r\n\t\t\t}, this.checkPeriod);\r\n\t\t}, {passive: true});\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchmove\", (e) => {\r\n\t\t\tvar halfCol, diff, moveToCol;\r\n\t\t\t\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.moveHover(e);\r\n\t\t\t\t\r\n\t\t\t\tif(!startXMove){\r\n\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tdiff = e.touches[0].pageX - startXMove;\r\n\t\t\t\t\r\n\t\t\t\tif(diff > 0){\r\n\t\t\t\t\tif(nextCol && diff - nextColWidthLast > nextColWidth){\r\n\t\t\t\t\t\tmoveToCol = nextCol;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(moveToCol !== column){\r\n\t\t\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t\t\t\tmoveToCol.getElement().parentNode.insertBefore(this.placeholderElement, moveToCol.getElement().nextSibling);\r\n\t\t\t\t\t\t\tthis.moveColumn(moveToCol, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(prevCol && -diff - prevColWidthLast > prevColWidth){\r\n\t\t\t\t\t\tmoveToCol = prevCol;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(moveToCol !== column){\r\n\t\t\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t\t\t\tmoveToCol.getElement().parentNode.insertBefore(this.placeholderElement, moveToCol.getElement());\r\n\t\t\t\t\t\t\tthis.moveColumn(moveToCol, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(moveToCol){\r\n\t\t\t\t\tcurrentCol = moveToCol;\r\n\t\t\t\t\tnextCol = moveToCol.nextColumn();\r\n\t\t\t\t\tnextColWidthLast = nextColWidth;\r\n\t\t\t\t\tnextColWidth = nextCol ? nextCol.getWidth() / 2 : 0;\r\n\t\t\t\t\tprevCol = moveToCol.prevColumn();\r\n\t\t\t\t\tprevColWidthLast = prevColWidth;\r\n\t\t\t\t\tprevColWidth = prevCol ? prevCol.getWidth() / 2 : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}, {passive: true});\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchend\", (e) => {\r\n\t\t\tif(this.checkTimeout){\r\n\t\t\t\tclearTimeout(this.checkTimeout);\r\n\t\t\t}\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.endMove(e);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tstartMove(e, column){\r\n\t\tvar element = column.getElement(),\r\n\t\theaderElement = this.table.columnManager.getElement(),\r\n\t\theadersElement = this.table.columnManager.getHeadersElement();\r\n\t\t\r\n\t\tthis.moving = column;\r\n\t\tthis.startX = (this.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(element).left;\r\n\t\t\r\n\t\tthis.table.element.classList.add(\"tabulator-block-select\");\r\n\t\t\r\n\t\t//create placeholder\r\n\t\tthis.placeholderElement.style.width = column.getWidth() + \"px\";\r\n\t\tthis.placeholderElement.style.height = column.getHeight() + \"px\";\r\n\t\t\r\n\t\telement.parentNode.insertBefore(this.placeholderElement, element);\r\n\t\telement.parentNode.removeChild(element);\r\n\t\t\r\n\t\t//create hover element\r\n\t\tthis.hoverElement = element.cloneNode(true);\r\n\t\tthis.hoverElement.classList.add(\"tabulator-moving\");\r\n\t\t\r\n\t\tthis.table.columnManager.getElement().appendChild(this.hoverElement);\r\n\t\t\r\n\t\tthis.hoverElement.style.left = \"0\";\r\n\t\tthis.hoverElement.style.bottom = (headerElement.clientHeight - headersElement.offsetHeight) + \"px\";\r\n\t\t\r\n\t\tif(!this.touchMove){\r\n\t\t\tthis._bindMouseMove();\r\n\t\t\t\r\n\t\t\tdocument.body.addEventListener(\"mousemove\", this.moveHover);\r\n\t\t\tdocument.body.addEventListener(\"mouseup\", this.endMove);\r\n\t\t}\r\n\t\t\r\n\t\tthis.moveHover(e);\r\n\t}\r\n\t\r\n\t_bindMouseMove(){\r\n\t\tthis.table.columnManager.columnsByIndex.forEach(function(column){\r\n\t\t\tif(column.modules.moveColumn.mousemove){\r\n\t\t\t\tcolumn.getElement().addEventListener(\"mousemove\", column.modules.moveColumn.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t_unbindMouseMove(){\r\n\t\tthis.table.columnManager.columnsByIndex.forEach(function(column){\r\n\t\t\tif(column.modules.moveColumn.mousemove){\r\n\t\t\t\tcolumn.getElement().removeEventListener(\"mousemove\", column.modules.moveColumn.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tmoveColumn(column, after){\r\n\t\tvar movingCells = this.moving.getCells();\r\n\t\t\r\n\t\tthis.toCol = column;\r\n\t\tthis.toColAfter = after;\r\n\t\t\r\n\t\tif(after){\r\n\t\t\tcolumn.getCells().forEach(function(cell, i){\r\n\t\t\t\tvar cellEl = cell.getElement(true);\r\n\t\t\t\t\r\n\t\t\t\tif(cellEl.parentNode && movingCells[i]){\r\n\t\t\t\t\tcellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tcolumn.getCells().forEach(function(cell, i){\r\n\t\t\t\tvar cellEl = cell.getElement(true);\r\n\t\t\t\t\r\n\t\t\t\tif(cellEl.parentNode && movingCells[i]){\r\n\t\t\t\t\tcellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tendMove(e){\r\n\t\tif(e.which === 1 || this.touchMove){\r\n\t\t\tthis._unbindMouseMove();\r\n\t\t\t\r\n\t\t\tthis.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling);\r\n\t\t\tthis.placeholderElement.parentNode.removeChild(this.placeholderElement);\r\n\t\t\tthis.hoverElement.parentNode.removeChild(this.hoverElement);\r\n\t\t\t\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-block-select\");\r\n\t\t\t\r\n\t\t\tif(this.toCol){\r\n\t\t\t\tthis.table.columnManager.moveColumnActual(this.moving, this.toCol, this.toColAfter);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.moving = false;\r\n\t\t\tthis.toCol = false;\r\n\t\t\tthis.toColAfter = false;\r\n\t\t\t\r\n\t\t\tif(!this.touchMove){\r\n\t\t\t\tdocument.body.removeEventListener(\"mousemove\", this.moveHover);\r\n\t\t\t\tdocument.body.removeEventListener(\"mouseup\", this.endMove);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tmoveHover(e){\r\n\t\tvar columnHolder = this.table.columnManager.getElement(),\r\n\t\tscrollLeft = columnHolder.scrollLeft,\r\n\t\txPos = ((this.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(columnHolder).left) + scrollLeft,\r\n\t\tscrollPos;\r\n\t\t\r\n\t\tthis.hoverElement.style.left = (xPos - this.startX) + \"px\";\r\n\t\t\r\n\t\tif(xPos - scrollLeft < this.autoScrollMargin){\r\n\t\t\tif(!this.autoScrollTimeout){\r\n\t\t\t\tthis.autoScrollTimeout = setTimeout(() => {\r\n\t\t\t\t\tscrollPos = Math.max(0,scrollLeft-5);\r\n\t\t\t\t\tthis.table.rowManager.getElement().scrollLeft = scrollPos;\r\n\t\t\t\t\tthis.autoScrollTimeout = false;\r\n\t\t\t\t}, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(scrollLeft + columnHolder.clientWidth - xPos < this.autoScrollMargin){\r\n\t\t\tif(!this.autoScrollTimeout){\r\n\t\t\t\tthis.autoScrollTimeout = setTimeout(() => {\r\n\t\t\t\t\tscrollPos = Math.min(columnHolder.clientWidth, scrollLeft+5);\r\n\t\t\t\t\tthis.table.rowManager.getElement().scrollLeft = scrollPos;\r\n\t\t\t\t\tthis.autoScrollTimeout = false;\r\n\t\t\t\t}, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMoveColumns.moduleName = \"moveColumn\";\r\n\r\nexport default MoveColumns;\r\n","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass MoveRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.placeholderElement = this.createPlaceholderElement();\r\n\t\tthis.hoverElement = false; //floating row header element\r\n\t\tthis.checkTimeout = false; //click check timeout holder\r\n\t\tthis.checkPeriod = 150; //period to wait on mousedown to consider this a move and not a click\r\n\t\tthis.moving = false; //currently moving row\r\n\t\tthis.toRow = false; //destination row\r\n\t\tthis.toRowAfter = false; //position of moving row relative to the desitnation row\r\n\t\tthis.hasHandle = false; //row has handle instead of fully movable row\r\n\t\tthis.startY = 0; //starting Y position within header element\r\n\t\tthis.startX = 0; //starting X position within header element\r\n\r\n\t\tthis.moveHover = this.moveHover.bind(this);\r\n\t\tthis.endMove = this.endMove.bind(this);\r\n\t\tthis.tableRowDropEvent = false;\r\n\r\n\t\tthis.touchMove = false;\r\n\r\n\t\tthis.connection = false;\r\n\t\tthis.connectionSelectorsTables = false;\r\n\t\tthis.connectionSelectorsElements = false;\r\n\t\tthis.connectionElements = [];\r\n\t\tthis.connections = [];\r\n\r\n\t\tthis.connectedTable = false;\r\n\t\tthis.connectedRow = false;\r\n\r\n\t\tthis.registerTableOption(\"movableRows\", false); //enable movable rows\r\n\t\tthis.registerTableOption(\"movableRowsConnectedTables\", false); //tables for movable rows to be connected to\r\n\t\tthis.registerTableOption(\"movableRowsConnectedElements\", false); //other elements for movable rows to be connected to\r\n\t\tthis.registerTableOption(\"movableRowsSender\", false);\r\n\t\tthis.registerTableOption(\"movableRowsReceiver\", \"insert\");\r\n\r\n\t\tthis.registerColumnOption(\"rowHandle\");\r\n\t}\r\n\r\n\tcreatePlaceholderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\tel.classList.add(\"tabulator-row-placeholder\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.movableRows){\r\n\t\t\tthis.connectionSelectorsTables = this.table.options.movableRowsConnectedTables;\r\n\t\t\tthis.connectionSelectorsElements = this.table.options.movableRowsConnectedElements;\r\n\r\n\t\t\tthis.connection = this.connectionSelectorsTables || this.connectionSelectorsElements;\r\n\r\n\t\t\tthis.subscribe(\"cell-init\", this.initializeCell.bind(this));\r\n\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeGroupHeader(group){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\trowEl;\r\n\r\n\t\t//inter table drag drop\r\n\t\tconfig.mouseup = function(e){\r\n\t\t\tself.tableRowDrop(e, row);\r\n\t\t}.bind(self);\r\n\r\n\t\t//same table drag drop\r\n\t\tconfig.mousemove = function(e){\r\n\t\t\tif(((e.pageY - Helpers.elOffset(group.element).top) + self.table.rowManager.element.scrollTop) > (group.getHeight() / 2)){\r\n\t\t\t\tif(self.toRow !== group || !self.toRowAfter){\r\n\t\t\t\t\tvar rowEl = group.getElement();\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling);\r\n\t\t\t\t\tself.moveRow(group, true);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(self.toRow !== group || self.toRowAfter){\r\n\t\t\t\t\tvar rowEl = group.getElement();\r\n\t\t\t\t\tif(rowEl.previousSibling){\r\n\t\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl);\r\n\t\t\t\t\t\tself.moveRow(group, false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.bind(self);\r\n\r\n\t\tgroup.modules.moveRow = config;\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\trowEl;\r\n\r\n\t\t//inter table drag drop\r\n\t\tconfig.mouseup = function(e){\r\n\t\t\tself.tableRowDrop(e, row);\r\n\t\t}.bind(self);\r\n\r\n\t\t//same table drag drop\r\n\t\tconfig.mousemove = function(e){\r\n\t\t\tvar rowEl = row.getElement();\r\n\r\n\t\t\tif(((e.pageY - Helpers.elOffset(rowEl).top) + self.table.rowManager.element.scrollTop) > (row.getHeight() / 2)){\r\n\t\t\t\tif(self.toRow !== row || !self.toRowAfter){\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling);\r\n\t\t\t\t\tself.moveRow(row, true);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(self.toRow !== row || self.toRowAfter){\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl);\r\n\t\t\t\t\tself.moveRow(row, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.bind(self);\r\n\r\n\r\n\t\tif(!this.hasHandle){\r\n\r\n\t\t\trowEl = row.getElement();\r\n\r\n\t\t\trowEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, row);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\trowEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.bindTouchEvents(row, row.getElement());\r\n\t\t}\r\n\r\n\t\trow.modules.moveRow = config;\r\n\t}\r\n\r\n\tinitializeColumn(column){\r\n\t\tif(column.definition.rowHandle && this.table.options.movableRows !== false){\r\n\t\t\tthis.hasHandle = true;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeCell(cell){\r\n\t\tif(cell.column.definition.rowHandle && this.table.options.movableRows !== false){\r\n\t\t\tvar self = this,\r\n\t\t\tcellEl = cell.getElement(true);\r\n\r\n\t\t\tcellEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, cell.row);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tcellEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.bindTouchEvents(cell.row, cellEl);\r\n\t\t}\r\n\t}\r\n\r\n\tbindTouchEvents(row, element){\r\n\t\tvar startYMove = false, //shifting center position of the cell\r\n\t\tdir = false,\r\n\t\tcurrentRow, nextRow, prevRow, nextRowHeight, prevRowHeight, nextRowHeightLast, prevRowHeightLast;\r\n\r\n\t\telement.addEventListener(\"touchstart\", (e) => {\r\n\t\t\tthis.checkTimeout = setTimeout(() => {\r\n\t\t\t\tthis.touchMove = true;\r\n\t\t\t\tcurrentRow = row;\r\n\t\t\t\tnextRow = row.nextRow();\r\n\t\t\t\tnextRowHeight = nextRow ? nextRow.getHeight()/2 : 0;\r\n\t\t\t\tprevRow = row.prevRow();\r\n\t\t\t\tprevRowHeight = prevRow ? prevRow.getHeight()/2 : 0;\r\n\t\t\t\tnextRowHeightLast = 0;\r\n\t\t\t\tprevRowHeightLast = 0;\r\n\t\t\t\tstartYMove = false;\r\n\r\n\t\t\t\tthis.startMove(e, row);\r\n\t\t\t}, this.checkPeriod);\r\n\t\t}, {passive: true});\r\n\t\tthis.moving, this.toRow, this.toRowAfter\r\n\t\telement.addEventListener(\"touchmove\", (e) => {\r\n\r\n\t\t\tvar halfCol, diff, moveToRow;\r\n\r\n\t\t\tif(this.moving){\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tthis.moveHover(e);\r\n\r\n\t\t\t\tif(!startYMove){\r\n\t\t\t\t\tstartYMove = e.touches[0].pageY;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdiff = e.touches[0].pageY - startYMove;\r\n\r\n\t\t\t\tif(diff > 0){\r\n\t\t\t\t\tif(nextRow && diff - nextRowHeightLast > nextRowHeight){\r\n\t\t\t\t\t\tmoveToRow = nextRow;\r\n\r\n\t\t\t\t\t\tif(moveToRow !== row){\r\n\t\t\t\t\t\t\tstartYMove = e.touches[0].pageY\r\n\t\t\t\t\t\t\tmoveToRow.getElement().parentNode.insertBefore(this.placeholderElement, moveToRow.getElement().nextSibling);\r\n\t\t\t\t\t\t\tthis.moveRow(moveToRow, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(prevRow && -diff - prevRowHeightLast > prevRowHeight){\r\n\t\t\t\t\t\tmoveToRow = prevRow;\r\n\r\n\t\t\t\t\t\tif(moveToRow !== row){\r\n\t\t\t\t\t\t\tstartYMove = e.touches[0].pageY;\r\n\t\t\t\t\t\t\tmoveToRow.getElement().parentNode.insertBefore(this.placeholderElement, moveToRow.getElement());\r\n\t\t\t\t\t\t\tthis.moveRow(moveToRow, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(moveToRow){\r\n\t\t\t\t\tcurrentRow = moveToRow;\r\n\t\t\t\t\tnextRow = moveToRow.nextRow();\r\n\t\t\t\t\tnextRowHeightLast = nextRowHeight;\r\n\t\t\t\t\tnextRowHeight = nextRow ? nextRow.getHeight() / 2 : 0;\r\n\t\t\t\t\tprevRow = moveToRow.prevRow();\r\n\t\t\t\t\tprevRowHeightLast = prevRowHeight;\r\n\t\t\t\t\tprevRowHeight = prevRow ? prevRow.getHeight() / 2 : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\telement.addEventListener(\"touchend\", (e) => {\r\n\t\t\tif(this.checkTimeout){\r\n\t\t\t\tclearTimeout(this.checkTimeout);\r\n\t\t\t}\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.endMove(e);\r\n\t\t\t\tthis.touchMove = false;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t_bindMouseMove(){\r\n\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\tif((row.type === \"row\" || row.type === \"group\") && row.modules.moveRow && row.modules.moveRow.mousemove){\r\n\t\t\t\trow.getElement().addEventListener(\"mousemove\", row.modules.moveRow.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t_unbindMouseMove(){\r\n\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\tif((row.type === \"row\" || row.type === \"group\") && row.modules.moveRow && row.modules.moveRow.mousemove){\r\n\t\t\t\trow.getElement().removeEventListener(\"mousemove\", row.modules.moveRow.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tstartMove(e, row){\r\n\t\tvar element = row.getElement();\r\n\r\n\t\tthis.setStartPosition(e, row);\r\n\r\n\t\tthis.moving = row;\r\n\r\n\t\tthis.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\t//create placeholder\r\n\t\tthis.placeholderElement.style.width = row.getWidth() + \"px\";\r\n\t\tthis.placeholderElement.style.height = row.getHeight() + \"px\";\r\n\r\n\t\tif(!this.connection){\r\n\t\t\telement.parentNode.insertBefore(this.placeholderElement, element);\r\n\t\t\telement.parentNode.removeChild(element);\r\n\t\t}else{\r\n\t\t\tthis.table.element.classList.add(\"tabulator-movingrow-sending\");\r\n\t\t\tthis.connectToTables(row);\r\n\t\t}\r\n\r\n\t\t//create hover element\r\n\t\tthis.hoverElement = element.cloneNode(true);\r\n\t\tthis.hoverElement.classList.add(\"tabulator-moving\");\r\n\r\n\t\tif(this.connection){\r\n\t\t\tdocument.body.appendChild(this.hoverElement);\r\n\t\t\tthis.hoverElement.style.left = \"0\";\r\n\t\t\tthis.hoverElement.style.top = \"0\";\r\n\t\t\tthis.hoverElement.style.width = this.table.element.clientWidth + \"px\";\r\n\t\t\tthis.hoverElement.style.whiteSpace = \"nowrap\";\r\n\t\t\tthis.hoverElement.style.overflow = \"hidden\";\r\n\t\t\tthis.hoverElement.style.pointerEvents = \"none\";\r\n\t\t}else{\r\n\t\t\tthis.table.rowManager.getTableElement().appendChild(this.hoverElement);\r\n\r\n\t\t\tthis.hoverElement.style.left = \"0\";\r\n\t\t\tthis.hoverElement.style.top = \"0\";\r\n\r\n\t\t\tthis._bindMouseMove();\r\n\t\t}\r\n\r\n\t\tdocument.body.addEventListener(\"mousemove\", this.moveHover);\r\n\t\tdocument.body.addEventListener(\"mouseup\", this.endMove);\r\n\r\n\t\tthis.dispatchExternal(\"rowMoving\", row.getComponent());\r\n\r\n\t\tthis.moveHover(e);\r\n\t}\r\n\r\n\tsetStartPosition(e, row){\r\n\t\tvar pageX = this.touchMove ? e.touches[0].pageX : e.pageX,\r\n\t\tpageY = this.touchMove ? e.touches[0].pageY : e.pageY,\r\n\t\telement, position;\r\n\r\n\t\telement = row.getElement();\r\n\t\tif(this.connection){\r\n\t\t\tposition = element.getBoundingClientRect();\r\n\r\n\t\t\tthis.startX = position.left - pageX + window.pageXOffset;\r\n\t\t\tthis.startY = position.top - pageY + window.pageYOffset;\r\n\t\t}else{\r\n\t\t\tthis.startY = (pageY - element.getBoundingClientRect().top);\r\n\t\t}\r\n\t}\r\n\r\n\tendMove(e){\r\n\t\tif(!e || e.which === 1 || this.touchMove){\r\n\t\t\tthis._unbindMouseMove();\r\n\r\n\t\t\tif(!this.connection){\r\n\t\t\t\tthis.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling);\r\n\t\t\t\tthis.placeholderElement.parentNode.removeChild(this.placeholderElement);\r\n\t\t\t}\r\n\r\n\t\t\tthis.hoverElement.parentNode.removeChild(this.hoverElement);\r\n\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tif(this.toRow){\r\n\t\t\t\tthis.table.rowManager.moveRow(this.moving, this.toRow, this.toRowAfter);\r\n\t\t\t}else{\r\n\t\t\t\tthis.dispatchExternal(\"rowMoveCancelled\", this.moving.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.moving = false;\r\n\t\t\tthis.toRow = false;\r\n\t\t\tthis.toRowAfter = false;\r\n\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", this.moveHover);\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", this.endMove);\r\n\r\n\t\t\tif(this.connection){\r\n\t\t\t\tthis.table.element.classList.remove(\"tabulator-movingrow-sending\");\r\n\t\t\t\tthis.disconnectFromTables();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmoveRow(row, after){\r\n\t\tthis.toRow = row;\r\n\t\tthis.toRowAfter = after;\r\n\t}\r\n\r\n\tmoveHover(e){\r\n\t\tif(this.connection){\r\n\t\t\tthis.moveHoverConnections.call(this, e);\r\n\t\t}else{\r\n\t\t\tthis.moveHoverTable.call(this, e);\r\n\t\t}\r\n\t}\r\n\r\n\tmoveHoverTable(e){\r\n\t\tvar rowHolder = this.table.rowManager.getElement(),\r\n\t\tscrollTop = rowHolder.scrollTop,\r\n\t\tyPos = ((this.touchMove ? e.touches[0].pageY : e.pageY) - rowHolder.getBoundingClientRect().top) + scrollTop,\r\n\t\tscrollPos;\r\n\r\n\t\tthis.hoverElement.style.top = (yPos - this.startY) + \"px\";\r\n\t}\r\n\r\n\tmoveHoverConnections(e){\r\n\t\tthis.hoverElement.style.left = (this.startX + (this.touchMove ? e.touches[0].pageX : e.pageX)) + \"px\";\r\n\t\tthis.hoverElement.style.top = (this.startY + (this.touchMove ? e.touches[0].pageY : e.pageY)) + \"px\";\r\n\t}\r\n\r\n\telementRowDrop(e, element, row){\r\n\t\tthis.dispatchExternal(\"movableRowsElementDrop\", e, element, row ? row.getComponent() : false);\r\n\t}\r\n\r\n\t//establish connection with other tables\r\n\tconnectToTables(row){\r\n\t\tvar connectionTables;\r\n\r\n\t\tif(this.connectionSelectorsTables){\r\n\t\t\tconnectionTables = this.commsConnections(this.connectionSelectorsTables);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSendingStart\", connectionTables);\r\n\r\n\t\t\tthis.commsSend(this.connectionSelectorsTables, \"moveRow\", \"connect\", {\r\n\t\t\t\trow:row,\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.connectionSelectorsElements){\r\n\r\n\t\t\tthis.connectionElements = [];\r\n\r\n\t\t\tif(!Array.isArray(this.connectionSelectorsElements)){\r\n\t\t\t\tthis.connectionSelectorsElements = [this.connectionSelectorsElements];\r\n\t\t\t}\r\n\r\n\t\t\tthis.connectionSelectorsElements.forEach((query) => {\r\n\t\t\t\tif(typeof query === \"string\"){\r\n\t\t\t\t\tthis.connectionElements = this.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(query)));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.connectionElements.push(query);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.connectionElements.forEach((element) => {\r\n\t\t\t\tvar dropEvent = (e) => {\r\n\t\t\t\t\tthis.elementRowDrop(e, element, this.moving);\r\n\t\t\t\t};\r\n\r\n\t\t\t\telement.addEventListener(\"mouseup\", dropEvent);\r\n\t\t\t\telement.tabulatorElementDropEvent = dropEvent;\r\n\r\n\t\t\t\telement.classList.add(\"tabulator-movingrow-receiving\");\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t//disconnect from other tables\r\n\tdisconnectFromTables(){\r\n\t\tvar connectionTables;\r\n\r\n\t\tif(this.connectionSelectorsTables){\r\n\t\t\tconnectionTables = this.commsConnections(this.connectionSelectorsTables);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSendingStop\", connectionTables);\r\n\r\n\t\t\tthis.commsSend(this.connectionSelectorsTables, \"moveRow\", \"disconnect\");\r\n\t\t}\r\n\r\n\t\tthis.connectionElements.forEach((element) => {\r\n\t\t\telement.classList.remove(\"tabulator-movingrow-receiving\");\r\n\t\t\telement.removeEventListener(\"mouseup\", element.tabulatorElementDropEvent);\r\n\t\t\tdelete element.tabulatorElementDropEvent;\r\n\t\t});\r\n\t}\r\n\r\n\t//accept incomming connection\r\n\tconnect(table, row){\r\n\t\tif(!this.connectedTable){\r\n\t\t\tthis.connectedTable = table;\r\n\t\t\tthis.connectedRow = row;\r\n\r\n\t\t\tthis.table.element.classList.add(\"tabulator-movingrow-receiving\");\r\n\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\t\tif(row.type === \"row\" && row.modules.moveRow && row.modules.moveRow.mouseup){\r\n\t\t\t\t\trow.getElement().addEventListener(\"mouseup\", row.modules.moveRow.mouseup);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.tableRowDropEvent = this.tableRowDrop.bind(this);\r\n\r\n\t\t\tthis.table.element.addEventListener(\"mouseup\", this.tableRowDropEvent);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivingStart\", row, table);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Row Error - Table cannot accept connection, already connected to table:\", this.connectedTable);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//close incomming connection\r\n\tdisconnect(table){\r\n\t\tif(table === this.connectedTable){\r\n\t\t\tthis.connectedTable = false;\r\n\t\t\tthis.connectedRow = false;\r\n\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-movingrow-receiving\");\r\n\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) =>{\r\n\t\t\t\tif(row.type === \"row\" && row.modules.moveRow && row.modules.moveRow.mouseup){\r\n\t\t\t\t\trow.getElement().removeEventListener(\"mouseup\", row.modules.moveRow.mouseup);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.table.element.removeEventListener(\"mouseup\", this.tableRowDropEvent);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivingStop\", table);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Row Error - trying to disconnect from non connected table\")\r\n\t\t}\r\n\t}\r\n\r\n\tdropComplete(table, row, success){\r\n\t\tvar sender = false;\r\n\r\n\t\tif(success){\r\n\r\n\t\t\tswitch(typeof this.table.options.movableRowsSender){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tsender = this.senders[this.table.options.movableRowsSender];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tsender = this.table.options.movableRowsSender;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(sender){\r\n\t\t\t\tsender.call(this, this.moving.getComponent(), row ? row.getComponent() : undefined, table)\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.options.movableRowsSender){\r\n\t\t\t\t\tconsole.warn(\"Mover Row Error - no matching sender found:\", this.table.options.movableRowsSender);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSent\", this.moving.getComponent(), row ? row.getComponent() : undefined, table);\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"movableRowsSentFailed\", this.moving.getComponent(), row ? row.getComponent() : undefined, table);\r\n\t\t}\r\n\r\n\t\tthis.endMove();\r\n\t}\r\n\r\n\ttableRowDrop(e, row){\r\n\t\tvar receiver = false,\r\n\t\tsuccess = false;\r\n\r\n\t\te.stopImmediatePropagation();\r\n\r\n\t\tswitch(typeof this.table.options.movableRowsReceiver){\r\n\t\t\tcase \"string\":\r\n\t\t\treceiver = this.receivers[this.table.options.movableRowsReceiver];\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\treceiver = this.table.options.movableRowsReceiver;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(receiver){\r\n\t\t\tsuccess = receiver.call(this, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Mover Row Error - no matching receiver found:\", this.table.options.movableRowsReceiver)\r\n\t\t}\r\n\r\n\t\tif(success){\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceived\", this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable);\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivedFailed\", this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable);\r\n\t\t}\r\n\r\n\t\tthis.commsSend(this.connectedTable, \"moveRow\", \"dropcomplete\", {\r\n\t\t\trow:row,\r\n\t\t\tsuccess:success,\r\n\t\t});\r\n\t}\r\n\r\n\tcommsReceived(table, action, data){\r\n\t\tswitch(action){\r\n\t\t\tcase \"connect\":\r\n\t\t\treturn this.connect(table, data.row);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"disconnect\":\r\n\t\t\treturn this.disconnect(table);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"dropcomplete\":\r\n\t\t\treturn this.dropComplete(table, data.row, data.success);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMoveRows.prototype.receivers = {\r\n\tinsert:function(fromRow, toRow, fromTable){\r\n\t\tthis.table.addRow(fromRow.getData(), undefined, toRow);\r\n\t\treturn true;\r\n\t},\r\n\r\n\tadd:function(fromRow, toRow, fromTable){\r\n\t\tthis.table.addRow(fromRow.getData());\r\n\t\treturn true;\r\n\t},\r\n\r\n\tupdate:function(fromRow, toRow, fromTable){\r\n\t\tif(toRow){\r\n\t\t\ttoRow.update(fromRow.getData());\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\r\n\treplace:function(fromRow, toRow, fromTable){\r\n\t\tif(toRow){\r\n\t\t\tthis.table.addRow(fromRow.getData(), undefined, toRow);\r\n\t\t\ttoRow.delete();\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n};\r\n\r\nMoveRows.prototype.senders = {\r\n\tdelete:function(fromRow, toRow, toTable){\r\n\t\tfromRow.delete();\r\n\t}\r\n};\r\n\r\nMoveRows.moduleName = \"moveRow\";\r\n\r\nexport default MoveRows;","import Module from '../../core/Module.js';\r\n\r\nimport defaultMutators from './defaults/mutators.js';\r\n\r\nclass Mutator extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.allowedTypes = [\"\", \"data\", \"edit\", \"clipboard\"]; //list of muatation types\r\n\t\tthis.enabled = true;\r\n\r\n\t\tthis.registerColumnOption(\"mutator\");\r\n\t\tthis.registerColumnOption(\"mutatorParams\");\r\n\t\tthis.registerColumnOption(\"mutatorData\");\r\n\t\tthis.registerColumnOption(\"mutatorDataParams\");\r\n\t\tthis.registerColumnOption(\"mutatorEdit\");\r\n\t\tthis.registerColumnOption(\"mutatorEditParams\");\r\n\t\tthis.registerColumnOption(\"mutatorClipboard\");\r\n\t\tthis.registerColumnOption(\"mutatorClipboardParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-value-changing\", this.transformCell.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"row-data-init-before\", this.rowDataChanged.bind(this));\r\n\t\tthis.subscribe(\"row-data-changing\", this.rowDataChanged.bind(this));\r\n\t}\r\n\r\n\trowDataChanged(row, tempData, updatedData){\r\n\t\treturn this.transformRow(tempData, \"data\", updatedData);\r\n\t}\r\n\r\n\t//initialize column mutator\r\n\tinitializeColumn(column){\r\n\t\tvar match = false,\r\n\t\tconfig = {};\r\n\r\n\t\tthis.allowedTypes.forEach((type) => {\r\n\t\t\tvar key = \"mutator\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\t\tmutator;\r\n\r\n\t\t\tif(column.definition[key]){\r\n\t\t\t\tmutator = this.lookupMutator(column.definition[key]);\r\n\r\n\t\t\t\tif(mutator){\r\n\t\t\t\t\tmatch = true;\r\n\r\n\t\t\t\t\tconfig[key] = {\r\n\t\t\t\t\t\tmutator:mutator,\r\n\t\t\t\t\t\tparams: column.definition[key + \"Params\"] || {},\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tcolumn.modules.mutate = config;\r\n\t\t}\r\n\t}\r\n\r\n\tlookupMutator(value){\r\n\t\tvar mutator = false;\r\n\r\n\t\t//set column mutator\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Mutator.mutators[value]){\r\n\t\t\t\tmutator = Mutator.mutators[value];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Mutator Error - No such mutator found, ignoring: \", value);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tmutator = value;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn mutator;\r\n\t}\r\n\r\n\t//apply mutator to row\r\n\ttransformRow(data, type, updatedData){\r\n\t\tvar key = \"mutator\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\tvalue;\r\n\r\n\t\tif(this.enabled){\r\n\r\n\t\t\tthis.table.columnManager.traverse((column) => {\r\n\t\t\t\tvar mutator, params, component;\r\n\r\n\t\t\t\tif(column.modules.mutate){\r\n\t\t\t\t\tmutator = column.modules.mutate[key] || column.modules.mutate.mutator || false;\r\n\r\n\t\t\t\t\tif(mutator){\r\n\t\t\t\t\t\tvalue = column.getFieldValue(typeof updatedData !== \"undefined\" ? updatedData : data);\r\n\r\n\t\t\t\t\t\tif(type == \"data\" || typeof value !== \"undefined\"){\r\n\t\t\t\t\t\t\tcomponent = column.getComponent();\r\n\t\t\t\t\t\t\tparams = typeof mutator.params === \"function\" ? mutator.params(value, data, type, component) : mutator.params;\r\n\t\t\t\t\t\t\tcolumn.setFieldValue(data, mutator.mutator(value, data, type, params, component));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//apply mutator to new cell value\r\n\ttransformCell(cell, value){\r\n\t\tif(cell.column.modules.mutate){\r\n\t\t\tvar mutator = cell.column.modules.mutate.mutatorEdit || cell.column.modules.mutate.mutator || false,\r\n\t\t\ttempData = {};\r\n\r\n\t\t\tif(mutator){\r\n\t\t\t\ttempData = Object.assign(tempData, cell.row.getData());\r\n\t\t\t\tcell.column.setFieldValue(tempData, value);\r\n\t\t\t\treturn mutator.mutator(value, tempData, \"edit\", mutator.params, cell.getComponent());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\tenable(){\r\n\t\tthis.enabled = true;\r\n\t}\r\n\r\n\tdisable(){\r\n\t\tthis.enabled = false;\r\n\t}\r\n}\r\n\r\nMutator.moduleName = \"mutator\";\r\n\r\n//load defaults\r\nMutator.mutators = defaultMutators;\r\n\r\nexport default Mutator;","export default {};","import rows from './pageCounters/rows.js';\r\nimport pages from './pageCounters/pages.js';\r\n\r\n\r\nexport default {\r\n\trows:rows,\r\n\tpages:pages,\r\n};","export default function(pageSize, currentRow, currentPage, totalRows, totalPages){\r\n\tvar el = document.createElement(\"span\"),\r\n\tshowingEl = document.createElement(\"span\"),\r\n\tvalueEl = document.createElement(\"span\"),\r\n\tofEl = document.createElement(\"span\"),\r\n\ttotalEl = document.createElement(\"span\"),\r\n\trowsEl = document.createElement(\"span\");\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|showing\", (value) => {\r\n\t\tshowingEl.innerHTML = value;\r\n\t});\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|of\", (value) => {\r\n\t\tofEl.innerHTML = value;\r\n\t});\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|rows\", (value) => {\r\n\t\trowsEl.innerHTML = value;\r\n\t});\r\n\r\n\tif(totalRows){\r\n\t\tvalueEl.innerHTML = \" \" + currentRow + \"-\" + Math.min((currentRow + pageSize - 1), totalRows) + \" \";\r\n\t\t\r\n\t\ttotalEl.innerHTML = \" \" + totalRows + \" \";\r\n\t\t\r\n\t\tel.appendChild(showingEl);\r\n\t\tel.appendChild(valueEl);\r\n\t\tel.appendChild(ofEl);\r\n\t\tel.appendChild(totalEl);\r\n\t\tel.appendChild(rowsEl);\r\n\t}else{\r\n\t\tvalueEl.innerHTML = \" 0 \";\r\n\r\n\t\tel.appendChild(showingEl);\r\n\t\tel.appendChild(valueEl);\r\n\t\tel.appendChild(rowsEl);\r\n\t}\r\n\t\r\n\treturn el;\r\n};","export default function(pageSize, currentRow, currentPage, totalRows, totalPages){\r\n\r\n var el = document.createElement(\"span\"),\r\n\tshowingEl = document.createElement(\"span\"),\r\n\tvalueEl = document.createElement(\"span\"),\r\n\tofEl = document.createElement(\"span\"),\r\n\ttotalEl = document.createElement(\"span\"),\r\n\trowsEl = document.createElement(\"span\");\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|showing\", (value) => {\r\n\t\tshowingEl.innerHTML = value;\r\n\t});\r\n\t\r\n\tvalueEl.innerHTML = \" \" + currentPage + \" \";\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|of\", (value) => {\r\n\t\tofEl.innerHTML = value;\r\n\t});\r\n\t\r\n\ttotalEl.innerHTML = \" \" + totalPages + \" \";\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|pages\", (value) => {\r\n\t\trowsEl.innerHTML = value;\r\n\t});\r\n\t\r\n\tel.appendChild(showingEl);\r\n\tel.appendChild(valueEl);\r\n\tel.appendChild(ofEl);\r\n\tel.appendChild(totalEl);\r\n\tel.appendChild(rowsEl);\r\n\t\r\n\treturn el;\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultPageCounters from './defaults/pageCounters.js';\r\n\r\nclass Page extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.mode = \"local\";\r\n\t\tthis.progressiveLoad = false;\r\n\t\t\r\n\t\tthis.element = null;\r\n\t\tthis.pageCounterElement = null;\r\n\t\tthis.pageCounter = null;\r\n\t\t\r\n\t\tthis.size = 0;\r\n\t\tthis.page = 1;\r\n\t\tthis.count = 5;\r\n\t\tthis.max = 1;\r\n\r\n\t\tthis.remoteRowCountEstimate = null;\r\n\t\t\r\n\t\tthis.displayIndex = 0; //index in display pipeline\r\n\t\t\r\n\t\tthis.initialLoad = true;\r\n\t\tthis.dataChanging = false; //flag to check if data is being changed by this module\r\n\t\t\r\n\t\tthis.pageSizes = [];\r\n\t\t\r\n\t\tthis.registerTableOption(\"pagination\", false); //set pagination type\r\n\t\tthis.registerTableOption(\"paginationMode\", \"local\"); //local or remote pagination\r\n\t\tthis.registerTableOption(\"paginationSize\", false); //set number of rows to a page\r\n\t\tthis.registerTableOption(\"paginationInitialPage\", 1); //initial page to show on load\r\n\t\tthis.registerTableOption(\"paginationCounter\", false); // set pagination counter\r\n\t\tthis.registerTableOption(\"paginationCounterElement\", false); // set pagination counter\r\n\t\tthis.registerTableOption(\"paginationButtonCount\", 5); // set count of page button\r\n\t\tthis.registerTableOption(\"paginationSizeSelector\", false); //add pagination size selector element\r\n\t\tthis.registerTableOption(\"paginationElement\", false); //element to hold pagination numbers\r\n\t\t// this.registerTableOption(\"paginationDataSent\", {}); //pagination data sent to the server\r\n\t\t// this.registerTableOption(\"paginationDataReceived\", {}); //pagination data received from the server\r\n\t\tthis.registerTableOption(\"paginationAddRow\", \"page\"); //add rows on table or page\r\n\t\t\r\n\t\tthis.registerTableOption(\"progressiveLoad\", false); //progressive loading\r\n\t\tthis.registerTableOption(\"progressiveLoadDelay\", 0); //delay between requests\r\n\t\tthis.registerTableOption(\"progressiveLoadScrollMargin\", 0); //margin before scroll begins\r\n\t\t\r\n\t\tthis.registerTableFunction(\"setMaxPage\", this.setMaxPage.bind(this));\r\n\t\tthis.registerTableFunction(\"setPage\", this.setPage.bind(this));\r\n\t\tthis.registerTableFunction(\"setPageToRow\", this.userSetPageToRow.bind(this));\r\n\t\tthis.registerTableFunction(\"setPageSize\", this.userSetPageSize.bind(this));\r\n\t\tthis.registerTableFunction(\"getPageSize\", this.getPageSize.bind(this));\r\n\t\tthis.registerTableFunction(\"previousPage\", this.previousPage.bind(this));\r\n\t\tthis.registerTableFunction(\"nextPage\", this.nextPage.bind(this));\r\n\t\tthis.registerTableFunction(\"getPage\", this.getPage.bind(this));\r\n\t\tthis.registerTableFunction(\"getPageMax\", this.getPageMax.bind(this));\r\n\t\t\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"pageTo\", this.setPageToRow.bind(this));\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"row-added\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"data-processed\", this.initialLoadComplete.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.calculatePageSizes.bind(this));\r\n\r\n\t\t\tif(this.table.options.paginationAddRow == \"page\"){\r\n\t\t\t\tthis.subscribe(\"row-adding-position\", this.rowAddingPosition.bind(this));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.options.paginationMode === \"remote\"){\r\n\t\t\t\tthis.subscribe(\"data-params\", this.remotePageParams.bind(this));\r\n\t\t\t\tthis.subscribe(\"data-loaded\", this._parseRemoteData.bind(this));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.options.progressiveLoad){\r\n\t\t\t\tconsole.error(\"Progressive Load Error - Pagination and progressive load cannot be used at the same time\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.registerDisplayHandler(this.restOnRenderBefore.bind(this), 40);\r\n\t\t\tthis.registerDisplayHandler(this.getRows.bind(this), 50);\r\n\t\t\t\r\n\t\t\tthis.createElements();\r\n\t\t\tthis.initializePageCounter();\r\n\t\t\tthis.initializePaginator();\r\n\t\t}else if(this.table.options.progressiveLoad){\r\n\t\t\tthis.subscribe(\"data-params\", this.remotePageParams.bind(this));\r\n\t\t\tthis.subscribe(\"data-loaded\", this._parseRemoteData.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.calculatePageSizes.bind(this));\r\n\t\t\tthis.subscribe(\"data-processed\", this.initialLoadComplete.bind(this));\r\n\t\t\t\r\n\t\t\tthis.initializeProgressive(this.table.options.progressiveLoad)\r\n\t\t\t\r\n\t\t\tif(this.table.options.progressiveLoad === \"scroll\"){\r\n\t\t\t\tthis.subscribe(\"scroll-vertical\", this.scrollVertical.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trowAddingPosition(row, top){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tdispRows = rowManager.getDisplayRows(),\r\n\t\tindex;\r\n\t\t\r\n\t\tif(top){\r\n\t\t\tif(dispRows.length){\r\n\t\t\t\tindex = dispRows[0];\r\n\t\t\t}else{\r\n\t\t\t\tif(rowManager.activeRows.length){\r\n\t\t\t\t\tindex = rowManager.activeRows[rowManager.activeRows.length-1];\r\n\t\t\t\t\ttop = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(dispRows.length){\r\n\t\t\t\tindex = dispRows[dispRows.length - 1];\r\n\t\t\t\ttop = dispRows.length < this.size ? false : true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn {index, top}\r\n\t}\r\n\t\r\n\tcalculatePageSizes(){\r\n\t\tvar testElRow, testElCell;\r\n\t\t\r\n\t\tif(this.table.options.paginationSize){\r\n\t\t\tthis.size = this.table.options.paginationSize;\r\n\t\t}else{\r\n\t\t\ttestElRow = document.createElement(\"div\");\r\n\t\t\ttestElRow.classList.add(\"tabulator-row\");\r\n\t\t\ttestElRow.style.visibility = \"hidden\";\r\n\t\t\t\r\n\t\t\ttestElCell = document.createElement(\"div\");\r\n\t\t\ttestElCell.classList.add(\"tabulator-cell\");\r\n\t\t\ttestElCell.innerHTML = \"Page Row Test\";\r\n\t\t\t\r\n\t\t\ttestElRow.appendChild(testElCell);\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getTableElement().appendChild(testElRow);\r\n\t\t\t\r\n\t\t\tthis.size = Math.floor(this.table.rowManager.getElement().clientHeight / testElRow.offsetHeight);\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getTableElement().removeChild(testElRow);\r\n\t\t}\r\n\t\t\r\n\t\tthis.generatePageSizeSelectList();\r\n\t}\r\n\t\r\n\tinitialLoadComplete(){\r\n\t\tthis.initialLoad = false;\r\n\t}\r\n\t\r\n\tremotePageParams(data, config, silent, params){\r\n\t\tif(!this.initialLoad){\r\n\t\t\tif((this.progressiveLoad && !silent) || (!this.progressiveLoad && !this.dataChanging)){\r\n\t\t\t\tthis.reset(true);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//configure request params\r\n\t\tparams.page = this.page;\r\n\t\t\r\n\t\t//set page size if defined\r\n\t\tif(this.size){\r\n\t\t\tparams.size = this.size;\r\n\t\t}\r\n\t\t\r\n\t\treturn params;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\tuserSetPageToRow(row){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\trow = this.rowManager.findRow(row);\r\n\t\t\t\r\n\t\t\tif(row){\r\n\t\t\t\treturn this.setPageToRow(row)\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn Promise.reject();\r\n\t}\r\n\t\r\n\tuserSetPageSize(size){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\tthis.setPageSize(size);\r\n\t\t\treturn this.setPage(1);\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\r\n\tscrollVertical(top, dir){\r\n\t\tvar element, diff, margin;\r\n\t\tif(!dir && !this.table.dataLoader.loading){\r\n\t\t\telement = this.table.rowManager.getElement();\r\n\t\t\tdiff = element.scrollHeight - element.clientHeight - top;\r\n\t\t\tmargin = this.table.options.progressiveLoadScrollMargin || (element.clientHeight * 2);\r\n\t\t\t\r\n\t\t\tif(diff < margin){\r\n\t\t\t\tthis.nextPage()\r\n\t\t\t\t.catch(() => {}); //consume the exception thrown when on the last page\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trestOnRenderBefore(rows, renderInPosition){\r\n\t\tif(!renderInPosition){\r\n\t\t\tif(this.mode === \"local\"){\r\n\t\t\t\tthis.reset();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\trowsUpdated(){\r\n\t\tthis.refreshData(true, \"all\");\r\n\t}\r\n\t\r\n\tcreateElements(){\r\n\t\tvar button;\r\n\t\t\r\n\t\tthis.element = document.createElement(\"span\");\r\n\t\tthis.element.classList.add(\"tabulator-paginator\");\r\n\t\t\r\n\t\tthis.pagesElement = document.createElement(\"span\");\r\n\t\tthis.pagesElement.classList.add(\"tabulator-pages\");\r\n\t\t\r\n\t\tbutton = document.createElement(\"button\");\r\n\t\tbutton.classList.add(\"tabulator-page\");\r\n\t\tbutton.setAttribute(\"type\", \"button\");\r\n\t\tbutton.setAttribute(\"role\", \"button\");\r\n\t\tbutton.setAttribute(\"aria-label\", \"\");\r\n\t\tbutton.setAttribute(\"title\", \"\");\r\n\t\t\r\n\t\tthis.firstBut = button.cloneNode(true);\r\n\t\tthis.firstBut.setAttribute(\"data-page\", \"first\");\r\n\t\t\r\n\t\tthis.prevBut = button.cloneNode(true);\r\n\t\tthis.prevBut.setAttribute(\"data-page\", \"prev\");\r\n\t\t\r\n\t\tthis.nextBut = button.cloneNode(true);\r\n\t\tthis.nextBut.setAttribute(\"data-page\", \"next\");\r\n\t\t\r\n\t\tthis.lastBut = button.cloneNode(true);\r\n\t\tthis.lastBut.setAttribute(\"data-page\", \"last\");\r\n\t\t\r\n\t\tif(this.table.options.paginationSizeSelector){\r\n\t\t\tthis.pageSizeSelect = document.createElement(\"select\");\r\n\t\t\tthis.pageSizeSelect.classList.add(\"tabulator-page-size\");\r\n\t\t}\r\n\t}\r\n\t\r\n\tgeneratePageSizeSelectList(){\r\n\t\tvar pageSizes = [];\r\n\t\t\r\n\t\tif(this.pageSizeSelect){\r\n\t\t\t\r\n\t\t\tif(Array.isArray(this.table.options.paginationSizeSelector)){\r\n\t\t\t\tpageSizes = this.table.options.paginationSizeSelector;\r\n\t\t\t\tthis.pageSizes = pageSizes;\r\n\t\t\t\t\r\n\t\t\t\tif(this.pageSizes.indexOf(this.size) == -1){\r\n\t\t\t\t\tpageSizes.unshift(this.size);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t\r\n\t\t\t\tif(this.pageSizes.indexOf(this.size) == -1){\r\n\t\t\t\t\tpageSizes = [];\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (let i = 1; i < 5; i++){\r\n\t\t\t\t\t\tpageSizes.push(this.size * i);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.pageSizes = pageSizes;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tpageSizes = this.pageSizes;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\twhile(this.pageSizeSelect.firstChild) this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);\r\n\t\t\t\r\n\t\t\tpageSizes.forEach((item) => {\r\n\t\t\t\tvar itemEl = document.createElement(\"option\");\r\n\t\t\t\titemEl.value = item;\r\n\t\t\t\t\r\n\t\t\t\tif(item === true){\r\n\t\t\t\t\tthis.langBind(\"pagination|all\", function(value){\r\n\t\t\t\t\t\titemEl.innerHTML = value;\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\titemEl.innerHTML = item;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tthis.pageSizeSelect.appendChild(itemEl);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.pageSizeSelect.value = this.size;\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializePageCounter(){\r\n\t\tvar counter = this.table.options.paginationCounter,\r\n\t\tpageCounter = null;\r\n\t\t\r\n\t\tif(counter){\r\n\t\t\tif(typeof counter === \"function\"){\r\n\t\t\t\tpageCounter = counter;\r\n\t\t\t}else{\r\n\t\t\t\tpageCounter = Page.pageCounters[counter];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(pageCounter){\r\n\t\t\t\tthis.pageCounter = pageCounter;\r\n\t\t\t\t\r\n\t\t\t\tthis.pageCounterElement = document.createElement(\"span\");\r\n\t\t\t\tthis.pageCounterElement.classList.add(\"tabulator-page-counter\");\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Pagination Error - No such page counter found: \", counter);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//setup pagination\r\n\tinitializePaginator(hidden){\r\n\t\tvar pageSelectLabel, paginationCounterHolder;\r\n\t\t\r\n\t\tif(!hidden){\r\n\t\t\t//build pagination element\r\n\t\t\t\r\n\t\t\t//bind localizations\r\n\t\t\tthis.langBind(\"pagination|first\", (value) => {\r\n\t\t\t\tthis.firstBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|first_title\", (value) => {\r\n\t\t\t\tthis.firstBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.firstBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|prev\", (value) => {\r\n\t\t\t\tthis.prevBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|prev_title\", (value) => {\r\n\t\t\t\tthis.prevBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.prevBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|next\", (value) => {\r\n\t\t\t\tthis.nextBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|next_title\", (value) => {\r\n\t\t\t\tthis.nextBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.nextBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|last\", (value) => {\r\n\t\t\t\tthis.lastBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|last_title\", (value) => {\r\n\t\t\t\tthis.lastBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.lastBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t//click bindings\r\n\t\t\tthis.firstBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.setPage(1)\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.prevBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.previousPage()\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.nextBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.nextPage()\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.lastBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.setPage(this.max)\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(this.table.options.paginationElement){\r\n\t\t\t\tthis.element = this.table.options.paginationElement;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.pageSizeSelect){\r\n\t\t\t\tpageSelectLabel = document.createElement(\"label\");\r\n\t\t\t\t\r\n\t\t\t\tthis.langBind(\"pagination|page_size\", (value) => {\r\n\t\t\t\t\tthis.pageSizeSelect.setAttribute(\"aria-label\", value);\r\n\t\t\t\t\tthis.pageSizeSelect.setAttribute(\"title\", value);\r\n\t\t\t\t\tpageSelectLabel.innerHTML = value;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.element.appendChild(pageSelectLabel);\r\n\t\t\t\tthis.element.appendChild(this.pageSizeSelect);\r\n\t\t\t\t\r\n\t\t\t\tthis.pageSizeSelect.addEventListener(\"change\", (e) => {\r\n\t\t\t\t\tthis.setPageSize(this.pageSizeSelect.value == \"true\" ? true : this.pageSizeSelect.value);\r\n\t\t\t\t\tthis.setPage(1)\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//append to DOM\r\n\t\t\tthis.element.appendChild(this.firstBut);\r\n\t\t\tthis.element.appendChild(this.prevBut);\r\n\t\t\tthis.element.appendChild(this.pagesElement);\r\n\t\t\tthis.element.appendChild(this.nextBut);\r\n\t\t\tthis.element.appendChild(this.lastBut);\r\n\t\t\t\r\n\t\t\tif(!this.table.options.paginationElement && !hidden){\r\n\t\t\t\tif(this.table.options.paginationCounter){\r\n\r\n\t\t\t\t\tpaginationCounterHolder \r\n\r\n\t\t\t\t\tif(this.table.options.paginationCounterElement){\r\n\t\t\t\t\t\tif(this.table.options.paginationCounterElement instanceof HTMLElement){\r\n\t\t\t\t\t\t\tthis.table.options.paginationCounterElement.appendChild(this.pageCounterElement);\r\n\t\t\t\t\t\t}else if(typeof this.table.options.paginationCounterElement === \"string\"){\r\n\t\t\t\t\t\t\tpaginationCounterHolder = document.querySelector(this.table.options.paginationCounterElement);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(paginationCounterHolder){\r\n\t\t\t\t\t\t\t\tpaginationCounterHolder.appendChild(this.pageCounterElement);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Pagination Error - Unable to find element matching paginationCounterElement selector:\", this.table.options.paginationCounterElement);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.table.footerManager.append(this.pageCounterElement);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.table.footerManager.append(this.element, this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.page = this.table.options.paginationInitialPage;\r\n\t\t\tthis.count = this.table.options.paginationButtonCount;\r\n\t\t}\r\n\t\t\r\n\t\t//set default values\r\n\t\tthis.mode = this.table.options.paginationMode;\r\n\t}\r\n\t\r\n\tinitializeProgressive(mode){\r\n\t\tthis.initializePaginator(true);\r\n\t\tthis.mode = \"progressive_\" + mode;\r\n\t\tthis.progressiveLoad = true;\r\n\t}\r\n\t\r\n\ttrackChanges(){\r\n\t\tthis.dispatch(\"page-changed\");\r\n\t}\r\n\t\r\n\tsetDisplayIndex(index){\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\t\r\n\tgetDisplayIndex(){\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\t\r\n\t//calculate maximum page from number of rows\r\n\tsetMaxRows(rowCount){\r\n\t\tif(!rowCount){\r\n\t\t\tthis.max = 1;\r\n\t\t}else{\r\n\t\t\tthis.max = this.size === true ? 1 : Math.ceil(rowCount/this.size);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.page > this.max){\r\n\t\t\tthis.page = this.max;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//reset to first page without triggering action\r\n\treset(force){\r\n\t\tif(!this.initialLoad){\r\n\t\t\tif(this.mode == \"local\" || force){\r\n\t\t\t\tthis.page = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set the maximum page\r\n\tsetMaxPage(max){\r\n\t\t\r\n\t\tmax = parseInt(max);\r\n\t\t\r\n\t\tthis.max = max || 1;\r\n\t\t\r\n\t\tif(this.page > this.max){\r\n\t\t\tthis.page = this.max;\r\n\t\t\tthis.trigger();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set current page number\r\n\tsetPage(page){\r\n\t\tswitch(page){\r\n\t\t\tcase \"first\":\r\n\t\t\treturn this.setPage(1);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"prev\":\r\n\t\t\treturn this.previousPage();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"next\":\r\n\t\t\treturn this.nextPage();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"last\":\r\n\t\t\treturn this.setPage(this.max);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tpage = parseInt(page);\r\n\t\t\r\n\t\tif((page > 0 && page <= this.max) || this.mode !== \"local\"){\r\n\t\t\tthis.page = page;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Requested page is out of range of 1 - \" + this.max + \":\", page);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetPageToRow(row){\r\n\t\tvar rows = this.table.rowManager.getDisplayRows(this.displayIndex - 1);\r\n\t\tvar index = rows.indexOf(row);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tvar page = this.size === true ? 1 : Math.ceil((index + 1) / this.size);\r\n\t\t\t\r\n\t\t\treturn this.setPage(page)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Requested row is not visible\");\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetPageSize(size){\r\n\t\tif(size !== true){\r\n\t\t\tsize = parseInt(size);\r\n\t\t}\r\n\t\t\r\n\t\tif(size > 0){\r\n\t\t\tthis.size = size;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.pageSizeSelect){\r\n\t\t\t// this.pageSizeSelect.value = size;\r\n\t\t\tthis.generatePageSizeSelectList();\r\n\t\t}\r\n\t\t\r\n\t\tthis.trackChanges();\r\n\t}\r\n\t\r\n\t_setPageCounter(totalRows, size, currentRow){\r\n\t\tvar content;\r\n\t\t\r\n\t\tif(this.pageCounter){\r\n\r\n\t\t\tif(this.mode === \"remote\"){\r\n\t\t\t\tsize = this.size;\r\n\t\t\t\tcurrentRow = ((this.page - 1) * this.size) + 1;\r\n\t\t\t\ttotalRows = this.remoteRowCountEstimate;\r\n\t\t\t}\r\n\r\n\t\t\tcontent = this.pageCounter.call(this, size, currentRow, this.page, totalRows, this.max);\r\n\t\t\t\r\n\t\t\tswitch(typeof content){\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\tif(content instanceof Node){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//clear previous cell contents\r\n\t\t\t\t\twhile(this.pageCounterElement.firstChild) this.pageCounterElement.removeChild(this.pageCounterElement.firstChild);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.pageCounterElement.appendChild(content);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(content != null){\r\n\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);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"undefined\":\r\n\t\t\t\tcase \"null\":\r\n\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.pageCounterElement.innerHTML = content;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//setup the pagination buttons\r\n\t_setPageButtons(){\r\n\t\tlet leftSize = Math.floor((this.count-1) / 2);\r\n\t\tlet rightSize = Math.ceil((this.count-1) / 2);\r\n\t\tlet min = this.max - this.page + leftSize + 1 < this.count ? this.max-this.count+1: Math.max(this.page-leftSize,1);\r\n\t\tlet max = this.page <= rightSize? Math.min(this.count, this.max) :Math.min(this.page+rightSize, this.max);\r\n\t\t\r\n\t\twhile(this.pagesElement.firstChild) this.pagesElement.removeChild(this.pagesElement.firstChild);\r\n\t\t\r\n\t\tif(this.page == 1){\r\n\t\t\tthis.firstBut.disabled = true;\r\n\t\t\tthis.prevBut.disabled = true;\r\n\t\t}else{\r\n\t\t\tthis.firstBut.disabled = false;\r\n\t\t\tthis.prevBut.disabled = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.page == this.max){\r\n\t\t\tthis.lastBut.disabled = true;\r\n\t\t\tthis.nextBut.disabled = true;\r\n\t\t}else{\r\n\t\t\tthis.lastBut.disabled = false;\r\n\t\t\tthis.nextBut.disabled = false;\r\n\t\t}\r\n\t\t\r\n\t\tfor(let i = min; i <= max; i++){\r\n\t\t\tif(i>0 && i <= this.max){\r\n\t\t\t\tthis.pagesElement.appendChild(this._generatePageButton(i));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.footerRedraw();\r\n\t}\r\n\t\r\n\t_generatePageButton(page){\r\n\t\tvar button = document.createElement(\"button\");\r\n\t\t\r\n\t\tbutton.classList.add(\"tabulator-page\");\r\n\t\tif(page == this.page){\r\n\t\t\tbutton.classList.add(\"active\");\r\n\t\t}\r\n\t\t\r\n\t\tbutton.setAttribute(\"type\", \"button\");\r\n\t\tbutton.setAttribute(\"role\", \"button\");\r\n\t\t\r\n\t\tthis.langBind(\"pagination|page_title\", (value) => {\r\n\t\t\tbutton.setAttribute(\"aria-label\", value + \" \" + page);\r\n\t\t\tbutton.setAttribute(\"title\", value + \" \" + page);\r\n\t\t});\r\n\t\t\r\n\t\tbutton.setAttribute(\"data-page\", page);\r\n\t\tbutton.textContent = page;\r\n\t\t\r\n\t\tbutton.addEventListener(\"click\", (e) => {\r\n\t\t\tthis.setPage(page)\r\n\t\t});\r\n\t\t\r\n\t\treturn button;\r\n\t}\r\n\t\r\n\t//previous page\r\n\tpreviousPage(){\r\n\t\tif(this.page > 1){\r\n\t\t\tthis.page--;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger()\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Previous page would be less than page 1:\", 0);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//next page\r\n\tnextPage(){\r\n\t\tif(this.page < this.max){\r\n\t\t\tthis.page++;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger();\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tif(!this.progressiveLoad){\r\n\t\t\t\tconsole.warn(\"Pagination Error - Next page would be greater than maximum page of \" + this.max + \":\", this.max + 1);\r\n\t\t\t}\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return current page number\r\n\tgetPage(){\r\n\t\treturn this.page;\r\n\t}\r\n\t\r\n\t//return max page number\r\n\tgetPageMax(){\r\n\t\treturn this.max;\r\n\t}\r\n\t\r\n\tgetPageSize(size){\r\n\t\treturn this.size;\r\n\t}\r\n\t\r\n\tgetMode(){\r\n\t\treturn this.mode;\r\n\t}\r\n\t\r\n\t//return appropriate rows for current page\r\n\tgetRows(data){\r\n\t\tvar actualRowPageSize = 0,\r\n\t\toutput, start, end, actualStartRow;\r\n\r\n\t\tvar actualRows = data.filter((row) => {\r\n\t\t\treturn row.type === \"row\";\r\n\t\t});\r\n\t\t\r\n\t\tif(this.mode == \"local\"){\r\n\t\t\toutput = [];\r\n\t\t\t\r\n\t\t\tthis.setMaxRows(data.length);\r\n\t\t\t\r\n\t\t\tif(this.size === true){\r\n\t\t\t\tstart = 0;\r\n\t\t\t\tend = data.length;\r\n\t\t\t}else{\r\n\t\t\t\tstart = this.size * (this.page - 1);\r\n\t\t\t\tend = start + parseInt(this.size);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._setPageButtons();\r\n\t\t\t\r\n\t\t\tfor(let i = start; i < end; i++){\r\n\t\t\t\tlet row = data[i];\r\n\r\n\t\t\t\tif(row){\r\n\t\t\t\t\toutput.push(row);\r\n\r\n\t\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\t\tif(!actualStartRow){\r\n\t\t\t\t\t\t\tactualStartRow = row;\r\n\t\t\t\t\t\t}\t\r\n\r\n\t\t\t\t\t\tactualRowPageSize++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._setPageCounter(actualRows.length, actualRowPageSize, actualStartRow ? (actualRows.indexOf(actualStartRow) + 1) : 0);\r\n\t\t\t\r\n\t\t\treturn output;\r\n\t\t}else{\r\n\t\t\tthis._setPageButtons();\r\n\t\t\tthis._setPageCounter(actualRows.length);\r\n\t\t\t\r\n\t\t\treturn data.slice(0);\r\n\t\t}\r\n\t}\r\n\t\r\n\ttrigger(){\r\n\t\tvar left;\r\n\t\t\r\n\t\tswitch(this.mode){\r\n\t\t\tcase \"local\":\r\n\t\t\tleft = this.table.rowManager.scrollLeft;\r\n\t\t\t\r\n\t\t\tthis.refreshData();\r\n\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\r\n\t\t\t\r\n\t\t\treturn Promise.resolve();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"remote\":\r\n\t\t\tthis.dataChanging = true;\r\n\t\t\treturn this.reloadData(null)\r\n\t\t\t.finally(() => {\r\n\t\t\t\tthis.dataChanging = false;\r\n\t\t\t})\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"progressive_load\":\r\n\t\t\tcase \"progressive_scroll\":\r\n\t\t\treturn this.reloadData(null, true);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\tconsole.warn(\"Pagination Error - no such pagination mode:\", this.mode);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_parseRemoteData(data){\r\n\t\tvar left, data, margin;\r\n\t\t\r\n\t\tif(typeof data.last_page === \"undefined\"){\r\n\t\t\tconsole.warn(\"Remote Pagination Error - Server response missing '\" + (this.options(\"dataReceiveParams\").last_page || \"last_page\") + \"' property\");\r\n\t\t}\r\n\t\t\r\n\t\tif(data.data){\r\n\t\t\tthis.max = parseInt(data.last_page) || 1;\r\n\r\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));\r\n\t\t\t\r\n\t\t\tif(this.progressiveLoad){\r\n\t\t\t\tswitch(this.mode){\r\n\t\t\t\t\tcase \"progressive_load\":\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.page == 1){\r\n\t\t\t\t\t\tthis.table.rowManager.setData(data.data, false, this.page == 1)\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.table.rowManager.addRows(data.data);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.page < this.max){\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tthis.nextPage();\r\n\t\t\t\t\t\t}, this.table.options.progressiveLoadDelay);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"progressive_scroll\":\r\n\t\t\t\t\tdata = this.page === 1 ? data.data : this.table.rowManager.getData().concat(data.data);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.table.rowManager.setData(data, this.page !== 1, this.page == 1);\r\n\t\t\t\t\t\r\n\t\t\t\t\tmargin = this.table.options.progressiveLoadScrollMargin || (this.table.rowManager.element.clientHeight * 2);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.table.rowManager.element.scrollHeight <= (this.table.rowManager.element.clientHeight + margin)){\r\n\t\t\t\t\t\tif(this.page < this.max){\r\n\t\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\t\tthis.nextPage();\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\t// left = this.table.rowManager.scrollLeft;\r\n\t\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\r\n\t\t\t\t// this.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\t// this.table.columnManager.scrollHorizontal(left);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Remote Pagination Error - Server response missing '\" + (this.options(\"dataReceiveParams\").data || \"data\") + \"' property\");\r\n\t\t}\r\n\t\t\r\n\t\treturn data.data;\r\n\t}\r\n\t\r\n\t//handle the footer element being redrawn\r\n\tfooterRedraw(){\r\n\t\tvar footer = this.table.footerManager.containerElement;\r\n\r\n\t\tif((Math.ceil(footer.clientWidth) - footer.scrollWidth) < 0){\r\n\t\t\tthis.pagesElement.style.display = 'none';\r\n\t\t}else{\r\n\t\t\tthis.pagesElement.style.display = '';\r\n\t\t\t\r\n\t\t\tif((Math.ceil(footer.clientWidth) - footer.scrollWidth) < 0){\r\n\t\t\t\tthis.pagesElement.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nPage.moduleName = \"page\";\r\n\r\n//load defaults\r\nPage.pageCounters = defaultPageCounters;\r\n\r\nexport default Page;","// read peristence information from storage\r\nexport default {\r\n\tlocal:function(id, type){\r\n\t\tvar data = localStorage.getItem(id + \"-\" + type);\r\n\r\n\t\treturn data ? JSON.parse(data) : false;\r\n\t},\r\n\tcookie:function(id, type){\r\n\t\tvar cookie = document.cookie,\r\n\t\tkey = id + \"-\" + type,\r\n\t\tcookiePos = cookie.indexOf(key + \"=\"),\r\n\t\tend, data;\r\n\r\n\t\t//if cookie exists, decode and load column data into tabulator\r\n\t\tif(cookiePos > -1){\r\n\t\t\tcookie = cookie.slice(cookiePos);\r\n\r\n\t\t\tend = cookie.indexOf(\";\");\r\n\r\n\t\t\tif(end > -1){\r\n\t\t\t\tcookie = cookie.slice(0, end);\r\n\t\t\t}\r\n\r\n\t\t\tdata = cookie.replace(key + \"=\", \"\");\r\n\t\t}\r\n\r\n\t\treturn data ? JSON.parse(data) : false;\r\n\t}\r\n};\r\n","//write persistence information to storage\r\nexport default {\r\n\tlocal:function(id, type, data){\r\n\t\tlocalStorage.setItem(id + \"-\" + type, JSON.stringify(data));\r\n\t},\r\n\tcookie:function(id, type, data){\r\n\t\tvar expireDate = new Date();\r\n\r\n\t\texpireDate.setDate(expireDate.getDate() + 10000);\r\n\r\n\t\tdocument.cookie = id + \"-\" + type + \"=\" + JSON.stringify(data) + \"; expires=\" + expireDate.toUTCString();\r\n\t}\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultReaders from './defaults/readers.js';\r\nimport defaultWriters from './defaults/writers.js';\r\n\r\nclass Persistence extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.mode = \"\";\r\n\t\tthis.id = \"\";\r\n\t\t// this.persistProps = [\"field\", \"width\", \"visible\"];\r\n\t\tthis.defWatcherBlock = false;\r\n\t\tthis.config = {};\r\n\t\tthis.readFunc = false;\r\n\t\tthis.writeFunc = false;\r\n\r\n\t\tthis.registerTableOption(\"persistence\", false);\r\n\t\tthis.registerTableOption(\"persistenceID\", \"\"); //key for persistent storage\r\n\t\tthis.registerTableOption(\"persistenceMode\", true); //mode for storing persistence information\r\n\t\tthis.registerTableOption(\"persistenceReaderFunc\", false); //function for handling persistence data reading\r\n\t\tthis.registerTableOption(\"persistenceWriterFunc\", false); //function for handling persistence data writing\r\n\t}\r\n\r\n\t// Test for whether localStorage is available for use.\r\n\tlocalStorageTest() {\r\n\t\tvar testKey = \"_tabulator_test\";\r\n\r\n\t\ttry {\r\n\t\t\twindow.localStorage.setItem( testKey, testKey);\r\n\t\t\twindow.localStorage.removeItem( testKey );\r\n\t\t\treturn true;\r\n\t\t} catch(e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//setup parameters\r\n\tinitialize(){\r\n\t\tif(this.table.options.persistence){\r\n\t\t\t//determine persistent layout storage type\r\n\t\t\tvar mode = this.table.options.persistenceMode,\r\n\t\t\tid = this.table.options.persistenceID,\r\n\t\t\tretreivedData;\r\n\r\n\t\t\tthis.mode = mode !== true ? mode : (this.localStorageTest() ? \"local\" : \"cookie\");\r\n\r\n\t\t\tif(this.table.options.persistenceReaderFunc){\r\n\t\t\t\tif(typeof this.table.options.persistenceReaderFunc === \"function\"){\r\n\t\t\t\t\tthis.readFunc = this.table.options.persistenceReaderFunc;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(Persistence.readers[this.table.options.persistenceReaderFunc]){\r\n\t\t\t\t\t\tthis.readFunc = Persistence.readers[this.table.options.persistenceReaderFunc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Persistence Read Error - invalid reader set\", this.table.options.persistenceReaderFunc);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(Persistence.readers[this.mode]){\r\n\t\t\t\t\tthis.readFunc = Persistence.readers[this.mode];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Persistence Read Error - invalid reader set\", this.mode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.persistenceWriterFunc){\r\n\t\t\t\tif(typeof this.table.options.persistenceWriterFunc === \"function\"){\r\n\t\t\t\t\tthis.writeFunc = this.table.options.persistenceWriterFunc;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(Persistence.writers[this.table.options.persistenceWriterFunc]){\r\n\t\t\t\t\t\tthis.writeFunc = Persistence.writers[this.table.options.persistenceWriterFunc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Persistence Write Error - invalid reader set\", this.table.options.persistenceWriterFunc);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(Persistence.writers[this.mode]){\r\n\t\t\t\t\tthis.writeFunc = Persistence.writers[this.mode];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Persistence Write Error - invalid writer set\", this.mode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//set storage tag\r\n\t\t\tthis.id = \"tabulator-\" + (id || (this.table.element.getAttribute(\"id\") || \"\"));\r\n\r\n\t\t\tthis.config = {\r\n\t\t\t\tsort:this.table.options.persistence === true || this.table.options.persistence.sort,\r\n\t\t\t\tfilter:this.table.options.persistence === true || this.table.options.persistence.filter,\r\n\t\t\t\tgroup:this.table.options.persistence === true || this.table.options.persistence.group,\r\n\t\t\t\tpage:this.table.options.persistence === true || this.table.options.persistence.page,\r\n\t\t\t\tcolumns:this.table.options.persistence === true ? [\"title\", \"width\", \"visible\"] : this.table.options.persistence.columns,\r\n\t\t\t};\r\n\r\n\t\t\t//load pagination data if needed\r\n\t\t\tif(this.config.page){\r\n\t\t\t\tretreivedData = this.retreiveData(\"page\");\r\n\r\n\t\t\t\tif(retreivedData){\r\n\t\t\t\t\tif(typeof retreivedData.paginationSize !== \"undefined\" && (this.config.page === true || this.config.page.size)){\r\n\t\t\t\t\t\tthis.table.options.paginationSize = retreivedData.paginationSize;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(typeof retreivedData.paginationInitialPage !== \"undefined\" && (this.config.page === true || this.config.page.page)){\r\n\t\t\t\t\t\tthis.table.options.paginationInitialPage = retreivedData.paginationInitialPage;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//load group data if needed\r\n\t\t\tif(this.config.group){\r\n\t\t\t\tretreivedData = this.retreiveData(\"group\");\r\n\r\n\t\t\t\tif(retreivedData){\r\n\t\t\t\t\tif(typeof retreivedData.groupBy !== \"undefined\" && (this.config.group === true || this.config.group.groupBy)){\r\n\t\t\t\t\t\tthis.table.options.groupBy = retreivedData.groupBy;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retreivedData.groupStartOpen !== \"undefined\" && (this.config.group === true || this.config.group.groupStartOpen)){\r\n\t\t\t\t\t\tthis.table.options.groupStartOpen = retreivedData.groupStartOpen;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retreivedData.groupHeader !== \"undefined\" && (this.config.group === true || this.config.group.groupHeader)){\r\n\t\t\t\t\t\tthis.table.options.groupHeader = retreivedData.groupHeader;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.columns){\r\n\t\t\t\tthis.table.options.columns = this.load(\"columns\", this.table.options.columns);\r\n\t\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t\t\tthis.subscribe(\"column-show\", this.save.bind(this, \"columns\"));\r\n\t\t\t\tthis.subscribe(\"column-hide\", this.save.bind(this, \"columns\"));\r\n\t\t\t\tthis.subscribe(\"column-moved\", this.save.bind(this, \"columns\"));\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-built\", this.tableBuilt.bind(this), 0);\r\n\r\n\t\t\tthis.subscribe(\"table-redraw\", this.tableRedraw.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"filter-changed\", this.eventSave.bind(this, \"filter\"));\r\n\t\t\tthis.subscribe(\"sort-changed\", this.eventSave.bind(this, \"sort\"));\r\n\t\t\tthis.subscribe(\"group-changed\", this.eventSave.bind(this, \"group\"));\r\n\t\t\tthis.subscribe(\"page-changed\", this.eventSave.bind(this, \"page\"));\r\n\t\t\tthis.subscribe(\"column-resized\", this.eventSave.bind(this, \"columns\"));\r\n\t\t\tthis.subscribe(\"layout-refreshed\", this.eventSave.bind(this, \"columns\"));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"getColumnLayout\", this.getColumnLayout.bind(this));\r\n\t\tthis.registerTableFunction(\"setColumnLayout\", this.setColumnLayout.bind(this));\r\n\t}\r\n\r\n\teventSave(type){\r\n\t\tif(this.config[type]){\r\n\t\t\tthis.save(type);\r\n\t\t}\r\n\t}\r\n\r\n\ttableBuilt(){\r\n\t\tvar options = this.table.options,\r\n\t\tsorters, filters;\r\n\r\n\t\tif(this.config.sort){\r\n\t\t\tsorters = this.load(\"sort\");\r\n\r\n\t\t\tif(!sorters === false){\r\n\t\t\t\tthis.table.options.initialSort = sorters;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.config.filter){\r\n\t\t\tfilters = this.load(\"filter\");\r\n\r\n\t\t\tif(!filters === false){\r\n\t\t\t\tthis.table.options.initialFilter = filters;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tif(force && this.config.columns){\r\n\t\t\tthis.save(\"columns\");\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tgetColumnLayout(){\r\n\t\treturn this.parseColumns(this.table.columnManager.getColumns());\r\n\t}\r\n\r\n\tsetColumnLayout(layout){\r\n\t\tthis.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns, layout))\r\n\t\treturn true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumn(column){\r\n\t\tvar def, keys;\r\n\r\n\t\tif(this.config.columns){\r\n\t\t\tthis.defWatcherBlock = true;\r\n\r\n\t\t\tdef = column.getDefinition();\r\n\r\n\t\t\tkeys = this.config.columns === true ? Object.keys(def) : this.config.columns;\r\n\r\n\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\tvar props = Object.getOwnPropertyDescriptor(def, key);\r\n\t\t\t\tvar value = def[key];\r\n\t\t\t\tif(props){\r\n\t\t\t\t\tObject.defineProperty(def, key, {\r\n\t\t\t\t\t\tset: function(newValue){\r\n\t\t\t\t\t\t\tvalue = newValue;\r\n\r\n\t\t\t\t\t\t\tif(!this.defWatcherBlock){\r\n\t\t\t\t\t\t\t\tthis.save(\"columns\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif(props.set){\r\n\t\t\t\t\t\t\t\tprops.set(newValue);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tget:function(){\r\n\t\t\t\t\t\t\tif(props.get){\r\n\t\t\t\t\t\t\t\tprops.get();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.defWatcherBlock = false;\r\n\t\t}\r\n\t}\r\n\r\n\t//load saved definitions\r\n\tload(type, current){\r\n\t\tvar data = this.retreiveData(type);\r\n\r\n\t\tif(current){\r\n\t\t\tdata = data ? this.mergeDefinition(current, data) : current;\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//retreive data from memory\r\n\tretreiveData(type){\r\n\t\treturn this.readFunc ? this.readFunc(this.id, type) : false;\r\n\t}\r\n\r\n\t//merge old and new column definitions\r\n\tmergeDefinition(oldCols, newCols){\r\n\t\tvar output = [];\r\n\r\n\t\tnewCols = newCols || [];\r\n\r\n\t\tnewCols.forEach((column, to) => {\r\n\t\t\tvar from = this._findColumn(oldCols, column),\r\n\t\t\tkeys;\r\n\r\n\t\t\tif(from){\r\n\t\t\t\tif(this.config.columns === true || this.config.columns == undefined){\r\n\t\t\t\t\tkeys = Object.keys(from);\r\n\t\t\t\t\tkeys.push(\"width\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tkeys = this.config.columns;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\t\tif(key !== \"columns\" && typeof column[key] !== \"undefined\"){\r\n\t\t\t\t\t\tfrom[key] = column[key];\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(from.columns){\r\n\t\t\t\t\tfrom.columns = this.mergeDefinition(from.columns, column.columns);\r\n\t\t\t\t}\r\n\r\n\t\t\t\toutput.push(from);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\toldCols.forEach((column, i) => {\r\n\t\t\tvar from = this._findColumn(newCols, column);\r\n\r\n\t\t\tif (!from) {\r\n\t\t\t\tif(output.length>i){\r\n\t\t\t\t\toutput.splice(i, 0, column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput.push(column);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//find matching columns\r\n\t_findColumn(columns, subject){\r\n\t\tvar type = subject.columns ? \"group\" : (subject.field ? \"field\" : \"object\");\r\n\r\n\t\treturn columns.find(function(col){\r\n\t\t\tswitch(type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\treturn col.title === subject.title && col.columns.length === subject.columns.length;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"field\":\r\n\t\t\t\treturn col.field === subject.field;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\treturn col === subject;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//save data\r\n\tsave(type){\r\n\t\tvar data = {};\r\n\r\n\t\tswitch(type){\r\n\t\t\tcase \"columns\":\r\n\t\t\tdata = this.parseColumns(this.table.columnManager.getColumns())\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"filter\":\r\n\t\t\tdata = this.table.modules.filter.getFilters();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"sort\":\r\n\t\t\tdata = this.validateSorters(this.table.modules.sort.getSort());\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tdata = this.getGroupConfig();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"page\":\r\n\t\t\tdata = this.getPageConfig();\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(this.writeFunc){\r\n\t\t\tthis.writeFunc(this.id, type, data);\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t//ensure sorters contain no function data\r\n\tvalidateSorters(data){\r\n\t\tdata.forEach(function(item){\r\n\t\t\titem.column = item.field;\r\n\t\t\tdelete item.field;\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\tgetGroupConfig(){\r\n\t\tvar data = {};\r\n\r\n\t\tif(this.config.group){\r\n\t\t\tif(this.config.group === true || this.config.group.groupBy){\r\n\t\t\t\tdata.groupBy = this.table.options.groupBy;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.group === true || this.config.group.groupStartOpen){\r\n\t\t\t\tdata.groupStartOpen = this.table.options.groupStartOpen;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.group === true || this.config.group.groupHeader){\r\n\t\t\t\tdata.groupHeader = this.table.options.groupHeader;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\tgetPageConfig(){\r\n\t\tvar data = {};\r\n\r\n\t\tif(this.config.page){\r\n\t\t\tif(this.config.page === true || this.config.page.size){\r\n\t\t\t\tdata.paginationSize = this.table.modules.page.getPageSize();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.page === true || this.config.page.page){\r\n\t\t\t\tdata.paginationInitialPage = this.table.modules.page.getPage();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\r\n\t//parse columns for data to store\r\n\tparseColumns(columns){\r\n\t\tvar definitions = [],\r\n\t\texcludedKeys = [\"headerContextMenu\", \"headerMenu\", \"contextMenu\", \"clickMenu\"];\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\tvar defStore = {},\r\n\t\t\tcolDef = column.getDefinition(),\r\n\t\t\tkeys;\r\n\r\n\t\t\tif(column.isGroup){\r\n\t\t\t\tdefStore.title = colDef.title;\r\n\t\t\t\tdefStore.columns = this.parseColumns(column.getColumns());\r\n\t\t\t}else{\r\n\t\t\t\tdefStore.field = column.getField();\r\n\r\n\t\t\t\tif(this.config.columns === true || this.config.columns == undefined){\r\n\t\t\t\t\tkeys = Object.keys(colDef);\r\n\t\t\t\t\tkeys.push(\"width\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tkeys = this.config.columns;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\t\tswitch(key){\r\n\t\t\t\t\t\tcase \"width\":\r\n\t\t\t\t\t\tdefStore.width = column.getWidth();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"visible\":\r\n\t\t\t\t\t\tdefStore.visible = column.visible;\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(typeof colDef[key] !== \"function\" && excludedKeys.indexOf(key) === -1){\r\n\t\t\t\t\t\t\tdefStore[key] = colDef[key];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tdefinitions.push(defStore);\r\n\t\t});\r\n\r\n\t\treturn definitions;\r\n\t}\r\n}\r\n\r\nPersistence.moduleName = \"persistence\";\r\n\r\nPersistence.moduleInitOrder = 1;\r\n\r\n//load defaults\r\nPersistence.readers = defaultReaders;\r\nPersistence.writers = defaultWriters;\r\n\r\nexport default Persistence;","import Module from '../../core/Module.js';\r\n\r\nclass Print extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.manualBlock = false;\r\n\r\n\t\tthis.registerTableOption(\"printAsHtml\", false); //enable print as html\r\n\t\tthis.registerTableOption(\"printFormatter\", false); //printing page formatter\r\n\t\tthis.registerTableOption(\"printHeader\", false); //page header contents\r\n\t\tthis.registerTableOption(\"printFooter\", false); //page footer contents\r\n\t\tthis.registerTableOption(\"printStyled\", true); //enable print as html styling\r\n\t\tthis.registerTableOption(\"printRowRange\", \"visible\"); //restrict print to visible rows only\r\n\t\tthis.registerTableOption(\"printConfig\", {}); //print config options\r\n\r\n\t\tthis.registerColumnOption(\"print\");\r\n\t\tthis.registerColumnOption(\"titlePrint\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.printAsHtml){\r\n\t\t\twindow.addEventListener(\"beforeprint\", this.replaceTable.bind(this));\r\n\t\t\twindow.addEventListener(\"afterprint\", this.cleanup.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"print\", this.printFullscreen.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\treplaceTable(){\r\n\t\tif(!this.manualBlock){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"tabulator-print-table\");\r\n\r\n\t\t\tthis.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig, this.table.options.printStyled, this.table.options.printRowRange, \"print\"));\r\n\r\n\t\t\tthis.table.element.style.display = \"none\";\r\n\r\n\t\t\tthis.table.element.parentNode.insertBefore(this.element, this.table.element);\r\n\t\t}\r\n\t}\r\n\r\n\tcleanup(){\r\n\t\tdocument.body.classList.remove(\"tabulator-print-fullscreen-hide\");\r\n\r\n\t\tif(this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\tthis.table.element.style.display = \"\";\r\n\t\t}\r\n\t}\r\n\r\n\tprintFullscreen(visible, style, config){\r\n\t\tvar scrollX = window.scrollX,\r\n\t\tscrollY = window.scrollY,\r\n\t\theaderEl = document.createElement(\"div\"),\r\n\t\tfooterEl = document.createElement(\"div\"),\r\n\t\ttableEl = this.table.modules.export.genereateTable(typeof config != \"undefined\" ? config : this.table.options.printConfig, typeof style != \"undefined\" ? style : this.table.options.printStyled, visible || this.table.options.printRowRange, \"print\"),\r\n\t\theaderContent, footerContent;\r\n\r\n\t\tthis.manualBlock = true;\r\n\r\n\t\tthis.element = document.createElement(\"div\");\r\n\t\tthis.element.classList.add(\"tabulator-print-fullscreen\");\r\n\r\n\t\tif(this.table.options.printHeader){\r\n\t\t\theaderEl.classList.add(\"tabulator-print-header\");\r\n\r\n\t\t\theaderContent = typeof this.table.options.printHeader == \"function\" ? this.table.options.printHeader.call(this.table) : this.table.options.printHeader;\r\n\r\n\t\t\tif(typeof headerContent == \"string\"){\r\n\t\t\t\theaderEl.innerHTML = headerContent;\r\n\t\t\t}else{\r\n\t\t\t\theaderEl.appendChild(headerContent);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.appendChild(headerEl);\r\n\t\t}\r\n\r\n\t\tthis.element.appendChild(tableEl);\r\n\r\n\t\tif(this.table.options.printFooter){\r\n\t\t\tfooterEl.classList.add(\"tabulator-print-footer\");\r\n\r\n\t\t\tfooterContent = typeof this.table.options.printFooter == \"function\" ? this.table.options.printFooter.call(this.table) : this.table.options.printFooter;\r\n\r\n\r\n\t\t\tif(typeof footerContent == \"string\"){\r\n\t\t\t\tfooterEl.innerHTML = footerContent;\r\n\t\t\t}else{\r\n\t\t\t\tfooterEl.appendChild(footerContent);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.appendChild(footerEl);\r\n\t\t}\r\n\r\n\t\tdocument.body.classList.add(\"tabulator-print-fullscreen-hide\");\r\n\t\tdocument.body.appendChild(this.element);\r\n\r\n\t\tif(this.table.options.printFormatter){\r\n\t\t\tthis.table.options.printFormatter(this.element, tableEl);\r\n\t\t}\r\n\r\n\t\twindow.print();\r\n\r\n\t\tthis.cleanup();\r\n\r\n\t\twindow.scrollTo(scrollX, scrollY);\r\n\r\n\t\tthis.manualBlock = false;\r\n\t}\r\n}\r\n\r\nPrint.moduleName = \"print\";\r\n\r\nexport default Print;","import Module from '../../core/Module.js';\r\n\r\nclass ReactiveData extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.data = false;\r\n\t\tthis.blocked = false; //block reactivity while performing update\r\n\t\tthis.origFuncs = {}; // hold original data array functions to allow replacement after data is done with\r\n\t\tthis.currentVersion = 0;\r\n\r\n\t\tthis.registerTableOption(\"reactiveData\", false); //enable data reactivity\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.reactiveData){\r\n\t\t\tthis.subscribe(\"cell-value-save-before\", this.block.bind(this));\r\n\t\t\tthis.subscribe(\"cell-value-save-after\", this.unblock.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-save-before\", this.block.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-save-after\", this.unblock.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-init-after\", this.watchRow.bind(this));\r\n\t\t\tthis.subscribe(\"data-processing\", this.watchData.bind(this));\r\n\t\t\tthis.subscribe(\"table-destroy\", this.unwatchData.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\twatchData(data){\r\n\t\tvar self = this,\r\n\t\tpushFunc, version;\r\n\r\n\t\tthis.currentVersion ++;\r\n\r\n\t\tversion = this.currentVersion;\r\n\r\n\t\tthis.unwatchData();\r\n\r\n\t\tthis.data = data;\r\n\r\n\t\t//override array push function\r\n\t\tthis.origFuncs.push = data.push;\r\n\r\n\t\tObject.defineProperty(this.data, \"push\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments);\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\targs.forEach((arg) => {\r\n\t\t\t\t\t\tself.table.rowManager.addRowActual(arg, false);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.push.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//override array unshift function\r\n\t\tthis.origFuncs.unshift = data.unshift;\r\n\r\n\t\tObject.defineProperty(this.data, \"unshift\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments);\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\targs.forEach((arg) => {\r\n\t\t\t\t\t\tself.table.rowManager.addRowActual(arg, true);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.unshift.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\t//override array shift function\r\n\t\tthis.origFuncs.shift = data.shift;\r\n\r\n\t\tObject.defineProperty(this.data, \"shift\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar row;\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tif(self.data.length){\r\n\t\t\t\t\t\trow = self.table.rowManager.getRowFromDataObject(self.data[0]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.deleteActual();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.shift.call(data);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//override array pop function\r\n\t\tthis.origFuncs.pop = data.pop;\r\n\r\n\t\tObject.defineProperty(this.data, \"pop\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar row;\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tif(self.data.length){\r\n\t\t\t\t\t\trow = self.table.rowManager.getRowFromDataObject(self.data[self.data.length - 1]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.deleteActual();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn self.origFuncs.pop.call(data);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\t//override array splice function\r\n\t\tthis.origFuncs.splice = data.splice;\r\n\r\n\t\tObject.defineProperty(this.data, \"splice\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments),\r\n\t\t\t\tstart = args[0] < 0 ? data.length + args[0] : args[0],\r\n\t\t\t\tend = args[1],\r\n\t\t\t\tnewRows = args[2] ? args.slice(2) : false,\r\n\t\t\t\tstartRow;\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\r\n\t\t\t\t\t//add new rows\r\n\t\t\t\t\tif(newRows){\r\n\t\t\t\t\t\tstartRow = data[start] ? self.table.rowManager.getRowFromDataObject(data[start]) : false;\r\n\r\n\t\t\t\t\t\tif(startRow){\r\n\t\t\t\t\t\t\tnewRows.forEach((rowData) => {\r\n\t\t\t\t\t\t\t\tself.table.rowManager.addRowActual(rowData, true, startRow, true);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnewRows = newRows.slice().reverse();\r\n\r\n\t\t\t\t\t\t\tnewRows.forEach((rowData) => {\r\n\t\t\t\t\t\t\t\tself.table.rowManager.addRowActual(rowData, true, false, true);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//delete removed rows\r\n\t\t\t\t\tif(end !== 0){\r\n\t\t\t\t\t\tvar oldRows = data.slice(start, typeof args[1] === \"undefined\" ? args[1] : start + end);\r\n\r\n\t\t\t\t\t\toldRows.forEach((rowData, i) => {\r\n\t\t\t\t\t\t\tvar row = self.table.rowManager.getRowFromDataObject(rowData);\r\n\r\n\t\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\t\trow.deleteActual(i !== oldRows.length - 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(newRows || end !== 0){\r\n\t\t\t\t\t\tself.table.rowManager.reRenderInPosition();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.splice.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tunwatchData(){\r\n\t\tif(this.data !== false){\r\n\t\t\tfor(var key in this.origFuncs){\r\n\t\t\t\tObject.defineProperty(this.data, key, {\r\n\t\t\t\t\tenumerable: true,\r\n\t\t\t\t\tconfigurable:true,\r\n\t\t\t\t\twritable:true,\r\n\t\t\t\t\tvalue: this.origFuncs.key,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\twatchRow(row){\r\n\t\tvar data = row.getData();\r\n\r\n\t\tthis.blocked = true;\r\n\r\n\t\tfor(var key in data){\r\n\t\t\tthis.watchKey(row, data, key);\r\n\t\t}\r\n\r\n\t\tif(this.table.options.dataTree){\r\n\t\t\tthis.watchTreeChildren(row);\r\n\t\t}\r\n\r\n\t\tthis.blocked = false;\r\n\t}\r\n\r\n\twatchTreeChildren (row){\r\n\t\tvar childField = row.getData()[this.table.options.dataTreeChildField],\r\n\t\torigFuncs = {};\r\n\r\n\t\tfunction rebuildTree(){\r\n\t\t\tthis.table.modules.dataTree.initializeRow(row);\r\n\t\t\tthis.table.modules.dataTree.layoutRow(row);\r\n\t\t\tthis.table.rowManager.refreshActiveData(\"tree\", false, true);\r\n\t\t}\r\n\r\n\t\tif(childField){\r\n\r\n\t\t\torigFuncs.push = childField.push;\r\n\r\n\t\t\tObject.defineProperty(childField, \"push\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.push.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.unshift = childField.unshift;\r\n\r\n\t\t\tObject.defineProperty(childField, \"unshift\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.unshift.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.shift = childField.shift;\r\n\r\n\t\t\tObject.defineProperty(childField, \"shift\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.shift.call(childField);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.pop = childField.pop;\r\n\r\n\t\t\tObject.defineProperty(childField, \"pop\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.pop.call(childField);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.splice = childField.splice;\r\n\r\n\t\t\tObject.defineProperty(childField, \"splice\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.splice.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\twatchKey(row, data, key){\r\n\t\tvar props = Object.getOwnPropertyDescriptor(data, key),\r\n\t\tvalue = data[key],\r\n\t\tversion = this.currentVersion;\r\n\r\n\t\tObject.defineProperty(data, key, {\r\n\t\t\tset: (newValue) => {\r\n\t\t\t\tvalue = newValue;\r\n\t\t\t\tif(!this.blocked && version === this.currentVersion){\r\n\t\t\t\t\tvar update = {};\r\n\t\t\t\t\tupdate[key] = newValue;\r\n\t\t\t\t\trow.updateData(update);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(props.set){\r\n\t\t\t\t\tprops.set(newValue);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tget:() => {\r\n\r\n\t\t\t\tif(props.get){\r\n\t\t\t\t\tprops.get();\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tunwatchRow(row){\r\n\t\tvar data = row.getData();\r\n\r\n\t\tfor(var key in data){\r\n\t\t\tObject.defineProperty(data, key, {\r\n\t\t\t\tvalue:data[key],\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tblock(){\r\n\t\tthis.blocked = true;\r\n\t}\r\n\r\n\tunblock(){\r\n\t\tthis.blocked = false;\r\n\t}\r\n}\r\n\r\nReactiveData.moduleName = \"reactiveData\";\r\n\r\nexport default ReactiveData;\r\n\r\n\r\n\r\n","import Module from '../../core/Module.js';\r\n\r\nclass ResizeColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.startColumn = false;\r\n\t\tthis.startX = false;\r\n\t\tthis.startWidth = false;\r\n\t\tthis.handle = null;\r\n\t\tthis.prevHandle = null;\r\n\t\t\r\n\t\tthis.registerColumnOption(\"resizable\", true);\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\t// if(this.table.options.resizableColumns){\r\n\t\tthis.subscribe(\"cell-layout\", this.layoutCellHandles.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.layoutColumnHeader.bind(this));\r\n\t\t// }\r\n\t}\r\n\t\r\n\tlayoutCellHandles(cell){\r\n\t\tif(cell.row.type === \"row\"){\r\n\t\t\tthis.initializeColumn(\"cell\", cell.column, cell.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutColumnHeader(column){\r\n\t\tthis.initializeColumn(\"header\", column, column.element);\r\n\t}\r\n\t\r\n\tinitializeColumn(type, column, element){\r\n\t\tvar self = this,\r\n\t\tvariableHeight = false,\r\n\t\tmode = column.definition.resizable;\r\n\t\t\r\n\t\t//set column resize mode\r\n\t\tif(type === \"header\"){\r\n\t\t\tvariableHeight = column.definition.formatter == \"textarea\" || column.definition.variableHeight;\r\n\t\t\tcolumn.modules.resize = {variableHeight:variableHeight};\r\n\t\t}\r\n\t\t\r\n\t\tif(mode === true || mode == type){\r\n\t\t\t\r\n\t\t\tvar handle = document.createElement('div');\r\n\t\t\thandle.className = \"tabulator-col-resize-handle\";\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tvar prevHandle = document.createElement('div');\r\n\t\t\tprevHandle.className = \"tabulator-col-resize-handle prev\";\r\n\t\t\t\r\n\t\t\thandle.addEventListener(\"click\", function(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tvar handleDown = function(e){\r\n\t\t\t\tvar nearestColumn = column.getLastColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn && self._checkResizability(nearestColumn)){\r\n\t\t\t\t\tself.startColumn = column;\r\n\t\t\t\t\tself._mouseDown(e, nearestColumn, handle);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\thandle.addEventListener(\"mousedown\", handleDown);\r\n\t\t\thandle.addEventListener(\"touchstart\", handleDown, {passive: true});\r\n\t\t\t\r\n\t\t\t//reszie column on double click\r\n\t\t\thandle.addEventListener(\"dblclick\", function(e){\r\n\t\t\t\tvar col = column.getLastColumn(),\r\n\t\t\t\toldWidth;\r\n\t\t\t\t\r\n\t\t\t\tif(col && self._checkResizability(col)){\r\n\t\t\t\t\toldWidth = col.getWidth();\r\n\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tcol.reinitializeWidth(true);\r\n\r\n\t\t\t\t\tif(oldWidth !== col.getWidth()){\r\n\t\t\t\t\t\tself.dispatch(\"column-resized\", col);\r\n\t\t\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", col.getComponent());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tprevHandle.addEventListener(\"click\", function(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tvar prevHandleDown = function(e){\r\n\t\t\t\tvar nearestColumn, colIndex, prevColumn;\r\n\t\t\t\t\r\n\t\t\t\tnearestColumn = column.getFirstColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn){\r\n\t\t\t\t\tcolIndex = self.table.columnManager.findColumnIndex(nearestColumn);\r\n\t\t\t\t\tprevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(prevColumn && self._checkResizability(prevColumn)){\r\n\t\t\t\t\t\tself.startColumn = column;\r\n\t\t\t\t\t\tself._mouseDown(e, prevColumn, prevHandle);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tprevHandle.addEventListener(\"mousedown\", prevHandleDown);\r\n\t\t\tprevHandle.addEventListener(\"touchstart\", prevHandleDown, {passive: true});\r\n\t\t\t\r\n\t\t\t//resize column on double click\r\n\t\t\tprevHandle.addEventListener(\"dblclick\", function(e){\r\n\t\t\t\tvar nearestColumn, colIndex, prevColumn;\r\n\t\t\t\t\r\n\t\t\t\tnearestColumn = column.getFirstColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn){\r\n\t\t\t\t\tcolIndex = self.table.columnManager.findColumnIndex(nearestColumn);\r\n\t\t\t\t\tprevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(prevColumn && self._checkResizability(prevColumn)){\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tprevColumn.reinitializeWidth(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\telement.appendChild(handle);\r\n\t\t\telement.appendChild(prevHandle);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_checkResizability(column){\r\n\t\treturn column.definition.resizable;\r\n\t}\r\n\t\r\n\t_mouseDown(e, column, handle){\r\n\t\tvar self = this;\r\n\t\t\r\n\t\tself.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tfunction mouseMove(e){\r\n\t\t\t// self.table.columnManager.tempScrollBlock();\r\n\t\t\t\r\n\t\t\tif(self.table.rtl){\r\n\t\t\t\tcolumn.setWidth(self.startWidth - ((typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX) - self.startX));\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.setWidth(self.startWidth + ((typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX) - self.startX));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself.table.columnManager.renderer.rerenderColumns(true);\r\n\t\t\t\r\n\t\t\tif(!self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight){\r\n\t\t\t\tcolumn.checkCellHeights();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfunction mouseUp(e){\r\n\t\t\t\r\n\t\t\t//block editor from taking action while resizing is taking place\r\n\t\t\tif(self.startColumn.modules.edit){\r\n\t\t\t\tself.startColumn.modules.edit.blocked = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight){\r\n\t\t\t\tcolumn.checkCellHeights();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", mouseUp);\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", mouseMove);\r\n\t\t\t\r\n\t\t\thandle.removeEventListener(\"touchmove\", mouseMove);\r\n\t\t\thandle.removeEventListener(\"touchend\", mouseUp);\r\n\t\t\t\r\n\t\t\tself.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tif(self.startWidth !== column.getWidth()){\r\n\t\t\t\tself.dispatch(\"column-resized\", column);\r\n\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", column.getComponent());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\te.stopPropagation(); //prevent resize from interfereing with movable columns\r\n\t\t\r\n\t\t//block editor from taking action while resizing is taking place\r\n\t\tif(self.startColumn.modules.edit){\r\n\t\t\tself.startColumn.modules.edit.blocked = true;\r\n\t\t}\r\n\t\t\r\n\t\tself.startX = typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX;\r\n\t\tself.startWidth = column.getWidth();\r\n\t\t\r\n\t\tdocument.body.addEventListener(\"mousemove\", mouseMove);\r\n\t\tdocument.body.addEventListener(\"mouseup\", mouseUp);\r\n\t\thandle.addEventListener(\"touchmove\", mouseMove, {passive: true});\r\n\t\thandle.addEventListener(\"touchend\", mouseUp);\r\n\t}\r\n}\r\n\r\nResizeColumns.moduleName = \"resizeColumns\";\r\n\r\nexport default ResizeColumns;","import Module from '../../core/Module.js';\r\n\r\nclass ResizeRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.startColumn = false;\r\n\t\tthis.startY = false;\r\n\t\tthis.startHeight = false;\r\n\t\tthis.handle = null;\r\n\t\tthis.prevHandle = null;\r\n\r\n\t\tthis.registerTableOption(\"resizableRows\", false); //resizable rows\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.resizableRows){\r\n\t\t\tthis.subscribe(\"row-layout-after\", this.initializeRow.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\trowEl = row.getElement();\r\n\r\n\t\tvar handle = document.createElement('div');\r\n\t\thandle.className = \"tabulator-row-resize-handle\";\r\n\r\n\t\tvar prevHandle = document.createElement('div');\r\n\t\tprevHandle.className = \"tabulator-row-resize-handle prev\";\r\n\r\n\t\thandle.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tvar handleDown = function(e){\r\n\t\t\tself.startRow = row;\r\n\t\t\tself._mouseDown(e, row, handle);\r\n\t\t};\r\n\r\n\t\thandle.addEventListener(\"mousedown\", handleDown);\r\n\t\thandle.addEventListener(\"touchstart\", handleDown, {passive: true});\r\n\r\n\t\tprevHandle.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tvar prevHandleDown = function(e){\r\n\t\t\tvar prevRow = self.table.rowManager.prevDisplayRow(row);\r\n\r\n\t\t\tif(prevRow){\r\n\t\t\t\tself.startRow = prevRow;\r\n\t\t\t\tself._mouseDown(e, prevRow, prevHandle);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tprevHandle.addEventListener(\"mousedown\",prevHandleDown);\r\n\t\tprevHandle.addEventListener(\"touchstart\",prevHandleDown, {passive: true});\r\n\r\n\t\trowEl.appendChild(handle);\r\n\t\trowEl.appendChild(prevHandle);\r\n\t}\r\n\r\n\t_mouseDown(e, row, handle){\r\n\t\tvar self = this;\r\n\r\n\t\tself.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tfunction mouseMove(e){\r\n\t\t\trow.setHeight(self.startHeight + ((typeof e.screenY === \"undefined\" ? e.touches[0].screenY : e.screenY) - self.startY));\r\n\t\t}\r\n\r\n\t\tfunction mouseUp(e){\r\n\r\n\t\t\t// //block editor from taking action while resizing is taking place\r\n\t\t\t// if(self.startColumn.modules.edit){\r\n\t\t\t// \tself.startColumn.modules.edit.blocked = false;\r\n\t\t\t// }\r\n\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", mouseMove);\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", mouseMove);\r\n\r\n\t\t\thandle.removeEventListener(\"touchmove\", mouseMove);\r\n\t\t\thandle.removeEventListener(\"touchend\", mouseUp);\r\n\r\n\t\t\tself.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tself.dispatchExternal(\"rowResized\", row.getComponent());\r\n\t\t}\r\n\r\n\t\te.stopPropagation(); //prevent resize from interfereing with movable columns\r\n\r\n\t\t//block editor from taking action while resizing is taking place\r\n\t\t// if(self.startColumn.modules.edit){\r\n\t\t// \tself.startColumn.modules.edit.blocked = true;\r\n\t\t// }\r\n\r\n\t\tself.startY = typeof e.screenY === \"undefined\" ? e.touches[0].screenY : e.screenY;\r\n\t\tself.startHeight = row.getHeight();\r\n\r\n\t\tdocument.body.addEventListener(\"mousemove\", mouseMove);\r\n\t\tdocument.body.addEventListener(\"mouseup\", mouseUp);\r\n\r\n\t\thandle.addEventListener(\"touchmove\", mouseMove, {passive: true});\r\n\t\thandle.addEventListener(\"touchend\", mouseUp);\r\n\t}\r\n}\r\n\r\nResizeRows.moduleName = \"resizeRows\";\r\n\r\nexport default ResizeRows;","import Module from '../../core/Module.js';\r\n\r\nclass ResizeTable extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.binding = false;\r\n\t\tthis.observer = false;\r\n\t\tthis.containerObserver = false;\r\n\r\n\t\tthis.tableHeight = 0;\r\n\t\tthis.tableWidth = 0;\r\n\t\tthis.containerHeight = 0;\r\n\t\tthis.containerWidth = 0;\r\n\r\n\t\tthis.autoResize = false;\r\n\r\n\t\tthis.registerTableOption(\"autoResize\", true); //auto resize table\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.autoResize){\r\n\t\t\tvar table = this.table,\r\n\t\t\ttableStyle;\r\n\r\n\t\t\tthis.tableHeight = table.element.clientHeight;\r\n\t\t\tthis.tableWidth = table.element.clientWidth;\r\n\r\n\t\t\tif(table.element.parentNode){\r\n\t\t\t\tthis.containerHeight = table.element.parentNode.clientHeight;\r\n\t\t\t\tthis.containerWidth = table.element.parentNode.clientWidth;\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof ResizeObserver !== \"undefined\" && table.rowManager.getRenderMode() === \"virtual\"){\r\n\r\n\t\t\t\tthis.autoResize = true;\r\n\r\n\t\t\t\tthis.observer = new ResizeObserver((entry) => {\r\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\tvar nodeHeight = Math.floor(entry[0].contentRect.height);\r\n\t\t\t\t\t\tvar nodeWidth = Math.floor(entry[0].contentRect.width);\r\n\r\n\t\t\t\t\t\tif(this.tableHeight != nodeHeight || this.tableWidth != nodeWidth){\r\n\t\t\t\t\t\t\tthis.tableHeight = nodeHeight;\r\n\t\t\t\t\t\t\tthis.tableWidth = nodeWidth;\r\n\r\n\t\t\t\t\t\t\tif(table.element.parentNode){\r\n\t\t\t\t\t\t\t\tthis.containerHeight = table.element.parentNode.clientHeight;\r\n\t\t\t\t\t\t\t\tthis.containerWidth = table.element.parentNode.clientWidth;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tthis.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.observer.observe(table.element);\r\n\r\n\t\t\t\ttableStyle = window.getComputedStyle(table.element);\r\n\r\n\t\t\t\tif(this.table.element.parentNode && !this.table.rowManager.fixedHeight && (tableStyle.getPropertyValue(\"max-height\") || tableStyle.getPropertyValue(\"min-height\"))){\r\n\r\n\t\t\t\t\tthis.containerObserver = new ResizeObserver((entry) => {\r\n\t\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\t\tvar nodeHeight = Math.floor(entry[0].contentRect.height);\r\n\t\t\t\t\t\t\tvar nodeWidth = Math.floor(entry[0].contentRect.width);\r\n\r\n\t\t\t\t\t\t\tif(this.containerHeight != nodeHeight || this.containerWidth != nodeWidth){\r\n\t\t\t\t\t\t\t\tthis.containerHeight = nodeHeight;\r\n\t\t\t\t\t\t\t\tthis.containerWidth = nodeWidth;\r\n\t\t\t\t\t\t\t\tthis.tableHeight = table.element.clientHeight;\r\n\t\t\t\t\t\t\t\tthis.tableWidth = table.element.clientWidth;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\ttable.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tthis.containerObserver.observe(this.table.element.parentNode);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.subscribe(\"table-resize\", this.tableResized.bind(this));\r\n\r\n\t\t\t}else{\r\n\t\t\t\tthis.binding = function(){\r\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile && !table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\ttable.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\twindow.addEventListener(\"resize\", this.binding);\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\ttableResized(){\r\n\t\tthis.table.rowManager.redraw();\r\n\t}\r\n\r\n\tclearBindings(){\r\n\t\tif(this.binding){\r\n\t\t\twindow.removeEventListener(\"resize\", this.binding);\r\n\t\t}\r\n\r\n\t\tif(this.observer){\r\n\t\t\tthis.observer.unobserve(this.table.element);\r\n\t\t}\r\n\r\n\t\tif(this.containerObserver){\r\n\t\t\tthis.containerObserver.unobserve(this.table.element.parentNode);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nResizeTable.moduleName = \"resizeTable\";\r\n\r\nexport default ResizeTable;","import Module from '../../core/Module.js';\r\n\r\nclass ResponsiveLayout extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.columns = [];\r\n\t\tthis.hiddenColumns = [];\r\n\t\tthis.mode = \"\";\r\n\t\tthis.index = 0;\r\n\t\tthis.collapseFormatter = [];\r\n\t\tthis.collapseStartOpen = true;\r\n\t\tthis.collapseHandleColumn = false;\r\n\r\n\t\tthis.registerTableOption(\"responsiveLayout\", false); //responsive layout flags\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseStartOpen\", true); //start showing collapsed data\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseUseFormatters\", true); //responsive layout collapse formatter\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseFormatter\", false); //responsive layout collapse formatter\r\n\r\n\t\tthis.registerColumnOption(\"responsive\");\r\n\t}\r\n\r\n\t//generate responsive columns list\r\n\tinitialize(){\r\n\t\tvar self = this,\r\n\t\tcolumns = [];\r\n\r\n\t\tif(this.table.options.responsiveLayout){\r\n\t\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\t\tthis.subscribe(\"column-show\", this.updateColumnVisibility.bind(this));\r\n\t\t\tthis.subscribe(\"column-hide\", this.updateColumnVisibility.bind(this));\r\n\t\t\tthis.subscribe(\"columns-loaded\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-moved\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-add\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-delete\", this.initializeResponsivity.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"table-redrawing\", this.tableRedraw.bind(this));\r\n\r\n\t\t\tif(this.table.options.responsiveLayout === \"collapse\"){\r\n\t\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\t\tthis.subscribe(\"row-layout\", this.layoutRow.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tif([\"fitColumns\", \"fitDataStretch\"].indexOf(this.layoutMode()) === -1){\r\n\t\t\tif(!force){\r\n\t\t\t\tthis.update();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeResponsivity(){\r\n\t\tvar columns = [];\r\n\r\n\t\tthis.mode = this.table.options.responsiveLayout;\r\n\t\tthis.collapseFormatter = this.table.options.responsiveLayoutCollapseFormatter || this.formatCollapsedData;\r\n\t\tthis.collapseStartOpen = this.table.options.responsiveLayoutCollapseStartOpen;\r\n\t\tthis.hiddenColumns = [];\r\n\r\n\t\t//determine level of responsivity for each column\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column, i) => {\r\n\t\t\tif(column.modules.responsive){\r\n\t\t\t\tif(column.modules.responsive.order && column.modules.responsive.visible){\r\n\t\t\t\t\tcolumn.modules.responsive.index = i;\r\n\t\t\t\t\tcolumns.push(column);\r\n\r\n\t\t\t\t\tif(!column.visible && this.mode === \"collapse\"){\r\n\t\t\t\t\t\tthis.hiddenColumns.push(column);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//sort list by responsivity\r\n\t\tcolumns = columns.reverse();\r\n\t\tcolumns = columns.sort((a, b) => {\r\n\t\t\tvar diff = b.modules.responsive.order - a.modules.responsive.order;\r\n\t\t\treturn diff || (b.modules.responsive.index - a.modules.responsive.index);\r\n\t\t});\r\n\r\n\t\tthis.columns = columns;\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tthis.generateCollapsedContent();\r\n\t\t}\r\n\r\n\t\t//assign collapse column\r\n\t\tfor (let col of this.table.columnManager.columnsByIndex){\r\n\t\t\tif(col.definition.formatter == \"responsiveCollapse\"){\r\n\t\t\t\tthis.collapseHandleColumn = col;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.collapseHandleColumn){\r\n\t\t\tif(this.hiddenColumns.length){\r\n\t\t\t\tthis.collapseHandleColumn.show();\r\n\t\t\t}else{\r\n\t\t\t\tthis.collapseHandleColumn.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//define layout information\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.getDefinition();\r\n\r\n\t\tcolumn.modules.responsive = {order: typeof def.responsive === \"undefined\" ? 1 : def.responsive, visible:def.visible === false ? false : true};\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar el;\r\n\r\n\t\tif(row.type !== \"calc\"){\r\n\t\t\tel = document.createElement(\"div\");\r\n\t\t\tel.classList.add(\"tabulator-responsive-collapse\");\r\n\r\n\t\t\trow.modules.responsiveLayout = {\r\n\t\t\t\telement:el,\r\n\t\t\t\topen:this.collapseStartOpen,\r\n\t\t\t};\r\n\r\n\t\t\tif(!this.collapseStartOpen){\r\n\t\t\t\tel.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tlayoutRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tif(row.modules.responsiveLayout){\r\n\t\t\trowEl.appendChild(row.modules.responsiveLayout.element);\r\n\t\t\tthis.generateCollapsedRowContent(row);\r\n\t\t}\r\n\t}\r\n\r\n\t//update column visibility\r\n\tupdateColumnVisibility(column, responsiveToggle){\r\n\t\tif(!responsiveToggle && column.modules.responsive){\r\n\t\t\tcolumn.modules.responsive.visible = column.visible;\r\n\t\t\tthis.initializeResponsivity();\r\n\t\t}\r\n\t}\r\n\r\n\thideColumn(column){\r\n\t\tvar colCount = this.hiddenColumns.length;\r\n\r\n\t\tcolumn.hide(false, true);\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tthis.hiddenColumns.unshift(column);\r\n\t\t\tthis.generateCollapsedContent();\r\n\r\n\t\t\tif(this.collapseHandleColumn && !colCount){\r\n\t\t\t\tthis.collapseHandleColumn.show();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tshowColumn(column){\r\n\t\tvar index;\r\n\r\n\t\tcolumn.show(false, true);\r\n\t\t//set column width to prevent calculation loops on uninitialized columns\r\n\t\tcolumn.setWidth(column.getWidth());\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tindex = this.hiddenColumns.indexOf(column);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.hiddenColumns.splice(index, 1);\r\n\t\t\t}\r\n\r\n\t\t\tthis.generateCollapsedContent();\r\n\r\n\t\t\tif(this.collapseHandleColumn && !this.hiddenColumns.length){\r\n\t\t\t\tthis.collapseHandleColumn.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//redraw columns to fit space\r\n\tupdate(){\r\n\t\tvar self = this,\r\n\t\tworking = true;\r\n\r\n\t\twhile(working){\r\n\r\n\t\t\tlet width = self.table.modules.layout.getMode() == \"fitColumns\" ? self.table.columnManager.getFlexBaseWidth() : self.table.columnManager.getWidth();\r\n\r\n\t\t\tlet diff = (self.table.options.headerVisible ? self.table.columnManager.element.clientWidth : self.table.element.clientWidth) - width;\r\n\r\n\t\t\tif(diff < 0){\r\n\t\t\t\t//table is too wide\r\n\t\t\t\tlet column = self.columns[self.index];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tself.hideColumn(column);\r\n\t\t\t\t\tself.index ++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tworking = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\r\n\t\t\t\t//table has spare space\r\n\t\t\t\tlet column = self.columns[self.index -1];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tif(diff > 0){\r\n\t\t\t\t\t\tif(diff >= column.getWidth()){\r\n\t\t\t\t\t\t\tself.showColumn(column);\r\n\t\t\t\t\t\t\tself.index --;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tworking = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tworking = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(!self.table.rowManager.activeRowsCount){\r\n\t\t\t\tself.table.rowManager.renderEmptyScroll();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateCollapsedContent(){\r\n\t\tvar self = this,\r\n\t\trows = this.table.rowManager.getDisplayRows();\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\tself.generateCollapsedRowContent(row);\r\n\t\t});\r\n\t}\r\n\r\n\tgenerateCollapsedRowContent(row){\r\n\t\tvar el, contents;\r\n\r\n\t\tif(row.modules.responsiveLayout){\r\n\t\t\tel = row.modules.responsiveLayout.element;\r\n\r\n\t\t\twhile(el.firstChild) el.removeChild(el.firstChild);\r\n\r\n\t\t\tcontents = this.collapseFormatter(this.generateCollapsedRowData(row));\r\n\t\t\tif(contents){\r\n\t\t\t\tel.appendChild(contents);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateCollapsedRowData(row){\r\n\t\tvar self = this,\r\n\t\tdata = row.getData(),\r\n\t\toutput = [],\r\n\t\tmockCellComponent;\r\n\r\n\t\tthis.hiddenColumns.forEach(function(column){\r\n\t\t\tvar value = column.getFieldValue(data);\r\n\r\n\t\t\tif(column.definition.title && column.field){\r\n\t\t\t\tif(column.modules.format && self.table.options.responsiveLayoutCollapseUseFormatters){\r\n\r\n\t\t\t\t\tmockCellComponent = {\r\n\t\t\t\t\t\tvalue:false,\r\n\t\t\t\t\t\tdata:{},\r\n\t\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetData:function(){\r\n\t\t\t\t\t\t\treturn data;\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\t\treturn document.createElement(\"div\");\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\t\treturn row.getComponent();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tfunction onRendered(callback){\r\n\t\t\t\t\t\tcallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\toutput.push({\r\n\t\t\t\t\t\tfield: column.field,\r\n\t\t\t\t\t\ttitle: column.definition.title,\r\n\t\t\t\t\t\tvalue: column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params, onRendered)\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput.push({\r\n\t\t\t\t\t\tfield: column.field,\r\n\t\t\t\t\t\ttitle: column.definition.title,\r\n\t\t\t\t\t\tvalue: value\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tformatCollapsedData(data){\r\n\t\tvar list = document.createElement(\"table\");\r\n\r\n\t\tdata.forEach(function(item){\r\n\t\t\tvar row = document.createElement(\"tr\");\r\n\t\t\tvar titleData = document.createElement(\"td\");\r\n\t\t\tvar valueData = document.createElement(\"td\");\r\n\t\t\tvar node_content;\r\n\r\n\t\t\tvar titleHighlight = document.createElement(\"strong\");\r\n\t\t\ttitleData.appendChild(titleHighlight);\r\n\t\t\tthis.langBind(\"columns|\" + item.field, function(text){\r\n\t\t\t\ttitleHighlight.innerHTML = text || item.title;\r\n\t\t\t});\r\n\r\n\t\t\tif(item.value instanceof Node){\r\n\t\t\t\tnode_content = document.createElement(\"div\");\r\n\t\t\t\tnode_content.appendChild(item.value);\r\n\t\t\t\tvalueData.appendChild(node_content);\r\n\t\t\t}else{\r\n\t\t\t\tvalueData.innerHTML = item.value;\r\n\t\t\t}\r\n\r\n\t\t\trow.appendChild(titleData);\r\n\t\t\trow.appendChild(valueData);\r\n\t\t\tlist.appendChild(row);\r\n\t\t}, this);\r\n\r\n\t\treturn Object.keys(data).length ? list : \"\";\r\n\t}\r\n}\r\n\r\nResponsiveLayout.moduleName = \"responsiveLayout\";\r\n\r\nexport default ResponsiveLayout;","import Module from '../../core/Module.js';\r\n\r\nclass SelectRow extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.selecting = false; //flag selecting in progress\r\n\t\tthis.lastClickedRow = false; //last clicked row\r\n\t\tthis.selectPrev = []; //hold previously selected element for drag drop selection\r\n\t\tthis.selectedRows = []; //hold selected rows\r\n\t\tthis.headerCheckboxElement = null; // hold header select element\r\n\t\t\r\n\t\tthis.registerTableOption(\"selectable\", \"highlight\"); //highlight rows on hover\r\n\t\tthis.registerTableOption(\"selectableRangeMode\", \"drag\"); //highlight rows on hover\r\n\t\tthis.registerTableOption(\"selectableRollingSelection\", true); //roll selection once maximum number of selectable rows is reached\r\n\t\tthis.registerTableOption(\"selectablePersistence\", true); // maintain selection when table view is updated\r\n\t\tthis.registerTableOption(\"selectableCheck\", function(data, row){return true;}); //check wheather row is selectable\r\n\t\t\r\n\t\tthis.registerTableFunction(\"selectRow\", this.selectRows.bind(this));\r\n\t\tthis.registerTableFunction(\"deselectRow\", this.deselectRows.bind(this));\r\n\t\tthis.registerTableFunction(\"toggleSelectRow\", this.toggleRow.bind(this));\r\n\t\tthis.registerTableFunction(\"getSelectedRows\", this.getSelectedRows.bind(this));\r\n\t\tthis.registerTableFunction(\"getSelectedData\", this.getSelectedData.bind(this));\r\n\t\t\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"select\", this.selectRows.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"deselect\", this.deselectRows.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"toggleSelect\", this.toggleRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isSelected\", this.isRowSelected.bind(this));\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.selectable !== false){\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleting\", this.rowDeleted.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.clearSelectionData.bind(this));\r\n\t\t\tthis.subscribe(\"rows-retrieve\", this.rowRetrieve.bind(this));\r\n\t\t\t\r\n\t\t\tif(this.table.options.selectable && !this.table.options.selectablePersistence){\r\n\t\t\t\tthis.subscribe(\"data-refreshing\", this.deselectRows.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trowRetrieve(type, prevValue){\r\n\t\treturn type === \"selected\" ? this.selectedRows : prevValue;\r\n\t}\r\n\t\r\n\trowDeleted(row){\r\n\t\tthis._deselectRow(row, true);\r\n\t}\r\n\t\r\n\tclearSelectionData(silent){\r\n\t\tthis.selecting = false;\r\n\t\tthis.lastClickedRow = false;\r\n\t\tthis.selectPrev = [];\r\n\t\tthis.selectedRows = [];\r\n\t\t\r\n\t\tif(silent !== true){\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\telement = row.getElement();\r\n\t\t\r\n\t\t// trigger end of row selection\r\n\t\tvar endSelect = function(){\r\n\t\t\t\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tself.selecting = false;\r\n\t\t\t}, 50);\r\n\t\t\t\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", endSelect);\r\n\t\t};\r\n\t\t\r\n\t\trow.modules.select = {selected:false};\r\n\t\t\r\n\t\t//set row selection class\r\n\t\tif(self.table.options.selectableCheck.call(this.table, row.getComponent())){\r\n\t\t\telement.classList.add(\"tabulator-selectable\");\r\n\t\t\telement.classList.remove(\"tabulator-unselectable\");\r\n\t\t\t\r\n\t\t\tif(self.table.options.selectable && self.table.options.selectable != \"highlight\"){\r\n\t\t\t\tif(self.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\telement.addEventListener(\"click\", this.handleComplexRowClick.bind(this, row));\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.addEventListener(\"click\", function(e){\r\n\t\t\t\t\t\tif(!self.table.modExists(\"edit\") || !self.table.modules.edit.getCurrentCell()){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(!self.selecting){\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\t\t\tif(e.shiftKey){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.selecting = true;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.selectPrev = [];\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tdocument.body.addEventListener(\"mouseup\", endSelect);\r\n\t\t\t\t\t\t\tdocument.body.addEventListener(\"keyup\", endSelect);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mouseenter\", function(e){\r\n\t\t\t\t\t\tif(self.selecting){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(self.selectPrev[1] == row){\r\n\t\t\t\t\t\t\t\tself.toggleRow(self.selectPrev[0]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mouseout\", function(e){\r\n\t\t\t\t\t\tif(self.selecting){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\tself.selectPrev.unshift(row);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\telement.classList.add(\"tabulator-unselectable\");\r\n\t\t\telement.classList.remove(\"tabulator-selectable\");\r\n\t\t}\r\n\t}\r\n\t\r\n\thandleComplexRowClick(row, e){\r\n\t\tif(e.shiftKey){\r\n\t\t\tthis.table._clearSelection();\r\n\t\t\tthis.lastClickedRow = this.lastClickedRow || row;\r\n\t\t\t\r\n\t\t\tvar lastClickedRowIdx = this.table.rowManager.getDisplayRowIndex(this.lastClickedRow);\r\n\t\t\tvar rowIdx = this.table.rowManager.getDisplayRowIndex(row);\r\n\t\t\t\r\n\t\t\tvar fromRowIdx = lastClickedRowIdx <= rowIdx ? lastClickedRowIdx : rowIdx;\r\n\t\t\tvar toRowIdx = lastClickedRowIdx >= rowIdx ? lastClickedRowIdx : rowIdx;\r\n\t\t\t\r\n\t\t\tvar rows = this.table.rowManager.getDisplayRows().slice(0);\r\n\t\t\tvar toggledRows = rows.splice(fromRowIdx, toRowIdx - fromRowIdx + 1);\r\n\t\t\t\r\n\t\t\tif(e.ctrlKey || e.metaKey){\r\n\t\t\t\ttoggledRows.forEach((toggledRow)=>{\r\n\t\t\t\t\tif(toggledRow !== this.lastClickedRow){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.table.options.selectable !== true && !this.isRowSelected(row)){\r\n\t\t\t\t\t\t\tif(this.selectedRows.length < this.table.options.selectable){\r\n\t\t\t\t\t\t\t\tthis.toggleRow(toggledRow);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.toggleRow(toggledRow);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tthis.lastClickedRow = row;\r\n\t\t\t}else{\r\n\t\t\t\tthis.deselectRows(undefined, true);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.selectable !== true){\r\n\t\t\t\t\tif(toggledRows.length > this.table.options.selectable){\r\n\t\t\t\t\t\ttoggledRows = toggledRows.slice(0, this.table.options.selectable)\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.selectRows(toggledRows);\r\n\t\t\t}\r\n\t\t\tthis.table._clearSelection();\r\n\t\t}\r\n\t\telse if(e.ctrlKey || e.metaKey){\r\n\t\t\tthis.toggleRow(row);\r\n\t\t\tthis.lastClickedRow = row;\r\n\t\t}else{\r\n\t\t\tthis.deselectRows(undefined, true);\r\n\t\t\tthis.selectRows(row);\r\n\t\t\tthis.lastClickedRow = row;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//toggle row selection\r\n\ttoggleRow(row){\r\n\t\tif(this.table.options.selectableCheck.call(this.table, row.getComponent())){\r\n\t\t\tif(row.modules.select && row.modules.select.selected){\r\n\t\t\t\tthis._deselectRow(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis._selectRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//select a number of rows\r\n\tselectRows(rows){\r\n\t\tvar rowMatch;\r\n\t\t\r\n\t\tswitch(typeof rows){\r\n\t\t\tcase \"undefined\":\r\n\t\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"string\":\r\n\t\t\t\r\n\t\t\trowMatch = this.table.rowManager.findRow(rows);\r\n\t\t\t\r\n\t\t\tif(rowMatch){\r\n\t\t\t\tthis._selectRow(rowMatch, true, true);\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.rowManager.getRows(rows).forEach((row) => {\r\n\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\tif(Array.isArray(rows)){\r\n\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis._rowSelectionChanged();\r\n\t\t\t}else{\r\n\t\t\t\tthis._selectRow(rows, false, true);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//select an individual row\r\n\t_selectRow(rowInfo, silent, force){\r\n\t\tvar index;\r\n\t\t\r\n\t\t//handle max row count\r\n\t\tif(!isNaN(this.table.options.selectable) && this.table.options.selectable !== true && !force){\r\n\t\t\tif(this.selectedRows.length >= this.table.options.selectable){\r\n\t\t\t\tif(this.table.options.selectableRollingSelection){\r\n\t\t\t\t\tthis._deselectRow(this.selectedRows[0]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tvar row = this.table.rowManager.findRow(rowInfo);\r\n\t\t\r\n\t\tif(row){\r\n\t\t\tif(this.selectedRows.indexOf(row) == -1){\r\n\t\t\t\trow.getElement().classList.add(\"tabulator-selected\");\r\n\t\t\t\tif(!row.modules.select){\r\n\t\t\t\t\trow.modules.select = {};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\trow.modules.select.selected = true;\r\n\t\t\t\tif(row.modules.select.checkboxEl){\r\n\t\t\t\t\trow.modules.select.checkboxEl.checked = true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.selectedRows.push(row);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.dataTreeSelectPropagate){\r\n\t\t\t\t\tthis.childRowSelection(row, true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatchExternal(\"rowSelected\", row.getComponent());\r\n\t\t\t\t\r\n\t\t\t\tthis._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Selection Error - No such row found, ignoring selection:\" + rowInfo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tisRowSelected(row){\r\n\t\treturn this.selectedRows.indexOf(row) !== -1;\r\n\t}\r\n\t\r\n\t//deselect a number of rows\r\n\tdeselectRows(rows, silent){\r\n\t\tvar self = this,\r\n\t\trowCount;\r\n\t\t\r\n\t\tif(typeof rows == \"undefined\"){\r\n\t\t\t\r\n\t\t\trowCount = self.selectedRows.length;\r\n\t\t\t\r\n\t\t\tfor(let i = 0; i < rowCount; i++){\r\n\t\t\t\tself._deselectRow(self.selectedRows[0], true);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(rowCount){\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tif(Array.isArray(rows)){\r\n\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\tself._deselectRow(row, true);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}else{\r\n\t\t\t\tself._deselectRow(rows, silent);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//deselect an individual row\r\n\t_deselectRow(rowInfo, silent){\r\n\t\tvar self = this,\r\n\t\trow = self.table.rowManager.findRow(rowInfo),\r\n\t\tindex;\r\n\t\t\r\n\t\tif(row){\r\n\t\t\tindex = self.selectedRows.findIndex(function(selectedRow){\r\n\t\t\t\treturn selectedRow == row;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\t\r\n\t\t\t\trow.getElement().classList.remove(\"tabulator-selected\");\r\n\t\t\t\tif(!row.modules.select){\r\n\t\t\t\t\trow.modules.select = {};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\trow.modules.select.selected = false;\r\n\t\t\t\tif(row.modules.select.checkboxEl){\r\n\t\t\t\t\trow.modules.select.checkboxEl.checked = false;\r\n\t\t\t\t}\r\n\t\t\t\tself.selectedRows.splice(index, 1);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.dataTreeSelectPropagate){\r\n\t\t\t\t\tthis.childRowSelection(row, false);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatchExternal(\"rowDeselected\", row.getComponent());\r\n\t\t\t\t\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Deselection Error - No such row found, ignoring selection:\" + rowInfo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSelectedData(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tthis.selectedRows.forEach(function(row){\r\n\t\t\tdata.push(row.getData());\r\n\t\t});\r\n\t\t\r\n\t\treturn data;\r\n\t}\r\n\t\r\n\tgetSelectedRows(){\r\n\t\t\r\n\t\tvar rows = [];\r\n\t\t\r\n\t\tthis.selectedRows.forEach(function(row){\r\n\t\t\trows.push(row.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t_rowSelectionChanged(silent){\r\n\t\tif(this.headerCheckboxElement){\r\n\t\t\tif(this.selectedRows.length === 0){\r\n\t\t\t\tthis.headerCheckboxElement.checked = false;\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = false;\r\n\t\t\t} else if(this.table.rowManager.rows.length === this.selectedRows.length){\r\n\t\t\t\tthis.headerCheckboxElement.checked = true;\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = false;\r\n\t\t\t} else {\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = true;\r\n\t\t\t\tthis.headerCheckboxElement.checked = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(!silent){\r\n\t\t\tthis.dispatchExternal(\"rowSelectionChanged\", this.getSelectedData(), this.getSelectedRows());\r\n\t\t}\r\n\t}\r\n\t\r\n\tregisterRowSelectCheckbox (row, element) {\r\n\t\tif(!row._row.modules.select){\r\n\t\t\trow._row.modules.select = {};\r\n\t\t}\r\n\t\t\r\n\t\trow._row.modules.select.checkboxEl = element;\r\n\t}\r\n\t\r\n\tregisterHeaderSelectCheckbox (element) {\r\n\t\tthis.headerCheckboxElement = element;\r\n\t}\r\n\t\r\n\tchildRowSelection(row, select){\r\n\t\tvar children = this.table.modules.dataTree.getChildren(row, true);\r\n\t\t\r\n\t\tif(select){\r\n\t\t\tfor(let child of children){\r\n\t\t\t\tthis._selectRow(child, true);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tfor(let child of children){\r\n\t\t\t\tthis._deselectRow(child, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nSelectRow.moduleName = \"selectRow\";\r\n\r\nexport default SelectRow;","//sort datetime\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar format = params.format || \"dd/MM/yyyy HH:mm:ss\",\r\n\talignEmptyValues = params.alignEmptyValues,\r\n\temptyAlign = 0;\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\ta = format === \"iso\" ? DT.fromISO(String(a)) : DT.fromFormat(String(a), format);\r\n\t\tb = format === \"iso\" ? DT.fromISO(String(b)) : DT.fromFormat(String(b), format);\r\n\r\n\t\tif(!a.isValid){\r\n\t\t\temptyAlign = !b.isValid ? 0 : -1;\r\n\t\t}else if(!b.isValid){\r\n\t\t\temptyAlign = 1;\r\n\t\t}else{\r\n\t\t\t//compare valid values\r\n\t\t\treturn a - b;\r\n\t\t}\r\n\r\n\t\t//fix empty values in position\r\n\t\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\t\temptyAlign *= -1;\r\n\t\t}\r\n\r\n\t\treturn emptyAlign;\r\n\r\n\t}else{\r\n\t\tconsole.error(\"Sort Error - 'datetime' sorter is dependant on luxon.js\");\r\n\t}\r\n};","import number from './sorters/number.js';\r\nimport string from './sorters/string.js';\r\nimport date from './sorters/date.js';\r\nimport time from './sorters/time.js';\r\nimport datetime from './sorters/datetime.js';\r\nimport boolean from './sorters/boolean.js';\r\nimport array from './sorters/array.js';\r\nimport exists from './sorters/exists.js';\r\nimport alphanum from './sorters/alphanum.js';\r\n\r\nexport default {\r\n\tnumber:number,\r\n\tstring:string,\r\n\tdate:date,\r\n\ttime:time,\r\n\tdatetime:datetime,\r\n\tboolean:boolean,\r\n\tarray:array,\r\n\texists:exists,\r\n\talphanum:alphanum\r\n};","//sort numbers\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar decimal = params.decimalSeparator;\r\n\tvar thousand = params.thousandSeparator;\r\n\tvar emptyAlign = 0;\r\n\r\n\ta = String(a);\r\n\tb = String(b);\r\n\r\n\tif(thousand){\r\n\t\ta = a.split(thousand).join(\"\");\r\n\t\tb = b.split(thousand).join(\"\");\r\n\t}\r\n\r\n\tif(decimal){\r\n\t\ta = a.split(decimal).join(\".\");\r\n\t\tb = b.split(decimal).join(\".\");\r\n\t}\r\n\r\n\ta = parseFloat(a);\r\n\tb = parseFloat(b);\r\n\r\n\t//handle non numeric values\r\n\tif(isNaN(a)){\r\n\t\temptyAlign = isNaN(b) ? 0 : -1;\r\n\t}else if(isNaN(b)){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\t\t//compare valid values\r\n\t\treturn a - b;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","//sort strings\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\tvar locale;\r\n\r\n\t//handle empty values\r\n\tif(!a){\r\n\t\temptyAlign = !b ? 0 : -1;\r\n\t}else if(!b){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\t\t//compare valid values\r\n\t\tswitch(typeof params.locale){\r\n\t\t\tcase \"boolean\":\r\n\t\t\tif(params.locale){\r\n\t\t\t\tlocale = this.langLocale();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"string\":\r\n\t\t\tlocale = params.locale;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn String(a).toLowerCase().localeCompare(String(b).toLowerCase(), locale);\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","import datetime from './datetime.js';\r\n\r\n//sort date\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tif(!params.format){\r\n\t\tparams.format = \"dd/MM/yyyy\";\r\n\t}\r\n\r\n\treturn datetime.call(this, a, b, aRow, bRow, column, dir, params);\r\n};","import datetime from './datetime.js';\r\n\r\n//sort times\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tif(!params.format){\r\n\t\tparams.format = \"HH:mm\";\r\n\t}\r\n\r\n\treturn datetime.call(this, a, b, aRow, bRow, column, dir, params);\r\n};","//sort booleans\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = a === true || a === \"true\" || a === \"True\" || a === 1 ? 1 : 0;\r\n\tvar el2 = b === true || b === \"true\" || b === \"True\" || b === 1 ? 1 : 0;\r\n\r\n\treturn el1 - el2;\r\n};","//sort if element contains any data\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = 0;\r\n\tvar el2 = 0;\r\n\tvar type = params.type || \"length\";\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\r\n\tfunction calc(value){\r\n\r\n\t\tswitch(type){\r\n\t\t\tcase \"length\":\r\n\t\t\treturn value.length;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"sum\":\r\n\t\t\treturn value.reduce(function(c, d){\r\n\t\t\t\treturn c + d;\r\n\t\t\t});\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"max\":\r\n\t\t\treturn Math.max.apply(null, value) ;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"min\":\r\n\t\t\treturn Math.min.apply(null, value) ;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"avg\":\r\n\t\t\treturn value.reduce(function(c, d){\r\n\t\t\t\treturn c + d;\r\n\t\t\t}) / value.length;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t//handle non array values\r\n\tif(!Array.isArray(a)){\r\n\t\talignEmptyValues = !Array.isArray(b) ? 0 : -1;\r\n\t}else if(!Array.isArray(b)){\r\n\t\talignEmptyValues = 1;\r\n\t}else{\r\n\r\n\t\t//compare valid values\r\n\t\tel1 = a ? calc(a) : 0;\r\n\t\tel2 = b ? calc(b) : 0;\r\n\r\n\t\treturn el1 - el2;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","//sort if element contains any data\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = typeof a == \"undefined\" ? 0 : 1;\r\n\tvar el2 = typeof b == \"undefined\" ? 0 : 1;\r\n\r\n\treturn el1 - el2;\r\n};","//sort alpha numeric strings\r\nexport default function(as, bs, aRow, bRow, column, dir, params){\r\n\tvar a, b, a1, b1, i= 0, L, rx = /(\\d+)|(\\D+)/g, rd = /\\d/;\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\r\n\t//handle empty values\r\n\tif(!as && as!== 0){\r\n\t\temptyAlign = !bs && bs!== 0 ? 0 : -1;\r\n\t}else if(!bs && bs!== 0){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\r\n\t\tif(isFinite(as) && isFinite(bs)) return as - bs;\r\n\t\ta = String(as).toLowerCase();\r\n\t\tb = String(bs).toLowerCase();\r\n\t\tif(a === b) return 0;\r\n\t\tif(!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1;\r\n\t\ta = a.match(rx);\r\n\t\tb = b.match(rx);\r\n\t\tL = a.length > b.length ? b.length : a.length;\r\n\t\twhile(i < L){\r\n\t\t\ta1= a[i];\r\n\t\t\tb1= b[i++];\r\n\t\t\tif(a1 !== b1){\r\n\t\t\t\tif(isFinite(a1) && isFinite(b1)){\r\n\t\t\t\t\tif(a1.charAt(0) === \"0\") a1 = \".\" + a1;\r\n\t\t\t\t\tif(b1.charAt(0) === \"0\") b1 = \".\" + b1;\r\n\t\t\t\t\treturn a1 - b1;\r\n\t\t\t\t}\r\n\t\t\t\telse return a1 > b1 ? 1 : -1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn a.length > b.length;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultSorters from './defaults/sorters.js';\r\n\r\nclass Sort extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t \tthis.sortList = []; //holder current sort\r\n\t \tthis.changed = false; //has the sort changed since last render\r\n\r\n\t \tthis.registerTableOption(\"sortMode\", \"local\"); //local or remote sorting\r\n\r\n\t \tthis.registerTableOption(\"initialSort\", false); //initial sorting criteria\r\n\t \tthis.registerTableOption(\"columnHeaderSortMulti\", true); //multiple or single column sorting\r\n\t \tthis.registerTableOption(\"sortOrderReverse\", false); //reverse internal sort ordering\r\n\t \tthis.registerTableOption(\"headerSortElement\", \"
\"); //header sort element\r\n\r\n\t \tthis.registerColumnOption(\"sorter\");\r\n\t \tthis.registerColumnOption(\"sorterParams\");\r\n\r\n\t \tthis.registerColumnOption(\"headerSort\", true);\r\n\t \tthis.registerColumnOption(\"headerSortStartingDir\");\r\n\t \tthis.registerColumnOption(\"headerSortTristate\");\r\n\r\n\t }\r\n\r\n\t initialize(){\r\n\t \tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t \tthis.subscribe(\"table-built\", this.tableBuilt.bind(this));\r\n\t \tthis.registerDataHandler(this.sort.bind(this), 20);\r\n\r\n\t \tthis.registerTableFunction(\"setSort\", this.userSetSort.bind(this));\r\n\t \tthis.registerTableFunction(\"getSorters\", this.getSort.bind(this));\r\n\t \tthis.registerTableFunction(\"clearSort\", this.clearSort.bind(this));\r\n\r\n\t \tif(this.table.options.sortMode === \"remote\"){\r\n\t \t\tthis.subscribe(\"data-params\", this.remoteSortParams.bind(this));\r\n\t \t}\r\n\t }\r\n\r\n\t tableBuilt(){\r\n\t \tif(this.table.options.initialSort){\r\n\t \t\tthis.setSort(this.table.options.initialSort);\r\n\t \t}\r\n\t }\r\n\r\n\t remoteSortParams(data, config, silent, params){\r\n\t \tvar sorters = this.getSort();\r\n\r\n\t \tsorters.forEach((item) => {\r\n\t \t\tdelete item.column;\r\n\t \t});\r\n\r\n\t \tparams.sort = sorters;\r\n\r\n\t \treturn params;\r\n\t }\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tuserSetSort(sortList, dir){\r\n\t\tthis.setSort(sortList, dir);\r\n\t\t// this.table.rowManager.sorterRefresh();\r\n\t\tthis.refreshSort();\r\n\t}\r\n\r\n\tclearSort(){\r\n\t\tthis.clear();\r\n\t\t// this.table.rowManager.sorterRefresh();\r\n\t\tthis.refreshSort();\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\t//initialize column header for sorting\r\n\tinitializeColumn(column){\r\n\t\tvar sorter = false,\r\n\t\tcolEl,\r\n\t\tarrowEl;\r\n\r\n\t\tswitch(typeof column.definition.sorter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Sort.sorters[column.definition.sorter]){\r\n\t\t\t\tsorter = Sort.sorters[column.definition.sorter];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Sort Error - No such sorter found: \", column.definition.sorter);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tsorter = column.definition.sorter;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tcolumn.modules.sort = {\r\n\t\t\tsorter:sorter, dir:\"none\",\r\n\t\t\tparams:column.definition.sorterParams || {},\r\n\t\t\tstartingDir:column.definition.headerSortStartingDir || \"asc\",\r\n\t\t\ttristate: column.definition.headerSortTristate,\r\n\t\t};\r\n\r\n\t\tif(column.definition.headerSort !== false){\r\n\r\n\t\t\tcolEl = column.getElement();\r\n\r\n\t\t\tcolEl.classList.add(\"tabulator-sortable\");\r\n\r\n\r\n\t\t\tarrowEl = document.createElement(\"div\");\r\n\t\t\tarrowEl.classList.add(\"tabulator-col-sorter\");\r\n\r\n\t\t\tif(typeof this.table.options.headerSortElement == \"object\"){\r\n\t\t\t\tarrowEl.appendChild(this.table.options.headerSortElement);\r\n\t\t\t}else{\r\n\t\t\t\tarrowEl.innerHTML = this.table.options.headerSortElement;\r\n\t\t\t}\r\n\r\n\t\t\t//create sorter arrow\r\n\t\t\tcolumn.titleHolderElement.appendChild(arrowEl);\r\n\r\n\t\t\tcolumn.modules.sort.element = arrowEl;\r\n\r\n\t\t\t//sort on click\r\n\t\t\tcolEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\tvar dir = \"\",\r\n\t\t\t\tsorters=[],\r\n\t\t\t\tmatch = false;\r\n\r\n\t\t\t\tif(column.modules.sort){\r\n\t\t\t\t\tif(column.modules.sort.tristate){\r\n\t\t\t\t\t\tif(column.modules.sort.dir == \"none\"){\r\n\t\t\t\t\t\t\tdir = column.modules.sort.startingDir;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(column.modules.sort.dir == column.modules.sort.startingDir){\r\n\t\t\t\t\t\t\t\tdir = column.modules.sort.dir == \"asc\" ? \"desc\" : \"asc\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tdir = \"none\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswitch(column.modules.sort.dir){\r\n\t\t\t\t\t\t\tcase \"asc\":\r\n\t\t\t\t\t\t\tdir = \"desc\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tcase \"desc\":\r\n\t\t\t\t\t\t\tdir = \"asc\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tdir = column.modules.sort.startingDir;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\tif (this.table.options.columnHeaderSortMulti && (e.shiftKey || e.ctrlKey)) {\r\n\t\t\t\t\t\tsorters = this.getSort();\r\n\r\n\t\t\t\t\t\tmatch = sorters.findIndex((sorter) => {\r\n\t\t\t\t\t\t\treturn sorter.field === column.getField();\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tif(match > -1){\r\n\t\t\t\t\t\t\tsorters[match].dir = dir;\r\n\r\n\t\t\t\t\t\t\tif(match != sorters.length -1){\r\n\t\t\t\t\t\t\t\tmatch = sorters.splice(match, 1)[0];\r\n\t\t\t\t\t\t\t\tif(dir != \"none\"){\r\n\t\t\t\t\t\t\t\t\tsorters.push(match);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(dir != \"none\"){\r\n\t\t\t\t\t\t\t\tsorters.push({column:column, dir:dir});\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t//add to existing sort\r\n\t\t\t\t\t\tthis.setSort(sorters);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(dir == \"none\"){\r\n\t\t\t\t\t\t\tthis.clear();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t//sort by column only\r\n\t\t\t\t\t\t\tthis.setSort(column, dir);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// this.table.rowManager.sorterRefresh(!this.sortList.length);\r\n\t\t\t\t\tthis.refreshSort();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\trefreshSort(){\r\n\t\tif(this.table.options.sortMode === \"remote\"){\r\n\t\t\tthis.reloadData();\r\n\t\t}else{\r\n\t\t\tthis.refreshData(true);\r\n\t\t}\r\n\r\n\t\t//TODO - Persist left position of row manager\r\n\t\t// left = this.scrollLeft;\r\n\t\t// this.scrollHorizontal(left);\r\n\t}\r\n\r\n\t//check if the sorters have changed since last use\r\n\thasChanged(){\r\n\t\tvar changed = this.changed;\r\n\t\tthis.changed = false;\r\n\t\treturn changed;\r\n\t}\r\n\r\n\t//return current sorters\r\n\tgetSort(){\r\n\t\tvar self = this,\r\n\t\tsorters = [];\r\n\r\n\t\tself.sortList.forEach(function(item){\r\n\t\t\tif(item.column){\r\n\t\t\t\tsorters.push({column:item.column.getComponent(), field:item.column.getField(), dir:item.dir});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn sorters;\r\n\t}\r\n\r\n\t//change sort list and trigger sort\r\n\tsetSort(sortList, dir){\r\n\t\tvar self = this,\r\n\t\tnewSortList = [];\r\n\r\n\t\tif(!Array.isArray(sortList)){\r\n\t\t\tsortList = [{column: sortList, dir:dir}];\r\n\t\t}\r\n\r\n\t\tsortList.forEach(function(item){\r\n\t\t\tvar column;\r\n\r\n\t\t\tcolumn = self.table.columnManager.findColumn(item.column);\r\n\r\n\t\t\tif(column){\r\n\t\t\t\titem.column = column;\r\n\t\t\t\tnewSortList.push(item);\r\n\t\t\t\tself.changed = true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Sort Warning - Sort field does not exist and is being ignored: \", item.column);\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\t\tself.sortList = newSortList;\r\n\r\n\t\tthis.dispatch(\"sort-changed\");\r\n\t}\r\n\r\n\t//clear sorters\r\n\tclear(){\r\n\t\tthis.setSort([]);\r\n\t}\r\n\r\n\t//find appropriate sorter for column\r\n\tfindSorter(column){\r\n\t\tvar row = this.table.rowManager.activeRows[0],\r\n\t\tsorter = \"string\",\r\n\t\tfield, value;\r\n\r\n\t\tif(row){\r\n\t\t\trow = row.getData();\r\n\t\t\tfield = column.getField();\r\n\r\n\t\t\tif(field){\r\n\r\n\t\t\t\tvalue = column.getFieldValue(row);\r\n\r\n\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){\r\n\t\t\t\t\t\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn Sort.sorters[sorter];\r\n\t}\r\n\r\n\t//work through sort list sorting data\r\n\tsort(data){\r\n\t\tvar self = this,\r\n\t\tsortList = this.table.options.sortOrderReverse ? self.sortList.slice().reverse() : self.sortList,\r\n\t\tsortListActual = [],\r\n\t\trowComponents = [],\r\n\t\tlastSort;\r\n\r\n\t\tif(this.subscribedExternal(\"dataSorting\")){\r\n\t\t\tthis.dispatchExternal(\"dataSorting\", self.getSort());\r\n\t\t}\r\n\r\n\t\tself.clearColumnHeaders();\r\n\r\n\t\tif(this.table.options.sortMode !== \"remote\"){\r\n\r\n\t\t\t//build list of valid sorters and trigger column specific callbacks before sort begins\r\n\t\t\tsortList.forEach(function(item, i){\r\n\t\t\t\tvar sortObj = item.column.modules.sort;\r\n\r\n\t\t\t\tif(item.column && sortObj){\r\n\r\n\t\t\t\t\t//if no sorter has been defined, take a guess\r\n\t\t\t\t\tif(!sortObj.sorter){\r\n\t\t\t\t\t\tsortObj.sorter = self.findSorter(item.column);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\titem.params = typeof sortObj.params === \"function\" ? sortObj.params(item.column.getComponent(), item.dir) : sortObj.params;\r\n\r\n\t\t\t\t\tsortListActual.push(item);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tself.setColumnHeader(item.column, item.dir);\r\n\t\t\t});\r\n\r\n\t\t\t//sort data\r\n\t\t\tif (sortListActual.length) {\r\n\t\t\t\tself._sortItems(data, sortListActual);\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tsortList.forEach(function(item, i){\r\n\t\t\t\tself.setColumnHeader(item.column, item.dir);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.subscribedExternal(\"dataSorted\")){\r\n\t\t\tdata.forEach((row) => {\r\n\t\t\t\trowComponents.push(row.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatchExternal(\"dataSorted\", self.getSort(), rowComponents);\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//clear sort arrows on columns\r\n\tclearColumnHeaders(){\r\n\t\tthis.table.columnManager.getRealColumns().forEach(function(column){\r\n\t\t\tif(column.modules.sort){\r\n\t\t\t\tcolumn.modules.sort.dir = \"none\";\r\n\t\t\t\tcolumn.getElement().setAttribute(\"aria-sort\", \"none\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//set the column header sort direction\r\n\tsetColumnHeader(column, dir){\r\n\t\tcolumn.modules.sort.dir = dir;\r\n\t\tcolumn.getElement().setAttribute(\"aria-sort\", dir);\r\n\t}\r\n\r\n\t//sort each item in sort list\r\n\t_sortItems(data, sortList){\r\n\t\tvar sorterCount = sortList.length - 1;\r\n\r\n\t\tdata.sort((a, b) => {\r\n\t\t\tvar result;\r\n\r\n\t\t\tfor(var i = sorterCount; i>= 0; i--){\r\n\t\t\t\tlet sortItem = sortList[i];\r\n\r\n\t\t\t\tresult = this._sortRow(a, b, sortItem.column, sortItem.dir, sortItem.params);\r\n\r\n\t\t\t\tif(result !== 0){\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn result;\r\n\t\t});\r\n\t}\r\n\r\n\t//process individual rows for a sort function on active data\r\n\t_sortRow(a, b, column, dir, params){\r\n\t\tvar el1Comp, el2Comp, colComp;\r\n\r\n\t\t//switch elements depending on search direction\r\n\t\tvar el1 = dir == \"asc\" ? a : b;\r\n\t\tvar el2 = dir == \"asc\" ? b : a;\r\n\r\n\t\ta = column.getFieldValue(el1.getData());\r\n\t\tb = column.getFieldValue(el2.getData());\r\n\r\n\t\ta = typeof a !== \"undefined\" ? a : \"\";\r\n\t\tb = typeof b !== \"undefined\" ? b : \"\";\r\n\r\n\t\tel1Comp = el1.getComponent();\r\n\t\tel2Comp = el2.getComponent();\r\n\r\n\t\treturn column.modules.sort.sorter.call(this, a, b, el1Comp, el2Comp, column.getComponent(), dir, params);\r\n\t}\r\n}\r\n\r\nSort.moduleName = \"sort\";\r\n\r\n//load defaults\r\nSort.sorters = defaultSorters;\r\n\r\nexport default Sort;","export default {\r\n\t//is integer\r\n\tinteger: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvalue = Number(value);\r\n\t\treturn typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\r\n\t},\r\n\r\n\t//is float\r\n\tfloat: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvalue = Number(value);\r\n\t\treturn typeof value === 'number' && isFinite(value) && value % 1 !== 0;\r\n\t},\r\n\r\n\t//must be a number\r\n\tnumeric: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn !isNaN(value);\r\n\t},\r\n\r\n\t//must be a string\r\n\tstring: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn isNaN(value);\r\n\t},\r\n\r\n\t//maximum value\r\n\tmax: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn parseFloat(value) <= parameters;\r\n\t},\r\n\r\n\t//minimum value\r\n\tmin: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn parseFloat(value) >= parameters;\r\n\t},\r\n\r\n\t//starts with value\r\n\tstarts: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).toLowerCase().startsWith(String(parameters).toLowerCase());\r\n\t},\r\n\r\n\t//ends with value\r\n\tends: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).toLowerCase().endsWith(String(parameters).toLowerCase());\r\n\t},\r\n\r\n\r\n\t//minimum string length\r\n\tminLength: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).length >= parameters;\r\n\t},\r\n\r\n\t//maximum string length\r\n\tmaxLength: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).length <= parameters;\r\n\t},\r\n\r\n\t//in provided value list\r\n\tin: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif(typeof parameters == \"string\"){\r\n\t\t\tparameters = parameters.split(\"|\");\r\n\t\t}\r\n\r\n\t\treturn value === \"\" || parameters.indexOf(value) > -1;\r\n\t},\r\n\r\n\t//must match provided regex\r\n\tregex: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar reg = new RegExp(parameters);\r\n\r\n\t\treturn reg.test(value);\r\n\t},\r\n\r\n\t//value must be unique in this column\r\n\tunique: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar unique = true;\r\n\r\n\t\tvar cellData = cell.getData();\r\n\t\tvar column = cell.getColumn()._getSelf();\r\n\r\n\t\tthis.table.rowManager.rows.forEach(function(row){\r\n\t\t\tvar data = row.getData();\r\n\r\n\t\t\tif(data !== cellData){\r\n\t\t\t\tif(value == column.getFieldValue(data)){\r\n\t\t\t\t\tunique = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn unique;\r\n\t},\r\n\r\n\t//must have a value\r\n\trequired:function(cell, value, parameters){\r\n\t\treturn value !== \"\" && value !== null && typeof value !== \"undefined\";\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultValidators from './defaults/validators.js';\r\n\r\nclass Validate extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.invalidCells = [];\r\n\r\n\t\tthis.registerTableOption(\"validationMode\", \"blocking\");\r\n\r\n\t\tthis.registerColumnOption(\"validator\");\r\n\r\n\t\tthis.registerTableFunction(\"getInvalidCells\", this.getInvalidCells.bind(this));\r\n\t\tthis.registerTableFunction(\"clearCellValidation\", this.userClearCellValidation.bind(this));\r\n\t\tthis.registerTableFunction(\"validate\", this.userValidate.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"isValid\", this.cellIsValid.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"clearValidation\", this.clearValidation.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"validate\", this.cellValidate.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"column\", \"validate\", this.columnValidate.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"validate\", this.rowValidate.bind(this));\r\n\t}\r\n\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-delete\", this.clearValidation.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumnCheck.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Cell Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tcellIsValid(cell){\r\n\t\treturn cell.modules.validate ? !cell.modules.validate.invalid : true;\r\n\t}\r\n\r\n\tcellValidate(cell){\r\n\t\treturn this.validate(cell.column.modules.validate, cell, cell.getValue());\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Column Functions ////////\r\n\t///////////////////////////////////\r\n\r\n\tcolumnValidate(column){\r\n\t\tvar invalid = [];\r\n\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tif(!this.cellValidate(cell)){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Row Functions //////////\r\n\t///////////////////////////////////\r\n\r\n\trowValidate(row){\r\n\t\tvar invalid = [];\r\n\r\n\t\trow.cells.forEach((cell) => {\r\n\t\t\tif(!this.cellValidate(cell)){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\r\n\tuserClearCellValidation(cells){\r\n\t\tif(!cells){\r\n\t\t\tcells = this.getInvalidCells();\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\r\n\t\tcells.forEach((cell) => {\r\n\t\t\tthis.clearValidation(cell._getSelf());\r\n\t\t});\r\n\t}\r\n\r\n\tuserValidate(cells){\r\n\t\tvar output = [];\r\n\r\n\t\t//clear row data\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\trow = row.getComponent();\r\n\r\n\t\t\tvar valid = row.validate();\r\n\r\n\t\t\tif(valid !== true){\r\n\t\t\t\toutput = output.concat(valid);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output.length ? output : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(typeof column.definition.validator !== \"undefined\"){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//validate\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = [],\r\n\t\tvalidator;\r\n\r\n\t\tif(column.definition.validator){\r\n\r\n\t\t\tif(Array.isArray(column.definition.validator)){\r\n\t\t\t\tcolumn.definition.validator.forEach((item) => {\r\n\t\t\t\t\tvalidator = self._extractValidator(item);\r\n\r\n\t\t\t\t\tif(validator){\r\n\t\t\t\t\t\tconfig.push(validator);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t}else{\r\n\t\t\t\tvalidator = this._extractValidator(column.definition.validator);\r\n\r\n\t\t\t\tif(validator){\r\n\t\t\t\t\tconfig.push(validator);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.modules.validate = config.length ? config : false;\r\n\t\t}\r\n\t}\r\n\r\n\t_extractValidator(value){\r\n\t\tvar type, params, pos;\r\n\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tpos = value.indexOf(':');\r\n\r\n\t\t\tif(pos > -1){\r\n\t\t\t\ttype = value.substring(0,pos);\r\n\t\t\t\tparams = value.substring(pos+1);\r\n\t\t\t}else{\r\n\t\t\t\ttype = value;\r\n\t\t\t}\r\n\r\n\t\t\treturn this._buildValidator(type, params);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\treturn this._buildValidator(value);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"object\":\r\n\t\t\treturn this._buildValidator(value.type, value.parameters);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t_buildValidator(type, params){\r\n\r\n\t\tvar func = typeof type == \"function\" ? type : Validate.validators[type];\r\n\r\n\t\tif(!func){\r\n\t\t\tconsole.warn(\"Validator Setup Error - No matching validator found:\", type);\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn {\r\n\t\t\t\ttype:typeof type == \"function\" ? \"function\" : type,\r\n\t\t\t\tfunc:func,\r\n\t\t\t\tparams:params,\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\tvalidate(validators, cell, value){\r\n\t\tvar self = this,\r\n\t\tvalid = [],\r\n\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\r\n\t\tif(validators){\r\n\t\t\tvalidators.forEach((item) => {\r\n\t\t\t\tif(!item.func.call(self, cell.getComponent(), value, item.params)){\r\n\t\t\t\t\tvalid.push({\r\n\t\t\t\t\t\ttype:item.type,\r\n\t\t\t\t\t\tparameters:item.params\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tvalid = valid.length ? valid : true;\r\n\r\n\t\tif(!cell.modules.validate){\r\n\t\t\tcell.modules.validate = {};\r\n\t\t}\r\n\r\n\t\tif(valid === true){\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\r\n\t\t\tif(invalidIndex > -1){\r\n\t\t\t\tthis.invalidCells.splice(invalidIndex, 1);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcell.modules.validate.invalid = true;\r\n\r\n\t\t\tif(this.table.options.validationMode !== \"manual\"){\r\n\t\t\t\tcell.getElement().classList.add(\"tabulator-validation-fail\");\r\n\t\t\t}\r\n\r\n\t\t\tif(invalidIndex == -1){\r\n\t\t\t\tthis.invalidCells.push(cell);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn valid;\r\n\t}\r\n\r\n\tgetInvalidCells(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.invalidCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tclearValidation(cell){\r\n\t\tvar invalidIndex;\r\n\r\n\t\tif(cell.modules.validate && cell.modules.validate.invalid){\r\n\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\r\n\t\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\r\n\t\t\tif(invalidIndex > -1){\r\n\t\t\t\tthis.invalidCells.splice(invalidIndex, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nValidate.moduleName = \"validate\";\r\n\r\n//load defaults\r\nValidate.validators = defaultValidators;\r\n\r\nexport default Validate;","//tabulator with all modules installed\r\nimport {default as Tabulator} from './Tabulator.js';\r\nimport * as modules from '../core/modules/optional.js';\r\nimport ModuleBinder from './tools/ModuleBinder.js';\r\n\r\nclass TabulatorFull extends Tabulator {};\r\n\r\n//bind modules and static functionality\r\nnew ModuleBinder(TabulatorFull, modules);\r\n\r\nexport default TabulatorFull;"],"names":["CoreFeature","table","data","silent","this","dataLoader","load","undefined","modules","localize","getText","arguments","bind","getLocale","comms","getConnections","send","layout","getMode","eventBus","subscribe","unsubscribe","key","subscribed","subscriptionChange","dispatch","chain","confirm","externalEvents","options","value","module","ColumnComponent","column","_column","type","Proxy","get","target","name","receiver","componentFunctionBinder","handle","getElement","getDefinition","getField","getTitleDownload","cells","forEach","cell","push","getComponent","visible","isGroup","columns","show","hide","output","length","parent","Column","columnManager","scrollToColumn","to","after","toColumn","findColumn","moveColumn","console","warn","nextCol","nextColumn","prevCol","prevColumn","updates","updateDefinition","getWidth","width","result","reinitializeWidth","setWidth","renderer","rerenderColumns","CellComponent","_cell","getValue","getOldValue","initialValue","row","getData","mutate","setValue","setValueActual","checkHeight","Cell","element","oldValue","height","minWidth","component","loaded","build","generateElement","_configureCell","getFieldValue","document","createElement","className","setAttribute","field","style","textAlign","hozAlign","vertAlign","display","alignItems","top","bottom","middle","justifyContent","left","right","center","definition","cssClass","split","classList","add","tooltipGenerationMode","addEventListener","e","_this2","_generateTooltip","val","_this3","innerHTML","Node","firstChild","removeChild","appendChild","tooltip","containerOnly","layoutElement","setValueProcessData","cellRendered","cellEdited","call","dispatchExternal","subscribedExternal","rowManager","changed","setFieldValue","_generateContents","widthStyled","offsetWidth","minWidthStyled","maxWidth","maxWidthStyled","reinitializeHeight","heightStyled","offsetHeight","redrawBlock","parentNode","deleteCell","calcs","getCellIndex","def","_this","contentElement","titleHolderElement","titleElement","groupElement","createGroupElement","fieldStructure","titleDownload","titleFormatterRendered","mapDefinitions","setField","maxInitialWidth","widthFixed","i","newCol","attachColumn","checkColumnVisibility","registerColumnField","_initialize","bindModuleColumns","el","defaults","columnDefaults","optionsList","generate","defaultOptionList","Object","keys","indexOf","title","nestedFieldSeparator","_getNestedData","_getFlatData","_setNestedData","_setFlatData","registerColumnPosition","reRegisterPosition","headerTooltip","langBind","headerVertical","_bindEvents","_buildColumnHeaderContent","_buildGroupHeader","_buildColumnHeader","setTooltip","_this4","dblTap","tapHold","tap","headerClick","_this5","headerDblClick","headerContext","headerTap","passive","headerDblTap","clearTimeout","setTimeout","headerTapHold","_this6","setMinWidth","parseInt","setMaxWidth","headerHozAlign","_buildColumnHeaderTitle","editableTitle","stopPropagation","focus","_this7","text","_formatColumnHeaderTitle","contents","_this8","dataObj","structure","alignment","parentHeight","getGroupElement","clientHeight","getHeadersElement","minHeight","paddingTop","verticalAlign","clearVerticalAlign","formatter","rowNumColumn","getFirstColumn","getLastColumn","getTopColumn","updateBranches","colDefs","responsiveToggle","verticalAlignHeaders","matchChildWidths","childWidth","child","index","splice","setWidthActual","isNaN","Math","floor","clientWidth","max","min","rows","heightInitialized","offsetParent","clearCellHeight","calcHeight","setCellHeight","ceil","getBoundingClientRect","Promise","resolve","reject","_this9","cellCount","deregisterColumn","findColumnIndex","_nextVisibleColumn","getColumnByIndex","_prevVisibleColumn","force","fitToData","clearWidth","setTo","error","assign","addColumn","then","_this10","defaultOptions","Helpers","box","window","pageYOffset","documentElement","clientTop","pageXOffset","clientLeft","obj","clone","list","objectProto","__proto__","arrayProto","Array","isArray","subject","match","copy","_typeof","findIndex","item","unshift","deepClone","OptionsList","msgType","registeredDefaults","option","userOptions","debugInvalidOptions","hasOwnProperty","Renderer","elementVertical","elementHorizontal","tableElement","verticalFillMode","callback","update","blockRedraw","dir","includingBuffer","getDisplayRows","rowEl","remove","clearRows","clearColumns","renderRows","renderColumns","rerenderRows","position","ifVisible","rowIndex","offset","scrollToRowIfVisible","elVisible","elOffset","scrollToRowPosition","scrollToRowNearestTop","scrollToRow","scrollHeight","scrollTop","offsetTop","BaiscHorizontal","VirtualDomHorizontal","leftCol","rightCol","scrollLeft","vDomScrollPosLeft","vDomScrollPosRight","vDomPadLeft","vDomPadRight","fitDataColAvg","windowBuffer","visibleRows","initialized","isFitData","compatibilityCheck","layoutCheck","vertScrollListen","ok","find","col","frozen","startsWith","clearVisRowCache","dataChange","scroll","buffer","columnsByIndex","old","cols","colPos","clear","calcWindowBuffer","config","leftPos","rightPos","fitDataCheck","vdomHoz","paddingLeft","paddingRight","reinitChanged","reinitializeRows","initializeRow","reinitializeRow","change","colEnd","generateCells","layoutRefresh","getVisibleRows","diff","abs","addColRight","removeColLeft","addColLeft","removeColRight","start","end","changes","getCell","fitDataColActualWidthCheck","prepend","ex","message","newWidth","widthDiff","colPositionAdjust","ColumnManager","blockHozScrollEvent","headersElement","columnsByField","defaultColumnOptions","initializeRenderer","createHeadersElement","createHeaderElement","insertBefore","scrollHorizontal","renderClass","renderers","RendererVirtualDomHorizontal","RendererBasicHorizontal","renderHorizontal","initialize","headerVisible","hozAdjust","scrollWidth","marginLeft","scrollColumns","sorter","definitions","autoColumnsDefinitions","setColumns","_addColumn","_reIndexColumns","redraw","before","nextToColumn","colEl","topColumn","parentIndex","nextEl","nextSibling","columnRendered","getHeight","columnHeaderVertAlign","adjustTableSize","_getSelf","HTMLElement","root","matches","active","structured","from","moveColumnActual","reinitialize","_moveColumnInArray","getComponents","updateRows","toIndex","fromIndex","concat","adjust","scrollToColumnPosition","scrollToColumnIfVisible","offsetLeft","generateCell","totalWidth","fixedWidth","colWidth","layoutMode","resetScroll","footerManager","RowComponent","_row","transform","getCells","getRowPosition","moveToRow","updateData","normalizeHeight","nextRow","prevRow","Row","manualHeight","outerHeight","created","setData","create","deleteCells","renderRowCells","rowFormatter","rerenderRowCells","children","maxHeight","resizableRows","setHeight","clearHeight","updatedData","newRowData","tempData","attrname","JSON","parse","getColumnsByFieldRoot","findCell","nextDisplayRow","prevDisplayRow","toRow","findRow","moveRowActual","refreshActiveData","deleteActual","getRowIndex","detatchModules","deleteRow","group","BaiscVertical","visibility","onlyGroupHeaders","styleRow","rowTop","VirtualDomVertical","vDomRowHeight","vDomTop","vDomBottom","vDomScrollPosTop","vDomScrollPosBottom","vDomTopPad","vDomBottomPad","vDomMaxRenderChain","vDomWindowBuffer","vDomWindowMinTotalRows","vDomWindowMinMarginRows","vDomTopNewRows","vDomBottomNewRows","paddingBottom","_virtualRenderFill","topRow","topOffset","deinitializeHeight","topDiff","bottomDiff","margin","_addTopRow","vDomScrollHeight","_removeBottomRow","_addBottomRow","_removeTopRow","renderVerticalBuffer","topEdge","bottomEdge","topFound","bottomRow","slice","forceMove","holder","topPad","rowsHeight","heightOccupied","topPadHeight","rowsCount","containerHeight","rowHeight","fillableSpace","addedRows","paddingAdjust","_quickNormalizeRowHeight","removableRows","RowManager","createHolderElement","createTableElement","heightFixer","placeholder","placeholderContents","firstRender","renderMode","fixedHeight","activeRowsPipeline","activeRows","activeRowsCount","displayRows","displayRowsCount","redrawBlockRestoreConfig","redrawBlockRenderInPosition","dataPipeline","displayPipeline","initializePlaceholder","leftDir","topDir","_positionPlaceholder","scrollRows","renderInPosition","columnsChanged","pagination","_setDataActual","reRenderInPosition","autoColumns","generateColumnsFromRowData","_wipeElements","wipe","allIndex","activeIndex","setActiveRows","displayRowIterator","displayIndex","regenerateRowNumbers","_showPlaceholder","pos","addRowActual","findAddRowPos","reverse","addRow","_clearPlaceholder","addRowPos","chainResult","moveRowInArray","findRowIndex","rowOnly","getDisplayRowIndex","getRows","handler","priority","sort","a","b","skipStage","stage","cascadeOrder","refreshPipelines","renderTable","layoutColumnsOnNewData","resetDisplayRows","setDisplayRows","viewable","RendererVirtualDomVertical","RendererBasicVertical","renderVertical","_clearTable","renderEmptyScroll","initialHeight","otherHeight","external","resize","tableWidth","browser","event","createEvent","initEvent","dispatchEvent","Event","FooterManager","containerElement","createContainerElement","links","initializeElement","footerElement","querySelector","activate","deactivate","link","footerRedraw","InteractionManager","abortClasses","previousTargets","listeners","componentMap","pseudoTrackers","subscriber","pseudoTracking","buildListenerMap","bindSubscriptionWatchers","listenerMap","listener","components","pseudoMouseEnter","pseudoMouseLeave","leaveList","linkedKeys","filter","includes","values","comp","subscriptionChanged","clearWatchers","added","bindPseudoEvents","updateEventListeners","track","removeEventListener","path","composedPath","targets","findTargets","bindComponents","triggerEvents","targetMatches","previousTarget","closest","ComponentFunctionBinder","bindings","funcName","DataLoader","loaderElement","createLoaderElement","msgElement","createMsgElement","loadingElement","errorElement","requestOrder","loading","template","dataLoaderLoading","trim","firstElementChild","dataLoaderError","params","replace","requestNo","showLoader","mapParams","dataSendParams","response","objectInvert","dataReceiveParams","rowData","hideLoader","showError","dataLoaderErrorTimeout","map","langText","ExternalEventBus","debug","events","subscriptionNotifiers","_debugDispatch","_dispatch","_notifiySubscriptionChange","notifiers","args","shift","callResult","apply","log","InternalEventBus","_debugChain","_chain","_debugConfirm","_confirm","fallback","confirmed","TableRegistry","tables","query","results","querySelectorAll","matchElement","Tabulator","lookupTable","Module","_handler","register","func","registerDataPipelineHandler","registerDisplayPipelineHandler","responsiveLayout","modExists","fitData","reinitializeColumnWidths","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","registerTableOption","registerColumnOption","modes","moduleName","defaultModes","Localize","locale","lang","langList","langs","headerFilterPlaceholder","setHeaderFilterPlaceholder","installLang","setLocale","registerTableFunction","getLang","headerFilters","_setLangProp","desiredLocale","navigator","language","toLowerCase","prefix","traverseLang","trans","prop","_executeBindings","pathArray","_getLangElement","level","rootPath","binding","Comms","receive","selectors","connections","con","action","connection","tableComms","commsReceived","ModuleBinder","tabulator","bindStaticFuctionality","bindModules","coreModules","moduleBindings","extendModule","property","source","registerModule","mod","registerModuleBinding","findTable","prototype","orderedMods","unOrderedMods","moduleCore","modulesCore","moduleInitOrder","modulesRegular","core","mods","interactionMonitor","browserSlow","browserMobile","rtl","originalElement","initializeCoreSystems","_create","_clearObjectPointers","_mapDeprecatedFunctionality","debugEventsExternal","debugEventsInternal","InteractionMonitor","getSelection","empty","removeAllRanges","selection","_rtlCheck","_buildElement","_initializeTable","_loadInitialData","getComputedStyle","textDirection","direction","reactiveData","newElement","tagName","attributes","replaceChild","_detectBrowser","deregister","ua","userAgent","vendor","opera","test","restoreRedraw","blockActiveLoad","clearData","getDataCount","responses","addRows","newRows","getRowFromPosition","foundRows","fromRow","getDefinitionTree","fromColumn","plugin","required","rowFormatterPrint","rowFormatterClipboard","rowFormatterHtmlOutput","Accessor","allowedTypes","initializeColumn","transformRow","accessor","charAt","toUpperCase","lookupAccessor","accessors","rowComponent","traverse","colCompnent","generateParamsList","serializeParams","encoded","encodeURIComponent","join","headers","body","url","stringify","form","FormData","append","Ajax","urlGenerator","loaderPromise","contentTypeFormatters","ajaxRequestFunc","defaultLoaderPromise","ajaxURLGenerator","defaultURLGenerator","ajaxURL","setUrl","setDefaultConfig","ajaxConfig","getUrl","requestDataCheck","requestParams","requestData","ajaxParams","previousData","generateConfig","sendRequest","defaultConfig","method","ajaxRequesting","ajaxResponse","contentType","ajaxContentType","Accept","location","origin","credentials","fetch","json","status","statusText","defaultContentTypeFormatters","Clipboard","pasteParser","pasteAction","customSelection","rowRange","blocked","clipboard","clipboardCopyRowRange","plain","html","preventDefault","clipboardCopyFormatter","generateExportList","clipboardCopyConfig","clipboardCopyStyled","genereateHTMLTable","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","updateOrAddData","insert","addData","headerFindSuccess","columnMap","CalcComponent","calcParams","precision","reduce","sum","Number","toFixed","parseFloat","String","ColumnCalcs","topCalcs","botCalcs","genColumn","topElement","botElement","botRow","topInitialized","botInitialized","cellValueChanged","initializeColumnCheck","rowsUpdated","recalcActiveRows","recalcActiveRowsRefresh","tableRedraw","getResults","userRecalc","recalc","groupBy","recalcRowGroup","dataTreeStartExpanded","dataTree","recalcAll","topCalc","bottomCalc","columnCalcs","topCalcParams","botCalcParams","bottomCalcParams","calculations","initializeTopRow","botCalc","initializeBottomRow","rowsToData","generateRow","frozenColumns","recalcGroup","groupRows","getRowGroup","getChildGroups","generateRowData","dataTreeChildColumnCalcs","open","getFilteredTreeChildren","disable","enable","format","getFormatter","paramKey","getGroups","getGroupResults","groupObj","subGroups","getSubGroups","subGroupResults","subgroup","groups","defaultCalculations","DataTree","indent","collapseEl","expandEl","branchEl","elementField","startOpen","registerComponentFunction","collapseRow","expandRow","toggleRow","getTreeParent","getRowChildren","addTreeChildRow","isRowExpanded","dummyEl","dataTreeChildField","dataTreeChildIndent","dataTreeBranchElement","dataTreeCollapseElement","tabIndex","dataTreeExpandElement","layoutRow","rowDelete","rowDataChanged","columnMoving","initializeElementField","registerDisplayHandler","firstCol","getFirstVisibleColumn","dataTreeElementColumn","getTreeChildren","redrawNeeded","refreshData","childArray","controlEl","generateControlElement","cloneNode","marginRight","getPropertyValue","oldControl","getChildren","allChildren","generateChildren","dataTreeFilter","dataTreeSort","sub","childData","childRow","childIndex","findChildIndex","recurse","csv","setFileContents","delimiter","fileContents","depth","bom","jsonLines","pdf","header","autoTableParams","rowGroupStyles","fontStyle","fontSize","cellPadding","fillColor","rowCalcStyles","jsPDFParams","jsPDF","parseRow","styles","content","colSpan","rowSpan","orientation","unit","doc","jspdf","autoTable","didDrawPage","head","documentProcessing","xlsx","sheetName","workbook","XLSX","utils","book_new","tableFeatures","generateSheet","merges","worksheet","s","c","r","j","Date","sheet_add_aoa","encode_range","SheetNames","Sheets","sheetOnly","sheets","sheet","commsSend","intercept","buf","ArrayBuffer","view","Uint8Array","charCodeAt","s2ab","write","bookType","bookSST","Download","blob","download","downloadToTab","filename","interceptCallback","downloadFunc","downloaders","mime","triggerDownload","downloadConfig","downloadRowRange","groupHeader","groupHeaderDownload","_group","getRowCount","newTab","Blob","downloadReady","URL","createObjectURL","msSaveOrOpenBlob","click","maskInput","mask","maskLetter","maskLetterChar","maskNumber","maskNumberChar","maskWildcard","maskWildcardChar","fillSymbols","symbol","char","keyCode","maskAutoFill","defaultDownloaders","input","onRendered","success","cancel","editorParams","cellValue","search","padding","boxSizing","elementAttributes","getAttribute","onChange","preventScroll","textarea","vertNav","verticalNavigation","whiteSpace","getRow","heightNow","selectionStart","stopImmediatePropagation","number","step","blurFunc","self","cellEl","initialDisplayValue","defaultValue","listEl","multiselect","dataItems","currentItem","displayItems","currentItems","blurable","blockListShow","searchWord","searchWordTimeout","getUniqueColumnValues","getColumnByField","getColumn","parseItems","inputValues","curentValues","dataList","displayList","processComplexListItem","label","itemParams","setItem","sortValuesList","listItemFormatter","toggleItem","chooseItem","fillList","setCurrentItem","scrollIntoView","behavior","block","inline","fillInput","unsetItem","hideList","chooseItems","cancelItem","cursor","readOnly","len","unsetItems","character","fromCharCode","scrollTovalue","showList","autocomplete","uniqueColumnValues","genUniqueColumnValues","filterList","term","intialLoad","items","searchFunc","addNotice","searchingPlaceholder","fillListIfNotEmpty","err","showListOnEmpty","notice","searchEl","clearList","itemList","current","emptyPlaceholder","freetext","allowEmpty","showInputValue","star","maxStars","getElementsByTagName","size","stars","starsHolder","createElementNS","starChange","buildStar","starHolder","nextStar","blur","changeValue","overflow","textOverflow","progress","mouseDrag","mouseDragWidth","percent","bar","updateValue","calcVal","round","backgroundColor","screenX","tickCross","tristate","indetermValue","indeterminateValue","indetermState","marginTop","checked","indeterminate","Edit","mouseClick","recursionBlock","invalidEdit","editedCells","editors","getEditedCells","clearCellEdited","navigatePrev","navigateNext","navigateLeft","navigateRight","navigateUp","navigateDown","cellisEdited","clearEdited","editCell","cellCancelEdit","bindEditor","columnDeleteCheck","rowDeleteCheck","cancelEdit","keybindingNavigateNext","newRow","edited","nextCell","findNextEditableCell","getIndex","findPrevEditableCell","allowEdit","check","prevCell","editor","editable","validate","cellValidate","clearEditor","variableHeight","cellEditCancelled","contains","button","forceEdit","focusCellNoEvent","getRenderMode","leftEdge","rightEdge","leftMargin","rightMargin","cellEditor","rendered","focusScrollAdjust","cellClick","cellEditing","validationMode","editIndex","invalid","defaultEditors","ExportRow","ExportColumn","Export","cloneTableStyle","colVisProp","getHtml","columnHeaders","headersToExportRows","generateColumnGroupHeaders","bodyToExportRows","rowLookup","genereateTableElement","selectRow","selectedRows","columnGroups","colData","processColumnGroup","maxDepth","groupData","subGroup","subGroupData","columnVisCheck","headerDepth","exportRows","parseColumnGroup","rowGroups","exportCols","headerEl","bodyEl","lookupTableStyles","setup","treeElementField","mapElementStyles","genereateHeaderElement","genereateGroupElement","genereateCalcElement","genereateRowElement","evenRow","oddRow","calcRow","firstRow","firstGroup","getElementsByClassName","styleCells","firstCell","lastCell","classNames","generator","isVisible","cellWrapper","formatCells","formatExportValue","align","renderedCallback","htmlOutputConfig","props","lookup","fromStyle","filterVal","rowVal","filterParams","RegExp","keywords","separator","keyword","matchAll","endsWith","Filter","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","registerDataHandler","initialFilter","setFilter","initialHeaderFilter","refreshFilter","addFilter","removeFilter","all","clearFilter","clearHeaderFilter","headerFilter","setHeaderFilterColumnPlaceholder","filterFunc","filterType","tagType","attrType","filterChangeCheck","prevSuccess","emptyFunc","headerFilterFunc","filters","headerFilterFuncParams","fieldVal","colVal","trackChanges","generateHeaderFilterElement","filterElement","editorElement","typingTimer","searchTrigger","headerElement","headerFilterEmptyCheck","headerFilterParams","headerFilterLiveFilterDelay","hasAttribute","headerFilterLiveFilter","reloadData","findFilter","findSubFilters","ajax","filtersToArray","searchType","filterRecurse","rowList","activeRowComponents","filterRow","_this11","subFilter","_this12","defaultFilters","plaintext","formatterParams","emptyToSpace","sanitizeHTML","money","integer","decimal","rgx","floatVal","sign","decimalSym","thousandSym","thousand","negativeSign","symbolAfter","urlPrefix","labelField","urlField","image","src","urlSuffix","truthy","allowTruthy","tick","tickElement","cross","crossElement","datetime","DT","DateTime","luxon","inputFormat","outputFormat","invalidPlaceholder","newDatetime","fromISO","fromFormat","isValid","timezone","setZone","toFormat","datetimediff","suffix","humanize","date","now","traffic","percentValue","colors","color","legend","legendColor","legendAlign","barEl","barContainer","legendEl","holderEl","buttonTick","buttonCross","rownum","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","leftColumns","rightColumns","rightPadding","initializationMode","scrollEndTimer","layoutCell","blockLayout","unblockLayout","edge","frozenCheck","calcMargins","layoutColumnPosition","layoutCalcRows","_calcSpace","layoutGroupCalcs","groupList","allCells","leftParents","parentEl","getColGroupParentElement","getTableElement","FrozenRows","freezeRow","unfreezeRow","isRowFrozen","detachRow","styleRows","GroupComponent","groupManager","toggleVisibility","Group","oldGroup","hasSubGroups","groupIDLookups","_addRowToGroup","_addRow","elementContents","arrowElement","createElements","addBindings","createValueGroups","arrow","movableRows","moveRow","initializeGroupHeader","allowedValues","_createGroup","groupToggleElement","groupID","groupKey","headerGenerator","conformRowData","generateGroupHeaderContents","updateGroupRows","scrollHeader","groupValues","removeGroup","noCalc","_visSet","getHeadersAndRows","hasTopCalcs","detachElement","generateTopRow","hasBottomCalcs","generateBottomRow","groupClosedShowCalcs","count","getDisplayIndex","checkClassicModeGroupHeaderWidth","prev","compoment","getPath","childNodes","GroupRows","displayHandler","setGroupBy","setGroupValues","setGroupStartOpen","setGroupHeader","userGetGroups","userGetGroupedData","rowGetGroup","groupUpdateOnCellEdit","cellUpdated","reassignRowToGroup","configureGroupSetup","rowDeleting","scrollHeaders","rowMoving","rowAddingIndex","rowSample","virtualRenderFill","groupStartOpen","langValue","removeCalcs","getRealColumns","lookupFunc","prevValue","assignRowToGroup","getGroupedData","toGroup","fromGroup","removeRow","insertRow","generateGroups","groupComponents","groupListData","pullGroupListData","rowCount","headerContent","oldGroups","createGroup","assignRowToExistingGroup","newGroupNeeded","oldRowGroup","oldGroupPath","newGroupPath","getExpectedPath","every","groupPath","groupId","History","history","clearComponentHistory","rowDeleted","rowAdded","rowMoved","undo","redo","getHistoryUndoSize","getHistoryRedoSize","posFrom","posTo","getGroup","newValue","undoers","redoers","oldRow","cellEdit","rowAdd","_rebindRow","rowMove","HtmlTableImport","fieldIndex","hasIndex","tableElementCheck","parseTable","_extractOptions","_extractHeaders","_generateBlankHeaders","optionsArr","attrib","_attribValue","exists","_findCol","textContent","inQuote","nextChar","Import","importFromFile","importFormat","loadDataCheck","loadData","importData","lookupImporter","structureData","importer","importers","extension","pickFile","extensions","accept","file","files","reader","FileReader","importReader","readAsArrayBuffer","readAsBinaryString","readAsDataURL","readAsText","onload","onerror","parsedData","structureArrayToObject","structureArrayToColumns","getColumns","defaultImporters","Interaction","eventMap","rowClick","rowDblClick","rowContext","rowMouseEnter","rowMouseLeave","rowMouseOver","rowMouseOut","rowMouseMove","rowTap","rowDblTap","rowTapHold","cellDblClick","cellContext","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellTap","cellDblTap","cellTapHold","headerMouseEnter","headerMouseLeave","headerMouseOver","headerMouseOut","headerMouseMove","groupClick","groupDblClick","groupContext","groupMouseEnter","groupMouseLeave","groupMouseOver","groupMouseOut","groupMouseMove","groupTap","groupDblTap","groupTapHold","subscribers","touchSubscribers","columnSubscribers","touchWatchers","tapDbl","initializeExternalEvents","cellContentsSelectionFixer","selectNode","subscriptionChangeExternal","subscribeTouchEvents","unsubscribeTouchEvents","handleTouch","notouch","watchers","componentObj","Keybindings","watchKeys","pressedKeys","keyupBinding","keydownBinding","keybindings","mergedBindings","mapBindings","bindEvents","clearBindings","actions","mapBinding","symbolsList","ctrl","meta","code","checkBinding","ctrlKey","shiftKey","metaKey","navPrev","navNext","navUp","navDown","scrollPageUp","scrollPageDown","scrollToStart","scrollToEnd","copyToClipboard","keyBlock","newPos","scrollMax","navLeft","navRight","Menu","menuContainer","menuElements","blurEvent","hideMenu","escEvent","escMenu","nestedMenuBlock","positionReversedX","currentComponent","lookupMenuContainer","initializeRowWatchers","initializeGroupWatchers","checkMenuContainerIsParent","container","rowContextMenu","loadMenuEvent","on","rowClickMenu","groupContextMenu","groupClickMenu","headerContextMenu","loadMenuTableColumnEvent","headerClickMenu","headerMenu","initializeColumnHeaderMenu","contextMenu","loadMenuTableCellEvent","clickMenu","headerMenuEl","menu","loadMenu","touch","MouseEvent","menuEl","itemEl","disabled","hideOldSubMenus","positionMenu","pop","x","y","parentOffset","touches","pageX","pageY","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","moveToCol","_bindMouseMove","movingCells","_unbindMouseMove","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","connectionTables","commsConnections","dropEvent","elementRowDrop","tabulatorElementDropEvent","sender","movableRowsSender","senders","movableRowsReceiver","receivers","connect","disconnect","dropComplete","fromTable","toTable","Mutator","enabled","transformCell","lookupMutator","mutators","mutatorEdit","pageSize","currentRow","currentPage","totalRows","totalPages","showingEl","valueEl","ofEl","totalEl","rowsEl","pages","Page","progressiveLoad","pageCounterElement","pageCounter","page","remoteRowCountEstimate","initialLoad","dataChanging","pageSizes","setMaxPage","setPage","userSetPageToRow","userSetPageSize","getPageSize","previousPage","nextPage","getPage","getPageMax","setPageToRow","initialLoadComplete","calculatePageSizes","paginationAddRow","rowAddingPosition","paginationMode","remotePageParams","_parseRemoteData","restOnRenderBefore","initializePageCounter","initializePaginator","initializeProgressive","scrollVertical","dispRows","testElRow","testElCell","paginationSize","generatePageSizeSelectList","setPageSize","progressiveLoadScrollMargin","pagesElement","firstBut","prevBut","nextBut","lastBut","paginationSizeSelector","pageSizeSelect","counter","paginationCounter","pageCounters","hidden","pageSelectLabel","paginationCounterHolder","paginationElement","paginationCounterElement","paginationInitialPage","paginationButtonCount","trigger","leftSize","rightSize","_generatePageButton","actualStartRow","actualRowPageSize","actualRows","setMaxRows","_setPageButtons","_setPageCounter","last_page","last_row","progressiveLoadDelay","footer","defaultPageCounters","local","id","localStorage","getItem","cookie","cookiePos","expireDate","setDate","getDate","toUTCString","Persistence","defWatcherBlock","readFunc","writeFunc","testKey","removeItem","persistence","retreivedData","persistenceMode","persistenceID","localStorageTest","persistenceReaderFunc","readers","persistenceWriterFunc","writers","retreiveData","save","eventSave","getColumnLayout","setColumnLayout","sorters","initialSort","parseColumns","mergeDefinition","getOwnPropertyDescriptor","defineProperty","set","oldCols","newCols","_findColumn","validateSorters","getSort","getGroupConfig","getPageConfig","excludedKeys","defStore","colDef","defaultReaders","defaultWriters","Print","manualBlock","printAsHtml","replaceTable","cleanup","printFullscreen","genereateTable","printConfig","printStyled","printRowRange","footerContent","scrollX","scrollY","footerEl","tableEl","printHeader","printFooter","printFormatter","scrollTo","ReactiveData","origFuncs","currentVersion","unblock","watchRow","watchData","unwatchData","version","enumerable","configurable","arg","getRowFromDataObject","startRow","oldRows","writable","watchKey","watchTreeChildren","childField","rebuildTree","ResizeColumns","startColumn","startWidth","prevHandle","layoutCellHandles","layoutColumnHeader","resizable","handleDown","nearestColumn","_checkResizability","_mouseDown","oldWidth","prevHandleDown","colIndex","mouseMove","checkCellHeights","mouseUp","ResizeRows","startHeight","screenY","ResizeTable","observer","containerObserver","tableHeight","containerWidth","autoResize","tableStyle","ResizeObserver","entry","nodeHeight","contentRect","nodeWidth","observe","tableResized","unobserve","ResponsiveLayout","hiddenColumns","collapseFormatter","collapseStartOpen","collapseHandleColumn","updateColumnVisibility","initializeResponsivity","responsiveLayoutCollapseFormatter","formatCollapsedData","responsiveLayoutCollapseStartOpen","order","generateCollapsedContent","generateCollapsedRowContent","colCount","working","getFlexBaseWidth","hideColumn","showColumn","generateCollapsedRowData","mockCellComponent","responsiveLayoutCollapseUseFormatters","node_content","titleData","valueData","titleHighlight","SelectRow","selecting","lastClickedRow","selectPrev","headerCheckboxElement","selectRows","deselectRows","getSelectedRows","getSelectedData","isRowSelected","selectable","clearSelectionData","rowRetrieve","selectablePersistence","_deselectRow","_rowSelectionChanged","endSelect","selected","selectableCheck","getCurrentCell","_clearSelection","lastClickedRowIdx","rowIdx","fromRowIdx","toRowIdx","toggledRows","toggledRow","_selectRow","rowMatch","rowInfo","selectableRollingSelection","checkboxEl","dataTreeSelectPropagate","childRowSelection","selectedRow","aRow","bRow","alignEmptyValues","emptyAlign","decimalSeparator","thousandSeparator","string","langLocale","localeCompare","time","array","calc","d","alphanum","as","bs","a1","b1","L","rx","rd","isFinite","Sort","sortList","userSetSort","clearSort","sortMode","remoteSortParams","setSort","refreshSort","arrowEl","sorterParams","startingDir","headerSortStartingDir","headerSortTristate","headerSort","headerSortElement","columnHeaderSortMulti","newSortList","sortOrderReverse","sortListActual","rowComponents","clearColumnHeaders","sortObj","findSorter","setColumnHeader","_sortItems","sorterCount","sortItem","_sortRow","el1Comp","el2Comp","el1","el2","defaultSorters","parameters","numeric","starts","ends","minLength","maxLength","regex","unique","cellData","Validate","invalidCells","getInvalidCells","userClearCellValidation","userValidate","cellIsValid","clearValidation","columnValidate","rowValidate","validator","_extractValidator","substring","_buildValidator","validators","invalidIndex","defaultValidators","TabulatorFull"],"mappings":";upGAAqBA,wBAERC,kBACNA,MAAQA,+CAOHC,EAAMC,UACTC,KAAKH,MAAMI,WAAWC,KAAKJ,OAAMK,OAAWA,OAAWA,EAAWJ,0DAQ7DF,MAAMO,QAAQC,UAASC,gBAAWC,kEAIlCV,MAAMO,QAAQC,UAASG,aAAQD,oEAI/BV,MAAMO,QAAQC,UAASI,kBAAaF,0EASpCV,MAAMO,QAAQM,OAAMC,uBAAkBJ,mEAItCV,MAAMO,QAAQM,OAAME,aAAQL,uDAQjCP,KAAKH,MAAMO,QAAQS,OAAOC,yDAI1Bd,KAAKH,MAAMO,QAAQS,OAAOA,iEASrBhB,MAAMkB,UAASC,kBAAaT,qEAI5BV,MAAMkB,UAASE,oBAAeV,8CAGhCW,UACHlB,KAAKH,MAAMkB,SAASI,WAAWD,oEAI1BrB,MAAMkB,UAASK,2BAAsBb,kEAIrCV,MAAMkB,UAASM,iBAAYd,+DAI3BV,MAAMkB,UAASO,cAASf,iEAIxBV,MAAMkB,UAASQ,gBAAWhB,0EAI1BV,MAAM2B,gBAAeH,iBAAYd,sDAG3BW,UACXlB,KAAKH,MAAM2B,eAAeL,WAAWD,4EAIhCrB,MAAM2B,gBAAeJ,2BAAsBb,2CAOhDW,UACAlB,KAAKH,MAAM4B,QAAQP,qCAGjBA,EAAKQ,eACM,IAAVA,SACJ7B,MAAM4B,QAAQP,GAAOQ,GAGpB1B,KAAKH,MAAM4B,QAAQP,kCAQpBA,UACClB,KAAKH,MAAM8B,OAAOT,YCvHNU,wBACPC,yBACPC,QAAUD,OACVE,KAAO,kBAEL,IAAIC,MAAMhC,KAAM,CACtBiC,IAAK,SAASC,EAAQC,EAAMC,eACC,IAAjBF,EAAOC,GAC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5B,IAAIuF,EAAamiD,GAAe13E"} \ No newline at end of file diff --git a/dist/js/tabulator_esm.js b/dist/js/tabulator_esm.js index fa9e70826..7e19dfa3e 100644 --- a/dist/js/tabulator_esm.js +++ b/dist/js/tabulator_esm.js @@ -1,4 +1,4 @@ -/* Tabulator v5.1.7 (c) Oliver Folkerd 2022 */ +/* Tabulator v5.1.8 (c) Oliver Folkerd 2022 */ class CoreFeature{ constructor(table){ @@ -22191,14 +22191,14 @@ class ComponentFunctionBinder{ } if(this.bindings[type][funcName]){ - console.warn("Unable to bind component handler, a matching function name is already bound", type, funcName, hanlder); + console.warn("Unable to bind component handler, a matching function name is already bound", type, funcName, handler); }else { this.bindings[type][funcName] = handler; } } handle(type, component, name){ - if(this.bindings[type] && this.bindings[type][name]){ + if(this.bindings[type] && this.bindings[type][name] && typeof this.bindings[type][name].bind === 'function'){ return this.bindings[type][name].bind(null, component); }else { if(name !== "then" && typeof name === "string" && !name.startsWith("_")){ diff --git a/dist/js/tabulator_esm.js.map b/dist/js/tabulator_esm.js.map index 67336ab76..8f460566a 100644 --- a/dist/js/tabulator_esm.js.map +++ b/dist/js/tabulator_esm.js.map @@ -1 +1 @@ -{"version":3,"file":"tabulator_esm.js","sources":["../../src/js/core/CoreFeature.js","../../src/js/core/Module.js","../../src/js/core/tools/Helpers.js","../../src/js/modules/Accessor/defaults/accessors.js","../../src/js/modules/Accessor/Accessor.js","../../src/js/modules/Ajax/defaults/config.js","../../src/js/modules/Ajax/defaults/urlGenerator.js","../../src/js/modules/Ajax/defaults/loaderPromise.js","../../src/js/modules/Ajax/defaults/contentTypeFormatters.js","../../src/js/modules/Ajax/Ajax.js","../../src/js/modules/Clipboard/defaults/pasteActions.js","../../src/js/modules/Clipboard/defaults/pasteParsers.js","../../src/js/modules/Clipboard/Clipboard.js","../../src/js/modules/ColumnCalcs/CalcComponent.js","../../src/js/core/cell/CellComponent.js","../../src/js/core/cell/Cell.js","../../src/js/core/column/ColumnComponent.js","../../src/js/core/column/defaults/options.js","../../src/js/core/column/Column.js","../../src/js/core/row/RowComponent.js","../../src/js/core/row/Row.js","../../src/js/modules/ColumnCalcs/defaults/calculations.js","../../src/js/modules/ColumnCalcs/ColumnCalcs.js","../../src/js/modules/DataTree/DataTree.js","../../src/js/modules/Download/defaults/downloaders/csv.js","../../src/js/modules/Download/defaults/downloaders/json.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/defaults/downloaders/jsonLines.js","../../src/js/modules/Download/defaults/downloaders.js","../../src/js/modules/Download/Download.js","../../src/js/modules/Edit/inputMask.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/select.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/defaults/editors.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/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/defaults/formatters.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/defaults/undoers.js","../../src/js/modules/History/defaults/redoers.js","../../src/js/modules/History/History.js","../../src/js/modules/HtmlTableImport/HtmlTableImport.js","../../src/js/modules/Import/defaults/importers/csv.js","../../src/js/modules/Import/defaults/importers/json.js","../../src/js/modules/Import/defaults/importers.js","../../src/js/modules/Import/Import.js","../../src/js/modules/Interaction/Interaction.js","../../src/js/modules/Keybindings/defaults/bindings.js","../../src/js/modules/Keybindings/defaults/actions.js","../../src/js/modules/Keybindings/Keybindings.js","../../src/js/modules/Menu/Menu.js","../../src/js/modules/MoveColumns/MoveColumns.js","../../src/js/modules/MoveRows/MoveRows.js","../../src/js/modules/Mutator/defaults/mutators.js","../../src/js/modules/Mutator/Mutator.js","../../src/js/modules/Page/defaults/pageCounters/rows.js","../../src/js/modules/Page/defaults/pageCounters/pages.js","../../src/js/modules/Page/defaults/pageCounters.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/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/number.js","../../src/js/modules/Sort/defaults/sorters/string.js","../../src/js/modules/Sort/defaults/sorters/datetime.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/defaults/sorters.js","../../src/js/modules/Sort/Sort.js","../../src/js/modules/Validate/defaults/validators.js","../../src/js/modules/Validate/Validate.js","../../src/js/core/defaults/options.js","../../src/js/core/tools/OptionsList.js","../../src/js/core/rendering/Renderer.js","../../src/js/core/rendering/renderers/BasicHorizontal.js","../../src/js/core/rendering/renderers/VirtualDomHorizontal.js","../../src/js/core/ColumnManager.js","../../src/js/core/rendering/renderers/BasicVertical.js","../../src/js/core/rendering/renderers/VirtualDomVertical.js","../../src/js/core/RowManager.js","../../src/js/core/FooterManager.js","../../src/js/core/tools/InteractionMonitor.js","../../src/js/core/tools/ComponentFunctionBinder.js","../../src/js/core/tools/DataLoader.js","../../src/js/core/tools/ExternalEventBus.js","../../src/js/core/tools/InternalEventBus.js","../../src/js/core/tools/TableRegistry.js","../../src/js/modules/Layout/defaults/modes/fitData.js","../../src/js/modules/Layout/defaults/modes/fitDataGeneral.js","../../src/js/modules/Layout/defaults/modes/fitDataStretch.js","../../src/js/modules/Layout/defaults/modes/fitColumns.js","../../src/js/modules/Layout/defaults/modes.js","../../src/js/modules/Layout/Layout.js","../../src/js/modules/Localize/defaults/langs.js","../../src/js/modules/Localize/Localize.js","../../src/js/modules/Comms/Comms.js","../../src/js/core/tools/ModuleBinder.js","../../src/js/core/Tabulator.js","../../src/js/core/TabulatorFull.js","../../src/js/core/row/PseudoRow.js"],"sourcesContent":["export default class CoreFeature{\r\n\r\n\tconstructor(table){\r\n\t\tthis.table = table;\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t/////////////// DataLoad /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\treloadData(data, silent){\r\n\t\treturn this.table.dataLoader.load(data, undefined, undefined, undefined, silent);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t///////////// Localization ///////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tlangText(){\r\n\t\treturn this.table.modules.localize.getText(...arguments);\r\n\t}\r\n\r\n\tlangBind(){\r\n\t\treturn this.table.modules.localize.bind(...arguments);\r\n\t}\r\n\r\n\tlangLocale(){\r\n\t\treturn this.table.modules.localize.getLocale(...arguments);\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t////////// Inter Table Comms /////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tcommsConnections(){\r\n\t\treturn this.table.modules.comms.getConnections(...arguments);\r\n\t}\r\n\r\n\tcommsSend(){\r\n\t\treturn this.table.modules.comms.send(...arguments);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Layout /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tlayoutMode(){\r\n\t\treturn this.table.modules.layout.getMode();\r\n\t}\r\n\r\n\tlayoutRefresh(){\r\n\t\treturn this.table.modules.layout.layout();\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t/////////////// Event Bus ////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tsubscribe(){\r\n\t\treturn this.table.eventBus.subscribe(...arguments);\r\n\t}\r\n\r\n\tunsubscribe(){\r\n\t\treturn this.table.eventBus.unsubscribe(...arguments);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.table.eventBus.subscribed(key);\r\n\t}\r\n\r\n\tsubscriptionChange(){\r\n\t\treturn this.table.eventBus.subscriptionChange(...arguments);\r\n\t}\r\n\r\n\tdispatch(){\r\n\t\treturn this.table.eventBus.dispatch(...arguments);\r\n\t}\r\n\r\n\tchain(){\r\n\t\treturn this.table.eventBus.chain(...arguments);\r\n\t}\r\n\r\n\tconfirm(){\r\n\t\treturn this.table.eventBus.confirm(...arguments);\r\n\t}\r\n\r\n\tdispatchExternal(){\r\n\t\treturn this.table.externalEvents.dispatch(...arguments);\r\n\t}\r\n\r\n\tsubscribedExternal(key){\r\n\t\treturn this.table.externalEvents.subscribed(key);\r\n\t}\r\n\r\n\tsubscriptionChangeExternal(){\r\n\t\treturn this.table.externalEvents.subscriptionChange(...arguments);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Options /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\toptions(key){\r\n\t\treturn this.table.options[key];\r\n\t}\r\n\r\n\tsetOption(key, value){\r\n\t\tif(typeof value !== \"undefined\"){\r\n\t\t\tthis.table.options[key] = value;\r\n\t\t}\r\n\r\n\t\treturn this.table.options[key];\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Modules /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tmodule(key){\r\n\t\treturn this.table.module(key);\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\n\r\nclass Module extends CoreFeature{\r\n\r\n\tconstructor(table, name){\r\n\t\tsuper(table);\r\n\r\n\t\tthis._handler = null;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\t// setup module when table is initialized, to be overriden in module\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t////// Options Registration ///////\r\n\t///////////////////////////////////\r\n\r\n\tregisterTableOption(key, value){\r\n\t\tthis.table.optionsList.register(key, value);\r\n\t}\r\n\r\n\tregisterColumnOption(key, value){\r\n\t\tthis.table.columnManager.optionsList.register(key, value);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t/// Public Function Registation ///\r\n\t///////////////////////////////////\r\n\r\n\tregisterTableFunction(name, func){\r\n\t\tif(typeof this.table[name] === \"undefined\"){\r\n\t\t\tthis.table[name] = func;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Unable to bind table function, name already in use\", name)\r\n\t\t}\r\n\t}\r\n\r\n\tregisterComponentFunction(component, func, handler){\r\n\t\treturn this.table.componentFunctionBinder.bind(component, func, handler);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Data Pipeline //////////\r\n\t///////////////////////////////////\r\n\r\n\tregisterDataHandler(handler, priority){\r\n\t\tthis.table.rowManager.registerDataPipelineHandler(handler, priority)\r\n\t\tthis._handler = handler;\r\n\t}\r\n\r\n\tregisterDisplayHandler(handler, priority){\r\n\t\tthis.table.rowManager.registerDisplayPipelineHandler(handler, priority)\r\n\t\tthis._handler = handler;\r\n\t}\r\n\r\n\trefreshData(renderInPosition, handler){\r\n\t\tif(!handler){\r\n\t\t\thandler = this._handler;\r\n\t\t}\r\n\r\n\t\tif(handler){\r\n\t\t\tthis.table.rowManager.refreshActiveData(handler, false, renderInPosition);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport default Module;","export default class Helpers{\r\n\r\n\tstatic elVisible(el){\r\n\t\treturn !(el.offsetWidth <= 0 && el.offsetHeight <= 0);\r\n\t}\r\n\r\n\tstatic elOffset(el){\r\n\t\tvar box = el.getBoundingClientRect();\r\n\r\n\t\treturn {\r\n\t\t\ttop: box.top + window.pageYOffset - document.documentElement.clientTop,\r\n\t\t\tleft: box.left + window.pageXOffset - document.documentElement.clientLeft\r\n\t\t};\r\n\t}\r\n\r\n\tstatic deepClone(obj, clone, list = []){\r\n\t\tvar objectProto = {}.__proto__,\r\n\t\tarrayProto = [].__proto__;\r\n\r\n\t\tif (!clone){\r\n\t\t\tclone = Object.assign(Array.isArray(obj) ? [] : {}, obj);\r\n\t\t}\r\n\r\n\t\tfor(var i in obj) {\r\n\t\t\tlet subject = obj[i],\r\n\t\t\tmatch, copy;\r\n\r\n\t\t\tif(subject != null && typeof subject === \"object\" && (subject.__proto__ === objectProto || subject.__proto__ === arrayProto)){\r\n\t\t\t\tmatch = list.findIndex((item) => {\r\n\t\t\t\t\treturn item.subject === subject;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(match > -1){\r\n\t\t\t\t\tclone[i] = list[match].copy;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcopy = Object.assign(Array.isArray(subject) ? [] : {}, subject);\r\n\r\n\t\t\t\t\tlist.unshift({subject, copy});\r\n\r\n\t\t\t\t\tclone[i] = this.deepClone(subject, copy, list);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn clone;\r\n\t}\r\n}","export default {}","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defautlAccessors from './defaults/accessors.js';\r\n\r\nclass Accessor extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.allowedTypes = [\"\", \"data\", \"download\", \"clipboard\", \"print\", \"htmlOutput\"] //list of accessor types\r\n\r\n\t\tthis.registerColumnOption(\"accessor\");\r\n\t\tthis.registerColumnOption(\"accessorParams\");\r\n\t\tthis.registerColumnOption(\"accessorData\");\r\n\t\tthis.registerColumnOption(\"accessorDataParams\");\r\n\t\tthis.registerColumnOption(\"accessorDownload\");\r\n\t\tthis.registerColumnOption(\"accessorDownloadParams\");\r\n\t\tthis.registerColumnOption(\"accessorClipboard\");\r\n\t\tthis.registerColumnOption(\"accessorClipboardParams\");\r\n\t\tthis.registerColumnOption(\"accessorPrint\");\r\n\t\tthis.registerColumnOption(\"accessorPrintParams\");\r\n\t\tthis.registerColumnOption(\"accessorHtmlOutput\");\r\n\t\tthis.registerColumnOption(\"accessorHtmlOutputParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"row-data-retrieve\", this.transformRow.bind(this));\r\n\t}\r\n\r\n\t//initialize column accessor\r\n\tinitializeColumn(column){\r\n\t\tvar match = false,\r\n\t\tconfig = {};\r\n\r\n\t\tthis.allowedTypes.forEach((type) => {\r\n\t\t\tvar key = \"accessor\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\t\taccessor;\r\n\r\n\t\t\tif(column.definition[key]){\r\n\t\t\t\taccessor = this.lookupAccessor(column.definition[key]);\r\n\r\n\t\t\t\tif(accessor){\r\n\t\t\t\t\tmatch = true;\r\n\r\n\t\t\t\t\tconfig[key] = {\r\n\t\t\t\t\t\taccessor:accessor,\r\n\t\t\t\t\t\tparams: column.definition[key + \"Params\"] || {},\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tcolumn.modules.accessor = config;\r\n\t\t}\r\n\t}\r\n\r\n\tlookupAccessor(value){\r\n\t\tvar accessor = false;\r\n\r\n\t\t//set column accessor\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Accessor.accessors[value]){\r\n\t\t\t\taccessor = Accessor.accessors[value]\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Accessor Error - No such accessor found, ignoring: \", value);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\taccessor = value;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn accessor;\r\n\t}\r\n\r\n\t//apply accessor to row\r\n\ttransformRow(row, type){\r\n\t\tvar key = \"accessor\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\trowComponent = row.getComponent();\r\n\r\n\t\t//clone data object with deep copy to isolate internal data from returned result\r\n\t\tvar data = Helpers.deepClone(row.data || {});\r\n\r\n\t\tthis.table.columnManager.traverse(function(column){\r\n\t\t\tvar value, accessor, params, colCompnent;\r\n\r\n\t\t\tif(column.modules.accessor){\r\n\r\n\t\t\t\taccessor = column.modules.accessor[key] || column.modules.accessor.accessor || false;\r\n\r\n\t\t\t\tif(accessor){\r\n\t\t\t\t\tvalue = column.getFieldValue(data);\r\n\r\n\t\t\t\t\tif(value != \"undefined\"){\r\n\t\t\t\t\t\tcolCompnent = column.getComponent();\r\n\t\t\t\t\t\tparams = typeof accessor.params === \"function\" ? accessor.params(value, data, type, colCompnent, rowComponent) : accessor.params;\r\n\t\t\t\t\t\tcolumn.setFieldValue(data, accessor.accessor(value, data, type, params, colCompnent, rowComponent));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n}\r\n\r\n//load defaults\r\nAccessor.moduleName = \"accessor\";\r\nAccessor.accessors = defautlAccessors;\r\n\r\nexport default Accessor;","export default {\r\n\tmethod: \"GET\",\r\n};","function generateParamsList(data, prefix){\r\n\tvar output = [];\r\n\r\n\tprefix = prefix || \"\";\r\n\r\n\tif(Array.isArray(data)){\r\n\t\tdata.forEach((item, i) => {\r\n\t\t\toutput = output.concat(generateParamsList(item, prefix ? prefix + \"[\" + i + \"]\" : i));\r\n\t\t});\r\n\t}else if (typeof data === \"object\"){\r\n\t\tfor (var key in data){\r\n\t\t\toutput = output.concat(generateParamsList(data[key], prefix ? prefix + \"[\" + key + \"]\" : key));\r\n\t\t}\r\n\t}else{\r\n\t\toutput.push({key:prefix, value:data});\r\n\t}\r\n\r\n\treturn output;\r\n}\r\n\r\nfunction serializeParams(params){\r\n\tvar output = generateParamsList(params),\r\n\tencoded = [];\r\n\r\n\toutput.forEach(function(item){\r\n\t\tencoded.push(encodeURIComponent(item.key) + \"=\" + encodeURIComponent(item.value));\r\n\t});\r\n\r\n\treturn encoded.join(\"&\");\r\n}\r\n\r\nexport default function(url, config, params){\r\n\tif(url){\r\n\t\tif(params && Object.keys(params).length){\r\n\t\t\tif(!config.method || config.method.toLowerCase() == \"get\"){\r\n\t\t\t\tconfig.method = \"get\";\r\n\r\n\t\t\t\turl += (url.includes(\"?\") ? \"&\" : \"?\") + serializeParams(params);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn url;\r\n};","export default function(url, config, params){\r\n\tvar contentType;\r\n\r\n\treturn new Promise((resolve, reject) => {\r\n\t\t//set url\r\n\t\turl = this.urlGenerator.call(this.table, url, config, params);\r\n\r\n\t\t//set body content if not GET request\r\n\t\tif(config.method.toUpperCase() != \"GET\"){\r\n\t\t\tcontentType = typeof this.table.options.ajaxContentType === \"object\" ? this.table.options.ajaxContentType : this.contentTypeFormatters[this.table.options.ajaxContentType];\r\n\t\t\tif(contentType){\r\n\r\n\t\t\t\tfor(var key in contentType.headers){\r\n\t\t\t\t\tif(!config.headers){\r\n\t\t\t\t\t\tconfig.headers = {};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(typeof config.headers[key] === \"undefined\"){\r\n\t\t\t\t\t\tconfig.headers[key] = contentType.headers[key];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconfig.body = contentType.body.call(this, url, config, params);\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Ajax Error - Invalid ajaxContentType value:\", this.table.options.ajaxContentType);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(url){\r\n\t\t\t//configure headers\r\n\t\t\tif(typeof config.headers === \"undefined\"){\r\n\t\t\t\tconfig.headers = {};\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.headers.Accept === \"undefined\"){\r\n\t\t\t\tconfig.headers.Accept = \"application/json\";\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.headers[\"X-Requested-With\"] === \"undefined\"){\r\n\t\t\t\tconfig.headers[\"X-Requested-With\"] = \"XMLHttpRequest\";\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.mode === \"undefined\"){\r\n\t\t\t\tconfig.mode = \"cors\";\r\n\t\t\t}\r\n\r\n\t\t\tif(config.mode == \"cors\"){\r\n\t\t\t\tif(typeof config.headers[\"Origin\"] === \"undefined\"){\r\n\t\t\t\t\tconfig.headers[\"Origin\"] = window.location.origin;\r\n\t\t\t\t}\r\n \r\n\t\t\t\tif(typeof config.credentials === \"undefined\"){\r\n\t\t\t\t\tconfig.credentials = 'same-origin';\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(typeof config.credentials === \"undefined\"){\r\n\t\t\t\t\tconfig.credentials = 'include';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//send request\r\n\t\t\tfetch(url, config)\r\n\t\t\t.then((response)=>{\r\n\t\t\t\tif(response.ok) {\r\n\t\t\t\t\tresponse.json()\r\n\t\t\t\t\t.then((data)=>{\r\n\t\t\t\t\t\tresolve(data);\r\n\t\t\t\t\t}).catch((error)=>{\r\n\t\t\t\t\t\treject(error);\r\n\t\t\t\t\t\tconsole.warn(\"Ajax Load Error - Invalid JSON returned\", error);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \" + response.status, response.statusText);\r\n\t\t\t\t\treject(response);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.catch((error)=>{\r\n\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \", error);\r\n\t\t\t\treject(error);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Ajax Load Error - No URL Set\");\r\n\t\t\tresolve([]);\r\n\t\t}\r\n\t});\r\n};","function generateParamsList(data, prefix){\r\n\tvar output = [];\r\n\r\n\tprefix = prefix || \"\";\r\n\r\n\tif(Array.isArray(data)){\r\n\t\tdata.forEach((item, i) => {\r\n\t\t\toutput = output.concat(generateParamsList(item, prefix ? prefix + \"[\" + i + \"]\" : i));\r\n\t\t});\r\n\t}else if (typeof data === \"object\"){\r\n\t\tfor (var key in data){\r\n\t\t\toutput = output.concat(generateParamsList(data[key], prefix ? prefix + \"[\" + key + \"]\" : key));\r\n\t\t}\r\n\t}else{\r\n\t\toutput.push({key:prefix, value:data});\r\n\t}\r\n\r\n\treturn output;\r\n}\r\n\r\nexport default {\r\n\t\"json\":{\r\n\t\theaders:{\r\n\t\t\t'Content-Type': 'application/json',\r\n\t\t},\r\n\t\tbody:function(url, config, params){\r\n\t\t\treturn JSON.stringify(params);\r\n\t\t},\r\n\t},\r\n\t\"form\":{\r\n\t\theaders:{\r\n\t\t},\r\n\t\tbody:function(url, config, params){\r\n\r\n\t\t\tvar output = generateParamsList(params),\r\n\t\t\tform = new FormData();\r\n\r\n\t\t\toutput.forEach(function(item){\r\n\t\t\t\tform.append(item.key, item.value);\r\n\t\t\t});\r\n\r\n\t\t\treturn form;\r\n\t\t},\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultConfig from './defaults/config.js';\r\nimport defaultURLGenerator from './defaults/urlGenerator.js';\r\nimport defaultLoaderPromise from './defaults/loaderPromise.js';\r\nimport defaultContentTypeFormatters from './defaults/contentTypeFormatters.js';\r\n\r\nclass Ajax extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.config = {}; //hold config object for ajax request\r\n\t\tthis.url = \"\"; //request URL\r\n\t\tthis.urlGenerator = false;\r\n\t\tthis.params = false; //request parameters\r\n\t\t\r\n\t\tthis.loaderPromise = false;\r\n\t\t\r\n\t\tthis.registerTableOption(\"ajaxURL\", false); //url for ajax loading\r\n\t\tthis.registerTableOption(\"ajaxURLGenerator\", false);\r\n\t\tthis.registerTableOption(\"ajaxParams\", {}); //params for ajax loading\r\n\t\tthis.registerTableOption(\"ajaxConfig\", \"get\"); //ajax request type\r\n\t\tthis.registerTableOption(\"ajaxContentType\", \"form\"); //ajax request type\r\n\t\tthis.registerTableOption(\"ajaxRequestFunc\", false); //promise function\r\n\t\t\r\n\t\tthis.registerTableOption(\"ajaxRequesting\", function(){});\r\n\t\tthis.registerTableOption(\"ajaxResponse\", false);\r\n\t\t\r\n\t\tthis.contentTypeFormatters = Ajax.contentTypeFormatters;\r\n\t}\r\n\t\r\n\t//initialize setup options\r\n\tinitialize(){\r\n\t\tthis.loaderPromise = this.table.options.ajaxRequestFunc || Ajax.defaultLoaderPromise;\r\n\t\tthis.urlGenerator = this.table.options.ajaxURLGenerator || Ajax.defaultURLGenerator;\r\n\t\t\r\n\t\tif(this.table.options.ajaxURL){\r\n\t\t\tthis.setUrl(this.table.options.ajaxURL);\r\n\t\t}\r\n\r\n\r\n\t\tthis.setDefaultConfig(this.table.options.ajaxConfig);\r\n\t\t\r\n\t\tthis.registerTableFunction(\"getAjaxUrl\", this.getUrl.bind(this));\r\n\t\t\r\n\t\tthis.subscribe(\"data-loading\", this.requestDataCheck.bind(this));\r\n\t\tthis.subscribe(\"data-params\", this.requestParams.bind(this));\r\n\t\tthis.subscribe(\"data-load\", this.requestData.bind(this));\r\n\t}\r\n\t\r\n\trequestParams(data, config, silent, params){\r\n\t\tvar ajaxParams = this.table.options.ajaxParams;\r\n\t\t\r\n\t\tif(ajaxParams){\r\n\t\t\tif(typeof ajaxParams === \"function\"){\r\n\t\t\t\tajaxParams = ajaxParams.call(this.table);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tparams = Object.assign(params, ajaxParams);\r\n\t\t}\t\t\r\n\t\t\r\n\t\treturn params;\r\n\t}\r\n\t\r\n\trequestDataCheck(data, params, config, silent){\r\n\t\treturn !!((!data && this.url) || typeof data === \"string\");\r\n\t}\r\n\t\r\n\trequestData(url, params, config, silent, previousData){\r\n\t\tvar ajaxConfig;\r\n\t\t\r\n\t\tif(!previousData && this.requestDataCheck(url)){\r\n\t\t\tif(url){\r\n\t\t\t\tthis.setUrl(url);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tajaxConfig = this.generateConfig(config);\r\n\t\t\t\r\n\t\t\treturn this.sendRequest(this.url, params, ajaxConfig);\r\n\t\t}else{\r\n\t\t\treturn previousData;\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetDefaultConfig(config = {}){\r\n\t\tthis.config = Object.assign({}, Ajax.defaultConfig);\r\n\r\n\t\tif(typeof config == \"string\"){\r\n\t\t\tthis.config.method = config;\r\n\t\t}else{\r\n\t\t\tObject.assign(this.config, config);\r\n\t\t}\r\n\t}\r\n\t\r\n\t//load config object\r\n\tgenerateConfig(config = {}){\r\n\t\tvar ajaxConfig = Object.assign({}, this.config)\r\n\t\t\r\n\t\tif(typeof config == \"string\"){\r\n\t\t\tajaxConfig.method = config;\r\n\t\t}else{\r\n\t\t\tObject.assign(ajaxConfig, config);\r\n\t\t}\r\n\t\t\r\n\t\treturn ajaxConfig;\r\n\t}\r\n\t\r\n\t//set request url\r\n\tsetUrl(url){\r\n\t\tthis.url = url;\r\n\t}\r\n\t\r\n\t//get request url\r\n\tgetUrl(){\r\n\t\treturn this.url;\r\n\t}\r\n\t\r\n\t//send ajax request\r\n\tsendRequest(url, params, config){\r\n\t\tif(this.table.options.ajaxRequesting.call(this.table, url, params) !== false){\r\n\t\t\treturn this.loaderPromise(url, config, params)\r\n\t\t\t.then((data)=>{\r\n\t\t\t\tif(this.table.options.ajaxResponse){\r\n\t\t\t\t\tdata = this.table.options.ajaxResponse.call(this.table, url, params, data);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn data;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n}\r\n\r\nAjax.moduleName = \"ajax\";\r\n\r\n//load defaults\r\nAjax.defaultConfig = defaultConfig;\r\nAjax.defaultURLGenerator = defaultURLGenerator;\r\nAjax.defaultLoaderPromise = defaultLoaderPromise;\r\nAjax.contentTypeFormatters = defaultContentTypeFormatters;\r\n\r\nexport default Ajax;","export default {\r\n\treplace:function(rows){\r\n\t\treturn this.table.setData(rows);\r\n\t},\r\n\tupdate:function(rows){\r\n\t\treturn this.table.updateOrAddData(rows);\r\n\t},\r\n\tinsert:function(rows){\r\n\t\treturn this.table.addData(rows);\r\n\t},\r\n};","export default {\r\n\ttable:function(clipboard){\r\n\t\tvar data = [],\r\n\t\tsuccess = false,\r\n\t\theaderFindSuccess = true,\r\n\t\tcolumns = this.table.columnManager.columns,\r\n\t\tcolumnMap = [],\r\n\t\trows = [];\r\n\r\n\t\t//get data from clipboard into array of columns and rows.\r\n\t\tclipboard = clipboard.split(\"\\n\");\r\n\r\n\t\tclipboard.forEach(function(row){\r\n\t\t\tdata.push(row.split(\"\\t\"));\r\n\t\t});\r\n\r\n\t\tif(data.length && !(data.length === 1 && data[0].length < 2)){\r\n\t\t\tsuccess = true;\r\n\r\n\t\t\t//check if headers are present by title\r\n\t\t\tdata[0].forEach(function(value){\r\n\t\t\t\tvar column = columns.find(function(column){\r\n\t\t\t\t\treturn value && column.definition.title && value.trim() && column.definition.title.trim() === value.trim();\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tcolumnMap.push(column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\theaderFindSuccess = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t//check if column headers are present by field\r\n\t\t\tif(!headerFindSuccess){\r\n\t\t\t\theaderFindSuccess = true;\r\n\t\t\t\tcolumnMap = [];\r\n\r\n\t\t\t\tdata[0].forEach(function(value){\r\n\t\t\t\t\tvar column = columns.find(function(column){\r\n\t\t\t\t\t\treturn value && column.field && value.trim() && column.field.trim() === value.trim();\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(column){\r\n\t\t\t\t\t\tcolumnMap.push(column);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\theaderFindSuccess = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(!headerFindSuccess){\r\n\t\t\t\t\tcolumnMap = this.table.columnManager.columnsByIndex;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//remove header row if found\r\n\t\t\tif(headerFindSuccess){\r\n\t\t\t\tdata.shift();\r\n\t\t\t}\r\n\r\n\t\t\tdata.forEach(function(item){\r\n\t\t\t\tvar row = {};\r\n\r\n\t\t\t\titem.forEach(function(value, i){\r\n\t\t\t\t\tif(columnMap[i]){\r\n\t\t\t\t\t\trow[columnMap[i].field] = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\trows.push(row);\r\n\t\t\t});\r\n\r\n\t\t\treturn rows;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultPasteActions from './defaults/pasteActions.js';\r\nimport defaultPasteParsers from './defaults/pasteParsers.js';\r\n\r\nclass Clipboard extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.mode = true;\r\n\t\tthis.pasteParser = function(){};\r\n\t\tthis.pasteAction = function(){};\r\n\t\tthis.customSelection = false;\r\n\t\tthis.rowRange = false;\r\n\t\tthis.blocked = true; //block copy actions not originating from this command\r\n\r\n\t\tthis.registerTableOption(\"clipboard\", false); //enable clipboard\r\n\t\tthis.registerTableOption(\"clipboardCopyStyled\", true); //formatted table data\r\n\t\tthis.registerTableOption(\"clipboardCopyConfig\", false); //clipboard config\r\n\t\tthis.registerTableOption(\"clipboardCopyFormatter\", false); //DEPRICATED - REMOVE in 5.0\r\n\t\tthis.registerTableOption(\"clipboardCopyRowRange\", \"active\"); //restrict clipboard to visible rows only\r\n\t\tthis.registerTableOption(\"clipboardPasteParser\", \"table\"); //convert pasted clipboard data to rows\r\n\t\tthis.registerTableOption(\"clipboardPasteAction\", \"insert\"); //how to insert pasted data into the table\r\n\r\n\t\tthis.registerColumnOption(\"clipboard\");\r\n\t\tthis.registerColumnOption(\"titleClipboard\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.mode = this.table.options.clipboard;\r\n\r\n\t\tthis.rowRange = this.table.options.clipboardCopyRowRange;\r\n\r\n\t\tif(this.mode === true || this.mode === \"copy\"){\r\n\t\t\tthis.table.element.addEventListener(\"copy\", (e) => {\r\n\t\t\t\tvar plain, html, list;\r\n\r\n\t\t\t\tif(!this.blocked){\r\n\t\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\t\tif(this.customSelection){\r\n\t\t\t\t\t\tplain = this.customSelection;\r\n\r\n\t\t\t\t\t\tif(this.table.options.clipboardCopyFormatter){\r\n\t\t\t\t\t\t\tplain = this.table.options.clipboardCopyFormatter(\"plain\", plain);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\r\n\t\t\t\t\t\tvar list = this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig, this.table.options.clipboardCopyStyled, this.rowRange, \"clipboard\");\r\n\r\n\t\t\t\t\t\thtml = this.table.modules.export.genereateHTMLTable(list);\r\n\t\t\t\t\t\tplain = html ? this.generatePlainContent(list) : \"\";\r\n\r\n\t\t\t\t\t\tif(this.table.options.clipboardCopyFormatter){\r\n\t\t\t\t\t\t\tplain = this.table.options.clipboardCopyFormatter(\"plain\", plain);\r\n\t\t\t\t\t\t\thtml = this.table.options.clipboardCopyFormatter(\"html\", html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (window.clipboardData && window.clipboardData.setData) {\r\n\t\t\t\t\t\twindow.clipboardData.setData('Text', plain);\r\n\t\t\t\t\t} else if (e.clipboardData && e.clipboardData.setData) {\r\n\t\t\t\t\t\te.clipboardData.setData('text/plain', plain);\r\n\t\t\t\t\t\tif(html){\r\n\t\t\t\t\t\t\te.clipboardData.setData('text/html', html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (e.originalEvent && e.originalEvent.clipboardData.setData) {\r\n\t\t\t\t\t\te.originalEvent.clipboardData.setData('text/plain', plain);\r\n\t\t\t\t\t\tif(html){\r\n\t\t\t\t\t\t\te.originalEvent.clipboardData.setData('text/html', html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.dispatchExternal(\"clipboardCopied\", plain, html);\r\n\r\n\t\t\t\t\tthis.reset();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.mode === true || this.mode === \"paste\"){\r\n\t\t\tthis.table.element.addEventListener(\"paste\", (e) => {\r\n\t\t\t\tthis.paste(e);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.setPasteParser(this.table.options.clipboardPasteParser);\r\n\t\tthis.setPasteAction(this.table.options.clipboardPasteAction);\r\n\r\n\t\tthis.registerTableFunction(\"copyToClipboard\", this.copy.bind(this));\r\n\t}\r\n\r\n\treset(){\r\n\t\tthis.blocked = true;\r\n\t\tthis.customSelection = false;\r\n\t}\r\n\r\n\tgeneratePlainContent (list) {\r\n\t\tvar output = [];\r\n\r\n\t\tlist.forEach((row) => {\r\n\t\t\tvar rowData = [];\r\n\r\n\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\tvar value = \"\";\r\n\r\n\t\t\t\tif(col){\r\n\r\n\t\t\t\t\tif(row.type === \"group\"){\r\n\t\t\t\t\t\tcol.value = col.component.getKey();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(col.value === null){\r\n\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\t\tvalue = JSON.stringify(col.value);\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tvalue = col.value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowData.push(value);\r\n\t\t\t});\r\n\r\n\t\t\toutput.push(rowData.join(\"\\t\"));\r\n\t\t});\r\n\r\n\t\treturn output.join(\"\\n\");\r\n\t}\r\n\r\n\tcopy (range, internal) {\r\n\t\tvar range, sel, textRange;\r\n\t\tthis.blocked = false;\r\n\t\tthis.customSelection = false;\r\n\r\n\t\tif (this.mode === true || this.mode === \"copy\") {\r\n\r\n\t\t\tthis.rowRange = range || this.table.options.clipboardCopyRowRange;\r\n\r\n\t\t\tif (typeof window.getSelection != \"undefined\" && typeof document.createRange != \"undefined\") {\r\n\t\t\t\trange = document.createRange();\r\n\t\t\t\trange.selectNodeContents(this.table.element);\r\n\t\t\t\tsel = window.getSelection();\r\n\r\n\t\t\t\tif (sel.toString() && internal) {\r\n\t\t\t\t\tthis.customSelection = sel.toString();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsel.removeAllRanges();\r\n\t\t\t\tsel.addRange(range);\r\n\t\t\t} else if (typeof document.selection != \"undefined\" && typeof document.body.createTextRange != \"undefined\") {\r\n\t\t\t\ttextRange = document.body.createTextRange();\r\n\t\t\t\ttextRange.moveToElementText(this.table.element);\r\n\t\t\t\ttextRange.select();\r\n\t\t\t}\r\n\r\n\t\t\tdocument.execCommand('copy');\r\n\r\n\t\t\tif (sel) {\r\n\t\t\t\tsel.removeAllRanges();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//PASTE EVENT HANDLING\r\n\tsetPasteAction(action){\r\n\r\n\t\tswitch(typeof action){\r\n\t\t\tcase \"string\":\r\n\t\t\tthis.pasteAction = Clipboard.pasteActions[action];\r\n\r\n\t\t\tif(!this.pasteAction){\r\n\t\t\t\tconsole.warn(\"Clipboard Error - No such paste action found:\", action);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tthis.pasteAction = action;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tsetPasteParser(parser){\r\n\t\tswitch(typeof parser){\r\n\t\t\tcase \"string\":\r\n\t\t\tthis.pasteParser = Clipboard.pasteParsers[parser];\r\n\r\n\t\t\tif(!this.pasteParser){\r\n\t\t\t\tconsole.warn(\"Clipboard Error - No such paste parser found:\", parser);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tthis.pasteParser = parser;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tpaste(e){\r\n\t\tvar data, rowData, rows;\r\n\r\n\t\tif(this.checkPaseOrigin(e)){\r\n\r\n\t\t\tdata = this.getPasteData(e);\r\n\r\n\t\t\trowData = this.pasteParser.call(this, data);\r\n\r\n\t\t\tif(rowData){\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\t\t\trowData = this.mutateData(rowData);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trows = this.pasteAction.call(this, rowData);\r\n\r\n\t\t\t\tthis.dispatchExternal(\"clipboardPasted\", data, rowData, rows);\r\n\t\t\t}else{\r\n\t\t\t\tthis.dispatchExternal(\"clipboardPasteError\", data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmutateData(data){\r\n\t\tvar output = [];\r\n\r\n\t\tif(Array.isArray(data)){\r\n\t\t\tdata.forEach((row) => {\r\n\t\t\t\toutput.push(this.table.modules.mutator.transformRow(row, \"clipboard\"));\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\toutput = data;\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\r\n\tcheckPaseOrigin(e){\r\n\t\tvar valid = true;\r\n\r\n\t\tif(e.target.tagName != \"DIV\" || this.table.modules.edit.currentCell){\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\r\n\t\treturn valid;\r\n\t}\r\n\r\n\tgetPasteData(e){\r\n\t\tvar data;\r\n\r\n\t\tif (window.clipboardData && window.clipboardData.getData) {\r\n\t\t\tdata = window.clipboardData.getData('Text');\r\n\t\t} else if (e.clipboardData && e.clipboardData.getData) {\r\n\t\t\tdata = e.clipboardData.getData('text/plain');\r\n\t\t} else if (e.originalEvent && e.originalEvent.clipboardData.getData) {\r\n\t\t\tdata = e.originalEvent.clipboardData.getData('text/plain');\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n}\r\n\r\nClipboard.moduleName = \"clipboard\";\r\n\r\n//load defaults\r\nClipboard.pasteActions = defaultPasteActions;\r\nClipboard.pasteParsers = defaultPasteParsers;\r\n\r\nexport default Clipboard;","class CalcComponent{\r\n\tconstructor (row){\r\n\t\tthis._row = row;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._row.table.componentFunctionBinder.handle(\"row\", target._row, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\treturn this._row.getData(transform);\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._row.getElement();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._row.table;\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._row.getCells().forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar cell = this._row.getCell(column);\r\n\t\treturn cell ? cell.getComponent() : false;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._row;\r\n\t}\r\n}\r\n\r\nexport default CalcComponent;","//public cell object\r\nexport default class CellComponent {\r\n\r\n\tconstructor (cell){\r\n\t\tthis._cell = cell;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._cell.table.componentFunctionBinder.handle(\"cell\", target._cell, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetValue(){\r\n\t\treturn this._cell.getValue();\r\n\t}\r\n\r\n\tgetOldValue(){\r\n\t\treturn this._cell.getOldValue();\r\n\t}\r\n\r\n\tgetInitialValue(){\r\n\t\treturn this._cell.initialValue;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._cell.getElement();\r\n\t}\r\n\r\n\tgetRow(){\r\n\t\treturn this._cell.row.getComponent();\r\n\t}\r\n\r\n\tgetData(){\r\n\t\treturn this._cell.row.getData();\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._cell.column.getField();\r\n\t}\r\n\r\n\tgetColumn(){\r\n\t\treturn this._cell.column.getComponent();\r\n\t}\r\n\r\n\tsetValue(value, mutate){\r\n\t\tif(typeof mutate == \"undefined\"){\r\n\t\t\tmutate = true;\r\n\t\t}\r\n\r\n\t\tthis._cell.setValue(value, mutate);\r\n\t}\r\n\r\n\trestoreOldValue(){\r\n\t\tthis._cell.setValueActual(this._cell.getOldValue());\r\n\t}\r\n\r\n\trestoreInitialValue(){\r\n\t\tthis._cell.setValueActual(this._cell.initialValue);\r\n\t}\r\n\r\n\tcheckHeight(){\r\n\t\tthis._cell.checkHeight();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._cell.table;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._cell;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport CellComponent from './CellComponent.js';\r\n\r\nexport default class Cell extends CoreFeature{\r\n\tconstructor(column, row){\r\n\t\tsuper(column.table);\r\n\r\n\t\tthis.table = column.table;\r\n\t\tthis.column = column;\r\n\t\tthis.row = row;\r\n\t\tthis.element = null;\r\n\t\tthis.value = null;\r\n\t\tthis.initialValue;\r\n\t\tthis.oldValue = null;\r\n\t\tthis.modules = {};\r\n\r\n\t\tthis.height = null;\r\n\t\tthis.width = null;\r\n\t\tthis.minWidth = null;\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\tthis.loaded = false; //track if the cell has been added to the DOM yet\r\n\r\n\t\tthis.build();\r\n\t}\r\n\r\n\t//////////////// Setup Functions /////////////////\r\n\t//generate element\r\n\tbuild(){\r\n\t\tthis.generateElement();\r\n\r\n\t\tthis.setWidth();\r\n\r\n\t\tthis._configureCell();\r\n\r\n\t\tthis.setValueActual(this.column.getFieldValue(this.row.data));\r\n\r\n\t\tthis.initialValue = this.value;\r\n\t}\r\n\r\n\tgenerateElement(){\r\n\t\tthis.element = document.createElement('div');\r\n\t\tthis.element.className = \"tabulator-cell\";\r\n\t\tthis.element.setAttribute(\"role\", \"gridcell\");\r\n\t\tthis.element = this.element;\r\n\t}\r\n\r\n\t_configureCell(){\r\n\t\tvar element = this.element,\r\n\t\tfield = this.column.getField(),\r\n\t\tvertAligns = {\r\n\t\t\ttop:\"flex-start\",\r\n\t\t\tbottom:\"flex-end\",\r\n\t\t\tmiddle:\"center\",\r\n\t\t},\r\n\t\thozAligns = {\r\n\t\t\tleft:\"flex-start\",\r\n\t\t\tright:\"flex-end\",\r\n\t\t\tcenter:\"center\",\r\n\t\t};\r\n\r\n\t\t//set text alignment\r\n\t\telement.style.textAlign = this.column.hozAlign;\r\n\r\n\t\tif(this.column.vertAlign){\r\n\t\t\telement.style.display = \"inline-flex\";\r\n\r\n\t\t\telement.style.alignItems = vertAligns[this.column.vertAlign] || \"\";\r\n\r\n\t\t\tif(this.column.hozAlign){\r\n\t\t\t\telement.style.justifyContent = hozAligns[this.column.hozAlign] || \"\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(field){\r\n\t\t\telement.setAttribute(\"tabulator-field\", field);\r\n\t\t}\r\n\r\n\t\t//add class to cell if needed\r\n\t\tif(this.column.definition.cssClass){\r\n\t\t\tvar classNames = this.column.definition.cssClass.split(\" \")\r\n\t\t\tclassNames.forEach((className) => {\r\n\t\t\t\telement.classList.add(className)\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t//update tooltip on mouse enter\r\n\t\tif (this.table.options.tooltipGenerationMode === \"hover\"){\r\n\t\t\telement.addEventListener(\"mouseenter\", (e) => {\r\n\t\t\t\tthis._generateTooltip();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"cell-init\", this);\r\n\r\n\t\t//hide cell if not visible\r\n\t\tif(!this.column.visible){\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\r\n\t//generate cell contents\r\n\t_generateContents(){\r\n\t\tvar val;\r\n\r\n\t\tval = this.chain(\"cell-format\", this, null, () => {\r\n\t\t\treturn this.element.innerHTML = this.value;\r\n\t\t});\r\n\r\n\t\tswitch(typeof val){\r\n\t\t\tcase \"object\":\r\n\t\t\tif(val instanceof Node){\r\n\r\n\t\t\t\t//clear previous cell contents\r\n\t\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\t\tthis.element.appendChild(val);\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.innerHTML = \"\";\r\n\r\n\t\t\t\tif(val != null){\r\n\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);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\tcase \"null\":\r\n\t\t\tthis.element.innerHTML = \"\";\r\n\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\tthis.element.innerHTML = val;\r\n\t\t}\r\n\t}\r\n\r\n\tcellRendered(){\r\n\t\tthis.dispatch(\"cell-rendered\", this);\r\n\t}\r\n\r\n\t//generate tooltip text\r\n\t_generateTooltip(){\r\n\t\tvar tooltip = this.column.tooltip;\r\n\r\n\t\tif(tooltip){\r\n\t\t\tif(tooltip === true){\r\n\t\t\t\ttooltip = this.value;\r\n\t\t\t}else if(typeof(tooltip) == \"function\"){\r\n\t\t\t\ttooltip = tooltip(this.getComponent());\r\n\r\n\t\t\t\tif(tooltip === false){\r\n\t\t\t\t\ttooltip = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof tooltip === \"undefined\"){\r\n\t\t\t\ttooltip = \"\";\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.setAttribute(\"title\", tooltip);\r\n\t\t}else{\r\n\t\t\tthis.element.setAttribute(\"title\", \"\");\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////////// Getters ////////////////////\r\n\tgetElement(containerOnly){\r\n\t\tif(!this.loaded){\r\n\t\t\tthis.loaded = true;\r\n\t\t\tif(!containerOnly){\r\n\t\t\t\tthis.layoutElement();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tgetValue(){\r\n\t\treturn this.value;\r\n\t}\r\n\r\n\tgetOldValue(){\r\n\t\treturn this.oldValue;\r\n\t}\r\n\r\n\t//////////////////// Actions ////////////////////\r\n\tsetValue(value, mutate){\r\n\t\tvar changed = this.setValueProcessData(value, mutate);\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.dispatch(\"cell-value-updated\", this);\r\n\r\n\t\t\tthis.cellRendered();\r\n\r\n\t\t\tif(this.column.definition.cellEdited){\r\n\t\t\t\tthis.column.definition.cellEdited.call(this.table, this.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"cellEdited\", this.getComponent());\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tsetValueProcessData(value, mutate){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(this.value !== value){\r\n\r\n\t\t\tchanged = true;\r\n\r\n\t\t\tif(mutate){\r\n\t\t\t\tvalue = this.chain(\"cell-value-changing\", [this, value], null, value);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.setValueActual(value);\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.dispatch(\"cell-value-changed\", this);\r\n\t\t}\r\n\r\n\t\treturn changed;\r\n\t}\r\n\r\n\tsetValueActual(value){\r\n\t\tthis.oldValue = this.value;\r\n\r\n\t\tthis.value = value;\r\n\r\n\t\tthis.dispatch(\"cell-value-save-before\", this);\r\n\r\n\t\tthis.column.setFieldValue(this.row.data, value);\r\n\r\n\t\tthis.dispatch(\"cell-value-save-after\", this);\r\n\r\n\t\tif(this.loaded){\r\n\t\t\tthis.layoutElement();\r\n\t\t}\r\n\t}\r\n\r\n\tlayoutElement(){\r\n\t\tthis._generateContents();\r\n\t\tthis._generateTooltip();\r\n\r\n\t\tthis.dispatch(\"cell-layout\", this);\r\n\t}\r\n\r\n\tsetWidth(){\r\n\t\tthis.width = this.column.width;\r\n\t\tthis.element.style.width = this.column.widthStyled;\r\n\t}\r\n\r\n\tclearWidth(){\r\n\t\tthis.width = \"\";\r\n\t\tthis.element.style.width = \"\";\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\treturn this.width || this.element.offsetWidth;\r\n\t}\r\n\r\n\tsetMinWidth(){\r\n\t\tthis.minWidth = this.column.minWidth;\r\n\t\tthis.element.style.minWidth = this.column.minWidthStyled;\r\n\t}\r\n\r\n\tsetMaxWidth(){\r\n\t\tthis.maxWidth = this.column.maxWidth;\r\n\t\tthis.element.style.maxWidth = this.column.maxWidthStyled;\r\n\t}\r\n\r\n\tcheckHeight(){\r\n\t\t// var height = this.element.css(\"height\");\r\n\t\tthis.row.reinitializeHeight();\r\n\t}\r\n\r\n\tclearHeight(){\r\n\t\tthis.element.style.height = \"\";\r\n\t\tthis.height = null;\r\n\t}\r\n\r\n\tsetHeight(){\r\n\t\tthis.height = this.row.height;\r\n\t\tthis.element.style.height = this.row.heightStyled;\r\n\t}\r\n\r\n\tgetHeight(){\r\n\t\treturn this.height || this.element.offsetHeight;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tthis.element.style.display = this.column.vertAlign ? \"inline-flex\" : \"\";\r\n\t}\r\n\r\n\thide(){\r\n\t\tthis.element.style.display = \"none\";\r\n\t}\r\n\r\n\tdelete(){\r\n\t\tthis.dispatch(\"cell-delete\", this);\r\n\r\n\t\tif(!this.table.rowManager.redrawBlock && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.column.deleteCell(this);\r\n\t\tthis.row.deleteCell(this);\r\n\t\tthis.calcs = {};\r\n\t}\r\n\r\n\tgetIndex(){\r\n\t\treturn this.row.getCellIndex(this);\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new CellComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}","import Column from './Column.js';\r\n\r\n//public column object\r\nexport default class ColumnComponent {\r\n\tconstructor (column){\r\n\t\tthis._column = column;\r\n\t\tthis.type = \"ColumnComponent\";\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._column.table.componentFunctionBinder.handle(\"column\", target._column, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._column.getElement();\r\n\t}\r\n\r\n\tgetDefinition(){\r\n\t\treturn this._column.getDefinition();\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._column.getField();\r\n\t}\r\n\r\n\tgetTitleDownload() {\r\n\t\treturn this._column.getTitleDownload();\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._column.cells.forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tisVisible(){\r\n\t\treturn this._column.visible;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tif(this._column.isGroup){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\tcolumn.show();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis._column.show();\r\n\t\t}\r\n\t}\r\n\r\n\thide(){\r\n\t\tif(this._column.isGroup){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\tcolumn.hide();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis._column.hide();\r\n\t\t}\r\n\t}\r\n\r\n\ttoggle(){\r\n\t\tif(this._column.visible){\r\n\t\t\tthis.hide();\r\n\t\t}else{\r\n\t\t\tthis.show();\r\n\t\t}\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn this._column.delete();\r\n\t}\r\n\r\n\tgetSubColumns(){\r\n\t\tvar output = [];\r\n\r\n\t\tif(this._column.columns.length){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\toutput.push(column.getComponent());\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetParentColumn(){\r\n\t\treturn this._column.parent instanceof Column ? this._column.parent.getComponent() : false;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._column;\r\n\t}\r\n\r\n\tscrollTo(){\r\n\t\treturn this._column.table.columnManager.scrollToColumn(this._column);\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._column.table;\r\n\t}\r\n\r\n\tmove(to, after){\r\n\t\tvar toColumn = this._column.table.columnManager.findColumn(to);\r\n\r\n\t\tif(toColumn){\r\n\t\t\tthis._column.table.columnManager.moveColumn(this._column, toColumn, after)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching column found:\", toColumn);\r\n\t\t}\r\n\t}\r\n\r\n\tgetNextColumn(){\r\n\t\tvar nextCol = this._column.nextColumn();\r\n\r\n\t\treturn nextCol ? nextCol.getComponent() : false;\r\n\t}\r\n\r\n\tgetPrevColumn(){\r\n\t\tvar prevCol = this._column.prevColumn();\r\n\r\n\t\treturn prevCol ? prevCol.getComponent() : false;\r\n\t}\r\n\r\n\tupdateDefinition(updates){\r\n\t\treturn this._column.updateDefinition(updates);\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\treturn this._column.getWidth();\r\n\t}\r\n\r\n\tsetWidth(width){\r\n\t\tvar result;\r\n\r\n\t\tif(width === true){\r\n\t\t\tresult = this._column.reinitializeWidth(true);\r\n\t\t}else{\r\n\t\t\tresult = this._column.setWidth(width);\r\n\t\t}\r\n\r\n\t\tthis._column.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\treturn result;\r\n\t}\r\n}","export default {\r\n\t\"title\": undefined,\r\n\t\"field\": undefined,\r\n\t\"columns\": undefined,\r\n\t\"visible\": undefined,\r\n\t\"hozAlign\": undefined,\r\n\t\"vertAlign\": undefined,\r\n\t\"width\": undefined,\r\n\t\"minWidth\": 40,\r\n\t\"maxWidth\": undefined,\r\n\t\"maxInitialWidth\": undefined,\r\n\t\"tooltip\": undefined,\r\n\t\"cssClass\": undefined,\r\n\t\"variableHeight\": undefined,\r\n\t\"headerTooltip\": undefined,\r\n\t\"headerVertical\": undefined,\r\n\t\"headerHozAlign\": undefined,\r\n\t\"editableTitle\": undefined,\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport ColumnComponent from './ColumnComponent.js';\r\nimport defaultOptions from './defaults/options.js';\r\n\r\nimport Cell from '../cell/Cell.js';\r\n\r\nclass Column extends CoreFeature{\r\n\r\n\tconstructor(def, parent){\r\n\t\tsuper(parent.table);\r\n\r\n\t\tthis.definition = def; //column definition\r\n\t\tthis.parent = parent; //hold parent object\r\n\t\tthis.type = \"column\"; //type of element\r\n\t\tthis.columns = []; //child columns\r\n\t\tthis.cells = []; //cells bound to this column\r\n\t\tthis.element = this.createElement(); //column header element\r\n\t\tthis.contentElement = false;\r\n\t\tthis.titleHolderElement = false;\r\n\t\tthis.titleElement = false;\r\n\t\tthis.groupElement = this.createGroupElement(); //column group holder element\r\n\t\tthis.isGroup = false;\r\n\t\tthis.tooltip = false; //hold column tooltip\r\n\t\tthis.hozAlign = \"\"; //horizontal text alignment\r\n\t\tthis.vertAlign = \"\"; //vert text alignment\r\n\r\n\t\t//multi dimensional filed handling\r\n\t\tthis.field =\"\";\r\n\t\tthis.fieldStructure = \"\";\r\n\t\tthis.getFieldValue = \"\";\r\n\t\tthis.setFieldValue = \"\";\r\n\r\n\t\tthis.titleDownload = null;\r\n\t\tthis.titleFormatterRendered = false;\r\n\r\n\t\tthis.mapDefinitions();\r\n\r\n\t\tthis.setField(this.definition.field);\r\n\r\n\t\tthis.modules = {}; //hold module variables;\r\n\r\n\t\tthis.width = null; //column width\r\n\t\tthis.widthStyled = \"\"; //column width prestyled to improve render efficiency\r\n\t\tthis.maxWidth = null; //column maximum width\r\n\t\tthis.maxWidthStyled = \"\"; //column maximum prestyled to improve render efficiency\r\n\t\tthis.maxInitialWidth = null;\r\n\t\tthis.minWidth = null; //column minimum width\r\n\t\tthis.minWidthStyled = \"\"; //column minimum prestyled to improve render efficiency\r\n\t\tthis.widthFixed = false; //user has specified a width for this column\r\n\r\n\t\tthis.visible = true; //default visible state\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\t//initialize column\r\n\t\tif(this.definition.columns){\r\n\r\n\t\t\tthis.isGroup = true;\r\n\r\n\t\t\tthis.definition.columns.forEach((def, i) => {\r\n\t\t\t\tvar newCol = new Column(def, this);\r\n\t\t\t\tthis.attachColumn(newCol);\r\n\t\t\t});\r\n\r\n\t\t\tthis.checkColumnVisibility();\r\n\t\t}else{\r\n\t\t\tparent.registerColumnField(this);\r\n\t\t}\r\n\r\n\t\tthis._initialize();\r\n\r\n\t\tthis.bindModuleColumns();\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-col\");\r\n\t\tel.setAttribute(\"role\", \"columnheader\");\r\n\t\tel.setAttribute(\"aria-sort\", \"none\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateGroupElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-col-group-cols\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tmapDefinitions(){\r\n\t\tvar defaults = this.table.options.columnDefaults;\r\n\r\n\t\t//map columnDefaults onto column definitions\r\n\t\tif(defaults){\r\n\t\t\tfor(let key in defaults){\r\n\t\t\t\tif(typeof this.definition[key] === \"undefined\"){\r\n\t\t\t\t\tthis.definition[key] = defaults[key];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.definition = this.table.columnManager.optionsList.generate(Column.defaultOptionList, this.definition)\r\n\t}\r\n\r\n\tcheckDefinition(){\r\n\t\tObject.keys(this.definition).forEach((key) => {\r\n\t\t\tif(Column.defaultOptionList.indexOf(key) === -1){\r\n\t\t\t\tconsole.warn(\"Invalid column definition option in '\" + (this.field || this.definition.title) + \"' column:\", key)\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tsetField(field){\r\n\t\tthis.field = field;\r\n\t\tthis.fieldStructure = field ? (this.table.options.nestedFieldSeparator ? field.split(this.table.options.nestedFieldSeparator) : [field]) : [];\r\n\t\tthis.getFieldValue = this.fieldStructure.length > 1 ? this._getNestedData : this._getFlatData;\r\n\t\tthis.setFieldValue = this.fieldStructure.length > 1 ? this._setNestedData : this._setFlatData;\r\n\t}\r\n\r\n\t//register column position with column manager\r\n\tregisterColumnPosition(column){\r\n\t\tthis.parent.registerColumnPosition(column);\r\n\t}\r\n\r\n\t//register column position with column manager\r\n\tregisterColumnField(column){\r\n\t\tthis.parent.registerColumnField(column);\r\n\t}\r\n\r\n\t//trigger position registration\r\n\treRegisterPosition(){\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tcolumn.reRegisterPosition();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis.registerColumnPosition(this);\r\n\t\t}\r\n\t}\r\n\r\n\t_mapDepricatedFunctionality(){\r\n\t\t//all previously deprecated functionality removed in the 5.0 release\r\n\t}\r\n\r\n\tsetTooltip(){\r\n\t\tvar def = this.definition;\r\n\r\n\t\t//set header tooltips\r\n\t\tvar tooltip = def.headerTooltip;\r\n\r\n\t\tif(tooltip){\r\n\t\t\tif(tooltip === true){\r\n\t\t\t\tif(def.field){\r\n\t\t\t\t\tthis.langBind(\"columns|\" + def.field, (value) => {\r\n\t\t\t\t\t\tthis.element.setAttribute(\"title\", value || def.title);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.element.setAttribute(\"title\", def.title);\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tif(typeof(tooltip) == \"function\"){\r\n\t\t\t\t\ttooltip = tooltip(this.getComponent());\r\n\r\n\t\t\t\t\tif(tooltip === false){\r\n\t\t\t\t\t\ttooltip = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.element.setAttribute(\"title\", tooltip);\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tthis.element.setAttribute(\"title\", \"\");\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element\r\n\t_initialize(){\r\n\t\tvar def = this.definition;\r\n\r\n\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\tif(def.headerVertical){\r\n\t\t\tthis.element.classList.add(\"tabulator-col-vertical\");\r\n\r\n\t\t\tif(def.headerVertical === \"flip\"){\r\n\t\t\t\tthis.element.classList.add(\"tabulator-col-vertical-flip\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.contentElement = this._bindEvents();\r\n\r\n\t\tthis.contentElement = this._buildColumnHeaderContent();\r\n\r\n\t\tthis.element.appendChild(this.contentElement);\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis._buildGroupHeader();\r\n\t\t}else{\r\n\t\t\tthis._buildColumnHeader();\r\n\t\t}\r\n\r\n\t\tthis.setTooltip();\r\n\r\n\t\tthis.dispatch(\"column-init\", this);\r\n\r\n\t\t//update header tooltip on mouse enter\r\n\t\tthis.element.addEventListener(\"mouseenter\", (e) => {\r\n\t\t\tthis.setTooltip();\r\n\t\t});\r\n\t}\r\n\r\n\t_bindEvents(){\r\n\t\tvar def = this.definition,\r\n\t\tdblTap,\ttapHold, tap;\r\n\r\n\t\t//setup header click event bindings\r\n\t\tif(typeof(def.headerClick) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"click\", (e) => {def.headerClick(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerDblClick) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"dblclick\", (e) => {def.headerDblClick(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerContext) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"contextmenu\", (e) => {def.headerContext(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\t//setup header tap event bindings\r\n\t\tif(typeof(def.headerTap) == \"function\"){\r\n\t\t\ttap = false;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchstart\", (e) => {\r\n\t\t\t\ttap = true;\r\n\t\t\t}, {passive: true});\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\t\t\t\tif(tap){\r\n\t\t\t\t\tdef.headerTap(e, this.getComponent());\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttap = false;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerDblTap) == \"function\"){\r\n\t\t\tdblTap = null;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\r\n\t\t\t\tif(dblTap){\r\n\t\t\t\t\tclearTimeout(dblTap);\r\n\t\t\t\t\tdblTap = null;\r\n\r\n\t\t\t\t\tdef.headerDblTap(e, this.getComponent());\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tdblTap = setTimeout(() => {\r\n\t\t\t\t\t\tclearTimeout(dblTap);\r\n\t\t\t\t\t\tdblTap = null;\r\n\t\t\t\t\t}, 300);\r\n\t\t\t\t}\r\n\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerTapHold) == \"function\"){\r\n\t\t\ttapHold = null;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchstart\", (e) => {\r\n\t\t\t\tclearTimeout(tapHold);\r\n\r\n\t\t\t\ttapHold = setTimeout(function(){\r\n\t\t\t\t\tclearTimeout(tapHold);\r\n\t\t\t\t\ttapHold = null;\r\n\t\t\t\t\ttap = false;\r\n\t\t\t\t\tdef.headerTapHold(e, this.getComponent());\r\n\t\t\t\t}, 1000);\r\n\r\n\t\t\t}, {passive: true});\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\t\t\t\tclearTimeout(tapHold);\r\n\t\t\t\ttapHold = null;\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element for header\r\n\t_buildColumnHeader(){\r\n\t\tvar def = this.definition,\r\n\t\ttable = this.table;\r\n\r\n\t\tthis.dispatch(\"column-layout\", this);\r\n\r\n\t\t//set column visibility\r\n\t\tif(typeof def.visible != \"undefined\"){\r\n\t\t\tif(def.visible){\r\n\t\t\t\tthis.show(true);\r\n\t\t\t}else{\r\n\t\t\t\tthis.hide(true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//asign additional css classes to column header\r\n\t\tif(def.cssClass){\r\n\t\t\tvar classeNames = def.cssClass.split(\" \");\r\n\t\t\tclasseNames.forEach((className) => {\r\n\t\t\t\tthis.element.classList.add(className);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(def.field){\r\n\t\t\tthis.element.setAttribute(\"tabulator-field\", def.field);\r\n\t\t}\r\n\r\n\t\t//set min width if present\r\n\t\tthis.setMinWidth(parseInt(def.minWidth));\r\n\r\n\t\tif (def.maxInitialWidth) {\r\n\t\t\tthis.maxInitialWidth = parseInt(def.maxInitialWidth);\r\n\t\t}\r\n\t\t\r\n\t\tif(def.maxWidth){\r\n\t\t\tthis.setMaxWidth(parseInt(def.maxWidth));\r\n\t\t}\r\n\r\n\t\tthis.reinitializeWidth();\r\n\r\n\t\t//set tooltip if present\r\n\t\tthis.tooltip = this.definition.tooltip;\r\n\r\n\t\t//set orizontal text alignment\r\n\t\tthis.hozAlign = this.definition.hozAlign;\r\n\t\tthis.vertAlign = this.definition.vertAlign;\r\n\r\n\t\tthis.titleElement.style.textAlign = this.definition.headerHozAlign;\r\n\t}\r\n\r\n\t_buildColumnHeaderContent(){\r\n\t\tvar def = this.definition,\r\n\t\ttable = this.table;\r\n\r\n\t\tvar contentElement = document.createElement(\"div\");\r\n\t\tcontentElement.classList.add(\"tabulator-col-content\");\r\n\r\n\t\tthis.titleHolderElement = document.createElement(\"div\");\r\n\t\tthis.titleHolderElement.classList.add(\"tabulator-col-title-holder\");\r\n\r\n\t\tcontentElement.appendChild(this.titleHolderElement);\r\n\r\n\t\tthis.titleElement = this._buildColumnHeaderTitle();\r\n\r\n\t\tthis.titleHolderElement.appendChild(this.titleElement);\r\n\r\n\t\treturn contentElement;\r\n\t}\r\n\r\n\t//build title element of column\r\n\t_buildColumnHeaderTitle(){\r\n\t\tvar def = this.definition,\r\n\t\ttitle;\r\n\r\n\t\tvar titleHolderElement = document.createElement(\"div\");\r\n\t\ttitleHolderElement.classList.add(\"tabulator-col-title\");\r\n\r\n\t\tif(def.editableTitle){\r\n\t\t\tvar titleElement = document.createElement(\"input\");\r\n\t\t\ttitleElement.classList.add(\"tabulator-title-editor\");\r\n\r\n\t\t\ttitleElement.addEventListener(\"click\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\ttitleElement.focus();\r\n\t\t\t});\r\n\r\n\t\t\ttitleElement.addEventListener(\"change\", () => {\r\n\t\t\t\tdef.title = titleElement.value;\r\n\t\t\t\tthis.dispatchExternal(\"columnTitleChanged\", this.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\ttitleHolderElement.appendChild(titleElement);\r\n\r\n\t\t\tif(def.field){\r\n\t\t\t\tthis.langBind(\"columns|\" + def.field, (text) => {\r\n\t\t\t\t\ttitleElement.value = text || (def.title || \" \");\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\ttitleElement.value = def.title || \" \";\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tif(def.field){\r\n\t\t\t\tthis.langBind(\"columns|\" + def.field, (text) => {\r\n\t\t\t\t\tthis._formatColumnHeaderTitle(titleHolderElement, text || (def.title || \" \"));\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tthis._formatColumnHeaderTitle(titleHolderElement, def.title || \" \");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn titleHolderElement;\r\n\t}\r\n\r\n\t_formatColumnHeaderTitle(el, title){\r\n\t\tvar contents = this.chain(\"column-format\", [this, title, el], null, () => {\r\n\t\t\treturn title;\r\n\t\t});\r\n\r\n\t\tswitch(typeof contents){\r\n\t\t\tcase \"object\":\r\n\t\t\tif(contents instanceof Node){\r\n\t\t\t\tel.appendChild(contents);\r\n\t\t\t}else{\r\n\t\t\t\tel.innerHTML = \"\";\r\n\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);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\tcase \"null\":\r\n\t\t\tel.innerHTML = \"\";\r\n\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\tel.innerHTML = contents;\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element for column group\r\n\t_buildGroupHeader(){\r\n\t\tthis.element.classList.add(\"tabulator-col-group\");\r\n\t\tthis.element.setAttribute(\"role\", \"columngroup\");\r\n\t\tthis.element.setAttribute(\"aria-title\", this.definition.title);\r\n\r\n\t\t//asign additional css classes to column header\r\n\t\tif(this.definition.cssClass){\r\n\t\t\tvar classeNames = this.definition.cssClass.split(\" \");\r\n\t\t\tclasseNames.forEach((className) => {\r\n\t\t\t\tthis.element.classList.add(className);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.titleElement.style.textAlign = this.definition.headerHozAlign;\r\n\r\n\t\tthis.element.appendChild(this.groupElement);\r\n\t}\r\n\r\n\t//flat field lookup\r\n\t_getFlatData(data){\r\n\t\treturn data[this.field];\r\n\t}\r\n\r\n\t//nested field lookup\r\n\t_getNestedData(data){\r\n\t\tvar dataObj = data,\r\n\t\tstructure = this.fieldStructure,\r\n\t\tlength = structure.length,\r\n\t\toutput;\r\n\r\n\t\tfor(let i = 0; i < length; i++){\r\n\r\n\t\t\tdataObj = dataObj[structure[i]];\r\n\r\n\t\t\toutput = dataObj;\r\n\r\n\t\t\tif(!dataObj){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//flat field set\r\n\t_setFlatData(data, value){\r\n\t\tif(this.field){\r\n\t\t\tdata[this.field] = value;\r\n\t\t}\r\n\t}\r\n\r\n\t//nested field set\r\n\t_setNestedData(data, value){\r\n\t\tvar dataObj = data,\r\n\t\tstructure = this.fieldStructure,\r\n\t\tlength = structure.length;\r\n\r\n\t\tfor(let i = 0; i < length; i++){\r\n\r\n\t\t\tif(i == length -1){\r\n\t\t\t\tdataObj[structure[i]] = value;\r\n\t\t\t}else{\r\n\t\t\t\tif(!dataObj[structure[i]]){\r\n\t\t\t\t\tif(typeof value !== \"undefined\"){\r\n\t\t\t\t\t\tdataObj[structure[i]] = {};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdataObj = dataObj[structure[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//attach column to this group\r\n\tattachColumn(column){\r\n\t\tif(this.groupElement){\r\n\t\t\tthis.columns.push(column);\r\n\t\t\tthis.groupElement.appendChild(column.getElement());\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Warning - Column being attached to another column instead of column group\");\r\n\t\t}\r\n\t}\r\n\r\n\t//vertically align header in column\r\n\tverticalAlign(alignment, height){\r\n\r\n\t\t//calculate height of column header and group holder element\r\n\t\tvar parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : (height || this.parent.getHeadersElement().clientHeight);\r\n\t\t// var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : this.parent.getHeadersElement().clientHeight;\r\n\r\n\t\tthis.element.style.height = parentHeight + \"px\";\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.groupElement.style.minHeight = (parentHeight - this.contentElement.offsetHeight) + \"px\";\r\n\t\t}\r\n\r\n\t\t//vertically align cell contents\r\n\t\tif(!this.isGroup && alignment !== \"top\"){\r\n\t\t\tif(alignment === \"bottom\"){\r\n\t\t\t\tthis.element.style.paddingTop = (this.element.clientHeight - this.contentElement.offsetHeight) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.paddingTop = ((this.element.clientHeight - this.contentElement.offsetHeight) / 2) + \"px\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.verticalAlign(alignment);\r\n\t\t});\r\n\t}\r\n\r\n\t//clear vertical alignmenet\r\n\tclearVerticalAlign(){\r\n\t\tthis.element.style.paddingTop = \"\";\r\n\t\tthis.element.style.height = \"\";\r\n\t\tthis.element.style.minHeight = \"\";\r\n\t\tthis.groupElement.style.minHeight = \"\";\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.clearVerticalAlign();\r\n\t\t});\r\n\t}\r\n\r\n\tbindModuleColumns (){\r\n\t\t//check if rownum formatter is being used on a column\r\n\t\tif(this.definition.formatter == \"rownum\"){\r\n\t\t\tthis.table.rowManager.rowNumColumn = this;\r\n\t\t}\r\n\t}\r\n\r\n\t//// Retreive Column Information ////\r\n\t//return column header element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\t//return colunm group element\r\n\tgetGroupElement(){\r\n\t\treturn this.groupElement;\r\n\t}\r\n\r\n\t//return field name\r\n\tgetField(){\r\n\t\treturn this.field;\r\n\t}\r\n\r\n\tgetTitleDownload() {\r\n\t\treturn this.titleDownload;\r\n\t}\r\n\r\n\t//return the first column in a group\r\n\tgetFirstColumn(){\r\n\t\tif(!this.isGroup){\r\n\t\t\treturn this;\r\n\t\t}else{\r\n\t\t\tif(this.columns.length){\r\n\t\t\t\treturn this.columns[0].getFirstColumn();\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//return the last column in a group\r\n\tgetLastColumn(){\r\n\t\tif(!this.isGroup){\r\n\t\t\treturn this;\r\n\t\t}else{\r\n\t\t\tif(this.columns.length){\r\n\t\t\t\treturn this.columns[this.columns.length -1].getLastColumn();\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//return all columns in a group\r\n\tgetColumns(){\r\n\t\treturn this.columns;\r\n\t}\r\n\r\n\t//return all columns in a group\r\n\tgetCells(){\r\n\t\treturn this.cells;\r\n\t}\r\n\r\n\t//retreive the top column in a group of columns\r\n\tgetTopColumn(){\r\n\t\tif(this.parent.isGroup){\r\n\t\t\treturn this.parent.getTopColumn();\r\n\t\t}else{\r\n\t\t\treturn this;\r\n\t\t}\r\n\t}\r\n\r\n\t//return column definition object\r\n\tgetDefinition(updateBranches){\r\n\t\tvar colDefs = [];\r\n\r\n\t\tif(this.isGroup && updateBranches){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tcolDefs.push(column.getDefinition(true));\r\n\t\t\t});\r\n\r\n\t\t\tthis.definition.columns = colDefs;\r\n\t\t}\r\n\r\n\t\treturn this.definition;\r\n\t}\r\n\r\n\t//////////////////// Actions ////////////////////\r\n\tcheckColumnVisibility(){\r\n\t\tvar visible = false;\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvisible = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(visible){\r\n\t\t\tthis.show();\r\n\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), false);\r\n\t\t}else{\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\r\n\t//show column\r\n\tshow(silent, responsiveToggle){\r\n\t\tif(!this.visible){\r\n\t\t\tthis.visible = true;\r\n\r\n\t\t\tthis.element.style.display = \"\";\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.checkColumnVisibility();\r\n\t\t\t}\r\n\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.show();\r\n\t\t\t});\r\n\r\n\t\t\tif(!this.isGroup && this.width === null){\r\n\t\t\t\tthis.reinitializeWidth();\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.columnManager.verticalAlignHeaders();\r\n\r\n\t\t\tthis.dispatch(\"column-show\", this, responsiveToggle);\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), true);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\r\n\t\t\tif(!this.silent){\r\n\t\t\t\tthis.table.columnManager.renderer.rerenderColumns();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//hide column\r\n\thide(silent, responsiveToggle){\r\n\t\tif(this.visible){\r\n\t\t\tthis.visible = false;\r\n\r\n\t\t\tthis.element.style.display = \"none\";\r\n\r\n\t\t\tthis.table.columnManager.verticalAlignHeaders();\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.checkColumnVisibility();\r\n\t\t\t}\r\n\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.hide();\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatch(\"column-hide\", this, responsiveToggle);\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), false);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\r\n\t\t\tif(!this.silent){\r\n\t\t\t\tthis.table.columnManager.renderer.rerenderColumns();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmatchChildWidths(){\r\n\t\tvar childWidth = 0;\r\n\r\n\t\tif(this.contentElement && this.columns.length){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tif(column.visible){\r\n\t\t\t\t\tchildWidth += column.getWidth();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.contentElement.style.maxWidth = (childWidth - 1) + \"px\";\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tremoveChild(child){\r\n\t\tvar index = this.columns.indexOf(child);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columns.splice(index, 1);\r\n\t\t}\r\n\r\n\t\tif(!this.columns.length){\r\n\t\t\tthis.delete();\r\n\t\t}\r\n\t}\r\n\r\n\tsetWidth(width){\r\n\t\tthis.widthFixed = true;\r\n\t\tthis.setWidthActual(width);\r\n\t}\r\n\r\n\tsetWidthActual(width){\r\n\t\tif(isNaN(width)){\r\n\t\t\twidth = Math.floor((this.table.element.clientWidth/100) * parseInt(width));\r\n\t\t}\r\n\r\n\t\twidth = Math.max(this.minWidth, width);\r\n\r\n\t\tif(this.maxWidth){\r\n\t\t\twidth = Math.min(this.maxWidth, width);\r\n\t\t}\r\n\r\n\t\tthis.width = width;\r\n\t\tthis.widthStyled = width ? width + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.width = this.widthStyled;\r\n\r\n\t\tif(!this.isGroup){\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.setWidth();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.parent.isGroup){\r\n\t\t\tthis.parent.matchChildWidths();\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"column-width\", this);\r\n\t}\r\n\r\n\tcheckCellHeights(){\r\n\t\tvar rows = [];\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tif(cell.row.heightInitialized){\r\n\t\t\t\tif(cell.row.getElement().offsetParent !== null){\r\n\t\t\t\t\trows.push(cell.row);\r\n\t\t\t\t\tcell.row.clearCellHeight();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcell.row.heightInitialized = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\trow.calcHeight();\r\n\t\t});\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\trow.setCellHeight();\r\n\t\t});\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\tvar width = 0;\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tif(column.visible){\r\n\t\t\t\t\twidth += column.getWidth();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\twidth = this.width;\r\n\t\t}\r\n\r\n\t\treturn width;\r\n\t}\r\n\r\n\tgetHeight(){\r\n\t\treturn Math.ceil(this.element.getBoundingClientRect().height);\r\n\t}\r\n\r\n\tsetMinWidth(minWidth){\r\n\t\tthis.minWidth = minWidth;\r\n\t\tthis.minWidthStyled = minWidth ? minWidth + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.minWidth = this.minWidthStyled;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setMinWidth();\r\n\t\t});\r\n\t}\r\n\r\n\tsetMaxWidth(maxWidth){\r\n\t\tthis.maxWidth = maxWidth;\r\n\t\tthis.maxWidthStyled = maxWidth ? maxWidth + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.maxWidth = this.maxWidthStyled;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setMaxWidth();\r\n\t\t});\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar index;\r\n\r\n\t\t\tif(this.isGroup){\r\n\t\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\t\tcolumn.delete();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"column-delete\", this);\r\n\r\n\t\t\tvar cellCount = this.cells.length;\r\n\r\n\t\t\tfor(let i = 0; i < cellCount; i++){\r\n\t\t\t\tthis.cells[0].delete();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.element.parentNode){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element = false;\r\n\t\t\tthis.contentElement = false;\r\n\t\t\tthis.titleElement = false;\r\n\t\t\tthis.groupElement = false;\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.removeChild(this);\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.columnManager.deregisterColumn(this);\r\n\r\n\t\t\tthis.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\r\n\tcolumnRendered(){\r\n\t\tif(this.titleFormatterRendered){\r\n\t\t\tthis.titleFormatterRendered();\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\t//generate cell for this column\r\n\tgenerateCell(row){\r\n\t\tvar cell = new Cell(this, row);\r\n\r\n\t\tthis.cells.push(cell);\r\n\r\n\t\treturn cell;\r\n\t}\r\n\r\n\tnextColumn(){\r\n\t\tvar index = this.table.columnManager.findColumnIndex(this);\r\n\t\treturn index > -1 ? this._nextVisibleColumn(index + 1) : false;\r\n\t}\r\n\r\n\t_nextVisibleColumn(index){\r\n\t\tvar column = this.table.columnManager.getColumnByIndex(index);\r\n\t\treturn !column || column.visible ? column : this._nextVisibleColumn(index + 1);\r\n\t}\r\n\r\n\tprevColumn(){\r\n\t\tvar index = this.table.columnManager.findColumnIndex(this);\r\n\t\treturn index > -1 ? this._prevVisibleColumn(index - 1) : false;\r\n\t}\r\n\r\n\t_prevVisibleColumn(index){\r\n\t\tvar column = this.table.columnManager.getColumnByIndex(index);\r\n\t\treturn !column || column.visible ? column : this._prevVisibleColumn(index - 1);\r\n\t}\r\n\r\n\treinitializeWidth(force){\r\n\t\tthis.widthFixed = false;\r\n\r\n\t\t//set width if present\r\n\t\tif(typeof this.definition.width !== \"undefined\" && !force){\r\n\t\t\t// maxInitialWidth ignored here as width specified\r\n\t\t\tthis.setWidth(this.definition.width);\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"column-width-fit-before\", this);\r\n\r\n\t\tthis.fitToData(force);\r\n\r\n\t\tthis.dispatch(\"column-width-fit-after\", this);\r\n\t}\r\n\r\n\t//set column width to maximum cell width for non group columns\r\n\tfitToData(force){\r\n\t\tif(this.isGroup){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif(!this.widthFixed){\r\n\t\t\tthis.element.style.width = \"\";\r\n\r\n\t\t\tthis.cells.forEach((cell) => {\r\n\t\t\t\tcell.clearWidth();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tvar maxWidth = this.element.offsetWidth;\r\n\r\n\t\tif(!this.width || !this.widthFixed){\r\n\t\t\tthis.cells.forEach((cell) => {\r\n\t\t\t\tvar width = cell.getWidth();\r\n\r\n\t\t\t\tif(width > maxWidth){\r\n\t\t\t\t\tmaxWidth = width;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(maxWidth){\r\n\t\t\t\tvar setTo = maxWidth + 1;\r\n\t\t\t\tif (this.maxInitialWidth && !force) {\r\n\t\t\t\t\tsetTo = Math.min(setTo, this.maxInitialWidth);\r\n\t\t\t\t}\r\n\t\t\t\tthis.setWidthActual(setTo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateDefinition(updates){\r\n\t\tvar definition;\r\n\r\n\t\tif(!this.isGroup){\r\n\t\t\tif(!this.parent.isGroup){\r\n\t\t\t\tdefinition = Object.assign({}, this.getDefinition());\r\n\t\t\t\tdefinition = Object.assign(definition, updates);\r\n\r\n\t\t\t\treturn this.table.columnManager.addColumn(definition, false, this)\r\n\t\t\t\t.then((column) => {\r\n\r\n\t\t\t\t\tif(definition.field == this.field){\r\n\t\t\t\t\t\tthis.field = false; //cleair field name to prevent deletion of duplicate column from arrays\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn this.delete()\r\n\t\t\t\t\t.then(() => {\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Column Update Error - The updateDefinition function is only available on ungrouped columns\");\r\n\t\t\t\treturn Promise.reject(\"Column Update Error - The updateDefinition function is only available on columns, not column groups\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Column Update Error - The updateDefinition function is only available on ungrouped columns\");\r\n\t\t\treturn Promise.reject(\"Column Update Error - The updateDefinition function is only available on columns, not column groups\");\r\n\t\t}\r\n\t}\r\n\r\n\tdeleteCell(cell){\r\n\t\tvar index = this.cells.indexOf(cell);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.cells.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new ColumnComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}\r\n\r\nColumn.defaultOptionList = defaultOptions;\r\n\r\nexport default Column;","//public row object\r\nexport default class RowComponent {\r\n\r\n\tconstructor (row){\r\n\t\tthis._row = row;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._row.table.componentFunctionBinder.handle(\"row\", target._row, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\treturn this._row.getData(transform);\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._row.getElement();\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._row.getCells().forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar cell = this._row.getCell(column);\r\n\t\treturn cell ? cell.getComponent() : false;\r\n\t}\r\n\r\n\tgetIndex(){\r\n\t\treturn this._row.getData(\"data\")[this._row.table.options.index];\r\n\t}\r\n\r\n\tgetPosition(active){\r\n\t\treturn this._row.table.rowManager.getRowPosition(this._row, active);\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn this._row.delete();\r\n\t}\r\n\r\n\tscrollTo(){\r\n\t\treturn this._row.table.rowManager.scrollToRow(this._row);\r\n\t}\r\n\r\n\tmove(to, after){\r\n\t\tthis._row.moveToRow(to, after);\r\n\t}\r\n\r\n\tupdate(data){\r\n\t\treturn this._row.updateData(data);\r\n\t}\r\n\r\n\tnormalizeHeight(){\r\n\t\tthis._row.normalizeHeight(true);\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._row;\r\n\t}\r\n\r\n\treformat(){\r\n\t\treturn this._row.reinitialize();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._row.table;\r\n\t}\r\n\r\n\tgetNextRow(){\r\n\t\tvar row = this._row.nextRow();\r\n\t\treturn row ? row.getComponent() : row;\r\n\t}\r\n\r\n\tgetPrevRow(){\r\n\t\tvar row = this._row.prevRow();\r\n\t\treturn row ? row.getComponent() : row;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport RowComponent from './RowComponent.js';\r\nimport Helpers from '../tools/Helpers.js';\r\n\r\nexport default class Row extends CoreFeature{\r\n\tconstructor (data, parent, type = \"row\"){\r\n\t\tsuper(parent.table);\r\n\r\n\t\tthis.parent = parent;\r\n\t\tthis.data = {};\r\n\t\tthis.type = type; //type of element\r\n\t\tthis.element = false;\r\n\t\tthis.modules = {}; //hold module variables;\r\n\t\tthis.cells = [];\r\n\t\tthis.height = 0; //hold element height\r\n\t\tthis.heightStyled = \"\"; //hold element height prestyled to improve render efficiency\r\n\t\tthis.manualHeight = false; //user has manually set row height\r\n\t\tthis.outerHeight = 0; //holde lements outer height\r\n\t\tthis.initialized = false; //element has been rendered\r\n\t\tthis.heightInitialized = false; //element has resized cells to fit\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\tthis.created = false;\r\n\r\n\t\tthis.setData(data);\r\n\t}\r\n\r\n\tcreate(){\r\n\t\tif(!this.created){\r\n\t\t\tthis.created = true;\r\n\t\t\tthis.generateElement();\r\n\t\t}\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\r\n\t\tthis.element = el;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\tthis.create();\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tdetachElement(){\r\n\t\tif (this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateElement(){\r\n\t\tthis.createElement();\r\n\t\tthis.dispatch(\"row-init\", this);\r\n\t}\r\n\r\n\tgenerateCells(){\r\n\t\tthis.cells = this.table.columnManager.generateCells(this);\r\n\t}\r\n\r\n\t//functions to setup on first render\r\n\tinitialize(force){\r\n\t\tthis.create();\r\n\r\n\t\tif(!this.initialized || force){\r\n\r\n\t\t\tthis.deleteCells();\r\n\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\tthis.dispatch(\"row-layout-before\", this);\r\n\r\n\t\t\tthis.generateCells();\r\n\r\n\t\t\tthis.initialized = true;\r\n\r\n\t\t\tthis.table.columnManager.renderer.renderRowCells(this);\r\n\r\n\t\t\tif(force){\r\n\t\t\t\tthis.normalizeHeight();\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-layout\", this);\r\n\r\n\t\t\tif(this.table.options.rowFormatter){\r\n\t\t\t\tthis.table.options.rowFormatter(this.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-layout-after\", this);\r\n\t\t}else{\r\n\t\t\tthis.table.columnManager.renderer.rerenderRowCells(this);\r\n\t\t}\r\n\t}\r\n\r\n\treinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\r\n\t\tif(this.element && this.element.offsetParent !== null){\r\n\t\t\tthis.normalizeHeight(true);\r\n\t\t}\r\n\t}\r\n\r\n\tdeinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\t}\r\n\r\n\treinitialize(children){\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\r\n\t\tif(!this.manualHeight){\r\n\t\t\tthis.height = 0;\r\n\t\t\tthis.heightStyled = \"\";\r\n\t\t}\r\n\r\n\t\tif(this.element && this.element.offsetParent !== null){\r\n\t\t\tthis.initialize(true);\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"row-relayout\", this);\r\n\t}\r\n\r\n\t//get heights when doing bulk row style calcs in virtual DOM\r\n\tcalcHeight(force){\r\n\r\n\t\tvar maxHeight = 0,\r\n\t\tminHeight = this.table.options.resizableRows ? this.element.clientHeight : 0;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tvar height = cell.getHeight();\r\n\t\t\tif(height > maxHeight){\r\n\t\t\t\tmaxHeight = height;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(force){\r\n\t\t\tthis.height = Math.max(maxHeight, minHeight);\r\n\t\t}else{\r\n\t\t\tthis.height = this.manualHeight ? this.height : Math.max(maxHeight, minHeight);\r\n\t\t}\r\n\r\n\t\tthis.heightStyled = this.height ? this.height + \"px\" : \"\";\r\n\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t}\r\n\r\n\t//set of cells\r\n\tsetCellHeight(){\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setHeight();\r\n\t\t});\r\n\r\n\t\tthis.heightInitialized = true;\r\n\t}\r\n\r\n\tclearCellHeight(){\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.clearHeight();\r\n\t\t});\r\n\t}\r\n\r\n\t//normalize the height of elements in the row\r\n\tnormalizeHeight(force){\r\n\t\tif(force){\r\n\t\t\tthis.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis.calcHeight(force);\r\n\r\n\t\tthis.setCellHeight();\r\n\t}\r\n\r\n\t//set height of rows\r\n\tsetHeight(height, force){\r\n\t\tif(this.height != height || force){\r\n\r\n\t\t\tthis.manualHeight = true;\r\n\r\n\t\t\tthis.height = height;\r\n\t\t\tthis.heightStyled = height ? height + \"px\" : \"\";\r\n\r\n\t\t\tthis.setCellHeight();\r\n\r\n\t\t\t// this.outerHeight = this.element.outerHeight();\r\n\t\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t\t}\r\n\t}\r\n\r\n\t//return rows outer height\r\n\tgetHeight(){\r\n\t\treturn this.outerHeight;\r\n\t}\r\n\r\n\t//return rows outer Width\r\n\tgetWidth(){\r\n\t\treturn this.element.offsetWidth;\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\tdeleteCell(cell){\r\n\t\tvar index = this.cells.indexOf(cell);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.cells.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Data Management /////////////////\r\n\tsetData(data){\r\n\t\tthis.data = this.chain(\"row-data-init-before\", [this, data], undefined, data);\r\n\r\n\t\tthis.dispatch(\"row-data-init-after\", this);\r\n\t}\r\n\r\n\t//update the rows data\r\n\tupdateData(updatedData){\r\n\t\tvar visible = this.element && Helpers.elVisible(this.element),\r\n\t\ttempData = {},\r\n\t\tnewRowData;\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\r\n\t\t\tif(typeof updatedData === \"string\"){\r\n\t\t\t\tupdatedData = JSON.parse(updatedData);\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-save-before\", this);\r\n\r\n\t\t\tif(this.subscribed(\"row-data-changing\")){\r\n\t\t\t\ttempData = Object.assign(tempData, this.data);\r\n\t\t\t\ttempData = Object.assign(tempData, updatedData);\r\n\t\t\t}\r\n\r\n\t\t\tnewRowData = this.chain(\"row-data-changing\", [this, tempData, updatedData], null, updatedData);\r\n\r\n\t\t\t//set data\r\n\t\t\tfor (var attrname in newRowData) {\r\n\t\t\t\tthis.data[attrname] = newRowData[attrname];\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-save-after\", this);\r\n\r\n\t\t\t//update affected cells only\r\n\t\t\tfor (var attrname in updatedData) {\r\n\r\n\t\t\t\tlet columns = this.table.columnManager.getColumnsByFieldRoot(attrname);\r\n\r\n\t\t\t\tcolumns.forEach((column) => {\r\n\t\t\t\t\tlet cell = this.getCell(column.getField());\r\n\r\n\t\t\t\t\tif(cell){\r\n\t\t\t\t\t\tlet value = column.getFieldValue(newRowData);\r\n\t\t\t\t\t\tif(cell.getValue() != value){\r\n\t\t\t\t\t\t\tcell.setValueProcessData(value);\r\n\r\n\t\t\t\t\t\t\tif(visible){\r\n\t\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t//Partial reinitialization if visible\r\n\t\t\tif(visible){\r\n\t\t\t\tthis.normalizeHeight(true);\r\n\r\n\t\t\t\tif(this.table.options.rowFormatter){\r\n\t\t\t\t\tthis.table.options.rowFormatter(this.getComponent());\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.initialized = false;\r\n\t\t\t\tthis.height = 0;\r\n\t\t\t\tthis.heightStyled = \"\";\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-changed\", this, visible, updatedData);\r\n\r\n\t\t\t//this.reinitialize();\r\n\r\n\t\t\tthis.dispatchExternal(\"rowUpdated\", this.getComponent());\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t\t}\r\n\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\tif(transform){\r\n\t\t\treturn this.chain(\"row-data-retrieve\", [this, transform], null, this.data);\r\n\t\t}\r\n\r\n\t\treturn this.data;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar match = false;\r\n\r\n\t\tcolumn = this.table.columnManager.findColumn(column);\r\n\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\r\n\t\tmatch = this.cells.find(function(cell){\r\n\t\t\treturn cell.column === column;\r\n\t\t});\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tgetCellIndex(findCell){\r\n\t\treturn this.cells.findIndex(function(cell){\r\n\t\t\treturn cell === findCell;\r\n\t\t});\r\n\t}\r\n\r\n\tfindCell(subject){\r\n\t\treturn this.cells.find((cell) => {\r\n\t\t\treturn cell.element === subject;\r\n\t\t});\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\r\n\t\treturn this.cells;\r\n\t}\r\n\r\n\tnextRow(){\r\n\t\tvar row = this.table.rowManager.nextDisplayRow(this, true);\r\n\t\treturn row || false;\r\n\t}\r\n\r\n\tprevRow(){\r\n\t\tvar row = this.table.rowManager.prevDisplayRow(this, true);\r\n\t\treturn row || false;\r\n\t}\r\n\r\n\tmoveToRow(to, before){\r\n\t\tvar toRow = this.table.rowManager.findRow(to);\r\n\r\n\t\tif(toRow){\r\n\t\t\tthis.table.rowManager.moveRowActual(this, toRow, !before);\r\n\t\t\tthis.table.rowManager.refreshActiveData(\"display\", false, true);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching row found:\", to);\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////// Actions /////////////////////\r\n\tdelete(){\r\n\t\tthis.dispatch(\"row-delete\", this);\r\n\r\n\t\tthis.deleteActual();\r\n\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\r\n\tdeleteActual(blockRedraw){\r\n\t\tvar index = this.table.rowManager.getRowIndex(this);\r\n\r\n\t\tthis.detatchModules();\r\n\r\n\t\tthis.table.rowManager.deleteRow(this, blockRedraw);\r\n\r\n\t\tthis.deleteCells();\r\n\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\t\tthis.element = false;\r\n\r\n\t\tthis.dispatch(\"row-deleted\", this);\r\n\t}\r\n\r\n\tdetatchModules(){\r\n\t\tthis.dispatch(\"row-deleting\", this);\r\n\t}\r\n\r\n\tdeleteCells(){\r\n\t\tvar cellCount = this.cells.length;\r\n\r\n\t\tfor(let i = 0; i < cellCount; i++){\r\n\t\t\tthis.cells[0].delete();\r\n\t\t}\r\n\t}\r\n\r\n\twipe(){\r\n\t\tthis.detatchModules();\r\n\t\tthis.deleteCells();\r\n\r\n\t\tif(this.element){\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\tif(this.element.parentNode){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.modules = {};\r\n\t}\r\n\r\n\tgetGroup(){\r\n\t\treturn this.modules.group || false;\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new RowComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}","export default {\r\n\t\"avg\":function(values, data, calcParams){\r\n\t\tvar output = 0,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : 2\r\n\r\n\t\tif(values.length){\r\n\t\t\toutput = values.reduce(function(sum, value){\r\n\t\t\t\treturn Number(sum) + Number(value);\r\n\t\t\t});\r\n\r\n\t\t\toutput = output / values.length;\r\n\r\n\t\t\toutput = precision !== false ? output.toFixed(precision) : output;\r\n\t\t}\r\n\r\n\t\treturn parseFloat(output).toString();\r\n\t},\r\n\t\"max\":function(values, data, calcParams){\r\n\t\tvar output = null,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tvalues.forEach(function(value){\r\n\r\n\t\t\tvalue = Number(value);\r\n\r\n\t\t\tif(value > output || output === null){\r\n\t\t\t\toutput = value;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output !== null ? (precision !== false ? output.toFixed(precision) : output) : \"\";\r\n\t},\r\n\t\"min\":function(values, data, calcParams){\r\n\t\tvar output = null,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tvalues.forEach(function(value){\r\n\r\n\t\t\tvalue = Number(value);\r\n\r\n\t\t\tif(value < output || output === null){\r\n\t\t\t\toutput = value;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output !== null ? (precision !== false ? output.toFixed(precision) : output) : \"\";\r\n\t},\r\n\t\"sum\":function(values, data, calcParams){\r\n\t\tvar output = 0,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tif(values.length){\r\n\t\t\tvalues.forEach(function(value){\r\n\t\t\t\tvalue = Number(value);\r\n\r\n\t\t\t\toutput += !isNaN(value) ? Number(value) : 0;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn precision !== false ? output.toFixed(precision) : output;\r\n\t},\r\n\t\"concat\":function(values, data, calcParams){\r\n\t\tvar output = 0;\r\n\r\n\t\tif(values.length){\r\n\t\t\toutput = values.reduce(function(sum, value){\r\n\t\t\t\treturn String(sum) + String(value);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t},\r\n\t\"count\":function(values, data, calcParams){\r\n\t\tvar output = 0;\r\n\r\n\t\tif(values.length){\r\n\t\t\tvalues.forEach(function(value){\r\n\t\t\t\tif(value){\r\n\t\t\t\t\toutput ++;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport CalcComponent from './CalcComponent.js';\r\n\r\nimport Cell from '../../core/cell/Cell.js';\r\nimport Column from '../../core/column/Column.js';\r\nimport Row from '../../core/row/Row.js';\r\n\r\nimport defaultCalculations from './defaults/calculations.js';\r\n\r\nclass ColumnCalcs extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.topCalcs = [];\r\n\t\tthis.botCalcs = [];\r\n\t\tthis.genColumn = false;\r\n\t\tthis.topElement = this.createElement();\r\n\t\tthis.botElement = this.createElement();\r\n\t\tthis.topRow = false;\r\n\t\tthis.botRow = false;\r\n\t\tthis.topInitialized = false;\r\n\t\tthis.botInitialized = false;\r\n\r\n\t\tthis.registerTableOption(\"columnCalcs\", true);\r\n\r\n\t\tthis.registerColumnOption(\"topCalc\");\r\n\t\tthis.registerColumnOption(\"topCalcParams\");\r\n\t\tthis.registerColumnOption(\"topCalcFormatter\");\r\n\t\tthis.registerColumnOption(\"topCalcFormatterParams\");\r\n\t\tthis.registerColumnOption(\"bottomCalc\");\r\n\t\tthis.registerColumnOption(\"bottomCalcParams\");\r\n\t\tthis.registerColumnOption(\"bottomCalcFormatter\");\r\n\t\tthis.registerColumnOption(\"bottomCalcFormatterParams\");\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-calcs-holder\");\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.genColumn = new Column({field:\"value\"}, this);\r\n\r\n\t\tthis.subscribe(\"cell-value-changed\", this.cellValueChanged.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumnCheck.bind(this));\r\n\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t\tthis.subscribe(\"row-added\", this.rowsUpdated.bind(this));\r\n\t\tthis.subscribe(\"column-moved\", this.recalcActiveRows.bind(this));\r\n\t\tthis.subscribe(\"column-add\", this.recalcActiveRows.bind(this));\r\n\t\tthis.subscribe(\"data-refreshed\", this.recalcActiveRowsRefresh.bind(this));\r\n\t\tthis.subscribe(\"table-redraw\", this.tableRedraw.bind(this));\r\n\t\tthis.subscribe(\"rows-visible\", this.visibleRows.bind(this));\r\n\r\n\t\tthis.registerTableFunction(\"getCalcResults\", this.getResults.bind(this));\r\n\t\tthis.registerTableFunction(\"recalc\", this.userRecalc.bind(this));\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\r\n\t\tif(force){\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\tuserRecalc(){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tvisibleRows(viewable, rows){\r\n\t\tif(this.topRow){\r\n\t\t\trows.unshift(this.topRow);\r\n\t\t}\r\n\r\n\t\tif(this.botRow){\r\n\t\t\trows.push(this.botRow);\r\n\t\t}\r\n\t\r\n\t\treturn rows;\r\n\t}\r\n\r\n\trowsUpdated(row){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.recalcRowGroup(this);\r\n\t\t}else{\r\n\t\t\tthis.recalcActiveRows();\r\n\t\t}\r\n\t}\r\n\r\n\trecalcActiveRowsRefresh(){\r\n\t\tif(this.table.options.groupBy && this.table.options.dataTreeStartExpanded && this.table.options.dataTree){\r\n\t\t\tthis.recalcAll();\r\n\t\t}else{\r\n\t\t\tthis.recalcActiveRows();\r\n\t\t}\r\n\t}\r\n\r\n\trecalcActiveRows(){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t}\r\n\r\n\tcellValueChanged(cell){\r\n\t\tif(cell.column.definition.topCalc || cell.column.definition.bottomCalc){\r\n\t\t\tif(this.table.options.groupBy){\r\n\t\t\t\tif(this.table.options.columnCalcs == \"table\" || this.table.options.columnCalcs == \"both\"){\r\n\t\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"table\"){\r\n\t\t\t\t\tthis.recalcRowGroup(cell.row);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(column.definition.topCalc || column.definition.bottomCalc){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column calcs\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition\r\n\r\n\t\tvar config = {\r\n\t\t\ttopCalcParams:def.topCalcParams || {},\r\n\t\t\tbotCalcParams:def.bottomCalcParams || {},\r\n\t\t};\r\n\r\n\t\tif(def.topCalc){\r\n\r\n\t\t\tswitch(typeof def.topCalc){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(ColumnCalcs.calculations[def.topCalc]){\r\n\t\t\t\t\tconfig.topCalc = ColumnCalcs.calculations[def.topCalc]\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.topCalc);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tconfig.topCalc = def.topCalc;\r\n\t\t\t\tbreak\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(config.topCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.topCalcs.push(column);\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"group\"){\r\n\t\t\t\t\tthis.initializeTopRow();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tif(def.bottomCalc){\r\n\t\t\tswitch(typeof def.bottomCalc){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(ColumnCalcs.calculations[def.bottomCalc]){\r\n\t\t\t\t\tconfig.botCalc = ColumnCalcs.calculations[def.bottomCalc]\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.bottomCalc);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tconfig.botCalc = def.bottomCalc;\r\n\t\t\t\tbreak\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(config.botCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.botCalcs.push(column);\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"group\"){\r\n\t\t\t\t\tthis.initializeBottomRow();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t//dummy functions to handle being mock column manager\r\n\tregisterColumnField(){};\r\n\r\n\tremoveCalcs(){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(this.topInitialized){\r\n\t\t\tthis.topInitialized = false;\r\n\t\t\tthis.topElement.parentNode.removeChild(this.topElement);\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\r\n\t\tif(this.botInitialized){\r\n\t\t\tthis.botInitialized = false;\r\n\t\t\tthis.table.footerManager.remove(this.botElement);\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeTopRow(){\r\n\t\tif(!this.topInitialized){\r\n\t\t\tthis.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\r\n\t\t\tthis.topInitialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeBottomRow(){\r\n\t\tif(!this.botInitialized){\r\n\t\t\tthis.table.footerManager.prepend(this.botElement);\r\n\t\t\tthis.botInitialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tscrollHorizontal(left){\r\n\t\tif(this.botInitialized && this.botRow){\r\n\t\t\tthis.botRow.getElement().style.marginLeft = (-left) + \"px\";\r\n\t\t}\r\n\t}\r\n\r\n\trecalc(rows){\r\n\t\tvar data, row;\r\n\r\n\t\tif(this.topInitialized || this.botInitialized){\r\n\t\t\tdata = this.rowsToData(rows);\r\n\r\n\t\t\tif(this.topInitialized){\r\n\t\t\t\tif(this.topRow){\r\n\t\t\t\t\tthis.topRow.deleteCells();\r\n\t\t\t\t}\r\n\r\n\t\t\t\trow = this.generateRow(\"top\", this.rowsToData(rows))\r\n\t\t\t\tthis.topRow = row;\r\n\t\t\t\twhile(this.topElement.firstChild) this.topElement.removeChild(this.topElement.firstChild);\r\n\t\t\t\tthis.topElement.appendChild(row.getElement());\r\n\t\t\t\trow.initialize(true);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.botInitialized){\r\n\t\t\t\tif(this.botRow){\r\n\t\t\t\t\tthis.botRow.deleteCells();\r\n\t\t\t\t}\r\n\r\n\t\t\t\trow = this.generateRow(\"bottom\", this.rowsToData(rows))\r\n\t\t\t\tthis.botRow = row;\r\n\t\t\t\twhile(this.botElement.firstChild) this.botElement.removeChild(this.botElement.firstChild);\r\n\t\t\t\tthis.botElement.appendChild(row.getElement());\r\n\t\t\t\trow.initialize(true);\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\t//set resizable handles\r\n\t\t\tif(this.table.modExists(\"frozenColumns\")){\r\n\t\t\t\tthis.table.modules.frozenColumns.layout();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trecalcRowGroup(row){\r\n\t\tthis.recalcGroup(this.table.modules.groupRows.getRowGroup(row));\r\n\t}\r\n\r\n\trecalcAll(){\r\n\t\tif(this.topCalcs.length || this.botCalcs.length){\r\n\t\t\tif(this.table.options.columnCalcs !== \"group\"){\r\n\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.groupBy && this.table.options.columnCalcs !== \"table\"){\r\n\r\n\t\t\t\tvar groups = this.table.modules.groupRows.getChildGroups();\r\n\r\n\t\t\t\tgroups.forEach((group) => {\r\n\t\t\t\t\tthis.recalcGroup(group);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trecalcGroup(group){\r\n\t\tvar data, rowData;\r\n\r\n\t\tif(group){\r\n\t\t\tif(group.calcs){\r\n\t\t\t\tif(group.calcs.bottom){\r\n\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\trowData = this.generateRowData(\"bottom\", data);\r\n\r\n\t\t\t\t\tgroup.calcs.bottom.updateData(rowData);\r\n\t\t\t\t\tgroup.calcs.bottom.reinitialize();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(group.calcs.top){\r\n\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\trowData = this.generateRowData(\"top\", data);\r\n\r\n\t\t\t\t\tgroup.calcs.top.updateData(rowData);\r\n\t\t\t\t\tgroup.calcs.top.reinitialize();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//generate top stats row\r\n\tgenerateTopRow(rows){\r\n\t\treturn this.generateRow(\"top\", this.rowsToData(rows));\r\n\t}\r\n\t//generate bottom stats row\r\n\tgenerateBottomRow(rows){\r\n\t\treturn this.generateRow(\"bottom\", this.rowsToData(rows));\r\n\t}\r\n\r\n\trowsToData(rows){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\trows.forEach((row) => {\r\n\t\t\tdata.push(row.getData());\r\n\r\n\t\t\tif(this.table.options.dataTree && this.table.options.dataTreeChildColumnCalcs){\r\n\t\t\t\tif(row.modules.dataTree && row.modules.dataTree.open){\r\n\t\t\t\t\tvar children = this.rowsToData(this.table.modules.dataTree.getFilteredTreeChildren(row));\r\n\t\t\t\t\tdata = data.concat(children);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//generate stats row\r\n\tgenerateRow(pos, data){\r\n\t\tvar rowData = this.generateRowData(pos, data),\r\n\t\trow;\r\n\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.disable();\r\n\t\t}\r\n\r\n\t\trow = new Row(rowData, this, \"calc\");\r\n\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.enable();\r\n\t\t}\r\n\r\n\t\trow.getElement().classList.add(\"tabulator-calcs\", \"tabulator-calcs-\" + pos);\r\n\r\n\t\trow.component = false;\r\n\r\n\t\trow.getComponent = () => {\r\n\t\t\tif(!row.component){\r\n\t\t\t\trow.component = new CalcComponent(row);\r\n\t\t\t}\r\n\r\n\t\t\treturn row.component;\r\n\t\t};\r\n\r\n\t\trow.generateCells = () => {\r\n\r\n\t\t\tvar cells = [];\r\n\r\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\r\n\t\t\t\t\t//set field name of mock column\r\n\t\t\t\t\tthis.genColumn.setField(column.getField());\r\n\t\t\t\t\tthis.genColumn.hozAlign = column.hozAlign;\r\n\r\n\t\t\t\t\tif(column.definition[pos + \"CalcFormatter\"] && this.table.modExists(\"format\")){\r\n\t\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(column.definition[pos + \"CalcFormatter\"]),\r\n\t\t\t\t\t\t\tparams: column.definition[pos + \"CalcFormatterParams\"] || {},\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(\"plaintext\"),\r\n\t\t\t\t\t\t\tparams:{}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//ensure css class defintion is replicated to calculation cell\r\n\t\t\t\t\tthis.genColumn.definition.cssClass = column.definition.cssClass;\r\n\r\n\t\t\t\t\t//generate cell and assign to correct column\r\n\t\t\t\t\tvar cell = new Cell(this.genColumn, row);\r\n\t\t\t\t\tcell.getElement();\r\n\t\t\t\t\tcell.column = column;\r\n\t\t\t\t\tcell.setWidth();\r\n\r\n\t\t\t\t\tcolumn.cells.push(cell);\r\n\t\t\t\t\tcells.push(cell);\r\n\r\n\t\t\t\t\tif(!column.visible){\r\n\t\t\t\t\t\tcell.hide();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\trow.cells = cells;\r\n\t\t};\r\n\r\n\t\treturn row;\r\n\t}\r\n\r\n\t//generate stats row\r\n\tgenerateRowData(pos, data){\r\n\t\tvar rowData = {},\r\n\t\tcalcs = pos == \"top\" ? this.topCalcs : this.botCalcs,\r\n\t\ttype = pos == \"top\" ? \"topCalc\" : \"botCalc\",\r\n\t\tparams, paramKey;\r\n\r\n\t\tcalcs.forEach(function(column){\r\n\t\t\tvar values = [];\r\n\r\n\t\t\tif(column.modules.columnCalcs && column.modules.columnCalcs[type]){\r\n\t\t\t\tdata.forEach(function(item){\r\n\t\t\t\t\tvalues.push(column.getFieldValue(item));\r\n\t\t\t\t});\r\n\r\n\t\t\t\tparamKey = type + \"Params\";\r\n\t\t\t\tparams = typeof column.modules.columnCalcs[paramKey] === \"function\" ? column.modules.columnCalcs[paramKey](values, data) : column.modules.columnCalcs[paramKey];\r\n\r\n\t\t\t\tcolumn.setFieldValue(rowData, column.modules.columnCalcs[type](values, data, params));\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowData;\r\n\t}\r\n\r\n\thasTopCalcs(){\r\n\t\treturn\t!!(this.topCalcs.length);\r\n\t}\r\n\r\n\thasBottomCalcs(){\r\n\t\treturn\t!!(this.botCalcs.length);\r\n\t}\r\n\r\n\t//handle table redraw\r\n\tredraw(){\r\n\t\tif(this.topRow){\r\n\t\t\tthis.topRow.normalizeHeight(true);\r\n\t\t}\r\n\t\tif(this.botRow){\r\n\t\t\tthis.botRow.normalizeHeight(true);\r\n\t\t}\r\n\t}\r\n\r\n\t//return the calculated\r\n\tgetResults(){\r\n\t\tvar results = {},\r\n\t\tgroups;\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tgroups = this.table.modules.groupRows.getGroups(true);\r\n\r\n\t\t\tgroups.forEach((group) => {\r\n\t\t\t\tresults[group.getKey()] = this.getGroupResults(group);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tresults = {\r\n\t\t\t\ttop: this.topRow ? this.topRow.getData() : {},\r\n\t\t\t\tbottom: this.botRow ? this.botRow.getData() : {},\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n\r\n\t//get results from a group\r\n\tgetGroupResults(group){\r\n\t\tvar groupObj = group._getSelf(),\r\n\t\tsubGroups = group.getSubGroups(),\r\n\t\tsubGroupResults = {},\r\n\t\tresults = {};\r\n\r\n\t\tsubGroups.forEach((subgroup) => {\r\n\t\t\tsubGroupResults[subgroup.getKey()] = this.getGroupResults(subgroup);\r\n\t\t});\r\n\r\n\t\tresults = {\r\n\t\t\ttop: groupObj.calcs.top ? groupObj.calcs.top.getData() : {},\r\n\t\t\tbottom: groupObj.calcs.bottom ? groupObj.calcs.bottom.getData() : {},\r\n\t\t\tgroups: subGroupResults,\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n}\r\n\r\nColumnCalcs.moduleName = \"columnCalcs\";\r\n\r\n//load defaults\r\nColumnCalcs.calculations = defaultCalculations;\r\n\r\nexport default ColumnCalcs;","import Module from '../../core/Module.js';\r\n\r\nimport Row from '../../core/row/Row.js';\r\n\r\nclass DataTree extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.indent = 10;\r\n\t\tthis.field = \"\";\r\n\t\tthis.collapseEl = null;\r\n\t\tthis.expandEl = null;\r\n\t\tthis.branchEl = null;\r\n\t\tthis.elementField = false;\r\n\r\n\t\tthis.startOpen = function(){};\r\n\r\n\t\tthis.displayIndex = 0;\r\n\r\n\t\tthis.registerTableOption(\"dataTree\", false); //enable data tree\r\n\t\tthis.registerTableOption(\"dataTreeFilter\", true); //filter child rows\r\n\t\tthis.registerTableOption(\"dataTreeSort\", true); //sort child rows\r\n\t\tthis.registerTableOption(\"dataTreeElementColumn\", false);\r\n\t\tthis.registerTableOption(\"dataTreeBranchElement\", true);//show data tree branch element\r\n\t\tthis.registerTableOption(\"dataTreeChildIndent\", 9); //data tree child indent in px\r\n\t\tthis.registerTableOption(\"dataTreeChildField\", \"_children\");//data tre column field to look for child rows\r\n\t\tthis.registerTableOption(\"dataTreeCollapseElement\", false);//data tree row collapse element\r\n\t\tthis.registerTableOption(\"dataTreeExpandElement\", false);//data tree row expand element\r\n\t\tthis.registerTableOption(\"dataTreeStartExpanded\", false);\r\n\t\tthis.registerTableOption(\"dataTreeChildColumnCalcs\", false);//include visible data tree rows in column calculations\r\n\t\tthis.registerTableOption(\"dataTreeSelectPropagate\", false);//seleccting a parent row selects its children\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"treeCollapse\", this.collapseRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"treeExpand\", this.expandRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"treeToggle\", this.toggleRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"getTreeParent\", this.getTreeParent.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"getTreeChildren\", this.getRowChildren.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"addTreeChild\", this.addTreeChildRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isTreeExpanded\", this.isRowExpanded.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.dataTree){\r\n\t\t\tvar dummyEl = null,\r\n\t\t\toptions = this.table.options;\r\n\r\n\t\t\tthis.field = options.dataTreeChildField;\r\n\t\t\tthis.indent = options.dataTreeChildIndent;\r\n\r\n\t\t\tif(options.dataTreeBranchElement){\r\n\r\n\t\t\t\tif(options.dataTreeBranchElement === true){\r\n\t\t\t\t\tthis.branchEl = document.createElement(\"div\");\r\n\t\t\t\t\tthis.branchEl.classList.add(\"tabulator-data-tree-branch\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(typeof options.dataTreeBranchElement === \"string\"){\r\n\t\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\t\tdummyEl.innerHTML = options.dataTreeBranchElement;\r\n\t\t\t\t\t\tthis.branchEl = dummyEl.firstChild;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.branchEl = options.dataTreeBranchElement;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(options.dataTreeCollapseElement){\r\n\t\t\t\tif(typeof options.dataTreeCollapseElement === \"string\"){\r\n\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\tdummyEl.innerHTML = options.dataTreeCollapseElement;\r\n\t\t\t\t\tthis.collapseEl = dummyEl.firstChild;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.collapseEl = options.dataTreeCollapseElement;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.collapseEl = document.createElement(\"div\");\r\n\t\t\t\tthis.collapseEl.classList.add(\"tabulator-data-tree-control\");\r\n\t\t\t\tthis.collapseEl.tabIndex = 0;\r\n\t\t\t\tthis.collapseEl.innerHTML = \"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif(options.dataTreeExpandElement){\r\n\t\t\t\tif(typeof options.dataTreeExpandElement === \"string\"){\r\n\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\tdummyEl.innerHTML = options.dataTreeExpandElement;\r\n\t\t\t\t\tthis.expandEl = dummyEl.firstChild;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.expandEl = options.dataTreeExpandElement;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.expandEl = document.createElement(\"div\");\r\n\t\t\t\tthis.expandEl.classList.add(\"tabulator-data-tree-control\");\r\n\t\t\t\tthis.expandEl.tabIndex = 0;\r\n\t\t\t\tthis.expandEl.innerHTML = \"
\";\r\n\t\t\t}\r\n\r\n\r\n\t\t\tswitch(typeof options.dataTreeStartExpanded){\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\treturn options.dataTreeStartExpanded;\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tthis.startOpen = options.dataTreeStartExpanded;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\treturn options.dataTreeStartExpanded[index];\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-layout-after\", this.layoutRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowDelete.bind(this),0);\r\n\t\t\tthis.subscribe(\"row-data-changed\", this.rowDataChanged.bind(this), 10);\r\n\t\t\tthis.subscribe(\"cell-value-updated\", this.cellValueChanged.bind(this));\r\n\t\t\tthis.subscribe(\"edit-cancelled\", this.cellValueChanged.bind(this));\r\n\t\t\tthis.subscribe(\"column-moving-rows\", this.columnMoving.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.initializeElementField.bind(this));\r\n\r\n\t\t\tthis.registerDisplayHandler(this.getRows.bind(this), 30);\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeElementField(){\r\n\t\tvar firstCol = this.table.columnManager.getFirstVisibleColumn();\r\n\r\n\t\tthis.elementField = this.table.options.dataTreeElementColumn || (firstCol ? firstCol.field : false);\r\n\t}\r\n\t\r\n\tgetRowChildren(row){\r\n\t\treturn this.getTreeChildren(row, true);\r\n\t}\r\n\r\n\tcolumnMoving(){\r\n\t\tvar rows = [];\r\n\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\trows = rows.concat(this.getTreeChildren(row, false, true));\r\n\t\t});\r\n\r\n\t\treturn rows;\r\n\t}\r\n\r\n\trowDataChanged(row, visible, updatedData){\r\n\t\tif(this.redrawNeeded(updatedData)){\r\n\t\t\tthis.initializeRow(row);\r\n\r\n\t\t\tif(visible){\r\n\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tcellValueChanged(cell){\r\n\t\tvar field = cell.column.getField();\r\n\r\n\t\tif(field === this.elementField){\r\n\t\t\tthis.layoutRow(cell.row);\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar childArray = row.getData()[this.field];\r\n\t\tvar isArray = Array.isArray(childArray);\r\n\r\n\t\tvar children = isArray || (!isArray && typeof childArray === \"object\" && childArray !== null);\r\n\r\n\t\tif(!children && row.modules.dataTree && row.modules.dataTree.branchEl){\r\n\t\t\trow.modules.dataTree.branchEl.parentNode.removeChild(row.modules.dataTree.branchEl);\r\n\t\t}\r\n\r\n\t\tif(!children && row.modules.dataTree && row.modules.dataTree.controlEl){\r\n\t\t\trow.modules.dataTree.controlEl.parentNode.removeChild(row.modules.dataTree.controlEl);\r\n\t\t}\r\n\r\n\t\trow.modules.dataTree = {\r\n\t\t\tindex: row.modules.dataTree ? row.modules.dataTree.index : 0,\r\n\t\t\topen: children ? (row.modules.dataTree ? row.modules.dataTree.open : this.startOpen(row.getComponent(), 0)) : false,\r\n\t\t\tcontrolEl: row.modules.dataTree && children ? row.modules.dataTree.controlEl : false,\r\n\t\t\tbranchEl: row.modules.dataTree && children ? row.modules.dataTree.branchEl : false,\r\n\t\t\tparent: row.modules.dataTree ? row.modules.dataTree.parent : false,\r\n\t\t\tchildren:children,\r\n\t\t};\r\n\t}\r\n\r\n\treinitializeRowChildren(row){\r\n\t\tvar children = this.getTreeChildren(row, false, true);\r\n\r\n\t\tchildren.forEach(function(child){\r\n\t\t\tchild.reinitialize(true);\r\n\t\t});\r\n\t}\r\n\r\n\tlayoutRow(row){\r\n\t\tvar cell = this.elementField ? row.getCell(this.elementField) : row.getCells()[0],\r\n\t\tel = cell.getElement(),\r\n\t\tconfig = row.modules.dataTree;\r\n\r\n\t\tif(config.branchEl){\r\n\t\t\tif(config.branchEl.parentNode){\r\n\t\t\t\tconfig.branchEl.parentNode.removeChild(config.branchEl);\r\n\t\t\t}\r\n\t\t\tconfig.branchEl = false;\r\n\t\t}\r\n\r\n\t\tif(config.controlEl){\r\n\t\t\tif(config.controlEl.parentNode){\r\n\t\t\t\tconfig.controlEl.parentNode.removeChild(config.controlEl);\r\n\t\t\t}\r\n\t\t\tconfig.controlEl = false;\r\n\t\t}\r\n\r\n\t\tthis.generateControlElement(row, el);\r\n\r\n\t\trow.getElement().classList.add(\"tabulator-tree-level-\" + config.index);\r\n\r\n\t\tif(config.index){\r\n\t\t\tif(this.branchEl){\r\n\t\t\t\tconfig.branchEl = this.branchEl.cloneNode(true);\r\n\t\t\t\tel.insertBefore(config.branchEl, el.firstChild);\r\n\r\n\t\t\t\tif(this.table.rtl){\r\n\t\t\t\t\tconfig.branchEl.style.marginRight = (((config.branchEl.offsetWidth + config.branchEl.style.marginLeft) * (config.index - 1)) + (config.index * this.indent)) + \"px\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.branchEl.style.marginLeft = (((config.branchEl.offsetWidth + config.branchEl.style.marginRight) * (config.index - 1)) + (config.index * this.indent)) + \"px\";\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\r\n\t\t\t\tif(this.table.rtl){\r\n\t\t\t\t\tel.style.paddingRight = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-right')) + (config.index * this.indent) + \"px\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.style.paddingLeft = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-left')) + (config.index * this.indent) + \"px\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateControlElement(row, el){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\tel = el || row.getCells()[0].getElement(),\r\n\t\toldControl = config.controlEl;\r\n\r\n\t\tif(config.children !== false){\r\n\r\n\t\t\tif(config.open){\r\n\t\t\t\tconfig.controlEl = this.collapseEl.cloneNode(true);\r\n\t\t\t\tconfig.controlEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tthis.collapseRow(row);\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconfig.controlEl = this.expandEl.cloneNode(true);\r\n\t\t\t\tconfig.controlEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tthis.expandRow(row);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tconfig.controlEl.addEventListener(\"mousedown\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\r\n\t\t\tif(oldControl && oldControl.parentNode === el){\r\n\t\t\t\toldControl.parentNode.replaceChild(config.controlEl,oldControl);\r\n\t\t\t}else{\r\n\t\t\t\tel.insertBefore(config.controlEl, el.firstChild);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tsetDisplayIndex (index) {\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\r\n\tgetDisplayIndex () {\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\r\n\tgetRows(rows){\r\n\t\tvar output = [];\r\n\r\n\t\trows.forEach((row, i) => {\r\n\t\t\tvar config, children;\r\n\r\n\t\t\toutput.push(row);\r\n\r\n\t\t\tif(row instanceof Row){\r\n\r\n\t\t\t\trow.create();\r\n\r\n\t\t\t\tconfig = row.modules.dataTree.children;\r\n\r\n\t\t\t\tif(!config.index && config.children !== false){\r\n\t\t\t\t\tchildren = this.getChildren(row);\r\n\r\n\t\t\t\t\tchildren.forEach((child) => {\r\n\t\t\t\t\t\tchild.create();\r\n\t\t\t\t\t\toutput.push(child);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetChildren(row, allChildren){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\tchildren = [],\r\n\t\toutput = [];\r\n\r\n\t\tif(config.children !== false && (config.open || allChildren)){\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"filter\") && this.table.options.dataTreeFilter){\r\n\t\t\t\tchildren = this.table.modules.filter.filter(config.children);\r\n\t\t\t}else{\r\n\t\t\t\tchildren = config.children;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"sort\") && this.table.options.dataTreeSort){\r\n\t\t\t\tthis.table.modules.sort.sort(children);\r\n\t\t\t}\r\n\r\n\t\t\tchildren.forEach((child) => {\r\n\t\t\t\toutput.push(child);\r\n\r\n\t\t\t\tvar subChildren = this.getChildren(child);\r\n\r\n\t\t\t\tsubChildren.forEach((sub) => {\r\n\t\t\t\t\toutput.push(sub);\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgenerateChildren(row){\r\n\t\tvar children = [];\r\n\r\n\t\tvar childArray = row.getData()[this.field];\r\n\r\n\t\tif(!Array.isArray(childArray)){\r\n\t\t\tchildArray = [childArray];\r\n\t\t}\r\n\r\n\t\tchildArray.forEach((childData) => {\r\n\t\t\tvar childRow = new Row(childData || {}, this.table.rowManager);\r\n\r\n\t\t\tchildRow.create();\r\n\r\n\t\t\tchildRow.modules.dataTree.index = row.modules.dataTree.index + 1;\r\n\t\t\tchildRow.modules.dataTree.parent = row;\r\n\r\n\t\t\tif(childRow.modules.dataTree.children){\r\n\t\t\t\tchildRow.modules.dataTree.open = this.startOpen(childRow.getComponent(), childRow.modules.dataTree.index);\r\n\t\t\t}\r\n\t\t\tchildren.push(childRow);\r\n\t\t});\r\n\r\n\t\treturn children;\r\n\t}\r\n\r\n\texpandRow(row, silent){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tconfig.open = true;\r\n\r\n\t\t\trow.reinitialize();\r\n\r\n\t\t\tthis.refreshData(true);\r\n\r\n\t\t\tthis.dispatchExternal(\"dataTreeRowExpanded\", row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\t}\r\n\r\n\tcollapseRow(row){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tconfig.open = false;\r\n\r\n\t\t\trow.reinitialize();\r\n\r\n\t\t\tthis.refreshData(true);\r\n\r\n\t\t\tthis.dispatchExternal(\"dataTreeRowCollapsed\", row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\t}\r\n\r\n\ttoggleRow(row){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tif(config.open){\r\n\t\t\t\tthis.collapseRow(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.expandRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tisRowExpanded(row){\r\n\t\treturn row.modules.dataTree.open;\r\n\t}\r\n\r\n\tgetTreeParent(row){\r\n\t\treturn row.modules.dataTree.parent ? row.modules.dataTree.parent.getComponent() : false;\r\n\t}\r\n\r\n\tgetFilteredTreeChildren(row){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\toutput = [], children;\r\n\r\n\t\tif(config.children){\r\n\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"filter\") && this.table.options.dataTreeFilter){\r\n\t\t\t\tchildren = this.table.modules.filter.filter(config.children);\r\n\t\t\t}else{\r\n\t\t\t\tchildren = config.children;\r\n\t\t\t}\r\n\r\n\t\t\tchildren.forEach((childRow) => {\r\n\t\t\t\tif(childRow instanceof Row){\r\n\t\t\t\t\toutput.push(childRow);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\trowDelete(row){\r\n\t\tvar parent = row.modules.dataTree.parent,\r\n\t\tchildIndex;\r\n\r\n\t\tif(parent){\r\n\t\t\tchildIndex = this.findChildIndex(row, parent);\r\n\r\n\t\t\tif(childIndex !== false){\r\n\t\t\t\tparent.data[this.field].splice(childIndex, 1);\r\n\t\t\t}\r\n\r\n\t\t\tif(!parent.data[this.field].length){\r\n\t\t\t\tdelete parent.data[this.field];\r\n\t\t\t}\r\n\r\n\t\t\tthis.initializeRow(parent);\r\n\t\t\tthis.layoutRow(parent);\r\n\t\t}\r\n\r\n\t\tthis.refreshData(true);\r\n\t}\r\n\r\n\taddTreeChildRow(row, data, top, index){\r\n\t\tvar childIndex = false;\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(row.data[this.field])){\r\n\t\t\trow.data[this.field] = [];\r\n\r\n\t\t\trow.modules.dataTree.open = this.startOpen(row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\r\n\t\tif(typeof index !== \"undefined\"){\r\n\t\t\tchildIndex = this.findChildIndex(index, row);\r\n\r\n\t\t\tif(childIndex !== false){\r\n\t\t\t\trow.data[this.field].splice((top ? childIndex : childIndex + 1), 0, data);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(childIndex === false){\r\n\t\t\tif(top){\r\n\t\t\t\trow.data[this.field].unshift(data);\r\n\t\t\t}else{\r\n\t\t\t\trow.data[this.field].push(data);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.initializeRow(row);\r\n\t\tthis.layoutRow(row);\r\n\r\n\t\tthis.refreshData(true);\r\n\t}\r\n\r\n\tfindChildIndex(subject, parent){\r\n\t\tvar match = false;\r\n\r\n\t\tif(typeof subject == \"object\"){\r\n\r\n\t\t\tif(subject instanceof Row){\r\n\t\t\t\t//subject is row element\r\n\t\t\t\tmatch = subject.data;\r\n\t\t\t}else if(subject instanceof RowComponent){\r\n\t\t\t\t//subject is public row component\r\n\t\t\t\tmatch = subject._getSelf().data;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\tif(parent.modules.dataTree){\r\n\t\t\t\t\tmatch = parent.modules.dataTree.children.find((childRow) => {\r\n\t\t\t\t\t\treturn childRow instanceof Row ? childRow.element === subject : false;\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(match){\r\n\t\t\t\t\t\tmatch = match.data;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}else if(typeof subject == \"undefined\" || subject === null){\r\n\t\t\tmatch = false\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the index of the row\r\n\t\t\tmatch = parent.data[this.field].find((row) => {\r\n\t\t\t\treturn row.data[this.table.options.index] == subject;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(match){\r\n\r\n\t\t\tif(Array.isArray(parent.data[this.field])){\r\n\t\t\t\tmatch = parent.data[this.field].indexOf(match);\r\n\t\t\t}\r\n\r\n\t\t\tif(match == -1){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//catch all for any other type of input\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tgetTreeChildren(row, component, recurse){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\toutput = [];\r\n\r\n\t\tif(config.children){\r\n\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tconfig.children.forEach((childRow) => {\r\n\t\t\t\tif(childRow instanceof Row){\r\n\t\t\t\t\toutput.push(component ? childRow.getComponent() : childRow);\r\n\r\n\t\t\t\t\tif(recurse){\r\n\t\t\t\t\t\toutput = output.concat(this.getTreeChildren(childRow, component, recurse));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetChildField(){\r\n\t\treturn this.field;\r\n\t}\r\n\r\n\tredrawNeeded(data){\r\n\t\treturn (this.field ? typeof data[this.field] !== \"undefined\" : false) || (this.elementField ? typeof data[this.elementField] !== \"undefined\" : false);\r\n\t}\r\n}\r\n\r\nDataTree.moduleName = \"dataTree\";\r\n\r\nexport default DataTree;","export default function(list, options, setFileContents){\r\n\tvar delimiter = options && options.delimiter ? options.delimiter : \",\",\r\n\tfileContents = [],\r\n\theaders = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tvar item = [];\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"group\":\r\n\t\t\tconsole.warn(\"Download Warning - CSV downloader cannot process row groups\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tconsole.warn(\"Download Warning - CSV downloader cannot process column calculations\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"header\":\r\n\t\t\trow.columns.forEach((col, i) => {\r\n\t\t\t\tif(col && col.depth === 1){\r\n\t\t\t\t\theaders[i] = typeof col.value == \"undefined\" || col.value === null ? \"\" : ('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\trow.columns.forEach((col) => {\r\n\r\n\t\t\t\tif(col){\r\n\r\n\t\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tcol.value = JSON.stringify(col.value);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\t\tcol.value = \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\titem.push('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tfileContents.push(item.join(delimiter));\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(headers.length){\r\n\t\tfileContents.unshift(headers.join(delimiter));\r\n\t}\r\n\r\n\tfileContents = fileContents.join(\"\\n\");\r\n\r\n\tif(options.bom){\r\n\t\tfileContents = \"\\ufeff\" + fileContents;\r\n\t}\r\n\r\n\tsetFileContents(fileContents, \"text/csv\");\r\n};","export default function(list, options, setFileContents){\r\n\tvar fileContents = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tvar item = {};\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"header\":\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process row groups\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process column calculations\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\tif(col){\r\n\t\t\t\t\titem[col.component.getTitleDownload() || col.component.getField()] = col.value;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tfileContents.push(item);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tfileContents = JSON.stringify(fileContents, null, '\\t');\r\n\r\n\tsetFileContents(fileContents, \"application/json\");\r\n};","export default function(list, options, setFileContents){\r\n\tvar header = [],\r\n\tbody = [],\r\n\tautoTableParams = {},\r\n\trowGroupStyles = options.rowGroupStyles || {\r\n\t\tfontStyle: \"bold\",\r\n\t\tfontSize: 12,\r\n\t\tcellPadding: 6,\r\n\t\tfillColor: 220,\r\n\t},\r\n\trowCalcStyles = options.rowCalcStyles || {\r\n\t\tfontStyle: \"bold\",\r\n\t\tfontSize: 10,\r\n\t\tcellPadding: 4,\r\n\t\tfillColor: 232,\r\n\t},\r\n\tjsPDFParams = options.jsPDF || {},\r\n\ttitle = options && options.title ? options.title : \"\";\r\n\r\n\tif(!jsPDFParams.orientation){\r\n\t\tjsPDFParams.orientation = options.orientation || \"landscape\";\r\n\t}\r\n\r\n\tif(!jsPDFParams.unit){\r\n\t\tjsPDFParams.unit = \"pt\";\r\n\t}\r\n\r\n\t//parse row list\r\n\tlist.forEach((row) => {\r\n\t\tvar item = {};\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"header\":\r\n\t\t\theader.push(parseRow(row));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tbody.push(parseRow(row, rowGroupStyles));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tbody.push(parseRow(row, rowCalcStyles));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\tbody.push(parseRow(row));\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tfunction parseRow(row, styles){\r\n\t\tvar rowData = [];\r\n\r\n\t\trow.columns.forEach((col) =>{\r\n\t\t\tvar cell;\r\n\r\n\t\t\tif(col){\r\n\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tcol.value = JSON.stringify(col.value);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\tcol.value = \"\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcell = {\r\n\t\t\t\t\tcontent:col.value,\r\n\t\t\t\t\tcolSpan:col.width,\r\n\t\t\t\t\trowSpan:col.height,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tif(styles){\r\n\t\t\t\t\tcell.styles = styles;\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowData.push(cell);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowData;\r\n\t}\r\n\r\n\r\n\t//configure PDF\r\n\tvar doc = new jspdf.jsPDF(jsPDFParams); //set document to landscape, better for most tables\r\n\r\n\tif(options && options.autoTable){\r\n\t\tif(typeof options.autoTable === \"function\"){\r\n\t\t\tautoTableParams = options.autoTable(doc) || {};\r\n\t\t}else{\r\n\t\t\tautoTableParams = options.autoTable;\r\n\t\t}\r\n\t}\r\n\r\n\tif(title){\r\n\t\tautoTableParams.didDrawPage = function(data) {\r\n\t\t\tdoc.text(title, 40, 30);\r\n\t\t};\r\n\t}\r\n\r\n\tautoTableParams.head = header;\r\n\tautoTableParams.body = body;\r\n\r\n\tdoc.autoTable(autoTableParams);\r\n\r\n\tif(options && options.documentProcessing){\r\n\t\toptions.documentProcessing(doc);\r\n\t}\r\n\r\n\tsetFileContents(doc.output(\"arraybuffer\"), \"application/pdf\");\r\n};","import CoreFeature from '../../../../core/CoreFeature.js';\r\n\r\nexport default function(list, options, setFileContents){\r\n\tvar self = this,\r\n\tsheetName = options.sheetName || \"Sheet1\",\r\n\tworkbook = XLSX.utils.book_new(),\r\n\ttableFeatures = new CoreFeature(this),\r\n\toutput;\r\n\r\n\tworkbook.SheetNames = [];\r\n\tworkbook.Sheets = {};\r\n\r\n\tfunction generateSheet(){\r\n\t\tvar rows = [],\r\n\t\tmerges = [],\r\n\t\tworksheet = {},\r\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 }};\r\n\r\n\t\t//parse row list\r\n\t\tlist.forEach((row, i) => {\r\n\t\t\tvar rowData = [];\r\n\r\n\t\t\trow.columns.forEach(function(col, j){\r\n\r\n\t\t\t\tif(col){\r\n\t\t\t\t\trowData.push(!(col.value instanceof Date) && typeof col.value === \"object\" ? JSON.stringify(col.value) : col.value);\r\n\r\n\t\t\t\t\tif(col.width > 1 || col.height > -1){\r\n\t\t\t\t\t\tif(col.height > 1 || col.width > 1){\r\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}});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\trowData.push(\"\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\trows.push(rowData);\r\n\t\t});\r\n\r\n\t\t//convert rows to worksheet\r\n\t\tXLSX.utils.sheet_add_aoa(worksheet, rows);\r\n\r\n\t\tworksheet['!ref'] = XLSX.utils.encode_range(range);\r\n\r\n\t\tif(merges.length){\r\n\t\t\tworksheet[\"!merges\"] = merges;\r\n\t\t}\r\n\r\n\t\treturn worksheet;\r\n\t}\r\n\r\n\tif(options.sheetOnly){\r\n\t\tsetFileContents(generateSheet());\r\n\t\treturn;\r\n\t}\r\n\r\n\tif(options.sheets){\r\n\t\tfor(var sheet in options.sheets){\r\n\r\n\t\t\tif(options.sheets[sheet] === true){\r\n\t\t\t\tworkbook.SheetNames.push(sheet);\r\n\t\t\t\tworkbook.Sheets[sheet] = generateSheet();\r\n\t\t\t}else{\r\n\r\n\t\t\t\tworkbook.SheetNames.push(sheet);\r\n\r\n\t\t\t\ttableFeatures.commsSend(options.sheets[sheet], \"download\", \"intercept\",{\r\n\t\t\t\t\ttype:\"xlsx\",\r\n\t\t\t\t\toptions:{sheetOnly:true},\r\n\t\t\t\t\tactive:self.active,\r\n\t\t\t\t\tintercept:function(data){\r\n\t\t\t\t\t\tworkbook.Sheets[sheet] = data;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tworkbook.SheetNames.push(sheetName);\r\n\t\tworkbook.Sheets[sheetName] = generateSheet();\r\n\t}\r\n\r\n\tif(options.documentProcessing){\r\n\t\tworkbook = options.documentProcessing(workbook);\r\n\t}\r\n\r\n\t//convert workbook to binary array\r\n\tfunction s2ab(s) {\r\n\t\tvar buf = new ArrayBuffer(s.length);\r\n\t\tvar view = new Uint8Array(buf);\r\n\t\tfor (var i=0; i!=s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;\r\n\t\t\treturn buf;\r\n\t}\r\n\r\n\toutput = XLSX.write(workbook, {bookType:'xlsx', bookSST:true, type: 'binary'});\r\n\r\n\tsetFileContents(s2ab(output), \"application/octet-stream\");\r\n};","export default function(list, options, setFileContents){\r\n\tif(this.modExists(\"export\", true)){\r\n\t\tsetFileContents(this.modules.export.genereateHTMLTable(list), \"text/html\");\r\n\t}\r\n};","export default function (list, options, setFileContents) {\r\n\tconst fileContents = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tconst item = {};\r\n\r\n\t\tswitch (row.type) {\r\n\t\t\tcase \"header\":\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process row groups\");\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process column calculations\");\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\t\tif (col) {\r\n\t\t\t\t\t\titem[col.component.getTitleDownload() || col.component.getField()] = col.value;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tfileContents.push(JSON.stringify(item));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tsetFileContents(fileContents.join(\"\\n\"), \"application/x-ndjson\");\r\n};","import csv from './downloaders/csv.js';\r\nimport json from './downloaders/json.js';\r\nimport pdf from './downloaders/pdf.js';\r\nimport xlsx from './downloaders/xlsx.js';\r\nimport html from './downloaders/html.js';\r\nimport jsonLines from './downloaders/jsonLines.js';\r\n\r\nexport default {\r\n\tcsv:csv,\r\n\tjson:json,\r\n\tjsonLines:jsonLines,\r\n\tpdf:pdf,\r\n\txlsx:xlsx,\r\n\thtml:html,\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultDownloaders from './defaults/downloaders.js';\r\n\r\nclass Download extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.registerTableOption(\"downloadReady\", function(data, blob){return blob;}); //function to manipulate download data\r\n\t\tthis.registerTableOption(\"downloadConfig\", {}); //download config\r\n\t\tthis.registerTableOption(\"downloadRowRange\", \"active\"); //restrict download to active rows only\r\n\r\n\t\tthis.registerColumnOption(\"download\");\r\n\t\tthis.registerColumnOption(\"titleDownload\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"download\", this.download.bind(this));\r\n\t\tthis.registerTableFunction(\"downloadToTab\", this.downloadToTab.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tdownloadToTab(type, filename, options, active){\r\n\t\tthis.download(type, filename, options, active, true);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\t//trigger file download\r\n\tdownload(type, filename, options, range, interceptCallback){\r\n\t\tvar downloadFunc = false;\r\n\r\n\t\tfunction buildLink(data, mime){\r\n\t\t\tif(interceptCallback){\r\n\t\t\t\tif(interceptCallback === true){\r\n\t\t\t\t\tthis.triggerDownload(data, mime, type, filename, true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tinterceptCallback(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tthis.triggerDownload(data, mime, type, filename);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(typeof type == \"function\"){\r\n\t\t\tdownloadFunc = type;\r\n\t\t}else{\r\n\t\t\tif(Download.downloaders[type]){\r\n\t\t\t\tdownloadFunc = Download.downloaders[type];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Download Error - No such download type found: \", type);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(downloadFunc){\r\n\t\t\tvar list = this.generateExportList(range);\r\n\r\n\t\t\tdownloadFunc.call(this.table, list , options || {}, buildLink.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateExportList(range){\r\n\t\tvar list = this.table.modules.export.generateExportList(this.table.options.downloadConfig, false, range || this.table.options.downloadRowRange, \"download\");\r\n\r\n\t\t//assign group header formatter\r\n\t\tvar groupHeader = this.table.options.groupHeaderDownload;\r\n\r\n\t\tif(groupHeader && !Array.isArray(groupHeader)){\r\n\t\t\tgroupHeader = [groupHeader];\r\n\t\t}\r\n\r\n\t\tlist.forEach((row) => {\r\n\t\t\tvar group;\r\n\r\n\t\t\tif(row.type === \"group\"){\r\n\t\t\t\tgroup = row.columns[0];\r\n\r\n\t\t\t\tif(groupHeader && groupHeader[row.indent]){\r\n\t\t\t\t\tgroup.value = groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn list;\r\n\t}\r\n\r\n\ttriggerDownload(data, mime, type, filename, newTab){\r\n\t\tvar element = document.createElement('a'),\r\n\t\tblob = new Blob([data],{type:mime}),\r\n\t\tfilename = filename || \"Tabulator.\" + (typeof type === \"function\" ? \"txt\" : type);\r\n\r\n\t\tblob = this.table.options.downloadReady(data, blob);\r\n\r\n\t\tif(blob){\r\n\r\n\t\t\tif(newTab){\r\n\t\t\t\twindow.open(window.URL.createObjectURL(blob));\r\n\t\t\t}else{\r\n\t\t\t\tif(navigator.msSaveOrOpenBlob){\r\n\t\t\t\t\tnavigator.msSaveOrOpenBlob(blob, filename);\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.setAttribute('href', window.URL.createObjectURL(blob));\r\n\r\n\t\t\t\t\t//set file title\r\n\t\t\t\t\telement.setAttribute('download', filename);\r\n\r\n\t\t\t\t\t//trigger download\r\n\t\t\t\t\telement.style.display = 'none';\r\n\t\t\t\t\tdocument.body.appendChild(element);\r\n\t\t\t\t\telement.click();\r\n\r\n\t\t\t\t\t//remove temporary link element\r\n\t\t\t\t\tdocument.body.removeChild(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"downloadComplete\");\r\n\t\t}\r\n\t}\r\n\r\n\tcommsReceived(table, action, data){\r\n\t\tswitch(action){\r\n\t\t\tcase \"intercept\":\r\n\t\t\tthis.download(data.type, \"\", data.options, data.active, data.intercept);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nDownload.moduleName = \"download\";\r\n\r\n//load defaults\r\nDownload.downloaders = defaultDownloaders;\r\n\r\nexport default Download;","export default function maskInput(el, options){\r\n\tvar mask = options.mask,\r\n\tmaskLetter = typeof options.maskLetterChar !== \"undefined\" ? options.maskLetterChar : \"A\",\r\n\tmaskNumber = typeof options.maskNumberChar !== \"undefined\" ? options.maskNumberChar : \"9\",\r\n\tmaskWildcard = typeof options.maskWildcardChar !== \"undefined\" ? options.maskWildcardChar : \"*\",\r\n\tsuccess = false;\r\n\r\n\tfunction fillSymbols(index){\r\n\t\tvar symbol = mask[index];\r\n\t\tif(typeof symbol !== \"undefined\" && symbol !== maskWildcard && symbol !== maskLetter && symbol !== maskNumber){\r\n\t\t\tel.value = el.value + \"\" + symbol;\r\n\t\t\tfillSymbols(index+1);\r\n\t\t}\r\n\t}\r\n\r\n\tel.addEventListener(\"keydown\", (e) => {\r\n\t\tvar index = el.value.length,\r\n\t\tchar = e.key;\r\n\r\n\t\tif(e.keyCode > 46){\r\n\t\t\tif(index >= mask.length){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tsuccess = false;\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\tswitch(mask[index]){\r\n\t\t\t\t\tcase maskLetter:\r\n\t\t\t\t\tif(char.toUpperCase() == char.toLowerCase()){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase maskNumber:\r\n\t\t\t\t\tif(isNaN(char)){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase maskWildcard:\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(char !== mask[index]){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\r\n\t\treturn;\r\n\t});\r\n\r\n\tel.addEventListener(\"keyup\", (e) => {\r\n\t\tif(e.keyCode > 46){\r\n\t\t\tif(options.maskAutoFill){\r\n\t\t\t\tfillSymbols(el.value.length);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\r\n\tif(!el.placeholder){\r\n\t\tel.placeholder = mask;\r\n\t}\r\n\r\n\tif(options.maskAutoFill){\r\n\t\tfillSymbols(el.value.length);\r\n\t}\r\n}","import maskInput from '../../inputMask.js';\r\n\r\n//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", editorParams.search ? \"search\" : \"text\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t});\r\n\r\n\tfunction onChange(e){\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\r\n\t\t\tif(success(input.value)){\r\n\t\t\t\tcellValue = input.value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\t// case 9:\r\n\t\t\tcase 13:\r\n\t\t\tonChange(e);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\te.stopPropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\treturn input;\r\n};","import maskInput from '../../inputMask.js';\r\n\r\n//resizable text area element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n var self = this,\r\n cellValue = cell.getValue(),\r\n vertNav = editorParams.verticalNavigation || \"hybrid\",\r\n value = String(cellValue !== null && typeof cellValue !== \"undefined\" ? cellValue : \"\"),\r\n count = (value.match(/(?:\\r\\n|\\r|\\n)/g) || []).length + 1,\r\n input = document.createElement(\"textarea\"),\r\n scrollHeight = 0;\r\n\r\n //create and style input\r\n input.style.display = \"block\";\r\n input.style.padding = \"2px\";\r\n input.style.height = \"100%\";\r\n input.style.width = \"100%\";\r\n input.style.boxSizing = \"border-box\";\r\n input.style.whiteSpace = \"pre-wrap\";\r\n input.style.resize = \"none\";\r\n\r\n if(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n for (let key in editorParams.elementAttributes){\r\n if(key.charAt(0) == \"+\"){\r\n key = key.slice(1);\r\n input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n }else{\r\n input.setAttribute(key, editorParams.elementAttributes[key]);\r\n }\r\n }\r\n }\r\n\r\n input.value = value;\r\n\r\n onRendered(function(){\r\n input.focus({preventScroll: true});\r\n input.style.height = \"100%\";\r\n\r\n input.scrollHeight;\r\n input.style.height = input.scrollHeight + \"px\";\r\n cell.getRow().normalizeHeight();\r\n });\r\n\r\n function onChange(e){\r\n\r\n if(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\r\n\r\n if(success(input.value)){\r\n cellValue = input.value; //persist value if successfully validated incase editor is used as header filter\r\n }\r\n\r\n setTimeout(function(){\r\n cell.getRow().normalizeHeight();\r\n },300)\r\n }else{\r\n cancel();\r\n }\r\n }\r\n\r\n //submit new value on blur or change\r\n input.addEventListener(\"change\", onChange);\r\n input.addEventListener(\"blur\", onChange);\r\n\r\n input.addEventListener(\"keyup\", function(){\r\n\r\n input.style.height = \"\";\r\n\r\n var heightNow = input.scrollHeight;\r\n\r\n input.style.height = heightNow + \"px\";\r\n\r\n if(heightNow != scrollHeight){\r\n scrollHeight = heightNow;\r\n cell.getRow().normalizeHeight();\r\n }\r\n });\r\n\r\n input.addEventListener(\"keydown\", function(e){\r\n\r\n switch(e.keyCode){\r\n case 27:\r\n cancel();\r\n break;\r\n\r\n case 38: //up arrow\r\n if(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart)){\r\n e.stopImmediatePropagation();\r\n e.stopPropagation();\r\n }\r\n\r\n break;\r\n\r\n case 40: //down arrow\r\n if(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart !== input.value.length)){\r\n e.stopImmediatePropagation();\r\n e.stopPropagation();\r\n }\r\n break;\r\n\r\n case 35:\r\n case 36:\r\n e.stopPropagation();\r\n break;\r\n }\r\n });\r\n\r\n if(editorParams.mask){\r\n maskInput(input, editorParams);\r\n }\r\n\r\n return input;\r\n};","import maskInput from '../../inputMask.js';\r\n\r\n//input element with type of number\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar cellValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", \"number\");\r\n\r\n\tif(typeof editorParams.max != \"undefined\"){\r\n\t\tinput.setAttribute(\"max\", editorParams.max);\r\n\t}\r\n\r\n\tif(typeof editorParams.min != \"undefined\"){\r\n\t\tinput.setAttribute(\"min\", editorParams.min);\r\n\t}\r\n\r\n\tif(typeof editorParams.step != \"undefined\"){\r\n\t\tinput.setAttribute(\"step\", editorParams.step);\r\n\t}\r\n\r\n\t//create and style input\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\r\n\tvar blurFunc = function(e){\r\n\t\tonChange();\r\n\t};\r\n\r\n\tonRendered(function () {\r\n\t\t//submit new value on blur\r\n\t\tinput.removeEventListener(\"blur\", blurFunc);\r\n\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\r\n\t\t//submit new value on blur\r\n\t\tinput.addEventListener(\"blur\", blurFunc);\r\n\t});\r\n\r\n\tfunction onChange(){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(!isNaN(value) && value !==\"\"){\r\n\t\t\tvalue = Number(value);\r\n\t\t}\r\n\r\n\t\tif(value !== cellValue){\r\n\t\t\tif(success(value)){\r\n\t\t\t\tcellValue = value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 13:\r\n\t\t\t// case 9:\r\n\t\t\tonChange();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tcase 40: //down arrow\r\n\t\t\tif(vertNav == \"editor\"){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\te.stopPropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\treturn input;\r\n};","//input element with type of number\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", \"range\");\r\n\r\n\tif (typeof editorParams.max != \"undefined\") {\r\n\t\tinput.setAttribute(\"max\", editorParams.max);\r\n\t}\r\n\r\n\tif (typeof editorParams.min != \"undefined\") {\r\n\t\tinput.setAttribute(\"min\", editorParams.min);\r\n\t}\r\n\r\n\tif (typeof editorParams.step != \"undefined\") {\r\n\t\tinput.setAttribute(\"step\", editorParams.step);\r\n\t}\r\n\r\n\t//create and style input\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\r\n\tonRendered(function () {\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t});\r\n\r\n\tfunction onChange(){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(!isNaN(value) && value !==\"\"){\r\n\t\t\tvalue = Number(value);\r\n\t\t}\r\n\r\n\t\tif(value != cellValue){\r\n\t\t\tif(success(value)){\r\n\t\t\t\tcellValue = value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tonChange();\r\n\t});\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 13:\r\n\t\t\t// case 9:\r\n\t\t\tonChange();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\treturn input;\r\n};","import Helpers from '../../../../core/tools/Helpers.js';\r\n\r\n//dropdown select editor\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\tcellEl = cell.getElement(),\r\n\tinitialValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinitialDisplayValue = typeof initialValue !== \"undefined\" || initialValue === null ? (Array.isArray(initialValue) ? initialValue : [initialValue]) : (typeof editorParams.defaultValue !== \"undefined\" ? editorParams.defaultValue : []),\r\n\tinput = document.createElement(\"input\"),\r\n\tlistEl = document.createElement(\"div\"),\r\n\tmultiselect = editorParams.multiselect,\r\n\tdataItems = [],\r\n\tcurrentItem = {},\r\n\tdisplayItems = [],\r\n\tcurrentItems = [],\r\n\tblurable = true,\r\n\tblockListShow = false,\r\n\tsearchWord = \"\",\r\n\tsearchWordTimeout = null;\r\n\r\n\tif(Array.isArray(editorParams) || (!Array.isArray(editorParams) && typeof editorParams === \"object\" && !editorParams.values)){\r\n\t\tconsole.warn(\"DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object\");\r\n\t\teditorParams = {values:editorParams};\r\n\t}\r\n\r\n\tfunction getUniqueColumnValues(field){\r\n\t\tvar output = {},\r\n\t\tdata = self.table.getData(),\r\n\t\tcolumn;\r\n\r\n\t\tif(field){\r\n\t\t\tcolumn = self.table.columnManager.getColumnByField(field);\r\n\t\t}else{\r\n\t\t\tcolumn = cell.getColumn()._getSelf();\r\n\t\t}\r\n\r\n\t\tif(column){\r\n\t\t\tdata.forEach(function(row){\r\n\t\t\t\tvar val = column.getFieldValue(row);\r\n\r\n\t\t\t\tif(val !== null && typeof val !== \"undefined\" && val !== \"\"){\r\n\t\t\t\t\toutput[val] = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"unable to find matching column to create select lookup list:\", field);\r\n\t\t}\r\n\r\n\t\treturn Object.keys(output);\r\n\t}\r\n\r\n\tfunction parseItems(inputValues, curentValues){\r\n\t\tvar dataList = [];\r\n\t\tvar displayList = [];\r\n\r\n\t\tfunction processComplexListItem(item){\r\n\t\t\tvar item = {\r\n\t\t\t\tlabel:item.label,\r\n\t\t\t\tvalue:item.value,\r\n\t\t\t\titemParams:item.itemParams,\r\n\t\t\t\telementAttributes: item.elementAttributes,\r\n\t\t\t\telement:false,\r\n\t\t\t};\r\n\r\n\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t// }\r\n\r\n\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\tsetItem(item);\r\n\t\t\t}\r\n\r\n\t\t\tdataList.push(item);\r\n\t\t\tdisplayList.push(item);\r\n\r\n\t\t\treturn item;\r\n\t\t}\r\n\r\n\t\tif(typeof inputValues == \"function\"){\r\n\t\t\tinputValues = inputValues(cell);\r\n\t\t}\r\n\r\n\t\tif(Array.isArray(inputValues)){\r\n\t\t\tinputValues.forEach(function(value){\r\n\t\t\t\tvar item;\r\n\r\n\t\t\t\tif(typeof value === \"object\"){\r\n\r\n\t\t\t\t\tif(value.options){\r\n\t\t\t\t\t\titem = {\r\n\t\t\t\t\t\t\tlabel:value.label,\r\n\t\t\t\t\t\t\tgroup:true,\r\n\t\t\t\t\t\t\titemParams:value.itemParams,\r\n\t\t\t\t\t\t\telementAttributes:value.elementAttributes,\r\n\t\t\t\t\t\t\telement:false,\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\tdisplayList.push(item);\r\n\r\n\t\t\t\t\t\tvalue.options.forEach(function(item){\r\n\t\t\t\t\t\t\tprocessComplexListItem(item);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tprocessComplexListItem(value);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\titem = {\r\n\t\t\t\t\t\tlabel:value,\r\n\t\t\t\t\t\tvalue:value,\r\n\t\t\t\t\t\telement:false,\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t\t\t// }\r\n\r\n\t\t\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\t\t\tsetItem(item);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdataList.push(item);\r\n\t\t\t\t\tdisplayList.push(item);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tfor(var key in inputValues){\r\n\t\t\t\tvar item = {\r\n\t\t\t\t\tlabel:inputValues[key],\r\n\t\t\t\t\tvalue:key,\r\n\t\t\t\t\telement:false,\r\n\t\t\t\t};\r\n\r\n\t\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t\t// }\r\n\r\n\t\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\t\tsetItem(item);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdataList.push(item);\r\n\t\t\t\tdisplayList.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(editorParams.sortValuesList){\r\n\t\t\tdataList.sort((a, b) => {\r\n\t\t\t\treturn a.label < b.label ? -1 : (a.label > b.label ? 1 : 0);\r\n\t\t\t});\r\n\r\n\t\t\tdisplayList.sort((a, b) => {\r\n\t\t\t\treturn a.label < b.label ? -1 : (a.label > b.label ? 1 : 0);\r\n\t\t\t});\r\n\r\n\t\t\tif(editorParams.sortValuesList !== \"asc\"){\r\n\t\t\t\tdataList.reverse();\r\n\t\t\t\tdisplayList.reverse();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataItems = dataList;\r\n\t\tdisplayItems = displayList;\r\n\r\n\t\tfillList();\r\n\t}\r\n\r\n\tfunction fillList(){\r\n\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\r\n\t\tdisplayItems.forEach(function(item){\r\n\r\n\t\t\tvar el = item.element;\r\n\r\n\t\t\tif(!el){\r\n\t\t\t\tel = document.createElement(\"div\");\r\n\t\t\t\titem.label = editorParams.listItemFormatter ? editorParams.listItemFormatter(item.value, item.label, cell, el, item.itemParams) : item.label;\r\n\t\t\t\tif(item.group){\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-select-list-group\");\r\n\t\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\t\tel.innerHTML = item.label === \"\" ? \" \" : item.label;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-select-list-item\");\r\n\t\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\t\tel.innerHTML = item.label === \"\" ? \" \" : item.label;\r\n\r\n\t\t\t\t\tel.addEventListener(\"click\", function(){\r\n\t\t\t\t\t\tblockListShow = true;\r\n\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tblockListShow = false;\r\n\t\t\t\t\t\t}, 10);\r\n\r\n\t\t\t\t\t\t// setCurrentItem(item);\r\n\t\t\t\t\t\t// chooseItem();\r\n\t\t\t\t\t\tif(multiselect){\r\n\t\t\t\t\t\t\ttoggleItem(item);\r\n\t\t\t\t\t\t\tinput.focus();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tchooseItem(item);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t// if(item === currentItem){\r\n\t\t\t\t\t// \tel.classList.add(\"active\");\r\n\t\t\t\t\t// }\r\n\r\n\t\t\t\t\tif(currentItems.indexOf(item) > -1){\r\n\t\t\t\t\t\tel.classList.add(\"active\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(item.elementAttributes && typeof item.elementAttributes == \"object\"){\r\n\t\t\t\t\tfor (let key in item.elementAttributes){\r\n\t\t\t\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\t\t\t\tkey = key.slice(1);\r\n\t\t\t\t\t\t\tel.setAttribute(key, input.getAttribute(key) + item.elementAttributes[\"+\" + key]);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tel.setAttribute(key, item.elementAttributes[key]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tel.addEventListener(\"mousedown\", function(){\r\n\t\t\t\t\tblurable = false;\r\n\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tblurable = true;\r\n\t\t\t\t\t}, 10);\r\n\t\t\t\t});\r\n\r\n\t\t\t\titem.element = el;\r\n\r\n\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(el);\r\n\t\t});\r\n\t}\r\n\r\n\r\n\tfunction setCurrentItem(item, active){\r\n\r\n\t\tif(!multiselect && currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"active\");\r\n\t\t}\r\n\r\n\t\tif(currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"focused\");\r\n\t\t}\r\n\r\n\t\tcurrentItem = item;\r\n\r\n\t\tif(item.element){\r\n\t\t\titem.element.classList.add(\"focused\");\r\n\t\t\tif(active){\r\n\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(item && item.element && item.element.scrollIntoView){\r\n\t\t\titem.element.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'start'});\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t// function chooseItem(){\r\n\t// \thideList();\r\n\r\n\t// \tif(initialValue !== currentItem.value){\r\n\t// \t\tinitialValue = currentItem.value;\r\n\t// \t\tsuccess(currentItem.value);\r\n\t// \t}else{\r\n\t// \t\tcancel();\r\n\t// \t}\r\n\t// }\r\n\r\n\tfunction setItem(item) {\r\n\t\tvar index = currentItems.indexOf(item);\r\n\r\n\t\tif(index == -1){\r\n\t\t\tcurrentItems.push(item);\r\n\t\t\tsetCurrentItem(item, true);\r\n\t\t}\r\n\r\n\t\tfillInput();\r\n\t}\r\n\r\n\tfunction unsetItem(index) {\r\n\t\tvar item = currentItems[index];\r\n\r\n\t\tif(index > -1){\r\n\t\t\tcurrentItems.splice(index, 1);\r\n\t\t\tif(item.element){\r\n\t\t\t\titem.element.classList.remove(\"active\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction toggleItem(item) {\r\n\t\tif(!item){\r\n\t\t\titem = currentItem;\r\n\t\t}\r\n\r\n\t\tvar index = currentItems.indexOf(item);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tunsetItem(index);\r\n\t\t}else{\r\n\t\t\tif(multiselect !== true && currentItems.length >= multiselect){\r\n\t\t\t\tunsetItem(0);\r\n\t\t\t}\r\n\r\n\t\t\tsetItem(item);\r\n\t\t}\r\n\r\n\t\tfillInput();\r\n\r\n\t}\r\n\r\n\tfunction chooseItem(item){\r\n\t\thideList();\r\n\r\n\t\tif(!item){\r\n\t\t\titem = currentItem;\r\n\t\t}\r\n\r\n\t\tif(item){\r\n\t\t\tinput.value = item.label;\r\n\t\t\tsuccess(item.value);\r\n\t\t}\r\n\r\n\t\tinitialDisplayValue = [item.value];\r\n\t}\r\n\r\n\r\n\tfunction chooseItems(silent){\r\n\t\tif(!silent){\r\n\t\t\thideList();\r\n\t\t}\r\n\r\n\t\tvar output = [];\r\n\r\n\t\tcurrentItems.forEach((item) => {\r\n\t\t\toutput.push(item.value);\r\n\t\t});\r\n\r\n\t\tinitialDisplayValue = output;\r\n\r\n\t\tsuccess(output);\r\n\t}\r\n\r\n\tfunction fillInput(){\r\n\t\tvar output = [];\r\n\r\n\t\tcurrentItems.forEach((item) => {\r\n\t\t\toutput.push(item.label);\r\n\t\t});\r\n\r\n\t\tinput.value = output.join(\", \");\r\n\r\n\t\tif(self.currentCell === false){\r\n\t\t\tchooseItems(true);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tfunction unsetItems() {\r\n\r\n\t\tvar len = currentItems.length;\r\n\r\n\t\tfor(let i = 0; i < len; i++){\r\n\t\t\tunsetItem(0);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction cancelItem(){\r\n\t\thideList();\r\n\t\tcancel();\r\n\t}\r\n\r\n\tfunction showList(){\r\n\t\tcurrentItems = [];\r\n\r\n\t\tif(!listEl.parentNode){\r\n\t\t\tif(editorParams.values === true){\r\n\t\t\t\tparseItems(getUniqueColumnValues(), initialDisplayValue);\r\n\t\t\t}else if(typeof editorParams.values === \"string\"){\r\n\t\t\t\tparseItems(getUniqueColumnValues(editorParams.values), initialDisplayValue);\r\n\t\t\t}else{\r\n\t\t\t\tparseItems(editorParams.values || [], initialDisplayValue);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tvar offset = Helpers.elOffset(cellEl);\r\n\r\n\t\t\tlistEl.style.minWidth = cellEl.offsetWidth + \"px\";\r\n\r\n\t\t\tlistEl.style.top = (offset.top + cellEl.offsetHeight) + \"px\";\r\n\t\t\tlistEl.style.left = offset.left + \"px\";\r\n\r\n\r\n\t\t\tlistEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tblurable = false;\r\n\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tblurable = true;\r\n\t\t\t\t}, 10);\r\n\t\t\t});\r\n\r\n\t\t\tdocument.body.appendChild(listEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction hideList(){\r\n\t\tif(listEl.parentNode){\r\n\t\t\tlistEl.parentNode.removeChild(listEl);\r\n\t\t}\r\n\r\n\t\tremoveScrollListener();\r\n\t}\r\n\r\n\tfunction removeScrollListener() {\r\n\t\tself.table.rowManager.element.removeEventListener(\"scroll\", cancelItem);\r\n\t}\r\n\r\n\tfunction scrollTovalue(char){\r\n\r\n\t\tclearTimeout(searchWordTimeout);\r\n\r\n\t\tvar character = String.fromCharCode(event.keyCode).toLowerCase();\r\n\t\tsearchWord += character.toLowerCase();\r\n\r\n\t\tvar match = dataItems.find((item) => {\r\n\t\t\treturn typeof item.label !== \"undefined\" && item.label.toLowerCase().startsWith(searchWord);\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tsetCurrentItem(match, !multiselect);\r\n\t\t}\r\n\r\n\t\tsearchWordTimeout = setTimeout(() => {\r\n\t\t\tsearchWord = \"\";\r\n\t\t}, 800)\r\n\t}\r\n\r\n\t//style input\r\n\tinput.setAttribute(\"type\", \"text\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\tinput.style.cursor = \"default\";\r\n\tinput.readOnly = (this.currentCell != false);\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = typeof initialValue !== \"undefined\" || initialValue === null ? initialValue : \"\";\r\n\r\n\t// if(editorParams.values === true){\r\n\t// \tparseItems(getUniqueColumnValues(), initialValue);\r\n\t// }else if(typeof editorParams.values === \"string\"){\r\n\t// \tparseItems(getUniqueColumnValues(editorParams.values), initialValue);\r\n\t// }else{\r\n\t// \tparseItems(editorParams.values || [], initialValue);\r\n\t// }\r\n\r\n\tinput.addEventListener(\"search\", function(e){\r\n\t\tif(!input.value){\r\n\t\t\tunsetItems();\r\n\t\t\tchooseItems();\r\n\t\t}\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tvar index;\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tindex = dataItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index > 0){\r\n\t\t\t\t\tsetCurrentItem(dataItems[index - 1], !multiselect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 40: //down arrow\r\n\t\t\tindex = dataItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index < dataItems.length - 1)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index < dataItems.length - 1){\r\n\t\t\t\t\tif(index == -1){\r\n\t\t\t\t\t\tsetCurrentItem(dataItems[0], !multiselect);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsetCurrentItem(dataItems[index + 1], !multiselect);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\t// chooseItem();\r\n\r\n\t\t\tif(multiselect){\r\n\t\t\t\ttoggleItem();\r\n\t\t\t}else{\r\n\t\t\t\tchooseItem();\r\n\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancelItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 9: //tab\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tif(self.currentCell === false){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tif(e.keyCode >= 38 && e.keyCode <= 90){\r\n\t\t\t\tscrollTovalue(e.keyCode);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tif(blurable){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tchooseItems();\r\n\t\t\t}else{\r\n\t\t\t\tcancelItem();\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"focus\", function(e){\r\n\t\tif(!blockListShow){\r\n\t\t\tshowList();\r\n\t\t}\r\n\t});\r\n\r\n\t//style list element\r\n\tlistEl = document.createElement(\"div\");\r\n\tlistEl.classList.add(\"tabulator-edit-select-list\");\r\n\r\n\tonRendered(function(){\r\n\t\tinput.style.height = \"100%\";\r\n\t\tinput.focus({preventScroll: true});\r\n\t});\r\n\r\n\tsetTimeout(() => {\r\n\t\tthis.table.rowManager.element.addEventListener(\"scroll\", cancelItem);\r\n\t}, 10);\r\n\r\n\treturn input;\r\n};","import Helpers from '../../../../core/tools/Helpers.js';\r\nimport maskInput from '../../inputMask.js';\r\n\r\n//autocomplete\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\tcellEl = cell.getElement(),\r\n\tinitialValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinitialDisplayValue = typeof initialValue !== \"undefined\" || initialValue === null ? initialValue : (typeof editorParams.defaultValue !== \"undefined\" ? editorParams.defaultValue : \"\"),\r\n\tinput = document.createElement(\"input\"),\r\n\tlistEl = document.createElement(\"div\"),\r\n\tallItems = [],\r\n\tdisplayItems = [],\r\n\tvalues = [],\r\n\tcurrentItem = false,\r\n\tblurable = true,\r\n\tuniqueColumnValues = false;\r\n\r\n\t//style input\r\n\tinput.setAttribute(\"type\", \"search\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//style list element\r\n\tlistEl.classList.add(\"tabulator-edit-select-list\");\r\n\r\n\tlistEl.addEventListener(\"mousedown\", function(e){\r\n\t\tblurable = false;\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tblurable = true;\r\n\t\t}, 10);\r\n\t});\r\n\r\n\r\n\tfunction genUniqueColumnValues(){\r\n\t\tif(editorParams.values === true){\r\n\t\t\tuniqueColumnValues = getUniqueColumnValues();\r\n\t\t}else if(typeof editorParams.values === \"string\"){\r\n\t\t\tuniqueColumnValues = getUniqueColumnValues(editorParams.values);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getUniqueColumnValues(field){\r\n\t\tvar output = {},\r\n\t\tdata = self.table.getData(),\r\n\t\tcolumn;\r\n\r\n\t\tif(field){\r\n\t\t\tcolumn = self.table.columnManager.getColumnByField(field);\r\n\t\t}else{\r\n\t\t\tcolumn = cell.getColumn()._getSelf();\r\n\t\t}\r\n\r\n\t\tif(column){\r\n\t\t\tdata.forEach(function(row){\r\n\t\t\t\tvar val = column.getFieldValue(row);\r\n\r\n\t\t\t\tif(val !== null && typeof val !== \"undefined\" && val !== \"\"){\r\n\t\t\t\t\toutput[val] = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(editorParams.sortValuesList){\r\n\t\t\t\tif(editorParams.sortValuesList == \"asc\"){\r\n\t\t\t\t\toutput = Object.keys(output).sort();\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput = Object.keys(output).sort().reverse();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\toutput = Object.keys(output);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"unable to find matching column to create autocomplete lookup list:\", field);\r\n\t\t}\r\n\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tfunction filterList(term, intialLoad){\r\n\t\tvar matches = [],\r\n\t\tvalues, items, searchEl;\r\n\r\n\t\t//lookup base values list\r\n\t\tif(uniqueColumnValues){\r\n\t\t\tvalues = uniqueColumnValues;\r\n\t\t}else{\r\n\t\t\tvalues = editorParams.values || [];\r\n\t\t}\r\n\r\n\t\tif(editorParams.searchFunc){\r\n\t\t\tmatches = editorParams.searchFunc(term, values);\r\n\r\n\t\t\tif(matches instanceof Promise){\r\n\r\n\t\t\t\taddNotice(typeof editorParams.searchingPlaceholder !== \"undefined\" ? editorParams.searchingPlaceholder : \"Searching...\");\r\n\r\n\t\t\t\tmatches.then((result) => {\r\n\t\t\t\t\tfillListIfNotEmpty(parseItems(result), intialLoad);\r\n\t\t\t\t}).catch((err) => {\r\n\t\t\t\t\tconsole.err(\"error in autocomplete search promise:\", err);\r\n\t\t\t\t});\r\n\r\n\t\t\t}else{\r\n\t\t\t\tfillListIfNotEmpty(parseItems(matches), intialLoad);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\titems = parseItems(values);\r\n\r\n\t\t\tif(term === \"\"){\r\n\t\t\t\tif(editorParams.showListOnEmpty){\r\n\t\t\t\t\tmatches = items;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\titems.forEach(function(item){\r\n\t\t\t\t\tif(item.value !== null || typeof item.value !== \"undefined\"){\r\n\t\t\t\t\t\tif(String(item.value).toLowerCase().indexOf(String(term).toLowerCase()) > -1 || String(item.title).toLowerCase().indexOf(String(term).toLowerCase()) > -1){\r\n\t\t\t\t\t\t\tmatches.push(item);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tfillListIfNotEmpty(matches, intialLoad);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction addNotice(notice){\r\n\t\tvar searchEl = document.createElement(\"div\");\r\n\r\n\t\tclearList();\r\n\r\n\t\tif(notice !== false){\r\n\t\t\tsearchEl.classList.add(\"tabulator-edit-select-list-notice\");\r\n\t\t\tsearchEl.tabIndex = 0;\r\n\r\n\t\t\tif(notice instanceof Node){\r\n\t\t\t\tsearchEl.appendChild(notice);\r\n\t\t\t}else{\r\n\t\t\t\tsearchEl.innerHTML = notice;\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(searchEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction parseItems(inputValues){\r\n\t\tvar itemList = [];\r\n\r\n\t\tif(Array.isArray(inputValues)){\r\n\t\t\tinputValues.forEach(function(value){\r\n\r\n\t\t\t\tvar item = {};\r\n\r\n\t\t\t\tif(typeof value === \"object\"){\r\n\t\t\t\t\titem.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value.value, value.label) : value.label;\r\n\t\t\t\t\titem.value = value.value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\titem.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value;\r\n\t\t\t\t\titem.value = value;\r\n\t\t\t\t}\r\n\r\n\t\t\t\titemList.push(item);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tfor(var key in inputValues){\r\n\t\t\t\tvar item = {\r\n\t\t\t\t\ttitle:editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : inputValues[key],\r\n\t\t\t\t\tvalue:key,\r\n\t\t\t\t};\r\n\r\n\t\t\t\titemList.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn itemList;\r\n\t}\r\n\r\n\tfunction clearList(){\r\n\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\t}\r\n\r\n\tfunction fillListIfNotEmpty(items, intialLoad){\r\n\t\tif(items.length){\r\n\t\t\tfillList(items, intialLoad);\r\n\t\t}else{\r\n\t\t\tif(editorParams.emptyPlaceholder){\r\n\t\t\t\taddNotice(editorParams.emptyPlaceholder);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fillList(items, intialLoad){\r\n\t\tvar current = false;\r\n\r\n\t\tclearList();\r\n\r\n\t\tdisplayItems = items;\r\n\r\n\t\tdisplayItems.forEach(function(item){\r\n\t\t\tvar el = item.element;\r\n\r\n\t\t\tif(!el){\r\n\t\t\t\tel = document.createElement(\"div\");\r\n\t\t\t\tel.classList.add(\"tabulator-edit-select-list-item\");\r\n\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\tel.innerHTML = item.title;\r\n\r\n\t\t\t\tel.addEventListener(\"click\", function(e){\r\n\t\t\t\t\tsetCurrentItem(item);\r\n\t\t\t\t\tchooseItem();\r\n\t\t\t\t});\r\n\r\n\t\t\t\tel.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\t\tblurable = false;\r\n\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tblurable = true;\r\n\t\t\t\t\t}, 10);\r\n\t\t\t\t});\r\n\r\n\t\t\t\titem.element = el;\r\n\r\n\t\t\t\tif(intialLoad && item.value == initialValue){\r\n\t\t\t\t\tinput.value = item.title;\r\n\t\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t\t\tcurrent = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(item === currentItem){\r\n\t\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t\t\tcurrent = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(el);\r\n\t\t});\r\n\r\n\t\tif(!current){\r\n\t\t\tsetCurrentItem(false);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction chooseItem(){\r\n\t\thideList();\r\n\r\n\t\tif(currentItem){\r\n\t\t\tif(initialValue !== currentItem.value){\r\n\t\t\t\tinitialValue = currentItem.value;\r\n\t\t\t\tinput.value = currentItem.title;\r\n\t\t\t\tsuccess(currentItem.value);\r\n\t\t\t}else{\r\n\t\t\t\tcancel();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(editorParams.freetext){\r\n\t\t\t\tinitialValue = input.value;\r\n\t\t\t\tsuccess(input.value);\r\n\t\t\t}else{\r\n\t\t\t\tif(editorParams.allowEmpty && input.value === \"\"){\r\n\t\t\t\t\tinitialValue = input.value;\r\n\t\t\t\t\tsuccess(input.value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcancel();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction showList(){\r\n\t\tif(!listEl.parentNode){\r\n\t\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\r\n\t\t\tvar offset = Helpers.elOffset(cellEl);\r\n\r\n\t\t\tlistEl.style.minWidth = cellEl.offsetWidth + \"px\";\r\n\r\n\t\t\tlistEl.style.top = (offset.top + cellEl.offsetHeight) + \"px\";\r\n\t\t\tlistEl.style.left = offset.left + \"px\";\r\n\t\t\tdocument.body.appendChild(listEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setCurrentItem(item, showInputValue){\r\n\t\tif(currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"active\");\r\n\t\t}\r\n\r\n\t\tcurrentItem = item;\r\n\r\n\t\tif(item && item.element){\r\n\t\t\titem.element.classList.add(\"active\");\r\n\t\t}\r\n\r\n\t\tif(item && item.element && item.element.scrollIntoView){\r\n\t\t\titem.element.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'start'});\r\n\t\t}\r\n\t}\r\n\r\n\tfunction hideList(){\r\n\t\tif(listEl.parentNode){\r\n\t\t\tlistEl.parentNode.removeChild(listEl);\r\n\t\t}\r\n\r\n\t\tremoveScrollListener();\r\n\t}\r\n\r\n\r\n\tfunction cancelItem(){\r\n\t\thideList();\r\n\t\tcancel();\r\n\t}\r\n\r\n\tfunction removeScrollListener() {\r\n\t\tself.table.rowManager.element.removeEventListener(\"scroll\", cancelItem);\r\n\t}\r\n\r\n\t//allow key based navigation\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tvar index;\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tindex = displayItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index > 0){\r\n\t\t\t\t\tsetCurrentItem(displayItems[index - 1]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tsetCurrentItem(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 40: //down arrow\r\n\r\n\t\t\tindex = displayItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index < displayItems.length - 1)){\r\n\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index < displayItems.length - 1){\r\n\t\t\t\t\tif(index == -1){\r\n\t\t\t\t\t\tsetCurrentItem(displayItems[0]);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsetCurrentItem(displayItems[index + 1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\t// e.preventDefault();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\tchooseItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancelItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 36: //home\r\n\t\t\tcase 35: //end\r\n\t\t\t//prevent table navigation while using input element\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"keyup\", function(e){\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //up arrow\r\n\t\t\tcase 40: //right arrow\r\n\t\t\tcase 13: //enter\r\n\t\t\tcase 27: //escape\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tfilterList(input.value);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\tinput.addEventListener(\"search\", function(e){\r\n\t\tfilterList(input.value);\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tif(blurable){\r\n\t\t\tchooseItem();\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"focus\", function(e){\r\n\t\tvar value = initialDisplayValue;\r\n\t\tgenUniqueColumnValues();\r\n\t\tshowList();\r\n\t\tinput.value = value;\r\n\t\tfilterList(value, true);\r\n\t});\r\n\r\n\r\n\tonRendered(function(){\r\n\t\tinput.style.height = \"100%\";\r\n\t\tinput.focus({preventScroll: true});\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\tsetTimeout(() => {\r\n\t\tthis.table.rowManager.element.addEventListener(\"scroll\", cancelItem);\r\n\t}, 10);\r\n\r\n\tgenUniqueColumnValues();\r\n\tinput.value = initialDisplayValue;\r\n\tfilterList(initialDisplayValue, true);\r\n\r\n\treturn input;\r\n};","//star rating\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\telement = cell.getElement(),\r\n\tvalue = cell.getValue(),\r\n\tmaxStars = element.getElementsByTagName(\"svg\").length || 5,\r\n\tsize = element.getElementsByTagName(\"svg\")[0] ? element.getElementsByTagName(\"svg\")[0].getAttribute(\"width\") : 14,\r\n\tstars = [],\r\n\tstarsHolder = document.createElement(\"div\"),\r\n\tstar = document.createElementNS('http://www.w3.org/2000/svg', \"svg\");\r\n\r\n\r\n\t//change star type\r\n\tfunction starChange(val){\r\n\t\tstars.forEach(function(star, i){\r\n\t\t\tif(i < val){\r\n\t\t\t\tif(self.table.browser == \"ie\"){\r\n\t\t\t\t\tstar.setAttribute(\"class\", \"tabulator-star-active\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tstar.classList.replace(\"tabulator-star-inactive\", \"tabulator-star-active\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstar.innerHTML = '';\r\n\t\t\t}else{\r\n\t\t\t\tif(self.table.browser == \"ie\"){\r\n\t\t\t\t\tstar.setAttribute(\"class\", \"tabulator-star-inactive\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tstar.classList.replace(\"tabulator-star-active\", \"tabulator-star-inactive\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstar.innerHTML = '';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//build stars\r\n\tfunction buildStar(i){\r\n\r\n\t\tvar starHolder = document.createElement(\"span\");\r\n\t\tvar nextStar = star.cloneNode(true);\r\n\r\n\t\tstars.push(nextStar);\r\n\r\n\t\tstarHolder.addEventListener(\"mouseenter\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tstarChange(i);\r\n\t\t});\r\n\r\n\t\tstarHolder.addEventListener(\"mousemove\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t});\r\n\r\n\t\tstarHolder.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tsuccess(i);\r\n\t\t\telement.blur();\r\n\t\t});\r\n\r\n\t\tstarHolder.appendChild(nextStar);\r\n\t\tstarsHolder.appendChild(starHolder);\r\n\r\n\t}\r\n\r\n\t//handle keyboard navigation value change\r\n\tfunction changeValue(val){\r\n\t\tvalue = val;\r\n\t\tstarChange(val);\r\n\t}\r\n\r\n\t//style cell\r\n\telement.style.whiteSpace = \"nowrap\";\r\n\telement.style.overflow = \"hidden\";\r\n\telement.style.textOverflow = \"ellipsis\";\r\n\r\n\t//style holding element\r\n\tstarsHolder.style.verticalAlign = \"middle\";\r\n\tstarsHolder.style.display = \"inline-block\";\r\n\tstarsHolder.style.padding = \"4px\";\r\n\r\n\t//style star\r\n\tstar.setAttribute(\"width\", size);\r\n\tstar.setAttribute(\"height\", size);\r\n\tstar.setAttribute(\"viewBox\", \"0 0 512 512\");\r\n\tstar.setAttribute(\"xml:space\", \"preserve\");\r\n\tstar.style.padding = \"0 1px\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tstarsHolder.setAttribute(key, starsHolder.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tstarsHolder.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//create correct number of stars\r\n\tfor(var i=1;i<= maxStars;i++){\r\n\t\tbuildStar(i);\r\n\t}\r\n\r\n\t//ensure value does not exceed number of stars\r\n\tvalue = Math.min(parseInt(value), maxStars);\r\n\r\n\t// set initial styling of stars\r\n\tstarChange(value);\r\n\r\n\tstarsHolder.addEventListener(\"mousemove\", function(e){\r\n\t\tstarChange(0);\r\n\t});\r\n\r\n\tstarsHolder.addEventListener(\"click\", function(e){\r\n\t\tsuccess(0);\r\n\t});\r\n\r\n\telement.addEventListener(\"blur\", function(e){\r\n\t\tcancel();\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\telement.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 39: //right arrow\r\n\t\t\tchangeValue(value + 1);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tchangeValue(value - 1);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\tsuccess(value);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\treturn starsHolder;\r\n};","//draggable progress bar\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar element = cell.getElement(),\r\n\tmax = typeof editorParams.max === \"undefined\" ? ((element.getElementsByTagName(\"div\")[0] && element.getElementsByTagName(\"div\")[0].getAttribute(\"max\")) || 100) : editorParams.max,\r\n\tmin = typeof editorParams.min === \"undefined\" ? ((element.getElementsByTagName(\"div\")[0] && element.getElementsByTagName(\"div\")[0].getAttribute(\"min\")) || 0) : editorParams.min,\r\n\tpercent = (max - min) / 100,\r\n\tvalue = cell.getValue() || 0,\r\n\thandle = document.createElement(\"div\"),\r\n\tbar = document.createElement(\"div\"),\r\n\tmouseDrag, mouseDragWidth;\r\n\r\n\t//set new value\r\n\tfunction updateValue(){\r\n\t\tvar style = window.getComputedStyle(element, null);\r\n\r\n\t\tvar calcVal = (percent * Math.round(bar.offsetWidth / ((element.clientWidth - parseInt(style.getPropertyValue(\"padding-left\")) - parseInt(style.getPropertyValue(\"padding-right\")))/100))) + min;\r\n\t\tsuccess(calcVal);\r\n\t\telement.setAttribute(\"aria-valuenow\", calcVal);\r\n\t\telement.setAttribute(\"aria-label\", value);\r\n\t}\r\n\r\n\t//style handle\r\n\thandle.style.position = \"absolute\";\r\n\thandle.style.right = \"0\";\r\n\thandle.style.top = \"0\";\r\n\thandle.style.bottom = \"0\";\r\n\thandle.style.width = \"5px\";\r\n\thandle.classList.add(\"tabulator-progress-handle\");\r\n\r\n\t//style bar\r\n\tbar.style.display = \"inline-block\";\r\n\tbar.style.position = \"relative\";\r\n\t// bar.style.top = \"8px\";\r\n\t// bar.style.bottom = \"8px\";\r\n\t// bar.style.left = \"4px\";\r\n\t// bar.style.marginRight = \"4px\";\r\n\tbar.style.height = \"100%\";\r\n\tbar.style.backgroundColor = \"#488CE9\";\r\n\tbar.style.maxWidth = \"100%\";\r\n\tbar.style.minWidth = \"0%\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tbar.setAttribute(key, bar.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tbar.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//style cell\r\n\telement.style.padding = \"4px 4px\";\r\n\r\n\t//make sure value is in range\r\n\tvalue = Math.min(parseFloat(value), max);\r\n\tvalue = Math.max(parseFloat(value), min);\r\n\r\n\t//workout percentage\r\n\tvalue = Math.round((value - min) / percent);\r\n\t// bar.style.right = value + \"%\";\r\n\tbar.style.width = value + \"%\";\r\n\r\n\telement.setAttribute(\"aria-valuemin\", min);\r\n\telement.setAttribute(\"aria-valuemax\", max);\r\n\r\n\tbar.appendChild(handle);\r\n\r\n\thandle.addEventListener(\"mousedown\", function(e){\r\n\t\tmouseDrag = e.screenX;\r\n\t\tmouseDragWidth = bar.offsetWidth;\r\n\t});\r\n\r\n\thandle.addEventListener(\"mouseover\", function(){\r\n\t\thandle.style.cursor = \"ew-resize\";\r\n\t});\r\n\r\n\telement.addEventListener(\"mousemove\", function(e){\r\n\t\tif(mouseDrag){\r\n\t\t\tbar.style.width = (mouseDragWidth + e.screenX - mouseDrag) + \"px\";\r\n\t\t}\r\n\t});\r\n\r\n\telement.addEventListener(\"mouseup\", function(e){\r\n\t\tif(mouseDrag){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\r\n\t\t\tmouseDrag = false;\r\n\t\t\tmouseDragWidth = false;\r\n\r\n\t\t\tupdateValue();\r\n\t\t}\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\telement.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.preventDefault();\r\n\t\t\tbar.style.width = (bar.clientWidth + element.clientWidth/100) + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\te.preventDefault();\r\n\t\t\tbar.style.width = (bar.clientWidth - element.clientWidth/100) + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 9: //tab\r\n\t\t\tcase 13: //enter\r\n\t\t\tupdateValue();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t}\r\n\t});\r\n\r\n\telement.addEventListener(\"blur\", function(){\r\n\t\tcancel();\r\n\t});\r\n\r\n\treturn bar;\r\n};","//checkbox\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar value = cell.getValue(),\r\n\tinput = document.createElement(\"input\"),\r\n\ttristate = editorParams.tristate,\r\n\tindetermValue = typeof editorParams.indeterminateValue === \"undefined\" ? null : editorParams.indeterminateValue,\r\n\tindetermState = false;\r\n\r\n\tinput.setAttribute(\"type\", \"checkbox\");\r\n\tinput.style.marginTop = \"5px\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = value;\r\n\r\n\tif(tristate && (typeof value === \"undefined\" || value === indetermValue || value === \"\")){\r\n\t\tindetermState = true;\r\n\t\tinput.indeterminate = true;\r\n\t}\r\n\r\n\tif(this.table.browser != \"firefox\"){ //prevent blur issue on mac firefox\r\n\t\tonRendered(function(){\r\n\t\t\tinput.focus({preventScroll: true});\r\n\t\t});\r\n\t}\r\n\r\n\tinput.checked = value === true || value === \"true\" || value === \"True\" || value === 1;\r\n\r\n\tonRendered(function(){\r\n\t\tinput.focus();\r\n\t});\r\n\r\n\tfunction setValue(blur){\r\n\t\tif(tristate){\r\n\t\t\tif(!blur){\r\n\t\t\t\tif(input.checked && !indetermState){\r\n\t\t\t\t\tinput.checked = false;\r\n\t\t\t\t\tinput.indeterminate = true;\r\n\t\t\t\t\tindetermState = true;\r\n\t\t\t\t\treturn indetermValue;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tindetermState = false;\r\n\t\t\t\t\treturn input.checked;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(indetermState){\r\n\t\t\t\t\treturn indetermValue;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn input.checked;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn input.checked;\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur\r\n\tinput.addEventListener(\"change\", function(e){\r\n\t\tsuccess(setValue());\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tsuccess(setValue(true));\r\n\t});\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tif(e.keyCode == 13){\r\n\t\t\tsuccess(setValue());\r\n\t\t}\r\n\t\tif(e.keyCode == 27){\r\n\t\t\tcancel();\r\n\t\t}\r\n\t});\r\n\r\n\treturn input;\r\n};","import input from './editors/input.js';\r\nimport textarea from './editors/textarea.js';\r\nimport number from './editors/number.js';\r\nimport range from './editors/range.js';\r\nimport select from './editors/select.js';\r\nimport autocomplete from './editors/autocomplete.js';\r\nimport star from './editors/star.js';\r\nimport progress from './editors/progress.js';\r\nimport tickCross from './editors/tickCross.js';\r\n\r\nexport default {\r\n\tinput:input,\r\n\ttextarea:textarea,\r\n number:number,\r\n range:range,\r\n\tselect:select,\r\n\tautocomplete:autocomplete,\r\n\tstar:star,\r\n\tprogress:progress,\r\n\ttickCross:tickCross,\r\n};","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defaultEditors from './defaults/editors.js';\r\n\r\nclass Edit extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.currentCell = false; //hold currently editing cell\r\n\t\tthis.mouseClick = false; //hold mousedown state to prevent click binding being overriden by editor opening\r\n\t\tthis.recursionBlock = false; //prevent focus recursion\r\n\t\tthis.invalidEdit = false;\r\n\t\tthis.editedCells = [];\r\n\r\n\t\tthis.editors = Edit.editors;\r\n\r\n\t\tthis.registerColumnOption(\"editable\");\r\n\t\tthis.registerColumnOption(\"editor\");\r\n\t\tthis.registerColumnOption(\"editorParams\");\r\n\r\n\t\tthis.registerColumnOption(\"cellEditing\");\r\n\t\tthis.registerColumnOption(\"cellEdited\");\r\n\t\tthis.registerColumnOption(\"cellEditCancelled\");\r\n\r\n\t\tthis.registerTableFunction(\"getEditedCells\", this.getEditedCells.bind(this));\r\n\t\tthis.registerTableFunction(\"clearCellEdited\", this.clearCellEdited.bind(this));\r\n\t\tthis.registerTableFunction(\"navigatePrev\", this.navigatePrev.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateNext\", this.navigateNext.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateLeft\", this.navigateLeft.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateRight\", this.navigateRight.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateUp\", this.navigateUp.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateDown\", this.navigateDown.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"isEdited\", this.cellisEdited.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"clearEdited\", this.clearEdited.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"edit\", this.editCell.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"cancelEdit\", this.cellCancelEdit.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigatePrev\", this.navigatePrev.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateNext\", this.navigateNext.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateLeft\", this.navigateLeft.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateRight\", this.navigateRight.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateUp\", this.navigateUp.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateDown\", this.navigateDown.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-init\", this.bindEditor.bind(this));\r\n\t\tthis.subscribe(\"cell-delete\", this.clearEdited.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumnCheck.bind(this));\r\n\t\tthis.subscribe(\"column-delete\", this.columnDeleteCheck.bind(this));\r\n\t\tthis.subscribe(\"row-deleting\", this.rowDeleteCheck.bind(this));\r\n\t\tthis.subscribe(\"data-refreshing\", this.cancelEdit.bind(this));\r\n\r\n\t\tthis.subscribe(\"keybinding-nav-prev\", this.navigatePrev.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-next\", this.keybindingNavigateNext.bind(this));\r\n\t\tthis.subscribe(\"keybinding-nav-left\", this.navigateLeft.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-right\", this.navigateRight.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-up\", this.navigateUp.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-down\", this.navigateDown.bind(this, undefined));\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t////// Keybinding Functions ///////\r\n\t///////////////////////////////////\r\n\r\n\tkeybindingNavigateNext(e){\r\n\t\tvar cell = this.currentCell,\r\n\t\tnewRow = this.options(\"tabEndNewRow\");\r\n\r\n\t\tif(cell){\r\n\t\t\tif(!this.navigateNext(cell, e)){\r\n\t\t\t\tif(newRow){\r\n\t\t\t\t\tcell.getElement().firstChild.blur();\r\n\r\n\t\t\t\t\tif(newRow === true){\r\n\t\t\t\t\t\tnewRow = this.table.addRow({})\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(typeof newRow == \"function\"){\r\n\t\t\t\t\t\t\tnewRow = this.table.addRow(newRow(cell.row.getComponent()))\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnewRow = this.table.addRow(Object.assign({}, newRow));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tnewRow.then(() => {\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tcell.getComponent().navigateNext();\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Cell Functions //////////\r\n\t///////////////////////////////////\r\n\r\n\tcellisEdited(cell){\r\n\t\treturn !! cell.modules.edit && cell.modules.edit.edited;\r\n\t}\r\n\r\n\tcellCancelEdit(cell){\r\n\t\tif(cell === this.currentCell){\r\n\t\t\tthis.table.modules.edit.cancelEdit();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cancel Editor Error - This cell is not currently being edited \");\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\tclearCellEdited(cells){\r\n\t\tif(!cells){\r\n\t\t\tcells = this.table.modules.edit.getEditedCells();\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\r\n\t\tcells.forEach((cell) => {\r\n\t\t\tthis.table.modules.edit.clearEdited(cell._getSelf());\r\n\t\t});\r\n\t}\r\n\r\n\tnavigatePrev(cell = this.currentCell, e){\r\n\t\tvar nextCell, prevRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tnextCell = this.navigateLeft();\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tprevRow = this.table.rowManager.prevDisplayRow(cell.row, true);\r\n\r\n\t\t\t\tif(prevRow){\r\n\t\t\t\t\tnextCell = this.findNextEditableCell(prevRow, prevRow.cells.length);\r\n\r\n\t\t\t\t\tif(nextCell){\r\n\t\t\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateNext(cell = this.currentCell, e){\r\n\t\tvar nextCell, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tnextCell = this.navigateRight();\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\r\n\r\n\t\t\t\tif(nextRow){\r\n\t\t\t\t\tnextCell = this.findNextEditableCell(nextRow, -1);\r\n\r\n\t\t\t\t\tif(nextCell){\r\n\t\t\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateLeft(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findPrevEditableCell(cell.row, index);\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateRight(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findNextEditableCell(cell.row, index);\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateUp(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.prevDisplayRow(cell.row, true);\r\n\r\n\t\t\tif(nextRow){\r\n\t\t\t\tnextRow.cells[index].getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateDown(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\r\n\r\n\t\t\tif(nextRow){\r\n\t\t\t\tnextRow.cells[index].getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfindNextEditableCell(row, index){\r\n\t\tvar nextCell = false;\r\n\r\n\t\tif(index < row.cells.length-1){\r\n\t\t\tfor(var i = index+1; i < row.cells.length; i++){\r\n\t\t\t\tlet cell = row.cells[i];\r\n\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tlet allowEdit = true;\r\n\r\n\t\t\t\t\tif(typeof cell.column.modules.edit.check == \"function\"){\r\n\t\t\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(allowEdit){\r\n\t\t\t\t\t\tnextCell = cell;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn nextCell;\r\n\t}\r\n\r\n\tfindPrevEditableCell(row, index){\r\n\t\tvar prevCell = false;\r\n\r\n\t\tif(index > 0){\r\n\t\t\tfor(var i = index-1; i >= 0; i--){\r\n\t\t\t\tlet cell = row.cells[i],\r\n\t\t\t\tallowEdit = true;\r\n\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tif(typeof cell.column.modules.edit.check == \"function\"){\r\n\t\t\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(allowEdit){\r\n\t\t\t\t\t\tprevCell = cell;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn prevCell;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(typeof column.definition.editor !== \"undefined\"){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\tcolumnDeleteCheck(column){\r\n\t\tif(this.currentCell && this.currentCell.column === column){\r\n\t\t\tthis.cancelEdit();\r\n\t\t}\r\n\t}\r\n\r\n\trowDeleteCheck(row){\r\n\t\tif(this.currentCell && this.currentCell.row === row){\r\n\t\t\tthis.cancelEdit();\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column editor\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = {\r\n\t\t\teditor:false,\r\n\t\t\tblocked:false,\r\n\t\t\tcheck:column.definition.editable,\r\n\t\t\tparams:column.definition.editorParams || {}\r\n\t\t};\r\n\r\n\t\t//set column editor\r\n\t\tswitch(typeof column.definition.editor){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(this.editors[column.definition.editor]){\r\n\t\t\t\tconfig.editor = this.editors[column.definition.editor];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Editor Error - No such editor found: \", column.definition.editor);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tconfig.editor = column.definition.editor;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"boolean\":\r\n\t\t\tif(column.definition.editor === true){\r\n\t\t\t\tif(typeof column.definition.formatter !== \"function\"){\r\n\t\t\t\t\tif(this.editors[column.definition.formatter]){\r\n\t\t\t\t\t\tconfig.editor = this.editors[column.definition.formatter];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconfig.editor = this.editors[\"input\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Editor Error - Cannot auto lookup editor for a custom formatter: \", column.definition.formatter);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(config.editor){\r\n\t\t\tcolumn.modules.edit = config;\r\n\t\t}\r\n\t}\r\n\r\n\tgetCurrentCell(){\r\n\t\treturn this.currentCell ? this.currentCell.getComponent() : false;\r\n\t}\r\n\r\n\tclearEditor(cancel){\r\n\t\tvar cell = this.currentCell,\r\n\t\tcellEl;\r\n\r\n\t\tthis.invalidEdit = false;\r\n\r\n\t\tif(cell){\r\n\t\t\tthis.currentCell = false;\r\n\r\n\t\t\tcellEl = cell.getElement();\r\n\r\n\t\t\tif(cancel){\r\n\t\t\t\tif(cell.column.modules.validate && this.table.modExists(\"validate\")){\r\n\t\t\t\t\tthis.table.modules.validate.cellValidate(cell);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcellEl.classList.remove(\"tabulator-validation-fail\");\r\n\t\t\t}\r\n\r\n\t\t\tcellEl.classList.remove(\"tabulator-editing\");\r\n\r\n\t\t\twhile(cellEl.firstChild) cellEl.removeChild(cellEl.firstChild);\r\n\r\n\t\t\tcell.row.getElement().classList.remove(\"tabulator-row-editing\");\r\n\t\t}\r\n\t}\r\n\r\n\tcancelEdit(){\r\n\t\tif(this.currentCell){\r\n\t\t\tvar cell = this.currentCell;\r\n\t\t\tvar component = this.currentCell.getComponent();\r\n\r\n\t\t\tthis.clearEditor(true);\r\n\t\t\tcell.setValueActual(cell.getValue());\r\n\t\t\tcell.cellRendered();\r\n\r\n\t\t\tif(cell.column.definition.editor == \"textarea\" || cell.column.definition.variableHeight){\r\n\t\t\t\tcell.row.normalizeHeight(true);\r\n\t\t\t}\r\n\r\n\t\t\tif(cell.column.definition.cellEditCancelled){\r\n\t\t\t\tcell.column.definition.cellEditCancelled.call(this.table, component);\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"edit-cancelled\", cell);\r\n\t\t\tthis.dispatchExternal(\"cellEditCancelled\", component);\r\n\t\t}\r\n\t}\r\n\r\n\t//return a formatted value for a cell\r\n\tbindEditor(cell){\r\n\t\tif(cell.column.modules.edit){\r\n\t\t\tvar self = this,\r\n\t\t\telement = cell.getElement(true);\r\n\r\n\t\t\telement.setAttribute(\"tabindex\", 0);\r\n\r\n\t\t\telement.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(!element.classList.contains(\"tabulator-editing\")){\r\n\t\t\t\t\telement.focus({preventScroll: true});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\telement.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif (e.button === 2) {\r\n\t\t\t\t\te.preventDefault();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.mouseClick = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\telement.addEventListener(\"focus\", function(e){\r\n\t\t\t\tif(!self.recursionBlock){\r\n\t\t\t\t\tself.edit(cell, e, false);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tfocusCellNoEvent(cell, block){\r\n\t\tthis.recursionBlock = true;\r\n\r\n\t\tif(!(block && this.table.browser === \"ie\")){\r\n\t\t\tcell.getElement().focus({preventScroll: true});\r\n\t\t}\r\n\r\n\t\tthis.recursionBlock = false;\r\n\t}\r\n\r\n\teditCell(cell, forceEdit){\r\n\t\tthis.focusCellNoEvent(cell);\r\n\t\tthis.edit(cell, false, forceEdit);\r\n\t}\r\n\r\n\tfocusScrollAdjust(cell){\r\n\t\tif(this.table.rowManager.getRenderMode() == \"virtual\"){\r\n\t\t\tvar topEdge = this.table.rowManager.element.scrollTop,\r\n\t\t\tbottomEdge = this.table.rowManager.element.clientHeight + this.table.rowManager.element.scrollTop,\r\n\t\t\trowEl = cell.row.getElement(),\r\n\t\t\toffset = rowEl.offsetTop;\r\n\r\n\t\t\tif(rowEl.offsetTop < topEdge){\r\n\t\t\t\tthis.table.rowManager.element.scrollTop -= (topEdge - rowEl.offsetTop);\r\n\t\t\t}else{\r\n\t\t\t\tif(rowEl.offsetTop + rowEl.offsetHeight > bottomEdge){\r\n\t\t\t\t\tthis.table.rowManager.element.scrollTop += (rowEl.offsetTop + rowEl.offsetHeight - bottomEdge);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar leftEdge = this.table.rowManager.element.scrollLeft,\r\n\t\t\trightEdge = this.table.rowManager.element.clientWidth + this.table.rowManager.element.scrollLeft,\r\n\t\t\tcellEl = cell.getElement(),\r\n\t\t\toffset = cellEl.offsetLeft;\r\n\r\n\t\t\tif(this.table.modExists(\"frozenColumns\")){\r\n\t\t\t\tleftEdge += parseInt(this.table.modules.frozenColumns.leftMargin);\r\n\t\t\t\trightEdge -= parseInt(this.table.modules.frozenColumns.rightMargin);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.renderHorizontal === \"virtual\"){\r\n\t\t\t\tleftEdge -= parseInt(this.table.columnManager.renderer.vDomPadLeft);\r\n\t\t\t\trightEdge -= parseInt(this.table.columnManager.renderer.vDomPadLeft);\r\n\t\t\t}\r\n\r\n\t\t\tif(cellEl.offsetLeft < leftEdge){\r\n\r\n\t\t\t\tthis.table.rowManager.element.scrollLeft -= (leftEdge - cellEl.offsetLeft);\r\n\t\t\t}else{\r\n\t\t\t\tif(cellEl.offsetLeft + cellEl.offsetWidth > rightEdge){\r\n\t\t\t\t\tthis.table.rowManager.element.scrollLeft += (cellEl.offsetLeft + cellEl.offsetWidth - rightEdge);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tedit(cell, e, forceEdit){\r\n\t\tvar self = this,\r\n\t\tallowEdit = true,\r\n\t\trendered = function(){},\r\n\t\telement = cell.getElement(),\r\n\t\tcellEditor, component, params;\r\n\r\n\t\t//prevent editing if another cell is refusing to leave focus (eg. validation fail)\r\n\t\tif(this.currentCell){\r\n\t\t\tif(!this.invalidEdit){\r\n\t\t\t\tthis.cancelEdit();\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//handle successfull value change\r\n\t\tfunction success(value){\r\n\t\t\tif(self.currentCell === cell){\r\n\t\t\t\tvar valid = true;\r\n\r\n\t\t\t\tif(cell.column.modules.validate && self.table.modExists(\"validate\") && self.table.options.validationMode != \"manual\"){\r\n\t\t\t\t\tvalid = self.table.modules.validate.validate(cell.column.modules.validate, cell, value);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(valid === true || self.table.options.validationMode === \"highlight\"){\r\n\t\t\t\t\tself.clearEditor();\r\n\r\n\r\n\t\t\t\t\tif(!cell.modules.edit){\r\n\t\t\t\t\t\tcell.modules.edit = {};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcell.modules.edit.edited = true;\r\n\r\n\t\t\t\t\tif(self.editedCells.indexOf(cell) == -1){\r\n\t\t\t\t\t\tself.editedCells.push(cell);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcell.setValue(value, true);\r\n\r\n\t\t\t\t\tif(valid !== true){\r\n\t\t\t\t\t\telement.classList.add(\"tabulator-validation-fail\");\r\n\t\t\t\t\t\tself.table.externalEvents.dispatch(\"validationFailed\", cell.getComponent(), value, valid);\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.invalidEdit = true;\r\n\t\t\t\t\telement.classList.add(\"tabulator-validation-fail\");\r\n\t\t\t\t\tself.focusCellNoEvent(cell, true);\r\n\t\t\t\t\trendered();\r\n\t\t\t\t\tself.table.externalEvents.dispatch(\"validationFailed\", cell.getComponent(), value, valid);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t// console.warn(\"Edit Success Error - cannot call success on a cell that is no longer being edited\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//handle aborted edit\r\n\t\tfunction cancel(){\r\n\t\t\tif(self.currentCell === cell){\r\n\t\t\t\tself.cancelEdit();\r\n\t\t\t}else{\r\n\t\t\t\t// console.warn(\"Edit Success Error - cannot call cancel on a cell that is no longer being edited\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\trendered = callback;\r\n\t\t}\r\n\r\n\t\tif(!cell.column.modules.edit.blocked){\r\n\t\t\tif(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t}\r\n\r\n\t\t\tswitch(typeof cell.column.modules.edit.check){\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tallowEdit = cell.column.modules.edit.check;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(allowEdit || forceEdit){\r\n\r\n\t\t\t\tself.cancelEdit();\r\n\r\n\t\t\t\tself.currentCell = cell;\r\n\r\n\t\t\t\tthis.focusScrollAdjust(cell);\r\n\r\n\t\t\t\tcomponent = cell.getComponent();\r\n\r\n\t\t\t\tif(this.mouseClick){\r\n\t\t\t\t\tthis.mouseClick = false;\r\n\r\n\t\t\t\t\tif(cell.column.definition.cellClick){\r\n\t\t\t\t\t\tcell.column.definition.cellClick.call(this.table, e, component);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(cell.column.definition.cellEditing){\r\n\t\t\t\t\tcell.column.definition.cellEditing.call(this.table, component);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.dispatch(\"cell-editing\", cell);\r\n\t\t\t\tthis.dispatchExternal(\"cellEditing\", component);\r\n\r\n\t\t\t\tparams = typeof cell.column.modules.edit.params === \"function\" ? cell.column.modules.edit.params(component) : cell.column.modules.edit.params;\r\n\r\n\t\t\t\tcellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params);\r\n\r\n\t\t\t\t//if editor returned, add to DOM, if false, abort edit\r\n\t\t\t\tif(cellEditor !== false){\r\n\r\n\t\t\t\t\tif(cellEditor instanceof Node){\r\n\t\t\t\t\t\telement.classList.add(\"tabulator-editing\");\r\n\t\t\t\t\t\tcell.row.getElement().classList.add(\"tabulator-row-editing\");\r\n\t\t\t\t\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\t\t\t\t\t\telement.appendChild(cellEditor);\r\n\r\n\t\t\t\t\t\t//trigger onRendered Callback\r\n\t\t\t\t\t\trendered();\r\n\r\n\t\t\t\t\t\t//prevent editing from triggering rowClick event\r\n\t\t\t\t\t\tvar children = element.children;\r\n\r\n\t\t\t\t\t\tfor (var i = 0; i < children.length; i++) {\r\n\t\t\t\t\t\t\tchildren[i].addEventListener(\"click\", function(e){\r\n\t\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Edit Error - Editor should return an instance of Node, the editor returned:\", cellEditor);\r\n\t\t\t\t\t\telement.blur();\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.blur();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tthis.mouseClick = false;\r\n\t\t\t\telement.blur();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.mouseClick = false;\r\n\t\t\telement.blur();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tgetEditedCells(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.editedCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tclearEdited(cell){\r\n\t\tvar editIndex;\r\n\r\n\t\tif(cell.modules.edit && cell.modules.edit.edited){\r\n\t\t\tcell.modules.edit.edited = false;\r\n\r\n\t\t\tif(cell.modules.validate){\r\n\t\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\teditIndex = this.editedCells.indexOf(cell);\r\n\r\n\t\tif(editIndex > -1){\r\n\t\t\tthis.editedCells.splice(editIndex, 1);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nEdit.moduleName = \"edit\";\r\n\r\n//load defaults\r\nEdit.editors = defaultEditors;\r\n\r\n\r\nexport default Edit;\r\n","class ExportRow{\r\n\tconstructor(type, columns, component, indent){\r\n\t\tthis.type = type;\r\n\t\tthis.columns = columns;\r\n\t\tthis.component = component || false;\r\n\t\tthis.indent = indent || 0;\r\n\t}\r\n}\r\n\r\nexport default ExportRow;","class ExportColumn{\r\n\tconstructor(value, component, width, height, depth){\r\n\t\tthis.value = value;\r\n\t\tthis.component = component || false;\r\n\t\tthis.width = width;\r\n\t\tthis.height = height;\r\n\t\tthis.depth = depth;\r\n\t}\r\n}\r\n\r\nexport default ExportColumn;","import Module from '../../core/Module.js';\r\n\r\nimport ExportRow from './ExportRow.js';\r\nimport ExportColumn from './ExportColumn.js';\r\n\r\nclass Export extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.config = {};\r\n\t\tthis.cloneTableStyle = true;\r\n\t\tthis.colVisProp = \"\";\r\n\r\n\t\tthis.registerTableOption(\"htmlOutputConfig\", false); //html outypu config\r\n\r\n\t\tthis.registerColumnOption(\"htmlOutput\");\r\n\t\tthis.registerColumnOption(\"titleHtmlOutput\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"getHtml\", this.getHtml.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tgenerateExportList(config, style, range, colVisProp){\r\n\t\tthis.cloneTableStyle = style;\r\n\t\tthis.config = config || {};\r\n\t\tthis.colVisProp = colVisProp;\r\n\r\n\t\tvar headers = this.config.columnHeaders !== false ? this.headersToExportRows(this.generateColumnGroupHeaders()) : [];\r\n\t\tvar body = this.bodyToExportRows(this.rowLookup(range));\r\n\r\n\t\treturn headers.concat(body);\r\n\t}\r\n\r\n\tgenereateTable(config, style, range, colVisProp){\r\n\t\tvar list = this.generateExportList(config, style, range, colVisProp);\r\n\r\n\t\treturn this.genereateTableElement(list);\r\n\t}\r\n\r\n\trowLookup(range){\r\n\t\tvar rows = [];\r\n\r\n\t\tif(typeof range == \"function\"){\r\n\t\t\trange.call(this.table).forEach((row) =>{\r\n\t\t\t\trow = this.table.rowManager.findRow(row);\r\n\r\n\t\t\t\tif(row){\r\n\t\t\t\t\trows.push(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tswitch(range){\r\n\t\t\t\tcase true:\r\n\t\t\t\tcase \"visible\":\r\n\t\t\t\trows = this.table.rowManager.getVisibleRows(false, true);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"all\":\r\n\t\t\t\trows = this.table.rowManager.rows;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"selected\":\r\n\t\t\t\trows = this.table.modules.selectRow.selectedRows;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"active\":\r\n\t\t\t\tdefault:\r\n\t\t\t\tif(this.table.options.pagination){\r\n\t\t\t\t\trows = this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length - 2);\r\n\t\t\t\t}else{\r\n\t\t\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn Object.assign([], rows);\r\n\t}\r\n\r\n\tgenerateColumnGroupHeaders(){\r\n\t\tvar output = [];\r\n\r\n\t\tvar columns = this.config.columnGroups !== false ? this.table.columnManager.columns : this.table.columnManager.columnsByIndex;\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\tvar colData = this.processColumnGroup(column);\r\n\r\n\t\t\tif(colData){\r\n\t\t\t\toutput.push(colData);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tprocessColumnGroup(column){\r\n\t\tvar subGroups = column.columns,\r\n\t\tmaxDepth = 0,\r\n\t\ttitle = column.definition[\"title\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))] || column.definition.title;\r\n\r\n\t\tvar groupData = {\r\n\t\t\ttitle:title,\r\n\t\t\tcolumn:column,\r\n\t\t\tdepth:1,\r\n\t\t};\r\n\r\n\t\tif(subGroups.length){\r\n\t\t\tgroupData.subGroups = [];\r\n\t\t\tgroupData.width = 0;\r\n\r\n\t\t\tsubGroups.forEach((subGroup) => {\r\n\t\t\t\tvar subGroupData = this.processColumnGroup(subGroup);\r\n\r\n\t\t\t\tif(subGroupData){\r\n\t\t\t\t\tgroupData.width += subGroupData.width;\r\n\t\t\t\t\tgroupData.subGroups.push(subGroupData);\r\n\r\n\t\t\t\t\tif(subGroupData.depth > maxDepth){\r\n\t\t\t\t\t\tmaxDepth = subGroupData.depth;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tgroupData.depth += maxDepth;\r\n\r\n\t\t\tif(!groupData.width){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.columnVisCheck(column)){\r\n\t\t\t\tgroupData.width = 1;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn groupData;\r\n\t}\r\n\r\n\tcolumnVisCheck(column){\r\n\t\treturn column.definition[this.colVisProp] !== false && (column.visible || (!column.visible && column.definition[this.colVisProp]));\r\n\t}\r\n\r\n\theadersToExportRows(columns){\r\n\t\tvar headers = [],\r\n\t\theaderDepth = 0,\r\n\t\texportRows = [];\r\n\r\n\t\tfunction parseColumnGroup(column, level){\r\n\r\n\t\t\tvar depth = headerDepth - level;\r\n\r\n\t\t\tif(typeof headers[level] === \"undefined\"){\r\n\t\t\t\theaders[level] = [];\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.height = column.subGroups ? 1 : (depth - column.depth) + 1;\r\n\r\n\t\t\theaders[level].push(column);\r\n\r\n\t\t\tif(column.height > 1){\r\n\t\t\t\tfor(let i = 1; i < column.height; i ++){\r\n\r\n\t\t\t\t\tif(typeof headers[level + i] === \"undefined\"){\r\n\t\t\t\t\t\theaders[level + i] = [];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\theaders[level + i].push(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(column.width > 1){\r\n\t\t\t\tfor(let i = 1; i < column.width; i ++){\r\n\t\t\t\t\theaders[level].push(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(column.subGroups){\r\n\t\t\t\tcolumn.subGroups.forEach(function(subGroup){\r\n\t\t\t\t\tparseColumnGroup(subGroup, level+1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//calculate maximum header debth\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tif(column.depth > headerDepth){\r\n\t\t\t\theaderDepth = column.depth;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tparseColumnGroup(column,0);\r\n\t\t});\r\n\r\n\t\theaders.forEach((header) => {\r\n\t\t\tvar columns = [];\r\n\r\n\t\t\theader.forEach((col) => {\r\n\t\t\t\tif(col){\r\n\t\t\t\t\tlet title = typeof col.title === \"undefined\" ? \"\" : col.title;\r\n\t\t\t\t\tcolumns.push(new ExportColumn(title, col.column.getComponent(), col.width, col.height, col.depth));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolumns.push(null);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\texportRows.push(new ExportRow(\"header\", columns));\r\n\t\t});\r\n\r\n\t\treturn exportRows;\r\n\t}\r\n\r\n\tbodyToExportRows(rows){\r\n\r\n\t\tvar columns = [];\r\n\t\tvar exportRows = [];\r\n\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tif (this.columnVisCheck(column)) {\r\n\t\t\t\tcolumns.push(column.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(this.config.columnCalcs !== false && this.table.modExists(\"columnCalcs\")){\r\n\t\t\tif(this.table.modules.columnCalcs.topInitialized){\r\n\t\t\t\trows.unshift(this.table.modules.columnCalcs.topRow);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modules.columnCalcs.botInitialized){\r\n\t\t\t\trows.push(this.table.modules.columnCalcs.botRow);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\trows = rows.filter((row) => {\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\treturn this.config.rowGroups !== false;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\treturn this.config.columnCalcs !== false;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\treturn !(this.table.options.dataTree && this.config.dataTree === false && row.modules.dataTree.parent);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\trows.forEach((row, i) => {\r\n\t\t\tvar rowData = row.getData(this.colVisProp);\r\n\t\t\tvar exportCols = [];\r\n\t\t\tvar indent = 0;\r\n\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\tindent = row.level;\r\n\t\t\t\texportCols.push(new ExportColumn(row.key, row.getComponent(), columns.length, 1));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\" :\r\n\t\t\t\tcase \"row\" :\r\n\t\t\t\tcolumns.forEach((col) => {\r\n\t\t\t\t\texportCols.push(new ExportColumn(col._column.getFieldValue(rowData), col, 1, 1));\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\r\n\t\t\t\t\tindent = row.modules.dataTree.index;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\texportRows.push(new ExportRow(row.type, exportCols, row.getComponent(), indent));\r\n\t\t});\r\n\r\n\t\treturn exportRows;\r\n\t}\r\n\r\n\tgenereateTableElement(list){\r\n\t\tvar table = document.createElement(\"table\"),\r\n\t\theaderEl = document.createElement(\"thead\"),\r\n\t\tbodyEl = document.createElement(\"tbody\"),\r\n\t\tstyles = this.lookupTableStyles(),\r\n\t\trowFormatter = this.table.options[\"rowFormatter\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))],\r\n\t\tsetup = {};\r\n\r\n\t\tsetup.rowFormatter = rowFormatter !== null ? rowFormatter : this.table.options.rowFormatter;\r\n\r\n\t\tif(this.table.options.dataTree &&this.config.dataTree !== false && this.table.modExists(\"columnCalcs\")){\r\n\t\t\tsetup.treeElementField = this.table.modules.dataTree.elementField;\r\n\t\t}\r\n\r\n\t\t//assign group header formatter\r\n\t\tsetup.groupHeader = this.table.options[\"groupHeader\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))];\r\n\r\n\t\tif(setup.groupHeader && !Array.isArray(setup.groupHeader)){\r\n\t\t\tsetup.groupHeader = [setup.groupHeader];\r\n\t\t}\r\n\r\n\t\ttable.classList.add(\"tabulator-print-table\");\r\n\r\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\"]);\r\n\r\n\r\n\t\tif(list.length > 1000){\r\n\t\t\tconsole.warn(\"It may take a long time to render an HTML table with more than 1000 rows\");\r\n\t\t}\r\n\r\n\t\tlist.forEach((row, i) => {\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"header\":\r\n\t\t\t\theaderEl.appendChild(this.genereateHeaderElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\tbodyEl.appendChild(this.genereateGroupElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\tbodyEl.appendChild(this.genereateCalcElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\tlet rowEl = this.genereateRowElement(row, setup, styles);\r\n\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\"]);\r\n\t\t\t\tbodyEl.appendChild(rowEl);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(headerEl.innerHTML){\r\n\t\t\ttable.appendChild(headerEl);\r\n\t\t}\r\n\r\n\t\ttable.appendChild(bodyEl);\r\n\r\n\r\n\t\tthis.mapElementStyles(this.table.element, table, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\"]);\r\n\t\treturn table;\r\n\t}\r\n\r\n\tlookupTableStyles(){\r\n\t\tvar styles = {};\r\n\r\n\t\t//lookup row styles\r\n\t\tif(this.cloneTableStyle && window.getComputedStyle){\r\n\t\t\tstyles.oddRow = this.table.element.querySelector(\".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.evenRow = this.table.element.querySelector(\".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.calcRow = this.table.element.querySelector(\".tabulator-row.tabulator-calcs\");\r\n\t\t\tstyles.firstRow = this.table.element.querySelector(\".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.firstGroup = this.table.element.getElementsByClassName(\"tabulator-group\")[0];\r\n\r\n\t\t\tif(styles.firstRow){\r\n\t\t\t\tstyles.styleCells = styles.firstRow.getElementsByClassName(\"tabulator-cell\");\r\n\t\t\t\tstyles.firstCell = styles.styleCells[0];\r\n\t\t\t\tstyles.lastCell = styles.styleCells[styles.styleCells.length - 1];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn styles;\r\n\t}\r\n\r\n\tgenereateHeaderElement(row, setup, styles){\r\n\t\tvar rowEl = document.createElement(\"tr\");\r\n\r\n\t\trow.columns.forEach((column) => {\r\n\t\t\tif(column){\r\n\t\t\t\tvar cellEl = document.createElement(\"th\");\r\n\t\t\t\tvar classNames = column.component._column.definition.cssClass ? column.component._column.definition.cssClass.split(\" \") : [];\r\n\r\n\t\t\t\tcellEl.colSpan = column.width;\r\n\t\t\t\tcellEl.rowSpan = column.height;\r\n\r\n\t\t\t\tcellEl.innerHTML = column.value;\r\n\r\n\t\t\t\tif(this.cloneTableStyle){\r\n\t\t\t\t\tcellEl.style.boxSizing = \"border-box\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tclassNames.forEach(function(className) {\r\n\t\t\t\t\tcellEl.classList.add(className);\r\n\t\t\t\t});\r\n\r\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\"]);\r\n\t\t\t\tthis.mapElementStyles(column.component._column.contentElement, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\"]);\r\n\r\n\t\t\t\tif(column.component._column.visible){\r\n\t\t\t\t\tthis.mapElementStyles(column.component.getElement(), cellEl, [\"width\"]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(column.component._column.definition.width){\r\n\t\t\t\t\t\tcellEl.style.width = column.component._column.definition.width + \"px\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(column.component._column.parent){\r\n\t\t\t\t\tthis.mapElementStyles(column.component._column.parent.groupElement, cellEl, [\"border-top\"]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowEl.appendChild(cellEl);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateGroupElement(row, setup, styles){\r\n\r\n\t\tvar rowEl = document.createElement(\"tr\"),\r\n\t\tcellEl = document.createElement(\"td\"),\r\n\t\tgroup = row.columns[0];\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-row\");\r\n\r\n\t\tif(setup.groupHeader && setup.groupHeader[row.indent]){\r\n\t\t\tgroup.value = setup.groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t}else{\r\n\t\t\tif(setup.groupHeader === false){\r\n\t\t\t\tgroup.value = group.value;\r\n\t\t\t}else{\r\n\t\t\t\tgroup.value = row.component._group.generator(group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcellEl.colSpan = group.width;\r\n\t\tcellEl.innerHTML = group.value;\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-group\");\r\n\t\trowEl.classList.add(\"tabulator-group-level-\" + row.indent);\r\n\r\n\t\tif(group.component.isVisible()){\r\n\t\t\trowEl.classList.add(\"tabulator-group-visible\");\r\n\t\t}\r\n\r\n\t\tthis.mapElementStyles(styles.firstGroup, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\r\n\t\tthis.mapElementStyles(styles.firstGroup, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\"]);\r\n\r\n\t\trowEl.appendChild(cellEl);\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateCalcElement(row, setup, styles){\r\n\t\tvar rowEl = this.genereateRowElement(row, setup, styles);\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-calcs\");\r\n\t\tthis.mapElementStyles(styles.calcRow, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateRowElement(row, setup, styles){\r\n\t\tvar rowEl = document.createElement(\"tr\");\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-row\");\r\n\r\n\t\trow.columns.forEach((col) => {\r\n\t\t\tif(col){\r\n\t\t\t\tvar cellEl = document.createElement(\"td\"),\r\n\t\t\t\tcolumn = col.component._column,\r\n\t\t\t\tindex = this.table.columnManager.findColumnIndex(column),\r\n\t\t\t\tvalue = col.value;\r\n\r\n\t\t\t\tvar cellWrapper = {\r\n\t\t\t\t\tmodules:{},\r\n\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetField:function(){\r\n\t\t\t\t\t\treturn column.definition.field;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\treturn cellEl;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetData:function(){\r\n\t\t\t\t\t\treturn row.component.getData();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\treturn row.component;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetComponent:function(){\r\n\t\t\t\t\t\treturn cellWrapper;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcolumn:column,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tvar classNames = column.definition.cssClass ? column.definition.cssClass.split(\" \") : [];\r\n\r\n\t\t\t\tclassNames.forEach(function(className) {\r\n\t\t\t\t\tcellEl.classList.add(className);\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.modExists(\"format\") && this.config.formatCells !== false){\r\n\t\t\t\t\tvalue = this.table.modules.format.formatExportValue(cellWrapper, this.colVisProp);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tvalue = JSON.stringify(value);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tvalue = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(value instanceof Node){\r\n\t\t\t\t\tcellEl.appendChild(value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcellEl.innerHTML = value;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(styles.styleCells[index] || styles.firstCell){\r\n\t\t\t\t\tthis.mapElementStyles(styles.styleCells[index] || styles.firstCell, 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\"]);\r\n\r\n\t\t\t\t\tif(column.definition.align){\r\n\t\t\t\t\t\tcellEl.style.textAlign = column.definition.align;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\r\n\t\t\t\t\tif((setup.treeElementField && setup.treeElementField == column.field) || (!setup.treeElementField && i == 0)){\r\n\t\t\t\t\t\tif(row.component._row.modules.dataTree.controlEl){\r\n\t\t\t\t\t\t\tcellEl.insertBefore(row.component._row.modules.dataTree.controlEl.cloneNode(true), cellEl.firstChild);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(row.component._row.modules.dataTree.branchEl){\r\n\t\t\t\t\t\t\tcellEl.insertBefore(row.component._row.modules.dataTree.branchEl.cloneNode(true), cellEl.firstChild);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowEl.appendChild(cellEl);\r\n\r\n\t\t\t\tif(cellWrapper.modules.format && cellWrapper.modules.format.renderedCallback){\r\n\t\t\t\t\tcellWrapper.modules.format.renderedCallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(setup.rowFormatter && this.config.formatCells !== false){\r\n\t\t\t\t\tsetup.rowFormatter(row.component);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateHTMLTable(list){\r\n\t\tvar holder = document.createElement(\"div\");\r\n\r\n\t\tholder.appendChild(this.genereateTableElement(list));\r\n\r\n\t\treturn holder.innerHTML;\r\n\t}\r\n\r\n\tgetHtml(visible, style, config, colVisProp){\r\n\t\tvar list = this.generateExportList(config || this.table.options.htmlOutputConfig, style, visible, colVisProp || \"htmlOutput\");\r\n\r\n\t\treturn this.genereateHTMLTable(list);\r\n\t}\r\n\r\n\tmapElementStyles(from, to, props){\r\n\t\tif(this.cloneTableStyle && from && to){\r\n\r\n\t\t\tvar lookup = {\r\n\t\t\t\t\"background-color\" : \"backgroundColor\",\r\n\t\t\t\t\"color\" : \"fontColor\",\r\n\t\t\t\t\"width\" : \"width\",\r\n\t\t\t\t\"font-weight\" : \"fontWeight\",\r\n\t\t\t\t\"font-family\" : \"fontFamily\",\r\n\t\t\t\t\"font-size\" : \"fontSize\",\r\n\t\t\t\t\"text-align\" : \"textAlign\",\r\n\t\t\t\t\"border-top\" : \"borderTop\",\r\n\t\t\t\t\"border-left\" : \"borderLeft\",\r\n\t\t\t\t\"border-right\" : \"borderRight\",\r\n\t\t\t\t\"border-bottom\" : \"borderBottom\",\r\n\t\t\t\t\"padding-top\" : \"paddingTop\",\r\n\t\t\t\t\"padding-left\" : \"paddingLeft\",\r\n\t\t\t\t\"padding-right\" : \"paddingRight\",\r\n\t\t\t\t\"padding-bottom\" : \"paddingBottom\",\r\n\t\t\t};\r\n\r\n\t\t\tif(window.getComputedStyle){\r\n\t\t\t\tvar fromStyle = window.getComputedStyle(from);\r\n\r\n\t\t\t\tprops.forEach(function(prop){\r\n\t\t\t\t\tto.style[lookup[prop]] = fromStyle.getPropertyValue(prop);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nExport.moduleName = \"export\";\r\n\r\nexport default Export;\r\n","export default {\r\n\r\n\t//equal to\r\n\t\"=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal == filterVal ? true : false;\r\n\t},\r\n\r\n\t//less than\r\n\t\"<\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal < filterVal ? true : false;\r\n\t},\r\n\r\n\t//less than or equal to\r\n\t\"<=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal <= filterVal ? true : false;\r\n\t},\r\n\r\n\t//greater than\r\n\t\">\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal > filterVal ? true : false;\r\n\t},\r\n\r\n\t//greater than or equal to\r\n\t\">=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal >= filterVal ? true : false;\r\n\t},\r\n\r\n\t//not equal to\r\n\t\"!=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal != filterVal ? true : false;\r\n\t},\r\n\r\n\t\"regex\":function(filterVal, rowVal, rowData, filterParams){\r\n\r\n\t\tif(typeof filterVal == \"string\"){\r\n\t\t\tfilterVal = new RegExp(filterVal);\r\n\t\t}\r\n\r\n\t\treturn filterVal.test(rowVal);\r\n\t},\r\n\r\n\t//contains the string\r\n\t\"like\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().indexOf(filterVal.toLowerCase()) > -1;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//contains the keywords\r\n\t\"keywords\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tvar keywords = filterVal.toLowerCase().split(typeof filterParams.separator === \"undefined\" ? \" \" : filterParams.separator),\r\n\t\tvalue = String(rowVal === null || typeof rowVal === \"undefined\" ? \"\" : rowVal).toLowerCase(),\r\n\t\tmatches = [];\r\n\r\n\t\tkeywords.forEach((keyword) =>{\r\n\t\t\tif(value.includes(keyword)){\r\n\t\t\t\tmatches.push(true);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn filterParams.matchAll ? matches.length === keywords.length : !!matches.length;\r\n\t},\r\n\r\n\t//starts with the string\r\n\t\"starts\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().startsWith(filterVal.toLowerCase());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//ends with the string\r\n\t\"ends\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().endsWith(filterVal.toLowerCase());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//in array\r\n\t\"in\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(Array.isArray(filterVal)){\r\n\t\t\treturn filterVal.length ? filterVal.indexOf(rowVal) > -1 : true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Filter Error - filter value is not an array:\", filterVal);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultFilters from './defaults/filters.js';\r\n\r\nclass Filter extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.filterList = []; //hold filter list\r\n\t\tthis.headerFilters = {}; //hold column filters\r\n\t\tthis.headerFilterColumns = []; //hold columns that use header filters\r\n\r\n\t\tthis.prevHeaderFilterChangeCheck = \"\";\r\n\t\tthis.prevHeaderFilterChangeCheck = \"{}\";\r\n\r\n\t\tthis.changed = false; //has filtering changed since last render\r\n\t\tthis.tableInitialized = false;\r\n\r\n\t\tthis.registerTableOption(\"filterMode\", \"local\"); //local or remote filtering\r\n\r\n\t\tthis.registerTableOption(\"initialFilter\", false); //initial filtering criteria\r\n\t\tthis.registerTableOption(\"initialHeaderFilter\", false); //initial header filtering criteria\r\n\t\tthis.registerTableOption(\"headerFilterLiveFilterDelay\", 300); //delay before updating column after user types in header filter\r\n\r\n\t\tthis.registerColumnOption(\"headerFilter\");\r\n\t\tthis.registerColumnOption(\"headerFilterPlaceholder\");\r\n\t\tthis.registerColumnOption(\"headerFilterParams\");\r\n\t\tthis.registerColumnOption(\"headerFilterEmptyCheck\");\r\n\t\tthis.registerColumnOption(\"headerFilterFunc\");\r\n\t\tthis.registerColumnOption(\"headerFilterFuncParams\");\r\n\t\tthis.registerColumnOption(\"headerFilterLiveFilter\");\r\n\r\n\t\tthis.registerTableFunction(\"searchRows\", this.searchRows.bind(this));\r\n\t\tthis.registerTableFunction(\"searchData\", this.searchData.bind(this));\r\n\r\n\t\tthis.registerTableFunction(\"setFilter\", this.userSetFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"refreshFilter\", this.userRefreshFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"addFilter\", this.userAddFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"getFilters\", this.getFilters.bind(this));\r\n\t\tthis.registerTableFunction(\"setHeaderFilterFocus\", this.userSetHeaderFilterFocus.bind(this));\r\n\t\tthis.registerTableFunction(\"getHeaderFilterValue\", this.userGetHeaderFilterValue.bind(this));\r\n\t\tthis.registerTableFunction(\"setHeaderFilterValue\", this.userSetHeaderFilterValue.bind(this));\r\n\t\tthis.registerTableFunction(\"getHeaderFilters\", this.getHeaderFilters.bind(this));\r\n\t\tthis.registerTableFunction(\"removeFilter\", this.userRemoveFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"clearFilter\", this.userClearFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"clearHeaderFilter\", this.userClearHeaderFilter.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"column\", \"headerFilterFocus\", this.setHeaderFilterFocus.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"reloadHeaderFilter\", this.reloadHeaderFilter.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"getHeaderFilterValue\", this.getHeaderFilterValue.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"setHeaderFilterValue\", this.setHeaderFilterValue.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumnHeaderFilter.bind(this));\r\n\t\tthis.subscribe(\"column-width-fit-before\", this.hideHeaderFilterElements.bind(this));\r\n\t\tthis.subscribe(\"column-width-fit-after\", this.showHeaderFilterElements.bind(this));\r\n\t\tthis.subscribe(\"table-built\", this.tableBuilt.bind(this));\r\n\r\n\t\tif(this.table.options.filterMode === \"remote\"){\r\n\t\t\tthis.subscribe(\"data-params\", this.remoteFilterParams.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerDataHandler(this.filter.bind(this), 10);\r\n\t}\r\n\r\n\ttableBuilt(){\r\n\t\tif(this.table.options.initialFilter){\r\n\t\t\tthis.setFilter(this.table.options.initialFilter);\r\n\t\t}\r\n\r\n\t\tif(this.table.options.initialHeaderFilter){\r\n\t\t\tthis.table.options.initialHeaderFilter.forEach((item) => {\r\n\r\n\t\t\t\tvar column = this.table.columnManager.findColumn(item.field);\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tthis.setHeaderFilterValue(column, item.value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", item.field);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.tableInitialized = true;\r\n\t}\r\n\r\n\tremoteFilterParams(data, config, silent, params){\r\n\t\tparams.filter = this.getFilters(true, true);\r\n\t\treturn params;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\t//set standard filters\r\n\tuserSetFilter(field, type, value, params){\r\n\t\tthis.setFilter(field, type, value, params);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//set standard filters\r\n\tuserRefreshFilter(){\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//add filter to array\r\n\tuserAddFilter(field, type, value, params){\r\n\t\tthis.addFilter(field, type, value, params);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\tuserSetHeaderFilterFocus(field){\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tthis.setHeaderFilterFocus(column);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Focus Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tuserGetHeaderFilterValue(field) {\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn this.getHeaderFilterValue(column);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", field);\r\n\t\t}\r\n\t}\r\n\r\n\tuserSetHeaderFilterValue(field, value){\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tthis.setHeaderFilterValue(column, value);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//remove filter from array\r\n\tuserRemoveFilter(field, type, value){\r\n\t\tthis.removeFilter(field, type, value);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//clear filters\r\n\tuserClearFilter(all){\r\n\t\tthis.clearFilter(all);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//clear header filters\r\n\tuserClearHeaderFilter(){\r\n\t\tthis.clearHeaderFilter();\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\r\n\t//search for specific row components\r\n\tsearchRows(field, type, value){\r\n\t\treturn this.search(\"rows\", field, type, value);\r\n\t}\r\n\r\n\t//search for specific data\r\n\tsearchData(field, type, value){\r\n\t\treturn this.search(\"data\", field, type, value);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnHeaderFilter(column){\r\n\t\tvar def = column.definition;\r\n\r\n\t\tif(def.headerFilter){\r\n\r\n\t\t\tif(typeof def.headerFilterPlaceholder !== \"undefined\" && def.field){\r\n\t\t\t\tthis.module(\"localize\").setHeaderFilterColumnPlaceholder(def.field, def.headerFilterPlaceholder);\r\n\t\t\t}\r\n\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column header filter\r\n\tinitializeColumn(column, value){\r\n\t\tvar self = this,\r\n\t\tfield = column.getField(),\r\n\t\tparams;\r\n\r\n\t\t//handle successfull value change\r\n\t\tfunction success(value){\r\n\t\t\tvar filterType = (column.modules.filter.tagType == \"input\" && column.modules.filter.attrType == \"text\") || column.modules.filter.tagType == \"textarea\" ? \"partial\" : \"match\",\r\n\t\t\ttype = \"\",\r\n\t\t\tfilterChangeCheck = \"\",\r\n\t\t\tfilterFunc;\r\n\r\n\t\t\tif(typeof column.modules.filter.prevSuccess === \"undefined\" || column.modules.filter.prevSuccess !== value){\r\n\r\n\t\t\t\tcolumn.modules.filter.prevSuccess = value;\r\n\r\n\t\t\t\tif(!column.modules.filter.emptyFunc(value)){\r\n\t\t\t\t\tcolumn.modules.filter.value = value;\r\n\r\n\t\t\t\t\tswitch(typeof column.definition.headerFilterFunc){\r\n\t\t\t\t\t\tcase \"string\":\r\n\t\t\t\t\t\tif(Filter.filters[column.definition.headerFilterFunc]){\r\n\t\t\t\t\t\t\ttype = column.definition.headerFilterFunc;\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\r\n\t\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\t\tparams = typeof params === \"function\" ? params(value, fieldVal, data) : params;\r\n\r\n\t\t\t\t\t\t\t\treturn Filter.filters[column.definition.headerFilterFunc](value, fieldVal, data, params);\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tconsole.warn(\"Header Filter Error - Matching filter function not found: \", column.definition.headerFilterFunc);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\r\n\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\tparams = typeof params === \"function\" ? params(value, fieldVal, data) : params;\r\n\r\n\t\t\t\t\t\t\treturn column.definition.headerFilterFunc(value, fieldVal, data, params);\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\ttype = filterFunc;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(!filterFunc){\r\n\t\t\t\t\t\tswitch(filterType){\r\n\t\t\t\t\t\t\tcase \"partial\":\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\tvar colVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\t\tif(typeof colVal !== 'undefined' && colVal !== null){\r\n\t\t\t\t\t\t\t\t\treturn String(colVal).toLowerCase().indexOf(String(value).toLowerCase()) > -1;\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\ttype = \"like\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\treturn column.getFieldValue(data) == value;\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\ttype = \"=\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tself.headerFilters[field] = {value:value, func:filterFunc, type:type, params:params || {}};\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdelete self.headerFilters[field];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfilterChangeCheck = JSON.stringify(self.headerFilters);\r\n\r\n\t\t\t\tif(self.prevHeaderFilterChangeCheck !== filterChangeCheck){\r\n\t\t\t\t\tself.prevHeaderFilterChangeCheck = filterChangeCheck;\r\n\r\n\t\t\t\t\tself.trackChanges();\r\n\t\t\t\t\tself.refreshFilter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tcolumn.modules.filter = {\r\n\t\t\tsuccess:success,\r\n\t\t\tattrType:false,\r\n\t\t\ttagType:false,\r\n\t\t\temptyFunc:false,\r\n\t\t};\r\n\r\n\t\tthis.generateHeaderFilterElement(column);\r\n\t}\r\n\r\n\tgenerateHeaderFilterElement(column, initialValue, reinitialize){\r\n\t\tvar self = this,\r\n\t\tsuccess = column.modules.filter.success,\r\n\t\tfield = column.getField(),\r\n\t\tfilterElement, editor, editorElement, cellWrapper, typingTimer, searchTrigger, params;\r\n\r\n\t\t//handle aborted edit\r\n\t\tfunction cancel(){}\r\n\r\n\t\tif(column.modules.filter.headerElement && column.modules.filter.headerElement.parentNode){\r\n\t\t\tcolumn.contentElement.removeChild(column.modules.filter.headerElement.parentNode);\r\n\t\t}\r\n\r\n\t\tif(field){\r\n\r\n\t\t\t//set empty value function\r\n\t\t\tcolumn.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function(value){\r\n\t\t\t\treturn !value && value !== \"0\" && value !== 0;\r\n\t\t\t};\r\n\r\n\t\t\tfilterElement = document.createElement(\"div\");\r\n\t\t\tfilterElement.classList.add(\"tabulator-header-filter\");\r\n\r\n\t\t\t//set column editor\r\n\t\t\tswitch(typeof column.definition.headerFilter){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(self.table.modules.edit.editors[column.definition.headerFilter]){\r\n\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.headerFilter];\r\n\r\n\t\t\t\t\tif((column.definition.headerFilter === \"tick\" || column.definition.headerFilter === \"tickCross\") && !column.definition.headerFilterEmptyCheck){\r\n\t\t\t\t\t\tcolumn.modules.filter.emptyFunc = function(value){\r\n\t\t\t\t\t\t\treturn value !== true && value !== false;\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Filter Error - Cannot build header filter, No such editor found: \", column.definition.editor);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\teditor = column.definition.headerFilter;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tif(column.modules.edit && column.modules.edit.editor){\r\n\t\t\t\t\teditor = column.modules.edit.editor;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]){\r\n\t\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.formatter];\r\n\r\n\t\t\t\t\t\tif((column.definition.formatter === \"tick\" || column.definition.formatter === \"tickCross\") && !column.definition.headerFilterEmptyCheck){\r\n\t\t\t\t\t\t\tcolumn.modules.filter.emptyFunc = function(value){\r\n\t\t\t\t\t\t\t\treturn value !== true && value !== false;\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\teditor = self.table.modules.edit.editors[\"input\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(editor){\r\n\r\n\t\t\t\tcellWrapper = {\r\n\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\treturn typeof initialValue !== \"undefined\" ? initialValue : \"\";\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetField:function(){\r\n\t\t\t\t\t\treturn column.definition.field;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\treturn filterElement;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\tnormalizeHeight:function(){\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\tparams = column.definition.headerFilterParams || {};\r\n\r\n\t\t\t\tparams = typeof params === \"function\" ? params.call(self.table, cellWrapper) : params;\r\n\r\n\t\t\t\teditorElement = editor.call(this.table.modules.edit, cellWrapper, function(){}, success, cancel, params);\r\n\r\n\t\t\t\tif(!editorElement){\r\n\t\t\t\t\tconsole.warn(\"Filter Error - Cannot add filter to \" + field + \" column, editor returned a value of false\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!(editorElement instanceof Node)){\r\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);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//set Placeholder Text\r\n\t\t\t\tif(field){\r\n\t\t\t\t\tself.langBind(\"headerFilters|columns|\" + column.definition.field, function(value){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"placeholder\", typeof value !== \"undefined\" && value ? value : self.langText(\"headerFilters|default\"));\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.langBind(\"headerFilters|default\", function(value){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"placeholder\", value);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//focus on element on click\r\n\t\t\t\teditorElement.addEventListener(\"click\", function(e){\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\teditorElement.focus();\r\n\t\t\t\t});\r\n\r\n\t\t\t\teditorElement.addEventListener(\"focus\", (e) => {\r\n\t\t\t\t\tvar left = this.table.columnManager.element.scrollLeft;\r\n\r\n\t\t\t\t\tvar headerPos = this.table.rowManager.element.scrollLeft + parseInt(this.table.columnManager.element.style.marginLeft);\r\n\r\n\t\t\t\t\tif(left !== headerPos){\r\n\t\t\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\t\t\tthis.table.columnManager.scrollHorizontal(left);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\t//live update filters as user types\r\n\t\t\t\ttypingTimer = false;\r\n\r\n\t\t\t\tsearchTrigger = function(e){\r\n\t\t\t\t\tif(typingTimer){\r\n\t\t\t\t\t\tclearTimeout(typingTimer);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ttypingTimer = setTimeout(function(){\r\n\t\t\t\t\t\tsuccess(editorElement.value);\r\n\t\t\t\t\t},self.table.options.headerFilterLiveFilterDelay);\r\n\t\t\t\t};\r\n\r\n\t\t\t\tcolumn.modules.filter.headerElement = editorElement;\r\n\t\t\t\tcolumn.modules.filter.attrType = editorElement.hasAttribute(\"type\") ? editorElement.getAttribute(\"type\").toLowerCase() : \"\" ;\r\n\t\t\t\tcolumn.modules.filter.tagType = editorElement.tagName.toLowerCase();\r\n\r\n\t\t\t\tif(column.definition.headerFilterLiveFilter !== false){\r\n\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\t!(\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === 'autocomplete' ||\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === 'tickCross' ||\r\n\t\t\t\t\t\t\t((column.definition.editor === 'autocomplete' ||\r\n\t\t\t\t\t\t\t\tcolumn.definition.editor === 'tickCross') &&\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === true)\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\teditorElement.addEventListener(\"keyup\", searchTrigger);\r\n\t\t\t\t\teditorElement.addEventListener(\"search\", searchTrigger);\r\n\r\n\r\n\t\t\t\t\t//update number filtered columns on change\r\n\t\t\t\t\tif(column.modules.filter.attrType == \"number\"){\r\n\t\t\t\t\t\teditorElement.addEventListener(\"change\", function(e){\r\n\t\t\t\t\t\t\tsuccess(editorElement.value);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//change text inputs to search inputs to allow for clearing of field\r\n\t\t\t\t\tif(column.modules.filter.attrType == \"text\" && this.table.browser !== \"ie\"){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"type\", \"search\");\r\n\t\t\t\t\t\t// editorElement.off(\"change blur\"); //prevent blur from triggering filter and preventing selection click\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\t//prevent input and select elements from propegating click to column sorters etc\r\n\t\t\t\t\tif(column.modules.filter.tagType == \"input\" || column.modules.filter.tagType == \"select\" || column.modules.filter.tagType == \"textarea\"){\r\n\t\t\t\t\t\teditorElement.addEventListener(\"mousedown\",function(e){\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfilterElement.appendChild(editorElement);\r\n\r\n\t\t\t\tcolumn.contentElement.appendChild(filterElement);\r\n\r\n\t\t\t\tif(!reinitialize){\r\n\t\t\t\t\tself.headerFilterColumns.push(column);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Filter Error - Cannot add header filter, column has no field set:\", column.definition.title);\r\n\t\t}\r\n\t}\r\n\r\n\t//hide all header filter elements (used to ensure correct column widths in \"fitData\" layout mode)\r\n\thideHeaderFilterElements(){\r\n\t\tthis.headerFilterColumns.forEach(function(column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tcolumn.modules.filter.headerElement.style.display = 'none';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//show all header filter elements (used to ensure correct column widths in \"fitData\" layout mode)\r\n\tshowHeaderFilterElements(){\r\n\t\tthis.headerFilterColumns.forEach(function(column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tcolumn.modules.filter.headerElement.style.display = '';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//programatically set focus of header filter\r\n\tsetHeaderFilterFocus(column){\r\n\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\tcolumn.modules.filter.headerElement.focus();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Focus Error - No header filter set on column:\", column.getField());\r\n\t\t}\r\n\t}\r\n\r\n\t//programmatically get value of header filter\r\n\tgetHeaderFilterValue(column){\r\n\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\treturn column.modules.filter.headerElement.value;\r\n\t\t} else {\r\n\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t}\r\n\t}\r\n\r\n\t//programatically set value of header filter\r\n\tsetHeaderFilterValue(column, value){\r\n\t\tif (column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tthis.generateHeaderFilterElement(column, value, true);\r\n\t\t\t\tcolumn.modules.filter.success(value);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treloadHeaderFilter(column){\r\n\t\tif (column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tthis.generateHeaderFilterElement(column, column.modules.filter.value, true);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trefreshFilter(){\r\n\t\tif(this.tableInitialized){\r\n\t\t\tif(this.table.options.filterMode === \"remote\"){\r\n\t\t\t\tthis.reloadData();\r\n\t\t\t}else{\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//TODO - Persist left position of row manager\r\n\t\t// left = this.scrollLeft;\r\n\t\t// this.scrollHorizontal(left);\r\n\t}\r\n\r\n\t//check if the filters has changed since last use\r\n\ttrackChanges(){\r\n\t\tthis.changed = true;\r\n\t\tthis.dispatch(\"filter-changed\");\r\n\t}\r\n\r\n\t//check if the filters has changed since last use\r\n\thasChanged(){\r\n\t\tvar changed = this.changed;\r\n\t\tthis.changed = false;\r\n\t\treturn changed;\r\n\t}\r\n\r\n\t//set standard filters\r\n\tsetFilter(field, type, value, params){\r\n\t\tthis.filterList = [];\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value, params:params}];\r\n\t\t}\r\n\r\n\t\tthis.addFilter(field);\r\n\t}\r\n\r\n\t//add filter to array\r\n\taddFilter(field, type, value, params){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value, params:params}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\tthis.filterList.push(filter);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.trackChanges();\r\n\t\t}\r\n\t}\r\n\r\n\tfindFilter(filter){\r\n\t\tvar column;\r\n\r\n\t\tif(Array.isArray(filter)){\r\n\t\t\treturn this.findSubFilters(filter);\r\n\t\t}\r\n\r\n\t\tvar filterFunc = false;\r\n\r\n\t\tif(typeof filter.field == \"function\"){\r\n\t\t\tfilterFunc = function(data){\r\n\t\t\t\treturn filter.field(data, filter.type || {})// pass params to custom filter function\r\n\t\t\t};\r\n\t\t}else{\r\n\r\n\t\t\tif(Filter.filters[filter.type]){\r\n\r\n\t\t\t\tcolumn = this.table.columnManager.getColumnByField(filter.field);\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\treturn Filter.filters[filter.type](filter.value, column.getFieldValue(data), data, filter.params || {});\r\n\t\t\t\t\t};\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\treturn Filter.filters[filter.type](filter.value, data[filter.field], data, filter.params || {});\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Filter Error - No such filter type found, ignoring: \", filter.type);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfilter.func = filterFunc;\r\n\r\n\t\treturn filter.func ? filter : false;\r\n\t}\r\n\r\n\tfindSubFilters(filters){\r\n\t\tvar output = [];\r\n\r\n\t\tfilters.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\toutput.push(filter);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output.length ? output : false;\r\n\t}\r\n\r\n\t//get all filters\r\n\tgetFilters(all, ajax){\r\n\t\tvar output = [];\r\n\r\n\t\tif(all){\r\n\t\t\toutput = this.getHeaderFilters();\r\n\t\t}\r\n\r\n\t\tif(ajax){\r\n\t\t\toutput.forEach(function(item){\r\n\t\t\t\tif(typeof item.type == \"function\"){\r\n\t\t\t\t\titem.type = \"function\";\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\toutput = output.concat(this.filtersToArray(this.filterList, ajax));\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//filter to Object\r\n\tfiltersToArray(filterList, ajax){\r\n\t\tvar output = [];\r\n\r\n\t\tfilterList.forEach((filter) => {\r\n\t\t\tvar item;\r\n\r\n\t\t\tif(Array.isArray(filter)){\r\n\t\t\t\toutput.push(this.filtersToArray(filter, ajax));\r\n\t\t\t}else{\r\n\t\t\t\titem = {field:filter.field, type:filter.type, value:filter.value}\r\n\r\n\t\t\t\tif(ajax){\r\n\t\t\t\t\tif(typeof item.type == \"function\"){\r\n\t\t\t\t\t\titem.type = \"function\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\toutput.push(item);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//get all filters\r\n\tgetHeaderFilters(){\r\n\t\tvar output = [];\r\n\r\n\t\tfor(var key in this.headerFilters){\r\n\t\t\toutput.push({field:key, type:this.headerFilters[key].type, value:this.headerFilters[key].value});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//remove filter from array\r\n\tremoveFilter(field, type, value){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tvar index = -1;\r\n\r\n\t\t\tif(typeof filter.field == \"object\"){\r\n\t\t\t\tindex = this.filterList.findIndex((element) => {\r\n\t\t\t\t\treturn filter === element;\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tindex = this.filterList.findIndex((element) => {\r\n\t\t\t\t\treturn filter.field === element.field && filter.type === element.type && filter.value === element.value;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.filterList.splice(index, 1);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Filter Error - No matching filter type found, ignoring: \", filter.type);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//clear filters\r\n\tclearFilter(all){\r\n\t\tthis.filterList = [];\r\n\r\n\t\tif(all){\r\n\t\t\tthis.clearHeaderFilter();\r\n\t\t}\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//clear header filters\r\n\tclearHeaderFilter(){\r\n\t\tthis.headerFilters = {};\r\n\t\tthis.prevHeaderFilterChangeCheck = \"{}\";\r\n\r\n\t\tthis.headerFilterColumns.forEach((column) => {\r\n\t\t\tif(typeof column.modules.filter.value !== \"undefined\"){\r\n\t\t\t\tdelete column.modules.filter.value;\r\n\t\t\t}\r\n\t\t\tcolumn.modules.filter.prevSuccess = undefined;\r\n\t\t\tthis.reloadHeaderFilter(column);\r\n\t\t});\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//search data and return matching rows\r\n\tsearch (searchType, field, type, value){\r\n\t\tvar activeRows = [],\r\n\t\tfilterList = [];\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\tfilterList.push(filter);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\tvar match = true;\r\n\r\n\t\t\tfilterList.forEach((filter) => {\r\n\t\t\t\tif(!this.filterRecurse(filter, row.getData())){\r\n\t\t\t\t\tmatch = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tactiveRows.push(searchType === \"data\" ? row.getData(\"data\") : row.getComponent());\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\t\treturn activeRows;\r\n\t}\r\n\r\n\t//filter row array\r\n\tfilter(rowList, filters){\r\n\t\tvar activeRows = [],\r\n\t\tactiveRowComponents = [];\r\n\r\n\t\tif(this.subscribedExternal(\"dataFiltering\")){\r\n\t\t\tthis.dispatchExternal(\"dataFiltering\", this.getFilters());\r\n\t\t}\r\n\r\n\t\tif(this.table.options.filterMode !== \"remote\" && (this.filterList.length || Object.keys(this.headerFilters).length)){\r\n\r\n\t\t\trowList.forEach((row) => {\r\n\t\t\t\tif(this.filterRow(row)){\r\n\t\t\t\t\tactiveRows.push(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t}else{\r\n\t\t\tactiveRows = rowList.slice(0);\r\n\t\t}\r\n\r\n\t\tif(this.subscribedExternal(\"dataFiltered\")){\r\n\r\n\t\t\tactiveRows.forEach((row) => {\r\n\t\t\t\tactiveRowComponents.push(row.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatchExternal(\"dataFiltered\", this.getFilters(), activeRowComponents);\r\n\t\t}\r\n\r\n\t\treturn activeRows;\r\n\t}\r\n\r\n\t//filter individual row\r\n\tfilterRow(row, filters){\r\n\t\tvar match = true,\r\n\t\tdata = row.getData();\r\n\r\n\t\tthis.filterList.forEach((filter) => {\r\n\t\t\tif(!this.filterRecurse(filter, data)){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\tfor(var field in this.headerFilters){\r\n\t\t\tif(!this.headerFilters[field].func(data)){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tfilterRecurse(filter, data){\r\n\t\tvar match = false;\r\n\r\n\t\tif(Array.isArray(filter)){\r\n\t\t\tfilter.forEach((subFilter) => {\r\n\t\t\t\tif(this.filterRecurse(subFilter, data)){\r\n\t\t\t\t\tmatch = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tmatch = filter.func(data);\r\n\t\t}\r\n\r\n\t\treturn match;\r\n\t}\r\n}\r\n\r\nFilter.moduleName = \"filter\";\r\n\r\n//load defaults\r\nFilter.filters = defaultFilters;\r\n\r\nexport default Filter;","export default function(cell, formatterParams, onRendered){\r\n\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn cell.getValue();\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().style.whiteSpace = \"pre-wrap\";\r\n\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar floatVal = parseFloat(cell.getValue()),\r\n\tsign = \"\",\r\n\tnumber, integer, decimal, rgx;\r\n\r\n\tvar decimalSym = formatterParams.decimal || \".\";\r\n\tvar thousandSym = formatterParams.thousand || \",\";\r\n\tvar negativeSign = formatterParams.negativeSign || \"-\";\r\n\tvar symbol = formatterParams.symbol || \"\";\r\n\tvar after = !!formatterParams.symbolAfter;\r\n\tvar precision = typeof formatterParams.precision !== \"undefined\" ? formatterParams.precision : 2;\r\n\r\n\tif(isNaN(floatVal)){\r\n\t\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n\t}\r\n\r\n\tif(floatVal < 0){\r\n\t\tfloatVal = Math.abs(floatVal);\r\n\t\tsign = negativeSign;\r\n\t}\r\n\r\n\tnumber = precision !== false ? floatVal.toFixed(precision) : floatVal;\r\n\tnumber = String(number).split(\".\");\r\n\r\n\tinteger = number[0];\r\n\tdecimal = number.length > 1 ? decimalSym + number[1] : \"\";\r\n\r\n\trgx = /(\\d+)(\\d{3})/;\r\n\r\n\twhile (rgx.test(integer)){\r\n\t\tinteger = integer.replace(rgx, \"$1\" + thousandSym + \"$2\");\r\n\t}\r\n\r\n\treturn after ? sign + integer + decimal + symbol : sign + symbol + integer + decimal;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\turlPrefix = formatterParams.urlPrefix || \"\",\r\n\tdownload = formatterParams.download,\r\n\tlabel = value,\r\n\tel = document.createElement(\"a\"),\r\n\tdata;\r\n\r\n\tif(formatterParams.labelField){\r\n\t\tdata = cell.getData();\r\n\t\tlabel = data[formatterParams.labelField];\r\n\t}\r\n\r\n\tif(formatterParams.label){\r\n\t\tswitch(typeof formatterParams.label){\r\n\t\t\tcase \"string\":\r\n\t\t\tlabel = formatterParams.label;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tlabel = formatterParams.label(cell);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(label){\r\n\t\tif(formatterParams.urlField){\r\n\t\t\tdata = cell.getData();\r\n\t\t\tvalue = data[formatterParams.urlField];\r\n\t\t}\r\n\r\n\t\tif(formatterParams.url){\r\n\t\t\tswitch(typeof formatterParams.url){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tvalue = formatterParams.url;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tvalue = formatterParams.url(cell);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tel.setAttribute(\"href\", urlPrefix + value);\r\n\r\n\t\tif(formatterParams.target){\r\n\t\t\tel.setAttribute(\"target\", formatterParams.target);\r\n\t\t}\r\n\r\n\t\tif(formatterParams.download){\r\n\r\n\t\t\tif(typeof download == \"function\"){\r\n\t\t\t\tdownload = download(cell);\r\n\t\t\t}else{\r\n\t\t\t\tdownload = download === true ? \"\" : download;\r\n\t\t\t}\r\n\r\n\t\t\tel.setAttribute(\"download\", download);\r\n\t\t}\r\n\r\n\t\tel.innerHTML = this.emptyToSpace(this.sanitizeHTML(label));\r\n\r\n\t\treturn el;\r\n\t}else{\r\n\t\treturn \" \";\r\n\t}\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar el = document.createElement(\"img\"),\r\n\tsrc = cell.getValue();\r\n\r\n\tif(formatterParams.urlPrefix){\r\n\t\tsrc = formatterParams.urlPrefix + cell.getValue();\r\n\t}\r\n\r\n\tif(formatterParams.urlSuffix){\r\n\t\tsrc = src + formatterParams.urlSuffix;\r\n\t}\r\n\r\n\tel.setAttribute(\"src\", src);\r\n\r\n\tswitch(typeof formatterParams.height){\r\n\t\tcase \"number\":\r\n\t\tel.style.height = formatterParams.height + \"px\";\r\n\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\tel.style.height = formatterParams.height;\r\n\t\tbreak;\r\n\t}\r\n\r\n\tswitch(typeof formatterParams.width){\r\n\t\tcase \"number\":\r\n\t\tel.style.width = formatterParams.width + \"px\";\r\n\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\tel.style.width = formatterParams.width;\r\n\t\tbreak;\r\n\t}\r\n\r\n\tel.addEventListener(\"load\", function(){\r\n\t\tcell.getRow().normalizeHeight();\r\n\t});\r\n\r\n\treturn el;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\telement = cell.getElement(),\r\n\tempty = formatterParams.allowEmpty,\r\n\ttruthy = formatterParams.allowTruthy,\r\n\ttick = typeof formatterParams.tickElement !== \"undefined\" ? formatterParams.tickElement : '',\r\n\tcross = typeof formatterParams.crossElement !== \"undefined\" ? formatterParams.crossElement : '';\r\n\r\n\tif((truthy && value) || (value === true || value === \"true\" || value === \"True\" || value === 1 || value === \"1\")){\r\n\t\telement.setAttribute(\"aria-checked\", true);\r\n\t\treturn tick || \"\";\r\n\t}else{\r\n\t\tif(empty && (value === \"null\" || value === \"\" || value === null || typeof value === \"undefined\")){\r\n\t\t\telement.setAttribute(\"aria-checked\", \"mixed\");\r\n\t\t\treturn \"\";\r\n\t\t}else{\r\n\t\t\telement.setAttribute(\"aria-checked\", false);\r\n\t\t\treturn cross || \"\";\r\n\t\t}\r\n\t}\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar inputFormat = formatterParams.inputFormat || \"yyyy-MM-dd HH:mm:ss\";\r\n\tvar\toutputFormat = formatterParams.outputFormat || \"dd/MM/yyyy HH:mm:ss\";\r\n\tvar\tinvalid = typeof formatterParams.invalidPlaceholder !== \"undefined\" ? formatterParams.invalidPlaceholder : \"\";\r\n\tvar value = cell.getValue();\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\tvar newDatetime = inputFormat === \"iso\" ? DT.fromISO(String(value)) : DT.fromFormat(String(value), inputFormat);\r\n\r\n\t\tif(newDatetime.isValid){\r\n\t\t\tif(formatterParams.timezone){\r\n\t\t\t\tnewDatetime = newDatetime.setZone(formatterParams.timezone);\r\n\t\t\t}\r\n\r\n\t\t\treturn newDatetime.toFormat(outputFormat);\r\n\t\t}else{\r\n\t\t\tif(invalid === true || !value){\r\n\t\t\t\treturn value;\r\n\t\t\t}else if(typeof invalid === \"function\"){\r\n\t\t\t\treturn invalid(value);\r\n\t\t\t}else{\r\n\t\t\t\treturn invalid;\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tconsole.error(\"Format Error - 'datetime' formatter is dependant on luxon.js\");\r\n\t}\r\n};","export default function (cell, formatterParams, onRendered) {\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar inputFormat = formatterParams.inputFormat || \"yyyy-MM-dd HH:mm:ss\";\r\n\tvar invalid = typeof formatterParams.invalidPlaceholder !== \"undefined\" ? formatterParams.invalidPlaceholder : \"\";\r\n\tvar suffix = typeof formatterParams.suffix !== \"undefined\" ? formatterParams.suffix : false;\r\n\tvar unit = typeof formatterParams.unit !== \"undefined\" ? formatterParams.unit : \"days\";\r\n\tvar humanize = typeof formatterParams.humanize !== \"undefined\" ? formatterParams.humanize : false;\r\n\tvar date = typeof formatterParams.date !== \"undefined\" ? formatterParams.date : DT.now();\r\n\tvar value = cell.getValue();\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\t\r\n\t\tvar newDatetime = inputFormat === \"iso\" ? DT.fromISO(String(value)) : DT.fromFormat(String(value), inputFormat);\r\n\r\n\t\tif (newDatetime.isValid){\r\n\t\t\tif(humanize){\r\n\t\t\t\t// return moment.duration(newDatetime.diff(date)).humanize(suffix);\r\n\t\t\t}else{\r\n\t\t\t\treturn parseInt(newDatetime.diff(date, unit)[unit]) + (suffix ? \" \" + suffix : \"\");\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\tif (invalid === true) {\r\n\t\t\t\treturn value;\r\n\t\t\t} else if (typeof invalid === \"function\") {\r\n\t\t\t\treturn invalid(value);\r\n\t\t\t} else {\r\n\t\t\t\treturn invalid;\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tconsole.error(\"Format Error - 'datetimediff' formatter is dependant on luxon.js\");\r\n\t}\r\n};","export default function (cell, formatterParams, onRendered) {\r\n\tvar value = cell.getValue();\r\n\r\n\tif (typeof formatterParams[value] === \"undefined\") {\r\n\t\tconsole.warn('Missing display value for ' + value);\r\n\t\treturn value;\r\n\t}\r\n\r\n\treturn formatterParams[value];\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\telement = cell.getElement(),\r\n\tmaxStars = formatterParams && formatterParams.stars ? formatterParams.stars : 5,\r\n\tstars = document.createElement(\"span\"),\r\n\tstar = document.createElementNS('http://www.w3.org/2000/svg', \"svg\"),\r\n\tstarActive = '',\r\n\tstarInactive = '';\r\n\r\n\t//style stars holder\r\n\tstars.style.verticalAlign = \"middle\";\r\n\r\n\t//style star\r\n\tstar.setAttribute(\"width\", \"14\");\r\n\tstar.setAttribute(\"height\", \"14\");\r\n\tstar.setAttribute(\"viewBox\", \"0 0 512 512\");\r\n\tstar.setAttribute(\"xml:space\", \"preserve\");\r\n\tstar.style.padding = \"0 1px\";\r\n\r\n\tvalue = value && !isNaN(value) ? parseInt(value) : 0;\r\n\r\n\tvalue = Math.max(0, Math.min(value, maxStars));\r\n\r\n\tfor(var i=1;i<= maxStars;i++){\r\n\t\tvar nextStar = star.cloneNode(true);\r\n\t\tnextStar.innerHTML = i <= value ? starActive : starInactive;\r\n\r\n\t\tstars.appendChild(nextStar);\r\n\t}\r\n\r\n\telement.style.whiteSpace = \"nowrap\";\r\n\telement.style.overflow = \"hidden\";\r\n\telement.style.textOverflow = \"ellipsis\";\r\n\r\n\telement.setAttribute(\"aria-label\", value);\r\n\r\n\treturn stars;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = this.sanitizeHTML(cell.getValue()) || 0,\r\n\tel = document.createElement(\"span\"),\r\n\tmax = formatterParams && formatterParams.max ? formatterParams.max : 100,\r\n\tmin = formatterParams && formatterParams.min ? formatterParams.min : 0,\r\n\tcolors = formatterParams && typeof formatterParams.color !== \"undefined\" ? formatterParams.color : [\"red\", \"orange\", \"green\"],\r\n\tcolor = \"#666666\",\r\n\tpercent, percentValue;\r\n\r\n\tif(isNaN(value) || typeof cell.getValue() === \"undefined\"){\r\n\t\treturn;\r\n\t}\r\n\r\n\tel.classList.add(\"tabulator-traffic-light\");\r\n\r\n\t//make sure value is in range\r\n\tpercentValue = parseFloat(value) <= max ? parseFloat(value) : max;\r\n\tpercentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min;\r\n\r\n\t//workout percentage\r\n\tpercent = (max - min) / 100;\r\n\tpercentValue = Math.round((percentValue - min) / percent);\r\n\r\n\t//set color\r\n\tswitch(typeof colors){\r\n\t\tcase \"string\":\r\n\t\tcolor = colors;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tcolor = colors(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(colors)){\r\n\t\t\tvar unit = 100 / colors.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, colors.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tcolor = colors[index];\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tel.style.backgroundColor = color;\r\n\r\n\treturn el;\r\n};","import CellComponent from '../../../../core/cell/CellComponent.js';\r\n\r\nexport default function(cell, formatterParams, onRendered){ //progress bar\r\n\tvar value = this.sanitizeHTML(cell.getValue()) || 0,\r\n\telement = cell.getElement(),\r\n\tmax = formatterParams && formatterParams.max ? formatterParams.max : 100,\r\n\tmin = formatterParams && formatterParams.min ? formatterParams.min : 0,\r\n\tlegendAlign = formatterParams && formatterParams.legendAlign ? formatterParams.legendAlign : \"center\",\r\n\tpercent, percentValue, color, legend, legendColor, top, left, right, bottom;\r\n\r\n\t//make sure value is in range\r\n\tpercentValue = parseFloat(value) <= max ? parseFloat(value) : max;\r\n\tpercentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min;\r\n\r\n\t//workout percentage\r\n\tpercent = (max - min) / 100;\r\n\tpercentValue = Math.round((percentValue - min) / percent);\r\n\r\n\t//set bar color\r\n\tswitch(typeof formatterParams.color){\r\n\t\tcase \"string\":\r\n\t\tcolor = formatterParams.color;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tcolor = formatterParams.color(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(formatterParams.color)){\r\n\t\t\tvar unit = 100 / formatterParams.color.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, formatterParams.color.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tcolor = formatterParams.color[index];\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tdefault:\r\n\t\tcolor = \"#2DC214\";\r\n\t}\r\n\r\n\t//generate legend\r\n\tswitch(typeof formatterParams.legend){\r\n\t\tcase \"string\":\r\n\t\tlegend = formatterParams.legend;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tlegend = formatterParams.legend(value);\r\n\t\tbreak;\r\n\t\tcase \"boolean\":\r\n\t\tlegend = value;\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\tlegend = false;\r\n\t}\r\n\r\n\t//set legend color\r\n\tswitch(typeof formatterParams.legendColor){\r\n\t\tcase \"string\":\r\n\t\tlegendColor = formatterParams.legendColor;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tlegendColor = formatterParams.legendColor(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(formatterParams.legendColor)){\r\n\t\t\tvar unit = 100 / formatterParams.legendColor.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, formatterParams.legendColor.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tlegendColor = formatterParams.legendColor[index];\r\n\t\t}\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\tlegendColor = \"#000\";\r\n\t}\r\n\r\n\telement.style.minWidth = \"30px\";\r\n\telement.style.position = \"relative\";\r\n\r\n\telement.setAttribute(\"aria-label\", percentValue);\r\n\r\n\tvar barEl = document.createElement(\"div\");\r\n\tbarEl.style.display = \"inline-block\";\r\n\tbarEl.style.position = \"absolute\";\r\n\tbarEl.style.width = percentValue + \"%\";\r\n\tbarEl.style.backgroundColor = color;\r\n\tbarEl.style.height = \"100%\";\r\n\r\n\tbarEl.setAttribute('data-max', max);\r\n\tbarEl.setAttribute('data-min', min);\r\n\r\n\tvar barContainer = document.createElement(\"div\");\r\n\tbarContainer.style.position = \"relative\";\r\n\tbarContainer.style.width = \"100%\";\r\n\tbarContainer.style.height = \"100%\";\r\n\r\n\tif(legend){\r\n\t\tvar legendEl = document.createElement(\"div\");\r\n\t\tlegendEl.style.position = \"absolute\";\r\n\t\tlegendEl.style.top = 0;\r\n\t\tlegendEl.style.left = 0;\r\n\t\tlegendEl.style.textAlign = legendAlign;\r\n\t\tlegendEl.style.width = \"100%\";\r\n\t\tlegendEl.style.color = legendColor;\r\n\t\tlegendEl.innerHTML = legend;\r\n\t}\r\n\r\n\tonRendered(function(){\r\n\r\n\t\t//handle custom element needed if formatter is to be included in printed/downloaded output\r\n\t\tif(!(cell instanceof CellComponent)){\r\n\t\t\tvar holderEl = document.createElement(\"div\");\r\n\t\t\tholderEl.style.position = \"absolute\";\r\n\t\t\tholderEl.style.top = \"4px\";\r\n\t\t\tholderEl.style.bottom = \"4px\";\r\n\t\t\tholderEl.style.left = \"4px\";\r\n\t\t\tholderEl.style.right = \"4px\";\r\n\r\n\t\t\telement.appendChild(holderEl);\r\n\r\n\t\t\telement = holderEl;\r\n\t\t}\r\n\r\n\t\telement.appendChild(barContainer);\r\n\t\tbarContainer.appendChild(barEl);\r\n\r\n\t\tif(legend){\r\n\t\t\tbarContainer.appendChild(legendEl);\r\n\t\t}\r\n\t});\r\n\r\n\treturn \"\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().style.backgroundColor = this.sanitizeHTML(cell.getValue());\r\n\treturn \"\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn '';\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn '';\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn this.table.rowManager.activeRows.indexOf(cell.getRow()._getSelf()) + 1 || \"\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().classList.add(\"tabulator-row-handle\");\r\n\treturn \"
\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar open = false,\r\n\tel = document.createElement(\"div\"),\r\n\tconfig = cell.getRow()._row.modules.responsiveLayout;\r\n\r\n\tel.classList.add(\"tabulator-responsive-collapse-toggle\");\r\n\tel.innerHTML = \"+-\";\r\n\r\n\tcell.getElement().classList.add(\"tabulator-row-handle\");\r\n\r\n\tfunction toggleList(isOpen){\r\n\t\tvar collapseEl = config.element;\r\n\r\n\t\tconfig.open = isOpen;\r\n\r\n\t\tif(collapseEl){\r\n\r\n\t\t\tif(config.open){\r\n\t\t\t\tel.classList.add(\"open\");\r\n\t\t\t\tcollapseEl.style.display = '';\r\n\t\t\t}else{\r\n\t\t\t\tel.classList.remove(\"open\");\r\n\t\t\t\tcollapseEl.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tel.addEventListener(\"click\", function(e){\r\n\t\te.stopImmediatePropagation();\r\n\t\ttoggleList(!config.open);\r\n\t});\r\n\r\n\ttoggleList(config.open);\r\n\r\n\treturn el;\r\n};","import RowComponent from '../../../../core/row/RowComponent.js';\r\n\r\nexport default function(cell, formatterParams, onRendered){\r\n\tvar checkbox = document.createElement(\"input\");\r\n\tvar blocked = false;\r\n\r\n\tcheckbox.type = 'checkbox';\r\n\r\n\tcheckbox.setAttribute(\"aria-label\", \"Select Row\");\r\n\t\r\n\tif(this.table.modExists(\"selectRow\", true)){\r\n\r\n\t\tcheckbox.addEventListener(\"click\", (e) => {\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tif(typeof cell.getRow == 'function'){\r\n\t\t\tvar row = cell.getRow();\r\n\r\n\t\t\tif(row instanceof RowComponent){\r\n\r\n\t\t\t\tcheckbox.addEventListener(\"change\", (e) => {\r\n\t\t\t\t\tif(this.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\t\tif(!blocked){\r\n\t\t\t\t\t\t\trow.toggleSelect();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tblocked = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trow.toggleSelect();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\tcheckbox.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\tblocked = true;\r\n\t\t\t\t\t\tthis.table.modules.selectRow.handleComplexRowClick(row._row, e);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcheckbox.checked = row.isSelected && row.isSelected();\r\n\t\t\t\tthis.table.modules.selectRow.registerRowSelectCheckbox(row, checkbox);\r\n\t\t\t}else{\r\n\t\t\t\tcheckbox = \"\";\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tcheckbox.addEventListener(\"change\", (e) => {\r\n\t\t\t\tif(this.table.modules.selectRow.selectedRows.length){\r\n\t\t\t\t\tthis.table.deselectRow();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis.table.selectRow(formatterParams.rowRange);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.table.modules.selectRow.registerHeaderSelectCheckbox(checkbox);\r\n\t\t}\r\n\t}\r\n\r\n\treturn checkbox;\r\n};","import plaintext from './formatters/plaintext.js';\r\nimport html from './formatters/html.js';\r\nimport textarea from './formatters/textarea.js';\r\nimport money from './formatters/money.js';\r\nimport link from './formatters/link.js';\r\nimport image from './formatters/image.js';\r\nimport tickCross from './formatters/tickCross.js';\r\nimport datetime from './formatters/datetime.js';\r\nimport datetimediff from './formatters/datetimediff.js';\r\nimport lookup from './formatters/lookup.js';\r\nimport star from './formatters/star.js';\r\nimport traffic from './formatters/traffic.js';\r\nimport progress from './formatters/progress.js';\r\nimport color from './formatters/color.js';\r\nimport buttonTick from './formatters/buttonTick.js';\r\nimport buttonCross from './formatters/buttonCross.js';\r\nimport rownum from './formatters/rownum.js';\r\nimport handle from './formatters/handle.js';\r\nimport responsiveCollapse from './formatters/responsiveCollapse.js';\r\nimport rowSelection from './formatters/rowSelection.js';\r\n\r\nexport default {\r\n\tplaintext:plaintext,\r\n\thtml:html,\r\n\ttextarea:textarea,\r\n\tmoney:money,\r\n\tlink:link,\r\n\timage:image,\r\n\ttickCross:tickCross,\r\n\tdatetime:datetime,\r\n\tdatetimediff:datetimediff,\r\n\tlookup:lookup,\r\n\tstar:star,\r\n\ttraffic:traffic,\r\n\tprogress:progress,\r\n\tcolor:color,\r\n\tbuttonTick:buttonTick,\r\n\tbuttonCross:buttonCross,\r\n\trownum:rownum,\r\n\thandle:handle,\r\n\tresponsiveCollapse:responsiveCollapse,\r\n\trowSelection:rowSelection,\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultFormatters from './defaults/formatters.js';\r\n\r\nclass Format extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.registerColumnOption(\"formatter\");\r\n\t\tthis.registerColumnOption(\"formatterParams\");\r\n\r\n\t\tthis.registerColumnOption(\"formatterPrint\");\r\n\t\tthis.registerColumnOption(\"formatterPrintParams\");\r\n\t\tthis.registerColumnOption(\"formatterClipboard\");\r\n\t\tthis.registerColumnOption(\"formatterClipboardParams\");\r\n\t\tthis.registerColumnOption(\"formatterHtmlOutput\");\r\n\t\tthis.registerColumnOption(\"formatterHtmlOutputParams\");\r\n\t\tthis.registerColumnOption(\"titleFormatter\");\r\n\t\tthis.registerColumnOption(\"titleFormatterParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-format\", this.formatValue.bind(this));\r\n\t\tthis.subscribe(\"cell-rendered\", this.cellRendered.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"column-format\", this.formatHeader.bind(this));\r\n\t}\r\n\r\n\t//initialize column formatter\r\n\tinitializeColumn(column){\r\n\t\tcolumn.modules.format = this.lookupFormatter(column, \"\");\r\n\r\n\t\tif(typeof column.definition.formatterPrint !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.print = this.lookupFormatter(column, \"Print\");\r\n\t\t}\r\n\r\n\t\tif(typeof column.definition.formatterClipboard !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.clipboard = this.lookupFormatter(column, \"Clipboard\");\r\n\t\t}\r\n\r\n\t\tif(typeof column.definition.formatterHtmlOutput !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.htmlOutput = this.lookupFormatter(column, \"HtmlOutput\");\r\n\t\t}\r\n\t}\r\n\r\n\tlookupFormatter(column, type){\r\n\t\tvar config = {params:column.definition[\"formatter\" + type + \"Params\"] || {}},\r\n\t\tformatter = column.definition[\"formatter\" + type];\r\n\r\n\t\t//set column formatter\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\tconfig.formatter = Format.formatters[formatter];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tconfig.formatter = formatter;\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn config;\r\n\t}\r\n\r\n\tcellRendered(cell){\r\n\t\tif(cell.modules.format && cell.modules.format.renderedCallback && !cell.modules.format.rendered){\r\n\t\t\tcell.modules.format.renderedCallback();\r\n\t\t\tcell.modules.format.rendered = true;\r\n\t\t}\r\n\t}\r\n\r\n\t//return a formatted value for a column header\r\n\tformatHeader(column, title, el){\r\n\t\tvar formatter, params, onRendered, mockCell;\r\n\r\n\t\tif(column.definition.titleFormatter){\r\n\t\t\tformatter = this.getFormatter(column.definition.titleFormatter);\r\n\r\n\t\t\tonRendered = (callback) => {\r\n\t\t\t\tcolumn.titleFormatterRendered = callback;\r\n\t\t\t};\r\n\r\n\t\t\tmockCell = {\r\n\t\t\t\tgetValue:function(){\r\n\t\t\t\t\treturn title;\r\n\t\t\t\t},\r\n\t\t\t\tgetElement:function(){\r\n\t\t\t\t\treturn el;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tparams = column.definition.titleFormatterParams || {};\r\n\r\n\t\t\tparams = typeof params === \"function\" ? params() : params;\r\n\r\n\t\t\treturn formatter.call(this, mockCell, params, onRendered);\r\n\t\t}else{\r\n\t\t\treturn title;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//return a formatted value for a cell\r\n\tformatValue(cell){\r\n\t\tvar component = cell.getComponent(),\r\n\t\tparams = typeof cell.column.modules.format.params === \"function\" ? cell.column.modules.format.params(component) : cell.column.modules.format.params;\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\tif(!cell.modules.format){\r\n\t\t\t\tcell.modules.format = {};\r\n\t\t\t}\r\n\r\n\t\t\tcell.modules.format.renderedCallback = callback;\r\n\t\t\tcell.modules.format.rendered = false;\r\n\t\t}\r\n\r\n\t\treturn cell.column.modules.format.formatter.call(this, component, params, onRendered);\r\n\t}\r\n\r\n\tformatExportValue(cell, type){\r\n\t\tvar formatter = cell.column.modules.format[type],\r\n\t\tparams;\r\n\r\n\t\tif(formatter){\r\n\t\t\tparams = typeof formatter.params === \"function\" ? formatter.params(component) : formatter.params;\r\n\r\n\t\t\tfunction onRendered(callback){\r\n\t\t\t\tif(!cell.modules.format){\r\n\t\t\t\t\tcell.modules.format = {};\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcell.modules.format.renderedCallback = callback;\r\n\t\t\t\tcell.modules.format.rendered = false;\r\n\t\t\t}\r\n\r\n\t\t\treturn formatter.formatter.call(this, cell.getComponent(), params, onRendered);\r\n\r\n\t\t}else{\r\n\t\t\treturn this.formatValue(cell);\r\n\t\t}\r\n\t}\r\n\r\n\tsanitizeHTML(value){\r\n\t\tif(value){\r\n\t\t\tvar entityMap = {\r\n\t\t\t\t'&': '&',\r\n\t\t\t\t'<': '<',\r\n\t\t\t\t'>': '>',\r\n\t\t\t\t'\"': '"',\r\n\t\t\t\t\"'\": ''',\r\n\t\t\t\t'/': '/',\r\n\t\t\t\t'`': '`',\r\n\t\t\t\t'=': '='\r\n\t\t\t};\r\n\r\n\t\t\treturn String(value).replace(/[&<>\"'`=\\/]/g, function (s) {\r\n\t\t\t\treturn entityMap[s];\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn value;\r\n\t\t}\r\n\t}\r\n\r\n\temptyToSpace(value){\r\n\t\treturn value === null || typeof value === \"undefined\" || value === \"\" ? \" \" : value;\r\n\t}\r\n\r\n\t//get formatter for cell\r\n\tgetFormatter(formatter){\r\n\t\tvar formatter;\r\n\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\tformatter = Format.formatters[formatter]\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tformatter = formatter;\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn formatter;\r\n\t}\r\n}\r\n\r\nFormat.moduleName = \"format\";\r\n\r\n//load defaults\r\nFormat.formatters = defaultFormatters;\r\n\r\nexport default Format;","import Module from '../../core/Module.js';\r\n\r\nclass FrozenColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.leftColumns = [];\r\n\t\tthis.rightColumns = [];\r\n\t\tthis.leftMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.rightPadding = 0;\r\n\t\tthis.initializationMode = \"left\";\r\n\t\tthis.active = false;\r\n\t\tthis.scrollEndTimer = false;\r\n\t\tthis.blocked = true;\r\n\t\t\r\n\t\tthis.registerColumnOption(\"frozen\");\r\n\t}\r\n\t\r\n\t//reset initial state\r\n\treset(){\r\n\t\tthis.initializationMode = \"left\";\r\n\t\tthis.leftColumns = [];\r\n\t\tthis.rightColumns = [];\r\n\t\tthis.leftMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.active = false;\r\n\t\t\r\n\t\tthis.table.columnManager.headersElement.style.marginLeft = 0;\r\n\t\tthis.table.columnManager.element.style.paddingRight = 0;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-layout\", this.layoutCell.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"column-width\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"row-layout-after\", this.layoutRow.bind(this));\r\n\t\tthis.subscribe(\"table-layout\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t\tthis.subscribe(\"columns-loading\", this.reset.bind(this));\r\n\t\tthis.subscribe(\"table-redraw\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"layout-refreshing\", this.blockLayout.bind(this));\r\n\t\tthis.subscribe(\"layout-refreshed\", this.unblockLayout.bind(this));\r\n\t}\r\n\t\r\n\tblockLayout(){\r\n\t\tthis.blocked = true;\r\n\t}\r\n\t\r\n\tunblockLayout(){\r\n\t\tthis.blocked = false;\r\n\t}\r\n\t\r\n\tlayoutCell(cell){\r\n\t\tthis.layoutElement(cell.element, cell.column)\r\n\t}\r\n\t\r\n\t//initialize specific column\r\n\tinitializeColumn(column){\r\n\t\tvar config = {margin:0, edge:false};\r\n\t\t\r\n\t\tif(!column.isGroup){\r\n\t\t\t\r\n\t\t\tif(this.frozenCheck(column)){\r\n\t\t\t\t\r\n\t\t\t\tconfig.position = this.initializationMode;\r\n\t\t\t\t\r\n\t\t\t\tif(this.initializationMode == \"left\"){\r\n\t\t\t\t\tthis.leftColumns.push(column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.rightColumns.unshift(column);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.active = true;\r\n\t\t\t\t\r\n\t\t\t\tcolumn.modules.frozen = config;\r\n\t\t\t}else{\r\n\t\t\t\tthis.initializationMode = \"right\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfrozenCheck(column){\r\n\t\tvar frozen = false;\r\n\t\t\r\n\t\tif(column.parent.isGroup && column.definition.frozen){\r\n\t\t\tconsole.warn(\"Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups\");\r\n\t\t}\r\n\t\t\r\n\t\tif(column.parent.isGroup){\r\n\t\t\treturn this.frozenCheck(column.parent);\r\n\t\t}else{\r\n\t\t\treturn column.definition.frozen;\r\n\t\t}\r\n\t\t\r\n\t\treturn frozen;\r\n\t}\r\n\t\r\n\t//quick layout to smooth horizontal scrolling\r\n\tscrollHorizontal(){\r\n\t\tvar rows;\r\n\t\t\r\n\t\tif(this.active){\r\n\t\t\tclearTimeout(this.scrollEndTimer);\r\n\r\n\t\t\trows = this.table.rowManager.getVisibleRows();\r\n\t\t\t\r\n\t\t\tthis.calcMargins(true);\r\n\t\t\t\r\n\t\t\tthis.layoutColumnPosition();\r\n\t\t\t\r\n\t\t\tthis.layoutCalcRows();\r\n\t\t\t\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\t//calculate margins for rows\r\n\tcalcMargins(scroll){\r\n\t\t\r\n\t\tif(!scroll){\r\n\t\t\tthis.leftMargin = this._calcSpace(this.leftColumns, this.leftColumns.length) + \"px\";\t\t\t\r\n\t\t\tthis.rightMargin = this._calcSpace(this.rightColumns, this.rightColumns.length) + \"px\";\t\r\n\t\t\tthis.table.rowManager.tableElement.style.marginRight = this.rightMargin;\r\n\t\t}\r\n\t\r\n\t\t//calculate right frozen columns\r\n\t\tthis.rightPadding = this.table.rowManager.element.clientWidth + this.table.columnManager.scrollLeft;\r\n\t}\r\n\t\r\n\t//layout calculation rows\r\n\tlayoutCalcRows(){\r\n\t\tif(this.table.modExists(\"columnCalcs\")){\r\n\t\t\tif(this.table.modules.columnCalcs.topInitialized && this.table.modules.columnCalcs.topRow){\r\n\t\t\t\tthis.layoutRow(this.table.modules.columnCalcs.topRow);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.modules.columnCalcs.botInitialized && this.table.modules.columnCalcs.botRow){\r\n\t\t\t\tthis.layoutRow(this.table.modules.columnCalcs.botRow);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.modExists(\"groupRows\")){\r\n\t\t\t\tthis.layoutGroupCalcs(this.table.modules.groupRows.getGroups())\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutGroupCalcs(groups){\r\n\t\tgroups.forEach((group) => {\r\n\t\t\tif(group.calcs.top){\r\n\t\t\t\tthis.layoutRow(group.calcs.top);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(group.calcs.bottom){\r\n\t\t\t\tthis.layoutRow(group.calcs.bottom);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(group.groupList && group.groupList.length){\r\n\t\t\t\tthis.layoutGroupCalcs(group.groupList && group.groupList);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//calculate column positions and layout headers\r\n\tlayoutColumnPosition(allCells){\r\n\t\tvar leftParents = [];\r\n\t\t\r\n\t\tvar leftMargin = 0;\r\n\t\tvar rightMargin = 0;\r\n\t\t\r\n\t\tthis.table.columnManager.headersElement.style.marginLeft = this.leftMargin;\r\n\t\tthis.table.columnManager.element.style.paddingRight = this.rightMargin;\r\n\r\n\t\tthis.leftColumns.forEach((column, i) => {\t\r\n\t\t\tcolumn.modules.frozen.margin = (leftMargin + this.table.columnManager.scrollLeft) + \"px\";\r\n\r\n\t\t\tif(column.visible){\r\n\t\t\t\tleftMargin += column.getWidth();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(i == this.leftColumns.length - 1){\r\n\t\t\t\tcolumn.modules.frozen.edge = true;\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.modules.frozen.edge = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(column.parent.isGroup){\r\n\t\t\t\tvar parentEl = this.getColGroupParentElement(column);\r\n\t\t\t\tif(!leftParents.includes(parentEl)){\r\n\t\t\t\t\tthis.layoutElement(parentEl, column);\r\n\t\t\t\t\tleftParents.push(parentEl);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(column.modules.frozen.edge){\r\n\t\t\t\t\tparentEl.classList.add(\"tabulator-frozen-\" + column.modules.frozen.position);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.layoutElement(column.getElement(), column);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(allCells){\r\n\t\t\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.rightColumns.forEach((column, i) => {\r\n\r\n\t\t\tif(column.visible){\r\n\t\t\t\trightMargin += column.getWidth();\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.modules.frozen.margin = (this.rightPadding - rightMargin) + \"px\";\r\n\t\t\t\r\n\t\t\tif(i == this.rightColumns.length - 1){\r\n\t\t\t\tcolumn.modules.frozen.edge = true;\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.modules.frozen.edge = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(column.parent.isGroup){\r\n\t\t\t\tthis.layoutElement(this.getColGroupParentElement(column), column);\r\n\t\t\t}else{\r\n\t\t\t\tthis.layoutElement(column.getElement(), column);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(allCells){\r\n\t\t\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tgetColGroupParentElement(column){\r\n\t\treturn column.parent.isGroup ? this.getColGroupParentElement(column.parent) : column.getElement();\r\n\t}\r\n\t\r\n\t//layout columns appropriately\r\n\tlayout(){\r\n\t\tif(this.active && !this.blocked){\r\n\t\t\t//calculate row padding\r\n\t\t\tthis.calcMargins();\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) =>{\r\n\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.layoutCalcRows();\r\n\t\t\t\r\n\t\t\t//calculate left columns\r\n\t\t\tthis.layoutColumnPosition(true);\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\t\t\r\n\t\trowEl.style.paddingLeft = this.leftMargin;\r\n\t\t\r\n\t\tif(this.table.options.layout === \"fitDataFill\" && this.rightColumns.length){\r\n\t\t\tthis.table.rowManager.getTableElement().style.minWidth = \"calc(100% - \" + this.rightMargin + \")\";\r\n\t\t}\r\n\t\t\r\n\t\tthis.leftColumns.forEach((column) => {\r\n\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\r\n\t\t\tif(cell){\r\n\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.rightColumns.forEach((column) => {\r\n\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\r\n\t\t\tif(cell){\r\n\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tlayoutElement(element, column){\r\n\t\t\r\n\t\tif(column.modules.frozen){\r\n\t\t\telement.style.position = \"absolute\";\r\n\t\t\telement.style.left = column.modules.frozen.margin;\r\n\t\t\t\r\n\t\t\telement.classList.add(\"tabulator-frozen\");\r\n\t\t\t\r\n\t\t\tif(column.modules.frozen.edge){\r\n\t\t\t\telement.classList.add(\"tabulator-frozen-\" + column.modules.frozen.position);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_calcSpace(columns, index){\r\n\t\tvar width = 0;\r\n\t\t\r\n\t\tfor (let i = 0; i < index; i++){\r\n\t\t\tif(columns[i].visible){\r\n\t\t\t\twidth += columns[i].getWidth();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn width;\r\n\t}\r\n}\r\n\r\nFrozenColumns.moduleName = \"frozenColumns\";\r\n\r\nexport default FrozenColumns;","import Module from '../../core/Module.js';\r\n\r\nclass FrozenRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.topElement = document.createElement(\"div\");\r\n\t\tthis.rows = [];\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"freeze\", this.freezeRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"unfreeze\", this.unfreezeRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isFrozen\", this.isRowFrozen.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.rows = [];\r\n\r\n\t\tthis.topElement.classList.add(\"tabulator-frozen-rows-holder\");\r\n\r\n\t\t// this.table.columnManager.element.append(this.topElement);\r\n\t\tthis.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\r\n\r\n\t\tthis.subscribe(\"row-deleting\", this.detachRow.bind(this));\r\n\t\tthis.subscribe(\"rows-visible\", this.visibleRows.bind(this));\r\n\r\n\t\tthis.registerDisplayHandler(this.getRows.bind(this), 10);\r\n\t}\r\n\r\n\tisRowFrozen(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\t\treturn index > -1;\r\n\t}\r\n\r\n\tisFrozen(){\r\n\t\treturn !!this.rows.length;\r\n\t}\r\n\r\n\tvisibleRows(viewable, rows){\r\n\t\tthis.rows.forEach((row) => {\r\n\t\t\trows.push(row);\r\n\t\t});\r\n\r\n\t\treturn rows;\r\n\t}\r\n\r\n\t//filter frozen rows out of display data\r\n\tgetRows(rows){\r\n\t\tvar self = this,\r\n\t\tfrozen = [],\r\n\t\toutput = rows.slice(0);\r\n\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\tvar index = output.indexOf(row);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\toutput.splice(index, 1);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tfreezeRow(row){\r\n\t\tif(!row.modules.frozen){\r\n\t\t\trow.modules.frozen = true;\r\n\t\t\tthis.topElement.appendChild(row.getElement());\r\n\t\t\trow.initialize();\r\n\t\t\trow.normalizeHeight();\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\tthis.rows.push(row);\r\n\r\n\t\t\tthis.refreshData(false, \"display\")\r\n\r\n\t\t\tthis.styleRows();\r\n\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Freeze Error - Row is already frozen\");\r\n\t\t}\r\n\t}\r\n\r\n\tunfreezeRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\r\n\t\tif(row.modules.frozen){\r\n\r\n\t\t\trow.modules.frozen = false;\r\n\r\n\t\t\tthis.detachRow(row);\r\n\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\tthis.refreshData(false, \"display\")\r\n\r\n\t\t\tif(this.rows.length){\r\n\t\t\t\tthis.styleRows();\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Freeze Error - Row is already unfrozen\");\r\n\t\t}\r\n\t}\r\n\r\n\tdetachRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tvar rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\r\n\t\t\tthis.rows.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\tstyleRows(row){\r\n\t\tthis.rows.forEach((row, i) => {\r\n\t\t\tthis.table.rowManager.styleRow(row, i);\r\n\t\t});\r\n\t}\r\n}\r\n\r\nFrozenRows.moduleName = \"frozenRows\";\r\n\r\nexport default FrozenRows;","//public group object\r\nclass GroupComponent {\r\n\tconstructor (group){\r\n\t\tthis._group = group;\r\n\t\tthis.type = \"GroupComponent\";\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._group.groupManager.table.componentFunctionBinder.handle(\"row\", target._group, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetKey(){\r\n\t\treturn this._group.key;\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._group.field;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._group.element;\r\n\t}\r\n\r\n\tgetRows(){\r\n\t\treturn this._group.getRows(true);\r\n\t}\r\n\r\n\tgetSubGroups(){\r\n\t\treturn this._group.getSubGroups(true);\r\n\t}\r\n\r\n\tgetParentGroup(){\r\n\t\treturn this._group.parent ? this._group.parent.getComponent() : false;\r\n\t}\r\n\r\n\tisVisible(){\r\n\t\treturn this._group.visible;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tthis._group.show();\r\n\t}\r\n\r\n\thide(){\r\n\t\tthis._group.hide();\r\n\t}\r\n\r\n\ttoggle(){\r\n\t\tthis._group.toggleVisibility();\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._group;\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._group.groupManager.table;\r\n\t}\r\n}\r\n\r\nexport default GroupComponent;","import Helpers from '../../core/tools/Helpers.js';\r\nimport GroupComponent from './GroupComponent.js';\r\n\r\n//Group functions\r\nclass Group{\r\n\t\r\n\tconstructor(groupManager, parent, level, key, field, generator, oldGroup){\r\n\t\tthis.groupManager = groupManager;\r\n\t\tthis.parent = parent;\r\n\t\tthis.key = key;\r\n\t\tthis.level = level;\r\n\t\tthis.field = field;\r\n\t\tthis.hasSubGroups = level < (groupManager.groupIDLookups.length - 1);\r\n\t\tthis.addRow = this.hasSubGroups ? this._addRowToGroup : this._addRow;\r\n\t\tthis.type = \"group\"; //type of element\r\n\t\tthis.old = oldGroup;\r\n\t\tthis.rows = [];\r\n\t\tthis.groups = [];\r\n\t\tthis.groupList = [];\r\n\t\tthis.generator = generator;\r\n\t\tthis.element = false;\r\n\t\tthis.elementContents = false;\r\n\t\tthis.height = 0;\r\n\t\tthis.outerHeight = 0;\r\n\t\tthis.initialized = false;\r\n\t\tthis.calcs = {};\r\n\t\tthis.initialized = false;\r\n\t\tthis.modules = {};\r\n\t\tthis.arrowElement = false;\r\n\t\t\r\n\t\tthis.visible = oldGroup ? oldGroup.visible : (typeof groupManager.startOpen[level] !== \"undefined\" ? groupManager.startOpen[level] : groupManager.startOpen[0]);\r\n\t\t\r\n\t\tthis.component = null;\r\n\t\t\r\n\t\tthis.createElements();\r\n\t\tthis.addBindings();\r\n\t\t\r\n\t\tthis.createValueGroups();\r\n\t}\r\n\t\r\n\twipe(){\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\tgroup.wipe();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\tif(row.modules){\r\n\t\t\t\t\tdelete row.modules.group;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\tthis.element = false;\r\n\t\tthis.arrowElement = false;\r\n\t\tthis.elementContents = false;\r\n\t}\r\n\t\r\n\tcreateElements(){\r\n\t\tvar arrow = document.createElement(\"div\");\r\n\t\tarrow.classList.add(\"tabulator-arrow\");\r\n\t\t\r\n\t\tthis.element = document.createElement(\"div\");\r\n\t\tthis.element.classList.add(\"tabulator-row\");\r\n\t\tthis.element.classList.add(\"tabulator-group\");\r\n\t\tthis.element.classList.add(\"tabulator-group-level-\" + this.level);\r\n\t\tthis.element.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\tthis.arrowElement = document.createElement(\"div\");\r\n\t\tthis.arrowElement.classList.add(\"tabulator-group-toggle\");\r\n\t\tthis.arrowElement.appendChild(arrow);\r\n\t\t\r\n\t\t//setup movable rows\r\n\t\tif(this.groupManager.table.options.movableRows !== false && this.groupManager.table.modExists(\"moveRow\")){\r\n\t\t\tthis.groupManager.table.modules.moveRow.initializeGroupHeader(this);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcreateValueGroups(){\r\n\t\tvar level = this.level + 1;\r\n\t\tif(this.groupManager.allowedValues && this.groupManager.allowedValues[level]){\r\n\t\t\tthis.groupManager.allowedValues[level].forEach((value) => {\r\n\t\t\t\tthis._createGroup(value, level);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\taddBindings(){\r\n\t\tvar toggleElement;\r\n\t\t\r\n\t\tif(this.groupManager.table.options.groupToggleElement){\r\n\t\t\ttoggleElement = this.groupManager.table.options.groupToggleElement == \"arrow\" ? this.arrowElement : this.element;\r\n\t\t\t\r\n\t\t\ttoggleElement.addEventListener(\"click\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\tthis.toggleVisibility();\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\t_createGroup(groupID, level){\r\n\t\tvar groupKey = level + \"_\" + groupID;\r\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);\r\n\t\t\r\n\t\tthis.groups[groupKey] = group;\r\n\t\tthis.groupList.push(group);\r\n\t}\r\n\t\r\n\t_addRowToGroup(row){\r\n\t\t\r\n\t\tvar level = this.level + 1;\r\n\t\t\r\n\t\tif(this.hasSubGroups){\r\n\t\t\tvar groupID = this.groupManager.groupIDLookups[level].func(row.getData()),\r\n\t\t\tgroupKey = level + \"_\" + groupID;\r\n\t\t\t\r\n\t\t\tif(this.groupManager.allowedValues && this.groupManager.allowedValues[level]){\r\n\t\t\t\tif(this.groups[groupKey]){\r\n\t\t\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(!this.groups[groupKey]){\r\n\t\t\t\t\tthis._createGroup(groupID, level);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_addRow(row){\r\n\t\tthis.rows.push(row);\r\n\t\trow.modules.group = this;\r\n\t}\r\n\t\r\n\tinsertRow(row, to, after){\r\n\t\tvar data = this.conformRowData({});\r\n\t\t\r\n\t\trow.updateData(data);\r\n\t\t\r\n\t\tvar toIndex = this.rows.indexOf(to);\r\n\t\t\r\n\t\tif(toIndex > -1){\r\n\t\t\tif(after){\r\n\t\t\t\tthis.rows.splice(toIndex+1, 0, row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.splice(toIndex, 0, row);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(after){\r\n\t\t\t\tthis.rows.push(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.unshift(row);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\trow.modules.group = this;\r\n\t\t\r\n\t\tthis.generateGroupHeaderContents();\r\n\t\t\r\n\t\tif(this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\tthis.groupManager.table.modules.columnCalcs.recalcGroup(this);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.updateGroupRows(true);\r\n\t}\r\n\t\r\n\tscrollHeader(left){\r\n\t\tif(this.arrowElement){\r\n\t\t\tthis.arrowElement.style.marginLeft = left;\r\n\t\t\t\r\n\t\t\tthis.groupList.forEach(function(child){\r\n\t\t\t\tchild.scrollHeader(left);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRowIndex(row){}\r\n\t\r\n\t//update row data to match grouping contraints\r\n\tconformRowData(data){\r\n\t\tif(this.field){\r\n\t\t\tdata[this.field] = this.key;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Data Conforming Error - Cannot conform row data to match new group as groupBy is a function\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.parent){\r\n\t\t\tdata = this.parent.conformRowData(data);\r\n\t\t}\r\n\t\t\r\n\t\treturn data;\r\n\t}\r\n\t\r\n\tremoveRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\t\tvar el = row.getElement();\r\n\t\t\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.rows.splice(index, 1);\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.groupManager.table.options.groupValues && !this.rows.length){\r\n\t\t\tif(this.parent){\r\n\t\t\t\tthis.parent.removeGroup(this);\r\n\t\t\t}else{\r\n\t\t\t\tthis.groupManager.removeGroup(this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tif(el.parentNode){\r\n\t\t\t\tel.parentNode.removeChild(el);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.generateGroupHeaderContents();\r\n\t\t\t\r\n\t\t\tif(this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\t\tthis.groupManager.table.modules.columnCalcs.recalcGroup(this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveGroup(group){\r\n\t\tvar groupKey = group.level + \"_\" + group.key,\r\n\t\tindex;\r\n\t\t\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tdelete this.groups[groupKey];\r\n\t\t\t\r\n\t\t\tindex = this.groupList.indexOf(group);\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.groupList.splice(index, 1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!this.groupList.length){\r\n\t\t\t\tif(this.parent){\r\n\t\t\t\t\tthis.parent.removeGroup(this);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.groupManager.removeGroup(this);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetHeadersAndRows(noCalc){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\toutput.push(this);\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(this.visible){\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\t\toutput = output.concat(group.getHeadersAndRows(noCalc));\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tif(!noCalc && this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\r\n\t\t\t\t\tif(this.calcs.top){\r\n\t\t\t\t\t\tthis.calcs.top.detachElement();\r\n\t\t\t\t\t\tthis.calcs.top.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows);\r\n\t\t\t\t\toutput.push(this.calcs.top);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\toutput = output.concat(this.rows);\r\n\t\t\t\t\r\n\t\t\t\tif(!noCalc && this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\r\n\t\t\t\t\tif(this.calcs.bottom){\r\n\t\t\t\t\t\tthis.calcs.bottom.detachElement();\r\n\t\t\t\t\t\tthis.calcs.bottom.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows);\r\n\t\t\t\t\toutput.push(this.calcs.bottom);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!this.groupList.length && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\t\t\r\n\t\t\t\tif(this.groupManager.table.modExists(\"columnCalcs\")){\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!noCalc && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\r\n\t\t\t\t\t\tif(this.calcs.top){\r\n\t\t\t\t\t\t\tthis.calcs.top.detachElement();\r\n\t\t\t\t\t\t\tthis.calcs.top.deleteCells();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.groupManager.table.options.groupClosedShowCalcs){\r\n\t\t\t\t\t\t\tthis.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows);\r\n\t\t\t\t\t\t\toutput.push(this.calcs.top);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!noCalc && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\r\n\t\t\t\t\t\tif(this.calcs.bottom){\r\n\t\t\t\t\t\t\tthis.calcs.bottom.detachElement();\r\n\t\t\t\t\t\t\tthis.calcs.bottom.deleteCells();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.groupManager.table.options.groupClosedShowCalcs){\r\n\t\t\t\t\t\t\tthis.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows);\r\n\t\t\t\t\t\t\toutput.push(this.calcs.bottom);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetData(visible, transform){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(!visible || (visible && this.visible)){\r\n\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\toutput.push(row.getData(transform || \"data\"));\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetRowCount(){\r\n\t\tvar count = 0;\r\n\t\t\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\tcount += group.getRowCount();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tcount = this.rows.length;\r\n\t\t}\r\n\t\treturn count;\r\n\t}\r\n\t\r\n\ttoggleVisibility(){\r\n\t\tif(this.visible){\r\n\t\t\tthis.hide();\r\n\t\t}else{\r\n\t\t\tthis.show();\r\n\t\t}\r\n\t}\r\n\t\r\n\thide(){\r\n\t\tthis.visible = false;\r\n\t\t\r\n\t\tif(this.groupManager.table.rowManager.getRenderMode() == \"classic\" && !this.groupManager.table.options.pagination){\r\n\t\t\t\r\n\t\t\tthis.element.classList.remove(\"tabulator-group-visible\");\r\n\t\t\t\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar rows = group.getHeadersAndRows();\r\n\t\t\t\t\t\r\n\t\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\t\trow.detachElement();\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex());\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth();\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.table.externalEvents.dispatch(\"groupVisibilityChanged\", this.getComponent(), false);\r\n\t}\r\n\t\r\n\tshow(){\r\n\t\tthis.visible = true;\r\n\t\t\r\n\t\tif(this.groupManager.table.rowManager.getRenderMode() == \"classic\" && !this.groupManager.table.options.pagination){\r\n\t\t\t\r\n\t\t\tthis.element.classList.add(\"tabulator-group-visible\");\r\n\t\t\t\r\n\t\t\tvar prev = this.generateElement();\r\n\t\t\t\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\t\tvar rows = group.getHeadersAndRows();\r\n\t\t\t\t\t\r\n\t\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\t\tprev.parentNode.insertBefore(rowEl, prev.nextSibling);\r\n\t\t\t\t\t\trow.initialize();\r\n\t\t\t\t\t\tprev = rowEl;\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\tprev.parentNode.insertBefore(rowEl, prev.nextSibling);\r\n\t\t\t\t\trow.initialize();\r\n\t\t\t\t\tprev = rowEl;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex());\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth();\r\n\t\t}else{\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.table.externalEvents.dispatch(\"groupVisibilityChanged\", this.getComponent(), true);\r\n\t}\r\n\t\r\n\t_visSet(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tif(typeof this.visible == \"function\"){\r\n\t\t\t\r\n\t\t\tthis.rows.forEach(function(row){\r\n\t\t\t\tdata.push(row.getData());\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.visible = this.visible(this.key, this.getRowCount(), data, this.getComponent());\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRowGroup(row){\r\n\t\tvar match = false;\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\tvar result = group.getRowGroup(row);\r\n\t\t\t\t\r\n\t\t\t\tif(result){\r\n\t\t\t\t\tmatch = result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tif(this.rows.find(function(item){\r\n\t\t\t\treturn item === row;\r\n\t\t\t})){\r\n\t\t\t\tmatch = this;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn match;\r\n\t}\r\n\t\r\n\tgetSubGroups(component){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.groupList.forEach(function(child){\r\n\t\t\toutput.push(component ? child.getComponent() : child);\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetRows(compoment){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\toutput.push(compoment ? row.getComponent() : row);\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgenerateGroupHeaderContents(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\tdata.push(row.getData());\r\n\t\t});\r\n\t\t\r\n\t\tthis.elementContents = this.generator(this.key, this.getRowCount(), data, this.getComponent());\r\n\t\t\r\n\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\t\t\r\n\t\tif(typeof this.elementContents === \"string\"){\r\n\t\t\tthis.element.innerHTML = this.elementContents;\r\n\t\t}else{\r\n\t\t\tthis.element.appendChild(this.elementContents);\r\n\t\t}\r\n\t\t\r\n\t\tthis.element.insertBefore(this.arrowElement, this.element.firstChild);\r\n\t}\r\n\t\r\n\tgetPath(path = []) {\r\n\t\tpath.unshift(this.key);\r\n\t\tif(this.parent) {\r\n\t\t\tthis.parent.getPath(path);\r\n\t\t}\r\n\t\treturn path;\r\n\t}\r\n\t\r\n\t////////////// Standard Row Functions //////////////\r\n\t\r\n\tgetElement(){\r\n\t\treturn this.elementContents ? this.element : this.generateElement();\r\n\t}\r\n\t\r\n\tgenerateElement(){\r\n\t\tthis.addBindings = false;\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(this.visible){\r\n\t\t\tthis.element.classList.add(\"tabulator-group-visible\");\r\n\t\t}else{\r\n\t\t\tthis.element.classList.remove(\"tabulator-group-visible\");\r\n\t\t}\r\n\t\t\r\n\t\tfor(var i = 0; i < this.element.childNodes.length; ++i){\r\n\t\t\tthis.element.childNodes[i].parentNode.removeChild(this.element.childNodes[i]);\r\n\t\t}\r\n\t\t\r\n\t\tthis.generateGroupHeaderContents();\r\n\t\t\r\n\t\t// this.addBindings();\r\n\t\t\r\n\t\treturn this.element;\r\n\t}\r\n\t\r\n\tdetachElement(){\r\n\t\tif (this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\t//normalize the height of elements in the row\r\n\tnormalizeHeight(){\r\n\t\tthis.setHeight(this.element.clientHeight);\r\n\t}\r\n\t\r\n\tinitialize(force){\r\n\t\tif(!this.initialized || force){\r\n\t\t\tthis.normalizeHeight();\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitialize(){\r\n\t\tthis.initialized = false;\r\n\t\tthis.height = 0;\r\n\t\t\r\n\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\tthis.initialize(true);\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetHeight(height){\r\n\t\tif(this.height != height){\r\n\t\t\tthis.height = height;\r\n\t\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return rows outer height\r\n\tgetHeight(){\r\n\t\treturn this.outerHeight;\r\n\t}\r\n\t\r\n\tgetGroup(){\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\treinitializeHeight(){}\r\n\t\r\n\tcalcHeight(){}\r\n\t\r\n\tsetCellHeight(){}\r\n\t\r\n\tclearCellHeight(){}\r\n\t\r\n\tdeinitializeHeight(){}\r\n\t\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new GroupComponent(this);\r\n\t\t}\r\n\t\t\r\n\t\treturn this.component;\r\n\t}\r\n}\r\n\r\nexport default Group;","import Module from '../../core/Module.js';\r\n\r\nimport GroupComponent from './GroupComponent.js';\r\nimport Group from './Group.js';\r\n\r\nclass GroupRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.groupIDLookups = false; //enable table grouping and set field to group by\r\n\t\tthis.startOpen = [function(){return false;}]; //starting state of group\r\n\t\tthis.headerGenerator = [function(){return \"\";}];\r\n\t\tthis.groupList = []; //ordered list of groups\r\n\t\tthis.allowedValues = false;\r\n\t\tthis.groups = {}; //hold row groups\r\n\t\tthis.displayIndex = 0; //index in display pipeline\r\n\r\n\t\tthis.displayHandler = this.getRows.bind(this);\r\n\r\n\t\t//register table options\r\n\t\tthis.registerTableOption(\"groupBy\", false); //enable table grouping and set field to group by\r\n\t\tthis.registerTableOption(\"groupStartOpen\", true); //starting state of group\r\n\t\tthis.registerTableOption(\"groupValues\", false);\r\n\t\tthis.registerTableOption(\"groupUpdateOnCellEdit\", false);\r\n\t\tthis.registerTableOption(\"groupHeader\", false); //header generation function\r\n\t\tthis.registerTableOption(\"groupHeaderPrint\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderClipboard\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderHtmlOutput\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderDownload\", null);\r\n\t\tthis.registerTableOption(\"groupToggleElement\", \"arrow\");\r\n\t\tthis.registerTableOption(\"groupClosedShowCalcs\", false);\r\n\r\n\t\t//register table functions\r\n\t\tthis.registerTableFunction(\"setGroupBy\", this.setGroupBy.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupValues\", this.setGroupValues.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupStartOpen\", this.setGroupStartOpen.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupHeader\", this.setGroupHeader.bind(this));\r\n\t\tthis.registerTableFunction(\"getGroups\", this.userGetGroups.bind(this));\r\n\t\tthis.registerTableFunction(\"getGroupedData\", this.userGetGroupedData.bind(this));\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"getGroup\", this.rowGetGroup.bind(this));\r\n\t}\r\n\r\n\t//initialize group configuration\r\n\tinitialize(){\r\n\t\tif(this.table.options.groupBy){\r\n\r\n\t\t\tif(this.table.options.groupUpdateOnCellEdit){\r\n\t\t\t\tthis.subscribe(\"cell-value-updated\", this.cellUpdated.bind(this));\r\n\t\t\t\tthis.subscribe(\"row-data-changed\", this.reassignRowToGroup.bind(this), 0);\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-built\", this.configureGroupSetup.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"row-deleting\", this.rowDeleting.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHeaders.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.wipe.bind(this));\r\n\t\t\tthis.subscribe(\"rows-added\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"row-moving\", this.rowMoving.bind(this));\r\n\t\t\tthis.subscribe(\"row-adding-index\", this.rowAddingIndex.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"rows-sample\", this.rowSample.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"render-virtual-fill\", this.virtualRenderFill.bind(this));\r\n\r\n\t\t\tthis.registerDisplayHandler(this.displayHandler, 20);\r\n\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tconfigureGroupSetup(){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tvar groupBy = this.table.options.groupBy,\r\n\t\t\tstartOpen = this.table.options.groupStartOpen,\r\n\t\t\tgroupHeader = this.table.options.groupHeader;\r\n\r\n\t\t\tthis.allowedValues = this.table.options.groupValues;\r\n\r\n\t\t\tif(Array.isArray(groupBy) && Array.isArray(groupHeader) && groupBy.length > groupHeader.length){\r\n\t\t\t\tconsole.warn(\"Error creating group headers, groupHeader array is shorter than groupBy array\");\r\n\t\t\t}\r\n\r\n\t\t\tthis.headerGenerator = [function(){return \"\";}];\r\n\t\t\tthis.startOpen = [function(){return false;}]; //starting state of group\r\n\r\n\t\t\tthis.langBind(\"groups|item\", (langValue, lang) => {\r\n\t\t\t\tthis.headerGenerator[0] = (value, count, data) => { //header layout function\r\n\t\t\t\t\treturn (typeof value === \"undefined\" ? \"\" : value) + \"(\" + count + \" \" + ((count === 1) ? langValue : lang.groups.items) + \")\";\r\n\t\t\t\t};\r\n\t\t\t});\r\n\r\n\t\t\tthis.groupIDLookups = [];\r\n\r\n\t\t\tif(Array.isArray(groupBy) || groupBy){\r\n\t\t\t\tif(this.table.modExists(\"columnCalcs\") && this.table.options.columnCalcs != \"table\" && this.table.options.columnCalcs != \"both\"){\r\n\t\t\t\t\tthis.table.modules.columnCalcs.removeCalcs();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.modExists(\"columnCalcs\") && this.table.options.columnCalcs != \"group\"){\r\n\r\n\t\t\t\t\tvar cols = this.table.columnManager.getRealColumns();\r\n\r\n\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\tif(col.definition.topCalc){\r\n\t\t\t\t\t\t\tthis.table.modules.columnCalcs.initializeTopRow();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(col.definition.bottomCalc){\r\n\t\t\t\t\t\t\tthis.table.modules.columnCalcs.initializeBottomRow();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(!Array.isArray(groupBy)){\r\n\t\t\t\tgroupBy = [groupBy];\r\n\t\t\t}\r\n\r\n\t\t\tgroupBy.forEach((group, i) => {\r\n\t\t\t\tvar lookupFunc, column;\r\n\r\n\t\t\t\tif(typeof group == \"function\"){\r\n\t\t\t\t\tlookupFunc = group;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolumn = this.table.columnManager.getColumnByField(group);\r\n\r\n\t\t\t\t\tif(column){\r\n\t\t\t\t\t\tlookupFunc = function(data){\r\n\t\t\t\t\t\t\treturn column.getFieldValue(data);\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tlookupFunc = function(data){\r\n\t\t\t\t\t\t\treturn data[group];\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.groupIDLookups.push({\r\n\t\t\t\t\tfield: typeof group === \"function\" ? false : group,\r\n\t\t\t\t\tfunc:lookupFunc,\r\n\t\t\t\t\tvalues:this.allowedValues ? this.allowedValues[i] : false,\r\n\t\t\t\t});\r\n\t\t\t});\r\n\r\n\t\t\tif(startOpen){\r\n\t\t\t\tif(!Array.isArray(startOpen)){\r\n\t\t\t\t\tstartOpen = [startOpen];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstartOpen.forEach((level) => {\r\n\t\t\t\t\tlevel = typeof level == \"function\" ? level : function(){return true;};\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.startOpen = startOpen;\r\n\t\t\t}\r\n\r\n\t\t\tif(groupHeader){\r\n\t\t\t\tthis.headerGenerator = Array.isArray(groupHeader) ? groupHeader : [groupHeader];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trowSample(rows, prevValue){\r\n\t\tvar group = this.getGroups(false)[0];\r\n\r\n\t\tprevValue.push(group.getRows(false)[0]);\r\n\r\n\t\treturn prevValue;\r\n\t}\r\n\r\n\tvirtualRenderFill(){\r\n\t\tvar el = this.table.rowManager.tableElement;\r\n\t\tvar rows = this.table.rowManager.getVisibleRows();\r\n\r\n\t\trows = rows.filter((row) => {\r\n\t\t\treturn row.type !== \"group\";\r\n\t\t});\r\n\r\n\t\tel.style.minWidth = !rows.length ? this.table.columnManager.getWidth() + \"px\" : \"\";\r\n\r\n\t\t// if(this.table.options.groupBy){\r\n\t\t// \tif(this.layoutMode() != \"fitDataFill\" && rowsCount == this.table.modules.groupRows.countGroups()){\r\n\t\t// \t\tel.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t// \t}\r\n\t\t// }\r\n\t}\r\n\r\n\trowAddingIndex(row, index, top){\r\n\t\tthis.assignRowToGroup(row);\r\n\r\n\t\tvar groupRows = row.modules.group.rows;\r\n\r\n\t\tif(groupRows.length > 1){\r\n\t\t\tif(!index || (index && groupRows.indexOf(index) == -1)){\r\n\t\t\t\tif(top){\r\n\t\t\t\t\tif(groupRows[0] !== row){\r\n\t\t\t\t\t\tindex = groupRows[0];\r\n\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(groupRows[groupRows.length -1] !== row){\r\n\t\t\t\t\t\tindex = groupRows[groupRows.length -1];\r\n\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn index;\r\n\t}\r\n\r\n\ttrackChanges(){\r\n\t\tthis.dispatch(\"group-changed\");\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tsetGroupBy(groups){\r\n\t\tthis.table.options.groupBy = groups;\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.initialize();\r\n\t\t}else{\r\n\t\t\tthis.configureGroupSetup();\r\n\t\t}\r\n\r\n\t\tthis.refreshData();\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\tsetGroupValues(groupValues){\r\n\t\tthis.table.options.groupValues = groupValues;\r\n\t\tthis.configureGroupSetup();\r\n\t\tthis.refreshData();\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\tsetGroupStartOpen(values){\r\n\t\tthis.table.options.groupStartOpen = values;\r\n\t\tthis.configureGroupSetup();\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\r\n\t\t\tthis.trackChanges();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Grouping Update - cant refresh view, no groups have been set\");\r\n\t\t}\r\n\t}\r\n\r\n\tsetGroupHeader(values){\r\n\t\tthis.table.options.groupHeader = values;\r\n\t\tthis.configureGroupSetup();\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\r\n\t\t\tthis.trackChanges();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Grouping Update - cant refresh view, no groups have been set\");\r\n\t\t}\r\n\t}\r\n\r\n\tuserGetGroups(values){\r\n\t\treturn this.getGroups(true);\r\n\t}\r\n\r\n\t// get grouped table data in the same format as getData()\r\n\tuserGetGroupedData(){\r\n\t\treturn this.table.options.groupBy ?\r\n\t\tthis.getGroupedData() : this.getData()\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////////\r\n\t///////// Component Functions /////////\r\n\t///////////////////////////////////////\r\n\r\n\trowGetGroup(row){\r\n\t\treturn row.modules.group ? row.modules.group.getComponent() : false;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\trowMoving(from, to, after){\r\n\t\tif(!after && to instanceof Group){\r\n\t\t\tto = this.table.rowManager.prevDisplayRow(from) || to;\r\n\t\t}\r\n\r\n\t\tvar toGroup = to instanceof Group ? to : to.modules.group;\r\n\t\tvar fromGroup = from instanceof Group ? from : from.modules.group;\r\n\r\n\t\tif(toGroup === fromGroup){\r\n\t\t\tthis.table.rowManager.moveRowInArray(toGroup.rows, from, to, after);\r\n\t\t}else{\r\n\t\t\tif(fromGroup){\r\n\t\t\t\tfromGroup.removeRow(from);\r\n\t\t\t}\r\n\r\n\t\t\ttoGroup.insertRow(from, to, after);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trowDeleting(row){\r\n\t\t//remove from group\r\n\t\tif(row.modules.group){\r\n\t\t\trow.modules.group.removeRow(row);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trowsUpdated(row){\r\n\t\tthis.updateGroupRows(true);\r\n\t}\r\n\r\n\tcellUpdated(cell){\r\n\t\tthis.reassignRowToGroup(cell.row);\r\n\t}\r\n\r\n\r\n\tsetDisplayIndex(index){\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\r\n\tgetDisplayIndex(){\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\r\n\t//return appropriate rows with group headers\r\n\tgetRows(rows){\r\n\t\tif(this.table.options.groupBy && this.groupIDLookups.length){\r\n\r\n\t\t\tthis.dispatchExternal(\"dataGrouping\");\r\n\r\n\t\t\tthis.generateGroups(rows);\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataGrouped\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataGrouped\", this.getGroups(true));\r\n\t\t\t}\r\n\r\n\t\t\treturn this.updateGroupRows();\r\n\r\n\t\t}else{\r\n\t\t\treturn rows.slice(0);\r\n\t\t}\r\n\t}\r\n\r\n\tgetGroups(component){\r\n\t\tvar groupComponents = [];\r\n\r\n\t\tthis.groupList.forEach(function(group){\r\n\t\t\tgroupComponents.push(component ? group.getComponent() : group);\r\n\t\t});\r\n\r\n\t\treturn groupComponents;\r\n\t}\r\n\r\n\tgetChildGroups(group){\r\n\t\tvar groupComponents = [];\r\n\r\n\t\tif(!group){\r\n\t\t\tgroup = this;\r\n\t\t}\r\n\r\n\t\tgroup.groupList.forEach((child) => {\r\n\t\t\tif(child.groupList.length){\r\n\t\t\t\tgroupComponents = groupComponents.concat(this.getChildGroups(child));\r\n\t\t\t}else{\r\n\t\t\t\tgroupComponents.push(child);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn groupComponents;\r\n\t}\r\n\r\n\twipe(){\r\n\t\tthis.groupList.forEach(function(group){\r\n\t\t\tgroup.wipe();\r\n\t\t});\r\n\t}\r\n\r\n\tpullGroupListData(groupList) {\r\n\t\tvar groupListData = [];\r\n\r\n\t\tgroupList.forEach((group) => {\r\n\t\t\tvar groupHeader = {};\r\n\t\t\tgroupHeader.level = 0;\r\n\t\t\tgroupHeader.rowCount = 0;\r\n\t\t\tgroupHeader.headerContent = \"\";\r\n\t\t\tvar childData = [];\r\n\r\n\t\t\tif (group.hasSubGroups) {\r\n\t\t\t\tchildData = this.pullGroupListData(group.groupList);\r\n\r\n\t\t\t\tgroupHeader.level = group.level;\r\n\t\t\t\tgroupHeader.rowCount = childData.length - group.groupList.length; // data length minus number of sub-headers\r\n\t\t\t\tgroupHeader.headerContent = group.generator(group.key, groupHeader.rowCount, group.rows, group);\r\n\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\t\t\t\tgroupListData = groupListData.concat(childData);\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tgroupHeader.level = group.level;\r\n\t\t\t\tgroupHeader.headerContent = group.generator(group.key, group.rows.length, group.rows, group);\r\n\t\t\t\tgroupHeader.rowCount = group.getRows().length;\r\n\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\r\n\t\t\t\tgroup.getRows().forEach((row) => {\r\n\t\t\t\t\tgroupListData.push(row.getData(\"data\"));\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn groupListData\r\n\t}\r\n\r\n\tgetGroupedData(){\r\n\r\n\t\treturn this.pullGroupListData(this.groupList);\r\n\t}\r\n\r\n\tgetRowGroup(row){\r\n\t\tvar match = false;\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\tvar result = group.getRowGroup(row);\r\n\r\n\t\t\tif(result){\r\n\t\t\t\tmatch = result;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tcountGroups(){\r\n\t\treturn this.groupList.length;\r\n\t}\r\n\r\n\tgenerateGroups(rows){\r\n\t\tvar oldGroups = this.groups;\r\n\r\n\t\tthis.groups = {};\r\n\t\tthis.groupList = [];\r\n\r\n\t\tif(this.allowedValues && this.allowedValues[0]){\r\n\t\t\tthis.allowedValues[0].forEach((value) => {\r\n\t\t\t\tthis.createGroup(value, 0, oldGroups);\r\n\t\t\t});\r\n\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tthis.assignRowToExistingGroup(row, oldGroups);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tthis.assignRowToGroup(row, oldGroups);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tcreateGroup(groupID, level, oldGroups){\r\n\t\tvar groupKey = level + \"_\" + groupID,\r\n\t\tgroup;\r\n\r\n\t\toldGroups = oldGroups || [];\r\n\r\n\t\tgroup = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]);\r\n\r\n\t\tthis.groups[groupKey] = group;\r\n\t\tthis.groupList.push(group);\r\n\t}\r\n\r\n\tassignRowToExistingGroup(row, oldGroups){\r\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\r\n\t\tgroupKey = \"0_\" + groupID;\r\n\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t}\r\n\t}\r\n\r\n\tassignRowToGroup(row, oldGroups){\r\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\r\n\t\tnewGroupNeeded = !this.groups[\"0_\" + groupID];\r\n\r\n\t\tif(newGroupNeeded){\r\n\t\t\tthis.createGroup(groupID, 0, oldGroups);\r\n\t\t}\r\n\r\n\t\tthis.groups[\"0_\" + groupID].addRow(row);\r\n\r\n\t\treturn !newGroupNeeded;\r\n\t}\r\n\r\n\treassignRowToGroup(row){\r\n\t\tif(row.type === \"row\"){\r\n\t\t\tvar oldRowGroup = row.modules.group,\r\n\t\t\toldGroupPath = oldRowGroup.getPath(),\r\n\t\t\tnewGroupPath = this.getExpectedPath(row),\r\n\t\t\tsamePath = true;\r\n\r\n\t\t\t// figure out if new group path is the same as old group path\r\n\t\t\tvar samePath = (oldGroupPath.length == newGroupPath.length) && oldGroupPath.every((element, index) => {\r\n\t\t\t\treturn element === newGroupPath[index];\r\n\t\t\t});\r\n\r\n\t\t\t// refresh if they new path and old path aren't the same (aka the row's groupings have changed)\r\n\t\t\tif(!samePath) {\r\n\t\t\t\toldRowGroup.removeRow(row);\r\n\t\t\t\tthis.assignRowToGroup(row, this.groups);\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgetExpectedPath(row) {\r\n\t\tvar groupPath = [], rowData = row.getData();\r\n\r\n\t\tthis.groupIDLookups.forEach((groupId) => {\r\n\t\t\tgroupPath.push(groupId.func(rowData));\r\n\t\t});\r\n\r\n\t\treturn groupPath;\r\n\t}\r\n\r\n\tupdateGroupRows(force){\r\n\t\tvar output = [],\r\n\t\toldRowCount;\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\toutput = output.concat(group.getHeadersAndRows());\r\n\t\t});\r\n\r\n\t\tif(force){\r\n\t\t\tthis.refreshData(true, this.displayHandler);\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tscrollHeaders(left){\r\n\t\tif(this.table.options.renderHorizontal === \"virtual\"){\r\n\t\t\tleft -= this.table.columnManager.renderer.vDomPadLeft;\r\n\t\t}\r\n\r\n\t\tleft = left + \"px\";\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\tgroup.scrollHeader(left);\r\n\t\t});\r\n\t}\r\n\r\n\tremoveGroup(group){\r\n\t\tvar groupKey = group.level + \"_\" + group.key,\r\n\t\tindex;\r\n\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tdelete this.groups[groupKey];\r\n\r\n\t\t\tindex = this.groupList.indexOf(group);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.groupList.splice(index, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nGroupRows.moduleName = \"groupRows\";\r\n\r\nexport default GroupRows;","export default {\r\n\tcellEdit: function(action){\r\n\t\taction.component.setValueProcessData(action.data.oldValue);\r\n\t\taction.component.cellRendered();\r\n\t},\r\n\r\n\trowAdd: function(action){\r\n\t\taction.component.deleteActual();\r\n\t},\r\n\r\n\trowDelete: function(action){\r\n\t\tvar newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index);\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tthis.table.modules.groupRows.updateGroupRows(true);\r\n\t\t}\r\n\r\n\t\tthis._rebindRow(action.component, newRow);\r\n\t},\r\n\r\n\trowMove: function(action){\r\n\t\tthis.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posFrom], !action.data.after);\r\n\t\tthis.table.rowManager.redraw();\r\n\t},\r\n};","export default {\r\n\tcellEdit: function(action){\r\n\t\taction.component.setValueProcessData(action.data.newValue);\r\n\t\taction.component.cellRendered();\r\n\t},\r\n\r\n\trowAdd: function(action){\r\n\t\tvar newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index);\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tthis.table.modules.groupRows.updateGroupRows(true);\r\n\t\t}\r\n\r\n\t\tthis._rebindRow(action.component, newRow);\r\n\t},\r\n\r\n\trowDelete:function(action){\r\n\t\taction.component.deleteActual();\r\n\t},\r\n\r\n\trowMove: function(action){\r\n\t\tthis.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posTo], action.data.after);\r\n\t\tthis.table.rowManager.redraw();\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\nimport Row from '../../core/row/Row.js';\r\nimport Cell from '../../core/cell/Cell.js';\r\n\r\nimport defaultUndoers from './defaults/undoers.js';\r\nimport defaultRedoers from './defaults/redoers.js';\r\n\r\nclass History extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.history = [];\r\n\t\tthis.index = -1;\r\n\r\n\t\tthis.registerTableOption(\"history\", false); //enable edit history\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.history){\r\n\t\t\tthis.subscribe(\"cell-value-updated\", this.cellUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"cell-delete\", this.clearComponentHistory.bind(this));\r\n\t\t\tthis.subscribe(\"row-delete\", this.rowDeleted.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.clear.bind(this));\r\n\t\t\tthis.subscribe(\"row-added\", this.rowAdded.bind(this));\r\n\t\t\tthis.subscribe(\"row-move\", this.rowMoved.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"undo\", this.undo.bind(this));\r\n\t\tthis.registerTableFunction(\"redo\", this.redo.bind(this));\r\n\t\tthis.registerTableFunction(\"getHistoryUndoSize\", this.getHistoryUndoSize.bind(this));\r\n\t\tthis.registerTableFunction(\"getHistoryRedoSize\", this.getHistoryRedoSize.bind(this));\r\n\t\tthis.registerTableFunction(\"clearHistory\", this.clear.bind(this));\r\n\t}\r\n\r\n\trowMoved(from, to, after){\r\n\t\tthis.action(\"rowMove\", from, {posFrom:this.table.rowManager.getRowPosition(from), posTo:this.table.rowManager.getRowPosition(to), to:to, after:after});\r\n\t}\r\n\r\n\trowAdded(row, data, pos, index){\r\n\t\tthis.action(\"rowAdd\", row, {data:data, pos:pos, index:index});\r\n\t}\r\n\r\n\trowDeleted(row){\r\n\t\tvar index, rows;\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\r\n\t\t\trows = row.getComponent().getGroup().rows\r\n\t\t\tindex = rows.indexOf(row);\r\n\r\n\t\t\tif(index){\r\n\t\t\t\tindex = rows[index-1];\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tindex = row.table.rowManager.getRowIndex(row);\r\n\r\n\t\t\tif(index){\r\n\t\t\t\tindex = row.table.rowManager.rows[index-1];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.action(\"rowDelete\", row, {data:row.getData(), pos:!index, index:index});\r\n\t}\r\n\r\n\tcellUpdated(cell){\r\n\t\tthis.action(\"cellEdit\", cell, {oldValue:cell.oldValue, newValue:cell.value});\r\n\t}\r\n\r\n\tclear(){\r\n\t\tthis.history = [];\r\n\t\tthis.index = -1;\r\n\t}\r\n\r\n\taction(type, component, data){\r\n\t\tthis.history = this.history.slice(0, this.index + 1);\r\n\r\n\t\tthis.history.push({\r\n\t\t\ttype:type,\r\n\t\t\tcomponent:component,\r\n\t\t\tdata:data,\r\n\t\t});\r\n\r\n\t\tthis.index ++;\r\n\t}\r\n\r\n\tgetHistoryUndoSize(){\r\n\t\treturn this.index + 1;\r\n\t}\r\n\r\n\tgetHistoryRedoSize(){\r\n\t\treturn this.history.length - (this.index + 1);\r\n\t}\r\n\r\n\tclearComponentHistory(component){\r\n\t\tvar index = this.history.findIndex(function(item){\r\n\t\t\treturn item.component === component;\r\n\t\t});\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.history.splice(index, 1);\r\n\t\t\tif(index <= this.index){\r\n\t\t\t\tthis.index--;\r\n\t\t\t}\r\n\r\n\t\t\tthis.clearComponentHistory(component);\r\n\t\t}\r\n\t}\r\n\r\n\tundo(){\r\n\t\tif(this.index > -1){\r\n\t\t\tlet action = this.history[this.index];\r\n\r\n\t\t\tHistory.undoers[action.type].call(this, action);\r\n\r\n\t\t\tthis.index--;\r\n\r\n\t\t\tthis.dispatchExternal(\"historyUndo\", action.type, action.component.getComponent(), action.data);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"History Undo Error - No more history to undo\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tredo(){\r\n\t\tif(this.history.length-1 > this.index){\r\n\r\n\t\t\tthis.index++;\r\n\r\n\t\t\tlet action = this.history[this.index];\r\n\r\n\t\t\tHistory.redoers[action.type].call(this, action);\r\n\r\n\t\t\tthis.dispatchExternal(\"historyRedo\", action.type, action.component.getComponent(), action.data);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"History Redo Error - No more history to redo\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//rebind rows to new element after deletion\r\n\t_rebindRow(oldRow, newRow){\r\n\t\tthis.history.forEach(function(action){\r\n\t\t\tif(action.component instanceof Row){\r\n\t\t\t\tif(action.component === oldRow){\r\n\t\t\t\t\taction.component = newRow;\r\n\t\t\t\t}\r\n\t\t\t}else if(action.component instanceof Cell){\r\n\t\t\t\tif(action.component.row === oldRow){\r\n\t\t\t\t\tvar field = action.component.column.getField();\r\n\r\n\t\t\t\t\tif(field){\r\n\t\t\t\t\t\taction.component = newRow.getCell(field);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}\r\n\r\nHistory.moduleName = \"history\";\r\n\r\n//load defaults\r\nHistory.undoers = defaultUndoers;\r\nHistory.redoers = defaultRedoers;\r\n\r\nexport default History;","import Module from '../../core/Module.js';\r\nimport Column from '../../core/column/Column.js';\r\n\r\nclass HtmlTableImport extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.fieldIndex = [];\r\n\t\tthis.hasIndex = false;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.tableElementCheck();\r\n\t}\r\n\r\n\ttableElementCheck(){\r\n\t\tif(this.table.originalElement && this.table.originalElement.tagName === \"TABLE\"){\r\n\t\t\tthis.parseTable();\r\n\t\t}\r\n\t}\r\n\r\n\tparseTable(){\r\n\t\tvar element = this.table.originalElement,\r\n\t\toptions = this.table.options,\r\n\t\tcolumns = options.columns,\r\n\t\theaders = element.getElementsByTagName(\"th\"),\r\n\t\trows = element.getElementsByTagName(\"tbody\")[0],\r\n\t\tdata = [],\r\n\t\tnewTable;\r\n\r\n\t\tthis.hasIndex = false;\r\n\r\n\t\tthis.dispatchExternal(\"htmlImporting\");\r\n\r\n\t\trows = rows ? rows.getElementsByTagName(\"tr\") : [];\r\n\r\n\t\t//check for Tabulator inline options\r\n\t\tthis._extractOptions(element, options);\r\n\r\n\t\tif(headers.length){\r\n\t\t\tthis._extractHeaders(headers, rows);\r\n\t\t}else{\r\n\t\t\tthis._generateBlankHeaders(headers, rows);\r\n\t\t}\r\n\r\n\t\t//iterate through table rows and build data set\r\n\t\tfor(var index = 0; index < rows.length; index++){\r\n\t\t\tvar row = rows[index],\r\n\t\t\tcells = row.getElementsByTagName(\"td\"),\r\n\t\t\titem = {};\r\n\r\n\t\t\t//create index if the dont exist in table\r\n\t\t\tif(!this.hasIndex){\r\n\t\t\t\titem[options.index] = index;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\tvar cell = cells[i];\r\n\t\t\t\tif(typeof this.fieldIndex[i] !== \"undefined\"){\r\n\t\t\t\t\titem[this.fieldIndex[i]] = cell.innerHTML;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//add row data to item\r\n\t\t\tdata.push(item);\r\n\t\t}\r\n\r\n\t\toptions.data = data;\r\n\r\n\t\tthis.dispatchExternal(\"htmlImported\");\r\n\t}\r\n\r\n\t//extract tabulator attribute options\r\n\t_extractOptions(element, options, defaultOptions){\r\n\t\tvar attributes = element.attributes;\r\n\t\tvar optionsArr = defaultOptions ? Object.keys(defaultOptions) : Object.keys(options);\r\n\t\tvar optionsList = {};\r\n\r\n\t\toptionsArr.forEach((item) => {\r\n\t\t\toptionsList[item.toLowerCase()] = item;\r\n\t\t});\r\n\r\n\t\tfor(var index in attributes){\r\n\t\t\tvar attrib = attributes[index];\r\n\t\t\tvar name;\r\n\r\n\t\t\tif(attrib && typeof attrib == \"object\" && attrib.name && attrib.name.indexOf(\"tabulator-\") === 0){\r\n\t\t\t\tname = attrib.name.replace(\"tabulator-\", \"\");\r\n\r\n\t\t\t\tif(typeof optionsList[name] !== \"undefined\"){\r\n\t\t\t\t\toptions[optionsList[name]] = this._attribValue(attrib.value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//get value of attribute\r\n\t_attribValue(value){\r\n\t\tif(value === \"true\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif(value === \"false\"){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\t//find column if it has already been defined\r\n\t_findCol(title){\r\n\t\tvar match = this.table.options.columns.find((column) => {\r\n\t\t\treturn column.title === title;\r\n\t\t});\r\n\r\n\t\treturn match || false;\r\n\t}\r\n\r\n\t//extract column from headers\r\n\t_extractHeaders(headers, rows){\r\n\t\tfor(var index = 0; index < headers.length; index++){\r\n\t\t\tvar header = headers[index],\r\n\t\t\texists = false,\r\n\t\t\tcol = this._findCol(header.textContent),\r\n\t\t\twidth, attributes;\r\n\r\n\t\t\tif(col){\r\n\t\t\t\texists = true;\r\n\t\t\t}else{\r\n\t\t\t\tcol = {title:header.textContent.trim()};\r\n\t\t\t}\r\n\r\n\t\t\tif(!col.field) {\r\n\t\t\t\tcol.field = header.textContent.trim().toLowerCase().replace(\" \", \"_\");\r\n\t\t\t}\r\n\r\n\t\t\twidth = header.getAttribute(\"width\");\r\n\r\n\t\t\tif(width && !col.width)\t{\r\n\t\t\t\tcol.width = width;\r\n\t\t\t}\r\n\r\n\t\t\t//check for Tabulator inline options\r\n\t\t\tthis._extractOptions(header, col, this.table.columnManager.optionsList.registeredDefaults);\r\n\r\n\t\t\tthis.fieldIndex[index] = col.field;\r\n\r\n\t\t\tif(col.field == this.table.options.index){\r\n\t\t\t\tthis.hasIndex = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(!exists){\r\n\t\t\t\tthis.table.options.columns.push(col);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\r\n\t//generate blank headers\r\n\t_generateBlankHeaders(headers, rows){\r\n\t\tfor(var index = 0; index < headers.length; index++){\r\n\t\t\tvar header = headers[index],\r\n\t\t\tcol = {title:\"\", field:\"col\" + index};\r\n\r\n\t\t\tthis.fieldIndex[index] = col.field;\r\n\r\n\t\t\tvar width = header.getAttribute(\"width\");\r\n\r\n\t\t\tif(width){\r\n\t\t\t\tcol.width = width;\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.options.columns.push(col);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nHtmlTableImport.moduleName = \"htmlTableImport\";\r\n\r\nexport default HtmlTableImport;","function csvImporter(input){\r\n var data = [],\r\n row = 0, \r\n col = 0,\r\n inQuote = false;\r\n \r\n //Iterate over each character\r\n for (let index = 0; index < input.length; index++) {\r\n let char = input[index], \r\n nextChar = input[index+1]; \r\n \r\n //Initialize empty row\r\n if(!data[row]){\r\n data[row] = [];\r\n }\r\n\r\n //Initialize empty column\r\n if(!data[row][col]){\r\n data[row][col] = \"\";\r\n }\r\n \r\n //Handle quotation mark inside string\r\n if (char == '\"' && inQuote && nextChar == '\"') { \r\n data[row][col] += char; \r\n index++;\r\n continue; \r\n }\r\n \r\n //Begin / End Quote\r\n if (char == '\"') { \r\n inQuote = !inQuote;\r\n continue;\r\n }\r\n \r\n //Next column (if not in quote)\r\n if (char == ',' && !inQuote) { \r\n col++;\r\n continue; \r\n }\r\n \r\n //New row if new line and not in quote (CRLF) \r\n if (char == '\\r' && nextChar == '\\n' && !inQuote) { \r\n col = 0; \r\n row++; \r\n index++; \r\n continue; \r\n }\r\n \r\n //New row if new line and not in quote (CR or LF) \r\n if ((char == '\\r' || char == '\\n') && !inQuote) { \r\n col = 0;\r\n row++;\r\n continue; \r\n }\r\n\r\n //Normal Character, append to column\r\n data[row][col] += char;\r\n }\r\n\r\n return data;\r\n}\r\n\r\nexport default csvImporter;","export default function(input){\r\n try {\r\n return JSON.parse(input);\r\n } catch(e) {\r\n console.warn(\"JSON Import Error - File contents is invalid JSON\", e);\r\n return Promise.reject();\r\n }\r\n}","import csv from './importers/csv.js';\r\nimport json from './importers/json.js';\r\n\r\nexport default {\r\n\tcsv:csv,\r\n\tjson:json,\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultImporters from './defaults/importers.js';\r\n\r\nclass Import extends Module{\r\n \r\n constructor(table){\r\n super(table);\r\n \r\n this.registerTableOption(\"importFormat\");\r\n this.registerTableOption(\"importReader\", \"text\");\r\n }\r\n \r\n initialize(){\r\n this.registerTableFunction(\"import\", this.importFromFile.bind(this));\r\n\r\n if(this.table.options.importFormat){\r\n this.subscribe(\"data-loading\", this.loadDataCheck.bind(this), 10);\r\n this.subscribe(\"data-load\", this.loadData.bind(this), 10);\r\n }\r\n }\r\n\r\n loadDataCheck(data){\r\n return typeof data === \"string\";\r\n }\r\n\r\n loadData(data, params, config, silent, previousData){\r\n return this.importData(this.lookupImporter(), data)\r\n .then(this.structureData.bind(this))\r\n .catch((err) => {\r\n console.error(\"Import Error:\", err || \"Unable to import data\")\r\n return Promise.reject(err);\r\n })\r\n }\r\n\r\n lookupImporter(importFormat){\r\n var importer;\r\n \r\n if(!importFormat){\r\n importFormat = this.table.options.importFormat;\r\n }\r\n \r\n if(typeof importFormat === \"string\"){\r\n importer = Import.importers[importFormat];\r\n }else{\r\n importer = importFormat;\r\n }\r\n\r\n if(!importer){\r\n console.error(\"Import Error - Importer not found:\", importFormat);\r\n }\r\n \r\n return importer;\r\n }\r\n \r\n importFromFile(importFormat, extension){\r\n var importer = this.lookupImporter(importFormat);\r\n \r\n if(importer){\r\n return this.pickFile(extension)\r\n .then(this.importData.bind(this, importer))\r\n .then(this.structureData.bind(this))\r\n .then(this.setData.bind(this))\r\n .catch((err) => {\r\n console.error(\"Import Error:\", err || \"Unable to import file\")\r\n return Promise.reject(err);\r\n })\r\n }\r\n }\r\n \r\n pickFile(extensions){\r\n return new Promise((resolve, reject) => {\r\n var input = document.createElement(\"input\");\r\n input.type = \"file\";\r\n input.accept = extensions;\r\n \r\n input.addEventListener(\"change\", (e) => {\r\n var file = input.files[0],\r\n reader = new FileReader(),\r\n data;\r\n \r\n switch(this.table.options.importReader){\r\n case \"buffer\":\r\n reader.readAsArrayBuffer(file);\r\n break;\r\n\r\n case \"binary\":\r\n reader.readAsBinaryString(file);\r\n break;\r\n\r\n case \"url\":\r\n reader.readAsDataURL(file);\r\n break;\r\n\r\n case \"text\":\r\n default:\r\n reader.readAsText(file);\r\n }\r\n \r\n reader.onload = (e) => {\r\n resolve(reader.result)\r\n };\r\n \r\n reader.onerror = (e) => {\r\n console.warn(\"File Load Error - Unable to read file\");\r\n reject();\r\n };\r\n });\r\n \r\n input.click();\r\n });\r\n }\r\n \r\n importData(importer, fileContents){\r\n var data = importer.call(this.table, fileContents);\r\n \r\n if(data instanceof Promise){\r\n return data;\r\n }else{\r\n return data ? Promise.resolve(data) : Promise.reject();\r\n }\r\n }\r\n\r\n structureData(parsedData){\r\n var data = [];\r\n \r\n if(Array.isArray(parsedData) && parsedData.length && Array.isArray(parsedData[0])){\r\n if(this.table.options.autoColumns){\r\n data = this.structureArrayToObject(parsedData);\r\n }else{\r\n data = this.structureArrayToColumns(parsedData);\r\n }\r\n\r\n return data;\r\n }else{\r\n return parsedData;\r\n }\r\n }\r\n\r\n structureArrayToObject(parsedData){\r\n var columns = parsedData.shift();\r\n\r\n var data = parsedData.map((values) => {\r\n var row = {};\r\n\r\n columns.forEach((key, i) => {\r\n row[key] = values[i];\r\n })\r\n\r\n return row;\r\n })\r\n\r\n return data;\r\n }\r\n\r\n structureArrayToColumns(parsedData){\r\n var data = [],\r\n columns = this.table.getColumns();\r\n\r\n //remove first row if it is the column names\r\n if(columns[0] && parsedData[0][0]){\r\n if(columns[0].getDefinition().title === parsedData[0][0]){\r\n parsedData.shift();\r\n }\r\n }\r\n \r\n //convert row arrays to objects\r\n parsedData.forEach((rowData) => {\r\n var row = {};\r\n\r\n rowData.forEach((value, index) => {\r\n var column = columns[index];\r\n\r\n if(column){\r\n row[column.getField()] = value;\r\n }\r\n })\r\n\r\n data.push(row);\r\n });\r\n\r\n return data;\r\n }\r\n \r\n setData(data){\r\n return this.table.setData(data);\r\n }\r\n}\r\n\r\nImport.moduleName = \"import\";\r\n\r\n//load defaults\r\nImport.importers = defaultImporters;\r\n\r\nexport default Import;","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport Cell from '../../core/cell/Cell';\r\nimport Column from '../../core/column/Column';\r\n\r\nclass Interaction extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.eventMap = {\r\n\t\t\t//row events\r\n\t\t\trowClick:\"row-click\",\r\n\t\t\trowDblClick:\"row-dblclick\",\r\n\t\t\trowContext:\"row-contextmenu\",\r\n\t\t\trowMouseEnter:\"row-mouseenter\",\r\n\t\t\trowMouseLeave:\"row-mouseleave\",\r\n\t\t\trowMouseOver:\"row-mouseover\",\r\n\t\t\trowMouseOut:\"row-mouseout\",\r\n\t\t\trowMouseMove:\"row-mousemove\",\r\n\t\t\trowTap:\"row\",\r\n\t\t\trowDblTap:\"row\",\r\n\t\t\trowTapHold:\"row\",\r\n\r\n\t\t\t//cell events\r\n\t\t\tcellClick:\"cell-click\",\r\n\t\t\tcellDblClick:\"cell-dblclick\",\r\n\t\t\tcellContext:\"cell-contextmenu\",\r\n\t\t\tcellMouseEnter:\"cell-mouseenter\",\r\n\t\t\tcellMouseLeave:\"cell-mouseleave\",\r\n\t\t\tcellMouseOver:\"cell-mouseover\",\r\n\t\t\tcellMouseOut:\"cell-mouseout\",\r\n\t\t\tcellMouseMove:\"cell-mousemove\",\r\n\t\t\tcellTap:\"cell\",\r\n\t\t\tcellDblTap:\"cell\",\r\n\t\t\tcellTapHold:\"cell\",\r\n\r\n\t\t\t//column header events\r\n\t\t\theaderClick:\"column-click\",\r\n\t\t\theaderDblClick:\"column-dblclick\",\r\n\t\t\theaderContext:\"column-contextmenu\",\r\n\t\t\theaderMouseEnter:\"column-mouseenter\",\r\n\t\t\theaderMouseLeave:\"column-mouseleave\",\r\n\t\t\theaderMouseOver:\"column-mouseover\",\r\n\t\t\theaderMouseOut:\"column-mouseout\",\r\n\t\t\theaderMouseMove:\"column-mousemove\",\r\n\t\t\theaderTap:\"column\",\r\n\t\t\theaderDblTap:\"column\",\r\n\t\t\theaderTapHold:\"column\",\r\n\r\n\t\t\t//group header\r\n\t\t\tgroupClick:\"group-click\",\r\n\t\t\tgroupDblClick:\"group-dblclick\",\r\n\t\t\tgroupContext:\"group-contextmenu\",\r\n\t\t\tgroupMouseEnter:\"group-mouseenter\",\r\n\t\t\tgroupMouseLeave:\"group-mouseleave\",\r\n\t\t\tgroupMouseOver:\"group-mouseover\",\r\n\t\t\tgroupMouseOut:\"group-mouseout\",\r\n\t\t\tgroupMouseMove:\"group-mousemove\",\r\n\t\t\tgroupTap:\"group\",\r\n\t\t\tgroupDblTap:\"group\",\r\n\t\t\tgroupTapHold:\"group\",\r\n\t\t}\r\n\r\n\t\tthis.subscribers = {};\r\n\r\n\t\tthis.touchSubscribers = {};\r\n\r\n\t\tthis.columnSubscribers = {};\r\n\r\n\t\tthis.touchWatchers = {\r\n\t\t\trow:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tcell:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tcolumn:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tgroup:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.registerColumnOption(\"headerClick\");\r\n\t\tthis.registerColumnOption(\"headerDblClick\");\r\n\t\tthis.registerColumnOption(\"headerContext\");\r\n\t\tthis.registerColumnOption(\"headerMouseEnter\");\r\n\t\tthis.registerColumnOption(\"headerMouseLeave\");\r\n\t\tthis.registerColumnOption(\"headerMouseOver\");\r\n\t\tthis.registerColumnOption(\"headerMouseOut\");\r\n\t\tthis.registerColumnOption(\"headerMouseMove\");\r\n\t\tthis.registerColumnOption(\"headerTap\");\r\n\t\tthis.registerColumnOption(\"headerDblTap\");\r\n\t\tthis.registerColumnOption(\"headerTapHold\");\r\n\r\n\t\tthis.registerColumnOption(\"cellClick\");\r\n\t\tthis.registerColumnOption(\"cellDblClick\");\r\n\t\tthis.registerColumnOption(\"cellContext\");\r\n\t\tthis.registerColumnOption(\"cellMouseEnter\");\r\n\t\tthis.registerColumnOption(\"cellMouseLeave\");\r\n\t\tthis.registerColumnOption(\"cellMouseOver\");\r\n\t\tthis.registerColumnOption(\"cellMouseOut\");\r\n\t\tthis.registerColumnOption(\"cellMouseMove\");\r\n\t\tthis.registerColumnOption(\"cellTap\");\r\n\t\tthis.registerColumnOption(\"cellDblTap\");\r\n\t\tthis.registerColumnOption(\"cellTapHold\");\r\n\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeExternalEvents();\r\n\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this))\r\n\t\tthis.subscribe(\"cell-dblclick\", this.cellContentsSelectionFixer.bind(this))\r\n\t}\r\n\r\n\tcellContentsSelectionFixer(e, cell){\r\n\t\tif(this.table.modExists(\"edit\")){\r\n\t\t\tif (this.table.modules.edit.currentCell === this){\r\n\t\t\t\treturn; //prevent instant selection of editor content\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\ttry{\r\n\t\t\tif (document.selection) { // IE\r\n\t\t\t\tvar range = document.body.createTextRange();\r\n\t\t\t\trange.moveToElementText(this.element);\r\n\t\t\t\trange.select();\r\n\t\t\t} else if (window.getSelection) {\r\n\t\t\t\tvar range = document.createRange();\r\n\t\t\t\trange.selectNode(this.element);\r\n\t\t\t\twindow.getSelection().removeAllRanges();\r\n\t\t\t\twindow.getSelection().addRange(range);\r\n\t\t\t}\r\n\t\t}catch(e){}\r\n\t}\r\n\r\n\tinitializeExternalEvents(){\r\n\t\tfor(let key in this.eventMap){\r\n\t\t\tthis.subscriptionChangeExternal(key, this.subscriptionChanged.bind(this, key))\r\n\t\t}\r\n\t}\r\n\r\n\tsubscriptionChanged(key, added){\r\n\t\tvar index;\r\n\r\n\t\tif(added){\r\n\t\t\tif(!this.subscribers[key]){\r\n\t\t\t\tif(this.eventMap[key].includes(\"-\")){\r\n\t\t\t\t\tthis.subscribers[key] = this.handle.bind(this, key);\r\n\t\t\t\t\tthis.subscribe(this.eventMap[key], this.subscribers[key]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.subscribeTouchEvents(key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.eventMap[key].includes(\"-\")){\r\n\t\t\t\tif(this.subscribers[key] && !this.columnSubscribers[key] && !this.subscribedExternal(key)){\r\n\t\t\t\t\tthis.unsubscribe(this.eventMap[key], this.subscribers[key]);\r\n\t\t\t\t\tdelete this.subscribers[key];\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.unsubscribeTouchEvents(key);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tsubscribeTouchEvents(key){\r\n\t\tvar type = this.eventMap[key];\r\n\r\n\t\tif(!this.touchSubscribers[type + \"-touchstart\"]){\r\n\t\t\tthis.touchSubscribers[type + \"-touchstart\"] = this.handleTouch.bind(this, type, \"start\");\r\n\t\t\tthis.touchSubscribers[type + \"-touchend\"] = this.handleTouch.bind(this, type, \"end\");\r\n\r\n\t\t\tthis.subscribe(type + \"-touchstart\", this.touchSubscribers[type + \"-touchstart\"]);\r\n\t\t\tthis.subscribe(type + \"-touchend\", this.touchSubscribers[type + \"-touchend\"]);\r\n\t\t}\r\n\r\n\t\tthis.subscribers[key] = true;\r\n\t}\r\n\r\n\tunsubscribeTouchEvents(key){\r\n\t\tvar notouch = true,\r\n\t\ttype = this.eventMap[key];\r\n\r\n\t\tif(this.subscribers[key] && !this.subscribedExternal(key)){\r\n\t\t\tdelete this.subscribers[key];\r\n\r\n\t\t\tfor(let i in this.eventMap){\r\n\t\t\t\tif(this.eventMap[i] === type){\r\n\t\t\t\t\tif(this.subscribers[i]){\r\n\t\t\t\t\t\tnotouch = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(notouch){\r\n\t\t\t\tthis.unsubscribe(type + \"-touchstart\", this.touchSubscribers[type + \"-touchstart\"]);\r\n\t\t\t\tthis.unsubscribe(type + \"-touchend\", this.touchSubscribers[type + \"-touchend\"]);\r\n\r\n\t\t\t\tdelete this.touchSubscribers[type + \"-touchstart\"];\r\n\t\t\t\tdelete this.touchSubscribers[type + \"-touchend\"];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition;\r\n\r\n\t\tfor(let key in this.eventMap){\r\n\t\t\tif(def[key]){\r\n\t\t\t\tthis.subscriptionChanged(key, true);\r\n\r\n\t\t\t\tif(!this.columnSubscribers[key]){\r\n\t\t\t\t\tthis.columnSubscribers[key] = [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.columnSubscribers[key].push(column);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\thandle(action, e, component){\r\n\t\tthis.dispatchEvent(action, e, component);\r\n\t}\r\n\r\n\thandleTouch(type, action, e, component){\r\n\t\tvar watchers = this.touchWatchers[type];\r\n\r\n\t\tif(type === \"column\"){\r\n\t\t\ttype = \"header\";\r\n\t\t}\r\n\r\n\t\tswitch(action){\r\n\t\t\tcase \"start\":\r\n\t\t\twatchers.tap = true;\r\n\r\n\t\t\tclearTimeout(watchers.tapHold);\r\n\r\n\t\t\twatchers.tapHold = setTimeout(() => {\r\n\t\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\t\twatchers.tapHold = null;\r\n\r\n\t\t\t\twatchers.tap = null;\r\n\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\tthis.dispatchEvent(type + \"TapHold\", e, component);\r\n\t\t\t}, 1000);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"end\":\r\n\t\t\tif(watchers.tap){\r\n\r\n\t\t\t\twatchers.tap = null;\r\n\t\t\t\tthis.dispatchEvent(type + \"Tap\", e, component);\r\n\t\t\t}\r\n\r\n\t\t\tif(watchers.tapDbl){\r\n\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\tthis.dispatchEvent(type + \"DblTap\", e, component);\r\n\t\t\t}else{\r\n\t\t\t\twatchers.tapDbl = setTimeout(() => {\r\n\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\twatchers.tapDbl = null;\r\n\t\t\t\t}, 300);\r\n\t\t\t}\r\n\r\n\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\twatchers.tapHold = null;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tdispatchEvent(action, e, component){\r\n\t\tvar componentObj = component.getComponent(),\r\n\t\tcallback;\r\n\r\n\t\tif(this.columnSubscribers[action]){\r\n\r\n\t\t\tif(component instanceof Cell){\r\n\t\t\t\tcallback = component.column.definition[action];\r\n\t\t\t}else if(component instanceof Column){\r\n\t\t\t\tcallback = component.definition[action];\r\n\t\t\t}\r\n\r\n\t\t\tif(callback){\r\n\t\t\t\tcallback(e, componentObj);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.dispatchExternal(action, e, componentObj);\r\n\t}\r\n}\r\n\r\nInteraction.moduleName = \"interaction\";\r\n\r\nexport default Interaction;","export default {\r\n\tnavPrev:\"shift + 9\",\r\n\tnavNext:9,\r\n\tnavUp:38,\r\n\tnavDown:40,\r\n\tscrollPageUp:33,\r\n\tscrollPageDown:34,\r\n\tscrollToStart:36,\r\n\tscrollToEnd:35,\r\n\tundo:[\"ctrl + 90\", \"meta + 90\"],\r\n\tredo:[\"ctrl + 89\", \"meta + 89\"],\r\n\tcopyToClipboard:[\"ctrl + 67\", \"meta + 89\"],\r\n};","export default {\r\n\tkeyBlock:function(e){\r\n\t\te.stopPropagation();\r\n\t\te.preventDefault();\r\n\t},\r\n\tscrollPageUp:function(e){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tnewPos = rowManager.scrollTop - rowManager.element.clientHeight,\r\n\t\tscrollMax = rowManager.element.scrollHeight;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\tif(newPos >= 0){\r\n\t\t\t\trowManager.element.scrollTop = newPos;\r\n\t\t\t}else{\r\n\t\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[0]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tscrollPageDown:function(e){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tnewPos = rowManager.scrollTop + rowManager.element.clientHeight,\r\n\t\tscrollMax = rowManager.element.scrollHeight;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\tif(newPos <= scrollMax){\r\n\t\t\t\trowManager.element.scrollTop = newPos;\r\n\t\t\t}else{\r\n\t\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\r\n\t},\r\n\tscrollToStart:function(e){\r\n\t\tvar rowManager = this.table.rowManager;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[0]);\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tscrollToEnd:function(e){\r\n\t\tvar rowManager = this.table.rowManager;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]);\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tnavPrev:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-prev\", e);\r\n\t},\r\n\r\n\tnavNext:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-next\", e);\r\n\t},\r\n\r\n\tnavLeft:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-left\", e);\r\n\t},\r\n\r\n\tnavRight:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-right\", e);\r\n\t},\r\n\r\n\tnavUp:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-up\", e);\r\n\t},\r\n\r\n\tnavDown:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-down\", e);\r\n\t},\r\n\r\n\tundo:function(e){\r\n\t\tvar cell = false;\r\n\t\tif(this.table.options.history && this.table.modExists(\"history\") && this.table.modExists(\"edit\")){\r\n\r\n\t\t\tcell = this.table.modules.edit.currentCell;\r\n\r\n\t\t\tif(!cell){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tthis.table.modules.history.undo();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tredo:function(e){\r\n\t\tvar cell = false;\r\n\t\tif(this.table.options.history && this.table.modExists(\"history\") && this.table.modExists(\"edit\")){\r\n\r\n\t\t\tcell = this.table.modules.edit.currentCell;\r\n\r\n\t\t\tif(!cell){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tthis.table.modules.history.redo();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tcopyToClipboard:function(e){\r\n\t\tif(!this.table.modules.edit.currentCell){\r\n\t\t\tif(this.table.modExists(\"clipboard\", true)){\r\n\t\t\t\tthis.table.modules.clipboard.copy(false, true);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultBindings from './defaults/bindings.js';\r\nimport defaultActions from './defaults/actions.js';\r\n\r\nclass Keybindings extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.watchKeys = null;\r\n\t\tthis.pressedKeys = null;\r\n\t\tthis.keyupBinding = false;\r\n\t\tthis.keydownBinding = false;\r\n\r\n\t\tthis.registerTableOption(\"keybindings\", {}); //array for keybindings\r\n\t\tthis.registerTableOption(\"tabEndNewRow\", false); //create new row when tab to end of table\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tvar bindings = this.table.options.keybindings,\r\n\t\tmergedBindings = {};\r\n\r\n\t\tthis.watchKeys = {};\r\n\t\tthis.pressedKeys = [];\r\n\r\n\t\tif(bindings !== false){\r\n\t\t\tObject.assign(mergedBindings, Keybindings.bindings)\r\n\t\t\tObject.assign(mergedBindings, bindings)\r\n\r\n\t\t\tthis.mapBindings(mergedBindings);\r\n\t\t\tthis.bindEvents();\r\n\t\t}\r\n\r\n\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\r\n\t}\r\n\r\n\tmapBindings(bindings){\r\n\t\tfor(let key in bindings){\r\n\t\t\tif(Keybindings.actions[key]){\r\n\t\t\t\tif(bindings[key]){\r\n\t\t\t\t\tif(typeof bindings[key] !== \"object\"){\r\n\t\t\t\t\t\tbindings[key] = [bindings[key]];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbindings[key].forEach((binding) => {\r\n\t\t\t\t\t\tvar bindingList = Array.isArray(binding) ? binding : [binding];\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tbindingList.forEach((item) => {\r\n\t\t\t\t\t\t\tthis.mapBinding(key, item);\r\n\t\t\t\t\t\t});\t\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Key Binding Error - no such action:\", key);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmapBinding(action, symbolsList){\r\n\t\tvar binding = {\r\n\t\t\taction: Keybindings.actions[action],\r\n\t\t\tkeys: [],\r\n\t\t\tctrl: false,\r\n\t\t\tshift: false,\r\n\t\t\tmeta: false,\r\n\t\t};\r\n\r\n\t\tvar symbols = symbolsList.toString().toLowerCase().split(\" \").join(\"\").split(\"+\");\r\n\r\n\t\tsymbols.forEach((symbol) => {\r\n\t\t\tswitch(symbol){\r\n\t\t\t\tcase \"ctrl\":\r\n\t\t\t\tbinding.ctrl = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"shift\":\r\n\t\t\t\tbinding.shift = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"meta\":\r\n\t\t\t\tbinding.meta = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tsymbol = isNaN(symbol) ? symbol.toUpperCase().charCodeAt(0) : parseInt(symbol);\r\n\t\t\t\tbinding.keys.push(symbol);\r\n\r\n\t\t\t\tif(!this.watchKeys[symbol]){\r\n\t\t\t\t\tthis.watchKeys[symbol] = [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.watchKeys[symbol].push(binding);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tbindEvents(){\r\n\t\tvar self = this;\r\n\r\n\t\tthis.keyupBinding = function(e){\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tvar bindings = self.watchKeys[code];\r\n\r\n\t\t\tif(bindings){\r\n\r\n\t\t\t\tself.pressedKeys.push(code);\r\n\r\n\t\t\t\tbindings.forEach(function(binding){\r\n\t\t\t\t\tself.checkBinding(e, binding);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.keydownBinding = function(e){\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tvar bindings = self.watchKeys[code];\r\n\r\n\t\t\tif(bindings){\r\n\r\n\t\t\t\tvar index = self.pressedKeys.indexOf(code);\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tself.pressedKeys.splice(index, 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.table.element.addEventListener(\"keydown\", this.keyupBinding);\r\n\r\n\t\tthis.table.element.addEventListener(\"keyup\", this.keydownBinding);\r\n\t}\r\n\r\n\tclearBindings(){\r\n\t\tif(this.keyupBinding){\r\n\t\t\tthis.table.element.removeEventListener(\"keydown\", this.keyupBinding);\r\n\t\t}\r\n\r\n\t\tif(this.keydownBinding){\r\n\t\t\tthis.table.element.removeEventListener(\"keyup\", this.keydownBinding);\r\n\t\t}\r\n\t}\r\n\r\n\tcheckBinding(e, binding){\r\n\t\tvar match = true;\r\n\r\n\t\tif(e.ctrlKey == binding.ctrl && e.shiftKey == binding.shift && e.metaKey == binding.meta){\r\n\t\t\tbinding.keys.forEach((key) => {\r\n\t\t\t\tvar index = this.pressedKeys.indexOf(key);\r\n\r\n\t\t\t\tif(index == -1){\r\n\t\t\t\t\tmatch = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tbinding.action.call(this, e);\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nKeybindings.moduleName = \"keybindings\";\r\n\r\n//load defaults\r\nKeybindings.bindings = defaultBindings;\r\nKeybindings.actions = defaultActions;\r\n\r\nexport default Keybindings;","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass Menu extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.menuContainer = null;\r\n\t\tthis.menuElements = [];\r\n\t\tthis.blurEvent = this.hideMenu.bind(this);\r\n\t\tthis.escEvent = this.escMenu.bind(this);\r\n\t\tthis.nestedMenuBlock = false;\r\n\t\tthis.positionReversedX = false;\r\n\t\t\r\n\t\tthis.currentComponent = null;\r\n\t\t\r\n\t\tthis.columnSubscribers = {};\r\n\t\t\r\n\t\tthis.registerTableOption(\"rowContextMenu\", false);\r\n\t\tthis.registerTableOption(\"rowClickMenu\", false);\r\n\t\tthis.registerTableOption(\"groupContextMenu\", false);\r\n\t\tthis.registerTableOption(\"groupClickMenu\", false);\r\n\t\tthis.registerTableOption(\"menuContainer\", false);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"headerContextMenu\");\r\n\t\tthis.registerColumnOption(\"headerClickMenu\");\r\n\t\tthis.registerColumnOption(\"headerMenu\");\r\n\t\tthis.registerColumnOption(\"contextMenu\");\r\n\t\tthis.registerColumnOption(\"clickMenu\");\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.lookupMenuContainer();\r\n\t\t\r\n\t\tthis.initializeRowWatchers();\r\n\t\tthis.initializeGroupWatchers();\r\n\t\t\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t}\r\n\t\r\n\tlookupMenuContainer(){\r\n\t\t\r\n\t\tthis.menuContainer = this.table.options.menuContainer;\r\n\t\t\r\n\t\tif(typeof this.menuContainer === \"string\"){\r\n\t\t\tthis.menuContainer = document.querySelector(this.menuContainer);\r\n\t\t\t\r\n\t\t\tif(!this.menuContainer){\r\n\t\t\t\tconsole.warn(\"Menu Error - no container element found matching selector:\", this.table.options.menuContainer , \"(defaulting to document body)\");\r\n\t\t\t}\r\n\t\t}else if (this.menuContainer === true){\r\n\t\t\tthis.menuContainer = this.table.element;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.menuContainer && !this.checkMenuContainerIsParent(this.menuContainer)){\r\n\t\t\tthis.menuContainer = false;\r\n\t\t\tconsole.warn(\"Menu Error - container element does not contain this table:\", this.table.options.menuContainer , \"(defaulting to document body)\");\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.menuContainer){\r\n\t\t\tthis.menuContainer = document.body;\r\n\t\t}\r\n\t}\r\n\t\r\n\tcheckMenuContainerIsParent(container, element = this.table.element){\r\n\t\tif(container === element){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn element.parentNode ? this.checkMenuContainerIsParent(container, element.parentNode) : false;\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRowWatchers(){\r\n\t\tif(this.table.options.rowContextMenu){\r\n\t\t\tthis.subscribe(\"row-contextmenu\", this.loadMenuEvent.bind(this, this.table.options.rowContextMenu));\r\n\t\t\tthis.table.on(\"rowTapHold\", this.loadMenuEvent.bind(this, this.table.options.rowContextMenu));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.rowClickMenu){\r\n\t\t\tthis.subscribe(\"row-click\", this.loadMenuEvent.bind(this, this.table.options.rowClickMenu));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeGroupWatchers(){\r\n\t\tif(this.table.options.groupContextMenu){\r\n\t\t\tthis.subscribe(\"group-contextmenu\", this.loadMenuEvent.bind(this, this.table.options.groupContextMenu));\r\n\t\t\tthis.table.on(\"groupTapHold\", this.loadMenuEvent.bind(this, this.table.options.groupContextMenu));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.groupClickMenu){\r\n\t\t\tthis.subscribe(\"group-click\", this.loadMenuEvent.bind(this, this.table.options.groupClickMenu));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar options = [\"headerContextMenu\", \"headerClickMenu\"],\r\n\t\tdef = column.definition;\r\n\t\t\r\n\t\t//handle column events\r\n\t\tif(def.headerContextMenu && !this.columnSubscribers.headerContextMenu){\r\n\t\t\tthis.columnSubscribers.headerContextMenu = this.loadMenuTableColumnEvent.bind(this, \"headerContextMenu\");\r\n\t\t\tthis.subscribe(\"column-contextmenu\", this.columnSubscribers.headerContextMenu);\r\n\t\t\tthis.table.on(\"headerTapHold\", this.loadMenuTableColumnEvent.bind(this, \"headerContextMenu\"))\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerClickMenu && !this.columnSubscribers.headerClickMenu){\r\n\t\t\tthis.columnSubscribers.headerClickMenu = this.loadMenuTableColumnEvent.bind(this, \"headerClickMenu\");\r\n\t\t\tthis.subscribe(\"column-click\", this.columnSubscribers.headerClickMenu);\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerMenu){\r\n\t\t\tthis.initializeColumnHeaderMenu(column);\r\n\t\t}\r\n\t\t\r\n\t\t//handle cell events\r\n\t\tif(def.contextMenu && !this.columnSubscribers.contextMenu){\r\n\t\t\tthis.columnSubscribers.contextMenu = this.loadMenuTableCellEvent.bind(this, \"contextMenu\");\r\n\t\t\tthis.subscribe(\"cell-contextmenu\", this.columnSubscribers.contextMenu);\r\n\t\t\tthis.table.on(\"cellTapHold\", this.loadMenuTableCellEvent.bind(this, \"contextMenu\"))\r\n\t\t}\r\n\t\t\r\n\t\tif(def.clickMenu && !this.columnSubscribers.clickMenu){\r\n\t\t\tthis.columnSubscribers.clickMenu = this.loadMenuTableCellEvent.bind(this, \"clickMenu\");\r\n\t\t\tthis.subscribe(\"cell-click\", this.columnSubscribers.clickMenu);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumnHeaderMenu(column){\r\n\t\tvar headerMenuEl;\r\n\t\t\r\n\t\theaderMenuEl = document.createElement(\"span\");\r\n\t\theaderMenuEl.classList.add(\"tabulator-header-menu-button\");\r\n\t\theaderMenuEl.innerHTML = \"⋮\";\r\n\t\t\r\n\t\theaderMenuEl.addEventListener(\"click\", (e) => {\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\t\r\n\t\t\tthis.loadMenuEvent(column.definition.headerMenu, e, column);\r\n\t\t});\r\n\t\t\r\n\t\tcolumn.titleElement.insertBefore(headerMenuEl, column.titleElement.firstChild);\r\n\t}\r\n\t\r\n\tloadMenuTableCellEvent(option, e, cell){\r\n\t\tif(cell._cell){\r\n\t\t\tcell = cell._cell;\r\n\t\t}\r\n\t\t\r\n\t\tif(cell.column.definition[option]){\r\n\t\t\tthis.loadMenuEvent(cell.column.definition[option], e, cell);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadMenuTableColumnEvent(option, e, column){\r\n\t\tif(column._column){\r\n\t\t\tcolumn = column._column;\r\n\t\t}\r\n\t\t\r\n\t\tif(column.definition[option]){\r\n\t\t\tthis.loadMenuEvent(column.definition[option], e, column);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadMenuEvent(menu, e, component){\r\n\t\tif(component._group){\r\n\t\t\tcomponent = component._group;\r\n\t\t}else if(component._row){\r\n\t\t\tcomponent = component._row;\r\n\t\t}\r\n\t\t\r\n\t\tmenu = typeof menu == \"function\" ? menu.call(this.table, component.getComponent(), e) : menu;\r\n\t\t\r\n\t\tthis.loadMenu(e, component, menu);\r\n\t}\r\n\t\r\n\tloadMenu(e, component, menu, parentEl){\r\n\t\tvar touch = !(e instanceof MouseEvent);\r\n\t\t\r\n\t\tvar menuEl = document.createElement(\"div\");\r\n\t\tmenuEl.classList.add(\"tabulator-menu\");\r\n\t\t\r\n\t\tif(!touch){\r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t\t\r\n\t\t//abort if no menu set\r\n\t\tif(!menu || !menu.length){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(!parentEl){\r\n\t\t\tif(this.nestedMenuBlock){\r\n\t\t\t\t//abort if child menu already open\r\n\t\t\t\tif(this.isOpen()){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.nestedMenuBlock = setTimeout(() => {\r\n\t\t\t\t\tthis.nestedMenuBlock = false;\r\n\t\t\t\t}, 100)\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.hideMenu();\r\n\t\t\tthis.menuElements = [];\r\n\t\t}\r\n\t\t\r\n\t\tmenu.forEach((item) => {\r\n\t\t\tvar itemEl = document.createElement(\"div\"),\r\n\t\t\tlabel = item.label,\r\n\t\t\tdisabled = item.disabled;\r\n\t\t\t\r\n\t\t\tif(item.separator){\r\n\t\t\t\titemEl.classList.add(\"tabulator-menu-separator\");\r\n\t\t\t}else{\r\n\t\t\t\titemEl.classList.add(\"tabulator-menu-item\");\r\n\t\t\t\t\r\n\t\t\t\tif(typeof label == \"function\"){\r\n\t\t\t\t\tlabel = label.call(this.table, component.getComponent());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(label instanceof Node){\r\n\t\t\t\t\titemEl.appendChild(label);\r\n\t\t\t\t}else{\r\n\t\t\t\t\titemEl.innerHTML = label;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(typeof disabled == \"function\"){\r\n\t\t\t\t\tdisabled = disabled.call(this.table, component.getComponent());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(disabled){\r\n\t\t\t\t\titemEl.classList.add(\"tabulator-menu-item-disabled\");\r\n\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(item.menu && item.menu.length){\r\n\t\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\tthis.hideOldSubMenus(menuEl);\r\n\t\t\t\t\t\t\tthis.loadMenu(e, component, item.menu, itemEl);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(item.action){\r\n\t\t\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\t\t\titem.action(e, component.getComponent());\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(item.menu && item.menu.length){\r\n\t\t\t\t\titemEl.classList.add(\"tabulator-menu-item-submenu\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tmenuEl.appendChild(itemEl);\r\n\t\t});\r\n\t\t\r\n\t\tmenuEl.addEventListener(\"click\", (e) => {\r\n\t\t\tthis.hideMenu();\r\n\t\t});\r\n\t\t\r\n\t\tthis.menuElements.push(menuEl);\r\n\t\tthis.positionMenu(menuEl, parentEl, touch, e);\r\n\t\t\r\n\t\tthis.currentComponent = component\r\n\t\t\r\n\t\tthis.dispatchExternal(\"menuOpened\", component.getComponent())\r\n\t}\r\n\t\r\n\thideOldSubMenus(menuEl){\r\n\t\tvar index = this.menuElements.indexOf(menuEl);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tfor(let i = this.menuElements.length - 1; i > index; i--){\r\n\t\t\t\tvar el = this.menuElements[i];\r\n\t\t\t\t\r\n\t\t\t\tif(el.parentNode){\r\n\t\t\t\t\tel.parentNode.removeChild(el);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.menuElements.pop();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tpositionMenu(element, parentEl, touch, e){\r\n\t\tvar x, y, parentOffset;\r\n\t\t\r\n\t\tif(!parentEl){\r\n\t\t\tx = touch ? e.touches[0].pageX : e.pageX;\r\n\t\t\ty = touch ? e.touches[0].pageY : e.pageY;\r\n\t\t\t\r\n\t\t\tif(this.menuContainer !== document.body){\r\n\t\t\t\tparentOffset = Helpers.elOffset(this.menuContainer);\r\n\t\t\t\t\r\n\t\t\t\tx -= parentOffset.left;\r\n\t\t\t\ty -= parentOffset.top;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.positionReversedX = false;\r\n\t\t}else{\r\n\t\t\tparentOffset = Helpers.elOffset(parentEl);\r\n\t\t\tx = parentOffset.left + parentEl.offsetWidth;\r\n\t\t\ty = parentOffset.top - 1;\r\n\t\t}\r\n\t\t\r\n\t\telement.style.top = y + \"px\";\r\n\t\telement.style.left = x + \"px\";\r\n\t\t\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.table.rowManager.element.addEventListener(\"scroll\", this.blurEvent);\r\n\t\t\tthis.subscribe(\"cell-editing\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"click\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"contextmenu\", this.blurEvent);\r\n\t\t\twindow.addEventListener(\"resize\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"keydown\", this.escEvent);\r\n\t\t}, 100);\r\n\t\t\r\n\t\tthis.menuContainer.appendChild(element);\r\n\t\t\r\n\t\t//move menu to start on right edge if it is too close to the edge of the screen\r\n\t\tif((x + element.offsetWidth) >= this.menuContainer.offsetWidth || this.positionReversedX){\r\n\t\t\telement.style.left = \"\";\r\n\t\t\t\r\n\t\t\tif(parentEl){\r\n\t\t\t\telement.style.right = (this.menuContainer.offsetWidth - parentOffset.left) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\telement.style.right = (this.menuContainer.offsetWidth - x) + \"px\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.positionReversedX = true;\r\n\t\t}\r\n\t\t\r\n\t\t//move menu to start on bottom edge if it is too close to the edge of the screen\r\n\t\tif((y + element.offsetHeight) > this.menuContainer.offsetHeight) {\r\n\t\t\tif(parentEl){\r\n\t\t\t\telement.style.top = (parseInt(element.style.top) - element.offsetHeight + parentEl.offsetHeight + 1) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\telement.style.top = (parseInt(element.style.top) - element.offsetHeight) + \"px\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tisOpen(){\r\n\t\treturn !!this.menuElements.length;\r\n\t}\r\n\t\r\n\tescMenu(e){\r\n\t\tif(e.keyCode == 27){\r\n\t\t\tthis.hideMenu();\r\n\t\t}\r\n\t}\r\n\t\r\n\thideMenu(){\t\r\n\t\tthis.menuElements.forEach((menuEl) => {\r\n\t\t\tif(menuEl.parentNode){\r\n\t\t\t\tmenuEl.parentNode.removeChild(menuEl);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tdocument.body.removeEventListener(\"keydown\", this.escEvent);\r\n\t\tdocument.body.removeEventListener(\"click\", this.blurEvent);\r\n\t\tdocument.body.removeEventListener(\"contextmenu\", this.blurEvent);\r\n\t\twindow.removeEventListener(\"resize\", this.blurEvent);\r\n\t\tthis.table.rowManager.element.removeEventListener(\"scroll\", this.blurEvent);\r\n\t\tthis.unsubscribe(\"cell-editing\", this.blurEvent);\r\n\t\t\r\n\t\tif(this.currentComponent){\r\n\t\t\tthis.dispatchExternal(\"menuClosed\", this.currentComponent.getComponent());\r\n\t\t\tthis.currentComponent = null;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMenu.moduleName = \"menu\";\r\n\r\nexport default Menu;\r\n","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass MoveColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.placeholderElement = this.createPlaceholderElement();\r\n\t\tthis.hoverElement = false; //floating column header element\r\n\t\tthis.checkTimeout = false; //click check timeout holder\r\n\t\tthis.checkPeriod = 250; //period to wait on mousedown to consider this a move and not a click\r\n\t\tthis.moving = false; //currently moving column\r\n\t\tthis.toCol = false; //destination column\r\n\t\tthis.toColAfter = false; //position of moving column relative to the desitnation column\r\n\t\tthis.startX = 0; //starting position within header element\r\n\t\tthis.autoScrollMargin = 40; //auto scroll on edge when within margin\r\n\t\tthis.autoScrollStep = 5; //auto scroll distance in pixels\r\n\t\tthis.autoScrollTimeout = false; //auto scroll timeout\r\n\t\tthis.touchMove = false;\r\n\t\t\r\n\t\tthis.moveHover = this.moveHover.bind(this);\r\n\t\tthis.endMove = this.endMove.bind(this);\r\n\t\t\r\n\t\tthis.registerTableOption(\"movableColumns\", false); //enable movable columns\r\n\t}\r\n\t\r\n\tcreatePlaceholderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-col\");\r\n\t\tel.classList.add(\"tabulator-col-placeholder\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.movableColumns){\r\n\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\tcolEl;\r\n\t\t\r\n\t\tif(!column.modules.frozen){\r\n\t\t\tcolEl = column.getElement();\r\n\t\t\t\r\n\t\t\tconfig.mousemove = function(e){\r\n\t\t\t\tif(column.parent === self.moving.parent){\r\n\t\t\t\t\tif((((self.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(colEl).left) + self.table.columnManager.element.scrollLeft) > (column.getWidth() / 2)){\r\n\t\t\t\t\t\tif(self.toCol !== column || !self.toColAfter){\r\n\t\t\t\t\t\t\tcolEl.parentNode.insertBefore(self.placeholderElement, colEl.nextSibling);\r\n\t\t\t\t\t\t\tself.moveColumn(column, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(self.toCol !== column || self.toColAfter){\r\n\t\t\t\t\t\t\tcolEl.parentNode.insertBefore(self.placeholderElement, colEl);\r\n\t\t\t\t\t\t\tself.moveColumn(column, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}.bind(self);\r\n\t\t\t\r\n\t\t\tcolEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tself.touchMove = false;\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, column);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tcolEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tself.bindTouchEvents(column);\r\n\t\t}\r\n\t\t\r\n\t\tcolumn.modules.moveColumn = config;\r\n\t}\r\n\t\r\n\tbindTouchEvents(column){\r\n\t\tvar colEl = column.getElement(),\r\n\t\tstartXMove = false, //shifting center position of the cell\r\n\t\tdir = false,\r\n\t\tcurrentCol, nextCol, prevCol, nextColWidth, prevColWidth, nextColWidthLast, prevColWidthLast;\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchstart\", (e) => {\r\n\t\t\tthis.checkTimeout = setTimeout(() => {\r\n\t\t\t\tthis.touchMove = true;\r\n\t\t\t\tcurrentCol = column;\r\n\t\t\t\tnextCol = column.nextColumn();\r\n\t\t\t\tnextColWidth = nextCol ? nextCol.getWidth()/2 : 0;\r\n\t\t\t\tprevCol = column.prevColumn();\r\n\t\t\t\tprevColWidth = prevCol ? prevCol.getWidth()/2 : 0;\r\n\t\t\t\tnextColWidthLast = 0;\r\n\t\t\t\tprevColWidthLast = 0;\r\n\t\t\t\tstartXMove = false;\r\n\t\t\t\t\r\n\t\t\t\tthis.startMove(e, column);\r\n\t\t\t}, this.checkPeriod);\r\n\t\t}, {passive: true});\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchmove\", (e) => {\r\n\t\t\tvar halfCol, diff, moveToCol;\r\n\t\t\t\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.moveHover(e);\r\n\t\t\t\t\r\n\t\t\t\tif(!startXMove){\r\n\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tdiff = e.touches[0].pageX - startXMove;\r\n\t\t\t\t\r\n\t\t\t\tif(diff > 0){\r\n\t\t\t\t\tif(nextCol && diff - nextColWidthLast > nextColWidth){\r\n\t\t\t\t\t\tmoveToCol = nextCol;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(moveToCol !== column){\r\n\t\t\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t\t\t\tmoveToCol.getElement().parentNode.insertBefore(this.placeholderElement, moveToCol.getElement().nextSibling);\r\n\t\t\t\t\t\t\tthis.moveColumn(moveToCol, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(prevCol && -diff - prevColWidthLast > prevColWidth){\r\n\t\t\t\t\t\tmoveToCol = prevCol;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(moveToCol !== column){\r\n\t\t\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t\t\t\tmoveToCol.getElement().parentNode.insertBefore(this.placeholderElement, moveToCol.getElement());\r\n\t\t\t\t\t\t\tthis.moveColumn(moveToCol, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(moveToCol){\r\n\t\t\t\t\tcurrentCol = moveToCol;\r\n\t\t\t\t\tnextCol = moveToCol.nextColumn();\r\n\t\t\t\t\tnextColWidthLast = nextColWidth;\r\n\t\t\t\t\tnextColWidth = nextCol ? nextCol.getWidth() / 2 : 0;\r\n\t\t\t\t\tprevCol = moveToCol.prevColumn();\r\n\t\t\t\t\tprevColWidthLast = prevColWidth;\r\n\t\t\t\t\tprevColWidth = prevCol ? prevCol.getWidth() / 2 : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}, {passive: true});\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchend\", (e) => {\r\n\t\t\tif(this.checkTimeout){\r\n\t\t\t\tclearTimeout(this.checkTimeout);\r\n\t\t\t}\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.endMove(e);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tstartMove(e, column){\r\n\t\tvar element = column.getElement(),\r\n\t\theaderElement = this.table.columnManager.getElement(),\r\n\t\theadersElement = this.table.columnManager.getHeadersElement();\r\n\t\t\r\n\t\tthis.moving = column;\r\n\t\tthis.startX = (this.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(element).left;\r\n\t\t\r\n\t\tthis.table.element.classList.add(\"tabulator-block-select\");\r\n\t\t\r\n\t\t//create placeholder\r\n\t\tthis.placeholderElement.style.width = column.getWidth() + \"px\";\r\n\t\tthis.placeholderElement.style.height = column.getHeight() + \"px\";\r\n\t\t\r\n\t\telement.parentNode.insertBefore(this.placeholderElement, element);\r\n\t\telement.parentNode.removeChild(element);\r\n\t\t\r\n\t\t//create hover element\r\n\t\tthis.hoverElement = element.cloneNode(true);\r\n\t\tthis.hoverElement.classList.add(\"tabulator-moving\");\r\n\t\t\r\n\t\tthis.table.columnManager.getElement().appendChild(this.hoverElement);\r\n\t\t\r\n\t\tthis.hoverElement.style.left = \"0\";\r\n\t\tthis.hoverElement.style.bottom = (headerElement.clientHeight - headersElement.offsetHeight) + \"px\";\r\n\t\t\r\n\t\tif(!this.touchMove){\r\n\t\t\tthis._bindMouseMove();\r\n\t\t\t\r\n\t\t\tdocument.body.addEventListener(\"mousemove\", this.moveHover);\r\n\t\t\tdocument.body.addEventListener(\"mouseup\", this.endMove);\r\n\t\t}\r\n\t\t\r\n\t\tthis.moveHover(e);\r\n\t}\r\n\t\r\n\t_bindMouseMove(){\r\n\t\tthis.table.columnManager.columnsByIndex.forEach(function(column){\r\n\t\t\tif(column.modules.moveColumn.mousemove){\r\n\t\t\t\tcolumn.getElement().addEventListener(\"mousemove\", column.modules.moveColumn.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t_unbindMouseMove(){\r\n\t\tthis.table.columnManager.columnsByIndex.forEach(function(column){\r\n\t\t\tif(column.modules.moveColumn.mousemove){\r\n\t\t\t\tcolumn.getElement().removeEventListener(\"mousemove\", column.modules.moveColumn.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tmoveColumn(column, after){\r\n\t\tvar movingCells = this.moving.getCells();\r\n\t\t\r\n\t\tthis.toCol = column;\r\n\t\tthis.toColAfter = after;\r\n\t\t\r\n\t\tif(after){\r\n\t\t\tcolumn.getCells().forEach(function(cell, i){\r\n\t\t\t\tvar cellEl = cell.getElement(true);\r\n\t\t\t\t\r\n\t\t\t\tif(cellEl.parentNode && movingCells[i]){\r\n\t\t\t\t\tcellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tcolumn.getCells().forEach(function(cell, i){\r\n\t\t\t\tvar cellEl = cell.getElement(true);\r\n\t\t\t\t\r\n\t\t\t\tif(cellEl.parentNode && movingCells[i]){\r\n\t\t\t\t\tcellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tendMove(e){\r\n\t\tif(e.which === 1 || this.touchMove){\r\n\t\t\tthis._unbindMouseMove();\r\n\t\t\t\r\n\t\t\tthis.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling);\r\n\t\t\tthis.placeholderElement.parentNode.removeChild(this.placeholderElement);\r\n\t\t\tthis.hoverElement.parentNode.removeChild(this.hoverElement);\r\n\t\t\t\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-block-select\");\r\n\t\t\t\r\n\t\t\tif(this.toCol){\r\n\t\t\t\tthis.table.columnManager.moveColumnActual(this.moving, this.toCol, this.toColAfter);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.moving = false;\r\n\t\t\tthis.toCol = false;\r\n\t\t\tthis.toColAfter = false;\r\n\t\t\t\r\n\t\t\tif(!this.touchMove){\r\n\t\t\t\tdocument.body.removeEventListener(\"mousemove\", this.moveHover);\r\n\t\t\t\tdocument.body.removeEventListener(\"mouseup\", this.endMove);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tmoveHover(e){\r\n\t\tvar columnHolder = this.table.columnManager.getElement(),\r\n\t\tscrollLeft = columnHolder.scrollLeft,\r\n\t\txPos = ((this.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(columnHolder).left) + scrollLeft,\r\n\t\tscrollPos;\r\n\t\t\r\n\t\tthis.hoverElement.style.left = (xPos - this.startX) + \"px\";\r\n\t\t\r\n\t\tif(xPos - scrollLeft < this.autoScrollMargin){\r\n\t\t\tif(!this.autoScrollTimeout){\r\n\t\t\t\tthis.autoScrollTimeout = setTimeout(() => {\r\n\t\t\t\t\tscrollPos = Math.max(0,scrollLeft-5);\r\n\t\t\t\t\tthis.table.rowManager.getElement().scrollLeft = scrollPos;\r\n\t\t\t\t\tthis.autoScrollTimeout = false;\r\n\t\t\t\t}, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(scrollLeft + columnHolder.clientWidth - xPos < this.autoScrollMargin){\r\n\t\t\tif(!this.autoScrollTimeout){\r\n\t\t\t\tthis.autoScrollTimeout = setTimeout(() => {\r\n\t\t\t\t\tscrollPos = Math.min(columnHolder.clientWidth, scrollLeft+5);\r\n\t\t\t\t\tthis.table.rowManager.getElement().scrollLeft = scrollPos;\r\n\t\t\t\t\tthis.autoScrollTimeout = false;\r\n\t\t\t\t}, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMoveColumns.moduleName = \"moveColumn\";\r\n\r\nexport default MoveColumns;\r\n","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass MoveRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.placeholderElement = this.createPlaceholderElement();\r\n\t\tthis.hoverElement = false; //floating row header element\r\n\t\tthis.checkTimeout = false; //click check timeout holder\r\n\t\tthis.checkPeriod = 150; //period to wait on mousedown to consider this a move and not a click\r\n\t\tthis.moving = false; //currently moving row\r\n\t\tthis.toRow = false; //destination row\r\n\t\tthis.toRowAfter = false; //position of moving row relative to the desitnation row\r\n\t\tthis.hasHandle = false; //row has handle instead of fully movable row\r\n\t\tthis.startY = 0; //starting Y position within header element\r\n\t\tthis.startX = 0; //starting X position within header element\r\n\r\n\t\tthis.moveHover = this.moveHover.bind(this);\r\n\t\tthis.endMove = this.endMove.bind(this);\r\n\t\tthis.tableRowDropEvent = false;\r\n\r\n\t\tthis.touchMove = false;\r\n\r\n\t\tthis.connection = false;\r\n\t\tthis.connectionSelectorsTables = false;\r\n\t\tthis.connectionSelectorsElements = false;\r\n\t\tthis.connectionElements = [];\r\n\t\tthis.connections = [];\r\n\r\n\t\tthis.connectedTable = false;\r\n\t\tthis.connectedRow = false;\r\n\r\n\t\tthis.registerTableOption(\"movableRows\", false); //enable movable rows\r\n\t\tthis.registerTableOption(\"movableRowsConnectedTables\", false); //tables for movable rows to be connected to\r\n\t\tthis.registerTableOption(\"movableRowsConnectedElements\", false); //other elements for movable rows to be connected to\r\n\t\tthis.registerTableOption(\"movableRowsSender\", false);\r\n\t\tthis.registerTableOption(\"movableRowsReceiver\", \"insert\");\r\n\r\n\t\tthis.registerColumnOption(\"rowHandle\");\r\n\t}\r\n\r\n\tcreatePlaceholderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\tel.classList.add(\"tabulator-row-placeholder\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.movableRows){\r\n\t\t\tthis.connectionSelectorsTables = this.table.options.movableRowsConnectedTables;\r\n\t\t\tthis.connectionSelectorsElements = this.table.options.movableRowsConnectedElements;\r\n\r\n\t\t\tthis.connection = this.connectionSelectorsTables || this.connectionSelectorsElements;\r\n\r\n\t\t\tthis.subscribe(\"cell-init\", this.initializeCell.bind(this));\r\n\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeGroupHeader(group){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\trowEl;\r\n\r\n\t\t//inter table drag drop\r\n\t\tconfig.mouseup = function(e){\r\n\t\t\tself.tableRowDrop(e, row);\r\n\t\t}.bind(self);\r\n\r\n\t\t//same table drag drop\r\n\t\tconfig.mousemove = function(e){\r\n\t\t\tif(((e.pageY - Helpers.elOffset(group.element).top) + self.table.rowManager.element.scrollTop) > (group.getHeight() / 2)){\r\n\t\t\t\tif(self.toRow !== group || !self.toRowAfter){\r\n\t\t\t\t\tvar rowEl = group.getElement();\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling);\r\n\t\t\t\t\tself.moveRow(group, true);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(self.toRow !== group || self.toRowAfter){\r\n\t\t\t\t\tvar rowEl = group.getElement();\r\n\t\t\t\t\tif(rowEl.previousSibling){\r\n\t\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl);\r\n\t\t\t\t\t\tself.moveRow(group, false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.bind(self);\r\n\r\n\t\tgroup.modules.moveRow = config;\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\trowEl;\r\n\r\n\t\t//inter table drag drop\r\n\t\tconfig.mouseup = function(e){\r\n\t\t\tself.tableRowDrop(e, row);\r\n\t\t}.bind(self);\r\n\r\n\t\t//same table drag drop\r\n\t\tconfig.mousemove = function(e){\r\n\t\t\tvar rowEl = row.getElement();\r\n\r\n\t\t\tif(((e.pageY - Helpers.elOffset(rowEl).top) + self.table.rowManager.element.scrollTop) > (row.getHeight() / 2)){\r\n\t\t\t\tif(self.toRow !== row || !self.toRowAfter){\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling);\r\n\t\t\t\t\tself.moveRow(row, true);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(self.toRow !== row || self.toRowAfter){\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl);\r\n\t\t\t\t\tself.moveRow(row, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.bind(self);\r\n\r\n\r\n\t\tif(!this.hasHandle){\r\n\r\n\t\t\trowEl = row.getElement();\r\n\r\n\t\t\trowEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, row);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\trowEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.bindTouchEvents(row, row.getElement());\r\n\t\t}\r\n\r\n\t\trow.modules.moveRow = config;\r\n\t}\r\n\r\n\tinitializeColumn(column){\r\n\t\tif(column.definition.rowHandle && this.table.options.movableRows !== false){\r\n\t\t\tthis.hasHandle = true;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeCell(cell){\r\n\t\tif(cell.column.definition.rowHandle && this.table.options.movableRows !== false){\r\n\t\t\tvar self = this,\r\n\t\t\tcellEl = cell.getElement(true);\r\n\r\n\t\t\tcellEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, cell.row);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tcellEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.bindTouchEvents(cell.row, cellEl);\r\n\t\t}\r\n\t}\r\n\r\n\tbindTouchEvents(row, element){\r\n\t\tvar startYMove = false, //shifting center position of the cell\r\n\t\tdir = false,\r\n\t\tcurrentRow, nextRow, prevRow, nextRowHeight, prevRowHeight, nextRowHeightLast, prevRowHeightLast;\r\n\r\n\t\telement.addEventListener(\"touchstart\", (e) => {\r\n\t\t\tthis.checkTimeout = setTimeout(() => {\r\n\t\t\t\tthis.touchMove = true;\r\n\t\t\t\tcurrentRow = row;\r\n\t\t\t\tnextRow = row.nextRow();\r\n\t\t\t\tnextRowHeight = nextRow ? nextRow.getHeight()/2 : 0;\r\n\t\t\t\tprevRow = row.prevRow();\r\n\t\t\t\tprevRowHeight = prevRow ? prevRow.getHeight()/2 : 0;\r\n\t\t\t\tnextRowHeightLast = 0;\r\n\t\t\t\tprevRowHeightLast = 0;\r\n\t\t\t\tstartYMove = false;\r\n\r\n\t\t\t\tthis.startMove(e, row);\r\n\t\t\t}, this.checkPeriod);\r\n\t\t}, {passive: true});\r\n\t\tthis.moving, this.toRow, this.toRowAfter\r\n\t\telement.addEventListener(\"touchmove\", (e) => {\r\n\r\n\t\t\tvar halfCol, diff, moveToRow;\r\n\r\n\t\t\tif(this.moving){\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tthis.moveHover(e);\r\n\r\n\t\t\t\tif(!startYMove){\r\n\t\t\t\t\tstartYMove = e.touches[0].pageY;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdiff = e.touches[0].pageY - startYMove;\r\n\r\n\t\t\t\tif(diff > 0){\r\n\t\t\t\t\tif(nextRow && diff - nextRowHeightLast > nextRowHeight){\r\n\t\t\t\t\t\tmoveToRow = nextRow;\r\n\r\n\t\t\t\t\t\tif(moveToRow !== row){\r\n\t\t\t\t\t\t\tstartYMove = e.touches[0].pageY\r\n\t\t\t\t\t\t\tmoveToRow.getElement().parentNode.insertBefore(this.placeholderElement, moveToRow.getElement().nextSibling);\r\n\t\t\t\t\t\t\tthis.moveRow(moveToRow, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(prevRow && -diff - prevRowHeightLast > prevRowHeight){\r\n\t\t\t\t\t\tmoveToRow = prevRow;\r\n\r\n\t\t\t\t\t\tif(moveToRow !== row){\r\n\t\t\t\t\t\t\tstartYMove = e.touches[0].pageY;\r\n\t\t\t\t\t\t\tmoveToRow.getElement().parentNode.insertBefore(this.placeholderElement, moveToRow.getElement());\r\n\t\t\t\t\t\t\tthis.moveRow(moveToRow, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(moveToRow){\r\n\t\t\t\t\tcurrentRow = moveToRow;\r\n\t\t\t\t\tnextRow = moveToRow.nextRow();\r\n\t\t\t\t\tnextRowHeightLast = nextRowHeight;\r\n\t\t\t\t\tnextRowHeight = nextRow ? nextRow.getHeight() / 2 : 0;\r\n\t\t\t\t\tprevRow = moveToRow.prevRow();\r\n\t\t\t\t\tprevRowHeightLast = prevRowHeight;\r\n\t\t\t\t\tprevRowHeight = prevRow ? prevRow.getHeight() / 2 : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\telement.addEventListener(\"touchend\", (e) => {\r\n\t\t\tif(this.checkTimeout){\r\n\t\t\t\tclearTimeout(this.checkTimeout);\r\n\t\t\t}\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.endMove(e);\r\n\t\t\t\tthis.touchMove = false;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t_bindMouseMove(){\r\n\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\tif((row.type === \"row\" || row.type === \"group\") && row.modules.moveRow && row.modules.moveRow.mousemove){\r\n\t\t\t\trow.getElement().addEventListener(\"mousemove\", row.modules.moveRow.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t_unbindMouseMove(){\r\n\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\tif((row.type === \"row\" || row.type === \"group\") && row.modules.moveRow && row.modules.moveRow.mousemove){\r\n\t\t\t\trow.getElement().removeEventListener(\"mousemove\", row.modules.moveRow.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tstartMove(e, row){\r\n\t\tvar element = row.getElement();\r\n\r\n\t\tthis.setStartPosition(e, row);\r\n\r\n\t\tthis.moving = row;\r\n\r\n\t\tthis.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\t//create placeholder\r\n\t\tthis.placeholderElement.style.width = row.getWidth() + \"px\";\r\n\t\tthis.placeholderElement.style.height = row.getHeight() + \"px\";\r\n\r\n\t\tif(!this.connection){\r\n\t\t\telement.parentNode.insertBefore(this.placeholderElement, element);\r\n\t\t\telement.parentNode.removeChild(element);\r\n\t\t}else{\r\n\t\t\tthis.table.element.classList.add(\"tabulator-movingrow-sending\");\r\n\t\t\tthis.connectToTables(row);\r\n\t\t}\r\n\r\n\t\t//create hover element\r\n\t\tthis.hoverElement = element.cloneNode(true);\r\n\t\tthis.hoverElement.classList.add(\"tabulator-moving\");\r\n\r\n\t\tif(this.connection){\r\n\t\t\tdocument.body.appendChild(this.hoverElement);\r\n\t\t\tthis.hoverElement.style.left = \"0\";\r\n\t\t\tthis.hoverElement.style.top = \"0\";\r\n\t\t\tthis.hoverElement.style.width = this.table.element.clientWidth + \"px\";\r\n\t\t\tthis.hoverElement.style.whiteSpace = \"nowrap\";\r\n\t\t\tthis.hoverElement.style.overflow = \"hidden\";\r\n\t\t\tthis.hoverElement.style.pointerEvents = \"none\";\r\n\t\t}else{\r\n\t\t\tthis.table.rowManager.getTableElement().appendChild(this.hoverElement);\r\n\r\n\t\t\tthis.hoverElement.style.left = \"0\";\r\n\t\t\tthis.hoverElement.style.top = \"0\";\r\n\r\n\t\t\tthis._bindMouseMove();\r\n\t\t}\r\n\r\n\t\tdocument.body.addEventListener(\"mousemove\", this.moveHover);\r\n\t\tdocument.body.addEventListener(\"mouseup\", this.endMove);\r\n\r\n\t\tthis.dispatchExternal(\"rowMoving\", row.getComponent());\r\n\r\n\t\tthis.moveHover(e);\r\n\t}\r\n\r\n\tsetStartPosition(e, row){\r\n\t\tvar pageX = this.touchMove ? e.touches[0].pageX : e.pageX,\r\n\t\tpageY = this.touchMove ? e.touches[0].pageY : e.pageY,\r\n\t\telement, position;\r\n\r\n\t\telement = row.getElement();\r\n\t\tif(this.connection){\r\n\t\t\tposition = element.getBoundingClientRect();\r\n\r\n\t\t\tthis.startX = position.left - pageX + window.pageXOffset;\r\n\t\t\tthis.startY = position.top - pageY + window.pageYOffset;\r\n\t\t}else{\r\n\t\t\tthis.startY = (pageY - element.getBoundingClientRect().top);\r\n\t\t}\r\n\t}\r\n\r\n\tendMove(e){\r\n\t\tif(!e || e.which === 1 || this.touchMove){\r\n\t\t\tthis._unbindMouseMove();\r\n\r\n\t\t\tif(!this.connection){\r\n\t\t\t\tthis.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling);\r\n\t\t\t\tthis.placeholderElement.parentNode.removeChild(this.placeholderElement);\r\n\t\t\t}\r\n\r\n\t\t\tthis.hoverElement.parentNode.removeChild(this.hoverElement);\r\n\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tif(this.toRow){\r\n\t\t\t\tthis.table.rowManager.moveRow(this.moving, this.toRow, this.toRowAfter);\r\n\t\t\t}else{\r\n\t\t\t\tthis.dispatchExternal(\"rowMoveCancelled\", this.moving.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.moving = false;\r\n\t\t\tthis.toRow = false;\r\n\t\t\tthis.toRowAfter = false;\r\n\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", this.moveHover);\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", this.endMove);\r\n\r\n\t\t\tif(this.connection){\r\n\t\t\t\tthis.table.element.classList.remove(\"tabulator-movingrow-sending\");\r\n\t\t\t\tthis.disconnectFromTables();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmoveRow(row, after){\r\n\t\tthis.toRow = row;\r\n\t\tthis.toRowAfter = after;\r\n\t}\r\n\r\n\tmoveHover(e){\r\n\t\tif(this.connection){\r\n\t\t\tthis.moveHoverConnections.call(this, e);\r\n\t\t}else{\r\n\t\t\tthis.moveHoverTable.call(this, e);\r\n\t\t}\r\n\t}\r\n\r\n\tmoveHoverTable(e){\r\n\t\tvar rowHolder = this.table.rowManager.getElement(),\r\n\t\tscrollTop = rowHolder.scrollTop,\r\n\t\tyPos = ((this.touchMove ? e.touches[0].pageY : e.pageY) - rowHolder.getBoundingClientRect().top) + scrollTop,\r\n\t\tscrollPos;\r\n\r\n\t\tthis.hoverElement.style.top = (yPos - this.startY) + \"px\";\r\n\t}\r\n\r\n\tmoveHoverConnections(e){\r\n\t\tthis.hoverElement.style.left = (this.startX + (this.touchMove ? e.touches[0].pageX : e.pageX)) + \"px\";\r\n\t\tthis.hoverElement.style.top = (this.startY + (this.touchMove ? e.touches[0].pageY : e.pageY)) + \"px\";\r\n\t}\r\n\r\n\telementRowDrop(e, element, row){\r\n\t\tthis.dispatchExternal(\"movableRowsElementDrop\", e, element, row ? row.getComponent() : false);\r\n\t}\r\n\r\n\t//establish connection with other tables\r\n\tconnectToTables(row){\r\n\t\tvar connectionTables;\r\n\r\n\t\tif(this.connectionSelectorsTables){\r\n\t\t\tconnectionTables = this.commsConnections(this.connectionSelectorsTables);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSendingStart\", connectionTables);\r\n\r\n\t\t\tthis.commsSend(this.connectionSelectorsTables, \"moveRow\", \"connect\", {\r\n\t\t\t\trow:row,\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.connectionSelectorsElements){\r\n\r\n\t\t\tthis.connectionElements = [];\r\n\r\n\t\t\tif(!Array.isArray(this.connectionSelectorsElements)){\r\n\t\t\t\tthis.connectionSelectorsElements = [this.connectionSelectorsElements];\r\n\t\t\t}\r\n\r\n\t\t\tthis.connectionSelectorsElements.forEach((query) => {\r\n\t\t\t\tif(typeof query === \"string\"){\r\n\t\t\t\t\tthis.connectionElements = this.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(query)));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.connectionElements.push(query);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.connectionElements.forEach((element) => {\r\n\t\t\t\tvar dropEvent = (e) => {\r\n\t\t\t\t\tthis.elementRowDrop(e, element, this.moving);\r\n\t\t\t\t};\r\n\r\n\t\t\t\telement.addEventListener(\"mouseup\", dropEvent);\r\n\t\t\t\telement.tabulatorElementDropEvent = dropEvent;\r\n\r\n\t\t\t\telement.classList.add(\"tabulator-movingrow-receiving\");\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t//disconnect from other tables\r\n\tdisconnectFromTables(){\r\n\t\tvar connectionTables;\r\n\r\n\t\tif(this.connectionSelectorsTables){\r\n\t\t\tconnectionTables = this.commsConnections(this.connectionSelectorsTables);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSendingStop\", connectionTables);\r\n\r\n\t\t\tthis.commsSend(this.connectionSelectorsTables, \"moveRow\", \"disconnect\");\r\n\t\t}\r\n\r\n\t\tthis.connectionElements.forEach((element) => {\r\n\t\t\telement.classList.remove(\"tabulator-movingrow-receiving\");\r\n\t\t\telement.removeEventListener(\"mouseup\", element.tabulatorElementDropEvent);\r\n\t\t\tdelete element.tabulatorElementDropEvent;\r\n\t\t});\r\n\t}\r\n\r\n\t//accept incomming connection\r\n\tconnect(table, row){\r\n\t\tif(!this.connectedTable){\r\n\t\t\tthis.connectedTable = table;\r\n\t\t\tthis.connectedRow = row;\r\n\r\n\t\t\tthis.table.element.classList.add(\"tabulator-movingrow-receiving\");\r\n\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\t\tif(row.type === \"row\" && row.modules.moveRow && row.modules.moveRow.mouseup){\r\n\t\t\t\t\trow.getElement().addEventListener(\"mouseup\", row.modules.moveRow.mouseup);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.tableRowDropEvent = this.tableRowDrop.bind(this);\r\n\r\n\t\t\tthis.table.element.addEventListener(\"mouseup\", this.tableRowDropEvent);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivingStart\", row, table);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Row Error - Table cannot accept connection, already connected to table:\", this.connectedTable);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//close incomming connection\r\n\tdisconnect(table){\r\n\t\tif(table === this.connectedTable){\r\n\t\t\tthis.connectedTable = false;\r\n\t\t\tthis.connectedRow = false;\r\n\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-movingrow-receiving\");\r\n\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) =>{\r\n\t\t\t\tif(row.type === \"row\" && row.modules.moveRow && row.modules.moveRow.mouseup){\r\n\t\t\t\t\trow.getElement().removeEventListener(\"mouseup\", row.modules.moveRow.mouseup);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.table.element.removeEventListener(\"mouseup\", this.tableRowDropEvent);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivingStop\", table);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Row Error - trying to disconnect from non connected table\")\r\n\t\t}\r\n\t}\r\n\r\n\tdropComplete(table, row, success){\r\n\t\tvar sender = false;\r\n\r\n\t\tif(success){\r\n\r\n\t\t\tswitch(typeof this.table.options.movableRowsSender){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tsender = this.senders[this.table.options.movableRowsSender];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tsender = this.table.options.movableRowsSender;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(sender){\r\n\t\t\t\tsender.call(this, this.moving.getComponent(), row ? row.getComponent() : undefined, table)\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.options.movableRowsSender){\r\n\t\t\t\t\tconsole.warn(\"Mover Row Error - no matching sender found:\", this.table.options.movableRowsSender);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSent\", this.moving.getComponent(), row ? row.getComponent() : undefined, table);\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"movableRowsSentFailed\", this.moving.getComponent(), row ? row.getComponent() : undefined, table);\r\n\t\t}\r\n\r\n\t\tthis.endMove();\r\n\t}\r\n\r\n\ttableRowDrop(e, row){\r\n\t\tvar receiver = false,\r\n\t\tsuccess = false;\r\n\r\n\t\te.stopImmediatePropagation();\r\n\r\n\t\tswitch(typeof this.table.options.movableRowsReceiver){\r\n\t\t\tcase \"string\":\r\n\t\t\treceiver = this.receivers[this.table.options.movableRowsReceiver];\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\treceiver = this.table.options.movableRowsReceiver;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(receiver){\r\n\t\t\tsuccess = receiver.call(this, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Mover Row Error - no matching receiver found:\", this.table.options.movableRowsReceiver)\r\n\t\t}\r\n\r\n\t\tif(success){\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceived\", this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable);\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivedFailed\", this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable);\r\n\t\t}\r\n\r\n\t\tthis.commsSend(this.connectedTable, \"moveRow\", \"dropcomplete\", {\r\n\t\t\trow:row,\r\n\t\t\tsuccess:success,\r\n\t\t});\r\n\t}\r\n\r\n\tcommsReceived(table, action, data){\r\n\t\tswitch(action){\r\n\t\t\tcase \"connect\":\r\n\t\t\treturn this.connect(table, data.row);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"disconnect\":\r\n\t\t\treturn this.disconnect(table);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"dropcomplete\":\r\n\t\t\treturn this.dropComplete(table, data.row, data.success);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMoveRows.prototype.receivers = {\r\n\tinsert:function(fromRow, toRow, fromTable){\r\n\t\tthis.table.addRow(fromRow.getData(), undefined, toRow);\r\n\t\treturn true;\r\n\t},\r\n\r\n\tadd:function(fromRow, toRow, fromTable){\r\n\t\tthis.table.addRow(fromRow.getData());\r\n\t\treturn true;\r\n\t},\r\n\r\n\tupdate:function(fromRow, toRow, fromTable){\r\n\t\tif(toRow){\r\n\t\t\ttoRow.update(fromRow.getData());\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\r\n\treplace:function(fromRow, toRow, fromTable){\r\n\t\tif(toRow){\r\n\t\t\tthis.table.addRow(fromRow.getData(), undefined, toRow);\r\n\t\t\ttoRow.delete();\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n};\r\n\r\nMoveRows.prototype.senders = {\r\n\tdelete:function(fromRow, toRow, toTable){\r\n\t\tfromRow.delete();\r\n\t}\r\n};\r\n\r\nMoveRows.moduleName = \"moveRow\";\r\n\r\nexport default MoveRows;","export default {};","import Module from '../../core/Module.js';\r\n\r\nimport defaultMutators from './defaults/mutators.js';\r\n\r\nclass Mutator extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.allowedTypes = [\"\", \"data\", \"edit\", \"clipboard\"]; //list of muatation types\r\n\t\tthis.enabled = true;\r\n\r\n\t\tthis.registerColumnOption(\"mutator\");\r\n\t\tthis.registerColumnOption(\"mutatorParams\");\r\n\t\tthis.registerColumnOption(\"mutatorData\");\r\n\t\tthis.registerColumnOption(\"mutatorDataParams\");\r\n\t\tthis.registerColumnOption(\"mutatorEdit\");\r\n\t\tthis.registerColumnOption(\"mutatorEditParams\");\r\n\t\tthis.registerColumnOption(\"mutatorClipboard\");\r\n\t\tthis.registerColumnOption(\"mutatorClipboardParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-value-changing\", this.transformCell.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"row-data-init-before\", this.rowDataChanged.bind(this));\r\n\t\tthis.subscribe(\"row-data-changing\", this.rowDataChanged.bind(this));\r\n\t}\r\n\r\n\trowDataChanged(row, tempData, updatedData){\r\n\t\treturn this.transformRow(tempData, \"data\", updatedData);\r\n\t}\r\n\r\n\t//initialize column mutator\r\n\tinitializeColumn(column){\r\n\t\tvar match = false,\r\n\t\tconfig = {};\r\n\r\n\t\tthis.allowedTypes.forEach((type) => {\r\n\t\t\tvar key = \"mutator\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\t\tmutator;\r\n\r\n\t\t\tif(column.definition[key]){\r\n\t\t\t\tmutator = this.lookupMutator(column.definition[key]);\r\n\r\n\t\t\t\tif(mutator){\r\n\t\t\t\t\tmatch = true;\r\n\r\n\t\t\t\t\tconfig[key] = {\r\n\t\t\t\t\t\tmutator:mutator,\r\n\t\t\t\t\t\tparams: column.definition[key + \"Params\"] || {},\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tcolumn.modules.mutate = config;\r\n\t\t}\r\n\t}\r\n\r\n\tlookupMutator(value){\r\n\t\tvar mutator = false;\r\n\r\n\t\t//set column mutator\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Mutator.mutators[value]){\r\n\t\t\t\tmutator = Mutator.mutators[value];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Mutator Error - No such mutator found, ignoring: \", value);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tmutator = value;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn mutator;\r\n\t}\r\n\r\n\t//apply mutator to row\r\n\ttransformRow(data, type, updatedData){\r\n\t\tvar key = \"mutator\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\tvalue;\r\n\r\n\t\tif(this.enabled){\r\n\r\n\t\t\tthis.table.columnManager.traverse((column) => {\r\n\t\t\t\tvar mutator, params, component;\r\n\r\n\t\t\t\tif(column.modules.mutate){\r\n\t\t\t\t\tmutator = column.modules.mutate[key] || column.modules.mutate.mutator || false;\r\n\r\n\t\t\t\t\tif(mutator){\r\n\t\t\t\t\t\tvalue = column.getFieldValue(typeof updatedData !== \"undefined\" ? updatedData : data);\r\n\r\n\t\t\t\t\t\tif(type == \"data\" || typeof value !== \"undefined\"){\r\n\t\t\t\t\t\t\tcomponent = column.getComponent();\r\n\t\t\t\t\t\t\tparams = typeof mutator.params === \"function\" ? mutator.params(value, data, type, component) : mutator.params;\r\n\t\t\t\t\t\t\tcolumn.setFieldValue(data, mutator.mutator(value, data, type, params, component));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//apply mutator to new cell value\r\n\ttransformCell(cell, value){\r\n\t\tif(cell.column.modules.mutate){\r\n\t\t\tvar mutator = cell.column.modules.mutate.mutatorEdit || cell.column.modules.mutate.mutator || false,\r\n\t\t\ttempData = {};\r\n\r\n\t\t\tif(mutator){\r\n\t\t\t\ttempData = Object.assign(tempData, cell.row.getData());\r\n\t\t\t\tcell.column.setFieldValue(tempData, value);\r\n\t\t\t\treturn mutator.mutator(value, tempData, \"edit\", mutator.params, cell.getComponent());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\tenable(){\r\n\t\tthis.enabled = true;\r\n\t}\r\n\r\n\tdisable(){\r\n\t\tthis.enabled = false;\r\n\t}\r\n}\r\n\r\nMutator.moduleName = \"mutator\";\r\n\r\n//load defaults\r\nMutator.mutators = defaultMutators;\r\n\r\nexport default Mutator;","export default function(pageSize, currentRow, currentPage, totalRows, totalPages){\r\n\tvar el = document.createElement(\"span\"),\r\n\tshowingEl = document.createElement(\"span\"),\r\n\tvalueEl = document.createElement(\"span\"),\r\n\tofEl = document.createElement(\"span\"),\r\n\ttotalEl = document.createElement(\"span\"),\r\n\trowsEl = document.createElement(\"span\");\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|showing\", (value) => {\r\n\t\tshowingEl.innerHTML = value;\r\n\t});\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|of\", (value) => {\r\n\t\tofEl.innerHTML = value;\r\n\t});\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|rows\", (value) => {\r\n\t\trowsEl.innerHTML = value;\r\n\t});\r\n\r\n\tif(totalRows){\r\n\t\tvalueEl.innerHTML = \" \" + currentRow + \"-\" + Math.min((currentRow + pageSize - 1), totalRows) + \" \";\r\n\t\t\r\n\t\ttotalEl.innerHTML = \" \" + totalRows + \" \";\r\n\t\t\r\n\t\tel.appendChild(showingEl);\r\n\t\tel.appendChild(valueEl);\r\n\t\tel.appendChild(ofEl);\r\n\t\tel.appendChild(totalEl);\r\n\t\tel.appendChild(rowsEl);\r\n\t}else{\r\n\t\tvalueEl.innerHTML = \" 0 \";\r\n\r\n\t\tel.appendChild(showingEl);\r\n\t\tel.appendChild(valueEl);\r\n\t\tel.appendChild(rowsEl);\r\n\t}\r\n\t\r\n\treturn el;\r\n};","export default function(pageSize, currentRow, currentPage, totalRows, totalPages){\r\n\r\n var el = document.createElement(\"span\"),\r\n\tshowingEl = document.createElement(\"span\"),\r\n\tvalueEl = document.createElement(\"span\"),\r\n\tofEl = document.createElement(\"span\"),\r\n\ttotalEl = document.createElement(\"span\"),\r\n\trowsEl = document.createElement(\"span\");\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|showing\", (value) => {\r\n\t\tshowingEl.innerHTML = value;\r\n\t});\r\n\t\r\n\tvalueEl.innerHTML = \" \" + currentPage + \" \";\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|of\", (value) => {\r\n\t\tofEl.innerHTML = value;\r\n\t});\r\n\t\r\n\ttotalEl.innerHTML = \" \" + totalPages + \" \";\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|pages\", (value) => {\r\n\t\trowsEl.innerHTML = value;\r\n\t});\r\n\t\r\n\tel.appendChild(showingEl);\r\n\tel.appendChild(valueEl);\r\n\tel.appendChild(ofEl);\r\n\tel.appendChild(totalEl);\r\n\tel.appendChild(rowsEl);\r\n\t\r\n\treturn el;\r\n};","import rows from './pageCounters/rows.js';\r\nimport pages from './pageCounters/pages.js';\r\n\r\n\r\nexport default {\r\n\trows:rows,\r\n\tpages:pages,\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultPageCounters from './defaults/pageCounters.js';\r\n\r\nclass Page extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.mode = \"local\";\r\n\t\tthis.progressiveLoad = false;\r\n\t\t\r\n\t\tthis.element = null;\r\n\t\tthis.pageCounterElement = null;\r\n\t\tthis.pageCounter = null;\r\n\t\t\r\n\t\tthis.size = 0;\r\n\t\tthis.page = 1;\r\n\t\tthis.count = 5;\r\n\t\tthis.max = 1;\r\n\r\n\t\tthis.remoteRowCountEstimate = null;\r\n\t\t\r\n\t\tthis.displayIndex = 0; //index in display pipeline\r\n\t\t\r\n\t\tthis.initialLoad = true;\r\n\t\tthis.dataChanging = false; //flag to check if data is being changed by this module\r\n\t\t\r\n\t\tthis.pageSizes = [];\r\n\t\t\r\n\t\tthis.registerTableOption(\"pagination\", false); //set pagination type\r\n\t\tthis.registerTableOption(\"paginationMode\", \"local\"); //local or remote pagination\r\n\t\tthis.registerTableOption(\"paginationSize\", false); //set number of rows to a page\r\n\t\tthis.registerTableOption(\"paginationInitialPage\", 1); //initial page to show on load\r\n\t\tthis.registerTableOption(\"paginationCounter\", false); // set pagination counter\r\n\t\tthis.registerTableOption(\"paginationCounterElement\", false); // set pagination counter\r\n\t\tthis.registerTableOption(\"paginationButtonCount\", 5); // set count of page button\r\n\t\tthis.registerTableOption(\"paginationSizeSelector\", false); //add pagination size selector element\r\n\t\tthis.registerTableOption(\"paginationElement\", false); //element to hold pagination numbers\r\n\t\t// this.registerTableOption(\"paginationDataSent\", {}); //pagination data sent to the server\r\n\t\t// this.registerTableOption(\"paginationDataReceived\", {}); //pagination data received from the server\r\n\t\tthis.registerTableOption(\"paginationAddRow\", \"page\"); //add rows on table or page\r\n\t\t\r\n\t\tthis.registerTableOption(\"progressiveLoad\", false); //progressive loading\r\n\t\tthis.registerTableOption(\"progressiveLoadDelay\", 0); //delay between requests\r\n\t\tthis.registerTableOption(\"progressiveLoadScrollMargin\", 0); //margin before scroll begins\r\n\t\t\r\n\t\tthis.registerTableFunction(\"setMaxPage\", this.setMaxPage.bind(this));\r\n\t\tthis.registerTableFunction(\"setPage\", this.setPage.bind(this));\r\n\t\tthis.registerTableFunction(\"setPageToRow\", this.userSetPageToRow.bind(this));\r\n\t\tthis.registerTableFunction(\"setPageSize\", this.userSetPageSize.bind(this));\r\n\t\tthis.registerTableFunction(\"getPageSize\", this.getPageSize.bind(this));\r\n\t\tthis.registerTableFunction(\"previousPage\", this.previousPage.bind(this));\r\n\t\tthis.registerTableFunction(\"nextPage\", this.nextPage.bind(this));\r\n\t\tthis.registerTableFunction(\"getPage\", this.getPage.bind(this));\r\n\t\tthis.registerTableFunction(\"getPageMax\", this.getPageMax.bind(this));\r\n\t\t\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"pageTo\", this.setPageToRow.bind(this));\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"row-added\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"data-processed\", this.initialLoadComplete.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.calculatePageSizes.bind(this));\r\n\r\n\t\t\tif(this.table.options.paginationAddRow == \"page\"){\r\n\t\t\t\tthis.subscribe(\"row-adding-position\", this.rowAddingPosition.bind(this));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.options.paginationMode === \"remote\"){\r\n\t\t\t\tthis.subscribe(\"data-params\", this.remotePageParams.bind(this));\r\n\t\t\t\tthis.subscribe(\"data-loaded\", this._parseRemoteData.bind(this));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.options.progressiveLoad){\r\n\t\t\t\tconsole.error(\"Progressive Load Error - Pagination and progressive load cannot be used at the same time\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.registerDisplayHandler(this.restOnRenderBefore.bind(this), 40);\r\n\t\t\tthis.registerDisplayHandler(this.getRows.bind(this), 50);\r\n\t\t\t\r\n\t\t\tthis.createElements();\r\n\t\t\tthis.initializePageCounter();\r\n\t\t\tthis.initializePaginator();\r\n\t\t}else if(this.table.options.progressiveLoad){\r\n\t\t\tthis.subscribe(\"data-params\", this.remotePageParams.bind(this));\r\n\t\t\tthis.subscribe(\"data-loaded\", this._parseRemoteData.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.calculatePageSizes.bind(this));\r\n\t\t\tthis.subscribe(\"data-processed\", this.initialLoadComplete.bind(this));\r\n\t\t\t\r\n\t\t\tthis.initializeProgressive(this.table.options.progressiveLoad)\r\n\t\t\t\r\n\t\t\tif(this.table.options.progressiveLoad === \"scroll\"){\r\n\t\t\t\tthis.subscribe(\"scroll-vertical\", this.scrollVertical.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trowAddingPosition(row, top){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tdispRows = rowManager.getDisplayRows(),\r\n\t\tindex;\r\n\t\t\r\n\t\tif(top){\r\n\t\t\tif(dispRows.length){\r\n\t\t\t\tindex = dispRows[0];\r\n\t\t\t}else{\r\n\t\t\t\tif(rowManager.activeRows.length){\r\n\t\t\t\t\tindex = rowManager.activeRows[rowManager.activeRows.length-1];\r\n\t\t\t\t\ttop = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(dispRows.length){\r\n\t\t\t\tindex = dispRows[dispRows.length - 1];\r\n\t\t\t\ttop = dispRows.length < this.size ? false : true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn {index, top}\r\n\t}\r\n\t\r\n\tcalculatePageSizes(){\r\n\t\tvar testElRow, testElCell;\r\n\t\t\r\n\t\tif(this.table.options.paginationSize){\r\n\t\t\tthis.size = this.table.options.paginationSize;\r\n\t\t}else{\r\n\t\t\ttestElRow = document.createElement(\"div\");\r\n\t\t\ttestElRow.classList.add(\"tabulator-row\");\r\n\t\t\ttestElRow.style.visibility = \"hidden\";\r\n\t\t\t\r\n\t\t\ttestElCell = document.createElement(\"div\");\r\n\t\t\ttestElCell.classList.add(\"tabulator-cell\");\r\n\t\t\ttestElCell.innerHTML = \"Page Row Test\";\r\n\t\t\t\r\n\t\t\ttestElRow.appendChild(testElCell);\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getTableElement().appendChild(testElRow);\r\n\t\t\t\r\n\t\t\tthis.size = Math.floor(this.table.rowManager.getElement().clientHeight / testElRow.offsetHeight);\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getTableElement().removeChild(testElRow);\r\n\t\t}\r\n\t\t\r\n\t\tthis.generatePageSizeSelectList();\r\n\t}\r\n\t\r\n\tinitialLoadComplete(){\r\n\t\tthis.initialLoad = false;\r\n\t}\r\n\t\r\n\tremotePageParams(data, config, silent, params){\r\n\t\tif(!this.initialLoad){\r\n\t\t\tif((this.progressiveLoad && !silent) || (!this.progressiveLoad && !this.dataChanging)){\r\n\t\t\t\tthis.reset(true);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//configure request params\r\n\t\tparams.page = this.page;\r\n\t\t\r\n\t\t//set page size if defined\r\n\t\tif(this.size){\r\n\t\t\tparams.size = this.size;\r\n\t\t}\r\n\t\t\r\n\t\treturn params;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\tuserSetPageToRow(row){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\trow = this.rowManager.findRow(row);\r\n\t\t\t\r\n\t\t\tif(row){\r\n\t\t\t\treturn this.setPageToRow(row)\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn Promise.reject();\r\n\t}\r\n\t\r\n\tuserSetPageSize(size){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\tthis.setPageSize(size);\r\n\t\t\treturn this.setPage(1);\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\r\n\tscrollVertical(top, dir){\r\n\t\tvar element, diff, margin;\r\n\t\tif(!dir && !this.table.dataLoader.loading){\r\n\t\t\telement = this.table.rowManager.getElement();\r\n\t\t\tdiff = element.scrollHeight - element.clientHeight - top;\r\n\t\t\tmargin = this.table.options.progressiveLoadScrollMargin || (element.clientHeight * 2);\r\n\t\t\t\r\n\t\t\tif(diff < margin){\r\n\t\t\t\tthis.nextPage()\r\n\t\t\t\t.catch(() => {}); //consume the exception thrown when on the last page\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trestOnRenderBefore(rows, renderInPosition){\r\n\t\tif(!renderInPosition){\r\n\t\t\tif(this.mode === \"local\"){\r\n\t\t\t\tthis.reset();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\trowsUpdated(){\r\n\t\tthis.refreshData(true, \"all\");\r\n\t}\r\n\t\r\n\tcreateElements(){\r\n\t\tvar button;\r\n\t\t\r\n\t\tthis.element = document.createElement(\"span\");\r\n\t\tthis.element.classList.add(\"tabulator-paginator\");\r\n\t\t\r\n\t\tthis.pagesElement = document.createElement(\"span\");\r\n\t\tthis.pagesElement.classList.add(\"tabulator-pages\");\r\n\t\t\r\n\t\tbutton = document.createElement(\"button\");\r\n\t\tbutton.classList.add(\"tabulator-page\");\r\n\t\tbutton.setAttribute(\"type\", \"button\");\r\n\t\tbutton.setAttribute(\"role\", \"button\");\r\n\t\tbutton.setAttribute(\"aria-label\", \"\");\r\n\t\tbutton.setAttribute(\"title\", \"\");\r\n\t\t\r\n\t\tthis.firstBut = button.cloneNode(true);\r\n\t\tthis.firstBut.setAttribute(\"data-page\", \"first\");\r\n\t\t\r\n\t\tthis.prevBut = button.cloneNode(true);\r\n\t\tthis.prevBut.setAttribute(\"data-page\", \"prev\");\r\n\t\t\r\n\t\tthis.nextBut = button.cloneNode(true);\r\n\t\tthis.nextBut.setAttribute(\"data-page\", \"next\");\r\n\t\t\r\n\t\tthis.lastBut = button.cloneNode(true);\r\n\t\tthis.lastBut.setAttribute(\"data-page\", \"last\");\r\n\t\t\r\n\t\tif(this.table.options.paginationSizeSelector){\r\n\t\t\tthis.pageSizeSelect = document.createElement(\"select\");\r\n\t\t\tthis.pageSizeSelect.classList.add(\"tabulator-page-size\");\r\n\t\t}\r\n\t}\r\n\t\r\n\tgeneratePageSizeSelectList(){\r\n\t\tvar pageSizes = [];\r\n\t\t\r\n\t\tif(this.pageSizeSelect){\r\n\t\t\t\r\n\t\t\tif(Array.isArray(this.table.options.paginationSizeSelector)){\r\n\t\t\t\tpageSizes = this.table.options.paginationSizeSelector;\r\n\t\t\t\tthis.pageSizes = pageSizes;\r\n\t\t\t\t\r\n\t\t\t\tif(this.pageSizes.indexOf(this.size) == -1){\r\n\t\t\t\t\tpageSizes.unshift(this.size);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t\r\n\t\t\t\tif(this.pageSizes.indexOf(this.size) == -1){\r\n\t\t\t\t\tpageSizes = [];\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (let i = 1; i < 5; i++){\r\n\t\t\t\t\t\tpageSizes.push(this.size * i);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.pageSizes = pageSizes;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tpageSizes = this.pageSizes;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\twhile(this.pageSizeSelect.firstChild) this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);\r\n\t\t\t\r\n\t\t\tpageSizes.forEach((item) => {\r\n\t\t\t\tvar itemEl = document.createElement(\"option\");\r\n\t\t\t\titemEl.value = item;\r\n\t\t\t\t\r\n\t\t\t\tif(item === true){\r\n\t\t\t\t\tthis.langBind(\"pagination|all\", function(value){\r\n\t\t\t\t\t\titemEl.innerHTML = value;\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\titemEl.innerHTML = item;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tthis.pageSizeSelect.appendChild(itemEl);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.pageSizeSelect.value = this.size;\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializePageCounter(){\r\n\t\tvar counter = this.table.options.paginationCounter,\r\n\t\tpageCounter = null;\r\n\t\t\r\n\t\tif(counter){\r\n\t\t\tif(typeof counter === \"function\"){\r\n\t\t\t\tpageCounter = counter;\r\n\t\t\t}else{\r\n\t\t\t\tpageCounter = Page.pageCounters[counter];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(pageCounter){\r\n\t\t\t\tthis.pageCounter = pageCounter;\r\n\t\t\t\t\r\n\t\t\t\tthis.pageCounterElement = document.createElement(\"span\");\r\n\t\t\t\tthis.pageCounterElement.classList.add(\"tabulator-page-counter\");\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Pagination Error - No such page counter found: \", counter);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//setup pagination\r\n\tinitializePaginator(hidden){\r\n\t\tvar pageSelectLabel, paginationCounterHolder;\r\n\t\t\r\n\t\tif(!hidden){\r\n\t\t\t//build pagination element\r\n\t\t\t\r\n\t\t\t//bind localizations\r\n\t\t\tthis.langBind(\"pagination|first\", (value) => {\r\n\t\t\t\tthis.firstBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|first_title\", (value) => {\r\n\t\t\t\tthis.firstBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.firstBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|prev\", (value) => {\r\n\t\t\t\tthis.prevBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|prev_title\", (value) => {\r\n\t\t\t\tthis.prevBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.prevBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|next\", (value) => {\r\n\t\t\t\tthis.nextBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|next_title\", (value) => {\r\n\t\t\t\tthis.nextBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.nextBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|last\", (value) => {\r\n\t\t\t\tthis.lastBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|last_title\", (value) => {\r\n\t\t\t\tthis.lastBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.lastBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t//click bindings\r\n\t\t\tthis.firstBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.setPage(1)\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.prevBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.previousPage()\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.nextBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.nextPage()\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.lastBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.setPage(this.max)\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(this.table.options.paginationElement){\r\n\t\t\t\tthis.element = this.table.options.paginationElement;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.pageSizeSelect){\r\n\t\t\t\tpageSelectLabel = document.createElement(\"label\");\r\n\t\t\t\t\r\n\t\t\t\tthis.langBind(\"pagination|page_size\", (value) => {\r\n\t\t\t\t\tthis.pageSizeSelect.setAttribute(\"aria-label\", value);\r\n\t\t\t\t\tthis.pageSizeSelect.setAttribute(\"title\", value);\r\n\t\t\t\t\tpageSelectLabel.innerHTML = value;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.element.appendChild(pageSelectLabel);\r\n\t\t\t\tthis.element.appendChild(this.pageSizeSelect);\r\n\t\t\t\t\r\n\t\t\t\tthis.pageSizeSelect.addEventListener(\"change\", (e) => {\r\n\t\t\t\t\tthis.setPageSize(this.pageSizeSelect.value == \"true\" ? true : this.pageSizeSelect.value);\r\n\t\t\t\t\tthis.setPage(1)\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//append to DOM\r\n\t\t\tthis.element.appendChild(this.firstBut);\r\n\t\t\tthis.element.appendChild(this.prevBut);\r\n\t\t\tthis.element.appendChild(this.pagesElement);\r\n\t\t\tthis.element.appendChild(this.nextBut);\r\n\t\t\tthis.element.appendChild(this.lastBut);\r\n\t\t\t\r\n\t\t\tif(!this.table.options.paginationElement && !hidden){\r\n\t\t\t\tif(this.table.options.paginationCounter){\r\n\r\n\t\t\t\t\tpaginationCounterHolder \r\n\r\n\t\t\t\t\tif(this.table.options.paginationCounterElement){\r\n\t\t\t\t\t\tif(this.table.options.paginationCounterElement instanceof HTMLElement){\r\n\t\t\t\t\t\t\tthis.table.options.paginationCounterElement.appendChild(this.pageCounterElement);\r\n\t\t\t\t\t\t}else if(typeof this.table.options.paginationCounterElement === \"string\"){\r\n\t\t\t\t\t\t\tpaginationCounterHolder = document.querySelector(this.table.options.paginationCounterElement);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(paginationCounterHolder){\r\n\t\t\t\t\t\t\t\tpaginationCounterHolder.appendChild(this.pageCounterElement);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Pagination Error - Unable to find element matching paginationCounterElement selector:\", this.table.options.paginationCounterElement);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.table.footerManager.append(this.pageCounterElement);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.table.footerManager.append(this.element, this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.page = this.table.options.paginationInitialPage;\r\n\t\t\tthis.count = this.table.options.paginationButtonCount;\r\n\t\t}\r\n\t\t\r\n\t\t//set default values\r\n\t\tthis.mode = this.table.options.paginationMode;\r\n\t}\r\n\t\r\n\tinitializeProgressive(mode){\r\n\t\tthis.initializePaginator(true);\r\n\t\tthis.mode = \"progressive_\" + mode;\r\n\t\tthis.progressiveLoad = true;\r\n\t}\r\n\t\r\n\ttrackChanges(){\r\n\t\tthis.dispatch(\"page-changed\");\r\n\t}\r\n\t\r\n\tsetDisplayIndex(index){\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\t\r\n\tgetDisplayIndex(){\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\t\r\n\t//calculate maximum page from number of rows\r\n\tsetMaxRows(rowCount){\r\n\t\tif(!rowCount){\r\n\t\t\tthis.max = 1;\r\n\t\t}else{\r\n\t\t\tthis.max = this.size === true ? 1 : Math.ceil(rowCount/this.size);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.page > this.max){\r\n\t\t\tthis.page = this.max;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//reset to first page without triggering action\r\n\treset(force){\r\n\t\tif(!this.initialLoad){\r\n\t\t\tif(this.mode == \"local\" || force){\r\n\t\t\t\tthis.page = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set the maximum page\r\n\tsetMaxPage(max){\r\n\t\t\r\n\t\tmax = parseInt(max);\r\n\t\t\r\n\t\tthis.max = max || 1;\r\n\t\t\r\n\t\tif(this.page > this.max){\r\n\t\t\tthis.page = this.max;\r\n\t\t\tthis.trigger();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set current page number\r\n\tsetPage(page){\r\n\t\tswitch(page){\r\n\t\t\tcase \"first\":\r\n\t\t\treturn this.setPage(1);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"prev\":\r\n\t\t\treturn this.previousPage();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"next\":\r\n\t\t\treturn this.nextPage();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"last\":\r\n\t\t\treturn this.setPage(this.max);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tpage = parseInt(page);\r\n\t\t\r\n\t\tif((page > 0 && page <= this.max) || this.mode !== \"local\"){\r\n\t\t\tthis.page = page;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Requested page is out of range of 1 - \" + this.max + \":\", page);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetPageToRow(row){\r\n\t\tvar rows = this.table.rowManager.getDisplayRows(this.displayIndex - 1);\r\n\t\tvar index = rows.indexOf(row);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tvar page = this.size === true ? 1 : Math.ceil((index + 1) / this.size);\r\n\t\t\t\r\n\t\t\treturn this.setPage(page)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Requested row is not visible\");\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetPageSize(size){\r\n\t\tif(size !== true){\r\n\t\t\tsize = parseInt(size);\r\n\t\t}\r\n\t\t\r\n\t\tif(size > 0){\r\n\t\t\tthis.size = size;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.pageSizeSelect){\r\n\t\t\t// this.pageSizeSelect.value = size;\r\n\t\t\tthis.generatePageSizeSelectList();\r\n\t\t}\r\n\t\t\r\n\t\tthis.trackChanges();\r\n\t}\r\n\t\r\n\t_setPageCounter(totalRows, size, currentRow){\r\n\t\tvar content;\r\n\t\t\r\n\t\tif(this.pageCounter){\r\n\r\n\t\t\tif(this.mode === \"remote\"){\r\n\t\t\t\tsize = this.size;\r\n\t\t\t\tcurrentRow = ((this.page - 1) * this.size) + 1;\r\n\t\t\t\ttotalRows = this.remoteRowCountEstimate;\r\n\t\t\t}\r\n\r\n\t\t\tcontent = this.pageCounter.call(this, size, currentRow, this.page, totalRows, this.max);\r\n\t\t\t\r\n\t\t\tswitch(typeof content){\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\tif(content instanceof Node){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//clear previous cell contents\r\n\t\t\t\t\twhile(this.pageCounterElement.firstChild) this.pageCounterElement.removeChild(this.pageCounterElement.firstChild);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.pageCounterElement.appendChild(content);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(content != null){\r\n\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);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"undefined\":\r\n\t\t\t\tcase \"null\":\r\n\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.pageCounterElement.innerHTML = content;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//setup the pagination buttons\r\n\t_setPageButtons(){\r\n\t\tlet leftSize = Math.floor((this.count-1) / 2);\r\n\t\tlet rightSize = Math.ceil((this.count-1) / 2);\r\n\t\tlet min = this.max - this.page + leftSize + 1 < this.count ? this.max-this.count+1: Math.max(this.page-leftSize,1);\r\n\t\tlet max = this.page <= rightSize? Math.min(this.count, this.max) :Math.min(this.page+rightSize, this.max);\r\n\t\t\r\n\t\twhile(this.pagesElement.firstChild) this.pagesElement.removeChild(this.pagesElement.firstChild);\r\n\t\t\r\n\t\tif(this.page == 1){\r\n\t\t\tthis.firstBut.disabled = true;\r\n\t\t\tthis.prevBut.disabled = true;\r\n\t\t}else{\r\n\t\t\tthis.firstBut.disabled = false;\r\n\t\t\tthis.prevBut.disabled = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.page == this.max){\r\n\t\t\tthis.lastBut.disabled = true;\r\n\t\t\tthis.nextBut.disabled = true;\r\n\t\t}else{\r\n\t\t\tthis.lastBut.disabled = false;\r\n\t\t\tthis.nextBut.disabled = false;\r\n\t\t}\r\n\t\t\r\n\t\tfor(let i = min; i <= max; i++){\r\n\t\t\tif(i>0 && i <= this.max){\r\n\t\t\t\tthis.pagesElement.appendChild(this._generatePageButton(i));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.footerRedraw();\r\n\t}\r\n\t\r\n\t_generatePageButton(page){\r\n\t\tvar button = document.createElement(\"button\");\r\n\t\t\r\n\t\tbutton.classList.add(\"tabulator-page\");\r\n\t\tif(page == this.page){\r\n\t\t\tbutton.classList.add(\"active\");\r\n\t\t}\r\n\t\t\r\n\t\tbutton.setAttribute(\"type\", \"button\");\r\n\t\tbutton.setAttribute(\"role\", \"button\");\r\n\t\t\r\n\t\tthis.langBind(\"pagination|page_title\", (value) => {\r\n\t\t\tbutton.setAttribute(\"aria-label\", value + \" \" + page);\r\n\t\t\tbutton.setAttribute(\"title\", value + \" \" + page);\r\n\t\t});\r\n\t\t\r\n\t\tbutton.setAttribute(\"data-page\", page);\r\n\t\tbutton.textContent = page;\r\n\t\t\r\n\t\tbutton.addEventListener(\"click\", (e) => {\r\n\t\t\tthis.setPage(page)\r\n\t\t});\r\n\t\t\r\n\t\treturn button;\r\n\t}\r\n\t\r\n\t//previous page\r\n\tpreviousPage(){\r\n\t\tif(this.page > 1){\r\n\t\t\tthis.page--;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger()\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Previous page would be less than page 1:\", 0);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//next page\r\n\tnextPage(){\r\n\t\tif(this.page < this.max){\r\n\t\t\tthis.page++;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger();\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tif(!this.progressiveLoad){\r\n\t\t\t\tconsole.warn(\"Pagination Error - Next page would be greater than maximum page of \" + this.max + \":\", this.max + 1);\r\n\t\t\t}\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return current page number\r\n\tgetPage(){\r\n\t\treturn this.page;\r\n\t}\r\n\t\r\n\t//return max page number\r\n\tgetPageMax(){\r\n\t\treturn this.max;\r\n\t}\r\n\t\r\n\tgetPageSize(size){\r\n\t\treturn this.size;\r\n\t}\r\n\t\r\n\tgetMode(){\r\n\t\treturn this.mode;\r\n\t}\r\n\t\r\n\t//return appropriate rows for current page\r\n\tgetRows(data){\r\n\t\tvar actualRowPageSize = 0,\r\n\t\toutput, start, end, actualStartRow;\r\n\r\n\t\tvar actualRows = data.filter((row) => {\r\n\t\t\treturn row.type === \"row\";\r\n\t\t});\r\n\t\t\r\n\t\tif(this.mode == \"local\"){\r\n\t\t\toutput = [];\r\n\t\t\t\r\n\t\t\tthis.setMaxRows(data.length);\r\n\t\t\t\r\n\t\t\tif(this.size === true){\r\n\t\t\t\tstart = 0;\r\n\t\t\t\tend = data.length;\r\n\t\t\t}else{\r\n\t\t\t\tstart = this.size * (this.page - 1);\r\n\t\t\t\tend = start + parseInt(this.size);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._setPageButtons();\r\n\t\t\t\r\n\t\t\tfor(let i = start; i < end; i++){\r\n\t\t\t\tlet row = data[i];\r\n\r\n\t\t\t\tif(row){\r\n\t\t\t\t\toutput.push(row);\r\n\r\n\t\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\t\tif(!actualStartRow){\r\n\t\t\t\t\t\t\tactualStartRow = row;\r\n\t\t\t\t\t\t}\t\r\n\r\n\t\t\t\t\t\tactualRowPageSize++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._setPageCounter(actualRows.length, actualRowPageSize, actualStartRow ? (actualRows.indexOf(actualStartRow) + 1) : 0);\r\n\t\t\t\r\n\t\t\treturn output;\r\n\t\t}else{\r\n\t\t\tthis._setPageButtons();\r\n\t\t\tthis._setPageCounter(actualRows.length);\r\n\t\t\t\r\n\t\t\treturn data.slice(0);\r\n\t\t}\r\n\t}\r\n\t\r\n\ttrigger(){\r\n\t\tvar left;\r\n\t\t\r\n\t\tswitch(this.mode){\r\n\t\t\tcase \"local\":\r\n\t\t\tleft = this.table.rowManager.scrollLeft;\r\n\t\t\t\r\n\t\t\tthis.refreshData();\r\n\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\r\n\t\t\t\r\n\t\t\treturn Promise.resolve();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"remote\":\r\n\t\t\tthis.dataChanging = true;\r\n\t\t\treturn this.reloadData(null)\r\n\t\t\t.finally(() => {\r\n\t\t\t\tthis.dataChanging = false;\r\n\t\t\t})\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"progressive_load\":\r\n\t\t\tcase \"progressive_scroll\":\r\n\t\t\treturn this.reloadData(null, true);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\tconsole.warn(\"Pagination Error - no such pagination mode:\", this.mode);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_parseRemoteData(data){\r\n\t\tvar left, data, margin;\r\n\t\t\r\n\t\tif(typeof data.last_page === \"undefined\"){\r\n\t\t\tconsole.warn(\"Remote Pagination Error - Server response missing '\" + (this.options(\"dataReceiveParams\").last_page || \"last_page\") + \"' property\");\r\n\t\t}\r\n\t\t\r\n\t\tif(data.data){\r\n\t\t\tthis.max = parseInt(data.last_page) || 1;\r\n\r\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));\r\n\t\t\t\r\n\t\t\tif(this.progressiveLoad){\r\n\t\t\t\tswitch(this.mode){\r\n\t\t\t\t\tcase \"progressive_load\":\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.page == 1){\r\n\t\t\t\t\t\tthis.table.rowManager.setData(data.data, false, this.page == 1)\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.table.rowManager.addRows(data.data);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.page < this.max){\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tthis.nextPage();\r\n\t\t\t\t\t\t}, this.table.options.progressiveLoadDelay);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"progressive_scroll\":\r\n\t\t\t\t\tdata = this.page === 1 ? data.data : this.table.rowManager.getData().concat(data.data);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.table.rowManager.setData(data, this.page !== 1, this.page == 1);\r\n\t\t\t\t\t\r\n\t\t\t\t\tmargin = this.table.options.progressiveLoadScrollMargin || (this.table.rowManager.element.clientHeight * 2);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.table.rowManager.element.scrollHeight <= (this.table.rowManager.element.clientHeight + margin)){\r\n\t\t\t\t\t\tif(this.page < this.max){\r\n\t\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\t\tthis.nextPage();\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\t// left = this.table.rowManager.scrollLeft;\r\n\t\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\r\n\t\t\t\t// this.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\t// this.table.columnManager.scrollHorizontal(left);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Remote Pagination Error - Server response missing '\" + (this.options(\"dataReceiveParams\").data || \"data\") + \"' property\");\r\n\t\t}\r\n\t\t\r\n\t\treturn data.data;\r\n\t}\r\n\t\r\n\t//handle the footer element being redrawn\r\n\tfooterRedraw(){\r\n\t\tvar footer = this.table.footerManager.containerElement;\r\n\r\n\t\tif((Math.ceil(footer.clientWidth) - footer.scrollWidth) < 0){\r\n\t\t\tthis.pagesElement.style.display = 'none';\r\n\t\t}else{\r\n\t\t\tthis.pagesElement.style.display = '';\r\n\t\t\t\r\n\t\t\tif((Math.ceil(footer.clientWidth) - footer.scrollWidth) < 0){\r\n\t\t\t\tthis.pagesElement.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nPage.moduleName = \"page\";\r\n\r\n//load defaults\r\nPage.pageCounters = defaultPageCounters;\r\n\r\nexport default Page;","// read peristence information from storage\r\nexport default {\r\n\tlocal:function(id, type){\r\n\t\tvar data = localStorage.getItem(id + \"-\" + type);\r\n\r\n\t\treturn data ? JSON.parse(data) : false;\r\n\t},\r\n\tcookie:function(id, type){\r\n\t\tvar cookie = document.cookie,\r\n\t\tkey = id + \"-\" + type,\r\n\t\tcookiePos = cookie.indexOf(key + \"=\"),\r\n\t\tend, data;\r\n\r\n\t\t//if cookie exists, decode and load column data into tabulator\r\n\t\tif(cookiePos > -1){\r\n\t\t\tcookie = cookie.slice(cookiePos);\r\n\r\n\t\t\tend = cookie.indexOf(\";\");\r\n\r\n\t\t\tif(end > -1){\r\n\t\t\t\tcookie = cookie.slice(0, end);\r\n\t\t\t}\r\n\r\n\t\t\tdata = cookie.replace(key + \"=\", \"\");\r\n\t\t}\r\n\r\n\t\treturn data ? JSON.parse(data) : false;\r\n\t}\r\n};\r\n","//write persistence information to storage\r\nexport default {\r\n\tlocal:function(id, type, data){\r\n\t\tlocalStorage.setItem(id + \"-\" + type, JSON.stringify(data));\r\n\t},\r\n\tcookie:function(id, type, data){\r\n\t\tvar expireDate = new Date();\r\n\r\n\t\texpireDate.setDate(expireDate.getDate() + 10000);\r\n\r\n\t\tdocument.cookie = id + \"-\" + type + \"=\" + JSON.stringify(data) + \"; expires=\" + expireDate.toUTCString();\r\n\t}\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultReaders from './defaults/readers.js';\r\nimport defaultWriters from './defaults/writers.js';\r\n\r\nclass Persistence extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.mode = \"\";\r\n\t\tthis.id = \"\";\r\n\t\t// this.persistProps = [\"field\", \"width\", \"visible\"];\r\n\t\tthis.defWatcherBlock = false;\r\n\t\tthis.config = {};\r\n\t\tthis.readFunc = false;\r\n\t\tthis.writeFunc = false;\r\n\r\n\t\tthis.registerTableOption(\"persistence\", false);\r\n\t\tthis.registerTableOption(\"persistenceID\", \"\"); //key for persistent storage\r\n\t\tthis.registerTableOption(\"persistenceMode\", true); //mode for storing persistence information\r\n\t\tthis.registerTableOption(\"persistenceReaderFunc\", false); //function for handling persistence data reading\r\n\t\tthis.registerTableOption(\"persistenceWriterFunc\", false); //function for handling persistence data writing\r\n\t}\r\n\r\n\t// Test for whether localStorage is available for use.\r\n\tlocalStorageTest() {\r\n\t\tvar testKey = \"_tabulator_test\";\r\n\r\n\t\ttry {\r\n\t\t\twindow.localStorage.setItem( testKey, testKey);\r\n\t\t\twindow.localStorage.removeItem( testKey );\r\n\t\t\treturn true;\r\n\t\t} catch(e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//setup parameters\r\n\tinitialize(){\r\n\t\tif(this.table.options.persistence){\r\n\t\t\t//determine persistent layout storage type\r\n\t\t\tvar mode = this.table.options.persistenceMode,\r\n\t\t\tid = this.table.options.persistenceID,\r\n\t\t\tretreivedData;\r\n\r\n\t\t\tthis.mode = mode !== true ? mode : (this.localStorageTest() ? \"local\" : \"cookie\");\r\n\r\n\t\t\tif(this.table.options.persistenceReaderFunc){\r\n\t\t\t\tif(typeof this.table.options.persistenceReaderFunc === \"function\"){\r\n\t\t\t\t\tthis.readFunc = this.table.options.persistenceReaderFunc;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(Persistence.readers[this.table.options.persistenceReaderFunc]){\r\n\t\t\t\t\t\tthis.readFunc = Persistence.readers[this.table.options.persistenceReaderFunc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Persistence Read Error - invalid reader set\", this.table.options.persistenceReaderFunc);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(Persistence.readers[this.mode]){\r\n\t\t\t\t\tthis.readFunc = Persistence.readers[this.mode];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Persistence Read Error - invalid reader set\", this.mode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.persistenceWriterFunc){\r\n\t\t\t\tif(typeof this.table.options.persistenceWriterFunc === \"function\"){\r\n\t\t\t\t\tthis.writeFunc = this.table.options.persistenceWriterFunc;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(Persistence.writers[this.table.options.persistenceWriterFunc]){\r\n\t\t\t\t\t\tthis.writeFunc = Persistence.writers[this.table.options.persistenceWriterFunc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Persistence Write Error - invalid reader set\", this.table.options.persistenceWriterFunc);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(Persistence.writers[this.mode]){\r\n\t\t\t\t\tthis.writeFunc = Persistence.writers[this.mode];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Persistence Write Error - invalid writer set\", this.mode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//set storage tag\r\n\t\t\tthis.id = \"tabulator-\" + (id || (this.table.element.getAttribute(\"id\") || \"\"));\r\n\r\n\t\t\tthis.config = {\r\n\t\t\t\tsort:this.table.options.persistence === true || this.table.options.persistence.sort,\r\n\t\t\t\tfilter:this.table.options.persistence === true || this.table.options.persistence.filter,\r\n\t\t\t\tgroup:this.table.options.persistence === true || this.table.options.persistence.group,\r\n\t\t\t\tpage:this.table.options.persistence === true || this.table.options.persistence.page,\r\n\t\t\t\tcolumns:this.table.options.persistence === true ? [\"title\", \"width\", \"visible\"] : this.table.options.persistence.columns,\r\n\t\t\t};\r\n\r\n\t\t\t//load pagination data if needed\r\n\t\t\tif(this.config.page){\r\n\t\t\t\tretreivedData = this.retreiveData(\"page\");\r\n\r\n\t\t\t\tif(retreivedData){\r\n\t\t\t\t\tif(typeof retreivedData.paginationSize !== \"undefined\" && (this.config.page === true || this.config.page.size)){\r\n\t\t\t\t\t\tthis.table.options.paginationSize = retreivedData.paginationSize;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(typeof retreivedData.paginationInitialPage !== \"undefined\" && (this.config.page === true || this.config.page.page)){\r\n\t\t\t\t\t\tthis.table.options.paginationInitialPage = retreivedData.paginationInitialPage;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//load group data if needed\r\n\t\t\tif(this.config.group){\r\n\t\t\t\tretreivedData = this.retreiveData(\"group\");\r\n\r\n\t\t\t\tif(retreivedData){\r\n\t\t\t\t\tif(typeof retreivedData.groupBy !== \"undefined\" && (this.config.group === true || this.config.group.groupBy)){\r\n\t\t\t\t\t\tthis.table.options.groupBy = retreivedData.groupBy;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retreivedData.groupStartOpen !== \"undefined\" && (this.config.group === true || this.config.group.groupStartOpen)){\r\n\t\t\t\t\t\tthis.table.options.groupStartOpen = retreivedData.groupStartOpen;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retreivedData.groupHeader !== \"undefined\" && (this.config.group === true || this.config.group.groupHeader)){\r\n\t\t\t\t\t\tthis.table.options.groupHeader = retreivedData.groupHeader;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.columns){\r\n\t\t\t\tthis.table.options.columns = this.load(\"columns\", this.table.options.columns);\r\n\t\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t\t\tthis.subscribe(\"column-show\", this.save.bind(this, \"columns\"));\r\n\t\t\t\tthis.subscribe(\"column-hide\", this.save.bind(this, \"columns\"));\r\n\t\t\t\tthis.subscribe(\"column-moved\", this.save.bind(this, \"columns\"));\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-built\", this.tableBuilt.bind(this), 0);\r\n\r\n\t\t\tthis.subscribe(\"table-redraw\", this.tableRedraw.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"filter-changed\", this.eventSave.bind(this, \"filter\"));\r\n\t\t\tthis.subscribe(\"sort-changed\", this.eventSave.bind(this, \"sort\"));\r\n\t\t\tthis.subscribe(\"group-changed\", this.eventSave.bind(this, \"group\"));\r\n\t\t\tthis.subscribe(\"page-changed\", this.eventSave.bind(this, \"page\"));\r\n\t\t\tthis.subscribe(\"column-resized\", this.eventSave.bind(this, \"columns\"));\r\n\t\t\tthis.subscribe(\"layout-refreshed\", this.eventSave.bind(this, \"columns\"));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"getColumnLayout\", this.getColumnLayout.bind(this));\r\n\t\tthis.registerTableFunction(\"setColumnLayout\", this.setColumnLayout.bind(this));\r\n\t}\r\n\r\n\teventSave(type){\r\n\t\tif(this.config[type]){\r\n\t\t\tthis.save(type);\r\n\t\t}\r\n\t}\r\n\r\n\ttableBuilt(){\r\n\t\tvar options = this.table.options,\r\n\t\tsorters, filters;\r\n\r\n\t\tif(this.config.sort){\r\n\t\t\tsorters = this.load(\"sort\");\r\n\r\n\t\t\tif(!sorters === false){\r\n\t\t\t\tthis.table.options.initialSort = sorters;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.config.filter){\r\n\t\t\tfilters = this.load(\"filter\");\r\n\r\n\t\t\tif(!filters === false){\r\n\t\t\t\tthis.table.options.initialFilter = filters;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tif(force && this.config.columns){\r\n\t\t\tthis.save(\"columns\");\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tgetColumnLayout(){\r\n\t\treturn this.parseColumns(this.table.columnManager.getColumns());\r\n\t}\r\n\r\n\tsetColumnLayout(layout){\r\n\t\tthis.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns, layout))\r\n\t\treturn true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumn(column){\r\n\t\tvar def, keys;\r\n\r\n\t\tif(this.config.columns){\r\n\t\t\tthis.defWatcherBlock = true;\r\n\r\n\t\t\tdef = column.getDefinition();\r\n\r\n\t\t\tkeys = this.config.columns === true ? Object.keys(def) : this.config.columns;\r\n\r\n\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\tvar props = Object.getOwnPropertyDescriptor(def, key);\r\n\t\t\t\tvar value = def[key];\r\n\t\t\t\tif(props){\r\n\t\t\t\t\tObject.defineProperty(def, key, {\r\n\t\t\t\t\t\tset: function(newValue){\r\n\t\t\t\t\t\t\tvalue = newValue;\r\n\r\n\t\t\t\t\t\t\tif(!this.defWatcherBlock){\r\n\t\t\t\t\t\t\t\tthis.save(\"columns\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif(props.set){\r\n\t\t\t\t\t\t\t\tprops.set(newValue);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tget:function(){\r\n\t\t\t\t\t\t\tif(props.get){\r\n\t\t\t\t\t\t\t\tprops.get();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.defWatcherBlock = false;\r\n\t\t}\r\n\t}\r\n\r\n\t//load saved definitions\r\n\tload(type, current){\r\n\t\tvar data = this.retreiveData(type);\r\n\r\n\t\tif(current){\r\n\t\t\tdata = data ? this.mergeDefinition(current, data) : current;\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//retreive data from memory\r\n\tretreiveData(type){\r\n\t\treturn this.readFunc ? this.readFunc(this.id, type) : false;\r\n\t}\r\n\r\n\t//merge old and new column definitions\r\n\tmergeDefinition(oldCols, newCols){\r\n\t\tvar output = [];\r\n\r\n\t\tnewCols = newCols || [];\r\n\r\n\t\tnewCols.forEach((column, to) => {\r\n\t\t\tvar from = this._findColumn(oldCols, column),\r\n\t\t\tkeys;\r\n\r\n\t\t\tif(from){\r\n\t\t\t\tif(this.config.columns === true || this.config.columns == undefined){\r\n\t\t\t\t\tkeys = Object.keys(from);\r\n\t\t\t\t\tkeys.push(\"width\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tkeys = this.config.columns;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\t\tif(key !== \"columns\" && typeof column[key] !== \"undefined\"){\r\n\t\t\t\t\t\tfrom[key] = column[key];\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(from.columns){\r\n\t\t\t\t\tfrom.columns = this.mergeDefinition(from.columns, column.columns);\r\n\t\t\t\t}\r\n\r\n\t\t\t\toutput.push(from);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\toldCols.forEach((column, i) => {\r\n\t\t\tvar from = this._findColumn(newCols, column);\r\n\r\n\t\t\tif (!from) {\r\n\t\t\t\tif(output.length>i){\r\n\t\t\t\t\toutput.splice(i, 0, column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput.push(column);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//find matching columns\r\n\t_findColumn(columns, subject){\r\n\t\tvar type = subject.columns ? \"group\" : (subject.field ? \"field\" : \"object\");\r\n\r\n\t\treturn columns.find(function(col){\r\n\t\t\tswitch(type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\treturn col.title === subject.title && col.columns.length === subject.columns.length;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"field\":\r\n\t\t\t\treturn col.field === subject.field;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\treturn col === subject;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//save data\r\n\tsave(type){\r\n\t\tvar data = {};\r\n\r\n\t\tswitch(type){\r\n\t\t\tcase \"columns\":\r\n\t\t\tdata = this.parseColumns(this.table.columnManager.getColumns())\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"filter\":\r\n\t\t\tdata = this.table.modules.filter.getFilters();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"sort\":\r\n\t\t\tdata = this.validateSorters(this.table.modules.sort.getSort());\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tdata = this.getGroupConfig();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"page\":\r\n\t\t\tdata = this.getPageConfig();\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(this.writeFunc){\r\n\t\t\tthis.writeFunc(this.id, type, data);\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t//ensure sorters contain no function data\r\n\tvalidateSorters(data){\r\n\t\tdata.forEach(function(item){\r\n\t\t\titem.column = item.field;\r\n\t\t\tdelete item.field;\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\tgetGroupConfig(){\r\n\t\tvar data = {};\r\n\r\n\t\tif(this.config.group){\r\n\t\t\tif(this.config.group === true || this.config.group.groupBy){\r\n\t\t\t\tdata.groupBy = this.table.options.groupBy;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.group === true || this.config.group.groupStartOpen){\r\n\t\t\t\tdata.groupStartOpen = this.table.options.groupStartOpen;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.group === true || this.config.group.groupHeader){\r\n\t\t\t\tdata.groupHeader = this.table.options.groupHeader;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\tgetPageConfig(){\r\n\t\tvar data = {};\r\n\r\n\t\tif(this.config.page){\r\n\t\t\tif(this.config.page === true || this.config.page.size){\r\n\t\t\t\tdata.paginationSize = this.table.modules.page.getPageSize();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.page === true || this.config.page.page){\r\n\t\t\t\tdata.paginationInitialPage = this.table.modules.page.getPage();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\r\n\t//parse columns for data to store\r\n\tparseColumns(columns){\r\n\t\tvar definitions = [],\r\n\t\texcludedKeys = [\"headerContextMenu\", \"headerMenu\", \"contextMenu\", \"clickMenu\"];\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\tvar defStore = {},\r\n\t\t\tcolDef = column.getDefinition(),\r\n\t\t\tkeys;\r\n\r\n\t\t\tif(column.isGroup){\r\n\t\t\t\tdefStore.title = colDef.title;\r\n\t\t\t\tdefStore.columns = this.parseColumns(column.getColumns());\r\n\t\t\t}else{\r\n\t\t\t\tdefStore.field = column.getField();\r\n\r\n\t\t\t\tif(this.config.columns === true || this.config.columns == undefined){\r\n\t\t\t\t\tkeys = Object.keys(colDef);\r\n\t\t\t\t\tkeys.push(\"width\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tkeys = this.config.columns;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\t\tswitch(key){\r\n\t\t\t\t\t\tcase \"width\":\r\n\t\t\t\t\t\tdefStore.width = column.getWidth();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"visible\":\r\n\t\t\t\t\t\tdefStore.visible = column.visible;\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(typeof colDef[key] !== \"function\" && excludedKeys.indexOf(key) === -1){\r\n\t\t\t\t\t\t\tdefStore[key] = colDef[key];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tdefinitions.push(defStore);\r\n\t\t});\r\n\r\n\t\treturn definitions;\r\n\t}\r\n}\r\n\r\nPersistence.moduleName = \"persistence\";\r\n\r\nPersistence.moduleInitOrder = 1;\r\n\r\n//load defaults\r\nPersistence.readers = defaultReaders;\r\nPersistence.writers = defaultWriters;\r\n\r\nexport default Persistence;","import Module from '../../core/Module.js';\r\n\r\nclass Print extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.manualBlock = false;\r\n\r\n\t\tthis.registerTableOption(\"printAsHtml\", false); //enable print as html\r\n\t\tthis.registerTableOption(\"printFormatter\", false); //printing page formatter\r\n\t\tthis.registerTableOption(\"printHeader\", false); //page header contents\r\n\t\tthis.registerTableOption(\"printFooter\", false); //page footer contents\r\n\t\tthis.registerTableOption(\"printStyled\", true); //enable print as html styling\r\n\t\tthis.registerTableOption(\"printRowRange\", \"visible\"); //restrict print to visible rows only\r\n\t\tthis.registerTableOption(\"printConfig\", {}); //print config options\r\n\r\n\t\tthis.registerColumnOption(\"print\");\r\n\t\tthis.registerColumnOption(\"titlePrint\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.printAsHtml){\r\n\t\t\twindow.addEventListener(\"beforeprint\", this.replaceTable.bind(this));\r\n\t\t\twindow.addEventListener(\"afterprint\", this.cleanup.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"print\", this.printFullscreen.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\treplaceTable(){\r\n\t\tif(!this.manualBlock){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"tabulator-print-table\");\r\n\r\n\t\t\tthis.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig, this.table.options.printStyled, this.table.options.printRowRange, \"print\"));\r\n\r\n\t\t\tthis.table.element.style.display = \"none\";\r\n\r\n\t\t\tthis.table.element.parentNode.insertBefore(this.element, this.table.element);\r\n\t\t}\r\n\t}\r\n\r\n\tcleanup(){\r\n\t\tdocument.body.classList.remove(\"tabulator-print-fullscreen-hide\");\r\n\r\n\t\tif(this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\tthis.table.element.style.display = \"\";\r\n\t\t}\r\n\t}\r\n\r\n\tprintFullscreen(visible, style, config){\r\n\t\tvar scrollX = window.scrollX,\r\n\t\tscrollY = window.scrollY,\r\n\t\theaderEl = document.createElement(\"div\"),\r\n\t\tfooterEl = document.createElement(\"div\"),\r\n\t\ttableEl = this.table.modules.export.genereateTable(typeof config != \"undefined\" ? config : this.table.options.printConfig, typeof style != \"undefined\" ? style : this.table.options.printStyled, visible || this.table.options.printRowRange, \"print\"),\r\n\t\theaderContent, footerContent;\r\n\r\n\t\tthis.manualBlock = true;\r\n\r\n\t\tthis.element = document.createElement(\"div\");\r\n\t\tthis.element.classList.add(\"tabulator-print-fullscreen\");\r\n\r\n\t\tif(this.table.options.printHeader){\r\n\t\t\theaderEl.classList.add(\"tabulator-print-header\");\r\n\r\n\t\t\theaderContent = typeof this.table.options.printHeader == \"function\" ? this.table.options.printHeader.call(this.table) : this.table.options.printHeader;\r\n\r\n\t\t\tif(typeof headerContent == \"string\"){\r\n\t\t\t\theaderEl.innerHTML = headerContent;\r\n\t\t\t}else{\r\n\t\t\t\theaderEl.appendChild(headerContent);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.appendChild(headerEl);\r\n\t\t}\r\n\r\n\t\tthis.element.appendChild(tableEl);\r\n\r\n\t\tif(this.table.options.printFooter){\r\n\t\t\tfooterEl.classList.add(\"tabulator-print-footer\");\r\n\r\n\t\t\tfooterContent = typeof this.table.options.printFooter == \"function\" ? this.table.options.printFooter.call(this.table) : this.table.options.printFooter;\r\n\r\n\r\n\t\t\tif(typeof footerContent == \"string\"){\r\n\t\t\t\tfooterEl.innerHTML = footerContent;\r\n\t\t\t}else{\r\n\t\t\t\tfooterEl.appendChild(footerContent);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.appendChild(footerEl);\r\n\t\t}\r\n\r\n\t\tdocument.body.classList.add(\"tabulator-print-fullscreen-hide\");\r\n\t\tdocument.body.appendChild(this.element);\r\n\r\n\t\tif(this.table.options.printFormatter){\r\n\t\t\tthis.table.options.printFormatter(this.element, tableEl);\r\n\t\t}\r\n\r\n\t\twindow.print();\r\n\r\n\t\tthis.cleanup();\r\n\r\n\t\twindow.scrollTo(scrollX, scrollY);\r\n\r\n\t\tthis.manualBlock = false;\r\n\t}\r\n}\r\n\r\nPrint.moduleName = \"print\";\r\n\r\nexport default Print;","import Module from '../../core/Module.js';\r\n\r\nclass ReactiveData extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.data = false;\r\n\t\tthis.blocked = false; //block reactivity while performing update\r\n\t\tthis.origFuncs = {}; // hold original data array functions to allow replacement after data is done with\r\n\t\tthis.currentVersion = 0;\r\n\r\n\t\tthis.registerTableOption(\"reactiveData\", false); //enable data reactivity\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.reactiveData){\r\n\t\t\tthis.subscribe(\"cell-value-save-before\", this.block.bind(this));\r\n\t\t\tthis.subscribe(\"cell-value-save-after\", this.unblock.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-save-before\", this.block.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-save-after\", this.unblock.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-init-after\", this.watchRow.bind(this));\r\n\t\t\tthis.subscribe(\"data-processing\", this.watchData.bind(this));\r\n\t\t\tthis.subscribe(\"table-destroy\", this.unwatchData.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\twatchData(data){\r\n\t\tvar self = this,\r\n\t\tpushFunc, version;\r\n\r\n\t\tthis.currentVersion ++;\r\n\r\n\t\tversion = this.currentVersion;\r\n\r\n\t\tthis.unwatchData();\r\n\r\n\t\tthis.data = data;\r\n\r\n\t\t//override array push function\r\n\t\tthis.origFuncs.push = data.push;\r\n\r\n\t\tObject.defineProperty(this.data, \"push\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments);\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\targs.forEach((arg) => {\r\n\t\t\t\t\t\tself.table.rowManager.addRowActual(arg, false);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.push.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//override array unshift function\r\n\t\tthis.origFuncs.unshift = data.unshift;\r\n\r\n\t\tObject.defineProperty(this.data, \"unshift\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments);\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\targs.forEach((arg) => {\r\n\t\t\t\t\t\tself.table.rowManager.addRowActual(arg, true);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.unshift.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\t//override array shift function\r\n\t\tthis.origFuncs.shift = data.shift;\r\n\r\n\t\tObject.defineProperty(this.data, \"shift\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar row;\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tif(self.data.length){\r\n\t\t\t\t\t\trow = self.table.rowManager.getRowFromDataObject(self.data[0]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.deleteActual();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.shift.call(data);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//override array pop function\r\n\t\tthis.origFuncs.pop = data.pop;\r\n\r\n\t\tObject.defineProperty(this.data, \"pop\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar row;\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tif(self.data.length){\r\n\t\t\t\t\t\trow = self.table.rowManager.getRowFromDataObject(self.data[self.data.length - 1]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.deleteActual();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn self.origFuncs.pop.call(data);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\t//override array splice function\r\n\t\tthis.origFuncs.splice = data.splice;\r\n\r\n\t\tObject.defineProperty(this.data, \"splice\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments),\r\n\t\t\t\tstart = args[0] < 0 ? data.length + args[0] : args[0],\r\n\t\t\t\tend = args[1],\r\n\t\t\t\tnewRows = args[2] ? args.slice(2) : false,\r\n\t\t\t\tstartRow;\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\r\n\t\t\t\t\t//add new rows\r\n\t\t\t\t\tif(newRows){\r\n\t\t\t\t\t\tstartRow = data[start] ? self.table.rowManager.getRowFromDataObject(data[start]) : false;\r\n\r\n\t\t\t\t\t\tif(startRow){\r\n\t\t\t\t\t\t\tnewRows.forEach((rowData) => {\r\n\t\t\t\t\t\t\t\tself.table.rowManager.addRowActual(rowData, true, startRow, true);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnewRows = newRows.slice().reverse();\r\n\r\n\t\t\t\t\t\t\tnewRows.forEach((rowData) => {\r\n\t\t\t\t\t\t\t\tself.table.rowManager.addRowActual(rowData, true, false, true);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//delete removed rows\r\n\t\t\t\t\tif(end !== 0){\r\n\t\t\t\t\t\tvar oldRows = data.slice(start, typeof args[1] === \"undefined\" ? args[1] : start + end);\r\n\r\n\t\t\t\t\t\toldRows.forEach((rowData, i) => {\r\n\t\t\t\t\t\t\tvar row = self.table.rowManager.getRowFromDataObject(rowData);\r\n\r\n\t\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\t\trow.deleteActual(i !== oldRows.length - 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(newRows || end !== 0){\r\n\t\t\t\t\t\tself.table.rowManager.reRenderInPosition();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.splice.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tunwatchData(){\r\n\t\tif(this.data !== false){\r\n\t\t\tfor(var key in this.origFuncs){\r\n\t\t\t\tObject.defineProperty(this.data, key, {\r\n\t\t\t\t\tenumerable: true,\r\n\t\t\t\t\tconfigurable:true,\r\n\t\t\t\t\twritable:true,\r\n\t\t\t\t\tvalue: this.origFuncs.key,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\twatchRow(row){\r\n\t\tvar data = row.getData();\r\n\r\n\t\tthis.blocked = true;\r\n\r\n\t\tfor(var key in data){\r\n\t\t\tthis.watchKey(row, data, key);\r\n\t\t}\r\n\r\n\t\tif(this.table.options.dataTree){\r\n\t\t\tthis.watchTreeChildren(row);\r\n\t\t}\r\n\r\n\t\tthis.blocked = false;\r\n\t}\r\n\r\n\twatchTreeChildren (row){\r\n\t\tvar childField = row.getData()[this.table.options.dataTreeChildField],\r\n\t\torigFuncs = {};\r\n\r\n\t\tfunction rebuildTree(){\r\n\t\t\tthis.table.modules.dataTree.initializeRow(row);\r\n\t\t\tthis.table.modules.dataTree.layoutRow(row);\r\n\t\t\tthis.table.rowManager.refreshActiveData(\"tree\", false, true);\r\n\t\t}\r\n\r\n\t\tif(childField){\r\n\r\n\t\t\torigFuncs.push = childField.push;\r\n\r\n\t\t\tObject.defineProperty(childField, \"push\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.push.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.unshift = childField.unshift;\r\n\r\n\t\t\tObject.defineProperty(childField, \"unshift\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.unshift.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.shift = childField.shift;\r\n\r\n\t\t\tObject.defineProperty(childField, \"shift\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.shift.call(childField);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.pop = childField.pop;\r\n\r\n\t\t\tObject.defineProperty(childField, \"pop\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.pop.call(childField);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.splice = childField.splice;\r\n\r\n\t\t\tObject.defineProperty(childField, \"splice\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.splice.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\twatchKey(row, data, key){\r\n\t\tvar props = Object.getOwnPropertyDescriptor(data, key),\r\n\t\tvalue = data[key],\r\n\t\tversion = this.currentVersion;\r\n\r\n\t\tObject.defineProperty(data, key, {\r\n\t\t\tset: (newValue) => {\r\n\t\t\t\tvalue = newValue;\r\n\t\t\t\tif(!this.blocked && version === this.currentVersion){\r\n\t\t\t\t\tvar update = {};\r\n\t\t\t\t\tupdate[key] = newValue;\r\n\t\t\t\t\trow.updateData(update);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(props.set){\r\n\t\t\t\t\tprops.set(newValue);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tget:() => {\r\n\r\n\t\t\t\tif(props.get){\r\n\t\t\t\t\tprops.get();\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tunwatchRow(row){\r\n\t\tvar data = row.getData();\r\n\r\n\t\tfor(var key in data){\r\n\t\t\tObject.defineProperty(data, key, {\r\n\t\t\t\tvalue:data[key],\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tblock(){\r\n\t\tthis.blocked = true;\r\n\t}\r\n\r\n\tunblock(){\r\n\t\tthis.blocked = false;\r\n\t}\r\n}\r\n\r\nReactiveData.moduleName = \"reactiveData\";\r\n\r\nexport default ReactiveData;\r\n\r\n\r\n\r\n","import Module from '../../core/Module.js';\r\n\r\nclass ResizeColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.startColumn = false;\r\n\t\tthis.startX = false;\r\n\t\tthis.startWidth = false;\r\n\t\tthis.handle = null;\r\n\t\tthis.prevHandle = null;\r\n\t\t\r\n\t\tthis.registerColumnOption(\"resizable\", true);\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\t// if(this.table.options.resizableColumns){\r\n\t\tthis.subscribe(\"cell-layout\", this.layoutCellHandles.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.layoutColumnHeader.bind(this));\r\n\t\t// }\r\n\t}\r\n\t\r\n\tlayoutCellHandles(cell){\r\n\t\tif(cell.row.type === \"row\"){\r\n\t\t\tthis.initializeColumn(\"cell\", cell.column, cell.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutColumnHeader(column){\r\n\t\tthis.initializeColumn(\"header\", column, column.element);\r\n\t}\r\n\t\r\n\tinitializeColumn(type, column, element){\r\n\t\tvar self = this,\r\n\t\tvariableHeight = false,\r\n\t\tmode = column.definition.resizable;\r\n\t\t\r\n\t\t//set column resize mode\r\n\t\tif(type === \"header\"){\r\n\t\t\tvariableHeight = column.definition.formatter == \"textarea\" || column.definition.variableHeight;\r\n\t\t\tcolumn.modules.resize = {variableHeight:variableHeight};\r\n\t\t}\r\n\t\t\r\n\t\tif(mode === true || mode == type){\r\n\t\t\t\r\n\t\t\tvar handle = document.createElement('div');\r\n\t\t\thandle.className = \"tabulator-col-resize-handle\";\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tvar prevHandle = document.createElement('div');\r\n\t\t\tprevHandle.className = \"tabulator-col-resize-handle prev\";\r\n\t\t\t\r\n\t\t\thandle.addEventListener(\"click\", function(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tvar handleDown = function(e){\r\n\t\t\t\tvar nearestColumn = column.getLastColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn && self._checkResizability(nearestColumn)){\r\n\t\t\t\t\tself.startColumn = column;\r\n\t\t\t\t\tself._mouseDown(e, nearestColumn, handle);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\thandle.addEventListener(\"mousedown\", handleDown);\r\n\t\t\thandle.addEventListener(\"touchstart\", handleDown, {passive: true});\r\n\t\t\t\r\n\t\t\t//reszie column on double click\r\n\t\t\thandle.addEventListener(\"dblclick\", function(e){\r\n\t\t\t\tvar col = column.getLastColumn(),\r\n\t\t\t\toldWidth;\r\n\t\t\t\t\r\n\t\t\t\tif(col && self._checkResizability(col)){\r\n\t\t\t\t\toldWidth = col.getWidth();\r\n\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tcol.reinitializeWidth(true);\r\n\r\n\t\t\t\t\tif(oldWidth !== col.getWidth()){\r\n\t\t\t\t\t\tself.dispatch(\"column-resized\", col);\r\n\t\t\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", col.getComponent());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tprevHandle.addEventListener(\"click\", function(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tvar prevHandleDown = function(e){\r\n\t\t\t\tvar nearestColumn, colIndex, prevColumn;\r\n\t\t\t\t\r\n\t\t\t\tnearestColumn = column.getFirstColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn){\r\n\t\t\t\t\tcolIndex = self.table.columnManager.findColumnIndex(nearestColumn);\r\n\t\t\t\t\tprevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(prevColumn && self._checkResizability(prevColumn)){\r\n\t\t\t\t\t\tself.startColumn = column;\r\n\t\t\t\t\t\tself._mouseDown(e, prevColumn, prevHandle);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tprevHandle.addEventListener(\"mousedown\", prevHandleDown);\r\n\t\t\tprevHandle.addEventListener(\"touchstart\", prevHandleDown, {passive: true});\r\n\t\t\t\r\n\t\t\t//resize column on double click\r\n\t\t\tprevHandle.addEventListener(\"dblclick\", function(e){\r\n\t\t\t\tvar nearestColumn, colIndex, prevColumn;\r\n\t\t\t\t\r\n\t\t\t\tnearestColumn = column.getFirstColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn){\r\n\t\t\t\t\tcolIndex = self.table.columnManager.findColumnIndex(nearestColumn);\r\n\t\t\t\t\tprevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(prevColumn && self._checkResizability(prevColumn)){\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tprevColumn.reinitializeWidth(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\telement.appendChild(handle);\r\n\t\t\telement.appendChild(prevHandle);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_checkResizability(column){\r\n\t\treturn column.definition.resizable;\r\n\t}\r\n\t\r\n\t_mouseDown(e, column, handle){\r\n\t\tvar self = this;\r\n\t\t\r\n\t\tself.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tfunction mouseMove(e){\r\n\t\t\t// self.table.columnManager.tempScrollBlock();\r\n\t\t\t\r\n\t\t\tif(self.table.rtl){\r\n\t\t\t\tcolumn.setWidth(self.startWidth - ((typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX) - self.startX));\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.setWidth(self.startWidth + ((typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX) - self.startX));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself.table.columnManager.renderer.rerenderColumns(true);\r\n\t\t\t\r\n\t\t\tif(!self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight){\r\n\t\t\t\tcolumn.checkCellHeights();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfunction mouseUp(e){\r\n\t\t\t\r\n\t\t\t//block editor from taking action while resizing is taking place\r\n\t\t\tif(self.startColumn.modules.edit){\r\n\t\t\t\tself.startColumn.modules.edit.blocked = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight){\r\n\t\t\t\tcolumn.checkCellHeights();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", mouseUp);\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", mouseMove);\r\n\t\t\t\r\n\t\t\thandle.removeEventListener(\"touchmove\", mouseMove);\r\n\t\t\thandle.removeEventListener(\"touchend\", mouseUp);\r\n\t\t\t\r\n\t\t\tself.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tif(self.startWidth !== column.getWidth()){\r\n\t\t\t\tself.dispatch(\"column-resized\", column);\r\n\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", column.getComponent());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\te.stopPropagation(); //prevent resize from interfereing with movable columns\r\n\t\t\r\n\t\t//block editor from taking action while resizing is taking place\r\n\t\tif(self.startColumn.modules.edit){\r\n\t\t\tself.startColumn.modules.edit.blocked = true;\r\n\t\t}\r\n\t\t\r\n\t\tself.startX = typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX;\r\n\t\tself.startWidth = column.getWidth();\r\n\t\t\r\n\t\tdocument.body.addEventListener(\"mousemove\", mouseMove);\r\n\t\tdocument.body.addEventListener(\"mouseup\", mouseUp);\r\n\t\thandle.addEventListener(\"touchmove\", mouseMove, {passive: true});\r\n\t\thandle.addEventListener(\"touchend\", mouseUp);\r\n\t}\r\n}\r\n\r\nResizeColumns.moduleName = \"resizeColumns\";\r\n\r\nexport default ResizeColumns;","import Module from '../../core/Module.js';\r\n\r\nclass ResizeRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.startColumn = false;\r\n\t\tthis.startY = false;\r\n\t\tthis.startHeight = false;\r\n\t\tthis.handle = null;\r\n\t\tthis.prevHandle = null;\r\n\r\n\t\tthis.registerTableOption(\"resizableRows\", false); //resizable rows\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.resizableRows){\r\n\t\t\tthis.subscribe(\"row-layout-after\", this.initializeRow.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\trowEl = row.getElement();\r\n\r\n\t\tvar handle = document.createElement('div');\r\n\t\thandle.className = \"tabulator-row-resize-handle\";\r\n\r\n\t\tvar prevHandle = document.createElement('div');\r\n\t\tprevHandle.className = \"tabulator-row-resize-handle prev\";\r\n\r\n\t\thandle.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tvar handleDown = function(e){\r\n\t\t\tself.startRow = row;\r\n\t\t\tself._mouseDown(e, row, handle);\r\n\t\t};\r\n\r\n\t\thandle.addEventListener(\"mousedown\", handleDown);\r\n\t\thandle.addEventListener(\"touchstart\", handleDown, {passive: true});\r\n\r\n\t\tprevHandle.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tvar prevHandleDown = function(e){\r\n\t\t\tvar prevRow = self.table.rowManager.prevDisplayRow(row);\r\n\r\n\t\t\tif(prevRow){\r\n\t\t\t\tself.startRow = prevRow;\r\n\t\t\t\tself._mouseDown(e, prevRow, prevHandle);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tprevHandle.addEventListener(\"mousedown\",prevHandleDown);\r\n\t\tprevHandle.addEventListener(\"touchstart\",prevHandleDown, {passive: true});\r\n\r\n\t\trowEl.appendChild(handle);\r\n\t\trowEl.appendChild(prevHandle);\r\n\t}\r\n\r\n\t_mouseDown(e, row, handle){\r\n\t\tvar self = this;\r\n\r\n\t\tself.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tfunction mouseMove(e){\r\n\t\t\trow.setHeight(self.startHeight + ((typeof e.screenY === \"undefined\" ? e.touches[0].screenY : e.screenY) - self.startY));\r\n\t\t}\r\n\r\n\t\tfunction mouseUp(e){\r\n\r\n\t\t\t// //block editor from taking action while resizing is taking place\r\n\t\t\t// if(self.startColumn.modules.edit){\r\n\t\t\t// \tself.startColumn.modules.edit.blocked = false;\r\n\t\t\t// }\r\n\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", mouseMove);\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", mouseMove);\r\n\r\n\t\t\thandle.removeEventListener(\"touchmove\", mouseMove);\r\n\t\t\thandle.removeEventListener(\"touchend\", mouseUp);\r\n\r\n\t\t\tself.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tself.dispatchExternal(\"rowResized\", row.getComponent());\r\n\t\t}\r\n\r\n\t\te.stopPropagation(); //prevent resize from interfereing with movable columns\r\n\r\n\t\t//block editor from taking action while resizing is taking place\r\n\t\t// if(self.startColumn.modules.edit){\r\n\t\t// \tself.startColumn.modules.edit.blocked = true;\r\n\t\t// }\r\n\r\n\t\tself.startY = typeof e.screenY === \"undefined\" ? e.touches[0].screenY : e.screenY;\r\n\t\tself.startHeight = row.getHeight();\r\n\r\n\t\tdocument.body.addEventListener(\"mousemove\", mouseMove);\r\n\t\tdocument.body.addEventListener(\"mouseup\", mouseUp);\r\n\r\n\t\thandle.addEventListener(\"touchmove\", mouseMove, {passive: true});\r\n\t\thandle.addEventListener(\"touchend\", mouseUp);\r\n\t}\r\n}\r\n\r\nResizeRows.moduleName = \"resizeRows\";\r\n\r\nexport default ResizeRows;","import Module from '../../core/Module.js';\r\n\r\nclass ResizeTable extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.binding = false;\r\n\t\tthis.observer = false;\r\n\t\tthis.containerObserver = false;\r\n\r\n\t\tthis.tableHeight = 0;\r\n\t\tthis.tableWidth = 0;\r\n\t\tthis.containerHeight = 0;\r\n\t\tthis.containerWidth = 0;\r\n\r\n\t\tthis.autoResize = false;\r\n\r\n\t\tthis.registerTableOption(\"autoResize\", true); //auto resize table\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.autoResize){\r\n\t\t\tvar table = this.table,\r\n\t\t\ttableStyle;\r\n\r\n\t\t\tthis.tableHeight = table.element.clientHeight;\r\n\t\t\tthis.tableWidth = table.element.clientWidth;\r\n\r\n\t\t\tif(table.element.parentNode){\r\n\t\t\t\tthis.containerHeight = table.element.parentNode.clientHeight;\r\n\t\t\t\tthis.containerWidth = table.element.parentNode.clientWidth;\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof ResizeObserver !== \"undefined\" && table.rowManager.getRenderMode() === \"virtual\"){\r\n\r\n\t\t\t\tthis.autoResize = true;\r\n\r\n\t\t\t\tthis.observer = new ResizeObserver((entry) => {\r\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\tvar nodeHeight = Math.floor(entry[0].contentRect.height);\r\n\t\t\t\t\t\tvar nodeWidth = Math.floor(entry[0].contentRect.width);\r\n\r\n\t\t\t\t\t\tif(this.tableHeight != nodeHeight || this.tableWidth != nodeWidth){\r\n\t\t\t\t\t\t\tthis.tableHeight = nodeHeight;\r\n\t\t\t\t\t\t\tthis.tableWidth = nodeWidth;\r\n\r\n\t\t\t\t\t\t\tif(table.element.parentNode){\r\n\t\t\t\t\t\t\t\tthis.containerHeight = table.element.parentNode.clientHeight;\r\n\t\t\t\t\t\t\t\tthis.containerWidth = table.element.parentNode.clientWidth;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tthis.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.observer.observe(table.element);\r\n\r\n\t\t\t\ttableStyle = window.getComputedStyle(table.element);\r\n\r\n\t\t\t\tif(this.table.element.parentNode && !this.table.rowManager.fixedHeight && (tableStyle.getPropertyValue(\"max-height\") || tableStyle.getPropertyValue(\"min-height\"))){\r\n\r\n\t\t\t\t\tthis.containerObserver = new ResizeObserver((entry) => {\r\n\t\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\t\tvar nodeHeight = Math.floor(entry[0].contentRect.height);\r\n\t\t\t\t\t\t\tvar nodeWidth = Math.floor(entry[0].contentRect.width);\r\n\r\n\t\t\t\t\t\t\tif(this.containerHeight != nodeHeight || this.containerWidth != nodeWidth){\r\n\t\t\t\t\t\t\t\tthis.containerHeight = nodeHeight;\r\n\t\t\t\t\t\t\t\tthis.containerWidth = nodeWidth;\r\n\t\t\t\t\t\t\t\tthis.tableHeight = table.element.clientHeight;\r\n\t\t\t\t\t\t\t\tthis.tableWidth = table.element.clientWidth;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\ttable.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tthis.containerObserver.observe(this.table.element.parentNode);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.subscribe(\"table-resize\", this.tableResized.bind(this));\r\n\r\n\t\t\t}else{\r\n\t\t\t\tthis.binding = function(){\r\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile && !table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\ttable.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\twindow.addEventListener(\"resize\", this.binding);\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\ttableResized(){\r\n\t\tthis.table.rowManager.redraw();\r\n\t}\r\n\r\n\tclearBindings(){\r\n\t\tif(this.binding){\r\n\t\t\twindow.removeEventListener(\"resize\", this.binding);\r\n\t\t}\r\n\r\n\t\tif(this.observer){\r\n\t\t\tthis.observer.unobserve(this.table.element);\r\n\t\t}\r\n\r\n\t\tif(this.containerObserver){\r\n\t\t\tthis.containerObserver.unobserve(this.table.element.parentNode);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nResizeTable.moduleName = \"resizeTable\";\r\n\r\nexport default ResizeTable;","import Module from '../../core/Module.js';\r\n\r\nclass ResponsiveLayout extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.columns = [];\r\n\t\tthis.hiddenColumns = [];\r\n\t\tthis.mode = \"\";\r\n\t\tthis.index = 0;\r\n\t\tthis.collapseFormatter = [];\r\n\t\tthis.collapseStartOpen = true;\r\n\t\tthis.collapseHandleColumn = false;\r\n\r\n\t\tthis.registerTableOption(\"responsiveLayout\", false); //responsive layout flags\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseStartOpen\", true); //start showing collapsed data\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseUseFormatters\", true); //responsive layout collapse formatter\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseFormatter\", false); //responsive layout collapse formatter\r\n\r\n\t\tthis.registerColumnOption(\"responsive\");\r\n\t}\r\n\r\n\t//generate responsive columns list\r\n\tinitialize(){\r\n\t\tvar self = this,\r\n\t\tcolumns = [];\r\n\r\n\t\tif(this.table.options.responsiveLayout){\r\n\t\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\t\tthis.subscribe(\"column-show\", this.updateColumnVisibility.bind(this));\r\n\t\t\tthis.subscribe(\"column-hide\", this.updateColumnVisibility.bind(this));\r\n\t\t\tthis.subscribe(\"columns-loaded\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-moved\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-add\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-delete\", this.initializeResponsivity.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"table-redrawing\", this.tableRedraw.bind(this));\r\n\r\n\t\t\tif(this.table.options.responsiveLayout === \"collapse\"){\r\n\t\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\t\tthis.subscribe(\"row-layout\", this.layoutRow.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tif([\"fitColumns\", \"fitDataStretch\"].indexOf(this.layoutMode()) === -1){\r\n\t\t\tif(!force){\r\n\t\t\t\tthis.update();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeResponsivity(){\r\n\t\tvar columns = [];\r\n\r\n\t\tthis.mode = this.table.options.responsiveLayout;\r\n\t\tthis.collapseFormatter = this.table.options.responsiveLayoutCollapseFormatter || this.formatCollapsedData;\r\n\t\tthis.collapseStartOpen = this.table.options.responsiveLayoutCollapseStartOpen;\r\n\t\tthis.hiddenColumns = [];\r\n\r\n\t\t//determine level of responsivity for each column\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column, i) => {\r\n\t\t\tif(column.modules.responsive){\r\n\t\t\t\tif(column.modules.responsive.order && column.modules.responsive.visible){\r\n\t\t\t\t\tcolumn.modules.responsive.index = i;\r\n\t\t\t\t\tcolumns.push(column);\r\n\r\n\t\t\t\t\tif(!column.visible && this.mode === \"collapse\"){\r\n\t\t\t\t\t\tthis.hiddenColumns.push(column);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//sort list by responsivity\r\n\t\tcolumns = columns.reverse();\r\n\t\tcolumns = columns.sort((a, b) => {\r\n\t\t\tvar diff = b.modules.responsive.order - a.modules.responsive.order;\r\n\t\t\treturn diff || (b.modules.responsive.index - a.modules.responsive.index);\r\n\t\t});\r\n\r\n\t\tthis.columns = columns;\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tthis.generateCollapsedContent();\r\n\t\t}\r\n\r\n\t\t//assign collapse column\r\n\t\tfor (let col of this.table.columnManager.columnsByIndex){\r\n\t\t\tif(col.definition.formatter == \"responsiveCollapse\"){\r\n\t\t\t\tthis.collapseHandleColumn = col;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.collapseHandleColumn){\r\n\t\t\tif(this.hiddenColumns.length){\r\n\t\t\t\tthis.collapseHandleColumn.show();\r\n\t\t\t}else{\r\n\t\t\t\tthis.collapseHandleColumn.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//define layout information\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.getDefinition();\r\n\r\n\t\tcolumn.modules.responsive = {order: typeof def.responsive === \"undefined\" ? 1 : def.responsive, visible:def.visible === false ? false : true};\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar el;\r\n\r\n\t\tif(row.type !== \"calc\"){\r\n\t\t\tel = document.createElement(\"div\");\r\n\t\t\tel.classList.add(\"tabulator-responsive-collapse\");\r\n\r\n\t\t\trow.modules.responsiveLayout = {\r\n\t\t\t\telement:el,\r\n\t\t\t\topen:this.collapseStartOpen,\r\n\t\t\t};\r\n\r\n\t\t\tif(!this.collapseStartOpen){\r\n\t\t\t\tel.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tlayoutRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tif(row.modules.responsiveLayout){\r\n\t\t\trowEl.appendChild(row.modules.responsiveLayout.element);\r\n\t\t\tthis.generateCollapsedRowContent(row);\r\n\t\t}\r\n\t}\r\n\r\n\t//update column visibility\r\n\tupdateColumnVisibility(column, responsiveToggle){\r\n\t\tif(!responsiveToggle && column.modules.responsive){\r\n\t\t\tcolumn.modules.responsive.visible = column.visible;\r\n\t\t\tthis.initializeResponsivity();\r\n\t\t}\r\n\t}\r\n\r\n\thideColumn(column){\r\n\t\tvar colCount = this.hiddenColumns.length;\r\n\r\n\t\tcolumn.hide(false, true);\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tthis.hiddenColumns.unshift(column);\r\n\t\t\tthis.generateCollapsedContent();\r\n\r\n\t\t\tif(this.collapseHandleColumn && !colCount){\r\n\t\t\t\tthis.collapseHandleColumn.show();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tshowColumn(column){\r\n\t\tvar index;\r\n\r\n\t\tcolumn.show(false, true);\r\n\t\t//set column width to prevent calculation loops on uninitialized columns\r\n\t\tcolumn.setWidth(column.getWidth());\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tindex = this.hiddenColumns.indexOf(column);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.hiddenColumns.splice(index, 1);\r\n\t\t\t}\r\n\r\n\t\t\tthis.generateCollapsedContent();\r\n\r\n\t\t\tif(this.collapseHandleColumn && !this.hiddenColumns.length){\r\n\t\t\t\tthis.collapseHandleColumn.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//redraw columns to fit space\r\n\tupdate(){\r\n\t\tvar self = this,\r\n\t\tworking = true;\r\n\r\n\t\twhile(working){\r\n\r\n\t\t\tlet width = self.table.modules.layout.getMode() == \"fitColumns\" ? self.table.columnManager.getFlexBaseWidth() : self.table.columnManager.getWidth();\r\n\r\n\t\t\tlet diff = (self.table.options.headerVisible ? self.table.columnManager.element.clientWidth : self.table.element.clientWidth) - width;\r\n\r\n\t\t\tif(diff < 0){\r\n\t\t\t\t//table is too wide\r\n\t\t\t\tlet column = self.columns[self.index];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tself.hideColumn(column);\r\n\t\t\t\t\tself.index ++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tworking = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\r\n\t\t\t\t//table has spare space\r\n\t\t\t\tlet column = self.columns[self.index -1];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tif(diff > 0){\r\n\t\t\t\t\t\tif(diff >= column.getWidth()){\r\n\t\t\t\t\t\t\tself.showColumn(column);\r\n\t\t\t\t\t\t\tself.index --;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tworking = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tworking = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(!self.table.rowManager.activeRowsCount){\r\n\t\t\t\tself.table.rowManager.renderEmptyScroll();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateCollapsedContent(){\r\n\t\tvar self = this,\r\n\t\trows = this.table.rowManager.getDisplayRows();\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\tself.generateCollapsedRowContent(row);\r\n\t\t});\r\n\t}\r\n\r\n\tgenerateCollapsedRowContent(row){\r\n\t\tvar el, contents;\r\n\r\n\t\tif(row.modules.responsiveLayout){\r\n\t\t\tel = row.modules.responsiveLayout.element;\r\n\r\n\t\t\twhile(el.firstChild) el.removeChild(el.firstChild);\r\n\r\n\t\t\tcontents = this.collapseFormatter(this.generateCollapsedRowData(row));\r\n\t\t\tif(contents){\r\n\t\t\t\tel.appendChild(contents);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateCollapsedRowData(row){\r\n\t\tvar self = this,\r\n\t\tdata = row.getData(),\r\n\t\toutput = [],\r\n\t\tmockCellComponent;\r\n\r\n\t\tthis.hiddenColumns.forEach(function(column){\r\n\t\t\tvar value = column.getFieldValue(data);\r\n\r\n\t\t\tif(column.definition.title && column.field){\r\n\t\t\t\tif(column.modules.format && self.table.options.responsiveLayoutCollapseUseFormatters){\r\n\r\n\t\t\t\t\tmockCellComponent = {\r\n\t\t\t\t\t\tvalue:false,\r\n\t\t\t\t\t\tdata:{},\r\n\t\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetData:function(){\r\n\t\t\t\t\t\t\treturn data;\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\t\treturn document.createElement(\"div\");\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\t\treturn row.getComponent();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tfunction onRendered(callback){\r\n\t\t\t\t\t\tcallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\toutput.push({\r\n\t\t\t\t\t\tfield: column.field,\r\n\t\t\t\t\t\ttitle: column.definition.title,\r\n\t\t\t\t\t\tvalue: column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params, onRendered)\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput.push({\r\n\t\t\t\t\t\tfield: column.field,\r\n\t\t\t\t\t\ttitle: column.definition.title,\r\n\t\t\t\t\t\tvalue: value\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tformatCollapsedData(data){\r\n\t\tvar list = document.createElement(\"table\");\r\n\r\n\t\tdata.forEach(function(item){\r\n\t\t\tvar row = document.createElement(\"tr\");\r\n\t\t\tvar titleData = document.createElement(\"td\");\r\n\t\t\tvar valueData = document.createElement(\"td\");\r\n\t\t\tvar node_content;\r\n\r\n\t\t\tvar titleHighlight = document.createElement(\"strong\");\r\n\t\t\ttitleData.appendChild(titleHighlight);\r\n\t\t\tthis.langBind(\"columns|\" + item.field, function(text){\r\n\t\t\t\ttitleHighlight.innerHTML = text || item.title;\r\n\t\t\t});\r\n\r\n\t\t\tif(item.value instanceof Node){\r\n\t\t\t\tnode_content = document.createElement(\"div\");\r\n\t\t\t\tnode_content.appendChild(item.value);\r\n\t\t\t\tvalueData.appendChild(node_content);\r\n\t\t\t}else{\r\n\t\t\t\tvalueData.innerHTML = item.value;\r\n\t\t\t}\r\n\r\n\t\t\trow.appendChild(titleData);\r\n\t\t\trow.appendChild(valueData);\r\n\t\t\tlist.appendChild(row);\r\n\t\t}, this);\r\n\r\n\t\treturn Object.keys(data).length ? list : \"\";\r\n\t}\r\n}\r\n\r\nResponsiveLayout.moduleName = \"responsiveLayout\";\r\n\r\nexport default ResponsiveLayout;","import Module from '../../core/Module.js';\r\n\r\nclass SelectRow extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.selecting = false; //flag selecting in progress\r\n\t\tthis.lastClickedRow = false; //last clicked row\r\n\t\tthis.selectPrev = []; //hold previously selected element for drag drop selection\r\n\t\tthis.selectedRows = []; //hold selected rows\r\n\t\tthis.headerCheckboxElement = null; // hold header select element\r\n\t\t\r\n\t\tthis.registerTableOption(\"selectable\", \"highlight\"); //highlight rows on hover\r\n\t\tthis.registerTableOption(\"selectableRangeMode\", \"drag\"); //highlight rows on hover\r\n\t\tthis.registerTableOption(\"selectableRollingSelection\", true); //roll selection once maximum number of selectable rows is reached\r\n\t\tthis.registerTableOption(\"selectablePersistence\", true); // maintain selection when table view is updated\r\n\t\tthis.registerTableOption(\"selectableCheck\", function(data, row){return true;}); //check wheather row is selectable\r\n\t\t\r\n\t\tthis.registerTableFunction(\"selectRow\", this.selectRows.bind(this));\r\n\t\tthis.registerTableFunction(\"deselectRow\", this.deselectRows.bind(this));\r\n\t\tthis.registerTableFunction(\"toggleSelectRow\", this.toggleRow.bind(this));\r\n\t\tthis.registerTableFunction(\"getSelectedRows\", this.getSelectedRows.bind(this));\r\n\t\tthis.registerTableFunction(\"getSelectedData\", this.getSelectedData.bind(this));\r\n\t\t\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"select\", this.selectRows.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"deselect\", this.deselectRows.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"toggleSelect\", this.toggleRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isSelected\", this.isRowSelected.bind(this));\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.selectable !== false){\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleting\", this.rowDeleted.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.clearSelectionData.bind(this));\r\n\t\t\tthis.subscribe(\"rows-retrieve\", this.rowRetrieve.bind(this));\r\n\t\t\t\r\n\t\t\tif(this.table.options.selectable && !this.table.options.selectablePersistence){\r\n\t\t\t\tthis.subscribe(\"data-refreshing\", this.deselectRows.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trowRetrieve(type, prevValue){\r\n\t\treturn type === \"selected\" ? this.selectedRows : prevValue;\r\n\t}\r\n\t\r\n\trowDeleted(row){\r\n\t\tthis._deselectRow(row, true);\r\n\t}\r\n\t\r\n\tclearSelectionData(silent){\r\n\t\tthis.selecting = false;\r\n\t\tthis.lastClickedRow = false;\r\n\t\tthis.selectPrev = [];\r\n\t\tthis.selectedRows = [];\r\n\t\t\r\n\t\tif(silent !== true){\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\telement = row.getElement();\r\n\t\t\r\n\t\t// trigger end of row selection\r\n\t\tvar endSelect = function(){\r\n\t\t\t\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tself.selecting = false;\r\n\t\t\t}, 50);\r\n\t\t\t\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", endSelect);\r\n\t\t};\r\n\t\t\r\n\t\trow.modules.select = {selected:false};\r\n\t\t\r\n\t\t//set row selection class\r\n\t\tif(self.table.options.selectableCheck.call(this.table, row.getComponent())){\r\n\t\t\telement.classList.add(\"tabulator-selectable\");\r\n\t\t\telement.classList.remove(\"tabulator-unselectable\");\r\n\t\t\t\r\n\t\t\tif(self.table.options.selectable && self.table.options.selectable != \"highlight\"){\r\n\t\t\t\tif(self.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\telement.addEventListener(\"click\", this.handleComplexRowClick.bind(this, row));\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.addEventListener(\"click\", function(e){\r\n\t\t\t\t\t\tif(!self.table.modExists(\"edit\") || !self.table.modules.edit.getCurrentCell()){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(!self.selecting){\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\t\t\tif(e.shiftKey){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.selecting = true;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.selectPrev = [];\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tdocument.body.addEventListener(\"mouseup\", endSelect);\r\n\t\t\t\t\t\t\tdocument.body.addEventListener(\"keyup\", endSelect);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mouseenter\", function(e){\r\n\t\t\t\t\t\tif(self.selecting){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(self.selectPrev[1] == row){\r\n\t\t\t\t\t\t\t\tself.toggleRow(self.selectPrev[0]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mouseout\", function(e){\r\n\t\t\t\t\t\tif(self.selecting){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\tself.selectPrev.unshift(row);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\telement.classList.add(\"tabulator-unselectable\");\r\n\t\t\telement.classList.remove(\"tabulator-selectable\");\r\n\t\t}\r\n\t}\r\n\t\r\n\thandleComplexRowClick(row, e){\r\n\t\tif(e.shiftKey){\r\n\t\t\tthis.table._clearSelection();\r\n\t\t\tthis.lastClickedRow = this.lastClickedRow || row;\r\n\t\t\t\r\n\t\t\tvar lastClickedRowIdx = this.table.rowManager.getDisplayRowIndex(this.lastClickedRow);\r\n\t\t\tvar rowIdx = this.table.rowManager.getDisplayRowIndex(row);\r\n\t\t\t\r\n\t\t\tvar fromRowIdx = lastClickedRowIdx <= rowIdx ? lastClickedRowIdx : rowIdx;\r\n\t\t\tvar toRowIdx = lastClickedRowIdx >= rowIdx ? lastClickedRowIdx : rowIdx;\r\n\t\t\t\r\n\t\t\tvar rows = this.table.rowManager.getDisplayRows().slice(0);\r\n\t\t\tvar toggledRows = rows.splice(fromRowIdx, toRowIdx - fromRowIdx + 1);\r\n\t\t\t\r\n\t\t\tif(e.ctrlKey || e.metaKey){\r\n\t\t\t\ttoggledRows.forEach((toggledRow)=>{\r\n\t\t\t\t\tif(toggledRow !== this.lastClickedRow){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.table.options.selectable !== true && !this.isRowSelected(row)){\r\n\t\t\t\t\t\t\tif(this.selectedRows.length < this.table.options.selectable){\r\n\t\t\t\t\t\t\t\tthis.toggleRow(toggledRow);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.toggleRow(toggledRow);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tthis.lastClickedRow = row;\r\n\t\t\t}else{\r\n\t\t\t\tthis.deselectRows(undefined, true);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.selectable !== true){\r\n\t\t\t\t\tif(toggledRows.length > this.table.options.selectable){\r\n\t\t\t\t\t\ttoggledRows = toggledRows.slice(0, this.table.options.selectable)\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.selectRows(toggledRows);\r\n\t\t\t}\r\n\t\t\tthis.table._clearSelection();\r\n\t\t}\r\n\t\telse if(e.ctrlKey || e.metaKey){\r\n\t\t\tthis.toggleRow(row);\r\n\t\t\tthis.lastClickedRow = row;\r\n\t\t}else{\r\n\t\t\tthis.deselectRows(undefined, true);\r\n\t\t\tthis.selectRows(row);\r\n\t\t\tthis.lastClickedRow = row;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//toggle row selection\r\n\ttoggleRow(row){\r\n\t\tif(this.table.options.selectableCheck.call(this.table, row.getComponent())){\r\n\t\t\tif(row.modules.select && row.modules.select.selected){\r\n\t\t\t\tthis._deselectRow(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis._selectRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//select a number of rows\r\n\tselectRows(rows){\r\n\t\tvar rowMatch;\r\n\t\t\r\n\t\tswitch(typeof rows){\r\n\t\t\tcase \"undefined\":\r\n\t\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"string\":\r\n\t\t\t\r\n\t\t\trowMatch = this.table.rowManager.findRow(rows);\r\n\t\t\t\r\n\t\t\tif(rowMatch){\r\n\t\t\t\tthis._selectRow(rowMatch, true, true);\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.rowManager.getRows(rows).forEach((row) => {\r\n\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\tif(Array.isArray(rows)){\r\n\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis._rowSelectionChanged();\r\n\t\t\t}else{\r\n\t\t\t\tthis._selectRow(rows, false, true);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//select an individual row\r\n\t_selectRow(rowInfo, silent, force){\r\n\t\tvar index;\r\n\t\t\r\n\t\t//handle max row count\r\n\t\tif(!isNaN(this.table.options.selectable) && this.table.options.selectable !== true && !force){\r\n\t\t\tif(this.selectedRows.length >= this.table.options.selectable){\r\n\t\t\t\tif(this.table.options.selectableRollingSelection){\r\n\t\t\t\t\tthis._deselectRow(this.selectedRows[0]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tvar row = this.table.rowManager.findRow(rowInfo);\r\n\t\t\r\n\t\tif(row){\r\n\t\t\tif(this.selectedRows.indexOf(row) == -1){\r\n\t\t\t\trow.getElement().classList.add(\"tabulator-selected\");\r\n\t\t\t\tif(!row.modules.select){\r\n\t\t\t\t\trow.modules.select = {};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\trow.modules.select.selected = true;\r\n\t\t\t\tif(row.modules.select.checkboxEl){\r\n\t\t\t\t\trow.modules.select.checkboxEl.checked = true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.selectedRows.push(row);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.dataTreeSelectPropagate){\r\n\t\t\t\t\tthis.childRowSelection(row, true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatchExternal(\"rowSelected\", row.getComponent());\r\n\t\t\t\t\r\n\t\t\t\tthis._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Selection Error - No such row found, ignoring selection:\" + rowInfo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tisRowSelected(row){\r\n\t\treturn this.selectedRows.indexOf(row) !== -1;\r\n\t}\r\n\t\r\n\t//deselect a number of rows\r\n\tdeselectRows(rows, silent){\r\n\t\tvar self = this,\r\n\t\trowCount;\r\n\t\t\r\n\t\tif(typeof rows == \"undefined\"){\r\n\t\t\t\r\n\t\t\trowCount = self.selectedRows.length;\r\n\t\t\t\r\n\t\t\tfor(let i = 0; i < rowCount; i++){\r\n\t\t\t\tself._deselectRow(self.selectedRows[0], true);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(rowCount){\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tif(Array.isArray(rows)){\r\n\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\tself._deselectRow(row, true);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}else{\r\n\t\t\t\tself._deselectRow(rows, silent);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//deselect an individual row\r\n\t_deselectRow(rowInfo, silent){\r\n\t\tvar self = this,\r\n\t\trow = self.table.rowManager.findRow(rowInfo),\r\n\t\tindex;\r\n\t\t\r\n\t\tif(row){\r\n\t\t\tindex = self.selectedRows.findIndex(function(selectedRow){\r\n\t\t\t\treturn selectedRow == row;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\t\r\n\t\t\t\trow.getElement().classList.remove(\"tabulator-selected\");\r\n\t\t\t\tif(!row.modules.select){\r\n\t\t\t\t\trow.modules.select = {};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\trow.modules.select.selected = false;\r\n\t\t\t\tif(row.modules.select.checkboxEl){\r\n\t\t\t\t\trow.modules.select.checkboxEl.checked = false;\r\n\t\t\t\t}\r\n\t\t\t\tself.selectedRows.splice(index, 1);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.dataTreeSelectPropagate){\r\n\t\t\t\t\tthis.childRowSelection(row, false);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatchExternal(\"rowDeselected\", row.getComponent());\r\n\t\t\t\t\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Deselection Error - No such row found, ignoring selection:\" + rowInfo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSelectedData(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tthis.selectedRows.forEach(function(row){\r\n\t\t\tdata.push(row.getData());\r\n\t\t});\r\n\t\t\r\n\t\treturn data;\r\n\t}\r\n\t\r\n\tgetSelectedRows(){\r\n\t\t\r\n\t\tvar rows = [];\r\n\t\t\r\n\t\tthis.selectedRows.forEach(function(row){\r\n\t\t\trows.push(row.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t_rowSelectionChanged(silent){\r\n\t\tif(this.headerCheckboxElement){\r\n\t\t\tif(this.selectedRows.length === 0){\r\n\t\t\t\tthis.headerCheckboxElement.checked = false;\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = false;\r\n\t\t\t} else if(this.table.rowManager.rows.length === this.selectedRows.length){\r\n\t\t\t\tthis.headerCheckboxElement.checked = true;\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = false;\r\n\t\t\t} else {\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = true;\r\n\t\t\t\tthis.headerCheckboxElement.checked = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(!silent){\r\n\t\t\tthis.dispatchExternal(\"rowSelectionChanged\", this.getSelectedData(), this.getSelectedRows());\r\n\t\t}\r\n\t}\r\n\t\r\n\tregisterRowSelectCheckbox (row, element) {\r\n\t\tif(!row._row.modules.select){\r\n\t\t\trow._row.modules.select = {};\r\n\t\t}\r\n\t\t\r\n\t\trow._row.modules.select.checkboxEl = element;\r\n\t}\r\n\t\r\n\tregisterHeaderSelectCheckbox (element) {\r\n\t\tthis.headerCheckboxElement = element;\r\n\t}\r\n\t\r\n\tchildRowSelection(row, select){\r\n\t\tvar children = this.table.modules.dataTree.getChildren(row, true);\r\n\t\t\r\n\t\tif(select){\r\n\t\t\tfor(let child of children){\r\n\t\t\t\tthis._selectRow(child, true);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tfor(let child of children){\r\n\t\t\t\tthis._deselectRow(child, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nSelectRow.moduleName = \"selectRow\";\r\n\r\nexport default SelectRow;","//sort numbers\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar decimal = params.decimalSeparator;\r\n\tvar thousand = params.thousandSeparator;\r\n\tvar emptyAlign = 0;\r\n\r\n\ta = String(a);\r\n\tb = String(b);\r\n\r\n\tif(thousand){\r\n\t\ta = a.split(thousand).join(\"\");\r\n\t\tb = b.split(thousand).join(\"\");\r\n\t}\r\n\r\n\tif(decimal){\r\n\t\ta = a.split(decimal).join(\".\");\r\n\t\tb = b.split(decimal).join(\".\");\r\n\t}\r\n\r\n\ta = parseFloat(a);\r\n\tb = parseFloat(b);\r\n\r\n\t//handle non numeric values\r\n\tif(isNaN(a)){\r\n\t\temptyAlign = isNaN(b) ? 0 : -1;\r\n\t}else if(isNaN(b)){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\t\t//compare valid values\r\n\t\treturn a - b;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","//sort strings\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\tvar locale;\r\n\r\n\t//handle empty values\r\n\tif(!a){\r\n\t\temptyAlign = !b ? 0 : -1;\r\n\t}else if(!b){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\t\t//compare valid values\r\n\t\tswitch(typeof params.locale){\r\n\t\t\tcase \"boolean\":\r\n\t\t\tif(params.locale){\r\n\t\t\t\tlocale = this.langLocale();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"string\":\r\n\t\t\tlocale = params.locale;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn String(a).toLowerCase().localeCompare(String(b).toLowerCase(), locale);\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","//sort datetime\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar format = params.format || \"dd/MM/yyyy HH:mm:ss\",\r\n\talignEmptyValues = params.alignEmptyValues,\r\n\temptyAlign = 0;\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\ta = format === \"iso\" ? DT.fromISO(String(a)) : DT.fromFormat(String(a), format);\r\n\t\tb = format === \"iso\" ? DT.fromISO(String(b)) : DT.fromFormat(String(b), format);\r\n\r\n\t\tif(!a.isValid){\r\n\t\t\temptyAlign = !b.isValid ? 0 : -1;\r\n\t\t}else if(!b.isValid){\r\n\t\t\temptyAlign = 1;\r\n\t\t}else{\r\n\t\t\t//compare valid values\r\n\t\t\treturn a - b;\r\n\t\t}\r\n\r\n\t\t//fix empty values in position\r\n\t\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\t\temptyAlign *= -1;\r\n\t\t}\r\n\r\n\t\treturn emptyAlign;\r\n\r\n\t}else{\r\n\t\tconsole.error(\"Sort Error - 'datetime' sorter is dependant on luxon.js\");\r\n\t}\r\n};","import datetime from './datetime.js';\r\n\r\n//sort date\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tif(!params.format){\r\n\t\tparams.format = \"dd/MM/yyyy\";\r\n\t}\r\n\r\n\treturn datetime.call(this, a, b, aRow, bRow, column, dir, params);\r\n};","import datetime from './datetime.js';\r\n\r\n//sort times\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tif(!params.format){\r\n\t\tparams.format = \"HH:mm\";\r\n\t}\r\n\r\n\treturn datetime.call(this, a, b, aRow, bRow, column, dir, params);\r\n};","//sort booleans\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = a === true || a === \"true\" || a === \"True\" || a === 1 ? 1 : 0;\r\n\tvar el2 = b === true || b === \"true\" || b === \"True\" || b === 1 ? 1 : 0;\r\n\r\n\treturn el1 - el2;\r\n};","//sort if element contains any data\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = 0;\r\n\tvar el2 = 0;\r\n\tvar type = params.type || \"length\";\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\r\n\tfunction calc(value){\r\n\r\n\t\tswitch(type){\r\n\t\t\tcase \"length\":\r\n\t\t\treturn value.length;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"sum\":\r\n\t\t\treturn value.reduce(function(c, d){\r\n\t\t\t\treturn c + d;\r\n\t\t\t});\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"max\":\r\n\t\t\treturn Math.max.apply(null, value) ;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"min\":\r\n\t\t\treturn Math.min.apply(null, value) ;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"avg\":\r\n\t\t\treturn value.reduce(function(c, d){\r\n\t\t\t\treturn c + d;\r\n\t\t\t}) / value.length;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t//handle non array values\r\n\tif(!Array.isArray(a)){\r\n\t\talignEmptyValues = !Array.isArray(b) ? 0 : -1;\r\n\t}else if(!Array.isArray(b)){\r\n\t\talignEmptyValues = 1;\r\n\t}else{\r\n\r\n\t\t//compare valid values\r\n\t\tel1 = a ? calc(a) : 0;\r\n\t\tel2 = b ? calc(b) : 0;\r\n\r\n\t\treturn el1 - el2;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","//sort if element contains any data\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = typeof a == \"undefined\" ? 0 : 1;\r\n\tvar el2 = typeof b == \"undefined\" ? 0 : 1;\r\n\r\n\treturn el1 - el2;\r\n};","//sort alpha numeric strings\r\nexport default function(as, bs, aRow, bRow, column, dir, params){\r\n\tvar a, b, a1, b1, i= 0, L, rx = /(\\d+)|(\\D+)/g, rd = /\\d/;\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\r\n\t//handle empty values\r\n\tif(!as && as!== 0){\r\n\t\temptyAlign = !bs && bs!== 0 ? 0 : -1;\r\n\t}else if(!bs && bs!== 0){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\r\n\t\tif(isFinite(as) && isFinite(bs)) return as - bs;\r\n\t\ta = String(as).toLowerCase();\r\n\t\tb = String(bs).toLowerCase();\r\n\t\tif(a === b) return 0;\r\n\t\tif(!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1;\r\n\t\ta = a.match(rx);\r\n\t\tb = b.match(rx);\r\n\t\tL = a.length > b.length ? b.length : a.length;\r\n\t\twhile(i < L){\r\n\t\t\ta1= a[i];\r\n\t\t\tb1= b[i++];\r\n\t\t\tif(a1 !== b1){\r\n\t\t\t\tif(isFinite(a1) && isFinite(b1)){\r\n\t\t\t\t\tif(a1.charAt(0) === \"0\") a1 = \".\" + a1;\r\n\t\t\t\t\tif(b1.charAt(0) === \"0\") b1 = \".\" + b1;\r\n\t\t\t\t\treturn a1 - b1;\r\n\t\t\t\t}\r\n\t\t\t\telse return a1 > b1 ? 1 : -1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn a.length > b.length;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","import number from './sorters/number.js';\r\nimport string from './sorters/string.js';\r\nimport date from './sorters/date.js';\r\nimport time from './sorters/time.js';\r\nimport datetime from './sorters/datetime.js';\r\nimport boolean from './sorters/boolean.js';\r\nimport array from './sorters/array.js';\r\nimport exists from './sorters/exists.js';\r\nimport alphanum from './sorters/alphanum.js';\r\n\r\nexport default {\r\n\tnumber:number,\r\n\tstring:string,\r\n\tdate:date,\r\n\ttime:time,\r\n\tdatetime:datetime,\r\n\tboolean:boolean,\r\n\tarray:array,\r\n\texists:exists,\r\n\talphanum:alphanum\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultSorters from './defaults/sorters.js';\r\n\r\nclass Sort extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t \tthis.sortList = []; //holder current sort\r\n\t \tthis.changed = false; //has the sort changed since last render\r\n\r\n\t \tthis.registerTableOption(\"sortMode\", \"local\"); //local or remote sorting\r\n\r\n\t \tthis.registerTableOption(\"initialSort\", false); //initial sorting criteria\r\n\t \tthis.registerTableOption(\"columnHeaderSortMulti\", true); //multiple or single column sorting\r\n\t \tthis.registerTableOption(\"sortOrderReverse\", false); //reverse internal sort ordering\r\n\t \tthis.registerTableOption(\"headerSortElement\", \"
\"); //header sort element\r\n\r\n\t \tthis.registerColumnOption(\"sorter\");\r\n\t \tthis.registerColumnOption(\"sorterParams\");\r\n\r\n\t \tthis.registerColumnOption(\"headerSort\", true);\r\n\t \tthis.registerColumnOption(\"headerSortStartingDir\");\r\n\t \tthis.registerColumnOption(\"headerSortTristate\");\r\n\r\n\t }\r\n\r\n\t initialize(){\r\n\t \tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t \tthis.subscribe(\"table-built\", this.tableBuilt.bind(this));\r\n\t \tthis.registerDataHandler(this.sort.bind(this), 20);\r\n\r\n\t \tthis.registerTableFunction(\"setSort\", this.userSetSort.bind(this));\r\n\t \tthis.registerTableFunction(\"getSorters\", this.getSort.bind(this));\r\n\t \tthis.registerTableFunction(\"clearSort\", this.clearSort.bind(this));\r\n\r\n\t \tif(this.table.options.sortMode === \"remote\"){\r\n\t \t\tthis.subscribe(\"data-params\", this.remoteSortParams.bind(this));\r\n\t \t}\r\n\t }\r\n\r\n\t tableBuilt(){\r\n\t \tif(this.table.options.initialSort){\r\n\t \t\tthis.setSort(this.table.options.initialSort);\r\n\t \t}\r\n\t }\r\n\r\n\t remoteSortParams(data, config, silent, params){\r\n\t \tvar sorters = this.getSort();\r\n\r\n\t \tsorters.forEach((item) => {\r\n\t \t\tdelete item.column;\r\n\t \t});\r\n\r\n\t \tparams.sort = sorters;\r\n\r\n\t \treturn params;\r\n\t }\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tuserSetSort(sortList, dir){\r\n\t\tthis.setSort(sortList, dir);\r\n\t\t// this.table.rowManager.sorterRefresh();\r\n\t\tthis.refreshSort();\r\n\t}\r\n\r\n\tclearSort(){\r\n\t\tthis.clear();\r\n\t\t// this.table.rowManager.sorterRefresh();\r\n\t\tthis.refreshSort();\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\t//initialize column header for sorting\r\n\tinitializeColumn(column){\r\n\t\tvar sorter = false,\r\n\t\tcolEl,\r\n\t\tarrowEl;\r\n\r\n\t\tswitch(typeof column.definition.sorter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Sort.sorters[column.definition.sorter]){\r\n\t\t\t\tsorter = Sort.sorters[column.definition.sorter];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Sort Error - No such sorter found: \", column.definition.sorter);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tsorter = column.definition.sorter;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tcolumn.modules.sort = {\r\n\t\t\tsorter:sorter, dir:\"none\",\r\n\t\t\tparams:column.definition.sorterParams || {},\r\n\t\t\tstartingDir:column.definition.headerSortStartingDir || \"asc\",\r\n\t\t\ttristate: column.definition.headerSortTristate,\r\n\t\t};\r\n\r\n\t\tif(column.definition.headerSort !== false){\r\n\r\n\t\t\tcolEl = column.getElement();\r\n\r\n\t\t\tcolEl.classList.add(\"tabulator-sortable\");\r\n\r\n\r\n\t\t\tarrowEl = document.createElement(\"div\");\r\n\t\t\tarrowEl.classList.add(\"tabulator-col-sorter\");\r\n\r\n\t\t\tif(typeof this.table.options.headerSortElement == \"object\"){\r\n\t\t\t\tarrowEl.appendChild(this.table.options.headerSortElement);\r\n\t\t\t}else{\r\n\t\t\t\tarrowEl.innerHTML = this.table.options.headerSortElement;\r\n\t\t\t}\r\n\r\n\t\t\t//create sorter arrow\r\n\t\t\tcolumn.titleHolderElement.appendChild(arrowEl);\r\n\r\n\t\t\tcolumn.modules.sort.element = arrowEl;\r\n\r\n\t\t\t//sort on click\r\n\t\t\tcolEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\tvar dir = \"\",\r\n\t\t\t\tsorters=[],\r\n\t\t\t\tmatch = false;\r\n\r\n\t\t\t\tif(column.modules.sort){\r\n\t\t\t\t\tif(column.modules.sort.tristate){\r\n\t\t\t\t\t\tif(column.modules.sort.dir == \"none\"){\r\n\t\t\t\t\t\t\tdir = column.modules.sort.startingDir;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(column.modules.sort.dir == column.modules.sort.startingDir){\r\n\t\t\t\t\t\t\t\tdir = column.modules.sort.dir == \"asc\" ? \"desc\" : \"asc\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tdir = \"none\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswitch(column.modules.sort.dir){\r\n\t\t\t\t\t\t\tcase \"asc\":\r\n\t\t\t\t\t\t\tdir = \"desc\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tcase \"desc\":\r\n\t\t\t\t\t\t\tdir = \"asc\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tdir = column.modules.sort.startingDir;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\tif (this.table.options.columnHeaderSortMulti && (e.shiftKey || e.ctrlKey)) {\r\n\t\t\t\t\t\tsorters = this.getSort();\r\n\r\n\t\t\t\t\t\tmatch = sorters.findIndex((sorter) => {\r\n\t\t\t\t\t\t\treturn sorter.field === column.getField();\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tif(match > -1){\r\n\t\t\t\t\t\t\tsorters[match].dir = dir;\r\n\r\n\t\t\t\t\t\t\tif(match != sorters.length -1){\r\n\t\t\t\t\t\t\t\tmatch = sorters.splice(match, 1)[0];\r\n\t\t\t\t\t\t\t\tif(dir != \"none\"){\r\n\t\t\t\t\t\t\t\t\tsorters.push(match);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(dir != \"none\"){\r\n\t\t\t\t\t\t\t\tsorters.push({column:column, dir:dir});\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t//add to existing sort\r\n\t\t\t\t\t\tthis.setSort(sorters);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(dir == \"none\"){\r\n\t\t\t\t\t\t\tthis.clear();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t//sort by column only\r\n\t\t\t\t\t\t\tthis.setSort(column, dir);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// this.table.rowManager.sorterRefresh(!this.sortList.length);\r\n\t\t\t\t\tthis.refreshSort();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\trefreshSort(){\r\n\t\tif(this.table.options.sortMode === \"remote\"){\r\n\t\t\tthis.reloadData();\r\n\t\t}else{\r\n\t\t\tthis.refreshData(true);\r\n\t\t}\r\n\r\n\t\t//TODO - Persist left position of row manager\r\n\t\t// left = this.scrollLeft;\r\n\t\t// this.scrollHorizontal(left);\r\n\t}\r\n\r\n\t//check if the sorters have changed since last use\r\n\thasChanged(){\r\n\t\tvar changed = this.changed;\r\n\t\tthis.changed = false;\r\n\t\treturn changed;\r\n\t}\r\n\r\n\t//return current sorters\r\n\tgetSort(){\r\n\t\tvar self = this,\r\n\t\tsorters = [];\r\n\r\n\t\tself.sortList.forEach(function(item){\r\n\t\t\tif(item.column){\r\n\t\t\t\tsorters.push({column:item.column.getComponent(), field:item.column.getField(), dir:item.dir});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn sorters;\r\n\t}\r\n\r\n\t//change sort list and trigger sort\r\n\tsetSort(sortList, dir){\r\n\t\tvar self = this,\r\n\t\tnewSortList = [];\r\n\r\n\t\tif(!Array.isArray(sortList)){\r\n\t\t\tsortList = [{column: sortList, dir:dir}];\r\n\t\t}\r\n\r\n\t\tsortList.forEach(function(item){\r\n\t\t\tvar column;\r\n\r\n\t\t\tcolumn = self.table.columnManager.findColumn(item.column);\r\n\r\n\t\t\tif(column){\r\n\t\t\t\titem.column = column;\r\n\t\t\t\tnewSortList.push(item);\r\n\t\t\t\tself.changed = true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Sort Warning - Sort field does not exist and is being ignored: \", item.column);\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\t\tself.sortList = newSortList;\r\n\r\n\t\tthis.dispatch(\"sort-changed\");\r\n\t}\r\n\r\n\t//clear sorters\r\n\tclear(){\r\n\t\tthis.setSort([]);\r\n\t}\r\n\r\n\t//find appropriate sorter for column\r\n\tfindSorter(column){\r\n\t\tvar row = this.table.rowManager.activeRows[0],\r\n\t\tsorter = \"string\",\r\n\t\tfield, value;\r\n\r\n\t\tif(row){\r\n\t\t\trow = row.getData();\r\n\t\t\tfield = column.getField();\r\n\r\n\t\t\tif(field){\r\n\r\n\t\t\t\tvalue = column.getFieldValue(row);\r\n\r\n\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){\r\n\t\t\t\t\t\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn Sort.sorters[sorter];\r\n\t}\r\n\r\n\t//work through sort list sorting data\r\n\tsort(data){\r\n\t\tvar self = this,\r\n\t\tsortList = this.table.options.sortOrderReverse ? self.sortList.slice().reverse() : self.sortList,\r\n\t\tsortListActual = [],\r\n\t\trowComponents = [],\r\n\t\tlastSort;\r\n\r\n\t\tif(this.subscribedExternal(\"dataSorting\")){\r\n\t\t\tthis.dispatchExternal(\"dataSorting\", self.getSort());\r\n\t\t}\r\n\r\n\t\tself.clearColumnHeaders();\r\n\r\n\t\tif(this.table.options.sortMode !== \"remote\"){\r\n\r\n\t\t\t//build list of valid sorters and trigger column specific callbacks before sort begins\r\n\t\t\tsortList.forEach(function(item, i){\r\n\t\t\t\tvar sortObj = item.column.modules.sort;\r\n\r\n\t\t\t\tif(item.column && sortObj){\r\n\r\n\t\t\t\t\t//if no sorter has been defined, take a guess\r\n\t\t\t\t\tif(!sortObj.sorter){\r\n\t\t\t\t\t\tsortObj.sorter = self.findSorter(item.column);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\titem.params = typeof sortObj.params === \"function\" ? sortObj.params(item.column.getComponent(), item.dir) : sortObj.params;\r\n\r\n\t\t\t\t\tsortListActual.push(item);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tself.setColumnHeader(item.column, item.dir);\r\n\t\t\t});\r\n\r\n\t\t\t//sort data\r\n\t\t\tif (sortListActual.length) {\r\n\t\t\t\tself._sortItems(data, sortListActual);\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tsortList.forEach(function(item, i){\r\n\t\t\t\tself.setColumnHeader(item.column, item.dir);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.subscribedExternal(\"dataSorted\")){\r\n\t\t\tdata.forEach((row) => {\r\n\t\t\t\trowComponents.push(row.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatchExternal(\"dataSorted\", self.getSort(), rowComponents);\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//clear sort arrows on columns\r\n\tclearColumnHeaders(){\r\n\t\tthis.table.columnManager.getRealColumns().forEach(function(column){\r\n\t\t\tif(column.modules.sort){\r\n\t\t\t\tcolumn.modules.sort.dir = \"none\";\r\n\t\t\t\tcolumn.getElement().setAttribute(\"aria-sort\", \"none\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//set the column header sort direction\r\n\tsetColumnHeader(column, dir){\r\n\t\tcolumn.modules.sort.dir = dir;\r\n\t\tcolumn.getElement().setAttribute(\"aria-sort\", dir);\r\n\t}\r\n\r\n\t//sort each item in sort list\r\n\t_sortItems(data, sortList){\r\n\t\tvar sorterCount = sortList.length - 1;\r\n\r\n\t\tdata.sort((a, b) => {\r\n\t\t\tvar result;\r\n\r\n\t\t\tfor(var i = sorterCount; i>= 0; i--){\r\n\t\t\t\tlet sortItem = sortList[i];\r\n\r\n\t\t\t\tresult = this._sortRow(a, b, sortItem.column, sortItem.dir, sortItem.params);\r\n\r\n\t\t\t\tif(result !== 0){\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn result;\r\n\t\t});\r\n\t}\r\n\r\n\t//process individual rows for a sort function on active data\r\n\t_sortRow(a, b, column, dir, params){\r\n\t\tvar el1Comp, el2Comp, colComp;\r\n\r\n\t\t//switch elements depending on search direction\r\n\t\tvar el1 = dir == \"asc\" ? a : b;\r\n\t\tvar el2 = dir == \"asc\" ? b : a;\r\n\r\n\t\ta = column.getFieldValue(el1.getData());\r\n\t\tb = column.getFieldValue(el2.getData());\r\n\r\n\t\ta = typeof a !== \"undefined\" ? a : \"\";\r\n\t\tb = typeof b !== \"undefined\" ? b : \"\";\r\n\r\n\t\tel1Comp = el1.getComponent();\r\n\t\tel2Comp = el2.getComponent();\r\n\r\n\t\treturn column.modules.sort.sorter.call(this, a, b, el1Comp, el2Comp, column.getComponent(), dir, params);\r\n\t}\r\n}\r\n\r\nSort.moduleName = \"sort\";\r\n\r\n//load defaults\r\nSort.sorters = defaultSorters;\r\n\r\nexport default Sort;","export default {\r\n\t//is integer\r\n\tinteger: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvalue = Number(value);\r\n\t\treturn typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\r\n\t},\r\n\r\n\t//is float\r\n\tfloat: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvalue = Number(value);\r\n\t\treturn typeof value === 'number' && isFinite(value) && value % 1 !== 0;\r\n\t},\r\n\r\n\t//must be a number\r\n\tnumeric: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn !isNaN(value);\r\n\t},\r\n\r\n\t//must be a string\r\n\tstring: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn isNaN(value);\r\n\t},\r\n\r\n\t//maximum value\r\n\tmax: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn parseFloat(value) <= parameters;\r\n\t},\r\n\r\n\t//minimum value\r\n\tmin: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn parseFloat(value) >= parameters;\r\n\t},\r\n\r\n\t//starts with value\r\n\tstarts: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).toLowerCase().startsWith(String(parameters).toLowerCase());\r\n\t},\r\n\r\n\t//ends with value\r\n\tends: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).toLowerCase().endsWith(String(parameters).toLowerCase());\r\n\t},\r\n\r\n\r\n\t//minimum string length\r\n\tminLength: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).length >= parameters;\r\n\t},\r\n\r\n\t//maximum string length\r\n\tmaxLength: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).length <= parameters;\r\n\t},\r\n\r\n\t//in provided value list\r\n\tin: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif(typeof parameters == \"string\"){\r\n\t\t\tparameters = parameters.split(\"|\");\r\n\t\t}\r\n\r\n\t\treturn value === \"\" || parameters.indexOf(value) > -1;\r\n\t},\r\n\r\n\t//must match provided regex\r\n\tregex: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar reg = new RegExp(parameters);\r\n\r\n\t\treturn reg.test(value);\r\n\t},\r\n\r\n\t//value must be unique in this column\r\n\tunique: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar unique = true;\r\n\r\n\t\tvar cellData = cell.getData();\r\n\t\tvar column = cell.getColumn()._getSelf();\r\n\r\n\t\tthis.table.rowManager.rows.forEach(function(row){\r\n\t\t\tvar data = row.getData();\r\n\r\n\t\t\tif(data !== cellData){\r\n\t\t\t\tif(value == column.getFieldValue(data)){\r\n\t\t\t\t\tunique = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn unique;\r\n\t},\r\n\r\n\t//must have a value\r\n\trequired:function(cell, value, parameters){\r\n\t\treturn value !== \"\" && value !== null && typeof value !== \"undefined\";\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultValidators from './defaults/validators.js';\r\n\r\nclass Validate extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.invalidCells = [];\r\n\r\n\t\tthis.registerTableOption(\"validationMode\", \"blocking\");\r\n\r\n\t\tthis.registerColumnOption(\"validator\");\r\n\r\n\t\tthis.registerTableFunction(\"getInvalidCells\", this.getInvalidCells.bind(this));\r\n\t\tthis.registerTableFunction(\"clearCellValidation\", this.userClearCellValidation.bind(this));\r\n\t\tthis.registerTableFunction(\"validate\", this.userValidate.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"isValid\", this.cellIsValid.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"clearValidation\", this.clearValidation.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"validate\", this.cellValidate.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"column\", \"validate\", this.columnValidate.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"validate\", this.rowValidate.bind(this));\r\n\t}\r\n\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-delete\", this.clearValidation.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumnCheck.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Cell Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tcellIsValid(cell){\r\n\t\treturn cell.modules.validate ? !cell.modules.validate.invalid : true;\r\n\t}\r\n\r\n\tcellValidate(cell){\r\n\t\treturn this.validate(cell.column.modules.validate, cell, cell.getValue());\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Column Functions ////////\r\n\t///////////////////////////////////\r\n\r\n\tcolumnValidate(column){\r\n\t\tvar invalid = [];\r\n\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tif(!this.cellValidate(cell)){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Row Functions //////////\r\n\t///////////////////////////////////\r\n\r\n\trowValidate(row){\r\n\t\tvar invalid = [];\r\n\r\n\t\trow.cells.forEach((cell) => {\r\n\t\t\tif(!this.cellValidate(cell)){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\r\n\tuserClearCellValidation(cells){\r\n\t\tif(!cells){\r\n\t\t\tcells = this.getInvalidCells();\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\r\n\t\tcells.forEach((cell) => {\r\n\t\t\tthis.clearValidation(cell._getSelf());\r\n\t\t});\r\n\t}\r\n\r\n\tuserValidate(cells){\r\n\t\tvar output = [];\r\n\r\n\t\t//clear row data\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\trow = row.getComponent();\r\n\r\n\t\t\tvar valid = row.validate();\r\n\r\n\t\t\tif(valid !== true){\r\n\t\t\t\toutput = output.concat(valid);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output.length ? output : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(typeof column.definition.validator !== \"undefined\"){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//validate\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = [],\r\n\t\tvalidator;\r\n\r\n\t\tif(column.definition.validator){\r\n\r\n\t\t\tif(Array.isArray(column.definition.validator)){\r\n\t\t\t\tcolumn.definition.validator.forEach((item) => {\r\n\t\t\t\t\tvalidator = self._extractValidator(item);\r\n\r\n\t\t\t\t\tif(validator){\r\n\t\t\t\t\t\tconfig.push(validator);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t}else{\r\n\t\t\t\tvalidator = this._extractValidator(column.definition.validator);\r\n\r\n\t\t\t\tif(validator){\r\n\t\t\t\t\tconfig.push(validator);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.modules.validate = config.length ? config : false;\r\n\t\t}\r\n\t}\r\n\r\n\t_extractValidator(value){\r\n\t\tvar type, params, pos;\r\n\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tpos = value.indexOf(':');\r\n\r\n\t\t\tif(pos > -1){\r\n\t\t\t\ttype = value.substring(0,pos);\r\n\t\t\t\tparams = value.substring(pos+1);\r\n\t\t\t}else{\r\n\t\t\t\ttype = value;\r\n\t\t\t}\r\n\r\n\t\t\treturn this._buildValidator(type, params);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\treturn this._buildValidator(value);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"object\":\r\n\t\t\treturn this._buildValidator(value.type, value.parameters);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t_buildValidator(type, params){\r\n\r\n\t\tvar func = typeof type == \"function\" ? type : Validate.validators[type];\r\n\r\n\t\tif(!func){\r\n\t\t\tconsole.warn(\"Validator Setup Error - No matching validator found:\", type);\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn {\r\n\t\t\t\ttype:typeof type == \"function\" ? \"function\" : type,\r\n\t\t\t\tfunc:func,\r\n\t\t\t\tparams:params,\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\tvalidate(validators, cell, value){\r\n\t\tvar self = this,\r\n\t\tvalid = [],\r\n\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\r\n\t\tif(validators){\r\n\t\t\tvalidators.forEach((item) => {\r\n\t\t\t\tif(!item.func.call(self, cell.getComponent(), value, item.params)){\r\n\t\t\t\t\tvalid.push({\r\n\t\t\t\t\t\ttype:item.type,\r\n\t\t\t\t\t\tparameters:item.params\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tvalid = valid.length ? valid : true;\r\n\r\n\t\tif(!cell.modules.validate){\r\n\t\t\tcell.modules.validate = {};\r\n\t\t}\r\n\r\n\t\tif(valid === true){\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\r\n\t\t\tif(invalidIndex > -1){\r\n\t\t\t\tthis.invalidCells.splice(invalidIndex, 1);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcell.modules.validate.invalid = true;\r\n\r\n\t\t\tif(this.table.options.validationMode !== \"manual\"){\r\n\t\t\t\tcell.getElement().classList.add(\"tabulator-validation-fail\");\r\n\t\t\t}\r\n\r\n\t\t\tif(invalidIndex == -1){\r\n\t\t\t\tthis.invalidCells.push(cell);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn valid;\r\n\t}\r\n\r\n\tgetInvalidCells(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.invalidCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tclearValidation(cell){\r\n\t\tvar invalidIndex;\r\n\r\n\t\tif(cell.modules.validate && cell.modules.validate.invalid){\r\n\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\r\n\t\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\r\n\t\t\tif(invalidIndex > -1){\r\n\t\t\t\tthis.invalidCells.splice(invalidIndex, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nValidate.moduleName = \"validate\";\r\n\r\n//load defaults\r\nValidate.validators = defaultValidators;\r\n\r\nexport default Validate;","export default {\r\n\r\n\tdebugEventsExternal:false, //flag to console log events\r\n\tdebugEventsInternal:false, //flag to console log events\r\n\tdebugInvalidOptions:true, //allow toggling of invalid option warnings\r\n\r\n\theight:false, //height of tabulator\r\n\tminHeight:false, //minimum height of tabulator\r\n\tmaxHeight:false, //maximum height of tabulator\r\n\r\n\tcolumnHeaderVertAlign:\"top\", //vertical alignment of column headers\r\n\r\n\tcolumns:[],//store for colum header info\r\n\tcolumnDefaults:{}, //store column default props\r\n\r\n\tdata:false, //default starting data\r\n\r\n\tautoColumns:false, //build columns from data row structure\r\n\tautoColumnsDefinitions:false,\r\n\r\n\tnestedFieldSeparator:\".\", //separator for nested data\r\n\r\n\ttooltipGenerationMode:\"load\", //when to generate tooltips\r\n\r\n\tfooterElement:false, //hold footer element\r\n\r\n\tindex:\"id\", //filed for row index\r\n\r\n\ttextDirection:\"auto\",\r\n\r\n\taddRowPos:\"bottom\", //position to insert blank rows, top|bottom\r\n\r\n\theaderVisible:true, //hide header\r\n\r\n\trenderVertical:\"virtual\",\r\n\trenderHorizontal:\"basic\",\r\n\trenderVerticalBuffer:0, // set virtual DOM buffer size\r\n\r\n\tscrollToRowPosition:\"top\",\r\n\tscrollToRowIfVisible:true,\r\n\r\n\tscrollToColumnPosition:\"left\",\r\n\tscrollToColumnIfVisible:true,\r\n\r\n\trowFormatter:false,\r\n\trowFormatterPrint:null,\r\n\trowFormatterClipboard:null,\r\n\trowFormatterHtmlOutput:null,\r\n\r\n\tplaceholder:false,\r\n\r\n\tdataLoader:true,\r\n\tdataLoaderLoading:false,\r\n\tdataLoaderError:false,\r\n\tdataLoaderErrorTimeout:3000,\r\n\r\n\tdataSendParams:{},\r\n\r\n\tdataReceiveParams:{},\r\n}\r\n","export default class OptionsList {\r\n\tconstructor(table, msgType, defaults = {}){\r\n\t\tthis.table = table;\r\n\t\tthis.msgType = msgType;\r\n\t\tthis.registeredDefaults = Object.assign({}, defaults)\r\n\t}\r\n\r\n\tregister(option, value){\r\n\t\tthis.registeredDefaults[option] = value;\r\n\t}\r\n\r\n\tgenerate(defaultOptions, userOptions = {}){\r\n\t\tvar output = Object.assign({}, this.registeredDefaults);\r\n\r\n\t\tObject.assign(output, defaultOptions);\r\n\r\n\t\tif(userOptions.debugInvalidOptions !== false || this.table.options.debugInvalidOptions){\r\n\t\t\tfor (var key in userOptions){\r\n\t\t\t\tif(!output.hasOwnProperty(key)){\r\n\t\t\t\t\tconsole.warn(\"Invalid \" + this.msgType + \" option:\", key)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var key in output){\r\n\t\t\tif(key in userOptions){\r\n\t\t\t\toutput[key] = userOptions[key];\r\n\t\t\t}else{\r\n\t\t\t\tif(Array.isArray(output[key])){\r\n\t\t\t\t\toutput[key] = Object.assign([], output[key]);\r\n\t\t\t\t}else if(typeof output[key] === \"object\" && output[key] !== null){\r\n\t\t\t\t\toutput[key] = Object.assign({}, output[key]);\r\n\t\t\t\t}else if (typeof output[key] === \"undefined\"){\r\n\t\t\t\t\tdelete output[key];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport Helpers from '../tools/Helpers.js';\r\n\r\nexport default class Renderer extends CoreFeature{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.elementVertical = table.rowManager.element;\r\n\t\tthis.elementHorizontal = table.columnManager.element;\r\n\t\tthis.tableElement = table.rowManager.tableElement;\r\n\r\n\t\tthis.verticalFillMode = \"fit\"; // used by row manager to determin how to size the render area (\"fit\" - fits container to the contents, \"fill\" - fills the contianer without resizing it)\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t/////// Internal Bindings /////////\r\n\t///////////////////////////////////\r\n\r\n\tinitialize(){\r\n\t\t//initialize core functionality\r\n\t}\r\n\r\n\tclearRows(){\r\n\t\t//clear down existing rows layout\r\n\t}\r\n\r\n\tclearColumns(){\r\n\t\t//clear down existing columns layout\r\n\t}\r\n\r\n\r\n\treinitializeColumnWidths(columns){\r\n\t\t//resize columns to fit data\r\n\t}\r\n\r\n\r\n\trenderRows(){\r\n\t\t//render rows from a clean slate\r\n\t}\r\n\r\n\trenderColumns(){\r\n\t\t//render columns from a clean slate\r\n\t}\r\n\r\n\trerenderRows(callback){\r\n\t\t// rerender rows and keep position\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\t}\r\n\r\n\trerenderColumns(update, blockRedraw){\r\n\t\t//rerender columns\r\n\t}\r\n\r\n\trenderRowCells(row){\r\n\t\t//render the cells in a row\r\n\t}\r\n\r\n\trerenderRowCells(row, force){\r\n\t\t//rerender the cells in a row\r\n\t}\r\n\r\n\tscrollColumns(left, dir){\r\n\t\t//handle horizontal scrolling\r\n\t}\r\n\r\n\tscrollRows(top, dir){\r\n\t\t//handle vertical scolling\r\n\t}\r\n\r\n\tresize(){\r\n\t\t//container has rezied, carry out any needed recalculations (DO NOT RERENDER IN THIS FUNCTION)\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\t//scroll to a specific row\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\t//determine weather the row is nearest the top or bottom of the table, retur true for top or false for bottom\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\t//return the visible rows\r\n\t\treturn [];\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t//////// Helper Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\trows(){\r\n\t\treturn this.table.rowManager.getDisplayRows();\r\n\t}\r\n\r\n\tstyleRow(row, index){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tif(index % 2){\r\n\t\t\trowEl.classList.add(\"tabulator-row-even\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-odd\");\r\n\t\t}else{\r\n\t\t\trowEl.classList.add(\"tabulator-row-odd\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-even\");\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t/////// External Triggers /////////\r\n\t/////// (DO NOT OVERRIDE) /////////\r\n\t///////////////////////////////////\r\n\r\n\tclear(){\r\n\t\t//clear down existing layout\r\n\t\tthis.clearRows();\r\n\t\tthis.clearColumns();\r\n\t}\r\n\r\n\trender(){\r\n\t\t//render from a clean slate\r\n\t\tthis.renderRows();\r\n\t\tthis.renderColumns();\r\n\t}\r\n\r\n\trerender(callback){\r\n\t\t// rerender and keep position\r\n\t\tthis.rerenderRows();\r\n\t\tthis.rerenderColumns();\r\n\t}\r\n\r\n\tscrollToRowPosition(row, position, ifVisible){\r\n\t\tvar rowIndex = this.rows().indexOf(row),\r\n\t\trowEl = row.getElement(),\r\n\t\toffset = 0;\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tif(rowIndex > -1){\r\n\r\n\t\t\t\tif(typeof ifVisible === \"undefined\"){\r\n\t\t\t\t\tifVisible = this.table.options.scrollToRowIfVisible;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//check row visibility\r\n\t\t\t\tif(!ifVisible){\r\n\t\t\t\t\tif(Helpers.elVisible(rowEl)){\r\n\t\t\t\t\t\toffset = Helpers.elOffset(rowEl).top - Helpers.elOffset(this.elementVertical).top;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(offset > 0 && offset < this.elementVertical.clientHeight - rowEl.offsetHeight){\r\n\t\t\t\t\t\t\tresolve();\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(typeof position === \"undefined\"){\r\n\t\t\t\t\tposition = this.table.options.scrollToRowPosition;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(position === \"nearest\"){\r\n\t\t\t\t\tposition = this.scrollToRowNearestTop(row) ? \"top\" : \"bottom\"\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//scroll to row\r\n\t\t\t\tthis.scrollToRow(row);\r\n\r\n\t\t\t\t//align to correct position\r\n\t\t\t\tswitch(position){\r\n\t\t\t\t\tcase \"middle\":\r\n\t\t\t\t\tcase \"center\":\r\n\r\n\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop + (rowEl.offsetTop - this.elementVertical.scrollTop) - ((this.elementVertical.scrollHeight - rowEl.offsetTop) / 2);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.clientHeight / 2);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"bottom\":\r\n\r\n\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.scrollHeight - rowEl.offsetTop) + rowEl.offsetHeight;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - this.elementVertical.clientHeight + rowEl.offsetHeight;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresolve();\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - Row not visible\");\r\n\t\t\t\treject(\"Scroll Error - Row not visible\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class BaiscHorizontal extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t}\r\n\r\n\trenderRowCells(row){\r\n\t\trow.cells.forEach((cell) => {\r\n\t\t\trow.element.appendChild(cell.getElement());\r\n\t\t\tcell.cellRendered();\r\n\t\t});\r\n\t}\r\n\r\n\treinitializeColumnWidths(columns){\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t});\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class VirtualDomHorizontal extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.leftCol = 0;\r\n\t\tthis.rightCol = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = 0;\r\n\t\tthis.vDomScrollPosRight = 0;\r\n\t\t\r\n\t\tthis.vDomPadLeft = 0;\r\n\t\tthis.vDomPadRight = 0;\r\n\t\t\r\n\t\tthis.fitDataColAvg = 0;\r\n\t\t\r\n\t\tthis.windowBuffer = 200; //pixel margin to make column visible before it is shown on screen\r\n\t\t\r\n\t\tthis.visibleRows = null;\r\n\r\n\t\tthis.initialized = false;\r\n\t\tthis.isFitData = false;\r\n\t\t\r\n\t\tthis.columns = [];\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.compatibilityCheck();\r\n\t\tthis.layoutCheck();\r\n\t\tthis.vertScrollListen();\r\n\t}\r\n\t\r\n\tcompatibilityCheck(){\r\n\t\tvar columns = this.options(\"columns\"),\r\n\t\tfrozen = false,\r\n\t\tok = true;\r\n\t\t\r\n\t\tif(this.options(\"layout\") == \"fitDataTable\"){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with fitDataTable layout mode\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.options(\"responsiveLayout\")){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with responsive columns\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.options(\"rtl\")){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not currently compatible with RTL text direction\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(columns){\r\n\t\t\tfrozen = columns.find((col) => {\r\n\t\t\t\treturn col.frozen;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(frozen){\r\n\t\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with frozen columns\");\r\n\t\t\t\tok = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// if(!ok){\r\n\t\t// \toptions.virtualDomHoz = false;\r\n\t\t// }\r\n\t\t\r\n\t\treturn ok;\r\n\t}\r\n\t\r\n\tlayoutCheck(){\r\n\t\tthis.isFitData = this.options(\"layout\").startsWith('fitData');\r\n\t}\r\n\r\n\tvertScrollListen(){\r\n\t\tthis.subscribe(\"scroll-vertical\", this.clearVisRowCache.bind(this));\r\n\t\tthis.subscribe(\"data-refreshed\", this.clearVisRowCache.bind(this));\r\n\t}\r\n\r\n\tclearVisRowCache(){\r\n\t\tthis.visibleRows = null;\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t///////// Public Functions ///////////\r\n\t//////////////////////////////////////\r\n\t\r\n\trenderColumns(row, force){\r\n\t\tthis.dataChange();\r\n\t}\r\n\r\n\t\r\n\tscrollColumns(left, dir){\r\n\t\tif(this.scrollLeft != left){\r\n\t\t\tthis.scrollLeft = left;\r\n\t\t\t\r\n\t\t\tthis.scroll(left - (this.vDomScrollPosLeft + this.windowBuffer));\r\n\t\t}\r\n\t}\r\n\t\r\n\tcalcWindowBuffer(){\r\n\t\tvar buffer = this.elementVertical.clientWidth;\r\n\t\t\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvar width = column.getWidth();\r\n\t\t\t\t\r\n\t\t\t\tif(width > buffer){\r\n\t\t\t\t\tbuffer = width;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.windowBuffer = buffer * 2;\r\n\t}\r\n\t\r\n\trerenderColumns(update, blockRedraw){\t\t\r\n\t\tvar old = {\r\n\t\t\tcols:this.columns,\r\n\t\t\tleftCol:this.leftCol,\r\n\t\t\trightCol:this.rightCol,\r\n\t\t},\r\n\t\tcolPos = 0;\r\n\t\t\r\n\t\t\r\n\t\tif(update && !this.initialized){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tthis.clear();\r\n\t\t\r\n\t\tthis.calcWindowBuffer();\r\n\t\t\r\n\t\tthis.scrollLeft = this.elementVertical.scrollLeft;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = this.scrollLeft - this.windowBuffer;\r\n\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\r\n\t\t\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tvar config = {};\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvar width = column.getWidth();\r\n\t\t\t\t\r\n\t\t\t\tconfig.leftPos = colPos;\r\n\t\t\t\tconfig.rightPos = colPos + width;\r\n\t\t\t\t\r\n\t\t\t\tconfig.width = width;\r\n\t\t\t\t\r\n\t\t\t\tif (this.isFitData) {\r\n\t\t\t\t\tconfig.fitDataCheck = column.modules.vdomHoz ? column.modules.vdomHoz.fitDataCheck : true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif((colPos + width > this.vDomScrollPosLeft) && (colPos < this.vDomScrollPosRight)){\r\n\t\t\t\t\t//column is visible\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.leftCol == -1){\r\n\t\t\t\t\t\tthis.leftCol = this.columns.length;\r\n\t\t\t\t\t\tthis.vDomPadLeft = colPos;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.rightCol = this.columns.length;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// column is hidden\r\n\t\t\t\t\tif(this.leftCol !== -1){\r\n\t\t\t\t\t\tthis.vDomPadRight += width;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.columns.push(column);\r\n\t\t\t\t\r\n\t\t\t\tcolumn.modules.vdomHoz = config;\r\n\t\t\t\t\r\n\t\t\t\tcolPos += width;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t\r\n\t\tthis.initialized = true;\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tif(!update || this.reinitChanged(old)){\r\n\t\t\t\tthis.reinitializeRows();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.elementVertical.scrollLeft = this.scrollLeft;\r\n\t}\r\n\t\r\n\trenderRowCells(row){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.initializeRow(row);\r\n\t\t}else{\r\n\t\t\trow.cells.forEach((cell) => {\r\n\t\t\t\trow.element.appendChild(cell.getElement());\r\n\t\t\t\tcell.cellRendered();\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\trerenderRowCells(row, force){\r\n\t\tthis.reinitializeRow(row, force);\r\n\t}\r\n\t\r\n\treinitializeColumnWidths(columns){\r\n\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\r\n\t\t\tthis.columns[i].reinitializeWidth();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t//////// Internal Rendering //////////\r\n\t//////////////////////////////////////\r\n\t\r\n\tdeinitialize(){\r\n\t\tthis.initialized = false;\r\n\t}\r\n\t\r\n\tclear(){\r\n\t\tthis.columns = [];\r\n\t\t\r\n\t\tthis.leftCol = -1;\r\n\t\tthis.rightCol = 0;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = 0;\r\n\t\tthis.vDomScrollPosRight = 0;\r\n\t\tthis.vDomPadLeft = 0;\r\n\t\tthis.vDomPadRight = 0;\r\n\t}\r\n\t\r\n\tdataChange(){\r\n\t\tvar change = false,\r\n\t\tcollsWidth = 0,\r\n\t\tcolEnd = 0,\r\n\t\tgroup, row, rowEl;\r\n\t\t\r\n\t\tif(this.isFitData){\r\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\t\tif(!column.definition.width && column.visible){\r\n\t\t\t\t\tchange = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(change){\r\n\t\t\t\tif(change && this.table.rowManager.getDisplayRows().length){\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar row = this.chain(\"rows-sample\", [1], [], () => {\r\n\t\t\t\t\t\treturn this.table.rowManager.getDisplayRows();\r\n\t\t\t\t\t})[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trowEl = row.getElement();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trow.generateCells();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.tableElement.appendChild(rowEl);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfor(var colEnd = 0; colEnd < row.cells.length; colEnd++){\r\n\t\t\t\t\t\t\tlet cell = row.cells[colEnd];\r\n\t\t\t\t\t\t\trowEl.appendChild(cell.getElement());\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcell.column.reinitializeWidth();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcollsWidth += cell.column.getWidth();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// if(collsWidth > this.vDomScrollPosRight){\r\n\t\t\t\t\t\t\t// \tbreak;\r\n\t\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// this.fitDataColAvg = Math.floor(collsWidth / (colEnd + 1));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// for(colEnd; colEnd < this.table.columnManager.columnsByIndex.length; colEnd++){\r\n\t\t\t\t\t\t// \tthis.table.columnManager.columnsByIndex[colEnd].setWidth(this.fitDataColAvg);\r\n\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.rerenderColumns(false, true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.options(\"layout\") === \"fitColumns\"){\r\n\t\t\t\tthis.layoutRefresh();\r\n\t\t\t\tthis.rerenderColumns(false, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitChanged(old){\r\n\t\tvar match = true;\r\n\t\t\r\n\t\tif(old.cols.length !== this.columns.length || old.leftCol !== this.leftCol || old.rightCol !== this.rightCol){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\told.cols.forEach((col, i) => {\r\n\t\t\tif(col !== this.columns[i]){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn !match;\r\n\t}\r\n\t\r\n\treinitializeRows(){\r\n\t\tvar rows = this.getVisibleRows();\r\n\t\trows.forEach((row) => {\r\n\t\t\tthis.reinitializeRow(row, true);\r\n\t\t});\r\n\t}\r\n\t\r\n\tgetVisibleRows(){\r\n\t\tif (!this.visibleRows){\r\n\t\t\tthis.visibleRows = this.table.rowManager.getVisibleRows();\r\n\t\t}\r\n\r\n\t\treturn this.visibleRows;\t\r\n\t}\r\n\t\r\n\tscroll(diff){\r\n\t\tthis.vDomScrollPosLeft += diff;\r\n\t\tthis.vDomScrollPosRight += diff;\r\n\r\n\t\tif(Math.abs(diff) > (this.windowBuffer / 2)){\r\n\t\t\tthis.rerenderColumns();\r\n\t\t}else{\r\n\t\t\tif(diff > 0){\r\n\t\t\t\t//scroll right\r\n\t\t\t\tthis.addColRight();\r\n\t\t\t\tthis.removeColLeft();\r\n\t\t\t}else{\r\n\t\t\t\t//scroll left\r\n\t\t\t\tthis.addColLeft();\r\n\t\t\t\tthis.removeColRight();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tcolPositionAdjust (start, end, diff){\r\n\t\tfor(let i = start; i < end; i++){\r\n\t\t\tlet column = this.columns[i];\r\n\t\t\t\r\n\t\t\tcolumn.modules.vdomHoz.leftPos += diff;\r\n\t\t\tcolumn.modules.vdomHoz.rightPos += diff;\r\n\t\t}\r\n\t}\r\n\t\r\n\taddColRight(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\t\r\n\t\t\tlet column = this.columns[this.rightCol + 1];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.leftPos <= this.vDomScrollPosRight){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\trow.getElement().appendChild(cell.getElement());\r\n\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.fitDataColActualWidthCheck(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.rightCol++; // Don't move this below the >= check below\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.rightCol >= (this.columns.length - 1)){\r\n\t\t\t\t\t\tthis.vDomPadRight = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomPadRight -= column.getWidth();\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\taddColLeft(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.leftCol - 1];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.rightPos >= this.vDomScrollPosLeft){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\trow.getElement().prepend(cell.getElement());\r\n\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.leftCol--; // don't move this below the <= check below\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.leftCol <= 0){ // replicating logic in addColRight\r\n\t\t\t\t\t\tthis.vDomPadLeft = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomPadLeft -= column.getWidth();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tlet diff = this.fitDataColActualWidthCheck(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(diff){\r\n\t\t\t\t\t\tthis.scrollLeft = this.elementVertical.scrollLeft = this.elementVertical.scrollLeft + diff;\r\n\t\t\t\t\t\tthis.vDomPadRight -= diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveColRight(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.rightCol];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.leftPos > this.vDomScrollPosRight){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\trow.getElement().removeChild(cell.getElement());\r\n\t\t\t\t\t\t\t} catch (ex) {\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Could not removeColRight\", ex.message)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomPadRight += column.getWidth();\r\n\t\t\t\t\tthis.rightCol --;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveColLeft(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.leftCol];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.rightPos < this.vDomScrollPosLeft){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\t\t\t\t\t\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\trow.getElement().removeChild(cell.getElement());\r\n\t\t\t\t\t\t\t} catch (ex) {\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Could not removeColLeft\", ex.message)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomPadLeft += column.getWidth();\r\n\t\t\t\t\tthis.leftCol ++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\tfitDataColActualWidthCheck(column){\r\n\t\tvar newWidth, widthDiff;\r\n\t\t\r\n\t\tif(column.modules.vdomHoz.fitDataCheck){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t\t\r\n\t\t\tnewWidth = column.getWidth();\r\n\t\t\twidthDiff = newWidth - column.modules.vdomHoz.width;\r\n\t\t\t\r\n\t\t\tif(widthDiff){\r\n\t\t\t\tcolumn.modules.vdomHoz.rightPos += widthDiff;\r\n\t\t\t\tcolumn.modules.vdomHoz.width = newWidth;\r\n\t\t\t\tthis.colPositionAdjust(this.columns.indexOf(column) + 1, this.columns.length, widthDiff);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcolumn.modules.vdomHoz.fitDataCheck = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn widthDiff;\r\n\t}\r\n\t\r\n\tinitializeRow(row){\r\n\t\tif(row.type !== \"group\"){\r\n\t\t\trow.modules.vdomHoz = {\r\n\t\t\t\tleftCol:this.leftCol,\r\n\t\t\t\trightCol:this.rightCol,\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\r\n\t\t\t\tlet column = this.columns[i];\r\n\t\t\t\t\r\n\t\t\t\tif(column && column.visible){\r\n\t\t\t\t\tlet cell = row.getCell(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\trow.getElement().appendChild(cell.getElement());\r\n\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitializeRow(row, force){\r\n\t\tif(row.type !== \"group\"){\r\n\t\t\tif(force || !row.modules.vdomHoz || row.modules.vdomHoz.leftCol !== this.leftCol || row.modules.vdomHoz.rightCol !== this.rightCol){\r\n\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\twhile(rowEl.firstChild) rowEl.removeChild(rowEl.firstChild);\r\n\t\t\t\t\r\n\t\t\t\tthis.initializeRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\nimport Column from './column/Column.js';\r\nimport ColumnComponent from './column/ColumnComponent.js';\r\nimport Helpers from './tools/Helpers.js';\r\nimport OptionsList from './tools/OptionsList.js';\r\n\r\nimport RendererBasicHorizontal from './rendering/renderers/BasicHorizontal.js';\r\nimport RendererVirtualDomHorizontal from './rendering/renderers/VirtualDomHorizontal.js';\r\n\r\nimport defaultColumnOptions from './column/defaults/options.js';\r\n\r\nexport default class ColumnManager extends CoreFeature {\r\n\r\n\tconstructor (table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.blockHozScrollEvent = false;\r\n\t\tthis.headersElement = null;\r\n\t\tthis.element = null ; //containing element\r\n\t\tthis.columns = []; // column definition object\r\n\t\tthis.columnsByIndex = []; //columns by index\r\n\t\tthis.columnsByField = {}; //columns by field\r\n\t\tthis.scrollLeft = 0;\r\n\t\tthis.optionsList = new OptionsList(this.table, \"column definition\", defaultColumnOptions);\r\n\r\n\t\tthis.renderer = null;\r\n\t}\r\n\r\n\t////////////// Setup Functions /////////////////\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeRenderer();\r\n\r\n\t\tthis.headersElement = this.createHeadersElement();\r\n\t\tthis.element = this.createHeaderElement();\r\n\r\n\t\tthis.element.insertBefore(this.headersElement, this.element.firstChild);\r\n\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t}\r\n\r\n\tinitializeRenderer(){\r\n\t\tvar renderClass;\r\n\r\n\t\tvar renderers = {\r\n\t\t\t\"virtual\": RendererVirtualDomHorizontal,\r\n\t\t\t\"basic\": RendererBasicHorizontal,\r\n\t\t};\r\n\r\n\t\tif(typeof this.table.options.renderHorizontal === \"string\"){\r\n\t\t\trenderClass = renderers[this.table.options.renderHorizontal];\r\n\t\t}else{\r\n\t\t\trenderClass = this.table.options.renderHorizontal;\r\n\t\t}\r\n\r\n\t\tif(renderClass){\r\n\t\t\tthis.renderer = new renderClass(this.table, this.element, this.tableElement);\r\n\t\t\tthis.renderer.initialize();\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Unable to find matching renderer:\", table.options.renderHorizontal);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tcreateHeadersElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-headers\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateHeaderElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-header\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\r\n\t\tif(!this.table.options.headerVisible){\r\n\t\t\tel.classList.add(\"tabulator-header-hidden\");\r\n\t\t}\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\t//return containing element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\t//return header containing element\r\n\tgetHeadersElement(){\r\n\t\treturn this.headersElement;\r\n\t}\r\n\r\n\t//scroll horizontally to match table body\r\n\tscrollHorizontal(left){\r\n\t\tvar hozAdjust = 0,\r\n\t\tscrollWidth = this.element.scrollWidth - this.table.element.clientWidth;\r\n\r\n\t\t// this.tempScrollBlock();\r\n\t\tthis.element.scrollLeft = left;\r\n\r\n\t\t//adjust for vertical scrollbar moving table when present\r\n\t\tif(left > scrollWidth){\r\n\t\t\thozAdjust = left - scrollWidth;\r\n\t\t\tthis.element.style.marginLeft = (-(hozAdjust)) + \"px\";\r\n\t\t}else{\r\n\t\t\tthis.element.style.marginLeft = 0;\r\n\t\t}\r\n\r\n\t\tthis.scrollLeft = left;\r\n\r\n\t\tthis.renderer.scrollColumns(left);\r\n\t}\r\n\r\n\t///////////// Column Setup Functions /////////////\r\n\tgenerateColumnsFromRowData(data){\r\n\t\tvar cols = [],\r\n\t\tdefinitions = this.table.options.autoColumnsDefinitions,\r\n\t\trow, sorter;\r\n\r\n\t\tif(data && data.length){\r\n\r\n\t\t\trow = data[0];\r\n\r\n\t\t\tfor(var key in row){\r\n\t\t\t\tlet col = {\r\n\t\t\t\t\tfield:key,\r\n\t\t\t\t\ttitle:key,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tlet value = row[key];\r\n\r\n\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tif(Array.isArray(value)){\r\n\t\t\t\t\t\tsorter = \"array\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){\r\n\t\t\t\t\t\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcol.sorter = sorter;\r\n\r\n\t\t\t\tcols.push(col);\r\n\t\t\t}\r\n\r\n\t\t\tif(definitions){\r\n\r\n\t\t\t\tswitch(typeof definitions){\r\n\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\tthis.table.options.columns = definitions.call(this.table, cols);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tif(Array.isArray(definitions)){\r\n\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\tvar match = definitions.find((def) => {\r\n\t\t\t\t\t\t\t\treturn def.field === col.field;\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tif(match){\r\n\t\t\t\t\t\t\t\tObject.assign(col, match);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\tif(definitions[col.field]){\r\n\t\t\t\t\t\t\t\tObject.assign(col, definitions[col.field]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.table.options.columns = cols;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.options.columns = cols;\r\n\t\t\t}\r\n\r\n\t\t\tthis.setColumns(this.table.options.columns);\r\n\t\t}\r\n\t}\r\n\r\n\tsetColumns(cols, row){\r\n\t\twhile(this.headersElement.firstChild) this.headersElement.removeChild(this.headersElement.firstChild);\r\n\r\n\t\tthis.columns = [];\r\n\t\tthis.columnsByIndex = [];\r\n\t\tthis.columnsByField = {};\r\n\r\n\t\tthis.dispatch(\"columns-loading\");\r\n\r\n\t\tcols.forEach((def, i) => {\r\n\t\t\tthis._addColumn(def);\r\n\t\t});\r\n\r\n\t\tthis._reIndexColumns();\r\n\r\n\t\tthis.dispatch(\"columns-loaded\");\r\n\r\n\t\tthis.renderer.rerenderColumns(false, true);\r\n\r\n\t\tthis.redraw(true);\r\n\t}\r\n\r\n\t_addColumn(definition, before, nextToColumn){\r\n\t\tvar column = new Column(definition, this),\r\n\t\tcolEl = column.getElement(),\r\n\t\tindex = nextToColumn ? this.findColumnIndex(nextToColumn) : nextToColumn;\r\n\r\n\t\tif(nextToColumn && index > -1){\r\n\t\t\tvar topColumn = nextToColumn.getTopColumn()\r\n\t\t\tvar parentIndex = this.columns.indexOf(topColumn);\r\n\t\t\tvar nextEl = topColumn.getElement();\r\n\r\n\t\t\tif(before){\r\n\t\t\t\tthis.columns.splice(parentIndex, 0, column);\r\n\t\t\t\tnextEl.parentNode.insertBefore(colEl, nextEl);\r\n\t\t\t}else{\r\n\t\t\t\tthis.columns.splice(parentIndex + 1, 0, column);\r\n\t\t\t\tnextEl.parentNode.insertBefore(colEl, nextEl.nextSibling);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(before){\r\n\t\t\t\tthis.columns.unshift(column);\r\n\t\t\t\tthis.headersElement.insertBefore(column.getElement(), this.headersElement.firstChild);\r\n\t\t\t}else{\r\n\t\t\t\tthis.columns.push(column);\r\n\t\t\t\tthis.headersElement.appendChild(column.getElement());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcolumn.columnRendered();\r\n\r\n\t\treturn column;\r\n\t}\r\n\r\n\tregisterColumnField(col){\r\n\t\tif(col.definition.field){\r\n\t\t\tthis.columnsByField[col.definition.field] = col;\r\n\t\t}\r\n\t}\r\n\r\n\tregisterColumnPosition(col){\r\n\t\tthis.columnsByIndex.push(col);\r\n\t}\r\n\r\n\t_reIndexColumns(){\r\n\t\tthis.columnsByIndex = [];\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.reRegisterPosition();\r\n\t\t});\r\n\t}\r\n\r\n\t//ensure column headers take up the correct amount of space in column groups\r\n\tverticalAlignHeaders(){\r\n\t\tvar minHeight = 0;\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\tvar height;\r\n\r\n\t\t\tcolumn.clearVerticalAlign();\r\n\r\n\t\t\theight = column.getHeight();\r\n\r\n\t\t\tif(height > minHeight){\r\n\t\t\t\tminHeight = height;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\tcolumn.verticalAlign(this.table.options.columnHeaderVertAlign, minHeight);\r\n\t\t});\r\n\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\t//////////////// Column Details /////////////////\r\n\tfindColumn(subject){\r\n\t\tif(typeof subject == \"object\"){\r\n\r\n\t\t\tif(subject instanceof Column){\r\n\t\t\t\t//subject is column element\r\n\t\t\t\treturn subject;\r\n\t\t\t}else if(subject instanceof ColumnComponent){\r\n\t\t\t\t//subject is public column component\r\n\t\t\t\treturn subject._getSelf() || false;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\t//subject is a HTML element of the column header\r\n\t\t\t\tlet match = this.columns.find((column) => {\r\n\t\t\t\t\treturn column.element === subject;\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn match || false;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the field name of the column\r\n\t\t\treturn this.columnsByField[subject] || false;\r\n\t\t}\r\n\r\n\t\t//catch all for any other type of input\r\n\t\treturn false;\r\n\t}\r\n\r\n\tgetColumnByField(field){\r\n\t\treturn this.columnsByField[field];\r\n\t}\r\n\r\n\tgetColumnsByFieldRoot(root){\r\n\t\tvar matches = [];\r\n\r\n\t\tObject.keys(this.columnsByField).forEach((field) => {\r\n\t\t\tvar fieldRoot = field.split(\".\")[0];\r\n\t\t\tif(fieldRoot === root){\r\n\t\t\t\tmatches.push(this.columnsByField[field]);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn matches;\r\n\t}\r\n\r\n\tgetColumnByIndex(index){\r\n\t\treturn this.columnsByIndex[index];\r\n\t}\r\n\r\n\tgetFirstVisibleColumn(index){\r\n\t\tvar index = this.columnsByIndex.findIndex((col) => {\r\n\t\t\treturn col.visible;\r\n\t\t});\r\n\r\n\t\treturn index > -1 ? this.columnsByIndex[index] : false;\r\n\t}\r\n\r\n\tgetColumns(){\r\n\t\treturn this.columns;\r\n\t}\r\n\r\n\tfindColumnIndex(column){\r\n\t\treturn this.columnsByIndex.findIndex((col) => {\r\n\t\t\treturn column === col;\r\n\t\t});\r\n\t}\r\n\r\n\t//return all columns that are not groups\r\n\tgetRealColumns(){\r\n\t\treturn this.columnsByIndex;\r\n\t}\r\n\r\n\t//travers across columns and call action\r\n\ttraverse(callback){\r\n\t\tthis.columnsByIndex.forEach((column,i) =>{\r\n\t\t\tcallback(column, i);\r\n\t\t});\r\n\t}\r\n\r\n\t//get defintions of actual columns\r\n\tgetDefinitions(active){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tif(!active || (active && column.visible)){\r\n\t\t\t\toutput.push(column.getDefinition());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//get full nested definition tree\r\n\tgetDefinitionTree(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\toutput.push(column.getDefinition(true));\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetComponents(structured){\r\n\t\tvar output = [],\r\n\t\tcolumns = structured ? this.columns : this.columnsByIndex;\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\toutput.push(column.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\tvar width = 0;\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tif(column.visible){\r\n\t\t\t\twidth += column.getWidth();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn width;\r\n\t}\r\n\r\n\tmoveColumn(from, to, after){\r\n\t\tthis.moveColumnActual(from, to, after);\r\n\r\n\t\tto.element.parentNode.insertBefore(from.element, to.element);\r\n\r\n\t\tif(after){\r\n\t\t\tto.element.parentNode.insertBefore(to.element, from.element);\r\n\t\t}\r\n\r\n\t\tthis.verticalAlignHeaders();\r\n\r\n\t\tthis.table.rowManager.reinitialize();\r\n\t}\r\n\r\n\tmoveColumnActual(from, to, after){\r\n\t\tif(from.parent.isGroup){\r\n\t\t\tthis._moveColumnInArray(from.parent.columns, from, to, after);\r\n\t\t}else{\r\n\t\t\tthis._moveColumnInArray(this.columns, from, to, after);\r\n\t\t}\r\n\r\n\t\tthis._moveColumnInArray(this.columnsByIndex, from, to, after, true);\r\n\r\n\t\tthis.renderer.rerenderColumns(true);\r\n\r\n\t\tthis.dispatch(\"column-moved\", from, to, after);\r\n\r\n\t\tif(this.subscribedExternal(\"columnMoved\")){\r\n\t\t\tthis.dispatchExternal(\"columnMoved\", from.getComponent(), this.table.columnManager.getComponents());\r\n\t\t}\r\n\t}\r\n\r\n\t_moveColumnInArray(columns, from, to, after, updateRows){\r\n\t\tvar\tfromIndex = columns.indexOf(from),\r\n\t\ttoIndex, rows = [];\r\n\r\n\t\tif (fromIndex > -1) {\r\n\r\n\t\t\tcolumns.splice(fromIndex, 1);\r\n\r\n\t\t\ttoIndex = columns.indexOf(to);\r\n\r\n\t\t\tif (toIndex > -1) {\r\n\r\n\t\t\t\tif(after){\r\n\t\t\t\t\ttoIndex = toIndex+1;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\ttoIndex = fromIndex;\r\n\t\t\t}\r\n\r\n\t\t\tcolumns.splice(toIndex, 0, from);\r\n\r\n\t\t\tif(updateRows){\r\n\r\n\t\t\t\trows = this.chain(\"column-moving-rows\", [from, to, after], null, []) || [];\r\n\r\n\t\t\t\trows = rows.concat(this.table.rowManager.rows);\r\n\r\n\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\tif(row.cells.length){\r\n\t\t\t\t\t\tvar cell = row.cells.splice(fromIndex, 1)[0];\r\n\t\t\t\t\t\trow.cells.splice(toIndex, 0, cell);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscrollToColumn(column, position, ifVisible){\r\n\t\tvar left = 0,\r\n\t\toffset = 0,\r\n\t\tadjust = 0,\r\n\t\tcolEl = column.getElement();\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\r\n\t\t\tif(typeof position === \"undefined\"){\r\n\t\t\t\tposition = this.table.options.scrollToColumnPosition;\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof ifVisible === \"undefined\"){\r\n\t\t\t\tifVisible = this.table.options.scrollToColumnIfVisible;\r\n\t\t\t}\r\n\r\n\t\t\tif(column.visible){\r\n\r\n\t\t\t\t//align to correct position\r\n\t\t\t\tswitch(position){\r\n\t\t\t\t\tcase \"middle\":\r\n\t\t\t\t\tcase \"center\":\r\n\t\t\t\t\tadjust = -this.element.clientWidth / 2;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"right\":\r\n\t\t\t\t\tadjust = colEl.clientWidth - this.headersElement.clientWidth;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//check column visibility\r\n\t\t\t\tif(!ifVisible){\r\n\r\n\t\t\t\t\toffset = colEl.offsetLeft;\r\n\r\n\t\t\t\t\tif(offset > 0 && offset + colEl.offsetWidth < this.element.clientWidth){\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//calculate scroll position\r\n\t\t\t\tleft = colEl.offsetLeft + adjust;\r\n\r\n\t\t\t\tleft = Math.max(Math.min(left, this.table.rowManager.element.scrollWidth - this.table.rowManager.element.clientWidth),0);\r\n\r\n\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\tthis.scrollHorizontal(left);\r\n\r\n\t\t\t\tresolve();\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - Column not visible\");\r\n\t\t\t\treject(\"Scroll Error - Column not visible\");\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\tgenerateCells(row){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tcells.push(column.generateCell(row));\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\t//////////////// Column Management /////////////////\r\n\tgetFlexBaseWidth(){\r\n\t\tvar totalWidth = this.table.element.clientWidth, //table element width\r\n\t\tfixedWidth = 0;\r\n\r\n\t\t//adjust for vertical scrollbar if present\r\n\t\tif(this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight){\r\n\t\t\ttotalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth;\r\n\t\t}\r\n\r\n\t\tthis.columnsByIndex.forEach(function(column){\r\n\t\t\tvar width, minWidth, colWidth;\r\n\r\n\t\t\tif(column.visible){\r\n\r\n\t\t\t\twidth = column.definition.width || 0;\r\n\r\n\t\t\t\tminWidth = parseInt(column.minWidth);\r\n\r\n\t\t\t\tif(typeof(width) == \"string\"){\r\n\t\t\t\t\tif(width.indexOf(\"%\") > -1){\r\n\t\t\t\t\t\tcolWidth = (totalWidth / 100) * parseInt(width) ;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tcolWidth = parseInt(width);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolWidth = width;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn fixedWidth;\r\n\t}\r\n\r\n\taddColumn(definition, before, nextToColumn){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar column = this._addColumn(definition, before, nextToColumn);\r\n\r\n\t\t\tthis._reIndexColumns();\r\n\r\n\t\t\tthis.dispatch(\"column-add\", definition, before, nextToColumn);\r\n\r\n\t\t\tif(this.layoutMode() != \"fitColumns\"){\r\n\t\t\t\tcolumn.reinitializeWidth();\r\n\t\t\t}\r\n\r\n\t\t\tthis.redraw(true);\r\n\r\n\t\t\tthis.table.rowManager.reinitialize();\r\n\r\n\t\t\tthis.renderer.rerenderColumns();\r\n\r\n\t\t\tresolve(column);\r\n\t\t});\r\n\t}\r\n\r\n\t//remove column from system\r\n\tderegisterColumn(column){\r\n\t\tvar field = column.getField(),\r\n\t\tindex;\r\n\r\n\t\t//remove from field list\r\n\t\tif(field){\r\n\t\t\tdelete this.columnsByField[field];\r\n\t\t}\r\n\r\n\t\t//remove from index list\r\n\t\tindex = this.columnsByIndex.indexOf(column);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columnsByIndex.splice(index, 1);\r\n\t\t}\r\n\r\n\t\t//remove from column list\r\n\t\tindex = this.columns.indexOf(column);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columns.splice(index, 1);\r\n\t\t}\r\n\r\n\t\tthis.verticalAlignHeaders();\r\n\r\n\t\tthis.redraw();\r\n\t}\r\n\r\n\t//redraw columns\r\n\tredraw(force){\r\n\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\tthis.verticalAlignHeaders();\r\n\t\t}\r\n\r\n\t\tif(force){\r\n\t\t\tthis.table.rowManager.resetScroll();\r\n\t\t\tthis.table.rowManager.reinitialize();\r\n\t\t}\r\n\r\n\t\tif(!this.confirm(\"table-redrawing\", force)){\r\n\t\t\tthis.layoutRefresh();\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"table-redraw\", force);\r\n\r\n\t\tthis.table.footerManager.redraw();\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class BaiscVertical extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.verticalFillMode = \"fill\";\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t}\r\n\r\n\tclearRows(){\r\n\t\tvar element = this.tableElement;\r\n\r\n\t\t// element.children.detach();\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\telement.scrollTop = 0;\r\n\t\telement.scrollLeft = 0;\r\n\r\n\t\telement.style.minWidth = \"\";\r\n\t\telement.style.minHeight = \"\";\r\n\t\telement.style.display = \"\";\r\n\t\telement.style.visibility = \"\";\r\n\t}\r\n\r\n\trenderRows(){\r\n\t\tvar element = this.tableElement,\r\n\t\tonlyGroupHeaders = true;\r\n\r\n\t\tthis.rows().forEach((row, index) => {\r\n\t\t\tthis.styleRow(row, index);\r\n\t\t\telement.appendChild(row.getElement());\r\n\t\t\trow.initialize(true);\r\n\r\n\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\tonlyGroupHeaders = false;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(onlyGroupHeaders){\r\n\t\t\telement.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t}else{\r\n\t\t\telement.style.minWidth = \"\";\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trerenderRows(callback){\r\n\t\tthis.clearRows();\r\n\t\tthis.renderRows();\r\n\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\tvar rowTop = Helpers.elOffset(row.getElement()).top;\r\n\r\n\t\treturn !(Math.abs(this.elementVertical.scrollTop - rowTop) > Math.abs(this.elementVertical.scrollTop + this.elementVertical.clientHeight - rowTop));\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tthis.elementVertical.scrollTop = Helpers.elOffset(rowEl).top - Helpers.elOffset(this.elementVertical).top + this.elementVertical.scrollTop;\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\treturn this.rows();\r\n\t}\r\n\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class VirtualDomVertical extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.verticalFillMode = \"fill\";\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.vDomRowHeight = 20; //approximation of row heights for padding\r\n\r\n\t\tthis.vDomTop = 0; //hold position for first rendered row in the virtual DOM\r\n\t\tthis.vDomBottom = 0; //hold possition for last rendered row in the virtual DOM\r\n\r\n\t\tthis.vDomScrollPosTop = 0; //last scroll position of the vDom top;\r\n\t\tthis.vDomScrollPosBottom = 0; //last scroll position of the vDom bottom;\r\n\r\n\t\tthis.vDomTopPad = 0; //hold value of padding for top of virtual DOM\r\n\t\tthis.vDomBottomPad = 0; //hold value of padding for bottom of virtual DOM\r\n\r\n\t\tthis.vDomMaxRenderChain = 90; //the maximum number of dom elements that can be rendered in 1 go\r\n\r\n\t\tthis.vDomWindowBuffer = 0; //window row buffer before removing elements, to smooth scrolling\r\n\r\n\t\tthis.vDomWindowMinTotalRows = 20; //minimum number of rows to be generated in virtual dom (prevent buffering issues on tables with tall rows)\r\n\t\tthis.vDomWindowMinMarginRows = 5; //minimum number of rows to be generated in virtual dom margin\r\n\r\n\t\tthis.vDomTopNewRows = []; //rows to normalize after appending to optimize render speed\r\n\t\tthis.vDomBottomNewRows = []; //rows to normalize after appending to optimize render speed\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t///////// Public Functions ///////////\r\n\t//////////////////////////////////////\r\n\r\n\tclearRows(){\r\n\t\tvar element = this.tableElement;\r\n\r\n\t\t// element.children.detach();\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\telement.style.paddingTop = \"\";\r\n\t\telement.style.paddingBottom = \"\";\r\n\t\t// element.style.minWidth = \"\";\r\n\t\telement.style.minHeight = \"\";\r\n\t\telement.style.display = \"\";\r\n\t\telement.style.visibility = \"\";\r\n\r\n\t\tthis.elementVertical.scrollTop = 0;\r\n\t\tthis.elementVertical.scrollLeft = 0;\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.vDomTop = 0;\r\n\t\tthis.vDomBottom = 0;\r\n\t\tthis.vDomTopPad = 0;\r\n\t\tthis.vDomBottomPad = 0;\r\n\t\tthis.vDomScrollPosTop = 0;\r\n\t\tthis.vDomScrollPosBottom = 0;\r\n\t}\r\n\r\n\trenderRows(){\r\n\t\tthis._virtualRenderFill();\r\n\t}\r\n\r\n\trerenderRows(callback){\r\n\t\tvar scrollTop = this.elementVertical.scrollTop;\r\n\t\tvar topRow = false;\r\n\t\tvar topOffset = false;\r\n\r\n\t\tvar left = this.table.rowManager.scrollLeft;\r\n\r\n\t\tvar rows = this.rows();\r\n\r\n\t\tfor(var i = this.vDomTop; i <= this.vDomBottom; i++){\r\n\r\n\t\t\tif(rows[i]){\r\n\t\t\t\tvar diff = scrollTop - rows[i].getElement().offsetTop;\r\n\r\n\t\t\t\tif(topOffset === false || Math.abs(diff) < topOffset){\r\n\t\t\t\t\ttopOffset = diff;\r\n\t\t\t\t\ttopRow = i;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\trows.forEach((row) => {\r\n\t\t\trow.deinitializeHeight();\r\n\t\t});\r\n\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\r\n\t\tthis._virtualRenderFill((topRow === false ? this.rows.length - 1 : topRow), true, topOffset || 0);\r\n\r\n\t\tthis.scrollColumns(left);\r\n\t}\r\n\r\n\tscrollColumns(left){\r\n\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t}\r\n\r\n\tscrollRows(top, dir){\r\n\t\tvar topDiff = top - this.vDomScrollPosTop;\r\n\t\tvar bottomDiff = top - this.vDomScrollPosBottom;\r\n\t\tvar margin = this.vDomWindowBuffer * 2;\r\n\t\tvar rows = this.rows();\r\n\r\n\t\tthis.scrollTop = top;\r\n\r\n\t\tif(-topDiff > margin || bottomDiff > margin){\r\n\t\t\t//if big scroll redraw table;\r\n\t\t\tvar left = this.table.rowManager.scrollLeft;\r\n\t\t\tthis._virtualRenderFill(Math.floor((this.elementVertical.scrollTop / this.elementVertical.scrollHeight) * rows.length));\r\n\t\t\tthis.scrollColumns(left);\r\n\t\t}else{\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\t//scrolling up\r\n\t\t\t\tif(topDiff < 0){\r\n\t\t\t\t\tthis._addTopRow(rows, -topDiff);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(bottomDiff < 0){\r\n\t\t\t\t\t//hide bottom row if needed\r\n\t\t\t\t\tif(this.vDomScrollHeight - this.scrollTop > this.vDomWindowBuffer){\r\n\t\t\t\t\t\tthis._removeBottomRow(rows, -bottomDiff);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomScrollPosBottom = this.scrollTop;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\r\n\t\t\t\tif(bottomDiff >= 0){\r\n\t\t\t\t\tthis._addBottomRow(rows, bottomDiff);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//scrolling down\r\n\t\t\t\tif(topDiff >= 0){\r\n\t\t\t\t\t//hide top row if needed\r\n\t\t\t\t\tif(this.scrollTop > this.vDomWindowBuffer){\r\n\t\t\t\t\t\tthis._removeTopRow(rows, topDiff);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomScrollPosTop = this.scrollTop;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tresize(){\r\n\t\tthis.vDomWindowBuffer = this.table.options.renderVerticalBuffer || this.elementVertical.clientHeight;\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\tvar rowIndex = this.rows().indexOf(row);\r\n\r\n\t\treturn !(Math.abs(this.vDomTop - rowIndex) > Math.abs(this.vDomBottom - rowIndex));\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\tvar index = this.rows().indexOf(row);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis._virtualRenderFill(index, true);\r\n\t\t}\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\tvar topEdge = this.elementVertical.scrollTop,\r\n\t\tbottomEdge = this.elementVertical.clientHeight + topEdge,\r\n\t\ttopFound = false,\r\n\t\ttopRow = 0,\r\n\t\tbottomRow = 0,\r\n\t\trows = this.rows();\r\n\r\n\t\tif(includingBuffer){\r\n\t\t\ttopRow = this.vDomTop;\r\n\t\t\tbottomRow = this.vDomBottom;\r\n\t\t}else{\r\n\t\t\tfor(var i = this.vDomTop; i <= this.vDomBottom; i++){\r\n\t\t\t\tif(rows[i]){\r\n\t\t\t\t\tif(!topFound){\r\n\t\t\t\t\t\tif((topEdge - rows[i].getElement().offsetTop) >= 0){\r\n\t\t\t\t\t\t\ttopRow = i;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\ttopFound = true;\r\n\r\n\t\t\t\t\t\t\tif(bottomEdge - rows[i].getElement().offsetTop >= 0){\r\n\t\t\t\t\t\t\t\tbottomRow = i;\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(bottomEdge - rows[i].getElement().offsetTop >= 0){\r\n\t\t\t\t\t\t\tbottomRow = i;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn rows.slice(topRow, bottomRow + 1);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t//////// Internal Rendering //////////\r\n\t//////////////////////////////////////\r\n\r\n\t//full virtual render\r\n\t_virtualRenderFill(position, forceMove, offset){\r\n\t\tvar\telement = this.tableElement,\r\n\t\tholder = this.elementVertical,\r\n\t\ttopPad = 0,\r\n\t\trowsHeight = 0,\r\n\t\theightOccupied = 0,\r\n\t\ttopPadHeight = 0,\r\n\t\ti = 0,\r\n\t\trows = this.rows(),\r\n\t\trowsCount = rows.length,\r\n\t\tcontainerHeight = this.elementVertical.clientHeight;\r\n\r\n\t\tposition = position || 0;\r\n\r\n\t\toffset = offset || 0;\r\n\r\n\t\tif(!position){\r\n\t\t\tthis.clear();\r\n\t\t}else{\r\n\t\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\t\t//check if position is too close to bottom of table\r\n\t\t\theightOccupied = (rowsCount - position + 1) * this.vDomRowHeight;\r\n\r\n\t\t\tif(heightOccupied < containerHeight){\r\n\t\t\t\tposition -= Math.ceil((containerHeight - heightOccupied) / this.vDomRowHeight);\r\n\t\t\t\tif(position < 0){\r\n\t\t\t\t\tposition = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//calculate initial pad\r\n\t\t\ttopPad = Math.min(Math.max(Math.floor(this.vDomWindowBuffer / this.vDomRowHeight), this.vDomWindowMinMarginRows), position);\r\n\t\t\tposition -= topPad;\r\n\t\t}\r\n\r\n\t\tif(rowsCount && Helpers.elVisible(this.elementVertical)){\r\n\t\t\tthis.vDomTop = position;\r\n\r\n\t\t\tthis.vDomBottom = position -1;\r\n\r\n\t\t\twhile ((rowsHeight <= containerHeight + this.vDomWindowBuffer || i < this.vDomWindowMinTotalRows) && this.vDomBottom < rowsCount -1){\r\n\t\t\t\tvar index = this.vDomBottom + 1,\r\n\t\t\t\trow = rows[index],\r\n\t\t\t\trowHeight = 0;\r\n\r\n\t\t\t\tthis.styleRow(row, index);\r\n\r\n\t\t\t\telement.appendChild(row.getElement());\r\n\r\n\t\t\t\trow.initialize();\r\n\r\n\t\t\t\tif(!row.heightInitialized){\r\n\t\t\t\t\trow.normalizeHeight(true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowHeight = row.getHeight();\r\n\r\n\t\t\t\tif(i < topPad){\r\n\t\t\t\t\ttopPadHeight += rowHeight;\r\n\t\t\t\t}else{\r\n\t\t\t\t\trowsHeight += rowHeight;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.vDomBottom ++;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\r\n\t\t\tif(!position){\r\n\t\t\t\tthis.vDomTopPad = 0;\r\n\t\t\t\t//adjust rowheight to match average of rendered elements\r\n\t\t\t\tthis.vDomRowHeight = Math.floor((rowsHeight + topPadHeight) / i);\r\n\t\t\t\tthis.vDomBottomPad = this.vDomRowHeight * (rowsCount - this.vDomBottom -1);\r\n\r\n\t\t\t\tthis.vDomScrollHeight = topPadHeight + rowsHeight + this.vDomBottomPad - containerHeight;\r\n\t\t\t}else{\r\n\t\t\t\tthis.vDomTopPad = !forceMove ? this.scrollTop - topPadHeight : (this.vDomRowHeight * this.vDomTop) + offset;\r\n\t\t\t\tthis.vDomBottomPad = this.vDomBottom == rowsCount-1 ? 0 : Math.max(this.vDomScrollHeight - this.vDomTopPad - rowsHeight - topPadHeight, 0);\r\n\t\t\t}\r\n\r\n\t\t\telement.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\telement.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\r\n\t\t\tif(forceMove){\r\n\t\t\t\tthis.scrollTop = this.vDomTopPad + (topPadHeight) + offset - (this.elementVertical.scrollWidth > this.elementVertical.clientWidth ? this.elementVertical.offsetHeight - containerHeight : 0);\r\n\t\t\t}\r\n\r\n\t\t\tthis.scrollTop = Math.min(this.scrollTop, this.elementVertical.scrollHeight - containerHeight);\r\n\r\n\t\t\t//adjust for horizontal scrollbar if present (and not at top of table)\r\n\t\t\tif(this.elementVertical.scrollWidth > this.elementVertical.offsetWidth && forceMove){\r\n\t\t\t\tthis.scrollTop += this.elementVertical.offsetHeight - containerHeight;\r\n\t\t\t}\r\n\r\n\t\t\tthis.vDomScrollPosTop = this.scrollTop;\r\n\t\t\tthis.vDomScrollPosBottom = this.scrollTop;\r\n\r\n\t\t\tholder.scrollTop = this.scrollTop;\r\n\r\n\t\t\tthis.dispatch(\"render-virtual-fill\");\r\n\t\t}\r\n\t}\r\n\r\n\t_addTopRow(rows, fillableSpace){\r\n\t\tvar table = this.tableElement,\r\n\t\taddedRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\tindex = this.vDomTop -1,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tif(this.vDomTop){\r\n\t\t\t\tlet row = rows[index],\r\n\t\t\t\trowHeight, initialized;\r\n\r\n\t\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\t\t\t\t\tinitialized = row.initialized;\r\n\r\n\t\t\t\t\tif(fillableSpace >= rowHeight){\r\n\r\n\t\t\t\t\t\tthis.styleRow(row, index);\r\n\t\t\t\t\t\ttable.insertBefore(row.getElement(), table.firstChild);\r\n\r\n\t\t\t\t\t\tif(!row.initialized || !row.heightInitialized){\r\n\t\t\t\t\t\t\taddedRows.push(row);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trow.initialize();\r\n\r\n\t\t\t\t\t\tif(!initialized){\r\n\t\t\t\t\t\t\trowHeight = row.getElement().offsetHeight;\r\n\r\n\t\t\t\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\t\tthis.vDomTop--;\r\n\t\t\t\t\t\tindex--;\r\n\t\t\t\t\t\ti++;\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of addedRows){\r\n\t\t\trow.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis._quickNormalizeRowHeight(addedRows);\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomTopPad -= paddingAdjust;\r\n\r\n\t\t\tif(this.vDomTopPad < 0){\r\n\t\t\t\tthis.vDomTopPad = index * this.vDomRowHeight;\r\n\t\t\t}\r\n\r\n\t\t\tif(index < 1){\r\n\t\t\t\tthis.vDomTopPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\ttable.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\tthis.vDomScrollPosTop -= paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_removeTopRow(rows, fillableSpace){\r\n\t\tvar removableRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[this.vDomTop],\r\n\t\t\trowHeight, diff;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\t\t\t\t\tthis.vDomTop++;\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tremovableRows.push(row);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of removableRows){\r\n\t\t\tlet rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomTopPad += paddingAdjust;\r\n\t\t\tthis.tableElement.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\tthis.vDomScrollPosTop += this.vDomTop ? paddingAdjust : paddingAdjust + this.vDomWindowBuffer;\r\n\t\t}\r\n\t}\r\n\r\n\t_addBottomRow(rows, fillableSpace){\r\n\t\tvar table = this.tableElement,\r\n\t\taddedRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\tindex = this.vDomBottom + 1,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[index],\r\n\t\t\trowHeight, initialized;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\t\t\t\tinitialized = row.initialized;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\r\n\t\t\t\t\tthis.styleRow(row, index);\r\n\t\t\t\t\ttable.appendChild(row.getElement());\r\n\r\n\t\t\t\t\tif(!row.initialized || !row.heightInitialized){\r\n\t\t\t\t\t\taddedRows.push(row);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\trow.initialize();\r\n\r\n\t\t\t\t\tif(!initialized){\r\n\t\t\t\t\t\trowHeight = row.getElement().offsetHeight;\r\n\r\n\t\t\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tthis.vDomBottom++;\r\n\t\t\t\t\tindex++;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of addedRows){\r\n\t\t\trow.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis._quickNormalizeRowHeight(addedRows);\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomBottomPad -= paddingAdjust;\r\n\r\n\t\t\tif(this.vDomBottomPad < 0 || index == rows.length -1){\r\n\t\t\t\tthis.vDomBottomPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\ttable.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\t\t\tthis.vDomScrollPosBottom += paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_removeBottomRow(rows, fillableSpace){\r\n\t\tvar removableRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[this.vDomBottom],\r\n\t\t\trowHeight, diff;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\t\t\t\t\tthis.vDomBottom --;\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tremovableRows.push(row);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of removableRows){\r\n\t\t\tlet rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomBottomPad += paddingAdjust;\r\n\r\n\t\t\tif(this.vDomBottomPad < 0){\r\n\t\t\t\tthis.vDomBottomPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\tthis.tableElement.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\t\t\tthis.vDomScrollPosBottom -= paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_quickNormalizeRowHeight(rows){\r\n\t\tfor(let row of rows){\r\n\t\t\trow.calcHeight();\r\n\t\t}\r\n\r\n\t\tfor(let row of rows){\r\n\t\t\trow.setCellHeight();\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\nimport Row from './row/Row.js';\r\nimport RowComponent from './row/RowComponent.js';\r\nimport Helpers from './tools/Helpers.js';\r\n\r\nimport RendererBasicVertical from './rendering/renderers/BasicVertical.js';\r\nimport RendererVirtualDomVertical from './rendering/renderers/VirtualDomVertical.js';\r\n\r\nexport default class RowManager extends CoreFeature{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.element = this.createHolderElement(); //containing element\r\n\t\tthis.tableElement = this.createTableElement(); //table element\r\n\t\tthis.heightFixer = this.createTableElement(); //table element\r\n\t\tthis.placeholder = null; //placeholder element\r\n\t\tthis.placeholderContents = null; //placeholder element\r\n\t\t\r\n\t\tthis.firstRender = false; //handle first render\r\n\t\tthis.renderMode = \"virtual\"; //current rendering mode\r\n\t\tthis.fixedHeight = false; //current rendering mode\r\n\t\t\r\n\t\tthis.rows = []; //hold row data objects\r\n\t\tthis.activeRowsPipeline = []; //hold calculation of active rows\r\n\t\tthis.activeRows = []; //rows currently available to on display in the table\r\n\t\tthis.activeRowsCount = 0; //count of active rows\r\n\t\t\r\n\t\tthis.displayRows = []; //rows currently on display in the table\r\n\t\tthis.displayRowsCount = 0; //count of display rows\r\n\t\t\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.rowNumColumn = false; //hold column component for row number column\r\n\t\t\r\n\t\tthis.redrawBlock = false; //prevent redraws to allow multiple data manipulations before continuing\r\n\t\tthis.redrawBlockRestoreConfig = false; //store latest redraw function calls for when redraw is needed\r\n\t\tthis.redrawBlockRenderInPosition = false; //store latest redraw function calls for when redraw is needed\r\n\t\t\r\n\t\tthis.dataPipeline = []; //hold data pipeline tasks\r\n\t\tthis.displayPipeline = []; //hold data display pipeline tasks\r\n\t\t\r\n\t\tthis.renderer = null;\r\n\t}\r\n\t\r\n\t//////////////// Setup Functions /////////////////\r\n\t\r\n\tcreateHolderElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-tableholder\");\r\n\t\tel.setAttribute(\"tabindex\", 0);\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tcreateTableElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-table\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tinitializePlaceholder(){\r\n\t\t//configure placeholder element\r\n\t\tif(typeof this.table.options.placeholder == \"string\"){\r\n\t\t\tlet el = document.createElement(\"div\");\r\n\t\t\tel.classList.add(\"tabulator-placeholder\");\r\n\t\t\t\r\n\t\t\tlet contents = document.createElement(\"div\");\r\n\t\t\tcontents.classList.add(\"tabulator-placeholder-contents\");\r\n\t\t\tcontents.innerHTML = this.table.options.placeholder;\r\n\t\t\t\r\n\t\t\tel.appendChild(contents);\r\n\t\t\t\r\n\t\t\tthis.placeholderContents = contents;\r\n\t\t\tthis.placeholder = el;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return containing element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\t\r\n\t//return table element\r\n\tgetTableElement(){\r\n\t\treturn this.tableElement;\r\n\t}\r\n\t\r\n\t//return position of row in table\r\n\tgetRowPosition(row, active){\r\n\t\tif(active){\r\n\t\t\treturn this.activeRows.indexOf(row);\r\n\t\t}else{\r\n\t\t\treturn this.rows.indexOf(row);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.initializePlaceholder()\r\n\t\tthis.initializeRenderer();\r\n\t\t\r\n\t\t//initialize manager\r\n\t\tthis.element.appendChild(this.tableElement);\r\n\t\t\r\n\t\tthis.firstRender = true;\r\n\t\t\r\n\t\t//scroll header along with table body\r\n\t\tthis.element.addEventListener(\"scroll\", () => {\r\n\t\t\tvar left = this.element.scrollLeft,\r\n\t\t\tleftDir = this.scrollLeft > left,\r\n\t\t\ttop = this.element.scrollTop,\r\n\t\t\ttopDir = this.scrollTop > top;\r\n\t\t\t\r\n\t\t\t//handle horizontal scrolling\r\n\t\t\tif(this.scrollLeft != left){\r\n\t\t\t\tthis.scrollLeft = left;\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"scroll-horizontal\", left, leftDir);\r\n\t\t\t\tthis.dispatchExternal(\"scrollHorizontal\", left, leftDir);\r\n\r\n\t\t\t\tthis._positionPlaceholder();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//handle vertical scrolling\r\n\t\t\tif(this.scrollTop != top){\r\n\t\t\t\tthis.scrollTop = top;\r\n\t\t\t\t\r\n\t\t\t\tthis.renderer.scrollRows(top, topDir);\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"scroll-vertical\", top, topDir);\r\n\t\t\t\tthis.dispatchExternal(\"scrollVertical\", top, topDir);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t////////////////// Row Manipulation //////////////////\r\n\tfindRow(subject){\r\n\t\tif(typeof subject == \"object\"){\r\n\t\t\tif(subject instanceof Row){\r\n\t\t\t\t//subject is row element\r\n\t\t\t\treturn subject;\r\n\t\t\t}else if(subject instanceof RowComponent){\r\n\t\t\t\t//subject is public row component\r\n\t\t\t\treturn subject._getSelf() || false;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\t//subject is a HTML element of the row\r\n\t\t\t\tlet match = this.rows.find((row) => {\r\n\t\t\t\t\treturn row.getElement() === subject;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\treturn match || false;\r\n\t\t\t}\r\n\t\t}else if(typeof subject == \"undefined\" || subject === null){\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the index of the row\r\n\t\t\tlet match = this.rows.find((row) => {\r\n\t\t\t\treturn row.data[this.table.options.index] == subject;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\treturn match || false;\r\n\t\t}\r\n\t\t\r\n\t\t//catch all for any other type of input\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tgetRowFromDataObject(data){\r\n\t\tvar match = this.rows.find((row) => {\r\n\t\t\treturn row.data === data;\r\n\t\t});\r\n\t\t\r\n\t\treturn match || false;\r\n\t}\r\n\t\r\n\tgetRowFromPosition(position, active){\r\n\t\tif(active){\r\n\t\t\treturn this.activeRows[position];\r\n\t\t}else{\r\n\t\t\treturn this.rows[position];\r\n\t\t}\r\n\t}\r\n\t\r\n\tscrollToRow(row, position, ifVisible){\r\n\t\treturn this.renderer.scrollToRowPosition(row, position, ifVisible);\r\n\t}\r\n\t\r\n\t////////////////// Data Handling //////////////////\r\n\tsetData(data, renderInPosition, columnsChanged){\r\n\t\treturn new Promise((resolve, reject)=>{\r\n\t\t\tif(renderInPosition && this.getDisplayRows().length){\r\n\t\t\t\tif(this.table.options.pagination){\r\n\t\t\t\t\tthis._setDataActual(data, true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.reRenderInPosition(() => {\r\n\t\t\t\t\t\tthis._setDataActual(data);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.options.autoColumns && columnsChanged && this.table.initialized){\r\n\t\t\t\t\tthis.table.columnManager.generateColumnsFromRowData(data);\r\n\t\t\t\t}\r\n\t\t\t\tthis.resetScroll();\r\n\t\t\t\t\r\n\t\t\t\tthis._setDataActual(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\t\r\n\t_setDataActual(data, renderInPosition){\r\n\t\tthis.dispatchExternal(\"dataProcessing\", data);\r\n\t\t\r\n\t\tthis._wipeElements();\r\n\t\t\r\n\t\tif(Array.isArray(data)){\r\n\t\t\tthis.dispatch(\"data-processing\", data);\r\n\t\t\t\r\n\t\t\tdata.forEach((def, i) => {\r\n\t\t\t\tif(def && typeof def === \"object\"){\r\n\t\t\t\t\tvar row = new Row(def, this);\r\n\t\t\t\t\tthis.rows.push(row);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Data Loading Warning - Invalid row data detected and ignored, expecting object but received:\", def);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.refreshActiveData(false, false, renderInPosition);\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"data-processed\", data);\r\n\t\t\tthis.dispatchExternal(\"dataProcessed\", data);\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Data Loading Error - Unable to process data due to invalid data type \\nExpecting: array \\nReceived: \", typeof data, \"\\nData: \", data);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_wipeElements(){\r\n\t\tthis.dispatch(\"rows-wipe\");\r\n\t\t\r\n\t\tthis.rows.forEach((row) => {\r\n\t\t\trow.wipe();\r\n\t\t});\r\n\t\t\r\n\t\tthis.rows = [];\r\n\t\tthis.activeRows = [];\r\n\t\tthis.activeRowsPipeline = [];\r\n\t\tthis.activeRowsCount = 0;\r\n\t\tthis.displayRows = [];\r\n\t\tthis.displayRowsCount = 0;\r\n\t\t\r\n\t\tthis.adjustTableSize();\r\n\t}\r\n\t\r\n\tdeleteRow(row, blockRedraw){\r\n\t\tvar allIndex = this.rows.indexOf(row),\r\n\t\tactiveIndex = this.activeRows.indexOf(row);\r\n\t\t\r\n\t\tif(activeIndex > -1){\r\n\t\t\tthis.activeRows.splice(activeIndex, 1);\r\n\t\t}\r\n\t\t\r\n\t\tif(allIndex > -1){\r\n\t\t\tthis.rows.splice(allIndex, 1);\r\n\t\t}\r\n\t\t\r\n\t\tthis.setActiveRows(this.activeRows);\r\n\t\t\r\n\t\tthis.displayRowIterator((rows) => {\r\n\t\t\tvar displayIndex = rows.indexOf(row);\r\n\t\t\t\r\n\t\t\tif(displayIndex > -1){\r\n\t\t\t\trows.splice(displayIndex, 1);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t}\r\n\t\t\r\n\t\tthis.regenerateRowNumbers();\r\n\t\t\r\n\t\tthis.dispatchExternal(\"rowDeleted\", row.getComponent());\r\n\t\t\r\n\t\tif(!this.displayRowsCount){\r\n\t\t\tthis._showPlaceholder();\r\n\t\t}\r\n\t\t\r\n\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\tthis.dispatchExternal(\"dataChanged\", this.getData());\r\n\t\t}\r\n\t}\r\n\t\r\n\taddRow(data, pos, index, blockRedraw){\r\n\t\tvar row = this.addRowActual(data, pos, index, blockRedraw);\r\n\t\treturn row;\r\n\t}\r\n\t\r\n\t//add multiple rows\r\n\taddRows(data, pos, index){\r\n\t\tvar length = 0,\r\n\t\trows = [];\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tpos = this.findAddRowPos(pos);\r\n\t\t\t\r\n\t\t\tif(!Array.isArray(data)){\r\n\t\t\t\tdata = [data];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlength = data.length - 1;\r\n\t\t\t\r\n\t\t\tif((typeof index == \"undefined\" && pos) || (typeof index !== \"undefined\" && !pos)){\r\n\t\t\t\tdata.reverse();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdata.forEach((item, i) => {\r\n\t\t\t\tvar row = this.addRow(item, pos, index, true);\r\n\t\t\t\trows.push(row);\r\n\t\t\t\tthis.dispatch(\"row-added\", row, data, pos, index);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.refreshActiveData(false, false, true);\r\n\t\t\t\r\n\t\t\tthis.regenerateRowNumbers();\r\n\t\t\t\r\n\t\t\tif(rows.length){\r\n\t\t\t\tthis._clearPlaceholder();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tresolve(rows);\r\n\t\t});\r\n\t}\r\n\t\r\n\tfindAddRowPos(pos){\r\n\t\tif(typeof pos === \"undefined\"){\r\n\t\t\tpos = this.table.options.addRowPos;\r\n\t\t}\r\n\t\t\r\n\t\tif(pos === \"pos\"){\r\n\t\t\tpos = true;\r\n\t\t}\r\n\t\t\r\n\t\tif(pos === \"bottom\"){\r\n\t\t\tpos = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn pos;\r\n\t}\r\n\t\r\n\taddRowActual(data, pos, index, blockRedraw){\r\n\t\tvar row = data instanceof Row ? data : new Row(data || {}, this),\r\n\t\ttop = this.findAddRowPos(pos),\r\n\t\tallIndex = -1,\r\n\t\tactiveIndex, chainResult;\r\n\t\t\r\n\t\tif(!index){\r\n\t\t\tchainResult = this.chain(\"row-adding-position\", [row, top], null, {index, top});\r\n\t\t\t\r\n\t\t\tindex = chainResult.index;\r\n\t\t\ttop = chainResult.top;\r\n\t\t}\r\n\t\t\r\n\t\tif(typeof index !== \"undefined\"){\r\n\t\t\tindex = this.findRow(index);\r\n\t\t}\r\n\t\t\r\n\t\tindex = this.chain(\"row-adding-index\", [row, index, top], null, index);\r\n\t\t\r\n\t\tif(index){\r\n\t\t\tallIndex = this.rows.indexOf(index);\r\n\t\t}\r\n\t\t\r\n\t\tif(index && allIndex > -1){\r\n\t\t\tactiveIndex = this.activeRows.indexOf(index);\r\n\t\t\t\r\n\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\tvar displayIndex = rows.indexOf(index);\r\n\t\t\t\t\r\n\t\t\t\tif(displayIndex > -1){\r\n\t\t\t\t\trows.splice((top ? displayIndex : displayIndex + 1), 0, row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(activeIndex > -1){\r\n\t\t\t\tthis.activeRows.splice((top ? activeIndex : activeIndex + 1), 0, row);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.rows.splice((top ? allIndex : allIndex + 1), 0, row);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tif(top){\r\n\t\t\t\t\r\n\t\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\t\trows.unshift(row);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRows.unshift(row);\r\n\t\t\t\tthis.rows.unshift(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\t\trows.push(row);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRows.push(row);\r\n\t\t\t\tthis.rows.push(row);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.setActiveRows(this.activeRows);\r\n\t\t\r\n\t\tthis.dispatchExternal(\"rowAdded\", row.getComponent());\r\n\t\t\r\n\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t}\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t}\r\n\t\t\r\n\t\treturn row;\r\n\t}\r\n\t\r\n\tmoveRow(from, to, after){\r\n\t\tthis.dispatch(\"row-move\", from, to, after);\r\n\t\t\r\n\t\tthis.moveRowActual(from, to, after);\r\n\t\t\r\n\t\tthis.regenerateRowNumbers();\r\n\t\t\r\n\t\tthis.dispatch(\"row-moved\", from, to, after);\r\n\t\tthis.dispatchExternal(\"rowMoved\", from.getComponent());\r\n\t}\r\n\t\r\n\tmoveRowActual(from, to, after){\r\n\t\tthis.moveRowInArray(this.rows, from, to, after);\r\n\t\tthis.moveRowInArray(this.activeRows, from, to, after);\r\n\t\t\r\n\t\tthis.displayRowIterator((rows) => {\r\n\t\t\tthis.moveRowInArray(rows, from, to, after);\r\n\t\t});\r\n\t\t\r\n\t\tthis.dispatch(\"row-moving\", from, to, after);\r\n\t}\r\n\t\r\n\tmoveRowInArray(rows, from, to, after){\r\n\t\tvar\tfromIndex, toIndex, start, end;\r\n\t\t\r\n\t\tif(from !== to){\r\n\t\t\t\r\n\t\t\tfromIndex = rows.indexOf(from);\r\n\t\t\t\r\n\t\t\tif (fromIndex > -1) {\r\n\t\t\t\t\r\n\t\t\t\trows.splice(fromIndex, 1);\r\n\t\t\t\t\r\n\t\t\t\ttoIndex = rows.indexOf(to);\r\n\t\t\t\t\r\n\t\t\t\tif (toIndex > -1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(after){\r\n\t\t\t\t\t\trows.splice(toIndex+1, 0, from);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trows.splice(toIndex, 0, from);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\trows.splice(fromIndex, 0, from);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//restyle rows\r\n\t\t\tif(rows === this.getDisplayRows()){\r\n\t\t\t\t\r\n\t\t\t\tstart = fromIndex < toIndex ? fromIndex : toIndex;\r\n\t\t\t\tend = toIndex > fromIndex ? toIndex : fromIndex +1;\r\n\t\t\t\t\r\n\t\t\t\tfor(let i = start; i <= end; i++){\r\n\t\t\t\t\tif(rows[i]){\r\n\t\t\t\t\t\tthis.styleRow(rows[i], i);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tclearData(){\r\n\t\tthis.setData([]);\r\n\t}\r\n\t\r\n\tgetRowIndex(row){\r\n\t\treturn this.findRowIndex(row, this.rows);\r\n\t}\r\n\t\r\n\tgetDisplayRowIndex(row){\r\n\t\tvar index = this.getDisplayRows().indexOf(row);\r\n\t\treturn index > -1 ? index : false;\r\n\t}\r\n\t\r\n\tnextDisplayRow(row, rowOnly){\r\n\t\tvar index = this.getDisplayRowIndex(row),\r\n\t\tnextRow = false;\r\n\t\t\r\n\t\t\r\n\t\tif(index !== false && index < this.displayRowsCount -1){\r\n\t\t\tnextRow = this.getDisplayRows()[index+1];\r\n\t\t}\r\n\t\t\r\n\t\tif(nextRow && (!(nextRow instanceof Row) || nextRow.type != \"row\")){\r\n\t\t\treturn this.nextDisplayRow(nextRow, rowOnly);\r\n\t\t}\r\n\t\t\r\n\t\treturn nextRow;\r\n\t}\r\n\t\r\n\tprevDisplayRow(row, rowOnly){\r\n\t\tvar index = this.getDisplayRowIndex(row),\r\n\t\tprevRow = false;\r\n\t\t\r\n\t\tif(index){\r\n\t\t\tprevRow = this.getDisplayRows()[index-1];\r\n\t\t}\r\n\t\t\r\n\t\tif(rowOnly && prevRow && (!(prevRow instanceof Row) || prevRow.type != \"row\")){\r\n\t\t\treturn this.prevDisplayRow(prevRow, rowOnly);\r\n\t\t}\r\n\t\t\r\n\t\treturn prevRow;\r\n\t}\r\n\t\r\n\tfindRowIndex(row, list){\r\n\t\tvar rowIndex;\r\n\t\t\r\n\t\trow = this.findRow(row);\r\n\t\t\r\n\t\tif(row){\r\n\t\t\trowIndex = list.indexOf(row);\r\n\t\t\t\r\n\t\t\tif(rowIndex > -1){\r\n\t\t\t\treturn rowIndex;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tgetData(active, transform){\r\n\t\tvar output = [],\r\n\t\trows = this.getRows(active);\r\n\t\t\r\n\t\trows.forEach(function(row){\r\n\t\t\tif(row.type == \"row\"){\r\n\t\t\t\toutput.push(row.getData(transform || \"data\"));\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetComponents(active){\r\n\t\tvar\toutput = [],\r\n\t\trows = this.getRows(active);\r\n\t\t\r\n\t\trows.forEach(function(row){\r\n\t\t\toutput.push(row.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetDataCount(active){\r\n\t\tvar rows = this.getRows(active);\r\n\t\t\r\n\t\treturn rows.length;\r\n\t}\r\n\t\r\n\tscrollHorizontal(left){\r\n\t\tthis.scrollLeft = left;\r\n\t\tthis.element.scrollLeft = left;\r\n\t\t\r\n\t\tthis.dispatch(\"scroll-horizontal\", left);\r\n\t}\r\n\t\r\n\tregisterDataPipelineHandler(handler, priority){\r\n\t\tif(typeof priority !== \"undefined\"){\r\n\t\t\tthis.dataPipeline.push({handler, priority})\r\n\t\t\tthis.dataPipeline.sort((a, b) => {\r\n\t\t\t\treturn a.priority - b.priority;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Data pipeline handlers must have a priority in order to be registered\")\r\n\t\t}\r\n\t}\r\n\t\r\n\tregisterDisplayPipelineHandler(handler, priority){\r\n\t\tif(typeof priority !== \"undefined\"){\r\n\t\t\tthis.displayPipeline.push({handler, priority})\r\n\t\t\tthis.displayPipeline.sort((a, b) => {\r\n\t\t\t\treturn a.priority - b.priority;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Display pipeline handlers must have a priority in order to be registered\")\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set active data set\r\n\trefreshActiveData(handler, skipStage, renderInPosition){\r\n\t\tvar table = this.table,\r\n\t\tstage = \"\",\r\n\t\tindex = 0,\r\n\t\tcascadeOrder = [\"all\", \"dataPipeline\", \"display\", \"displayPipeline\", \"end\"],\r\n\t\tdisplayIndex;\r\n\t\t\r\n\t\t\r\n\t\tif(typeof handler === \"function\"){\r\n\t\t\tindex = this.dataPipeline.findIndex((item) => {\r\n\t\t\t\treturn item.handler === handler;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\tstage = \"dataPipeline\";\r\n\t\t\t\t\r\n\t\t\t\tif(skipStage){\r\n\t\t\t\t\tif(index == this.dataPipeline.length - 1){\r\n\t\t\t\t\t\tstage = \"display\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tindex++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tindex = this.displayPipeline.findIndex((item) => {\r\n\t\t\t\t\treturn item.handler === handler;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tstage = \"displayPipeline\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(skipStage){\r\n\t\t\t\t\t\tif(index == this.displayPipeline.length - 1){\r\n\t\t\t\t\t\t\tstage = \"end\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tindex++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.error(\"Unable to refresh data, invalid handler provided\", handler)\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tstage = handler || \"all\";\r\n\t\t\tindex = 0;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.redrawBlock){\r\n\t\t\tif(!this.redrawBlockRestoreConfig || (this.redrawBlockRestoreConfig && ((this.redrawBlockRestoreConfig.stage === stage && index < this.redrawBlockRestoreConfig.index) || (cascadeOrder.indexOf(stage) < cascadeOrder.indexOf(this.redrawBlockRestoreConfig.stage))))){\r\n\t\t\t\tthis.redrawBlockRestoreConfig = {\r\n\t\t\t\t\thandler: handler,\r\n\t\t\t\t\tskipStage: skipStage,\r\n\t\t\t\t\trenderInPosition: renderInPosition,\r\n\t\t\t\t\tstage:stage,\r\n\t\t\t\t\tindex:index,\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn;\r\n\t\t}else{\r\n\t\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\t\tif(renderInPosition){\r\n\t\t\t\t\tthis.reRenderInPosition(this.refreshPipelines.bind(this, handler, stage, index, renderInPosition));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!handler){\r\n\t\t\t\t\t\tthis.table.columnManager.renderer.renderColumns();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.renderTable();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(table.options.layoutColumnsOnNewData){\r\n\t\t\t\t\t\tthis.table.columnManager.redraw(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"data-refreshed\");\r\n\t\t}\r\n\t}\r\n\t\r\n\trefreshPipelines(handler, stage, index, renderInPosition){\r\n\t\tthis.dispatch(\"data-refreshing\");\r\n\t\t\r\n\t\tif(!handler){\r\n\t\t\tthis.activeRowsPipeline[0] = this.rows.slice(0);\r\n\t\t}\r\n\t\t\r\n\t\t//cascade through data refresh stages\r\n\t\tswitch(stage){\r\n\t\t\tcase \"all\":\r\n\t\t\t//handle case where alldata needs refreshing\r\n\t\t\t\r\n\t\t\tcase \"dataPipeline\":\r\n\t\t\t\r\n\t\t\tfor(let i = index; i < this.dataPipeline.length; i++){\r\n\t\t\t\tlet result = this.dataPipeline[i].handler(this.activeRowsPipeline[i].slice(0));\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRowsPipeline[i + 1] = result || this.activeRowsPipeline[i].slice(0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);\r\n\t\t\t\r\n\t\t\tthis.regenerateRowNumbers();\r\n\t\t\t\r\n\t\t\tcase \"display\":\r\n\t\t\tindex = 0;\r\n\t\t\tthis.resetDisplayRows();\r\n\t\t\t\r\n\t\t\tcase \"displayPipeline\":\r\n\t\t\tfor(let i = index; i < this.displayPipeline.length; i++){\r\n\t\t\t\tlet result = this.displayPipeline[i].handler((i ? this.getDisplayRows(i - 1) : this.activeRows).slice(0), renderInPosition);\r\n\t\t\t\t\r\n\t\t\t\tthis.setDisplayRows(result || this.getDisplayRows(i - 1).slice(0), i);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase \"end\":\r\n\t\t\t//case to handle scenario when trying to skip past end stage\r\n\t\t}\r\n\t}\r\n\t\r\n\t//regenerate row numbers for row number formatter if in use\r\n\tregenerateRowNumbers(){\r\n\t\tif(this.rowNumColumn){\r\n\t\t\tthis.activeRows.forEach((row) => {\r\n\t\t\t\tvar cell = row.getCell(this.rowNumColumn);\r\n\t\t\t\t\r\n\t\t\t\tif(cell){\r\n\t\t\t\t\tcell._generateContents();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetActiveRows(activeRows){\r\n\t\tthis.activeRows = activeRows;\r\n\t\tthis.activeRowsCount = this.activeRows.length;\r\n\t}\r\n\t\r\n\t//reset display rows array\r\n\tresetDisplayRows(){\r\n\t\tthis.displayRows = [];\r\n\t\t\r\n\t\tthis.displayRows.push(this.activeRows.slice(0));\r\n\t\t\r\n\t\tthis.displayRowsCount = this.displayRows[0].length;\r\n\t}\r\n\t\r\n\tgetNextDisplayIndex(){\r\n\t\treturn this.displayRows.length;\r\n\t}\r\n\t\r\n\t//set display row pipeline data\r\n\tsetDisplayRows(displayRows, index){\r\n\t\t\r\n\t\tvar output = true;\r\n\t\t\r\n\t\tif(index && typeof this.displayRows[index] != \"undefined\"){\r\n\t\t\tthis.displayRows[index] = displayRows;\r\n\t\t\toutput = true;\r\n\t\t}else{\r\n\t\t\tthis.displayRows.push(displayRows)\r\n\t\t\toutput = index = this.displayRows.length -1;\r\n\t\t}\r\n\t\t\r\n\t\tif(index == this.displayRows.length -1){\r\n\t\t\tthis.displayRowsCount = this.displayRows[this.displayRows.length -1].length;\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetDisplayRows(index){\r\n\t\tif(typeof index == \"undefined\"){\r\n\t\t\treturn this.displayRows.length ? this.displayRows[this.displayRows.length -1] : [];\r\n\t\t}else{\r\n\t\t\treturn this.displayRows[index] || [];\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetVisibleRows(chain, viewable){\r\n\t\tvar rows = Object.assign([], this.renderer.visibleRows(!viewable));\r\n\t\t\r\n\t\tif(chain){\r\n\t\t\trows = this.chain(\"rows-visible\", [viewable], rows, rows);\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t//repeat action accross display rows\r\n\tdisplayRowIterator(callback){\r\n\t\tthis.activeRowsPipeline.forEach(callback);\r\n\t\tthis.displayRows.forEach(callback);\r\n\t\t\r\n\t\tthis.displayRowsCount = this.displayRows[this.displayRows.length -1].length;\r\n\t}\r\n\t\r\n\t//return only actual rows (not group headers etc)\r\n\tgetRows(type){\r\n\t\tvar rows;\r\n\t\t\r\n\t\tswitch(type){\r\n\t\t\tcase \"active\":\r\n\t\t\trows = this.activeRows;\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"display\":\r\n\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"visible\":\r\n\t\t\trows = this.getVisibleRows(false, true);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\trows = this.chain(\"rows-retrieve\", type, null, this.rows) || this.rows;\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t///////////////// Table Rendering /////////////////\r\n\t//trigger rerender of table in current position\r\n\treRenderInPosition(callback){\r\n\t\tif(this.redrawBlock){\r\n\t\t\tif(callback){\r\n\t\t\t\tcallback();\r\n\t\t\t}else{\r\n\t\t\t\tthis.redrawBlockRenderInPosition = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.renderer.rerenderRows(callback);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRenderer(){\r\n\t\tvar renderClass;\r\n\t\t\r\n\t\tvar renderers = {\r\n\t\t\t\"virtual\": RendererVirtualDomVertical,\r\n\t\t\t\"basic\": RendererBasicVertical,\r\n\t\t};\r\n\t\t\r\n\t\tif(typeof this.table.options.renderVertical === \"string\"){\r\n\t\t\trenderClass = renderers[this.table.options.renderVertical];\r\n\t\t}else{\r\n\t\t\trenderClass = this.table.options.renderVertical;\r\n\t\t}\r\n\t\t\r\n\t\tif(renderClass){\r\n\t\t\tthis.renderer = new renderClass(this.table, this.element, this.tableElement);\r\n\t\t\tthis.renderer.initialize();\r\n\t\t\t\r\n\t\t\tif((this.table.element.clientHeight || this.table.options.height)){\r\n\t\t\t\tthis.fixedHeight = true;\r\n\t\t\t}else{\r\n\t\t\t\tthis.fixedHeight = false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Unable to find matching renderer:\", table.options.renderVertical);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRenderMode(){\r\n\t\treturn this.renderMode;\r\n\t}\r\n\t\r\n\trenderTable(){\r\n\t\tthis.dispatchExternal(\"renderStarted\");\r\n\t\t\r\n\t\tthis.element.scrollTop = 0;\r\n\t\t\r\n\t\tthis._clearTable();\r\n\t\t\r\n\t\tif(this.displayRowsCount){\r\n\t\t\tthis.renderer.renderRows();\r\n\t\t\t\r\n\t\t\tif(this.firstRender){\r\n\t\t\t\tthis.firstRender = false;\r\n\t\t\t\tthis.layoutRefresh();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.renderEmptyScroll();\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.fixedHeight){\r\n\t\t\tthis.adjustTableSize();\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatch(\"table-layout\");\r\n\t\t\r\n\t\tif(!this.displayRowsCount){\r\n\t\t\tthis._showPlaceholder();\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatchExternal(\"renderComplete\");\r\n\t}\r\n\t\r\n\t//show scrollbars on empty table div\r\n\trenderEmptyScroll(){\r\n\t\tif(this.placeholder){\r\n\t\t\tthis.tableElement.style.display = \"none\";\r\n\t\t}else{\r\n\t\t\tthis.tableElement.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t\t// this.tableElement.style.minHeight = \"1px\";\r\n\t\t\t// this.tableElement.style.visibility = \"hidden\";\r\n\t\t}\r\n\t}\r\n\t\r\n\t_clearTable(){\r\n\t\tvar element = this.tableElement;\r\n\t\t\r\n\t\tthis._clearPlaceholder();\r\n\t\t\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.renderer.clearRows();\r\n\t}\r\n\t\r\n\t_showPlaceholder(){\r\n\t\tif(this.placeholder){\r\n\t\t\tthis.placeholder.setAttribute(\"tabulator-render-mode\", this.renderMode);\r\n\t\t\t\r\n\t\t\tthis.getElement().appendChild(this.placeholder);\r\n\t\t\tthis._positionPlaceholder();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_clearPlaceholder(){\r\n\t\tif(this.placeholder && this.placeholder.parentNode){\r\n\t\t\tthis.placeholder.parentNode.removeChild(this.placeholder);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_positionPlaceholder(){\r\n\t\tif(this.placeholder && this.placeholder.parentNode){\r\n\t\t\tthis.placeholder.style.width = this.table.columnManager.getWidth() + \"px\";\r\n\t\t\tthis.placeholderContents.style.width = this.table.rowManager.element.clientWidth + \"px\";\r\n\t\t\tthis.placeholderContents.style.marginLeft = this.scrollLeft + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tstyleRow(row, index){\r\n\t\tvar rowEl = row.getElement();\r\n\t\t\r\n\t\tif(index % 2){\r\n\t\t\trowEl.classList.add(\"tabulator-row-even\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-odd\");\r\n\t\t}else{\r\n\t\t\trowEl.classList.add(\"tabulator-row-odd\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-even\");\r\n\t\t}\r\n\t}\r\n\t\r\n\t//normalize height of active rows\r\n\tnormalizeHeight(){\r\n\t\tthis.activeRows.forEach(function(row){\r\n\t\t\trow.normalizeHeight();\r\n\t\t});\r\n\t}\r\n\t\r\n\t//adjust the height of the table holder to fit in the Tabulator element\r\n\tadjustTableSize(){\r\n\t\tvar initialHeight = this.element.clientHeight,\r\n\t\tmodExists;\r\n\t\t\r\n\t\tif(this.renderer.verticalFillMode === \"fill\"){\r\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));\r\n\t\t\t\r\n\t\t\tif(this.fixedHeight){\r\n\t\t\t\tthis.element.style.minHeight = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t\tthis.element.style.height = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t\tthis.element.style.maxHeight = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.height = \"\";\r\n\t\t\t\tthis.element.style.height = (this.table.element.clientHeight - otherHeight) + \"px\";\r\n\t\t\t\tthis.element.scrollTop = this.scrollTop;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.renderer.resize();\r\n\t\t\t\r\n\t\t\t//check if the table has changed size when dealing with variable height tables\r\n\t\t\tif(!this.fixedHeight && initialHeight != this.element.clientHeight){\r\n\t\t\t\tif(this.subscribed(\"table-resize\")){\r\n\t\t\t\t\tthis.dispatch(\"table-resize\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.redraw();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._positionPlaceholder();\r\n\t}\r\n\t\r\n\t//renitialize all rows\r\n\treinitialize(){\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\trow.reinitialize(true);\r\n\t\t});\r\n\t}\r\n\t\r\n\t//prevent table from being redrawn\r\n\tblockRedraw (){\r\n\t\tthis.redrawBlock = true;\r\n\t\tthis.redrawBlockRestoreConfig = false;\r\n\t}\r\n\t\r\n\t//restore table redrawing\r\n\trestoreRedraw (){\r\n\t\tthis.redrawBlock = false;\r\n\t\t\r\n\t\tif(this.redrawBlockRestoreConfig){\r\n\t\t\tthis.refreshActiveData(this.redrawBlockRestoreConfig.handler, this.redrawBlockRestoreConfig.skipStage, this.redrawBlockRestoreConfig.renderInPosition)\r\n\t\t\t\r\n\t\t\tthis.redrawBlockRestoreConfig = false;\r\n\t\t}else{\r\n\t\t\tif(this.redrawBlockRenderInPosition){\r\n\t\t\t\tthis.reRenderInPosition();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.redrawBlockRenderInPosition = false;\r\n\t}\r\n\t\r\n\t//redraw table\r\n\tredraw (force){\r\n\t\tvar pos = 0,\r\n\t\tleft = this.scrollLeft;\r\n\t\t\r\n\t\tthis.adjustTableSize();\r\n\t\t\r\n\t\tthis.table.tableWidth = this.table.element.clientWidth;\r\n\t\t\r\n\t\tif(!force){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t\tthis.scrollHorizontal(left);\r\n\t\t}else{\r\n\t\t\tthis.renderTable();\r\n\t\t}\r\n\t}\r\n\t\r\n\tresetScroll(){\r\n\t\tthis.element.scrollLeft = 0;\r\n\t\tthis.element.scrollTop = 0;\r\n\t\t\r\n\t\tif(this.table.browser === \"ie\"){\r\n\t\t\tvar event = document.createEvent(\"Event\");\r\n\t\t\tevent.initEvent(\"scroll\", false, true);\r\n\t\t\tthis.element.dispatchEvent(event);\r\n\t\t}else{\r\n\t\t\tthis.element.dispatchEvent(new Event('scroll'));\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\n\r\nexport default class FooterManager extends CoreFeature{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.active = false;\r\n\t\tthis.element = this.createElement(); //containing element\r\n\t\tthis.containerElement = this.createContainerElement(); //containing element\r\n\t\tthis.external = false;\r\n\t\tthis.links = [];\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeElement();\r\n\t}\r\n\r\n\tcreateElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-footer\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\t\r\n\tcreateContainerElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-footer-contents\");\r\n\r\n\t\tthis.element.appendChild(el);\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitializeElement(){\r\n\t\tif(this.table.options.footerElement){\r\n\r\n\t\t\tswitch(typeof this.table.options.footerElement){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(this.table.options.footerElement[0] === \"<\"){\r\n\t\t\t\t\tthis.containerElement.innerHTML = this.table.options.footerElement;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.external = true;\r\n\t\t\t\t\tthis.containerElement = document.querySelector(this.table.options.footerElement);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.element = this.table.options.footerElement;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tappend(element, parent){\r\n\t\tthis.activate(parent);\r\n\r\n\t\tthis.containerElement.appendChild(element);\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\tprepend(element, parent){\r\n\t\tthis.activate(parent);\r\n\r\n\t\tthis.element.insertBefore(element, this.element.firstChild);\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\tremove(element){\r\n\t\telement.parentNode.removeChild(element);\r\n\t\tthis.deactivate();\r\n\t}\r\n\r\n\tdeactivate(force){\r\n\t\tif(!this.element.firstChild || force){\r\n\t\t\tif(!this.external){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\t\t\tthis.active = false;\r\n\t\t}\r\n\t}\r\n\r\n\tactivate(parent){\r\n\t\tif(!this.active){\r\n\t\t\tthis.active = true;\r\n\t\t\tif(!this.external){\r\n\t\t\t\tthis.table.element.appendChild(this.getElement());\r\n\t\t\t\tthis.table.element.style.display = '';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(parent){\r\n\t\t\tthis.links.push(parent);\r\n\t\t}\r\n\t}\r\n\r\n\tredraw(){\r\n\t\tthis.links.forEach(function(link){\r\n\t\t\tlink.footerRedraw();\r\n\t\t});\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport Helpers from './Helpers.js';\r\nimport Row from '../row/Row.js';\r\n\r\nexport default class InteractionManager extends CoreFeature {\r\n\t\r\n\tconstructor (table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.el = null;\r\n\t\t\r\n\t\tthis.abortClasses = [\"tabulator-headers\", \"tabulator-table\"];\r\n\t\t\r\n\t\tthis.previousTargets = {};\r\n\t\t\r\n\t\tthis.listeners = [\r\n\t\t\t\"click\",\r\n\t\t\t\"dblclick\",\r\n\t\t\t\"contextmenu\",\r\n\t\t\t\"mouseenter\",\r\n\t\t\t\"mouseleave\",\r\n\t\t\t\"mouseover\",\r\n\t\t\t\"mouseout\",\r\n\t\t\t\"mousemove\",\r\n\t\t\t\"touchstart\",\r\n\t\t\t\"touchend\",\r\n\t\t];\r\n\t\t\r\n\t\tthis.componentMap = {\r\n\t\t\t\"tabulator-cell\":\"cell\",\r\n\t\t\t\"tabulator-row\":\"row\",\r\n\t\t\t\"tabulator-group\":\"group\",\r\n\t\t\t\"tabulator-col\":\"column\",\r\n\t\t};\r\n\t\t\r\n\t\tthis.pseudoTrackers = {\r\n\t\t\t\"row\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"cell\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"group\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"column\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t}\r\n\t\t\r\n\t\tthis.pseudoTracking = false;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.el = this.table.element;\r\n\t\t\r\n\t\tthis.buildListenerMap();\r\n\t\tthis.bindSubscriptionWatchers();\r\n\t}\r\n\t\r\n\tbuildListenerMap(){\r\n\t\tvar listenerMap = {};\r\n\t\t\r\n\t\tthis.listeners.forEach((listener) => {\r\n\t\t\tlistenerMap[listener] = {\r\n\t\t\t\thandler:null,\r\n\t\t\t\tcomponents:[],\r\n\t\t\t}\r\n\t\t})\r\n\t\t\r\n\t\tthis.listeners = listenerMap;\r\n\t}\r\n\t\r\n\tbindPseudoEvents(){\r\n\t\tObject.keys(this.pseudoTrackers).forEach((key) => {\r\n\t\t\tthis.pseudoTrackers[key].subscriber = this.pseudoMouseEnter.bind(this, key);\r\n\t\t\tthis.subscribe(key + \"-mouseover\", this.pseudoTrackers[key].subscriber);\r\n\t\t});\r\n\t\t\r\n\t\tthis.pseudoTracking = true;\r\n\t}\r\n\t\r\n\tpseudoMouseEnter(key, e, target){\r\n\t\tif(this.pseudoTrackers[key].target !== target){\r\n\t\t\t\r\n\t\t\tif(this.pseudoTrackers[key].target){\r\n\t\t\t\tthis.dispatch(key + \"-mouseleave\", e, target);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.pseudoMouseLeave(key, e);\r\n\t\t\t\r\n\t\t\tthis.pseudoTrackers[key].target = target;\r\n\t\t\t\r\n\t\t\tthis.dispatch(key + \"-mouseenter\", e, target);\r\n\t\t}\r\n\t}\r\n\t\r\n\tpseudoMouseLeave(key, e){\r\n\t\tvar leaveList = Object.keys(this.pseudoTrackers),\r\n\t\tlinkedKeys = {\r\n\t\t\t\"row\":[\"cell\"],\r\n\t\t\t\"cell\":[\"row\"],\r\n\t\t};\r\n\t\t\r\n\t\tleaveList = leaveList.filter((item) => {\r\n\t\t\tvar links = linkedKeys[key];\r\n\t\t\treturn item !== key && (!links || (links && !links.includes(item)));\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\tleaveList.forEach((key) => {\r\n\t\t\tvar target = this.pseudoTrackers[key].target;\r\n\t\t\t\r\n\t\t\tif(this.pseudoTrackers[key].target){\r\n\t\t\t\tthis.dispatch(key + \"-mouseleave\", e, target);\r\n\t\t\t\t\r\n\t\t\t\tthis.pseudoTrackers[key].target = null;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t\r\n\tbindSubscriptionWatchers(){\r\n\t\tvar listeners = Object.keys(this.listeners),\r\n\t\tcomponents = Object.values(this.componentMap);\r\n\t\t\r\n\t\tfor(let comp of components){\r\n\t\t\tfor(let listener of listeners){\r\n\t\t\t\tlet key = comp + \"-\" + listener;\r\n\t\t\t\t\r\n\t\t\t\tthis.subscriptionChange(key, this.subscriptionChanged.bind(this, comp, listener));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.subscribe(\"table-destroy\", this.clearWatchers.bind(this))\r\n\t}\r\n\t\r\n\tsubscriptionChanged(component, key, added){\r\n\t\tvar listener = this.listeners[key].components,\r\n\t\tindex = listener.indexOf(component),\r\n\t\tchanged = false;\r\n\t\t\r\n\t\tif(added){\r\n\t\t\tif(index === -1){\r\n\t\t\t\tlistener.push(component);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!this.subscribed(component + \"-\" + key)){\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tlistener.splice(index, 1);\r\n\t\t\t\t\tchanged = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif((key === \"mouseenter\" || key === \"mouseleave\") && !this.pseudoTracking){\r\n\t\t\tthis.bindPseudoEvents();\r\n\t\t}\r\n\t\t\r\n\t\tif(changed){\r\n\t\t\tthis.updateEventListeners();\r\n\t\t}\r\n\t}\r\n\t\r\n\tupdateEventListeners(){\r\n\t\tfor(let key in this.listeners){\r\n\t\t\tlet listener = this.listeners[key];\r\n\t\t\t\r\n\t\t\tif(listener.components.length){\r\n\t\t\t\tif(!listener.handler){\r\n\t\t\t\t\tlistener.handler = this.track.bind(this, key);\r\n\t\t\t\t\tthis.el.addEventListener(key, listener.handler)\r\n\t\t\t\t\t// this.el.addEventListener(key, listener.handler, {passive: true})\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(listener.handler){\r\n\t\t\t\t\tthis.el.removeEventListener(key, listener.handler)\r\n\t\t\t\t\tlistener.handler = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\ttrack(type, e){\r\n\t\tvar path = (e.composedPath && e.composedPath()) || e.path;\r\n\t\t\r\n\t\tvar targets = this.findTargets(path);\r\n\t\ttargets = this.bindComponents(type, targets);\r\n\t\t\r\n\t\tthis.triggerEvents(type, e, targets);\r\n\t\t\r\n\t\tif(this.pseudoTracking && (type == \"mouseover\" || type == \"mouseleave\") && !Object.keys(targets).length){\r\n\t\t\tthis.pseudoMouseLeave(\"none\", e);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfindTargets(path){\r\n\t\tvar targets = {};\r\n\t\t\r\n\t\tlet componentMap = Object.keys(this.componentMap);\r\n\t\t\r\n\t\tfor (let el of path) {\r\n\t\t\tlet classList = el.classList ? [...el.classList] : [];\r\n\t\t\t\r\n\t\t\tlet abort = classList.filter((item) => {\r\n\t\t\t\treturn this.abortClasses.includes(item);\r\n\t\t\t})\r\n\t\t\t\r\n\t\t\tif(abort.length){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlet elTargets = classList.filter((item) => {\r\n\t\t\t\treturn componentMap.includes(item);\r\n\t\t\t})\r\n\t\t\t\r\n\t\t\tfor (let target of elTargets) {\r\n\t\t\t\ttargets[this.componentMap[target]] = el;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(targets.group && targets.group === targets.row){\r\n\t\t\tdelete targets.row;\r\n\t\t}\r\n\t\t\r\n\t\treturn targets;\r\n\t}\r\n\t\r\n\tbindComponents(type, targets){\r\n\t\t//ensure row component is looked up before cell\r\n\t\tvar keys = Object.keys(targets).reverse(),\r\n\t\tlistener = this.listeners[type],\r\n\t\ttargetMatches = {};\r\n\t\t\r\n\t\tfor(let key of keys){\r\n\t\t\tlet component;\r\n\t\t\tlet target = targets[key];\r\n\t\t\tlet previousTarget = this.previousTargets[key];\r\n\t\t\t\r\n\t\t\tif(previousTarget && previousTarget.target === target){\r\n\t\t\t\tcomponent = previousTarget.component;\r\n\t\t\t}else{\r\n\t\t\t\tswitch(key){\r\n\t\t\t\t\tcase \"row\":\r\n\t\t\t\t\tcase \"group\":\r\n\t\t\t\t\tif(listener.components.includes(\"row\") || listener.components.includes(\"cell\") || listener.components.includes(\"group\")){\r\n\t\t\t\t\t\tlet rows = this.table.rowManager.getVisibleRows(true);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcomponent = rows.find((row) => {\r\n\t\t\t\t\t\t\treturn row.getElement() === target;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(targets[\"row\"] && targets[\"row\"].parentNode && targets[\"row\"].parentNode.closest(\".tabulator-row\")){\r\n\t\t\t\t\t\t\ttargets[key] = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"column\":\r\n\t\t\t\t\tif(listener.components.includes(\"column\")){\r\n\t\t\t\t\t\tcomponent = this.table.columnManager.findColumn(target);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"cell\":\r\n\t\t\t\t\tif(listener.components.includes(\"cell\")){\r\n\t\t\t\t\t\tif(targets[\"row\"] instanceof Row){\r\n\t\t\t\t\t\t\tcomponent = targets[\"row\"].findCell(target);\r\n\t\t\t\t\t\t}else{\t\r\n\t\t\t\t\t\t\tif(targets[\"row\"]){\r\n\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?\")\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(component){\r\n\t\t\t\ttargets[key] = component;\r\n\t\t\t\ttargetMatches[key] = {\r\n\t\t\t\t\ttarget:target,\r\n\t\t\t\t\tcomponent:component,\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.previousTargets = targetMatches;\r\n\t\t\r\n\t\treturn targets;\r\n\t}\r\n\t\r\n\ttriggerEvents(type, e, targets){\r\n\t\tvar listener = this.listeners[type];\r\n\t\t\r\n\t\tfor(let key in targets){\r\n\t\t\tif(targets[key] && listener.components.includes(key)){\r\n\t\t\t\tthis.dispatch(key + \"-\" + type, e, targets[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tclearWatchers(){\r\n\t\tfor(let key in this.listeners){\r\n\t\t\tlet listener = this.listeners[key];\r\n\t\t\t\r\n\t\t\tif(listener.handler){\r\n\t\t\t\tthis.el.removeEventListener(key, listener.handler)\r\n\t\t\t\tlistener.handler = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}","export default class ComponentFunctionBinder{\r\n\r\n\tconstructor(table){\r\n\t\tthis.table = table;\r\n\r\n\t\tthis.bindings = {};\r\n\t}\r\n\r\n\tbind(type, funcName, handler){\r\n\t\tif(!this.bindings[type]){\r\n\t\t\tthis.bindings[type] = {};\r\n\t\t}\r\n\r\n\t\tif(this.bindings[type][funcName]){\r\n\t\t\tconsole.warn(\"Unable to bind component handler, a matching function name is already bound\", type, funcName, hanlder)\r\n\t\t}else{\r\n\t\t\tthis.bindings[type][funcName] = handler;\r\n\t\t}\r\n\t}\r\n\r\n\thandle(type, component, name){\r\n\t\tif(this.bindings[type] && this.bindings[type][name]){\r\n\t\t\treturn this.bindings[type][name].bind(null, component);\r\n\t\t}else{\r\n\t\t\tif(name !== \"then\" && typeof name === \"string\" && !name.startsWith(\"_\")){\r\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?\")\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\n\r\nexport default class DataLoader extends CoreFeature{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.loaderElement = this.createLoaderElement(); //loader message div\r\n\t\tthis.msgElement = this.createMsgElement(); //message element\r\n\t\tthis.loadingElement = null;\r\n\t\tthis.errorElement = null;\r\n\r\n\t\tthis.requestOrder = 0; //prevent requests comming out of sequence if overridden by another load request\r\n\t\tthis.loading = false;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tvar template;\r\n\r\n\t\tthis.loaderElement.appendChild(this.msgElement);\r\n\r\n\t\tif(this.table.options.dataLoaderLoading){\r\n\t\t\tif(typeof this.table.options.dataLoaderLoading == \"string\"){\r\n\t\t\t\ttemplate = document.createElement('template');\r\n\t\t\t\ttemplate.innerHTML = this.table.options.dataLoaderLoading.trim();\r\n\t\t\t\tthis.loadingElement = template.firstElementChild;\r\n\t\t\t}else{\r\n\t\t\t\tthis.loadingElement = this.table.options.dataLoaderLoading;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.table.options.dataLoaderError){\r\n\t\t\tif(typeof this.table.options.dataLoaderError == \"string\"){\r\n\t\t\t\ttemplate = document.createElement('template');\r\n\t\t\t\ttemplate.innerHTML = this.table.options.dataLoaderError.trim();\r\n\t\t\t\tthis.errorElement = template.firstElementChild;\r\n\t\t\t}else{\r\n\t\t\t\tthis.errorElement = this.table.options.dataLoaderError;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tcreateLoaderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-loader\");\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateMsgElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-loader-msg\");\r\n\t\tel.setAttribute(\"role\", \"alert\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tload(data, params, config, replace, silent){\r\n\t\tvar requestNo = ++this.requestOrder;\r\n\r\n\t\tthis.dispatchExternal(\"dataLoading\", data);\r\n\r\n\t\t//parse json data to array\r\n\t\tif (data && (data.indexOf(\"{\") == 0 || data.indexOf(\"[\") == 0)){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(this.confirm(\"data-loading\", [data, params, config, silent])){\r\n\t\t\tthis.loading = true;\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.showLoader();\r\n\t\t\t}\r\n\r\n\t\t\t//get params for request\r\n\t\t\tparams = this.chain(\"data-params\", [data, config, silent], params || {}, params || {});\r\n\r\n\t\t\tparams = this.mapParams(params, this.table.options.dataSendParams);\r\n\r\n\t\t\tvar result = this.chain(\"data-load\", [data, params, config, silent], false, Promise.resolve([]));\r\n\t\t\t\r\n\t\t\treturn result.then((response) => {\r\n\t\t\t\tif(!Array.isArray(response) && typeof response == \"object\"){\r\n\t\t\t\t\tresponse = this.mapParams(response, this.objectInvert(this.table.options.dataReceiveParams));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar rowData = this.chain(\"data-loaded\", response, null, response);\r\n\r\n\t\t\t\tif(requestNo == this.requestOrder){\r\n\t\t\t\t\tthis.hideLoader();\r\n\r\n\t\t\t\t\tif(rowData !== false){\r\n\t\t\t\t\t\tthis.dispatchExternal(\"dataLoaded\", rowData);\r\n\t\t\t\t\t\tthis.table.rowManager.setData(rowData, replace, !replace);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\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\");\r\n\t\t\t\t}\r\n\t\t\t}).catch((error) => {\r\n\t\t\t\tconsole.error(\"Data Load Error: \", error);\r\n\t\t\t\tthis.dispatchExternal(\"dataLoadError\", error);\r\n\r\n\t\t\t\tif(!silent){\r\n\t\t\t\t\tthis.showError();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.hideLoader();\r\n\t\t\t\t}, this.table.options.dataLoaderErrorTimeout);\r\n\t\t\t})\r\n\t\t\t.finally(() => {\r\n\t\t\t\tthis.loading = false;\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"dataLoaded\", data);\r\n\r\n\t\t\tif(!data){\r\n\t\t\t\tdata = [];\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.rowManager.setData(data, replace, !replace);\r\n\t\t\treturn Promise.resolve();\r\n\t\t}\r\n\t}\r\n\r\n\tmapParams(params, map){\r\n\t\tvar output = {};\r\n\r\n\t\tfor(let key in params){\r\n\t\t\toutput[map.hasOwnProperty(key) ? map[key] : key] = params[key];\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tobjectInvert(obj){\r\n\t\tvar output = {};\r\n\r\n\t\tfor(let key in obj){\r\n\t\t\toutput[obj[key]] = key;\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tblockActiveLoad(){\r\n\t\tthis.requestOrder++;\r\n\t}\r\n\r\n\tshowLoader(){\r\n\t\tvar shouldLoad = typeof this.table.options.dataLoader === \"function\" ? this.table.options.dataLoader() : this.table.options.dataLoader;\r\n\r\n\t\tif(shouldLoad){\r\n\t\t\tthis.hideLoader();\r\n\r\n\t\t\twhile(this.msgElement.firstChild) this.msgElement.removeChild(this.msgElement.firstChild);\r\n\r\n\t\t\tthis.msgElement.classList.remove(\"tabulator-error\");\r\n\t\t\tthis.msgElement.classList.add(\"tabulator-loading\");\r\n\r\n\t\t\tif(this.loadingElement){\r\n\t\t\t\tthis.msgElement.appendChild(this.loadingElement);\r\n\t\t\t}else{\r\n\t\t\t\tthis.msgElement.innerHTML = this.langText(\"data|loading\");\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.element.appendChild(this.loaderElement);\r\n\t\t}\r\n\t}\r\n\r\n\tshowError(){\r\n\t\tthis.hideLoader();\r\n\r\n\t\twhile(this.msgElement.firstChild) this.msgElement.removeChild(this.msgElement.firstChild);\r\n\t\tthis.msgElement.classList.remove(\"tabulator-loading\");\r\n\t\tthis.msgElement.classList.add(\"tabulator-error\");\r\n\r\n\t\tif(this.errorElement){\r\n\t\t\tthis.msgElement.appendChild(this.errorElement);\r\n\t\t}else{\r\n\t\t\tthis.msgElement.innerHTML = this.langText(\"data|error\");\r\n\t\t}\r\n\r\n\t\tthis.table.element.appendChild(this.loaderElement);\r\n\t}\r\n\r\n\r\n\thideLoader(){\r\n\t\tif(this.loaderElement.parentNode){\r\n\t\t\tthis.loaderElement.parentNode.removeChild(this.loaderElement);\r\n\t\t}\r\n\t}\r\n}","export default class ExternalEventBus {\r\n\r\n\tconstructor(table, optionsList, debug){\r\n\t\tthis.table = table;\r\n\t\tthis.events = {};\r\n\t\tthis.optionsList = optionsList || {};\r\n\t\tthis.subscriptionNotifiers = {};\r\n\r\n\t\tthis.dispatch = debug ? this._debugDispatch.bind(this) : this._dispatch.bind(this);\r\n\t\tthis.debug = debug;\r\n\t}\r\n\r\n\tsubscriptionChange(key, callback){\r\n\t\tif(!this.subscriptionNotifiers[key]){\r\n\t\t\tthis.subscriptionNotifiers[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.subscriptionNotifiers[key].push(callback);\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis._notifiySubscriptionChange(key, true);\r\n\t\t}\r\n\t}\r\n\r\n\tsubscribe(key, callback){\r\n\t\tif(!this.events[key]){\r\n\t\t\tthis.events[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.events[key].push(callback);\r\n\r\n\t\tthis._notifiySubscriptionChange(key, true);\r\n\t}\r\n\r\n\tunsubscribe(key, callback){\r\n\t\tvar index;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tif(callback){\r\n\t\t\t\tindex = this.events[key].findIndex((item) => {\r\n\t\t\t\t\treturn item === callback;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tthis.events[key].splice(index, 1);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Cannot remove event, no matching event found:\", key, callback);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tdelete this.events[key];\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cannot remove event, no events set on:\", key);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._notifiySubscriptionChange(key, false);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.events[key] && this.events[key].length;\r\n\t}\r\n\r\n\t_notifiySubscriptionChange(key, subscribed){\r\n\t\tvar notifiers = this.subscriptionNotifiers[key];\r\n\r\n\t\tif(notifiers){\r\n\t\t\tnotifiers.forEach((callback)=>{\r\n\t\t\t\tcallback(subscribed);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_dispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift(),\r\n\t\tresult;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tthis.events[key].forEach((callback, i) => {\r\n\t\t\t\tlet callResult = callback.apply(this.table, args);\r\n\r\n\t\t\t\tif(!i){\r\n\t\t\t\t\tresult = callResult;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t_debugDispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"ExternalEvent:\" + args[0];\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._dispatch(...arguments)\r\n\t}\r\n}","export default class InternalEventBus {\r\n\r\n\tconstructor(debug){\r\n\t\tthis.events = {};\r\n\t\tthis.subscriptionNotifiers = {};\r\n\r\n\t\tthis.dispatch = debug ? this._debugDispatch.bind(this) : this._dispatch.bind(this);\r\n\t\tthis.chain = debug ? this._debugChain.bind(this) : this._chain.bind(this);\r\n\t\tthis.confirm = debug ? this._debugConfirm.bind(this) : this._confirm.bind(this);\r\n\t\tthis.debug = debug;\r\n\t}\r\n\r\n\tsubscriptionChange(key, callback){\r\n\t\tif(!this.subscriptionNotifiers[key]){\r\n\t\t\tthis.subscriptionNotifiers[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.subscriptionNotifiers[key].push(callback);\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis._notifiySubscriptionChange(key, true);\r\n\t\t}\r\n\t}\r\n\r\n\tsubscribe(key, callback, priority = 10000){\r\n\t\tif(!this.events[key]){\r\n\t\t\tthis.events[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.events[key].push({callback, priority});\r\n\r\n\t\tthis.events[key].sort((a, b) => {\r\n\t\t\treturn a.priority - b.priority;\r\n\t\t});\r\n\r\n\t\tthis._notifiySubscriptionChange(key, true);\r\n\t}\r\n\r\n\tunsubscribe(key, callback){\r\n\t\tvar index;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tif(callback){\r\n\t\t\t\tindex = this.events[key].findIndex((item) => {\r\n\t\t\t\t\treturn item.callback === callback;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tthis.events[key].splice(index, 1);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Cannot remove event, no matching event found:\", key, callback);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cannot remove event, no events set on:\", key);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._notifiySubscriptionChange(key, false);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.events[key] && this.events[key].length;\r\n\t}\r\n\r\n\t_chain(key, args, initialValue, fallback){\r\n\t\tvar value = initialValue;\r\n\r\n\t\tif(!Array.isArray(args)){\r\n\t\t\targs = [args];\r\n\t\t}\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis.events[key].forEach((subscriber, i) => {\r\n\t\t\t\tvalue = subscriber.callback.apply(this, args.concat([value]));\r\n\t\t\t});\r\n\r\n\t\t\treturn value;\r\n\t\t}else{\r\n\t\t\treturn typeof fallback === \"function\" ? fallback() : fallback;\r\n\t\t}\r\n\t}\r\n\r\n\t_confirm(key, args){\r\n\t\tvar confirmed = false;\r\n\r\n\t\tif(!Array.isArray(args)){\r\n\t\t\targs = [args];\r\n\t\t}\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis.events[key].forEach((subscriber, i) => {\r\n\t\t\t\tif(subscriber.callback.apply(this, args)){\r\n\t\t\t\t\tconfirmed = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn confirmed;\r\n\t}\r\n\r\n\t_notifiySubscriptionChange(key, subscribed){\r\n\t\tvar notifiers = this.subscriptionNotifiers[key];\r\n\r\n\t\tif(notifiers){\r\n\t\t\tnotifiers.forEach((callback)=>{\r\n\t\t\t\tcallback(subscribed);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_dispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift();\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tthis.events[key].forEach((subscriber) => {\r\n\t\t\t\tlet callResult = subscriber.callback.apply(this, args);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_debugDispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._dispatch(...arguments);\r\n\t}\r\n\r\n\t_debugChain(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._chain(...arguments);\r\n\t}\r\n\r\n\t_debugConfirm(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._confirm(...arguments);\r\n\t}\r\n}","import Tabulator from '../Tabulator.js';\r\n\r\nclass TableRegistry {\r\n\r\n\tstatic register(table){\r\n\t\tTableRegistry.tables.push(table);\r\n\t}\r\n\r\n\tstatic deregister(table){\r\n\t\tvar index = TableRegistry.tables.indexOf(table);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tTableRegistry.tables.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\tstatic lookupTable(query, silent){\r\n\t\tvar results = [],\r\n\t\tmatches, match;\r\n\r\n\t\tif(typeof query === \"string\"){\r\n\t\t\tmatches = document.querySelectorAll(query);\r\n\r\n\t\t\tif(matches.length){\r\n\t\t\t\tfor(var i = 0; i < matches.length; i++){\r\n\t\t\t\t\tmatch = TableRegistry.matchElement(matches[i]);\r\n\r\n\t\t\t\t\tif(match){\r\n\t\t\t\t\t\tresults.push(match);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}else if((typeof HTMLElement !== \"undefined\" && query instanceof HTMLElement) || query instanceof Tabulator){\r\n\t\t\tmatch = TableRegistry.matchElement(query);\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tresults.push(match);\r\n\t\t\t}\r\n\t\t}else if(Array.isArray(query)){\r\n\t\t\tquery.forEach(function(item){\r\n\t\t\t\tresults = results.concat(TableRegistry.lookupTable(item));\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Table Connection Error - Invalid Selector\", query);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n\r\n\tstatic matchElement(element){\r\n\t\treturn TableRegistry.tables.find(function(table){\r\n\t\t\treturn element instanceof Tabulator ? table === element : table.element === element;\r\n\t\t});\r\n\t}\r\n}\r\n\r\nTableRegistry.tables = [];\r\n\r\nexport default TableRegistry;","//resize columns to fit data they contain\r\nexport default function(columns){\r\n\tthis.table.columnManager.renderer.reinitializeColumnWidths(columns);\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n};","//resize columns to fit data they contain and stretch row to fill table, also used for fitDataTable\r\nexport default function(columns){\r\n\tcolumns.forEach(function(column){\r\n\t\tcolumn.reinitializeWidth();\r\n\t});\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n};","//resize columns to fit data the contain and stretch last column to fill table\r\nexport default function(columns){\r\n\tvar colsWidth = 0,\r\n\ttableWidth = this.table.rowManager.element.clientWidth,\r\n\tgap = 0,\r\n\tlastCol = false;\r\n\r\n\tcolumns.forEach((column, i) => {\r\n\t\tif(!column.widthFixed){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t}\r\n\r\n\t\tif(this.table.options.responsiveLayout ? column.modules.responsive.visible : column.visible){\r\n\t\t\tlastCol = column;\r\n\t\t}\r\n\r\n\t\tif(column.visible){\r\n\t\t\tcolsWidth += column.getWidth();\r\n\t\t}\r\n\t});\r\n\r\n\tif(lastCol){\r\n\t\tgap = tableWidth - colsWidth + lastCol.getWidth();\r\n\r\n\t\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\t\tlastCol.setWidth(0);\r\n\t\t\tthis.table.modules.responsiveLayout.update();\r\n\t\t}\r\n\r\n\t\tif(gap > 0){\r\n\t\t\tlastCol.setWidth(gap);\r\n\t\t}else{\r\n\t\t\tlastCol.reinitializeWidth();\r\n\t\t}\r\n\t}else{\r\n\t\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\t\tthis.table.modules.responsiveLayout.update();\r\n\t\t}\r\n\t}\r\n};","//resize columns to fit\r\nexport default function(columns){\r\n\tvar totalWidth = this.table.element.clientWidth; //table element width\r\n\tvar fixedWidth = 0; //total width of columns with a defined width\r\n\tvar flexWidth = 0; //total width available to flexible columns\r\n\tvar flexGrowUnits = 0; //total number of widthGrow blocks accross all columns\r\n\tvar flexColWidth = 0; //desired width of flexible columns\r\n\tvar flexColumns = []; //array of flexible width columns\r\n\tvar fixedShrinkColumns = []; //array of fixed width columns that can shrink\r\n\tvar flexShrinkUnits = 0; //total number of widthShrink blocks accross all columns\r\n\tvar overflowWidth = 0; //horizontal overflow width\r\n\tvar gapFill=0; //number of pixels to be added to final column to close and half pixel gaps\r\n\r\n\tfunction calcWidth(width){\r\n\t\tvar colWidth;\r\n\r\n\t\tif(typeof(width) == \"string\"){\r\n\t\t\tif(width.indexOf(\"%\") > -1){\r\n\t\t\t\tcolWidth = (totalWidth / 100) * parseInt(width);\r\n\t\t\t}else{\r\n\t\t\t\tcolWidth = parseInt(width);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcolWidth = width;\r\n\t\t}\r\n\r\n\t\treturn colWidth;\r\n\t}\r\n\r\n\t//ensure columns resize to take up the correct amount of space\r\n\tfunction scaleColumns(columns, freeSpace, colWidth, shrinkCols){\r\n\r\n\t\tvar oversizeCols = [],\r\n\t\toversizeSpace = 0,\r\n\t\tremainingSpace = 0,\r\n\t\tnextColWidth = 0,\r\n\t\tremainingFlexGrowUnits = flexGrowUnits,\r\n\t\tgap = 0,\r\n\t\tchangeUnits = 0,\r\n\t\tundersizeCols = [];\r\n\r\n\t\tfunction calcGrow(col){\r\n\t\t\treturn (colWidth * (col.column.definition.widthGrow || 1));\r\n\t\t}\r\n\r\n\t\tfunction calcShrink(col){\r\n\t\t\treturn (calcWidth(col.width) - (colWidth * (col.column.definition.widthShrink || 0)))\r\n\t\t}\r\n\r\n\t\tcolumns.forEach(function(col, i){\r\n\t\t\tvar width = shrinkCols ? calcShrink(col) : calcGrow(col);\r\n\t\t\tif(col.column.minWidth >= width){\r\n\t\t\t\toversizeCols.push(col);\r\n\t\t\t}else{\r\n\t\t\t\tif(col.column.maxWidth && col.column.maxWidth < width){\r\n\t\t\t\t\tcol.width = col.column.maxWidth;\r\n\t\t\t\t\tfreeSpace -= col.column.maxWidth;\r\n\r\n\t\t\t\t\tremainingFlexGrowUnits -= shrinkCols ? (col.column.definition.widthShrink || 1) : (col.column.definition.widthGrow || 1);\r\n\r\n\t\t\t\t\tif(remainingFlexGrowUnits){\r\n\t\t\t\t\t\tcolWidth = Math.floor(freeSpace/remainingFlexGrowUnits);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tundersizeCols.push(col);\r\n\t\t\t\t\tchangeUnits += shrinkCols ? (col.column.definition.widthShrink || 1) : (col.column.definition.widthGrow || 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(oversizeCols.length){\r\n\t\t\toversizeCols.forEach(function(col){\r\n\t\t\t\toversizeSpace += shrinkCols ? col.width - col.column.minWidth : col.column.minWidth;\r\n\t\t\t\tcol.width = col.column.minWidth;\r\n\t\t\t});\r\n\r\n\t\t\tremainingSpace = freeSpace - oversizeSpace;\r\n\r\n\t\t\tnextColWidth = changeUnits ? Math.floor(remainingSpace/changeUnits) : remainingSpace;\r\n\r\n\t\t\tgap = remainingSpace - (nextColWidth * changeUnits);\r\n\r\n\t\t\tgap += scaleColumns(undersizeCols, remainingSpace, nextColWidth, shrinkCols);\r\n\t\t}else{\r\n\t\t\tgap = changeUnits ? freeSpace - (Math.floor(freeSpace/changeUnits) * changeUnits) : freeSpace;\r\n\r\n\t\t\tundersizeCols.forEach(function(column){\r\n\t\t\t\tcolumn.width = shrinkCols ? calcShrink(column) : calcGrow(column);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn gap;\r\n\t}\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n\r\n\t//adjust for vertical scrollbar if present\r\n\tif(this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight){\r\n\t\ttotalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth;\r\n\t}\r\n\r\n\tcolumns.forEach(function(column){\r\n\t\tvar width, minWidth, colWidth;\r\n\r\n\t\tif(column.visible){\r\n\r\n\t\t\twidth = column.definition.width;\r\n\t\t\tminWidth = parseInt(column.minWidth);\r\n\r\n\t\t\tif(width){\r\n\r\n\t\t\t\tcolWidth = calcWidth(width);\r\n\r\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\r\n\r\n\t\t\t\tif(column.definition.widthShrink){\r\n\t\t\t\t\tfixedShrinkColumns.push({\r\n\t\t\t\t\t\tcolumn:column,\r\n\t\t\t\t\t\twidth:colWidth > minWidth ? colWidth : minWidth\r\n\t\t\t\t\t});\r\n\t\t\t\t\tflexShrinkUnits += column.definition.widthShrink;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tflexColumns.push({\r\n\t\t\t\t\tcolumn:column,\r\n\t\t\t\t\twidth:0,\r\n\t\t\t\t});\r\n\t\t\t\tflexGrowUnits += column.definition.widthGrow || 1;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\t//calculate available space\r\n\tflexWidth = totalWidth - fixedWidth;\r\n\r\n\t//calculate correct column size\r\n\tflexColWidth = Math.floor(flexWidth / flexGrowUnits)\r\n\r\n\t//generate column widths\r\n\tvar gapFill = scaleColumns(flexColumns, flexWidth, flexColWidth, false);\r\n\r\n\t//increase width of last column to account for rounding errors\r\n\tif(flexColumns.length && gapFill > 0){\r\n\t\tflexColumns[flexColumns.length-1].width += + gapFill;\r\n\t}\r\n\r\n\t//caculate space for columns to be shrunk into\r\n\tflexColumns.forEach(function(col){\r\n\t\tflexWidth -= col.width;\r\n\t});\r\n\r\n\toverflowWidth = Math.abs(gapFill) + flexWidth;\r\n\r\n\t//shrink oversize columns if there is no available space\r\n\tif(overflowWidth > 0 && flexShrinkUnits){\r\n\t\tgapFill = scaleColumns(fixedShrinkColumns, overflowWidth, Math.floor(overflowWidth / flexShrinkUnits), true);\r\n\t}\r\n\r\n\t//decrease width of last column to account for rounding errors\r\n\tif(fixedShrinkColumns.length){\r\n\t\tfixedShrinkColumns[fixedShrinkColumns.length-1].width -= gapFill;\r\n\t}\r\n\r\n\tflexColumns.forEach(function(col){\r\n\t\tcol.column.setWidth(col.width);\r\n\t});\r\n\r\n\tfixedShrinkColumns.forEach(function(col){\r\n\t\tcol.column.setWidth(col.width);\r\n\t});\r\n};","import fitData from './modes/fitData.js';\r\nimport fitDataGeneral from './modes/fitDataGeneral.js';\r\nimport fitDataStretch from './modes/fitDataStretch.js';\r\nimport fitColumns from './modes/fitColumns.js';\r\n\r\nexport default {\r\n\tfitData:fitData,\r\n\tfitDataFill:fitDataGeneral,\r\n\tfitDataTable:fitDataGeneral,\r\n\tfitDataStretch:fitDataStretch,\r\n\tfitColumns:fitColumns ,\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultModes from './defaults/modes.js';\r\n\r\nclass Layout extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table, \"layout\");\r\n\r\n\t\tthis.mode = null;\r\n\r\n\t\tthis.registerTableOption(\"layout\", \"fitData\"); //layout type\r\n\t\tthis.registerTableOption(\"layoutColumnsOnNewData\", false); //update column widths on setData\r\n\r\n\t\tthis.registerColumnOption(\"widthGrow\");\r\n\t\tthis.registerColumnOption(\"widthShrink\");\r\n\t}\r\n\r\n\t//initialize layout system\r\n\tinitialize(){\r\n\t\tvar layout = this.table.options.layout;\r\n\r\n\t\tif(Layout.modes[layout]){\r\n\t\t\tthis.mode = layout;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Layout Error - invalid mode set, defaulting to 'fitData' : \" + layout);\r\n\t\t\tthis.mode = 'fitData';\r\n\t\t}\r\n\r\n\t\tthis.table.element.setAttribute(\"tabulator-layout\", this.mode);\r\n\t}\r\n\r\n\tgetMode(){\r\n\t\treturn this.mode;\r\n\t}\r\n\r\n\t//trigger table layout\r\n\tlayout(){\r\n\t\tthis.dispatch(\"layout-refreshing\")\r\n\t\tLayout.modes[this.mode].call(this, this.table.columnManager.columnsByIndex);\r\n\r\n\t\tthis.dispatch(\"layout-refreshed\")\r\n\t}\r\n}\r\n\r\nLayout.moduleName = \"layout\";\r\n\r\n//load defaults\r\nLayout.modes = defaultModes;\r\n\r\nexport default Layout;","export default {\r\n\t\"default\":{ //hold default locale text\r\n\t\t\"groups\":{\r\n\t\t\t\"item\":\"item\",\r\n\t\t\t\"items\":\"items\",\r\n\t\t},\r\n\t\t\"columns\":{\r\n\t\t},\r\n\t\t\"data\":{\r\n\t\t\t\"loading\":\"Loading\",\r\n\t\t\t\"error\":\"Error\",\r\n\t\t},\r\n\t\t\"pagination\":{\r\n\t\t\t\"page_size\":\"Page Size\",\r\n\t\t\t\"page_title\":\"Show Page\",\r\n\t\t\t\"first\":\"First\",\r\n\t\t\t\"first_title\":\"First Page\",\r\n\t\t\t\"last\":\"Last\",\r\n\t\t\t\"last_title\":\"Last Page\",\r\n\t\t\t\"prev\":\"Prev\",\r\n\t\t\t\"prev_title\":\"Prev Page\",\r\n\t\t\t\"next\":\"Next\",\r\n\t\t\t\"next_title\":\"Next Page\",\r\n\t\t\t\"all\":\"All\",\r\n\t\t\t\"counter\":{\r\n\t\t\t\t\"showing\": \"Showing\",\r\n\t\t\t\t\"of\": \"of\",\r\n\t\t\t\t\"rows\": \"rows\",\r\n\t\t\t\t\"pages\": \"pages\",\r\n\t\t\t}\r\n\t\t},\r\n\t\t\"headerFilters\":{\r\n\t\t\t\"default\":\"filter column...\",\r\n\t\t\t\"columns\":{}\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defaultLangs from './defaults/langs.js';\r\n\r\nclass Localize extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.locale = \"default\"; //current locale\r\n\t\tthis.lang = false; //current language\r\n\t\tthis.bindings = {}; //update events to call when locale is changed\r\n\t\tthis.langList = {};\r\n\r\n\t\tthis.registerTableOption(\"locale\", false); //current system language\r\n\t\tthis.registerTableOption(\"langs\", {});\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.langList = Helpers.deepClone(Localize.langs);\r\n\r\n\t\tif(this.table.options.columnDefaults.headerFilterPlaceholder !== false){\r\n\t\t\tthis.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder);\r\n\t\t}\r\n\r\n\t\tfor(let locale in this.table.options.langs){\r\n\t\t\tthis.installLang(locale, this.table.options.langs[locale]);\r\n\t\t}\r\n\r\n\t\tthis.setLocale(this.table.options.locale);\r\n\r\n\t\tthis.registerTableFunction(\"setLocale\", this.setLocale.bind(this));\r\n\t\tthis.registerTableFunction(\"getLocale\", this.getLocale.bind(this));\r\n\t\tthis.registerTableFunction(\"getLang\", this.getLang.bind(this));\r\n\t}\r\n\r\n\t//set header placehoder\r\n\tsetHeaderFilterPlaceholder(placeholder){\r\n\t\tthis.langList.default.headerFilters.default = placeholder;\r\n\t}\r\n\r\n\t//set header filter placeholder by column\r\n\tsetHeaderFilterColumnPlaceholder(column, placeholder){\r\n\t\tthis.langList.default.headerFilters.columns[column] = placeholder;\r\n\r\n\t\tif(this.lang && !this.lang.headerFilters.columns[column]){\r\n\t\t\tthis.lang.headerFilters.columns[column] = placeholder;\r\n\t\t}\r\n\t}\r\n\r\n\t//setup a lang description object\r\n\tinstallLang(locale, lang){\r\n\t\tif(this.langList[locale]){\r\n\t\t\tthis._setLangProp(this.langList[locale], lang);\r\n\t\t}else{\r\n\t\t\tthis.langList[locale] = lang;\r\n\t\t}\r\n\t}\r\n\r\n\t_setLangProp(lang, values){\r\n\t\tfor(let key in values){\r\n\t\t\tif(lang[key] && typeof lang[key] == \"object\"){\r\n\t\t\t\tthis._setLangProp(lang[key], values[key])\r\n\t\t\t}else{\r\n\t\t\t\tlang[key] = values[key];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//set current locale\r\n\tsetLocale(desiredLocale){\r\n\t\tdesiredLocale = desiredLocale || \"default\";\r\n\r\n\t\t//fill in any matching languge values\r\n\t\tfunction traverseLang(trans, path){\r\n\t\t\tfor(var prop in trans){\r\n\t\t\t\tif(typeof trans[prop] == \"object\"){\r\n\t\t\t\t\tif(!path[prop]){\r\n\t\t\t\t\t\tpath[prop] = {};\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttraverseLang(trans[prop], path[prop]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tpath[prop] = trans[prop];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//determing correct locale to load\r\n\t\tif(desiredLocale === true && navigator.language){\r\n\t\t\t//get local from system\r\n\t\t\tdesiredLocale = navigator.language.toLowerCase();\r\n\t\t}\r\n\r\n\t\tif(desiredLocale){\r\n\t\t\t//if locale is not set, check for matching top level locale else use default\r\n\t\t\tif(!this.langList[desiredLocale]){\r\n\t\t\t\tlet prefix = desiredLocale.split(\"-\")[0];\r\n\r\n\t\t\t\tif(this.langList[prefix]){\r\n\t\t\t\t\tconsole.warn(\"Localization Error - Exact matching locale not found, using closest match: \", desiredLocale, prefix);\r\n\t\t\t\t\tdesiredLocale = prefix;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Localization Error - Matching locale not found, using default: \", desiredLocale);\r\n\t\t\t\t\tdesiredLocale = \"default\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.locale = desiredLocale;\r\n\r\n\t\t//load default lang template\r\n\t\tthis.lang = Helpers.deepClone(this.langList.default || {});\r\n\r\n\t\tif(desiredLocale != \"default\"){\r\n\t\t\ttraverseLang(this.langList[desiredLocale], this.lang);\r\n\t\t}\r\n\r\n\t\tthis.dispatchExternal(\"localized\", this.locale, this.lang);\r\n\r\n\t\tthis._executeBindings();\r\n\t}\r\n\r\n\t//get current locale\r\n\tgetLocale(locale){\r\n\t\treturn this.locale;\r\n\t}\r\n\r\n\t//get lang object for given local or current if none provided\r\n\tgetLang(locale){\r\n\t\treturn locale ? this.langList[locale] : this.lang;\r\n\t}\r\n\r\n\t//get text for current locale\r\n\tgetText(path, value){\r\n\t\tvar path = value ? path + \"|\" + value : path,\r\n\t\tpathArray = path.split(\"|\"),\r\n\t\ttext = this._getLangElement(pathArray, this.locale);\r\n\r\n\t\t// if(text === false){\r\n\t\t// \tconsole.warn(\"Localization Error - Matching localized text not found for given path: \", path);\r\n\t\t// }\r\n\r\n\t\treturn text || \"\";\r\n\t}\r\n\r\n\t//traverse langs object and find localized copy\r\n\t_getLangElement(path, locale){\r\n\t\tvar root = this.lang;\r\n\r\n\t\tpath.forEach(function(level){\r\n\t\t\tvar rootPath;\r\n\r\n\t\t\tif(root){\r\n\t\t\t\trootPath = root[level];\r\n\r\n\t\t\t\tif(typeof rootPath != \"undefined\"){\r\n\t\t\t\t\troot = rootPath;\r\n\t\t\t\t}else{\r\n\t\t\t\t\troot = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn root;\r\n\t}\r\n\r\n\t//set update binding\r\n\tbind(path, callback){\r\n\t\tif(!this.bindings[path]){\r\n\t\t\tthis.bindings[path] = [];\r\n\t\t}\r\n\r\n\t\tthis.bindings[path].push(callback);\r\n\r\n\t\tcallback(this.getText(path), this.lang);\r\n\t}\r\n\r\n\t//itterate through bindings and trigger updates\r\n\t_executeBindings(){\r\n\t\tfor(let path in this.bindings){\r\n\t\t\tthis.bindings[path].forEach((binding) => {\r\n\t\t\t\tbinding(this.getText(path), this.lang);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}\r\n\r\nLocalize.moduleName = \"localize\";\r\n\r\n//load defaults\r\nLocalize.langs = defaultLangs;\r\n\r\nexport default Localize;","import Module from '../../core/Module.js';\r\nimport TableRegistry from '../../core/tools/TableRegistry.js';\r\n\r\nclass Comms extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"tableComms\", this.receive.bind(this));\r\n\t}\r\n\r\n\tgetConnections(selectors){\r\n\t\tvar connections = [],\r\n\t\tconnection;\r\n\r\n\t\tconnection = TableRegistry.lookupTable(selectors);\r\n\r\n\t\tconnection.forEach((con) =>{\r\n\t\t\tif(this.table !== con){\r\n\t\t\t\tconnections.push(con);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn connections;\r\n\t}\r\n\r\n\tsend(selectors, module, action, data){\r\n\t\tvar connections = this.getConnections(selectors);\r\n\r\n\t\tconnections.forEach((connection) => {\r\n\t\t\tconnection.tableComms(this.table.element, module, action, data);\r\n\t\t});\r\n\r\n\t\tif(!connections.length && selectors){\r\n\t\t\tconsole.warn(\"Table Connection Error - No tables matching selector found\", selectors);\r\n\t\t}\r\n\t}\r\n\r\n\treceive(table, module, action, data){\r\n\t\tif(this.table.modExists(module)){\r\n\t\t\treturn this.table.modules[module].commsReceived(table, action, data);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Inter-table Comms Error - no such module:\", module);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nComms.moduleName = \"comms\";\r\n\r\nexport default Comms;","import * as coreModules from '../modules/core.js';\r\nimport TableRegistry from './TableRegistry.js';\r\n\r\nexport default class ModuleBinder {\r\n\r\n\tconstructor(tabulator, modules){\r\n\t\tthis.bindStaticFuctionality(tabulator);\r\n\t\tthis.bindModules(tabulator, coreModules, true);\r\n\r\n\t\tif(modules){\r\n\t\t\tthis.bindModules(tabulator, modules);\r\n\t\t}\r\n\t}\r\n\r\n\tbindStaticFuctionality(tabulator){\r\n\t\ttabulator.moduleBindings = {};\r\n\r\n\t\ttabulator.extendModule = function(name, property, values){\r\n\t\t\tif(tabulator.moduleBindings[name]){\r\n\t\t\t\tvar source = tabulator.moduleBindings[name][property];\r\n\r\n\t\t\t\tif(source){\r\n\t\t\t\t\tif(typeof values == \"object\"){\r\n\t\t\t\t\t\tfor(let key in values){\r\n\t\t\t\t\t\t\tsource[key] = values[key];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Module Error - Invalid value type, it must be an object\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Module Error - property does not exist:\", property);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Module Error - module does not exist:\", name);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\ttabulator.registerModule = function(modules){\r\n\t\t\tif(!Array.isArray(modules)){\r\n\t\t\t\tmodules = [modules];\r\n\t\t\t}\r\n\r\n\t\t\tmodules.forEach((mod) => {\r\n\t\t\t\ttabulator.registerModuleBinding(mod)\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\ttabulator.registerModuleBinding = function(mod){\r\n\t\t\ttabulator.moduleBindings[mod.moduleName] = mod;\r\n\t\t};\r\n\r\n\t\ttabulator.findTable = function(query){\r\n\t\t\tvar results = TableRegistry.lookupTable(query, true);\r\n\t\t\treturn Array.isArray(results) && !results.length ? false : results;\r\n\t\t}\r\n\r\n\t\t//ensure that module are bound to instantiated function\r\n\t\ttabulator.prototype.bindModules = function(){\r\n\t\t\tvar orderedMods = [],\r\n\t\t\tunOrderedMods = [];\r\n\r\n\t\t\tthis.modules = {};\r\n\r\n\t\t\tfor(var name in tabulator.moduleBindings){\r\n\t\t\t\tlet mod = tabulator.moduleBindings[name];\r\n\t\t\t\tlet module = new mod(this);\r\n\r\n\t\t\t\tthis.modules[name] = module;\r\n\r\n\t\t\t\tif(mod.prototype.moduleCore){\r\n\t\t\t\t\tthis.modulesCore.push(module);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(mod.moduleInitOrder){\r\n\t\t\t\t\t\torderedMods.push(module);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tunOrderedMods.push(module);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\torderedMods.sort((a, b) => a.moduleInitOrder > b.moduleInitOrder ? 1 : -1);\r\n\r\n\t\t\tthis.modulesRegular = orderedMods.concat(unOrderedMods);\r\n\t\t}\r\n\t}\r\n\r\n\tbindModules(tabulator, modules, core){\r\n\t\tvar mods = Object.values(modules);\r\n\r\n\t\tif(core){\r\n\t\t\tmods.forEach((mod) => {\r\n\t\t\t\tmod.prototype.moduleCore = true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\ttabulator.registerModule(mods);\r\n\t}\r\n}","'use strict';\r\n\r\nimport defaultOptions from './defaults/options.js';\r\n\r\nimport ColumnManager from './ColumnManager.js';\r\nimport RowManager from './RowManager.js';\r\nimport FooterManager from './FooterManager.js';\r\n\r\nimport InteractionMonitor from './tools/InteractionMonitor.js';\r\nimport ComponentFunctionBinder from './tools/ComponentFunctionBinder.js';\r\nimport DataLoader from './tools/DataLoader.js';\r\n\r\nimport ExternalEventBus from './tools/ExternalEventBus.js';\r\nimport InternalEventBus from './tools/InternalEventBus.js';\r\n\r\nimport TableRegistry from './tools/TableRegistry.js';\r\nimport ModuleBinder from './tools/ModuleBinder.js';\r\n\r\nimport OptionsList from './tools/OptionsList.js';\r\n\r\nclass Tabulator {\r\n\r\n\tconstructor(element, options){\r\n\r\n\t\tthis.options = {};\r\n\r\n\t\tthis.columnManager = null; // hold Column Manager\r\n\t\tthis.rowManager = null; //hold Row Manager\r\n\t\tthis.footerManager = null; //holder Footer Manager\r\n\t\tthis.vdomHoz = null; //holder horizontal virtual dom\r\n\t\tthis.externalEvents = null; //handle external event messaging\r\n\t\tthis.eventBus = null; //handle internal event messaging\r\n\t\tthis.interactionMonitor = false; //track user interaction\r\n\t\tthis.browser = \"\"; //hold current browser type\r\n\t\tthis.browserSlow = false; //handle reduced functionality for slower browsers\r\n\t\tthis.browserMobile = false; //check if running on mobile, prevent resize cancelling edit on keyboard appearance\r\n\t\tthis.rtl = false; //check if the table is in RTL mode\r\n\t\tthis.originalElement = null; //hold original table element if it has been replaced\r\n\r\n\t\tthis.componentFunctionBinder = new ComponentFunctionBinder(this); //bind component functions\r\n\t\tthis.dataLoader = false; //bind component functions\r\n\r\n\t\tthis.modules = {}; //hold all modules bound to this table\r\n\t\tthis.modulesCore = []; //hold core modules bound to this table (for initialization purposes)\r\n\t\tthis.modulesRegular = []; //hold regular modules bound to this table (for initialization purposes)\r\n\r\n\t\tthis.optionsList = new OptionsList(this, \"table constructor\");\r\n\r\n\t\tthis.initialized = false;\r\n\r\n\t\tif(this.initializeElement(element)){\r\n\r\n\t\t\tthis.initializeCoreSystems(options);\r\n\r\n\t\t\t//delay table creation to allow event bindings immediately after the constructor\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis._create();\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tTableRegistry.register(this); //register table for inter-device communication\r\n\t}\r\n\r\n\tinitializeElement(element){\r\n\t\tif(typeof HTMLElement !== \"undefined\" && element instanceof HTMLElement){\r\n\t\t\tthis.element = element;\r\n\t\t\treturn true;\r\n\t\t}else if(typeof element === \"string\"){\r\n\t\t\tthis.element = document.querySelector(element);\r\n\r\n\t\t\tif(this.element){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Tabulator Creation Error - no element found matching selector: \", element);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Tabulator Creation Error - Invalid element provided:\", element);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeCoreSystems(options){\r\n\t\tthis.columnManager = new ColumnManager(this);\r\n\t\tthis.rowManager = new RowManager(this);\r\n\t\tthis.footerManager = new FooterManager(this);\r\n\t\tthis.dataLoader = new DataLoader(this);\r\n\r\n\t\tthis.bindModules();\r\n\r\n\t\tthis.options = this.optionsList.generate(Tabulator.defaultOptions, options)\r\n\r\n\t\tthis._clearObjectPointers();\r\n\r\n\t\tthis._mapDeprecatedFunctionality();\r\n\r\n\t\tthis.externalEvents = new ExternalEventBus(this, this.options, this.options.debugEventsExternal);\r\n\t\tthis.eventBus = new InternalEventBus(this.options.debugEventsInternal);\r\n\r\n\t\tthis.interactionMonitor = new InteractionMonitor(this);\r\n\r\n\t\tthis.dataLoader.initialize();\r\n\t\t// this.columnManager.initialize();\r\n\t\t// this.rowManager.initialize();\r\n\t\tthis.footerManager.initialize();\r\n\t}\r\n\r\n\t//convert deprecated functionality to new functions\r\n\t_mapDeprecatedFunctionality(){\r\n\t\t//all previously deprecated functionality removed in the 5.0 release\r\n\t}\r\n\r\n\t_clearSelection(){\r\n\r\n\t\tthis.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tif (window.getSelection) {\r\n\t\t if (window.getSelection().empty) { // Chrome\r\n\t\t \twindow.getSelection().empty();\r\n\t\t } else if (window.getSelection().removeAllRanges) { // Firefox\r\n\t\t \twindow.getSelection().removeAllRanges();\r\n\t\t }\r\n\t\t} else if (document.selection) { // IE?\r\n\t\t\tdocument.selection.empty();\r\n\t\t}\r\n\r\n\t\tthis.element.classList.remove(\"tabulator-block-select\");\r\n\t}\r\n\r\n\t//create table\r\n\t_create(){\r\n\t\tthis.externalEvents.dispatch(\"tableBuilding\");\r\n\t\tthis.eventBus.dispatch(\"table-building\");\r\n\r\n\t\tthis._rtlCheck();\r\n\r\n\t\tthis._buildElement();\r\n\r\n\t\tthis._initializeTable();\r\n\r\n\t\tthis._loadInitialData();\r\n\r\n\t\tthis.initialized = true;\r\n\r\n\t\tthis.externalEvents.dispatch(\"tableBuilt\");\r\n\t}\r\n\r\n\t_rtlCheck(){\r\n\t\tvar style = window.getComputedStyle(this.element);\r\n\r\n\t\tswitch(this.options.textDirection){\r\n\t\t\tcase\"auto\":\r\n\t\t\tif(style.direction !== \"rtl\"){\r\n\t\t\t\tbreak;\r\n\t\t\t};\r\n\r\n\t\t\tcase \"rtl\":\r\n\t\t\tthis.element.classList.add(\"tabulator-rtl\");\r\n\t\t\tthis.rtl = true;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"ltr\":\r\n\t\t\tthis.element.classList.add(\"tabulator-ltr\");\r\n\r\n\t\t\tdefault:\r\n\t\t\tthis.rtl = false;\r\n\t\t}\r\n\t}\r\n\r\n\t//clear pointers to objects in default config object\r\n\t_clearObjectPointers(){\r\n\t\tthis.options.columns = this.options.columns.slice(0);\r\n\r\n\t\tif(Array.isArray(this.options.data) && !this.options.reactiveData){\r\n\t\t\tthis.options.data = this.options.data.slice(0);\r\n\t\t}\r\n\t}\r\n\r\n\t//build tabulator element\r\n\t_buildElement(){\r\n\t\tvar element = this.element,\r\n\t\toptions = this.options,\r\n\t\tnewElement;\r\n\r\n\t\tif(element.tagName === \"TABLE\"){\r\n\t\t\tthis.originalElement = this.element;\r\n\t\t\tnewElement = document.createElement(\"div\");\r\n\r\n\t\t\t//transfer attributes to new element\r\n\t\t\tvar attributes = element.attributes;\r\n\r\n\t\t\t// loop through attributes and apply them on div\r\n\t\t\tfor(var i in attributes){\r\n\t\t\t\tif(typeof attributes[i] == \"object\"){\r\n\t\t\t\t\tnewElement.setAttribute(attributes[i].name, attributes[i].value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// replace table with div element\r\n\t\t\telement.parentNode.replaceChild(newElement, element);\r\n\r\n\t\t\tthis.element = element = newElement;\r\n\t\t}\r\n\r\n\t\telement.classList.add(\"tabulator\");\r\n\t\telement.setAttribute(\"role\", \"grid\");\r\n\r\n\t\t//empty element\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\t//set table height\r\n\t\tif(options.height){\r\n\t\t\toptions.height = isNaN(options.height) ? options.height : options.height + \"px\";\r\n\t\t\telement.style.height = options.height;\r\n\t\t}\r\n\r\n\t\t//set table min height\r\n\t\tif(options.minHeight !== false){\r\n\t\t\toptions.minHeight = isNaN(options.minHeight) ? options.minHeight : options.minHeight + \"px\";\r\n\t\t\telement.style.minHeight = options.minHeight;\r\n\t\t}\r\n\r\n\t\t//set table maxHeight\r\n\t\tif(options.maxHeight !== false){\r\n\t\t\toptions.maxHeight = isNaN(options.maxHeight) ? options.maxHeight : options.maxHeight + \"px\";\r\n\t\t\telement.style.maxHeight = options.maxHeight;\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize core systems and modules\r\n\t_initializeTable(){\r\n\t\tvar element = this.element,\r\n\t\toptions = this.options;\r\n\r\n\t\tthis.interactionMonitor.initialize();\r\n\r\n\t\tthis.columnManager.initialize();\r\n\t\tthis.rowManager.initialize();\r\n\r\n\t\tthis._detectBrowser();\r\n\r\n\t\t//initialize core modules\r\n\t\tthis.modulesCore.forEach((mod) => {\r\n\t\t\tmod.initialize();\r\n\t\t})\r\n\r\n\t\t//build table elements\r\n\t\telement.appendChild(this.columnManager.getElement());\r\n\t\telement.appendChild(this.rowManager.getElement());\r\n\r\n\t\tif(options.footerElement){\r\n\t\t\tthis.footerManager.activate();\r\n\t\t}\r\n\r\n\t\tif(options.autoColumns && options.data){\r\n\r\n\t\t\tthis.columnManager.generateColumnsFromRowData(this.options.data);\r\n\t\t}\r\n\r\n\t\t//initialize regular modules\r\n\t\tthis.modulesRegular.forEach((mod) => {\r\n\t\t\tmod.initialize();\r\n\t\t});\r\n\r\n\t\tthis.columnManager.setColumns(options.columns);\r\n\r\n\t\tthis.eventBus.dispatch(\"table-built\");\r\n\t}\r\n\r\n\t_loadInitialData(){\r\n\t\tthis.dataLoader.load(this.options.data);\r\n\t}\r\n\r\n\t//deconstructor\r\n\tdestroy(){\r\n\t\tvar element = this.element;\r\n\r\n\t\tTableRegistry.deregister(this); //deregister table from inter-device communication\r\n\r\n\t\tthis.eventBus.dispatch(\"table-destroy\");\r\n\r\n\t\t//clear row data\r\n\t\tthis.rowManager.rows.forEach(function(row){\r\n\t\t\trow.wipe();\r\n\t\t});\r\n\r\n\t\tthis.rowManager.rows = [];\r\n\t\tthis.rowManager.activeRows = [];\r\n\t\tthis.rowManager.displayRows = [];\r\n\r\n\t\t//clear DOM\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\t\telement.classList.remove(\"tabulator\");\r\n\t}\r\n\r\n\t_detectBrowser(){\r\n\t\tvar ua = navigator.userAgent||navigator.vendor||window.opera;\r\n\r\n\t\tif(ua.indexOf(\"Trident\") > -1){\r\n\t\t\tthis.browser = \"ie\";\r\n\t\t\tthis.browserSlow = true;\r\n\t\t}else if(ua.indexOf(\"Edge\") > -1){\r\n\t\t\tthis.browser = \"edge\";\r\n\t\t\tthis.browserSlow = true;\r\n\t\t}else if(ua.indexOf(\"Firefox\") > -1){\r\n\t\t\tthis.browser = \"firefox\";\r\n\t\t\tthis.browserSlow = false;\r\n\t\t}else{\r\n\t\t\tthis.browser = \"other\";\r\n\t\t\tthis.browserSlow = false;\r\n\t\t}\r\n\r\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));\r\n\t}\r\n\r\n\t////////////////// Data Handling //////////////////\r\n\t//block table redrawing\r\n\tblockRedraw(){\r\n\t\treturn this.rowManager.blockRedraw();\r\n\t}\r\n\r\n\t//restore table redrawing\r\n\trestoreRedraw(){\r\n\t\treturn this.rowManager.restoreRedraw();\r\n\t}\r\n\r\n\t//load data\r\n\tsetData(data, params, config){\r\n\t\tif(this.initialized){\r\n\t\t\treturn this.dataLoader.load(data, params, config, false);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"setData failed - table not yet initialized. To set initial data please use the 'data' property in the table constructor.\")\r\n\t\t}\r\n\t}\r\n\r\n\t//clear data\r\n\tclearData(){\r\n\t\tthis.dataLoader.blockActiveLoad();\r\n\t\tthis.rowManager.clearData();\r\n\t}\r\n\r\n\t//get table data array\r\n\tgetData(active){\r\n\t\treturn this.rowManager.getData(active);\r\n\t}\r\n\r\n\t//get table data array count\r\n\tgetDataCount(active){\r\n\t\treturn this.rowManager.getDataCount(active);\r\n\t}\r\n\r\n\t//replace data, keeping table in position with same sort\r\n\treplaceData(data, params, config){\r\n\t\tif(this.initialized){\r\n\t\t\treturn this.dataLoader.load(data, params, config, true, true);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"replaceData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update table data\r\n\tupdateData(data){\r\n\t\tvar responses = 0;\r\n\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\tresponses++;\r\n\r\n\t\t\t\t\t\t\trow.updateData(item)\r\n\t\t\t\t\t\t\t.then(()=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"updateData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\taddData(data, pos, index){\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tthis.rowManager.addRows(data, pos, index)\r\n\t\t\t\t\t.then((rows) => {\r\n\t\t\t\t\t\tvar output = [];\r\n\r\n\t\t\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\t\t\toutput.push(row.getComponent());\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tresolve(output);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"addData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update table data\r\n\tupdateOrAddData(data){\r\n\t\tvar rows = [],\r\n\t\tresponses = 0;\r\n\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\r\n\t\t\t\t\t\tresponses++;\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.updateData(item)\r\n\t\t\t\t\t\t\t.then(()=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\t\t\t\t\t\t\t\trows.push(row.getComponent());\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve(rows);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.rowManager.addRows(item)\r\n\t\t\t\t\t\t\t.then((newRows)=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\t\t\t\t\t\t\t\trows.push(newRows[0].getComponent());\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve(rows);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"updateOrAddData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//get row object\r\n\tgetRow(index){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching row found:\", index);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//get row object\r\n\tgetRowFromPosition(position, active){\r\n\t\tvar row = this.rowManager.getRowFromPosition(position, active);\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching row found:\", position);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//delete row from table\r\n\tdeleteRow(index){\r\n\t\tvar foundRows = [];\r\n\r\n\t\tif(!Array.isArray(index)){\r\n\t\t\tindex = [index];\r\n\t\t}\r\n\r\n\t\t//find matching rows\r\n\t\tfor(let item of index){\r\n\t\t\tlet row = this.rowManager.findRow(item, true);\r\n\r\n\t\t\tif(row){\r\n\t\t\t\tfoundRows.push(row);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Delete Error - No matching row found:\", item);\r\n\t\t\t\treturn Promise.reject(\"Delete Error - No matching row found\")\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//sort rows into correct order to ensure smooth delete from table\r\n\t\tfoundRows.sort((a, b) => {\r\n\t\t\treturn this.rowManager.rows.indexOf(a) > this.rowManager.rows.indexOf(b) ? 1 : -1;\r\n\t\t});\r\n\r\n\t\t//delete rows\r\n\t\tfoundRows.forEach((row) =>{\r\n\t\t\trow.delete()\r\n\t\t});\r\n\r\n\t\tthis.rowManager.reRenderInPosition();\r\n\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\r\n\t//add row to table\r\n\taddRow(data, pos, index){\r\n\t\tif(this.initialized){\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\r\n\t\t\treturn this.rowManager.addRows(data, pos, index)\r\n\t\t\t.then((rows)=>{\r\n\t\t\t\treturn rows[0].getComponent();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"addRow failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update a row if it exitsts otherwise create it\r\n\tupdateOrAddRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t.then(()=>{\r\n\t\t\t\treturn row.getComponent();\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\treturn this.rowManager.addRows(data)\r\n\t\t\t.then((rows)=>{\r\n\t\t\t\treturn rows[0].getComponent();\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\t//update row data\r\n\tupdateRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t.then(()=>{\r\n\t\t\t\treturn Promise.resolve(row.getComponent());\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Update Error - No matching row found:\", index);\r\n\t\t\treturn Promise.reject(\"Update Error - No matching row found\");\r\n\t\t}\r\n\t}\r\n\r\n\t//scroll to row in DOM\r\n\tscrollToRow(index, position, ifVisible){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn this.rowManager.scrollToRow(row, position, ifVisible)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Scroll Error - No matching row found:\", index);\r\n\t\t\treturn Promise.reject(\"Scroll Error - No matching row found\");\r\n\t\t}\r\n\t}\r\n\r\n\tmoveRow(from, to, after){\r\n\t\tvar fromRow = this.rowManager.findRow(from);\r\n\r\n\t\tif(fromRow){\r\n\t\t\tfromRow.moveToRow(to, after);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching row found:\", from);\r\n\t\t}\r\n\t}\r\n\r\n\tgetRows(active){\r\n\t\treturn this.rowManager.getComponents(active);\r\n\t}\r\n\r\n\t//get position of row in table\r\n\tgetRowPosition(index, active){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn this.rowManager.getRowPosition(row, active);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Position Error - No matching row found:\", index);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t/////////////// Column Functions ///////////////\r\n\tsetColumns(definition){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.columnManager.setColumns(definition);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"setColumns failed - table not yet initialized. To set initial data please use the 'columns' property in the table constructor.\")\r\n\t\t}\r\n\t}\r\n\r\n\tgetColumns(structured){\r\n\t\treturn this.columnManager.getComponents(structured);\r\n\t}\r\n\r\n\tgetColumn(field){\r\n\t\tvar col = this.columnManager.findColumn(field);\r\n\r\n\t\tif(col){\r\n\t\t\treturn col.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tgetColumnDefinitions(){\r\n\t\treturn this.columnManager.getDefinitionTree();\r\n\t}\r\n\r\n\tshowColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tcolumn.show();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Show Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\thideColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tcolumn.hide();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Hide Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\ttoggleColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tif(column.visible){\r\n\t\t\t\tcolumn.hide();\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.show();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Visibility Toggle Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\taddColumn(definition, before, field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\treturn this.columnManager.addColumn(definition, before, column)\r\n\t\t.then((column) => {\r\n\t\t\treturn column.getComponent();\r\n\t\t});\r\n\t}\r\n\r\n\tdeleteColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn column.delete();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Delete Error - No matching column found:\", field);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\r\n\tupdateColumnDefinition(field, definition){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn column.updateDefinition(definition)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Update Error - No matching column found:\", field);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\r\n\tmoveColumn(from, to, after){\r\n\t\tvar fromColumn = this.columnManager.findColumn(from);\r\n\t\tvar toColumn = this.columnManager.findColumn(to);\r\n\r\n\t\tif(fromColumn){\r\n\t\t\tif(toColumn){\r\n\t\t\t\tthis.columnManager.moveColumn(fromColumn, toColumn, after)\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Move Error - No matching column found:\", toColumn);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching column found:\", from);\r\n\t\t}\r\n\t}\r\n\r\n\t//scroll to column in DOM\r\n\tscrollToColumn(field, position, ifVisible){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\t\tif(column){\r\n\t\t\t\treturn this.columnManager.scrollToColumn(column, position, ifVisible)\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - No matching column found:\", field);\r\n\t\t\t\treturn Promise.reject(\"Scroll Error - No matching column found\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//////////// General Public Functions ////////////\r\n\t//redraw list without updating data\r\n\tredraw(force){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.columnManager.redraw(force);\r\n\t\t\tthis.rowManager.redraw(force);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"redraw failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\tsetHeight(height){\r\n\t\tthis.options.height = isNaN(height) ? height : height + \"px\";\r\n\t\tthis.element.style.height = this.options.height;\r\n\t\tthis.rowManager.initializeRenderer();\r\n\t\tthis.rowManager.redraw();\r\n\t}\r\n\r\n\t//////////////////// Event Bus ///////////////////\r\n\r\n\ton(key, callback){\r\n\t\tthis.externalEvents.subscribe(key, callback);\r\n\t}\r\n\r\n\toff(key, callback){\r\n\t\tthis.externalEvents.unsubscribe(key, callback);\r\n\t}\r\n\r\n\tdispatchEvent(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift();\r\n\r\n\t\tthis.externalEvents.dispatch(...arguments)\r\n\t}\r\n\r\n\t////////////// Extension Management //////////////\r\n\tmodExists(plugin, required){\r\n\t\tif(this.modules[plugin]){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tif(required){\r\n\t\t\t\tconsole.error(\"Tabulator Module Not Installed: \" + plugin);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tmodule(key){\r\n\t\tvar mod = this.modules[key];\r\n\r\n\t\tif(!mod){\r\n\t\t\tconsole.error(\"Tabulator module not installed: \" + key);\r\n\t\t}\r\n\r\n\t\treturn mod;\r\n\t}\r\n}\r\n\r\n//default setup options\r\nTabulator.defaultOptions = defaultOptions;\r\n\r\n//bind modules and static functionality\r\nnew ModuleBinder(Tabulator);\r\n\r\nexport default Tabulator;\r\n","//tabulator with all modules installed\r\nimport {default as Tabulator} from './Tabulator.js';\r\nimport * as modules from '../core/modules/optional.js';\r\nimport ModuleBinder from './tools/ModuleBinder.js';\r\n\r\nclass TabulatorFull extends Tabulator {};\r\n\r\n//bind modules and static functionality\r\nnew ModuleBinder(TabulatorFull, modules);\r\n\r\nexport default TabulatorFull;","export default class PseudoRow {\r\n\r\n\tconstructor (type){\r\n\t\tthis.type = type;\r\n\t\tthis.element = this._createElement();\r\n\t}\r\n\r\n\t_createElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\treturn el;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tgetComponent(){\r\n\t\treturn false;\r\n\t}\r\n\r\n\tgetData(){\r\n\t\treturn {};\r\n\t}\r\n\r\n\tgetHeight(){\r\n\t\treturn this.element.outerHeight;\r\n\t}\r\n\r\n\tinitialize(){}\r\n\r\n\treinitialize(){}\r\n\r\n\tnormalizeHeight(){}\r\n\r\n\tgenerateCells(){}\r\n\r\n\treinitializeHeight(){}\r\n\r\n\tcalcHeight(){}\r\n\r\n\tsetCellHeight(){}\r\n\r\n\tclearCellHeight(){}\r\n}"],"names":["generateParamsList","defaultOptions","RowComponent","html","textarea","tickCross","star","progress","csv","json","datetime","number","RendererVirtualDomHorizontal","RendererBasicHorizontal","RendererVirtualDomVertical","RendererBasicVertical","InteractionMonitor"],"mappings":";AAAe,MAAM,WAAW;AAChC;AACA,CAAC,WAAW,CAAC,KAAK,CAAC;AACnB,EAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;AACrB,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC;AACzB,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;AACnF,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,CAAC,QAAQ,EAAE;AACX,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC,CAAC;AAC3D,EAAE;AACF;AACA,CAAC,QAAQ,EAAE;AACX,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC;AACxD,EAAE;AACF;AACA,CAAC,UAAU,EAAE;AACb,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,CAAC;AAC7D,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gBAAgB,EAAE;AACnB,EAAE,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E;AACf,EAAE,OAAO,KAAK,CAAC;AACf,EAAE;AACF;AACA,CAAC,OAAO,EAAE;AACV,EAAE,OAAO,EAAE,CAAC;AACZ,EAAE;AACF;AACA,CAAC,SAAS,EAAE;AACZ,EAAE,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;AAClC,EAAE;AACF;AACA,CAAC,UAAU,EAAE,EAAE;AACf;AACA,CAAC,YAAY,EAAE,EAAE;AACjB;AACA,CAAC,eAAe,EAAE,EAAE;AACpB;AACA,CAAC,aAAa,EAAE,EAAE;AAClB;AACA,CAAC,kBAAkB,EAAE,EAAE;AACvB;AACA,CAAC,UAAU,EAAE,EAAE;AACf;AACA,CAAC,aAAa,EAAE,EAAE;AAClB;AACA,CAAC,eAAe,EAAE,EAAE;AACpB;;"} \ No newline at end of file +{"version":3,"file":"tabulator_esm.js","sources":["../../src/js/core/CoreFeature.js","../../src/js/core/Module.js","../../src/js/core/tools/Helpers.js","../../src/js/modules/Accessor/defaults/accessors.js","../../src/js/modules/Accessor/Accessor.js","../../src/js/modules/Ajax/defaults/config.js","../../src/js/modules/Ajax/defaults/urlGenerator.js","../../src/js/modules/Ajax/defaults/loaderPromise.js","../../src/js/modules/Ajax/defaults/contentTypeFormatters.js","../../src/js/modules/Ajax/Ajax.js","../../src/js/modules/Clipboard/defaults/pasteActions.js","../../src/js/modules/Clipboard/defaults/pasteParsers.js","../../src/js/modules/Clipboard/Clipboard.js","../../src/js/modules/ColumnCalcs/CalcComponent.js","../../src/js/core/cell/CellComponent.js","../../src/js/core/cell/Cell.js","../../src/js/core/column/ColumnComponent.js","../../src/js/core/column/defaults/options.js","../../src/js/core/column/Column.js","../../src/js/core/row/RowComponent.js","../../src/js/core/row/Row.js","../../src/js/modules/ColumnCalcs/defaults/calculations.js","../../src/js/modules/ColumnCalcs/ColumnCalcs.js","../../src/js/modules/DataTree/DataTree.js","../../src/js/modules/Download/defaults/downloaders/csv.js","../../src/js/modules/Download/defaults/downloaders/json.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/defaults/downloaders/jsonLines.js","../../src/js/modules/Download/defaults/downloaders.js","../../src/js/modules/Download/Download.js","../../src/js/modules/Edit/inputMask.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/select.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/defaults/editors.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/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/defaults/formatters.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/defaults/undoers.js","../../src/js/modules/History/defaults/redoers.js","../../src/js/modules/History/History.js","../../src/js/modules/HtmlTableImport/HtmlTableImport.js","../../src/js/modules/Import/defaults/importers/csv.js","../../src/js/modules/Import/defaults/importers/json.js","../../src/js/modules/Import/defaults/importers.js","../../src/js/modules/Import/Import.js","../../src/js/modules/Interaction/Interaction.js","../../src/js/modules/Keybindings/defaults/bindings.js","../../src/js/modules/Keybindings/defaults/actions.js","../../src/js/modules/Keybindings/Keybindings.js","../../src/js/modules/Menu/Menu.js","../../src/js/modules/MoveColumns/MoveColumns.js","../../src/js/modules/MoveRows/MoveRows.js","../../src/js/modules/Mutator/defaults/mutators.js","../../src/js/modules/Mutator/Mutator.js","../../src/js/modules/Page/defaults/pageCounters/rows.js","../../src/js/modules/Page/defaults/pageCounters/pages.js","../../src/js/modules/Page/defaults/pageCounters.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/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/number.js","../../src/js/modules/Sort/defaults/sorters/string.js","../../src/js/modules/Sort/defaults/sorters/datetime.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/defaults/sorters.js","../../src/js/modules/Sort/Sort.js","../../src/js/modules/Validate/defaults/validators.js","../../src/js/modules/Validate/Validate.js","../../src/js/core/defaults/options.js","../../src/js/core/tools/OptionsList.js","../../src/js/core/rendering/Renderer.js","../../src/js/core/rendering/renderers/BasicHorizontal.js","../../src/js/core/rendering/renderers/VirtualDomHorizontal.js","../../src/js/core/ColumnManager.js","../../src/js/core/rendering/renderers/BasicVertical.js","../../src/js/core/rendering/renderers/VirtualDomVertical.js","../../src/js/core/RowManager.js","../../src/js/core/FooterManager.js","../../src/js/core/tools/InteractionMonitor.js","../../src/js/core/tools/ComponentFunctionBinder.js","../../src/js/core/tools/DataLoader.js","../../src/js/core/tools/ExternalEventBus.js","../../src/js/core/tools/InternalEventBus.js","../../src/js/core/tools/TableRegistry.js","../../src/js/modules/Layout/defaults/modes/fitData.js","../../src/js/modules/Layout/defaults/modes/fitDataGeneral.js","../../src/js/modules/Layout/defaults/modes/fitDataStretch.js","../../src/js/modules/Layout/defaults/modes/fitColumns.js","../../src/js/modules/Layout/defaults/modes.js","../../src/js/modules/Layout/Layout.js","../../src/js/modules/Localize/defaults/langs.js","../../src/js/modules/Localize/Localize.js","../../src/js/modules/Comms/Comms.js","../../src/js/core/tools/ModuleBinder.js","../../src/js/core/Tabulator.js","../../src/js/core/TabulatorFull.js","../../src/js/core/row/PseudoRow.js"],"sourcesContent":["export default class CoreFeature{\r\n\r\n\tconstructor(table){\r\n\t\tthis.table = table;\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t/////////////// DataLoad /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\treloadData(data, silent){\r\n\t\treturn this.table.dataLoader.load(data, undefined, undefined, undefined, silent);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t///////////// Localization ///////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tlangText(){\r\n\t\treturn this.table.modules.localize.getText(...arguments);\r\n\t}\r\n\r\n\tlangBind(){\r\n\t\treturn this.table.modules.localize.bind(...arguments);\r\n\t}\r\n\r\n\tlangLocale(){\r\n\t\treturn this.table.modules.localize.getLocale(...arguments);\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t////////// Inter Table Comms /////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tcommsConnections(){\r\n\t\treturn this.table.modules.comms.getConnections(...arguments);\r\n\t}\r\n\r\n\tcommsSend(){\r\n\t\treturn this.table.modules.comms.send(...arguments);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Layout /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tlayoutMode(){\r\n\t\treturn this.table.modules.layout.getMode();\r\n\t}\r\n\r\n\tlayoutRefresh(){\r\n\t\treturn this.table.modules.layout.layout();\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t/////////////// Event Bus ////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tsubscribe(){\r\n\t\treturn this.table.eventBus.subscribe(...arguments);\r\n\t}\r\n\r\n\tunsubscribe(){\r\n\t\treturn this.table.eventBus.unsubscribe(...arguments);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.table.eventBus.subscribed(key);\r\n\t}\r\n\r\n\tsubscriptionChange(){\r\n\t\treturn this.table.eventBus.subscriptionChange(...arguments);\r\n\t}\r\n\r\n\tdispatch(){\r\n\t\treturn this.table.eventBus.dispatch(...arguments);\r\n\t}\r\n\r\n\tchain(){\r\n\t\treturn this.table.eventBus.chain(...arguments);\r\n\t}\r\n\r\n\tconfirm(){\r\n\t\treturn this.table.eventBus.confirm(...arguments);\r\n\t}\r\n\r\n\tdispatchExternal(){\r\n\t\treturn this.table.externalEvents.dispatch(...arguments);\r\n\t}\r\n\r\n\tsubscribedExternal(key){\r\n\t\treturn this.table.externalEvents.subscribed(key);\r\n\t}\r\n\r\n\tsubscriptionChangeExternal(){\r\n\t\treturn this.table.externalEvents.subscriptionChange(...arguments);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Options /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\toptions(key){\r\n\t\treturn this.table.options[key];\r\n\t}\r\n\r\n\tsetOption(key, value){\r\n\t\tif(typeof value !== \"undefined\"){\r\n\t\t\tthis.table.options[key] = value;\r\n\t\t}\r\n\r\n\t\treturn this.table.options[key];\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Modules /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tmodule(key){\r\n\t\treturn this.table.module(key);\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\n\r\nclass Module extends CoreFeature{\r\n\r\n\tconstructor(table, name){\r\n\t\tsuper(table);\r\n\r\n\t\tthis._handler = null;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\t// setup module when table is initialized, to be overriden in module\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t////// Options Registration ///////\r\n\t///////////////////////////////////\r\n\r\n\tregisterTableOption(key, value){\r\n\t\tthis.table.optionsList.register(key, value);\r\n\t}\r\n\r\n\tregisterColumnOption(key, value){\r\n\t\tthis.table.columnManager.optionsList.register(key, value);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t/// Public Function Registation ///\r\n\t///////////////////////////////////\r\n\r\n\tregisterTableFunction(name, func){\r\n\t\tif(typeof this.table[name] === \"undefined\"){\r\n\t\t\tthis.table[name] = func;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Unable to bind table function, name already in use\", name)\r\n\t\t}\r\n\t}\r\n\r\n\tregisterComponentFunction(component, func, handler){\r\n\t\treturn this.table.componentFunctionBinder.bind(component, func, handler);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Data Pipeline //////////\r\n\t///////////////////////////////////\r\n\r\n\tregisterDataHandler(handler, priority){\r\n\t\tthis.table.rowManager.registerDataPipelineHandler(handler, priority)\r\n\t\tthis._handler = handler;\r\n\t}\r\n\r\n\tregisterDisplayHandler(handler, priority){\r\n\t\tthis.table.rowManager.registerDisplayPipelineHandler(handler, priority)\r\n\t\tthis._handler = handler;\r\n\t}\r\n\r\n\trefreshData(renderInPosition, handler){\r\n\t\tif(!handler){\r\n\t\t\thandler = this._handler;\r\n\t\t}\r\n\r\n\t\tif(handler){\r\n\t\t\tthis.table.rowManager.refreshActiveData(handler, false, renderInPosition);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport default Module;","export default class Helpers{\r\n\r\n\tstatic elVisible(el){\r\n\t\treturn !(el.offsetWidth <= 0 && el.offsetHeight <= 0);\r\n\t}\r\n\r\n\tstatic elOffset(el){\r\n\t\tvar box = el.getBoundingClientRect();\r\n\r\n\t\treturn {\r\n\t\t\ttop: box.top + window.pageYOffset - document.documentElement.clientTop,\r\n\t\t\tleft: box.left + window.pageXOffset - document.documentElement.clientLeft\r\n\t\t};\r\n\t}\r\n\r\n\tstatic deepClone(obj, clone, list = []){\r\n\t\tvar objectProto = {}.__proto__,\r\n\t\tarrayProto = [].__proto__;\r\n\r\n\t\tif (!clone){\r\n\t\t\tclone = Object.assign(Array.isArray(obj) ? [] : {}, obj);\r\n\t\t}\r\n\r\n\t\tfor(var i in obj) {\r\n\t\t\tlet subject = obj[i],\r\n\t\t\tmatch, copy;\r\n\r\n\t\t\tif(subject != null && typeof subject === \"object\" && (subject.__proto__ === objectProto || subject.__proto__ === arrayProto)){\r\n\t\t\t\tmatch = list.findIndex((item) => {\r\n\t\t\t\t\treturn item.subject === subject;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(match > -1){\r\n\t\t\t\t\tclone[i] = list[match].copy;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcopy = Object.assign(Array.isArray(subject) ? [] : {}, subject);\r\n\r\n\t\t\t\t\tlist.unshift({subject, copy});\r\n\r\n\t\t\t\t\tclone[i] = this.deepClone(subject, copy, list);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn clone;\r\n\t}\r\n}","export default {}","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defautlAccessors from './defaults/accessors.js';\r\n\r\nclass Accessor extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.allowedTypes = [\"\", \"data\", \"download\", \"clipboard\", \"print\", \"htmlOutput\"] //list of accessor types\r\n\r\n\t\tthis.registerColumnOption(\"accessor\");\r\n\t\tthis.registerColumnOption(\"accessorParams\");\r\n\t\tthis.registerColumnOption(\"accessorData\");\r\n\t\tthis.registerColumnOption(\"accessorDataParams\");\r\n\t\tthis.registerColumnOption(\"accessorDownload\");\r\n\t\tthis.registerColumnOption(\"accessorDownloadParams\");\r\n\t\tthis.registerColumnOption(\"accessorClipboard\");\r\n\t\tthis.registerColumnOption(\"accessorClipboardParams\");\r\n\t\tthis.registerColumnOption(\"accessorPrint\");\r\n\t\tthis.registerColumnOption(\"accessorPrintParams\");\r\n\t\tthis.registerColumnOption(\"accessorHtmlOutput\");\r\n\t\tthis.registerColumnOption(\"accessorHtmlOutputParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"row-data-retrieve\", this.transformRow.bind(this));\r\n\t}\r\n\r\n\t//initialize column accessor\r\n\tinitializeColumn(column){\r\n\t\tvar match = false,\r\n\t\tconfig = {};\r\n\r\n\t\tthis.allowedTypes.forEach((type) => {\r\n\t\t\tvar key = \"accessor\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\t\taccessor;\r\n\r\n\t\t\tif(column.definition[key]){\r\n\t\t\t\taccessor = this.lookupAccessor(column.definition[key]);\r\n\r\n\t\t\t\tif(accessor){\r\n\t\t\t\t\tmatch = true;\r\n\r\n\t\t\t\t\tconfig[key] = {\r\n\t\t\t\t\t\taccessor:accessor,\r\n\t\t\t\t\t\tparams: column.definition[key + \"Params\"] || {},\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tcolumn.modules.accessor = config;\r\n\t\t}\r\n\t}\r\n\r\n\tlookupAccessor(value){\r\n\t\tvar accessor = false;\r\n\r\n\t\t//set column accessor\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Accessor.accessors[value]){\r\n\t\t\t\taccessor = Accessor.accessors[value]\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Accessor Error - No such accessor found, ignoring: \", value);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\taccessor = value;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn accessor;\r\n\t}\r\n\r\n\t//apply accessor to row\r\n\ttransformRow(row, type){\r\n\t\tvar key = \"accessor\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\trowComponent = row.getComponent();\r\n\r\n\t\t//clone data object with deep copy to isolate internal data from returned result\r\n\t\tvar data = Helpers.deepClone(row.data || {});\r\n\r\n\t\tthis.table.columnManager.traverse(function(column){\r\n\t\t\tvar value, accessor, params, colCompnent;\r\n\r\n\t\t\tif(column.modules.accessor){\r\n\r\n\t\t\t\taccessor = column.modules.accessor[key] || column.modules.accessor.accessor || false;\r\n\r\n\t\t\t\tif(accessor){\r\n\t\t\t\t\tvalue = column.getFieldValue(data);\r\n\r\n\t\t\t\t\tif(value != \"undefined\"){\r\n\t\t\t\t\t\tcolCompnent = column.getComponent();\r\n\t\t\t\t\t\tparams = typeof accessor.params === \"function\" ? accessor.params(value, data, type, colCompnent, rowComponent) : accessor.params;\r\n\t\t\t\t\t\tcolumn.setFieldValue(data, accessor.accessor(value, data, type, params, colCompnent, rowComponent));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n}\r\n\r\n//load defaults\r\nAccessor.moduleName = \"accessor\";\r\nAccessor.accessors = defautlAccessors;\r\n\r\nexport default Accessor;","export default {\r\n\tmethod: \"GET\",\r\n};","function generateParamsList(data, prefix){\r\n\tvar output = [];\r\n\r\n\tprefix = prefix || \"\";\r\n\r\n\tif(Array.isArray(data)){\r\n\t\tdata.forEach((item, i) => {\r\n\t\t\toutput = output.concat(generateParamsList(item, prefix ? prefix + \"[\" + i + \"]\" : i));\r\n\t\t});\r\n\t}else if (typeof data === \"object\"){\r\n\t\tfor (var key in data){\r\n\t\t\toutput = output.concat(generateParamsList(data[key], prefix ? prefix + \"[\" + key + \"]\" : key));\r\n\t\t}\r\n\t}else{\r\n\t\toutput.push({key:prefix, value:data});\r\n\t}\r\n\r\n\treturn output;\r\n}\r\n\r\nfunction serializeParams(params){\r\n\tvar output = generateParamsList(params),\r\n\tencoded = [];\r\n\r\n\toutput.forEach(function(item){\r\n\t\tencoded.push(encodeURIComponent(item.key) + \"=\" + encodeURIComponent(item.value));\r\n\t});\r\n\r\n\treturn encoded.join(\"&\");\r\n}\r\n\r\nexport default function(url, config, params){\r\n\tif(url){\r\n\t\tif(params && Object.keys(params).length){\r\n\t\t\tif(!config.method || config.method.toLowerCase() == \"get\"){\r\n\t\t\t\tconfig.method = \"get\";\r\n\r\n\t\t\t\turl += (url.includes(\"?\") ? \"&\" : \"?\") + serializeParams(params);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn url;\r\n};","export default function(url, config, params){\r\n\tvar contentType;\r\n\r\n\treturn new Promise((resolve, reject) => {\r\n\t\t//set url\r\n\t\turl = this.urlGenerator.call(this.table, url, config, params);\r\n\r\n\t\t//set body content if not GET request\r\n\t\tif(config.method.toUpperCase() != \"GET\"){\r\n\t\t\tcontentType = typeof this.table.options.ajaxContentType === \"object\" ? this.table.options.ajaxContentType : this.contentTypeFormatters[this.table.options.ajaxContentType];\r\n\t\t\tif(contentType){\r\n\r\n\t\t\t\tfor(var key in contentType.headers){\r\n\t\t\t\t\tif(!config.headers){\r\n\t\t\t\t\t\tconfig.headers = {};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(typeof config.headers[key] === \"undefined\"){\r\n\t\t\t\t\t\tconfig.headers[key] = contentType.headers[key];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconfig.body = contentType.body.call(this, url, config, params);\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Ajax Error - Invalid ajaxContentType value:\", this.table.options.ajaxContentType);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(url){\r\n\t\t\t//configure headers\r\n\t\t\tif(typeof config.headers === \"undefined\"){\r\n\t\t\t\tconfig.headers = {};\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.headers.Accept === \"undefined\"){\r\n\t\t\t\tconfig.headers.Accept = \"application/json\";\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.headers[\"X-Requested-With\"] === \"undefined\"){\r\n\t\t\t\tconfig.headers[\"X-Requested-With\"] = \"XMLHttpRequest\";\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.mode === \"undefined\"){\r\n\t\t\t\tconfig.mode = \"cors\";\r\n\t\t\t}\r\n\r\n\t\t\tif(config.mode == \"cors\"){\r\n\t\t\t\tif(typeof config.headers[\"Origin\"] === \"undefined\"){\r\n\t\t\t\t\tconfig.headers[\"Origin\"] = window.location.origin;\r\n\t\t\t\t}\r\n \r\n\t\t\t\tif(typeof config.credentials === \"undefined\"){\r\n\t\t\t\t\tconfig.credentials = 'same-origin';\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(typeof config.credentials === \"undefined\"){\r\n\t\t\t\t\tconfig.credentials = 'include';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//send request\r\n\t\t\tfetch(url, config)\r\n\t\t\t.then((response)=>{\r\n\t\t\t\tif(response.ok) {\r\n\t\t\t\t\tresponse.json()\r\n\t\t\t\t\t.then((data)=>{\r\n\t\t\t\t\t\tresolve(data);\r\n\t\t\t\t\t}).catch((error)=>{\r\n\t\t\t\t\t\treject(error);\r\n\t\t\t\t\t\tconsole.warn(\"Ajax Load Error - Invalid JSON returned\", error);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \" + response.status, response.statusText);\r\n\t\t\t\t\treject(response);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.catch((error)=>{\r\n\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \", error);\r\n\t\t\t\treject(error);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Ajax Load Error - No URL Set\");\r\n\t\t\tresolve([]);\r\n\t\t}\r\n\t});\r\n};","function generateParamsList(data, prefix){\r\n\tvar output = [];\r\n\r\n\tprefix = prefix || \"\";\r\n\r\n\tif(Array.isArray(data)){\r\n\t\tdata.forEach((item, i) => {\r\n\t\t\toutput = output.concat(generateParamsList(item, prefix ? prefix + \"[\" + i + \"]\" : i));\r\n\t\t});\r\n\t}else if (typeof data === \"object\"){\r\n\t\tfor (var key in data){\r\n\t\t\toutput = output.concat(generateParamsList(data[key], prefix ? prefix + \"[\" + key + \"]\" : key));\r\n\t\t}\r\n\t}else{\r\n\t\toutput.push({key:prefix, value:data});\r\n\t}\r\n\r\n\treturn output;\r\n}\r\n\r\nexport default {\r\n\t\"json\":{\r\n\t\theaders:{\r\n\t\t\t'Content-Type': 'application/json',\r\n\t\t},\r\n\t\tbody:function(url, config, params){\r\n\t\t\treturn JSON.stringify(params);\r\n\t\t},\r\n\t},\r\n\t\"form\":{\r\n\t\theaders:{\r\n\t\t},\r\n\t\tbody:function(url, config, params){\r\n\r\n\t\t\tvar output = generateParamsList(params),\r\n\t\t\tform = new FormData();\r\n\r\n\t\t\toutput.forEach(function(item){\r\n\t\t\t\tform.append(item.key, item.value);\r\n\t\t\t});\r\n\r\n\t\t\treturn form;\r\n\t\t},\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultConfig from './defaults/config.js';\r\nimport defaultURLGenerator from './defaults/urlGenerator.js';\r\nimport defaultLoaderPromise from './defaults/loaderPromise.js';\r\nimport defaultContentTypeFormatters from './defaults/contentTypeFormatters.js';\r\n\r\nclass Ajax extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.config = {}; //hold config object for ajax request\r\n\t\tthis.url = \"\"; //request URL\r\n\t\tthis.urlGenerator = false;\r\n\t\tthis.params = false; //request parameters\r\n\t\t\r\n\t\tthis.loaderPromise = false;\r\n\t\t\r\n\t\tthis.registerTableOption(\"ajaxURL\", false); //url for ajax loading\r\n\t\tthis.registerTableOption(\"ajaxURLGenerator\", false);\r\n\t\tthis.registerTableOption(\"ajaxParams\", {}); //params for ajax loading\r\n\t\tthis.registerTableOption(\"ajaxConfig\", \"get\"); //ajax request type\r\n\t\tthis.registerTableOption(\"ajaxContentType\", \"form\"); //ajax request type\r\n\t\tthis.registerTableOption(\"ajaxRequestFunc\", false); //promise function\r\n\t\t\r\n\t\tthis.registerTableOption(\"ajaxRequesting\", function(){});\r\n\t\tthis.registerTableOption(\"ajaxResponse\", false);\r\n\t\t\r\n\t\tthis.contentTypeFormatters = Ajax.contentTypeFormatters;\r\n\t}\r\n\t\r\n\t//initialize setup options\r\n\tinitialize(){\r\n\t\tthis.loaderPromise = this.table.options.ajaxRequestFunc || Ajax.defaultLoaderPromise;\r\n\t\tthis.urlGenerator = this.table.options.ajaxURLGenerator || Ajax.defaultURLGenerator;\r\n\t\t\r\n\t\tif(this.table.options.ajaxURL){\r\n\t\t\tthis.setUrl(this.table.options.ajaxURL);\r\n\t\t}\r\n\r\n\r\n\t\tthis.setDefaultConfig(this.table.options.ajaxConfig);\r\n\t\t\r\n\t\tthis.registerTableFunction(\"getAjaxUrl\", this.getUrl.bind(this));\r\n\t\t\r\n\t\tthis.subscribe(\"data-loading\", this.requestDataCheck.bind(this));\r\n\t\tthis.subscribe(\"data-params\", this.requestParams.bind(this));\r\n\t\tthis.subscribe(\"data-load\", this.requestData.bind(this));\r\n\t}\r\n\t\r\n\trequestParams(data, config, silent, params){\r\n\t\tvar ajaxParams = this.table.options.ajaxParams;\r\n\t\t\r\n\t\tif(ajaxParams){\r\n\t\t\tif(typeof ajaxParams === \"function\"){\r\n\t\t\t\tajaxParams = ajaxParams.call(this.table);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tparams = Object.assign(params, ajaxParams);\r\n\t\t}\t\t\r\n\t\t\r\n\t\treturn params;\r\n\t}\r\n\t\r\n\trequestDataCheck(data, params, config, silent){\r\n\t\treturn !!((!data && this.url) || typeof data === \"string\");\r\n\t}\r\n\t\r\n\trequestData(url, params, config, silent, previousData){\r\n\t\tvar ajaxConfig;\r\n\t\t\r\n\t\tif(!previousData && this.requestDataCheck(url)){\r\n\t\t\tif(url){\r\n\t\t\t\tthis.setUrl(url);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tajaxConfig = this.generateConfig(config);\r\n\t\t\t\r\n\t\t\treturn this.sendRequest(this.url, params, ajaxConfig);\r\n\t\t}else{\r\n\t\t\treturn previousData;\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetDefaultConfig(config = {}){\r\n\t\tthis.config = Object.assign({}, Ajax.defaultConfig);\r\n\r\n\t\tif(typeof config == \"string\"){\r\n\t\t\tthis.config.method = config;\r\n\t\t}else{\r\n\t\t\tObject.assign(this.config, config);\r\n\t\t}\r\n\t}\r\n\t\r\n\t//load config object\r\n\tgenerateConfig(config = {}){\r\n\t\tvar ajaxConfig = Object.assign({}, this.config)\r\n\t\t\r\n\t\tif(typeof config == \"string\"){\r\n\t\t\tajaxConfig.method = config;\r\n\t\t}else{\r\n\t\t\tObject.assign(ajaxConfig, config);\r\n\t\t}\r\n\t\t\r\n\t\treturn ajaxConfig;\r\n\t}\r\n\t\r\n\t//set request url\r\n\tsetUrl(url){\r\n\t\tthis.url = url;\r\n\t}\r\n\t\r\n\t//get request url\r\n\tgetUrl(){\r\n\t\treturn this.url;\r\n\t}\r\n\t\r\n\t//send ajax request\r\n\tsendRequest(url, params, config){\r\n\t\tif(this.table.options.ajaxRequesting.call(this.table, url, params) !== false){\r\n\t\t\treturn this.loaderPromise(url, config, params)\r\n\t\t\t.then((data)=>{\r\n\t\t\t\tif(this.table.options.ajaxResponse){\r\n\t\t\t\t\tdata = this.table.options.ajaxResponse.call(this.table, url, params, data);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn data;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n}\r\n\r\nAjax.moduleName = \"ajax\";\r\n\r\n//load defaults\r\nAjax.defaultConfig = defaultConfig;\r\nAjax.defaultURLGenerator = defaultURLGenerator;\r\nAjax.defaultLoaderPromise = defaultLoaderPromise;\r\nAjax.contentTypeFormatters = defaultContentTypeFormatters;\r\n\r\nexport default Ajax;","export default {\r\n\treplace:function(rows){\r\n\t\treturn this.table.setData(rows);\r\n\t},\r\n\tupdate:function(rows){\r\n\t\treturn this.table.updateOrAddData(rows);\r\n\t},\r\n\tinsert:function(rows){\r\n\t\treturn this.table.addData(rows);\r\n\t},\r\n};","export default {\r\n\ttable:function(clipboard){\r\n\t\tvar data = [],\r\n\t\tsuccess = false,\r\n\t\theaderFindSuccess = true,\r\n\t\tcolumns = this.table.columnManager.columns,\r\n\t\tcolumnMap = [],\r\n\t\trows = [];\r\n\r\n\t\t//get data from clipboard into array of columns and rows.\r\n\t\tclipboard = clipboard.split(\"\\n\");\r\n\r\n\t\tclipboard.forEach(function(row){\r\n\t\t\tdata.push(row.split(\"\\t\"));\r\n\t\t});\r\n\r\n\t\tif(data.length && !(data.length === 1 && data[0].length < 2)){\r\n\t\t\tsuccess = true;\r\n\r\n\t\t\t//check if headers are present by title\r\n\t\t\tdata[0].forEach(function(value){\r\n\t\t\t\tvar column = columns.find(function(column){\r\n\t\t\t\t\treturn value && column.definition.title && value.trim() && column.definition.title.trim() === value.trim();\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tcolumnMap.push(column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\theaderFindSuccess = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t//check if column headers are present by field\r\n\t\t\tif(!headerFindSuccess){\r\n\t\t\t\theaderFindSuccess = true;\r\n\t\t\t\tcolumnMap = [];\r\n\r\n\t\t\t\tdata[0].forEach(function(value){\r\n\t\t\t\t\tvar column = columns.find(function(column){\r\n\t\t\t\t\t\treturn value && column.field && value.trim() && column.field.trim() === value.trim();\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(column){\r\n\t\t\t\t\t\tcolumnMap.push(column);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\theaderFindSuccess = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(!headerFindSuccess){\r\n\t\t\t\t\tcolumnMap = this.table.columnManager.columnsByIndex;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//remove header row if found\r\n\t\t\tif(headerFindSuccess){\r\n\t\t\t\tdata.shift();\r\n\t\t\t}\r\n\r\n\t\t\tdata.forEach(function(item){\r\n\t\t\t\tvar row = {};\r\n\r\n\t\t\t\titem.forEach(function(value, i){\r\n\t\t\t\t\tif(columnMap[i]){\r\n\t\t\t\t\t\trow[columnMap[i].field] = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\trows.push(row);\r\n\t\t\t});\r\n\r\n\t\t\treturn rows;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultPasteActions from './defaults/pasteActions.js';\r\nimport defaultPasteParsers from './defaults/pasteParsers.js';\r\n\r\nclass Clipboard extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.mode = true;\r\n\t\tthis.pasteParser = function(){};\r\n\t\tthis.pasteAction = function(){};\r\n\t\tthis.customSelection = false;\r\n\t\tthis.rowRange = false;\r\n\t\tthis.blocked = true; //block copy actions not originating from this command\r\n\r\n\t\tthis.registerTableOption(\"clipboard\", false); //enable clipboard\r\n\t\tthis.registerTableOption(\"clipboardCopyStyled\", true); //formatted table data\r\n\t\tthis.registerTableOption(\"clipboardCopyConfig\", false); //clipboard config\r\n\t\tthis.registerTableOption(\"clipboardCopyFormatter\", false); //DEPRICATED - REMOVE in 5.0\r\n\t\tthis.registerTableOption(\"clipboardCopyRowRange\", \"active\"); //restrict clipboard to visible rows only\r\n\t\tthis.registerTableOption(\"clipboardPasteParser\", \"table\"); //convert pasted clipboard data to rows\r\n\t\tthis.registerTableOption(\"clipboardPasteAction\", \"insert\"); //how to insert pasted data into the table\r\n\r\n\t\tthis.registerColumnOption(\"clipboard\");\r\n\t\tthis.registerColumnOption(\"titleClipboard\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.mode = this.table.options.clipboard;\r\n\r\n\t\tthis.rowRange = this.table.options.clipboardCopyRowRange;\r\n\r\n\t\tif(this.mode === true || this.mode === \"copy\"){\r\n\t\t\tthis.table.element.addEventListener(\"copy\", (e) => {\r\n\t\t\t\tvar plain, html, list;\r\n\r\n\t\t\t\tif(!this.blocked){\r\n\t\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\t\tif(this.customSelection){\r\n\t\t\t\t\t\tplain = this.customSelection;\r\n\r\n\t\t\t\t\t\tif(this.table.options.clipboardCopyFormatter){\r\n\t\t\t\t\t\t\tplain = this.table.options.clipboardCopyFormatter(\"plain\", plain);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\r\n\t\t\t\t\t\tvar list = this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig, this.table.options.clipboardCopyStyled, this.rowRange, \"clipboard\");\r\n\r\n\t\t\t\t\t\thtml = this.table.modules.export.genereateHTMLTable(list);\r\n\t\t\t\t\t\tplain = html ? this.generatePlainContent(list) : \"\";\r\n\r\n\t\t\t\t\t\tif(this.table.options.clipboardCopyFormatter){\r\n\t\t\t\t\t\t\tplain = this.table.options.clipboardCopyFormatter(\"plain\", plain);\r\n\t\t\t\t\t\t\thtml = this.table.options.clipboardCopyFormatter(\"html\", html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (window.clipboardData && window.clipboardData.setData) {\r\n\t\t\t\t\t\twindow.clipboardData.setData('Text', plain);\r\n\t\t\t\t\t} else if (e.clipboardData && e.clipboardData.setData) {\r\n\t\t\t\t\t\te.clipboardData.setData('text/plain', plain);\r\n\t\t\t\t\t\tif(html){\r\n\t\t\t\t\t\t\te.clipboardData.setData('text/html', html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (e.originalEvent && e.originalEvent.clipboardData.setData) {\r\n\t\t\t\t\t\te.originalEvent.clipboardData.setData('text/plain', plain);\r\n\t\t\t\t\t\tif(html){\r\n\t\t\t\t\t\t\te.originalEvent.clipboardData.setData('text/html', html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.dispatchExternal(\"clipboardCopied\", plain, html);\r\n\r\n\t\t\t\t\tthis.reset();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.mode === true || this.mode === \"paste\"){\r\n\t\t\tthis.table.element.addEventListener(\"paste\", (e) => {\r\n\t\t\t\tthis.paste(e);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.setPasteParser(this.table.options.clipboardPasteParser);\r\n\t\tthis.setPasteAction(this.table.options.clipboardPasteAction);\r\n\r\n\t\tthis.registerTableFunction(\"copyToClipboard\", this.copy.bind(this));\r\n\t}\r\n\r\n\treset(){\r\n\t\tthis.blocked = true;\r\n\t\tthis.customSelection = false;\r\n\t}\r\n\r\n\tgeneratePlainContent (list) {\r\n\t\tvar output = [];\r\n\r\n\t\tlist.forEach((row) => {\r\n\t\t\tvar rowData = [];\r\n\r\n\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\tvar value = \"\";\r\n\r\n\t\t\t\tif(col){\r\n\r\n\t\t\t\t\tif(row.type === \"group\"){\r\n\t\t\t\t\t\tcol.value = col.component.getKey();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(col.value === null){\r\n\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\t\tvalue = JSON.stringify(col.value);\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tvalue = col.value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowData.push(value);\r\n\t\t\t});\r\n\r\n\t\t\toutput.push(rowData.join(\"\\t\"));\r\n\t\t});\r\n\r\n\t\treturn output.join(\"\\n\");\r\n\t}\r\n\r\n\tcopy (range, internal) {\r\n\t\tvar range, sel, textRange;\r\n\t\tthis.blocked = false;\r\n\t\tthis.customSelection = false;\r\n\r\n\t\tif (this.mode === true || this.mode === \"copy\") {\r\n\r\n\t\t\tthis.rowRange = range || this.table.options.clipboardCopyRowRange;\r\n\r\n\t\t\tif (typeof window.getSelection != \"undefined\" && typeof document.createRange != \"undefined\") {\r\n\t\t\t\trange = document.createRange();\r\n\t\t\t\trange.selectNodeContents(this.table.element);\r\n\t\t\t\tsel = window.getSelection();\r\n\r\n\t\t\t\tif (sel.toString() && internal) {\r\n\t\t\t\t\tthis.customSelection = sel.toString();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsel.removeAllRanges();\r\n\t\t\t\tsel.addRange(range);\r\n\t\t\t} else if (typeof document.selection != \"undefined\" && typeof document.body.createTextRange != \"undefined\") {\r\n\t\t\t\ttextRange = document.body.createTextRange();\r\n\t\t\t\ttextRange.moveToElementText(this.table.element);\r\n\t\t\t\ttextRange.select();\r\n\t\t\t}\r\n\r\n\t\t\tdocument.execCommand('copy');\r\n\r\n\t\t\tif (sel) {\r\n\t\t\t\tsel.removeAllRanges();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//PASTE EVENT HANDLING\r\n\tsetPasteAction(action){\r\n\r\n\t\tswitch(typeof action){\r\n\t\t\tcase \"string\":\r\n\t\t\tthis.pasteAction = Clipboard.pasteActions[action];\r\n\r\n\t\t\tif(!this.pasteAction){\r\n\t\t\t\tconsole.warn(\"Clipboard Error - No such paste action found:\", action);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tthis.pasteAction = action;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tsetPasteParser(parser){\r\n\t\tswitch(typeof parser){\r\n\t\t\tcase \"string\":\r\n\t\t\tthis.pasteParser = Clipboard.pasteParsers[parser];\r\n\r\n\t\t\tif(!this.pasteParser){\r\n\t\t\t\tconsole.warn(\"Clipboard Error - No such paste parser found:\", parser);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tthis.pasteParser = parser;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tpaste(e){\r\n\t\tvar data, rowData, rows;\r\n\r\n\t\tif(this.checkPaseOrigin(e)){\r\n\r\n\t\t\tdata = this.getPasteData(e);\r\n\r\n\t\t\trowData = this.pasteParser.call(this, data);\r\n\r\n\t\t\tif(rowData){\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\t\t\trowData = this.mutateData(rowData);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trows = this.pasteAction.call(this, rowData);\r\n\r\n\t\t\t\tthis.dispatchExternal(\"clipboardPasted\", data, rowData, rows);\r\n\t\t\t}else{\r\n\t\t\t\tthis.dispatchExternal(\"clipboardPasteError\", data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmutateData(data){\r\n\t\tvar output = [];\r\n\r\n\t\tif(Array.isArray(data)){\r\n\t\t\tdata.forEach((row) => {\r\n\t\t\t\toutput.push(this.table.modules.mutator.transformRow(row, \"clipboard\"));\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\toutput = data;\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\r\n\tcheckPaseOrigin(e){\r\n\t\tvar valid = true;\r\n\r\n\t\tif(e.target.tagName != \"DIV\" || this.table.modules.edit.currentCell){\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\r\n\t\treturn valid;\r\n\t}\r\n\r\n\tgetPasteData(e){\r\n\t\tvar data;\r\n\r\n\t\tif (window.clipboardData && window.clipboardData.getData) {\r\n\t\t\tdata = window.clipboardData.getData('Text');\r\n\t\t} else if (e.clipboardData && e.clipboardData.getData) {\r\n\t\t\tdata = e.clipboardData.getData('text/plain');\r\n\t\t} else if (e.originalEvent && e.originalEvent.clipboardData.getData) {\r\n\t\t\tdata = e.originalEvent.clipboardData.getData('text/plain');\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n}\r\n\r\nClipboard.moduleName = \"clipboard\";\r\n\r\n//load defaults\r\nClipboard.pasteActions = defaultPasteActions;\r\nClipboard.pasteParsers = defaultPasteParsers;\r\n\r\nexport default Clipboard;","class CalcComponent{\r\n\tconstructor (row){\r\n\t\tthis._row = row;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._row.table.componentFunctionBinder.handle(\"row\", target._row, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\treturn this._row.getData(transform);\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._row.getElement();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._row.table;\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._row.getCells().forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar cell = this._row.getCell(column);\r\n\t\treturn cell ? cell.getComponent() : false;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._row;\r\n\t}\r\n}\r\n\r\nexport default CalcComponent;","//public cell object\r\nexport default class CellComponent {\r\n\r\n\tconstructor (cell){\r\n\t\tthis._cell = cell;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._cell.table.componentFunctionBinder.handle(\"cell\", target._cell, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetValue(){\r\n\t\treturn this._cell.getValue();\r\n\t}\r\n\r\n\tgetOldValue(){\r\n\t\treturn this._cell.getOldValue();\r\n\t}\r\n\r\n\tgetInitialValue(){\r\n\t\treturn this._cell.initialValue;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._cell.getElement();\r\n\t}\r\n\r\n\tgetRow(){\r\n\t\treturn this._cell.row.getComponent();\r\n\t}\r\n\r\n\tgetData(){\r\n\t\treturn this._cell.row.getData();\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._cell.column.getField();\r\n\t}\r\n\r\n\tgetColumn(){\r\n\t\treturn this._cell.column.getComponent();\r\n\t}\r\n\r\n\tsetValue(value, mutate){\r\n\t\tif(typeof mutate == \"undefined\"){\r\n\t\t\tmutate = true;\r\n\t\t}\r\n\r\n\t\tthis._cell.setValue(value, mutate);\r\n\t}\r\n\r\n\trestoreOldValue(){\r\n\t\tthis._cell.setValueActual(this._cell.getOldValue());\r\n\t}\r\n\r\n\trestoreInitialValue(){\r\n\t\tthis._cell.setValueActual(this._cell.initialValue);\r\n\t}\r\n\r\n\tcheckHeight(){\r\n\t\tthis._cell.checkHeight();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._cell.table;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._cell;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport CellComponent from './CellComponent.js';\r\n\r\nexport default class Cell extends CoreFeature{\r\n\tconstructor(column, row){\r\n\t\tsuper(column.table);\r\n\r\n\t\tthis.table = column.table;\r\n\t\tthis.column = column;\r\n\t\tthis.row = row;\r\n\t\tthis.element = null;\r\n\t\tthis.value = null;\r\n\t\tthis.initialValue;\r\n\t\tthis.oldValue = null;\r\n\t\tthis.modules = {};\r\n\r\n\t\tthis.height = null;\r\n\t\tthis.width = null;\r\n\t\tthis.minWidth = null;\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\tthis.loaded = false; //track if the cell has been added to the DOM yet\r\n\r\n\t\tthis.build();\r\n\t}\r\n\r\n\t//////////////// Setup Functions /////////////////\r\n\t//generate element\r\n\tbuild(){\r\n\t\tthis.generateElement();\r\n\r\n\t\tthis.setWidth();\r\n\r\n\t\tthis._configureCell();\r\n\r\n\t\tthis.setValueActual(this.column.getFieldValue(this.row.data));\r\n\r\n\t\tthis.initialValue = this.value;\r\n\t}\r\n\r\n\tgenerateElement(){\r\n\t\tthis.element = document.createElement('div');\r\n\t\tthis.element.className = \"tabulator-cell\";\r\n\t\tthis.element.setAttribute(\"role\", \"gridcell\");\r\n\t\tthis.element = this.element;\r\n\t}\r\n\r\n\t_configureCell(){\r\n\t\tvar element = this.element,\r\n\t\tfield = this.column.getField(),\r\n\t\tvertAligns = {\r\n\t\t\ttop:\"flex-start\",\r\n\t\t\tbottom:\"flex-end\",\r\n\t\t\tmiddle:\"center\",\r\n\t\t},\r\n\t\thozAligns = {\r\n\t\t\tleft:\"flex-start\",\r\n\t\t\tright:\"flex-end\",\r\n\t\t\tcenter:\"center\",\r\n\t\t};\r\n\r\n\t\t//set text alignment\r\n\t\telement.style.textAlign = this.column.hozAlign;\r\n\r\n\t\tif(this.column.vertAlign){\r\n\t\t\telement.style.display = \"inline-flex\";\r\n\r\n\t\t\telement.style.alignItems = vertAligns[this.column.vertAlign] || \"\";\r\n\r\n\t\t\tif(this.column.hozAlign){\r\n\t\t\t\telement.style.justifyContent = hozAligns[this.column.hozAlign] || \"\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(field){\r\n\t\t\telement.setAttribute(\"tabulator-field\", field);\r\n\t\t}\r\n\r\n\t\t//add class to cell if needed\r\n\t\tif(this.column.definition.cssClass){\r\n\t\t\tvar classNames = this.column.definition.cssClass.split(\" \")\r\n\t\t\tclassNames.forEach((className) => {\r\n\t\t\t\telement.classList.add(className)\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t//update tooltip on mouse enter\r\n\t\tif (this.table.options.tooltipGenerationMode === \"hover\"){\r\n\t\t\telement.addEventListener(\"mouseenter\", (e) => {\r\n\t\t\t\tthis._generateTooltip();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"cell-init\", this);\r\n\r\n\t\t//hide cell if not visible\r\n\t\tif(!this.column.visible){\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\r\n\t//generate cell contents\r\n\t_generateContents(){\r\n\t\tvar val;\r\n\r\n\t\tval = this.chain(\"cell-format\", this, null, () => {\r\n\t\t\treturn this.element.innerHTML = this.value;\r\n\t\t});\r\n\r\n\t\tswitch(typeof val){\r\n\t\t\tcase \"object\":\r\n\t\t\tif(val instanceof Node){\r\n\r\n\t\t\t\t//clear previous cell contents\r\n\t\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\t\tthis.element.appendChild(val);\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.innerHTML = \"\";\r\n\r\n\t\t\t\tif(val != null){\r\n\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);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\tcase \"null\":\r\n\t\t\tthis.element.innerHTML = \"\";\r\n\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\tthis.element.innerHTML = val;\r\n\t\t}\r\n\t}\r\n\r\n\tcellRendered(){\r\n\t\tthis.dispatch(\"cell-rendered\", this);\r\n\t}\r\n\r\n\t//generate tooltip text\r\n\t_generateTooltip(){\r\n\t\tvar tooltip = this.column.tooltip;\r\n\r\n\t\tif(tooltip){\r\n\t\t\tif(tooltip === true){\r\n\t\t\t\ttooltip = this.value;\r\n\t\t\t}else if(typeof(tooltip) == \"function\"){\r\n\t\t\t\ttooltip = tooltip(this.getComponent());\r\n\r\n\t\t\t\tif(tooltip === false){\r\n\t\t\t\t\ttooltip = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof tooltip === \"undefined\"){\r\n\t\t\t\ttooltip = \"\";\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.setAttribute(\"title\", tooltip);\r\n\t\t}else{\r\n\t\t\tthis.element.setAttribute(\"title\", \"\");\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////////// Getters ////////////////////\r\n\tgetElement(containerOnly){\r\n\t\tif(!this.loaded){\r\n\t\t\tthis.loaded = true;\r\n\t\t\tif(!containerOnly){\r\n\t\t\t\tthis.layoutElement();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tgetValue(){\r\n\t\treturn this.value;\r\n\t}\r\n\r\n\tgetOldValue(){\r\n\t\treturn this.oldValue;\r\n\t}\r\n\r\n\t//////////////////// Actions ////////////////////\r\n\tsetValue(value, mutate){\r\n\t\tvar changed = this.setValueProcessData(value, mutate);\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.dispatch(\"cell-value-updated\", this);\r\n\r\n\t\t\tthis.cellRendered();\r\n\r\n\t\t\tif(this.column.definition.cellEdited){\r\n\t\t\t\tthis.column.definition.cellEdited.call(this.table, this.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"cellEdited\", this.getComponent());\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tsetValueProcessData(value, mutate){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(this.value !== value){\r\n\r\n\t\t\tchanged = true;\r\n\r\n\t\t\tif(mutate){\r\n\t\t\t\tvalue = this.chain(\"cell-value-changing\", [this, value], null, value);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.setValueActual(value);\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.dispatch(\"cell-value-changed\", this);\r\n\t\t}\r\n\r\n\t\treturn changed;\r\n\t}\r\n\r\n\tsetValueActual(value){\r\n\t\tthis.oldValue = this.value;\r\n\r\n\t\tthis.value = value;\r\n\r\n\t\tthis.dispatch(\"cell-value-save-before\", this);\r\n\r\n\t\tthis.column.setFieldValue(this.row.data, value);\r\n\r\n\t\tthis.dispatch(\"cell-value-save-after\", this);\r\n\r\n\t\tif(this.loaded){\r\n\t\t\tthis.layoutElement();\r\n\t\t}\r\n\t}\r\n\r\n\tlayoutElement(){\r\n\t\tthis._generateContents();\r\n\t\tthis._generateTooltip();\r\n\r\n\t\tthis.dispatch(\"cell-layout\", this);\r\n\t}\r\n\r\n\tsetWidth(){\r\n\t\tthis.width = this.column.width;\r\n\t\tthis.element.style.width = this.column.widthStyled;\r\n\t}\r\n\r\n\tclearWidth(){\r\n\t\tthis.width = \"\";\r\n\t\tthis.element.style.width = \"\";\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\treturn this.width || this.element.offsetWidth;\r\n\t}\r\n\r\n\tsetMinWidth(){\r\n\t\tthis.minWidth = this.column.minWidth;\r\n\t\tthis.element.style.minWidth = this.column.minWidthStyled;\r\n\t}\r\n\r\n\tsetMaxWidth(){\r\n\t\tthis.maxWidth = this.column.maxWidth;\r\n\t\tthis.element.style.maxWidth = this.column.maxWidthStyled;\r\n\t}\r\n\r\n\tcheckHeight(){\r\n\t\t// var height = this.element.css(\"height\");\r\n\t\tthis.row.reinitializeHeight();\r\n\t}\r\n\r\n\tclearHeight(){\r\n\t\tthis.element.style.height = \"\";\r\n\t\tthis.height = null;\r\n\t}\r\n\r\n\tsetHeight(){\r\n\t\tthis.height = this.row.height;\r\n\t\tthis.element.style.height = this.row.heightStyled;\r\n\t}\r\n\r\n\tgetHeight(){\r\n\t\treturn this.height || this.element.offsetHeight;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tthis.element.style.display = this.column.vertAlign ? \"inline-flex\" : \"\";\r\n\t}\r\n\r\n\thide(){\r\n\t\tthis.element.style.display = \"none\";\r\n\t}\r\n\r\n\tdelete(){\r\n\t\tthis.dispatch(\"cell-delete\", this);\r\n\r\n\t\tif(!this.table.rowManager.redrawBlock && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.column.deleteCell(this);\r\n\t\tthis.row.deleteCell(this);\r\n\t\tthis.calcs = {};\r\n\t}\r\n\r\n\tgetIndex(){\r\n\t\treturn this.row.getCellIndex(this);\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new CellComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}","import Column from './Column.js';\r\n\r\n//public column object\r\nexport default class ColumnComponent {\r\n\tconstructor (column){\r\n\t\tthis._column = column;\r\n\t\tthis.type = \"ColumnComponent\";\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._column.table.componentFunctionBinder.handle(\"column\", target._column, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._column.getElement();\r\n\t}\r\n\r\n\tgetDefinition(){\r\n\t\treturn this._column.getDefinition();\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._column.getField();\r\n\t}\r\n\r\n\tgetTitleDownload() {\r\n\t\treturn this._column.getTitleDownload();\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._column.cells.forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tisVisible(){\r\n\t\treturn this._column.visible;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tif(this._column.isGroup){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\tcolumn.show();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis._column.show();\r\n\t\t}\r\n\t}\r\n\r\n\thide(){\r\n\t\tif(this._column.isGroup){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\tcolumn.hide();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis._column.hide();\r\n\t\t}\r\n\t}\r\n\r\n\ttoggle(){\r\n\t\tif(this._column.visible){\r\n\t\t\tthis.hide();\r\n\t\t}else{\r\n\t\t\tthis.show();\r\n\t\t}\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn this._column.delete();\r\n\t}\r\n\r\n\tgetSubColumns(){\r\n\t\tvar output = [];\r\n\r\n\t\tif(this._column.columns.length){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\toutput.push(column.getComponent());\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetParentColumn(){\r\n\t\treturn this._column.parent instanceof Column ? this._column.parent.getComponent() : false;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._column;\r\n\t}\r\n\r\n\tscrollTo(){\r\n\t\treturn this._column.table.columnManager.scrollToColumn(this._column);\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._column.table;\r\n\t}\r\n\r\n\tmove(to, after){\r\n\t\tvar toColumn = this._column.table.columnManager.findColumn(to);\r\n\r\n\t\tif(toColumn){\r\n\t\t\tthis._column.table.columnManager.moveColumn(this._column, toColumn, after)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching column found:\", toColumn);\r\n\t\t}\r\n\t}\r\n\r\n\tgetNextColumn(){\r\n\t\tvar nextCol = this._column.nextColumn();\r\n\r\n\t\treturn nextCol ? nextCol.getComponent() : false;\r\n\t}\r\n\r\n\tgetPrevColumn(){\r\n\t\tvar prevCol = this._column.prevColumn();\r\n\r\n\t\treturn prevCol ? prevCol.getComponent() : false;\r\n\t}\r\n\r\n\tupdateDefinition(updates){\r\n\t\treturn this._column.updateDefinition(updates);\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\treturn this._column.getWidth();\r\n\t}\r\n\r\n\tsetWidth(width){\r\n\t\tvar result;\r\n\r\n\t\tif(width === true){\r\n\t\t\tresult = this._column.reinitializeWidth(true);\r\n\t\t}else{\r\n\t\t\tresult = this._column.setWidth(width);\r\n\t\t}\r\n\r\n\t\tthis._column.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\treturn result;\r\n\t}\r\n}","export default {\r\n\t\"title\": undefined,\r\n\t\"field\": undefined,\r\n\t\"columns\": undefined,\r\n\t\"visible\": undefined,\r\n\t\"hozAlign\": undefined,\r\n\t\"vertAlign\": undefined,\r\n\t\"width\": undefined,\r\n\t\"minWidth\": 40,\r\n\t\"maxWidth\": undefined,\r\n\t\"maxInitialWidth\": undefined,\r\n\t\"tooltip\": undefined,\r\n\t\"cssClass\": undefined,\r\n\t\"variableHeight\": undefined,\r\n\t\"headerTooltip\": undefined,\r\n\t\"headerVertical\": undefined,\r\n\t\"headerHozAlign\": undefined,\r\n\t\"editableTitle\": undefined,\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport ColumnComponent from './ColumnComponent.js';\r\nimport defaultOptions from './defaults/options.js';\r\n\r\nimport Cell from '../cell/Cell.js';\r\n\r\nclass Column extends CoreFeature{\r\n\r\n\tconstructor(def, parent){\r\n\t\tsuper(parent.table);\r\n\r\n\t\tthis.definition = def; //column definition\r\n\t\tthis.parent = parent; //hold parent object\r\n\t\tthis.type = \"column\"; //type of element\r\n\t\tthis.columns = []; //child columns\r\n\t\tthis.cells = []; //cells bound to this column\r\n\t\tthis.element = this.createElement(); //column header element\r\n\t\tthis.contentElement = false;\r\n\t\tthis.titleHolderElement = false;\r\n\t\tthis.titleElement = false;\r\n\t\tthis.groupElement = this.createGroupElement(); //column group holder element\r\n\t\tthis.isGroup = false;\r\n\t\tthis.tooltip = false; //hold column tooltip\r\n\t\tthis.hozAlign = \"\"; //horizontal text alignment\r\n\t\tthis.vertAlign = \"\"; //vert text alignment\r\n\r\n\t\t//multi dimensional filed handling\r\n\t\tthis.field =\"\";\r\n\t\tthis.fieldStructure = \"\";\r\n\t\tthis.getFieldValue = \"\";\r\n\t\tthis.setFieldValue = \"\";\r\n\r\n\t\tthis.titleDownload = null;\r\n\t\tthis.titleFormatterRendered = false;\r\n\r\n\t\tthis.mapDefinitions();\r\n\r\n\t\tthis.setField(this.definition.field);\r\n\r\n\t\tthis.modules = {}; //hold module variables;\r\n\r\n\t\tthis.width = null; //column width\r\n\t\tthis.widthStyled = \"\"; //column width prestyled to improve render efficiency\r\n\t\tthis.maxWidth = null; //column maximum width\r\n\t\tthis.maxWidthStyled = \"\"; //column maximum prestyled to improve render efficiency\r\n\t\tthis.maxInitialWidth = null;\r\n\t\tthis.minWidth = null; //column minimum width\r\n\t\tthis.minWidthStyled = \"\"; //column minimum prestyled to improve render efficiency\r\n\t\tthis.widthFixed = false; //user has specified a width for this column\r\n\r\n\t\tthis.visible = true; //default visible state\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\t//initialize column\r\n\t\tif(this.definition.columns){\r\n\r\n\t\t\tthis.isGroup = true;\r\n\r\n\t\t\tthis.definition.columns.forEach((def, i) => {\r\n\t\t\t\tvar newCol = new Column(def, this);\r\n\t\t\t\tthis.attachColumn(newCol);\r\n\t\t\t});\r\n\r\n\t\t\tthis.checkColumnVisibility();\r\n\t\t}else{\r\n\t\t\tparent.registerColumnField(this);\r\n\t\t}\r\n\r\n\t\tthis._initialize();\r\n\r\n\t\tthis.bindModuleColumns();\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-col\");\r\n\t\tel.setAttribute(\"role\", \"columnheader\");\r\n\t\tel.setAttribute(\"aria-sort\", \"none\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateGroupElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-col-group-cols\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tmapDefinitions(){\r\n\t\tvar defaults = this.table.options.columnDefaults;\r\n\r\n\t\t//map columnDefaults onto column definitions\r\n\t\tif(defaults){\r\n\t\t\tfor(let key in defaults){\r\n\t\t\t\tif(typeof this.definition[key] === \"undefined\"){\r\n\t\t\t\t\tthis.definition[key] = defaults[key];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.definition = this.table.columnManager.optionsList.generate(Column.defaultOptionList, this.definition)\r\n\t}\r\n\r\n\tcheckDefinition(){\r\n\t\tObject.keys(this.definition).forEach((key) => {\r\n\t\t\tif(Column.defaultOptionList.indexOf(key) === -1){\r\n\t\t\t\tconsole.warn(\"Invalid column definition option in '\" + (this.field || this.definition.title) + \"' column:\", key)\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tsetField(field){\r\n\t\tthis.field = field;\r\n\t\tthis.fieldStructure = field ? (this.table.options.nestedFieldSeparator ? field.split(this.table.options.nestedFieldSeparator) : [field]) : [];\r\n\t\tthis.getFieldValue = this.fieldStructure.length > 1 ? this._getNestedData : this._getFlatData;\r\n\t\tthis.setFieldValue = this.fieldStructure.length > 1 ? this._setNestedData : this._setFlatData;\r\n\t}\r\n\r\n\t//register column position with column manager\r\n\tregisterColumnPosition(column){\r\n\t\tthis.parent.registerColumnPosition(column);\r\n\t}\r\n\r\n\t//register column position with column manager\r\n\tregisterColumnField(column){\r\n\t\tthis.parent.registerColumnField(column);\r\n\t}\r\n\r\n\t//trigger position registration\r\n\treRegisterPosition(){\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tcolumn.reRegisterPosition();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis.registerColumnPosition(this);\r\n\t\t}\r\n\t}\r\n\r\n\t_mapDepricatedFunctionality(){\r\n\t\t//all previously deprecated functionality removed in the 5.0 release\r\n\t}\r\n\r\n\tsetTooltip(){\r\n\t\tvar def = this.definition;\r\n\r\n\t\t//set header tooltips\r\n\t\tvar tooltip = def.headerTooltip;\r\n\r\n\t\tif(tooltip){\r\n\t\t\tif(tooltip === true){\r\n\t\t\t\tif(def.field){\r\n\t\t\t\t\tthis.langBind(\"columns|\" + def.field, (value) => {\r\n\t\t\t\t\t\tthis.element.setAttribute(\"title\", value || def.title);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.element.setAttribute(\"title\", def.title);\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tif(typeof(tooltip) == \"function\"){\r\n\t\t\t\t\ttooltip = tooltip(this.getComponent());\r\n\r\n\t\t\t\t\tif(tooltip === false){\r\n\t\t\t\t\t\ttooltip = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.element.setAttribute(\"title\", tooltip);\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tthis.element.setAttribute(\"title\", \"\");\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element\r\n\t_initialize(){\r\n\t\tvar def = this.definition;\r\n\r\n\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\tif(def.headerVertical){\r\n\t\t\tthis.element.classList.add(\"tabulator-col-vertical\");\r\n\r\n\t\t\tif(def.headerVertical === \"flip\"){\r\n\t\t\t\tthis.element.classList.add(\"tabulator-col-vertical-flip\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.contentElement = this._bindEvents();\r\n\r\n\t\tthis.contentElement = this._buildColumnHeaderContent();\r\n\r\n\t\tthis.element.appendChild(this.contentElement);\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis._buildGroupHeader();\r\n\t\t}else{\r\n\t\t\tthis._buildColumnHeader();\r\n\t\t}\r\n\r\n\t\tthis.setTooltip();\r\n\r\n\t\tthis.dispatch(\"column-init\", this);\r\n\r\n\t\t//update header tooltip on mouse enter\r\n\t\tthis.element.addEventListener(\"mouseenter\", (e) => {\r\n\t\t\tthis.setTooltip();\r\n\t\t});\r\n\t}\r\n\r\n\t_bindEvents(){\r\n\t\tvar def = this.definition,\r\n\t\tdblTap,\ttapHold, tap;\r\n\r\n\t\t//setup header click event bindings\r\n\t\tif(typeof(def.headerClick) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"click\", (e) => {def.headerClick(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerDblClick) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"dblclick\", (e) => {def.headerDblClick(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerContext) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"contextmenu\", (e) => {def.headerContext(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\t//setup header tap event bindings\r\n\t\tif(typeof(def.headerTap) == \"function\"){\r\n\t\t\ttap = false;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchstart\", (e) => {\r\n\t\t\t\ttap = true;\r\n\t\t\t}, {passive: true});\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\t\t\t\tif(tap){\r\n\t\t\t\t\tdef.headerTap(e, this.getComponent());\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttap = false;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerDblTap) == \"function\"){\r\n\t\t\tdblTap = null;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\r\n\t\t\t\tif(dblTap){\r\n\t\t\t\t\tclearTimeout(dblTap);\r\n\t\t\t\t\tdblTap = null;\r\n\r\n\t\t\t\t\tdef.headerDblTap(e, this.getComponent());\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tdblTap = setTimeout(() => {\r\n\t\t\t\t\t\tclearTimeout(dblTap);\r\n\t\t\t\t\t\tdblTap = null;\r\n\t\t\t\t\t}, 300);\r\n\t\t\t\t}\r\n\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerTapHold) == \"function\"){\r\n\t\t\ttapHold = null;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchstart\", (e) => {\r\n\t\t\t\tclearTimeout(tapHold);\r\n\r\n\t\t\t\ttapHold = setTimeout(function(){\r\n\t\t\t\t\tclearTimeout(tapHold);\r\n\t\t\t\t\ttapHold = null;\r\n\t\t\t\t\ttap = false;\r\n\t\t\t\t\tdef.headerTapHold(e, this.getComponent());\r\n\t\t\t\t}, 1000);\r\n\r\n\t\t\t}, {passive: true});\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\t\t\t\tclearTimeout(tapHold);\r\n\t\t\t\ttapHold = null;\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element for header\r\n\t_buildColumnHeader(){\r\n\t\tvar def = this.definition,\r\n\t\ttable = this.table;\r\n\r\n\t\tthis.dispatch(\"column-layout\", this);\r\n\r\n\t\t//set column visibility\r\n\t\tif(typeof def.visible != \"undefined\"){\r\n\t\t\tif(def.visible){\r\n\t\t\t\tthis.show(true);\r\n\t\t\t}else{\r\n\t\t\t\tthis.hide(true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//asign additional css classes to column header\r\n\t\tif(def.cssClass){\r\n\t\t\tvar classeNames = def.cssClass.split(\" \");\r\n\t\t\tclasseNames.forEach((className) => {\r\n\t\t\t\tthis.element.classList.add(className);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(def.field){\r\n\t\t\tthis.element.setAttribute(\"tabulator-field\", def.field);\r\n\t\t}\r\n\r\n\t\t//set min width if present\r\n\t\tthis.setMinWidth(parseInt(def.minWidth));\r\n\r\n\t\tif (def.maxInitialWidth) {\r\n\t\t\tthis.maxInitialWidth = parseInt(def.maxInitialWidth);\r\n\t\t}\r\n\t\t\r\n\t\tif(def.maxWidth){\r\n\t\t\tthis.setMaxWidth(parseInt(def.maxWidth));\r\n\t\t}\r\n\r\n\t\tthis.reinitializeWidth();\r\n\r\n\t\t//set tooltip if present\r\n\t\tthis.tooltip = this.definition.tooltip;\r\n\r\n\t\t//set orizontal text alignment\r\n\t\tthis.hozAlign = this.definition.hozAlign;\r\n\t\tthis.vertAlign = this.definition.vertAlign;\r\n\r\n\t\tthis.titleElement.style.textAlign = this.definition.headerHozAlign;\r\n\t}\r\n\r\n\t_buildColumnHeaderContent(){\r\n\t\tvar def = this.definition,\r\n\t\ttable = this.table;\r\n\r\n\t\tvar contentElement = document.createElement(\"div\");\r\n\t\tcontentElement.classList.add(\"tabulator-col-content\");\r\n\r\n\t\tthis.titleHolderElement = document.createElement(\"div\");\r\n\t\tthis.titleHolderElement.classList.add(\"tabulator-col-title-holder\");\r\n\r\n\t\tcontentElement.appendChild(this.titleHolderElement);\r\n\r\n\t\tthis.titleElement = this._buildColumnHeaderTitle();\r\n\r\n\t\tthis.titleHolderElement.appendChild(this.titleElement);\r\n\r\n\t\treturn contentElement;\r\n\t}\r\n\r\n\t//build title element of column\r\n\t_buildColumnHeaderTitle(){\r\n\t\tvar def = this.definition,\r\n\t\ttitle;\r\n\r\n\t\tvar titleHolderElement = document.createElement(\"div\");\r\n\t\ttitleHolderElement.classList.add(\"tabulator-col-title\");\r\n\r\n\t\tif(def.editableTitle){\r\n\t\t\tvar titleElement = document.createElement(\"input\");\r\n\t\t\ttitleElement.classList.add(\"tabulator-title-editor\");\r\n\r\n\t\t\ttitleElement.addEventListener(\"click\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\ttitleElement.focus();\r\n\t\t\t});\r\n\r\n\t\t\ttitleElement.addEventListener(\"change\", () => {\r\n\t\t\t\tdef.title = titleElement.value;\r\n\t\t\t\tthis.dispatchExternal(\"columnTitleChanged\", this.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\ttitleHolderElement.appendChild(titleElement);\r\n\r\n\t\t\tif(def.field){\r\n\t\t\t\tthis.langBind(\"columns|\" + def.field, (text) => {\r\n\t\t\t\t\ttitleElement.value = text || (def.title || \" \");\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\ttitleElement.value = def.title || \" \";\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tif(def.field){\r\n\t\t\t\tthis.langBind(\"columns|\" + def.field, (text) => {\r\n\t\t\t\t\tthis._formatColumnHeaderTitle(titleHolderElement, text || (def.title || \" \"));\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tthis._formatColumnHeaderTitle(titleHolderElement, def.title || \" \");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn titleHolderElement;\r\n\t}\r\n\r\n\t_formatColumnHeaderTitle(el, title){\r\n\t\tvar contents = this.chain(\"column-format\", [this, title, el], null, () => {\r\n\t\t\treturn title;\r\n\t\t});\r\n\r\n\t\tswitch(typeof contents){\r\n\t\t\tcase \"object\":\r\n\t\t\tif(contents instanceof Node){\r\n\t\t\t\tel.appendChild(contents);\r\n\t\t\t}else{\r\n\t\t\t\tel.innerHTML = \"\";\r\n\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);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\tcase \"null\":\r\n\t\t\tel.innerHTML = \"\";\r\n\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\tel.innerHTML = contents;\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element for column group\r\n\t_buildGroupHeader(){\r\n\t\tthis.element.classList.add(\"tabulator-col-group\");\r\n\t\tthis.element.setAttribute(\"role\", \"columngroup\");\r\n\t\tthis.element.setAttribute(\"aria-title\", this.definition.title);\r\n\r\n\t\t//asign additional css classes to column header\r\n\t\tif(this.definition.cssClass){\r\n\t\t\tvar classeNames = this.definition.cssClass.split(\" \");\r\n\t\t\tclasseNames.forEach((className) => {\r\n\t\t\t\tthis.element.classList.add(className);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.titleElement.style.textAlign = this.definition.headerHozAlign;\r\n\r\n\t\tthis.element.appendChild(this.groupElement);\r\n\t}\r\n\r\n\t//flat field lookup\r\n\t_getFlatData(data){\r\n\t\treturn data[this.field];\r\n\t}\r\n\r\n\t//nested field lookup\r\n\t_getNestedData(data){\r\n\t\tvar dataObj = data,\r\n\t\tstructure = this.fieldStructure,\r\n\t\tlength = structure.length,\r\n\t\toutput;\r\n\r\n\t\tfor(let i = 0; i < length; i++){\r\n\r\n\t\t\tdataObj = dataObj[structure[i]];\r\n\r\n\t\t\toutput = dataObj;\r\n\r\n\t\t\tif(!dataObj){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//flat field set\r\n\t_setFlatData(data, value){\r\n\t\tif(this.field){\r\n\t\t\tdata[this.field] = value;\r\n\t\t}\r\n\t}\r\n\r\n\t//nested field set\r\n\t_setNestedData(data, value){\r\n\t\tvar dataObj = data,\r\n\t\tstructure = this.fieldStructure,\r\n\t\tlength = structure.length;\r\n\r\n\t\tfor(let i = 0; i < length; i++){\r\n\r\n\t\t\tif(i == length -1){\r\n\t\t\t\tdataObj[structure[i]] = value;\r\n\t\t\t}else{\r\n\t\t\t\tif(!dataObj[structure[i]]){\r\n\t\t\t\t\tif(typeof value !== \"undefined\"){\r\n\t\t\t\t\t\tdataObj[structure[i]] = {};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdataObj = dataObj[structure[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//attach column to this group\r\n\tattachColumn(column){\r\n\t\tif(this.groupElement){\r\n\t\t\tthis.columns.push(column);\r\n\t\t\tthis.groupElement.appendChild(column.getElement());\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Warning - Column being attached to another column instead of column group\");\r\n\t\t}\r\n\t}\r\n\r\n\t//vertically align header in column\r\n\tverticalAlign(alignment, height){\r\n\r\n\t\t//calculate height of column header and group holder element\r\n\t\tvar parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : (height || this.parent.getHeadersElement().clientHeight);\r\n\t\t// var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : this.parent.getHeadersElement().clientHeight;\r\n\r\n\t\tthis.element.style.height = parentHeight + \"px\";\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.groupElement.style.minHeight = (parentHeight - this.contentElement.offsetHeight) + \"px\";\r\n\t\t}\r\n\r\n\t\t//vertically align cell contents\r\n\t\tif(!this.isGroup && alignment !== \"top\"){\r\n\t\t\tif(alignment === \"bottom\"){\r\n\t\t\t\tthis.element.style.paddingTop = (this.element.clientHeight - this.contentElement.offsetHeight) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.paddingTop = ((this.element.clientHeight - this.contentElement.offsetHeight) / 2) + \"px\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.verticalAlign(alignment);\r\n\t\t});\r\n\t}\r\n\r\n\t//clear vertical alignmenet\r\n\tclearVerticalAlign(){\r\n\t\tthis.element.style.paddingTop = \"\";\r\n\t\tthis.element.style.height = \"\";\r\n\t\tthis.element.style.minHeight = \"\";\r\n\t\tthis.groupElement.style.minHeight = \"\";\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.clearVerticalAlign();\r\n\t\t});\r\n\t}\r\n\r\n\tbindModuleColumns (){\r\n\t\t//check if rownum formatter is being used on a column\r\n\t\tif(this.definition.formatter == \"rownum\"){\r\n\t\t\tthis.table.rowManager.rowNumColumn = this;\r\n\t\t}\r\n\t}\r\n\r\n\t//// Retreive Column Information ////\r\n\t//return column header element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\t//return colunm group element\r\n\tgetGroupElement(){\r\n\t\treturn this.groupElement;\r\n\t}\r\n\r\n\t//return field name\r\n\tgetField(){\r\n\t\treturn this.field;\r\n\t}\r\n\r\n\tgetTitleDownload() {\r\n\t\treturn this.titleDownload;\r\n\t}\r\n\r\n\t//return the first column in a group\r\n\tgetFirstColumn(){\r\n\t\tif(!this.isGroup){\r\n\t\t\treturn this;\r\n\t\t}else{\r\n\t\t\tif(this.columns.length){\r\n\t\t\t\treturn this.columns[0].getFirstColumn();\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//return the last column in a group\r\n\tgetLastColumn(){\r\n\t\tif(!this.isGroup){\r\n\t\t\treturn this;\r\n\t\t}else{\r\n\t\t\tif(this.columns.length){\r\n\t\t\t\treturn this.columns[this.columns.length -1].getLastColumn();\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//return all columns in a group\r\n\tgetColumns(){\r\n\t\treturn this.columns;\r\n\t}\r\n\r\n\t//return all columns in a group\r\n\tgetCells(){\r\n\t\treturn this.cells;\r\n\t}\r\n\r\n\t//retreive the top column in a group of columns\r\n\tgetTopColumn(){\r\n\t\tif(this.parent.isGroup){\r\n\t\t\treturn this.parent.getTopColumn();\r\n\t\t}else{\r\n\t\t\treturn this;\r\n\t\t}\r\n\t}\r\n\r\n\t//return column definition object\r\n\tgetDefinition(updateBranches){\r\n\t\tvar colDefs = [];\r\n\r\n\t\tif(this.isGroup && updateBranches){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tcolDefs.push(column.getDefinition(true));\r\n\t\t\t});\r\n\r\n\t\t\tthis.definition.columns = colDefs;\r\n\t\t}\r\n\r\n\t\treturn this.definition;\r\n\t}\r\n\r\n\t//////////////////// Actions ////////////////////\r\n\tcheckColumnVisibility(){\r\n\t\tvar visible = false;\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvisible = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(visible){\r\n\t\t\tthis.show();\r\n\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), false);\r\n\t\t}else{\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\r\n\t//show column\r\n\tshow(silent, responsiveToggle){\r\n\t\tif(!this.visible){\r\n\t\t\tthis.visible = true;\r\n\r\n\t\t\tthis.element.style.display = \"\";\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.checkColumnVisibility();\r\n\t\t\t}\r\n\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.show();\r\n\t\t\t});\r\n\r\n\t\t\tif(!this.isGroup && this.width === null){\r\n\t\t\t\tthis.reinitializeWidth();\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.columnManager.verticalAlignHeaders();\r\n\r\n\t\t\tthis.dispatch(\"column-show\", this, responsiveToggle);\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), true);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\r\n\t\t\tif(!this.silent){\r\n\t\t\t\tthis.table.columnManager.renderer.rerenderColumns();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//hide column\r\n\thide(silent, responsiveToggle){\r\n\t\tif(this.visible){\r\n\t\t\tthis.visible = false;\r\n\r\n\t\t\tthis.element.style.display = \"none\";\r\n\r\n\t\t\tthis.table.columnManager.verticalAlignHeaders();\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.checkColumnVisibility();\r\n\t\t\t}\r\n\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.hide();\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatch(\"column-hide\", this, responsiveToggle);\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), false);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\r\n\t\t\tif(!this.silent){\r\n\t\t\t\tthis.table.columnManager.renderer.rerenderColumns();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmatchChildWidths(){\r\n\t\tvar childWidth = 0;\r\n\r\n\t\tif(this.contentElement && this.columns.length){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tif(column.visible){\r\n\t\t\t\t\tchildWidth += column.getWidth();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.contentElement.style.maxWidth = (childWidth - 1) + \"px\";\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tremoveChild(child){\r\n\t\tvar index = this.columns.indexOf(child);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columns.splice(index, 1);\r\n\t\t}\r\n\r\n\t\tif(!this.columns.length){\r\n\t\t\tthis.delete();\r\n\t\t}\r\n\t}\r\n\r\n\tsetWidth(width){\r\n\t\tthis.widthFixed = true;\r\n\t\tthis.setWidthActual(width);\r\n\t}\r\n\r\n\tsetWidthActual(width){\r\n\t\tif(isNaN(width)){\r\n\t\t\twidth = Math.floor((this.table.element.clientWidth/100) * parseInt(width));\r\n\t\t}\r\n\r\n\t\twidth = Math.max(this.minWidth, width);\r\n\r\n\t\tif(this.maxWidth){\r\n\t\t\twidth = Math.min(this.maxWidth, width);\r\n\t\t}\r\n\r\n\t\tthis.width = width;\r\n\t\tthis.widthStyled = width ? width + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.width = this.widthStyled;\r\n\r\n\t\tif(!this.isGroup){\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.setWidth();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.parent.isGroup){\r\n\t\t\tthis.parent.matchChildWidths();\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"column-width\", this);\r\n\t}\r\n\r\n\tcheckCellHeights(){\r\n\t\tvar rows = [];\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tif(cell.row.heightInitialized){\r\n\t\t\t\tif(cell.row.getElement().offsetParent !== null){\r\n\t\t\t\t\trows.push(cell.row);\r\n\t\t\t\t\tcell.row.clearCellHeight();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcell.row.heightInitialized = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\trow.calcHeight();\r\n\t\t});\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\trow.setCellHeight();\r\n\t\t});\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\tvar width = 0;\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tif(column.visible){\r\n\t\t\t\t\twidth += column.getWidth();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\twidth = this.width;\r\n\t\t}\r\n\r\n\t\treturn width;\r\n\t}\r\n\r\n\tgetHeight(){\r\n\t\treturn Math.ceil(this.element.getBoundingClientRect().height);\r\n\t}\r\n\r\n\tsetMinWidth(minWidth){\r\n\t\tthis.minWidth = minWidth;\r\n\t\tthis.minWidthStyled = minWidth ? minWidth + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.minWidth = this.minWidthStyled;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setMinWidth();\r\n\t\t});\r\n\t}\r\n\r\n\tsetMaxWidth(maxWidth){\r\n\t\tthis.maxWidth = maxWidth;\r\n\t\tthis.maxWidthStyled = maxWidth ? maxWidth + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.maxWidth = this.maxWidthStyled;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setMaxWidth();\r\n\t\t});\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar index;\r\n\r\n\t\t\tif(this.isGroup){\r\n\t\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\t\tcolumn.delete();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"column-delete\", this);\r\n\r\n\t\t\tvar cellCount = this.cells.length;\r\n\r\n\t\t\tfor(let i = 0; i < cellCount; i++){\r\n\t\t\t\tthis.cells[0].delete();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.element.parentNode){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element = false;\r\n\t\t\tthis.contentElement = false;\r\n\t\t\tthis.titleElement = false;\r\n\t\t\tthis.groupElement = false;\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.removeChild(this);\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.columnManager.deregisterColumn(this);\r\n\r\n\t\t\tthis.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\r\n\tcolumnRendered(){\r\n\t\tif(this.titleFormatterRendered){\r\n\t\t\tthis.titleFormatterRendered();\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\t//generate cell for this column\r\n\tgenerateCell(row){\r\n\t\tvar cell = new Cell(this, row);\r\n\r\n\t\tthis.cells.push(cell);\r\n\r\n\t\treturn cell;\r\n\t}\r\n\r\n\tnextColumn(){\r\n\t\tvar index = this.table.columnManager.findColumnIndex(this);\r\n\t\treturn index > -1 ? this._nextVisibleColumn(index + 1) : false;\r\n\t}\r\n\r\n\t_nextVisibleColumn(index){\r\n\t\tvar column = this.table.columnManager.getColumnByIndex(index);\r\n\t\treturn !column || column.visible ? column : this._nextVisibleColumn(index + 1);\r\n\t}\r\n\r\n\tprevColumn(){\r\n\t\tvar index = this.table.columnManager.findColumnIndex(this);\r\n\t\treturn index > -1 ? this._prevVisibleColumn(index - 1) : false;\r\n\t}\r\n\r\n\t_prevVisibleColumn(index){\r\n\t\tvar column = this.table.columnManager.getColumnByIndex(index);\r\n\t\treturn !column || column.visible ? column : this._prevVisibleColumn(index - 1);\r\n\t}\r\n\r\n\treinitializeWidth(force){\r\n\t\tthis.widthFixed = false;\r\n\r\n\t\t//set width if present\r\n\t\tif(typeof this.definition.width !== \"undefined\" && !force){\r\n\t\t\t// maxInitialWidth ignored here as width specified\r\n\t\t\tthis.setWidth(this.definition.width);\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"column-width-fit-before\", this);\r\n\r\n\t\tthis.fitToData(force);\r\n\r\n\t\tthis.dispatch(\"column-width-fit-after\", this);\r\n\t}\r\n\r\n\t//set column width to maximum cell width for non group columns\r\n\tfitToData(force){\r\n\t\tif(this.isGroup){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif(!this.widthFixed){\r\n\t\t\tthis.element.style.width = \"\";\r\n\r\n\t\t\tthis.cells.forEach((cell) => {\r\n\t\t\t\tcell.clearWidth();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tvar maxWidth = this.element.offsetWidth;\r\n\r\n\t\tif(!this.width || !this.widthFixed){\r\n\t\t\tthis.cells.forEach((cell) => {\r\n\t\t\t\tvar width = cell.getWidth();\r\n\r\n\t\t\t\tif(width > maxWidth){\r\n\t\t\t\t\tmaxWidth = width;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(maxWidth){\r\n\t\t\t\tvar setTo = maxWidth + 1;\r\n\t\t\t\tif (this.maxInitialWidth && !force) {\r\n\t\t\t\t\tsetTo = Math.min(setTo, this.maxInitialWidth);\r\n\t\t\t\t}\r\n\t\t\t\tthis.setWidthActual(setTo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateDefinition(updates){\r\n\t\tvar definition;\r\n\r\n\t\tif(!this.isGroup){\r\n\t\t\tif(!this.parent.isGroup){\r\n\t\t\t\tdefinition = Object.assign({}, this.getDefinition());\r\n\t\t\t\tdefinition = Object.assign(definition, updates);\r\n\r\n\t\t\t\treturn this.table.columnManager.addColumn(definition, false, this)\r\n\t\t\t\t.then((column) => {\r\n\r\n\t\t\t\t\tif(definition.field == this.field){\r\n\t\t\t\t\t\tthis.field = false; //cleair field name to prevent deletion of duplicate column from arrays\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn this.delete()\r\n\t\t\t\t\t.then(() => {\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Column Update Error - The updateDefinition function is only available on ungrouped columns\");\r\n\t\t\t\treturn Promise.reject(\"Column Update Error - The updateDefinition function is only available on columns, not column groups\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Column Update Error - The updateDefinition function is only available on ungrouped columns\");\r\n\t\t\treturn Promise.reject(\"Column Update Error - The updateDefinition function is only available on columns, not column groups\");\r\n\t\t}\r\n\t}\r\n\r\n\tdeleteCell(cell){\r\n\t\tvar index = this.cells.indexOf(cell);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.cells.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new ColumnComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}\r\n\r\nColumn.defaultOptionList = defaultOptions;\r\n\r\nexport default Column;","//public row object\r\nexport default class RowComponent {\r\n\r\n\tconstructor (row){\r\n\t\tthis._row = row;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._row.table.componentFunctionBinder.handle(\"row\", target._row, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\treturn this._row.getData(transform);\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._row.getElement();\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._row.getCells().forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar cell = this._row.getCell(column);\r\n\t\treturn cell ? cell.getComponent() : false;\r\n\t}\r\n\r\n\tgetIndex(){\r\n\t\treturn this._row.getData(\"data\")[this._row.table.options.index];\r\n\t}\r\n\r\n\tgetPosition(active){\r\n\t\treturn this._row.table.rowManager.getRowPosition(this._row, active);\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn this._row.delete();\r\n\t}\r\n\r\n\tscrollTo(){\r\n\t\treturn this._row.table.rowManager.scrollToRow(this._row);\r\n\t}\r\n\r\n\tmove(to, after){\r\n\t\tthis._row.moveToRow(to, after);\r\n\t}\r\n\r\n\tupdate(data){\r\n\t\treturn this._row.updateData(data);\r\n\t}\r\n\r\n\tnormalizeHeight(){\r\n\t\tthis._row.normalizeHeight(true);\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._row;\r\n\t}\r\n\r\n\treformat(){\r\n\t\treturn this._row.reinitialize();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._row.table;\r\n\t}\r\n\r\n\tgetNextRow(){\r\n\t\tvar row = this._row.nextRow();\r\n\t\treturn row ? row.getComponent() : row;\r\n\t}\r\n\r\n\tgetPrevRow(){\r\n\t\tvar row = this._row.prevRow();\r\n\t\treturn row ? row.getComponent() : row;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport RowComponent from './RowComponent.js';\r\nimport Helpers from '../tools/Helpers.js';\r\n\r\nexport default class Row extends CoreFeature{\r\n\tconstructor (data, parent, type = \"row\"){\r\n\t\tsuper(parent.table);\r\n\r\n\t\tthis.parent = parent;\r\n\t\tthis.data = {};\r\n\t\tthis.type = type; //type of element\r\n\t\tthis.element = false;\r\n\t\tthis.modules = {}; //hold module variables;\r\n\t\tthis.cells = [];\r\n\t\tthis.height = 0; //hold element height\r\n\t\tthis.heightStyled = \"\"; //hold element height prestyled to improve render efficiency\r\n\t\tthis.manualHeight = false; //user has manually set row height\r\n\t\tthis.outerHeight = 0; //holde lements outer height\r\n\t\tthis.initialized = false; //element has been rendered\r\n\t\tthis.heightInitialized = false; //element has resized cells to fit\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\tthis.created = false;\r\n\r\n\t\tthis.setData(data);\r\n\t}\r\n\r\n\tcreate(){\r\n\t\tif(!this.created){\r\n\t\t\tthis.created = true;\r\n\t\t\tthis.generateElement();\r\n\t\t}\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\r\n\t\tthis.element = el;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\tthis.create();\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tdetachElement(){\r\n\t\tif (this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateElement(){\r\n\t\tthis.createElement();\r\n\t\tthis.dispatch(\"row-init\", this);\r\n\t}\r\n\r\n\tgenerateCells(){\r\n\t\tthis.cells = this.table.columnManager.generateCells(this);\r\n\t}\r\n\r\n\t//functions to setup on first render\r\n\tinitialize(force){\r\n\t\tthis.create();\r\n\r\n\t\tif(!this.initialized || force){\r\n\r\n\t\t\tthis.deleteCells();\r\n\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\tthis.dispatch(\"row-layout-before\", this);\r\n\r\n\t\t\tthis.generateCells();\r\n\r\n\t\t\tthis.initialized = true;\r\n\r\n\t\t\tthis.table.columnManager.renderer.renderRowCells(this);\r\n\r\n\t\t\tif(force){\r\n\t\t\t\tthis.normalizeHeight();\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-layout\", this);\r\n\r\n\t\t\tif(this.table.options.rowFormatter){\r\n\t\t\t\tthis.table.options.rowFormatter(this.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-layout-after\", this);\r\n\t\t}else{\r\n\t\t\tthis.table.columnManager.renderer.rerenderRowCells(this);\r\n\t\t}\r\n\t}\r\n\r\n\treinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\r\n\t\tif(this.element && this.element.offsetParent !== null){\r\n\t\t\tthis.normalizeHeight(true);\r\n\t\t}\r\n\t}\r\n\r\n\tdeinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\t}\r\n\r\n\treinitialize(children){\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\r\n\t\tif(!this.manualHeight){\r\n\t\t\tthis.height = 0;\r\n\t\t\tthis.heightStyled = \"\";\r\n\t\t}\r\n\r\n\t\tif(this.element && this.element.offsetParent !== null){\r\n\t\t\tthis.initialize(true);\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"row-relayout\", this);\r\n\t}\r\n\r\n\t//get heights when doing bulk row style calcs in virtual DOM\r\n\tcalcHeight(force){\r\n\r\n\t\tvar maxHeight = 0,\r\n\t\tminHeight = this.table.options.resizableRows ? this.element.clientHeight : 0;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tvar height = cell.getHeight();\r\n\t\t\tif(height > maxHeight){\r\n\t\t\t\tmaxHeight = height;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(force){\r\n\t\t\tthis.height = Math.max(maxHeight, minHeight);\r\n\t\t}else{\r\n\t\t\tthis.height = this.manualHeight ? this.height : Math.max(maxHeight, minHeight);\r\n\t\t}\r\n\r\n\t\tthis.heightStyled = this.height ? this.height + \"px\" : \"\";\r\n\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t}\r\n\r\n\t//set of cells\r\n\tsetCellHeight(){\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setHeight();\r\n\t\t});\r\n\r\n\t\tthis.heightInitialized = true;\r\n\t}\r\n\r\n\tclearCellHeight(){\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.clearHeight();\r\n\t\t});\r\n\t}\r\n\r\n\t//normalize the height of elements in the row\r\n\tnormalizeHeight(force){\r\n\t\tif(force){\r\n\t\t\tthis.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis.calcHeight(force);\r\n\r\n\t\tthis.setCellHeight();\r\n\t}\r\n\r\n\t//set height of rows\r\n\tsetHeight(height, force){\r\n\t\tif(this.height != height || force){\r\n\r\n\t\t\tthis.manualHeight = true;\r\n\r\n\t\t\tthis.height = height;\r\n\t\t\tthis.heightStyled = height ? height + \"px\" : \"\";\r\n\r\n\t\t\tthis.setCellHeight();\r\n\r\n\t\t\t// this.outerHeight = this.element.outerHeight();\r\n\t\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t\t}\r\n\t}\r\n\r\n\t//return rows outer height\r\n\tgetHeight(){\r\n\t\treturn this.outerHeight;\r\n\t}\r\n\r\n\t//return rows outer Width\r\n\tgetWidth(){\r\n\t\treturn this.element.offsetWidth;\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\tdeleteCell(cell){\r\n\t\tvar index = this.cells.indexOf(cell);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.cells.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Data Management /////////////////\r\n\tsetData(data){\r\n\t\tthis.data = this.chain(\"row-data-init-before\", [this, data], undefined, data);\r\n\r\n\t\tthis.dispatch(\"row-data-init-after\", this);\r\n\t}\r\n\r\n\t//update the rows data\r\n\tupdateData(updatedData){\r\n\t\tvar visible = this.element && Helpers.elVisible(this.element),\r\n\t\ttempData = {},\r\n\t\tnewRowData;\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\r\n\t\t\tif(typeof updatedData === \"string\"){\r\n\t\t\t\tupdatedData = JSON.parse(updatedData);\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-save-before\", this);\r\n\r\n\t\t\tif(this.subscribed(\"row-data-changing\")){\r\n\t\t\t\ttempData = Object.assign(tempData, this.data);\r\n\t\t\t\ttempData = Object.assign(tempData, updatedData);\r\n\t\t\t}\r\n\r\n\t\t\tnewRowData = this.chain(\"row-data-changing\", [this, tempData, updatedData], null, updatedData);\r\n\r\n\t\t\t//set data\r\n\t\t\tfor (var attrname in newRowData) {\r\n\t\t\t\tthis.data[attrname] = newRowData[attrname];\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-save-after\", this);\r\n\r\n\t\t\t//update affected cells only\r\n\t\t\tfor (var attrname in updatedData) {\r\n\r\n\t\t\t\tlet columns = this.table.columnManager.getColumnsByFieldRoot(attrname);\r\n\r\n\t\t\t\tcolumns.forEach((column) => {\r\n\t\t\t\t\tlet cell = this.getCell(column.getField());\r\n\r\n\t\t\t\t\tif(cell){\r\n\t\t\t\t\t\tlet value = column.getFieldValue(newRowData);\r\n\t\t\t\t\t\tif(cell.getValue() != value){\r\n\t\t\t\t\t\t\tcell.setValueProcessData(value);\r\n\r\n\t\t\t\t\t\t\tif(visible){\r\n\t\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t//Partial reinitialization if visible\r\n\t\t\tif(visible){\r\n\t\t\t\tthis.normalizeHeight(true);\r\n\r\n\t\t\t\tif(this.table.options.rowFormatter){\r\n\t\t\t\t\tthis.table.options.rowFormatter(this.getComponent());\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.initialized = false;\r\n\t\t\t\tthis.height = 0;\r\n\t\t\t\tthis.heightStyled = \"\";\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-changed\", this, visible, updatedData);\r\n\r\n\t\t\t//this.reinitialize();\r\n\r\n\t\t\tthis.dispatchExternal(\"rowUpdated\", this.getComponent());\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t\t}\r\n\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\tif(transform){\r\n\t\t\treturn this.chain(\"row-data-retrieve\", [this, transform], null, this.data);\r\n\t\t}\r\n\r\n\t\treturn this.data;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar match = false;\r\n\r\n\t\tcolumn = this.table.columnManager.findColumn(column);\r\n\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\r\n\t\tmatch = this.cells.find(function(cell){\r\n\t\t\treturn cell.column === column;\r\n\t\t});\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tgetCellIndex(findCell){\r\n\t\treturn this.cells.findIndex(function(cell){\r\n\t\t\treturn cell === findCell;\r\n\t\t});\r\n\t}\r\n\r\n\tfindCell(subject){\r\n\t\treturn this.cells.find((cell) => {\r\n\t\t\treturn cell.element === subject;\r\n\t\t});\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\r\n\t\treturn this.cells;\r\n\t}\r\n\r\n\tnextRow(){\r\n\t\tvar row = this.table.rowManager.nextDisplayRow(this, true);\r\n\t\treturn row || false;\r\n\t}\r\n\r\n\tprevRow(){\r\n\t\tvar row = this.table.rowManager.prevDisplayRow(this, true);\r\n\t\treturn row || false;\r\n\t}\r\n\r\n\tmoveToRow(to, before){\r\n\t\tvar toRow = this.table.rowManager.findRow(to);\r\n\r\n\t\tif(toRow){\r\n\t\t\tthis.table.rowManager.moveRowActual(this, toRow, !before);\r\n\t\t\tthis.table.rowManager.refreshActiveData(\"display\", false, true);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching row found:\", to);\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////// Actions /////////////////////\r\n\tdelete(){\r\n\t\tthis.dispatch(\"row-delete\", this);\r\n\r\n\t\tthis.deleteActual();\r\n\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\r\n\tdeleteActual(blockRedraw){\r\n\t\tvar index = this.table.rowManager.getRowIndex(this);\r\n\r\n\t\tthis.detatchModules();\r\n\r\n\t\tthis.table.rowManager.deleteRow(this, blockRedraw);\r\n\r\n\t\tthis.deleteCells();\r\n\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\t\tthis.element = false;\r\n\r\n\t\tthis.dispatch(\"row-deleted\", this);\r\n\t}\r\n\r\n\tdetatchModules(){\r\n\t\tthis.dispatch(\"row-deleting\", this);\r\n\t}\r\n\r\n\tdeleteCells(){\r\n\t\tvar cellCount = this.cells.length;\r\n\r\n\t\tfor(let i = 0; i < cellCount; i++){\r\n\t\t\tthis.cells[0].delete();\r\n\t\t}\r\n\t}\r\n\r\n\twipe(){\r\n\t\tthis.detatchModules();\r\n\t\tthis.deleteCells();\r\n\r\n\t\tif(this.element){\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\tif(this.element.parentNode){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.modules = {};\r\n\t}\r\n\r\n\tgetGroup(){\r\n\t\treturn this.modules.group || false;\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new RowComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}","export default {\r\n\t\"avg\":function(values, data, calcParams){\r\n\t\tvar output = 0,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : 2\r\n\r\n\t\tif(values.length){\r\n\t\t\toutput = values.reduce(function(sum, value){\r\n\t\t\t\treturn Number(sum) + Number(value);\r\n\t\t\t});\r\n\r\n\t\t\toutput = output / values.length;\r\n\r\n\t\t\toutput = precision !== false ? output.toFixed(precision) : output;\r\n\t\t}\r\n\r\n\t\treturn parseFloat(output).toString();\r\n\t},\r\n\t\"max\":function(values, data, calcParams){\r\n\t\tvar output = null,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tvalues.forEach(function(value){\r\n\r\n\t\t\tvalue = Number(value);\r\n\r\n\t\t\tif(value > output || output === null){\r\n\t\t\t\toutput = value;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output !== null ? (precision !== false ? output.toFixed(precision) : output) : \"\";\r\n\t},\r\n\t\"min\":function(values, data, calcParams){\r\n\t\tvar output = null,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tvalues.forEach(function(value){\r\n\r\n\t\t\tvalue = Number(value);\r\n\r\n\t\t\tif(value < output || output === null){\r\n\t\t\t\toutput = value;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output !== null ? (precision !== false ? output.toFixed(precision) : output) : \"\";\r\n\t},\r\n\t\"sum\":function(values, data, calcParams){\r\n\t\tvar output = 0,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tif(values.length){\r\n\t\t\tvalues.forEach(function(value){\r\n\t\t\t\tvalue = Number(value);\r\n\r\n\t\t\t\toutput += !isNaN(value) ? Number(value) : 0;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn precision !== false ? output.toFixed(precision) : output;\r\n\t},\r\n\t\"concat\":function(values, data, calcParams){\r\n\t\tvar output = 0;\r\n\r\n\t\tif(values.length){\r\n\t\t\toutput = values.reduce(function(sum, value){\r\n\t\t\t\treturn String(sum) + String(value);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t},\r\n\t\"count\":function(values, data, calcParams){\r\n\t\tvar output = 0;\r\n\r\n\t\tif(values.length){\r\n\t\t\tvalues.forEach(function(value){\r\n\t\t\t\tif(value){\r\n\t\t\t\t\toutput ++;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport CalcComponent from './CalcComponent.js';\r\n\r\nimport Cell from '../../core/cell/Cell.js';\r\nimport Column from '../../core/column/Column.js';\r\nimport Row from '../../core/row/Row.js';\r\n\r\nimport defaultCalculations from './defaults/calculations.js';\r\n\r\nclass ColumnCalcs extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.topCalcs = [];\r\n\t\tthis.botCalcs = [];\r\n\t\tthis.genColumn = false;\r\n\t\tthis.topElement = this.createElement();\r\n\t\tthis.botElement = this.createElement();\r\n\t\tthis.topRow = false;\r\n\t\tthis.botRow = false;\r\n\t\tthis.topInitialized = false;\r\n\t\tthis.botInitialized = false;\r\n\r\n\t\tthis.registerTableOption(\"columnCalcs\", true);\r\n\r\n\t\tthis.registerColumnOption(\"topCalc\");\r\n\t\tthis.registerColumnOption(\"topCalcParams\");\r\n\t\tthis.registerColumnOption(\"topCalcFormatter\");\r\n\t\tthis.registerColumnOption(\"topCalcFormatterParams\");\r\n\t\tthis.registerColumnOption(\"bottomCalc\");\r\n\t\tthis.registerColumnOption(\"bottomCalcParams\");\r\n\t\tthis.registerColumnOption(\"bottomCalcFormatter\");\r\n\t\tthis.registerColumnOption(\"bottomCalcFormatterParams\");\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-calcs-holder\");\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.genColumn = new Column({field:\"value\"}, this);\r\n\r\n\t\tthis.subscribe(\"cell-value-changed\", this.cellValueChanged.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumnCheck.bind(this));\r\n\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t\tthis.subscribe(\"row-added\", this.rowsUpdated.bind(this));\r\n\t\tthis.subscribe(\"column-moved\", this.recalcActiveRows.bind(this));\r\n\t\tthis.subscribe(\"column-add\", this.recalcActiveRows.bind(this));\r\n\t\tthis.subscribe(\"data-refreshed\", this.recalcActiveRowsRefresh.bind(this));\r\n\t\tthis.subscribe(\"table-redraw\", this.tableRedraw.bind(this));\r\n\t\tthis.subscribe(\"rows-visible\", this.visibleRows.bind(this));\r\n\r\n\t\tthis.registerTableFunction(\"getCalcResults\", this.getResults.bind(this));\r\n\t\tthis.registerTableFunction(\"recalc\", this.userRecalc.bind(this));\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\r\n\t\tif(force){\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\tuserRecalc(){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tvisibleRows(viewable, rows){\r\n\t\tif(this.topRow){\r\n\t\t\trows.unshift(this.topRow);\r\n\t\t}\r\n\r\n\t\tif(this.botRow){\r\n\t\t\trows.push(this.botRow);\r\n\t\t}\r\n\t\r\n\t\treturn rows;\r\n\t}\r\n\r\n\trowsUpdated(row){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.recalcRowGroup(this);\r\n\t\t}else{\r\n\t\t\tthis.recalcActiveRows();\r\n\t\t}\r\n\t}\r\n\r\n\trecalcActiveRowsRefresh(){\r\n\t\tif(this.table.options.groupBy && this.table.options.dataTreeStartExpanded && this.table.options.dataTree){\r\n\t\t\tthis.recalcAll();\r\n\t\t}else{\r\n\t\t\tthis.recalcActiveRows();\r\n\t\t}\r\n\t}\r\n\r\n\trecalcActiveRows(){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t}\r\n\r\n\tcellValueChanged(cell){\r\n\t\tif(cell.column.definition.topCalc || cell.column.definition.bottomCalc){\r\n\t\t\tif(this.table.options.groupBy){\r\n\t\t\t\tif(this.table.options.columnCalcs == \"table\" || this.table.options.columnCalcs == \"both\"){\r\n\t\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"table\"){\r\n\t\t\t\t\tthis.recalcRowGroup(cell.row);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(column.definition.topCalc || column.definition.bottomCalc){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column calcs\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition\r\n\r\n\t\tvar config = {\r\n\t\t\ttopCalcParams:def.topCalcParams || {},\r\n\t\t\tbotCalcParams:def.bottomCalcParams || {},\r\n\t\t};\r\n\r\n\t\tif(def.topCalc){\r\n\r\n\t\t\tswitch(typeof def.topCalc){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(ColumnCalcs.calculations[def.topCalc]){\r\n\t\t\t\t\tconfig.topCalc = ColumnCalcs.calculations[def.topCalc]\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.topCalc);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tconfig.topCalc = def.topCalc;\r\n\t\t\t\tbreak\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(config.topCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.topCalcs.push(column);\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"group\"){\r\n\t\t\t\t\tthis.initializeTopRow();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tif(def.bottomCalc){\r\n\t\t\tswitch(typeof def.bottomCalc){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(ColumnCalcs.calculations[def.bottomCalc]){\r\n\t\t\t\t\tconfig.botCalc = ColumnCalcs.calculations[def.bottomCalc]\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.bottomCalc);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tconfig.botCalc = def.bottomCalc;\r\n\t\t\t\tbreak\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(config.botCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.botCalcs.push(column);\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"group\"){\r\n\t\t\t\t\tthis.initializeBottomRow();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t//dummy functions to handle being mock column manager\r\n\tregisterColumnField(){};\r\n\r\n\tremoveCalcs(){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(this.topInitialized){\r\n\t\t\tthis.topInitialized = false;\r\n\t\t\tthis.topElement.parentNode.removeChild(this.topElement);\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\r\n\t\tif(this.botInitialized){\r\n\t\t\tthis.botInitialized = false;\r\n\t\t\tthis.table.footerManager.remove(this.botElement);\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeTopRow(){\r\n\t\tif(!this.topInitialized){\r\n\t\t\tthis.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\r\n\t\t\tthis.topInitialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeBottomRow(){\r\n\t\tif(!this.botInitialized){\r\n\t\t\tthis.table.footerManager.prepend(this.botElement);\r\n\t\t\tthis.botInitialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tscrollHorizontal(left){\r\n\t\tif(this.botInitialized && this.botRow){\r\n\t\t\tthis.botRow.getElement().style.marginLeft = (-left) + \"px\";\r\n\t\t}\r\n\t}\r\n\r\n\trecalc(rows){\r\n\t\tvar data, row;\r\n\r\n\t\tif(this.topInitialized || this.botInitialized){\r\n\t\t\tdata = this.rowsToData(rows);\r\n\r\n\t\t\tif(this.topInitialized){\r\n\t\t\t\tif(this.topRow){\r\n\t\t\t\t\tthis.topRow.deleteCells();\r\n\t\t\t\t}\r\n\r\n\t\t\t\trow = this.generateRow(\"top\", this.rowsToData(rows))\r\n\t\t\t\tthis.topRow = row;\r\n\t\t\t\twhile(this.topElement.firstChild) this.topElement.removeChild(this.topElement.firstChild);\r\n\t\t\t\tthis.topElement.appendChild(row.getElement());\r\n\t\t\t\trow.initialize(true);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.botInitialized){\r\n\t\t\t\tif(this.botRow){\r\n\t\t\t\t\tthis.botRow.deleteCells();\r\n\t\t\t\t}\r\n\r\n\t\t\t\trow = this.generateRow(\"bottom\", this.rowsToData(rows))\r\n\t\t\t\tthis.botRow = row;\r\n\t\t\t\twhile(this.botElement.firstChild) this.botElement.removeChild(this.botElement.firstChild);\r\n\t\t\t\tthis.botElement.appendChild(row.getElement());\r\n\t\t\t\trow.initialize(true);\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\t//set resizable handles\r\n\t\t\tif(this.table.modExists(\"frozenColumns\")){\r\n\t\t\t\tthis.table.modules.frozenColumns.layout();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trecalcRowGroup(row){\r\n\t\tthis.recalcGroup(this.table.modules.groupRows.getRowGroup(row));\r\n\t}\r\n\r\n\trecalcAll(){\r\n\t\tif(this.topCalcs.length || this.botCalcs.length){\r\n\t\t\tif(this.table.options.columnCalcs !== \"group\"){\r\n\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.groupBy && this.table.options.columnCalcs !== \"table\"){\r\n\r\n\t\t\t\tvar groups = this.table.modules.groupRows.getChildGroups();\r\n\r\n\t\t\t\tgroups.forEach((group) => {\r\n\t\t\t\t\tthis.recalcGroup(group);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trecalcGroup(group){\r\n\t\tvar data, rowData;\r\n\r\n\t\tif(group){\r\n\t\t\tif(group.calcs){\r\n\t\t\t\tif(group.calcs.bottom){\r\n\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\trowData = this.generateRowData(\"bottom\", data);\r\n\r\n\t\t\t\t\tgroup.calcs.bottom.updateData(rowData);\r\n\t\t\t\t\tgroup.calcs.bottom.reinitialize();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(group.calcs.top){\r\n\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\trowData = this.generateRowData(\"top\", data);\r\n\r\n\t\t\t\t\tgroup.calcs.top.updateData(rowData);\r\n\t\t\t\t\tgroup.calcs.top.reinitialize();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//generate top stats row\r\n\tgenerateTopRow(rows){\r\n\t\treturn this.generateRow(\"top\", this.rowsToData(rows));\r\n\t}\r\n\t//generate bottom stats row\r\n\tgenerateBottomRow(rows){\r\n\t\treturn this.generateRow(\"bottom\", this.rowsToData(rows));\r\n\t}\r\n\r\n\trowsToData(rows){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\trows.forEach((row) => {\r\n\t\t\tdata.push(row.getData());\r\n\r\n\t\t\tif(this.table.options.dataTree && this.table.options.dataTreeChildColumnCalcs){\r\n\t\t\t\tif(row.modules.dataTree && row.modules.dataTree.open){\r\n\t\t\t\t\tvar children = this.rowsToData(this.table.modules.dataTree.getFilteredTreeChildren(row));\r\n\t\t\t\t\tdata = data.concat(children);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//generate stats row\r\n\tgenerateRow(pos, data){\r\n\t\tvar rowData = this.generateRowData(pos, data),\r\n\t\trow;\r\n\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.disable();\r\n\t\t}\r\n\r\n\t\trow = new Row(rowData, this, \"calc\");\r\n\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.enable();\r\n\t\t}\r\n\r\n\t\trow.getElement().classList.add(\"tabulator-calcs\", \"tabulator-calcs-\" + pos);\r\n\r\n\t\trow.component = false;\r\n\r\n\t\trow.getComponent = () => {\r\n\t\t\tif(!row.component){\r\n\t\t\t\trow.component = new CalcComponent(row);\r\n\t\t\t}\r\n\r\n\t\t\treturn row.component;\r\n\t\t};\r\n\r\n\t\trow.generateCells = () => {\r\n\r\n\t\t\tvar cells = [];\r\n\r\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\r\n\t\t\t\t\t//set field name of mock column\r\n\t\t\t\t\tthis.genColumn.setField(column.getField());\r\n\t\t\t\t\tthis.genColumn.hozAlign = column.hozAlign;\r\n\r\n\t\t\t\t\tif(column.definition[pos + \"CalcFormatter\"] && this.table.modExists(\"format\")){\r\n\t\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(column.definition[pos + \"CalcFormatter\"]),\r\n\t\t\t\t\t\t\tparams: column.definition[pos + \"CalcFormatterParams\"] || {},\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(\"plaintext\"),\r\n\t\t\t\t\t\t\tparams:{}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//ensure css class defintion is replicated to calculation cell\r\n\t\t\t\t\tthis.genColumn.definition.cssClass = column.definition.cssClass;\r\n\r\n\t\t\t\t\t//generate cell and assign to correct column\r\n\t\t\t\t\tvar cell = new Cell(this.genColumn, row);\r\n\t\t\t\t\tcell.getElement();\r\n\t\t\t\t\tcell.column = column;\r\n\t\t\t\t\tcell.setWidth();\r\n\r\n\t\t\t\t\tcolumn.cells.push(cell);\r\n\t\t\t\t\tcells.push(cell);\r\n\r\n\t\t\t\t\tif(!column.visible){\r\n\t\t\t\t\t\tcell.hide();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\trow.cells = cells;\r\n\t\t};\r\n\r\n\t\treturn row;\r\n\t}\r\n\r\n\t//generate stats row\r\n\tgenerateRowData(pos, data){\r\n\t\tvar rowData = {},\r\n\t\tcalcs = pos == \"top\" ? this.topCalcs : this.botCalcs,\r\n\t\ttype = pos == \"top\" ? \"topCalc\" : \"botCalc\",\r\n\t\tparams, paramKey;\r\n\r\n\t\tcalcs.forEach(function(column){\r\n\t\t\tvar values = [];\r\n\r\n\t\t\tif(column.modules.columnCalcs && column.modules.columnCalcs[type]){\r\n\t\t\t\tdata.forEach(function(item){\r\n\t\t\t\t\tvalues.push(column.getFieldValue(item));\r\n\t\t\t\t});\r\n\r\n\t\t\t\tparamKey = type + \"Params\";\r\n\t\t\t\tparams = typeof column.modules.columnCalcs[paramKey] === \"function\" ? column.modules.columnCalcs[paramKey](values, data) : column.modules.columnCalcs[paramKey];\r\n\r\n\t\t\t\tcolumn.setFieldValue(rowData, column.modules.columnCalcs[type](values, data, params));\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowData;\r\n\t}\r\n\r\n\thasTopCalcs(){\r\n\t\treturn\t!!(this.topCalcs.length);\r\n\t}\r\n\r\n\thasBottomCalcs(){\r\n\t\treturn\t!!(this.botCalcs.length);\r\n\t}\r\n\r\n\t//handle table redraw\r\n\tredraw(){\r\n\t\tif(this.topRow){\r\n\t\t\tthis.topRow.normalizeHeight(true);\r\n\t\t}\r\n\t\tif(this.botRow){\r\n\t\t\tthis.botRow.normalizeHeight(true);\r\n\t\t}\r\n\t}\r\n\r\n\t//return the calculated\r\n\tgetResults(){\r\n\t\tvar results = {},\r\n\t\tgroups;\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tgroups = this.table.modules.groupRows.getGroups(true);\r\n\r\n\t\t\tgroups.forEach((group) => {\r\n\t\t\t\tresults[group.getKey()] = this.getGroupResults(group);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tresults = {\r\n\t\t\t\ttop: this.topRow ? this.topRow.getData() : {},\r\n\t\t\t\tbottom: this.botRow ? this.botRow.getData() : {},\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n\r\n\t//get results from a group\r\n\tgetGroupResults(group){\r\n\t\tvar groupObj = group._getSelf(),\r\n\t\tsubGroups = group.getSubGroups(),\r\n\t\tsubGroupResults = {},\r\n\t\tresults = {};\r\n\r\n\t\tsubGroups.forEach((subgroup) => {\r\n\t\t\tsubGroupResults[subgroup.getKey()] = this.getGroupResults(subgroup);\r\n\t\t});\r\n\r\n\t\tresults = {\r\n\t\t\ttop: groupObj.calcs.top ? groupObj.calcs.top.getData() : {},\r\n\t\t\tbottom: groupObj.calcs.bottom ? groupObj.calcs.bottom.getData() : {},\r\n\t\t\tgroups: subGroupResults,\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n}\r\n\r\nColumnCalcs.moduleName = \"columnCalcs\";\r\n\r\n//load defaults\r\nColumnCalcs.calculations = defaultCalculations;\r\n\r\nexport default ColumnCalcs;","import Module from '../../core/Module.js';\r\n\r\nimport Row from '../../core/row/Row.js';\r\n\r\nclass DataTree extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.indent = 10;\r\n\t\tthis.field = \"\";\r\n\t\tthis.collapseEl = null;\r\n\t\tthis.expandEl = null;\r\n\t\tthis.branchEl = null;\r\n\t\tthis.elementField = false;\r\n\r\n\t\tthis.startOpen = function(){};\r\n\r\n\t\tthis.displayIndex = 0;\r\n\r\n\t\tthis.registerTableOption(\"dataTree\", false); //enable data tree\r\n\t\tthis.registerTableOption(\"dataTreeFilter\", true); //filter child rows\r\n\t\tthis.registerTableOption(\"dataTreeSort\", true); //sort child rows\r\n\t\tthis.registerTableOption(\"dataTreeElementColumn\", false);\r\n\t\tthis.registerTableOption(\"dataTreeBranchElement\", true);//show data tree branch element\r\n\t\tthis.registerTableOption(\"dataTreeChildIndent\", 9); //data tree child indent in px\r\n\t\tthis.registerTableOption(\"dataTreeChildField\", \"_children\");//data tre column field to look for child rows\r\n\t\tthis.registerTableOption(\"dataTreeCollapseElement\", false);//data tree row collapse element\r\n\t\tthis.registerTableOption(\"dataTreeExpandElement\", false);//data tree row expand element\r\n\t\tthis.registerTableOption(\"dataTreeStartExpanded\", false);\r\n\t\tthis.registerTableOption(\"dataTreeChildColumnCalcs\", false);//include visible data tree rows in column calculations\r\n\t\tthis.registerTableOption(\"dataTreeSelectPropagate\", false);//seleccting a parent row selects its children\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"treeCollapse\", this.collapseRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"treeExpand\", this.expandRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"treeToggle\", this.toggleRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"getTreeParent\", this.getTreeParent.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"getTreeChildren\", this.getRowChildren.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"addTreeChild\", this.addTreeChildRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isTreeExpanded\", this.isRowExpanded.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.dataTree){\r\n\t\t\tvar dummyEl = null,\r\n\t\t\toptions = this.table.options;\r\n\r\n\t\t\tthis.field = options.dataTreeChildField;\r\n\t\t\tthis.indent = options.dataTreeChildIndent;\r\n\r\n\t\t\tif(options.dataTreeBranchElement){\r\n\r\n\t\t\t\tif(options.dataTreeBranchElement === true){\r\n\t\t\t\t\tthis.branchEl = document.createElement(\"div\");\r\n\t\t\t\t\tthis.branchEl.classList.add(\"tabulator-data-tree-branch\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(typeof options.dataTreeBranchElement === \"string\"){\r\n\t\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\t\tdummyEl.innerHTML = options.dataTreeBranchElement;\r\n\t\t\t\t\t\tthis.branchEl = dummyEl.firstChild;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.branchEl = options.dataTreeBranchElement;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(options.dataTreeCollapseElement){\r\n\t\t\t\tif(typeof options.dataTreeCollapseElement === \"string\"){\r\n\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\tdummyEl.innerHTML = options.dataTreeCollapseElement;\r\n\t\t\t\t\tthis.collapseEl = dummyEl.firstChild;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.collapseEl = options.dataTreeCollapseElement;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.collapseEl = document.createElement(\"div\");\r\n\t\t\t\tthis.collapseEl.classList.add(\"tabulator-data-tree-control\");\r\n\t\t\t\tthis.collapseEl.tabIndex = 0;\r\n\t\t\t\tthis.collapseEl.innerHTML = \"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif(options.dataTreeExpandElement){\r\n\t\t\t\tif(typeof options.dataTreeExpandElement === \"string\"){\r\n\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\tdummyEl.innerHTML = options.dataTreeExpandElement;\r\n\t\t\t\t\tthis.expandEl = dummyEl.firstChild;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.expandEl = options.dataTreeExpandElement;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.expandEl = document.createElement(\"div\");\r\n\t\t\t\tthis.expandEl.classList.add(\"tabulator-data-tree-control\");\r\n\t\t\t\tthis.expandEl.tabIndex = 0;\r\n\t\t\t\tthis.expandEl.innerHTML = \"
\";\r\n\t\t\t}\r\n\r\n\r\n\t\t\tswitch(typeof options.dataTreeStartExpanded){\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\treturn options.dataTreeStartExpanded;\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tthis.startOpen = options.dataTreeStartExpanded;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\treturn options.dataTreeStartExpanded[index];\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-layout-after\", this.layoutRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowDelete.bind(this),0);\r\n\t\t\tthis.subscribe(\"row-data-changed\", this.rowDataChanged.bind(this), 10);\r\n\t\t\tthis.subscribe(\"cell-value-updated\", this.cellValueChanged.bind(this));\r\n\t\t\tthis.subscribe(\"edit-cancelled\", this.cellValueChanged.bind(this));\r\n\t\t\tthis.subscribe(\"column-moving-rows\", this.columnMoving.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.initializeElementField.bind(this));\r\n\r\n\t\t\tthis.registerDisplayHandler(this.getRows.bind(this), 30);\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeElementField(){\r\n\t\tvar firstCol = this.table.columnManager.getFirstVisibleColumn();\r\n\r\n\t\tthis.elementField = this.table.options.dataTreeElementColumn || (firstCol ? firstCol.field : false);\r\n\t}\r\n\t\r\n\tgetRowChildren(row){\r\n\t\treturn this.getTreeChildren(row, true);\r\n\t}\r\n\r\n\tcolumnMoving(){\r\n\t\tvar rows = [];\r\n\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\trows = rows.concat(this.getTreeChildren(row, false, true));\r\n\t\t});\r\n\r\n\t\treturn rows;\r\n\t}\r\n\r\n\trowDataChanged(row, visible, updatedData){\r\n\t\tif(this.redrawNeeded(updatedData)){\r\n\t\t\tthis.initializeRow(row);\r\n\r\n\t\t\tif(visible){\r\n\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tcellValueChanged(cell){\r\n\t\tvar field = cell.column.getField();\r\n\r\n\t\tif(field === this.elementField){\r\n\t\t\tthis.layoutRow(cell.row);\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar childArray = row.getData()[this.field];\r\n\t\tvar isArray = Array.isArray(childArray);\r\n\r\n\t\tvar children = isArray || (!isArray && typeof childArray === \"object\" && childArray !== null);\r\n\r\n\t\tif(!children && row.modules.dataTree && row.modules.dataTree.branchEl){\r\n\t\t\trow.modules.dataTree.branchEl.parentNode.removeChild(row.modules.dataTree.branchEl);\r\n\t\t}\r\n\r\n\t\tif(!children && row.modules.dataTree && row.modules.dataTree.controlEl){\r\n\t\t\trow.modules.dataTree.controlEl.parentNode.removeChild(row.modules.dataTree.controlEl);\r\n\t\t}\r\n\r\n\t\trow.modules.dataTree = {\r\n\t\t\tindex: row.modules.dataTree ? row.modules.dataTree.index : 0,\r\n\t\t\topen: children ? (row.modules.dataTree ? row.modules.dataTree.open : this.startOpen(row.getComponent(), 0)) : false,\r\n\t\t\tcontrolEl: row.modules.dataTree && children ? row.modules.dataTree.controlEl : false,\r\n\t\t\tbranchEl: row.modules.dataTree && children ? row.modules.dataTree.branchEl : false,\r\n\t\t\tparent: row.modules.dataTree ? row.modules.dataTree.parent : false,\r\n\t\t\tchildren:children,\r\n\t\t};\r\n\t}\r\n\r\n\treinitializeRowChildren(row){\r\n\t\tvar children = this.getTreeChildren(row, false, true);\r\n\r\n\t\tchildren.forEach(function(child){\r\n\t\t\tchild.reinitialize(true);\r\n\t\t});\r\n\t}\r\n\r\n\tlayoutRow(row){\r\n\t\tvar cell = this.elementField ? row.getCell(this.elementField) : row.getCells()[0],\r\n\t\tel = cell.getElement(),\r\n\t\tconfig = row.modules.dataTree;\r\n\r\n\t\tif(config.branchEl){\r\n\t\t\tif(config.branchEl.parentNode){\r\n\t\t\t\tconfig.branchEl.parentNode.removeChild(config.branchEl);\r\n\t\t\t}\r\n\t\t\tconfig.branchEl = false;\r\n\t\t}\r\n\r\n\t\tif(config.controlEl){\r\n\t\t\tif(config.controlEl.parentNode){\r\n\t\t\t\tconfig.controlEl.parentNode.removeChild(config.controlEl);\r\n\t\t\t}\r\n\t\t\tconfig.controlEl = false;\r\n\t\t}\r\n\r\n\t\tthis.generateControlElement(row, el);\r\n\r\n\t\trow.getElement().classList.add(\"tabulator-tree-level-\" + config.index);\r\n\r\n\t\tif(config.index){\r\n\t\t\tif(this.branchEl){\r\n\t\t\t\tconfig.branchEl = this.branchEl.cloneNode(true);\r\n\t\t\t\tel.insertBefore(config.branchEl, el.firstChild);\r\n\r\n\t\t\t\tif(this.table.rtl){\r\n\t\t\t\t\tconfig.branchEl.style.marginRight = (((config.branchEl.offsetWidth + config.branchEl.style.marginLeft) * (config.index - 1)) + (config.index * this.indent)) + \"px\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.branchEl.style.marginLeft = (((config.branchEl.offsetWidth + config.branchEl.style.marginRight) * (config.index - 1)) + (config.index * this.indent)) + \"px\";\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\r\n\t\t\t\tif(this.table.rtl){\r\n\t\t\t\t\tel.style.paddingRight = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-right')) + (config.index * this.indent) + \"px\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.style.paddingLeft = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-left')) + (config.index * this.indent) + \"px\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateControlElement(row, el){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\tel = el || row.getCells()[0].getElement(),\r\n\t\toldControl = config.controlEl;\r\n\r\n\t\tif(config.children !== false){\r\n\r\n\t\t\tif(config.open){\r\n\t\t\t\tconfig.controlEl = this.collapseEl.cloneNode(true);\r\n\t\t\t\tconfig.controlEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tthis.collapseRow(row);\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconfig.controlEl = this.expandEl.cloneNode(true);\r\n\t\t\t\tconfig.controlEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tthis.expandRow(row);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tconfig.controlEl.addEventListener(\"mousedown\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\r\n\t\t\tif(oldControl && oldControl.parentNode === el){\r\n\t\t\t\toldControl.parentNode.replaceChild(config.controlEl,oldControl);\r\n\t\t\t}else{\r\n\t\t\t\tel.insertBefore(config.controlEl, el.firstChild);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tsetDisplayIndex (index) {\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\r\n\tgetDisplayIndex () {\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\r\n\tgetRows(rows){\r\n\t\tvar output = [];\r\n\r\n\t\trows.forEach((row, i) => {\r\n\t\t\tvar config, children;\r\n\r\n\t\t\toutput.push(row);\r\n\r\n\t\t\tif(row instanceof Row){\r\n\r\n\t\t\t\trow.create();\r\n\r\n\t\t\t\tconfig = row.modules.dataTree.children;\r\n\r\n\t\t\t\tif(!config.index && config.children !== false){\r\n\t\t\t\t\tchildren = this.getChildren(row);\r\n\r\n\t\t\t\t\tchildren.forEach((child) => {\r\n\t\t\t\t\t\tchild.create();\r\n\t\t\t\t\t\toutput.push(child);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetChildren(row, allChildren){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\tchildren = [],\r\n\t\toutput = [];\r\n\r\n\t\tif(config.children !== false && (config.open || allChildren)){\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"filter\") && this.table.options.dataTreeFilter){\r\n\t\t\t\tchildren = this.table.modules.filter.filter(config.children);\r\n\t\t\t}else{\r\n\t\t\t\tchildren = config.children;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"sort\") && this.table.options.dataTreeSort){\r\n\t\t\t\tthis.table.modules.sort.sort(children);\r\n\t\t\t}\r\n\r\n\t\t\tchildren.forEach((child) => {\r\n\t\t\t\toutput.push(child);\r\n\r\n\t\t\t\tvar subChildren = this.getChildren(child);\r\n\r\n\t\t\t\tsubChildren.forEach((sub) => {\r\n\t\t\t\t\toutput.push(sub);\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgenerateChildren(row){\r\n\t\tvar children = [];\r\n\r\n\t\tvar childArray = row.getData()[this.field];\r\n\r\n\t\tif(!Array.isArray(childArray)){\r\n\t\t\tchildArray = [childArray];\r\n\t\t}\r\n\r\n\t\tchildArray.forEach((childData) => {\r\n\t\t\tvar childRow = new Row(childData || {}, this.table.rowManager);\r\n\r\n\t\t\tchildRow.create();\r\n\r\n\t\t\tchildRow.modules.dataTree.index = row.modules.dataTree.index + 1;\r\n\t\t\tchildRow.modules.dataTree.parent = row;\r\n\r\n\t\t\tif(childRow.modules.dataTree.children){\r\n\t\t\t\tchildRow.modules.dataTree.open = this.startOpen(childRow.getComponent(), childRow.modules.dataTree.index);\r\n\t\t\t}\r\n\t\t\tchildren.push(childRow);\r\n\t\t});\r\n\r\n\t\treturn children;\r\n\t}\r\n\r\n\texpandRow(row, silent){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tconfig.open = true;\r\n\r\n\t\t\trow.reinitialize();\r\n\r\n\t\t\tthis.refreshData(true);\r\n\r\n\t\t\tthis.dispatchExternal(\"dataTreeRowExpanded\", row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\t}\r\n\r\n\tcollapseRow(row){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tconfig.open = false;\r\n\r\n\t\t\trow.reinitialize();\r\n\r\n\t\t\tthis.refreshData(true);\r\n\r\n\t\t\tthis.dispatchExternal(\"dataTreeRowCollapsed\", row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\t}\r\n\r\n\ttoggleRow(row){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tif(config.open){\r\n\t\t\t\tthis.collapseRow(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.expandRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tisRowExpanded(row){\r\n\t\treturn row.modules.dataTree.open;\r\n\t}\r\n\r\n\tgetTreeParent(row){\r\n\t\treturn row.modules.dataTree.parent ? row.modules.dataTree.parent.getComponent() : false;\r\n\t}\r\n\r\n\tgetFilteredTreeChildren(row){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\toutput = [], children;\r\n\r\n\t\tif(config.children){\r\n\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"filter\") && this.table.options.dataTreeFilter){\r\n\t\t\t\tchildren = this.table.modules.filter.filter(config.children);\r\n\t\t\t}else{\r\n\t\t\t\tchildren = config.children;\r\n\t\t\t}\r\n\r\n\t\t\tchildren.forEach((childRow) => {\r\n\t\t\t\tif(childRow instanceof Row){\r\n\t\t\t\t\toutput.push(childRow);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\trowDelete(row){\r\n\t\tvar parent = row.modules.dataTree.parent,\r\n\t\tchildIndex;\r\n\r\n\t\tif(parent){\r\n\t\t\tchildIndex = this.findChildIndex(row, parent);\r\n\r\n\t\t\tif(childIndex !== false){\r\n\t\t\t\tparent.data[this.field].splice(childIndex, 1);\r\n\t\t\t}\r\n\r\n\t\t\tif(!parent.data[this.field].length){\r\n\t\t\t\tdelete parent.data[this.field];\r\n\t\t\t}\r\n\r\n\t\t\tthis.initializeRow(parent);\r\n\t\t\tthis.layoutRow(parent);\r\n\t\t}\r\n\r\n\t\tthis.refreshData(true);\r\n\t}\r\n\r\n\taddTreeChildRow(row, data, top, index){\r\n\t\tvar childIndex = false;\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(row.data[this.field])){\r\n\t\t\trow.data[this.field] = [];\r\n\r\n\t\t\trow.modules.dataTree.open = this.startOpen(row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\r\n\t\tif(typeof index !== \"undefined\"){\r\n\t\t\tchildIndex = this.findChildIndex(index, row);\r\n\r\n\t\t\tif(childIndex !== false){\r\n\t\t\t\trow.data[this.field].splice((top ? childIndex : childIndex + 1), 0, data);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(childIndex === false){\r\n\t\t\tif(top){\r\n\t\t\t\trow.data[this.field].unshift(data);\r\n\t\t\t}else{\r\n\t\t\t\trow.data[this.field].push(data);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.initializeRow(row);\r\n\t\tthis.layoutRow(row);\r\n\r\n\t\tthis.refreshData(true);\r\n\t}\r\n\r\n\tfindChildIndex(subject, parent){\r\n\t\tvar match = false;\r\n\r\n\t\tif(typeof subject == \"object\"){\r\n\r\n\t\t\tif(subject instanceof Row){\r\n\t\t\t\t//subject is row element\r\n\t\t\t\tmatch = subject.data;\r\n\t\t\t}else if(subject instanceof RowComponent){\r\n\t\t\t\t//subject is public row component\r\n\t\t\t\tmatch = subject._getSelf().data;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\tif(parent.modules.dataTree){\r\n\t\t\t\t\tmatch = parent.modules.dataTree.children.find((childRow) => {\r\n\t\t\t\t\t\treturn childRow instanceof Row ? childRow.element === subject : false;\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(match){\r\n\t\t\t\t\t\tmatch = match.data;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}else if(typeof subject == \"undefined\" || subject === null){\r\n\t\t\tmatch = false\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the index of the row\r\n\t\t\tmatch = parent.data[this.field].find((row) => {\r\n\t\t\t\treturn row.data[this.table.options.index] == subject;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(match){\r\n\r\n\t\t\tif(Array.isArray(parent.data[this.field])){\r\n\t\t\t\tmatch = parent.data[this.field].indexOf(match);\r\n\t\t\t}\r\n\r\n\t\t\tif(match == -1){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//catch all for any other type of input\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tgetTreeChildren(row, component, recurse){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\toutput = [];\r\n\r\n\t\tif(config.children){\r\n\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tconfig.children.forEach((childRow) => {\r\n\t\t\t\tif(childRow instanceof Row){\r\n\t\t\t\t\toutput.push(component ? childRow.getComponent() : childRow);\r\n\r\n\t\t\t\t\tif(recurse){\r\n\t\t\t\t\t\toutput = output.concat(this.getTreeChildren(childRow, component, recurse));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetChildField(){\r\n\t\treturn this.field;\r\n\t}\r\n\r\n\tredrawNeeded(data){\r\n\t\treturn (this.field ? typeof data[this.field] !== \"undefined\" : false) || (this.elementField ? typeof data[this.elementField] !== \"undefined\" : false);\r\n\t}\r\n}\r\n\r\nDataTree.moduleName = \"dataTree\";\r\n\r\nexport default DataTree;","export default function(list, options, setFileContents){\r\n\tvar delimiter = options && options.delimiter ? options.delimiter : \",\",\r\n\tfileContents = [],\r\n\theaders = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tvar item = [];\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"group\":\r\n\t\t\tconsole.warn(\"Download Warning - CSV downloader cannot process row groups\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tconsole.warn(\"Download Warning - CSV downloader cannot process column calculations\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"header\":\r\n\t\t\trow.columns.forEach((col, i) => {\r\n\t\t\t\tif(col && col.depth === 1){\r\n\t\t\t\t\theaders[i] = typeof col.value == \"undefined\" || col.value === null ? \"\" : ('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\trow.columns.forEach((col) => {\r\n\r\n\t\t\t\tif(col){\r\n\r\n\t\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tcol.value = JSON.stringify(col.value);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\t\tcol.value = \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\titem.push('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tfileContents.push(item.join(delimiter));\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(headers.length){\r\n\t\tfileContents.unshift(headers.join(delimiter));\r\n\t}\r\n\r\n\tfileContents = fileContents.join(\"\\n\");\r\n\r\n\tif(options.bom){\r\n\t\tfileContents = \"\\ufeff\" + fileContents;\r\n\t}\r\n\r\n\tsetFileContents(fileContents, \"text/csv\");\r\n};","export default function(list, options, setFileContents){\r\n\tvar fileContents = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tvar item = {};\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"header\":\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process row groups\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process column calculations\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\tif(col){\r\n\t\t\t\t\titem[col.component.getTitleDownload() || col.component.getField()] = col.value;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tfileContents.push(item);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tfileContents = JSON.stringify(fileContents, null, '\\t');\r\n\r\n\tsetFileContents(fileContents, \"application/json\");\r\n};","export default function(list, options, setFileContents){\r\n\tvar header = [],\r\n\tbody = [],\r\n\tautoTableParams = {},\r\n\trowGroupStyles = options.rowGroupStyles || {\r\n\t\tfontStyle: \"bold\",\r\n\t\tfontSize: 12,\r\n\t\tcellPadding: 6,\r\n\t\tfillColor: 220,\r\n\t},\r\n\trowCalcStyles = options.rowCalcStyles || {\r\n\t\tfontStyle: \"bold\",\r\n\t\tfontSize: 10,\r\n\t\tcellPadding: 4,\r\n\t\tfillColor: 232,\r\n\t},\r\n\tjsPDFParams = options.jsPDF || {},\r\n\ttitle = options && options.title ? options.title : \"\";\r\n\r\n\tif(!jsPDFParams.orientation){\r\n\t\tjsPDFParams.orientation = options.orientation || \"landscape\";\r\n\t}\r\n\r\n\tif(!jsPDFParams.unit){\r\n\t\tjsPDFParams.unit = \"pt\";\r\n\t}\r\n\r\n\t//parse row list\r\n\tlist.forEach((row) => {\r\n\t\tvar item = {};\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"header\":\r\n\t\t\theader.push(parseRow(row));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tbody.push(parseRow(row, rowGroupStyles));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tbody.push(parseRow(row, rowCalcStyles));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\tbody.push(parseRow(row));\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tfunction parseRow(row, styles){\r\n\t\tvar rowData = [];\r\n\r\n\t\trow.columns.forEach((col) =>{\r\n\t\t\tvar cell;\r\n\r\n\t\t\tif(col){\r\n\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tcol.value = JSON.stringify(col.value);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\tcol.value = \"\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcell = {\r\n\t\t\t\t\tcontent:col.value,\r\n\t\t\t\t\tcolSpan:col.width,\r\n\t\t\t\t\trowSpan:col.height,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tif(styles){\r\n\t\t\t\t\tcell.styles = styles;\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowData.push(cell);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowData;\r\n\t}\r\n\r\n\r\n\t//configure PDF\r\n\tvar doc = new jspdf.jsPDF(jsPDFParams); //set document to landscape, better for most tables\r\n\r\n\tif(options && options.autoTable){\r\n\t\tif(typeof options.autoTable === \"function\"){\r\n\t\t\tautoTableParams = options.autoTable(doc) || {};\r\n\t\t}else{\r\n\t\t\tautoTableParams = options.autoTable;\r\n\t\t}\r\n\t}\r\n\r\n\tif(title){\r\n\t\tautoTableParams.didDrawPage = function(data) {\r\n\t\t\tdoc.text(title, 40, 30);\r\n\t\t};\r\n\t}\r\n\r\n\tautoTableParams.head = header;\r\n\tautoTableParams.body = body;\r\n\r\n\tdoc.autoTable(autoTableParams);\r\n\r\n\tif(options && options.documentProcessing){\r\n\t\toptions.documentProcessing(doc);\r\n\t}\r\n\r\n\tsetFileContents(doc.output(\"arraybuffer\"), \"application/pdf\");\r\n};","import CoreFeature from '../../../../core/CoreFeature.js';\r\n\r\nexport default function(list, options, setFileContents){\r\n\tvar self = this,\r\n\tsheetName = options.sheetName || \"Sheet1\",\r\n\tworkbook = XLSX.utils.book_new(),\r\n\ttableFeatures = new CoreFeature(this),\r\n\toutput;\r\n\r\n\tworkbook.SheetNames = [];\r\n\tworkbook.Sheets = {};\r\n\r\n\tfunction generateSheet(){\r\n\t\tvar rows = [],\r\n\t\tmerges = [],\r\n\t\tworksheet = {},\r\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 }};\r\n\r\n\t\t//parse row list\r\n\t\tlist.forEach((row, i) => {\r\n\t\t\tvar rowData = [];\r\n\r\n\t\t\trow.columns.forEach(function(col, j){\r\n\r\n\t\t\t\tif(col){\r\n\t\t\t\t\trowData.push(!(col.value instanceof Date) && typeof col.value === \"object\" ? JSON.stringify(col.value) : col.value);\r\n\r\n\t\t\t\t\tif(col.width > 1 || col.height > -1){\r\n\t\t\t\t\t\tif(col.height > 1 || col.width > 1){\r\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}});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\trowData.push(\"\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\trows.push(rowData);\r\n\t\t});\r\n\r\n\t\t//convert rows to worksheet\r\n\t\tXLSX.utils.sheet_add_aoa(worksheet, rows);\r\n\r\n\t\tworksheet['!ref'] = XLSX.utils.encode_range(range);\r\n\r\n\t\tif(merges.length){\r\n\t\t\tworksheet[\"!merges\"] = merges;\r\n\t\t}\r\n\r\n\t\treturn worksheet;\r\n\t}\r\n\r\n\tif(options.sheetOnly){\r\n\t\tsetFileContents(generateSheet());\r\n\t\treturn;\r\n\t}\r\n\r\n\tif(options.sheets){\r\n\t\tfor(var sheet in options.sheets){\r\n\r\n\t\t\tif(options.sheets[sheet] === true){\r\n\t\t\t\tworkbook.SheetNames.push(sheet);\r\n\t\t\t\tworkbook.Sheets[sheet] = generateSheet();\r\n\t\t\t}else{\r\n\r\n\t\t\t\tworkbook.SheetNames.push(sheet);\r\n\r\n\t\t\t\ttableFeatures.commsSend(options.sheets[sheet], \"download\", \"intercept\",{\r\n\t\t\t\t\ttype:\"xlsx\",\r\n\t\t\t\t\toptions:{sheetOnly:true},\r\n\t\t\t\t\tactive:self.active,\r\n\t\t\t\t\tintercept:function(data){\r\n\t\t\t\t\t\tworkbook.Sheets[sheet] = data;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tworkbook.SheetNames.push(sheetName);\r\n\t\tworkbook.Sheets[sheetName] = generateSheet();\r\n\t}\r\n\r\n\tif(options.documentProcessing){\r\n\t\tworkbook = options.documentProcessing(workbook);\r\n\t}\r\n\r\n\t//convert workbook to binary array\r\n\tfunction s2ab(s) {\r\n\t\tvar buf = new ArrayBuffer(s.length);\r\n\t\tvar view = new Uint8Array(buf);\r\n\t\tfor (var i=0; i!=s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;\r\n\t\t\treturn buf;\r\n\t}\r\n\r\n\toutput = XLSX.write(workbook, {bookType:'xlsx', bookSST:true, type: 'binary'});\r\n\r\n\tsetFileContents(s2ab(output), \"application/octet-stream\");\r\n};","export default function(list, options, setFileContents){\r\n\tif(this.modExists(\"export\", true)){\r\n\t\tsetFileContents(this.modules.export.genereateHTMLTable(list), \"text/html\");\r\n\t}\r\n};","export default function (list, options, setFileContents) {\r\n\tconst fileContents = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tconst item = {};\r\n\r\n\t\tswitch (row.type) {\r\n\t\t\tcase \"header\":\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process row groups\");\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process column calculations\");\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\t\tif (col) {\r\n\t\t\t\t\t\titem[col.component.getTitleDownload() || col.component.getField()] = col.value;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tfileContents.push(JSON.stringify(item));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tsetFileContents(fileContents.join(\"\\n\"), \"application/x-ndjson\");\r\n};","import csv from './downloaders/csv.js';\r\nimport json from './downloaders/json.js';\r\nimport pdf from './downloaders/pdf.js';\r\nimport xlsx from './downloaders/xlsx.js';\r\nimport html from './downloaders/html.js';\r\nimport jsonLines from './downloaders/jsonLines.js';\r\n\r\nexport default {\r\n\tcsv:csv,\r\n\tjson:json,\r\n\tjsonLines:jsonLines,\r\n\tpdf:pdf,\r\n\txlsx:xlsx,\r\n\thtml:html,\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultDownloaders from './defaults/downloaders.js';\r\n\r\nclass Download extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.registerTableOption(\"downloadReady\", function(data, blob){return blob;}); //function to manipulate download data\r\n\t\tthis.registerTableOption(\"downloadConfig\", {}); //download config\r\n\t\tthis.registerTableOption(\"downloadRowRange\", \"active\"); //restrict download to active rows only\r\n\r\n\t\tthis.registerColumnOption(\"download\");\r\n\t\tthis.registerColumnOption(\"titleDownload\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"download\", this.download.bind(this));\r\n\t\tthis.registerTableFunction(\"downloadToTab\", this.downloadToTab.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tdownloadToTab(type, filename, options, active){\r\n\t\tthis.download(type, filename, options, active, true);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\t//trigger file download\r\n\tdownload(type, filename, options, range, interceptCallback){\r\n\t\tvar downloadFunc = false;\r\n\r\n\t\tfunction buildLink(data, mime){\r\n\t\t\tif(interceptCallback){\r\n\t\t\t\tif(interceptCallback === true){\r\n\t\t\t\t\tthis.triggerDownload(data, mime, type, filename, true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tinterceptCallback(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tthis.triggerDownload(data, mime, type, filename);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(typeof type == \"function\"){\r\n\t\t\tdownloadFunc = type;\r\n\t\t}else{\r\n\t\t\tif(Download.downloaders[type]){\r\n\t\t\t\tdownloadFunc = Download.downloaders[type];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Download Error - No such download type found: \", type);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(downloadFunc){\r\n\t\t\tvar list = this.generateExportList(range);\r\n\r\n\t\t\tdownloadFunc.call(this.table, list , options || {}, buildLink.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateExportList(range){\r\n\t\tvar list = this.table.modules.export.generateExportList(this.table.options.downloadConfig, false, range || this.table.options.downloadRowRange, \"download\");\r\n\r\n\t\t//assign group header formatter\r\n\t\tvar groupHeader = this.table.options.groupHeaderDownload;\r\n\r\n\t\tif(groupHeader && !Array.isArray(groupHeader)){\r\n\t\t\tgroupHeader = [groupHeader];\r\n\t\t}\r\n\r\n\t\tlist.forEach((row) => {\r\n\t\t\tvar group;\r\n\r\n\t\t\tif(row.type === \"group\"){\r\n\t\t\t\tgroup = row.columns[0];\r\n\r\n\t\t\t\tif(groupHeader && groupHeader[row.indent]){\r\n\t\t\t\t\tgroup.value = groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn list;\r\n\t}\r\n\r\n\ttriggerDownload(data, mime, type, filename, newTab){\r\n\t\tvar element = document.createElement('a'),\r\n\t\tblob = new Blob([data],{type:mime}),\r\n\t\tfilename = filename || \"Tabulator.\" + (typeof type === \"function\" ? \"txt\" : type);\r\n\r\n\t\tblob = this.table.options.downloadReady(data, blob);\r\n\r\n\t\tif(blob){\r\n\r\n\t\t\tif(newTab){\r\n\t\t\t\twindow.open(window.URL.createObjectURL(blob));\r\n\t\t\t}else{\r\n\t\t\t\tif(navigator.msSaveOrOpenBlob){\r\n\t\t\t\t\tnavigator.msSaveOrOpenBlob(blob, filename);\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.setAttribute('href', window.URL.createObjectURL(blob));\r\n\r\n\t\t\t\t\t//set file title\r\n\t\t\t\t\telement.setAttribute('download', filename);\r\n\r\n\t\t\t\t\t//trigger download\r\n\t\t\t\t\telement.style.display = 'none';\r\n\t\t\t\t\tdocument.body.appendChild(element);\r\n\t\t\t\t\telement.click();\r\n\r\n\t\t\t\t\t//remove temporary link element\r\n\t\t\t\t\tdocument.body.removeChild(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"downloadComplete\");\r\n\t\t}\r\n\t}\r\n\r\n\tcommsReceived(table, action, data){\r\n\t\tswitch(action){\r\n\t\t\tcase \"intercept\":\r\n\t\t\tthis.download(data.type, \"\", data.options, data.active, data.intercept);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nDownload.moduleName = \"download\";\r\n\r\n//load defaults\r\nDownload.downloaders = defaultDownloaders;\r\n\r\nexport default Download;","export default function maskInput(el, options){\r\n\tvar mask = options.mask,\r\n\tmaskLetter = typeof options.maskLetterChar !== \"undefined\" ? options.maskLetterChar : \"A\",\r\n\tmaskNumber = typeof options.maskNumberChar !== \"undefined\" ? options.maskNumberChar : \"9\",\r\n\tmaskWildcard = typeof options.maskWildcardChar !== \"undefined\" ? options.maskWildcardChar : \"*\",\r\n\tsuccess = false;\r\n\r\n\tfunction fillSymbols(index){\r\n\t\tvar symbol = mask[index];\r\n\t\tif(typeof symbol !== \"undefined\" && symbol !== maskWildcard && symbol !== maskLetter && symbol !== maskNumber){\r\n\t\t\tel.value = el.value + \"\" + symbol;\r\n\t\t\tfillSymbols(index+1);\r\n\t\t}\r\n\t}\r\n\r\n\tel.addEventListener(\"keydown\", (e) => {\r\n\t\tvar index = el.value.length,\r\n\t\tchar = e.key;\r\n\r\n\t\tif(e.keyCode > 46){\r\n\t\t\tif(index >= mask.length){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tsuccess = false;\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\tswitch(mask[index]){\r\n\t\t\t\t\tcase maskLetter:\r\n\t\t\t\t\tif(char.toUpperCase() == char.toLowerCase()){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase maskNumber:\r\n\t\t\t\t\tif(isNaN(char)){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase maskWildcard:\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(char !== mask[index]){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\r\n\t\treturn;\r\n\t});\r\n\r\n\tel.addEventListener(\"keyup\", (e) => {\r\n\t\tif(e.keyCode > 46){\r\n\t\t\tif(options.maskAutoFill){\r\n\t\t\t\tfillSymbols(el.value.length);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\r\n\tif(!el.placeholder){\r\n\t\tel.placeholder = mask;\r\n\t}\r\n\r\n\tif(options.maskAutoFill){\r\n\t\tfillSymbols(el.value.length);\r\n\t}\r\n}","import maskInput from '../../inputMask.js';\r\n\r\n//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", editorParams.search ? \"search\" : \"text\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t});\r\n\r\n\tfunction onChange(e){\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\r\n\t\t\tif(success(input.value)){\r\n\t\t\t\tcellValue = input.value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\t// case 9:\r\n\t\t\tcase 13:\r\n\t\t\tonChange(e);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\te.stopPropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\treturn input;\r\n};","import maskInput from '../../inputMask.js';\r\n\r\n//resizable text area element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n var self = this,\r\n cellValue = cell.getValue(),\r\n vertNav = editorParams.verticalNavigation || \"hybrid\",\r\n value = String(cellValue !== null && typeof cellValue !== \"undefined\" ? cellValue : \"\"),\r\n count = (value.match(/(?:\\r\\n|\\r|\\n)/g) || []).length + 1,\r\n input = document.createElement(\"textarea\"),\r\n scrollHeight = 0;\r\n\r\n //create and style input\r\n input.style.display = \"block\";\r\n input.style.padding = \"2px\";\r\n input.style.height = \"100%\";\r\n input.style.width = \"100%\";\r\n input.style.boxSizing = \"border-box\";\r\n input.style.whiteSpace = \"pre-wrap\";\r\n input.style.resize = \"none\";\r\n\r\n if(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n for (let key in editorParams.elementAttributes){\r\n if(key.charAt(0) == \"+\"){\r\n key = key.slice(1);\r\n input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n }else{\r\n input.setAttribute(key, editorParams.elementAttributes[key]);\r\n }\r\n }\r\n }\r\n\r\n input.value = value;\r\n\r\n onRendered(function(){\r\n input.focus({preventScroll: true});\r\n input.style.height = \"100%\";\r\n\r\n input.scrollHeight;\r\n input.style.height = input.scrollHeight + \"px\";\r\n cell.getRow().normalizeHeight();\r\n });\r\n\r\n function onChange(e){\r\n\r\n if(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\r\n\r\n if(success(input.value)){\r\n cellValue = input.value; //persist value if successfully validated incase editor is used as header filter\r\n }\r\n\r\n setTimeout(function(){\r\n cell.getRow().normalizeHeight();\r\n },300)\r\n }else{\r\n cancel();\r\n }\r\n }\r\n\r\n //submit new value on blur or change\r\n input.addEventListener(\"change\", onChange);\r\n input.addEventListener(\"blur\", onChange);\r\n\r\n input.addEventListener(\"keyup\", function(){\r\n\r\n input.style.height = \"\";\r\n\r\n var heightNow = input.scrollHeight;\r\n\r\n input.style.height = heightNow + \"px\";\r\n\r\n if(heightNow != scrollHeight){\r\n scrollHeight = heightNow;\r\n cell.getRow().normalizeHeight();\r\n }\r\n });\r\n\r\n input.addEventListener(\"keydown\", function(e){\r\n\r\n switch(e.keyCode){\r\n case 27:\r\n cancel();\r\n break;\r\n\r\n case 38: //up arrow\r\n if(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart)){\r\n e.stopImmediatePropagation();\r\n e.stopPropagation();\r\n }\r\n\r\n break;\r\n\r\n case 40: //down arrow\r\n if(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart !== input.value.length)){\r\n e.stopImmediatePropagation();\r\n e.stopPropagation();\r\n }\r\n break;\r\n\r\n case 35:\r\n case 36:\r\n e.stopPropagation();\r\n break;\r\n }\r\n });\r\n\r\n if(editorParams.mask){\r\n maskInput(input, editorParams);\r\n }\r\n\r\n return input;\r\n};","import maskInput from '../../inputMask.js';\r\n\r\n//input element with type of number\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar cellValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", \"number\");\r\n\r\n\tif(typeof editorParams.max != \"undefined\"){\r\n\t\tinput.setAttribute(\"max\", editorParams.max);\r\n\t}\r\n\r\n\tif(typeof editorParams.min != \"undefined\"){\r\n\t\tinput.setAttribute(\"min\", editorParams.min);\r\n\t}\r\n\r\n\tif(typeof editorParams.step != \"undefined\"){\r\n\t\tinput.setAttribute(\"step\", editorParams.step);\r\n\t}\r\n\r\n\t//create and style input\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\r\n\tvar blurFunc = function(e){\r\n\t\tonChange();\r\n\t};\r\n\r\n\tonRendered(function () {\r\n\t\t//submit new value on blur\r\n\t\tinput.removeEventListener(\"blur\", blurFunc);\r\n\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\r\n\t\t//submit new value on blur\r\n\t\tinput.addEventListener(\"blur\", blurFunc);\r\n\t});\r\n\r\n\tfunction onChange(){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(!isNaN(value) && value !==\"\"){\r\n\t\t\tvalue = Number(value);\r\n\t\t}\r\n\r\n\t\tif(value !== cellValue){\r\n\t\t\tif(success(value)){\r\n\t\t\t\tcellValue = value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 13:\r\n\t\t\t// case 9:\r\n\t\t\tonChange();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tcase 40: //down arrow\r\n\t\t\tif(vertNav == \"editor\"){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\te.stopPropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\treturn input;\r\n};","//input element with type of number\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", \"range\");\r\n\r\n\tif (typeof editorParams.max != \"undefined\") {\r\n\t\tinput.setAttribute(\"max\", editorParams.max);\r\n\t}\r\n\r\n\tif (typeof editorParams.min != \"undefined\") {\r\n\t\tinput.setAttribute(\"min\", editorParams.min);\r\n\t}\r\n\r\n\tif (typeof editorParams.step != \"undefined\") {\r\n\t\tinput.setAttribute(\"step\", editorParams.step);\r\n\t}\r\n\r\n\t//create and style input\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\r\n\tonRendered(function () {\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t});\r\n\r\n\tfunction onChange(){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(!isNaN(value) && value !==\"\"){\r\n\t\t\tvalue = Number(value);\r\n\t\t}\r\n\r\n\t\tif(value != cellValue){\r\n\t\t\tif(success(value)){\r\n\t\t\t\tcellValue = value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tonChange();\r\n\t});\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 13:\r\n\t\t\t// case 9:\r\n\t\t\tonChange();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\treturn input;\r\n};","import Helpers from '../../../../core/tools/Helpers.js';\r\n\r\n//dropdown select editor\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\tcellEl = cell.getElement(),\r\n\tinitialValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinitialDisplayValue = typeof initialValue !== \"undefined\" || initialValue === null ? (Array.isArray(initialValue) ? initialValue : [initialValue]) : (typeof editorParams.defaultValue !== \"undefined\" ? editorParams.defaultValue : []),\r\n\tinput = document.createElement(\"input\"),\r\n\tlistEl = document.createElement(\"div\"),\r\n\tmultiselect = editorParams.multiselect,\r\n\tdataItems = [],\r\n\tcurrentItem = {},\r\n\tdisplayItems = [],\r\n\tcurrentItems = [],\r\n\tblurable = true,\r\n\tblockListShow = false,\r\n\tsearchWord = \"\",\r\n\tsearchWordTimeout = null;\r\n\r\n\tif(Array.isArray(editorParams) || (!Array.isArray(editorParams) && typeof editorParams === \"object\" && !editorParams.values)){\r\n\t\tconsole.warn(\"DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object\");\r\n\t\teditorParams = {values:editorParams};\r\n\t}\r\n\r\n\tfunction getUniqueColumnValues(field){\r\n\t\tvar output = {},\r\n\t\tdata = self.table.getData(),\r\n\t\tcolumn;\r\n\r\n\t\tif(field){\r\n\t\t\tcolumn = self.table.columnManager.getColumnByField(field);\r\n\t\t}else{\r\n\t\t\tcolumn = cell.getColumn()._getSelf();\r\n\t\t}\r\n\r\n\t\tif(column){\r\n\t\t\tdata.forEach(function(row){\r\n\t\t\t\tvar val = column.getFieldValue(row);\r\n\r\n\t\t\t\tif(val !== null && typeof val !== \"undefined\" && val !== \"\"){\r\n\t\t\t\t\toutput[val] = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"unable to find matching column to create select lookup list:\", field);\r\n\t\t}\r\n\r\n\t\treturn Object.keys(output);\r\n\t}\r\n\r\n\tfunction parseItems(inputValues, curentValues){\r\n\t\tvar dataList = [];\r\n\t\tvar displayList = [];\r\n\r\n\t\tfunction processComplexListItem(item){\r\n\t\t\tvar item = {\r\n\t\t\t\tlabel:item.label,\r\n\t\t\t\tvalue:item.value,\r\n\t\t\t\titemParams:item.itemParams,\r\n\t\t\t\telementAttributes: item.elementAttributes,\r\n\t\t\t\telement:false,\r\n\t\t\t};\r\n\r\n\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t// }\r\n\r\n\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\tsetItem(item);\r\n\t\t\t}\r\n\r\n\t\t\tdataList.push(item);\r\n\t\t\tdisplayList.push(item);\r\n\r\n\t\t\treturn item;\r\n\t\t}\r\n\r\n\t\tif(typeof inputValues == \"function\"){\r\n\t\t\tinputValues = inputValues(cell);\r\n\t\t}\r\n\r\n\t\tif(Array.isArray(inputValues)){\r\n\t\t\tinputValues.forEach(function(value){\r\n\t\t\t\tvar item;\r\n\r\n\t\t\t\tif(typeof value === \"object\"){\r\n\r\n\t\t\t\t\tif(value.options){\r\n\t\t\t\t\t\titem = {\r\n\t\t\t\t\t\t\tlabel:value.label,\r\n\t\t\t\t\t\t\tgroup:true,\r\n\t\t\t\t\t\t\titemParams:value.itemParams,\r\n\t\t\t\t\t\t\telementAttributes:value.elementAttributes,\r\n\t\t\t\t\t\t\telement:false,\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\tdisplayList.push(item);\r\n\r\n\t\t\t\t\t\tvalue.options.forEach(function(item){\r\n\t\t\t\t\t\t\tprocessComplexListItem(item);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tprocessComplexListItem(value);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\titem = {\r\n\t\t\t\t\t\tlabel:value,\r\n\t\t\t\t\t\tvalue:value,\r\n\t\t\t\t\t\telement:false,\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t\t\t// }\r\n\r\n\t\t\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\t\t\tsetItem(item);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdataList.push(item);\r\n\t\t\t\t\tdisplayList.push(item);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tfor(var key in inputValues){\r\n\t\t\t\tvar item = {\r\n\t\t\t\t\tlabel:inputValues[key],\r\n\t\t\t\t\tvalue:key,\r\n\t\t\t\t\telement:false,\r\n\t\t\t\t};\r\n\r\n\t\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t\t// }\r\n\r\n\t\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\t\tsetItem(item);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdataList.push(item);\r\n\t\t\t\tdisplayList.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(editorParams.sortValuesList){\r\n\t\t\tdataList.sort((a, b) => {\r\n\t\t\t\treturn a.label < b.label ? -1 : (a.label > b.label ? 1 : 0);\r\n\t\t\t});\r\n\r\n\t\t\tdisplayList.sort((a, b) => {\r\n\t\t\t\treturn a.label < b.label ? -1 : (a.label > b.label ? 1 : 0);\r\n\t\t\t});\r\n\r\n\t\t\tif(editorParams.sortValuesList !== \"asc\"){\r\n\t\t\t\tdataList.reverse();\r\n\t\t\t\tdisplayList.reverse();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataItems = dataList;\r\n\t\tdisplayItems = displayList;\r\n\r\n\t\tfillList();\r\n\t}\r\n\r\n\tfunction fillList(){\r\n\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\r\n\t\tdisplayItems.forEach(function(item){\r\n\r\n\t\t\tvar el = item.element;\r\n\r\n\t\t\tif(!el){\r\n\t\t\t\tel = document.createElement(\"div\");\r\n\t\t\t\titem.label = editorParams.listItemFormatter ? editorParams.listItemFormatter(item.value, item.label, cell, el, item.itemParams) : item.label;\r\n\t\t\t\tif(item.group){\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-select-list-group\");\r\n\t\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\t\tel.innerHTML = item.label === \"\" ? \" \" : item.label;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-select-list-item\");\r\n\t\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\t\tel.innerHTML = item.label === \"\" ? \" \" : item.label;\r\n\r\n\t\t\t\t\tel.addEventListener(\"click\", function(){\r\n\t\t\t\t\t\tblockListShow = true;\r\n\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tblockListShow = false;\r\n\t\t\t\t\t\t}, 10);\r\n\r\n\t\t\t\t\t\t// setCurrentItem(item);\r\n\t\t\t\t\t\t// chooseItem();\r\n\t\t\t\t\t\tif(multiselect){\r\n\t\t\t\t\t\t\ttoggleItem(item);\r\n\t\t\t\t\t\t\tinput.focus();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tchooseItem(item);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t// if(item === currentItem){\r\n\t\t\t\t\t// \tel.classList.add(\"active\");\r\n\t\t\t\t\t// }\r\n\r\n\t\t\t\t\tif(currentItems.indexOf(item) > -1){\r\n\t\t\t\t\t\tel.classList.add(\"active\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(item.elementAttributes && typeof item.elementAttributes == \"object\"){\r\n\t\t\t\t\tfor (let key in item.elementAttributes){\r\n\t\t\t\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\t\t\t\tkey = key.slice(1);\r\n\t\t\t\t\t\t\tel.setAttribute(key, input.getAttribute(key) + item.elementAttributes[\"+\" + key]);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tel.setAttribute(key, item.elementAttributes[key]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tel.addEventListener(\"mousedown\", function(){\r\n\t\t\t\t\tblurable = false;\r\n\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tblurable = true;\r\n\t\t\t\t\t}, 10);\r\n\t\t\t\t});\r\n\r\n\t\t\t\titem.element = el;\r\n\r\n\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(el);\r\n\t\t});\r\n\t}\r\n\r\n\r\n\tfunction setCurrentItem(item, active){\r\n\r\n\t\tif(!multiselect && currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"active\");\r\n\t\t}\r\n\r\n\t\tif(currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"focused\");\r\n\t\t}\r\n\r\n\t\tcurrentItem = item;\r\n\r\n\t\tif(item.element){\r\n\t\t\titem.element.classList.add(\"focused\");\r\n\t\t\tif(active){\r\n\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(item && item.element && item.element.scrollIntoView){\r\n\t\t\titem.element.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'start'});\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t// function chooseItem(){\r\n\t// \thideList();\r\n\r\n\t// \tif(initialValue !== currentItem.value){\r\n\t// \t\tinitialValue = currentItem.value;\r\n\t// \t\tsuccess(currentItem.value);\r\n\t// \t}else{\r\n\t// \t\tcancel();\r\n\t// \t}\r\n\t// }\r\n\r\n\tfunction setItem(item) {\r\n\t\tvar index = currentItems.indexOf(item);\r\n\r\n\t\tif(index == -1){\r\n\t\t\tcurrentItems.push(item);\r\n\t\t\tsetCurrentItem(item, true);\r\n\t\t}\r\n\r\n\t\tfillInput();\r\n\t}\r\n\r\n\tfunction unsetItem(index) {\r\n\t\tvar item = currentItems[index];\r\n\r\n\t\tif(index > -1){\r\n\t\t\tcurrentItems.splice(index, 1);\r\n\t\t\tif(item.element){\r\n\t\t\t\titem.element.classList.remove(\"active\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction toggleItem(item) {\r\n\t\tif(!item){\r\n\t\t\titem = currentItem;\r\n\t\t}\r\n\r\n\t\tvar index = currentItems.indexOf(item);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tunsetItem(index);\r\n\t\t}else{\r\n\t\t\tif(multiselect !== true && currentItems.length >= multiselect){\r\n\t\t\t\tunsetItem(0);\r\n\t\t\t}\r\n\r\n\t\t\tsetItem(item);\r\n\t\t}\r\n\r\n\t\tfillInput();\r\n\r\n\t}\r\n\r\n\tfunction chooseItem(item){\r\n\t\thideList();\r\n\r\n\t\tif(!item){\r\n\t\t\titem = currentItem;\r\n\t\t}\r\n\r\n\t\tif(item){\r\n\t\t\tinput.value = item.label;\r\n\t\t\tsuccess(item.value);\r\n\t\t}\r\n\r\n\t\tinitialDisplayValue = [item.value];\r\n\t}\r\n\r\n\r\n\tfunction chooseItems(silent){\r\n\t\tif(!silent){\r\n\t\t\thideList();\r\n\t\t}\r\n\r\n\t\tvar output = [];\r\n\r\n\t\tcurrentItems.forEach((item) => {\r\n\t\t\toutput.push(item.value);\r\n\t\t});\r\n\r\n\t\tinitialDisplayValue = output;\r\n\r\n\t\tsuccess(output);\r\n\t}\r\n\r\n\tfunction fillInput(){\r\n\t\tvar output = [];\r\n\r\n\t\tcurrentItems.forEach((item) => {\r\n\t\t\toutput.push(item.label);\r\n\t\t});\r\n\r\n\t\tinput.value = output.join(\", \");\r\n\r\n\t\tif(self.currentCell === false){\r\n\t\t\tchooseItems(true);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tfunction unsetItems() {\r\n\r\n\t\tvar len = currentItems.length;\r\n\r\n\t\tfor(let i = 0; i < len; i++){\r\n\t\t\tunsetItem(0);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction cancelItem(){\r\n\t\thideList();\r\n\t\tcancel();\r\n\t}\r\n\r\n\tfunction showList(){\r\n\t\tcurrentItems = [];\r\n\r\n\t\tif(!listEl.parentNode){\r\n\t\t\tif(editorParams.values === true){\r\n\t\t\t\tparseItems(getUniqueColumnValues(), initialDisplayValue);\r\n\t\t\t}else if(typeof editorParams.values === \"string\"){\r\n\t\t\t\tparseItems(getUniqueColumnValues(editorParams.values), initialDisplayValue);\r\n\t\t\t}else{\r\n\t\t\t\tparseItems(editorParams.values || [], initialDisplayValue);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tvar offset = Helpers.elOffset(cellEl);\r\n\r\n\t\t\tlistEl.style.minWidth = cellEl.offsetWidth + \"px\";\r\n\r\n\t\t\tlistEl.style.top = (offset.top + cellEl.offsetHeight) + \"px\";\r\n\t\t\tlistEl.style.left = offset.left + \"px\";\r\n\r\n\r\n\t\t\tlistEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tblurable = false;\r\n\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tblurable = true;\r\n\t\t\t\t}, 10);\r\n\t\t\t});\r\n\r\n\t\t\tdocument.body.appendChild(listEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction hideList(){\r\n\t\tif(listEl.parentNode){\r\n\t\t\tlistEl.parentNode.removeChild(listEl);\r\n\t\t}\r\n\r\n\t\tremoveScrollListener();\r\n\t}\r\n\r\n\tfunction removeScrollListener() {\r\n\t\tself.table.rowManager.element.removeEventListener(\"scroll\", cancelItem);\r\n\t}\r\n\r\n\tfunction scrollTovalue(char){\r\n\r\n\t\tclearTimeout(searchWordTimeout);\r\n\r\n\t\tvar character = String.fromCharCode(event.keyCode).toLowerCase();\r\n\t\tsearchWord += character.toLowerCase();\r\n\r\n\t\tvar match = dataItems.find((item) => {\r\n\t\t\treturn typeof item.label !== \"undefined\" && item.label.toLowerCase().startsWith(searchWord);\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tsetCurrentItem(match, !multiselect);\r\n\t\t}\r\n\r\n\t\tsearchWordTimeout = setTimeout(() => {\r\n\t\t\tsearchWord = \"\";\r\n\t\t}, 800)\r\n\t}\r\n\r\n\t//style input\r\n\tinput.setAttribute(\"type\", \"text\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\tinput.style.cursor = \"default\";\r\n\tinput.readOnly = (this.currentCell != false);\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = typeof initialValue !== \"undefined\" || initialValue === null ? initialValue : \"\";\r\n\r\n\t// if(editorParams.values === true){\r\n\t// \tparseItems(getUniqueColumnValues(), initialValue);\r\n\t// }else if(typeof editorParams.values === \"string\"){\r\n\t// \tparseItems(getUniqueColumnValues(editorParams.values), initialValue);\r\n\t// }else{\r\n\t// \tparseItems(editorParams.values || [], initialValue);\r\n\t// }\r\n\r\n\tinput.addEventListener(\"search\", function(e){\r\n\t\tif(!input.value){\r\n\t\t\tunsetItems();\r\n\t\t\tchooseItems();\r\n\t\t}\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tvar index;\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tindex = dataItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index > 0){\r\n\t\t\t\t\tsetCurrentItem(dataItems[index - 1], !multiselect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 40: //down arrow\r\n\t\t\tindex = dataItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index < dataItems.length - 1)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index < dataItems.length - 1){\r\n\t\t\t\t\tif(index == -1){\r\n\t\t\t\t\t\tsetCurrentItem(dataItems[0], !multiselect);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsetCurrentItem(dataItems[index + 1], !multiselect);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\t// chooseItem();\r\n\r\n\t\t\tif(multiselect){\r\n\t\t\t\ttoggleItem();\r\n\t\t\t}else{\r\n\t\t\t\tchooseItem();\r\n\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancelItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 9: //tab\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tif(self.currentCell === false){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tif(e.keyCode >= 38 && e.keyCode <= 90){\r\n\t\t\t\tscrollTovalue(e.keyCode);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tif(blurable){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tchooseItems();\r\n\t\t\t}else{\r\n\t\t\t\tcancelItem();\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"focus\", function(e){\r\n\t\tif(!blockListShow){\r\n\t\t\tshowList();\r\n\t\t}\r\n\t});\r\n\r\n\t//style list element\r\n\tlistEl = document.createElement(\"div\");\r\n\tlistEl.classList.add(\"tabulator-edit-select-list\");\r\n\r\n\tonRendered(function(){\r\n\t\tinput.style.height = \"100%\";\r\n\t\tinput.focus({preventScroll: true});\r\n\t});\r\n\r\n\tsetTimeout(() => {\r\n\t\tthis.table.rowManager.element.addEventListener(\"scroll\", cancelItem);\r\n\t}, 10);\r\n\r\n\treturn input;\r\n};","import Helpers from '../../../../core/tools/Helpers.js';\r\nimport maskInput from '../../inputMask.js';\r\n\r\n//autocomplete\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\tcellEl = cell.getElement(),\r\n\tinitialValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinitialDisplayValue = typeof initialValue !== \"undefined\" || initialValue === null ? initialValue : (typeof editorParams.defaultValue !== \"undefined\" ? editorParams.defaultValue : \"\"),\r\n\tinput = document.createElement(\"input\"),\r\n\tlistEl = document.createElement(\"div\"),\r\n\tallItems = [],\r\n\tdisplayItems = [],\r\n\tvalues = [],\r\n\tcurrentItem = false,\r\n\tblurable = true,\r\n\tuniqueColumnValues = false;\r\n\r\n\t//style input\r\n\tinput.setAttribute(\"type\", \"search\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//style list element\r\n\tlistEl.classList.add(\"tabulator-edit-select-list\");\r\n\r\n\tlistEl.addEventListener(\"mousedown\", function(e){\r\n\t\tblurable = false;\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tblurable = true;\r\n\t\t}, 10);\r\n\t});\r\n\r\n\r\n\tfunction genUniqueColumnValues(){\r\n\t\tif(editorParams.values === true){\r\n\t\t\tuniqueColumnValues = getUniqueColumnValues();\r\n\t\t}else if(typeof editorParams.values === \"string\"){\r\n\t\t\tuniqueColumnValues = getUniqueColumnValues(editorParams.values);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getUniqueColumnValues(field){\r\n\t\tvar output = {},\r\n\t\tdata = self.table.getData(),\r\n\t\tcolumn;\r\n\r\n\t\tif(field){\r\n\t\t\tcolumn = self.table.columnManager.getColumnByField(field);\r\n\t\t}else{\r\n\t\t\tcolumn = cell.getColumn()._getSelf();\r\n\t\t}\r\n\r\n\t\tif(column){\r\n\t\t\tdata.forEach(function(row){\r\n\t\t\t\tvar val = column.getFieldValue(row);\r\n\r\n\t\t\t\tif(val !== null && typeof val !== \"undefined\" && val !== \"\"){\r\n\t\t\t\t\toutput[val] = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(editorParams.sortValuesList){\r\n\t\t\t\tif(editorParams.sortValuesList == \"asc\"){\r\n\t\t\t\t\toutput = Object.keys(output).sort();\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput = Object.keys(output).sort().reverse();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\toutput = Object.keys(output);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"unable to find matching column to create autocomplete lookup list:\", field);\r\n\t\t}\r\n\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tfunction filterList(term, intialLoad){\r\n\t\tvar matches = [],\r\n\t\tvalues, items, searchEl;\r\n\r\n\t\t//lookup base values list\r\n\t\tif(uniqueColumnValues){\r\n\t\t\tvalues = uniqueColumnValues;\r\n\t\t}else{\r\n\t\t\tvalues = editorParams.values || [];\r\n\t\t}\r\n\r\n\t\tif(editorParams.searchFunc){\r\n\t\t\tmatches = editorParams.searchFunc(term, values);\r\n\r\n\t\t\tif(matches instanceof Promise){\r\n\r\n\t\t\t\taddNotice(typeof editorParams.searchingPlaceholder !== \"undefined\" ? editorParams.searchingPlaceholder : \"Searching...\");\r\n\r\n\t\t\t\tmatches.then((result) => {\r\n\t\t\t\t\tfillListIfNotEmpty(parseItems(result), intialLoad);\r\n\t\t\t\t}).catch((err) => {\r\n\t\t\t\t\tconsole.err(\"error in autocomplete search promise:\", err);\r\n\t\t\t\t});\r\n\r\n\t\t\t}else{\r\n\t\t\t\tfillListIfNotEmpty(parseItems(matches), intialLoad);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\titems = parseItems(values);\r\n\r\n\t\t\tif(term === \"\"){\r\n\t\t\t\tif(editorParams.showListOnEmpty){\r\n\t\t\t\t\tmatches = items;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\titems.forEach(function(item){\r\n\t\t\t\t\tif(item.value !== null || typeof item.value !== \"undefined\"){\r\n\t\t\t\t\t\tif(String(item.value).toLowerCase().indexOf(String(term).toLowerCase()) > -1 || String(item.title).toLowerCase().indexOf(String(term).toLowerCase()) > -1){\r\n\t\t\t\t\t\t\tmatches.push(item);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tfillListIfNotEmpty(matches, intialLoad);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction addNotice(notice){\r\n\t\tvar searchEl = document.createElement(\"div\");\r\n\r\n\t\tclearList();\r\n\r\n\t\tif(notice !== false){\r\n\t\t\tsearchEl.classList.add(\"tabulator-edit-select-list-notice\");\r\n\t\t\tsearchEl.tabIndex = 0;\r\n\r\n\t\t\tif(notice instanceof Node){\r\n\t\t\t\tsearchEl.appendChild(notice);\r\n\t\t\t}else{\r\n\t\t\t\tsearchEl.innerHTML = notice;\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(searchEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction parseItems(inputValues){\r\n\t\tvar itemList = [];\r\n\r\n\t\tif(Array.isArray(inputValues)){\r\n\t\t\tinputValues.forEach(function(value){\r\n\r\n\t\t\t\tvar item = {};\r\n\r\n\t\t\t\tif(typeof value === \"object\"){\r\n\t\t\t\t\titem.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value.value, value.label) : value.label;\r\n\t\t\t\t\titem.value = value.value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\titem.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value;\r\n\t\t\t\t\titem.value = value;\r\n\t\t\t\t}\r\n\r\n\t\t\t\titemList.push(item);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tfor(var key in inputValues){\r\n\t\t\t\tvar item = {\r\n\t\t\t\t\ttitle:editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : inputValues[key],\r\n\t\t\t\t\tvalue:key,\r\n\t\t\t\t};\r\n\r\n\t\t\t\titemList.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn itemList;\r\n\t}\r\n\r\n\tfunction clearList(){\r\n\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\t}\r\n\r\n\tfunction fillListIfNotEmpty(items, intialLoad){\r\n\t\tif(items.length){\r\n\t\t\tfillList(items, intialLoad);\r\n\t\t}else{\r\n\t\t\tif(editorParams.emptyPlaceholder){\r\n\t\t\t\taddNotice(editorParams.emptyPlaceholder);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fillList(items, intialLoad){\r\n\t\tvar current = false;\r\n\r\n\t\tclearList();\r\n\r\n\t\tdisplayItems = items;\r\n\r\n\t\tdisplayItems.forEach(function(item){\r\n\t\t\tvar el = item.element;\r\n\r\n\t\t\tif(!el){\r\n\t\t\t\tel = document.createElement(\"div\");\r\n\t\t\t\tel.classList.add(\"tabulator-edit-select-list-item\");\r\n\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\tel.innerHTML = item.title;\r\n\r\n\t\t\t\tel.addEventListener(\"click\", function(e){\r\n\t\t\t\t\tsetCurrentItem(item);\r\n\t\t\t\t\tchooseItem();\r\n\t\t\t\t});\r\n\r\n\t\t\t\tel.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\t\tblurable = false;\r\n\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tblurable = true;\r\n\t\t\t\t\t}, 10);\r\n\t\t\t\t});\r\n\r\n\t\t\t\titem.element = el;\r\n\r\n\t\t\t\tif(intialLoad && item.value == initialValue){\r\n\t\t\t\t\tinput.value = item.title;\r\n\t\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t\t\tcurrent = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(item === currentItem){\r\n\t\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t\t\tcurrent = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(el);\r\n\t\t});\r\n\r\n\t\tif(!current){\r\n\t\t\tsetCurrentItem(false);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction chooseItem(){\r\n\t\thideList();\r\n\r\n\t\tif(currentItem){\r\n\t\t\tif(initialValue !== currentItem.value){\r\n\t\t\t\tinitialValue = currentItem.value;\r\n\t\t\t\tinput.value = currentItem.title;\r\n\t\t\t\tsuccess(currentItem.value);\r\n\t\t\t}else{\r\n\t\t\t\tcancel();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(editorParams.freetext){\r\n\t\t\t\tinitialValue = input.value;\r\n\t\t\t\tsuccess(input.value);\r\n\t\t\t}else{\r\n\t\t\t\tif(editorParams.allowEmpty && input.value === \"\"){\r\n\t\t\t\t\tinitialValue = input.value;\r\n\t\t\t\t\tsuccess(input.value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcancel();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction showList(){\r\n\t\tif(!listEl.parentNode){\r\n\t\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\r\n\t\t\tvar offset = Helpers.elOffset(cellEl);\r\n\r\n\t\t\tlistEl.style.minWidth = cellEl.offsetWidth + \"px\";\r\n\r\n\t\t\tlistEl.style.top = (offset.top + cellEl.offsetHeight) + \"px\";\r\n\t\t\tlistEl.style.left = offset.left + \"px\";\r\n\t\t\tdocument.body.appendChild(listEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setCurrentItem(item, showInputValue){\r\n\t\tif(currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"active\");\r\n\t\t}\r\n\r\n\t\tcurrentItem = item;\r\n\r\n\t\tif(item && item.element){\r\n\t\t\titem.element.classList.add(\"active\");\r\n\t\t}\r\n\r\n\t\tif(item && item.element && item.element.scrollIntoView){\r\n\t\t\titem.element.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'start'});\r\n\t\t}\r\n\t}\r\n\r\n\tfunction hideList(){\r\n\t\tif(listEl.parentNode){\r\n\t\t\tlistEl.parentNode.removeChild(listEl);\r\n\t\t}\r\n\r\n\t\tremoveScrollListener();\r\n\t}\r\n\r\n\r\n\tfunction cancelItem(){\r\n\t\thideList();\r\n\t\tcancel();\r\n\t}\r\n\r\n\tfunction removeScrollListener() {\r\n\t\tself.table.rowManager.element.removeEventListener(\"scroll\", cancelItem);\r\n\t}\r\n\r\n\t//allow key based navigation\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tvar index;\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tindex = displayItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index > 0){\r\n\t\t\t\t\tsetCurrentItem(displayItems[index - 1]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tsetCurrentItem(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 40: //down arrow\r\n\r\n\t\t\tindex = displayItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index < displayItems.length - 1)){\r\n\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index < displayItems.length - 1){\r\n\t\t\t\t\tif(index == -1){\r\n\t\t\t\t\t\tsetCurrentItem(displayItems[0]);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsetCurrentItem(displayItems[index + 1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\t// e.preventDefault();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\tchooseItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancelItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 36: //home\r\n\t\t\tcase 35: //end\r\n\t\t\t//prevent table navigation while using input element\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"keyup\", function(e){\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //up arrow\r\n\t\t\tcase 40: //right arrow\r\n\t\t\tcase 13: //enter\r\n\t\t\tcase 27: //escape\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tfilterList(input.value);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\tinput.addEventListener(\"search\", function(e){\r\n\t\tfilterList(input.value);\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tif(blurable){\r\n\t\t\tchooseItem();\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"focus\", function(e){\r\n\t\tvar value = initialDisplayValue;\r\n\t\tgenUniqueColumnValues();\r\n\t\tshowList();\r\n\t\tinput.value = value;\r\n\t\tfilterList(value, true);\r\n\t});\r\n\r\n\r\n\tonRendered(function(){\r\n\t\tinput.style.height = \"100%\";\r\n\t\tinput.focus({preventScroll: true});\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\tsetTimeout(() => {\r\n\t\tthis.table.rowManager.element.addEventListener(\"scroll\", cancelItem);\r\n\t}, 10);\r\n\r\n\tgenUniqueColumnValues();\r\n\tinput.value = initialDisplayValue;\r\n\tfilterList(initialDisplayValue, true);\r\n\r\n\treturn input;\r\n};","//star rating\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\telement = cell.getElement(),\r\n\tvalue = cell.getValue(),\r\n\tmaxStars = element.getElementsByTagName(\"svg\").length || 5,\r\n\tsize = element.getElementsByTagName(\"svg\")[0] ? element.getElementsByTagName(\"svg\")[0].getAttribute(\"width\") : 14,\r\n\tstars = [],\r\n\tstarsHolder = document.createElement(\"div\"),\r\n\tstar = document.createElementNS('http://www.w3.org/2000/svg', \"svg\");\r\n\r\n\r\n\t//change star type\r\n\tfunction starChange(val){\r\n\t\tstars.forEach(function(star, i){\r\n\t\t\tif(i < val){\r\n\t\t\t\tif(self.table.browser == \"ie\"){\r\n\t\t\t\t\tstar.setAttribute(\"class\", \"tabulator-star-active\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tstar.classList.replace(\"tabulator-star-inactive\", \"tabulator-star-active\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstar.innerHTML = '';\r\n\t\t\t}else{\r\n\t\t\t\tif(self.table.browser == \"ie\"){\r\n\t\t\t\t\tstar.setAttribute(\"class\", \"tabulator-star-inactive\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tstar.classList.replace(\"tabulator-star-active\", \"tabulator-star-inactive\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstar.innerHTML = '';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//build stars\r\n\tfunction buildStar(i){\r\n\r\n\t\tvar starHolder = document.createElement(\"span\");\r\n\t\tvar nextStar = star.cloneNode(true);\r\n\r\n\t\tstars.push(nextStar);\r\n\r\n\t\tstarHolder.addEventListener(\"mouseenter\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tstarChange(i);\r\n\t\t});\r\n\r\n\t\tstarHolder.addEventListener(\"mousemove\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t});\r\n\r\n\t\tstarHolder.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tsuccess(i);\r\n\t\t\telement.blur();\r\n\t\t});\r\n\r\n\t\tstarHolder.appendChild(nextStar);\r\n\t\tstarsHolder.appendChild(starHolder);\r\n\r\n\t}\r\n\r\n\t//handle keyboard navigation value change\r\n\tfunction changeValue(val){\r\n\t\tvalue = val;\r\n\t\tstarChange(val);\r\n\t}\r\n\r\n\t//style cell\r\n\telement.style.whiteSpace = \"nowrap\";\r\n\telement.style.overflow = \"hidden\";\r\n\telement.style.textOverflow = \"ellipsis\";\r\n\r\n\t//style holding element\r\n\tstarsHolder.style.verticalAlign = \"middle\";\r\n\tstarsHolder.style.display = \"inline-block\";\r\n\tstarsHolder.style.padding = \"4px\";\r\n\r\n\t//style star\r\n\tstar.setAttribute(\"width\", size);\r\n\tstar.setAttribute(\"height\", size);\r\n\tstar.setAttribute(\"viewBox\", \"0 0 512 512\");\r\n\tstar.setAttribute(\"xml:space\", \"preserve\");\r\n\tstar.style.padding = \"0 1px\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tstarsHolder.setAttribute(key, starsHolder.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tstarsHolder.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//create correct number of stars\r\n\tfor(var i=1;i<= maxStars;i++){\r\n\t\tbuildStar(i);\r\n\t}\r\n\r\n\t//ensure value does not exceed number of stars\r\n\tvalue = Math.min(parseInt(value), maxStars);\r\n\r\n\t// set initial styling of stars\r\n\tstarChange(value);\r\n\r\n\tstarsHolder.addEventListener(\"mousemove\", function(e){\r\n\t\tstarChange(0);\r\n\t});\r\n\r\n\tstarsHolder.addEventListener(\"click\", function(e){\r\n\t\tsuccess(0);\r\n\t});\r\n\r\n\telement.addEventListener(\"blur\", function(e){\r\n\t\tcancel();\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\telement.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 39: //right arrow\r\n\t\t\tchangeValue(value + 1);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tchangeValue(value - 1);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\tsuccess(value);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\treturn starsHolder;\r\n};","//draggable progress bar\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar element = cell.getElement(),\r\n\tmax = typeof editorParams.max === \"undefined\" ? ((element.getElementsByTagName(\"div\")[0] && element.getElementsByTagName(\"div\")[0].getAttribute(\"max\")) || 100) : editorParams.max,\r\n\tmin = typeof editorParams.min === \"undefined\" ? ((element.getElementsByTagName(\"div\")[0] && element.getElementsByTagName(\"div\")[0].getAttribute(\"min\")) || 0) : editorParams.min,\r\n\tpercent = (max - min) / 100,\r\n\tvalue = cell.getValue() || 0,\r\n\thandle = document.createElement(\"div\"),\r\n\tbar = document.createElement(\"div\"),\r\n\tmouseDrag, mouseDragWidth;\r\n\r\n\t//set new value\r\n\tfunction updateValue(){\r\n\t\tvar style = window.getComputedStyle(element, null);\r\n\r\n\t\tvar calcVal = (percent * Math.round(bar.offsetWidth / ((element.clientWidth - parseInt(style.getPropertyValue(\"padding-left\")) - parseInt(style.getPropertyValue(\"padding-right\")))/100))) + min;\r\n\t\tsuccess(calcVal);\r\n\t\telement.setAttribute(\"aria-valuenow\", calcVal);\r\n\t\telement.setAttribute(\"aria-label\", value);\r\n\t}\r\n\r\n\t//style handle\r\n\thandle.style.position = \"absolute\";\r\n\thandle.style.right = \"0\";\r\n\thandle.style.top = \"0\";\r\n\thandle.style.bottom = \"0\";\r\n\thandle.style.width = \"5px\";\r\n\thandle.classList.add(\"tabulator-progress-handle\");\r\n\r\n\t//style bar\r\n\tbar.style.display = \"inline-block\";\r\n\tbar.style.position = \"relative\";\r\n\t// bar.style.top = \"8px\";\r\n\t// bar.style.bottom = \"8px\";\r\n\t// bar.style.left = \"4px\";\r\n\t// bar.style.marginRight = \"4px\";\r\n\tbar.style.height = \"100%\";\r\n\tbar.style.backgroundColor = \"#488CE9\";\r\n\tbar.style.maxWidth = \"100%\";\r\n\tbar.style.minWidth = \"0%\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tbar.setAttribute(key, bar.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tbar.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//style cell\r\n\telement.style.padding = \"4px 4px\";\r\n\r\n\t//make sure value is in range\r\n\tvalue = Math.min(parseFloat(value), max);\r\n\tvalue = Math.max(parseFloat(value), min);\r\n\r\n\t//workout percentage\r\n\tvalue = Math.round((value - min) / percent);\r\n\t// bar.style.right = value + \"%\";\r\n\tbar.style.width = value + \"%\";\r\n\r\n\telement.setAttribute(\"aria-valuemin\", min);\r\n\telement.setAttribute(\"aria-valuemax\", max);\r\n\r\n\tbar.appendChild(handle);\r\n\r\n\thandle.addEventListener(\"mousedown\", function(e){\r\n\t\tmouseDrag = e.screenX;\r\n\t\tmouseDragWidth = bar.offsetWidth;\r\n\t});\r\n\r\n\thandle.addEventListener(\"mouseover\", function(){\r\n\t\thandle.style.cursor = \"ew-resize\";\r\n\t});\r\n\r\n\telement.addEventListener(\"mousemove\", function(e){\r\n\t\tif(mouseDrag){\r\n\t\t\tbar.style.width = (mouseDragWidth + e.screenX - mouseDrag) + \"px\";\r\n\t\t}\r\n\t});\r\n\r\n\telement.addEventListener(\"mouseup\", function(e){\r\n\t\tif(mouseDrag){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\r\n\t\t\tmouseDrag = false;\r\n\t\t\tmouseDragWidth = false;\r\n\r\n\t\t\tupdateValue();\r\n\t\t}\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\telement.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.preventDefault();\r\n\t\t\tbar.style.width = (bar.clientWidth + element.clientWidth/100) + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\te.preventDefault();\r\n\t\t\tbar.style.width = (bar.clientWidth - element.clientWidth/100) + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 9: //tab\r\n\t\t\tcase 13: //enter\r\n\t\t\tupdateValue();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t}\r\n\t});\r\n\r\n\telement.addEventListener(\"blur\", function(){\r\n\t\tcancel();\r\n\t});\r\n\r\n\treturn bar;\r\n};","//checkbox\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar value = cell.getValue(),\r\n\tinput = document.createElement(\"input\"),\r\n\ttristate = editorParams.tristate,\r\n\tindetermValue = typeof editorParams.indeterminateValue === \"undefined\" ? null : editorParams.indeterminateValue,\r\n\tindetermState = false;\r\n\r\n\tinput.setAttribute(\"type\", \"checkbox\");\r\n\tinput.style.marginTop = \"5px\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = value;\r\n\r\n\tif(tristate && (typeof value === \"undefined\" || value === indetermValue || value === \"\")){\r\n\t\tindetermState = true;\r\n\t\tinput.indeterminate = true;\r\n\t}\r\n\r\n\tif(this.table.browser != \"firefox\"){ //prevent blur issue on mac firefox\r\n\t\tonRendered(function(){\r\n\t\t\tinput.focus({preventScroll: true});\r\n\t\t});\r\n\t}\r\n\r\n\tinput.checked = value === true || value === \"true\" || value === \"True\" || value === 1;\r\n\r\n\tonRendered(function(){\r\n\t\tinput.focus();\r\n\t});\r\n\r\n\tfunction setValue(blur){\r\n\t\tif(tristate){\r\n\t\t\tif(!blur){\r\n\t\t\t\tif(input.checked && !indetermState){\r\n\t\t\t\t\tinput.checked = false;\r\n\t\t\t\t\tinput.indeterminate = true;\r\n\t\t\t\t\tindetermState = true;\r\n\t\t\t\t\treturn indetermValue;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tindetermState = false;\r\n\t\t\t\t\treturn input.checked;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(indetermState){\r\n\t\t\t\t\treturn indetermValue;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn input.checked;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn input.checked;\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur\r\n\tinput.addEventListener(\"change\", function(e){\r\n\t\tsuccess(setValue());\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tsuccess(setValue(true));\r\n\t});\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tif(e.keyCode == 13){\r\n\t\t\tsuccess(setValue());\r\n\t\t}\r\n\t\tif(e.keyCode == 27){\r\n\t\t\tcancel();\r\n\t\t}\r\n\t});\r\n\r\n\treturn input;\r\n};","import input from './editors/input.js';\r\nimport textarea from './editors/textarea.js';\r\nimport number from './editors/number.js';\r\nimport range from './editors/range.js';\r\nimport select from './editors/select.js';\r\nimport autocomplete from './editors/autocomplete.js';\r\nimport star from './editors/star.js';\r\nimport progress from './editors/progress.js';\r\nimport tickCross from './editors/tickCross.js';\r\n\r\nexport default {\r\n\tinput:input,\r\n\ttextarea:textarea,\r\n number:number,\r\n range:range,\r\n\tselect:select,\r\n\tautocomplete:autocomplete,\r\n\tstar:star,\r\n\tprogress:progress,\r\n\ttickCross:tickCross,\r\n};","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defaultEditors from './defaults/editors.js';\r\n\r\nclass Edit extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.currentCell = false; //hold currently editing cell\r\n\t\tthis.mouseClick = false; //hold mousedown state to prevent click binding being overriden by editor opening\r\n\t\tthis.recursionBlock = false; //prevent focus recursion\r\n\t\tthis.invalidEdit = false;\r\n\t\tthis.editedCells = [];\r\n\r\n\t\tthis.editors = Edit.editors;\r\n\r\n\t\tthis.registerColumnOption(\"editable\");\r\n\t\tthis.registerColumnOption(\"editor\");\r\n\t\tthis.registerColumnOption(\"editorParams\");\r\n\r\n\t\tthis.registerColumnOption(\"cellEditing\");\r\n\t\tthis.registerColumnOption(\"cellEdited\");\r\n\t\tthis.registerColumnOption(\"cellEditCancelled\");\r\n\r\n\t\tthis.registerTableFunction(\"getEditedCells\", this.getEditedCells.bind(this));\r\n\t\tthis.registerTableFunction(\"clearCellEdited\", this.clearCellEdited.bind(this));\r\n\t\tthis.registerTableFunction(\"navigatePrev\", this.navigatePrev.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateNext\", this.navigateNext.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateLeft\", this.navigateLeft.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateRight\", this.navigateRight.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateUp\", this.navigateUp.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateDown\", this.navigateDown.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"isEdited\", this.cellisEdited.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"clearEdited\", this.clearEdited.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"edit\", this.editCell.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"cancelEdit\", this.cellCancelEdit.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigatePrev\", this.navigatePrev.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateNext\", this.navigateNext.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateLeft\", this.navigateLeft.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateRight\", this.navigateRight.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateUp\", this.navigateUp.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateDown\", this.navigateDown.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-init\", this.bindEditor.bind(this));\r\n\t\tthis.subscribe(\"cell-delete\", this.clearEdited.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumnCheck.bind(this));\r\n\t\tthis.subscribe(\"column-delete\", this.columnDeleteCheck.bind(this));\r\n\t\tthis.subscribe(\"row-deleting\", this.rowDeleteCheck.bind(this));\r\n\t\tthis.subscribe(\"data-refreshing\", this.cancelEdit.bind(this));\r\n\r\n\t\tthis.subscribe(\"keybinding-nav-prev\", this.navigatePrev.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-next\", this.keybindingNavigateNext.bind(this));\r\n\t\tthis.subscribe(\"keybinding-nav-left\", this.navigateLeft.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-right\", this.navigateRight.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-up\", this.navigateUp.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-down\", this.navigateDown.bind(this, undefined));\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t////// Keybinding Functions ///////\r\n\t///////////////////////////////////\r\n\r\n\tkeybindingNavigateNext(e){\r\n\t\tvar cell = this.currentCell,\r\n\t\tnewRow = this.options(\"tabEndNewRow\");\r\n\r\n\t\tif(cell){\r\n\t\t\tif(!this.navigateNext(cell, e)){\r\n\t\t\t\tif(newRow){\r\n\t\t\t\t\tcell.getElement().firstChild.blur();\r\n\r\n\t\t\t\t\tif(newRow === true){\r\n\t\t\t\t\t\tnewRow = this.table.addRow({})\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(typeof newRow == \"function\"){\r\n\t\t\t\t\t\t\tnewRow = this.table.addRow(newRow(cell.row.getComponent()))\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnewRow = this.table.addRow(Object.assign({}, newRow));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tnewRow.then(() => {\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tcell.getComponent().navigateNext();\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Cell Functions //////////\r\n\t///////////////////////////////////\r\n\r\n\tcellisEdited(cell){\r\n\t\treturn !! cell.modules.edit && cell.modules.edit.edited;\r\n\t}\r\n\r\n\tcellCancelEdit(cell){\r\n\t\tif(cell === this.currentCell){\r\n\t\t\tthis.table.modules.edit.cancelEdit();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cancel Editor Error - This cell is not currently being edited \");\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\tclearCellEdited(cells){\r\n\t\tif(!cells){\r\n\t\t\tcells = this.table.modules.edit.getEditedCells();\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\r\n\t\tcells.forEach((cell) => {\r\n\t\t\tthis.table.modules.edit.clearEdited(cell._getSelf());\r\n\t\t});\r\n\t}\r\n\r\n\tnavigatePrev(cell = this.currentCell, e){\r\n\t\tvar nextCell, prevRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tnextCell = this.navigateLeft();\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tprevRow = this.table.rowManager.prevDisplayRow(cell.row, true);\r\n\r\n\t\t\t\tif(prevRow){\r\n\t\t\t\t\tnextCell = this.findNextEditableCell(prevRow, prevRow.cells.length);\r\n\r\n\t\t\t\t\tif(nextCell){\r\n\t\t\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateNext(cell = this.currentCell, e){\r\n\t\tvar nextCell, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tnextCell = this.navigateRight();\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\r\n\r\n\t\t\t\tif(nextRow){\r\n\t\t\t\t\tnextCell = this.findNextEditableCell(nextRow, -1);\r\n\r\n\t\t\t\t\tif(nextCell){\r\n\t\t\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateLeft(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findPrevEditableCell(cell.row, index);\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateRight(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findNextEditableCell(cell.row, index);\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateUp(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.prevDisplayRow(cell.row, true);\r\n\r\n\t\t\tif(nextRow){\r\n\t\t\t\tnextRow.cells[index].getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateDown(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\r\n\r\n\t\t\tif(nextRow){\r\n\t\t\t\tnextRow.cells[index].getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfindNextEditableCell(row, index){\r\n\t\tvar nextCell = false;\r\n\r\n\t\tif(index < row.cells.length-1){\r\n\t\t\tfor(var i = index+1; i < row.cells.length; i++){\r\n\t\t\t\tlet cell = row.cells[i];\r\n\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tlet allowEdit = true;\r\n\r\n\t\t\t\t\tif(typeof cell.column.modules.edit.check == \"function\"){\r\n\t\t\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(allowEdit){\r\n\t\t\t\t\t\tnextCell = cell;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn nextCell;\r\n\t}\r\n\r\n\tfindPrevEditableCell(row, index){\r\n\t\tvar prevCell = false;\r\n\r\n\t\tif(index > 0){\r\n\t\t\tfor(var i = index-1; i >= 0; i--){\r\n\t\t\t\tlet cell = row.cells[i],\r\n\t\t\t\tallowEdit = true;\r\n\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tif(typeof cell.column.modules.edit.check == \"function\"){\r\n\t\t\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(allowEdit){\r\n\t\t\t\t\t\tprevCell = cell;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn prevCell;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(typeof column.definition.editor !== \"undefined\"){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\tcolumnDeleteCheck(column){\r\n\t\tif(this.currentCell && this.currentCell.column === column){\r\n\t\t\tthis.cancelEdit();\r\n\t\t}\r\n\t}\r\n\r\n\trowDeleteCheck(row){\r\n\t\tif(this.currentCell && this.currentCell.row === row){\r\n\t\t\tthis.cancelEdit();\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column editor\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = {\r\n\t\t\teditor:false,\r\n\t\t\tblocked:false,\r\n\t\t\tcheck:column.definition.editable,\r\n\t\t\tparams:column.definition.editorParams || {}\r\n\t\t};\r\n\r\n\t\t//set column editor\r\n\t\tswitch(typeof column.definition.editor){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(this.editors[column.definition.editor]){\r\n\t\t\t\tconfig.editor = this.editors[column.definition.editor];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Editor Error - No such editor found: \", column.definition.editor);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tconfig.editor = column.definition.editor;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"boolean\":\r\n\t\t\tif(column.definition.editor === true){\r\n\t\t\t\tif(typeof column.definition.formatter !== \"function\"){\r\n\t\t\t\t\tif(this.editors[column.definition.formatter]){\r\n\t\t\t\t\t\tconfig.editor = this.editors[column.definition.formatter];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconfig.editor = this.editors[\"input\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Editor Error - Cannot auto lookup editor for a custom formatter: \", column.definition.formatter);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(config.editor){\r\n\t\t\tcolumn.modules.edit = config;\r\n\t\t}\r\n\t}\r\n\r\n\tgetCurrentCell(){\r\n\t\treturn this.currentCell ? this.currentCell.getComponent() : false;\r\n\t}\r\n\r\n\tclearEditor(cancel){\r\n\t\tvar cell = this.currentCell,\r\n\t\tcellEl;\r\n\r\n\t\tthis.invalidEdit = false;\r\n\r\n\t\tif(cell){\r\n\t\t\tthis.currentCell = false;\r\n\r\n\t\t\tcellEl = cell.getElement();\r\n\r\n\t\t\tif(cancel){\r\n\t\t\t\tif(cell.column.modules.validate && this.table.modExists(\"validate\")){\r\n\t\t\t\t\tthis.table.modules.validate.cellValidate(cell);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcellEl.classList.remove(\"tabulator-validation-fail\");\r\n\t\t\t}\r\n\r\n\t\t\tcellEl.classList.remove(\"tabulator-editing\");\r\n\r\n\t\t\twhile(cellEl.firstChild) cellEl.removeChild(cellEl.firstChild);\r\n\r\n\t\t\tcell.row.getElement().classList.remove(\"tabulator-row-editing\");\r\n\t\t}\r\n\t}\r\n\r\n\tcancelEdit(){\r\n\t\tif(this.currentCell){\r\n\t\t\tvar cell = this.currentCell;\r\n\t\t\tvar component = this.currentCell.getComponent();\r\n\r\n\t\t\tthis.clearEditor(true);\r\n\t\t\tcell.setValueActual(cell.getValue());\r\n\t\t\tcell.cellRendered();\r\n\r\n\t\t\tif(cell.column.definition.editor == \"textarea\" || cell.column.definition.variableHeight){\r\n\t\t\t\tcell.row.normalizeHeight(true);\r\n\t\t\t}\r\n\r\n\t\t\tif(cell.column.definition.cellEditCancelled){\r\n\t\t\t\tcell.column.definition.cellEditCancelled.call(this.table, component);\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"edit-cancelled\", cell);\r\n\t\t\tthis.dispatchExternal(\"cellEditCancelled\", component);\r\n\t\t}\r\n\t}\r\n\r\n\t//return a formatted value for a cell\r\n\tbindEditor(cell){\r\n\t\tif(cell.column.modules.edit){\r\n\t\t\tvar self = this,\r\n\t\t\telement = cell.getElement(true);\r\n\r\n\t\t\telement.setAttribute(\"tabindex\", 0);\r\n\r\n\t\t\telement.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(!element.classList.contains(\"tabulator-editing\")){\r\n\t\t\t\t\telement.focus({preventScroll: true});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\telement.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif (e.button === 2) {\r\n\t\t\t\t\te.preventDefault();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.mouseClick = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\telement.addEventListener(\"focus\", function(e){\r\n\t\t\t\tif(!self.recursionBlock){\r\n\t\t\t\t\tself.edit(cell, e, false);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tfocusCellNoEvent(cell, block){\r\n\t\tthis.recursionBlock = true;\r\n\r\n\t\tif(!(block && this.table.browser === \"ie\")){\r\n\t\t\tcell.getElement().focus({preventScroll: true});\r\n\t\t}\r\n\r\n\t\tthis.recursionBlock = false;\r\n\t}\r\n\r\n\teditCell(cell, forceEdit){\r\n\t\tthis.focusCellNoEvent(cell);\r\n\t\tthis.edit(cell, false, forceEdit);\r\n\t}\r\n\r\n\tfocusScrollAdjust(cell){\r\n\t\tif(this.table.rowManager.getRenderMode() == \"virtual\"){\r\n\t\t\tvar topEdge = this.table.rowManager.element.scrollTop,\r\n\t\t\tbottomEdge = this.table.rowManager.element.clientHeight + this.table.rowManager.element.scrollTop,\r\n\t\t\trowEl = cell.row.getElement(),\r\n\t\t\toffset = rowEl.offsetTop;\r\n\r\n\t\t\tif(rowEl.offsetTop < topEdge){\r\n\t\t\t\tthis.table.rowManager.element.scrollTop -= (topEdge - rowEl.offsetTop);\r\n\t\t\t}else{\r\n\t\t\t\tif(rowEl.offsetTop + rowEl.offsetHeight > bottomEdge){\r\n\t\t\t\t\tthis.table.rowManager.element.scrollTop += (rowEl.offsetTop + rowEl.offsetHeight - bottomEdge);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar leftEdge = this.table.rowManager.element.scrollLeft,\r\n\t\t\trightEdge = this.table.rowManager.element.clientWidth + this.table.rowManager.element.scrollLeft,\r\n\t\t\tcellEl = cell.getElement(),\r\n\t\t\toffset = cellEl.offsetLeft;\r\n\r\n\t\t\tif(this.table.modExists(\"frozenColumns\")){\r\n\t\t\t\tleftEdge += parseInt(this.table.modules.frozenColumns.leftMargin);\r\n\t\t\t\trightEdge -= parseInt(this.table.modules.frozenColumns.rightMargin);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.renderHorizontal === \"virtual\"){\r\n\t\t\t\tleftEdge -= parseInt(this.table.columnManager.renderer.vDomPadLeft);\r\n\t\t\t\trightEdge -= parseInt(this.table.columnManager.renderer.vDomPadLeft);\r\n\t\t\t}\r\n\r\n\t\t\tif(cellEl.offsetLeft < leftEdge){\r\n\r\n\t\t\t\tthis.table.rowManager.element.scrollLeft -= (leftEdge - cellEl.offsetLeft);\r\n\t\t\t}else{\r\n\t\t\t\tif(cellEl.offsetLeft + cellEl.offsetWidth > rightEdge){\r\n\t\t\t\t\tthis.table.rowManager.element.scrollLeft += (cellEl.offsetLeft + cellEl.offsetWidth - rightEdge);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tedit(cell, e, forceEdit){\r\n\t\tvar self = this,\r\n\t\tallowEdit = true,\r\n\t\trendered = function(){},\r\n\t\telement = cell.getElement(),\r\n\t\tcellEditor, component, params;\r\n\r\n\t\t//prevent editing if another cell is refusing to leave focus (eg. validation fail)\r\n\t\tif(this.currentCell){\r\n\t\t\tif(!this.invalidEdit){\r\n\t\t\t\tthis.cancelEdit();\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//handle successfull value change\r\n\t\tfunction success(value){\r\n\t\t\tif(self.currentCell === cell){\r\n\t\t\t\tvar valid = true;\r\n\r\n\t\t\t\tif(cell.column.modules.validate && self.table.modExists(\"validate\") && self.table.options.validationMode != \"manual\"){\r\n\t\t\t\t\tvalid = self.table.modules.validate.validate(cell.column.modules.validate, cell, value);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(valid === true || self.table.options.validationMode === \"highlight\"){\r\n\t\t\t\t\tself.clearEditor();\r\n\r\n\r\n\t\t\t\t\tif(!cell.modules.edit){\r\n\t\t\t\t\t\tcell.modules.edit = {};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcell.modules.edit.edited = true;\r\n\r\n\t\t\t\t\tif(self.editedCells.indexOf(cell) == -1){\r\n\t\t\t\t\t\tself.editedCells.push(cell);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcell.setValue(value, true);\r\n\r\n\t\t\t\t\tif(valid !== true){\r\n\t\t\t\t\t\telement.classList.add(\"tabulator-validation-fail\");\r\n\t\t\t\t\t\tself.table.externalEvents.dispatch(\"validationFailed\", cell.getComponent(), value, valid);\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.invalidEdit = true;\r\n\t\t\t\t\telement.classList.add(\"tabulator-validation-fail\");\r\n\t\t\t\t\tself.focusCellNoEvent(cell, true);\r\n\t\t\t\t\trendered();\r\n\t\t\t\t\tself.table.externalEvents.dispatch(\"validationFailed\", cell.getComponent(), value, valid);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t// console.warn(\"Edit Success Error - cannot call success on a cell that is no longer being edited\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//handle aborted edit\r\n\t\tfunction cancel(){\r\n\t\t\tif(self.currentCell === cell){\r\n\t\t\t\tself.cancelEdit();\r\n\t\t\t}else{\r\n\t\t\t\t// console.warn(\"Edit Success Error - cannot call cancel on a cell that is no longer being edited\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\trendered = callback;\r\n\t\t}\r\n\r\n\t\tif(!cell.column.modules.edit.blocked){\r\n\t\t\tif(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t}\r\n\r\n\t\t\tswitch(typeof cell.column.modules.edit.check){\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tallowEdit = cell.column.modules.edit.check;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(allowEdit || forceEdit){\r\n\r\n\t\t\t\tself.cancelEdit();\r\n\r\n\t\t\t\tself.currentCell = cell;\r\n\r\n\t\t\t\tthis.focusScrollAdjust(cell);\r\n\r\n\t\t\t\tcomponent = cell.getComponent();\r\n\r\n\t\t\t\tif(this.mouseClick){\r\n\t\t\t\t\tthis.mouseClick = false;\r\n\r\n\t\t\t\t\tif(cell.column.definition.cellClick){\r\n\t\t\t\t\t\tcell.column.definition.cellClick.call(this.table, e, component);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(cell.column.definition.cellEditing){\r\n\t\t\t\t\tcell.column.definition.cellEditing.call(this.table, component);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.dispatch(\"cell-editing\", cell);\r\n\t\t\t\tthis.dispatchExternal(\"cellEditing\", component);\r\n\r\n\t\t\t\tparams = typeof cell.column.modules.edit.params === \"function\" ? cell.column.modules.edit.params(component) : cell.column.modules.edit.params;\r\n\r\n\t\t\t\tcellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params);\r\n\r\n\t\t\t\t//if editor returned, add to DOM, if false, abort edit\r\n\t\t\t\tif(cellEditor !== false){\r\n\r\n\t\t\t\t\tif(cellEditor instanceof Node){\r\n\t\t\t\t\t\telement.classList.add(\"tabulator-editing\");\r\n\t\t\t\t\t\tcell.row.getElement().classList.add(\"tabulator-row-editing\");\r\n\t\t\t\t\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\t\t\t\t\t\telement.appendChild(cellEditor);\r\n\r\n\t\t\t\t\t\t//trigger onRendered Callback\r\n\t\t\t\t\t\trendered();\r\n\r\n\t\t\t\t\t\t//prevent editing from triggering rowClick event\r\n\t\t\t\t\t\tvar children = element.children;\r\n\r\n\t\t\t\t\t\tfor (var i = 0; i < children.length; i++) {\r\n\t\t\t\t\t\t\tchildren[i].addEventListener(\"click\", function(e){\r\n\t\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Edit Error - Editor should return an instance of Node, the editor returned:\", cellEditor);\r\n\t\t\t\t\t\telement.blur();\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.blur();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tthis.mouseClick = false;\r\n\t\t\t\telement.blur();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.mouseClick = false;\r\n\t\t\telement.blur();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tgetEditedCells(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.editedCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tclearEdited(cell){\r\n\t\tvar editIndex;\r\n\r\n\t\tif(cell.modules.edit && cell.modules.edit.edited){\r\n\t\t\tcell.modules.edit.edited = false;\r\n\r\n\t\t\tif(cell.modules.validate){\r\n\t\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\teditIndex = this.editedCells.indexOf(cell);\r\n\r\n\t\tif(editIndex > -1){\r\n\t\t\tthis.editedCells.splice(editIndex, 1);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nEdit.moduleName = \"edit\";\r\n\r\n//load defaults\r\nEdit.editors = defaultEditors;\r\n\r\n\r\nexport default Edit;\r\n","class ExportRow{\r\n\tconstructor(type, columns, component, indent){\r\n\t\tthis.type = type;\r\n\t\tthis.columns = columns;\r\n\t\tthis.component = component || false;\r\n\t\tthis.indent = indent || 0;\r\n\t}\r\n}\r\n\r\nexport default ExportRow;","class ExportColumn{\r\n\tconstructor(value, component, width, height, depth){\r\n\t\tthis.value = value;\r\n\t\tthis.component = component || false;\r\n\t\tthis.width = width;\r\n\t\tthis.height = height;\r\n\t\tthis.depth = depth;\r\n\t}\r\n}\r\n\r\nexport default ExportColumn;","import Module from '../../core/Module.js';\r\n\r\nimport ExportRow from './ExportRow.js';\r\nimport ExportColumn from './ExportColumn.js';\r\n\r\nclass Export extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.config = {};\r\n\t\tthis.cloneTableStyle = true;\r\n\t\tthis.colVisProp = \"\";\r\n\r\n\t\tthis.registerTableOption(\"htmlOutputConfig\", false); //html outypu config\r\n\r\n\t\tthis.registerColumnOption(\"htmlOutput\");\r\n\t\tthis.registerColumnOption(\"titleHtmlOutput\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"getHtml\", this.getHtml.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tgenerateExportList(config, style, range, colVisProp){\r\n\t\tthis.cloneTableStyle = style;\r\n\t\tthis.config = config || {};\r\n\t\tthis.colVisProp = colVisProp;\r\n\r\n\t\tvar headers = this.config.columnHeaders !== false ? this.headersToExportRows(this.generateColumnGroupHeaders()) : [];\r\n\t\tvar body = this.bodyToExportRows(this.rowLookup(range));\r\n\r\n\t\treturn headers.concat(body);\r\n\t}\r\n\r\n\tgenereateTable(config, style, range, colVisProp){\r\n\t\tvar list = this.generateExportList(config, style, range, colVisProp);\r\n\r\n\t\treturn this.genereateTableElement(list);\r\n\t}\r\n\r\n\trowLookup(range){\r\n\t\tvar rows = [];\r\n\r\n\t\tif(typeof range == \"function\"){\r\n\t\t\trange.call(this.table).forEach((row) =>{\r\n\t\t\t\trow = this.table.rowManager.findRow(row);\r\n\r\n\t\t\t\tif(row){\r\n\t\t\t\t\trows.push(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tswitch(range){\r\n\t\t\t\tcase true:\r\n\t\t\t\tcase \"visible\":\r\n\t\t\t\trows = this.table.rowManager.getVisibleRows(false, true);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"all\":\r\n\t\t\t\trows = this.table.rowManager.rows;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"selected\":\r\n\t\t\t\trows = this.table.modules.selectRow.selectedRows;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"active\":\r\n\t\t\t\tdefault:\r\n\t\t\t\tif(this.table.options.pagination){\r\n\t\t\t\t\trows = this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length - 2);\r\n\t\t\t\t}else{\r\n\t\t\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn Object.assign([], rows);\r\n\t}\r\n\r\n\tgenerateColumnGroupHeaders(){\r\n\t\tvar output = [];\r\n\r\n\t\tvar columns = this.config.columnGroups !== false ? this.table.columnManager.columns : this.table.columnManager.columnsByIndex;\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\tvar colData = this.processColumnGroup(column);\r\n\r\n\t\t\tif(colData){\r\n\t\t\t\toutput.push(colData);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tprocessColumnGroup(column){\r\n\t\tvar subGroups = column.columns,\r\n\t\tmaxDepth = 0,\r\n\t\ttitle = column.definition[\"title\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))] || column.definition.title;\r\n\r\n\t\tvar groupData = {\r\n\t\t\ttitle:title,\r\n\t\t\tcolumn:column,\r\n\t\t\tdepth:1,\r\n\t\t};\r\n\r\n\t\tif(subGroups.length){\r\n\t\t\tgroupData.subGroups = [];\r\n\t\t\tgroupData.width = 0;\r\n\r\n\t\t\tsubGroups.forEach((subGroup) => {\r\n\t\t\t\tvar subGroupData = this.processColumnGroup(subGroup);\r\n\r\n\t\t\t\tif(subGroupData){\r\n\t\t\t\t\tgroupData.width += subGroupData.width;\r\n\t\t\t\t\tgroupData.subGroups.push(subGroupData);\r\n\r\n\t\t\t\t\tif(subGroupData.depth > maxDepth){\r\n\t\t\t\t\t\tmaxDepth = subGroupData.depth;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tgroupData.depth += maxDepth;\r\n\r\n\t\t\tif(!groupData.width){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.columnVisCheck(column)){\r\n\t\t\t\tgroupData.width = 1;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn groupData;\r\n\t}\r\n\r\n\tcolumnVisCheck(column){\r\n\t\treturn column.definition[this.colVisProp] !== false && (column.visible || (!column.visible && column.definition[this.colVisProp]));\r\n\t}\r\n\r\n\theadersToExportRows(columns){\r\n\t\tvar headers = [],\r\n\t\theaderDepth = 0,\r\n\t\texportRows = [];\r\n\r\n\t\tfunction parseColumnGroup(column, level){\r\n\r\n\t\t\tvar depth = headerDepth - level;\r\n\r\n\t\t\tif(typeof headers[level] === \"undefined\"){\r\n\t\t\t\theaders[level] = [];\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.height = column.subGroups ? 1 : (depth - column.depth) + 1;\r\n\r\n\t\t\theaders[level].push(column);\r\n\r\n\t\t\tif(column.height > 1){\r\n\t\t\t\tfor(let i = 1; i < column.height; i ++){\r\n\r\n\t\t\t\t\tif(typeof headers[level + i] === \"undefined\"){\r\n\t\t\t\t\t\theaders[level + i] = [];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\theaders[level + i].push(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(column.width > 1){\r\n\t\t\t\tfor(let i = 1; i < column.width; i ++){\r\n\t\t\t\t\theaders[level].push(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(column.subGroups){\r\n\t\t\t\tcolumn.subGroups.forEach(function(subGroup){\r\n\t\t\t\t\tparseColumnGroup(subGroup, level+1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//calculate maximum header debth\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tif(column.depth > headerDepth){\r\n\t\t\t\theaderDepth = column.depth;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tparseColumnGroup(column,0);\r\n\t\t});\r\n\r\n\t\theaders.forEach((header) => {\r\n\t\t\tvar columns = [];\r\n\r\n\t\t\theader.forEach((col) => {\r\n\t\t\t\tif(col){\r\n\t\t\t\t\tlet title = typeof col.title === \"undefined\" ? \"\" : col.title;\r\n\t\t\t\t\tcolumns.push(new ExportColumn(title, col.column.getComponent(), col.width, col.height, col.depth));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolumns.push(null);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\texportRows.push(new ExportRow(\"header\", columns));\r\n\t\t});\r\n\r\n\t\treturn exportRows;\r\n\t}\r\n\r\n\tbodyToExportRows(rows){\r\n\r\n\t\tvar columns = [];\r\n\t\tvar exportRows = [];\r\n\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tif (this.columnVisCheck(column)) {\r\n\t\t\t\tcolumns.push(column.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(this.config.columnCalcs !== false && this.table.modExists(\"columnCalcs\")){\r\n\t\t\tif(this.table.modules.columnCalcs.topInitialized){\r\n\t\t\t\trows.unshift(this.table.modules.columnCalcs.topRow);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modules.columnCalcs.botInitialized){\r\n\t\t\t\trows.push(this.table.modules.columnCalcs.botRow);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\trows = rows.filter((row) => {\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\treturn this.config.rowGroups !== false;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\treturn this.config.columnCalcs !== false;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\treturn !(this.table.options.dataTree && this.config.dataTree === false && row.modules.dataTree.parent);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\trows.forEach((row, i) => {\r\n\t\t\tvar rowData = row.getData(this.colVisProp);\r\n\t\t\tvar exportCols = [];\r\n\t\t\tvar indent = 0;\r\n\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\tindent = row.level;\r\n\t\t\t\texportCols.push(new ExportColumn(row.key, row.getComponent(), columns.length, 1));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\" :\r\n\t\t\t\tcase \"row\" :\r\n\t\t\t\tcolumns.forEach((col) => {\r\n\t\t\t\t\texportCols.push(new ExportColumn(col._column.getFieldValue(rowData), col, 1, 1));\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\r\n\t\t\t\t\tindent = row.modules.dataTree.index;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\texportRows.push(new ExportRow(row.type, exportCols, row.getComponent(), indent));\r\n\t\t});\r\n\r\n\t\treturn exportRows;\r\n\t}\r\n\r\n\tgenereateTableElement(list){\r\n\t\tvar table = document.createElement(\"table\"),\r\n\t\theaderEl = document.createElement(\"thead\"),\r\n\t\tbodyEl = document.createElement(\"tbody\"),\r\n\t\tstyles = this.lookupTableStyles(),\r\n\t\trowFormatter = this.table.options[\"rowFormatter\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))],\r\n\t\tsetup = {};\r\n\r\n\t\tsetup.rowFormatter = rowFormatter !== null ? rowFormatter : this.table.options.rowFormatter;\r\n\r\n\t\tif(this.table.options.dataTree &&this.config.dataTree !== false && this.table.modExists(\"columnCalcs\")){\r\n\t\t\tsetup.treeElementField = this.table.modules.dataTree.elementField;\r\n\t\t}\r\n\r\n\t\t//assign group header formatter\r\n\t\tsetup.groupHeader = this.table.options[\"groupHeader\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))];\r\n\r\n\t\tif(setup.groupHeader && !Array.isArray(setup.groupHeader)){\r\n\t\t\tsetup.groupHeader = [setup.groupHeader];\r\n\t\t}\r\n\r\n\t\ttable.classList.add(\"tabulator-print-table\");\r\n\r\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\"]);\r\n\r\n\r\n\t\tif(list.length > 1000){\r\n\t\t\tconsole.warn(\"It may take a long time to render an HTML table with more than 1000 rows\");\r\n\t\t}\r\n\r\n\t\tlist.forEach((row, i) => {\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"header\":\r\n\t\t\t\theaderEl.appendChild(this.genereateHeaderElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\tbodyEl.appendChild(this.genereateGroupElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\tbodyEl.appendChild(this.genereateCalcElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\tlet rowEl = this.genereateRowElement(row, setup, styles);\r\n\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\"]);\r\n\t\t\t\tbodyEl.appendChild(rowEl);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(headerEl.innerHTML){\r\n\t\t\ttable.appendChild(headerEl);\r\n\t\t}\r\n\r\n\t\ttable.appendChild(bodyEl);\r\n\r\n\r\n\t\tthis.mapElementStyles(this.table.element, table, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\"]);\r\n\t\treturn table;\r\n\t}\r\n\r\n\tlookupTableStyles(){\r\n\t\tvar styles = {};\r\n\r\n\t\t//lookup row styles\r\n\t\tif(this.cloneTableStyle && window.getComputedStyle){\r\n\t\t\tstyles.oddRow = this.table.element.querySelector(\".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.evenRow = this.table.element.querySelector(\".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.calcRow = this.table.element.querySelector(\".tabulator-row.tabulator-calcs\");\r\n\t\t\tstyles.firstRow = this.table.element.querySelector(\".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.firstGroup = this.table.element.getElementsByClassName(\"tabulator-group\")[0];\r\n\r\n\t\t\tif(styles.firstRow){\r\n\t\t\t\tstyles.styleCells = styles.firstRow.getElementsByClassName(\"tabulator-cell\");\r\n\t\t\t\tstyles.firstCell = styles.styleCells[0];\r\n\t\t\t\tstyles.lastCell = styles.styleCells[styles.styleCells.length - 1];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn styles;\r\n\t}\r\n\r\n\tgenereateHeaderElement(row, setup, styles){\r\n\t\tvar rowEl = document.createElement(\"tr\");\r\n\r\n\t\trow.columns.forEach((column) => {\r\n\t\t\tif(column){\r\n\t\t\t\tvar cellEl = document.createElement(\"th\");\r\n\t\t\t\tvar classNames = column.component._column.definition.cssClass ? column.component._column.definition.cssClass.split(\" \") : [];\r\n\r\n\t\t\t\tcellEl.colSpan = column.width;\r\n\t\t\t\tcellEl.rowSpan = column.height;\r\n\r\n\t\t\t\tcellEl.innerHTML = column.value;\r\n\r\n\t\t\t\tif(this.cloneTableStyle){\r\n\t\t\t\t\tcellEl.style.boxSizing = \"border-box\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tclassNames.forEach(function(className) {\r\n\t\t\t\t\tcellEl.classList.add(className);\r\n\t\t\t\t});\r\n\r\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\"]);\r\n\t\t\t\tthis.mapElementStyles(column.component._column.contentElement, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\"]);\r\n\r\n\t\t\t\tif(column.component._column.visible){\r\n\t\t\t\t\tthis.mapElementStyles(column.component.getElement(), cellEl, [\"width\"]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(column.component._column.definition.width){\r\n\t\t\t\t\t\tcellEl.style.width = column.component._column.definition.width + \"px\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(column.component._column.parent){\r\n\t\t\t\t\tthis.mapElementStyles(column.component._column.parent.groupElement, cellEl, [\"border-top\"]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowEl.appendChild(cellEl);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateGroupElement(row, setup, styles){\r\n\r\n\t\tvar rowEl = document.createElement(\"tr\"),\r\n\t\tcellEl = document.createElement(\"td\"),\r\n\t\tgroup = row.columns[0];\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-row\");\r\n\r\n\t\tif(setup.groupHeader && setup.groupHeader[row.indent]){\r\n\t\t\tgroup.value = setup.groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t}else{\r\n\t\t\tif(setup.groupHeader === false){\r\n\t\t\t\tgroup.value = group.value;\r\n\t\t\t}else{\r\n\t\t\t\tgroup.value = row.component._group.generator(group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcellEl.colSpan = group.width;\r\n\t\tcellEl.innerHTML = group.value;\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-group\");\r\n\t\trowEl.classList.add(\"tabulator-group-level-\" + row.indent);\r\n\r\n\t\tif(group.component.isVisible()){\r\n\t\t\trowEl.classList.add(\"tabulator-group-visible\");\r\n\t\t}\r\n\r\n\t\tthis.mapElementStyles(styles.firstGroup, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\r\n\t\tthis.mapElementStyles(styles.firstGroup, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\"]);\r\n\r\n\t\trowEl.appendChild(cellEl);\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateCalcElement(row, setup, styles){\r\n\t\tvar rowEl = this.genereateRowElement(row, setup, styles);\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-calcs\");\r\n\t\tthis.mapElementStyles(styles.calcRow, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateRowElement(row, setup, styles){\r\n\t\tvar rowEl = document.createElement(\"tr\");\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-row\");\r\n\r\n\t\trow.columns.forEach((col) => {\r\n\t\t\tif(col){\r\n\t\t\t\tvar cellEl = document.createElement(\"td\"),\r\n\t\t\t\tcolumn = col.component._column,\r\n\t\t\t\tindex = this.table.columnManager.findColumnIndex(column),\r\n\t\t\t\tvalue = col.value;\r\n\r\n\t\t\t\tvar cellWrapper = {\r\n\t\t\t\t\tmodules:{},\r\n\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetField:function(){\r\n\t\t\t\t\t\treturn column.definition.field;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\treturn cellEl;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetData:function(){\r\n\t\t\t\t\t\treturn row.component.getData();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\treturn row.component;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetComponent:function(){\r\n\t\t\t\t\t\treturn cellWrapper;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcolumn:column,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tvar classNames = column.definition.cssClass ? column.definition.cssClass.split(\" \") : [];\r\n\r\n\t\t\t\tclassNames.forEach(function(className) {\r\n\t\t\t\t\tcellEl.classList.add(className);\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.modExists(\"format\") && this.config.formatCells !== false){\r\n\t\t\t\t\tvalue = this.table.modules.format.formatExportValue(cellWrapper, this.colVisProp);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tvalue = JSON.stringify(value);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tvalue = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(value instanceof Node){\r\n\t\t\t\t\tcellEl.appendChild(value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcellEl.innerHTML = value;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(styles.styleCells[index] || styles.firstCell){\r\n\t\t\t\t\tthis.mapElementStyles(styles.styleCells[index] || styles.firstCell, 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\"]);\r\n\r\n\t\t\t\t\tif(column.definition.align){\r\n\t\t\t\t\t\tcellEl.style.textAlign = column.definition.align;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\r\n\t\t\t\t\tif((setup.treeElementField && setup.treeElementField == column.field) || (!setup.treeElementField && i == 0)){\r\n\t\t\t\t\t\tif(row.component._row.modules.dataTree.controlEl){\r\n\t\t\t\t\t\t\tcellEl.insertBefore(row.component._row.modules.dataTree.controlEl.cloneNode(true), cellEl.firstChild);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(row.component._row.modules.dataTree.branchEl){\r\n\t\t\t\t\t\t\tcellEl.insertBefore(row.component._row.modules.dataTree.branchEl.cloneNode(true), cellEl.firstChild);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowEl.appendChild(cellEl);\r\n\r\n\t\t\t\tif(cellWrapper.modules.format && cellWrapper.modules.format.renderedCallback){\r\n\t\t\t\t\tcellWrapper.modules.format.renderedCallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(setup.rowFormatter && this.config.formatCells !== false){\r\n\t\t\t\t\tsetup.rowFormatter(row.component);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateHTMLTable(list){\r\n\t\tvar holder = document.createElement(\"div\");\r\n\r\n\t\tholder.appendChild(this.genereateTableElement(list));\r\n\r\n\t\treturn holder.innerHTML;\r\n\t}\r\n\r\n\tgetHtml(visible, style, config, colVisProp){\r\n\t\tvar list = this.generateExportList(config || this.table.options.htmlOutputConfig, style, visible, colVisProp || \"htmlOutput\");\r\n\r\n\t\treturn this.genereateHTMLTable(list);\r\n\t}\r\n\r\n\tmapElementStyles(from, to, props){\r\n\t\tif(this.cloneTableStyle && from && to){\r\n\r\n\t\t\tvar lookup = {\r\n\t\t\t\t\"background-color\" : \"backgroundColor\",\r\n\t\t\t\t\"color\" : \"fontColor\",\r\n\t\t\t\t\"width\" : \"width\",\r\n\t\t\t\t\"font-weight\" : \"fontWeight\",\r\n\t\t\t\t\"font-family\" : \"fontFamily\",\r\n\t\t\t\t\"font-size\" : \"fontSize\",\r\n\t\t\t\t\"text-align\" : \"textAlign\",\r\n\t\t\t\t\"border-top\" : \"borderTop\",\r\n\t\t\t\t\"border-left\" : \"borderLeft\",\r\n\t\t\t\t\"border-right\" : \"borderRight\",\r\n\t\t\t\t\"border-bottom\" : \"borderBottom\",\r\n\t\t\t\t\"padding-top\" : \"paddingTop\",\r\n\t\t\t\t\"padding-left\" : \"paddingLeft\",\r\n\t\t\t\t\"padding-right\" : \"paddingRight\",\r\n\t\t\t\t\"padding-bottom\" : \"paddingBottom\",\r\n\t\t\t};\r\n\r\n\t\t\tif(window.getComputedStyle){\r\n\t\t\t\tvar fromStyle = window.getComputedStyle(from);\r\n\r\n\t\t\t\tprops.forEach(function(prop){\r\n\t\t\t\t\tto.style[lookup[prop]] = fromStyle.getPropertyValue(prop);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nExport.moduleName = \"export\";\r\n\r\nexport default Export;\r\n","export default {\r\n\r\n\t//equal to\r\n\t\"=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal == filterVal ? true : false;\r\n\t},\r\n\r\n\t//less than\r\n\t\"<\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal < filterVal ? true : false;\r\n\t},\r\n\r\n\t//less than or equal to\r\n\t\"<=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal <= filterVal ? true : false;\r\n\t},\r\n\r\n\t//greater than\r\n\t\">\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal > filterVal ? true : false;\r\n\t},\r\n\r\n\t//greater than or equal to\r\n\t\">=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal >= filterVal ? true : false;\r\n\t},\r\n\r\n\t//not equal to\r\n\t\"!=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal != filterVal ? true : false;\r\n\t},\r\n\r\n\t\"regex\":function(filterVal, rowVal, rowData, filterParams){\r\n\r\n\t\tif(typeof filterVal == \"string\"){\r\n\t\t\tfilterVal = new RegExp(filterVal);\r\n\t\t}\r\n\r\n\t\treturn filterVal.test(rowVal);\r\n\t},\r\n\r\n\t//contains the string\r\n\t\"like\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().indexOf(filterVal.toLowerCase()) > -1;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//contains the keywords\r\n\t\"keywords\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tvar keywords = filterVal.toLowerCase().split(typeof filterParams.separator === \"undefined\" ? \" \" : filterParams.separator),\r\n\t\tvalue = String(rowVal === null || typeof rowVal === \"undefined\" ? \"\" : rowVal).toLowerCase(),\r\n\t\tmatches = [];\r\n\r\n\t\tkeywords.forEach((keyword) =>{\r\n\t\t\tif(value.includes(keyword)){\r\n\t\t\t\tmatches.push(true);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn filterParams.matchAll ? matches.length === keywords.length : !!matches.length;\r\n\t},\r\n\r\n\t//starts with the string\r\n\t\"starts\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().startsWith(filterVal.toLowerCase());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//ends with the string\r\n\t\"ends\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().endsWith(filterVal.toLowerCase());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//in array\r\n\t\"in\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(Array.isArray(filterVal)){\r\n\t\t\treturn filterVal.length ? filterVal.indexOf(rowVal) > -1 : true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Filter Error - filter value is not an array:\", filterVal);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultFilters from './defaults/filters.js';\r\n\r\nclass Filter extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.filterList = []; //hold filter list\r\n\t\tthis.headerFilters = {}; //hold column filters\r\n\t\tthis.headerFilterColumns = []; //hold columns that use header filters\r\n\r\n\t\tthis.prevHeaderFilterChangeCheck = \"\";\r\n\t\tthis.prevHeaderFilterChangeCheck = \"{}\";\r\n\r\n\t\tthis.changed = false; //has filtering changed since last render\r\n\t\tthis.tableInitialized = false;\r\n\r\n\t\tthis.registerTableOption(\"filterMode\", \"local\"); //local or remote filtering\r\n\r\n\t\tthis.registerTableOption(\"initialFilter\", false); //initial filtering criteria\r\n\t\tthis.registerTableOption(\"initialHeaderFilter\", false); //initial header filtering criteria\r\n\t\tthis.registerTableOption(\"headerFilterLiveFilterDelay\", 300); //delay before updating column after user types in header filter\r\n\r\n\t\tthis.registerColumnOption(\"headerFilter\");\r\n\t\tthis.registerColumnOption(\"headerFilterPlaceholder\");\r\n\t\tthis.registerColumnOption(\"headerFilterParams\");\r\n\t\tthis.registerColumnOption(\"headerFilterEmptyCheck\");\r\n\t\tthis.registerColumnOption(\"headerFilterFunc\");\r\n\t\tthis.registerColumnOption(\"headerFilterFuncParams\");\r\n\t\tthis.registerColumnOption(\"headerFilterLiveFilter\");\r\n\r\n\t\tthis.registerTableFunction(\"searchRows\", this.searchRows.bind(this));\r\n\t\tthis.registerTableFunction(\"searchData\", this.searchData.bind(this));\r\n\r\n\t\tthis.registerTableFunction(\"setFilter\", this.userSetFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"refreshFilter\", this.userRefreshFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"addFilter\", this.userAddFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"getFilters\", this.getFilters.bind(this));\r\n\t\tthis.registerTableFunction(\"setHeaderFilterFocus\", this.userSetHeaderFilterFocus.bind(this));\r\n\t\tthis.registerTableFunction(\"getHeaderFilterValue\", this.userGetHeaderFilterValue.bind(this));\r\n\t\tthis.registerTableFunction(\"setHeaderFilterValue\", this.userSetHeaderFilterValue.bind(this));\r\n\t\tthis.registerTableFunction(\"getHeaderFilters\", this.getHeaderFilters.bind(this));\r\n\t\tthis.registerTableFunction(\"removeFilter\", this.userRemoveFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"clearFilter\", this.userClearFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"clearHeaderFilter\", this.userClearHeaderFilter.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"column\", \"headerFilterFocus\", this.setHeaderFilterFocus.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"reloadHeaderFilter\", this.reloadHeaderFilter.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"getHeaderFilterValue\", this.getHeaderFilterValue.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"setHeaderFilterValue\", this.setHeaderFilterValue.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumnHeaderFilter.bind(this));\r\n\t\tthis.subscribe(\"column-width-fit-before\", this.hideHeaderFilterElements.bind(this));\r\n\t\tthis.subscribe(\"column-width-fit-after\", this.showHeaderFilterElements.bind(this));\r\n\t\tthis.subscribe(\"table-built\", this.tableBuilt.bind(this));\r\n\r\n\t\tif(this.table.options.filterMode === \"remote\"){\r\n\t\t\tthis.subscribe(\"data-params\", this.remoteFilterParams.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerDataHandler(this.filter.bind(this), 10);\r\n\t}\r\n\r\n\ttableBuilt(){\r\n\t\tif(this.table.options.initialFilter){\r\n\t\t\tthis.setFilter(this.table.options.initialFilter);\r\n\t\t}\r\n\r\n\t\tif(this.table.options.initialHeaderFilter){\r\n\t\t\tthis.table.options.initialHeaderFilter.forEach((item) => {\r\n\r\n\t\t\t\tvar column = this.table.columnManager.findColumn(item.field);\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tthis.setHeaderFilterValue(column, item.value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", item.field);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.tableInitialized = true;\r\n\t}\r\n\r\n\tremoteFilterParams(data, config, silent, params){\r\n\t\tparams.filter = this.getFilters(true, true);\r\n\t\treturn params;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\t//set standard filters\r\n\tuserSetFilter(field, type, value, params){\r\n\t\tthis.setFilter(field, type, value, params);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//set standard filters\r\n\tuserRefreshFilter(){\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//add filter to array\r\n\tuserAddFilter(field, type, value, params){\r\n\t\tthis.addFilter(field, type, value, params);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\tuserSetHeaderFilterFocus(field){\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tthis.setHeaderFilterFocus(column);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Focus Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tuserGetHeaderFilterValue(field) {\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn this.getHeaderFilterValue(column);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", field);\r\n\t\t}\r\n\t}\r\n\r\n\tuserSetHeaderFilterValue(field, value){\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tthis.setHeaderFilterValue(column, value);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//remove filter from array\r\n\tuserRemoveFilter(field, type, value){\r\n\t\tthis.removeFilter(field, type, value);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//clear filters\r\n\tuserClearFilter(all){\r\n\t\tthis.clearFilter(all);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//clear header filters\r\n\tuserClearHeaderFilter(){\r\n\t\tthis.clearHeaderFilter();\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\r\n\t//search for specific row components\r\n\tsearchRows(field, type, value){\r\n\t\treturn this.search(\"rows\", field, type, value);\r\n\t}\r\n\r\n\t//search for specific data\r\n\tsearchData(field, type, value){\r\n\t\treturn this.search(\"data\", field, type, value);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnHeaderFilter(column){\r\n\t\tvar def = column.definition;\r\n\r\n\t\tif(def.headerFilter){\r\n\r\n\t\t\tif(typeof def.headerFilterPlaceholder !== \"undefined\" && def.field){\r\n\t\t\t\tthis.module(\"localize\").setHeaderFilterColumnPlaceholder(def.field, def.headerFilterPlaceholder);\r\n\t\t\t}\r\n\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column header filter\r\n\tinitializeColumn(column, value){\r\n\t\tvar self = this,\r\n\t\tfield = column.getField(),\r\n\t\tparams;\r\n\r\n\t\t//handle successfull value change\r\n\t\tfunction success(value){\r\n\t\t\tvar filterType = (column.modules.filter.tagType == \"input\" && column.modules.filter.attrType == \"text\") || column.modules.filter.tagType == \"textarea\" ? \"partial\" : \"match\",\r\n\t\t\ttype = \"\",\r\n\t\t\tfilterChangeCheck = \"\",\r\n\t\t\tfilterFunc;\r\n\r\n\t\t\tif(typeof column.modules.filter.prevSuccess === \"undefined\" || column.modules.filter.prevSuccess !== value){\r\n\r\n\t\t\t\tcolumn.modules.filter.prevSuccess = value;\r\n\r\n\t\t\t\tif(!column.modules.filter.emptyFunc(value)){\r\n\t\t\t\t\tcolumn.modules.filter.value = value;\r\n\r\n\t\t\t\t\tswitch(typeof column.definition.headerFilterFunc){\r\n\t\t\t\t\t\tcase \"string\":\r\n\t\t\t\t\t\tif(Filter.filters[column.definition.headerFilterFunc]){\r\n\t\t\t\t\t\t\ttype = column.definition.headerFilterFunc;\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\r\n\t\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\t\tparams = typeof params === \"function\" ? params(value, fieldVal, data) : params;\r\n\r\n\t\t\t\t\t\t\t\treturn Filter.filters[column.definition.headerFilterFunc](value, fieldVal, data, params);\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tconsole.warn(\"Header Filter Error - Matching filter function not found: \", column.definition.headerFilterFunc);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\r\n\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\tparams = typeof params === \"function\" ? params(value, fieldVal, data) : params;\r\n\r\n\t\t\t\t\t\t\treturn column.definition.headerFilterFunc(value, fieldVal, data, params);\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\ttype = filterFunc;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(!filterFunc){\r\n\t\t\t\t\t\tswitch(filterType){\r\n\t\t\t\t\t\t\tcase \"partial\":\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\tvar colVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\t\tif(typeof colVal !== 'undefined' && colVal !== null){\r\n\t\t\t\t\t\t\t\t\treturn String(colVal).toLowerCase().indexOf(String(value).toLowerCase()) > -1;\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\ttype = \"like\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\treturn column.getFieldValue(data) == value;\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\ttype = \"=\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tself.headerFilters[field] = {value:value, func:filterFunc, type:type, params:params || {}};\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdelete self.headerFilters[field];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfilterChangeCheck = JSON.stringify(self.headerFilters);\r\n\r\n\t\t\t\tif(self.prevHeaderFilterChangeCheck !== filterChangeCheck){\r\n\t\t\t\t\tself.prevHeaderFilterChangeCheck = filterChangeCheck;\r\n\r\n\t\t\t\t\tself.trackChanges();\r\n\t\t\t\t\tself.refreshFilter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tcolumn.modules.filter = {\r\n\t\t\tsuccess:success,\r\n\t\t\tattrType:false,\r\n\t\t\ttagType:false,\r\n\t\t\temptyFunc:false,\r\n\t\t};\r\n\r\n\t\tthis.generateHeaderFilterElement(column);\r\n\t}\r\n\r\n\tgenerateHeaderFilterElement(column, initialValue, reinitialize){\r\n\t\tvar self = this,\r\n\t\tsuccess = column.modules.filter.success,\r\n\t\tfield = column.getField(),\r\n\t\tfilterElement, editor, editorElement, cellWrapper, typingTimer, searchTrigger, params;\r\n\r\n\t\t//handle aborted edit\r\n\t\tfunction cancel(){}\r\n\r\n\t\tif(column.modules.filter.headerElement && column.modules.filter.headerElement.parentNode){\r\n\t\t\tcolumn.contentElement.removeChild(column.modules.filter.headerElement.parentNode);\r\n\t\t}\r\n\r\n\t\tif(field){\r\n\r\n\t\t\t//set empty value function\r\n\t\t\tcolumn.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function(value){\r\n\t\t\t\treturn !value && value !== \"0\" && value !== 0;\r\n\t\t\t};\r\n\r\n\t\t\tfilterElement = document.createElement(\"div\");\r\n\t\t\tfilterElement.classList.add(\"tabulator-header-filter\");\r\n\r\n\t\t\t//set column editor\r\n\t\t\tswitch(typeof column.definition.headerFilter){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(self.table.modules.edit.editors[column.definition.headerFilter]){\r\n\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.headerFilter];\r\n\r\n\t\t\t\t\tif((column.definition.headerFilter === \"tick\" || column.definition.headerFilter === \"tickCross\") && !column.definition.headerFilterEmptyCheck){\r\n\t\t\t\t\t\tcolumn.modules.filter.emptyFunc = function(value){\r\n\t\t\t\t\t\t\treturn value !== true && value !== false;\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Filter Error - Cannot build header filter, No such editor found: \", column.definition.editor);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\teditor = column.definition.headerFilter;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tif(column.modules.edit && column.modules.edit.editor){\r\n\t\t\t\t\teditor = column.modules.edit.editor;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]){\r\n\t\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.formatter];\r\n\r\n\t\t\t\t\t\tif((column.definition.formatter === \"tick\" || column.definition.formatter === \"tickCross\") && !column.definition.headerFilterEmptyCheck){\r\n\t\t\t\t\t\t\tcolumn.modules.filter.emptyFunc = function(value){\r\n\t\t\t\t\t\t\t\treturn value !== true && value !== false;\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\teditor = self.table.modules.edit.editors[\"input\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(editor){\r\n\r\n\t\t\t\tcellWrapper = {\r\n\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\treturn typeof initialValue !== \"undefined\" ? initialValue : \"\";\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetField:function(){\r\n\t\t\t\t\t\treturn column.definition.field;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\treturn filterElement;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\tnormalizeHeight:function(){\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\tparams = column.definition.headerFilterParams || {};\r\n\r\n\t\t\t\tparams = typeof params === \"function\" ? params.call(self.table, cellWrapper) : params;\r\n\r\n\t\t\t\teditorElement = editor.call(this.table.modules.edit, cellWrapper, function(){}, success, cancel, params);\r\n\r\n\t\t\t\tif(!editorElement){\r\n\t\t\t\t\tconsole.warn(\"Filter Error - Cannot add filter to \" + field + \" column, editor returned a value of false\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!(editorElement instanceof Node)){\r\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);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//set Placeholder Text\r\n\t\t\t\tif(field){\r\n\t\t\t\t\tself.langBind(\"headerFilters|columns|\" + column.definition.field, function(value){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"placeholder\", typeof value !== \"undefined\" && value ? value : self.langText(\"headerFilters|default\"));\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.langBind(\"headerFilters|default\", function(value){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"placeholder\", value);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//focus on element on click\r\n\t\t\t\teditorElement.addEventListener(\"click\", function(e){\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\teditorElement.focus();\r\n\t\t\t\t});\r\n\r\n\t\t\t\teditorElement.addEventListener(\"focus\", (e) => {\r\n\t\t\t\t\tvar left = this.table.columnManager.element.scrollLeft;\r\n\r\n\t\t\t\t\tvar headerPos = this.table.rowManager.element.scrollLeft + parseInt(this.table.columnManager.element.style.marginLeft);\r\n\r\n\t\t\t\t\tif(left !== headerPos){\r\n\t\t\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\t\t\tthis.table.columnManager.scrollHorizontal(left);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\t//live update filters as user types\r\n\t\t\t\ttypingTimer = false;\r\n\r\n\t\t\t\tsearchTrigger = function(e){\r\n\t\t\t\t\tif(typingTimer){\r\n\t\t\t\t\t\tclearTimeout(typingTimer);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ttypingTimer = setTimeout(function(){\r\n\t\t\t\t\t\tsuccess(editorElement.value);\r\n\t\t\t\t\t},self.table.options.headerFilterLiveFilterDelay);\r\n\t\t\t\t};\r\n\r\n\t\t\t\tcolumn.modules.filter.headerElement = editorElement;\r\n\t\t\t\tcolumn.modules.filter.attrType = editorElement.hasAttribute(\"type\") ? editorElement.getAttribute(\"type\").toLowerCase() : \"\" ;\r\n\t\t\t\tcolumn.modules.filter.tagType = editorElement.tagName.toLowerCase();\r\n\r\n\t\t\t\tif(column.definition.headerFilterLiveFilter !== false){\r\n\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\t!(\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === 'autocomplete' ||\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === 'tickCross' ||\r\n\t\t\t\t\t\t\t((column.definition.editor === 'autocomplete' ||\r\n\t\t\t\t\t\t\t\tcolumn.definition.editor === 'tickCross') &&\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === true)\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\teditorElement.addEventListener(\"keyup\", searchTrigger);\r\n\t\t\t\t\teditorElement.addEventListener(\"search\", searchTrigger);\r\n\r\n\r\n\t\t\t\t\t//update number filtered columns on change\r\n\t\t\t\t\tif(column.modules.filter.attrType == \"number\"){\r\n\t\t\t\t\t\teditorElement.addEventListener(\"change\", function(e){\r\n\t\t\t\t\t\t\tsuccess(editorElement.value);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//change text inputs to search inputs to allow for clearing of field\r\n\t\t\t\t\tif(column.modules.filter.attrType == \"text\" && this.table.browser !== \"ie\"){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"type\", \"search\");\r\n\t\t\t\t\t\t// editorElement.off(\"change blur\"); //prevent blur from triggering filter and preventing selection click\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\t//prevent input and select elements from propegating click to column sorters etc\r\n\t\t\t\t\tif(column.modules.filter.tagType == \"input\" || column.modules.filter.tagType == \"select\" || column.modules.filter.tagType == \"textarea\"){\r\n\t\t\t\t\t\teditorElement.addEventListener(\"mousedown\",function(e){\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfilterElement.appendChild(editorElement);\r\n\r\n\t\t\t\tcolumn.contentElement.appendChild(filterElement);\r\n\r\n\t\t\t\tif(!reinitialize){\r\n\t\t\t\t\tself.headerFilterColumns.push(column);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Filter Error - Cannot add header filter, column has no field set:\", column.definition.title);\r\n\t\t}\r\n\t}\r\n\r\n\t//hide all header filter elements (used to ensure correct column widths in \"fitData\" layout mode)\r\n\thideHeaderFilterElements(){\r\n\t\tthis.headerFilterColumns.forEach(function(column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tcolumn.modules.filter.headerElement.style.display = 'none';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//show all header filter elements (used to ensure correct column widths in \"fitData\" layout mode)\r\n\tshowHeaderFilterElements(){\r\n\t\tthis.headerFilterColumns.forEach(function(column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tcolumn.modules.filter.headerElement.style.display = '';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//programatically set focus of header filter\r\n\tsetHeaderFilterFocus(column){\r\n\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\tcolumn.modules.filter.headerElement.focus();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Focus Error - No header filter set on column:\", column.getField());\r\n\t\t}\r\n\t}\r\n\r\n\t//programmatically get value of header filter\r\n\tgetHeaderFilterValue(column){\r\n\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\treturn column.modules.filter.headerElement.value;\r\n\t\t} else {\r\n\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t}\r\n\t}\r\n\r\n\t//programatically set value of header filter\r\n\tsetHeaderFilterValue(column, value){\r\n\t\tif (column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tthis.generateHeaderFilterElement(column, value, true);\r\n\t\t\t\tcolumn.modules.filter.success(value);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treloadHeaderFilter(column){\r\n\t\tif (column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tthis.generateHeaderFilterElement(column, column.modules.filter.value, true);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trefreshFilter(){\r\n\t\tif(this.tableInitialized){\r\n\t\t\tif(this.table.options.filterMode === \"remote\"){\r\n\t\t\t\tthis.reloadData();\r\n\t\t\t}else{\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//TODO - Persist left position of row manager\r\n\t\t// left = this.scrollLeft;\r\n\t\t// this.scrollHorizontal(left);\r\n\t}\r\n\r\n\t//check if the filters has changed since last use\r\n\ttrackChanges(){\r\n\t\tthis.changed = true;\r\n\t\tthis.dispatch(\"filter-changed\");\r\n\t}\r\n\r\n\t//check if the filters has changed since last use\r\n\thasChanged(){\r\n\t\tvar changed = this.changed;\r\n\t\tthis.changed = false;\r\n\t\treturn changed;\r\n\t}\r\n\r\n\t//set standard filters\r\n\tsetFilter(field, type, value, params){\r\n\t\tthis.filterList = [];\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value, params:params}];\r\n\t\t}\r\n\r\n\t\tthis.addFilter(field);\r\n\t}\r\n\r\n\t//add filter to array\r\n\taddFilter(field, type, value, params){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value, params:params}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\tthis.filterList.push(filter);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.trackChanges();\r\n\t\t}\r\n\t}\r\n\r\n\tfindFilter(filter){\r\n\t\tvar column;\r\n\r\n\t\tif(Array.isArray(filter)){\r\n\t\t\treturn this.findSubFilters(filter);\r\n\t\t}\r\n\r\n\t\tvar filterFunc = false;\r\n\r\n\t\tif(typeof filter.field == \"function\"){\r\n\t\t\tfilterFunc = function(data){\r\n\t\t\t\treturn filter.field(data, filter.type || {})// pass params to custom filter function\r\n\t\t\t};\r\n\t\t}else{\r\n\r\n\t\t\tif(Filter.filters[filter.type]){\r\n\r\n\t\t\t\tcolumn = this.table.columnManager.getColumnByField(filter.field);\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\treturn Filter.filters[filter.type](filter.value, column.getFieldValue(data), data, filter.params || {});\r\n\t\t\t\t\t};\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\treturn Filter.filters[filter.type](filter.value, data[filter.field], data, filter.params || {});\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Filter Error - No such filter type found, ignoring: \", filter.type);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfilter.func = filterFunc;\r\n\r\n\t\treturn filter.func ? filter : false;\r\n\t}\r\n\r\n\tfindSubFilters(filters){\r\n\t\tvar output = [];\r\n\r\n\t\tfilters.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\toutput.push(filter);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output.length ? output : false;\r\n\t}\r\n\r\n\t//get all filters\r\n\tgetFilters(all, ajax){\r\n\t\tvar output = [];\r\n\r\n\t\tif(all){\r\n\t\t\toutput = this.getHeaderFilters();\r\n\t\t}\r\n\r\n\t\tif(ajax){\r\n\t\t\toutput.forEach(function(item){\r\n\t\t\t\tif(typeof item.type == \"function\"){\r\n\t\t\t\t\titem.type = \"function\";\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\toutput = output.concat(this.filtersToArray(this.filterList, ajax));\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//filter to Object\r\n\tfiltersToArray(filterList, ajax){\r\n\t\tvar output = [];\r\n\r\n\t\tfilterList.forEach((filter) => {\r\n\t\t\tvar item;\r\n\r\n\t\t\tif(Array.isArray(filter)){\r\n\t\t\t\toutput.push(this.filtersToArray(filter, ajax));\r\n\t\t\t}else{\r\n\t\t\t\titem = {field:filter.field, type:filter.type, value:filter.value}\r\n\r\n\t\t\t\tif(ajax){\r\n\t\t\t\t\tif(typeof item.type == \"function\"){\r\n\t\t\t\t\t\titem.type = \"function\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\toutput.push(item);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//get all filters\r\n\tgetHeaderFilters(){\r\n\t\tvar output = [];\r\n\r\n\t\tfor(var key in this.headerFilters){\r\n\t\t\toutput.push({field:key, type:this.headerFilters[key].type, value:this.headerFilters[key].value});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//remove filter from array\r\n\tremoveFilter(field, type, value){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tvar index = -1;\r\n\r\n\t\t\tif(typeof filter.field == \"object\"){\r\n\t\t\t\tindex = this.filterList.findIndex((element) => {\r\n\t\t\t\t\treturn filter === element;\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tindex = this.filterList.findIndex((element) => {\r\n\t\t\t\t\treturn filter.field === element.field && filter.type === element.type && filter.value === element.value;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.filterList.splice(index, 1);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Filter Error - No matching filter type found, ignoring: \", filter.type);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//clear filters\r\n\tclearFilter(all){\r\n\t\tthis.filterList = [];\r\n\r\n\t\tif(all){\r\n\t\t\tthis.clearHeaderFilter();\r\n\t\t}\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//clear header filters\r\n\tclearHeaderFilter(){\r\n\t\tthis.headerFilters = {};\r\n\t\tthis.prevHeaderFilterChangeCheck = \"{}\";\r\n\r\n\t\tthis.headerFilterColumns.forEach((column) => {\r\n\t\t\tif(typeof column.modules.filter.value !== \"undefined\"){\r\n\t\t\t\tdelete column.modules.filter.value;\r\n\t\t\t}\r\n\t\t\tcolumn.modules.filter.prevSuccess = undefined;\r\n\t\t\tthis.reloadHeaderFilter(column);\r\n\t\t});\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//search data and return matching rows\r\n\tsearch (searchType, field, type, value){\r\n\t\tvar activeRows = [],\r\n\t\tfilterList = [];\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\tfilterList.push(filter);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\tvar match = true;\r\n\r\n\t\t\tfilterList.forEach((filter) => {\r\n\t\t\t\tif(!this.filterRecurse(filter, row.getData())){\r\n\t\t\t\t\tmatch = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tactiveRows.push(searchType === \"data\" ? row.getData(\"data\") : row.getComponent());\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\t\treturn activeRows;\r\n\t}\r\n\r\n\t//filter row array\r\n\tfilter(rowList, filters){\r\n\t\tvar activeRows = [],\r\n\t\tactiveRowComponents = [];\r\n\r\n\t\tif(this.subscribedExternal(\"dataFiltering\")){\r\n\t\t\tthis.dispatchExternal(\"dataFiltering\", this.getFilters());\r\n\t\t}\r\n\r\n\t\tif(this.table.options.filterMode !== \"remote\" && (this.filterList.length || Object.keys(this.headerFilters).length)){\r\n\r\n\t\t\trowList.forEach((row) => {\r\n\t\t\t\tif(this.filterRow(row)){\r\n\t\t\t\t\tactiveRows.push(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t}else{\r\n\t\t\tactiveRows = rowList.slice(0);\r\n\t\t}\r\n\r\n\t\tif(this.subscribedExternal(\"dataFiltered\")){\r\n\r\n\t\t\tactiveRows.forEach((row) => {\r\n\t\t\t\tactiveRowComponents.push(row.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatchExternal(\"dataFiltered\", this.getFilters(), activeRowComponents);\r\n\t\t}\r\n\r\n\t\treturn activeRows;\r\n\t}\r\n\r\n\t//filter individual row\r\n\tfilterRow(row, filters){\r\n\t\tvar match = true,\r\n\t\tdata = row.getData();\r\n\r\n\t\tthis.filterList.forEach((filter) => {\r\n\t\t\tif(!this.filterRecurse(filter, data)){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\tfor(var field in this.headerFilters){\r\n\t\t\tif(!this.headerFilters[field].func(data)){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tfilterRecurse(filter, data){\r\n\t\tvar match = false;\r\n\r\n\t\tif(Array.isArray(filter)){\r\n\t\t\tfilter.forEach((subFilter) => {\r\n\t\t\t\tif(this.filterRecurse(subFilter, data)){\r\n\t\t\t\t\tmatch = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tmatch = filter.func(data);\r\n\t\t}\r\n\r\n\t\treturn match;\r\n\t}\r\n}\r\n\r\nFilter.moduleName = \"filter\";\r\n\r\n//load defaults\r\nFilter.filters = defaultFilters;\r\n\r\nexport default Filter;","export default function(cell, formatterParams, onRendered){\r\n\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn cell.getValue();\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().style.whiteSpace = \"pre-wrap\";\r\n\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar floatVal = parseFloat(cell.getValue()),\r\n\tsign = \"\",\r\n\tnumber, integer, decimal, rgx;\r\n\r\n\tvar decimalSym = formatterParams.decimal || \".\";\r\n\tvar thousandSym = formatterParams.thousand || \",\";\r\n\tvar negativeSign = formatterParams.negativeSign || \"-\";\r\n\tvar symbol = formatterParams.symbol || \"\";\r\n\tvar after = !!formatterParams.symbolAfter;\r\n\tvar precision = typeof formatterParams.precision !== \"undefined\" ? formatterParams.precision : 2;\r\n\r\n\tif(isNaN(floatVal)){\r\n\t\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n\t}\r\n\r\n\tif(floatVal < 0){\r\n\t\tfloatVal = Math.abs(floatVal);\r\n\t\tsign = negativeSign;\r\n\t}\r\n\r\n\tnumber = precision !== false ? floatVal.toFixed(precision) : floatVal;\r\n\tnumber = String(number).split(\".\");\r\n\r\n\tinteger = number[0];\r\n\tdecimal = number.length > 1 ? decimalSym + number[1] : \"\";\r\n\r\n\trgx = /(\\d+)(\\d{3})/;\r\n\r\n\twhile (rgx.test(integer)){\r\n\t\tinteger = integer.replace(rgx, \"$1\" + thousandSym + \"$2\");\r\n\t}\r\n\r\n\treturn after ? sign + integer + decimal + symbol : sign + symbol + integer + decimal;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\turlPrefix = formatterParams.urlPrefix || \"\",\r\n\tdownload = formatterParams.download,\r\n\tlabel = value,\r\n\tel = document.createElement(\"a\"),\r\n\tdata;\r\n\r\n\tif(formatterParams.labelField){\r\n\t\tdata = cell.getData();\r\n\t\tlabel = data[formatterParams.labelField];\r\n\t}\r\n\r\n\tif(formatterParams.label){\r\n\t\tswitch(typeof formatterParams.label){\r\n\t\t\tcase \"string\":\r\n\t\t\tlabel = formatterParams.label;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tlabel = formatterParams.label(cell);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(label){\r\n\t\tif(formatterParams.urlField){\r\n\t\t\tdata = cell.getData();\r\n\t\t\tvalue = data[formatterParams.urlField];\r\n\t\t}\r\n\r\n\t\tif(formatterParams.url){\r\n\t\t\tswitch(typeof formatterParams.url){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tvalue = formatterParams.url;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tvalue = formatterParams.url(cell);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tel.setAttribute(\"href\", urlPrefix + value);\r\n\r\n\t\tif(formatterParams.target){\r\n\t\t\tel.setAttribute(\"target\", formatterParams.target);\r\n\t\t}\r\n\r\n\t\tif(formatterParams.download){\r\n\r\n\t\t\tif(typeof download == \"function\"){\r\n\t\t\t\tdownload = download(cell);\r\n\t\t\t}else{\r\n\t\t\t\tdownload = download === true ? \"\" : download;\r\n\t\t\t}\r\n\r\n\t\t\tel.setAttribute(\"download\", download);\r\n\t\t}\r\n\r\n\t\tel.innerHTML = this.emptyToSpace(this.sanitizeHTML(label));\r\n\r\n\t\treturn el;\r\n\t}else{\r\n\t\treturn \" \";\r\n\t}\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar el = document.createElement(\"img\"),\r\n\tsrc = cell.getValue();\r\n\r\n\tif(formatterParams.urlPrefix){\r\n\t\tsrc = formatterParams.urlPrefix + cell.getValue();\r\n\t}\r\n\r\n\tif(formatterParams.urlSuffix){\r\n\t\tsrc = src + formatterParams.urlSuffix;\r\n\t}\r\n\r\n\tel.setAttribute(\"src\", src);\r\n\r\n\tswitch(typeof formatterParams.height){\r\n\t\tcase \"number\":\r\n\t\tel.style.height = formatterParams.height + \"px\";\r\n\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\tel.style.height = formatterParams.height;\r\n\t\tbreak;\r\n\t}\r\n\r\n\tswitch(typeof formatterParams.width){\r\n\t\tcase \"number\":\r\n\t\tel.style.width = formatterParams.width + \"px\";\r\n\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\tel.style.width = formatterParams.width;\r\n\t\tbreak;\r\n\t}\r\n\r\n\tel.addEventListener(\"load\", function(){\r\n\t\tcell.getRow().normalizeHeight();\r\n\t});\r\n\r\n\treturn el;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\telement = cell.getElement(),\r\n\tempty = formatterParams.allowEmpty,\r\n\ttruthy = formatterParams.allowTruthy,\r\n\ttick = typeof formatterParams.tickElement !== \"undefined\" ? formatterParams.tickElement : '',\r\n\tcross = typeof formatterParams.crossElement !== \"undefined\" ? formatterParams.crossElement : '';\r\n\r\n\tif((truthy && value) || (value === true || value === \"true\" || value === \"True\" || value === 1 || value === \"1\")){\r\n\t\telement.setAttribute(\"aria-checked\", true);\r\n\t\treturn tick || \"\";\r\n\t}else{\r\n\t\tif(empty && (value === \"null\" || value === \"\" || value === null || typeof value === \"undefined\")){\r\n\t\t\telement.setAttribute(\"aria-checked\", \"mixed\");\r\n\t\t\treturn \"\";\r\n\t\t}else{\r\n\t\t\telement.setAttribute(\"aria-checked\", false);\r\n\t\t\treturn cross || \"\";\r\n\t\t}\r\n\t}\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar inputFormat = formatterParams.inputFormat || \"yyyy-MM-dd HH:mm:ss\";\r\n\tvar\toutputFormat = formatterParams.outputFormat || \"dd/MM/yyyy HH:mm:ss\";\r\n\tvar\tinvalid = typeof formatterParams.invalidPlaceholder !== \"undefined\" ? formatterParams.invalidPlaceholder : \"\";\r\n\tvar value = cell.getValue();\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\tvar newDatetime = inputFormat === \"iso\" ? DT.fromISO(String(value)) : DT.fromFormat(String(value), inputFormat);\r\n\r\n\t\tif(newDatetime.isValid){\r\n\t\t\tif(formatterParams.timezone){\r\n\t\t\t\tnewDatetime = newDatetime.setZone(formatterParams.timezone);\r\n\t\t\t}\r\n\r\n\t\t\treturn newDatetime.toFormat(outputFormat);\r\n\t\t}else{\r\n\t\t\tif(invalid === true || !value){\r\n\t\t\t\treturn value;\r\n\t\t\t}else if(typeof invalid === \"function\"){\r\n\t\t\t\treturn invalid(value);\r\n\t\t\t}else{\r\n\t\t\t\treturn invalid;\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tconsole.error(\"Format Error - 'datetime' formatter is dependant on luxon.js\");\r\n\t}\r\n};","export default function (cell, formatterParams, onRendered) {\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar inputFormat = formatterParams.inputFormat || \"yyyy-MM-dd HH:mm:ss\";\r\n\tvar invalid = typeof formatterParams.invalidPlaceholder !== \"undefined\" ? formatterParams.invalidPlaceholder : \"\";\r\n\tvar suffix = typeof formatterParams.suffix !== \"undefined\" ? formatterParams.suffix : false;\r\n\tvar unit = typeof formatterParams.unit !== \"undefined\" ? formatterParams.unit : \"days\";\r\n\tvar humanize = typeof formatterParams.humanize !== \"undefined\" ? formatterParams.humanize : false;\r\n\tvar date = typeof formatterParams.date !== \"undefined\" ? formatterParams.date : DT.now();\r\n\tvar value = cell.getValue();\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\t\r\n\t\tvar newDatetime = inputFormat === \"iso\" ? DT.fromISO(String(value)) : DT.fromFormat(String(value), inputFormat);\r\n\r\n\t\tif (newDatetime.isValid){\r\n\t\t\tif(humanize){\r\n\t\t\t\t// return moment.duration(newDatetime.diff(date)).humanize(suffix);\r\n\t\t\t}else{\r\n\t\t\t\treturn parseInt(newDatetime.diff(date, unit)[unit]) + (suffix ? \" \" + suffix : \"\");\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\tif (invalid === true) {\r\n\t\t\t\treturn value;\r\n\t\t\t} else if (typeof invalid === \"function\") {\r\n\t\t\t\treturn invalid(value);\r\n\t\t\t} else {\r\n\t\t\t\treturn invalid;\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tconsole.error(\"Format Error - 'datetimediff' formatter is dependant on luxon.js\");\r\n\t}\r\n};","export default function (cell, formatterParams, onRendered) {\r\n\tvar value = cell.getValue();\r\n\r\n\tif (typeof formatterParams[value] === \"undefined\") {\r\n\t\tconsole.warn('Missing display value for ' + value);\r\n\t\treturn value;\r\n\t}\r\n\r\n\treturn formatterParams[value];\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\telement = cell.getElement(),\r\n\tmaxStars = formatterParams && formatterParams.stars ? formatterParams.stars : 5,\r\n\tstars = document.createElement(\"span\"),\r\n\tstar = document.createElementNS('http://www.w3.org/2000/svg', \"svg\"),\r\n\tstarActive = '',\r\n\tstarInactive = '';\r\n\r\n\t//style stars holder\r\n\tstars.style.verticalAlign = \"middle\";\r\n\r\n\t//style star\r\n\tstar.setAttribute(\"width\", \"14\");\r\n\tstar.setAttribute(\"height\", \"14\");\r\n\tstar.setAttribute(\"viewBox\", \"0 0 512 512\");\r\n\tstar.setAttribute(\"xml:space\", \"preserve\");\r\n\tstar.style.padding = \"0 1px\";\r\n\r\n\tvalue = value && !isNaN(value) ? parseInt(value) : 0;\r\n\r\n\tvalue = Math.max(0, Math.min(value, maxStars));\r\n\r\n\tfor(var i=1;i<= maxStars;i++){\r\n\t\tvar nextStar = star.cloneNode(true);\r\n\t\tnextStar.innerHTML = i <= value ? starActive : starInactive;\r\n\r\n\t\tstars.appendChild(nextStar);\r\n\t}\r\n\r\n\telement.style.whiteSpace = \"nowrap\";\r\n\telement.style.overflow = \"hidden\";\r\n\telement.style.textOverflow = \"ellipsis\";\r\n\r\n\telement.setAttribute(\"aria-label\", value);\r\n\r\n\treturn stars;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = this.sanitizeHTML(cell.getValue()) || 0,\r\n\tel = document.createElement(\"span\"),\r\n\tmax = formatterParams && formatterParams.max ? formatterParams.max : 100,\r\n\tmin = formatterParams && formatterParams.min ? formatterParams.min : 0,\r\n\tcolors = formatterParams && typeof formatterParams.color !== \"undefined\" ? formatterParams.color : [\"red\", \"orange\", \"green\"],\r\n\tcolor = \"#666666\",\r\n\tpercent, percentValue;\r\n\r\n\tif(isNaN(value) || typeof cell.getValue() === \"undefined\"){\r\n\t\treturn;\r\n\t}\r\n\r\n\tel.classList.add(\"tabulator-traffic-light\");\r\n\r\n\t//make sure value is in range\r\n\tpercentValue = parseFloat(value) <= max ? parseFloat(value) : max;\r\n\tpercentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min;\r\n\r\n\t//workout percentage\r\n\tpercent = (max - min) / 100;\r\n\tpercentValue = Math.round((percentValue - min) / percent);\r\n\r\n\t//set color\r\n\tswitch(typeof colors){\r\n\t\tcase \"string\":\r\n\t\tcolor = colors;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tcolor = colors(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(colors)){\r\n\t\t\tvar unit = 100 / colors.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, colors.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tcolor = colors[index];\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tel.style.backgroundColor = color;\r\n\r\n\treturn el;\r\n};","import CellComponent from '../../../../core/cell/CellComponent.js';\r\n\r\nexport default function(cell, formatterParams, onRendered){ //progress bar\r\n\tvar value = this.sanitizeHTML(cell.getValue()) || 0,\r\n\telement = cell.getElement(),\r\n\tmax = formatterParams && formatterParams.max ? formatterParams.max : 100,\r\n\tmin = formatterParams && formatterParams.min ? formatterParams.min : 0,\r\n\tlegendAlign = formatterParams && formatterParams.legendAlign ? formatterParams.legendAlign : \"center\",\r\n\tpercent, percentValue, color, legend, legendColor, top, left, right, bottom;\r\n\r\n\t//make sure value is in range\r\n\tpercentValue = parseFloat(value) <= max ? parseFloat(value) : max;\r\n\tpercentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min;\r\n\r\n\t//workout percentage\r\n\tpercent = (max - min) / 100;\r\n\tpercentValue = Math.round((percentValue - min) / percent);\r\n\r\n\t//set bar color\r\n\tswitch(typeof formatterParams.color){\r\n\t\tcase \"string\":\r\n\t\tcolor = formatterParams.color;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tcolor = formatterParams.color(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(formatterParams.color)){\r\n\t\t\tvar unit = 100 / formatterParams.color.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, formatterParams.color.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tcolor = formatterParams.color[index];\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tdefault:\r\n\t\tcolor = \"#2DC214\";\r\n\t}\r\n\r\n\t//generate legend\r\n\tswitch(typeof formatterParams.legend){\r\n\t\tcase \"string\":\r\n\t\tlegend = formatterParams.legend;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tlegend = formatterParams.legend(value);\r\n\t\tbreak;\r\n\t\tcase \"boolean\":\r\n\t\tlegend = value;\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\tlegend = false;\r\n\t}\r\n\r\n\t//set legend color\r\n\tswitch(typeof formatterParams.legendColor){\r\n\t\tcase \"string\":\r\n\t\tlegendColor = formatterParams.legendColor;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tlegendColor = formatterParams.legendColor(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(formatterParams.legendColor)){\r\n\t\t\tvar unit = 100 / formatterParams.legendColor.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, formatterParams.legendColor.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tlegendColor = formatterParams.legendColor[index];\r\n\t\t}\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\tlegendColor = \"#000\";\r\n\t}\r\n\r\n\telement.style.minWidth = \"30px\";\r\n\telement.style.position = \"relative\";\r\n\r\n\telement.setAttribute(\"aria-label\", percentValue);\r\n\r\n\tvar barEl = document.createElement(\"div\");\r\n\tbarEl.style.display = \"inline-block\";\r\n\tbarEl.style.position = \"absolute\";\r\n\tbarEl.style.width = percentValue + \"%\";\r\n\tbarEl.style.backgroundColor = color;\r\n\tbarEl.style.height = \"100%\";\r\n\r\n\tbarEl.setAttribute('data-max', max);\r\n\tbarEl.setAttribute('data-min', min);\r\n\r\n\tvar barContainer = document.createElement(\"div\");\r\n\tbarContainer.style.position = \"relative\";\r\n\tbarContainer.style.width = \"100%\";\r\n\tbarContainer.style.height = \"100%\";\r\n\r\n\tif(legend){\r\n\t\tvar legendEl = document.createElement(\"div\");\r\n\t\tlegendEl.style.position = \"absolute\";\r\n\t\tlegendEl.style.top = 0;\r\n\t\tlegendEl.style.left = 0;\r\n\t\tlegendEl.style.textAlign = legendAlign;\r\n\t\tlegendEl.style.width = \"100%\";\r\n\t\tlegendEl.style.color = legendColor;\r\n\t\tlegendEl.innerHTML = legend;\r\n\t}\r\n\r\n\tonRendered(function(){\r\n\r\n\t\t//handle custom element needed if formatter is to be included in printed/downloaded output\r\n\t\tif(!(cell instanceof CellComponent)){\r\n\t\t\tvar holderEl = document.createElement(\"div\");\r\n\t\t\tholderEl.style.position = \"absolute\";\r\n\t\t\tholderEl.style.top = \"4px\";\r\n\t\t\tholderEl.style.bottom = \"4px\";\r\n\t\t\tholderEl.style.left = \"4px\";\r\n\t\t\tholderEl.style.right = \"4px\";\r\n\r\n\t\t\telement.appendChild(holderEl);\r\n\r\n\t\t\telement = holderEl;\r\n\t\t}\r\n\r\n\t\telement.appendChild(barContainer);\r\n\t\tbarContainer.appendChild(barEl);\r\n\r\n\t\tif(legend){\r\n\t\t\tbarContainer.appendChild(legendEl);\r\n\t\t}\r\n\t});\r\n\r\n\treturn \"\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().style.backgroundColor = this.sanitizeHTML(cell.getValue());\r\n\treturn \"\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn '';\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn '';\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn this.table.rowManager.activeRows.indexOf(cell.getRow()._getSelf()) + 1 || \"\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().classList.add(\"tabulator-row-handle\");\r\n\treturn \"
\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar open = false,\r\n\tel = document.createElement(\"div\"),\r\n\tconfig = cell.getRow()._row.modules.responsiveLayout;\r\n\r\n\tel.classList.add(\"tabulator-responsive-collapse-toggle\");\r\n\tel.innerHTML = \"+-\";\r\n\r\n\tcell.getElement().classList.add(\"tabulator-row-handle\");\r\n\r\n\tfunction toggleList(isOpen){\r\n\t\tvar collapseEl = config.element;\r\n\r\n\t\tconfig.open = isOpen;\r\n\r\n\t\tif(collapseEl){\r\n\r\n\t\t\tif(config.open){\r\n\t\t\t\tel.classList.add(\"open\");\r\n\t\t\t\tcollapseEl.style.display = '';\r\n\t\t\t}else{\r\n\t\t\t\tel.classList.remove(\"open\");\r\n\t\t\t\tcollapseEl.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tel.addEventListener(\"click\", function(e){\r\n\t\te.stopImmediatePropagation();\r\n\t\ttoggleList(!config.open);\r\n\t});\r\n\r\n\ttoggleList(config.open);\r\n\r\n\treturn el;\r\n};","import RowComponent from '../../../../core/row/RowComponent.js';\r\n\r\nexport default function(cell, formatterParams, onRendered){\r\n\tvar checkbox = document.createElement(\"input\");\r\n\tvar blocked = false;\r\n\r\n\tcheckbox.type = 'checkbox';\r\n\r\n\tcheckbox.setAttribute(\"aria-label\", \"Select Row\");\r\n\t\r\n\tif(this.table.modExists(\"selectRow\", true)){\r\n\r\n\t\tcheckbox.addEventListener(\"click\", (e) => {\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tif(typeof cell.getRow == 'function'){\r\n\t\t\tvar row = cell.getRow();\r\n\r\n\t\t\tif(row instanceof RowComponent){\r\n\r\n\t\t\t\tcheckbox.addEventListener(\"change\", (e) => {\r\n\t\t\t\t\tif(this.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\t\tif(!blocked){\r\n\t\t\t\t\t\t\trow.toggleSelect();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tblocked = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trow.toggleSelect();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\tcheckbox.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\tblocked = true;\r\n\t\t\t\t\t\tthis.table.modules.selectRow.handleComplexRowClick(row._row, e);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcheckbox.checked = row.isSelected && row.isSelected();\r\n\t\t\t\tthis.table.modules.selectRow.registerRowSelectCheckbox(row, checkbox);\r\n\t\t\t}else{\r\n\t\t\t\tcheckbox = \"\";\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tcheckbox.addEventListener(\"change\", (e) => {\r\n\t\t\t\tif(this.table.modules.selectRow.selectedRows.length){\r\n\t\t\t\t\tthis.table.deselectRow();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis.table.selectRow(formatterParams.rowRange);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.table.modules.selectRow.registerHeaderSelectCheckbox(checkbox);\r\n\t\t}\r\n\t}\r\n\r\n\treturn checkbox;\r\n};","import plaintext from './formatters/plaintext.js';\r\nimport html from './formatters/html.js';\r\nimport textarea from './formatters/textarea.js';\r\nimport money from './formatters/money.js';\r\nimport link from './formatters/link.js';\r\nimport image from './formatters/image.js';\r\nimport tickCross from './formatters/tickCross.js';\r\nimport datetime from './formatters/datetime.js';\r\nimport datetimediff from './formatters/datetimediff.js';\r\nimport lookup from './formatters/lookup.js';\r\nimport star from './formatters/star.js';\r\nimport traffic from './formatters/traffic.js';\r\nimport progress from './formatters/progress.js';\r\nimport color from './formatters/color.js';\r\nimport buttonTick from './formatters/buttonTick.js';\r\nimport buttonCross from './formatters/buttonCross.js';\r\nimport rownum from './formatters/rownum.js';\r\nimport handle from './formatters/handle.js';\r\nimport responsiveCollapse from './formatters/responsiveCollapse.js';\r\nimport rowSelection from './formatters/rowSelection.js';\r\n\r\nexport default {\r\n\tplaintext:plaintext,\r\n\thtml:html,\r\n\ttextarea:textarea,\r\n\tmoney:money,\r\n\tlink:link,\r\n\timage:image,\r\n\ttickCross:tickCross,\r\n\tdatetime:datetime,\r\n\tdatetimediff:datetimediff,\r\n\tlookup:lookup,\r\n\tstar:star,\r\n\ttraffic:traffic,\r\n\tprogress:progress,\r\n\tcolor:color,\r\n\tbuttonTick:buttonTick,\r\n\tbuttonCross:buttonCross,\r\n\trownum:rownum,\r\n\thandle:handle,\r\n\tresponsiveCollapse:responsiveCollapse,\r\n\trowSelection:rowSelection,\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultFormatters from './defaults/formatters.js';\r\n\r\nclass Format extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.registerColumnOption(\"formatter\");\r\n\t\tthis.registerColumnOption(\"formatterParams\");\r\n\r\n\t\tthis.registerColumnOption(\"formatterPrint\");\r\n\t\tthis.registerColumnOption(\"formatterPrintParams\");\r\n\t\tthis.registerColumnOption(\"formatterClipboard\");\r\n\t\tthis.registerColumnOption(\"formatterClipboardParams\");\r\n\t\tthis.registerColumnOption(\"formatterHtmlOutput\");\r\n\t\tthis.registerColumnOption(\"formatterHtmlOutputParams\");\r\n\t\tthis.registerColumnOption(\"titleFormatter\");\r\n\t\tthis.registerColumnOption(\"titleFormatterParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-format\", this.formatValue.bind(this));\r\n\t\tthis.subscribe(\"cell-rendered\", this.cellRendered.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"column-format\", this.formatHeader.bind(this));\r\n\t}\r\n\r\n\t//initialize column formatter\r\n\tinitializeColumn(column){\r\n\t\tcolumn.modules.format = this.lookupFormatter(column, \"\");\r\n\r\n\t\tif(typeof column.definition.formatterPrint !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.print = this.lookupFormatter(column, \"Print\");\r\n\t\t}\r\n\r\n\t\tif(typeof column.definition.formatterClipboard !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.clipboard = this.lookupFormatter(column, \"Clipboard\");\r\n\t\t}\r\n\r\n\t\tif(typeof column.definition.formatterHtmlOutput !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.htmlOutput = this.lookupFormatter(column, \"HtmlOutput\");\r\n\t\t}\r\n\t}\r\n\r\n\tlookupFormatter(column, type){\r\n\t\tvar config = {params:column.definition[\"formatter\" + type + \"Params\"] || {}},\r\n\t\tformatter = column.definition[\"formatter\" + type];\r\n\r\n\t\t//set column formatter\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\tconfig.formatter = Format.formatters[formatter];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tconfig.formatter = formatter;\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn config;\r\n\t}\r\n\r\n\tcellRendered(cell){\r\n\t\tif(cell.modules.format && cell.modules.format.renderedCallback && !cell.modules.format.rendered){\r\n\t\t\tcell.modules.format.renderedCallback();\r\n\t\t\tcell.modules.format.rendered = true;\r\n\t\t}\r\n\t}\r\n\r\n\t//return a formatted value for a column header\r\n\tformatHeader(column, title, el){\r\n\t\tvar formatter, params, onRendered, mockCell;\r\n\r\n\t\tif(column.definition.titleFormatter){\r\n\t\t\tformatter = this.getFormatter(column.definition.titleFormatter);\r\n\r\n\t\t\tonRendered = (callback) => {\r\n\t\t\t\tcolumn.titleFormatterRendered = callback;\r\n\t\t\t};\r\n\r\n\t\t\tmockCell = {\r\n\t\t\t\tgetValue:function(){\r\n\t\t\t\t\treturn title;\r\n\t\t\t\t},\r\n\t\t\t\tgetElement:function(){\r\n\t\t\t\t\treturn el;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tparams = column.definition.titleFormatterParams || {};\r\n\r\n\t\t\tparams = typeof params === \"function\" ? params() : params;\r\n\r\n\t\t\treturn formatter.call(this, mockCell, params, onRendered);\r\n\t\t}else{\r\n\t\t\treturn title;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//return a formatted value for a cell\r\n\tformatValue(cell){\r\n\t\tvar component = cell.getComponent(),\r\n\t\tparams = typeof cell.column.modules.format.params === \"function\" ? cell.column.modules.format.params(component) : cell.column.modules.format.params;\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\tif(!cell.modules.format){\r\n\t\t\t\tcell.modules.format = {};\r\n\t\t\t}\r\n\r\n\t\t\tcell.modules.format.renderedCallback = callback;\r\n\t\t\tcell.modules.format.rendered = false;\r\n\t\t}\r\n\r\n\t\treturn cell.column.modules.format.formatter.call(this, component, params, onRendered);\r\n\t}\r\n\r\n\tformatExportValue(cell, type){\r\n\t\tvar formatter = cell.column.modules.format[type],\r\n\t\tparams;\r\n\r\n\t\tif(formatter){\r\n\t\t\tparams = typeof formatter.params === \"function\" ? formatter.params(component) : formatter.params;\r\n\r\n\t\t\tfunction onRendered(callback){\r\n\t\t\t\tif(!cell.modules.format){\r\n\t\t\t\t\tcell.modules.format = {};\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcell.modules.format.renderedCallback = callback;\r\n\t\t\t\tcell.modules.format.rendered = false;\r\n\t\t\t}\r\n\r\n\t\t\treturn formatter.formatter.call(this, cell.getComponent(), params, onRendered);\r\n\r\n\t\t}else{\r\n\t\t\treturn this.formatValue(cell);\r\n\t\t}\r\n\t}\r\n\r\n\tsanitizeHTML(value){\r\n\t\tif(value){\r\n\t\t\tvar entityMap = {\r\n\t\t\t\t'&': '&',\r\n\t\t\t\t'<': '<',\r\n\t\t\t\t'>': '>',\r\n\t\t\t\t'\"': '"',\r\n\t\t\t\t\"'\": ''',\r\n\t\t\t\t'/': '/',\r\n\t\t\t\t'`': '`',\r\n\t\t\t\t'=': '='\r\n\t\t\t};\r\n\r\n\t\t\treturn String(value).replace(/[&<>\"'`=\\/]/g, function (s) {\r\n\t\t\t\treturn entityMap[s];\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn value;\r\n\t\t}\r\n\t}\r\n\r\n\temptyToSpace(value){\r\n\t\treturn value === null || typeof value === \"undefined\" || value === \"\" ? \" \" : value;\r\n\t}\r\n\r\n\t//get formatter for cell\r\n\tgetFormatter(formatter){\r\n\t\tvar formatter;\r\n\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\tformatter = Format.formatters[formatter]\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tformatter = formatter;\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn formatter;\r\n\t}\r\n}\r\n\r\nFormat.moduleName = \"format\";\r\n\r\n//load defaults\r\nFormat.formatters = defaultFormatters;\r\n\r\nexport default Format;","import Module from '../../core/Module.js';\r\n\r\nclass FrozenColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.leftColumns = [];\r\n\t\tthis.rightColumns = [];\r\n\t\tthis.leftMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.rightPadding = 0;\r\n\t\tthis.initializationMode = \"left\";\r\n\t\tthis.active = false;\r\n\t\tthis.scrollEndTimer = false;\r\n\t\tthis.blocked = true;\r\n\t\t\r\n\t\tthis.registerColumnOption(\"frozen\");\r\n\t}\r\n\t\r\n\t//reset initial state\r\n\treset(){\r\n\t\tthis.initializationMode = \"left\";\r\n\t\tthis.leftColumns = [];\r\n\t\tthis.rightColumns = [];\r\n\t\tthis.leftMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.active = false;\r\n\t\t\r\n\t\tthis.table.columnManager.headersElement.style.marginLeft = 0;\r\n\t\tthis.table.columnManager.element.style.paddingRight = 0;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-layout\", this.layoutCell.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"column-width\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"row-layout-after\", this.layoutRow.bind(this));\r\n\t\tthis.subscribe(\"table-layout\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t\tthis.subscribe(\"columns-loading\", this.reset.bind(this));\r\n\t\tthis.subscribe(\"table-redraw\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"layout-refreshing\", this.blockLayout.bind(this));\r\n\t\tthis.subscribe(\"layout-refreshed\", this.unblockLayout.bind(this));\r\n\t}\r\n\t\r\n\tblockLayout(){\r\n\t\tthis.blocked = true;\r\n\t}\r\n\t\r\n\tunblockLayout(){\r\n\t\tthis.blocked = false;\r\n\t}\r\n\t\r\n\tlayoutCell(cell){\r\n\t\tthis.layoutElement(cell.element, cell.column)\r\n\t}\r\n\t\r\n\t//initialize specific column\r\n\tinitializeColumn(column){\r\n\t\tvar config = {margin:0, edge:false};\r\n\t\t\r\n\t\tif(!column.isGroup){\r\n\t\t\t\r\n\t\t\tif(this.frozenCheck(column)){\r\n\t\t\t\t\r\n\t\t\t\tconfig.position = this.initializationMode;\r\n\t\t\t\t\r\n\t\t\t\tif(this.initializationMode == \"left\"){\r\n\t\t\t\t\tthis.leftColumns.push(column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.rightColumns.unshift(column);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.active = true;\r\n\t\t\t\t\r\n\t\t\t\tcolumn.modules.frozen = config;\r\n\t\t\t}else{\r\n\t\t\t\tthis.initializationMode = \"right\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfrozenCheck(column){\r\n\t\tvar frozen = false;\r\n\t\t\r\n\t\tif(column.parent.isGroup && column.definition.frozen){\r\n\t\t\tconsole.warn(\"Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups\");\r\n\t\t}\r\n\t\t\r\n\t\tif(column.parent.isGroup){\r\n\t\t\treturn this.frozenCheck(column.parent);\r\n\t\t}else{\r\n\t\t\treturn column.definition.frozen;\r\n\t\t}\r\n\t\t\r\n\t\treturn frozen;\r\n\t}\r\n\t\r\n\t//quick layout to smooth horizontal scrolling\r\n\tscrollHorizontal(){\r\n\t\tvar rows;\r\n\t\t\r\n\t\tif(this.active){\r\n\t\t\tclearTimeout(this.scrollEndTimer);\r\n\r\n\t\t\trows = this.table.rowManager.getVisibleRows();\r\n\t\t\t\r\n\t\t\tthis.calcMargins(true);\r\n\t\t\t\r\n\t\t\tthis.layoutColumnPosition();\r\n\t\t\t\r\n\t\t\tthis.layoutCalcRows();\r\n\t\t\t\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\t//calculate margins for rows\r\n\tcalcMargins(scroll){\r\n\t\t\r\n\t\tif(!scroll){\r\n\t\t\tthis.leftMargin = this._calcSpace(this.leftColumns, this.leftColumns.length) + \"px\";\t\t\t\r\n\t\t\tthis.rightMargin = this._calcSpace(this.rightColumns, this.rightColumns.length) + \"px\";\t\r\n\t\t\tthis.table.rowManager.tableElement.style.marginRight = this.rightMargin;\r\n\t\t}\r\n\t\r\n\t\t//calculate right frozen columns\r\n\t\tthis.rightPadding = this.table.rowManager.element.clientWidth + this.table.columnManager.scrollLeft;\r\n\t}\r\n\t\r\n\t//layout calculation rows\r\n\tlayoutCalcRows(){\r\n\t\tif(this.table.modExists(\"columnCalcs\")){\r\n\t\t\tif(this.table.modules.columnCalcs.topInitialized && this.table.modules.columnCalcs.topRow){\r\n\t\t\t\tthis.layoutRow(this.table.modules.columnCalcs.topRow);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.modules.columnCalcs.botInitialized && this.table.modules.columnCalcs.botRow){\r\n\t\t\t\tthis.layoutRow(this.table.modules.columnCalcs.botRow);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.modExists(\"groupRows\")){\r\n\t\t\t\tthis.layoutGroupCalcs(this.table.modules.groupRows.getGroups())\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutGroupCalcs(groups){\r\n\t\tgroups.forEach((group) => {\r\n\t\t\tif(group.calcs.top){\r\n\t\t\t\tthis.layoutRow(group.calcs.top);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(group.calcs.bottom){\r\n\t\t\t\tthis.layoutRow(group.calcs.bottom);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(group.groupList && group.groupList.length){\r\n\t\t\t\tthis.layoutGroupCalcs(group.groupList && group.groupList);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//calculate column positions and layout headers\r\n\tlayoutColumnPosition(allCells){\r\n\t\tvar leftParents = [];\r\n\t\t\r\n\t\tvar leftMargin = 0;\r\n\t\tvar rightMargin = 0;\r\n\t\t\r\n\t\tthis.table.columnManager.headersElement.style.marginLeft = this.leftMargin;\r\n\t\tthis.table.columnManager.element.style.paddingRight = this.rightMargin;\r\n\r\n\t\tthis.leftColumns.forEach((column, i) => {\t\r\n\t\t\tcolumn.modules.frozen.margin = (leftMargin + this.table.columnManager.scrollLeft) + \"px\";\r\n\r\n\t\t\tif(column.visible){\r\n\t\t\t\tleftMargin += column.getWidth();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(i == this.leftColumns.length - 1){\r\n\t\t\t\tcolumn.modules.frozen.edge = true;\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.modules.frozen.edge = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(column.parent.isGroup){\r\n\t\t\t\tvar parentEl = this.getColGroupParentElement(column);\r\n\t\t\t\tif(!leftParents.includes(parentEl)){\r\n\t\t\t\t\tthis.layoutElement(parentEl, column);\r\n\t\t\t\t\tleftParents.push(parentEl);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(column.modules.frozen.edge){\r\n\t\t\t\t\tparentEl.classList.add(\"tabulator-frozen-\" + column.modules.frozen.position);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.layoutElement(column.getElement(), column);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(allCells){\r\n\t\t\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.rightColumns.forEach((column, i) => {\r\n\r\n\t\t\tif(column.visible){\r\n\t\t\t\trightMargin += column.getWidth();\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.modules.frozen.margin = (this.rightPadding - rightMargin) + \"px\";\r\n\t\t\t\r\n\t\t\tif(i == this.rightColumns.length - 1){\r\n\t\t\t\tcolumn.modules.frozen.edge = true;\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.modules.frozen.edge = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(column.parent.isGroup){\r\n\t\t\t\tthis.layoutElement(this.getColGroupParentElement(column), column);\r\n\t\t\t}else{\r\n\t\t\t\tthis.layoutElement(column.getElement(), column);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(allCells){\r\n\t\t\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tgetColGroupParentElement(column){\r\n\t\treturn column.parent.isGroup ? this.getColGroupParentElement(column.parent) : column.getElement();\r\n\t}\r\n\t\r\n\t//layout columns appropriately\r\n\tlayout(){\r\n\t\tif(this.active && !this.blocked){\r\n\t\t\t//calculate row padding\r\n\t\t\tthis.calcMargins();\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) =>{\r\n\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.layoutCalcRows();\r\n\t\t\t\r\n\t\t\t//calculate left columns\r\n\t\t\tthis.layoutColumnPosition(true);\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\t\t\r\n\t\trowEl.style.paddingLeft = this.leftMargin;\r\n\t\t\r\n\t\tif(this.table.options.layout === \"fitDataFill\" && this.rightColumns.length){\r\n\t\t\tthis.table.rowManager.getTableElement().style.minWidth = \"calc(100% - \" + this.rightMargin + \")\";\r\n\t\t}\r\n\t\t\r\n\t\tthis.leftColumns.forEach((column) => {\r\n\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\r\n\t\t\tif(cell){\r\n\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.rightColumns.forEach((column) => {\r\n\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\r\n\t\t\tif(cell){\r\n\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tlayoutElement(element, column){\r\n\t\t\r\n\t\tif(column.modules.frozen){\r\n\t\t\telement.style.position = \"absolute\";\r\n\t\t\telement.style.left = column.modules.frozen.margin;\r\n\t\t\t\r\n\t\t\telement.classList.add(\"tabulator-frozen\");\r\n\t\t\t\r\n\t\t\tif(column.modules.frozen.edge){\r\n\t\t\t\telement.classList.add(\"tabulator-frozen-\" + column.modules.frozen.position);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_calcSpace(columns, index){\r\n\t\tvar width = 0;\r\n\t\t\r\n\t\tfor (let i = 0; i < index; i++){\r\n\t\t\tif(columns[i].visible){\r\n\t\t\t\twidth += columns[i].getWidth();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn width;\r\n\t}\r\n}\r\n\r\nFrozenColumns.moduleName = \"frozenColumns\";\r\n\r\nexport default FrozenColumns;","import Module from '../../core/Module.js';\r\n\r\nclass FrozenRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.topElement = document.createElement(\"div\");\r\n\t\tthis.rows = [];\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"freeze\", this.freezeRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"unfreeze\", this.unfreezeRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isFrozen\", this.isRowFrozen.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.rows = [];\r\n\r\n\t\tthis.topElement.classList.add(\"tabulator-frozen-rows-holder\");\r\n\r\n\t\t// this.table.columnManager.element.append(this.topElement);\r\n\t\tthis.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\r\n\r\n\t\tthis.subscribe(\"row-deleting\", this.detachRow.bind(this));\r\n\t\tthis.subscribe(\"rows-visible\", this.visibleRows.bind(this));\r\n\r\n\t\tthis.registerDisplayHandler(this.getRows.bind(this), 10);\r\n\t}\r\n\r\n\tisRowFrozen(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\t\treturn index > -1;\r\n\t}\r\n\r\n\tisFrozen(){\r\n\t\treturn !!this.rows.length;\r\n\t}\r\n\r\n\tvisibleRows(viewable, rows){\r\n\t\tthis.rows.forEach((row) => {\r\n\t\t\trows.push(row);\r\n\t\t});\r\n\r\n\t\treturn rows;\r\n\t}\r\n\r\n\t//filter frozen rows out of display data\r\n\tgetRows(rows){\r\n\t\tvar self = this,\r\n\t\tfrozen = [],\r\n\t\toutput = rows.slice(0);\r\n\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\tvar index = output.indexOf(row);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\toutput.splice(index, 1);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tfreezeRow(row){\r\n\t\tif(!row.modules.frozen){\r\n\t\t\trow.modules.frozen = true;\r\n\t\t\tthis.topElement.appendChild(row.getElement());\r\n\t\t\trow.initialize();\r\n\t\t\trow.normalizeHeight();\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\tthis.rows.push(row);\r\n\r\n\t\t\tthis.refreshData(false, \"display\")\r\n\r\n\t\t\tthis.styleRows();\r\n\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Freeze Error - Row is already frozen\");\r\n\t\t}\r\n\t}\r\n\r\n\tunfreezeRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\r\n\t\tif(row.modules.frozen){\r\n\r\n\t\t\trow.modules.frozen = false;\r\n\r\n\t\t\tthis.detachRow(row);\r\n\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\tthis.refreshData(false, \"display\")\r\n\r\n\t\t\tif(this.rows.length){\r\n\t\t\t\tthis.styleRows();\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Freeze Error - Row is already unfrozen\");\r\n\t\t}\r\n\t}\r\n\r\n\tdetachRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tvar rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\r\n\t\t\tthis.rows.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\tstyleRows(row){\r\n\t\tthis.rows.forEach((row, i) => {\r\n\t\t\tthis.table.rowManager.styleRow(row, i);\r\n\t\t});\r\n\t}\r\n}\r\n\r\nFrozenRows.moduleName = \"frozenRows\";\r\n\r\nexport default FrozenRows;","//public group object\r\nclass GroupComponent {\r\n\tconstructor (group){\r\n\t\tthis._group = group;\r\n\t\tthis.type = \"GroupComponent\";\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._group.groupManager.table.componentFunctionBinder.handle(\"row\", target._group, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetKey(){\r\n\t\treturn this._group.key;\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._group.field;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._group.element;\r\n\t}\r\n\r\n\tgetRows(){\r\n\t\treturn this._group.getRows(true);\r\n\t}\r\n\r\n\tgetSubGroups(){\r\n\t\treturn this._group.getSubGroups(true);\r\n\t}\r\n\r\n\tgetParentGroup(){\r\n\t\treturn this._group.parent ? this._group.parent.getComponent() : false;\r\n\t}\r\n\r\n\tisVisible(){\r\n\t\treturn this._group.visible;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tthis._group.show();\r\n\t}\r\n\r\n\thide(){\r\n\t\tthis._group.hide();\r\n\t}\r\n\r\n\ttoggle(){\r\n\t\tthis._group.toggleVisibility();\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._group;\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._group.groupManager.table;\r\n\t}\r\n}\r\n\r\nexport default GroupComponent;","import Helpers from '../../core/tools/Helpers.js';\r\nimport GroupComponent from './GroupComponent.js';\r\n\r\n//Group functions\r\nclass Group{\r\n\t\r\n\tconstructor(groupManager, parent, level, key, field, generator, oldGroup){\r\n\t\tthis.groupManager = groupManager;\r\n\t\tthis.parent = parent;\r\n\t\tthis.key = key;\r\n\t\tthis.level = level;\r\n\t\tthis.field = field;\r\n\t\tthis.hasSubGroups = level < (groupManager.groupIDLookups.length - 1);\r\n\t\tthis.addRow = this.hasSubGroups ? this._addRowToGroup : this._addRow;\r\n\t\tthis.type = \"group\"; //type of element\r\n\t\tthis.old = oldGroup;\r\n\t\tthis.rows = [];\r\n\t\tthis.groups = [];\r\n\t\tthis.groupList = [];\r\n\t\tthis.generator = generator;\r\n\t\tthis.element = false;\r\n\t\tthis.elementContents = false;\r\n\t\tthis.height = 0;\r\n\t\tthis.outerHeight = 0;\r\n\t\tthis.initialized = false;\r\n\t\tthis.calcs = {};\r\n\t\tthis.initialized = false;\r\n\t\tthis.modules = {};\r\n\t\tthis.arrowElement = false;\r\n\t\t\r\n\t\tthis.visible = oldGroup ? oldGroup.visible : (typeof groupManager.startOpen[level] !== \"undefined\" ? groupManager.startOpen[level] : groupManager.startOpen[0]);\r\n\t\t\r\n\t\tthis.component = null;\r\n\t\t\r\n\t\tthis.createElements();\r\n\t\tthis.addBindings();\r\n\t\t\r\n\t\tthis.createValueGroups();\r\n\t}\r\n\t\r\n\twipe(){\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\tgroup.wipe();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\tif(row.modules){\r\n\t\t\t\t\tdelete row.modules.group;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\tthis.element = false;\r\n\t\tthis.arrowElement = false;\r\n\t\tthis.elementContents = false;\r\n\t}\r\n\t\r\n\tcreateElements(){\r\n\t\tvar arrow = document.createElement(\"div\");\r\n\t\tarrow.classList.add(\"tabulator-arrow\");\r\n\t\t\r\n\t\tthis.element = document.createElement(\"div\");\r\n\t\tthis.element.classList.add(\"tabulator-row\");\r\n\t\tthis.element.classList.add(\"tabulator-group\");\r\n\t\tthis.element.classList.add(\"tabulator-group-level-\" + this.level);\r\n\t\tthis.element.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\tthis.arrowElement = document.createElement(\"div\");\r\n\t\tthis.arrowElement.classList.add(\"tabulator-group-toggle\");\r\n\t\tthis.arrowElement.appendChild(arrow);\r\n\t\t\r\n\t\t//setup movable rows\r\n\t\tif(this.groupManager.table.options.movableRows !== false && this.groupManager.table.modExists(\"moveRow\")){\r\n\t\t\tthis.groupManager.table.modules.moveRow.initializeGroupHeader(this);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcreateValueGroups(){\r\n\t\tvar level = this.level + 1;\r\n\t\tif(this.groupManager.allowedValues && this.groupManager.allowedValues[level]){\r\n\t\t\tthis.groupManager.allowedValues[level].forEach((value) => {\r\n\t\t\t\tthis._createGroup(value, level);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\taddBindings(){\r\n\t\tvar toggleElement;\r\n\t\t\r\n\t\tif(this.groupManager.table.options.groupToggleElement){\r\n\t\t\ttoggleElement = this.groupManager.table.options.groupToggleElement == \"arrow\" ? this.arrowElement : this.element;\r\n\t\t\t\r\n\t\t\ttoggleElement.addEventListener(\"click\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\tthis.toggleVisibility();\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\t_createGroup(groupID, level){\r\n\t\tvar groupKey = level + \"_\" + groupID;\r\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);\r\n\t\t\r\n\t\tthis.groups[groupKey] = group;\r\n\t\tthis.groupList.push(group);\r\n\t}\r\n\t\r\n\t_addRowToGroup(row){\r\n\t\t\r\n\t\tvar level = this.level + 1;\r\n\t\t\r\n\t\tif(this.hasSubGroups){\r\n\t\t\tvar groupID = this.groupManager.groupIDLookups[level].func(row.getData()),\r\n\t\t\tgroupKey = level + \"_\" + groupID;\r\n\t\t\t\r\n\t\t\tif(this.groupManager.allowedValues && this.groupManager.allowedValues[level]){\r\n\t\t\t\tif(this.groups[groupKey]){\r\n\t\t\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(!this.groups[groupKey]){\r\n\t\t\t\t\tthis._createGroup(groupID, level);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_addRow(row){\r\n\t\tthis.rows.push(row);\r\n\t\trow.modules.group = this;\r\n\t}\r\n\t\r\n\tinsertRow(row, to, after){\r\n\t\tvar data = this.conformRowData({});\r\n\t\t\r\n\t\trow.updateData(data);\r\n\t\t\r\n\t\tvar toIndex = this.rows.indexOf(to);\r\n\t\t\r\n\t\tif(toIndex > -1){\r\n\t\t\tif(after){\r\n\t\t\t\tthis.rows.splice(toIndex+1, 0, row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.splice(toIndex, 0, row);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(after){\r\n\t\t\t\tthis.rows.push(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.unshift(row);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\trow.modules.group = this;\r\n\t\t\r\n\t\tthis.generateGroupHeaderContents();\r\n\t\t\r\n\t\tif(this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\tthis.groupManager.table.modules.columnCalcs.recalcGroup(this);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.updateGroupRows(true);\r\n\t}\r\n\t\r\n\tscrollHeader(left){\r\n\t\tif(this.arrowElement){\r\n\t\t\tthis.arrowElement.style.marginLeft = left;\r\n\t\t\t\r\n\t\t\tthis.groupList.forEach(function(child){\r\n\t\t\t\tchild.scrollHeader(left);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRowIndex(row){}\r\n\t\r\n\t//update row data to match grouping contraints\r\n\tconformRowData(data){\r\n\t\tif(this.field){\r\n\t\t\tdata[this.field] = this.key;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Data Conforming Error - Cannot conform row data to match new group as groupBy is a function\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.parent){\r\n\t\t\tdata = this.parent.conformRowData(data);\r\n\t\t}\r\n\t\t\r\n\t\treturn data;\r\n\t}\r\n\t\r\n\tremoveRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\t\tvar el = row.getElement();\r\n\t\t\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.rows.splice(index, 1);\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.groupManager.table.options.groupValues && !this.rows.length){\r\n\t\t\tif(this.parent){\r\n\t\t\t\tthis.parent.removeGroup(this);\r\n\t\t\t}else{\r\n\t\t\t\tthis.groupManager.removeGroup(this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tif(el.parentNode){\r\n\t\t\t\tel.parentNode.removeChild(el);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.generateGroupHeaderContents();\r\n\t\t\t\r\n\t\t\tif(this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\t\tthis.groupManager.table.modules.columnCalcs.recalcGroup(this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveGroup(group){\r\n\t\tvar groupKey = group.level + \"_\" + group.key,\r\n\t\tindex;\r\n\t\t\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tdelete this.groups[groupKey];\r\n\t\t\t\r\n\t\t\tindex = this.groupList.indexOf(group);\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.groupList.splice(index, 1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!this.groupList.length){\r\n\t\t\t\tif(this.parent){\r\n\t\t\t\t\tthis.parent.removeGroup(this);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.groupManager.removeGroup(this);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetHeadersAndRows(noCalc){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\toutput.push(this);\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(this.visible){\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\t\toutput = output.concat(group.getHeadersAndRows(noCalc));\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tif(!noCalc && this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\r\n\t\t\t\t\tif(this.calcs.top){\r\n\t\t\t\t\t\tthis.calcs.top.detachElement();\r\n\t\t\t\t\t\tthis.calcs.top.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows);\r\n\t\t\t\t\toutput.push(this.calcs.top);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\toutput = output.concat(this.rows);\r\n\t\t\t\t\r\n\t\t\t\tif(!noCalc && this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\r\n\t\t\t\t\tif(this.calcs.bottom){\r\n\t\t\t\t\t\tthis.calcs.bottom.detachElement();\r\n\t\t\t\t\t\tthis.calcs.bottom.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows);\r\n\t\t\t\t\toutput.push(this.calcs.bottom);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!this.groupList.length && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\t\t\r\n\t\t\t\tif(this.groupManager.table.modExists(\"columnCalcs\")){\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!noCalc && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\r\n\t\t\t\t\t\tif(this.calcs.top){\r\n\t\t\t\t\t\t\tthis.calcs.top.detachElement();\r\n\t\t\t\t\t\t\tthis.calcs.top.deleteCells();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.groupManager.table.options.groupClosedShowCalcs){\r\n\t\t\t\t\t\t\tthis.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows);\r\n\t\t\t\t\t\t\toutput.push(this.calcs.top);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!noCalc && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\r\n\t\t\t\t\t\tif(this.calcs.bottom){\r\n\t\t\t\t\t\t\tthis.calcs.bottom.detachElement();\r\n\t\t\t\t\t\t\tthis.calcs.bottom.deleteCells();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.groupManager.table.options.groupClosedShowCalcs){\r\n\t\t\t\t\t\t\tthis.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows);\r\n\t\t\t\t\t\t\toutput.push(this.calcs.bottom);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetData(visible, transform){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(!visible || (visible && this.visible)){\r\n\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\toutput.push(row.getData(transform || \"data\"));\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetRowCount(){\r\n\t\tvar count = 0;\r\n\t\t\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\tcount += group.getRowCount();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tcount = this.rows.length;\r\n\t\t}\r\n\t\treturn count;\r\n\t}\r\n\t\r\n\ttoggleVisibility(){\r\n\t\tif(this.visible){\r\n\t\t\tthis.hide();\r\n\t\t}else{\r\n\t\t\tthis.show();\r\n\t\t}\r\n\t}\r\n\t\r\n\thide(){\r\n\t\tthis.visible = false;\r\n\t\t\r\n\t\tif(this.groupManager.table.rowManager.getRenderMode() == \"classic\" && !this.groupManager.table.options.pagination){\r\n\t\t\t\r\n\t\t\tthis.element.classList.remove(\"tabulator-group-visible\");\r\n\t\t\t\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar rows = group.getHeadersAndRows();\r\n\t\t\t\t\t\r\n\t\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\t\trow.detachElement();\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex());\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth();\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.table.externalEvents.dispatch(\"groupVisibilityChanged\", this.getComponent(), false);\r\n\t}\r\n\t\r\n\tshow(){\r\n\t\tthis.visible = true;\r\n\t\t\r\n\t\tif(this.groupManager.table.rowManager.getRenderMode() == \"classic\" && !this.groupManager.table.options.pagination){\r\n\t\t\t\r\n\t\t\tthis.element.classList.add(\"tabulator-group-visible\");\r\n\t\t\t\r\n\t\t\tvar prev = this.generateElement();\r\n\t\t\t\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\t\tvar rows = group.getHeadersAndRows();\r\n\t\t\t\t\t\r\n\t\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\t\tprev.parentNode.insertBefore(rowEl, prev.nextSibling);\r\n\t\t\t\t\t\trow.initialize();\r\n\t\t\t\t\t\tprev = rowEl;\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\tprev.parentNode.insertBefore(rowEl, prev.nextSibling);\r\n\t\t\t\t\trow.initialize();\r\n\t\t\t\t\tprev = rowEl;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex());\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth();\r\n\t\t}else{\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.table.externalEvents.dispatch(\"groupVisibilityChanged\", this.getComponent(), true);\r\n\t}\r\n\t\r\n\t_visSet(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tif(typeof this.visible == \"function\"){\r\n\t\t\t\r\n\t\t\tthis.rows.forEach(function(row){\r\n\t\t\t\tdata.push(row.getData());\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.visible = this.visible(this.key, this.getRowCount(), data, this.getComponent());\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRowGroup(row){\r\n\t\tvar match = false;\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\tvar result = group.getRowGroup(row);\r\n\t\t\t\t\r\n\t\t\t\tif(result){\r\n\t\t\t\t\tmatch = result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tif(this.rows.find(function(item){\r\n\t\t\t\treturn item === row;\r\n\t\t\t})){\r\n\t\t\t\tmatch = this;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn match;\r\n\t}\r\n\t\r\n\tgetSubGroups(component){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.groupList.forEach(function(child){\r\n\t\t\toutput.push(component ? child.getComponent() : child);\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetRows(compoment){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\toutput.push(compoment ? row.getComponent() : row);\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgenerateGroupHeaderContents(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\tdata.push(row.getData());\r\n\t\t});\r\n\t\t\r\n\t\tthis.elementContents = this.generator(this.key, this.getRowCount(), data, this.getComponent());\r\n\t\t\r\n\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\t\t\r\n\t\tif(typeof this.elementContents === \"string\"){\r\n\t\t\tthis.element.innerHTML = this.elementContents;\r\n\t\t}else{\r\n\t\t\tthis.element.appendChild(this.elementContents);\r\n\t\t}\r\n\t\t\r\n\t\tthis.element.insertBefore(this.arrowElement, this.element.firstChild);\r\n\t}\r\n\t\r\n\tgetPath(path = []) {\r\n\t\tpath.unshift(this.key);\r\n\t\tif(this.parent) {\r\n\t\t\tthis.parent.getPath(path);\r\n\t\t}\r\n\t\treturn path;\r\n\t}\r\n\t\r\n\t////////////// Standard Row Functions //////////////\r\n\t\r\n\tgetElement(){\r\n\t\treturn this.elementContents ? this.element : this.generateElement();\r\n\t}\r\n\t\r\n\tgenerateElement(){\r\n\t\tthis.addBindings = false;\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(this.visible){\r\n\t\t\tthis.element.classList.add(\"tabulator-group-visible\");\r\n\t\t}else{\r\n\t\t\tthis.element.classList.remove(\"tabulator-group-visible\");\r\n\t\t}\r\n\t\t\r\n\t\tfor(var i = 0; i < this.element.childNodes.length; ++i){\r\n\t\t\tthis.element.childNodes[i].parentNode.removeChild(this.element.childNodes[i]);\r\n\t\t}\r\n\t\t\r\n\t\tthis.generateGroupHeaderContents();\r\n\t\t\r\n\t\t// this.addBindings();\r\n\t\t\r\n\t\treturn this.element;\r\n\t}\r\n\t\r\n\tdetachElement(){\r\n\t\tif (this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\t//normalize the height of elements in the row\r\n\tnormalizeHeight(){\r\n\t\tthis.setHeight(this.element.clientHeight);\r\n\t}\r\n\t\r\n\tinitialize(force){\r\n\t\tif(!this.initialized || force){\r\n\t\t\tthis.normalizeHeight();\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitialize(){\r\n\t\tthis.initialized = false;\r\n\t\tthis.height = 0;\r\n\t\t\r\n\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\tthis.initialize(true);\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetHeight(height){\r\n\t\tif(this.height != height){\r\n\t\t\tthis.height = height;\r\n\t\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return rows outer height\r\n\tgetHeight(){\r\n\t\treturn this.outerHeight;\r\n\t}\r\n\t\r\n\tgetGroup(){\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\treinitializeHeight(){}\r\n\t\r\n\tcalcHeight(){}\r\n\t\r\n\tsetCellHeight(){}\r\n\t\r\n\tclearCellHeight(){}\r\n\t\r\n\tdeinitializeHeight(){}\r\n\t\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new GroupComponent(this);\r\n\t\t}\r\n\t\t\r\n\t\treturn this.component;\r\n\t}\r\n}\r\n\r\nexport default Group;","import Module from '../../core/Module.js';\r\n\r\nimport GroupComponent from './GroupComponent.js';\r\nimport Group from './Group.js';\r\n\r\nclass GroupRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.groupIDLookups = false; //enable table grouping and set field to group by\r\n\t\tthis.startOpen = [function(){return false;}]; //starting state of group\r\n\t\tthis.headerGenerator = [function(){return \"\";}];\r\n\t\tthis.groupList = []; //ordered list of groups\r\n\t\tthis.allowedValues = false;\r\n\t\tthis.groups = {}; //hold row groups\r\n\t\tthis.displayIndex = 0; //index in display pipeline\r\n\r\n\t\tthis.displayHandler = this.getRows.bind(this);\r\n\r\n\t\t//register table options\r\n\t\tthis.registerTableOption(\"groupBy\", false); //enable table grouping and set field to group by\r\n\t\tthis.registerTableOption(\"groupStartOpen\", true); //starting state of group\r\n\t\tthis.registerTableOption(\"groupValues\", false);\r\n\t\tthis.registerTableOption(\"groupUpdateOnCellEdit\", false);\r\n\t\tthis.registerTableOption(\"groupHeader\", false); //header generation function\r\n\t\tthis.registerTableOption(\"groupHeaderPrint\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderClipboard\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderHtmlOutput\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderDownload\", null);\r\n\t\tthis.registerTableOption(\"groupToggleElement\", \"arrow\");\r\n\t\tthis.registerTableOption(\"groupClosedShowCalcs\", false);\r\n\r\n\t\t//register table functions\r\n\t\tthis.registerTableFunction(\"setGroupBy\", this.setGroupBy.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupValues\", this.setGroupValues.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupStartOpen\", this.setGroupStartOpen.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupHeader\", this.setGroupHeader.bind(this));\r\n\t\tthis.registerTableFunction(\"getGroups\", this.userGetGroups.bind(this));\r\n\t\tthis.registerTableFunction(\"getGroupedData\", this.userGetGroupedData.bind(this));\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"getGroup\", this.rowGetGroup.bind(this));\r\n\t}\r\n\r\n\t//initialize group configuration\r\n\tinitialize(){\r\n\t\tif(this.table.options.groupBy){\r\n\r\n\t\t\tif(this.table.options.groupUpdateOnCellEdit){\r\n\t\t\t\tthis.subscribe(\"cell-value-updated\", this.cellUpdated.bind(this));\r\n\t\t\t\tthis.subscribe(\"row-data-changed\", this.reassignRowToGroup.bind(this), 0);\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-built\", this.configureGroupSetup.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"row-deleting\", this.rowDeleting.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHeaders.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.wipe.bind(this));\r\n\t\t\tthis.subscribe(\"rows-added\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"row-moving\", this.rowMoving.bind(this));\r\n\t\t\tthis.subscribe(\"row-adding-index\", this.rowAddingIndex.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"rows-sample\", this.rowSample.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"render-virtual-fill\", this.virtualRenderFill.bind(this));\r\n\r\n\t\t\tthis.registerDisplayHandler(this.displayHandler, 20);\r\n\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tconfigureGroupSetup(){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tvar groupBy = this.table.options.groupBy,\r\n\t\t\tstartOpen = this.table.options.groupStartOpen,\r\n\t\t\tgroupHeader = this.table.options.groupHeader;\r\n\r\n\t\t\tthis.allowedValues = this.table.options.groupValues;\r\n\r\n\t\t\tif(Array.isArray(groupBy) && Array.isArray(groupHeader) && groupBy.length > groupHeader.length){\r\n\t\t\t\tconsole.warn(\"Error creating group headers, groupHeader array is shorter than groupBy array\");\r\n\t\t\t}\r\n\r\n\t\t\tthis.headerGenerator = [function(){return \"\";}];\r\n\t\t\tthis.startOpen = [function(){return false;}]; //starting state of group\r\n\r\n\t\t\tthis.langBind(\"groups|item\", (langValue, lang) => {\r\n\t\t\t\tthis.headerGenerator[0] = (value, count, data) => { //header layout function\r\n\t\t\t\t\treturn (typeof value === \"undefined\" ? \"\" : value) + \"(\" + count + \" \" + ((count === 1) ? langValue : lang.groups.items) + \")\";\r\n\t\t\t\t};\r\n\t\t\t});\r\n\r\n\t\t\tthis.groupIDLookups = [];\r\n\r\n\t\t\tif(Array.isArray(groupBy) || groupBy){\r\n\t\t\t\tif(this.table.modExists(\"columnCalcs\") && this.table.options.columnCalcs != \"table\" && this.table.options.columnCalcs != \"both\"){\r\n\t\t\t\t\tthis.table.modules.columnCalcs.removeCalcs();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.modExists(\"columnCalcs\") && this.table.options.columnCalcs != \"group\"){\r\n\r\n\t\t\t\t\tvar cols = this.table.columnManager.getRealColumns();\r\n\r\n\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\tif(col.definition.topCalc){\r\n\t\t\t\t\t\t\tthis.table.modules.columnCalcs.initializeTopRow();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(col.definition.bottomCalc){\r\n\t\t\t\t\t\t\tthis.table.modules.columnCalcs.initializeBottomRow();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(!Array.isArray(groupBy)){\r\n\t\t\t\tgroupBy = [groupBy];\r\n\t\t\t}\r\n\r\n\t\t\tgroupBy.forEach((group, i) => {\r\n\t\t\t\tvar lookupFunc, column;\r\n\r\n\t\t\t\tif(typeof group == \"function\"){\r\n\t\t\t\t\tlookupFunc = group;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolumn = this.table.columnManager.getColumnByField(group);\r\n\r\n\t\t\t\t\tif(column){\r\n\t\t\t\t\t\tlookupFunc = function(data){\r\n\t\t\t\t\t\t\treturn column.getFieldValue(data);\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tlookupFunc = function(data){\r\n\t\t\t\t\t\t\treturn data[group];\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.groupIDLookups.push({\r\n\t\t\t\t\tfield: typeof group === \"function\" ? false : group,\r\n\t\t\t\t\tfunc:lookupFunc,\r\n\t\t\t\t\tvalues:this.allowedValues ? this.allowedValues[i] : false,\r\n\t\t\t\t});\r\n\t\t\t});\r\n\r\n\t\t\tif(startOpen){\r\n\t\t\t\tif(!Array.isArray(startOpen)){\r\n\t\t\t\t\tstartOpen = [startOpen];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstartOpen.forEach((level) => {\r\n\t\t\t\t\tlevel = typeof level == \"function\" ? level : function(){return true;};\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.startOpen = startOpen;\r\n\t\t\t}\r\n\r\n\t\t\tif(groupHeader){\r\n\t\t\t\tthis.headerGenerator = Array.isArray(groupHeader) ? groupHeader : [groupHeader];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trowSample(rows, prevValue){\r\n\t\tvar group = this.getGroups(false)[0];\r\n\r\n\t\tprevValue.push(group.getRows(false)[0]);\r\n\r\n\t\treturn prevValue;\r\n\t}\r\n\r\n\tvirtualRenderFill(){\r\n\t\tvar el = this.table.rowManager.tableElement;\r\n\t\tvar rows = this.table.rowManager.getVisibleRows();\r\n\r\n\t\trows = rows.filter((row) => {\r\n\t\t\treturn row.type !== \"group\";\r\n\t\t});\r\n\r\n\t\tel.style.minWidth = !rows.length ? this.table.columnManager.getWidth() + \"px\" : \"\";\r\n\r\n\t\t// if(this.table.options.groupBy){\r\n\t\t// \tif(this.layoutMode() != \"fitDataFill\" && rowsCount == this.table.modules.groupRows.countGroups()){\r\n\t\t// \t\tel.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t// \t}\r\n\t\t// }\r\n\t}\r\n\r\n\trowAddingIndex(row, index, top){\r\n\t\tthis.assignRowToGroup(row);\r\n\r\n\t\tvar groupRows = row.modules.group.rows;\r\n\r\n\t\tif(groupRows.length > 1){\r\n\t\t\tif(!index || (index && groupRows.indexOf(index) == -1)){\r\n\t\t\t\tif(top){\r\n\t\t\t\t\tif(groupRows[0] !== row){\r\n\t\t\t\t\t\tindex = groupRows[0];\r\n\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(groupRows[groupRows.length -1] !== row){\r\n\t\t\t\t\t\tindex = groupRows[groupRows.length -1];\r\n\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn index;\r\n\t}\r\n\r\n\ttrackChanges(){\r\n\t\tthis.dispatch(\"group-changed\");\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tsetGroupBy(groups){\r\n\t\tthis.table.options.groupBy = groups;\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.initialize();\r\n\t\t}else{\r\n\t\t\tthis.configureGroupSetup();\r\n\t\t}\r\n\r\n\t\tthis.refreshData();\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\tsetGroupValues(groupValues){\r\n\t\tthis.table.options.groupValues = groupValues;\r\n\t\tthis.configureGroupSetup();\r\n\t\tthis.refreshData();\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\tsetGroupStartOpen(values){\r\n\t\tthis.table.options.groupStartOpen = values;\r\n\t\tthis.configureGroupSetup();\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\r\n\t\t\tthis.trackChanges();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Grouping Update - cant refresh view, no groups have been set\");\r\n\t\t}\r\n\t}\r\n\r\n\tsetGroupHeader(values){\r\n\t\tthis.table.options.groupHeader = values;\r\n\t\tthis.configureGroupSetup();\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\r\n\t\t\tthis.trackChanges();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Grouping Update - cant refresh view, no groups have been set\");\r\n\t\t}\r\n\t}\r\n\r\n\tuserGetGroups(values){\r\n\t\treturn this.getGroups(true);\r\n\t}\r\n\r\n\t// get grouped table data in the same format as getData()\r\n\tuserGetGroupedData(){\r\n\t\treturn this.table.options.groupBy ?\r\n\t\tthis.getGroupedData() : this.getData()\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////////\r\n\t///////// Component Functions /////////\r\n\t///////////////////////////////////////\r\n\r\n\trowGetGroup(row){\r\n\t\treturn row.modules.group ? row.modules.group.getComponent() : false;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\trowMoving(from, to, after){\r\n\t\tif(!after && to instanceof Group){\r\n\t\t\tto = this.table.rowManager.prevDisplayRow(from) || to;\r\n\t\t}\r\n\r\n\t\tvar toGroup = to instanceof Group ? to : to.modules.group;\r\n\t\tvar fromGroup = from instanceof Group ? from : from.modules.group;\r\n\r\n\t\tif(toGroup === fromGroup){\r\n\t\t\tthis.table.rowManager.moveRowInArray(toGroup.rows, from, to, after);\r\n\t\t}else{\r\n\t\t\tif(fromGroup){\r\n\t\t\t\tfromGroup.removeRow(from);\r\n\t\t\t}\r\n\r\n\t\t\ttoGroup.insertRow(from, to, after);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trowDeleting(row){\r\n\t\t//remove from group\r\n\t\tif(row.modules.group){\r\n\t\t\trow.modules.group.removeRow(row);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trowsUpdated(row){\r\n\t\tthis.updateGroupRows(true);\r\n\t}\r\n\r\n\tcellUpdated(cell){\r\n\t\tthis.reassignRowToGroup(cell.row);\r\n\t}\r\n\r\n\r\n\tsetDisplayIndex(index){\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\r\n\tgetDisplayIndex(){\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\r\n\t//return appropriate rows with group headers\r\n\tgetRows(rows){\r\n\t\tif(this.table.options.groupBy && this.groupIDLookups.length){\r\n\r\n\t\t\tthis.dispatchExternal(\"dataGrouping\");\r\n\r\n\t\t\tthis.generateGroups(rows);\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataGrouped\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataGrouped\", this.getGroups(true));\r\n\t\t\t}\r\n\r\n\t\t\treturn this.updateGroupRows();\r\n\r\n\t\t}else{\r\n\t\t\treturn rows.slice(0);\r\n\t\t}\r\n\t}\r\n\r\n\tgetGroups(component){\r\n\t\tvar groupComponents = [];\r\n\r\n\t\tthis.groupList.forEach(function(group){\r\n\t\t\tgroupComponents.push(component ? group.getComponent() : group);\r\n\t\t});\r\n\r\n\t\treturn groupComponents;\r\n\t}\r\n\r\n\tgetChildGroups(group){\r\n\t\tvar groupComponents = [];\r\n\r\n\t\tif(!group){\r\n\t\t\tgroup = this;\r\n\t\t}\r\n\r\n\t\tgroup.groupList.forEach((child) => {\r\n\t\t\tif(child.groupList.length){\r\n\t\t\t\tgroupComponents = groupComponents.concat(this.getChildGroups(child));\r\n\t\t\t}else{\r\n\t\t\t\tgroupComponents.push(child);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn groupComponents;\r\n\t}\r\n\r\n\twipe(){\r\n\t\tthis.groupList.forEach(function(group){\r\n\t\t\tgroup.wipe();\r\n\t\t});\r\n\t}\r\n\r\n\tpullGroupListData(groupList) {\r\n\t\tvar groupListData = [];\r\n\r\n\t\tgroupList.forEach((group) => {\r\n\t\t\tvar groupHeader = {};\r\n\t\t\tgroupHeader.level = 0;\r\n\t\t\tgroupHeader.rowCount = 0;\r\n\t\t\tgroupHeader.headerContent = \"\";\r\n\t\t\tvar childData = [];\r\n\r\n\t\t\tif (group.hasSubGroups) {\r\n\t\t\t\tchildData = this.pullGroupListData(group.groupList);\r\n\r\n\t\t\t\tgroupHeader.level = group.level;\r\n\t\t\t\tgroupHeader.rowCount = childData.length - group.groupList.length; // data length minus number of sub-headers\r\n\t\t\t\tgroupHeader.headerContent = group.generator(group.key, groupHeader.rowCount, group.rows, group);\r\n\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\t\t\t\tgroupListData = groupListData.concat(childData);\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tgroupHeader.level = group.level;\r\n\t\t\t\tgroupHeader.headerContent = group.generator(group.key, group.rows.length, group.rows, group);\r\n\t\t\t\tgroupHeader.rowCount = group.getRows().length;\r\n\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\r\n\t\t\t\tgroup.getRows().forEach((row) => {\r\n\t\t\t\t\tgroupListData.push(row.getData(\"data\"));\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn groupListData\r\n\t}\r\n\r\n\tgetGroupedData(){\r\n\r\n\t\treturn this.pullGroupListData(this.groupList);\r\n\t}\r\n\r\n\tgetRowGroup(row){\r\n\t\tvar match = false;\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\tvar result = group.getRowGroup(row);\r\n\r\n\t\t\tif(result){\r\n\t\t\t\tmatch = result;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tcountGroups(){\r\n\t\treturn this.groupList.length;\r\n\t}\r\n\r\n\tgenerateGroups(rows){\r\n\t\tvar oldGroups = this.groups;\r\n\r\n\t\tthis.groups = {};\r\n\t\tthis.groupList = [];\r\n\r\n\t\tif(this.allowedValues && this.allowedValues[0]){\r\n\t\t\tthis.allowedValues[0].forEach((value) => {\r\n\t\t\t\tthis.createGroup(value, 0, oldGroups);\r\n\t\t\t});\r\n\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tthis.assignRowToExistingGroup(row, oldGroups);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tthis.assignRowToGroup(row, oldGroups);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tcreateGroup(groupID, level, oldGroups){\r\n\t\tvar groupKey = level + \"_\" + groupID,\r\n\t\tgroup;\r\n\r\n\t\toldGroups = oldGroups || [];\r\n\r\n\t\tgroup = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]);\r\n\r\n\t\tthis.groups[groupKey] = group;\r\n\t\tthis.groupList.push(group);\r\n\t}\r\n\r\n\tassignRowToExistingGroup(row, oldGroups){\r\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\r\n\t\tgroupKey = \"0_\" + groupID;\r\n\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t}\r\n\t}\r\n\r\n\tassignRowToGroup(row, oldGroups){\r\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\r\n\t\tnewGroupNeeded = !this.groups[\"0_\" + groupID];\r\n\r\n\t\tif(newGroupNeeded){\r\n\t\t\tthis.createGroup(groupID, 0, oldGroups);\r\n\t\t}\r\n\r\n\t\tthis.groups[\"0_\" + groupID].addRow(row);\r\n\r\n\t\treturn !newGroupNeeded;\r\n\t}\r\n\r\n\treassignRowToGroup(row){\r\n\t\tif(row.type === \"row\"){\r\n\t\t\tvar oldRowGroup = row.modules.group,\r\n\t\t\toldGroupPath = oldRowGroup.getPath(),\r\n\t\t\tnewGroupPath = this.getExpectedPath(row),\r\n\t\t\tsamePath = true;\r\n\r\n\t\t\t// figure out if new group path is the same as old group path\r\n\t\t\tvar samePath = (oldGroupPath.length == newGroupPath.length) && oldGroupPath.every((element, index) => {\r\n\t\t\t\treturn element === newGroupPath[index];\r\n\t\t\t});\r\n\r\n\t\t\t// refresh if they new path and old path aren't the same (aka the row's groupings have changed)\r\n\t\t\tif(!samePath) {\r\n\t\t\t\toldRowGroup.removeRow(row);\r\n\t\t\t\tthis.assignRowToGroup(row, this.groups);\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgetExpectedPath(row) {\r\n\t\tvar groupPath = [], rowData = row.getData();\r\n\r\n\t\tthis.groupIDLookups.forEach((groupId) => {\r\n\t\t\tgroupPath.push(groupId.func(rowData));\r\n\t\t});\r\n\r\n\t\treturn groupPath;\r\n\t}\r\n\r\n\tupdateGroupRows(force){\r\n\t\tvar output = [],\r\n\t\toldRowCount;\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\toutput = output.concat(group.getHeadersAndRows());\r\n\t\t});\r\n\r\n\t\tif(force){\r\n\t\t\tthis.refreshData(true, this.displayHandler);\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tscrollHeaders(left){\r\n\t\tif(this.table.options.renderHorizontal === \"virtual\"){\r\n\t\t\tleft -= this.table.columnManager.renderer.vDomPadLeft;\r\n\t\t}\r\n\r\n\t\tleft = left + \"px\";\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\tgroup.scrollHeader(left);\r\n\t\t});\r\n\t}\r\n\r\n\tremoveGroup(group){\r\n\t\tvar groupKey = group.level + \"_\" + group.key,\r\n\t\tindex;\r\n\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tdelete this.groups[groupKey];\r\n\r\n\t\t\tindex = this.groupList.indexOf(group);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.groupList.splice(index, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nGroupRows.moduleName = \"groupRows\";\r\n\r\nexport default GroupRows;","export default {\r\n\tcellEdit: function(action){\r\n\t\taction.component.setValueProcessData(action.data.oldValue);\r\n\t\taction.component.cellRendered();\r\n\t},\r\n\r\n\trowAdd: function(action){\r\n\t\taction.component.deleteActual();\r\n\t},\r\n\r\n\trowDelete: function(action){\r\n\t\tvar newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index);\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tthis.table.modules.groupRows.updateGroupRows(true);\r\n\t\t}\r\n\r\n\t\tthis._rebindRow(action.component, newRow);\r\n\t},\r\n\r\n\trowMove: function(action){\r\n\t\tthis.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posFrom], !action.data.after);\r\n\t\tthis.table.rowManager.redraw();\r\n\t},\r\n};","export default {\r\n\tcellEdit: function(action){\r\n\t\taction.component.setValueProcessData(action.data.newValue);\r\n\t\taction.component.cellRendered();\r\n\t},\r\n\r\n\trowAdd: function(action){\r\n\t\tvar newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index);\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tthis.table.modules.groupRows.updateGroupRows(true);\r\n\t\t}\r\n\r\n\t\tthis._rebindRow(action.component, newRow);\r\n\t},\r\n\r\n\trowDelete:function(action){\r\n\t\taction.component.deleteActual();\r\n\t},\r\n\r\n\trowMove: function(action){\r\n\t\tthis.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posTo], action.data.after);\r\n\t\tthis.table.rowManager.redraw();\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\nimport Row from '../../core/row/Row.js';\r\nimport Cell from '../../core/cell/Cell.js';\r\n\r\nimport defaultUndoers from './defaults/undoers.js';\r\nimport defaultRedoers from './defaults/redoers.js';\r\n\r\nclass History extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.history = [];\r\n\t\tthis.index = -1;\r\n\r\n\t\tthis.registerTableOption(\"history\", false); //enable edit history\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.history){\r\n\t\t\tthis.subscribe(\"cell-value-updated\", this.cellUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"cell-delete\", this.clearComponentHistory.bind(this));\r\n\t\t\tthis.subscribe(\"row-delete\", this.rowDeleted.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.clear.bind(this));\r\n\t\t\tthis.subscribe(\"row-added\", this.rowAdded.bind(this));\r\n\t\t\tthis.subscribe(\"row-move\", this.rowMoved.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"undo\", this.undo.bind(this));\r\n\t\tthis.registerTableFunction(\"redo\", this.redo.bind(this));\r\n\t\tthis.registerTableFunction(\"getHistoryUndoSize\", this.getHistoryUndoSize.bind(this));\r\n\t\tthis.registerTableFunction(\"getHistoryRedoSize\", this.getHistoryRedoSize.bind(this));\r\n\t\tthis.registerTableFunction(\"clearHistory\", this.clear.bind(this));\r\n\t}\r\n\r\n\trowMoved(from, to, after){\r\n\t\tthis.action(\"rowMove\", from, {posFrom:this.table.rowManager.getRowPosition(from), posTo:this.table.rowManager.getRowPosition(to), to:to, after:after});\r\n\t}\r\n\r\n\trowAdded(row, data, pos, index){\r\n\t\tthis.action(\"rowAdd\", row, {data:data, pos:pos, index:index});\r\n\t}\r\n\r\n\trowDeleted(row){\r\n\t\tvar index, rows;\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\r\n\t\t\trows = row.getComponent().getGroup().rows\r\n\t\t\tindex = rows.indexOf(row);\r\n\r\n\t\t\tif(index){\r\n\t\t\t\tindex = rows[index-1];\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tindex = row.table.rowManager.getRowIndex(row);\r\n\r\n\t\t\tif(index){\r\n\t\t\t\tindex = row.table.rowManager.rows[index-1];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.action(\"rowDelete\", row, {data:row.getData(), pos:!index, index:index});\r\n\t}\r\n\r\n\tcellUpdated(cell){\r\n\t\tthis.action(\"cellEdit\", cell, {oldValue:cell.oldValue, newValue:cell.value});\r\n\t}\r\n\r\n\tclear(){\r\n\t\tthis.history = [];\r\n\t\tthis.index = -1;\r\n\t}\r\n\r\n\taction(type, component, data){\r\n\t\tthis.history = this.history.slice(0, this.index + 1);\r\n\r\n\t\tthis.history.push({\r\n\t\t\ttype:type,\r\n\t\t\tcomponent:component,\r\n\t\t\tdata:data,\r\n\t\t});\r\n\r\n\t\tthis.index ++;\r\n\t}\r\n\r\n\tgetHistoryUndoSize(){\r\n\t\treturn this.index + 1;\r\n\t}\r\n\r\n\tgetHistoryRedoSize(){\r\n\t\treturn this.history.length - (this.index + 1);\r\n\t}\r\n\r\n\tclearComponentHistory(component){\r\n\t\tvar index = this.history.findIndex(function(item){\r\n\t\t\treturn item.component === component;\r\n\t\t});\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.history.splice(index, 1);\r\n\t\t\tif(index <= this.index){\r\n\t\t\t\tthis.index--;\r\n\t\t\t}\r\n\r\n\t\t\tthis.clearComponentHistory(component);\r\n\t\t}\r\n\t}\r\n\r\n\tundo(){\r\n\t\tif(this.index > -1){\r\n\t\t\tlet action = this.history[this.index];\r\n\r\n\t\t\tHistory.undoers[action.type].call(this, action);\r\n\r\n\t\t\tthis.index--;\r\n\r\n\t\t\tthis.dispatchExternal(\"historyUndo\", action.type, action.component.getComponent(), action.data);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"History Undo Error - No more history to undo\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tredo(){\r\n\t\tif(this.history.length-1 > this.index){\r\n\r\n\t\t\tthis.index++;\r\n\r\n\t\t\tlet action = this.history[this.index];\r\n\r\n\t\t\tHistory.redoers[action.type].call(this, action);\r\n\r\n\t\t\tthis.dispatchExternal(\"historyRedo\", action.type, action.component.getComponent(), action.data);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"History Redo Error - No more history to redo\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//rebind rows to new element after deletion\r\n\t_rebindRow(oldRow, newRow){\r\n\t\tthis.history.forEach(function(action){\r\n\t\t\tif(action.component instanceof Row){\r\n\t\t\t\tif(action.component === oldRow){\r\n\t\t\t\t\taction.component = newRow;\r\n\t\t\t\t}\r\n\t\t\t}else if(action.component instanceof Cell){\r\n\t\t\t\tif(action.component.row === oldRow){\r\n\t\t\t\t\tvar field = action.component.column.getField();\r\n\r\n\t\t\t\t\tif(field){\r\n\t\t\t\t\t\taction.component = newRow.getCell(field);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}\r\n\r\nHistory.moduleName = \"history\";\r\n\r\n//load defaults\r\nHistory.undoers = defaultUndoers;\r\nHistory.redoers = defaultRedoers;\r\n\r\nexport default History;","import Module from '../../core/Module.js';\r\nimport Column from '../../core/column/Column.js';\r\n\r\nclass HtmlTableImport extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.fieldIndex = [];\r\n\t\tthis.hasIndex = false;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.tableElementCheck();\r\n\t}\r\n\r\n\ttableElementCheck(){\r\n\t\tif(this.table.originalElement && this.table.originalElement.tagName === \"TABLE\"){\r\n\t\t\tthis.parseTable();\r\n\t\t}\r\n\t}\r\n\r\n\tparseTable(){\r\n\t\tvar element = this.table.originalElement,\r\n\t\toptions = this.table.options,\r\n\t\tcolumns = options.columns,\r\n\t\theaders = element.getElementsByTagName(\"th\"),\r\n\t\trows = element.getElementsByTagName(\"tbody\")[0],\r\n\t\tdata = [],\r\n\t\tnewTable;\r\n\r\n\t\tthis.hasIndex = false;\r\n\r\n\t\tthis.dispatchExternal(\"htmlImporting\");\r\n\r\n\t\trows = rows ? rows.getElementsByTagName(\"tr\") : [];\r\n\r\n\t\t//check for Tabulator inline options\r\n\t\tthis._extractOptions(element, options);\r\n\r\n\t\tif(headers.length){\r\n\t\t\tthis._extractHeaders(headers, rows);\r\n\t\t}else{\r\n\t\t\tthis._generateBlankHeaders(headers, rows);\r\n\t\t}\r\n\r\n\t\t//iterate through table rows and build data set\r\n\t\tfor(var index = 0; index < rows.length; index++){\r\n\t\t\tvar row = rows[index],\r\n\t\t\tcells = row.getElementsByTagName(\"td\"),\r\n\t\t\titem = {};\r\n\r\n\t\t\t//create index if the dont exist in table\r\n\t\t\tif(!this.hasIndex){\r\n\t\t\t\titem[options.index] = index;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\tvar cell = cells[i];\r\n\t\t\t\tif(typeof this.fieldIndex[i] !== \"undefined\"){\r\n\t\t\t\t\titem[this.fieldIndex[i]] = cell.innerHTML;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//add row data to item\r\n\t\t\tdata.push(item);\r\n\t\t}\r\n\r\n\t\toptions.data = data;\r\n\r\n\t\tthis.dispatchExternal(\"htmlImported\");\r\n\t}\r\n\r\n\t//extract tabulator attribute options\r\n\t_extractOptions(element, options, defaultOptions){\r\n\t\tvar attributes = element.attributes;\r\n\t\tvar optionsArr = defaultOptions ? Object.keys(defaultOptions) : Object.keys(options);\r\n\t\tvar optionsList = {};\r\n\r\n\t\toptionsArr.forEach((item) => {\r\n\t\t\toptionsList[item.toLowerCase()] = item;\r\n\t\t});\r\n\r\n\t\tfor(var index in attributes){\r\n\t\t\tvar attrib = attributes[index];\r\n\t\t\tvar name;\r\n\r\n\t\t\tif(attrib && typeof attrib == \"object\" && attrib.name && attrib.name.indexOf(\"tabulator-\") === 0){\r\n\t\t\t\tname = attrib.name.replace(\"tabulator-\", \"\");\r\n\r\n\t\t\t\tif(typeof optionsList[name] !== \"undefined\"){\r\n\t\t\t\t\toptions[optionsList[name]] = this._attribValue(attrib.value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//get value of attribute\r\n\t_attribValue(value){\r\n\t\tif(value === \"true\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif(value === \"false\"){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\t//find column if it has already been defined\r\n\t_findCol(title){\r\n\t\tvar match = this.table.options.columns.find((column) => {\r\n\t\t\treturn column.title === title;\r\n\t\t});\r\n\r\n\t\treturn match || false;\r\n\t}\r\n\r\n\t//extract column from headers\r\n\t_extractHeaders(headers, rows){\r\n\t\tfor(var index = 0; index < headers.length; index++){\r\n\t\t\tvar header = headers[index],\r\n\t\t\texists = false,\r\n\t\t\tcol = this._findCol(header.textContent),\r\n\t\t\twidth, attributes;\r\n\r\n\t\t\tif(col){\r\n\t\t\t\texists = true;\r\n\t\t\t}else{\r\n\t\t\t\tcol = {title:header.textContent.trim()};\r\n\t\t\t}\r\n\r\n\t\t\tif(!col.field) {\r\n\t\t\t\tcol.field = header.textContent.trim().toLowerCase().replace(\" \", \"_\");\r\n\t\t\t}\r\n\r\n\t\t\twidth = header.getAttribute(\"width\");\r\n\r\n\t\t\tif(width && !col.width)\t{\r\n\t\t\t\tcol.width = width;\r\n\t\t\t}\r\n\r\n\t\t\t//check for Tabulator inline options\r\n\t\t\tthis._extractOptions(header, col, this.table.columnManager.optionsList.registeredDefaults);\r\n\r\n\t\t\tthis.fieldIndex[index] = col.field;\r\n\r\n\t\t\tif(col.field == this.table.options.index){\r\n\t\t\t\tthis.hasIndex = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(!exists){\r\n\t\t\t\tthis.table.options.columns.push(col);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\r\n\t//generate blank headers\r\n\t_generateBlankHeaders(headers, rows){\r\n\t\tfor(var index = 0; index < headers.length; index++){\r\n\t\t\tvar header = headers[index],\r\n\t\t\tcol = {title:\"\", field:\"col\" + index};\r\n\r\n\t\t\tthis.fieldIndex[index] = col.field;\r\n\r\n\t\t\tvar width = header.getAttribute(\"width\");\r\n\r\n\t\t\tif(width){\r\n\t\t\t\tcol.width = width;\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.options.columns.push(col);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nHtmlTableImport.moduleName = \"htmlTableImport\";\r\n\r\nexport default HtmlTableImport;","function csvImporter(input){\r\n var data = [],\r\n row = 0, \r\n col = 0,\r\n inQuote = false;\r\n \r\n //Iterate over each character\r\n for (let index = 0; index < input.length; index++) {\r\n let char = input[index], \r\n nextChar = input[index+1]; \r\n \r\n //Initialize empty row\r\n if(!data[row]){\r\n data[row] = [];\r\n }\r\n\r\n //Initialize empty column\r\n if(!data[row][col]){\r\n data[row][col] = \"\";\r\n }\r\n \r\n //Handle quotation mark inside string\r\n if (char == '\"' && inQuote && nextChar == '\"') { \r\n data[row][col] += char; \r\n index++;\r\n continue; \r\n }\r\n \r\n //Begin / End Quote\r\n if (char == '\"') { \r\n inQuote = !inQuote;\r\n continue;\r\n }\r\n \r\n //Next column (if not in quote)\r\n if (char == ',' && !inQuote) { \r\n col++;\r\n continue; \r\n }\r\n \r\n //New row if new line and not in quote (CRLF) \r\n if (char == '\\r' && nextChar == '\\n' && !inQuote) { \r\n col = 0; \r\n row++; \r\n index++; \r\n continue; \r\n }\r\n \r\n //New row if new line and not in quote (CR or LF) \r\n if ((char == '\\r' || char == '\\n') && !inQuote) { \r\n col = 0;\r\n row++;\r\n continue; \r\n }\r\n\r\n //Normal Character, append to column\r\n data[row][col] += char;\r\n }\r\n\r\n return data;\r\n}\r\n\r\nexport default csvImporter;","export default function(input){\r\n try {\r\n return JSON.parse(input);\r\n } catch(e) {\r\n console.warn(\"JSON Import Error - File contents is invalid JSON\", e);\r\n return Promise.reject();\r\n }\r\n}","import csv from './importers/csv.js';\r\nimport json from './importers/json.js';\r\n\r\nexport default {\r\n\tcsv:csv,\r\n\tjson:json,\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultImporters from './defaults/importers.js';\r\n\r\nclass Import extends Module{\r\n \r\n constructor(table){\r\n super(table);\r\n \r\n this.registerTableOption(\"importFormat\");\r\n this.registerTableOption(\"importReader\", \"text\");\r\n }\r\n \r\n initialize(){\r\n this.registerTableFunction(\"import\", this.importFromFile.bind(this));\r\n\r\n if(this.table.options.importFormat){\r\n this.subscribe(\"data-loading\", this.loadDataCheck.bind(this), 10);\r\n this.subscribe(\"data-load\", this.loadData.bind(this), 10);\r\n }\r\n }\r\n\r\n loadDataCheck(data){\r\n return typeof data === \"string\";\r\n }\r\n\r\n loadData(data, params, config, silent, previousData){\r\n return this.importData(this.lookupImporter(), data)\r\n .then(this.structureData.bind(this))\r\n .catch((err) => {\r\n console.error(\"Import Error:\", err || \"Unable to import data\")\r\n return Promise.reject(err);\r\n })\r\n }\r\n\r\n lookupImporter(importFormat){\r\n var importer;\r\n \r\n if(!importFormat){\r\n importFormat = this.table.options.importFormat;\r\n }\r\n \r\n if(typeof importFormat === \"string\"){\r\n importer = Import.importers[importFormat];\r\n }else{\r\n importer = importFormat;\r\n }\r\n\r\n if(!importer){\r\n console.error(\"Import Error - Importer not found:\", importFormat);\r\n }\r\n \r\n return importer;\r\n }\r\n \r\n importFromFile(importFormat, extension){\r\n var importer = this.lookupImporter(importFormat);\r\n \r\n if(importer){\r\n return this.pickFile(extension)\r\n .then(this.importData.bind(this, importer))\r\n .then(this.structureData.bind(this))\r\n .then(this.setData.bind(this))\r\n .catch((err) => {\r\n console.error(\"Import Error:\", err || \"Unable to import file\")\r\n return Promise.reject(err);\r\n })\r\n }\r\n }\r\n \r\n pickFile(extensions){\r\n return new Promise((resolve, reject) => {\r\n var input = document.createElement(\"input\");\r\n input.type = \"file\";\r\n input.accept = extensions;\r\n \r\n input.addEventListener(\"change\", (e) => {\r\n var file = input.files[0],\r\n reader = new FileReader(),\r\n data;\r\n \r\n switch(this.table.options.importReader){\r\n case \"buffer\":\r\n reader.readAsArrayBuffer(file);\r\n break;\r\n\r\n case \"binary\":\r\n reader.readAsBinaryString(file);\r\n break;\r\n\r\n case \"url\":\r\n reader.readAsDataURL(file);\r\n break;\r\n\r\n case \"text\":\r\n default:\r\n reader.readAsText(file);\r\n }\r\n \r\n reader.onload = (e) => {\r\n resolve(reader.result)\r\n };\r\n \r\n reader.onerror = (e) => {\r\n console.warn(\"File Load Error - Unable to read file\");\r\n reject();\r\n };\r\n });\r\n \r\n input.click();\r\n });\r\n }\r\n \r\n importData(importer, fileContents){\r\n var data = importer.call(this.table, fileContents);\r\n \r\n if(data instanceof Promise){\r\n return data;\r\n }else{\r\n return data ? Promise.resolve(data) : Promise.reject();\r\n }\r\n }\r\n\r\n structureData(parsedData){\r\n var data = [];\r\n \r\n if(Array.isArray(parsedData) && parsedData.length && Array.isArray(parsedData[0])){\r\n if(this.table.options.autoColumns){\r\n data = this.structureArrayToObject(parsedData);\r\n }else{\r\n data = this.structureArrayToColumns(parsedData);\r\n }\r\n\r\n return data;\r\n }else{\r\n return parsedData;\r\n }\r\n }\r\n\r\n structureArrayToObject(parsedData){\r\n var columns = parsedData.shift();\r\n\r\n var data = parsedData.map((values) => {\r\n var row = {};\r\n\r\n columns.forEach((key, i) => {\r\n row[key] = values[i];\r\n })\r\n\r\n return row;\r\n })\r\n\r\n return data;\r\n }\r\n\r\n structureArrayToColumns(parsedData){\r\n var data = [],\r\n columns = this.table.getColumns();\r\n\r\n //remove first row if it is the column names\r\n if(columns[0] && parsedData[0][0]){\r\n if(columns[0].getDefinition().title === parsedData[0][0]){\r\n parsedData.shift();\r\n }\r\n }\r\n \r\n //convert row arrays to objects\r\n parsedData.forEach((rowData) => {\r\n var row = {};\r\n\r\n rowData.forEach((value, index) => {\r\n var column = columns[index];\r\n\r\n if(column){\r\n row[column.getField()] = value;\r\n }\r\n })\r\n\r\n data.push(row);\r\n });\r\n\r\n return data;\r\n }\r\n \r\n setData(data){\r\n return this.table.setData(data);\r\n }\r\n}\r\n\r\nImport.moduleName = \"import\";\r\n\r\n//load defaults\r\nImport.importers = defaultImporters;\r\n\r\nexport default Import;","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport Cell from '../../core/cell/Cell';\r\nimport Column from '../../core/column/Column';\r\n\r\nclass Interaction extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.eventMap = {\r\n\t\t\t//row events\r\n\t\t\trowClick:\"row-click\",\r\n\t\t\trowDblClick:\"row-dblclick\",\r\n\t\t\trowContext:\"row-contextmenu\",\r\n\t\t\trowMouseEnter:\"row-mouseenter\",\r\n\t\t\trowMouseLeave:\"row-mouseleave\",\r\n\t\t\trowMouseOver:\"row-mouseover\",\r\n\t\t\trowMouseOut:\"row-mouseout\",\r\n\t\t\trowMouseMove:\"row-mousemove\",\r\n\t\t\trowTap:\"row\",\r\n\t\t\trowDblTap:\"row\",\r\n\t\t\trowTapHold:\"row\",\r\n\r\n\t\t\t//cell events\r\n\t\t\tcellClick:\"cell-click\",\r\n\t\t\tcellDblClick:\"cell-dblclick\",\r\n\t\t\tcellContext:\"cell-contextmenu\",\r\n\t\t\tcellMouseEnter:\"cell-mouseenter\",\r\n\t\t\tcellMouseLeave:\"cell-mouseleave\",\r\n\t\t\tcellMouseOver:\"cell-mouseover\",\r\n\t\t\tcellMouseOut:\"cell-mouseout\",\r\n\t\t\tcellMouseMove:\"cell-mousemove\",\r\n\t\t\tcellTap:\"cell\",\r\n\t\t\tcellDblTap:\"cell\",\r\n\t\t\tcellTapHold:\"cell\",\r\n\r\n\t\t\t//column header events\r\n\t\t\theaderClick:\"column-click\",\r\n\t\t\theaderDblClick:\"column-dblclick\",\r\n\t\t\theaderContext:\"column-contextmenu\",\r\n\t\t\theaderMouseEnter:\"column-mouseenter\",\r\n\t\t\theaderMouseLeave:\"column-mouseleave\",\r\n\t\t\theaderMouseOver:\"column-mouseover\",\r\n\t\t\theaderMouseOut:\"column-mouseout\",\r\n\t\t\theaderMouseMove:\"column-mousemove\",\r\n\t\t\theaderTap:\"column\",\r\n\t\t\theaderDblTap:\"column\",\r\n\t\t\theaderTapHold:\"column\",\r\n\r\n\t\t\t//group header\r\n\t\t\tgroupClick:\"group-click\",\r\n\t\t\tgroupDblClick:\"group-dblclick\",\r\n\t\t\tgroupContext:\"group-contextmenu\",\r\n\t\t\tgroupMouseEnter:\"group-mouseenter\",\r\n\t\t\tgroupMouseLeave:\"group-mouseleave\",\r\n\t\t\tgroupMouseOver:\"group-mouseover\",\r\n\t\t\tgroupMouseOut:\"group-mouseout\",\r\n\t\t\tgroupMouseMove:\"group-mousemove\",\r\n\t\t\tgroupTap:\"group\",\r\n\t\t\tgroupDblTap:\"group\",\r\n\t\t\tgroupTapHold:\"group\",\r\n\t\t}\r\n\r\n\t\tthis.subscribers = {};\r\n\r\n\t\tthis.touchSubscribers = {};\r\n\r\n\t\tthis.columnSubscribers = {};\r\n\r\n\t\tthis.touchWatchers = {\r\n\t\t\trow:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tcell:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tcolumn:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tgroup:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.registerColumnOption(\"headerClick\");\r\n\t\tthis.registerColumnOption(\"headerDblClick\");\r\n\t\tthis.registerColumnOption(\"headerContext\");\r\n\t\tthis.registerColumnOption(\"headerMouseEnter\");\r\n\t\tthis.registerColumnOption(\"headerMouseLeave\");\r\n\t\tthis.registerColumnOption(\"headerMouseOver\");\r\n\t\tthis.registerColumnOption(\"headerMouseOut\");\r\n\t\tthis.registerColumnOption(\"headerMouseMove\");\r\n\t\tthis.registerColumnOption(\"headerTap\");\r\n\t\tthis.registerColumnOption(\"headerDblTap\");\r\n\t\tthis.registerColumnOption(\"headerTapHold\");\r\n\r\n\t\tthis.registerColumnOption(\"cellClick\");\r\n\t\tthis.registerColumnOption(\"cellDblClick\");\r\n\t\tthis.registerColumnOption(\"cellContext\");\r\n\t\tthis.registerColumnOption(\"cellMouseEnter\");\r\n\t\tthis.registerColumnOption(\"cellMouseLeave\");\r\n\t\tthis.registerColumnOption(\"cellMouseOver\");\r\n\t\tthis.registerColumnOption(\"cellMouseOut\");\r\n\t\tthis.registerColumnOption(\"cellMouseMove\");\r\n\t\tthis.registerColumnOption(\"cellTap\");\r\n\t\tthis.registerColumnOption(\"cellDblTap\");\r\n\t\tthis.registerColumnOption(\"cellTapHold\");\r\n\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeExternalEvents();\r\n\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this))\r\n\t\tthis.subscribe(\"cell-dblclick\", this.cellContentsSelectionFixer.bind(this))\r\n\t}\r\n\r\n\tcellContentsSelectionFixer(e, cell){\r\n\t\tif(this.table.modExists(\"edit\")){\r\n\t\t\tif (this.table.modules.edit.currentCell === this){\r\n\t\t\t\treturn; //prevent instant selection of editor content\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\ttry{\r\n\t\t\tif (document.selection) { // IE\r\n\t\t\t\tvar range = document.body.createTextRange();\r\n\t\t\t\trange.moveToElementText(this.element);\r\n\t\t\t\trange.select();\r\n\t\t\t} else if (window.getSelection) {\r\n\t\t\t\tvar range = document.createRange();\r\n\t\t\t\trange.selectNode(this.element);\r\n\t\t\t\twindow.getSelection().removeAllRanges();\r\n\t\t\t\twindow.getSelection().addRange(range);\r\n\t\t\t}\r\n\t\t}catch(e){}\r\n\t}\r\n\r\n\tinitializeExternalEvents(){\r\n\t\tfor(let key in this.eventMap){\r\n\t\t\tthis.subscriptionChangeExternal(key, this.subscriptionChanged.bind(this, key))\r\n\t\t}\r\n\t}\r\n\r\n\tsubscriptionChanged(key, added){\r\n\t\tvar index;\r\n\r\n\t\tif(added){\r\n\t\t\tif(!this.subscribers[key]){\r\n\t\t\t\tif(this.eventMap[key].includes(\"-\")){\r\n\t\t\t\t\tthis.subscribers[key] = this.handle.bind(this, key);\r\n\t\t\t\t\tthis.subscribe(this.eventMap[key], this.subscribers[key]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.subscribeTouchEvents(key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.eventMap[key].includes(\"-\")){\r\n\t\t\t\tif(this.subscribers[key] && !this.columnSubscribers[key] && !this.subscribedExternal(key)){\r\n\t\t\t\t\tthis.unsubscribe(this.eventMap[key], this.subscribers[key]);\r\n\t\t\t\t\tdelete this.subscribers[key];\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.unsubscribeTouchEvents(key);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tsubscribeTouchEvents(key){\r\n\t\tvar type = this.eventMap[key];\r\n\r\n\t\tif(!this.touchSubscribers[type + \"-touchstart\"]){\r\n\t\t\tthis.touchSubscribers[type + \"-touchstart\"] = this.handleTouch.bind(this, type, \"start\");\r\n\t\t\tthis.touchSubscribers[type + \"-touchend\"] = this.handleTouch.bind(this, type, \"end\");\r\n\r\n\t\t\tthis.subscribe(type + \"-touchstart\", this.touchSubscribers[type + \"-touchstart\"]);\r\n\t\t\tthis.subscribe(type + \"-touchend\", this.touchSubscribers[type + \"-touchend\"]);\r\n\t\t}\r\n\r\n\t\tthis.subscribers[key] = true;\r\n\t}\r\n\r\n\tunsubscribeTouchEvents(key){\r\n\t\tvar notouch = true,\r\n\t\ttype = this.eventMap[key];\r\n\r\n\t\tif(this.subscribers[key] && !this.subscribedExternal(key)){\r\n\t\t\tdelete this.subscribers[key];\r\n\r\n\t\t\tfor(let i in this.eventMap){\r\n\t\t\t\tif(this.eventMap[i] === type){\r\n\t\t\t\t\tif(this.subscribers[i]){\r\n\t\t\t\t\t\tnotouch = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(notouch){\r\n\t\t\t\tthis.unsubscribe(type + \"-touchstart\", this.touchSubscribers[type + \"-touchstart\"]);\r\n\t\t\t\tthis.unsubscribe(type + \"-touchend\", this.touchSubscribers[type + \"-touchend\"]);\r\n\r\n\t\t\t\tdelete this.touchSubscribers[type + \"-touchstart\"];\r\n\t\t\t\tdelete this.touchSubscribers[type + \"-touchend\"];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition;\r\n\r\n\t\tfor(let key in this.eventMap){\r\n\t\t\tif(def[key]){\r\n\t\t\t\tthis.subscriptionChanged(key, true);\r\n\r\n\t\t\t\tif(!this.columnSubscribers[key]){\r\n\t\t\t\t\tthis.columnSubscribers[key] = [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.columnSubscribers[key].push(column);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\thandle(action, e, component){\r\n\t\tthis.dispatchEvent(action, e, component);\r\n\t}\r\n\r\n\thandleTouch(type, action, e, component){\r\n\t\tvar watchers = this.touchWatchers[type];\r\n\r\n\t\tif(type === \"column\"){\r\n\t\t\ttype = \"header\";\r\n\t\t}\r\n\r\n\t\tswitch(action){\r\n\t\t\tcase \"start\":\r\n\t\t\twatchers.tap = true;\r\n\r\n\t\t\tclearTimeout(watchers.tapHold);\r\n\r\n\t\t\twatchers.tapHold = setTimeout(() => {\r\n\t\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\t\twatchers.tapHold = null;\r\n\r\n\t\t\t\twatchers.tap = null;\r\n\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\tthis.dispatchEvent(type + \"TapHold\", e, component);\r\n\t\t\t}, 1000);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"end\":\r\n\t\t\tif(watchers.tap){\r\n\r\n\t\t\t\twatchers.tap = null;\r\n\t\t\t\tthis.dispatchEvent(type + \"Tap\", e, component);\r\n\t\t\t}\r\n\r\n\t\t\tif(watchers.tapDbl){\r\n\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\tthis.dispatchEvent(type + \"DblTap\", e, component);\r\n\t\t\t}else{\r\n\t\t\t\twatchers.tapDbl = setTimeout(() => {\r\n\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\twatchers.tapDbl = null;\r\n\t\t\t\t}, 300);\r\n\t\t\t}\r\n\r\n\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\twatchers.tapHold = null;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tdispatchEvent(action, e, component){\r\n\t\tvar componentObj = component.getComponent(),\r\n\t\tcallback;\r\n\r\n\t\tif(this.columnSubscribers[action]){\r\n\r\n\t\t\tif(component instanceof Cell){\r\n\t\t\t\tcallback = component.column.definition[action];\r\n\t\t\t}else if(component instanceof Column){\r\n\t\t\t\tcallback = component.definition[action];\r\n\t\t\t}\r\n\r\n\t\t\tif(callback){\r\n\t\t\t\tcallback(e, componentObj);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.dispatchExternal(action, e, componentObj);\r\n\t}\r\n}\r\n\r\nInteraction.moduleName = \"interaction\";\r\n\r\nexport default Interaction;","export default {\r\n\tnavPrev:\"shift + 9\",\r\n\tnavNext:9,\r\n\tnavUp:38,\r\n\tnavDown:40,\r\n\tscrollPageUp:33,\r\n\tscrollPageDown:34,\r\n\tscrollToStart:36,\r\n\tscrollToEnd:35,\r\n\tundo:[\"ctrl + 90\", \"meta + 90\"],\r\n\tredo:[\"ctrl + 89\", \"meta + 89\"],\r\n\tcopyToClipboard:[\"ctrl + 67\", \"meta + 89\"],\r\n};","export default {\r\n\tkeyBlock:function(e){\r\n\t\te.stopPropagation();\r\n\t\te.preventDefault();\r\n\t},\r\n\tscrollPageUp:function(e){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tnewPos = rowManager.scrollTop - rowManager.element.clientHeight,\r\n\t\tscrollMax = rowManager.element.scrollHeight;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\tif(newPos >= 0){\r\n\t\t\t\trowManager.element.scrollTop = newPos;\r\n\t\t\t}else{\r\n\t\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[0]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tscrollPageDown:function(e){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tnewPos = rowManager.scrollTop + rowManager.element.clientHeight,\r\n\t\tscrollMax = rowManager.element.scrollHeight;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\tif(newPos <= scrollMax){\r\n\t\t\t\trowManager.element.scrollTop = newPos;\r\n\t\t\t}else{\r\n\t\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\r\n\t},\r\n\tscrollToStart:function(e){\r\n\t\tvar rowManager = this.table.rowManager;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[0]);\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tscrollToEnd:function(e){\r\n\t\tvar rowManager = this.table.rowManager;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]);\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tnavPrev:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-prev\", e);\r\n\t},\r\n\r\n\tnavNext:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-next\", e);\r\n\t},\r\n\r\n\tnavLeft:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-left\", e);\r\n\t},\r\n\r\n\tnavRight:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-right\", e);\r\n\t},\r\n\r\n\tnavUp:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-up\", e);\r\n\t},\r\n\r\n\tnavDown:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-down\", e);\r\n\t},\r\n\r\n\tundo:function(e){\r\n\t\tvar cell = false;\r\n\t\tif(this.table.options.history && this.table.modExists(\"history\") && this.table.modExists(\"edit\")){\r\n\r\n\t\t\tcell = this.table.modules.edit.currentCell;\r\n\r\n\t\t\tif(!cell){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tthis.table.modules.history.undo();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tredo:function(e){\r\n\t\tvar cell = false;\r\n\t\tif(this.table.options.history && this.table.modExists(\"history\") && this.table.modExists(\"edit\")){\r\n\r\n\t\t\tcell = this.table.modules.edit.currentCell;\r\n\r\n\t\t\tif(!cell){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tthis.table.modules.history.redo();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tcopyToClipboard:function(e){\r\n\t\tif(!this.table.modules.edit.currentCell){\r\n\t\t\tif(this.table.modExists(\"clipboard\", true)){\r\n\t\t\t\tthis.table.modules.clipboard.copy(false, true);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultBindings from './defaults/bindings.js';\r\nimport defaultActions from './defaults/actions.js';\r\n\r\nclass Keybindings extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.watchKeys = null;\r\n\t\tthis.pressedKeys = null;\r\n\t\tthis.keyupBinding = false;\r\n\t\tthis.keydownBinding = false;\r\n\r\n\t\tthis.registerTableOption(\"keybindings\", {}); //array for keybindings\r\n\t\tthis.registerTableOption(\"tabEndNewRow\", false); //create new row when tab to end of table\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tvar bindings = this.table.options.keybindings,\r\n\t\tmergedBindings = {};\r\n\r\n\t\tthis.watchKeys = {};\r\n\t\tthis.pressedKeys = [];\r\n\r\n\t\tif(bindings !== false){\r\n\t\t\tObject.assign(mergedBindings, Keybindings.bindings)\r\n\t\t\tObject.assign(mergedBindings, bindings)\r\n\r\n\t\t\tthis.mapBindings(mergedBindings);\r\n\t\t\tthis.bindEvents();\r\n\t\t}\r\n\r\n\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\r\n\t}\r\n\r\n\tmapBindings(bindings){\r\n\t\tfor(let key in bindings){\r\n\t\t\tif(Keybindings.actions[key]){\r\n\t\t\t\tif(bindings[key]){\r\n\t\t\t\t\tif(typeof bindings[key] !== \"object\"){\r\n\t\t\t\t\t\tbindings[key] = [bindings[key]];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbindings[key].forEach((binding) => {\r\n\t\t\t\t\t\tvar bindingList = Array.isArray(binding) ? binding : [binding];\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tbindingList.forEach((item) => {\r\n\t\t\t\t\t\t\tthis.mapBinding(key, item);\r\n\t\t\t\t\t\t});\t\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Key Binding Error - no such action:\", key);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmapBinding(action, symbolsList){\r\n\t\tvar binding = {\r\n\t\t\taction: Keybindings.actions[action],\r\n\t\t\tkeys: [],\r\n\t\t\tctrl: false,\r\n\t\t\tshift: false,\r\n\t\t\tmeta: false,\r\n\t\t};\r\n\r\n\t\tvar symbols = symbolsList.toString().toLowerCase().split(\" \").join(\"\").split(\"+\");\r\n\r\n\t\tsymbols.forEach((symbol) => {\r\n\t\t\tswitch(symbol){\r\n\t\t\t\tcase \"ctrl\":\r\n\t\t\t\tbinding.ctrl = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"shift\":\r\n\t\t\t\tbinding.shift = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"meta\":\r\n\t\t\t\tbinding.meta = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tsymbol = isNaN(symbol) ? symbol.toUpperCase().charCodeAt(0) : parseInt(symbol);\r\n\t\t\t\tbinding.keys.push(symbol);\r\n\r\n\t\t\t\tif(!this.watchKeys[symbol]){\r\n\t\t\t\t\tthis.watchKeys[symbol] = [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.watchKeys[symbol].push(binding);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tbindEvents(){\r\n\t\tvar self = this;\r\n\r\n\t\tthis.keyupBinding = function(e){\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tvar bindings = self.watchKeys[code];\r\n\r\n\t\t\tif(bindings){\r\n\r\n\t\t\t\tself.pressedKeys.push(code);\r\n\r\n\t\t\t\tbindings.forEach(function(binding){\r\n\t\t\t\t\tself.checkBinding(e, binding);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.keydownBinding = function(e){\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tvar bindings = self.watchKeys[code];\r\n\r\n\t\t\tif(bindings){\r\n\r\n\t\t\t\tvar index = self.pressedKeys.indexOf(code);\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tself.pressedKeys.splice(index, 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.table.element.addEventListener(\"keydown\", this.keyupBinding);\r\n\r\n\t\tthis.table.element.addEventListener(\"keyup\", this.keydownBinding);\r\n\t}\r\n\r\n\tclearBindings(){\r\n\t\tif(this.keyupBinding){\r\n\t\t\tthis.table.element.removeEventListener(\"keydown\", this.keyupBinding);\r\n\t\t}\r\n\r\n\t\tif(this.keydownBinding){\r\n\t\t\tthis.table.element.removeEventListener(\"keyup\", this.keydownBinding);\r\n\t\t}\r\n\t}\r\n\r\n\tcheckBinding(e, binding){\r\n\t\tvar match = true;\r\n\r\n\t\tif(e.ctrlKey == binding.ctrl && e.shiftKey == binding.shift && e.metaKey == binding.meta){\r\n\t\t\tbinding.keys.forEach((key) => {\r\n\t\t\t\tvar index = this.pressedKeys.indexOf(key);\r\n\r\n\t\t\t\tif(index == -1){\r\n\t\t\t\t\tmatch = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tbinding.action.call(this, e);\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nKeybindings.moduleName = \"keybindings\";\r\n\r\n//load defaults\r\nKeybindings.bindings = defaultBindings;\r\nKeybindings.actions = defaultActions;\r\n\r\nexport default Keybindings;","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass Menu extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.menuContainer = null;\r\n\t\tthis.menuElements = [];\r\n\t\tthis.blurEvent = this.hideMenu.bind(this);\r\n\t\tthis.escEvent = this.escMenu.bind(this);\r\n\t\tthis.nestedMenuBlock = false;\r\n\t\tthis.positionReversedX = false;\r\n\t\t\r\n\t\tthis.currentComponent = null;\r\n\t\t\r\n\t\tthis.columnSubscribers = {};\r\n\t\t\r\n\t\tthis.registerTableOption(\"rowContextMenu\", false);\r\n\t\tthis.registerTableOption(\"rowClickMenu\", false);\r\n\t\tthis.registerTableOption(\"groupContextMenu\", false);\r\n\t\tthis.registerTableOption(\"groupClickMenu\", false);\r\n\t\tthis.registerTableOption(\"menuContainer\", false);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"headerContextMenu\");\r\n\t\tthis.registerColumnOption(\"headerClickMenu\");\r\n\t\tthis.registerColumnOption(\"headerMenu\");\r\n\t\tthis.registerColumnOption(\"contextMenu\");\r\n\t\tthis.registerColumnOption(\"clickMenu\");\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.lookupMenuContainer();\r\n\t\t\r\n\t\tthis.initializeRowWatchers();\r\n\t\tthis.initializeGroupWatchers();\r\n\t\t\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t}\r\n\t\r\n\tlookupMenuContainer(){\r\n\t\t\r\n\t\tthis.menuContainer = this.table.options.menuContainer;\r\n\t\t\r\n\t\tif(typeof this.menuContainer === \"string\"){\r\n\t\t\tthis.menuContainer = document.querySelector(this.menuContainer);\r\n\t\t\t\r\n\t\t\tif(!this.menuContainer){\r\n\t\t\t\tconsole.warn(\"Menu Error - no container element found matching selector:\", this.table.options.menuContainer , \"(defaulting to document body)\");\r\n\t\t\t}\r\n\t\t}else if (this.menuContainer === true){\r\n\t\t\tthis.menuContainer = this.table.element;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.menuContainer && !this.checkMenuContainerIsParent(this.menuContainer)){\r\n\t\t\tthis.menuContainer = false;\r\n\t\t\tconsole.warn(\"Menu Error - container element does not contain this table:\", this.table.options.menuContainer , \"(defaulting to document body)\");\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.menuContainer){\r\n\t\t\tthis.menuContainer = document.body;\r\n\t\t}\r\n\t}\r\n\t\r\n\tcheckMenuContainerIsParent(container, element = this.table.element){\r\n\t\tif(container === element){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn element.parentNode ? this.checkMenuContainerIsParent(container, element.parentNode) : false;\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRowWatchers(){\r\n\t\tif(this.table.options.rowContextMenu){\r\n\t\t\tthis.subscribe(\"row-contextmenu\", this.loadMenuEvent.bind(this, this.table.options.rowContextMenu));\r\n\t\t\tthis.table.on(\"rowTapHold\", this.loadMenuEvent.bind(this, this.table.options.rowContextMenu));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.rowClickMenu){\r\n\t\t\tthis.subscribe(\"row-click\", this.loadMenuEvent.bind(this, this.table.options.rowClickMenu));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeGroupWatchers(){\r\n\t\tif(this.table.options.groupContextMenu){\r\n\t\t\tthis.subscribe(\"group-contextmenu\", this.loadMenuEvent.bind(this, this.table.options.groupContextMenu));\r\n\t\t\tthis.table.on(\"groupTapHold\", this.loadMenuEvent.bind(this, this.table.options.groupContextMenu));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.groupClickMenu){\r\n\t\t\tthis.subscribe(\"group-click\", this.loadMenuEvent.bind(this, this.table.options.groupClickMenu));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar options = [\"headerContextMenu\", \"headerClickMenu\"],\r\n\t\tdef = column.definition;\r\n\t\t\r\n\t\t//handle column events\r\n\t\tif(def.headerContextMenu && !this.columnSubscribers.headerContextMenu){\r\n\t\t\tthis.columnSubscribers.headerContextMenu = this.loadMenuTableColumnEvent.bind(this, \"headerContextMenu\");\r\n\t\t\tthis.subscribe(\"column-contextmenu\", this.columnSubscribers.headerContextMenu);\r\n\t\t\tthis.table.on(\"headerTapHold\", this.loadMenuTableColumnEvent.bind(this, \"headerContextMenu\"))\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerClickMenu && !this.columnSubscribers.headerClickMenu){\r\n\t\t\tthis.columnSubscribers.headerClickMenu = this.loadMenuTableColumnEvent.bind(this, \"headerClickMenu\");\r\n\t\t\tthis.subscribe(\"column-click\", this.columnSubscribers.headerClickMenu);\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerMenu){\r\n\t\t\tthis.initializeColumnHeaderMenu(column);\r\n\t\t}\r\n\t\t\r\n\t\t//handle cell events\r\n\t\tif(def.contextMenu && !this.columnSubscribers.contextMenu){\r\n\t\t\tthis.columnSubscribers.contextMenu = this.loadMenuTableCellEvent.bind(this, \"contextMenu\");\r\n\t\t\tthis.subscribe(\"cell-contextmenu\", this.columnSubscribers.contextMenu);\r\n\t\t\tthis.table.on(\"cellTapHold\", this.loadMenuTableCellEvent.bind(this, \"contextMenu\"))\r\n\t\t}\r\n\t\t\r\n\t\tif(def.clickMenu && !this.columnSubscribers.clickMenu){\r\n\t\t\tthis.columnSubscribers.clickMenu = this.loadMenuTableCellEvent.bind(this, \"clickMenu\");\r\n\t\t\tthis.subscribe(\"cell-click\", this.columnSubscribers.clickMenu);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumnHeaderMenu(column){\r\n\t\tvar headerMenuEl;\r\n\t\t\r\n\t\theaderMenuEl = document.createElement(\"span\");\r\n\t\theaderMenuEl.classList.add(\"tabulator-header-menu-button\");\r\n\t\theaderMenuEl.innerHTML = \"⋮\";\r\n\t\t\r\n\t\theaderMenuEl.addEventListener(\"click\", (e) => {\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\t\r\n\t\t\tthis.loadMenuEvent(column.definition.headerMenu, e, column);\r\n\t\t});\r\n\t\t\r\n\t\tcolumn.titleElement.insertBefore(headerMenuEl, column.titleElement.firstChild);\r\n\t}\r\n\t\r\n\tloadMenuTableCellEvent(option, e, cell){\r\n\t\tif(cell._cell){\r\n\t\t\tcell = cell._cell;\r\n\t\t}\r\n\t\t\r\n\t\tif(cell.column.definition[option]){\r\n\t\t\tthis.loadMenuEvent(cell.column.definition[option], e, cell);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadMenuTableColumnEvent(option, e, column){\r\n\t\tif(column._column){\r\n\t\t\tcolumn = column._column;\r\n\t\t}\r\n\t\t\r\n\t\tif(column.definition[option]){\r\n\t\t\tthis.loadMenuEvent(column.definition[option], e, column);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadMenuEvent(menu, e, component){\r\n\t\tif(component._group){\r\n\t\t\tcomponent = component._group;\r\n\t\t}else if(component._row){\r\n\t\t\tcomponent = component._row;\r\n\t\t}\r\n\t\t\r\n\t\tmenu = typeof menu == \"function\" ? menu.call(this.table, component.getComponent(), e) : menu;\r\n\t\t\r\n\t\tthis.loadMenu(e, component, menu);\r\n\t}\r\n\t\r\n\tloadMenu(e, component, menu, parentEl){\r\n\t\tvar touch = !(e instanceof MouseEvent);\r\n\t\t\r\n\t\tvar menuEl = document.createElement(\"div\");\r\n\t\tmenuEl.classList.add(\"tabulator-menu\");\r\n\t\t\r\n\t\tif(!touch){\r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t\t\r\n\t\t//abort if no menu set\r\n\t\tif(!menu || !menu.length){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(!parentEl){\r\n\t\t\tif(this.nestedMenuBlock){\r\n\t\t\t\t//abort if child menu already open\r\n\t\t\t\tif(this.isOpen()){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.nestedMenuBlock = setTimeout(() => {\r\n\t\t\t\t\tthis.nestedMenuBlock = false;\r\n\t\t\t\t}, 100)\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.hideMenu();\r\n\t\t\tthis.menuElements = [];\r\n\t\t}\r\n\t\t\r\n\t\tmenu.forEach((item) => {\r\n\t\t\tvar itemEl = document.createElement(\"div\"),\r\n\t\t\tlabel = item.label,\r\n\t\t\tdisabled = item.disabled;\r\n\t\t\t\r\n\t\t\tif(item.separator){\r\n\t\t\t\titemEl.classList.add(\"tabulator-menu-separator\");\r\n\t\t\t}else{\r\n\t\t\t\titemEl.classList.add(\"tabulator-menu-item\");\r\n\t\t\t\t\r\n\t\t\t\tif(typeof label == \"function\"){\r\n\t\t\t\t\tlabel = label.call(this.table, component.getComponent());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(label instanceof Node){\r\n\t\t\t\t\titemEl.appendChild(label);\r\n\t\t\t\t}else{\r\n\t\t\t\t\titemEl.innerHTML = label;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(typeof disabled == \"function\"){\r\n\t\t\t\t\tdisabled = disabled.call(this.table, component.getComponent());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(disabled){\r\n\t\t\t\t\titemEl.classList.add(\"tabulator-menu-item-disabled\");\r\n\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(item.menu && item.menu.length){\r\n\t\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\tthis.hideOldSubMenus(menuEl);\r\n\t\t\t\t\t\t\tthis.loadMenu(e, component, item.menu, itemEl);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(item.action){\r\n\t\t\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\t\t\titem.action(e, component.getComponent());\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(item.menu && item.menu.length){\r\n\t\t\t\t\titemEl.classList.add(\"tabulator-menu-item-submenu\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tmenuEl.appendChild(itemEl);\r\n\t\t});\r\n\t\t\r\n\t\tmenuEl.addEventListener(\"click\", (e) => {\r\n\t\t\tthis.hideMenu();\r\n\t\t});\r\n\t\t\r\n\t\tthis.menuElements.push(menuEl);\r\n\t\tthis.positionMenu(menuEl, parentEl, touch, e);\r\n\t\t\r\n\t\tthis.currentComponent = component\r\n\t\t\r\n\t\tthis.dispatchExternal(\"menuOpened\", component.getComponent())\r\n\t}\r\n\t\r\n\thideOldSubMenus(menuEl){\r\n\t\tvar index = this.menuElements.indexOf(menuEl);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tfor(let i = this.menuElements.length - 1; i > index; i--){\r\n\t\t\t\tvar el = this.menuElements[i];\r\n\t\t\t\t\r\n\t\t\t\tif(el.parentNode){\r\n\t\t\t\t\tel.parentNode.removeChild(el);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.menuElements.pop();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tpositionMenu(element, parentEl, touch, e){\r\n\t\tvar x, y, parentOffset;\r\n\t\t\r\n\t\tif(!parentEl){\r\n\t\t\tx = touch ? e.touches[0].pageX : e.pageX;\r\n\t\t\ty = touch ? e.touches[0].pageY : e.pageY;\r\n\t\t\t\r\n\t\t\tif(this.menuContainer !== document.body){\r\n\t\t\t\tparentOffset = Helpers.elOffset(this.menuContainer);\r\n\t\t\t\t\r\n\t\t\t\tx -= parentOffset.left;\r\n\t\t\t\ty -= parentOffset.top;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.positionReversedX = false;\r\n\t\t}else{\r\n\t\t\tparentOffset = Helpers.elOffset(parentEl);\r\n\t\t\tx = parentOffset.left + parentEl.offsetWidth;\r\n\t\t\ty = parentOffset.top - 1;\r\n\t\t}\r\n\t\t\r\n\t\telement.style.top = y + \"px\";\r\n\t\telement.style.left = x + \"px\";\r\n\t\t\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.table.rowManager.element.addEventListener(\"scroll\", this.blurEvent);\r\n\t\t\tthis.subscribe(\"cell-editing\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"click\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"contextmenu\", this.blurEvent);\r\n\t\t\twindow.addEventListener(\"resize\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"keydown\", this.escEvent);\r\n\t\t}, 100);\r\n\t\t\r\n\t\tthis.menuContainer.appendChild(element);\r\n\t\t\r\n\t\t//move menu to start on right edge if it is too close to the edge of the screen\r\n\t\tif((x + element.offsetWidth) >= this.menuContainer.offsetWidth || this.positionReversedX){\r\n\t\t\telement.style.left = \"\";\r\n\t\t\t\r\n\t\t\tif(parentEl){\r\n\t\t\t\telement.style.right = (this.menuContainer.offsetWidth - parentOffset.left) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\telement.style.right = (this.menuContainer.offsetWidth - x) + \"px\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.positionReversedX = true;\r\n\t\t}\r\n\t\t\r\n\t\t//move menu to start on bottom edge if it is too close to the edge of the screen\r\n\t\tif((y + element.offsetHeight) > this.menuContainer.offsetHeight) {\r\n\t\t\tif(parentEl){\r\n\t\t\t\telement.style.top = (parseInt(element.style.top) - element.offsetHeight + parentEl.offsetHeight + 1) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\telement.style.top = (parseInt(element.style.top) - element.offsetHeight) + \"px\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tisOpen(){\r\n\t\treturn !!this.menuElements.length;\r\n\t}\r\n\t\r\n\tescMenu(e){\r\n\t\tif(e.keyCode == 27){\r\n\t\t\tthis.hideMenu();\r\n\t\t}\r\n\t}\r\n\t\r\n\thideMenu(){\t\r\n\t\tthis.menuElements.forEach((menuEl) => {\r\n\t\t\tif(menuEl.parentNode){\r\n\t\t\t\tmenuEl.parentNode.removeChild(menuEl);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tdocument.body.removeEventListener(\"keydown\", this.escEvent);\r\n\t\tdocument.body.removeEventListener(\"click\", this.blurEvent);\r\n\t\tdocument.body.removeEventListener(\"contextmenu\", this.blurEvent);\r\n\t\twindow.removeEventListener(\"resize\", this.blurEvent);\r\n\t\tthis.table.rowManager.element.removeEventListener(\"scroll\", this.blurEvent);\r\n\t\tthis.unsubscribe(\"cell-editing\", this.blurEvent);\r\n\t\t\r\n\t\tif(this.currentComponent){\r\n\t\t\tthis.dispatchExternal(\"menuClosed\", this.currentComponent.getComponent());\r\n\t\t\tthis.currentComponent = null;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMenu.moduleName = \"menu\";\r\n\r\nexport default Menu;\r\n","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass MoveColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.placeholderElement = this.createPlaceholderElement();\r\n\t\tthis.hoverElement = false; //floating column header element\r\n\t\tthis.checkTimeout = false; //click check timeout holder\r\n\t\tthis.checkPeriod = 250; //period to wait on mousedown to consider this a move and not a click\r\n\t\tthis.moving = false; //currently moving column\r\n\t\tthis.toCol = false; //destination column\r\n\t\tthis.toColAfter = false; //position of moving column relative to the desitnation column\r\n\t\tthis.startX = 0; //starting position within header element\r\n\t\tthis.autoScrollMargin = 40; //auto scroll on edge when within margin\r\n\t\tthis.autoScrollStep = 5; //auto scroll distance in pixels\r\n\t\tthis.autoScrollTimeout = false; //auto scroll timeout\r\n\t\tthis.touchMove = false;\r\n\t\t\r\n\t\tthis.moveHover = this.moveHover.bind(this);\r\n\t\tthis.endMove = this.endMove.bind(this);\r\n\t\t\r\n\t\tthis.registerTableOption(\"movableColumns\", false); //enable movable columns\r\n\t}\r\n\t\r\n\tcreatePlaceholderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-col\");\r\n\t\tel.classList.add(\"tabulator-col-placeholder\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.movableColumns){\r\n\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\tcolEl;\r\n\t\t\r\n\t\tif(!column.modules.frozen){\r\n\t\t\tcolEl = column.getElement();\r\n\t\t\t\r\n\t\t\tconfig.mousemove = function(e){\r\n\t\t\t\tif(column.parent === self.moving.parent){\r\n\t\t\t\t\tif((((self.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(colEl).left) + self.table.columnManager.element.scrollLeft) > (column.getWidth() / 2)){\r\n\t\t\t\t\t\tif(self.toCol !== column || !self.toColAfter){\r\n\t\t\t\t\t\t\tcolEl.parentNode.insertBefore(self.placeholderElement, colEl.nextSibling);\r\n\t\t\t\t\t\t\tself.moveColumn(column, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(self.toCol !== column || self.toColAfter){\r\n\t\t\t\t\t\t\tcolEl.parentNode.insertBefore(self.placeholderElement, colEl);\r\n\t\t\t\t\t\t\tself.moveColumn(column, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}.bind(self);\r\n\t\t\t\r\n\t\t\tcolEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tself.touchMove = false;\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, column);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tcolEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tself.bindTouchEvents(column);\r\n\t\t}\r\n\t\t\r\n\t\tcolumn.modules.moveColumn = config;\r\n\t}\r\n\t\r\n\tbindTouchEvents(column){\r\n\t\tvar colEl = column.getElement(),\r\n\t\tstartXMove = false, //shifting center position of the cell\r\n\t\tdir = false,\r\n\t\tcurrentCol, nextCol, prevCol, nextColWidth, prevColWidth, nextColWidthLast, prevColWidthLast;\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchstart\", (e) => {\r\n\t\t\tthis.checkTimeout = setTimeout(() => {\r\n\t\t\t\tthis.touchMove = true;\r\n\t\t\t\tcurrentCol = column;\r\n\t\t\t\tnextCol = column.nextColumn();\r\n\t\t\t\tnextColWidth = nextCol ? nextCol.getWidth()/2 : 0;\r\n\t\t\t\tprevCol = column.prevColumn();\r\n\t\t\t\tprevColWidth = prevCol ? prevCol.getWidth()/2 : 0;\r\n\t\t\t\tnextColWidthLast = 0;\r\n\t\t\t\tprevColWidthLast = 0;\r\n\t\t\t\tstartXMove = false;\r\n\t\t\t\t\r\n\t\t\t\tthis.startMove(e, column);\r\n\t\t\t}, this.checkPeriod);\r\n\t\t}, {passive: true});\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchmove\", (e) => {\r\n\t\t\tvar halfCol, diff, moveToCol;\r\n\t\t\t\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.moveHover(e);\r\n\t\t\t\t\r\n\t\t\t\tif(!startXMove){\r\n\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tdiff = e.touches[0].pageX - startXMove;\r\n\t\t\t\t\r\n\t\t\t\tif(diff > 0){\r\n\t\t\t\t\tif(nextCol && diff - nextColWidthLast > nextColWidth){\r\n\t\t\t\t\t\tmoveToCol = nextCol;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(moveToCol !== column){\r\n\t\t\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t\t\t\tmoveToCol.getElement().parentNode.insertBefore(this.placeholderElement, moveToCol.getElement().nextSibling);\r\n\t\t\t\t\t\t\tthis.moveColumn(moveToCol, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(prevCol && -diff - prevColWidthLast > prevColWidth){\r\n\t\t\t\t\t\tmoveToCol = prevCol;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(moveToCol !== column){\r\n\t\t\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t\t\t\tmoveToCol.getElement().parentNode.insertBefore(this.placeholderElement, moveToCol.getElement());\r\n\t\t\t\t\t\t\tthis.moveColumn(moveToCol, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(moveToCol){\r\n\t\t\t\t\tcurrentCol = moveToCol;\r\n\t\t\t\t\tnextCol = moveToCol.nextColumn();\r\n\t\t\t\t\tnextColWidthLast = nextColWidth;\r\n\t\t\t\t\tnextColWidth = nextCol ? nextCol.getWidth() / 2 : 0;\r\n\t\t\t\t\tprevCol = moveToCol.prevColumn();\r\n\t\t\t\t\tprevColWidthLast = prevColWidth;\r\n\t\t\t\t\tprevColWidth = prevCol ? prevCol.getWidth() / 2 : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}, {passive: true});\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchend\", (e) => {\r\n\t\t\tif(this.checkTimeout){\r\n\t\t\t\tclearTimeout(this.checkTimeout);\r\n\t\t\t}\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.endMove(e);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tstartMove(e, column){\r\n\t\tvar element = column.getElement(),\r\n\t\theaderElement = this.table.columnManager.getElement(),\r\n\t\theadersElement = this.table.columnManager.getHeadersElement();\r\n\t\t\r\n\t\tthis.moving = column;\r\n\t\tthis.startX = (this.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(element).left;\r\n\t\t\r\n\t\tthis.table.element.classList.add(\"tabulator-block-select\");\r\n\t\t\r\n\t\t//create placeholder\r\n\t\tthis.placeholderElement.style.width = column.getWidth() + \"px\";\r\n\t\tthis.placeholderElement.style.height = column.getHeight() + \"px\";\r\n\t\t\r\n\t\telement.parentNode.insertBefore(this.placeholderElement, element);\r\n\t\telement.parentNode.removeChild(element);\r\n\t\t\r\n\t\t//create hover element\r\n\t\tthis.hoverElement = element.cloneNode(true);\r\n\t\tthis.hoverElement.classList.add(\"tabulator-moving\");\r\n\t\t\r\n\t\tthis.table.columnManager.getElement().appendChild(this.hoverElement);\r\n\t\t\r\n\t\tthis.hoverElement.style.left = \"0\";\r\n\t\tthis.hoverElement.style.bottom = (headerElement.clientHeight - headersElement.offsetHeight) + \"px\";\r\n\t\t\r\n\t\tif(!this.touchMove){\r\n\t\t\tthis._bindMouseMove();\r\n\t\t\t\r\n\t\t\tdocument.body.addEventListener(\"mousemove\", this.moveHover);\r\n\t\t\tdocument.body.addEventListener(\"mouseup\", this.endMove);\r\n\t\t}\r\n\t\t\r\n\t\tthis.moveHover(e);\r\n\t}\r\n\t\r\n\t_bindMouseMove(){\r\n\t\tthis.table.columnManager.columnsByIndex.forEach(function(column){\r\n\t\t\tif(column.modules.moveColumn.mousemove){\r\n\t\t\t\tcolumn.getElement().addEventListener(\"mousemove\", column.modules.moveColumn.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t_unbindMouseMove(){\r\n\t\tthis.table.columnManager.columnsByIndex.forEach(function(column){\r\n\t\t\tif(column.modules.moveColumn.mousemove){\r\n\t\t\t\tcolumn.getElement().removeEventListener(\"mousemove\", column.modules.moveColumn.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tmoveColumn(column, after){\r\n\t\tvar movingCells = this.moving.getCells();\r\n\t\t\r\n\t\tthis.toCol = column;\r\n\t\tthis.toColAfter = after;\r\n\t\t\r\n\t\tif(after){\r\n\t\t\tcolumn.getCells().forEach(function(cell, i){\r\n\t\t\t\tvar cellEl = cell.getElement(true);\r\n\t\t\t\t\r\n\t\t\t\tif(cellEl.parentNode && movingCells[i]){\r\n\t\t\t\t\tcellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tcolumn.getCells().forEach(function(cell, i){\r\n\t\t\t\tvar cellEl = cell.getElement(true);\r\n\t\t\t\t\r\n\t\t\t\tif(cellEl.parentNode && movingCells[i]){\r\n\t\t\t\t\tcellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tendMove(e){\r\n\t\tif(e.which === 1 || this.touchMove){\r\n\t\t\tthis._unbindMouseMove();\r\n\t\t\t\r\n\t\t\tthis.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling);\r\n\t\t\tthis.placeholderElement.parentNode.removeChild(this.placeholderElement);\r\n\t\t\tthis.hoverElement.parentNode.removeChild(this.hoverElement);\r\n\t\t\t\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-block-select\");\r\n\t\t\t\r\n\t\t\tif(this.toCol){\r\n\t\t\t\tthis.table.columnManager.moveColumnActual(this.moving, this.toCol, this.toColAfter);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.moving = false;\r\n\t\t\tthis.toCol = false;\r\n\t\t\tthis.toColAfter = false;\r\n\t\t\t\r\n\t\t\tif(!this.touchMove){\r\n\t\t\t\tdocument.body.removeEventListener(\"mousemove\", this.moveHover);\r\n\t\t\t\tdocument.body.removeEventListener(\"mouseup\", this.endMove);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tmoveHover(e){\r\n\t\tvar columnHolder = this.table.columnManager.getElement(),\r\n\t\tscrollLeft = columnHolder.scrollLeft,\r\n\t\txPos = ((this.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(columnHolder).left) + scrollLeft,\r\n\t\tscrollPos;\r\n\t\t\r\n\t\tthis.hoverElement.style.left = (xPos - this.startX) + \"px\";\r\n\t\t\r\n\t\tif(xPos - scrollLeft < this.autoScrollMargin){\r\n\t\t\tif(!this.autoScrollTimeout){\r\n\t\t\t\tthis.autoScrollTimeout = setTimeout(() => {\r\n\t\t\t\t\tscrollPos = Math.max(0,scrollLeft-5);\r\n\t\t\t\t\tthis.table.rowManager.getElement().scrollLeft = scrollPos;\r\n\t\t\t\t\tthis.autoScrollTimeout = false;\r\n\t\t\t\t}, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(scrollLeft + columnHolder.clientWidth - xPos < this.autoScrollMargin){\r\n\t\t\tif(!this.autoScrollTimeout){\r\n\t\t\t\tthis.autoScrollTimeout = setTimeout(() => {\r\n\t\t\t\t\tscrollPos = Math.min(columnHolder.clientWidth, scrollLeft+5);\r\n\t\t\t\t\tthis.table.rowManager.getElement().scrollLeft = scrollPos;\r\n\t\t\t\t\tthis.autoScrollTimeout = false;\r\n\t\t\t\t}, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMoveColumns.moduleName = \"moveColumn\";\r\n\r\nexport default MoveColumns;\r\n","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass MoveRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.placeholderElement = this.createPlaceholderElement();\r\n\t\tthis.hoverElement = false; //floating row header element\r\n\t\tthis.checkTimeout = false; //click check timeout holder\r\n\t\tthis.checkPeriod = 150; //period to wait on mousedown to consider this a move and not a click\r\n\t\tthis.moving = false; //currently moving row\r\n\t\tthis.toRow = false; //destination row\r\n\t\tthis.toRowAfter = false; //position of moving row relative to the desitnation row\r\n\t\tthis.hasHandle = false; //row has handle instead of fully movable row\r\n\t\tthis.startY = 0; //starting Y position within header element\r\n\t\tthis.startX = 0; //starting X position within header element\r\n\r\n\t\tthis.moveHover = this.moveHover.bind(this);\r\n\t\tthis.endMove = this.endMove.bind(this);\r\n\t\tthis.tableRowDropEvent = false;\r\n\r\n\t\tthis.touchMove = false;\r\n\r\n\t\tthis.connection = false;\r\n\t\tthis.connectionSelectorsTables = false;\r\n\t\tthis.connectionSelectorsElements = false;\r\n\t\tthis.connectionElements = [];\r\n\t\tthis.connections = [];\r\n\r\n\t\tthis.connectedTable = false;\r\n\t\tthis.connectedRow = false;\r\n\r\n\t\tthis.registerTableOption(\"movableRows\", false); //enable movable rows\r\n\t\tthis.registerTableOption(\"movableRowsConnectedTables\", false); //tables for movable rows to be connected to\r\n\t\tthis.registerTableOption(\"movableRowsConnectedElements\", false); //other elements for movable rows to be connected to\r\n\t\tthis.registerTableOption(\"movableRowsSender\", false);\r\n\t\tthis.registerTableOption(\"movableRowsReceiver\", \"insert\");\r\n\r\n\t\tthis.registerColumnOption(\"rowHandle\");\r\n\t}\r\n\r\n\tcreatePlaceholderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\tel.classList.add(\"tabulator-row-placeholder\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.movableRows){\r\n\t\t\tthis.connectionSelectorsTables = this.table.options.movableRowsConnectedTables;\r\n\t\t\tthis.connectionSelectorsElements = this.table.options.movableRowsConnectedElements;\r\n\r\n\t\t\tthis.connection = this.connectionSelectorsTables || this.connectionSelectorsElements;\r\n\r\n\t\t\tthis.subscribe(\"cell-init\", this.initializeCell.bind(this));\r\n\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeGroupHeader(group){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\trowEl;\r\n\r\n\t\t//inter table drag drop\r\n\t\tconfig.mouseup = function(e){\r\n\t\t\tself.tableRowDrop(e, row);\r\n\t\t}.bind(self);\r\n\r\n\t\t//same table drag drop\r\n\t\tconfig.mousemove = function(e){\r\n\t\t\tif(((e.pageY - Helpers.elOffset(group.element).top) + self.table.rowManager.element.scrollTop) > (group.getHeight() / 2)){\r\n\t\t\t\tif(self.toRow !== group || !self.toRowAfter){\r\n\t\t\t\t\tvar rowEl = group.getElement();\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling);\r\n\t\t\t\t\tself.moveRow(group, true);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(self.toRow !== group || self.toRowAfter){\r\n\t\t\t\t\tvar rowEl = group.getElement();\r\n\t\t\t\t\tif(rowEl.previousSibling){\r\n\t\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl);\r\n\t\t\t\t\t\tself.moveRow(group, false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.bind(self);\r\n\r\n\t\tgroup.modules.moveRow = config;\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\trowEl;\r\n\r\n\t\t//inter table drag drop\r\n\t\tconfig.mouseup = function(e){\r\n\t\t\tself.tableRowDrop(e, row);\r\n\t\t}.bind(self);\r\n\r\n\t\t//same table drag drop\r\n\t\tconfig.mousemove = function(e){\r\n\t\t\tvar rowEl = row.getElement();\r\n\r\n\t\t\tif(((e.pageY - Helpers.elOffset(rowEl).top) + self.table.rowManager.element.scrollTop) > (row.getHeight() / 2)){\r\n\t\t\t\tif(self.toRow !== row || !self.toRowAfter){\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling);\r\n\t\t\t\t\tself.moveRow(row, true);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(self.toRow !== row || self.toRowAfter){\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl);\r\n\t\t\t\t\tself.moveRow(row, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.bind(self);\r\n\r\n\r\n\t\tif(!this.hasHandle){\r\n\r\n\t\t\trowEl = row.getElement();\r\n\r\n\t\t\trowEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, row);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\trowEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.bindTouchEvents(row, row.getElement());\r\n\t\t}\r\n\r\n\t\trow.modules.moveRow = config;\r\n\t}\r\n\r\n\tinitializeColumn(column){\r\n\t\tif(column.definition.rowHandle && this.table.options.movableRows !== false){\r\n\t\t\tthis.hasHandle = true;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeCell(cell){\r\n\t\tif(cell.column.definition.rowHandle && this.table.options.movableRows !== false){\r\n\t\t\tvar self = this,\r\n\t\t\tcellEl = cell.getElement(true);\r\n\r\n\t\t\tcellEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, cell.row);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tcellEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.bindTouchEvents(cell.row, cellEl);\r\n\t\t}\r\n\t}\r\n\r\n\tbindTouchEvents(row, element){\r\n\t\tvar startYMove = false, //shifting center position of the cell\r\n\t\tdir = false,\r\n\t\tcurrentRow, nextRow, prevRow, nextRowHeight, prevRowHeight, nextRowHeightLast, prevRowHeightLast;\r\n\r\n\t\telement.addEventListener(\"touchstart\", (e) => {\r\n\t\t\tthis.checkTimeout = setTimeout(() => {\r\n\t\t\t\tthis.touchMove = true;\r\n\t\t\t\tcurrentRow = row;\r\n\t\t\t\tnextRow = row.nextRow();\r\n\t\t\t\tnextRowHeight = nextRow ? nextRow.getHeight()/2 : 0;\r\n\t\t\t\tprevRow = row.prevRow();\r\n\t\t\t\tprevRowHeight = prevRow ? prevRow.getHeight()/2 : 0;\r\n\t\t\t\tnextRowHeightLast = 0;\r\n\t\t\t\tprevRowHeightLast = 0;\r\n\t\t\t\tstartYMove = false;\r\n\r\n\t\t\t\tthis.startMove(e, row);\r\n\t\t\t}, this.checkPeriod);\r\n\t\t}, {passive: true});\r\n\t\tthis.moving, this.toRow, this.toRowAfter\r\n\t\telement.addEventListener(\"touchmove\", (e) => {\r\n\r\n\t\t\tvar halfCol, diff, moveToRow;\r\n\r\n\t\t\tif(this.moving){\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tthis.moveHover(e);\r\n\r\n\t\t\t\tif(!startYMove){\r\n\t\t\t\t\tstartYMove = e.touches[0].pageY;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdiff = e.touches[0].pageY - startYMove;\r\n\r\n\t\t\t\tif(diff > 0){\r\n\t\t\t\t\tif(nextRow && diff - nextRowHeightLast > nextRowHeight){\r\n\t\t\t\t\t\tmoveToRow = nextRow;\r\n\r\n\t\t\t\t\t\tif(moveToRow !== row){\r\n\t\t\t\t\t\t\tstartYMove = e.touches[0].pageY\r\n\t\t\t\t\t\t\tmoveToRow.getElement().parentNode.insertBefore(this.placeholderElement, moveToRow.getElement().nextSibling);\r\n\t\t\t\t\t\t\tthis.moveRow(moveToRow, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(prevRow && -diff - prevRowHeightLast > prevRowHeight){\r\n\t\t\t\t\t\tmoveToRow = prevRow;\r\n\r\n\t\t\t\t\t\tif(moveToRow !== row){\r\n\t\t\t\t\t\t\tstartYMove = e.touches[0].pageY;\r\n\t\t\t\t\t\t\tmoveToRow.getElement().parentNode.insertBefore(this.placeholderElement, moveToRow.getElement());\r\n\t\t\t\t\t\t\tthis.moveRow(moveToRow, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(moveToRow){\r\n\t\t\t\t\tcurrentRow = moveToRow;\r\n\t\t\t\t\tnextRow = moveToRow.nextRow();\r\n\t\t\t\t\tnextRowHeightLast = nextRowHeight;\r\n\t\t\t\t\tnextRowHeight = nextRow ? nextRow.getHeight() / 2 : 0;\r\n\t\t\t\t\tprevRow = moveToRow.prevRow();\r\n\t\t\t\t\tprevRowHeightLast = prevRowHeight;\r\n\t\t\t\t\tprevRowHeight = prevRow ? prevRow.getHeight() / 2 : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\telement.addEventListener(\"touchend\", (e) => {\r\n\t\t\tif(this.checkTimeout){\r\n\t\t\t\tclearTimeout(this.checkTimeout);\r\n\t\t\t}\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.endMove(e);\r\n\t\t\t\tthis.touchMove = false;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t_bindMouseMove(){\r\n\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\tif((row.type === \"row\" || row.type === \"group\") && row.modules.moveRow && row.modules.moveRow.mousemove){\r\n\t\t\t\trow.getElement().addEventListener(\"mousemove\", row.modules.moveRow.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t_unbindMouseMove(){\r\n\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\tif((row.type === \"row\" || row.type === \"group\") && row.modules.moveRow && row.modules.moveRow.mousemove){\r\n\t\t\t\trow.getElement().removeEventListener(\"mousemove\", row.modules.moveRow.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tstartMove(e, row){\r\n\t\tvar element = row.getElement();\r\n\r\n\t\tthis.setStartPosition(e, row);\r\n\r\n\t\tthis.moving = row;\r\n\r\n\t\tthis.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\t//create placeholder\r\n\t\tthis.placeholderElement.style.width = row.getWidth() + \"px\";\r\n\t\tthis.placeholderElement.style.height = row.getHeight() + \"px\";\r\n\r\n\t\tif(!this.connection){\r\n\t\t\telement.parentNode.insertBefore(this.placeholderElement, element);\r\n\t\t\telement.parentNode.removeChild(element);\r\n\t\t}else{\r\n\t\t\tthis.table.element.classList.add(\"tabulator-movingrow-sending\");\r\n\t\t\tthis.connectToTables(row);\r\n\t\t}\r\n\r\n\t\t//create hover element\r\n\t\tthis.hoverElement = element.cloneNode(true);\r\n\t\tthis.hoverElement.classList.add(\"tabulator-moving\");\r\n\r\n\t\tif(this.connection){\r\n\t\t\tdocument.body.appendChild(this.hoverElement);\r\n\t\t\tthis.hoverElement.style.left = \"0\";\r\n\t\t\tthis.hoverElement.style.top = \"0\";\r\n\t\t\tthis.hoverElement.style.width = this.table.element.clientWidth + \"px\";\r\n\t\t\tthis.hoverElement.style.whiteSpace = \"nowrap\";\r\n\t\t\tthis.hoverElement.style.overflow = \"hidden\";\r\n\t\t\tthis.hoverElement.style.pointerEvents = \"none\";\r\n\t\t}else{\r\n\t\t\tthis.table.rowManager.getTableElement().appendChild(this.hoverElement);\r\n\r\n\t\t\tthis.hoverElement.style.left = \"0\";\r\n\t\t\tthis.hoverElement.style.top = \"0\";\r\n\r\n\t\t\tthis._bindMouseMove();\r\n\t\t}\r\n\r\n\t\tdocument.body.addEventListener(\"mousemove\", this.moveHover);\r\n\t\tdocument.body.addEventListener(\"mouseup\", this.endMove);\r\n\r\n\t\tthis.dispatchExternal(\"rowMoving\", row.getComponent());\r\n\r\n\t\tthis.moveHover(e);\r\n\t}\r\n\r\n\tsetStartPosition(e, row){\r\n\t\tvar pageX = this.touchMove ? e.touches[0].pageX : e.pageX,\r\n\t\tpageY = this.touchMove ? e.touches[0].pageY : e.pageY,\r\n\t\telement, position;\r\n\r\n\t\telement = row.getElement();\r\n\t\tif(this.connection){\r\n\t\t\tposition = element.getBoundingClientRect();\r\n\r\n\t\t\tthis.startX = position.left - pageX + window.pageXOffset;\r\n\t\t\tthis.startY = position.top - pageY + window.pageYOffset;\r\n\t\t}else{\r\n\t\t\tthis.startY = (pageY - element.getBoundingClientRect().top);\r\n\t\t}\r\n\t}\r\n\r\n\tendMove(e){\r\n\t\tif(!e || e.which === 1 || this.touchMove){\r\n\t\t\tthis._unbindMouseMove();\r\n\r\n\t\t\tif(!this.connection){\r\n\t\t\t\tthis.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling);\r\n\t\t\t\tthis.placeholderElement.parentNode.removeChild(this.placeholderElement);\r\n\t\t\t}\r\n\r\n\t\t\tthis.hoverElement.parentNode.removeChild(this.hoverElement);\r\n\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tif(this.toRow){\r\n\t\t\t\tthis.table.rowManager.moveRow(this.moving, this.toRow, this.toRowAfter);\r\n\t\t\t}else{\r\n\t\t\t\tthis.dispatchExternal(\"rowMoveCancelled\", this.moving.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.moving = false;\r\n\t\t\tthis.toRow = false;\r\n\t\t\tthis.toRowAfter = false;\r\n\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", this.moveHover);\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", this.endMove);\r\n\r\n\t\t\tif(this.connection){\r\n\t\t\t\tthis.table.element.classList.remove(\"tabulator-movingrow-sending\");\r\n\t\t\t\tthis.disconnectFromTables();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmoveRow(row, after){\r\n\t\tthis.toRow = row;\r\n\t\tthis.toRowAfter = after;\r\n\t}\r\n\r\n\tmoveHover(e){\r\n\t\tif(this.connection){\r\n\t\t\tthis.moveHoverConnections.call(this, e);\r\n\t\t}else{\r\n\t\t\tthis.moveHoverTable.call(this, e);\r\n\t\t}\r\n\t}\r\n\r\n\tmoveHoverTable(e){\r\n\t\tvar rowHolder = this.table.rowManager.getElement(),\r\n\t\tscrollTop = rowHolder.scrollTop,\r\n\t\tyPos = ((this.touchMove ? e.touches[0].pageY : e.pageY) - rowHolder.getBoundingClientRect().top) + scrollTop,\r\n\t\tscrollPos;\r\n\r\n\t\tthis.hoverElement.style.top = (yPos - this.startY) + \"px\";\r\n\t}\r\n\r\n\tmoveHoverConnections(e){\r\n\t\tthis.hoverElement.style.left = (this.startX + (this.touchMove ? e.touches[0].pageX : e.pageX)) + \"px\";\r\n\t\tthis.hoverElement.style.top = (this.startY + (this.touchMove ? e.touches[0].pageY : e.pageY)) + \"px\";\r\n\t}\r\n\r\n\telementRowDrop(e, element, row){\r\n\t\tthis.dispatchExternal(\"movableRowsElementDrop\", e, element, row ? row.getComponent() : false);\r\n\t}\r\n\r\n\t//establish connection with other tables\r\n\tconnectToTables(row){\r\n\t\tvar connectionTables;\r\n\r\n\t\tif(this.connectionSelectorsTables){\r\n\t\t\tconnectionTables = this.commsConnections(this.connectionSelectorsTables);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSendingStart\", connectionTables);\r\n\r\n\t\t\tthis.commsSend(this.connectionSelectorsTables, \"moveRow\", \"connect\", {\r\n\t\t\t\trow:row,\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.connectionSelectorsElements){\r\n\r\n\t\t\tthis.connectionElements = [];\r\n\r\n\t\t\tif(!Array.isArray(this.connectionSelectorsElements)){\r\n\t\t\t\tthis.connectionSelectorsElements = [this.connectionSelectorsElements];\r\n\t\t\t}\r\n\r\n\t\t\tthis.connectionSelectorsElements.forEach((query) => {\r\n\t\t\t\tif(typeof query === \"string\"){\r\n\t\t\t\t\tthis.connectionElements = this.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(query)));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.connectionElements.push(query);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.connectionElements.forEach((element) => {\r\n\t\t\t\tvar dropEvent = (e) => {\r\n\t\t\t\t\tthis.elementRowDrop(e, element, this.moving);\r\n\t\t\t\t};\r\n\r\n\t\t\t\telement.addEventListener(\"mouseup\", dropEvent);\r\n\t\t\t\telement.tabulatorElementDropEvent = dropEvent;\r\n\r\n\t\t\t\telement.classList.add(\"tabulator-movingrow-receiving\");\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t//disconnect from other tables\r\n\tdisconnectFromTables(){\r\n\t\tvar connectionTables;\r\n\r\n\t\tif(this.connectionSelectorsTables){\r\n\t\t\tconnectionTables = this.commsConnections(this.connectionSelectorsTables);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSendingStop\", connectionTables);\r\n\r\n\t\t\tthis.commsSend(this.connectionSelectorsTables, \"moveRow\", \"disconnect\");\r\n\t\t}\r\n\r\n\t\tthis.connectionElements.forEach((element) => {\r\n\t\t\telement.classList.remove(\"tabulator-movingrow-receiving\");\r\n\t\t\telement.removeEventListener(\"mouseup\", element.tabulatorElementDropEvent);\r\n\t\t\tdelete element.tabulatorElementDropEvent;\r\n\t\t});\r\n\t}\r\n\r\n\t//accept incomming connection\r\n\tconnect(table, row){\r\n\t\tif(!this.connectedTable){\r\n\t\t\tthis.connectedTable = table;\r\n\t\t\tthis.connectedRow = row;\r\n\r\n\t\t\tthis.table.element.classList.add(\"tabulator-movingrow-receiving\");\r\n\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\t\tif(row.type === \"row\" && row.modules.moveRow && row.modules.moveRow.mouseup){\r\n\t\t\t\t\trow.getElement().addEventListener(\"mouseup\", row.modules.moveRow.mouseup);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.tableRowDropEvent = this.tableRowDrop.bind(this);\r\n\r\n\t\t\tthis.table.element.addEventListener(\"mouseup\", this.tableRowDropEvent);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivingStart\", row, table);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Row Error - Table cannot accept connection, already connected to table:\", this.connectedTable);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//close incomming connection\r\n\tdisconnect(table){\r\n\t\tif(table === this.connectedTable){\r\n\t\t\tthis.connectedTable = false;\r\n\t\t\tthis.connectedRow = false;\r\n\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-movingrow-receiving\");\r\n\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) =>{\r\n\t\t\t\tif(row.type === \"row\" && row.modules.moveRow && row.modules.moveRow.mouseup){\r\n\t\t\t\t\trow.getElement().removeEventListener(\"mouseup\", row.modules.moveRow.mouseup);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.table.element.removeEventListener(\"mouseup\", this.tableRowDropEvent);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivingStop\", table);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Row Error - trying to disconnect from non connected table\")\r\n\t\t}\r\n\t}\r\n\r\n\tdropComplete(table, row, success){\r\n\t\tvar sender = false;\r\n\r\n\t\tif(success){\r\n\r\n\t\t\tswitch(typeof this.table.options.movableRowsSender){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tsender = this.senders[this.table.options.movableRowsSender];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tsender = this.table.options.movableRowsSender;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(sender){\r\n\t\t\t\tsender.call(this, this.moving.getComponent(), row ? row.getComponent() : undefined, table)\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.options.movableRowsSender){\r\n\t\t\t\t\tconsole.warn(\"Mover Row Error - no matching sender found:\", this.table.options.movableRowsSender);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSent\", this.moving.getComponent(), row ? row.getComponent() : undefined, table);\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"movableRowsSentFailed\", this.moving.getComponent(), row ? row.getComponent() : undefined, table);\r\n\t\t}\r\n\r\n\t\tthis.endMove();\r\n\t}\r\n\r\n\ttableRowDrop(e, row){\r\n\t\tvar receiver = false,\r\n\t\tsuccess = false;\r\n\r\n\t\te.stopImmediatePropagation();\r\n\r\n\t\tswitch(typeof this.table.options.movableRowsReceiver){\r\n\t\t\tcase \"string\":\r\n\t\t\treceiver = this.receivers[this.table.options.movableRowsReceiver];\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\treceiver = this.table.options.movableRowsReceiver;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(receiver){\r\n\t\t\tsuccess = receiver.call(this, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Mover Row Error - no matching receiver found:\", this.table.options.movableRowsReceiver)\r\n\t\t}\r\n\r\n\t\tif(success){\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceived\", this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable);\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivedFailed\", this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable);\r\n\t\t}\r\n\r\n\t\tthis.commsSend(this.connectedTable, \"moveRow\", \"dropcomplete\", {\r\n\t\t\trow:row,\r\n\t\t\tsuccess:success,\r\n\t\t});\r\n\t}\r\n\r\n\tcommsReceived(table, action, data){\r\n\t\tswitch(action){\r\n\t\t\tcase \"connect\":\r\n\t\t\treturn this.connect(table, data.row);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"disconnect\":\r\n\t\t\treturn this.disconnect(table);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"dropcomplete\":\r\n\t\t\treturn this.dropComplete(table, data.row, data.success);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMoveRows.prototype.receivers = {\r\n\tinsert:function(fromRow, toRow, fromTable){\r\n\t\tthis.table.addRow(fromRow.getData(), undefined, toRow);\r\n\t\treturn true;\r\n\t},\r\n\r\n\tadd:function(fromRow, toRow, fromTable){\r\n\t\tthis.table.addRow(fromRow.getData());\r\n\t\treturn true;\r\n\t},\r\n\r\n\tupdate:function(fromRow, toRow, fromTable){\r\n\t\tif(toRow){\r\n\t\t\ttoRow.update(fromRow.getData());\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\r\n\treplace:function(fromRow, toRow, fromTable){\r\n\t\tif(toRow){\r\n\t\t\tthis.table.addRow(fromRow.getData(), undefined, toRow);\r\n\t\t\ttoRow.delete();\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n};\r\n\r\nMoveRows.prototype.senders = {\r\n\tdelete:function(fromRow, toRow, toTable){\r\n\t\tfromRow.delete();\r\n\t}\r\n};\r\n\r\nMoveRows.moduleName = \"moveRow\";\r\n\r\nexport default MoveRows;","export default {};","import Module from '../../core/Module.js';\r\n\r\nimport defaultMutators from './defaults/mutators.js';\r\n\r\nclass Mutator extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.allowedTypes = [\"\", \"data\", \"edit\", \"clipboard\"]; //list of muatation types\r\n\t\tthis.enabled = true;\r\n\r\n\t\tthis.registerColumnOption(\"mutator\");\r\n\t\tthis.registerColumnOption(\"mutatorParams\");\r\n\t\tthis.registerColumnOption(\"mutatorData\");\r\n\t\tthis.registerColumnOption(\"mutatorDataParams\");\r\n\t\tthis.registerColumnOption(\"mutatorEdit\");\r\n\t\tthis.registerColumnOption(\"mutatorEditParams\");\r\n\t\tthis.registerColumnOption(\"mutatorClipboard\");\r\n\t\tthis.registerColumnOption(\"mutatorClipboardParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-value-changing\", this.transformCell.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"row-data-init-before\", this.rowDataChanged.bind(this));\r\n\t\tthis.subscribe(\"row-data-changing\", this.rowDataChanged.bind(this));\r\n\t}\r\n\r\n\trowDataChanged(row, tempData, updatedData){\r\n\t\treturn this.transformRow(tempData, \"data\", updatedData);\r\n\t}\r\n\r\n\t//initialize column mutator\r\n\tinitializeColumn(column){\r\n\t\tvar match = false,\r\n\t\tconfig = {};\r\n\r\n\t\tthis.allowedTypes.forEach((type) => {\r\n\t\t\tvar key = \"mutator\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\t\tmutator;\r\n\r\n\t\t\tif(column.definition[key]){\r\n\t\t\t\tmutator = this.lookupMutator(column.definition[key]);\r\n\r\n\t\t\t\tif(mutator){\r\n\t\t\t\t\tmatch = true;\r\n\r\n\t\t\t\t\tconfig[key] = {\r\n\t\t\t\t\t\tmutator:mutator,\r\n\t\t\t\t\t\tparams: column.definition[key + \"Params\"] || {},\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tcolumn.modules.mutate = config;\r\n\t\t}\r\n\t}\r\n\r\n\tlookupMutator(value){\r\n\t\tvar mutator = false;\r\n\r\n\t\t//set column mutator\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Mutator.mutators[value]){\r\n\t\t\t\tmutator = Mutator.mutators[value];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Mutator Error - No such mutator found, ignoring: \", value);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tmutator = value;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn mutator;\r\n\t}\r\n\r\n\t//apply mutator to row\r\n\ttransformRow(data, type, updatedData){\r\n\t\tvar key = \"mutator\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\tvalue;\r\n\r\n\t\tif(this.enabled){\r\n\r\n\t\t\tthis.table.columnManager.traverse((column) => {\r\n\t\t\t\tvar mutator, params, component;\r\n\r\n\t\t\t\tif(column.modules.mutate){\r\n\t\t\t\t\tmutator = column.modules.mutate[key] || column.modules.mutate.mutator || false;\r\n\r\n\t\t\t\t\tif(mutator){\r\n\t\t\t\t\t\tvalue = column.getFieldValue(typeof updatedData !== \"undefined\" ? updatedData : data);\r\n\r\n\t\t\t\t\t\tif(type == \"data\" || typeof value !== \"undefined\"){\r\n\t\t\t\t\t\t\tcomponent = column.getComponent();\r\n\t\t\t\t\t\t\tparams = typeof mutator.params === \"function\" ? mutator.params(value, data, type, component) : mutator.params;\r\n\t\t\t\t\t\t\tcolumn.setFieldValue(data, mutator.mutator(value, data, type, params, component));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//apply mutator to new cell value\r\n\ttransformCell(cell, value){\r\n\t\tif(cell.column.modules.mutate){\r\n\t\t\tvar mutator = cell.column.modules.mutate.mutatorEdit || cell.column.modules.mutate.mutator || false,\r\n\t\t\ttempData = {};\r\n\r\n\t\t\tif(mutator){\r\n\t\t\t\ttempData = Object.assign(tempData, cell.row.getData());\r\n\t\t\t\tcell.column.setFieldValue(tempData, value);\r\n\t\t\t\treturn mutator.mutator(value, tempData, \"edit\", mutator.params, cell.getComponent());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\tenable(){\r\n\t\tthis.enabled = true;\r\n\t}\r\n\r\n\tdisable(){\r\n\t\tthis.enabled = false;\r\n\t}\r\n}\r\n\r\nMutator.moduleName = \"mutator\";\r\n\r\n//load defaults\r\nMutator.mutators = defaultMutators;\r\n\r\nexport default Mutator;","export default function(pageSize, currentRow, currentPage, totalRows, totalPages){\r\n\tvar el = document.createElement(\"span\"),\r\n\tshowingEl = document.createElement(\"span\"),\r\n\tvalueEl = document.createElement(\"span\"),\r\n\tofEl = document.createElement(\"span\"),\r\n\ttotalEl = document.createElement(\"span\"),\r\n\trowsEl = document.createElement(\"span\");\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|showing\", (value) => {\r\n\t\tshowingEl.innerHTML = value;\r\n\t});\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|of\", (value) => {\r\n\t\tofEl.innerHTML = value;\r\n\t});\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|rows\", (value) => {\r\n\t\trowsEl.innerHTML = value;\r\n\t});\r\n\r\n\tif(totalRows){\r\n\t\tvalueEl.innerHTML = \" \" + currentRow + \"-\" + Math.min((currentRow + pageSize - 1), totalRows) + \" \";\r\n\t\t\r\n\t\ttotalEl.innerHTML = \" \" + totalRows + \" \";\r\n\t\t\r\n\t\tel.appendChild(showingEl);\r\n\t\tel.appendChild(valueEl);\r\n\t\tel.appendChild(ofEl);\r\n\t\tel.appendChild(totalEl);\r\n\t\tel.appendChild(rowsEl);\r\n\t}else{\r\n\t\tvalueEl.innerHTML = \" 0 \";\r\n\r\n\t\tel.appendChild(showingEl);\r\n\t\tel.appendChild(valueEl);\r\n\t\tel.appendChild(rowsEl);\r\n\t}\r\n\t\r\n\treturn el;\r\n};","export default function(pageSize, currentRow, currentPage, totalRows, totalPages){\r\n\r\n var el = document.createElement(\"span\"),\r\n\tshowingEl = document.createElement(\"span\"),\r\n\tvalueEl = document.createElement(\"span\"),\r\n\tofEl = document.createElement(\"span\"),\r\n\ttotalEl = document.createElement(\"span\"),\r\n\trowsEl = document.createElement(\"span\");\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|showing\", (value) => {\r\n\t\tshowingEl.innerHTML = value;\r\n\t});\r\n\t\r\n\tvalueEl.innerHTML = \" \" + currentPage + \" \";\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|of\", (value) => {\r\n\t\tofEl.innerHTML = value;\r\n\t});\r\n\t\r\n\ttotalEl.innerHTML = \" \" + totalPages + \" \";\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|pages\", (value) => {\r\n\t\trowsEl.innerHTML = value;\r\n\t});\r\n\t\r\n\tel.appendChild(showingEl);\r\n\tel.appendChild(valueEl);\r\n\tel.appendChild(ofEl);\r\n\tel.appendChild(totalEl);\r\n\tel.appendChild(rowsEl);\r\n\t\r\n\treturn el;\r\n};","import rows from './pageCounters/rows.js';\r\nimport pages from './pageCounters/pages.js';\r\n\r\n\r\nexport default {\r\n\trows:rows,\r\n\tpages:pages,\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultPageCounters from './defaults/pageCounters.js';\r\n\r\nclass Page extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.mode = \"local\";\r\n\t\tthis.progressiveLoad = false;\r\n\t\t\r\n\t\tthis.element = null;\r\n\t\tthis.pageCounterElement = null;\r\n\t\tthis.pageCounter = null;\r\n\t\t\r\n\t\tthis.size = 0;\r\n\t\tthis.page = 1;\r\n\t\tthis.count = 5;\r\n\t\tthis.max = 1;\r\n\r\n\t\tthis.remoteRowCountEstimate = null;\r\n\t\t\r\n\t\tthis.displayIndex = 0; //index in display pipeline\r\n\t\t\r\n\t\tthis.initialLoad = true;\r\n\t\tthis.dataChanging = false; //flag to check if data is being changed by this module\r\n\t\t\r\n\t\tthis.pageSizes = [];\r\n\t\t\r\n\t\tthis.registerTableOption(\"pagination\", false); //set pagination type\r\n\t\tthis.registerTableOption(\"paginationMode\", \"local\"); //local or remote pagination\r\n\t\tthis.registerTableOption(\"paginationSize\", false); //set number of rows to a page\r\n\t\tthis.registerTableOption(\"paginationInitialPage\", 1); //initial page to show on load\r\n\t\tthis.registerTableOption(\"paginationCounter\", false); // set pagination counter\r\n\t\tthis.registerTableOption(\"paginationCounterElement\", false); // set pagination counter\r\n\t\tthis.registerTableOption(\"paginationButtonCount\", 5); // set count of page button\r\n\t\tthis.registerTableOption(\"paginationSizeSelector\", false); //add pagination size selector element\r\n\t\tthis.registerTableOption(\"paginationElement\", false); //element to hold pagination numbers\r\n\t\t// this.registerTableOption(\"paginationDataSent\", {}); //pagination data sent to the server\r\n\t\t// this.registerTableOption(\"paginationDataReceived\", {}); //pagination data received from the server\r\n\t\tthis.registerTableOption(\"paginationAddRow\", \"page\"); //add rows on table or page\r\n\t\t\r\n\t\tthis.registerTableOption(\"progressiveLoad\", false); //progressive loading\r\n\t\tthis.registerTableOption(\"progressiveLoadDelay\", 0); //delay between requests\r\n\t\tthis.registerTableOption(\"progressiveLoadScrollMargin\", 0); //margin before scroll begins\r\n\t\t\r\n\t\tthis.registerTableFunction(\"setMaxPage\", this.setMaxPage.bind(this));\r\n\t\tthis.registerTableFunction(\"setPage\", this.setPage.bind(this));\r\n\t\tthis.registerTableFunction(\"setPageToRow\", this.userSetPageToRow.bind(this));\r\n\t\tthis.registerTableFunction(\"setPageSize\", this.userSetPageSize.bind(this));\r\n\t\tthis.registerTableFunction(\"getPageSize\", this.getPageSize.bind(this));\r\n\t\tthis.registerTableFunction(\"previousPage\", this.previousPage.bind(this));\r\n\t\tthis.registerTableFunction(\"nextPage\", this.nextPage.bind(this));\r\n\t\tthis.registerTableFunction(\"getPage\", this.getPage.bind(this));\r\n\t\tthis.registerTableFunction(\"getPageMax\", this.getPageMax.bind(this));\r\n\t\t\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"pageTo\", this.setPageToRow.bind(this));\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"row-added\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"data-processed\", this.initialLoadComplete.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.calculatePageSizes.bind(this));\r\n\r\n\t\t\tif(this.table.options.paginationAddRow == \"page\"){\r\n\t\t\t\tthis.subscribe(\"row-adding-position\", this.rowAddingPosition.bind(this));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.options.paginationMode === \"remote\"){\r\n\t\t\t\tthis.subscribe(\"data-params\", this.remotePageParams.bind(this));\r\n\t\t\t\tthis.subscribe(\"data-loaded\", this._parseRemoteData.bind(this));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.options.progressiveLoad){\r\n\t\t\t\tconsole.error(\"Progressive Load Error - Pagination and progressive load cannot be used at the same time\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.registerDisplayHandler(this.restOnRenderBefore.bind(this), 40);\r\n\t\t\tthis.registerDisplayHandler(this.getRows.bind(this), 50);\r\n\t\t\t\r\n\t\t\tthis.createElements();\r\n\t\t\tthis.initializePageCounter();\r\n\t\t\tthis.initializePaginator();\r\n\t\t}else if(this.table.options.progressiveLoad){\r\n\t\t\tthis.subscribe(\"data-params\", this.remotePageParams.bind(this));\r\n\t\t\tthis.subscribe(\"data-loaded\", this._parseRemoteData.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.calculatePageSizes.bind(this));\r\n\t\t\tthis.subscribe(\"data-processed\", this.initialLoadComplete.bind(this));\r\n\t\t\t\r\n\t\t\tthis.initializeProgressive(this.table.options.progressiveLoad)\r\n\t\t\t\r\n\t\t\tif(this.table.options.progressiveLoad === \"scroll\"){\r\n\t\t\t\tthis.subscribe(\"scroll-vertical\", this.scrollVertical.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trowAddingPosition(row, top){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tdispRows = rowManager.getDisplayRows(),\r\n\t\tindex;\r\n\t\t\r\n\t\tif(top){\r\n\t\t\tif(dispRows.length){\r\n\t\t\t\tindex = dispRows[0];\r\n\t\t\t}else{\r\n\t\t\t\tif(rowManager.activeRows.length){\r\n\t\t\t\t\tindex = rowManager.activeRows[rowManager.activeRows.length-1];\r\n\t\t\t\t\ttop = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(dispRows.length){\r\n\t\t\t\tindex = dispRows[dispRows.length - 1];\r\n\t\t\t\ttop = dispRows.length < this.size ? false : true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn {index, top}\r\n\t}\r\n\t\r\n\tcalculatePageSizes(){\r\n\t\tvar testElRow, testElCell;\r\n\t\t\r\n\t\tif(this.table.options.paginationSize){\r\n\t\t\tthis.size = this.table.options.paginationSize;\r\n\t\t}else{\r\n\t\t\ttestElRow = document.createElement(\"div\");\r\n\t\t\ttestElRow.classList.add(\"tabulator-row\");\r\n\t\t\ttestElRow.style.visibility = \"hidden\";\r\n\t\t\t\r\n\t\t\ttestElCell = document.createElement(\"div\");\r\n\t\t\ttestElCell.classList.add(\"tabulator-cell\");\r\n\t\t\ttestElCell.innerHTML = \"Page Row Test\";\r\n\t\t\t\r\n\t\t\ttestElRow.appendChild(testElCell);\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getTableElement().appendChild(testElRow);\r\n\t\t\t\r\n\t\t\tthis.size = Math.floor(this.table.rowManager.getElement().clientHeight / testElRow.offsetHeight);\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getTableElement().removeChild(testElRow);\r\n\t\t}\r\n\t\t\r\n\t\tthis.generatePageSizeSelectList();\r\n\t}\r\n\t\r\n\tinitialLoadComplete(){\r\n\t\tthis.initialLoad = false;\r\n\t}\r\n\t\r\n\tremotePageParams(data, config, silent, params){\r\n\t\tif(!this.initialLoad){\r\n\t\t\tif((this.progressiveLoad && !silent) || (!this.progressiveLoad && !this.dataChanging)){\r\n\t\t\t\tthis.reset(true);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//configure request params\r\n\t\tparams.page = this.page;\r\n\t\t\r\n\t\t//set page size if defined\r\n\t\tif(this.size){\r\n\t\t\tparams.size = this.size;\r\n\t\t}\r\n\t\t\r\n\t\treturn params;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\tuserSetPageToRow(row){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\trow = this.rowManager.findRow(row);\r\n\t\t\t\r\n\t\t\tif(row){\r\n\t\t\t\treturn this.setPageToRow(row)\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn Promise.reject();\r\n\t}\r\n\t\r\n\tuserSetPageSize(size){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\tthis.setPageSize(size);\r\n\t\t\treturn this.setPage(1);\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\r\n\tscrollVertical(top, dir){\r\n\t\tvar element, diff, margin;\r\n\t\tif(!dir && !this.table.dataLoader.loading){\r\n\t\t\telement = this.table.rowManager.getElement();\r\n\t\t\tdiff = element.scrollHeight - element.clientHeight - top;\r\n\t\t\tmargin = this.table.options.progressiveLoadScrollMargin || (element.clientHeight * 2);\r\n\t\t\t\r\n\t\t\tif(diff < margin){\r\n\t\t\t\tthis.nextPage()\r\n\t\t\t\t.catch(() => {}); //consume the exception thrown when on the last page\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trestOnRenderBefore(rows, renderInPosition){\r\n\t\tif(!renderInPosition){\r\n\t\t\tif(this.mode === \"local\"){\r\n\t\t\t\tthis.reset();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\trowsUpdated(){\r\n\t\tthis.refreshData(true, \"all\");\r\n\t}\r\n\t\r\n\tcreateElements(){\r\n\t\tvar button;\r\n\t\t\r\n\t\tthis.element = document.createElement(\"span\");\r\n\t\tthis.element.classList.add(\"tabulator-paginator\");\r\n\t\t\r\n\t\tthis.pagesElement = document.createElement(\"span\");\r\n\t\tthis.pagesElement.classList.add(\"tabulator-pages\");\r\n\t\t\r\n\t\tbutton = document.createElement(\"button\");\r\n\t\tbutton.classList.add(\"tabulator-page\");\r\n\t\tbutton.setAttribute(\"type\", \"button\");\r\n\t\tbutton.setAttribute(\"role\", \"button\");\r\n\t\tbutton.setAttribute(\"aria-label\", \"\");\r\n\t\tbutton.setAttribute(\"title\", \"\");\r\n\t\t\r\n\t\tthis.firstBut = button.cloneNode(true);\r\n\t\tthis.firstBut.setAttribute(\"data-page\", \"first\");\r\n\t\t\r\n\t\tthis.prevBut = button.cloneNode(true);\r\n\t\tthis.prevBut.setAttribute(\"data-page\", \"prev\");\r\n\t\t\r\n\t\tthis.nextBut = button.cloneNode(true);\r\n\t\tthis.nextBut.setAttribute(\"data-page\", \"next\");\r\n\t\t\r\n\t\tthis.lastBut = button.cloneNode(true);\r\n\t\tthis.lastBut.setAttribute(\"data-page\", \"last\");\r\n\t\t\r\n\t\tif(this.table.options.paginationSizeSelector){\r\n\t\t\tthis.pageSizeSelect = document.createElement(\"select\");\r\n\t\t\tthis.pageSizeSelect.classList.add(\"tabulator-page-size\");\r\n\t\t}\r\n\t}\r\n\t\r\n\tgeneratePageSizeSelectList(){\r\n\t\tvar pageSizes = [];\r\n\t\t\r\n\t\tif(this.pageSizeSelect){\r\n\t\t\t\r\n\t\t\tif(Array.isArray(this.table.options.paginationSizeSelector)){\r\n\t\t\t\tpageSizes = this.table.options.paginationSizeSelector;\r\n\t\t\t\tthis.pageSizes = pageSizes;\r\n\t\t\t\t\r\n\t\t\t\tif(this.pageSizes.indexOf(this.size) == -1){\r\n\t\t\t\t\tpageSizes.unshift(this.size);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t\r\n\t\t\t\tif(this.pageSizes.indexOf(this.size) == -1){\r\n\t\t\t\t\tpageSizes = [];\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (let i = 1; i < 5; i++){\r\n\t\t\t\t\t\tpageSizes.push(this.size * i);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.pageSizes = pageSizes;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tpageSizes = this.pageSizes;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\twhile(this.pageSizeSelect.firstChild) this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);\r\n\t\t\t\r\n\t\t\tpageSizes.forEach((item) => {\r\n\t\t\t\tvar itemEl = document.createElement(\"option\");\r\n\t\t\t\titemEl.value = item;\r\n\t\t\t\t\r\n\t\t\t\tif(item === true){\r\n\t\t\t\t\tthis.langBind(\"pagination|all\", function(value){\r\n\t\t\t\t\t\titemEl.innerHTML = value;\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\titemEl.innerHTML = item;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tthis.pageSizeSelect.appendChild(itemEl);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.pageSizeSelect.value = this.size;\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializePageCounter(){\r\n\t\tvar counter = this.table.options.paginationCounter,\r\n\t\tpageCounter = null;\r\n\t\t\r\n\t\tif(counter){\r\n\t\t\tif(typeof counter === \"function\"){\r\n\t\t\t\tpageCounter = counter;\r\n\t\t\t}else{\r\n\t\t\t\tpageCounter = Page.pageCounters[counter];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(pageCounter){\r\n\t\t\t\tthis.pageCounter = pageCounter;\r\n\t\t\t\t\r\n\t\t\t\tthis.pageCounterElement = document.createElement(\"span\");\r\n\t\t\t\tthis.pageCounterElement.classList.add(\"tabulator-page-counter\");\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Pagination Error - No such page counter found: \", counter);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//setup pagination\r\n\tinitializePaginator(hidden){\r\n\t\tvar pageSelectLabel, paginationCounterHolder;\r\n\t\t\r\n\t\tif(!hidden){\r\n\t\t\t//build pagination element\r\n\t\t\t\r\n\t\t\t//bind localizations\r\n\t\t\tthis.langBind(\"pagination|first\", (value) => {\r\n\t\t\t\tthis.firstBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|first_title\", (value) => {\r\n\t\t\t\tthis.firstBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.firstBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|prev\", (value) => {\r\n\t\t\t\tthis.prevBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|prev_title\", (value) => {\r\n\t\t\t\tthis.prevBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.prevBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|next\", (value) => {\r\n\t\t\t\tthis.nextBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|next_title\", (value) => {\r\n\t\t\t\tthis.nextBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.nextBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|last\", (value) => {\r\n\t\t\t\tthis.lastBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|last_title\", (value) => {\r\n\t\t\t\tthis.lastBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.lastBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t//click bindings\r\n\t\t\tthis.firstBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.setPage(1)\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.prevBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.previousPage()\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.nextBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.nextPage()\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.lastBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.setPage(this.max)\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(this.table.options.paginationElement){\r\n\t\t\t\tthis.element = this.table.options.paginationElement;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.pageSizeSelect){\r\n\t\t\t\tpageSelectLabel = document.createElement(\"label\");\r\n\t\t\t\t\r\n\t\t\t\tthis.langBind(\"pagination|page_size\", (value) => {\r\n\t\t\t\t\tthis.pageSizeSelect.setAttribute(\"aria-label\", value);\r\n\t\t\t\t\tthis.pageSizeSelect.setAttribute(\"title\", value);\r\n\t\t\t\t\tpageSelectLabel.innerHTML = value;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.element.appendChild(pageSelectLabel);\r\n\t\t\t\tthis.element.appendChild(this.pageSizeSelect);\r\n\t\t\t\t\r\n\t\t\t\tthis.pageSizeSelect.addEventListener(\"change\", (e) => {\r\n\t\t\t\t\tthis.setPageSize(this.pageSizeSelect.value == \"true\" ? true : this.pageSizeSelect.value);\r\n\t\t\t\t\tthis.setPage(1)\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//append to DOM\r\n\t\t\tthis.element.appendChild(this.firstBut);\r\n\t\t\tthis.element.appendChild(this.prevBut);\r\n\t\t\tthis.element.appendChild(this.pagesElement);\r\n\t\t\tthis.element.appendChild(this.nextBut);\r\n\t\t\tthis.element.appendChild(this.lastBut);\r\n\t\t\t\r\n\t\t\tif(!this.table.options.paginationElement && !hidden){\r\n\t\t\t\tif(this.table.options.paginationCounter){\r\n\r\n\t\t\t\t\tpaginationCounterHolder \r\n\r\n\t\t\t\t\tif(this.table.options.paginationCounterElement){\r\n\t\t\t\t\t\tif(this.table.options.paginationCounterElement instanceof HTMLElement){\r\n\t\t\t\t\t\t\tthis.table.options.paginationCounterElement.appendChild(this.pageCounterElement);\r\n\t\t\t\t\t\t}else if(typeof this.table.options.paginationCounterElement === \"string\"){\r\n\t\t\t\t\t\t\tpaginationCounterHolder = document.querySelector(this.table.options.paginationCounterElement);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(paginationCounterHolder){\r\n\t\t\t\t\t\t\t\tpaginationCounterHolder.appendChild(this.pageCounterElement);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Pagination Error - Unable to find element matching paginationCounterElement selector:\", this.table.options.paginationCounterElement);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.table.footerManager.append(this.pageCounterElement);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.table.footerManager.append(this.element, this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.page = this.table.options.paginationInitialPage;\r\n\t\t\tthis.count = this.table.options.paginationButtonCount;\r\n\t\t}\r\n\t\t\r\n\t\t//set default values\r\n\t\tthis.mode = this.table.options.paginationMode;\r\n\t}\r\n\t\r\n\tinitializeProgressive(mode){\r\n\t\tthis.initializePaginator(true);\r\n\t\tthis.mode = \"progressive_\" + mode;\r\n\t\tthis.progressiveLoad = true;\r\n\t}\r\n\t\r\n\ttrackChanges(){\r\n\t\tthis.dispatch(\"page-changed\");\r\n\t}\r\n\t\r\n\tsetDisplayIndex(index){\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\t\r\n\tgetDisplayIndex(){\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\t\r\n\t//calculate maximum page from number of rows\r\n\tsetMaxRows(rowCount){\r\n\t\tif(!rowCount){\r\n\t\t\tthis.max = 1;\r\n\t\t}else{\r\n\t\t\tthis.max = this.size === true ? 1 : Math.ceil(rowCount/this.size);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.page > this.max){\r\n\t\t\tthis.page = this.max;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//reset to first page without triggering action\r\n\treset(force){\r\n\t\tif(!this.initialLoad){\r\n\t\t\tif(this.mode == \"local\" || force){\r\n\t\t\t\tthis.page = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set the maximum page\r\n\tsetMaxPage(max){\r\n\t\t\r\n\t\tmax = parseInt(max);\r\n\t\t\r\n\t\tthis.max = max || 1;\r\n\t\t\r\n\t\tif(this.page > this.max){\r\n\t\t\tthis.page = this.max;\r\n\t\t\tthis.trigger();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set current page number\r\n\tsetPage(page){\r\n\t\tswitch(page){\r\n\t\t\tcase \"first\":\r\n\t\t\treturn this.setPage(1);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"prev\":\r\n\t\t\treturn this.previousPage();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"next\":\r\n\t\t\treturn this.nextPage();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"last\":\r\n\t\t\treturn this.setPage(this.max);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tpage = parseInt(page);\r\n\t\t\r\n\t\tif((page > 0 && page <= this.max) || this.mode !== \"local\"){\r\n\t\t\tthis.page = page;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Requested page is out of range of 1 - \" + this.max + \":\", page);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetPageToRow(row){\r\n\t\tvar rows = this.table.rowManager.getDisplayRows(this.displayIndex - 1);\r\n\t\tvar index = rows.indexOf(row);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tvar page = this.size === true ? 1 : Math.ceil((index + 1) / this.size);\r\n\t\t\t\r\n\t\t\treturn this.setPage(page)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Requested row is not visible\");\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetPageSize(size){\r\n\t\tif(size !== true){\r\n\t\t\tsize = parseInt(size);\r\n\t\t}\r\n\t\t\r\n\t\tif(size > 0){\r\n\t\t\tthis.size = size;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.pageSizeSelect){\r\n\t\t\t// this.pageSizeSelect.value = size;\r\n\t\t\tthis.generatePageSizeSelectList();\r\n\t\t}\r\n\t\t\r\n\t\tthis.trackChanges();\r\n\t}\r\n\t\r\n\t_setPageCounter(totalRows, size, currentRow){\r\n\t\tvar content;\r\n\t\t\r\n\t\tif(this.pageCounter){\r\n\r\n\t\t\tif(this.mode === \"remote\"){\r\n\t\t\t\tsize = this.size;\r\n\t\t\t\tcurrentRow = ((this.page - 1) * this.size) + 1;\r\n\t\t\t\ttotalRows = this.remoteRowCountEstimate;\r\n\t\t\t}\r\n\r\n\t\t\tcontent = this.pageCounter.call(this, size, currentRow, this.page, totalRows, this.max);\r\n\t\t\t\r\n\t\t\tswitch(typeof content){\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\tif(content instanceof Node){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//clear previous cell contents\r\n\t\t\t\t\twhile(this.pageCounterElement.firstChild) this.pageCounterElement.removeChild(this.pageCounterElement.firstChild);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.pageCounterElement.appendChild(content);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(content != null){\r\n\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);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"undefined\":\r\n\t\t\t\tcase \"null\":\r\n\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.pageCounterElement.innerHTML = content;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//setup the pagination buttons\r\n\t_setPageButtons(){\r\n\t\tlet leftSize = Math.floor((this.count-1) / 2);\r\n\t\tlet rightSize = Math.ceil((this.count-1) / 2);\r\n\t\tlet min = this.max - this.page + leftSize + 1 < this.count ? this.max-this.count+1: Math.max(this.page-leftSize,1);\r\n\t\tlet max = this.page <= rightSize? Math.min(this.count, this.max) :Math.min(this.page+rightSize, this.max);\r\n\t\t\r\n\t\twhile(this.pagesElement.firstChild) this.pagesElement.removeChild(this.pagesElement.firstChild);\r\n\t\t\r\n\t\tif(this.page == 1){\r\n\t\t\tthis.firstBut.disabled = true;\r\n\t\t\tthis.prevBut.disabled = true;\r\n\t\t}else{\r\n\t\t\tthis.firstBut.disabled = false;\r\n\t\t\tthis.prevBut.disabled = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.page == this.max){\r\n\t\t\tthis.lastBut.disabled = true;\r\n\t\t\tthis.nextBut.disabled = true;\r\n\t\t}else{\r\n\t\t\tthis.lastBut.disabled = false;\r\n\t\t\tthis.nextBut.disabled = false;\r\n\t\t}\r\n\t\t\r\n\t\tfor(let i = min; i <= max; i++){\r\n\t\t\tif(i>0 && i <= this.max){\r\n\t\t\t\tthis.pagesElement.appendChild(this._generatePageButton(i));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.footerRedraw();\r\n\t}\r\n\t\r\n\t_generatePageButton(page){\r\n\t\tvar button = document.createElement(\"button\");\r\n\t\t\r\n\t\tbutton.classList.add(\"tabulator-page\");\r\n\t\tif(page == this.page){\r\n\t\t\tbutton.classList.add(\"active\");\r\n\t\t}\r\n\t\t\r\n\t\tbutton.setAttribute(\"type\", \"button\");\r\n\t\tbutton.setAttribute(\"role\", \"button\");\r\n\t\t\r\n\t\tthis.langBind(\"pagination|page_title\", (value) => {\r\n\t\t\tbutton.setAttribute(\"aria-label\", value + \" \" + page);\r\n\t\t\tbutton.setAttribute(\"title\", value + \" \" + page);\r\n\t\t});\r\n\t\t\r\n\t\tbutton.setAttribute(\"data-page\", page);\r\n\t\tbutton.textContent = page;\r\n\t\t\r\n\t\tbutton.addEventListener(\"click\", (e) => {\r\n\t\t\tthis.setPage(page)\r\n\t\t});\r\n\t\t\r\n\t\treturn button;\r\n\t}\r\n\t\r\n\t//previous page\r\n\tpreviousPage(){\r\n\t\tif(this.page > 1){\r\n\t\t\tthis.page--;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger()\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Previous page would be less than page 1:\", 0);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//next page\r\n\tnextPage(){\r\n\t\tif(this.page < this.max){\r\n\t\t\tthis.page++;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger();\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tif(!this.progressiveLoad){\r\n\t\t\t\tconsole.warn(\"Pagination Error - Next page would be greater than maximum page of \" + this.max + \":\", this.max + 1);\r\n\t\t\t}\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return current page number\r\n\tgetPage(){\r\n\t\treturn this.page;\r\n\t}\r\n\t\r\n\t//return max page number\r\n\tgetPageMax(){\r\n\t\treturn this.max;\r\n\t}\r\n\t\r\n\tgetPageSize(size){\r\n\t\treturn this.size;\r\n\t}\r\n\t\r\n\tgetMode(){\r\n\t\treturn this.mode;\r\n\t}\r\n\t\r\n\t//return appropriate rows for current page\r\n\tgetRows(data){\r\n\t\tvar actualRowPageSize = 0,\r\n\t\toutput, start, end, actualStartRow;\r\n\r\n\t\tvar actualRows = data.filter((row) => {\r\n\t\t\treturn row.type === \"row\";\r\n\t\t});\r\n\t\t\r\n\t\tif(this.mode == \"local\"){\r\n\t\t\toutput = [];\r\n\t\t\t\r\n\t\t\tthis.setMaxRows(data.length);\r\n\t\t\t\r\n\t\t\tif(this.size === true){\r\n\t\t\t\tstart = 0;\r\n\t\t\t\tend = data.length;\r\n\t\t\t}else{\r\n\t\t\t\tstart = this.size * (this.page - 1);\r\n\t\t\t\tend = start + parseInt(this.size);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._setPageButtons();\r\n\t\t\t\r\n\t\t\tfor(let i = start; i < end; i++){\r\n\t\t\t\tlet row = data[i];\r\n\r\n\t\t\t\tif(row){\r\n\t\t\t\t\toutput.push(row);\r\n\r\n\t\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\t\tif(!actualStartRow){\r\n\t\t\t\t\t\t\tactualStartRow = row;\r\n\t\t\t\t\t\t}\t\r\n\r\n\t\t\t\t\t\tactualRowPageSize++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._setPageCounter(actualRows.length, actualRowPageSize, actualStartRow ? (actualRows.indexOf(actualStartRow) + 1) : 0);\r\n\t\t\t\r\n\t\t\treturn output;\r\n\t\t}else{\r\n\t\t\tthis._setPageButtons();\r\n\t\t\tthis._setPageCounter(actualRows.length);\r\n\t\t\t\r\n\t\t\treturn data.slice(0);\r\n\t\t}\r\n\t}\r\n\t\r\n\ttrigger(){\r\n\t\tvar left;\r\n\t\t\r\n\t\tswitch(this.mode){\r\n\t\t\tcase \"local\":\r\n\t\t\tleft = this.table.rowManager.scrollLeft;\r\n\t\t\t\r\n\t\t\tthis.refreshData();\r\n\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\r\n\t\t\t\r\n\t\t\treturn Promise.resolve();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"remote\":\r\n\t\t\tthis.dataChanging = true;\r\n\t\t\treturn this.reloadData(null)\r\n\t\t\t.finally(() => {\r\n\t\t\t\tthis.dataChanging = false;\r\n\t\t\t})\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"progressive_load\":\r\n\t\t\tcase \"progressive_scroll\":\r\n\t\t\treturn this.reloadData(null, true);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\tconsole.warn(\"Pagination Error - no such pagination mode:\", this.mode);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_parseRemoteData(data){\r\n\t\tvar left, data, margin;\r\n\t\t\r\n\t\tif(typeof data.last_page === \"undefined\"){\r\n\t\t\tconsole.warn(\"Remote Pagination Error - Server response missing '\" + (this.options(\"dataReceiveParams\").last_page || \"last_page\") + \"' property\");\r\n\t\t}\r\n\t\t\r\n\t\tif(data.data){\r\n\t\t\tthis.max = parseInt(data.last_page) || 1;\r\n\r\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));\r\n\t\t\t\r\n\t\t\tif(this.progressiveLoad){\r\n\t\t\t\tswitch(this.mode){\r\n\t\t\t\t\tcase \"progressive_load\":\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.page == 1){\r\n\t\t\t\t\t\tthis.table.rowManager.setData(data.data, false, this.page == 1)\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.table.rowManager.addRows(data.data);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.page < this.max){\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tthis.nextPage();\r\n\t\t\t\t\t\t}, this.table.options.progressiveLoadDelay);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"progressive_scroll\":\r\n\t\t\t\t\tdata = this.page === 1 ? data.data : this.table.rowManager.getData().concat(data.data);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.table.rowManager.setData(data, this.page !== 1, this.page == 1);\r\n\t\t\t\t\t\r\n\t\t\t\t\tmargin = this.table.options.progressiveLoadScrollMargin || (this.table.rowManager.element.clientHeight * 2);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.table.rowManager.element.scrollHeight <= (this.table.rowManager.element.clientHeight + margin)){\r\n\t\t\t\t\t\tif(this.page < this.max){\r\n\t\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\t\tthis.nextPage();\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\t// left = this.table.rowManager.scrollLeft;\r\n\t\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\r\n\t\t\t\t// this.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\t// this.table.columnManager.scrollHorizontal(left);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Remote Pagination Error - Server response missing '\" + (this.options(\"dataReceiveParams\").data || \"data\") + \"' property\");\r\n\t\t}\r\n\t\t\r\n\t\treturn data.data;\r\n\t}\r\n\t\r\n\t//handle the footer element being redrawn\r\n\tfooterRedraw(){\r\n\t\tvar footer = this.table.footerManager.containerElement;\r\n\r\n\t\tif((Math.ceil(footer.clientWidth) - footer.scrollWidth) < 0){\r\n\t\t\tthis.pagesElement.style.display = 'none';\r\n\t\t}else{\r\n\t\t\tthis.pagesElement.style.display = '';\r\n\t\t\t\r\n\t\t\tif((Math.ceil(footer.clientWidth) - footer.scrollWidth) < 0){\r\n\t\t\t\tthis.pagesElement.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nPage.moduleName = \"page\";\r\n\r\n//load defaults\r\nPage.pageCounters = defaultPageCounters;\r\n\r\nexport default Page;","// read peristence information from storage\r\nexport default {\r\n\tlocal:function(id, type){\r\n\t\tvar data = localStorage.getItem(id + \"-\" + type);\r\n\r\n\t\treturn data ? JSON.parse(data) : false;\r\n\t},\r\n\tcookie:function(id, type){\r\n\t\tvar cookie = document.cookie,\r\n\t\tkey = id + \"-\" + type,\r\n\t\tcookiePos = cookie.indexOf(key + \"=\"),\r\n\t\tend, data;\r\n\r\n\t\t//if cookie exists, decode and load column data into tabulator\r\n\t\tif(cookiePos > -1){\r\n\t\t\tcookie = cookie.slice(cookiePos);\r\n\r\n\t\t\tend = cookie.indexOf(\";\");\r\n\r\n\t\t\tif(end > -1){\r\n\t\t\t\tcookie = cookie.slice(0, end);\r\n\t\t\t}\r\n\r\n\t\t\tdata = cookie.replace(key + \"=\", \"\");\r\n\t\t}\r\n\r\n\t\treturn data ? JSON.parse(data) : false;\r\n\t}\r\n};\r\n","//write persistence information to storage\r\nexport default {\r\n\tlocal:function(id, type, data){\r\n\t\tlocalStorage.setItem(id + \"-\" + type, JSON.stringify(data));\r\n\t},\r\n\tcookie:function(id, type, data){\r\n\t\tvar expireDate = new Date();\r\n\r\n\t\texpireDate.setDate(expireDate.getDate() + 10000);\r\n\r\n\t\tdocument.cookie = id + \"-\" + type + \"=\" + JSON.stringify(data) + \"; expires=\" + expireDate.toUTCString();\r\n\t}\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultReaders from './defaults/readers.js';\r\nimport defaultWriters from './defaults/writers.js';\r\n\r\nclass Persistence extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.mode = \"\";\r\n\t\tthis.id = \"\";\r\n\t\t// this.persistProps = [\"field\", \"width\", \"visible\"];\r\n\t\tthis.defWatcherBlock = false;\r\n\t\tthis.config = {};\r\n\t\tthis.readFunc = false;\r\n\t\tthis.writeFunc = false;\r\n\r\n\t\tthis.registerTableOption(\"persistence\", false);\r\n\t\tthis.registerTableOption(\"persistenceID\", \"\"); //key for persistent storage\r\n\t\tthis.registerTableOption(\"persistenceMode\", true); //mode for storing persistence information\r\n\t\tthis.registerTableOption(\"persistenceReaderFunc\", false); //function for handling persistence data reading\r\n\t\tthis.registerTableOption(\"persistenceWriterFunc\", false); //function for handling persistence data writing\r\n\t}\r\n\r\n\t// Test for whether localStorage is available for use.\r\n\tlocalStorageTest() {\r\n\t\tvar testKey = \"_tabulator_test\";\r\n\r\n\t\ttry {\r\n\t\t\twindow.localStorage.setItem( testKey, testKey);\r\n\t\t\twindow.localStorage.removeItem( testKey );\r\n\t\t\treturn true;\r\n\t\t} catch(e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//setup parameters\r\n\tinitialize(){\r\n\t\tif(this.table.options.persistence){\r\n\t\t\t//determine persistent layout storage type\r\n\t\t\tvar mode = this.table.options.persistenceMode,\r\n\t\t\tid = this.table.options.persistenceID,\r\n\t\t\tretreivedData;\r\n\r\n\t\t\tthis.mode = mode !== true ? mode : (this.localStorageTest() ? \"local\" : \"cookie\");\r\n\r\n\t\t\tif(this.table.options.persistenceReaderFunc){\r\n\t\t\t\tif(typeof this.table.options.persistenceReaderFunc === \"function\"){\r\n\t\t\t\t\tthis.readFunc = this.table.options.persistenceReaderFunc;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(Persistence.readers[this.table.options.persistenceReaderFunc]){\r\n\t\t\t\t\t\tthis.readFunc = Persistence.readers[this.table.options.persistenceReaderFunc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Persistence Read Error - invalid reader set\", this.table.options.persistenceReaderFunc);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(Persistence.readers[this.mode]){\r\n\t\t\t\t\tthis.readFunc = Persistence.readers[this.mode];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Persistence Read Error - invalid reader set\", this.mode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.persistenceWriterFunc){\r\n\t\t\t\tif(typeof this.table.options.persistenceWriterFunc === \"function\"){\r\n\t\t\t\t\tthis.writeFunc = this.table.options.persistenceWriterFunc;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(Persistence.writers[this.table.options.persistenceWriterFunc]){\r\n\t\t\t\t\t\tthis.writeFunc = Persistence.writers[this.table.options.persistenceWriterFunc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Persistence Write Error - invalid reader set\", this.table.options.persistenceWriterFunc);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(Persistence.writers[this.mode]){\r\n\t\t\t\t\tthis.writeFunc = Persistence.writers[this.mode];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Persistence Write Error - invalid writer set\", this.mode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//set storage tag\r\n\t\t\tthis.id = \"tabulator-\" + (id || (this.table.element.getAttribute(\"id\") || \"\"));\r\n\r\n\t\t\tthis.config = {\r\n\t\t\t\tsort:this.table.options.persistence === true || this.table.options.persistence.sort,\r\n\t\t\t\tfilter:this.table.options.persistence === true || this.table.options.persistence.filter,\r\n\t\t\t\tgroup:this.table.options.persistence === true || this.table.options.persistence.group,\r\n\t\t\t\tpage:this.table.options.persistence === true || this.table.options.persistence.page,\r\n\t\t\t\tcolumns:this.table.options.persistence === true ? [\"title\", \"width\", \"visible\"] : this.table.options.persistence.columns,\r\n\t\t\t};\r\n\r\n\t\t\t//load pagination data if needed\r\n\t\t\tif(this.config.page){\r\n\t\t\t\tretreivedData = this.retreiveData(\"page\");\r\n\r\n\t\t\t\tif(retreivedData){\r\n\t\t\t\t\tif(typeof retreivedData.paginationSize !== \"undefined\" && (this.config.page === true || this.config.page.size)){\r\n\t\t\t\t\t\tthis.table.options.paginationSize = retreivedData.paginationSize;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(typeof retreivedData.paginationInitialPage !== \"undefined\" && (this.config.page === true || this.config.page.page)){\r\n\t\t\t\t\t\tthis.table.options.paginationInitialPage = retreivedData.paginationInitialPage;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//load group data if needed\r\n\t\t\tif(this.config.group){\r\n\t\t\t\tretreivedData = this.retreiveData(\"group\");\r\n\r\n\t\t\t\tif(retreivedData){\r\n\t\t\t\t\tif(typeof retreivedData.groupBy !== \"undefined\" && (this.config.group === true || this.config.group.groupBy)){\r\n\t\t\t\t\t\tthis.table.options.groupBy = retreivedData.groupBy;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retreivedData.groupStartOpen !== \"undefined\" && (this.config.group === true || this.config.group.groupStartOpen)){\r\n\t\t\t\t\t\tthis.table.options.groupStartOpen = retreivedData.groupStartOpen;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retreivedData.groupHeader !== \"undefined\" && (this.config.group === true || this.config.group.groupHeader)){\r\n\t\t\t\t\t\tthis.table.options.groupHeader = retreivedData.groupHeader;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.columns){\r\n\t\t\t\tthis.table.options.columns = this.load(\"columns\", this.table.options.columns);\r\n\t\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t\t\tthis.subscribe(\"column-show\", this.save.bind(this, \"columns\"));\r\n\t\t\t\tthis.subscribe(\"column-hide\", this.save.bind(this, \"columns\"));\r\n\t\t\t\tthis.subscribe(\"column-moved\", this.save.bind(this, \"columns\"));\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-built\", this.tableBuilt.bind(this), 0);\r\n\r\n\t\t\tthis.subscribe(\"table-redraw\", this.tableRedraw.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"filter-changed\", this.eventSave.bind(this, \"filter\"));\r\n\t\t\tthis.subscribe(\"sort-changed\", this.eventSave.bind(this, \"sort\"));\r\n\t\t\tthis.subscribe(\"group-changed\", this.eventSave.bind(this, \"group\"));\r\n\t\t\tthis.subscribe(\"page-changed\", this.eventSave.bind(this, \"page\"));\r\n\t\t\tthis.subscribe(\"column-resized\", this.eventSave.bind(this, \"columns\"));\r\n\t\t\tthis.subscribe(\"layout-refreshed\", this.eventSave.bind(this, \"columns\"));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"getColumnLayout\", this.getColumnLayout.bind(this));\r\n\t\tthis.registerTableFunction(\"setColumnLayout\", this.setColumnLayout.bind(this));\r\n\t}\r\n\r\n\teventSave(type){\r\n\t\tif(this.config[type]){\r\n\t\t\tthis.save(type);\r\n\t\t}\r\n\t}\r\n\r\n\ttableBuilt(){\r\n\t\tvar options = this.table.options,\r\n\t\tsorters, filters;\r\n\r\n\t\tif(this.config.sort){\r\n\t\t\tsorters = this.load(\"sort\");\r\n\r\n\t\t\tif(!sorters === false){\r\n\t\t\t\tthis.table.options.initialSort = sorters;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.config.filter){\r\n\t\t\tfilters = this.load(\"filter\");\r\n\r\n\t\t\tif(!filters === false){\r\n\t\t\t\tthis.table.options.initialFilter = filters;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tif(force && this.config.columns){\r\n\t\t\tthis.save(\"columns\");\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tgetColumnLayout(){\r\n\t\treturn this.parseColumns(this.table.columnManager.getColumns());\r\n\t}\r\n\r\n\tsetColumnLayout(layout){\r\n\t\tthis.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns, layout))\r\n\t\treturn true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumn(column){\r\n\t\tvar def, keys;\r\n\r\n\t\tif(this.config.columns){\r\n\t\t\tthis.defWatcherBlock = true;\r\n\r\n\t\t\tdef = column.getDefinition();\r\n\r\n\t\t\tkeys = this.config.columns === true ? Object.keys(def) : this.config.columns;\r\n\r\n\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\tvar props = Object.getOwnPropertyDescriptor(def, key);\r\n\t\t\t\tvar value = def[key];\r\n\t\t\t\tif(props){\r\n\t\t\t\t\tObject.defineProperty(def, key, {\r\n\t\t\t\t\t\tset: function(newValue){\r\n\t\t\t\t\t\t\tvalue = newValue;\r\n\r\n\t\t\t\t\t\t\tif(!this.defWatcherBlock){\r\n\t\t\t\t\t\t\t\tthis.save(\"columns\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif(props.set){\r\n\t\t\t\t\t\t\t\tprops.set(newValue);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tget:function(){\r\n\t\t\t\t\t\t\tif(props.get){\r\n\t\t\t\t\t\t\t\tprops.get();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.defWatcherBlock = false;\r\n\t\t}\r\n\t}\r\n\r\n\t//load saved definitions\r\n\tload(type, current){\r\n\t\tvar data = this.retreiveData(type);\r\n\r\n\t\tif(current){\r\n\t\t\tdata = data ? this.mergeDefinition(current, data) : current;\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//retreive data from memory\r\n\tretreiveData(type){\r\n\t\treturn this.readFunc ? this.readFunc(this.id, type) : false;\r\n\t}\r\n\r\n\t//merge old and new column definitions\r\n\tmergeDefinition(oldCols, newCols){\r\n\t\tvar output = [];\r\n\r\n\t\tnewCols = newCols || [];\r\n\r\n\t\tnewCols.forEach((column, to) => {\r\n\t\t\tvar from = this._findColumn(oldCols, column),\r\n\t\t\tkeys;\r\n\r\n\t\t\tif(from){\r\n\t\t\t\tif(this.config.columns === true || this.config.columns == undefined){\r\n\t\t\t\t\tkeys = Object.keys(from);\r\n\t\t\t\t\tkeys.push(\"width\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tkeys = this.config.columns;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\t\tif(key !== \"columns\" && typeof column[key] !== \"undefined\"){\r\n\t\t\t\t\t\tfrom[key] = column[key];\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(from.columns){\r\n\t\t\t\t\tfrom.columns = this.mergeDefinition(from.columns, column.columns);\r\n\t\t\t\t}\r\n\r\n\t\t\t\toutput.push(from);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\toldCols.forEach((column, i) => {\r\n\t\t\tvar from = this._findColumn(newCols, column);\r\n\r\n\t\t\tif (!from) {\r\n\t\t\t\tif(output.length>i){\r\n\t\t\t\t\toutput.splice(i, 0, column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput.push(column);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//find matching columns\r\n\t_findColumn(columns, subject){\r\n\t\tvar type = subject.columns ? \"group\" : (subject.field ? \"field\" : \"object\");\r\n\r\n\t\treturn columns.find(function(col){\r\n\t\t\tswitch(type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\treturn col.title === subject.title && col.columns.length === subject.columns.length;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"field\":\r\n\t\t\t\treturn col.field === subject.field;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\treturn col === subject;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//save data\r\n\tsave(type){\r\n\t\tvar data = {};\r\n\r\n\t\tswitch(type){\r\n\t\t\tcase \"columns\":\r\n\t\t\tdata = this.parseColumns(this.table.columnManager.getColumns())\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"filter\":\r\n\t\t\tdata = this.table.modules.filter.getFilters();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"sort\":\r\n\t\t\tdata = this.validateSorters(this.table.modules.sort.getSort());\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tdata = this.getGroupConfig();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"page\":\r\n\t\t\tdata = this.getPageConfig();\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(this.writeFunc){\r\n\t\t\tthis.writeFunc(this.id, type, data);\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t//ensure sorters contain no function data\r\n\tvalidateSorters(data){\r\n\t\tdata.forEach(function(item){\r\n\t\t\titem.column = item.field;\r\n\t\t\tdelete item.field;\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\tgetGroupConfig(){\r\n\t\tvar data = {};\r\n\r\n\t\tif(this.config.group){\r\n\t\t\tif(this.config.group === true || this.config.group.groupBy){\r\n\t\t\t\tdata.groupBy = this.table.options.groupBy;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.group === true || this.config.group.groupStartOpen){\r\n\t\t\t\tdata.groupStartOpen = this.table.options.groupStartOpen;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.group === true || this.config.group.groupHeader){\r\n\t\t\t\tdata.groupHeader = this.table.options.groupHeader;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\tgetPageConfig(){\r\n\t\tvar data = {};\r\n\r\n\t\tif(this.config.page){\r\n\t\t\tif(this.config.page === true || this.config.page.size){\r\n\t\t\t\tdata.paginationSize = this.table.modules.page.getPageSize();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.page === true || this.config.page.page){\r\n\t\t\t\tdata.paginationInitialPage = this.table.modules.page.getPage();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\r\n\t//parse columns for data to store\r\n\tparseColumns(columns){\r\n\t\tvar definitions = [],\r\n\t\texcludedKeys = [\"headerContextMenu\", \"headerMenu\", \"contextMenu\", \"clickMenu\"];\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\tvar defStore = {},\r\n\t\t\tcolDef = column.getDefinition(),\r\n\t\t\tkeys;\r\n\r\n\t\t\tif(column.isGroup){\r\n\t\t\t\tdefStore.title = colDef.title;\r\n\t\t\t\tdefStore.columns = this.parseColumns(column.getColumns());\r\n\t\t\t}else{\r\n\t\t\t\tdefStore.field = column.getField();\r\n\r\n\t\t\t\tif(this.config.columns === true || this.config.columns == undefined){\r\n\t\t\t\t\tkeys = Object.keys(colDef);\r\n\t\t\t\t\tkeys.push(\"width\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tkeys = this.config.columns;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\t\tswitch(key){\r\n\t\t\t\t\t\tcase \"width\":\r\n\t\t\t\t\t\tdefStore.width = column.getWidth();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"visible\":\r\n\t\t\t\t\t\tdefStore.visible = column.visible;\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(typeof colDef[key] !== \"function\" && excludedKeys.indexOf(key) === -1){\r\n\t\t\t\t\t\t\tdefStore[key] = colDef[key];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tdefinitions.push(defStore);\r\n\t\t});\r\n\r\n\t\treturn definitions;\r\n\t}\r\n}\r\n\r\nPersistence.moduleName = \"persistence\";\r\n\r\nPersistence.moduleInitOrder = 1;\r\n\r\n//load defaults\r\nPersistence.readers = defaultReaders;\r\nPersistence.writers = defaultWriters;\r\n\r\nexport default Persistence;","import Module from '../../core/Module.js';\r\n\r\nclass Print extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.manualBlock = false;\r\n\r\n\t\tthis.registerTableOption(\"printAsHtml\", false); //enable print as html\r\n\t\tthis.registerTableOption(\"printFormatter\", false); //printing page formatter\r\n\t\tthis.registerTableOption(\"printHeader\", false); //page header contents\r\n\t\tthis.registerTableOption(\"printFooter\", false); //page footer contents\r\n\t\tthis.registerTableOption(\"printStyled\", true); //enable print as html styling\r\n\t\tthis.registerTableOption(\"printRowRange\", \"visible\"); //restrict print to visible rows only\r\n\t\tthis.registerTableOption(\"printConfig\", {}); //print config options\r\n\r\n\t\tthis.registerColumnOption(\"print\");\r\n\t\tthis.registerColumnOption(\"titlePrint\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.printAsHtml){\r\n\t\t\twindow.addEventListener(\"beforeprint\", this.replaceTable.bind(this));\r\n\t\t\twindow.addEventListener(\"afterprint\", this.cleanup.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"print\", this.printFullscreen.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\treplaceTable(){\r\n\t\tif(!this.manualBlock){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"tabulator-print-table\");\r\n\r\n\t\t\tthis.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig, this.table.options.printStyled, this.table.options.printRowRange, \"print\"));\r\n\r\n\t\t\tthis.table.element.style.display = \"none\";\r\n\r\n\t\t\tthis.table.element.parentNode.insertBefore(this.element, this.table.element);\r\n\t\t}\r\n\t}\r\n\r\n\tcleanup(){\r\n\t\tdocument.body.classList.remove(\"tabulator-print-fullscreen-hide\");\r\n\r\n\t\tif(this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\tthis.table.element.style.display = \"\";\r\n\t\t}\r\n\t}\r\n\r\n\tprintFullscreen(visible, style, config){\r\n\t\tvar scrollX = window.scrollX,\r\n\t\tscrollY = window.scrollY,\r\n\t\theaderEl = document.createElement(\"div\"),\r\n\t\tfooterEl = document.createElement(\"div\"),\r\n\t\ttableEl = this.table.modules.export.genereateTable(typeof config != \"undefined\" ? config : this.table.options.printConfig, typeof style != \"undefined\" ? style : this.table.options.printStyled, visible || this.table.options.printRowRange, \"print\"),\r\n\t\theaderContent, footerContent;\r\n\r\n\t\tthis.manualBlock = true;\r\n\r\n\t\tthis.element = document.createElement(\"div\");\r\n\t\tthis.element.classList.add(\"tabulator-print-fullscreen\");\r\n\r\n\t\tif(this.table.options.printHeader){\r\n\t\t\theaderEl.classList.add(\"tabulator-print-header\");\r\n\r\n\t\t\theaderContent = typeof this.table.options.printHeader == \"function\" ? this.table.options.printHeader.call(this.table) : this.table.options.printHeader;\r\n\r\n\t\t\tif(typeof headerContent == \"string\"){\r\n\t\t\t\theaderEl.innerHTML = headerContent;\r\n\t\t\t}else{\r\n\t\t\t\theaderEl.appendChild(headerContent);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.appendChild(headerEl);\r\n\t\t}\r\n\r\n\t\tthis.element.appendChild(tableEl);\r\n\r\n\t\tif(this.table.options.printFooter){\r\n\t\t\tfooterEl.classList.add(\"tabulator-print-footer\");\r\n\r\n\t\t\tfooterContent = typeof this.table.options.printFooter == \"function\" ? this.table.options.printFooter.call(this.table) : this.table.options.printFooter;\r\n\r\n\r\n\t\t\tif(typeof footerContent == \"string\"){\r\n\t\t\t\tfooterEl.innerHTML = footerContent;\r\n\t\t\t}else{\r\n\t\t\t\tfooterEl.appendChild(footerContent);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.appendChild(footerEl);\r\n\t\t}\r\n\r\n\t\tdocument.body.classList.add(\"tabulator-print-fullscreen-hide\");\r\n\t\tdocument.body.appendChild(this.element);\r\n\r\n\t\tif(this.table.options.printFormatter){\r\n\t\t\tthis.table.options.printFormatter(this.element, tableEl);\r\n\t\t}\r\n\r\n\t\twindow.print();\r\n\r\n\t\tthis.cleanup();\r\n\r\n\t\twindow.scrollTo(scrollX, scrollY);\r\n\r\n\t\tthis.manualBlock = false;\r\n\t}\r\n}\r\n\r\nPrint.moduleName = \"print\";\r\n\r\nexport default Print;","import Module from '../../core/Module.js';\r\n\r\nclass ReactiveData extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.data = false;\r\n\t\tthis.blocked = false; //block reactivity while performing update\r\n\t\tthis.origFuncs = {}; // hold original data array functions to allow replacement after data is done with\r\n\t\tthis.currentVersion = 0;\r\n\r\n\t\tthis.registerTableOption(\"reactiveData\", false); //enable data reactivity\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.reactiveData){\r\n\t\t\tthis.subscribe(\"cell-value-save-before\", this.block.bind(this));\r\n\t\t\tthis.subscribe(\"cell-value-save-after\", this.unblock.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-save-before\", this.block.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-save-after\", this.unblock.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-init-after\", this.watchRow.bind(this));\r\n\t\t\tthis.subscribe(\"data-processing\", this.watchData.bind(this));\r\n\t\t\tthis.subscribe(\"table-destroy\", this.unwatchData.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\twatchData(data){\r\n\t\tvar self = this,\r\n\t\tpushFunc, version;\r\n\r\n\t\tthis.currentVersion ++;\r\n\r\n\t\tversion = this.currentVersion;\r\n\r\n\t\tthis.unwatchData();\r\n\r\n\t\tthis.data = data;\r\n\r\n\t\t//override array push function\r\n\t\tthis.origFuncs.push = data.push;\r\n\r\n\t\tObject.defineProperty(this.data, \"push\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments);\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\targs.forEach((arg) => {\r\n\t\t\t\t\t\tself.table.rowManager.addRowActual(arg, false);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.push.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//override array unshift function\r\n\t\tthis.origFuncs.unshift = data.unshift;\r\n\r\n\t\tObject.defineProperty(this.data, \"unshift\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments);\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\targs.forEach((arg) => {\r\n\t\t\t\t\t\tself.table.rowManager.addRowActual(arg, true);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.unshift.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\t//override array shift function\r\n\t\tthis.origFuncs.shift = data.shift;\r\n\r\n\t\tObject.defineProperty(this.data, \"shift\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar row;\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tif(self.data.length){\r\n\t\t\t\t\t\trow = self.table.rowManager.getRowFromDataObject(self.data[0]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.deleteActual();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.shift.call(data);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//override array pop function\r\n\t\tthis.origFuncs.pop = data.pop;\r\n\r\n\t\tObject.defineProperty(this.data, \"pop\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar row;\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tif(self.data.length){\r\n\t\t\t\t\t\trow = self.table.rowManager.getRowFromDataObject(self.data[self.data.length - 1]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.deleteActual();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn self.origFuncs.pop.call(data);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\t//override array splice function\r\n\t\tthis.origFuncs.splice = data.splice;\r\n\r\n\t\tObject.defineProperty(this.data, \"splice\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments),\r\n\t\t\t\tstart = args[0] < 0 ? data.length + args[0] : args[0],\r\n\t\t\t\tend = args[1],\r\n\t\t\t\tnewRows = args[2] ? args.slice(2) : false,\r\n\t\t\t\tstartRow;\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\r\n\t\t\t\t\t//add new rows\r\n\t\t\t\t\tif(newRows){\r\n\t\t\t\t\t\tstartRow = data[start] ? self.table.rowManager.getRowFromDataObject(data[start]) : false;\r\n\r\n\t\t\t\t\t\tif(startRow){\r\n\t\t\t\t\t\t\tnewRows.forEach((rowData) => {\r\n\t\t\t\t\t\t\t\tself.table.rowManager.addRowActual(rowData, true, startRow, true);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnewRows = newRows.slice().reverse();\r\n\r\n\t\t\t\t\t\t\tnewRows.forEach((rowData) => {\r\n\t\t\t\t\t\t\t\tself.table.rowManager.addRowActual(rowData, true, false, true);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//delete removed rows\r\n\t\t\t\t\tif(end !== 0){\r\n\t\t\t\t\t\tvar oldRows = data.slice(start, typeof args[1] === \"undefined\" ? args[1] : start + end);\r\n\r\n\t\t\t\t\t\toldRows.forEach((rowData, i) => {\r\n\t\t\t\t\t\t\tvar row = self.table.rowManager.getRowFromDataObject(rowData);\r\n\r\n\t\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\t\trow.deleteActual(i !== oldRows.length - 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(newRows || end !== 0){\r\n\t\t\t\t\t\tself.table.rowManager.reRenderInPosition();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.splice.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tunwatchData(){\r\n\t\tif(this.data !== false){\r\n\t\t\tfor(var key in this.origFuncs){\r\n\t\t\t\tObject.defineProperty(this.data, key, {\r\n\t\t\t\t\tenumerable: true,\r\n\t\t\t\t\tconfigurable:true,\r\n\t\t\t\t\twritable:true,\r\n\t\t\t\t\tvalue: this.origFuncs.key,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\twatchRow(row){\r\n\t\tvar data = row.getData();\r\n\r\n\t\tthis.blocked = true;\r\n\r\n\t\tfor(var key in data){\r\n\t\t\tthis.watchKey(row, data, key);\r\n\t\t}\r\n\r\n\t\tif(this.table.options.dataTree){\r\n\t\t\tthis.watchTreeChildren(row);\r\n\t\t}\r\n\r\n\t\tthis.blocked = false;\r\n\t}\r\n\r\n\twatchTreeChildren (row){\r\n\t\tvar childField = row.getData()[this.table.options.dataTreeChildField],\r\n\t\torigFuncs = {};\r\n\r\n\t\tfunction rebuildTree(){\r\n\t\t\tthis.table.modules.dataTree.initializeRow(row);\r\n\t\t\tthis.table.modules.dataTree.layoutRow(row);\r\n\t\t\tthis.table.rowManager.refreshActiveData(\"tree\", false, true);\r\n\t\t}\r\n\r\n\t\tif(childField){\r\n\r\n\t\t\torigFuncs.push = childField.push;\r\n\r\n\t\t\tObject.defineProperty(childField, \"push\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.push.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.unshift = childField.unshift;\r\n\r\n\t\t\tObject.defineProperty(childField, \"unshift\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.unshift.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.shift = childField.shift;\r\n\r\n\t\t\tObject.defineProperty(childField, \"shift\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.shift.call(childField);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.pop = childField.pop;\r\n\r\n\t\t\tObject.defineProperty(childField, \"pop\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.pop.call(childField);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.splice = childField.splice;\r\n\r\n\t\t\tObject.defineProperty(childField, \"splice\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.splice.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\twatchKey(row, data, key){\r\n\t\tvar props = Object.getOwnPropertyDescriptor(data, key),\r\n\t\tvalue = data[key],\r\n\t\tversion = this.currentVersion;\r\n\r\n\t\tObject.defineProperty(data, key, {\r\n\t\t\tset: (newValue) => {\r\n\t\t\t\tvalue = newValue;\r\n\t\t\t\tif(!this.blocked && version === this.currentVersion){\r\n\t\t\t\t\tvar update = {};\r\n\t\t\t\t\tupdate[key] = newValue;\r\n\t\t\t\t\trow.updateData(update);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(props.set){\r\n\t\t\t\t\tprops.set(newValue);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tget:() => {\r\n\r\n\t\t\t\tif(props.get){\r\n\t\t\t\t\tprops.get();\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tunwatchRow(row){\r\n\t\tvar data = row.getData();\r\n\r\n\t\tfor(var key in data){\r\n\t\t\tObject.defineProperty(data, key, {\r\n\t\t\t\tvalue:data[key],\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tblock(){\r\n\t\tthis.blocked = true;\r\n\t}\r\n\r\n\tunblock(){\r\n\t\tthis.blocked = false;\r\n\t}\r\n}\r\n\r\nReactiveData.moduleName = \"reactiveData\";\r\n\r\nexport default ReactiveData;\r\n\r\n\r\n\r\n","import Module from '../../core/Module.js';\r\n\r\nclass ResizeColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.startColumn = false;\r\n\t\tthis.startX = false;\r\n\t\tthis.startWidth = false;\r\n\t\tthis.handle = null;\r\n\t\tthis.prevHandle = null;\r\n\t\t\r\n\t\tthis.registerColumnOption(\"resizable\", true);\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\t// if(this.table.options.resizableColumns){\r\n\t\tthis.subscribe(\"cell-layout\", this.layoutCellHandles.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.layoutColumnHeader.bind(this));\r\n\t\t// }\r\n\t}\r\n\t\r\n\tlayoutCellHandles(cell){\r\n\t\tif(cell.row.type === \"row\"){\r\n\t\t\tthis.initializeColumn(\"cell\", cell.column, cell.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutColumnHeader(column){\r\n\t\tthis.initializeColumn(\"header\", column, column.element);\r\n\t}\r\n\t\r\n\tinitializeColumn(type, column, element){\r\n\t\tvar self = this,\r\n\t\tvariableHeight = false,\r\n\t\tmode = column.definition.resizable;\r\n\t\t\r\n\t\t//set column resize mode\r\n\t\tif(type === \"header\"){\r\n\t\t\tvariableHeight = column.definition.formatter == \"textarea\" || column.definition.variableHeight;\r\n\t\t\tcolumn.modules.resize = {variableHeight:variableHeight};\r\n\t\t}\r\n\t\t\r\n\t\tif(mode === true || mode == type){\r\n\t\t\t\r\n\t\t\tvar handle = document.createElement('div');\r\n\t\t\thandle.className = \"tabulator-col-resize-handle\";\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tvar prevHandle = document.createElement('div');\r\n\t\t\tprevHandle.className = \"tabulator-col-resize-handle prev\";\r\n\t\t\t\r\n\t\t\thandle.addEventListener(\"click\", function(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tvar handleDown = function(e){\r\n\t\t\t\tvar nearestColumn = column.getLastColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn && self._checkResizability(nearestColumn)){\r\n\t\t\t\t\tself.startColumn = column;\r\n\t\t\t\t\tself._mouseDown(e, nearestColumn, handle);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\thandle.addEventListener(\"mousedown\", handleDown);\r\n\t\t\thandle.addEventListener(\"touchstart\", handleDown, {passive: true});\r\n\t\t\t\r\n\t\t\t//reszie column on double click\r\n\t\t\thandle.addEventListener(\"dblclick\", function(e){\r\n\t\t\t\tvar col = column.getLastColumn(),\r\n\t\t\t\toldWidth;\r\n\t\t\t\t\r\n\t\t\t\tif(col && self._checkResizability(col)){\r\n\t\t\t\t\toldWidth = col.getWidth();\r\n\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tcol.reinitializeWidth(true);\r\n\r\n\t\t\t\t\tif(oldWidth !== col.getWidth()){\r\n\t\t\t\t\t\tself.dispatch(\"column-resized\", col);\r\n\t\t\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", col.getComponent());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tprevHandle.addEventListener(\"click\", function(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tvar prevHandleDown = function(e){\r\n\t\t\t\tvar nearestColumn, colIndex, prevColumn;\r\n\t\t\t\t\r\n\t\t\t\tnearestColumn = column.getFirstColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn){\r\n\t\t\t\t\tcolIndex = self.table.columnManager.findColumnIndex(nearestColumn);\r\n\t\t\t\t\tprevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(prevColumn && self._checkResizability(prevColumn)){\r\n\t\t\t\t\t\tself.startColumn = column;\r\n\t\t\t\t\t\tself._mouseDown(e, prevColumn, prevHandle);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tprevHandle.addEventListener(\"mousedown\", prevHandleDown);\r\n\t\t\tprevHandle.addEventListener(\"touchstart\", prevHandleDown, {passive: true});\r\n\t\t\t\r\n\t\t\t//resize column on double click\r\n\t\t\tprevHandle.addEventListener(\"dblclick\", function(e){\r\n\t\t\t\tvar nearestColumn, colIndex, prevColumn;\r\n\t\t\t\t\r\n\t\t\t\tnearestColumn = column.getFirstColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn){\r\n\t\t\t\t\tcolIndex = self.table.columnManager.findColumnIndex(nearestColumn);\r\n\t\t\t\t\tprevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(prevColumn && self._checkResizability(prevColumn)){\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tprevColumn.reinitializeWidth(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\telement.appendChild(handle);\r\n\t\t\telement.appendChild(prevHandle);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_checkResizability(column){\r\n\t\treturn column.definition.resizable;\r\n\t}\r\n\t\r\n\t_mouseDown(e, column, handle){\r\n\t\tvar self = this;\r\n\t\t\r\n\t\tself.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tfunction mouseMove(e){\r\n\t\t\t// self.table.columnManager.tempScrollBlock();\r\n\t\t\t\r\n\t\t\tif(self.table.rtl){\r\n\t\t\t\tcolumn.setWidth(self.startWidth - ((typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX) - self.startX));\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.setWidth(self.startWidth + ((typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX) - self.startX));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself.table.columnManager.renderer.rerenderColumns(true);\r\n\t\t\t\r\n\t\t\tif(!self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight){\r\n\t\t\t\tcolumn.checkCellHeights();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfunction mouseUp(e){\r\n\t\t\t\r\n\t\t\t//block editor from taking action while resizing is taking place\r\n\t\t\tif(self.startColumn.modules.edit){\r\n\t\t\t\tself.startColumn.modules.edit.blocked = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight){\r\n\t\t\t\tcolumn.checkCellHeights();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", mouseUp);\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", mouseMove);\r\n\t\t\t\r\n\t\t\thandle.removeEventListener(\"touchmove\", mouseMove);\r\n\t\t\thandle.removeEventListener(\"touchend\", mouseUp);\r\n\t\t\t\r\n\t\t\tself.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tif(self.startWidth !== column.getWidth()){\r\n\t\t\t\tself.dispatch(\"column-resized\", column);\r\n\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", column.getComponent());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\te.stopPropagation(); //prevent resize from interfereing with movable columns\r\n\t\t\r\n\t\t//block editor from taking action while resizing is taking place\r\n\t\tif(self.startColumn.modules.edit){\r\n\t\t\tself.startColumn.modules.edit.blocked = true;\r\n\t\t}\r\n\t\t\r\n\t\tself.startX = typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX;\r\n\t\tself.startWidth = column.getWidth();\r\n\t\t\r\n\t\tdocument.body.addEventListener(\"mousemove\", mouseMove);\r\n\t\tdocument.body.addEventListener(\"mouseup\", mouseUp);\r\n\t\thandle.addEventListener(\"touchmove\", mouseMove, {passive: true});\r\n\t\thandle.addEventListener(\"touchend\", mouseUp);\r\n\t}\r\n}\r\n\r\nResizeColumns.moduleName = \"resizeColumns\";\r\n\r\nexport default ResizeColumns;","import Module from '../../core/Module.js';\r\n\r\nclass ResizeRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.startColumn = false;\r\n\t\tthis.startY = false;\r\n\t\tthis.startHeight = false;\r\n\t\tthis.handle = null;\r\n\t\tthis.prevHandle = null;\r\n\r\n\t\tthis.registerTableOption(\"resizableRows\", false); //resizable rows\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.resizableRows){\r\n\t\t\tthis.subscribe(\"row-layout-after\", this.initializeRow.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\trowEl = row.getElement();\r\n\r\n\t\tvar handle = document.createElement('div');\r\n\t\thandle.className = \"tabulator-row-resize-handle\";\r\n\r\n\t\tvar prevHandle = document.createElement('div');\r\n\t\tprevHandle.className = \"tabulator-row-resize-handle prev\";\r\n\r\n\t\thandle.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tvar handleDown = function(e){\r\n\t\t\tself.startRow = row;\r\n\t\t\tself._mouseDown(e, row, handle);\r\n\t\t};\r\n\r\n\t\thandle.addEventListener(\"mousedown\", handleDown);\r\n\t\thandle.addEventListener(\"touchstart\", handleDown, {passive: true});\r\n\r\n\t\tprevHandle.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tvar prevHandleDown = function(e){\r\n\t\t\tvar prevRow = self.table.rowManager.prevDisplayRow(row);\r\n\r\n\t\t\tif(prevRow){\r\n\t\t\t\tself.startRow = prevRow;\r\n\t\t\t\tself._mouseDown(e, prevRow, prevHandle);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tprevHandle.addEventListener(\"mousedown\",prevHandleDown);\r\n\t\tprevHandle.addEventListener(\"touchstart\",prevHandleDown, {passive: true});\r\n\r\n\t\trowEl.appendChild(handle);\r\n\t\trowEl.appendChild(prevHandle);\r\n\t}\r\n\r\n\t_mouseDown(e, row, handle){\r\n\t\tvar self = this;\r\n\r\n\t\tself.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tfunction mouseMove(e){\r\n\t\t\trow.setHeight(self.startHeight + ((typeof e.screenY === \"undefined\" ? e.touches[0].screenY : e.screenY) - self.startY));\r\n\t\t}\r\n\r\n\t\tfunction mouseUp(e){\r\n\r\n\t\t\t// //block editor from taking action while resizing is taking place\r\n\t\t\t// if(self.startColumn.modules.edit){\r\n\t\t\t// \tself.startColumn.modules.edit.blocked = false;\r\n\t\t\t// }\r\n\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", mouseMove);\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", mouseMove);\r\n\r\n\t\t\thandle.removeEventListener(\"touchmove\", mouseMove);\r\n\t\t\thandle.removeEventListener(\"touchend\", mouseUp);\r\n\r\n\t\t\tself.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tself.dispatchExternal(\"rowResized\", row.getComponent());\r\n\t\t}\r\n\r\n\t\te.stopPropagation(); //prevent resize from interfereing with movable columns\r\n\r\n\t\t//block editor from taking action while resizing is taking place\r\n\t\t// if(self.startColumn.modules.edit){\r\n\t\t// \tself.startColumn.modules.edit.blocked = true;\r\n\t\t// }\r\n\r\n\t\tself.startY = typeof e.screenY === \"undefined\" ? e.touches[0].screenY : e.screenY;\r\n\t\tself.startHeight = row.getHeight();\r\n\r\n\t\tdocument.body.addEventListener(\"mousemove\", mouseMove);\r\n\t\tdocument.body.addEventListener(\"mouseup\", mouseUp);\r\n\r\n\t\thandle.addEventListener(\"touchmove\", mouseMove, {passive: true});\r\n\t\thandle.addEventListener(\"touchend\", mouseUp);\r\n\t}\r\n}\r\n\r\nResizeRows.moduleName = \"resizeRows\";\r\n\r\nexport default ResizeRows;","import Module from '../../core/Module.js';\r\n\r\nclass ResizeTable extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.binding = false;\r\n\t\tthis.observer = false;\r\n\t\tthis.containerObserver = false;\r\n\r\n\t\tthis.tableHeight = 0;\r\n\t\tthis.tableWidth = 0;\r\n\t\tthis.containerHeight = 0;\r\n\t\tthis.containerWidth = 0;\r\n\r\n\t\tthis.autoResize = false;\r\n\r\n\t\tthis.registerTableOption(\"autoResize\", true); //auto resize table\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.autoResize){\r\n\t\t\tvar table = this.table,\r\n\t\t\ttableStyle;\r\n\r\n\t\t\tthis.tableHeight = table.element.clientHeight;\r\n\t\t\tthis.tableWidth = table.element.clientWidth;\r\n\r\n\t\t\tif(table.element.parentNode){\r\n\t\t\t\tthis.containerHeight = table.element.parentNode.clientHeight;\r\n\t\t\t\tthis.containerWidth = table.element.parentNode.clientWidth;\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof ResizeObserver !== \"undefined\" && table.rowManager.getRenderMode() === \"virtual\"){\r\n\r\n\t\t\t\tthis.autoResize = true;\r\n\r\n\t\t\t\tthis.observer = new ResizeObserver((entry) => {\r\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\tvar nodeHeight = Math.floor(entry[0].contentRect.height);\r\n\t\t\t\t\t\tvar nodeWidth = Math.floor(entry[0].contentRect.width);\r\n\r\n\t\t\t\t\t\tif(this.tableHeight != nodeHeight || this.tableWidth != nodeWidth){\r\n\t\t\t\t\t\t\tthis.tableHeight = nodeHeight;\r\n\t\t\t\t\t\t\tthis.tableWidth = nodeWidth;\r\n\r\n\t\t\t\t\t\t\tif(table.element.parentNode){\r\n\t\t\t\t\t\t\t\tthis.containerHeight = table.element.parentNode.clientHeight;\r\n\t\t\t\t\t\t\t\tthis.containerWidth = table.element.parentNode.clientWidth;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tthis.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.observer.observe(table.element);\r\n\r\n\t\t\t\ttableStyle = window.getComputedStyle(table.element);\r\n\r\n\t\t\t\tif(this.table.element.parentNode && !this.table.rowManager.fixedHeight && (tableStyle.getPropertyValue(\"max-height\") || tableStyle.getPropertyValue(\"min-height\"))){\r\n\r\n\t\t\t\t\tthis.containerObserver = new ResizeObserver((entry) => {\r\n\t\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\t\tvar nodeHeight = Math.floor(entry[0].contentRect.height);\r\n\t\t\t\t\t\t\tvar nodeWidth = Math.floor(entry[0].contentRect.width);\r\n\r\n\t\t\t\t\t\t\tif(this.containerHeight != nodeHeight || this.containerWidth != nodeWidth){\r\n\t\t\t\t\t\t\t\tthis.containerHeight = nodeHeight;\r\n\t\t\t\t\t\t\t\tthis.containerWidth = nodeWidth;\r\n\t\t\t\t\t\t\t\tthis.tableHeight = table.element.clientHeight;\r\n\t\t\t\t\t\t\t\tthis.tableWidth = table.element.clientWidth;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\ttable.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tthis.containerObserver.observe(this.table.element.parentNode);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.subscribe(\"table-resize\", this.tableResized.bind(this));\r\n\r\n\t\t\t}else{\r\n\t\t\t\tthis.binding = function(){\r\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile && !table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\ttable.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\twindow.addEventListener(\"resize\", this.binding);\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\ttableResized(){\r\n\t\tthis.table.rowManager.redraw();\r\n\t}\r\n\r\n\tclearBindings(){\r\n\t\tif(this.binding){\r\n\t\t\twindow.removeEventListener(\"resize\", this.binding);\r\n\t\t}\r\n\r\n\t\tif(this.observer){\r\n\t\t\tthis.observer.unobserve(this.table.element);\r\n\t\t}\r\n\r\n\t\tif(this.containerObserver){\r\n\t\t\tthis.containerObserver.unobserve(this.table.element.parentNode);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nResizeTable.moduleName = \"resizeTable\";\r\n\r\nexport default ResizeTable;","import Module from '../../core/Module.js';\r\n\r\nclass ResponsiveLayout extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.columns = [];\r\n\t\tthis.hiddenColumns = [];\r\n\t\tthis.mode = \"\";\r\n\t\tthis.index = 0;\r\n\t\tthis.collapseFormatter = [];\r\n\t\tthis.collapseStartOpen = true;\r\n\t\tthis.collapseHandleColumn = false;\r\n\r\n\t\tthis.registerTableOption(\"responsiveLayout\", false); //responsive layout flags\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseStartOpen\", true); //start showing collapsed data\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseUseFormatters\", true); //responsive layout collapse formatter\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseFormatter\", false); //responsive layout collapse formatter\r\n\r\n\t\tthis.registerColumnOption(\"responsive\");\r\n\t}\r\n\r\n\t//generate responsive columns list\r\n\tinitialize(){\r\n\t\tvar self = this,\r\n\t\tcolumns = [];\r\n\r\n\t\tif(this.table.options.responsiveLayout){\r\n\t\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\t\tthis.subscribe(\"column-show\", this.updateColumnVisibility.bind(this));\r\n\t\t\tthis.subscribe(\"column-hide\", this.updateColumnVisibility.bind(this));\r\n\t\t\tthis.subscribe(\"columns-loaded\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-moved\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-add\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-delete\", this.initializeResponsivity.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"table-redrawing\", this.tableRedraw.bind(this));\r\n\r\n\t\t\tif(this.table.options.responsiveLayout === \"collapse\"){\r\n\t\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\t\tthis.subscribe(\"row-layout\", this.layoutRow.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tif([\"fitColumns\", \"fitDataStretch\"].indexOf(this.layoutMode()) === -1){\r\n\t\t\tif(!force){\r\n\t\t\t\tthis.update();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeResponsivity(){\r\n\t\tvar columns = [];\r\n\r\n\t\tthis.mode = this.table.options.responsiveLayout;\r\n\t\tthis.collapseFormatter = this.table.options.responsiveLayoutCollapseFormatter || this.formatCollapsedData;\r\n\t\tthis.collapseStartOpen = this.table.options.responsiveLayoutCollapseStartOpen;\r\n\t\tthis.hiddenColumns = [];\r\n\r\n\t\t//determine level of responsivity for each column\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column, i) => {\r\n\t\t\tif(column.modules.responsive){\r\n\t\t\t\tif(column.modules.responsive.order && column.modules.responsive.visible){\r\n\t\t\t\t\tcolumn.modules.responsive.index = i;\r\n\t\t\t\t\tcolumns.push(column);\r\n\r\n\t\t\t\t\tif(!column.visible && this.mode === \"collapse\"){\r\n\t\t\t\t\t\tthis.hiddenColumns.push(column);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//sort list by responsivity\r\n\t\tcolumns = columns.reverse();\r\n\t\tcolumns = columns.sort((a, b) => {\r\n\t\t\tvar diff = b.modules.responsive.order - a.modules.responsive.order;\r\n\t\t\treturn diff || (b.modules.responsive.index - a.modules.responsive.index);\r\n\t\t});\r\n\r\n\t\tthis.columns = columns;\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tthis.generateCollapsedContent();\r\n\t\t}\r\n\r\n\t\t//assign collapse column\r\n\t\tfor (let col of this.table.columnManager.columnsByIndex){\r\n\t\t\tif(col.definition.formatter == \"responsiveCollapse\"){\r\n\t\t\t\tthis.collapseHandleColumn = col;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.collapseHandleColumn){\r\n\t\t\tif(this.hiddenColumns.length){\r\n\t\t\t\tthis.collapseHandleColumn.show();\r\n\t\t\t}else{\r\n\t\t\t\tthis.collapseHandleColumn.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//define layout information\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.getDefinition();\r\n\r\n\t\tcolumn.modules.responsive = {order: typeof def.responsive === \"undefined\" ? 1 : def.responsive, visible:def.visible === false ? false : true};\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar el;\r\n\r\n\t\tif(row.type !== \"calc\"){\r\n\t\t\tel = document.createElement(\"div\");\r\n\t\t\tel.classList.add(\"tabulator-responsive-collapse\");\r\n\r\n\t\t\trow.modules.responsiveLayout = {\r\n\t\t\t\telement:el,\r\n\t\t\t\topen:this.collapseStartOpen,\r\n\t\t\t};\r\n\r\n\t\t\tif(!this.collapseStartOpen){\r\n\t\t\t\tel.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tlayoutRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tif(row.modules.responsiveLayout){\r\n\t\t\trowEl.appendChild(row.modules.responsiveLayout.element);\r\n\t\t\tthis.generateCollapsedRowContent(row);\r\n\t\t}\r\n\t}\r\n\r\n\t//update column visibility\r\n\tupdateColumnVisibility(column, responsiveToggle){\r\n\t\tif(!responsiveToggle && column.modules.responsive){\r\n\t\t\tcolumn.modules.responsive.visible = column.visible;\r\n\t\t\tthis.initializeResponsivity();\r\n\t\t}\r\n\t}\r\n\r\n\thideColumn(column){\r\n\t\tvar colCount = this.hiddenColumns.length;\r\n\r\n\t\tcolumn.hide(false, true);\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tthis.hiddenColumns.unshift(column);\r\n\t\t\tthis.generateCollapsedContent();\r\n\r\n\t\t\tif(this.collapseHandleColumn && !colCount){\r\n\t\t\t\tthis.collapseHandleColumn.show();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tshowColumn(column){\r\n\t\tvar index;\r\n\r\n\t\tcolumn.show(false, true);\r\n\t\t//set column width to prevent calculation loops on uninitialized columns\r\n\t\tcolumn.setWidth(column.getWidth());\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tindex = this.hiddenColumns.indexOf(column);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.hiddenColumns.splice(index, 1);\r\n\t\t\t}\r\n\r\n\t\t\tthis.generateCollapsedContent();\r\n\r\n\t\t\tif(this.collapseHandleColumn && !this.hiddenColumns.length){\r\n\t\t\t\tthis.collapseHandleColumn.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//redraw columns to fit space\r\n\tupdate(){\r\n\t\tvar self = this,\r\n\t\tworking = true;\r\n\r\n\t\twhile(working){\r\n\r\n\t\t\tlet width = self.table.modules.layout.getMode() == \"fitColumns\" ? self.table.columnManager.getFlexBaseWidth() : self.table.columnManager.getWidth();\r\n\r\n\t\t\tlet diff = (self.table.options.headerVisible ? self.table.columnManager.element.clientWidth : self.table.element.clientWidth) - width;\r\n\r\n\t\t\tif(diff < 0){\r\n\t\t\t\t//table is too wide\r\n\t\t\t\tlet column = self.columns[self.index];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tself.hideColumn(column);\r\n\t\t\t\t\tself.index ++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tworking = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\r\n\t\t\t\t//table has spare space\r\n\t\t\t\tlet column = self.columns[self.index -1];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tif(diff > 0){\r\n\t\t\t\t\t\tif(diff >= column.getWidth()){\r\n\t\t\t\t\t\t\tself.showColumn(column);\r\n\t\t\t\t\t\t\tself.index --;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tworking = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tworking = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(!self.table.rowManager.activeRowsCount){\r\n\t\t\t\tself.table.rowManager.renderEmptyScroll();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateCollapsedContent(){\r\n\t\tvar self = this,\r\n\t\trows = this.table.rowManager.getDisplayRows();\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\tself.generateCollapsedRowContent(row);\r\n\t\t});\r\n\t}\r\n\r\n\tgenerateCollapsedRowContent(row){\r\n\t\tvar el, contents;\r\n\r\n\t\tif(row.modules.responsiveLayout){\r\n\t\t\tel = row.modules.responsiveLayout.element;\r\n\r\n\t\t\twhile(el.firstChild) el.removeChild(el.firstChild);\r\n\r\n\t\t\tcontents = this.collapseFormatter(this.generateCollapsedRowData(row));\r\n\t\t\tif(contents){\r\n\t\t\t\tel.appendChild(contents);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateCollapsedRowData(row){\r\n\t\tvar self = this,\r\n\t\tdata = row.getData(),\r\n\t\toutput = [],\r\n\t\tmockCellComponent;\r\n\r\n\t\tthis.hiddenColumns.forEach(function(column){\r\n\t\t\tvar value = column.getFieldValue(data);\r\n\r\n\t\t\tif(column.definition.title && column.field){\r\n\t\t\t\tif(column.modules.format && self.table.options.responsiveLayoutCollapseUseFormatters){\r\n\r\n\t\t\t\t\tmockCellComponent = {\r\n\t\t\t\t\t\tvalue:false,\r\n\t\t\t\t\t\tdata:{},\r\n\t\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetData:function(){\r\n\t\t\t\t\t\t\treturn data;\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\t\treturn document.createElement(\"div\");\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\t\treturn row.getComponent();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tfunction onRendered(callback){\r\n\t\t\t\t\t\tcallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\toutput.push({\r\n\t\t\t\t\t\tfield: column.field,\r\n\t\t\t\t\t\ttitle: column.definition.title,\r\n\t\t\t\t\t\tvalue: column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params, onRendered)\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput.push({\r\n\t\t\t\t\t\tfield: column.field,\r\n\t\t\t\t\t\ttitle: column.definition.title,\r\n\t\t\t\t\t\tvalue: value\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tformatCollapsedData(data){\r\n\t\tvar list = document.createElement(\"table\");\r\n\r\n\t\tdata.forEach(function(item){\r\n\t\t\tvar row = document.createElement(\"tr\");\r\n\t\t\tvar titleData = document.createElement(\"td\");\r\n\t\t\tvar valueData = document.createElement(\"td\");\r\n\t\t\tvar node_content;\r\n\r\n\t\t\tvar titleHighlight = document.createElement(\"strong\");\r\n\t\t\ttitleData.appendChild(titleHighlight);\r\n\t\t\tthis.langBind(\"columns|\" + item.field, function(text){\r\n\t\t\t\ttitleHighlight.innerHTML = text || item.title;\r\n\t\t\t});\r\n\r\n\t\t\tif(item.value instanceof Node){\r\n\t\t\t\tnode_content = document.createElement(\"div\");\r\n\t\t\t\tnode_content.appendChild(item.value);\r\n\t\t\t\tvalueData.appendChild(node_content);\r\n\t\t\t}else{\r\n\t\t\t\tvalueData.innerHTML = item.value;\r\n\t\t\t}\r\n\r\n\t\t\trow.appendChild(titleData);\r\n\t\t\trow.appendChild(valueData);\r\n\t\t\tlist.appendChild(row);\r\n\t\t}, this);\r\n\r\n\t\treturn Object.keys(data).length ? list : \"\";\r\n\t}\r\n}\r\n\r\nResponsiveLayout.moduleName = \"responsiveLayout\";\r\n\r\nexport default ResponsiveLayout;","import Module from '../../core/Module.js';\r\n\r\nclass SelectRow extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.selecting = false; //flag selecting in progress\r\n\t\tthis.lastClickedRow = false; //last clicked row\r\n\t\tthis.selectPrev = []; //hold previously selected element for drag drop selection\r\n\t\tthis.selectedRows = []; //hold selected rows\r\n\t\tthis.headerCheckboxElement = null; // hold header select element\r\n\t\t\r\n\t\tthis.registerTableOption(\"selectable\", \"highlight\"); //highlight rows on hover\r\n\t\tthis.registerTableOption(\"selectableRangeMode\", \"drag\"); //highlight rows on hover\r\n\t\tthis.registerTableOption(\"selectableRollingSelection\", true); //roll selection once maximum number of selectable rows is reached\r\n\t\tthis.registerTableOption(\"selectablePersistence\", true); // maintain selection when table view is updated\r\n\t\tthis.registerTableOption(\"selectableCheck\", function(data, row){return true;}); //check wheather row is selectable\r\n\t\t\r\n\t\tthis.registerTableFunction(\"selectRow\", this.selectRows.bind(this));\r\n\t\tthis.registerTableFunction(\"deselectRow\", this.deselectRows.bind(this));\r\n\t\tthis.registerTableFunction(\"toggleSelectRow\", this.toggleRow.bind(this));\r\n\t\tthis.registerTableFunction(\"getSelectedRows\", this.getSelectedRows.bind(this));\r\n\t\tthis.registerTableFunction(\"getSelectedData\", this.getSelectedData.bind(this));\r\n\t\t\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"select\", this.selectRows.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"deselect\", this.deselectRows.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"toggleSelect\", this.toggleRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isSelected\", this.isRowSelected.bind(this));\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.selectable !== false){\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleting\", this.rowDeleted.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.clearSelectionData.bind(this));\r\n\t\t\tthis.subscribe(\"rows-retrieve\", this.rowRetrieve.bind(this));\r\n\t\t\t\r\n\t\t\tif(this.table.options.selectable && !this.table.options.selectablePersistence){\r\n\t\t\t\tthis.subscribe(\"data-refreshing\", this.deselectRows.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trowRetrieve(type, prevValue){\r\n\t\treturn type === \"selected\" ? this.selectedRows : prevValue;\r\n\t}\r\n\t\r\n\trowDeleted(row){\r\n\t\tthis._deselectRow(row, true);\r\n\t}\r\n\t\r\n\tclearSelectionData(silent){\r\n\t\tthis.selecting = false;\r\n\t\tthis.lastClickedRow = false;\r\n\t\tthis.selectPrev = [];\r\n\t\tthis.selectedRows = [];\r\n\t\t\r\n\t\tif(silent !== true){\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\telement = row.getElement();\r\n\t\t\r\n\t\t// trigger end of row selection\r\n\t\tvar endSelect = function(){\r\n\t\t\t\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tself.selecting = false;\r\n\t\t\t}, 50);\r\n\t\t\t\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", endSelect);\r\n\t\t};\r\n\t\t\r\n\t\trow.modules.select = {selected:false};\r\n\t\t\r\n\t\t//set row selection class\r\n\t\tif(self.table.options.selectableCheck.call(this.table, row.getComponent())){\r\n\t\t\telement.classList.add(\"tabulator-selectable\");\r\n\t\t\telement.classList.remove(\"tabulator-unselectable\");\r\n\t\t\t\r\n\t\t\tif(self.table.options.selectable && self.table.options.selectable != \"highlight\"){\r\n\t\t\t\tif(self.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\telement.addEventListener(\"click\", this.handleComplexRowClick.bind(this, row));\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.addEventListener(\"click\", function(e){\r\n\t\t\t\t\t\tif(!self.table.modExists(\"edit\") || !self.table.modules.edit.getCurrentCell()){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(!self.selecting){\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\t\t\tif(e.shiftKey){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.selecting = true;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.selectPrev = [];\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tdocument.body.addEventListener(\"mouseup\", endSelect);\r\n\t\t\t\t\t\t\tdocument.body.addEventListener(\"keyup\", endSelect);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mouseenter\", function(e){\r\n\t\t\t\t\t\tif(self.selecting){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(self.selectPrev[1] == row){\r\n\t\t\t\t\t\t\t\tself.toggleRow(self.selectPrev[0]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mouseout\", function(e){\r\n\t\t\t\t\t\tif(self.selecting){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\tself.selectPrev.unshift(row);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\telement.classList.add(\"tabulator-unselectable\");\r\n\t\t\telement.classList.remove(\"tabulator-selectable\");\r\n\t\t}\r\n\t}\r\n\t\r\n\thandleComplexRowClick(row, e){\r\n\t\tif(e.shiftKey){\r\n\t\t\tthis.table._clearSelection();\r\n\t\t\tthis.lastClickedRow = this.lastClickedRow || row;\r\n\t\t\t\r\n\t\t\tvar lastClickedRowIdx = this.table.rowManager.getDisplayRowIndex(this.lastClickedRow);\r\n\t\t\tvar rowIdx = this.table.rowManager.getDisplayRowIndex(row);\r\n\t\t\t\r\n\t\t\tvar fromRowIdx = lastClickedRowIdx <= rowIdx ? lastClickedRowIdx : rowIdx;\r\n\t\t\tvar toRowIdx = lastClickedRowIdx >= rowIdx ? lastClickedRowIdx : rowIdx;\r\n\t\t\t\r\n\t\t\tvar rows = this.table.rowManager.getDisplayRows().slice(0);\r\n\t\t\tvar toggledRows = rows.splice(fromRowIdx, toRowIdx - fromRowIdx + 1);\r\n\t\t\t\r\n\t\t\tif(e.ctrlKey || e.metaKey){\r\n\t\t\t\ttoggledRows.forEach((toggledRow)=>{\r\n\t\t\t\t\tif(toggledRow !== this.lastClickedRow){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.table.options.selectable !== true && !this.isRowSelected(row)){\r\n\t\t\t\t\t\t\tif(this.selectedRows.length < this.table.options.selectable){\r\n\t\t\t\t\t\t\t\tthis.toggleRow(toggledRow);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.toggleRow(toggledRow);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tthis.lastClickedRow = row;\r\n\t\t\t}else{\r\n\t\t\t\tthis.deselectRows(undefined, true);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.selectable !== true){\r\n\t\t\t\t\tif(toggledRows.length > this.table.options.selectable){\r\n\t\t\t\t\t\ttoggledRows = toggledRows.slice(0, this.table.options.selectable)\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.selectRows(toggledRows);\r\n\t\t\t}\r\n\t\t\tthis.table._clearSelection();\r\n\t\t}\r\n\t\telse if(e.ctrlKey || e.metaKey){\r\n\t\t\tthis.toggleRow(row);\r\n\t\t\tthis.lastClickedRow = row;\r\n\t\t}else{\r\n\t\t\tthis.deselectRows(undefined, true);\r\n\t\t\tthis.selectRows(row);\r\n\t\t\tthis.lastClickedRow = row;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//toggle row selection\r\n\ttoggleRow(row){\r\n\t\tif(this.table.options.selectableCheck.call(this.table, row.getComponent())){\r\n\t\t\tif(row.modules.select && row.modules.select.selected){\r\n\t\t\t\tthis._deselectRow(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis._selectRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//select a number of rows\r\n\tselectRows(rows){\r\n\t\tvar rowMatch;\r\n\t\t\r\n\t\tswitch(typeof rows){\r\n\t\t\tcase \"undefined\":\r\n\t\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"string\":\r\n\t\t\t\r\n\t\t\trowMatch = this.table.rowManager.findRow(rows);\r\n\t\t\t\r\n\t\t\tif(rowMatch){\r\n\t\t\t\tthis._selectRow(rowMatch, true, true);\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.rowManager.getRows(rows).forEach((row) => {\r\n\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\tif(Array.isArray(rows)){\r\n\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis._rowSelectionChanged();\r\n\t\t\t}else{\r\n\t\t\t\tthis._selectRow(rows, false, true);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//select an individual row\r\n\t_selectRow(rowInfo, silent, force){\r\n\t\tvar index;\r\n\t\t\r\n\t\t//handle max row count\r\n\t\tif(!isNaN(this.table.options.selectable) && this.table.options.selectable !== true && !force){\r\n\t\t\tif(this.selectedRows.length >= this.table.options.selectable){\r\n\t\t\t\tif(this.table.options.selectableRollingSelection){\r\n\t\t\t\t\tthis._deselectRow(this.selectedRows[0]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tvar row = this.table.rowManager.findRow(rowInfo);\r\n\t\t\r\n\t\tif(row){\r\n\t\t\tif(this.selectedRows.indexOf(row) == -1){\r\n\t\t\t\trow.getElement().classList.add(\"tabulator-selected\");\r\n\t\t\t\tif(!row.modules.select){\r\n\t\t\t\t\trow.modules.select = {};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\trow.modules.select.selected = true;\r\n\t\t\t\tif(row.modules.select.checkboxEl){\r\n\t\t\t\t\trow.modules.select.checkboxEl.checked = true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.selectedRows.push(row);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.dataTreeSelectPropagate){\r\n\t\t\t\t\tthis.childRowSelection(row, true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatchExternal(\"rowSelected\", row.getComponent());\r\n\t\t\t\t\r\n\t\t\t\tthis._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Selection Error - No such row found, ignoring selection:\" + rowInfo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tisRowSelected(row){\r\n\t\treturn this.selectedRows.indexOf(row) !== -1;\r\n\t}\r\n\t\r\n\t//deselect a number of rows\r\n\tdeselectRows(rows, silent){\r\n\t\tvar self = this,\r\n\t\trowCount;\r\n\t\t\r\n\t\tif(typeof rows == \"undefined\"){\r\n\t\t\t\r\n\t\t\trowCount = self.selectedRows.length;\r\n\t\t\t\r\n\t\t\tfor(let i = 0; i < rowCount; i++){\r\n\t\t\t\tself._deselectRow(self.selectedRows[0], true);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(rowCount){\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tif(Array.isArray(rows)){\r\n\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\tself._deselectRow(row, true);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}else{\r\n\t\t\t\tself._deselectRow(rows, silent);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//deselect an individual row\r\n\t_deselectRow(rowInfo, silent){\r\n\t\tvar self = this,\r\n\t\trow = self.table.rowManager.findRow(rowInfo),\r\n\t\tindex;\r\n\t\t\r\n\t\tif(row){\r\n\t\t\tindex = self.selectedRows.findIndex(function(selectedRow){\r\n\t\t\t\treturn selectedRow == row;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\t\r\n\t\t\t\trow.getElement().classList.remove(\"tabulator-selected\");\r\n\t\t\t\tif(!row.modules.select){\r\n\t\t\t\t\trow.modules.select = {};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\trow.modules.select.selected = false;\r\n\t\t\t\tif(row.modules.select.checkboxEl){\r\n\t\t\t\t\trow.modules.select.checkboxEl.checked = false;\r\n\t\t\t\t}\r\n\t\t\t\tself.selectedRows.splice(index, 1);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.dataTreeSelectPropagate){\r\n\t\t\t\t\tthis.childRowSelection(row, false);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatchExternal(\"rowDeselected\", row.getComponent());\r\n\t\t\t\t\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Deselection Error - No such row found, ignoring selection:\" + rowInfo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSelectedData(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tthis.selectedRows.forEach(function(row){\r\n\t\t\tdata.push(row.getData());\r\n\t\t});\r\n\t\t\r\n\t\treturn data;\r\n\t}\r\n\t\r\n\tgetSelectedRows(){\r\n\t\t\r\n\t\tvar rows = [];\r\n\t\t\r\n\t\tthis.selectedRows.forEach(function(row){\r\n\t\t\trows.push(row.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t_rowSelectionChanged(silent){\r\n\t\tif(this.headerCheckboxElement){\r\n\t\t\tif(this.selectedRows.length === 0){\r\n\t\t\t\tthis.headerCheckboxElement.checked = false;\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = false;\r\n\t\t\t} else if(this.table.rowManager.rows.length === this.selectedRows.length){\r\n\t\t\t\tthis.headerCheckboxElement.checked = true;\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = false;\r\n\t\t\t} else {\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = true;\r\n\t\t\t\tthis.headerCheckboxElement.checked = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(!silent){\r\n\t\t\tthis.dispatchExternal(\"rowSelectionChanged\", this.getSelectedData(), this.getSelectedRows());\r\n\t\t}\r\n\t}\r\n\t\r\n\tregisterRowSelectCheckbox (row, element) {\r\n\t\tif(!row._row.modules.select){\r\n\t\t\trow._row.modules.select = {};\r\n\t\t}\r\n\t\t\r\n\t\trow._row.modules.select.checkboxEl = element;\r\n\t}\r\n\t\r\n\tregisterHeaderSelectCheckbox (element) {\r\n\t\tthis.headerCheckboxElement = element;\r\n\t}\r\n\t\r\n\tchildRowSelection(row, select){\r\n\t\tvar children = this.table.modules.dataTree.getChildren(row, true);\r\n\t\t\r\n\t\tif(select){\r\n\t\t\tfor(let child of children){\r\n\t\t\t\tthis._selectRow(child, true);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tfor(let child of children){\r\n\t\t\t\tthis._deselectRow(child, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nSelectRow.moduleName = \"selectRow\";\r\n\r\nexport default SelectRow;","//sort numbers\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar decimal = params.decimalSeparator;\r\n\tvar thousand = params.thousandSeparator;\r\n\tvar emptyAlign = 0;\r\n\r\n\ta = String(a);\r\n\tb = String(b);\r\n\r\n\tif(thousand){\r\n\t\ta = a.split(thousand).join(\"\");\r\n\t\tb = b.split(thousand).join(\"\");\r\n\t}\r\n\r\n\tif(decimal){\r\n\t\ta = a.split(decimal).join(\".\");\r\n\t\tb = b.split(decimal).join(\".\");\r\n\t}\r\n\r\n\ta = parseFloat(a);\r\n\tb = parseFloat(b);\r\n\r\n\t//handle non numeric values\r\n\tif(isNaN(a)){\r\n\t\temptyAlign = isNaN(b) ? 0 : -1;\r\n\t}else if(isNaN(b)){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\t\t//compare valid values\r\n\t\treturn a - b;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","//sort strings\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\tvar locale;\r\n\r\n\t//handle empty values\r\n\tif(!a){\r\n\t\temptyAlign = !b ? 0 : -1;\r\n\t}else if(!b){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\t\t//compare valid values\r\n\t\tswitch(typeof params.locale){\r\n\t\t\tcase \"boolean\":\r\n\t\t\tif(params.locale){\r\n\t\t\t\tlocale = this.langLocale();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"string\":\r\n\t\t\tlocale = params.locale;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn String(a).toLowerCase().localeCompare(String(b).toLowerCase(), locale);\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","//sort datetime\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar format = params.format || \"dd/MM/yyyy HH:mm:ss\",\r\n\talignEmptyValues = params.alignEmptyValues,\r\n\temptyAlign = 0;\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\ta = format === \"iso\" ? DT.fromISO(String(a)) : DT.fromFormat(String(a), format);\r\n\t\tb = format === \"iso\" ? DT.fromISO(String(b)) : DT.fromFormat(String(b), format);\r\n\r\n\t\tif(!a.isValid){\r\n\t\t\temptyAlign = !b.isValid ? 0 : -1;\r\n\t\t}else if(!b.isValid){\r\n\t\t\temptyAlign = 1;\r\n\t\t}else{\r\n\t\t\t//compare valid values\r\n\t\t\treturn a - b;\r\n\t\t}\r\n\r\n\t\t//fix empty values in position\r\n\t\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\t\temptyAlign *= -1;\r\n\t\t}\r\n\r\n\t\treturn emptyAlign;\r\n\r\n\t}else{\r\n\t\tconsole.error(\"Sort Error - 'datetime' sorter is dependant on luxon.js\");\r\n\t}\r\n};","import datetime from './datetime.js';\r\n\r\n//sort date\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tif(!params.format){\r\n\t\tparams.format = \"dd/MM/yyyy\";\r\n\t}\r\n\r\n\treturn datetime.call(this, a, b, aRow, bRow, column, dir, params);\r\n};","import datetime from './datetime.js';\r\n\r\n//sort times\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tif(!params.format){\r\n\t\tparams.format = \"HH:mm\";\r\n\t}\r\n\r\n\treturn datetime.call(this, a, b, aRow, bRow, column, dir, params);\r\n};","//sort booleans\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = a === true || a === \"true\" || a === \"True\" || a === 1 ? 1 : 0;\r\n\tvar el2 = b === true || b === \"true\" || b === \"True\" || b === 1 ? 1 : 0;\r\n\r\n\treturn el1 - el2;\r\n};","//sort if element contains any data\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = 0;\r\n\tvar el2 = 0;\r\n\tvar type = params.type || \"length\";\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\r\n\tfunction calc(value){\r\n\r\n\t\tswitch(type){\r\n\t\t\tcase \"length\":\r\n\t\t\treturn value.length;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"sum\":\r\n\t\t\treturn value.reduce(function(c, d){\r\n\t\t\t\treturn c + d;\r\n\t\t\t});\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"max\":\r\n\t\t\treturn Math.max.apply(null, value) ;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"min\":\r\n\t\t\treturn Math.min.apply(null, value) ;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"avg\":\r\n\t\t\treturn value.reduce(function(c, d){\r\n\t\t\t\treturn c + d;\r\n\t\t\t}) / value.length;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t//handle non array values\r\n\tif(!Array.isArray(a)){\r\n\t\talignEmptyValues = !Array.isArray(b) ? 0 : -1;\r\n\t}else if(!Array.isArray(b)){\r\n\t\talignEmptyValues = 1;\r\n\t}else{\r\n\r\n\t\t//compare valid values\r\n\t\tel1 = a ? calc(a) : 0;\r\n\t\tel2 = b ? calc(b) : 0;\r\n\r\n\t\treturn el1 - el2;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","//sort if element contains any data\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = typeof a == \"undefined\" ? 0 : 1;\r\n\tvar el2 = typeof b == \"undefined\" ? 0 : 1;\r\n\r\n\treturn el1 - el2;\r\n};","//sort alpha numeric strings\r\nexport default function(as, bs, aRow, bRow, column, dir, params){\r\n\tvar a, b, a1, b1, i= 0, L, rx = /(\\d+)|(\\D+)/g, rd = /\\d/;\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\r\n\t//handle empty values\r\n\tif(!as && as!== 0){\r\n\t\temptyAlign = !bs && bs!== 0 ? 0 : -1;\r\n\t}else if(!bs && bs!== 0){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\r\n\t\tif(isFinite(as) && isFinite(bs)) return as - bs;\r\n\t\ta = String(as).toLowerCase();\r\n\t\tb = String(bs).toLowerCase();\r\n\t\tif(a === b) return 0;\r\n\t\tif(!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1;\r\n\t\ta = a.match(rx);\r\n\t\tb = b.match(rx);\r\n\t\tL = a.length > b.length ? b.length : a.length;\r\n\t\twhile(i < L){\r\n\t\t\ta1= a[i];\r\n\t\t\tb1= b[i++];\r\n\t\t\tif(a1 !== b1){\r\n\t\t\t\tif(isFinite(a1) && isFinite(b1)){\r\n\t\t\t\t\tif(a1.charAt(0) === \"0\") a1 = \".\" + a1;\r\n\t\t\t\t\tif(b1.charAt(0) === \"0\") b1 = \".\" + b1;\r\n\t\t\t\t\treturn a1 - b1;\r\n\t\t\t\t}\r\n\t\t\t\telse return a1 > b1 ? 1 : -1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn a.length > b.length;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","import number from './sorters/number.js';\r\nimport string from './sorters/string.js';\r\nimport date from './sorters/date.js';\r\nimport time from './sorters/time.js';\r\nimport datetime from './sorters/datetime.js';\r\nimport boolean from './sorters/boolean.js';\r\nimport array from './sorters/array.js';\r\nimport exists from './sorters/exists.js';\r\nimport alphanum from './sorters/alphanum.js';\r\n\r\nexport default {\r\n\tnumber:number,\r\n\tstring:string,\r\n\tdate:date,\r\n\ttime:time,\r\n\tdatetime:datetime,\r\n\tboolean:boolean,\r\n\tarray:array,\r\n\texists:exists,\r\n\talphanum:alphanum\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultSorters from './defaults/sorters.js';\r\n\r\nclass Sort extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t \tthis.sortList = []; //holder current sort\r\n\t \tthis.changed = false; //has the sort changed since last render\r\n\r\n\t \tthis.registerTableOption(\"sortMode\", \"local\"); //local or remote sorting\r\n\r\n\t \tthis.registerTableOption(\"initialSort\", false); //initial sorting criteria\r\n\t \tthis.registerTableOption(\"columnHeaderSortMulti\", true); //multiple or single column sorting\r\n\t \tthis.registerTableOption(\"sortOrderReverse\", false); //reverse internal sort ordering\r\n\t \tthis.registerTableOption(\"headerSortElement\", \"
\"); //header sort element\r\n\r\n\t \tthis.registerColumnOption(\"sorter\");\r\n\t \tthis.registerColumnOption(\"sorterParams\");\r\n\r\n\t \tthis.registerColumnOption(\"headerSort\", true);\r\n\t \tthis.registerColumnOption(\"headerSortStartingDir\");\r\n\t \tthis.registerColumnOption(\"headerSortTristate\");\r\n\r\n\t }\r\n\r\n\t initialize(){\r\n\t \tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t \tthis.subscribe(\"table-built\", this.tableBuilt.bind(this));\r\n\t \tthis.registerDataHandler(this.sort.bind(this), 20);\r\n\r\n\t \tthis.registerTableFunction(\"setSort\", this.userSetSort.bind(this));\r\n\t \tthis.registerTableFunction(\"getSorters\", this.getSort.bind(this));\r\n\t \tthis.registerTableFunction(\"clearSort\", this.clearSort.bind(this));\r\n\r\n\t \tif(this.table.options.sortMode === \"remote\"){\r\n\t \t\tthis.subscribe(\"data-params\", this.remoteSortParams.bind(this));\r\n\t \t}\r\n\t }\r\n\r\n\t tableBuilt(){\r\n\t \tif(this.table.options.initialSort){\r\n\t \t\tthis.setSort(this.table.options.initialSort);\r\n\t \t}\r\n\t }\r\n\r\n\t remoteSortParams(data, config, silent, params){\r\n\t \tvar sorters = this.getSort();\r\n\r\n\t \tsorters.forEach((item) => {\r\n\t \t\tdelete item.column;\r\n\t \t});\r\n\r\n\t \tparams.sort = sorters;\r\n\r\n\t \treturn params;\r\n\t }\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tuserSetSort(sortList, dir){\r\n\t\tthis.setSort(sortList, dir);\r\n\t\t// this.table.rowManager.sorterRefresh();\r\n\t\tthis.refreshSort();\r\n\t}\r\n\r\n\tclearSort(){\r\n\t\tthis.clear();\r\n\t\t// this.table.rowManager.sorterRefresh();\r\n\t\tthis.refreshSort();\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\t//initialize column header for sorting\r\n\tinitializeColumn(column){\r\n\t\tvar sorter = false,\r\n\t\tcolEl,\r\n\t\tarrowEl;\r\n\r\n\t\tswitch(typeof column.definition.sorter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Sort.sorters[column.definition.sorter]){\r\n\t\t\t\tsorter = Sort.sorters[column.definition.sorter];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Sort Error - No such sorter found: \", column.definition.sorter);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tsorter = column.definition.sorter;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tcolumn.modules.sort = {\r\n\t\t\tsorter:sorter, dir:\"none\",\r\n\t\t\tparams:column.definition.sorterParams || {},\r\n\t\t\tstartingDir:column.definition.headerSortStartingDir || \"asc\",\r\n\t\t\ttristate: column.definition.headerSortTristate,\r\n\t\t};\r\n\r\n\t\tif(column.definition.headerSort !== false){\r\n\r\n\t\t\tcolEl = column.getElement();\r\n\r\n\t\t\tcolEl.classList.add(\"tabulator-sortable\");\r\n\r\n\r\n\t\t\tarrowEl = document.createElement(\"div\");\r\n\t\t\tarrowEl.classList.add(\"tabulator-col-sorter\");\r\n\r\n\t\t\tif(typeof this.table.options.headerSortElement == \"object\"){\r\n\t\t\t\tarrowEl.appendChild(this.table.options.headerSortElement);\r\n\t\t\t}else{\r\n\t\t\t\tarrowEl.innerHTML = this.table.options.headerSortElement;\r\n\t\t\t}\r\n\r\n\t\t\t//create sorter arrow\r\n\t\t\tcolumn.titleHolderElement.appendChild(arrowEl);\r\n\r\n\t\t\tcolumn.modules.sort.element = arrowEl;\r\n\r\n\t\t\t//sort on click\r\n\t\t\tcolEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\tvar dir = \"\",\r\n\t\t\t\tsorters=[],\r\n\t\t\t\tmatch = false;\r\n\r\n\t\t\t\tif(column.modules.sort){\r\n\t\t\t\t\tif(column.modules.sort.tristate){\r\n\t\t\t\t\t\tif(column.modules.sort.dir == \"none\"){\r\n\t\t\t\t\t\t\tdir = column.modules.sort.startingDir;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(column.modules.sort.dir == column.modules.sort.startingDir){\r\n\t\t\t\t\t\t\t\tdir = column.modules.sort.dir == \"asc\" ? \"desc\" : \"asc\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tdir = \"none\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswitch(column.modules.sort.dir){\r\n\t\t\t\t\t\t\tcase \"asc\":\r\n\t\t\t\t\t\t\tdir = \"desc\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tcase \"desc\":\r\n\t\t\t\t\t\t\tdir = \"asc\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tdir = column.modules.sort.startingDir;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\tif (this.table.options.columnHeaderSortMulti && (e.shiftKey || e.ctrlKey)) {\r\n\t\t\t\t\t\tsorters = this.getSort();\r\n\r\n\t\t\t\t\t\tmatch = sorters.findIndex((sorter) => {\r\n\t\t\t\t\t\t\treturn sorter.field === column.getField();\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tif(match > -1){\r\n\t\t\t\t\t\t\tsorters[match].dir = dir;\r\n\r\n\t\t\t\t\t\t\tif(match != sorters.length -1){\r\n\t\t\t\t\t\t\t\tmatch = sorters.splice(match, 1)[0];\r\n\t\t\t\t\t\t\t\tif(dir != \"none\"){\r\n\t\t\t\t\t\t\t\t\tsorters.push(match);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(dir != \"none\"){\r\n\t\t\t\t\t\t\t\tsorters.push({column:column, dir:dir});\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t//add to existing sort\r\n\t\t\t\t\t\tthis.setSort(sorters);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(dir == \"none\"){\r\n\t\t\t\t\t\t\tthis.clear();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t//sort by column only\r\n\t\t\t\t\t\t\tthis.setSort(column, dir);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// this.table.rowManager.sorterRefresh(!this.sortList.length);\r\n\t\t\t\t\tthis.refreshSort();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\trefreshSort(){\r\n\t\tif(this.table.options.sortMode === \"remote\"){\r\n\t\t\tthis.reloadData();\r\n\t\t}else{\r\n\t\t\tthis.refreshData(true);\r\n\t\t}\r\n\r\n\t\t//TODO - Persist left position of row manager\r\n\t\t// left = this.scrollLeft;\r\n\t\t// this.scrollHorizontal(left);\r\n\t}\r\n\r\n\t//check if the sorters have changed since last use\r\n\thasChanged(){\r\n\t\tvar changed = this.changed;\r\n\t\tthis.changed = false;\r\n\t\treturn changed;\r\n\t}\r\n\r\n\t//return current sorters\r\n\tgetSort(){\r\n\t\tvar self = this,\r\n\t\tsorters = [];\r\n\r\n\t\tself.sortList.forEach(function(item){\r\n\t\t\tif(item.column){\r\n\t\t\t\tsorters.push({column:item.column.getComponent(), field:item.column.getField(), dir:item.dir});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn sorters;\r\n\t}\r\n\r\n\t//change sort list and trigger sort\r\n\tsetSort(sortList, dir){\r\n\t\tvar self = this,\r\n\t\tnewSortList = [];\r\n\r\n\t\tif(!Array.isArray(sortList)){\r\n\t\t\tsortList = [{column: sortList, dir:dir}];\r\n\t\t}\r\n\r\n\t\tsortList.forEach(function(item){\r\n\t\t\tvar column;\r\n\r\n\t\t\tcolumn = self.table.columnManager.findColumn(item.column);\r\n\r\n\t\t\tif(column){\r\n\t\t\t\titem.column = column;\r\n\t\t\t\tnewSortList.push(item);\r\n\t\t\t\tself.changed = true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Sort Warning - Sort field does not exist and is being ignored: \", item.column);\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\t\tself.sortList = newSortList;\r\n\r\n\t\tthis.dispatch(\"sort-changed\");\r\n\t}\r\n\r\n\t//clear sorters\r\n\tclear(){\r\n\t\tthis.setSort([]);\r\n\t}\r\n\r\n\t//find appropriate sorter for column\r\n\tfindSorter(column){\r\n\t\tvar row = this.table.rowManager.activeRows[0],\r\n\t\tsorter = \"string\",\r\n\t\tfield, value;\r\n\r\n\t\tif(row){\r\n\t\t\trow = row.getData();\r\n\t\t\tfield = column.getField();\r\n\r\n\t\t\tif(field){\r\n\r\n\t\t\t\tvalue = column.getFieldValue(row);\r\n\r\n\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){\r\n\t\t\t\t\t\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn Sort.sorters[sorter];\r\n\t}\r\n\r\n\t//work through sort list sorting data\r\n\tsort(data){\r\n\t\tvar self = this,\r\n\t\tsortList = this.table.options.sortOrderReverse ? self.sortList.slice().reverse() : self.sortList,\r\n\t\tsortListActual = [],\r\n\t\trowComponents = [],\r\n\t\tlastSort;\r\n\r\n\t\tif(this.subscribedExternal(\"dataSorting\")){\r\n\t\t\tthis.dispatchExternal(\"dataSorting\", self.getSort());\r\n\t\t}\r\n\r\n\t\tself.clearColumnHeaders();\r\n\r\n\t\tif(this.table.options.sortMode !== \"remote\"){\r\n\r\n\t\t\t//build list of valid sorters and trigger column specific callbacks before sort begins\r\n\t\t\tsortList.forEach(function(item, i){\r\n\t\t\t\tvar sortObj = item.column.modules.sort;\r\n\r\n\t\t\t\tif(item.column && sortObj){\r\n\r\n\t\t\t\t\t//if no sorter has been defined, take a guess\r\n\t\t\t\t\tif(!sortObj.sorter){\r\n\t\t\t\t\t\tsortObj.sorter = self.findSorter(item.column);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\titem.params = typeof sortObj.params === \"function\" ? sortObj.params(item.column.getComponent(), item.dir) : sortObj.params;\r\n\r\n\t\t\t\t\tsortListActual.push(item);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tself.setColumnHeader(item.column, item.dir);\r\n\t\t\t});\r\n\r\n\t\t\t//sort data\r\n\t\t\tif (sortListActual.length) {\r\n\t\t\t\tself._sortItems(data, sortListActual);\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tsortList.forEach(function(item, i){\r\n\t\t\t\tself.setColumnHeader(item.column, item.dir);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.subscribedExternal(\"dataSorted\")){\r\n\t\t\tdata.forEach((row) => {\r\n\t\t\t\trowComponents.push(row.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatchExternal(\"dataSorted\", self.getSort(), rowComponents);\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//clear sort arrows on columns\r\n\tclearColumnHeaders(){\r\n\t\tthis.table.columnManager.getRealColumns().forEach(function(column){\r\n\t\t\tif(column.modules.sort){\r\n\t\t\t\tcolumn.modules.sort.dir = \"none\";\r\n\t\t\t\tcolumn.getElement().setAttribute(\"aria-sort\", \"none\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//set the column header sort direction\r\n\tsetColumnHeader(column, dir){\r\n\t\tcolumn.modules.sort.dir = dir;\r\n\t\tcolumn.getElement().setAttribute(\"aria-sort\", dir);\r\n\t}\r\n\r\n\t//sort each item in sort list\r\n\t_sortItems(data, sortList){\r\n\t\tvar sorterCount = sortList.length - 1;\r\n\r\n\t\tdata.sort((a, b) => {\r\n\t\t\tvar result;\r\n\r\n\t\t\tfor(var i = sorterCount; i>= 0; i--){\r\n\t\t\t\tlet sortItem = sortList[i];\r\n\r\n\t\t\t\tresult = this._sortRow(a, b, sortItem.column, sortItem.dir, sortItem.params);\r\n\r\n\t\t\t\tif(result !== 0){\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn result;\r\n\t\t});\r\n\t}\r\n\r\n\t//process individual rows for a sort function on active data\r\n\t_sortRow(a, b, column, dir, params){\r\n\t\tvar el1Comp, el2Comp, colComp;\r\n\r\n\t\t//switch elements depending on search direction\r\n\t\tvar el1 = dir == \"asc\" ? a : b;\r\n\t\tvar el2 = dir == \"asc\" ? b : a;\r\n\r\n\t\ta = column.getFieldValue(el1.getData());\r\n\t\tb = column.getFieldValue(el2.getData());\r\n\r\n\t\ta = typeof a !== \"undefined\" ? a : \"\";\r\n\t\tb = typeof b !== \"undefined\" ? b : \"\";\r\n\r\n\t\tel1Comp = el1.getComponent();\r\n\t\tel2Comp = el2.getComponent();\r\n\r\n\t\treturn column.modules.sort.sorter.call(this, a, b, el1Comp, el2Comp, column.getComponent(), dir, params);\r\n\t}\r\n}\r\n\r\nSort.moduleName = \"sort\";\r\n\r\n//load defaults\r\nSort.sorters = defaultSorters;\r\n\r\nexport default Sort;","export default {\r\n\t//is integer\r\n\tinteger: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvalue = Number(value);\r\n\t\treturn typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\r\n\t},\r\n\r\n\t//is float\r\n\tfloat: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvalue = Number(value);\r\n\t\treturn typeof value === 'number' && isFinite(value) && value % 1 !== 0;\r\n\t},\r\n\r\n\t//must be a number\r\n\tnumeric: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn !isNaN(value);\r\n\t},\r\n\r\n\t//must be a string\r\n\tstring: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn isNaN(value);\r\n\t},\r\n\r\n\t//maximum value\r\n\tmax: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn parseFloat(value) <= parameters;\r\n\t},\r\n\r\n\t//minimum value\r\n\tmin: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn parseFloat(value) >= parameters;\r\n\t},\r\n\r\n\t//starts with value\r\n\tstarts: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).toLowerCase().startsWith(String(parameters).toLowerCase());\r\n\t},\r\n\r\n\t//ends with value\r\n\tends: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).toLowerCase().endsWith(String(parameters).toLowerCase());\r\n\t},\r\n\r\n\r\n\t//minimum string length\r\n\tminLength: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).length >= parameters;\r\n\t},\r\n\r\n\t//maximum string length\r\n\tmaxLength: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).length <= parameters;\r\n\t},\r\n\r\n\t//in provided value list\r\n\tin: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif(typeof parameters == \"string\"){\r\n\t\t\tparameters = parameters.split(\"|\");\r\n\t\t}\r\n\r\n\t\treturn value === \"\" || parameters.indexOf(value) > -1;\r\n\t},\r\n\r\n\t//must match provided regex\r\n\tregex: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar reg = new RegExp(parameters);\r\n\r\n\t\treturn reg.test(value);\r\n\t},\r\n\r\n\t//value must be unique in this column\r\n\tunique: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar unique = true;\r\n\r\n\t\tvar cellData = cell.getData();\r\n\t\tvar column = cell.getColumn()._getSelf();\r\n\r\n\t\tthis.table.rowManager.rows.forEach(function(row){\r\n\t\t\tvar data = row.getData();\r\n\r\n\t\t\tif(data !== cellData){\r\n\t\t\t\tif(value == column.getFieldValue(data)){\r\n\t\t\t\t\tunique = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn unique;\r\n\t},\r\n\r\n\t//must have a value\r\n\trequired:function(cell, value, parameters){\r\n\t\treturn value !== \"\" && value !== null && typeof value !== \"undefined\";\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultValidators from './defaults/validators.js';\r\n\r\nclass Validate extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.invalidCells = [];\r\n\r\n\t\tthis.registerTableOption(\"validationMode\", \"blocking\");\r\n\r\n\t\tthis.registerColumnOption(\"validator\");\r\n\r\n\t\tthis.registerTableFunction(\"getInvalidCells\", this.getInvalidCells.bind(this));\r\n\t\tthis.registerTableFunction(\"clearCellValidation\", this.userClearCellValidation.bind(this));\r\n\t\tthis.registerTableFunction(\"validate\", this.userValidate.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"isValid\", this.cellIsValid.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"clearValidation\", this.clearValidation.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"validate\", this.cellValidate.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"column\", \"validate\", this.columnValidate.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"validate\", this.rowValidate.bind(this));\r\n\t}\r\n\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-delete\", this.clearValidation.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumnCheck.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Cell Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tcellIsValid(cell){\r\n\t\treturn cell.modules.validate ? !cell.modules.validate.invalid : true;\r\n\t}\r\n\r\n\tcellValidate(cell){\r\n\t\treturn this.validate(cell.column.modules.validate, cell, cell.getValue());\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Column Functions ////////\r\n\t///////////////////////////////////\r\n\r\n\tcolumnValidate(column){\r\n\t\tvar invalid = [];\r\n\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tif(!this.cellValidate(cell)){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Row Functions //////////\r\n\t///////////////////////////////////\r\n\r\n\trowValidate(row){\r\n\t\tvar invalid = [];\r\n\r\n\t\trow.cells.forEach((cell) => {\r\n\t\t\tif(!this.cellValidate(cell)){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\r\n\tuserClearCellValidation(cells){\r\n\t\tif(!cells){\r\n\t\t\tcells = this.getInvalidCells();\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\r\n\t\tcells.forEach((cell) => {\r\n\t\t\tthis.clearValidation(cell._getSelf());\r\n\t\t});\r\n\t}\r\n\r\n\tuserValidate(cells){\r\n\t\tvar output = [];\r\n\r\n\t\t//clear row data\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\trow = row.getComponent();\r\n\r\n\t\t\tvar valid = row.validate();\r\n\r\n\t\t\tif(valid !== true){\r\n\t\t\t\toutput = output.concat(valid);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output.length ? output : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(typeof column.definition.validator !== \"undefined\"){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//validate\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = [],\r\n\t\tvalidator;\r\n\r\n\t\tif(column.definition.validator){\r\n\r\n\t\t\tif(Array.isArray(column.definition.validator)){\r\n\t\t\t\tcolumn.definition.validator.forEach((item) => {\r\n\t\t\t\t\tvalidator = self._extractValidator(item);\r\n\r\n\t\t\t\t\tif(validator){\r\n\t\t\t\t\t\tconfig.push(validator);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t}else{\r\n\t\t\t\tvalidator = this._extractValidator(column.definition.validator);\r\n\r\n\t\t\t\tif(validator){\r\n\t\t\t\t\tconfig.push(validator);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.modules.validate = config.length ? config : false;\r\n\t\t}\r\n\t}\r\n\r\n\t_extractValidator(value){\r\n\t\tvar type, params, pos;\r\n\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tpos = value.indexOf(':');\r\n\r\n\t\t\tif(pos > -1){\r\n\t\t\t\ttype = value.substring(0,pos);\r\n\t\t\t\tparams = value.substring(pos+1);\r\n\t\t\t}else{\r\n\t\t\t\ttype = value;\r\n\t\t\t}\r\n\r\n\t\t\treturn this._buildValidator(type, params);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\treturn this._buildValidator(value);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"object\":\r\n\t\t\treturn this._buildValidator(value.type, value.parameters);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t_buildValidator(type, params){\r\n\r\n\t\tvar func = typeof type == \"function\" ? type : Validate.validators[type];\r\n\r\n\t\tif(!func){\r\n\t\t\tconsole.warn(\"Validator Setup Error - No matching validator found:\", type);\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn {\r\n\t\t\t\ttype:typeof type == \"function\" ? \"function\" : type,\r\n\t\t\t\tfunc:func,\r\n\t\t\t\tparams:params,\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\tvalidate(validators, cell, value){\r\n\t\tvar self = this,\r\n\t\tvalid = [],\r\n\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\r\n\t\tif(validators){\r\n\t\t\tvalidators.forEach((item) => {\r\n\t\t\t\tif(!item.func.call(self, cell.getComponent(), value, item.params)){\r\n\t\t\t\t\tvalid.push({\r\n\t\t\t\t\t\ttype:item.type,\r\n\t\t\t\t\t\tparameters:item.params\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tvalid = valid.length ? valid : true;\r\n\r\n\t\tif(!cell.modules.validate){\r\n\t\t\tcell.modules.validate = {};\r\n\t\t}\r\n\r\n\t\tif(valid === true){\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\r\n\t\t\tif(invalidIndex > -1){\r\n\t\t\t\tthis.invalidCells.splice(invalidIndex, 1);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcell.modules.validate.invalid = true;\r\n\r\n\t\t\tif(this.table.options.validationMode !== \"manual\"){\r\n\t\t\t\tcell.getElement().classList.add(\"tabulator-validation-fail\");\r\n\t\t\t}\r\n\r\n\t\t\tif(invalidIndex == -1){\r\n\t\t\t\tthis.invalidCells.push(cell);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn valid;\r\n\t}\r\n\r\n\tgetInvalidCells(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.invalidCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tclearValidation(cell){\r\n\t\tvar invalidIndex;\r\n\r\n\t\tif(cell.modules.validate && cell.modules.validate.invalid){\r\n\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\r\n\t\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\r\n\t\t\tif(invalidIndex > -1){\r\n\t\t\t\tthis.invalidCells.splice(invalidIndex, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nValidate.moduleName = \"validate\";\r\n\r\n//load defaults\r\nValidate.validators = defaultValidators;\r\n\r\nexport default Validate;","export default {\r\n\r\n\tdebugEventsExternal:false, //flag to console log events\r\n\tdebugEventsInternal:false, //flag to console log events\r\n\tdebugInvalidOptions:true, //allow toggling of invalid option warnings\r\n\r\n\theight:false, //height of tabulator\r\n\tminHeight:false, //minimum height of tabulator\r\n\tmaxHeight:false, //maximum height of tabulator\r\n\r\n\tcolumnHeaderVertAlign:\"top\", //vertical alignment of column headers\r\n\r\n\tcolumns:[],//store for colum header info\r\n\tcolumnDefaults:{}, //store column default props\r\n\r\n\tdata:false, //default starting data\r\n\r\n\tautoColumns:false, //build columns from data row structure\r\n\tautoColumnsDefinitions:false,\r\n\r\n\tnestedFieldSeparator:\".\", //separator for nested data\r\n\r\n\ttooltipGenerationMode:\"load\", //when to generate tooltips\r\n\r\n\tfooterElement:false, //hold footer element\r\n\r\n\tindex:\"id\", //filed for row index\r\n\r\n\ttextDirection:\"auto\",\r\n\r\n\taddRowPos:\"bottom\", //position to insert blank rows, top|bottom\r\n\r\n\theaderVisible:true, //hide header\r\n\r\n\trenderVertical:\"virtual\",\r\n\trenderHorizontal:\"basic\",\r\n\trenderVerticalBuffer:0, // set virtual DOM buffer size\r\n\r\n\tscrollToRowPosition:\"top\",\r\n\tscrollToRowIfVisible:true,\r\n\r\n\tscrollToColumnPosition:\"left\",\r\n\tscrollToColumnIfVisible:true,\r\n\r\n\trowFormatter:false,\r\n\trowFormatterPrint:null,\r\n\trowFormatterClipboard:null,\r\n\trowFormatterHtmlOutput:null,\r\n\r\n\tplaceholder:false,\r\n\r\n\tdataLoader:true,\r\n\tdataLoaderLoading:false,\r\n\tdataLoaderError:false,\r\n\tdataLoaderErrorTimeout:3000,\r\n\r\n\tdataSendParams:{},\r\n\r\n\tdataReceiveParams:{},\r\n}\r\n","export default class OptionsList {\r\n\tconstructor(table, msgType, defaults = {}){\r\n\t\tthis.table = table;\r\n\t\tthis.msgType = msgType;\r\n\t\tthis.registeredDefaults = Object.assign({}, defaults)\r\n\t}\r\n\r\n\tregister(option, value){\r\n\t\tthis.registeredDefaults[option] = value;\r\n\t}\r\n\r\n\tgenerate(defaultOptions, userOptions = {}){\r\n\t\tvar output = Object.assign({}, this.registeredDefaults);\r\n\r\n\t\tObject.assign(output, defaultOptions);\r\n\r\n\t\tif(userOptions.debugInvalidOptions !== false || this.table.options.debugInvalidOptions){\r\n\t\t\tfor (var key in userOptions){\r\n\t\t\t\tif(!output.hasOwnProperty(key)){\r\n\t\t\t\t\tconsole.warn(\"Invalid \" + this.msgType + \" option:\", key)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var key in output){\r\n\t\t\tif(key in userOptions){\r\n\t\t\t\toutput[key] = userOptions[key];\r\n\t\t\t}else{\r\n\t\t\t\tif(Array.isArray(output[key])){\r\n\t\t\t\t\toutput[key] = Object.assign([], output[key]);\r\n\t\t\t\t}else if(typeof output[key] === \"object\" && output[key] !== null){\r\n\t\t\t\t\toutput[key] = Object.assign({}, output[key]);\r\n\t\t\t\t}else if (typeof output[key] === \"undefined\"){\r\n\t\t\t\t\tdelete output[key];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport Helpers from '../tools/Helpers.js';\r\n\r\nexport default class Renderer extends CoreFeature{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.elementVertical = table.rowManager.element;\r\n\t\tthis.elementHorizontal = table.columnManager.element;\r\n\t\tthis.tableElement = table.rowManager.tableElement;\r\n\r\n\t\tthis.verticalFillMode = \"fit\"; // used by row manager to determin how to size the render area (\"fit\" - fits container to the contents, \"fill\" - fills the contianer without resizing it)\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t/////// Internal Bindings /////////\r\n\t///////////////////////////////////\r\n\r\n\tinitialize(){\r\n\t\t//initialize core functionality\r\n\t}\r\n\r\n\tclearRows(){\r\n\t\t//clear down existing rows layout\r\n\t}\r\n\r\n\tclearColumns(){\r\n\t\t//clear down existing columns layout\r\n\t}\r\n\r\n\r\n\treinitializeColumnWidths(columns){\r\n\t\t//resize columns to fit data\r\n\t}\r\n\r\n\r\n\trenderRows(){\r\n\t\t//render rows from a clean slate\r\n\t}\r\n\r\n\trenderColumns(){\r\n\t\t//render columns from a clean slate\r\n\t}\r\n\r\n\trerenderRows(callback){\r\n\t\t// rerender rows and keep position\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\t}\r\n\r\n\trerenderColumns(update, blockRedraw){\r\n\t\t//rerender columns\r\n\t}\r\n\r\n\trenderRowCells(row){\r\n\t\t//render the cells in a row\r\n\t}\r\n\r\n\trerenderRowCells(row, force){\r\n\t\t//rerender the cells in a row\r\n\t}\r\n\r\n\tscrollColumns(left, dir){\r\n\t\t//handle horizontal scrolling\r\n\t}\r\n\r\n\tscrollRows(top, dir){\r\n\t\t//handle vertical scolling\r\n\t}\r\n\r\n\tresize(){\r\n\t\t//container has rezied, carry out any needed recalculations (DO NOT RERENDER IN THIS FUNCTION)\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\t//scroll to a specific row\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\t//determine weather the row is nearest the top or bottom of the table, retur true for top or false for bottom\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\t//return the visible rows\r\n\t\treturn [];\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t//////// Helper Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\trows(){\r\n\t\treturn this.table.rowManager.getDisplayRows();\r\n\t}\r\n\r\n\tstyleRow(row, index){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tif(index % 2){\r\n\t\t\trowEl.classList.add(\"tabulator-row-even\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-odd\");\r\n\t\t}else{\r\n\t\t\trowEl.classList.add(\"tabulator-row-odd\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-even\");\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t/////// External Triggers /////////\r\n\t/////// (DO NOT OVERRIDE) /////////\r\n\t///////////////////////////////////\r\n\r\n\tclear(){\r\n\t\t//clear down existing layout\r\n\t\tthis.clearRows();\r\n\t\tthis.clearColumns();\r\n\t}\r\n\r\n\trender(){\r\n\t\t//render from a clean slate\r\n\t\tthis.renderRows();\r\n\t\tthis.renderColumns();\r\n\t}\r\n\r\n\trerender(callback){\r\n\t\t// rerender and keep position\r\n\t\tthis.rerenderRows();\r\n\t\tthis.rerenderColumns();\r\n\t}\r\n\r\n\tscrollToRowPosition(row, position, ifVisible){\r\n\t\tvar rowIndex = this.rows().indexOf(row),\r\n\t\trowEl = row.getElement(),\r\n\t\toffset = 0;\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tif(rowIndex > -1){\r\n\r\n\t\t\t\tif(typeof ifVisible === \"undefined\"){\r\n\t\t\t\t\tifVisible = this.table.options.scrollToRowIfVisible;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//check row visibility\r\n\t\t\t\tif(!ifVisible){\r\n\t\t\t\t\tif(Helpers.elVisible(rowEl)){\r\n\t\t\t\t\t\toffset = Helpers.elOffset(rowEl).top - Helpers.elOffset(this.elementVertical).top;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(offset > 0 && offset < this.elementVertical.clientHeight - rowEl.offsetHeight){\r\n\t\t\t\t\t\t\tresolve();\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(typeof position === \"undefined\"){\r\n\t\t\t\t\tposition = this.table.options.scrollToRowPosition;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(position === \"nearest\"){\r\n\t\t\t\t\tposition = this.scrollToRowNearestTop(row) ? \"top\" : \"bottom\"\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//scroll to row\r\n\t\t\t\tthis.scrollToRow(row);\r\n\r\n\t\t\t\t//align to correct position\r\n\t\t\t\tswitch(position){\r\n\t\t\t\t\tcase \"middle\":\r\n\t\t\t\t\tcase \"center\":\r\n\r\n\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop + (rowEl.offsetTop - this.elementVertical.scrollTop) - ((this.elementVertical.scrollHeight - rowEl.offsetTop) / 2);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.clientHeight / 2);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"bottom\":\r\n\r\n\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.scrollHeight - rowEl.offsetTop) + rowEl.offsetHeight;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - this.elementVertical.clientHeight + rowEl.offsetHeight;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresolve();\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - Row not visible\");\r\n\t\t\t\treject(\"Scroll Error - Row not visible\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class BaiscHorizontal extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t}\r\n\r\n\trenderRowCells(row){\r\n\t\trow.cells.forEach((cell) => {\r\n\t\t\trow.element.appendChild(cell.getElement());\r\n\t\t\tcell.cellRendered();\r\n\t\t});\r\n\t}\r\n\r\n\treinitializeColumnWidths(columns){\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t});\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class VirtualDomHorizontal extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.leftCol = 0;\r\n\t\tthis.rightCol = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = 0;\r\n\t\tthis.vDomScrollPosRight = 0;\r\n\t\t\r\n\t\tthis.vDomPadLeft = 0;\r\n\t\tthis.vDomPadRight = 0;\r\n\t\t\r\n\t\tthis.fitDataColAvg = 0;\r\n\t\t\r\n\t\tthis.windowBuffer = 200; //pixel margin to make column visible before it is shown on screen\r\n\t\t\r\n\t\tthis.visibleRows = null;\r\n\r\n\t\tthis.initialized = false;\r\n\t\tthis.isFitData = false;\r\n\t\t\r\n\t\tthis.columns = [];\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.compatibilityCheck();\r\n\t\tthis.layoutCheck();\r\n\t\tthis.vertScrollListen();\r\n\t}\r\n\t\r\n\tcompatibilityCheck(){\r\n\t\tvar columns = this.options(\"columns\"),\r\n\t\tfrozen = false,\r\n\t\tok = true;\r\n\t\t\r\n\t\tif(this.options(\"layout\") == \"fitDataTable\"){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with fitDataTable layout mode\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.options(\"responsiveLayout\")){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with responsive columns\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.options(\"rtl\")){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not currently compatible with RTL text direction\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(columns){\r\n\t\t\tfrozen = columns.find((col) => {\r\n\t\t\t\treturn col.frozen;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(frozen){\r\n\t\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with frozen columns\");\r\n\t\t\t\tok = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// if(!ok){\r\n\t\t// \toptions.virtualDomHoz = false;\r\n\t\t// }\r\n\t\t\r\n\t\treturn ok;\r\n\t}\r\n\t\r\n\tlayoutCheck(){\r\n\t\tthis.isFitData = this.options(\"layout\").startsWith('fitData');\r\n\t}\r\n\r\n\tvertScrollListen(){\r\n\t\tthis.subscribe(\"scroll-vertical\", this.clearVisRowCache.bind(this));\r\n\t\tthis.subscribe(\"data-refreshed\", this.clearVisRowCache.bind(this));\r\n\t}\r\n\r\n\tclearVisRowCache(){\r\n\t\tthis.visibleRows = null;\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t///////// Public Functions ///////////\r\n\t//////////////////////////////////////\r\n\t\r\n\trenderColumns(row, force){\r\n\t\tthis.dataChange();\r\n\t}\r\n\r\n\t\r\n\tscrollColumns(left, dir){\r\n\t\tif(this.scrollLeft != left){\r\n\t\t\tthis.scrollLeft = left;\r\n\t\t\t\r\n\t\t\tthis.scroll(left - (this.vDomScrollPosLeft + this.windowBuffer));\r\n\t\t}\r\n\t}\r\n\t\r\n\tcalcWindowBuffer(){\r\n\t\tvar buffer = this.elementVertical.clientWidth;\r\n\t\t\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvar width = column.getWidth();\r\n\t\t\t\t\r\n\t\t\t\tif(width > buffer){\r\n\t\t\t\t\tbuffer = width;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.windowBuffer = buffer * 2;\r\n\t}\r\n\t\r\n\trerenderColumns(update, blockRedraw){\t\t\r\n\t\tvar old = {\r\n\t\t\tcols:this.columns,\r\n\t\t\tleftCol:this.leftCol,\r\n\t\t\trightCol:this.rightCol,\r\n\t\t},\r\n\t\tcolPos = 0;\r\n\t\t\r\n\t\t\r\n\t\tif(update && !this.initialized){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tthis.clear();\r\n\t\t\r\n\t\tthis.calcWindowBuffer();\r\n\t\t\r\n\t\tthis.scrollLeft = this.elementVertical.scrollLeft;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = this.scrollLeft - this.windowBuffer;\r\n\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\r\n\t\t\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tvar config = {};\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvar width = column.getWidth();\r\n\t\t\t\t\r\n\t\t\t\tconfig.leftPos = colPos;\r\n\t\t\t\tconfig.rightPos = colPos + width;\r\n\t\t\t\t\r\n\t\t\t\tconfig.width = width;\r\n\t\t\t\t\r\n\t\t\t\tif (this.isFitData) {\r\n\t\t\t\t\tconfig.fitDataCheck = column.modules.vdomHoz ? column.modules.vdomHoz.fitDataCheck : true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif((colPos + width > this.vDomScrollPosLeft) && (colPos < this.vDomScrollPosRight)){\r\n\t\t\t\t\t//column is visible\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.leftCol == -1){\r\n\t\t\t\t\t\tthis.leftCol = this.columns.length;\r\n\t\t\t\t\t\tthis.vDomPadLeft = colPos;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.rightCol = this.columns.length;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// column is hidden\r\n\t\t\t\t\tif(this.leftCol !== -1){\r\n\t\t\t\t\t\tthis.vDomPadRight += width;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.columns.push(column);\r\n\t\t\t\t\r\n\t\t\t\tcolumn.modules.vdomHoz = config;\r\n\t\t\t\t\r\n\t\t\t\tcolPos += width;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t\r\n\t\tthis.initialized = true;\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tif(!update || this.reinitChanged(old)){\r\n\t\t\t\tthis.reinitializeRows();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.elementVertical.scrollLeft = this.scrollLeft;\r\n\t}\r\n\t\r\n\trenderRowCells(row){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.initializeRow(row);\r\n\t\t}else{\r\n\t\t\trow.cells.forEach((cell) => {\r\n\t\t\t\trow.element.appendChild(cell.getElement());\r\n\t\t\t\tcell.cellRendered();\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\trerenderRowCells(row, force){\r\n\t\tthis.reinitializeRow(row, force);\r\n\t}\r\n\t\r\n\treinitializeColumnWidths(columns){\r\n\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\r\n\t\t\tthis.columns[i].reinitializeWidth();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t//////// Internal Rendering //////////\r\n\t//////////////////////////////////////\r\n\t\r\n\tdeinitialize(){\r\n\t\tthis.initialized = false;\r\n\t}\r\n\t\r\n\tclear(){\r\n\t\tthis.columns = [];\r\n\t\t\r\n\t\tthis.leftCol = -1;\r\n\t\tthis.rightCol = 0;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = 0;\r\n\t\tthis.vDomScrollPosRight = 0;\r\n\t\tthis.vDomPadLeft = 0;\r\n\t\tthis.vDomPadRight = 0;\r\n\t}\r\n\t\r\n\tdataChange(){\r\n\t\tvar change = false,\r\n\t\tcollsWidth = 0,\r\n\t\tcolEnd = 0,\r\n\t\tgroup, row, rowEl;\r\n\t\t\r\n\t\tif(this.isFitData){\r\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\t\tif(!column.definition.width && column.visible){\r\n\t\t\t\t\tchange = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(change){\r\n\t\t\t\tif(change && this.table.rowManager.getDisplayRows().length){\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar row = this.chain(\"rows-sample\", [1], [], () => {\r\n\t\t\t\t\t\treturn this.table.rowManager.getDisplayRows();\r\n\t\t\t\t\t})[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trowEl = row.getElement();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trow.generateCells();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.tableElement.appendChild(rowEl);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfor(var colEnd = 0; colEnd < row.cells.length; colEnd++){\r\n\t\t\t\t\t\t\tlet cell = row.cells[colEnd];\r\n\t\t\t\t\t\t\trowEl.appendChild(cell.getElement());\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcell.column.reinitializeWidth();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcollsWidth += cell.column.getWidth();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// if(collsWidth > this.vDomScrollPosRight){\r\n\t\t\t\t\t\t\t// \tbreak;\r\n\t\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// this.fitDataColAvg = Math.floor(collsWidth / (colEnd + 1));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// for(colEnd; colEnd < this.table.columnManager.columnsByIndex.length; colEnd++){\r\n\t\t\t\t\t\t// \tthis.table.columnManager.columnsByIndex[colEnd].setWidth(this.fitDataColAvg);\r\n\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.rerenderColumns(false, true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.options(\"layout\") === \"fitColumns\"){\r\n\t\t\t\tthis.layoutRefresh();\r\n\t\t\t\tthis.rerenderColumns(false, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitChanged(old){\r\n\t\tvar match = true;\r\n\t\t\r\n\t\tif(old.cols.length !== this.columns.length || old.leftCol !== this.leftCol || old.rightCol !== this.rightCol){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\told.cols.forEach((col, i) => {\r\n\t\t\tif(col !== this.columns[i]){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn !match;\r\n\t}\r\n\t\r\n\treinitializeRows(){\r\n\t\tvar rows = this.getVisibleRows();\r\n\t\trows.forEach((row) => {\r\n\t\t\tthis.reinitializeRow(row, true);\r\n\t\t});\r\n\t}\r\n\t\r\n\tgetVisibleRows(){\r\n\t\tif (!this.visibleRows){\r\n\t\t\tthis.visibleRows = this.table.rowManager.getVisibleRows();\r\n\t\t}\r\n\r\n\t\treturn this.visibleRows;\t\r\n\t}\r\n\t\r\n\tscroll(diff){\r\n\t\tthis.vDomScrollPosLeft += diff;\r\n\t\tthis.vDomScrollPosRight += diff;\r\n\r\n\t\tif(Math.abs(diff) > (this.windowBuffer / 2)){\r\n\t\t\tthis.rerenderColumns();\r\n\t\t}else{\r\n\t\t\tif(diff > 0){\r\n\t\t\t\t//scroll right\r\n\t\t\t\tthis.addColRight();\r\n\t\t\t\tthis.removeColLeft();\r\n\t\t\t}else{\r\n\t\t\t\t//scroll left\r\n\t\t\t\tthis.addColLeft();\r\n\t\t\t\tthis.removeColRight();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tcolPositionAdjust (start, end, diff){\r\n\t\tfor(let i = start; i < end; i++){\r\n\t\t\tlet column = this.columns[i];\r\n\t\t\t\r\n\t\t\tcolumn.modules.vdomHoz.leftPos += diff;\r\n\t\t\tcolumn.modules.vdomHoz.rightPos += diff;\r\n\t\t}\r\n\t}\r\n\t\r\n\taddColRight(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\t\r\n\t\t\tlet column = this.columns[this.rightCol + 1];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.leftPos <= this.vDomScrollPosRight){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\trow.getElement().appendChild(cell.getElement());\r\n\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.fitDataColActualWidthCheck(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.rightCol++; // Don't move this below the >= check below\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.rightCol >= (this.columns.length - 1)){\r\n\t\t\t\t\t\tthis.vDomPadRight = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomPadRight -= column.getWidth();\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\taddColLeft(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.leftCol - 1];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.rightPos >= this.vDomScrollPosLeft){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\trow.getElement().prepend(cell.getElement());\r\n\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.leftCol--; // don't move this below the <= check below\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.leftCol <= 0){ // replicating logic in addColRight\r\n\t\t\t\t\t\tthis.vDomPadLeft = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomPadLeft -= column.getWidth();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tlet diff = this.fitDataColActualWidthCheck(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(diff){\r\n\t\t\t\t\t\tthis.scrollLeft = this.elementVertical.scrollLeft = this.elementVertical.scrollLeft + diff;\r\n\t\t\t\t\t\tthis.vDomPadRight -= diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveColRight(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.rightCol];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.leftPos > this.vDomScrollPosRight){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\trow.getElement().removeChild(cell.getElement());\r\n\t\t\t\t\t\t\t} catch (ex) {\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Could not removeColRight\", ex.message)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomPadRight += column.getWidth();\r\n\t\t\t\t\tthis.rightCol --;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveColLeft(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.leftCol];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.rightPos < this.vDomScrollPosLeft){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\t\t\t\t\t\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\trow.getElement().removeChild(cell.getElement());\r\n\t\t\t\t\t\t\t} catch (ex) {\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Could not removeColLeft\", ex.message)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomPadLeft += column.getWidth();\r\n\t\t\t\t\tthis.leftCol ++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\tfitDataColActualWidthCheck(column){\r\n\t\tvar newWidth, widthDiff;\r\n\t\t\r\n\t\tif(column.modules.vdomHoz.fitDataCheck){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t\t\r\n\t\t\tnewWidth = column.getWidth();\r\n\t\t\twidthDiff = newWidth - column.modules.vdomHoz.width;\r\n\t\t\t\r\n\t\t\tif(widthDiff){\r\n\t\t\t\tcolumn.modules.vdomHoz.rightPos += widthDiff;\r\n\t\t\t\tcolumn.modules.vdomHoz.width = newWidth;\r\n\t\t\t\tthis.colPositionAdjust(this.columns.indexOf(column) + 1, this.columns.length, widthDiff);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcolumn.modules.vdomHoz.fitDataCheck = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn widthDiff;\r\n\t}\r\n\t\r\n\tinitializeRow(row){\r\n\t\tif(row.type !== \"group\"){\r\n\t\t\trow.modules.vdomHoz = {\r\n\t\t\t\tleftCol:this.leftCol,\r\n\t\t\t\trightCol:this.rightCol,\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\r\n\t\t\t\tlet column = this.columns[i];\r\n\t\t\t\t\r\n\t\t\t\tif(column && column.visible){\r\n\t\t\t\t\tlet cell = row.getCell(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\trow.getElement().appendChild(cell.getElement());\r\n\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitializeRow(row, force){\r\n\t\tif(row.type !== \"group\"){\r\n\t\t\tif(force || !row.modules.vdomHoz || row.modules.vdomHoz.leftCol !== this.leftCol || row.modules.vdomHoz.rightCol !== this.rightCol){\r\n\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\twhile(rowEl.firstChild) rowEl.removeChild(rowEl.firstChild);\r\n\t\t\t\t\r\n\t\t\t\tthis.initializeRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\nimport Column from './column/Column.js';\r\nimport ColumnComponent from './column/ColumnComponent.js';\r\nimport Helpers from './tools/Helpers.js';\r\nimport OptionsList from './tools/OptionsList.js';\r\n\r\nimport RendererBasicHorizontal from './rendering/renderers/BasicHorizontal.js';\r\nimport RendererVirtualDomHorizontal from './rendering/renderers/VirtualDomHorizontal.js';\r\n\r\nimport defaultColumnOptions from './column/defaults/options.js';\r\n\r\nexport default class ColumnManager extends CoreFeature {\r\n\r\n\tconstructor (table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.blockHozScrollEvent = false;\r\n\t\tthis.headersElement = null;\r\n\t\tthis.element = null ; //containing element\r\n\t\tthis.columns = []; // column definition object\r\n\t\tthis.columnsByIndex = []; //columns by index\r\n\t\tthis.columnsByField = {}; //columns by field\r\n\t\tthis.scrollLeft = 0;\r\n\t\tthis.optionsList = new OptionsList(this.table, \"column definition\", defaultColumnOptions);\r\n\r\n\t\tthis.renderer = null;\r\n\t}\r\n\r\n\t////////////// Setup Functions /////////////////\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeRenderer();\r\n\r\n\t\tthis.headersElement = this.createHeadersElement();\r\n\t\tthis.element = this.createHeaderElement();\r\n\r\n\t\tthis.element.insertBefore(this.headersElement, this.element.firstChild);\r\n\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t}\r\n\r\n\tinitializeRenderer(){\r\n\t\tvar renderClass;\r\n\r\n\t\tvar renderers = {\r\n\t\t\t\"virtual\": RendererVirtualDomHorizontal,\r\n\t\t\t\"basic\": RendererBasicHorizontal,\r\n\t\t};\r\n\r\n\t\tif(typeof this.table.options.renderHorizontal === \"string\"){\r\n\t\t\trenderClass = renderers[this.table.options.renderHorizontal];\r\n\t\t}else{\r\n\t\t\trenderClass = this.table.options.renderHorizontal;\r\n\t\t}\r\n\r\n\t\tif(renderClass){\r\n\t\t\tthis.renderer = new renderClass(this.table, this.element, this.tableElement);\r\n\t\t\tthis.renderer.initialize();\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Unable to find matching renderer:\", table.options.renderHorizontal);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tcreateHeadersElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-headers\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateHeaderElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-header\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\r\n\t\tif(!this.table.options.headerVisible){\r\n\t\t\tel.classList.add(\"tabulator-header-hidden\");\r\n\t\t}\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\t//return containing element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\t//return header containing element\r\n\tgetHeadersElement(){\r\n\t\treturn this.headersElement;\r\n\t}\r\n\r\n\t//scroll horizontally to match table body\r\n\tscrollHorizontal(left){\r\n\t\tvar hozAdjust = 0,\r\n\t\tscrollWidth = this.element.scrollWidth - this.table.element.clientWidth;\r\n\r\n\t\t// this.tempScrollBlock();\r\n\t\tthis.element.scrollLeft = left;\r\n\r\n\t\t//adjust for vertical scrollbar moving table when present\r\n\t\tif(left > scrollWidth){\r\n\t\t\thozAdjust = left - scrollWidth;\r\n\t\t\tthis.element.style.marginLeft = (-(hozAdjust)) + \"px\";\r\n\t\t}else{\r\n\t\t\tthis.element.style.marginLeft = 0;\r\n\t\t}\r\n\r\n\t\tthis.scrollLeft = left;\r\n\r\n\t\tthis.renderer.scrollColumns(left);\r\n\t}\r\n\r\n\t///////////// Column Setup Functions /////////////\r\n\tgenerateColumnsFromRowData(data){\r\n\t\tvar cols = [],\r\n\t\tdefinitions = this.table.options.autoColumnsDefinitions,\r\n\t\trow, sorter;\r\n\r\n\t\tif(data && data.length){\r\n\r\n\t\t\trow = data[0];\r\n\r\n\t\t\tfor(var key in row){\r\n\t\t\t\tlet col = {\r\n\t\t\t\t\tfield:key,\r\n\t\t\t\t\ttitle:key,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tlet value = row[key];\r\n\r\n\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tif(Array.isArray(value)){\r\n\t\t\t\t\t\tsorter = \"array\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){\r\n\t\t\t\t\t\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcol.sorter = sorter;\r\n\r\n\t\t\t\tcols.push(col);\r\n\t\t\t}\r\n\r\n\t\t\tif(definitions){\r\n\r\n\t\t\t\tswitch(typeof definitions){\r\n\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\tthis.table.options.columns = definitions.call(this.table, cols);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tif(Array.isArray(definitions)){\r\n\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\tvar match = definitions.find((def) => {\r\n\t\t\t\t\t\t\t\treturn def.field === col.field;\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tif(match){\r\n\t\t\t\t\t\t\t\tObject.assign(col, match);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\tif(definitions[col.field]){\r\n\t\t\t\t\t\t\t\tObject.assign(col, definitions[col.field]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.table.options.columns = cols;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.options.columns = cols;\r\n\t\t\t}\r\n\r\n\t\t\tthis.setColumns(this.table.options.columns);\r\n\t\t}\r\n\t}\r\n\r\n\tsetColumns(cols, row){\r\n\t\twhile(this.headersElement.firstChild) this.headersElement.removeChild(this.headersElement.firstChild);\r\n\r\n\t\tthis.columns = [];\r\n\t\tthis.columnsByIndex = [];\r\n\t\tthis.columnsByField = {};\r\n\r\n\t\tthis.dispatch(\"columns-loading\");\r\n\r\n\t\tcols.forEach((def, i) => {\r\n\t\t\tthis._addColumn(def);\r\n\t\t});\r\n\r\n\t\tthis._reIndexColumns();\r\n\r\n\t\tthis.dispatch(\"columns-loaded\");\r\n\r\n\t\tthis.renderer.rerenderColumns(false, true);\r\n\r\n\t\tthis.redraw(true);\r\n\t}\r\n\r\n\t_addColumn(definition, before, nextToColumn){\r\n\t\tvar column = new Column(definition, this),\r\n\t\tcolEl = column.getElement(),\r\n\t\tindex = nextToColumn ? this.findColumnIndex(nextToColumn) : nextToColumn;\r\n\r\n\t\tif(nextToColumn && index > -1){\r\n\t\t\tvar topColumn = nextToColumn.getTopColumn()\r\n\t\t\tvar parentIndex = this.columns.indexOf(topColumn);\r\n\t\t\tvar nextEl = topColumn.getElement();\r\n\r\n\t\t\tif(before){\r\n\t\t\t\tthis.columns.splice(parentIndex, 0, column);\r\n\t\t\t\tnextEl.parentNode.insertBefore(colEl, nextEl);\r\n\t\t\t}else{\r\n\t\t\t\tthis.columns.splice(parentIndex + 1, 0, column);\r\n\t\t\t\tnextEl.parentNode.insertBefore(colEl, nextEl.nextSibling);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(before){\r\n\t\t\t\tthis.columns.unshift(column);\r\n\t\t\t\tthis.headersElement.insertBefore(column.getElement(), this.headersElement.firstChild);\r\n\t\t\t}else{\r\n\t\t\t\tthis.columns.push(column);\r\n\t\t\t\tthis.headersElement.appendChild(column.getElement());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcolumn.columnRendered();\r\n\r\n\t\treturn column;\r\n\t}\r\n\r\n\tregisterColumnField(col){\r\n\t\tif(col.definition.field){\r\n\t\t\tthis.columnsByField[col.definition.field] = col;\r\n\t\t}\r\n\t}\r\n\r\n\tregisterColumnPosition(col){\r\n\t\tthis.columnsByIndex.push(col);\r\n\t}\r\n\r\n\t_reIndexColumns(){\r\n\t\tthis.columnsByIndex = [];\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.reRegisterPosition();\r\n\t\t});\r\n\t}\r\n\r\n\t//ensure column headers take up the correct amount of space in column groups\r\n\tverticalAlignHeaders(){\r\n\t\tvar minHeight = 0;\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\tvar height;\r\n\r\n\t\t\tcolumn.clearVerticalAlign();\r\n\r\n\t\t\theight = column.getHeight();\r\n\r\n\t\t\tif(height > minHeight){\r\n\t\t\t\tminHeight = height;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\tcolumn.verticalAlign(this.table.options.columnHeaderVertAlign, minHeight);\r\n\t\t});\r\n\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\t//////////////// Column Details /////////////////\r\n\tfindColumn(subject){\r\n\t\tif(typeof subject == \"object\"){\r\n\r\n\t\t\tif(subject instanceof Column){\r\n\t\t\t\t//subject is column element\r\n\t\t\t\treturn subject;\r\n\t\t\t}else if(subject instanceof ColumnComponent){\r\n\t\t\t\t//subject is public column component\r\n\t\t\t\treturn subject._getSelf() || false;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\t//subject is a HTML element of the column header\r\n\t\t\t\tlet match = this.columns.find((column) => {\r\n\t\t\t\t\treturn column.element === subject;\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn match || false;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the field name of the column\r\n\t\t\treturn this.columnsByField[subject] || false;\r\n\t\t}\r\n\r\n\t\t//catch all for any other type of input\r\n\t\treturn false;\r\n\t}\r\n\r\n\tgetColumnByField(field){\r\n\t\treturn this.columnsByField[field];\r\n\t}\r\n\r\n\tgetColumnsByFieldRoot(root){\r\n\t\tvar matches = [];\r\n\r\n\t\tObject.keys(this.columnsByField).forEach((field) => {\r\n\t\t\tvar fieldRoot = field.split(\".\")[0];\r\n\t\t\tif(fieldRoot === root){\r\n\t\t\t\tmatches.push(this.columnsByField[field]);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn matches;\r\n\t}\r\n\r\n\tgetColumnByIndex(index){\r\n\t\treturn this.columnsByIndex[index];\r\n\t}\r\n\r\n\tgetFirstVisibleColumn(index){\r\n\t\tvar index = this.columnsByIndex.findIndex((col) => {\r\n\t\t\treturn col.visible;\r\n\t\t});\r\n\r\n\t\treturn index > -1 ? this.columnsByIndex[index] : false;\r\n\t}\r\n\r\n\tgetColumns(){\r\n\t\treturn this.columns;\r\n\t}\r\n\r\n\tfindColumnIndex(column){\r\n\t\treturn this.columnsByIndex.findIndex((col) => {\r\n\t\t\treturn column === col;\r\n\t\t});\r\n\t}\r\n\r\n\t//return all columns that are not groups\r\n\tgetRealColumns(){\r\n\t\treturn this.columnsByIndex;\r\n\t}\r\n\r\n\t//travers across columns and call action\r\n\ttraverse(callback){\r\n\t\tthis.columnsByIndex.forEach((column,i) =>{\r\n\t\t\tcallback(column, i);\r\n\t\t});\r\n\t}\r\n\r\n\t//get defintions of actual columns\r\n\tgetDefinitions(active){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tif(!active || (active && column.visible)){\r\n\t\t\t\toutput.push(column.getDefinition());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//get full nested definition tree\r\n\tgetDefinitionTree(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\toutput.push(column.getDefinition(true));\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetComponents(structured){\r\n\t\tvar output = [],\r\n\t\tcolumns = structured ? this.columns : this.columnsByIndex;\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\toutput.push(column.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\tvar width = 0;\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tif(column.visible){\r\n\t\t\t\twidth += column.getWidth();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn width;\r\n\t}\r\n\r\n\tmoveColumn(from, to, after){\r\n\t\tthis.moveColumnActual(from, to, after);\r\n\r\n\t\tto.element.parentNode.insertBefore(from.element, to.element);\r\n\r\n\t\tif(after){\r\n\t\t\tto.element.parentNode.insertBefore(to.element, from.element);\r\n\t\t}\r\n\r\n\t\tthis.verticalAlignHeaders();\r\n\r\n\t\tthis.table.rowManager.reinitialize();\r\n\t}\r\n\r\n\tmoveColumnActual(from, to, after){\r\n\t\tif(from.parent.isGroup){\r\n\t\t\tthis._moveColumnInArray(from.parent.columns, from, to, after);\r\n\t\t}else{\r\n\t\t\tthis._moveColumnInArray(this.columns, from, to, after);\r\n\t\t}\r\n\r\n\t\tthis._moveColumnInArray(this.columnsByIndex, from, to, after, true);\r\n\r\n\t\tthis.renderer.rerenderColumns(true);\r\n\r\n\t\tthis.dispatch(\"column-moved\", from, to, after);\r\n\r\n\t\tif(this.subscribedExternal(\"columnMoved\")){\r\n\t\t\tthis.dispatchExternal(\"columnMoved\", from.getComponent(), this.table.columnManager.getComponents());\r\n\t\t}\r\n\t}\r\n\r\n\t_moveColumnInArray(columns, from, to, after, updateRows){\r\n\t\tvar\tfromIndex = columns.indexOf(from),\r\n\t\ttoIndex, rows = [];\r\n\r\n\t\tif (fromIndex > -1) {\r\n\r\n\t\t\tcolumns.splice(fromIndex, 1);\r\n\r\n\t\t\ttoIndex = columns.indexOf(to);\r\n\r\n\t\t\tif (toIndex > -1) {\r\n\r\n\t\t\t\tif(after){\r\n\t\t\t\t\ttoIndex = toIndex+1;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\ttoIndex = fromIndex;\r\n\t\t\t}\r\n\r\n\t\t\tcolumns.splice(toIndex, 0, from);\r\n\r\n\t\t\tif(updateRows){\r\n\r\n\t\t\t\trows = this.chain(\"column-moving-rows\", [from, to, after], null, []) || [];\r\n\r\n\t\t\t\trows = rows.concat(this.table.rowManager.rows);\r\n\r\n\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\tif(row.cells.length){\r\n\t\t\t\t\t\tvar cell = row.cells.splice(fromIndex, 1)[0];\r\n\t\t\t\t\t\trow.cells.splice(toIndex, 0, cell);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscrollToColumn(column, position, ifVisible){\r\n\t\tvar left = 0,\r\n\t\toffset = 0,\r\n\t\tadjust = 0,\r\n\t\tcolEl = column.getElement();\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\r\n\t\t\tif(typeof position === \"undefined\"){\r\n\t\t\t\tposition = this.table.options.scrollToColumnPosition;\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof ifVisible === \"undefined\"){\r\n\t\t\t\tifVisible = this.table.options.scrollToColumnIfVisible;\r\n\t\t\t}\r\n\r\n\t\t\tif(column.visible){\r\n\r\n\t\t\t\t//align to correct position\r\n\t\t\t\tswitch(position){\r\n\t\t\t\t\tcase \"middle\":\r\n\t\t\t\t\tcase \"center\":\r\n\t\t\t\t\tadjust = -this.element.clientWidth / 2;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"right\":\r\n\t\t\t\t\tadjust = colEl.clientWidth - this.headersElement.clientWidth;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//check column visibility\r\n\t\t\t\tif(!ifVisible){\r\n\r\n\t\t\t\t\toffset = colEl.offsetLeft;\r\n\r\n\t\t\t\t\tif(offset > 0 && offset + colEl.offsetWidth < this.element.clientWidth){\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//calculate scroll position\r\n\t\t\t\tleft = colEl.offsetLeft + adjust;\r\n\r\n\t\t\t\tleft = Math.max(Math.min(left, this.table.rowManager.element.scrollWidth - this.table.rowManager.element.clientWidth),0);\r\n\r\n\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\tthis.scrollHorizontal(left);\r\n\r\n\t\t\t\tresolve();\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - Column not visible\");\r\n\t\t\t\treject(\"Scroll Error - Column not visible\");\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\tgenerateCells(row){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tcells.push(column.generateCell(row));\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\t//////////////// Column Management /////////////////\r\n\tgetFlexBaseWidth(){\r\n\t\tvar totalWidth = this.table.element.clientWidth, //table element width\r\n\t\tfixedWidth = 0;\r\n\r\n\t\t//adjust for vertical scrollbar if present\r\n\t\tif(this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight){\r\n\t\t\ttotalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth;\r\n\t\t}\r\n\r\n\t\tthis.columnsByIndex.forEach(function(column){\r\n\t\t\tvar width, minWidth, colWidth;\r\n\r\n\t\t\tif(column.visible){\r\n\r\n\t\t\t\twidth = column.definition.width || 0;\r\n\r\n\t\t\t\tminWidth = parseInt(column.minWidth);\r\n\r\n\t\t\t\tif(typeof(width) == \"string\"){\r\n\t\t\t\t\tif(width.indexOf(\"%\") > -1){\r\n\t\t\t\t\t\tcolWidth = (totalWidth / 100) * parseInt(width) ;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tcolWidth = parseInt(width);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolWidth = width;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn fixedWidth;\r\n\t}\r\n\r\n\taddColumn(definition, before, nextToColumn){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar column = this._addColumn(definition, before, nextToColumn);\r\n\r\n\t\t\tthis._reIndexColumns();\r\n\r\n\t\t\tthis.dispatch(\"column-add\", definition, before, nextToColumn);\r\n\r\n\t\t\tif(this.layoutMode() != \"fitColumns\"){\r\n\t\t\t\tcolumn.reinitializeWidth();\r\n\t\t\t}\r\n\r\n\t\t\tthis.redraw(true);\r\n\r\n\t\t\tthis.table.rowManager.reinitialize();\r\n\r\n\t\t\tthis.renderer.rerenderColumns();\r\n\r\n\t\t\tresolve(column);\r\n\t\t});\r\n\t}\r\n\r\n\t//remove column from system\r\n\tderegisterColumn(column){\r\n\t\tvar field = column.getField(),\r\n\t\tindex;\r\n\r\n\t\t//remove from field list\r\n\t\tif(field){\r\n\t\t\tdelete this.columnsByField[field];\r\n\t\t}\r\n\r\n\t\t//remove from index list\r\n\t\tindex = this.columnsByIndex.indexOf(column);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columnsByIndex.splice(index, 1);\r\n\t\t}\r\n\r\n\t\t//remove from column list\r\n\t\tindex = this.columns.indexOf(column);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columns.splice(index, 1);\r\n\t\t}\r\n\r\n\t\tthis.verticalAlignHeaders();\r\n\r\n\t\tthis.redraw();\r\n\t}\r\n\r\n\t//redraw columns\r\n\tredraw(force){\r\n\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\tthis.verticalAlignHeaders();\r\n\t\t}\r\n\r\n\t\tif(force){\r\n\t\t\tthis.table.rowManager.resetScroll();\r\n\t\t\tthis.table.rowManager.reinitialize();\r\n\t\t}\r\n\r\n\t\tif(!this.confirm(\"table-redrawing\", force)){\r\n\t\t\tthis.layoutRefresh();\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"table-redraw\", force);\r\n\r\n\t\tthis.table.footerManager.redraw();\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class BaiscVertical extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.verticalFillMode = \"fill\";\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t}\r\n\r\n\tclearRows(){\r\n\t\tvar element = this.tableElement;\r\n\r\n\t\t// element.children.detach();\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\telement.scrollTop = 0;\r\n\t\telement.scrollLeft = 0;\r\n\r\n\t\telement.style.minWidth = \"\";\r\n\t\telement.style.minHeight = \"\";\r\n\t\telement.style.display = \"\";\r\n\t\telement.style.visibility = \"\";\r\n\t}\r\n\r\n\trenderRows(){\r\n\t\tvar element = this.tableElement,\r\n\t\tonlyGroupHeaders = true;\r\n\r\n\t\tthis.rows().forEach((row, index) => {\r\n\t\t\tthis.styleRow(row, index);\r\n\t\t\telement.appendChild(row.getElement());\r\n\t\t\trow.initialize(true);\r\n\r\n\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\tonlyGroupHeaders = false;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(onlyGroupHeaders){\r\n\t\t\telement.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t}else{\r\n\t\t\telement.style.minWidth = \"\";\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trerenderRows(callback){\r\n\t\tthis.clearRows();\r\n\t\tthis.renderRows();\r\n\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\tvar rowTop = Helpers.elOffset(row.getElement()).top;\r\n\r\n\t\treturn !(Math.abs(this.elementVertical.scrollTop - rowTop) > Math.abs(this.elementVertical.scrollTop + this.elementVertical.clientHeight - rowTop));\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tthis.elementVertical.scrollTop = Helpers.elOffset(rowEl).top - Helpers.elOffset(this.elementVertical).top + this.elementVertical.scrollTop;\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\treturn this.rows();\r\n\t}\r\n\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class VirtualDomVertical extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.verticalFillMode = \"fill\";\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.vDomRowHeight = 20; //approximation of row heights for padding\r\n\r\n\t\tthis.vDomTop = 0; //hold position for first rendered row in the virtual DOM\r\n\t\tthis.vDomBottom = 0; //hold possition for last rendered row in the virtual DOM\r\n\r\n\t\tthis.vDomScrollPosTop = 0; //last scroll position of the vDom top;\r\n\t\tthis.vDomScrollPosBottom = 0; //last scroll position of the vDom bottom;\r\n\r\n\t\tthis.vDomTopPad = 0; //hold value of padding for top of virtual DOM\r\n\t\tthis.vDomBottomPad = 0; //hold value of padding for bottom of virtual DOM\r\n\r\n\t\tthis.vDomMaxRenderChain = 90; //the maximum number of dom elements that can be rendered in 1 go\r\n\r\n\t\tthis.vDomWindowBuffer = 0; //window row buffer before removing elements, to smooth scrolling\r\n\r\n\t\tthis.vDomWindowMinTotalRows = 20; //minimum number of rows to be generated in virtual dom (prevent buffering issues on tables with tall rows)\r\n\t\tthis.vDomWindowMinMarginRows = 5; //minimum number of rows to be generated in virtual dom margin\r\n\r\n\t\tthis.vDomTopNewRows = []; //rows to normalize after appending to optimize render speed\r\n\t\tthis.vDomBottomNewRows = []; //rows to normalize after appending to optimize render speed\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t///////// Public Functions ///////////\r\n\t//////////////////////////////////////\r\n\r\n\tclearRows(){\r\n\t\tvar element = this.tableElement;\r\n\r\n\t\t// element.children.detach();\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\telement.style.paddingTop = \"\";\r\n\t\telement.style.paddingBottom = \"\";\r\n\t\t// element.style.minWidth = \"\";\r\n\t\telement.style.minHeight = \"\";\r\n\t\telement.style.display = \"\";\r\n\t\telement.style.visibility = \"\";\r\n\r\n\t\tthis.elementVertical.scrollTop = 0;\r\n\t\tthis.elementVertical.scrollLeft = 0;\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.vDomTop = 0;\r\n\t\tthis.vDomBottom = 0;\r\n\t\tthis.vDomTopPad = 0;\r\n\t\tthis.vDomBottomPad = 0;\r\n\t\tthis.vDomScrollPosTop = 0;\r\n\t\tthis.vDomScrollPosBottom = 0;\r\n\t}\r\n\r\n\trenderRows(){\r\n\t\tthis._virtualRenderFill();\r\n\t}\r\n\r\n\trerenderRows(callback){\r\n\t\tvar scrollTop = this.elementVertical.scrollTop;\r\n\t\tvar topRow = false;\r\n\t\tvar topOffset = false;\r\n\r\n\t\tvar left = this.table.rowManager.scrollLeft;\r\n\r\n\t\tvar rows = this.rows();\r\n\r\n\t\tfor(var i = this.vDomTop; i <= this.vDomBottom; i++){\r\n\r\n\t\t\tif(rows[i]){\r\n\t\t\t\tvar diff = scrollTop - rows[i].getElement().offsetTop;\r\n\r\n\t\t\t\tif(topOffset === false || Math.abs(diff) < topOffset){\r\n\t\t\t\t\ttopOffset = diff;\r\n\t\t\t\t\ttopRow = i;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\trows.forEach((row) => {\r\n\t\t\trow.deinitializeHeight();\r\n\t\t});\r\n\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\r\n\t\tthis._virtualRenderFill((topRow === false ? this.rows.length - 1 : topRow), true, topOffset || 0);\r\n\r\n\t\tthis.scrollColumns(left);\r\n\t}\r\n\r\n\tscrollColumns(left){\r\n\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t}\r\n\r\n\tscrollRows(top, dir){\r\n\t\tvar topDiff = top - this.vDomScrollPosTop;\r\n\t\tvar bottomDiff = top - this.vDomScrollPosBottom;\r\n\t\tvar margin = this.vDomWindowBuffer * 2;\r\n\t\tvar rows = this.rows();\r\n\r\n\t\tthis.scrollTop = top;\r\n\r\n\t\tif(-topDiff > margin || bottomDiff > margin){\r\n\t\t\t//if big scroll redraw table;\r\n\t\t\tvar left = this.table.rowManager.scrollLeft;\r\n\t\t\tthis._virtualRenderFill(Math.floor((this.elementVertical.scrollTop / this.elementVertical.scrollHeight) * rows.length));\r\n\t\t\tthis.scrollColumns(left);\r\n\t\t}else{\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\t//scrolling up\r\n\t\t\t\tif(topDiff < 0){\r\n\t\t\t\t\tthis._addTopRow(rows, -topDiff);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(bottomDiff < 0){\r\n\t\t\t\t\t//hide bottom row if needed\r\n\t\t\t\t\tif(this.vDomScrollHeight - this.scrollTop > this.vDomWindowBuffer){\r\n\t\t\t\t\t\tthis._removeBottomRow(rows, -bottomDiff);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomScrollPosBottom = this.scrollTop;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\r\n\t\t\t\tif(bottomDiff >= 0){\r\n\t\t\t\t\tthis._addBottomRow(rows, bottomDiff);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//scrolling down\r\n\t\t\t\tif(topDiff >= 0){\r\n\t\t\t\t\t//hide top row if needed\r\n\t\t\t\t\tif(this.scrollTop > this.vDomWindowBuffer){\r\n\t\t\t\t\t\tthis._removeTopRow(rows, topDiff);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomScrollPosTop = this.scrollTop;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tresize(){\r\n\t\tthis.vDomWindowBuffer = this.table.options.renderVerticalBuffer || this.elementVertical.clientHeight;\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\tvar rowIndex = this.rows().indexOf(row);\r\n\r\n\t\treturn !(Math.abs(this.vDomTop - rowIndex) > Math.abs(this.vDomBottom - rowIndex));\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\tvar index = this.rows().indexOf(row);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis._virtualRenderFill(index, true);\r\n\t\t}\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\tvar topEdge = this.elementVertical.scrollTop,\r\n\t\tbottomEdge = this.elementVertical.clientHeight + topEdge,\r\n\t\ttopFound = false,\r\n\t\ttopRow = 0,\r\n\t\tbottomRow = 0,\r\n\t\trows = this.rows();\r\n\r\n\t\tif(includingBuffer){\r\n\t\t\ttopRow = this.vDomTop;\r\n\t\t\tbottomRow = this.vDomBottom;\r\n\t\t}else{\r\n\t\t\tfor(var i = this.vDomTop; i <= this.vDomBottom; i++){\r\n\t\t\t\tif(rows[i]){\r\n\t\t\t\t\tif(!topFound){\r\n\t\t\t\t\t\tif((topEdge - rows[i].getElement().offsetTop) >= 0){\r\n\t\t\t\t\t\t\ttopRow = i;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\ttopFound = true;\r\n\r\n\t\t\t\t\t\t\tif(bottomEdge - rows[i].getElement().offsetTop >= 0){\r\n\t\t\t\t\t\t\t\tbottomRow = i;\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(bottomEdge - rows[i].getElement().offsetTop >= 0){\r\n\t\t\t\t\t\t\tbottomRow = i;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn rows.slice(topRow, bottomRow + 1);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t//////// Internal Rendering //////////\r\n\t//////////////////////////////////////\r\n\r\n\t//full virtual render\r\n\t_virtualRenderFill(position, forceMove, offset){\r\n\t\tvar\telement = this.tableElement,\r\n\t\tholder = this.elementVertical,\r\n\t\ttopPad = 0,\r\n\t\trowsHeight = 0,\r\n\t\theightOccupied = 0,\r\n\t\ttopPadHeight = 0,\r\n\t\ti = 0,\r\n\t\trows = this.rows(),\r\n\t\trowsCount = rows.length,\r\n\t\tcontainerHeight = this.elementVertical.clientHeight;\r\n\r\n\t\tposition = position || 0;\r\n\r\n\t\toffset = offset || 0;\r\n\r\n\t\tif(!position){\r\n\t\t\tthis.clear();\r\n\t\t}else{\r\n\t\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\t\t//check if position is too close to bottom of table\r\n\t\t\theightOccupied = (rowsCount - position + 1) * this.vDomRowHeight;\r\n\r\n\t\t\tif(heightOccupied < containerHeight){\r\n\t\t\t\tposition -= Math.ceil((containerHeight - heightOccupied) / this.vDomRowHeight);\r\n\t\t\t\tif(position < 0){\r\n\t\t\t\t\tposition = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//calculate initial pad\r\n\t\t\ttopPad = Math.min(Math.max(Math.floor(this.vDomWindowBuffer / this.vDomRowHeight), this.vDomWindowMinMarginRows), position);\r\n\t\t\tposition -= topPad;\r\n\t\t}\r\n\r\n\t\tif(rowsCount && Helpers.elVisible(this.elementVertical)){\r\n\t\t\tthis.vDomTop = position;\r\n\r\n\t\t\tthis.vDomBottom = position -1;\r\n\r\n\t\t\twhile ((rowsHeight <= containerHeight + this.vDomWindowBuffer || i < this.vDomWindowMinTotalRows) && this.vDomBottom < rowsCount -1){\r\n\t\t\t\tvar index = this.vDomBottom + 1,\r\n\t\t\t\trow = rows[index],\r\n\t\t\t\trowHeight = 0;\r\n\r\n\t\t\t\tthis.styleRow(row, index);\r\n\r\n\t\t\t\telement.appendChild(row.getElement());\r\n\r\n\t\t\t\trow.initialize();\r\n\r\n\t\t\t\tif(!row.heightInitialized){\r\n\t\t\t\t\trow.normalizeHeight(true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowHeight = row.getHeight();\r\n\r\n\t\t\t\tif(i < topPad){\r\n\t\t\t\t\ttopPadHeight += rowHeight;\r\n\t\t\t\t}else{\r\n\t\t\t\t\trowsHeight += rowHeight;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.vDomBottom ++;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\r\n\t\t\tif(!position){\r\n\t\t\t\tthis.vDomTopPad = 0;\r\n\t\t\t\t//adjust rowheight to match average of rendered elements\r\n\t\t\t\tthis.vDomRowHeight = Math.floor((rowsHeight + topPadHeight) / i);\r\n\t\t\t\tthis.vDomBottomPad = this.vDomRowHeight * (rowsCount - this.vDomBottom -1);\r\n\r\n\t\t\t\tthis.vDomScrollHeight = topPadHeight + rowsHeight + this.vDomBottomPad - containerHeight;\r\n\t\t\t}else{\r\n\t\t\t\tthis.vDomTopPad = !forceMove ? this.scrollTop - topPadHeight : (this.vDomRowHeight * this.vDomTop) + offset;\r\n\t\t\t\tthis.vDomBottomPad = this.vDomBottom == rowsCount-1 ? 0 : Math.max(this.vDomScrollHeight - this.vDomTopPad - rowsHeight - topPadHeight, 0);\r\n\t\t\t}\r\n\r\n\t\t\telement.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\telement.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\r\n\t\t\tif(forceMove){\r\n\t\t\t\tthis.scrollTop = this.vDomTopPad + (topPadHeight) + offset - (this.elementVertical.scrollWidth > this.elementVertical.clientWidth ? this.elementVertical.offsetHeight - containerHeight : 0);\r\n\t\t\t}\r\n\r\n\t\t\tthis.scrollTop = Math.min(this.scrollTop, this.elementVertical.scrollHeight - containerHeight);\r\n\r\n\t\t\t//adjust for horizontal scrollbar if present (and not at top of table)\r\n\t\t\tif(this.elementVertical.scrollWidth > this.elementVertical.offsetWidth && forceMove){\r\n\t\t\t\tthis.scrollTop += this.elementVertical.offsetHeight - containerHeight;\r\n\t\t\t}\r\n\r\n\t\t\tthis.vDomScrollPosTop = this.scrollTop;\r\n\t\t\tthis.vDomScrollPosBottom = this.scrollTop;\r\n\r\n\t\t\tholder.scrollTop = this.scrollTop;\r\n\r\n\t\t\tthis.dispatch(\"render-virtual-fill\");\r\n\t\t}\r\n\t}\r\n\r\n\t_addTopRow(rows, fillableSpace){\r\n\t\tvar table = this.tableElement,\r\n\t\taddedRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\tindex = this.vDomTop -1,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tif(this.vDomTop){\r\n\t\t\t\tlet row = rows[index],\r\n\t\t\t\trowHeight, initialized;\r\n\r\n\t\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\t\t\t\t\tinitialized = row.initialized;\r\n\r\n\t\t\t\t\tif(fillableSpace >= rowHeight){\r\n\r\n\t\t\t\t\t\tthis.styleRow(row, index);\r\n\t\t\t\t\t\ttable.insertBefore(row.getElement(), table.firstChild);\r\n\r\n\t\t\t\t\t\tif(!row.initialized || !row.heightInitialized){\r\n\t\t\t\t\t\t\taddedRows.push(row);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trow.initialize();\r\n\r\n\t\t\t\t\t\tif(!initialized){\r\n\t\t\t\t\t\t\trowHeight = row.getElement().offsetHeight;\r\n\r\n\t\t\t\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\t\tthis.vDomTop--;\r\n\t\t\t\t\t\tindex--;\r\n\t\t\t\t\t\ti++;\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of addedRows){\r\n\t\t\trow.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis._quickNormalizeRowHeight(addedRows);\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomTopPad -= paddingAdjust;\r\n\r\n\t\t\tif(this.vDomTopPad < 0){\r\n\t\t\t\tthis.vDomTopPad = index * this.vDomRowHeight;\r\n\t\t\t}\r\n\r\n\t\t\tif(index < 1){\r\n\t\t\t\tthis.vDomTopPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\ttable.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\tthis.vDomScrollPosTop -= paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_removeTopRow(rows, fillableSpace){\r\n\t\tvar removableRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[this.vDomTop],\r\n\t\t\trowHeight, diff;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\t\t\t\t\tthis.vDomTop++;\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tremovableRows.push(row);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of removableRows){\r\n\t\t\tlet rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomTopPad += paddingAdjust;\r\n\t\t\tthis.tableElement.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\tthis.vDomScrollPosTop += this.vDomTop ? paddingAdjust : paddingAdjust + this.vDomWindowBuffer;\r\n\t\t}\r\n\t}\r\n\r\n\t_addBottomRow(rows, fillableSpace){\r\n\t\tvar table = this.tableElement,\r\n\t\taddedRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\tindex = this.vDomBottom + 1,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[index],\r\n\t\t\trowHeight, initialized;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\t\t\t\tinitialized = row.initialized;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\r\n\t\t\t\t\tthis.styleRow(row, index);\r\n\t\t\t\t\ttable.appendChild(row.getElement());\r\n\r\n\t\t\t\t\tif(!row.initialized || !row.heightInitialized){\r\n\t\t\t\t\t\taddedRows.push(row);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\trow.initialize();\r\n\r\n\t\t\t\t\tif(!initialized){\r\n\t\t\t\t\t\trowHeight = row.getElement().offsetHeight;\r\n\r\n\t\t\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tthis.vDomBottom++;\r\n\t\t\t\t\tindex++;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of addedRows){\r\n\t\t\trow.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis._quickNormalizeRowHeight(addedRows);\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomBottomPad -= paddingAdjust;\r\n\r\n\t\t\tif(this.vDomBottomPad < 0 || index == rows.length -1){\r\n\t\t\t\tthis.vDomBottomPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\ttable.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\t\t\tthis.vDomScrollPosBottom += paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_removeBottomRow(rows, fillableSpace){\r\n\t\tvar removableRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[this.vDomBottom],\r\n\t\t\trowHeight, diff;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\t\t\t\t\tthis.vDomBottom --;\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tremovableRows.push(row);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of removableRows){\r\n\t\t\tlet rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomBottomPad += paddingAdjust;\r\n\r\n\t\t\tif(this.vDomBottomPad < 0){\r\n\t\t\t\tthis.vDomBottomPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\tthis.tableElement.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\t\t\tthis.vDomScrollPosBottom -= paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_quickNormalizeRowHeight(rows){\r\n\t\tfor(let row of rows){\r\n\t\t\trow.calcHeight();\r\n\t\t}\r\n\r\n\t\tfor(let row of rows){\r\n\t\t\trow.setCellHeight();\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\nimport Row from './row/Row.js';\r\nimport RowComponent from './row/RowComponent.js';\r\nimport Helpers from './tools/Helpers.js';\r\n\r\nimport RendererBasicVertical from './rendering/renderers/BasicVertical.js';\r\nimport RendererVirtualDomVertical from './rendering/renderers/VirtualDomVertical.js';\r\n\r\nexport default class RowManager extends CoreFeature{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.element = this.createHolderElement(); //containing element\r\n\t\tthis.tableElement = this.createTableElement(); //table element\r\n\t\tthis.heightFixer = this.createTableElement(); //table element\r\n\t\tthis.placeholder = null; //placeholder element\r\n\t\tthis.placeholderContents = null; //placeholder element\r\n\t\t\r\n\t\tthis.firstRender = false; //handle first render\r\n\t\tthis.renderMode = \"virtual\"; //current rendering mode\r\n\t\tthis.fixedHeight = false; //current rendering mode\r\n\t\t\r\n\t\tthis.rows = []; //hold row data objects\r\n\t\tthis.activeRowsPipeline = []; //hold calculation of active rows\r\n\t\tthis.activeRows = []; //rows currently available to on display in the table\r\n\t\tthis.activeRowsCount = 0; //count of active rows\r\n\t\t\r\n\t\tthis.displayRows = []; //rows currently on display in the table\r\n\t\tthis.displayRowsCount = 0; //count of display rows\r\n\t\t\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.rowNumColumn = false; //hold column component for row number column\r\n\t\t\r\n\t\tthis.redrawBlock = false; //prevent redraws to allow multiple data manipulations before continuing\r\n\t\tthis.redrawBlockRestoreConfig = false; //store latest redraw function calls for when redraw is needed\r\n\t\tthis.redrawBlockRenderInPosition = false; //store latest redraw function calls for when redraw is needed\r\n\t\t\r\n\t\tthis.dataPipeline = []; //hold data pipeline tasks\r\n\t\tthis.displayPipeline = []; //hold data display pipeline tasks\r\n\t\t\r\n\t\tthis.renderer = null;\r\n\t}\r\n\t\r\n\t//////////////// Setup Functions /////////////////\r\n\t\r\n\tcreateHolderElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-tableholder\");\r\n\t\tel.setAttribute(\"tabindex\", 0);\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tcreateTableElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-table\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tinitializePlaceholder(){\r\n\t\t//configure placeholder element\r\n\t\tif(typeof this.table.options.placeholder == \"string\"){\r\n\t\t\tlet el = document.createElement(\"div\");\r\n\t\t\tel.classList.add(\"tabulator-placeholder\");\r\n\t\t\t\r\n\t\t\tlet contents = document.createElement(\"div\");\r\n\t\t\tcontents.classList.add(\"tabulator-placeholder-contents\");\r\n\t\t\tcontents.innerHTML = this.table.options.placeholder;\r\n\t\t\t\r\n\t\t\tel.appendChild(contents);\r\n\t\t\t\r\n\t\t\tthis.placeholderContents = contents;\r\n\t\t\tthis.placeholder = el;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return containing element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\t\r\n\t//return table element\r\n\tgetTableElement(){\r\n\t\treturn this.tableElement;\r\n\t}\r\n\t\r\n\t//return position of row in table\r\n\tgetRowPosition(row, active){\r\n\t\tif(active){\r\n\t\t\treturn this.activeRows.indexOf(row);\r\n\t\t}else{\r\n\t\t\treturn this.rows.indexOf(row);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.initializePlaceholder()\r\n\t\tthis.initializeRenderer();\r\n\t\t\r\n\t\t//initialize manager\r\n\t\tthis.element.appendChild(this.tableElement);\r\n\t\t\r\n\t\tthis.firstRender = true;\r\n\t\t\r\n\t\t//scroll header along with table body\r\n\t\tthis.element.addEventListener(\"scroll\", () => {\r\n\t\t\tvar left = this.element.scrollLeft,\r\n\t\t\tleftDir = this.scrollLeft > left,\r\n\t\t\ttop = this.element.scrollTop,\r\n\t\t\ttopDir = this.scrollTop > top;\r\n\t\t\t\r\n\t\t\t//handle horizontal scrolling\r\n\t\t\tif(this.scrollLeft != left){\r\n\t\t\t\tthis.scrollLeft = left;\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"scroll-horizontal\", left, leftDir);\r\n\t\t\t\tthis.dispatchExternal(\"scrollHorizontal\", left, leftDir);\r\n\r\n\t\t\t\tthis._positionPlaceholder();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//handle vertical scrolling\r\n\t\t\tif(this.scrollTop != top){\r\n\t\t\t\tthis.scrollTop = top;\r\n\t\t\t\t\r\n\t\t\t\tthis.renderer.scrollRows(top, topDir);\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"scroll-vertical\", top, topDir);\r\n\t\t\t\tthis.dispatchExternal(\"scrollVertical\", top, topDir);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t////////////////// Row Manipulation //////////////////\r\n\tfindRow(subject){\r\n\t\tif(typeof subject == \"object\"){\r\n\t\t\tif(subject instanceof Row){\r\n\t\t\t\t//subject is row element\r\n\t\t\t\treturn subject;\r\n\t\t\t}else if(subject instanceof RowComponent){\r\n\t\t\t\t//subject is public row component\r\n\t\t\t\treturn subject._getSelf() || false;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\t//subject is a HTML element of the row\r\n\t\t\t\tlet match = this.rows.find((row) => {\r\n\t\t\t\t\treturn row.getElement() === subject;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\treturn match || false;\r\n\t\t\t}\r\n\t\t}else if(typeof subject == \"undefined\" || subject === null){\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the index of the row\r\n\t\t\tlet match = this.rows.find((row) => {\r\n\t\t\t\treturn row.data[this.table.options.index] == subject;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\treturn match || false;\r\n\t\t}\r\n\t\t\r\n\t\t//catch all for any other type of input\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tgetRowFromDataObject(data){\r\n\t\tvar match = this.rows.find((row) => {\r\n\t\t\treturn row.data === data;\r\n\t\t});\r\n\t\t\r\n\t\treturn match || false;\r\n\t}\r\n\t\r\n\tgetRowFromPosition(position, active){\r\n\t\tif(active){\r\n\t\t\treturn this.activeRows[position];\r\n\t\t}else{\r\n\t\t\treturn this.rows[position];\r\n\t\t}\r\n\t}\r\n\t\r\n\tscrollToRow(row, position, ifVisible){\r\n\t\treturn this.renderer.scrollToRowPosition(row, position, ifVisible);\r\n\t}\r\n\t\r\n\t////////////////// Data Handling //////////////////\r\n\tsetData(data, renderInPosition, columnsChanged){\r\n\t\treturn new Promise((resolve, reject)=>{\r\n\t\t\tif(renderInPosition && this.getDisplayRows().length){\r\n\t\t\t\tif(this.table.options.pagination){\r\n\t\t\t\t\tthis._setDataActual(data, true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.reRenderInPosition(() => {\r\n\t\t\t\t\t\tthis._setDataActual(data);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.options.autoColumns && columnsChanged && this.table.initialized){\r\n\t\t\t\t\tthis.table.columnManager.generateColumnsFromRowData(data);\r\n\t\t\t\t}\r\n\t\t\t\tthis.resetScroll();\r\n\t\t\t\t\r\n\t\t\t\tthis._setDataActual(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\t\r\n\t_setDataActual(data, renderInPosition){\r\n\t\tthis.dispatchExternal(\"dataProcessing\", data);\r\n\t\t\r\n\t\tthis._wipeElements();\r\n\t\t\r\n\t\tif(Array.isArray(data)){\r\n\t\t\tthis.dispatch(\"data-processing\", data);\r\n\t\t\t\r\n\t\t\tdata.forEach((def, i) => {\r\n\t\t\t\tif(def && typeof def === \"object\"){\r\n\t\t\t\t\tvar row = new Row(def, this);\r\n\t\t\t\t\tthis.rows.push(row);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Data Loading Warning - Invalid row data detected and ignored, expecting object but received:\", def);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.refreshActiveData(false, false, renderInPosition);\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"data-processed\", data);\r\n\t\t\tthis.dispatchExternal(\"dataProcessed\", data);\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Data Loading Error - Unable to process data due to invalid data type \\nExpecting: array \\nReceived: \", typeof data, \"\\nData: \", data);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_wipeElements(){\r\n\t\tthis.dispatch(\"rows-wipe\");\r\n\t\t\r\n\t\tthis.rows.forEach((row) => {\r\n\t\t\trow.wipe();\r\n\t\t});\r\n\t\t\r\n\t\tthis.rows = [];\r\n\t\tthis.activeRows = [];\r\n\t\tthis.activeRowsPipeline = [];\r\n\t\tthis.activeRowsCount = 0;\r\n\t\tthis.displayRows = [];\r\n\t\tthis.displayRowsCount = 0;\r\n\t\t\r\n\t\tthis.adjustTableSize();\r\n\t}\r\n\t\r\n\tdeleteRow(row, blockRedraw){\r\n\t\tvar allIndex = this.rows.indexOf(row),\r\n\t\tactiveIndex = this.activeRows.indexOf(row);\r\n\t\t\r\n\t\tif(activeIndex > -1){\r\n\t\t\tthis.activeRows.splice(activeIndex, 1);\r\n\t\t}\r\n\t\t\r\n\t\tif(allIndex > -1){\r\n\t\t\tthis.rows.splice(allIndex, 1);\r\n\t\t}\r\n\t\t\r\n\t\tthis.setActiveRows(this.activeRows);\r\n\t\t\r\n\t\tthis.displayRowIterator((rows) => {\r\n\t\t\tvar displayIndex = rows.indexOf(row);\r\n\t\t\t\r\n\t\t\tif(displayIndex > -1){\r\n\t\t\t\trows.splice(displayIndex, 1);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t}\r\n\t\t\r\n\t\tthis.regenerateRowNumbers();\r\n\t\t\r\n\t\tthis.dispatchExternal(\"rowDeleted\", row.getComponent());\r\n\t\t\r\n\t\tif(!this.displayRowsCount){\r\n\t\t\tthis._showPlaceholder();\r\n\t\t}\r\n\t\t\r\n\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\tthis.dispatchExternal(\"dataChanged\", this.getData());\r\n\t\t}\r\n\t}\r\n\t\r\n\taddRow(data, pos, index, blockRedraw){\r\n\t\tvar row = this.addRowActual(data, pos, index, blockRedraw);\r\n\t\treturn row;\r\n\t}\r\n\t\r\n\t//add multiple rows\r\n\taddRows(data, pos, index){\r\n\t\tvar length = 0,\r\n\t\trows = [];\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tpos = this.findAddRowPos(pos);\r\n\t\t\t\r\n\t\t\tif(!Array.isArray(data)){\r\n\t\t\t\tdata = [data];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlength = data.length - 1;\r\n\t\t\t\r\n\t\t\tif((typeof index == \"undefined\" && pos) || (typeof index !== \"undefined\" && !pos)){\r\n\t\t\t\tdata.reverse();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdata.forEach((item, i) => {\r\n\t\t\t\tvar row = this.addRow(item, pos, index, true);\r\n\t\t\t\trows.push(row);\r\n\t\t\t\tthis.dispatch(\"row-added\", row, data, pos, index);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.refreshActiveData(false, false, true);\r\n\t\t\t\r\n\t\t\tthis.regenerateRowNumbers();\r\n\t\t\t\r\n\t\t\tif(rows.length){\r\n\t\t\t\tthis._clearPlaceholder();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tresolve(rows);\r\n\t\t});\r\n\t}\r\n\t\r\n\tfindAddRowPos(pos){\r\n\t\tif(typeof pos === \"undefined\"){\r\n\t\t\tpos = this.table.options.addRowPos;\r\n\t\t}\r\n\t\t\r\n\t\tif(pos === \"pos\"){\r\n\t\t\tpos = true;\r\n\t\t}\r\n\t\t\r\n\t\tif(pos === \"bottom\"){\r\n\t\t\tpos = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn pos;\r\n\t}\r\n\t\r\n\taddRowActual(data, pos, index, blockRedraw){\r\n\t\tvar row = data instanceof Row ? data : new Row(data || {}, this),\r\n\t\ttop = this.findAddRowPos(pos),\r\n\t\tallIndex = -1,\r\n\t\tactiveIndex, chainResult;\r\n\t\t\r\n\t\tif(!index){\r\n\t\t\tchainResult = this.chain(\"row-adding-position\", [row, top], null, {index, top});\r\n\t\t\t\r\n\t\t\tindex = chainResult.index;\r\n\t\t\ttop = chainResult.top;\r\n\t\t}\r\n\t\t\r\n\t\tif(typeof index !== \"undefined\"){\r\n\t\t\tindex = this.findRow(index);\r\n\t\t}\r\n\t\t\r\n\t\tindex = this.chain(\"row-adding-index\", [row, index, top], null, index);\r\n\t\t\r\n\t\tif(index){\r\n\t\t\tallIndex = this.rows.indexOf(index);\r\n\t\t}\r\n\t\t\r\n\t\tif(index && allIndex > -1){\r\n\t\t\tactiveIndex = this.activeRows.indexOf(index);\r\n\t\t\t\r\n\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\tvar displayIndex = rows.indexOf(index);\r\n\t\t\t\t\r\n\t\t\t\tif(displayIndex > -1){\r\n\t\t\t\t\trows.splice((top ? displayIndex : displayIndex + 1), 0, row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(activeIndex > -1){\r\n\t\t\t\tthis.activeRows.splice((top ? activeIndex : activeIndex + 1), 0, row);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.rows.splice((top ? allIndex : allIndex + 1), 0, row);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tif(top){\r\n\t\t\t\t\r\n\t\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\t\trows.unshift(row);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRows.unshift(row);\r\n\t\t\t\tthis.rows.unshift(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\t\trows.push(row);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRows.push(row);\r\n\t\t\t\tthis.rows.push(row);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.setActiveRows(this.activeRows);\r\n\t\t\r\n\t\tthis.dispatchExternal(\"rowAdded\", row.getComponent());\r\n\t\t\r\n\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t}\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t}\r\n\t\t\r\n\t\treturn row;\r\n\t}\r\n\t\r\n\tmoveRow(from, to, after){\r\n\t\tthis.dispatch(\"row-move\", from, to, after);\r\n\t\t\r\n\t\tthis.moveRowActual(from, to, after);\r\n\t\t\r\n\t\tthis.regenerateRowNumbers();\r\n\t\t\r\n\t\tthis.dispatch(\"row-moved\", from, to, after);\r\n\t\tthis.dispatchExternal(\"rowMoved\", from.getComponent());\r\n\t}\r\n\t\r\n\tmoveRowActual(from, to, after){\r\n\t\tthis.moveRowInArray(this.rows, from, to, after);\r\n\t\tthis.moveRowInArray(this.activeRows, from, to, after);\r\n\t\t\r\n\t\tthis.displayRowIterator((rows) => {\r\n\t\t\tthis.moveRowInArray(rows, from, to, after);\r\n\t\t});\r\n\t\t\r\n\t\tthis.dispatch(\"row-moving\", from, to, after);\r\n\t}\r\n\t\r\n\tmoveRowInArray(rows, from, to, after){\r\n\t\tvar\tfromIndex, toIndex, start, end;\r\n\t\t\r\n\t\tif(from !== to){\r\n\t\t\t\r\n\t\t\tfromIndex = rows.indexOf(from);\r\n\t\t\t\r\n\t\t\tif (fromIndex > -1) {\r\n\t\t\t\t\r\n\t\t\t\trows.splice(fromIndex, 1);\r\n\t\t\t\t\r\n\t\t\t\ttoIndex = rows.indexOf(to);\r\n\t\t\t\t\r\n\t\t\t\tif (toIndex > -1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(after){\r\n\t\t\t\t\t\trows.splice(toIndex+1, 0, from);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trows.splice(toIndex, 0, from);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\trows.splice(fromIndex, 0, from);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//restyle rows\r\n\t\t\tif(rows === this.getDisplayRows()){\r\n\t\t\t\t\r\n\t\t\t\tstart = fromIndex < toIndex ? fromIndex : toIndex;\r\n\t\t\t\tend = toIndex > fromIndex ? toIndex : fromIndex +1;\r\n\t\t\t\t\r\n\t\t\t\tfor(let i = start; i <= end; i++){\r\n\t\t\t\t\tif(rows[i]){\r\n\t\t\t\t\t\tthis.styleRow(rows[i], i);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tclearData(){\r\n\t\tthis.setData([]);\r\n\t}\r\n\t\r\n\tgetRowIndex(row){\r\n\t\treturn this.findRowIndex(row, this.rows);\r\n\t}\r\n\t\r\n\tgetDisplayRowIndex(row){\r\n\t\tvar index = this.getDisplayRows().indexOf(row);\r\n\t\treturn index > -1 ? index : false;\r\n\t}\r\n\t\r\n\tnextDisplayRow(row, rowOnly){\r\n\t\tvar index = this.getDisplayRowIndex(row),\r\n\t\tnextRow = false;\r\n\t\t\r\n\t\t\r\n\t\tif(index !== false && index < this.displayRowsCount -1){\r\n\t\t\tnextRow = this.getDisplayRows()[index+1];\r\n\t\t}\r\n\t\t\r\n\t\tif(nextRow && (!(nextRow instanceof Row) || nextRow.type != \"row\")){\r\n\t\t\treturn this.nextDisplayRow(nextRow, rowOnly);\r\n\t\t}\r\n\t\t\r\n\t\treturn nextRow;\r\n\t}\r\n\t\r\n\tprevDisplayRow(row, rowOnly){\r\n\t\tvar index = this.getDisplayRowIndex(row),\r\n\t\tprevRow = false;\r\n\t\t\r\n\t\tif(index){\r\n\t\t\tprevRow = this.getDisplayRows()[index-1];\r\n\t\t}\r\n\t\t\r\n\t\tif(rowOnly && prevRow && (!(prevRow instanceof Row) || prevRow.type != \"row\")){\r\n\t\t\treturn this.prevDisplayRow(prevRow, rowOnly);\r\n\t\t}\r\n\t\t\r\n\t\treturn prevRow;\r\n\t}\r\n\t\r\n\tfindRowIndex(row, list){\r\n\t\tvar rowIndex;\r\n\t\t\r\n\t\trow = this.findRow(row);\r\n\t\t\r\n\t\tif(row){\r\n\t\t\trowIndex = list.indexOf(row);\r\n\t\t\t\r\n\t\t\tif(rowIndex > -1){\r\n\t\t\t\treturn rowIndex;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tgetData(active, transform){\r\n\t\tvar output = [],\r\n\t\trows = this.getRows(active);\r\n\t\t\r\n\t\trows.forEach(function(row){\r\n\t\t\tif(row.type == \"row\"){\r\n\t\t\t\toutput.push(row.getData(transform || \"data\"));\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetComponents(active){\r\n\t\tvar\toutput = [],\r\n\t\trows = this.getRows(active);\r\n\t\t\r\n\t\trows.forEach(function(row){\r\n\t\t\toutput.push(row.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetDataCount(active){\r\n\t\tvar rows = this.getRows(active);\r\n\t\t\r\n\t\treturn rows.length;\r\n\t}\r\n\t\r\n\tscrollHorizontal(left){\r\n\t\tthis.scrollLeft = left;\r\n\t\tthis.element.scrollLeft = left;\r\n\t\t\r\n\t\tthis.dispatch(\"scroll-horizontal\", left);\r\n\t}\r\n\t\r\n\tregisterDataPipelineHandler(handler, priority){\r\n\t\tif(typeof priority !== \"undefined\"){\r\n\t\t\tthis.dataPipeline.push({handler, priority})\r\n\t\t\tthis.dataPipeline.sort((a, b) => {\r\n\t\t\t\treturn a.priority - b.priority;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Data pipeline handlers must have a priority in order to be registered\")\r\n\t\t}\r\n\t}\r\n\t\r\n\tregisterDisplayPipelineHandler(handler, priority){\r\n\t\tif(typeof priority !== \"undefined\"){\r\n\t\t\tthis.displayPipeline.push({handler, priority})\r\n\t\t\tthis.displayPipeline.sort((a, b) => {\r\n\t\t\t\treturn a.priority - b.priority;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Display pipeline handlers must have a priority in order to be registered\")\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set active data set\r\n\trefreshActiveData(handler, skipStage, renderInPosition){\r\n\t\tvar table = this.table,\r\n\t\tstage = \"\",\r\n\t\tindex = 0,\r\n\t\tcascadeOrder = [\"all\", \"dataPipeline\", \"display\", \"displayPipeline\", \"end\"],\r\n\t\tdisplayIndex;\r\n\t\t\r\n\t\t\r\n\t\tif(typeof handler === \"function\"){\r\n\t\t\tindex = this.dataPipeline.findIndex((item) => {\r\n\t\t\t\treturn item.handler === handler;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\tstage = \"dataPipeline\";\r\n\t\t\t\t\r\n\t\t\t\tif(skipStage){\r\n\t\t\t\t\tif(index == this.dataPipeline.length - 1){\r\n\t\t\t\t\t\tstage = \"display\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tindex++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tindex = this.displayPipeline.findIndex((item) => {\r\n\t\t\t\t\treturn item.handler === handler;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tstage = \"displayPipeline\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(skipStage){\r\n\t\t\t\t\t\tif(index == this.displayPipeline.length - 1){\r\n\t\t\t\t\t\t\tstage = \"end\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tindex++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.error(\"Unable to refresh data, invalid handler provided\", handler)\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tstage = handler || \"all\";\r\n\t\t\tindex = 0;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.redrawBlock){\r\n\t\t\tif(!this.redrawBlockRestoreConfig || (this.redrawBlockRestoreConfig && ((this.redrawBlockRestoreConfig.stage === stage && index < this.redrawBlockRestoreConfig.index) || (cascadeOrder.indexOf(stage) < cascadeOrder.indexOf(this.redrawBlockRestoreConfig.stage))))){\r\n\t\t\t\tthis.redrawBlockRestoreConfig = {\r\n\t\t\t\t\thandler: handler,\r\n\t\t\t\t\tskipStage: skipStage,\r\n\t\t\t\t\trenderInPosition: renderInPosition,\r\n\t\t\t\t\tstage:stage,\r\n\t\t\t\t\tindex:index,\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn;\r\n\t\t}else{\r\n\t\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\t\tif(renderInPosition){\r\n\t\t\t\t\tthis.reRenderInPosition(this.refreshPipelines.bind(this, handler, stage, index, renderInPosition));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!handler){\r\n\t\t\t\t\t\tthis.table.columnManager.renderer.renderColumns();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.renderTable();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(table.options.layoutColumnsOnNewData){\r\n\t\t\t\t\t\tthis.table.columnManager.redraw(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"data-refreshed\");\r\n\t\t}\r\n\t}\r\n\t\r\n\trefreshPipelines(handler, stage, index, renderInPosition){\r\n\t\tthis.dispatch(\"data-refreshing\");\r\n\t\t\r\n\t\tif(!handler){\r\n\t\t\tthis.activeRowsPipeline[0] = this.rows.slice(0);\r\n\t\t}\r\n\t\t\r\n\t\t//cascade through data refresh stages\r\n\t\tswitch(stage){\r\n\t\t\tcase \"all\":\r\n\t\t\t//handle case where alldata needs refreshing\r\n\t\t\t\r\n\t\t\tcase \"dataPipeline\":\r\n\t\t\t\r\n\t\t\tfor(let i = index; i < this.dataPipeline.length; i++){\r\n\t\t\t\tlet result = this.dataPipeline[i].handler(this.activeRowsPipeline[i].slice(0));\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRowsPipeline[i + 1] = result || this.activeRowsPipeline[i].slice(0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);\r\n\t\t\t\r\n\t\t\tthis.regenerateRowNumbers();\r\n\t\t\t\r\n\t\t\tcase \"display\":\r\n\t\t\tindex = 0;\r\n\t\t\tthis.resetDisplayRows();\r\n\t\t\t\r\n\t\t\tcase \"displayPipeline\":\r\n\t\t\tfor(let i = index; i < this.displayPipeline.length; i++){\r\n\t\t\t\tlet result = this.displayPipeline[i].handler((i ? this.getDisplayRows(i - 1) : this.activeRows).slice(0), renderInPosition);\r\n\t\t\t\t\r\n\t\t\t\tthis.setDisplayRows(result || this.getDisplayRows(i - 1).slice(0), i);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase \"end\":\r\n\t\t\t//case to handle scenario when trying to skip past end stage\r\n\t\t}\r\n\t}\r\n\t\r\n\t//regenerate row numbers for row number formatter if in use\r\n\tregenerateRowNumbers(){\r\n\t\tif(this.rowNumColumn){\r\n\t\t\tthis.activeRows.forEach((row) => {\r\n\t\t\t\tvar cell = row.getCell(this.rowNumColumn);\r\n\t\t\t\t\r\n\t\t\t\tif(cell){\r\n\t\t\t\t\tcell._generateContents();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetActiveRows(activeRows){\r\n\t\tthis.activeRows = activeRows;\r\n\t\tthis.activeRowsCount = this.activeRows.length;\r\n\t}\r\n\t\r\n\t//reset display rows array\r\n\tresetDisplayRows(){\r\n\t\tthis.displayRows = [];\r\n\t\t\r\n\t\tthis.displayRows.push(this.activeRows.slice(0));\r\n\t\t\r\n\t\tthis.displayRowsCount = this.displayRows[0].length;\r\n\t}\r\n\t\r\n\tgetNextDisplayIndex(){\r\n\t\treturn this.displayRows.length;\r\n\t}\r\n\t\r\n\t//set display row pipeline data\r\n\tsetDisplayRows(displayRows, index){\r\n\t\t\r\n\t\tvar output = true;\r\n\t\t\r\n\t\tif(index && typeof this.displayRows[index] != \"undefined\"){\r\n\t\t\tthis.displayRows[index] = displayRows;\r\n\t\t\toutput = true;\r\n\t\t}else{\r\n\t\t\tthis.displayRows.push(displayRows)\r\n\t\t\toutput = index = this.displayRows.length -1;\r\n\t\t}\r\n\t\t\r\n\t\tif(index == this.displayRows.length -1){\r\n\t\t\tthis.displayRowsCount = this.displayRows[this.displayRows.length -1].length;\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetDisplayRows(index){\r\n\t\tif(typeof index == \"undefined\"){\r\n\t\t\treturn this.displayRows.length ? this.displayRows[this.displayRows.length -1] : [];\r\n\t\t}else{\r\n\t\t\treturn this.displayRows[index] || [];\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetVisibleRows(chain, viewable){\r\n\t\tvar rows = Object.assign([], this.renderer.visibleRows(!viewable));\r\n\t\t\r\n\t\tif(chain){\r\n\t\t\trows = this.chain(\"rows-visible\", [viewable], rows, rows);\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t//repeat action accross display rows\r\n\tdisplayRowIterator(callback){\r\n\t\tthis.activeRowsPipeline.forEach(callback);\r\n\t\tthis.displayRows.forEach(callback);\r\n\t\t\r\n\t\tthis.displayRowsCount = this.displayRows[this.displayRows.length -1].length;\r\n\t}\r\n\t\r\n\t//return only actual rows (not group headers etc)\r\n\tgetRows(type){\r\n\t\tvar rows;\r\n\t\t\r\n\t\tswitch(type){\r\n\t\t\tcase \"active\":\r\n\t\t\trows = this.activeRows;\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"display\":\r\n\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"visible\":\r\n\t\t\trows = this.getVisibleRows(false, true);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\trows = this.chain(\"rows-retrieve\", type, null, this.rows) || this.rows;\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t///////////////// Table Rendering /////////////////\r\n\t//trigger rerender of table in current position\r\n\treRenderInPosition(callback){\r\n\t\tif(this.redrawBlock){\r\n\t\t\tif(callback){\r\n\t\t\t\tcallback();\r\n\t\t\t}else{\r\n\t\t\t\tthis.redrawBlockRenderInPosition = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.renderer.rerenderRows(callback);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRenderer(){\r\n\t\tvar renderClass;\r\n\t\t\r\n\t\tvar renderers = {\r\n\t\t\t\"virtual\": RendererVirtualDomVertical,\r\n\t\t\t\"basic\": RendererBasicVertical,\r\n\t\t};\r\n\t\t\r\n\t\tif(typeof this.table.options.renderVertical === \"string\"){\r\n\t\t\trenderClass = renderers[this.table.options.renderVertical];\r\n\t\t}else{\r\n\t\t\trenderClass = this.table.options.renderVertical;\r\n\t\t}\r\n\t\t\r\n\t\tif(renderClass){\r\n\t\t\tthis.renderer = new renderClass(this.table, this.element, this.tableElement);\r\n\t\t\tthis.renderer.initialize();\r\n\t\t\t\r\n\t\t\tif((this.table.element.clientHeight || this.table.options.height)){\r\n\t\t\t\tthis.fixedHeight = true;\r\n\t\t\t}else{\r\n\t\t\t\tthis.fixedHeight = false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Unable to find matching renderer:\", table.options.renderVertical);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRenderMode(){\r\n\t\treturn this.renderMode;\r\n\t}\r\n\t\r\n\trenderTable(){\r\n\t\tthis.dispatchExternal(\"renderStarted\");\r\n\t\t\r\n\t\tthis.element.scrollTop = 0;\r\n\t\t\r\n\t\tthis._clearTable();\r\n\t\t\r\n\t\tif(this.displayRowsCount){\r\n\t\t\tthis.renderer.renderRows();\r\n\t\t\t\r\n\t\t\tif(this.firstRender){\r\n\t\t\t\tthis.firstRender = false;\r\n\t\t\t\tthis.layoutRefresh();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.renderEmptyScroll();\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.fixedHeight){\r\n\t\t\tthis.adjustTableSize();\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatch(\"table-layout\");\r\n\t\t\r\n\t\tif(!this.displayRowsCount){\r\n\t\t\tthis._showPlaceholder();\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatchExternal(\"renderComplete\");\r\n\t}\r\n\t\r\n\t//show scrollbars on empty table div\r\n\trenderEmptyScroll(){\r\n\t\tif(this.placeholder){\r\n\t\t\tthis.tableElement.style.display = \"none\";\r\n\t\t}else{\r\n\t\t\tthis.tableElement.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t\t// this.tableElement.style.minHeight = \"1px\";\r\n\t\t\t// this.tableElement.style.visibility = \"hidden\";\r\n\t\t}\r\n\t}\r\n\t\r\n\t_clearTable(){\r\n\t\tvar element = this.tableElement;\r\n\t\t\r\n\t\tthis._clearPlaceholder();\r\n\t\t\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.renderer.clearRows();\r\n\t}\r\n\t\r\n\t_showPlaceholder(){\r\n\t\tif(this.placeholder){\r\n\t\t\tthis.placeholder.setAttribute(\"tabulator-render-mode\", this.renderMode);\r\n\t\t\t\r\n\t\t\tthis.getElement().appendChild(this.placeholder);\r\n\t\t\tthis._positionPlaceholder();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_clearPlaceholder(){\r\n\t\tif(this.placeholder && this.placeholder.parentNode){\r\n\t\t\tthis.placeholder.parentNode.removeChild(this.placeholder);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_positionPlaceholder(){\r\n\t\tif(this.placeholder && this.placeholder.parentNode){\r\n\t\t\tthis.placeholder.style.width = this.table.columnManager.getWidth() + \"px\";\r\n\t\t\tthis.placeholderContents.style.width = this.table.rowManager.element.clientWidth + \"px\";\r\n\t\t\tthis.placeholderContents.style.marginLeft = this.scrollLeft + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tstyleRow(row, index){\r\n\t\tvar rowEl = row.getElement();\r\n\t\t\r\n\t\tif(index % 2){\r\n\t\t\trowEl.classList.add(\"tabulator-row-even\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-odd\");\r\n\t\t}else{\r\n\t\t\trowEl.classList.add(\"tabulator-row-odd\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-even\");\r\n\t\t}\r\n\t}\r\n\t\r\n\t//normalize height of active rows\r\n\tnormalizeHeight(){\r\n\t\tthis.activeRows.forEach(function(row){\r\n\t\t\trow.normalizeHeight();\r\n\t\t});\r\n\t}\r\n\t\r\n\t//adjust the height of the table holder to fit in the Tabulator element\r\n\tadjustTableSize(){\r\n\t\tvar initialHeight = this.element.clientHeight,\r\n\t\tmodExists;\r\n\t\t\r\n\t\tif(this.renderer.verticalFillMode === \"fill\"){\r\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));\r\n\t\t\t\r\n\t\t\tif(this.fixedHeight){\r\n\t\t\t\tthis.element.style.minHeight = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t\tthis.element.style.height = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t\tthis.element.style.maxHeight = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.height = \"\";\r\n\t\t\t\tthis.element.style.height = (this.table.element.clientHeight - otherHeight) + \"px\";\r\n\t\t\t\tthis.element.scrollTop = this.scrollTop;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.renderer.resize();\r\n\t\t\t\r\n\t\t\t//check if the table has changed size when dealing with variable height tables\r\n\t\t\tif(!this.fixedHeight && initialHeight != this.element.clientHeight){\r\n\t\t\t\tif(this.subscribed(\"table-resize\")){\r\n\t\t\t\t\tthis.dispatch(\"table-resize\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.redraw();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._positionPlaceholder();\r\n\t}\r\n\t\r\n\t//renitialize all rows\r\n\treinitialize(){\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\trow.reinitialize(true);\r\n\t\t});\r\n\t}\r\n\t\r\n\t//prevent table from being redrawn\r\n\tblockRedraw (){\r\n\t\tthis.redrawBlock = true;\r\n\t\tthis.redrawBlockRestoreConfig = false;\r\n\t}\r\n\t\r\n\t//restore table redrawing\r\n\trestoreRedraw (){\r\n\t\tthis.redrawBlock = false;\r\n\t\t\r\n\t\tif(this.redrawBlockRestoreConfig){\r\n\t\t\tthis.refreshActiveData(this.redrawBlockRestoreConfig.handler, this.redrawBlockRestoreConfig.skipStage, this.redrawBlockRestoreConfig.renderInPosition)\r\n\t\t\t\r\n\t\t\tthis.redrawBlockRestoreConfig = false;\r\n\t\t}else{\r\n\t\t\tif(this.redrawBlockRenderInPosition){\r\n\t\t\t\tthis.reRenderInPosition();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.redrawBlockRenderInPosition = false;\r\n\t}\r\n\t\r\n\t//redraw table\r\n\tredraw (force){\r\n\t\tvar pos = 0,\r\n\t\tleft = this.scrollLeft;\r\n\t\t\r\n\t\tthis.adjustTableSize();\r\n\t\t\r\n\t\tthis.table.tableWidth = this.table.element.clientWidth;\r\n\t\t\r\n\t\tif(!force){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t\tthis.scrollHorizontal(left);\r\n\t\t}else{\r\n\t\t\tthis.renderTable();\r\n\t\t}\r\n\t}\r\n\t\r\n\tresetScroll(){\r\n\t\tthis.element.scrollLeft = 0;\r\n\t\tthis.element.scrollTop = 0;\r\n\t\t\r\n\t\tif(this.table.browser === \"ie\"){\r\n\t\t\tvar event = document.createEvent(\"Event\");\r\n\t\t\tevent.initEvent(\"scroll\", false, true);\r\n\t\t\tthis.element.dispatchEvent(event);\r\n\t\t}else{\r\n\t\t\tthis.element.dispatchEvent(new Event('scroll'));\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\n\r\nexport default class FooterManager extends CoreFeature{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.active = false;\r\n\t\tthis.element = this.createElement(); //containing element\r\n\t\tthis.containerElement = this.createContainerElement(); //containing element\r\n\t\tthis.external = false;\r\n\t\tthis.links = [];\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeElement();\r\n\t}\r\n\r\n\tcreateElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-footer\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\t\r\n\tcreateContainerElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-footer-contents\");\r\n\r\n\t\tthis.element.appendChild(el);\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitializeElement(){\r\n\t\tif(this.table.options.footerElement){\r\n\r\n\t\t\tswitch(typeof this.table.options.footerElement){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(this.table.options.footerElement[0] === \"<\"){\r\n\t\t\t\t\tthis.containerElement.innerHTML = this.table.options.footerElement;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.external = true;\r\n\t\t\t\t\tthis.containerElement = document.querySelector(this.table.options.footerElement);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.element = this.table.options.footerElement;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tappend(element, parent){\r\n\t\tthis.activate(parent);\r\n\r\n\t\tthis.containerElement.appendChild(element);\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\tprepend(element, parent){\r\n\t\tthis.activate(parent);\r\n\r\n\t\tthis.element.insertBefore(element, this.element.firstChild);\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\tremove(element){\r\n\t\telement.parentNode.removeChild(element);\r\n\t\tthis.deactivate();\r\n\t}\r\n\r\n\tdeactivate(force){\r\n\t\tif(!this.element.firstChild || force){\r\n\t\t\tif(!this.external){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\t\t\tthis.active = false;\r\n\t\t}\r\n\t}\r\n\r\n\tactivate(parent){\r\n\t\tif(!this.active){\r\n\t\t\tthis.active = true;\r\n\t\t\tif(!this.external){\r\n\t\t\t\tthis.table.element.appendChild(this.getElement());\r\n\t\t\t\tthis.table.element.style.display = '';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(parent){\r\n\t\t\tthis.links.push(parent);\r\n\t\t}\r\n\t}\r\n\r\n\tredraw(){\r\n\t\tthis.links.forEach(function(link){\r\n\t\t\tlink.footerRedraw();\r\n\t\t});\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport Helpers from './Helpers.js';\r\nimport Row from '../row/Row.js';\r\n\r\nexport default class InteractionManager extends CoreFeature {\r\n\t\r\n\tconstructor (table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.el = null;\r\n\t\t\r\n\t\tthis.abortClasses = [\"tabulator-headers\", \"tabulator-table\"];\r\n\t\t\r\n\t\tthis.previousTargets = {};\r\n\t\t\r\n\t\tthis.listeners = [\r\n\t\t\t\"click\",\r\n\t\t\t\"dblclick\",\r\n\t\t\t\"contextmenu\",\r\n\t\t\t\"mouseenter\",\r\n\t\t\t\"mouseleave\",\r\n\t\t\t\"mouseover\",\r\n\t\t\t\"mouseout\",\r\n\t\t\t\"mousemove\",\r\n\t\t\t\"touchstart\",\r\n\t\t\t\"touchend\",\r\n\t\t];\r\n\t\t\r\n\t\tthis.componentMap = {\r\n\t\t\t\"tabulator-cell\":\"cell\",\r\n\t\t\t\"tabulator-row\":\"row\",\r\n\t\t\t\"tabulator-group\":\"group\",\r\n\t\t\t\"tabulator-col\":\"column\",\r\n\t\t};\r\n\t\t\r\n\t\tthis.pseudoTrackers = {\r\n\t\t\t\"row\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"cell\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"group\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"column\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t}\r\n\t\t\r\n\t\tthis.pseudoTracking = false;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.el = this.table.element;\r\n\t\t\r\n\t\tthis.buildListenerMap();\r\n\t\tthis.bindSubscriptionWatchers();\r\n\t}\r\n\t\r\n\tbuildListenerMap(){\r\n\t\tvar listenerMap = {};\r\n\t\t\r\n\t\tthis.listeners.forEach((listener) => {\r\n\t\t\tlistenerMap[listener] = {\r\n\t\t\t\thandler:null,\r\n\t\t\t\tcomponents:[],\r\n\t\t\t}\r\n\t\t})\r\n\t\t\r\n\t\tthis.listeners = listenerMap;\r\n\t}\r\n\t\r\n\tbindPseudoEvents(){\r\n\t\tObject.keys(this.pseudoTrackers).forEach((key) => {\r\n\t\t\tthis.pseudoTrackers[key].subscriber = this.pseudoMouseEnter.bind(this, key);\r\n\t\t\tthis.subscribe(key + \"-mouseover\", this.pseudoTrackers[key].subscriber);\r\n\t\t});\r\n\t\t\r\n\t\tthis.pseudoTracking = true;\r\n\t}\r\n\t\r\n\tpseudoMouseEnter(key, e, target){\r\n\t\tif(this.pseudoTrackers[key].target !== target){\r\n\t\t\t\r\n\t\t\tif(this.pseudoTrackers[key].target){\r\n\t\t\t\tthis.dispatch(key + \"-mouseleave\", e, target);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.pseudoMouseLeave(key, e);\r\n\t\t\t\r\n\t\t\tthis.pseudoTrackers[key].target = target;\r\n\t\t\t\r\n\t\t\tthis.dispatch(key + \"-mouseenter\", e, target);\r\n\t\t}\r\n\t}\r\n\t\r\n\tpseudoMouseLeave(key, e){\r\n\t\tvar leaveList = Object.keys(this.pseudoTrackers),\r\n\t\tlinkedKeys = {\r\n\t\t\t\"row\":[\"cell\"],\r\n\t\t\t\"cell\":[\"row\"],\r\n\t\t};\r\n\t\t\r\n\t\tleaveList = leaveList.filter((item) => {\r\n\t\t\tvar links = linkedKeys[key];\r\n\t\t\treturn item !== key && (!links || (links && !links.includes(item)));\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\tleaveList.forEach((key) => {\r\n\t\t\tvar target = this.pseudoTrackers[key].target;\r\n\t\t\t\r\n\t\t\tif(this.pseudoTrackers[key].target){\r\n\t\t\t\tthis.dispatch(key + \"-mouseleave\", e, target);\r\n\t\t\t\t\r\n\t\t\t\tthis.pseudoTrackers[key].target = null;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t\r\n\tbindSubscriptionWatchers(){\r\n\t\tvar listeners = Object.keys(this.listeners),\r\n\t\tcomponents = Object.values(this.componentMap);\r\n\t\t\r\n\t\tfor(let comp of components){\r\n\t\t\tfor(let listener of listeners){\r\n\t\t\t\tlet key = comp + \"-\" + listener;\r\n\t\t\t\t\r\n\t\t\t\tthis.subscriptionChange(key, this.subscriptionChanged.bind(this, comp, listener));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.subscribe(\"table-destroy\", this.clearWatchers.bind(this))\r\n\t}\r\n\t\r\n\tsubscriptionChanged(component, key, added){\r\n\t\tvar listener = this.listeners[key].components,\r\n\t\tindex = listener.indexOf(component),\r\n\t\tchanged = false;\r\n\t\t\r\n\t\tif(added){\r\n\t\t\tif(index === -1){\r\n\t\t\t\tlistener.push(component);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!this.subscribed(component + \"-\" + key)){\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tlistener.splice(index, 1);\r\n\t\t\t\t\tchanged = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif((key === \"mouseenter\" || key === \"mouseleave\") && !this.pseudoTracking){\r\n\t\t\tthis.bindPseudoEvents();\r\n\t\t}\r\n\t\t\r\n\t\tif(changed){\r\n\t\t\tthis.updateEventListeners();\r\n\t\t}\r\n\t}\r\n\t\r\n\tupdateEventListeners(){\r\n\t\tfor(let key in this.listeners){\r\n\t\t\tlet listener = this.listeners[key];\r\n\t\t\t\r\n\t\t\tif(listener.components.length){\r\n\t\t\t\tif(!listener.handler){\r\n\t\t\t\t\tlistener.handler = this.track.bind(this, key);\r\n\t\t\t\t\tthis.el.addEventListener(key, listener.handler)\r\n\t\t\t\t\t// this.el.addEventListener(key, listener.handler, {passive: true})\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(listener.handler){\r\n\t\t\t\t\tthis.el.removeEventListener(key, listener.handler)\r\n\t\t\t\t\tlistener.handler = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\ttrack(type, e){\r\n\t\tvar path = (e.composedPath && e.composedPath()) || e.path;\r\n\t\t\r\n\t\tvar targets = this.findTargets(path);\r\n\t\ttargets = this.bindComponents(type, targets);\r\n\t\t\r\n\t\tthis.triggerEvents(type, e, targets);\r\n\t\t\r\n\t\tif(this.pseudoTracking && (type == \"mouseover\" || type == \"mouseleave\") && !Object.keys(targets).length){\r\n\t\t\tthis.pseudoMouseLeave(\"none\", e);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfindTargets(path){\r\n\t\tvar targets = {};\r\n\t\t\r\n\t\tlet componentMap = Object.keys(this.componentMap);\r\n\t\t\r\n\t\tfor (let el of path) {\r\n\t\t\tlet classList = el.classList ? [...el.classList] : [];\r\n\t\t\t\r\n\t\t\tlet abort = classList.filter((item) => {\r\n\t\t\t\treturn this.abortClasses.includes(item);\r\n\t\t\t})\r\n\t\t\t\r\n\t\t\tif(abort.length){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlet elTargets = classList.filter((item) => {\r\n\t\t\t\treturn componentMap.includes(item);\r\n\t\t\t})\r\n\t\t\t\r\n\t\t\tfor (let target of elTargets) {\r\n\t\t\t\ttargets[this.componentMap[target]] = el;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(targets.group && targets.group === targets.row){\r\n\t\t\tdelete targets.row;\r\n\t\t}\r\n\t\t\r\n\t\treturn targets;\r\n\t}\r\n\t\r\n\tbindComponents(type, targets){\r\n\t\t//ensure row component is looked up before cell\r\n\t\tvar keys = Object.keys(targets).reverse(),\r\n\t\tlistener = this.listeners[type],\r\n\t\ttargetMatches = {};\r\n\t\t\r\n\t\tfor(let key of keys){\r\n\t\t\tlet component;\r\n\t\t\tlet target = targets[key];\r\n\t\t\tlet previousTarget = this.previousTargets[key];\r\n\t\t\t\r\n\t\t\tif(previousTarget && previousTarget.target === target){\r\n\t\t\t\tcomponent = previousTarget.component;\r\n\t\t\t}else{\r\n\t\t\t\tswitch(key){\r\n\t\t\t\t\tcase \"row\":\r\n\t\t\t\t\tcase \"group\":\r\n\t\t\t\t\tif(listener.components.includes(\"row\") || listener.components.includes(\"cell\") || listener.components.includes(\"group\")){\r\n\t\t\t\t\t\tlet rows = this.table.rowManager.getVisibleRows(true);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcomponent = rows.find((row) => {\r\n\t\t\t\t\t\t\treturn row.getElement() === target;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(targets[\"row\"] && targets[\"row\"].parentNode && targets[\"row\"].parentNode.closest(\".tabulator-row\")){\r\n\t\t\t\t\t\t\ttargets[key] = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"column\":\r\n\t\t\t\t\tif(listener.components.includes(\"column\")){\r\n\t\t\t\t\t\tcomponent = this.table.columnManager.findColumn(target);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"cell\":\r\n\t\t\t\t\tif(listener.components.includes(\"cell\")){\r\n\t\t\t\t\t\tif(targets[\"row\"] instanceof Row){\r\n\t\t\t\t\t\t\tcomponent = targets[\"row\"].findCell(target);\r\n\t\t\t\t\t\t}else{\t\r\n\t\t\t\t\t\t\tif(targets[\"row\"]){\r\n\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?\")\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(component){\r\n\t\t\t\ttargets[key] = component;\r\n\t\t\t\ttargetMatches[key] = {\r\n\t\t\t\t\ttarget:target,\r\n\t\t\t\t\tcomponent:component,\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.previousTargets = targetMatches;\r\n\t\t\r\n\t\treturn targets;\r\n\t}\r\n\t\r\n\ttriggerEvents(type, e, targets){\r\n\t\tvar listener = this.listeners[type];\r\n\t\t\r\n\t\tfor(let key in targets){\r\n\t\t\tif(targets[key] && listener.components.includes(key)){\r\n\t\t\t\tthis.dispatch(key + \"-\" + type, e, targets[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tclearWatchers(){\r\n\t\tfor(let key in this.listeners){\r\n\t\t\tlet listener = this.listeners[key];\r\n\t\t\t\r\n\t\t\tif(listener.handler){\r\n\t\t\t\tthis.el.removeEventListener(key, listener.handler)\r\n\t\t\t\tlistener.handler = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}","export default class ComponentFunctionBinder{\r\n\r\n\tconstructor(table){\r\n\t\tthis.table = table;\r\n\r\n\t\tthis.bindings = {};\r\n\t}\r\n\r\n\tbind(type, funcName, handler){\r\n\t\tif(!this.bindings[type]){\r\n\t\t\tthis.bindings[type] = {};\r\n\t\t}\r\n\r\n\t\tif(this.bindings[type][funcName]){\r\n\t\t\tconsole.warn(\"Unable to bind component handler, a matching function name is already bound\", type, funcName, handler)\r\n\t\t}else{\r\n\t\t\tthis.bindings[type][funcName] = handler;\r\n\t\t}\r\n\t}\r\n\r\n\thandle(type, component, name){\r\n\t\tif(this.bindings[type] && this.bindings[type][name] && typeof this.bindings[type][name].bind === 'function'){\r\n\t\t\treturn this.bindings[type][name].bind(null, component);\r\n\t\t}else{\r\n\t\t\tif(name !== \"then\" && typeof name === \"string\" && !name.startsWith(\"_\")){\r\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?\")\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","import CoreFeature from '../CoreFeature.js';\r\n\r\nexport default class DataLoader extends CoreFeature{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.loaderElement = this.createLoaderElement(); //loader message div\r\n\t\tthis.msgElement = this.createMsgElement(); //message element\r\n\t\tthis.loadingElement = null;\r\n\t\tthis.errorElement = null;\r\n\r\n\t\tthis.requestOrder = 0; //prevent requests comming out of sequence if overridden by another load request\r\n\t\tthis.loading = false;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tvar template;\r\n\r\n\t\tthis.loaderElement.appendChild(this.msgElement);\r\n\r\n\t\tif(this.table.options.dataLoaderLoading){\r\n\t\t\tif(typeof this.table.options.dataLoaderLoading == \"string\"){\r\n\t\t\t\ttemplate = document.createElement('template');\r\n\t\t\t\ttemplate.innerHTML = this.table.options.dataLoaderLoading.trim();\r\n\t\t\t\tthis.loadingElement = template.firstElementChild;\r\n\t\t\t}else{\r\n\t\t\t\tthis.loadingElement = this.table.options.dataLoaderLoading;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.table.options.dataLoaderError){\r\n\t\t\tif(typeof this.table.options.dataLoaderError == \"string\"){\r\n\t\t\t\ttemplate = document.createElement('template');\r\n\t\t\t\ttemplate.innerHTML = this.table.options.dataLoaderError.trim();\r\n\t\t\t\tthis.errorElement = template.firstElementChild;\r\n\t\t\t}else{\r\n\t\t\t\tthis.errorElement = this.table.options.dataLoaderError;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tcreateLoaderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-loader\");\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateMsgElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-loader-msg\");\r\n\t\tel.setAttribute(\"role\", \"alert\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tload(data, params, config, replace, silent){\r\n\t\tvar requestNo = ++this.requestOrder;\r\n\r\n\t\tthis.dispatchExternal(\"dataLoading\", data);\r\n\r\n\t\t//parse json data to array\r\n\t\tif (data && (data.indexOf(\"{\") == 0 || data.indexOf(\"[\") == 0)){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(this.confirm(\"data-loading\", [data, params, config, silent])){\r\n\t\t\tthis.loading = true;\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.showLoader();\r\n\t\t\t}\r\n\r\n\t\t\t//get params for request\r\n\t\t\tparams = this.chain(\"data-params\", [data, config, silent], params || {}, params || {});\r\n\r\n\t\t\tparams = this.mapParams(params, this.table.options.dataSendParams);\r\n\r\n\t\t\tvar result = this.chain(\"data-load\", [data, params, config, silent], false, Promise.resolve([]));\r\n\t\t\t\r\n\t\t\treturn result.then((response) => {\r\n\t\t\t\tif(!Array.isArray(response) && typeof response == \"object\"){\r\n\t\t\t\t\tresponse = this.mapParams(response, this.objectInvert(this.table.options.dataReceiveParams));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar rowData = this.chain(\"data-loaded\", response, null, response);\r\n\r\n\t\t\t\tif(requestNo == this.requestOrder){\r\n\t\t\t\t\tthis.hideLoader();\r\n\r\n\t\t\t\t\tif(rowData !== false){\r\n\t\t\t\t\t\tthis.dispatchExternal(\"dataLoaded\", rowData);\r\n\t\t\t\t\t\tthis.table.rowManager.setData(rowData, replace, !replace);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\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\");\r\n\t\t\t\t}\r\n\t\t\t}).catch((error) => {\r\n\t\t\t\tconsole.error(\"Data Load Error: \", error);\r\n\t\t\t\tthis.dispatchExternal(\"dataLoadError\", error);\r\n\r\n\t\t\t\tif(!silent){\r\n\t\t\t\t\tthis.showError();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.hideLoader();\r\n\t\t\t\t}, this.table.options.dataLoaderErrorTimeout);\r\n\t\t\t})\r\n\t\t\t.finally(() => {\r\n\t\t\t\tthis.loading = false;\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"dataLoaded\", data);\r\n\r\n\t\t\tif(!data){\r\n\t\t\t\tdata = [];\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.rowManager.setData(data, replace, !replace);\r\n\t\t\treturn Promise.resolve();\r\n\t\t}\r\n\t}\r\n\r\n\tmapParams(params, map){\r\n\t\tvar output = {};\r\n\r\n\t\tfor(let key in params){\r\n\t\t\toutput[map.hasOwnProperty(key) ? map[key] : key] = params[key];\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tobjectInvert(obj){\r\n\t\tvar output = {};\r\n\r\n\t\tfor(let key in obj){\r\n\t\t\toutput[obj[key]] = key;\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tblockActiveLoad(){\r\n\t\tthis.requestOrder++;\r\n\t}\r\n\r\n\tshowLoader(){\r\n\t\tvar shouldLoad = typeof this.table.options.dataLoader === \"function\" ? this.table.options.dataLoader() : this.table.options.dataLoader;\r\n\r\n\t\tif(shouldLoad){\r\n\t\t\tthis.hideLoader();\r\n\r\n\t\t\twhile(this.msgElement.firstChild) this.msgElement.removeChild(this.msgElement.firstChild);\r\n\r\n\t\t\tthis.msgElement.classList.remove(\"tabulator-error\");\r\n\t\t\tthis.msgElement.classList.add(\"tabulator-loading\");\r\n\r\n\t\t\tif(this.loadingElement){\r\n\t\t\t\tthis.msgElement.appendChild(this.loadingElement);\r\n\t\t\t}else{\r\n\t\t\t\tthis.msgElement.innerHTML = this.langText(\"data|loading\");\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.element.appendChild(this.loaderElement);\r\n\t\t}\r\n\t}\r\n\r\n\tshowError(){\r\n\t\tthis.hideLoader();\r\n\r\n\t\twhile(this.msgElement.firstChild) this.msgElement.removeChild(this.msgElement.firstChild);\r\n\t\tthis.msgElement.classList.remove(\"tabulator-loading\");\r\n\t\tthis.msgElement.classList.add(\"tabulator-error\");\r\n\r\n\t\tif(this.errorElement){\r\n\t\t\tthis.msgElement.appendChild(this.errorElement);\r\n\t\t}else{\r\n\t\t\tthis.msgElement.innerHTML = this.langText(\"data|error\");\r\n\t\t}\r\n\r\n\t\tthis.table.element.appendChild(this.loaderElement);\r\n\t}\r\n\r\n\r\n\thideLoader(){\r\n\t\tif(this.loaderElement.parentNode){\r\n\t\t\tthis.loaderElement.parentNode.removeChild(this.loaderElement);\r\n\t\t}\r\n\t}\r\n}","export default class ExternalEventBus {\r\n\r\n\tconstructor(table, optionsList, debug){\r\n\t\tthis.table = table;\r\n\t\tthis.events = {};\r\n\t\tthis.optionsList = optionsList || {};\r\n\t\tthis.subscriptionNotifiers = {};\r\n\r\n\t\tthis.dispatch = debug ? this._debugDispatch.bind(this) : this._dispatch.bind(this);\r\n\t\tthis.debug = debug;\r\n\t}\r\n\r\n\tsubscriptionChange(key, callback){\r\n\t\tif(!this.subscriptionNotifiers[key]){\r\n\t\t\tthis.subscriptionNotifiers[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.subscriptionNotifiers[key].push(callback);\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis._notifiySubscriptionChange(key, true);\r\n\t\t}\r\n\t}\r\n\r\n\tsubscribe(key, callback){\r\n\t\tif(!this.events[key]){\r\n\t\t\tthis.events[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.events[key].push(callback);\r\n\r\n\t\tthis._notifiySubscriptionChange(key, true);\r\n\t}\r\n\r\n\tunsubscribe(key, callback){\r\n\t\tvar index;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tif(callback){\r\n\t\t\t\tindex = this.events[key].findIndex((item) => {\r\n\t\t\t\t\treturn item === callback;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tthis.events[key].splice(index, 1);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Cannot remove event, no matching event found:\", key, callback);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tdelete this.events[key];\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cannot remove event, no events set on:\", key);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._notifiySubscriptionChange(key, false);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.events[key] && this.events[key].length;\r\n\t}\r\n\r\n\t_notifiySubscriptionChange(key, subscribed){\r\n\t\tvar notifiers = this.subscriptionNotifiers[key];\r\n\r\n\t\tif(notifiers){\r\n\t\t\tnotifiers.forEach((callback)=>{\r\n\t\t\t\tcallback(subscribed);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_dispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift(),\r\n\t\tresult;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tthis.events[key].forEach((callback, i) => {\r\n\t\t\t\tlet callResult = callback.apply(this.table, args);\r\n\r\n\t\t\t\tif(!i){\r\n\t\t\t\t\tresult = callResult;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t_debugDispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"ExternalEvent:\" + args[0];\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._dispatch(...arguments)\r\n\t}\r\n}","export default class InternalEventBus {\r\n\r\n\tconstructor(debug){\r\n\t\tthis.events = {};\r\n\t\tthis.subscriptionNotifiers = {};\r\n\r\n\t\tthis.dispatch = debug ? this._debugDispatch.bind(this) : this._dispatch.bind(this);\r\n\t\tthis.chain = debug ? this._debugChain.bind(this) : this._chain.bind(this);\r\n\t\tthis.confirm = debug ? this._debugConfirm.bind(this) : this._confirm.bind(this);\r\n\t\tthis.debug = debug;\r\n\t}\r\n\r\n\tsubscriptionChange(key, callback){\r\n\t\tif(!this.subscriptionNotifiers[key]){\r\n\t\t\tthis.subscriptionNotifiers[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.subscriptionNotifiers[key].push(callback);\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis._notifiySubscriptionChange(key, true);\r\n\t\t}\r\n\t}\r\n\r\n\tsubscribe(key, callback, priority = 10000){\r\n\t\tif(!this.events[key]){\r\n\t\t\tthis.events[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.events[key].push({callback, priority});\r\n\r\n\t\tthis.events[key].sort((a, b) => {\r\n\t\t\treturn a.priority - b.priority;\r\n\t\t});\r\n\r\n\t\tthis._notifiySubscriptionChange(key, true);\r\n\t}\r\n\r\n\tunsubscribe(key, callback){\r\n\t\tvar index;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tif(callback){\r\n\t\t\t\tindex = this.events[key].findIndex((item) => {\r\n\t\t\t\t\treturn item.callback === callback;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tthis.events[key].splice(index, 1);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Cannot remove event, no matching event found:\", key, callback);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cannot remove event, no events set on:\", key);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._notifiySubscriptionChange(key, false);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.events[key] && this.events[key].length;\r\n\t}\r\n\r\n\t_chain(key, args, initialValue, fallback){\r\n\t\tvar value = initialValue;\r\n\r\n\t\tif(!Array.isArray(args)){\r\n\t\t\targs = [args];\r\n\t\t}\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis.events[key].forEach((subscriber, i) => {\r\n\t\t\t\tvalue = subscriber.callback.apply(this, args.concat([value]));\r\n\t\t\t});\r\n\r\n\t\t\treturn value;\r\n\t\t}else{\r\n\t\t\treturn typeof fallback === \"function\" ? fallback() : fallback;\r\n\t\t}\r\n\t}\r\n\r\n\t_confirm(key, args){\r\n\t\tvar confirmed = false;\r\n\r\n\t\tif(!Array.isArray(args)){\r\n\t\t\targs = [args];\r\n\t\t}\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis.events[key].forEach((subscriber, i) => {\r\n\t\t\t\tif(subscriber.callback.apply(this, args)){\r\n\t\t\t\t\tconfirmed = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn confirmed;\r\n\t}\r\n\r\n\t_notifiySubscriptionChange(key, subscribed){\r\n\t\tvar notifiers = this.subscriptionNotifiers[key];\r\n\r\n\t\tif(notifiers){\r\n\t\t\tnotifiers.forEach((callback)=>{\r\n\t\t\t\tcallback(subscribed);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_dispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift();\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tthis.events[key].forEach((subscriber) => {\r\n\t\t\t\tlet callResult = subscriber.callback.apply(this, args);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_debugDispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._dispatch(...arguments);\r\n\t}\r\n\r\n\t_debugChain(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._chain(...arguments);\r\n\t}\r\n\r\n\t_debugConfirm(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._confirm(...arguments);\r\n\t}\r\n}","import Tabulator from '../Tabulator.js';\r\n\r\nclass TableRegistry {\r\n\r\n\tstatic register(table){\r\n\t\tTableRegistry.tables.push(table);\r\n\t}\r\n\r\n\tstatic deregister(table){\r\n\t\tvar index = TableRegistry.tables.indexOf(table);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tTableRegistry.tables.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\tstatic lookupTable(query, silent){\r\n\t\tvar results = [],\r\n\t\tmatches, match;\r\n\r\n\t\tif(typeof query === \"string\"){\r\n\t\t\tmatches = document.querySelectorAll(query);\r\n\r\n\t\t\tif(matches.length){\r\n\t\t\t\tfor(var i = 0; i < matches.length; i++){\r\n\t\t\t\t\tmatch = TableRegistry.matchElement(matches[i]);\r\n\r\n\t\t\t\t\tif(match){\r\n\t\t\t\t\t\tresults.push(match);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}else if((typeof HTMLElement !== \"undefined\" && query instanceof HTMLElement) || query instanceof Tabulator){\r\n\t\t\tmatch = TableRegistry.matchElement(query);\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tresults.push(match);\r\n\t\t\t}\r\n\t\t}else if(Array.isArray(query)){\r\n\t\t\tquery.forEach(function(item){\r\n\t\t\t\tresults = results.concat(TableRegistry.lookupTable(item));\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Table Connection Error - Invalid Selector\", query);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n\r\n\tstatic matchElement(element){\r\n\t\treturn TableRegistry.tables.find(function(table){\r\n\t\t\treturn element instanceof Tabulator ? table === element : table.element === element;\r\n\t\t});\r\n\t}\r\n}\r\n\r\nTableRegistry.tables = [];\r\n\r\nexport default TableRegistry;","//resize columns to fit data they contain\r\nexport default function(columns){\r\n\tthis.table.columnManager.renderer.reinitializeColumnWidths(columns);\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n};","//resize columns to fit data they contain and stretch row to fill table, also used for fitDataTable\r\nexport default function(columns){\r\n\tcolumns.forEach(function(column){\r\n\t\tcolumn.reinitializeWidth();\r\n\t});\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n};","//resize columns to fit data the contain and stretch last column to fill table\r\nexport default function(columns){\r\n\tvar colsWidth = 0,\r\n\ttableWidth = this.table.rowManager.element.clientWidth,\r\n\tgap = 0,\r\n\tlastCol = false;\r\n\r\n\tcolumns.forEach((column, i) => {\r\n\t\tif(!column.widthFixed){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t}\r\n\r\n\t\tif(this.table.options.responsiveLayout ? column.modules.responsive.visible : column.visible){\r\n\t\t\tlastCol = column;\r\n\t\t}\r\n\r\n\t\tif(column.visible){\r\n\t\t\tcolsWidth += column.getWidth();\r\n\t\t}\r\n\t});\r\n\r\n\tif(lastCol){\r\n\t\tgap = tableWidth - colsWidth + lastCol.getWidth();\r\n\r\n\t\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\t\tlastCol.setWidth(0);\r\n\t\t\tthis.table.modules.responsiveLayout.update();\r\n\t\t}\r\n\r\n\t\tif(gap > 0){\r\n\t\t\tlastCol.setWidth(gap);\r\n\t\t}else{\r\n\t\t\tlastCol.reinitializeWidth();\r\n\t\t}\r\n\t}else{\r\n\t\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\t\tthis.table.modules.responsiveLayout.update();\r\n\t\t}\r\n\t}\r\n};","//resize columns to fit\r\nexport default function(columns){\r\n\tvar totalWidth = this.table.element.clientWidth; //table element width\r\n\tvar fixedWidth = 0; //total width of columns with a defined width\r\n\tvar flexWidth = 0; //total width available to flexible columns\r\n\tvar flexGrowUnits = 0; //total number of widthGrow blocks accross all columns\r\n\tvar flexColWidth = 0; //desired width of flexible columns\r\n\tvar flexColumns = []; //array of flexible width columns\r\n\tvar fixedShrinkColumns = []; //array of fixed width columns that can shrink\r\n\tvar flexShrinkUnits = 0; //total number of widthShrink blocks accross all columns\r\n\tvar overflowWidth = 0; //horizontal overflow width\r\n\tvar gapFill=0; //number of pixels to be added to final column to close and half pixel gaps\r\n\r\n\tfunction calcWidth(width){\r\n\t\tvar colWidth;\r\n\r\n\t\tif(typeof(width) == \"string\"){\r\n\t\t\tif(width.indexOf(\"%\") > -1){\r\n\t\t\t\tcolWidth = (totalWidth / 100) * parseInt(width);\r\n\t\t\t}else{\r\n\t\t\t\tcolWidth = parseInt(width);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcolWidth = width;\r\n\t\t}\r\n\r\n\t\treturn colWidth;\r\n\t}\r\n\r\n\t//ensure columns resize to take up the correct amount of space\r\n\tfunction scaleColumns(columns, freeSpace, colWidth, shrinkCols){\r\n\r\n\t\tvar oversizeCols = [],\r\n\t\toversizeSpace = 0,\r\n\t\tremainingSpace = 0,\r\n\t\tnextColWidth = 0,\r\n\t\tremainingFlexGrowUnits = flexGrowUnits,\r\n\t\tgap = 0,\r\n\t\tchangeUnits = 0,\r\n\t\tundersizeCols = [];\r\n\r\n\t\tfunction calcGrow(col){\r\n\t\t\treturn (colWidth * (col.column.definition.widthGrow || 1));\r\n\t\t}\r\n\r\n\t\tfunction calcShrink(col){\r\n\t\t\treturn (calcWidth(col.width) - (colWidth * (col.column.definition.widthShrink || 0)))\r\n\t\t}\r\n\r\n\t\tcolumns.forEach(function(col, i){\r\n\t\t\tvar width = shrinkCols ? calcShrink(col) : calcGrow(col);\r\n\t\t\tif(col.column.minWidth >= width){\r\n\t\t\t\toversizeCols.push(col);\r\n\t\t\t}else{\r\n\t\t\t\tif(col.column.maxWidth && col.column.maxWidth < width){\r\n\t\t\t\t\tcol.width = col.column.maxWidth;\r\n\t\t\t\t\tfreeSpace -= col.column.maxWidth;\r\n\r\n\t\t\t\t\tremainingFlexGrowUnits -= shrinkCols ? (col.column.definition.widthShrink || 1) : (col.column.definition.widthGrow || 1);\r\n\r\n\t\t\t\t\tif(remainingFlexGrowUnits){\r\n\t\t\t\t\t\tcolWidth = Math.floor(freeSpace/remainingFlexGrowUnits);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tundersizeCols.push(col);\r\n\t\t\t\t\tchangeUnits += shrinkCols ? (col.column.definition.widthShrink || 1) : (col.column.definition.widthGrow || 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(oversizeCols.length){\r\n\t\t\toversizeCols.forEach(function(col){\r\n\t\t\t\toversizeSpace += shrinkCols ? col.width - col.column.minWidth : col.column.minWidth;\r\n\t\t\t\tcol.width = col.column.minWidth;\r\n\t\t\t});\r\n\r\n\t\t\tremainingSpace = freeSpace - oversizeSpace;\r\n\r\n\t\t\tnextColWidth = changeUnits ? Math.floor(remainingSpace/changeUnits) : remainingSpace;\r\n\r\n\t\t\tgap = remainingSpace - (nextColWidth * changeUnits);\r\n\r\n\t\t\tgap += scaleColumns(undersizeCols, remainingSpace, nextColWidth, shrinkCols);\r\n\t\t}else{\r\n\t\t\tgap = changeUnits ? freeSpace - (Math.floor(freeSpace/changeUnits) * changeUnits) : freeSpace;\r\n\r\n\t\t\tundersizeCols.forEach(function(column){\r\n\t\t\t\tcolumn.width = shrinkCols ? calcShrink(column) : calcGrow(column);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn gap;\r\n\t}\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n\r\n\t//adjust for vertical scrollbar if present\r\n\tif(this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight){\r\n\t\ttotalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth;\r\n\t}\r\n\r\n\tcolumns.forEach(function(column){\r\n\t\tvar width, minWidth, colWidth;\r\n\r\n\t\tif(column.visible){\r\n\r\n\t\t\twidth = column.definition.width;\r\n\t\t\tminWidth = parseInt(column.minWidth);\r\n\r\n\t\t\tif(width){\r\n\r\n\t\t\t\tcolWidth = calcWidth(width);\r\n\r\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\r\n\r\n\t\t\t\tif(column.definition.widthShrink){\r\n\t\t\t\t\tfixedShrinkColumns.push({\r\n\t\t\t\t\t\tcolumn:column,\r\n\t\t\t\t\t\twidth:colWidth > minWidth ? colWidth : minWidth\r\n\t\t\t\t\t});\r\n\t\t\t\t\tflexShrinkUnits += column.definition.widthShrink;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tflexColumns.push({\r\n\t\t\t\t\tcolumn:column,\r\n\t\t\t\t\twidth:0,\r\n\t\t\t\t});\r\n\t\t\t\tflexGrowUnits += column.definition.widthGrow || 1;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\t//calculate available space\r\n\tflexWidth = totalWidth - fixedWidth;\r\n\r\n\t//calculate correct column size\r\n\tflexColWidth = Math.floor(flexWidth / flexGrowUnits)\r\n\r\n\t//generate column widths\r\n\tvar gapFill = scaleColumns(flexColumns, flexWidth, flexColWidth, false);\r\n\r\n\t//increase width of last column to account for rounding errors\r\n\tif(flexColumns.length && gapFill > 0){\r\n\t\tflexColumns[flexColumns.length-1].width += + gapFill;\r\n\t}\r\n\r\n\t//caculate space for columns to be shrunk into\r\n\tflexColumns.forEach(function(col){\r\n\t\tflexWidth -= col.width;\r\n\t});\r\n\r\n\toverflowWidth = Math.abs(gapFill) + flexWidth;\r\n\r\n\t//shrink oversize columns if there is no available space\r\n\tif(overflowWidth > 0 && flexShrinkUnits){\r\n\t\tgapFill = scaleColumns(fixedShrinkColumns, overflowWidth, Math.floor(overflowWidth / flexShrinkUnits), true);\r\n\t}\r\n\r\n\t//decrease width of last column to account for rounding errors\r\n\tif(fixedShrinkColumns.length){\r\n\t\tfixedShrinkColumns[fixedShrinkColumns.length-1].width -= gapFill;\r\n\t}\r\n\r\n\tflexColumns.forEach(function(col){\r\n\t\tcol.column.setWidth(col.width);\r\n\t});\r\n\r\n\tfixedShrinkColumns.forEach(function(col){\r\n\t\tcol.column.setWidth(col.width);\r\n\t});\r\n};","import fitData from './modes/fitData.js';\r\nimport fitDataGeneral from './modes/fitDataGeneral.js';\r\nimport fitDataStretch from './modes/fitDataStretch.js';\r\nimport fitColumns from './modes/fitColumns.js';\r\n\r\nexport default {\r\n\tfitData:fitData,\r\n\tfitDataFill:fitDataGeneral,\r\n\tfitDataTable:fitDataGeneral,\r\n\tfitDataStretch:fitDataStretch,\r\n\tfitColumns:fitColumns ,\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultModes from './defaults/modes.js';\r\n\r\nclass Layout extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table, \"layout\");\r\n\r\n\t\tthis.mode = null;\r\n\r\n\t\tthis.registerTableOption(\"layout\", \"fitData\"); //layout type\r\n\t\tthis.registerTableOption(\"layoutColumnsOnNewData\", false); //update column widths on setData\r\n\r\n\t\tthis.registerColumnOption(\"widthGrow\");\r\n\t\tthis.registerColumnOption(\"widthShrink\");\r\n\t}\r\n\r\n\t//initialize layout system\r\n\tinitialize(){\r\n\t\tvar layout = this.table.options.layout;\r\n\r\n\t\tif(Layout.modes[layout]){\r\n\t\t\tthis.mode = layout;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Layout Error - invalid mode set, defaulting to 'fitData' : \" + layout);\r\n\t\t\tthis.mode = 'fitData';\r\n\t\t}\r\n\r\n\t\tthis.table.element.setAttribute(\"tabulator-layout\", this.mode);\r\n\t}\r\n\r\n\tgetMode(){\r\n\t\treturn this.mode;\r\n\t}\r\n\r\n\t//trigger table layout\r\n\tlayout(){\r\n\t\tthis.dispatch(\"layout-refreshing\")\r\n\t\tLayout.modes[this.mode].call(this, this.table.columnManager.columnsByIndex);\r\n\r\n\t\tthis.dispatch(\"layout-refreshed\")\r\n\t}\r\n}\r\n\r\nLayout.moduleName = \"layout\";\r\n\r\n//load defaults\r\nLayout.modes = defaultModes;\r\n\r\nexport default Layout;","export default {\r\n\t\"default\":{ //hold default locale text\r\n\t\t\"groups\":{\r\n\t\t\t\"item\":\"item\",\r\n\t\t\t\"items\":\"items\",\r\n\t\t},\r\n\t\t\"columns\":{\r\n\t\t},\r\n\t\t\"data\":{\r\n\t\t\t\"loading\":\"Loading\",\r\n\t\t\t\"error\":\"Error\",\r\n\t\t},\r\n\t\t\"pagination\":{\r\n\t\t\t\"page_size\":\"Page Size\",\r\n\t\t\t\"page_title\":\"Show Page\",\r\n\t\t\t\"first\":\"First\",\r\n\t\t\t\"first_title\":\"First Page\",\r\n\t\t\t\"last\":\"Last\",\r\n\t\t\t\"last_title\":\"Last Page\",\r\n\t\t\t\"prev\":\"Prev\",\r\n\t\t\t\"prev_title\":\"Prev Page\",\r\n\t\t\t\"next\":\"Next\",\r\n\t\t\t\"next_title\":\"Next Page\",\r\n\t\t\t\"all\":\"All\",\r\n\t\t\t\"counter\":{\r\n\t\t\t\t\"showing\": \"Showing\",\r\n\t\t\t\t\"of\": \"of\",\r\n\t\t\t\t\"rows\": \"rows\",\r\n\t\t\t\t\"pages\": \"pages\",\r\n\t\t\t}\r\n\t\t},\r\n\t\t\"headerFilters\":{\r\n\t\t\t\"default\":\"filter column...\",\r\n\t\t\t\"columns\":{}\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defaultLangs from './defaults/langs.js';\r\n\r\nclass Localize extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.locale = \"default\"; //current locale\r\n\t\tthis.lang = false; //current language\r\n\t\tthis.bindings = {}; //update events to call when locale is changed\r\n\t\tthis.langList = {};\r\n\r\n\t\tthis.registerTableOption(\"locale\", false); //current system language\r\n\t\tthis.registerTableOption(\"langs\", {});\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.langList = Helpers.deepClone(Localize.langs);\r\n\r\n\t\tif(this.table.options.columnDefaults.headerFilterPlaceholder !== false){\r\n\t\t\tthis.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder);\r\n\t\t}\r\n\r\n\t\tfor(let locale in this.table.options.langs){\r\n\t\t\tthis.installLang(locale, this.table.options.langs[locale]);\r\n\t\t}\r\n\r\n\t\tthis.setLocale(this.table.options.locale);\r\n\r\n\t\tthis.registerTableFunction(\"setLocale\", this.setLocale.bind(this));\r\n\t\tthis.registerTableFunction(\"getLocale\", this.getLocale.bind(this));\r\n\t\tthis.registerTableFunction(\"getLang\", this.getLang.bind(this));\r\n\t}\r\n\r\n\t//set header placehoder\r\n\tsetHeaderFilterPlaceholder(placeholder){\r\n\t\tthis.langList.default.headerFilters.default = placeholder;\r\n\t}\r\n\r\n\t//set header filter placeholder by column\r\n\tsetHeaderFilterColumnPlaceholder(column, placeholder){\r\n\t\tthis.langList.default.headerFilters.columns[column] = placeholder;\r\n\r\n\t\tif(this.lang && !this.lang.headerFilters.columns[column]){\r\n\t\t\tthis.lang.headerFilters.columns[column] = placeholder;\r\n\t\t}\r\n\t}\r\n\r\n\t//setup a lang description object\r\n\tinstallLang(locale, lang){\r\n\t\tif(this.langList[locale]){\r\n\t\t\tthis._setLangProp(this.langList[locale], lang);\r\n\t\t}else{\r\n\t\t\tthis.langList[locale] = lang;\r\n\t\t}\r\n\t}\r\n\r\n\t_setLangProp(lang, values){\r\n\t\tfor(let key in values){\r\n\t\t\tif(lang[key] && typeof lang[key] == \"object\"){\r\n\t\t\t\tthis._setLangProp(lang[key], values[key])\r\n\t\t\t}else{\r\n\t\t\t\tlang[key] = values[key];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//set current locale\r\n\tsetLocale(desiredLocale){\r\n\t\tdesiredLocale = desiredLocale || \"default\";\r\n\r\n\t\t//fill in any matching languge values\r\n\t\tfunction traverseLang(trans, path){\r\n\t\t\tfor(var prop in trans){\r\n\t\t\t\tif(typeof trans[prop] == \"object\"){\r\n\t\t\t\t\tif(!path[prop]){\r\n\t\t\t\t\t\tpath[prop] = {};\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttraverseLang(trans[prop], path[prop]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tpath[prop] = trans[prop];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//determing correct locale to load\r\n\t\tif(desiredLocale === true && navigator.language){\r\n\t\t\t//get local from system\r\n\t\t\tdesiredLocale = navigator.language.toLowerCase();\r\n\t\t}\r\n\r\n\t\tif(desiredLocale){\r\n\t\t\t//if locale is not set, check for matching top level locale else use default\r\n\t\t\tif(!this.langList[desiredLocale]){\r\n\t\t\t\tlet prefix = desiredLocale.split(\"-\")[0];\r\n\r\n\t\t\t\tif(this.langList[prefix]){\r\n\t\t\t\t\tconsole.warn(\"Localization Error - Exact matching locale not found, using closest match: \", desiredLocale, prefix);\r\n\t\t\t\t\tdesiredLocale = prefix;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Localization Error - Matching locale not found, using default: \", desiredLocale);\r\n\t\t\t\t\tdesiredLocale = \"default\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.locale = desiredLocale;\r\n\r\n\t\t//load default lang template\r\n\t\tthis.lang = Helpers.deepClone(this.langList.default || {});\r\n\r\n\t\tif(desiredLocale != \"default\"){\r\n\t\t\ttraverseLang(this.langList[desiredLocale], this.lang);\r\n\t\t}\r\n\r\n\t\tthis.dispatchExternal(\"localized\", this.locale, this.lang);\r\n\r\n\t\tthis._executeBindings();\r\n\t}\r\n\r\n\t//get current locale\r\n\tgetLocale(locale){\r\n\t\treturn this.locale;\r\n\t}\r\n\r\n\t//get lang object for given local or current if none provided\r\n\tgetLang(locale){\r\n\t\treturn locale ? this.langList[locale] : this.lang;\r\n\t}\r\n\r\n\t//get text for current locale\r\n\tgetText(path, value){\r\n\t\tvar path = value ? path + \"|\" + value : path,\r\n\t\tpathArray = path.split(\"|\"),\r\n\t\ttext = this._getLangElement(pathArray, this.locale);\r\n\r\n\t\t// if(text === false){\r\n\t\t// \tconsole.warn(\"Localization Error - Matching localized text not found for given path: \", path);\r\n\t\t// }\r\n\r\n\t\treturn text || \"\";\r\n\t}\r\n\r\n\t//traverse langs object and find localized copy\r\n\t_getLangElement(path, locale){\r\n\t\tvar root = this.lang;\r\n\r\n\t\tpath.forEach(function(level){\r\n\t\t\tvar rootPath;\r\n\r\n\t\t\tif(root){\r\n\t\t\t\trootPath = root[level];\r\n\r\n\t\t\t\tif(typeof rootPath != \"undefined\"){\r\n\t\t\t\t\troot = rootPath;\r\n\t\t\t\t}else{\r\n\t\t\t\t\troot = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn root;\r\n\t}\r\n\r\n\t//set update binding\r\n\tbind(path, callback){\r\n\t\tif(!this.bindings[path]){\r\n\t\t\tthis.bindings[path] = [];\r\n\t\t}\r\n\r\n\t\tthis.bindings[path].push(callback);\r\n\r\n\t\tcallback(this.getText(path), this.lang);\r\n\t}\r\n\r\n\t//itterate through bindings and trigger updates\r\n\t_executeBindings(){\r\n\t\tfor(let path in this.bindings){\r\n\t\t\tthis.bindings[path].forEach((binding) => {\r\n\t\t\t\tbinding(this.getText(path), this.lang);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}\r\n\r\nLocalize.moduleName = \"localize\";\r\n\r\n//load defaults\r\nLocalize.langs = defaultLangs;\r\n\r\nexport default Localize;","import Module from '../../core/Module.js';\r\nimport TableRegistry from '../../core/tools/TableRegistry.js';\r\n\r\nclass Comms extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"tableComms\", this.receive.bind(this));\r\n\t}\r\n\r\n\tgetConnections(selectors){\r\n\t\tvar connections = [],\r\n\t\tconnection;\r\n\r\n\t\tconnection = TableRegistry.lookupTable(selectors);\r\n\r\n\t\tconnection.forEach((con) =>{\r\n\t\t\tif(this.table !== con){\r\n\t\t\t\tconnections.push(con);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn connections;\r\n\t}\r\n\r\n\tsend(selectors, module, action, data){\r\n\t\tvar connections = this.getConnections(selectors);\r\n\r\n\t\tconnections.forEach((connection) => {\r\n\t\t\tconnection.tableComms(this.table.element, module, action, data);\r\n\t\t});\r\n\r\n\t\tif(!connections.length && selectors){\r\n\t\t\tconsole.warn(\"Table Connection Error - No tables matching selector found\", selectors);\r\n\t\t}\r\n\t}\r\n\r\n\treceive(table, module, action, data){\r\n\t\tif(this.table.modExists(module)){\r\n\t\t\treturn this.table.modules[module].commsReceived(table, action, data);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Inter-table Comms Error - no such module:\", module);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nComms.moduleName = \"comms\";\r\n\r\nexport default Comms;","import * as coreModules from '../modules/core.js';\r\nimport TableRegistry from './TableRegistry.js';\r\n\r\nexport default class ModuleBinder {\r\n\r\n\tconstructor(tabulator, modules){\r\n\t\tthis.bindStaticFuctionality(tabulator);\r\n\t\tthis.bindModules(tabulator, coreModules, true);\r\n\r\n\t\tif(modules){\r\n\t\t\tthis.bindModules(tabulator, modules);\r\n\t\t}\r\n\t}\r\n\r\n\tbindStaticFuctionality(tabulator){\r\n\t\ttabulator.moduleBindings = {};\r\n\r\n\t\ttabulator.extendModule = function(name, property, values){\r\n\t\t\tif(tabulator.moduleBindings[name]){\r\n\t\t\t\tvar source = tabulator.moduleBindings[name][property];\r\n\r\n\t\t\t\tif(source){\r\n\t\t\t\t\tif(typeof values == \"object\"){\r\n\t\t\t\t\t\tfor(let key in values){\r\n\t\t\t\t\t\t\tsource[key] = values[key];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Module Error - Invalid value type, it must be an object\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Module Error - property does not exist:\", property);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Module Error - module does not exist:\", name);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\ttabulator.registerModule = function(modules){\r\n\t\t\tif(!Array.isArray(modules)){\r\n\t\t\t\tmodules = [modules];\r\n\t\t\t}\r\n\r\n\t\t\tmodules.forEach((mod) => {\r\n\t\t\t\ttabulator.registerModuleBinding(mod)\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\ttabulator.registerModuleBinding = function(mod){\r\n\t\t\ttabulator.moduleBindings[mod.moduleName] = mod;\r\n\t\t};\r\n\r\n\t\ttabulator.findTable = function(query){\r\n\t\t\tvar results = TableRegistry.lookupTable(query, true);\r\n\t\t\treturn Array.isArray(results) && !results.length ? false : results;\r\n\t\t}\r\n\r\n\t\t//ensure that module are bound to instantiated function\r\n\t\ttabulator.prototype.bindModules = function(){\r\n\t\t\tvar orderedMods = [],\r\n\t\t\tunOrderedMods = [];\r\n\r\n\t\t\tthis.modules = {};\r\n\r\n\t\t\tfor(var name in tabulator.moduleBindings){\r\n\t\t\t\tlet mod = tabulator.moduleBindings[name];\r\n\t\t\t\tlet module = new mod(this);\r\n\r\n\t\t\t\tthis.modules[name] = module;\r\n\r\n\t\t\t\tif(mod.prototype.moduleCore){\r\n\t\t\t\t\tthis.modulesCore.push(module);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(mod.moduleInitOrder){\r\n\t\t\t\t\t\torderedMods.push(module);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tunOrderedMods.push(module);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\torderedMods.sort((a, b) => a.moduleInitOrder > b.moduleInitOrder ? 1 : -1);\r\n\r\n\t\t\tthis.modulesRegular = orderedMods.concat(unOrderedMods);\r\n\t\t}\r\n\t}\r\n\r\n\tbindModules(tabulator, modules, core){\r\n\t\tvar mods = Object.values(modules);\r\n\r\n\t\tif(core){\r\n\t\t\tmods.forEach((mod) => {\r\n\t\t\t\tmod.prototype.moduleCore = true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\ttabulator.registerModule(mods);\r\n\t}\r\n}","'use strict';\r\n\r\nimport defaultOptions from './defaults/options.js';\r\n\r\nimport ColumnManager from './ColumnManager.js';\r\nimport RowManager from './RowManager.js';\r\nimport FooterManager from './FooterManager.js';\r\n\r\nimport InteractionMonitor from './tools/InteractionMonitor.js';\r\nimport ComponentFunctionBinder from './tools/ComponentFunctionBinder.js';\r\nimport DataLoader from './tools/DataLoader.js';\r\n\r\nimport ExternalEventBus from './tools/ExternalEventBus.js';\r\nimport InternalEventBus from './tools/InternalEventBus.js';\r\n\r\nimport TableRegistry from './tools/TableRegistry.js';\r\nimport ModuleBinder from './tools/ModuleBinder.js';\r\n\r\nimport OptionsList from './tools/OptionsList.js';\r\n\r\nclass Tabulator {\r\n\r\n\tconstructor(element, options){\r\n\r\n\t\tthis.options = {};\r\n\r\n\t\tthis.columnManager = null; // hold Column Manager\r\n\t\tthis.rowManager = null; //hold Row Manager\r\n\t\tthis.footerManager = null; //holder Footer Manager\r\n\t\tthis.vdomHoz = null; //holder horizontal virtual dom\r\n\t\tthis.externalEvents = null; //handle external event messaging\r\n\t\tthis.eventBus = null; //handle internal event messaging\r\n\t\tthis.interactionMonitor = false; //track user interaction\r\n\t\tthis.browser = \"\"; //hold current browser type\r\n\t\tthis.browserSlow = false; //handle reduced functionality for slower browsers\r\n\t\tthis.browserMobile = false; //check if running on mobile, prevent resize cancelling edit on keyboard appearance\r\n\t\tthis.rtl = false; //check if the table is in RTL mode\r\n\t\tthis.originalElement = null; //hold original table element if it has been replaced\r\n\r\n\t\tthis.componentFunctionBinder = new ComponentFunctionBinder(this); //bind component functions\r\n\t\tthis.dataLoader = false; //bind component functions\r\n\r\n\t\tthis.modules = {}; //hold all modules bound to this table\r\n\t\tthis.modulesCore = []; //hold core modules bound to this table (for initialization purposes)\r\n\t\tthis.modulesRegular = []; //hold regular modules bound to this table (for initialization purposes)\r\n\r\n\t\tthis.optionsList = new OptionsList(this, \"table constructor\");\r\n\r\n\t\tthis.initialized = false;\r\n\r\n\t\tif(this.initializeElement(element)){\r\n\r\n\t\t\tthis.initializeCoreSystems(options);\r\n\r\n\t\t\t//delay table creation to allow event bindings immediately after the constructor\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis._create();\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tTableRegistry.register(this); //register table for inter-device communication\r\n\t}\r\n\r\n\tinitializeElement(element){\r\n\t\tif(typeof HTMLElement !== \"undefined\" && element instanceof HTMLElement){\r\n\t\t\tthis.element = element;\r\n\t\t\treturn true;\r\n\t\t}else if(typeof element === \"string\"){\r\n\t\t\tthis.element = document.querySelector(element);\r\n\r\n\t\t\tif(this.element){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Tabulator Creation Error - no element found matching selector: \", element);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Tabulator Creation Error - Invalid element provided:\", element);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeCoreSystems(options){\r\n\t\tthis.columnManager = new ColumnManager(this);\r\n\t\tthis.rowManager = new RowManager(this);\r\n\t\tthis.footerManager = new FooterManager(this);\r\n\t\tthis.dataLoader = new DataLoader(this);\r\n\r\n\t\tthis.bindModules();\r\n\r\n\t\tthis.options = this.optionsList.generate(Tabulator.defaultOptions, options)\r\n\r\n\t\tthis._clearObjectPointers();\r\n\r\n\t\tthis._mapDeprecatedFunctionality();\r\n\r\n\t\tthis.externalEvents = new ExternalEventBus(this, this.options, this.options.debugEventsExternal);\r\n\t\tthis.eventBus = new InternalEventBus(this.options.debugEventsInternal);\r\n\r\n\t\tthis.interactionMonitor = new InteractionMonitor(this);\r\n\r\n\t\tthis.dataLoader.initialize();\r\n\t\t// this.columnManager.initialize();\r\n\t\t// this.rowManager.initialize();\r\n\t\tthis.footerManager.initialize();\r\n\t}\r\n\r\n\t//convert deprecated functionality to new functions\r\n\t_mapDeprecatedFunctionality(){\r\n\t\t//all previously deprecated functionality removed in the 5.0 release\r\n\t}\r\n\r\n\t_clearSelection(){\r\n\r\n\t\tthis.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tif (window.getSelection) {\r\n\t\t if (window.getSelection().empty) { // Chrome\r\n\t\t \twindow.getSelection().empty();\r\n\t\t } else if (window.getSelection().removeAllRanges) { // Firefox\r\n\t\t \twindow.getSelection().removeAllRanges();\r\n\t\t }\r\n\t\t} else if (document.selection) { // IE?\r\n\t\t\tdocument.selection.empty();\r\n\t\t}\r\n\r\n\t\tthis.element.classList.remove(\"tabulator-block-select\");\r\n\t}\r\n\r\n\t//create table\r\n\t_create(){\r\n\t\tthis.externalEvents.dispatch(\"tableBuilding\");\r\n\t\tthis.eventBus.dispatch(\"table-building\");\r\n\r\n\t\tthis._rtlCheck();\r\n\r\n\t\tthis._buildElement();\r\n\r\n\t\tthis._initializeTable();\r\n\r\n\t\tthis._loadInitialData();\r\n\r\n\t\tthis.initialized = true;\r\n\r\n\t\tthis.externalEvents.dispatch(\"tableBuilt\");\r\n\t}\r\n\r\n\t_rtlCheck(){\r\n\t\tvar style = window.getComputedStyle(this.element);\r\n\r\n\t\tswitch(this.options.textDirection){\r\n\t\t\tcase\"auto\":\r\n\t\t\tif(style.direction !== \"rtl\"){\r\n\t\t\t\tbreak;\r\n\t\t\t};\r\n\r\n\t\t\tcase \"rtl\":\r\n\t\t\tthis.element.classList.add(\"tabulator-rtl\");\r\n\t\t\tthis.rtl = true;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"ltr\":\r\n\t\t\tthis.element.classList.add(\"tabulator-ltr\");\r\n\r\n\t\t\tdefault:\r\n\t\t\tthis.rtl = false;\r\n\t\t}\r\n\t}\r\n\r\n\t//clear pointers to objects in default config object\r\n\t_clearObjectPointers(){\r\n\t\tthis.options.columns = this.options.columns.slice(0);\r\n\r\n\t\tif(Array.isArray(this.options.data) && !this.options.reactiveData){\r\n\t\t\tthis.options.data = this.options.data.slice(0);\r\n\t\t}\r\n\t}\r\n\r\n\t//build tabulator element\r\n\t_buildElement(){\r\n\t\tvar element = this.element,\r\n\t\toptions = this.options,\r\n\t\tnewElement;\r\n\r\n\t\tif(element.tagName === \"TABLE\"){\r\n\t\t\tthis.originalElement = this.element;\r\n\t\t\tnewElement = document.createElement(\"div\");\r\n\r\n\t\t\t//transfer attributes to new element\r\n\t\t\tvar attributes = element.attributes;\r\n\r\n\t\t\t// loop through attributes and apply them on div\r\n\t\t\tfor(var i in attributes){\r\n\t\t\t\tif(typeof attributes[i] == \"object\"){\r\n\t\t\t\t\tnewElement.setAttribute(attributes[i].name, attributes[i].value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// replace table with div element\r\n\t\t\telement.parentNode.replaceChild(newElement, element);\r\n\r\n\t\t\tthis.element = element = newElement;\r\n\t\t}\r\n\r\n\t\telement.classList.add(\"tabulator\");\r\n\t\telement.setAttribute(\"role\", \"grid\");\r\n\r\n\t\t//empty element\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\t//set table height\r\n\t\tif(options.height){\r\n\t\t\toptions.height = isNaN(options.height) ? options.height : options.height + \"px\";\r\n\t\t\telement.style.height = options.height;\r\n\t\t}\r\n\r\n\t\t//set table min height\r\n\t\tif(options.minHeight !== false){\r\n\t\t\toptions.minHeight = isNaN(options.minHeight) ? options.minHeight : options.minHeight + \"px\";\r\n\t\t\telement.style.minHeight = options.minHeight;\r\n\t\t}\r\n\r\n\t\t//set table maxHeight\r\n\t\tif(options.maxHeight !== false){\r\n\t\t\toptions.maxHeight = isNaN(options.maxHeight) ? options.maxHeight : options.maxHeight + \"px\";\r\n\t\t\telement.style.maxHeight = options.maxHeight;\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize core systems and modules\r\n\t_initializeTable(){\r\n\t\tvar element = this.element,\r\n\t\toptions = this.options;\r\n\r\n\t\tthis.interactionMonitor.initialize();\r\n\r\n\t\tthis.columnManager.initialize();\r\n\t\tthis.rowManager.initialize();\r\n\r\n\t\tthis._detectBrowser();\r\n\r\n\t\t//initialize core modules\r\n\t\tthis.modulesCore.forEach((mod) => {\r\n\t\t\tmod.initialize();\r\n\t\t})\r\n\r\n\t\t//build table elements\r\n\t\telement.appendChild(this.columnManager.getElement());\r\n\t\telement.appendChild(this.rowManager.getElement());\r\n\r\n\t\tif(options.footerElement){\r\n\t\t\tthis.footerManager.activate();\r\n\t\t}\r\n\r\n\t\tif(options.autoColumns && options.data){\r\n\r\n\t\t\tthis.columnManager.generateColumnsFromRowData(this.options.data);\r\n\t\t}\r\n\r\n\t\t//initialize regular modules\r\n\t\tthis.modulesRegular.forEach((mod) => {\r\n\t\t\tmod.initialize();\r\n\t\t});\r\n\r\n\t\tthis.columnManager.setColumns(options.columns);\r\n\r\n\t\tthis.eventBus.dispatch(\"table-built\");\r\n\t}\r\n\r\n\t_loadInitialData(){\r\n\t\tthis.dataLoader.load(this.options.data);\r\n\t}\r\n\r\n\t//deconstructor\r\n\tdestroy(){\r\n\t\tvar element = this.element;\r\n\r\n\t\tTableRegistry.deregister(this); //deregister table from inter-device communication\r\n\r\n\t\tthis.eventBus.dispatch(\"table-destroy\");\r\n\r\n\t\t//clear row data\r\n\t\tthis.rowManager.rows.forEach(function(row){\r\n\t\t\trow.wipe();\r\n\t\t});\r\n\r\n\t\tthis.rowManager.rows = [];\r\n\t\tthis.rowManager.activeRows = [];\r\n\t\tthis.rowManager.displayRows = [];\r\n\r\n\t\t//clear DOM\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\t\telement.classList.remove(\"tabulator\");\r\n\t}\r\n\r\n\t_detectBrowser(){\r\n\t\tvar ua = navigator.userAgent||navigator.vendor||window.opera;\r\n\r\n\t\tif(ua.indexOf(\"Trident\") > -1){\r\n\t\t\tthis.browser = \"ie\";\r\n\t\t\tthis.browserSlow = true;\r\n\t\t}else if(ua.indexOf(\"Edge\") > -1){\r\n\t\t\tthis.browser = \"edge\";\r\n\t\t\tthis.browserSlow = true;\r\n\t\t}else if(ua.indexOf(\"Firefox\") > -1){\r\n\t\t\tthis.browser = \"firefox\";\r\n\t\t\tthis.browserSlow = false;\r\n\t\t}else{\r\n\t\t\tthis.browser = \"other\";\r\n\t\t\tthis.browserSlow = false;\r\n\t\t}\r\n\r\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));\r\n\t}\r\n\r\n\t////////////////// Data Handling //////////////////\r\n\t//block table redrawing\r\n\tblockRedraw(){\r\n\t\treturn this.rowManager.blockRedraw();\r\n\t}\r\n\r\n\t//restore table redrawing\r\n\trestoreRedraw(){\r\n\t\treturn this.rowManager.restoreRedraw();\r\n\t}\r\n\r\n\t//load data\r\n\tsetData(data, params, config){\r\n\t\tif(this.initialized){\r\n\t\t\treturn this.dataLoader.load(data, params, config, false);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"setData failed - table not yet initialized. To set initial data please use the 'data' property in the table constructor.\")\r\n\t\t}\r\n\t}\r\n\r\n\t//clear data\r\n\tclearData(){\r\n\t\tthis.dataLoader.blockActiveLoad();\r\n\t\tthis.rowManager.clearData();\r\n\t}\r\n\r\n\t//get table data array\r\n\tgetData(active){\r\n\t\treturn this.rowManager.getData(active);\r\n\t}\r\n\r\n\t//get table data array count\r\n\tgetDataCount(active){\r\n\t\treturn this.rowManager.getDataCount(active);\r\n\t}\r\n\r\n\t//replace data, keeping table in position with same sort\r\n\treplaceData(data, params, config){\r\n\t\tif(this.initialized){\r\n\t\t\treturn this.dataLoader.load(data, params, config, true, true);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"replaceData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update table data\r\n\tupdateData(data){\r\n\t\tvar responses = 0;\r\n\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\tresponses++;\r\n\r\n\t\t\t\t\t\t\trow.updateData(item)\r\n\t\t\t\t\t\t\t.then(()=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"updateData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\taddData(data, pos, index){\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tthis.rowManager.addRows(data, pos, index)\r\n\t\t\t\t\t.then((rows) => {\r\n\t\t\t\t\t\tvar output = [];\r\n\r\n\t\t\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\t\t\toutput.push(row.getComponent());\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tresolve(output);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"addData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update table data\r\n\tupdateOrAddData(data){\r\n\t\tvar rows = [],\r\n\t\tresponses = 0;\r\n\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\r\n\t\t\t\t\t\tresponses++;\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.updateData(item)\r\n\t\t\t\t\t\t\t.then(()=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\t\t\t\t\t\t\t\trows.push(row.getComponent());\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve(rows);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.rowManager.addRows(item)\r\n\t\t\t\t\t\t\t.then((newRows)=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\t\t\t\t\t\t\t\trows.push(newRows[0].getComponent());\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve(rows);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"updateOrAddData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//get row object\r\n\tgetRow(index){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching row found:\", index);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//get row object\r\n\tgetRowFromPosition(position, active){\r\n\t\tvar row = this.rowManager.getRowFromPosition(position, active);\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching row found:\", position);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//delete row from table\r\n\tdeleteRow(index){\r\n\t\tvar foundRows = [];\r\n\r\n\t\tif(!Array.isArray(index)){\r\n\t\t\tindex = [index];\r\n\t\t}\r\n\r\n\t\t//find matching rows\r\n\t\tfor(let item of index){\r\n\t\t\tlet row = this.rowManager.findRow(item, true);\r\n\r\n\t\t\tif(row){\r\n\t\t\t\tfoundRows.push(row);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Delete Error - No matching row found:\", item);\r\n\t\t\t\treturn Promise.reject(\"Delete Error - No matching row found\")\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//sort rows into correct order to ensure smooth delete from table\r\n\t\tfoundRows.sort((a, b) => {\r\n\t\t\treturn this.rowManager.rows.indexOf(a) > this.rowManager.rows.indexOf(b) ? 1 : -1;\r\n\t\t});\r\n\r\n\t\t//delete rows\r\n\t\tfoundRows.forEach((row) =>{\r\n\t\t\trow.delete()\r\n\t\t});\r\n\r\n\t\tthis.rowManager.reRenderInPosition();\r\n\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\r\n\t//add row to table\r\n\taddRow(data, pos, index){\r\n\t\tif(this.initialized){\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\r\n\t\t\treturn this.rowManager.addRows(data, pos, index)\r\n\t\t\t.then((rows)=>{\r\n\t\t\t\treturn rows[0].getComponent();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"addRow failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update a row if it exitsts otherwise create it\r\n\tupdateOrAddRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t.then(()=>{\r\n\t\t\t\treturn row.getComponent();\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\treturn this.rowManager.addRows(data)\r\n\t\t\t.then((rows)=>{\r\n\t\t\t\treturn rows[0].getComponent();\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\t//update row data\r\n\tupdateRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t.then(()=>{\r\n\t\t\t\treturn Promise.resolve(row.getComponent());\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Update Error - No matching row found:\", index);\r\n\t\t\treturn Promise.reject(\"Update Error - No matching row found\");\r\n\t\t}\r\n\t}\r\n\r\n\t//scroll to row in DOM\r\n\tscrollToRow(index, position, ifVisible){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn this.rowManager.scrollToRow(row, position, ifVisible)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Scroll Error - No matching row found:\", index);\r\n\t\t\treturn Promise.reject(\"Scroll Error - No matching row found\");\r\n\t\t}\r\n\t}\r\n\r\n\tmoveRow(from, to, after){\r\n\t\tvar fromRow = this.rowManager.findRow(from);\r\n\r\n\t\tif(fromRow){\r\n\t\t\tfromRow.moveToRow(to, after);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching row found:\", from);\r\n\t\t}\r\n\t}\r\n\r\n\tgetRows(active){\r\n\t\treturn this.rowManager.getComponents(active);\r\n\t}\r\n\r\n\t//get position of row in table\r\n\tgetRowPosition(index, active){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn this.rowManager.getRowPosition(row, active);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Position Error - No matching row found:\", index);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t/////////////// Column Functions ///////////////\r\n\tsetColumns(definition){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.columnManager.setColumns(definition);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"setColumns failed - table not yet initialized. To set initial data please use the 'columns' property in the table constructor.\")\r\n\t\t}\r\n\t}\r\n\r\n\tgetColumns(structured){\r\n\t\treturn this.columnManager.getComponents(structured);\r\n\t}\r\n\r\n\tgetColumn(field){\r\n\t\tvar col = this.columnManager.findColumn(field);\r\n\r\n\t\tif(col){\r\n\t\t\treturn col.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tgetColumnDefinitions(){\r\n\t\treturn this.columnManager.getDefinitionTree();\r\n\t}\r\n\r\n\tshowColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tcolumn.show();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Show Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\thideColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tcolumn.hide();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Hide Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\ttoggleColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tif(column.visible){\r\n\t\t\t\tcolumn.hide();\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.show();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Visibility Toggle Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\taddColumn(definition, before, field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\treturn this.columnManager.addColumn(definition, before, column)\r\n\t\t.then((column) => {\r\n\t\t\treturn column.getComponent();\r\n\t\t});\r\n\t}\r\n\r\n\tdeleteColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn column.delete();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Delete Error - No matching column found:\", field);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\r\n\tupdateColumnDefinition(field, definition){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn column.updateDefinition(definition)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Update Error - No matching column found:\", field);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\r\n\tmoveColumn(from, to, after){\r\n\t\tvar fromColumn = this.columnManager.findColumn(from);\r\n\t\tvar toColumn = this.columnManager.findColumn(to);\r\n\r\n\t\tif(fromColumn){\r\n\t\t\tif(toColumn){\r\n\t\t\t\tthis.columnManager.moveColumn(fromColumn, toColumn, after)\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Move Error - No matching column found:\", toColumn);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching column found:\", from);\r\n\t\t}\r\n\t}\r\n\r\n\t//scroll to column in DOM\r\n\tscrollToColumn(field, position, ifVisible){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\t\tif(column){\r\n\t\t\t\treturn this.columnManager.scrollToColumn(column, position, ifVisible)\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - No matching column found:\", field);\r\n\t\t\t\treturn Promise.reject(\"Scroll Error - No matching column found\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//////////// General Public Functions ////////////\r\n\t//redraw list without updating data\r\n\tredraw(force){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.columnManager.redraw(force);\r\n\t\t\tthis.rowManager.redraw(force);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"redraw failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\tsetHeight(height){\r\n\t\tthis.options.height = isNaN(height) ? height : height + \"px\";\r\n\t\tthis.element.style.height = this.options.height;\r\n\t\tthis.rowManager.initializeRenderer();\r\n\t\tthis.rowManager.redraw();\r\n\t}\r\n\r\n\t//////////////////// Event Bus ///////////////////\r\n\r\n\ton(key, callback){\r\n\t\tthis.externalEvents.subscribe(key, callback);\r\n\t}\r\n\r\n\toff(key, callback){\r\n\t\tthis.externalEvents.unsubscribe(key, callback);\r\n\t}\r\n\r\n\tdispatchEvent(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift();\r\n\r\n\t\tthis.externalEvents.dispatch(...arguments)\r\n\t}\r\n\r\n\t////////////// Extension Management //////////////\r\n\tmodExists(plugin, required){\r\n\t\tif(this.modules[plugin]){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tif(required){\r\n\t\t\t\tconsole.error(\"Tabulator Module Not Installed: \" + plugin);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tmodule(key){\r\n\t\tvar mod = this.modules[key];\r\n\r\n\t\tif(!mod){\r\n\t\t\tconsole.error(\"Tabulator module not installed: \" + key);\r\n\t\t}\r\n\r\n\t\treturn mod;\r\n\t}\r\n}\r\n\r\n//default setup options\r\nTabulator.defaultOptions = defaultOptions;\r\n\r\n//bind modules and static functionality\r\nnew ModuleBinder(Tabulator);\r\n\r\nexport default Tabulator;\r\n","//tabulator with all modules installed\r\nimport {default as Tabulator} from './Tabulator.js';\r\nimport * as modules from '../core/modules/optional.js';\r\nimport ModuleBinder from './tools/ModuleBinder.js';\r\n\r\nclass TabulatorFull extends Tabulator {};\r\n\r\n//bind modules and static functionality\r\nnew ModuleBinder(TabulatorFull, modules);\r\n\r\nexport default TabulatorFull;","export default class PseudoRow {\r\n\r\n\tconstructor (type){\r\n\t\tthis.type = type;\r\n\t\tthis.element = this._createElement();\r\n\t}\r\n\r\n\t_createElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\treturn el;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tgetComponent(){\r\n\t\treturn false;\r\n\t}\r\n\r\n\tgetData(){\r\n\t\treturn {};\r\n\t}\r\n\r\n\tgetHeight(){\r\n\t\treturn this.element.outerHeight;\r\n\t}\r\n\r\n\tinitialize(){}\r\n\r\n\treinitialize(){}\r\n\r\n\tnormalizeHeight(){}\r\n\r\n\tgenerateCells(){}\r\n\r\n\treinitializeHeight(){}\r\n\r\n\tcalcHeight(){}\r\n\r\n\tsetCellHeight(){}\r\n\r\n\tclearCellHeight(){}\r\n}"],"names":["generateParamsList","defaultOptions","RowComponent","html","textarea","tickCross","star","progress","csv","json","datetime","number","RendererVirtualDomHorizontal","RendererBasicHorizontal","RendererVirtualDomVertical","RendererBasicVertical","InteractionMonitor"],"mappings":";AAAe,MAAM,WAAW;AAChC;AACA,CAAC,WAAW,CAAC,KAAK,CAAC;AACnB,EAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;AACrB,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC;AACzB,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;AACnF,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,CAAC,QAAQ,EAAE;AACX,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC,CAAC;AAC3D,EAAE;AACF;AACA,CAAC,QAAQ,EAAE;AACX,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC;AACxD,EAAE;AACF;AACA,CAAC,UAAU,EAAE;AACb,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,CAAC;AAC7D,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gBAAgB,EAAE;AACnB,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,SAAS,CAAC,CAAC;AAC/D,EAAE;AACF;AACA,CAAC,SAAS,EAAE;AACZ,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IA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AS,SAAS,CAAC,EACtC;AACA;AACA,IAAI,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC;;ACRzB,MAAM,SAAS,CAAC;AAC/B;AACA,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;AACnB,EAAE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACnB,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;AACvC,EAAE;AACF;AACA,CAAC,cAAc,EAAE;AACjB,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AACzC,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACpC,EAAE,OAAO,EAAE,CAAC;AACZ,EAAE;AACF;AACA,CAAC,UAAU,EAAE;AACb,EAAE,OAAO,IAAI,CAAC,OAAO,CAAC;AACtB,EAAE;AACF;AACA,CAAC,YAAY,EAAE;AACf,EAAE,OAAO,KAAK,CAAC;AACf,EAAE;AACF;AACA,CAAC,OAAO,EAAE;AACV,EAAE,OAAO,EAAE,CAAC;AACZ,EAAE;AACF;AACA,CAAC,SAAS,EAAE;AACZ,EAAE,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;AAClC,EAAE;AACF;AACA,CAAC,UAAU,EAAE,EAAE;AACf;AACA,CAAC,YAAY,EAAE,EAAE;AACjB;AACA,CAAC,eAAe,EAAE,EAAE;AACpB;AACA,CAAC,aAAa,EAAE,EAAE;AAClB;AACA,CAAC,kBAAkB,EAAE,EAAE;AACvB;AACA,CAAC,UAAU,EAAE,EAAE;AACf;AACA,CAAC,aAAa,EAAE,EAAE;AAClB;AACA,CAAC,eAAe,EAAE,EAAE;AACpB;;"} \ No newline at end of file diff --git a/dist/js/tabulator_esm.min.js b/dist/js/tabulator_esm.min.js index b370916ea..a305342dd 100644 --- a/dist/js/tabulator_esm.min.js +++ b/dist/js/tabulator_esm.min.js @@ -1,3 +1,3 @@ -/* Tabulator v5.1.7 (c) Oliver Folkerd 2022 */ -class e{constructor(e){this.table=e}reloadData(e,t){return this.table.dataLoader.load(e,void 0,void 0,void 0,t)}langText(){return this.table.modules.localize.getText(...arguments)}langBind(){return this.table.modules.localize.bind(...arguments)}langLocale(){return this.table.modules.localize.getLocale(...arguments)}commsConnections(){return this.table.modules.comms.getConnections(...arguments)}commsSend(){return this.table.modules.comms.send(...arguments)}layoutMode(){return this.table.modules.layout.getMode()}layoutRefresh(){return this.table.modules.layout.layout()}subscribe(){return this.table.eventBus.subscribe(...arguments)}unsubscribe(){return this.table.eventBus.unsubscribe(...arguments)}subscribed(e){return this.table.eventBus.subscribed(e)}subscriptionChange(){return this.table.eventBus.subscriptionChange(...arguments)}dispatch(){return this.table.eventBus.dispatch(...arguments)}chain(){return this.table.eventBus.chain(...arguments)}confirm(){return this.table.eventBus.confirm(...arguments)}dispatchExternal(){return this.table.externalEvents.dispatch(...arguments)}subscribedExternal(e){return this.table.externalEvents.subscribed(e)}subscriptionChangeExternal(){return this.table.externalEvents.subscriptionChange(...arguments)}options(e){return this.table.options[e]}setOption(e,t){return void 0!==t&&(this.table.options[e]=t),this.table.options[e]}module(e){return this.table.module(e)}}class t extends e{constructor(e,t){super(e),this._handler=null}initialize(){}registerTableOption(e,t){this.table.optionsList.register(e,t)}registerColumnOption(e,t){this.table.columnManager.optionsList.register(e,t)}registerTableFunction(e,t){void 0===this.table[e]?this.table[e]=t:console.warn("Unable to bind table function, name already in use",e)}registerComponentFunction(e,t,i){return this.table.componentFunctionBinder.bind(e,t,i)}registerDataHandler(e,t){this.table.rowManager.registerDataPipelineHandler(e,t),this._handler=e}registerDisplayHandler(e,t){this.table.rowManager.registerDisplayPipelineHandler(e,t),this._handler=e}refreshData(e,t){t||(t=this._handler),t&&this.table.rowManager.refreshActiveData(t,!1,e)}}class s{static elVisible(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)}static elOffset(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}}static deepClone(e,t,i=[]){var s={}.__proto__,o=[].__proto__;for(var n in t||(t=Object.assign(Array.isArray(e)?[]:{},e)),e){let r,a,l=e[n];null==l||"object"!=typeof l||l.__proto__!==s&&l.__proto__!==o||(r=i.findIndex((e=>e.subject===l)),r>-1?t[n]=i[r].copy:(a=Object.assign(Array.isArray(l)?[]:{},l),i.unshift({subject:l,copy:a}),t[n]=this.deepClone(l,a,i)))}return t}}class o extends t{constructor(e){super(e),this.allowedTypes=["","data","download","clipboard","print","htmlOutput"],this.registerColumnOption("accessor"),this.registerColumnOption("accessorParams"),this.registerColumnOption("accessorData"),this.registerColumnOption("accessorDataParams"),this.registerColumnOption("accessorDownload"),this.registerColumnOption("accessorDownloadParams"),this.registerColumnOption("accessorClipboard"),this.registerColumnOption("accessorClipboardParams"),this.registerColumnOption("accessorPrint"),this.registerColumnOption("accessorPrintParams"),this.registerColumnOption("accessorHtmlOutput"),this.registerColumnOption("accessorHtmlOutputParams")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-retrieve",this.transformRow.bind(this))}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach((s=>{var o,n="accessor"+(s.charAt(0).toUpperCase()+s.slice(1));e.definition[n]&&(o=this.lookupAccessor(e.definition[n]))&&(t=!0,i[n]={accessor:o,params:e.definition[n+"Params"]||{}})})),t&&(e.modules.accessor=i)}lookupAccessor(e){var t=!1;switch(typeof e){case"string":o.accessors[e]?t=o.accessors[e]:console.warn("Accessor Error - No such accessor found, ignoring: ",e);break;case"function":t=e}return t}transformRow(e,t){var i="accessor"+(t.charAt(0).toUpperCase()+t.slice(1)),o=e.getComponent(),n=s.deepClone(e.data||{});return this.table.columnManager.traverse((function(e){var s,r,a,l;e.modules.accessor&&(r=e.modules.accessor[i]||e.modules.accessor.accessor||!1)&&"undefined"!=(s=e.getFieldValue(n))&&(l=e.getComponent(),a="function"==typeof r.params?r.params(s,n,t,l,o):r.params,e.setFieldValue(n,r.accessor(s,n,t,a,l,o)))})),n}}o.moduleName="accessor",o.accessors={};function n(e,t){var i=[];if(t=t||"",Array.isArray(e))e.forEach(((e,s)=>{i=i.concat(n(e,t?t+"["+s+"]":s))}));else if("object"==typeof e)for(var s in e)i=i.concat(n(e[s],t?t+"["+s+"]":s));else i.push({key:t,value:e});return i}function r(e){var t=n(e),i=[];return t.forEach((function(e){i.push(encodeURIComponent(e.key)+"="+encodeURIComponent(e.value))})),i.join("&")}function a(e,t){var i=[];if(t=t||"",Array.isArray(e))e.forEach(((e,s)=>{i=i.concat(a(e,t?t+"["+s+"]":s))}));else if("object"==typeof e)for(var s in e)i=i.concat(a(e[s],t?t+"["+s+"]":s));else i.push({key:t,value:e});return i}var l={json:{headers:{"Content-Type":"application/json"},body:function(e,t,i){return JSON.stringify(i)}},form:{headers:{},body:function(e,t,i){var s=a(i),o=new FormData;return s.forEach((function(e){o.append(e.key,e.value)})),o}}};class h extends t{constructor(e){super(e),this.config={},this.url="",this.urlGenerator=!1,this.params=!1,this.loaderPromise=!1,this.registerTableOption("ajaxURL",!1),this.registerTableOption("ajaxURLGenerator",!1),this.registerTableOption("ajaxParams",{}),this.registerTableOption("ajaxConfig","get"),this.registerTableOption("ajaxContentType","form"),this.registerTableOption("ajaxRequestFunc",!1),this.registerTableOption("ajaxRequesting",(function(){})),this.registerTableOption("ajaxResponse",!1),this.contentTypeFormatters=h.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||h.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||h.defaultURLGenerator,this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.setDefaultConfig(this.table.options.ajaxConfig),this.registerTableFunction("getAjaxUrl",this.getUrl.bind(this)),this.subscribe("data-loading",this.requestDataCheck.bind(this)),this.subscribe("data-params",this.requestParams.bind(this)),this.subscribe("data-load",this.requestData.bind(this))}requestParams(e,t,i,s){var o=this.table.options.ajaxParams;return o&&("function"==typeof o&&(o=o.call(this.table)),s=Object.assign(s,o)),s}requestDataCheck(e,t,i,s){return!((e||!this.url)&&"string"!=typeof e)}requestData(e,t,i,s,o){var n;return!o&&this.requestDataCheck(e)?(e&&this.setUrl(e),n=this.generateConfig(i),this.sendRequest(this.url,t,n)):o}setDefaultConfig(e={}){this.config=Object.assign({},h.defaultConfig),"string"==typeof e?this.config.method=e:Object.assign(this.config,e)}generateConfig(e={}){var t=Object.assign({},this.config);return"string"==typeof e?t.method=e:Object.assign(t,e),t}setUrl(e){this.url=e}getUrl(){return this.url}sendRequest(e,t,i){return!1!==this.table.options.ajaxRequesting.call(this.table,e,t)?this.loaderPromise(e,i,t).then((i=>(this.table.options.ajaxResponse&&(i=this.table.options.ajaxResponse.call(this.table,e,t,i)),i))):Promise.reject()}}h.moduleName="ajax",h.defaultConfig={method:"GET"},h.defaultURLGenerator=function(e,t,i){return e&&i&&Object.keys(i).length&&(t.method&&"get"!=t.method.toLowerCase()||(t.method="get",e+=(e.includes("?")?"&":"?")+r(i))),e},h.defaultLoaderPromise=function(e,t,i){var s;return new Promise(((o,n)=>{if(e=this.urlGenerator.call(this.table,e,t,i),"GET"!=t.method.toUpperCase())if(s="object"==typeof this.table.options.ajaxContentType?this.table.options.ajaxContentType:this.contentTypeFormatters[this.table.options.ajaxContentType]){for(var r in s.headers)t.headers||(t.headers={}),void 0===t.headers[r]&&(t.headers[r]=s.headers[r]);t.body=s.body.call(this,e,t,i)}else console.warn("Ajax Error - Invalid ajaxContentType value:",this.table.options.ajaxContentType);e?(void 0===t.headers&&(t.headers={}),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),void 0===t.headers["X-Requested-With"]&&(t.headers["X-Requested-With"]="XMLHttpRequest"),void 0===t.mode&&(t.mode="cors"),"cors"==t.mode?(void 0===t.headers.Origin&&(t.headers.Origin=window.location.origin),void 0===t.credentials&&(t.credentials="same-origin")):void 0===t.credentials&&(t.credentials="include"),fetch(e,t).then((e=>{e.ok?e.json().then((e=>{o(e)})).catch((e=>{n(e),console.warn("Ajax Load Error - Invalid JSON returned",e)})):(console.error("Ajax Load Error - Connection Error: "+e.status,e.statusText),n(e))})).catch((e=>{console.error("Ajax Load Error - Connection Error: ",e),n(e)}))):(console.warn("Ajax Load Error - No URL Set"),o([]))}))},h.contentTypeFormatters=l;class d extends t{constructor(e){super(e),this.mode=!0,this.pasteParser=function(){},this.pasteAction=function(){},this.customSelection=!1,this.rowRange=!1,this.blocked=!0,this.registerTableOption("clipboard",!1),this.registerTableOption("clipboardCopyStyled",!0),this.registerTableOption("clipboardCopyConfig",!1),this.registerTableOption("clipboardCopyFormatter",!1),this.registerTableOption("clipboardCopyRowRange","active"),this.registerTableOption("clipboardPasteParser","table"),this.registerTableOption("clipboardPasteAction","insert"),this.registerColumnOption("clipboard"),this.registerColumnOption("titleClipboard")}initialize(){this.mode=this.table.options.clipboard,this.rowRange=this.table.options.clipboardCopyRowRange,!0!==this.mode&&"copy"!==this.mode||this.table.element.addEventListener("copy",(e=>{var t,i;if(!this.blocked){if(e.preventDefault(),this.customSelection)t=this.customSelection,this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t));else{var s=this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig,this.table.options.clipboardCopyStyled,this.rowRange,"clipboard");t=(i=this.table.modules.export.genereateHTMLTable(s))?this.generatePlainContent(s):"",this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t),i=this.table.options.clipboardCopyFormatter("html",i))}window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",t):e.clipboardData&&e.clipboardData.setData?(e.clipboardData.setData("text/plain",t),i&&e.clipboardData.setData("text/html",i)):e.originalEvent&&e.originalEvent.clipboardData.setData&&(e.originalEvent.clipboardData.setData("text/plain",t),i&&e.originalEvent.clipboardData.setData("text/html",i)),this.dispatchExternal("clipboardCopied",t,i),this.reset()}})),!0!==this.mode&&"paste"!==this.mode||this.table.element.addEventListener("paste",(e=>{this.paste(e)})),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction),this.registerTableFunction("copyToClipboard",this.copy.bind(this))}reset(){this.blocked=!0,this.customSelection=!1}generatePlainContent(e){var t=[];return e.forEach((e=>{var i=[];e.columns.forEach((t=>{var s="";if(t)if("group"===e.type&&(t.value=t.component.getKey()),null===t.value)s="";else switch(typeof t.value){case"object":s=JSON.stringify(t.value);break;case"undefined":s="";break;default:s=t.value}i.push(s)})),t.push(i.join("\t"))})),t.join("\n")}copy(e,t){var i,s;this.blocked=!1,this.customSelection=!1,!0!==this.mode&&"copy"!==this.mode||(this.rowRange=e||this.table.options.clipboardCopyRowRange,void 0!==window.getSelection&&void 0!==document.createRange?((e=document.createRange()).selectNodeContents(this.table.element),(i=window.getSelection()).toString()&&t&&(this.customSelection=i.toString()),i.removeAllRanges(),i.addRange(e)):void 0!==document.selection&&void 0!==document.body.createTextRange&&((s=document.body.createTextRange()).moveToElementText(this.table.element),s.select()),document.execCommand("copy"),i&&i.removeAllRanges())}setPasteAction(e){switch(typeof e){case"string":this.pasteAction=d.pasteActions[e],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",e);break;case"function":this.pasteAction=e}}setPasteParser(e){switch(typeof e){case"string":this.pasteParser=d.pasteParsers[e],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",e);break;case"function":this.pasteParser=e}}paste(e){var t,i,s;this.checkPaseOrigin(e)&&(t=this.getPasteData(e),(i=this.pasteParser.call(this,t))?(e.preventDefault(),this.table.modExists("mutator")&&(i=this.mutateData(i)),s=this.pasteAction.call(this,i),this.dispatchExternal("clipboardPasted",t,i,s)):this.dispatchExternal("clipboardPasteError",t))}mutateData(e){var t=[];return Array.isArray(e)?e.forEach((e=>{t.push(this.table.modules.mutator.transformRow(e,"clipboard"))})):t=e,t}checkPaseOrigin(e){var t=!0;return("DIV"!=e.target.tagName||this.table.modules.edit.currentCell)&&(t=!1),t}getPasteData(e){var t;return window.clipboardData&&window.clipboardData.getData?t=window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?t=e.clipboardData.getData("text/plain"):e.originalEvent&&e.originalEvent.clipboardData.getData&&(t=e.originalEvent.clipboardData.getData("text/plain")),t}}d.moduleName="clipboard",d.pasteActions={replace:function(e){return this.table.setData(e)},update:function(e){return this.table.updateOrAddData(e)},insert:function(e){return this.table.addData(e)}},d.pasteParsers={table:function(e){var t=[],i=!0,s=this.table.columnManager.columns,o=[],n=[];return(e=e.split("\n")).forEach((function(e){t.push(e.split("\t"))})),!(!t.length||1===t.length&&t[0].length<2)&&(t[0].forEach((function(e){var t=s.find((function(t){return e&&t.definition.title&&e.trim()&&t.definition.title.trim()===e.trim()}));t?o.push(t):i=!1})),i||(i=!0,o=[],t[0].forEach((function(e){var t=s.find((function(t){return e&&t.field&&e.trim()&&t.field.trim()===e.trim()}));t?o.push(t):i=!1})),i||(o=this.table.columnManager.columnsByIndex)),i&&t.shift(),t.forEach((function(e){var t={};e.forEach((function(e,i){o[i]&&(t[o[i].field]=e)})),n.push(t)})),n)}};class c{constructor(e){return this._row=e,new Proxy(this,{get:function(e,t,i){return void 0!==e[t]?e[t]:e._row.table.componentFunctionBinder.handle("row",e._row,t)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getTable(){return this._row.table}getCells(){var e=[];return this._row.getCells().forEach((function(t){e.push(t.getComponent())})),e}getCell(e){var t=this._row.getCell(e);return!!t&&t.getComponent()}_getSelf(){return this._row}}class u{constructor(e){return this._cell=e,new Proxy(this,{get:function(e,t,i){return void 0!==e[t]?e[t]:e._cell.table.componentFunctionBinder.handle("cell",e._cell,t)}})}getValue(){return this._cell.getValue()}getOldValue(){return this._cell.getOldValue()}getInitialValue(){return this._cell.initialValue}getElement(){return this._cell.getElement()}getRow(){return this._cell.row.getComponent()}getData(){return this._cell.row.getData()}getField(){return this._cell.column.getField()}getColumn(){return this._cell.column.getComponent()}setValue(e,t){void 0===t&&(t=!0),this._cell.setValue(e,t)}restoreOldValue(){this._cell.setValueActual(this._cell.getOldValue())}restoreInitialValue(){this._cell.setValueActual(this._cell.initialValue)}checkHeight(){this._cell.checkHeight()}getTable(){return this._cell.table}_getSelf(){return this._cell}}class m extends e{constructor(e,t){super(e.table),this.table=e.table,this.column=e,this.row=t,this.element=null,this.value=null,this.initialValue,this.oldValue=null,this.modules={},this.height=null,this.width=null,this.minWidth=null,this.component=null,this.loaded=!1,this.build()}build(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data)),this.initialValue=this.value}generateElement(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell"),this.element=this.element}_configureCell(){var e=this.element,t=this.column.getField();(e.style.textAlign=this.column.hozAlign,this.column.vertAlign&&(e.style.display="inline-flex",e.style.alignItems={top:"flex-start",bottom:"flex-end",middle:"center"}[this.column.vertAlign]||"",this.column.hozAlign&&(e.style.justifyContent={left:"flex-start",right:"flex-end",center:"center"}[this.column.hozAlign]||"")),t&&e.setAttribute("tabulator-field",t),this.column.definition.cssClass)&&this.column.definition.cssClass.split(" ").forEach((t=>{e.classList.add(t)}));"hover"===this.table.options.tooltipGenerationMode&&e.addEventListener("mouseenter",(e=>{this._generateTooltip()})),this.dispatch("cell-init",this),this.column.visible||this.hide()}_generateContents(){var e;switch(typeof(e=this.chain("cell-format",this,null,(()=>this.element.innerHTML=this.value)))){case"object":if(e instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(e)}else this.element.innerHTML="",null!=e&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",e);break;case"undefined":case"null":this.element.innerHTML="";break;default:this.element.innerHTML=e}}cellRendered(){this.dispatch("cell-rendered",this)}_generateTooltip(){var e=this.column.tooltip;e?(!0===e?e=this.value:"function"==typeof e&&!1===(e=e(this.getComponent()))&&(e=""),void 0===e&&(e=""),this.element.setAttribute("title",e)):this.element.setAttribute("title","")}getElement(e){return this.loaded||(this.loaded=!0,e||this.layoutElement()),this.element}getValue(){return this.value}getOldValue(){return this.oldValue}setValue(e,t){this.setValueProcessData(e,t)&&(this.dispatch("cell-value-updated",this),this.cellRendered(),this.column.definition.cellEdited&&this.column.definition.cellEdited.call(this.table,this.getComponent()),this.dispatchExternal("cellEdited",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()))}setValueProcessData(e,t){var i=!1;return this.value!==e&&(i=!0,t&&(e=this.chain("cell-value-changing",[this,e],null,e))),this.setValueActual(e),i&&this.dispatch("cell-value-changed",this),i}setValueActual(e){this.oldValue=this.value,this.value=e,this.dispatch("cell-value-save-before",this),this.column.setFieldValue(this.row.data,e),this.dispatch("cell-value-save-after",this),this.loaded&&this.layoutElement()}layoutElement(){this._generateContents(),this._generateTooltip(),this.dispatch("cell-layout",this)}setWidth(){this.width=this.column.width,this.element.style.width=this.column.widthStyled}clearWidth(){this.width="",this.element.style.width=""}getWidth(){return this.width||this.element.offsetWidth}setMinWidth(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled}setMaxWidth(){this.maxWidth=this.column.maxWidth,this.element.style.maxWidth=this.column.maxWidthStyled}checkHeight(){this.row.reinitializeHeight()}clearHeight(){this.element.style.height="",this.height=null}setHeight(){this.height=this.row.height,this.element.style.height=this.row.heightStyled}getHeight(){return this.height||this.element.offsetHeight}show(){this.element.style.display=this.column.vertAlign?"inline-flex":""}hide(){this.element.style.display="none"}delete(){this.dispatch("cell-delete",this),!this.table.rowManager.redrawBlock&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.column.deleteCell(this),this.row.deleteCell(this),this.calcs={}}getIndex(){return this.row.getCellIndex(this)}getComponent(){return this.component||(this.component=new u(this)),this.component}}class p{constructor(e){return this._column=e,this.type="ColumnComponent",new Proxy(this,{get:function(e,t,i){return void 0!==e[t]?e[t]:e._column.table.componentFunctionBinder.handle("column",e._column,t)}})}getElement(){return this._column.getElement()}getDefinition(){return this._column.getDefinition()}getField(){return this._column.getField()}getTitleDownload(){return this._column.getTitleDownload()}getCells(){var e=[];return this._column.cells.forEach((function(t){e.push(t.getComponent())})),e}isVisible(){return this._column.visible}show(){this._column.isGroup?this._column.columns.forEach((function(e){e.show()})):this._column.show()}hide(){this._column.isGroup?this._column.columns.forEach((function(e){e.hide()})):this._column.hide()}toggle(){this._column.visible?this.hide():this.show()}delete(){return this._column.delete()}getSubColumns(){var e=[];return this._column.columns.length&&this._column.columns.forEach((function(t){e.push(t.getComponent())})),e}getParentColumn(){return this._column.parent instanceof b&&this._column.parent.getComponent()}_getSelf(){return this._column}scrollTo(){return this._column.table.columnManager.scrollToColumn(this._column)}getTable(){return this._column.table}move(e,t){var i=this._column.table.columnManager.findColumn(e);i?this._column.table.columnManager.moveColumn(this._column,i,t):console.warn("Move Error - No matching column found:",i)}getNextColumn(){var e=this._column.nextColumn();return!!e&&e.getComponent()}getPrevColumn(){var e=this._column.prevColumn();return!!e&&e.getComponent()}updateDefinition(e){return this._column.updateDefinition(e)}getWidth(){return this._column.getWidth()}setWidth(e){var t;return t=!0===e?this._column.reinitializeWidth(!0):this._column.setWidth(e),this._column.table.columnManager.renderer.rerenderColumns(!0),t}}var g={title:void 0,field:void 0,columns:void 0,visible:void 0,hozAlign:void 0,vertAlign:void 0,width:void 0,minWidth:40,maxWidth:void 0,maxInitialWidth:void 0,tooltip:void 0,cssClass:void 0,variableHeight:void 0,headerTooltip:void 0,headerVertical:void 0,headerHozAlign:void 0,editableTitle:void 0};class b extends e{constructor(e,t){super(t.table),this.definition=e,this.parent=t,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleDownload=null,this.titleFormatterRendered=!1,this.mapDefinitions(),this.setField(this.definition.field),this.modules={},this.width=null,this.widthStyled="",this.maxWidth=null,this.maxWidthStyled="",this.maxInitialWidth=null,this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this.definition.columns?(this.isGroup=!0,this.definition.columns.forEach(((e,t)=>{var i=new b(e,this);this.attachColumn(i)})),this.checkColumnVisibility()):t.registerColumnField(this),this._initialize(),this.bindModuleColumns()}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),e}createGroupElement(){var e=document.createElement("div");return e.classList.add("tabulator-col-group-cols"),e}mapDefinitions(){var e=this.table.options.columnDefaults;if(e)for(let t in e)void 0===this.definition[t]&&(this.definition[t]=e[t]);this.definition=this.table.columnManager.optionsList.generate(b.defaultOptionList,this.definition)}checkDefinition(){Object.keys(this.definition).forEach((e=>{-1===b.defaultOptionList.indexOf(e)&&console.warn("Invalid column definition option in '"+(this.field||this.definition.title)+"' column:",e)}))}setField(e){this.field=e,this.fieldStructure=e?this.table.options.nestedFieldSeparator?e.split(this.table.options.nestedFieldSeparator):[e]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData}registerColumnPosition(e){this.parent.registerColumnPosition(e)}registerColumnField(e){this.parent.registerColumnField(e)}reRegisterPosition(){this.isGroup?this.columns.forEach((function(e){e.reRegisterPosition()})):this.registerColumnPosition(this)}_mapDepricatedFunctionality(){}setTooltip(){var e=this.definition,t=e.headerTooltip;t?!0===t?e.field?this.langBind("columns|"+e.field,(t=>{this.element.setAttribute("title",t||e.title)})):this.element.setAttribute("title",e.title):("function"==typeof t&&!1===(t=t(this.getComponent()))&&(t=""),this.element.setAttribute("title",t)):this.element.setAttribute("title","")}_initialize(){for(var e=this.definition;this.element.firstChild;)this.element.removeChild(this.element.firstChild);e.headerVertical&&(this.element.classList.add("tabulator-col-vertical"),"flip"===e.headerVertical&&this.element.classList.add("tabulator-col-vertical-flip")),this.contentElement=this._bindEvents(),this.contentElement=this._buildColumnHeaderContent(),this.element.appendChild(this.contentElement),this.isGroup?this._buildGroupHeader():this._buildColumnHeader(),this.setTooltip(),this.dispatch("column-init",this),this.element.addEventListener("mouseenter",(e=>{this.setTooltip()}))}_bindEvents(){var e,t,i,s=this.definition;"function"==typeof s.headerClick&&this.element.addEventListener("click",(e=>{s.headerClick(e,this.getComponent())})),"function"==typeof s.headerDblClick&&this.element.addEventListener("dblclick",(e=>{s.headerDblClick(e,this.getComponent())})),"function"==typeof s.headerContext&&this.element.addEventListener("contextmenu",(e=>{s.headerContext(e,this.getComponent())})),"function"==typeof s.headerTap&&(i=!1,this.element.addEventListener("touchstart",(e=>{i=!0}),{passive:!0}),this.element.addEventListener("touchend",(e=>{i&&s.headerTap(e,this.getComponent()),i=!1}))),"function"==typeof s.headerDblTap&&(e=null,this.element.addEventListener("touchend",(t=>{e?(clearTimeout(e),e=null,s.headerDblTap(t,this.getComponent())):e=setTimeout((()=>{clearTimeout(e),e=null}),300)}))),"function"==typeof s.headerTapHold&&(t=null,this.element.addEventListener("touchstart",(e=>{clearTimeout(t),t=setTimeout((function(){clearTimeout(t),t=null,i=!1,s.headerTapHold(e,this.getComponent())}),1e3)}),{passive:!0}),this.element.addEventListener("touchend",(e=>{clearTimeout(t),t=null})))}_buildColumnHeader(){var e=this.definition;this.table;(this.dispatch("column-layout",this),void 0!==e.visible&&(e.visible?this.show(!0):this.hide(!0)),e.cssClass)&&e.cssClass.split(" ").forEach((e=>{this.element.classList.add(e)}));e.field&&this.element.setAttribute("tabulator-field",e.field),this.setMinWidth(parseInt(e.minWidth)),e.maxInitialWidth&&(this.maxInitialWidth=parseInt(e.maxInitialWidth)),e.maxWidth&&this.setMaxWidth(parseInt(e.maxWidth)),this.reinitializeWidth(),this.tooltip=this.definition.tooltip,this.hozAlign=this.definition.hozAlign,this.vertAlign=this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign}_buildColumnHeaderContent(){this.definition,this.table;var e=document.createElement("div");return e.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),e.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),e}_buildColumnHeaderTitle(){var e=this.definition,t=document.createElement("div");if(t.classList.add("tabulator-col-title"),e.editableTitle){var i=document.createElement("input");i.classList.add("tabulator-title-editor"),i.addEventListener("click",(e=>{e.stopPropagation(),i.focus()})),i.addEventListener("change",(()=>{e.title=i.value,this.dispatchExternal("columnTitleChanged",this.getComponent())})),t.appendChild(i),e.field?this.langBind("columns|"+e.field,(t=>{i.value=t||e.title||" "})):i.value=e.title||" "}else e.field?this.langBind("columns|"+e.field,(i=>{this._formatColumnHeaderTitle(t,i||e.title||" ")})):this._formatColumnHeaderTitle(t,e.title||" ");return t}_formatColumnHeaderTitle(e,t){var i=this.chain("column-format",[this,t,e],null,(()=>t));switch(typeof i){case"object":i instanceof Node?e.appendChild(i):(e.innerHTML="",console.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:",i));break;case"undefined":case"null":e.innerHTML="";break;default:e.innerHTML=i}}_buildGroupHeader(){(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass)&&this.definition.cssClass.split(" ").forEach((e=>{this.element.classList.add(e)}));this.titleElement.style.textAlign=this.definition.headerHozAlign,this.element.appendChild(this.groupElement)}_getFlatData(e){return e[this.field]}_getNestedData(e){var t,i=e,s=this.fieldStructure,o=s.length;for(let e=0;e-1&&this.columns.splice(t,1),this.columns.length||this.delete()}setWidth(e){this.widthFixed=!0,this.setWidthActual(e)}setWidthActual(e){isNaN(e)&&(e=Math.floor(this.table.element.clientWidth/100*parseInt(e))),e=Math.max(this.minWidth,e),this.maxWidth&&(e=Math.min(this.maxWidth,e)),this.width=e,this.widthStyled=e?e+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach((function(e){e.setWidth()})),this.parent.isGroup&&this.parent.matchChildWidths(),this.dispatch("column-width",this)}checkCellHeights(){var e=[];this.cells.forEach((function(t){t.row.heightInitialized&&(null!==t.row.getElement().offsetParent?(e.push(t.row),t.row.clearCellHeight()):t.row.heightInitialized=!1)})),e.forEach((function(e){e.calcHeight()})),e.forEach((function(e){e.setCellHeight()}))}getWidth(){var e=0;return this.isGroup?this.columns.forEach((function(t){t.visible&&(e+=t.getWidth())})):e=this.width,e}getHeight(){return Math.ceil(this.element.getBoundingClientRect().height)}setMinWidth(e){this.minWidth=e,this.minWidthStyled=e?e+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach((function(e){e.setMinWidth()}))}setMaxWidth(e){this.maxWidth=e,this.maxWidthStyled=e?e+"px":"",this.element.style.maxWidth=this.maxWidthStyled,this.cells.forEach((function(e){e.setMaxWidth()}))}delete(){return new Promise(((e,t)=>{this.isGroup&&this.columns.forEach((function(e){e.delete()})),this.dispatch("column-delete",this);var i=this.cells.length;for(let e=0;e-1&&this._nextVisibleColumn(e+1)}_nextVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._nextVisibleColumn(e+1)}prevColumn(){var e=this.table.columnManager.findColumnIndex(this);return e>-1&&this._prevVisibleColumn(e-1)}_prevVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._prevVisibleColumn(e-1)}reinitializeWidth(e){this.widthFixed=!1,void 0===this.definition.width||e||this.setWidth(this.definition.width),this.dispatch("column-width-fit-before",this),this.fitToData(e),this.dispatch("column-width-fit-after",this)}fitToData(e){if(!this.isGroup){this.widthFixed||(this.element.style.width="",this.cells.forEach((e=>{e.clearWidth()})));var t=this.element.offsetWidth;if((!this.width||!this.widthFixed)&&(this.cells.forEach((e=>{var i=e.getWidth();i>t&&(t=i)})),t)){var i=t+1;this.maxInitialWidth&&!e&&(i=Math.min(i,this.maxInitialWidth)),this.setWidthActual(i)}}}updateDefinition(e){var t;return this.isGroup||this.parent.isGroup?(console.error("Column Update Error - The updateDefinition function is only available on ungrouped columns"),Promise.reject("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(t=Object.assign({},this.getDefinition()),t=Object.assign(t,e),this.table.columnManager.addColumn(t,!1,this).then((e=>(t.field==this.field&&(this.field=!1),this.delete().then((()=>e.getComponent()))))))}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}getComponent(){return this.component||(this.component=new p(this)),this.component}}b.defaultOptionList=g;class f{constructor(e){return this._row=e,new Proxy(this,{get:function(e,t,i){return void 0!==e[t]?e[t]:e._row.table.componentFunctionBinder.handle("row",e._row,t)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getCells(){var e=[];return this._row.getCells().forEach((function(t){e.push(t.getComponent())})),e}getCell(e){var t=this._row.getCell(e);return!!t&&t.getComponent()}getIndex(){return this._row.getData("data")[this._row.table.options.index]}getPosition(e){return this._row.table.rowManager.getRowPosition(this._row,e)}delete(){return this._row.delete()}scrollTo(){return this._row.table.rowManager.scrollToRow(this._row)}move(e,t){this._row.moveToRow(e,t)}update(e){return this._row.updateData(e)}normalizeHeight(){this._row.normalizeHeight(!0)}_getSelf(){return this._row}reformat(){return this._row.reinitialize()}getTable(){return this._row.table}getNextRow(){var e=this._row.nextRow();return e?e.getComponent():e}getPrevRow(){var e=this._row.prevRow();return e?e.getComponent():e}}class v extends e{constructor(e,t,i="row"){super(t.table),this.parent=t,this.data={},this.type=i,this.element=!1,this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.component=null,this.created=!1,this.setData(e)}create(){this.created||(this.created=!0,this.generateElement())}createElement(){var e=document.createElement("div");e.classList.add("tabulator-row"),e.setAttribute("role","row"),this.element=e}getElement(){return this.create(),this.element}detachElement(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}generateElement(){this.createElement(),this.dispatch("row-init",this)}generateCells(){this.cells=this.table.columnManager.generateCells(this)}initialize(e){if(this.create(),!this.initialized||e){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.dispatch("row-layout-before",this),this.generateCells(),this.initialized=!0,this.table.columnManager.renderer.renderRowCells(this),e&&this.normalizeHeight(),this.dispatch("row-layout",this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.dispatch("row-layout-after",this)}else this.table.columnManager.renderer.rerenderRowCells(this)}reinitializeHeight(){this.heightInitialized=!1,this.element&&null!==this.element.offsetParent&&this.normalizeHeight(!0)}deinitializeHeight(){this.heightInitialized=!1}reinitialize(e){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&null!==this.element.offsetParent&&this.initialize(!0),this.dispatch("row-relayout",this)}calcHeight(e){var t=0,i=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach((function(e){var i=e.getHeight();i>t&&(t=i)})),this.height=e?Math.max(t,i):this.manualHeight?this.height:Math.max(t,i),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight}setCellHeight(){this.cells.forEach((function(e){e.setHeight()})),this.heightInitialized=!0}clearCellHeight(){this.cells.forEach((function(e){e.clearHeight()}))}normalizeHeight(e){e&&this.clearCellHeight(),this.calcHeight(e),this.setCellHeight()}setHeight(e,t){(this.height!=e||t)&&(this.manualHeight=!0,this.height=e,this.heightStyled=e?e+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)}getHeight(){return this.outerHeight}getWidth(){return this.element.offsetWidth}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}setData(e){this.data=this.chain("row-data-init-before",[this,e],void 0,e),this.dispatch("row-data-init-after",this)}updateData(e){var t,i=this.element&&s.elVisible(this.element),o={};return new Promise(((s,n)=>{for(var r in"string"==typeof e&&(e=JSON.parse(e)),this.dispatch("row-data-save-before",this),this.subscribed("row-data-changing")&&(o=Object.assign(o,this.data),o=Object.assign(o,e)),t=this.chain("row-data-changing",[this,o,e],null,e))this.data[r]=t[r];for(var r in this.dispatch("row-data-save-after",this),e){this.table.columnManager.getColumnsByFieldRoot(r).forEach((e=>{let s=this.getCell(e.getField());if(s){let o=e.getFieldValue(t);s.getValue()!=o&&(s.setValueProcessData(o),i&&s.cellRendered())}}))}i?(this.normalizeHeight(!0),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent())):(this.initialized=!1,this.height=0,this.heightStyled=""),this.dispatch("row-data-changed",this,i,e),this.dispatchExternal("rowUpdated",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),s()}))}getData(e){return e?this.chain("row-data-retrieve",[this,e],null,this.data):this.data}getCell(e){return e=this.table.columnManager.findColumn(e),this.initialized||this.generateCells(),this.cells.find((function(t){return t.column===e}))}getCellIndex(e){return this.cells.findIndex((function(t){return t===e}))}findCell(e){return this.cells.find((t=>t.element===e))}getCells(){return this.initialized||this.generateCells(),this.cells}nextRow(){return this.table.rowManager.nextDisplayRow(this,!0)||!1}prevRow(){return this.table.rowManager.prevDisplayRow(this,!0)||!1}moveToRow(e,t){var i=this.table.rowManager.findRow(e);i?(this.table.rowManager.moveRowActual(this,i,!t),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",e)}delete(){return this.dispatch("row-delete",this),this.deleteActual(),Promise.resolve()}deleteActual(e){this.table.rowManager.getRowIndex(this);this.detatchModules(),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.dispatch("row-deleted",this)}detatchModules(){this.dispatch("row-deleting",this)}deleteCells(){var e=this.cells.length;for(let t=0;ts||null===s)&&(s=e)})),null!==s?!1!==o?s.toFixed(o):s:""},min:function(e,t,i){var s=null,o=void 0!==i.precision&&i.precision;return e.forEach((function(e){((e=Number(e)){this.recalcGroup(e)})))}recalcGroup(e){var t,i;e&&e.calcs&&(e.calcs.bottom&&(t=this.rowsToData(e.rows),i=this.generateRowData("bottom",t),e.calcs.bottom.updateData(i),e.calcs.bottom.reinitialize()),e.calcs.top&&(t=this.rowsToData(e.rows),i=this.generateRowData("top",t),e.calcs.top.updateData(i),e.calcs.top.reinitialize()))}generateTopRow(e){return this.generateRow("top",this.rowsToData(e))}generateBottomRow(e){return this.generateRow("bottom",this.rowsToData(e))}rowsToData(e){var t=[];return e.forEach((e=>{if(t.push(e.getData()),this.table.options.dataTree&&this.table.options.dataTreeChildColumnCalcs&&e.modules.dataTree&&e.modules.dataTree.open){var i=this.rowsToData(this.table.modules.dataTree.getFilteredTreeChildren(e));t=t.concat(i)}})),t}generateRow(e,t){var i,s=this.generateRowData(e,t);return this.table.modExists("mutator")&&this.table.modules.mutator.disable(),i=new v(s,this,"calc"),this.table.modExists("mutator")&&this.table.modules.mutator.enable(),i.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+e),i.component=!1,i.getComponent=()=>(i.component||(i.component=new c(i)),i.component),i.generateCells=()=>{var t=[];this.table.columnManager.columnsByIndex.forEach((s=>{this.genColumn.setField(s.getField()),this.genColumn.hozAlign=s.hozAlign,s.definition[e+"CalcFormatter"]&&this.table.modExists("format")?this.genColumn.modules.format={formatter:this.table.modules.format.getFormatter(s.definition[e+"CalcFormatter"]),params:s.definition[e+"CalcFormatterParams"]||{}}:this.genColumn.modules.format={formatter:this.table.modules.format.getFormatter("plaintext"),params:{}},this.genColumn.definition.cssClass=s.definition.cssClass;var o=new m(this.genColumn,i);o.getElement(),o.column=s,o.setWidth(),s.cells.push(o),t.push(o),s.visible||o.hide()})),i.cells=t},i}generateRowData(e,t){var i,s,o={},n="top"==e?this.topCalcs:this.botCalcs,r="top"==e?"topCalc":"botCalc";return n.forEach((function(e){var n=[];e.modules.columnCalcs&&e.modules.columnCalcs[r]&&(t.forEach((function(t){n.push(e.getFieldValue(t))})),s=r+"Params",i="function"==typeof e.modules.columnCalcs[s]?e.modules.columnCalcs[s](n,t):e.modules.columnCalcs[s],e.setFieldValue(o,e.modules.columnCalcs[r](n,t,i)))})),o}hasTopCalcs(){return!!this.topCalcs.length}hasBottomCalcs(){return!!this.botCalcs.length}redraw(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)}getResults(){var e={};return this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.getGroups(!0).forEach((t=>{e[t.getKey()]=this.getGroupResults(t)})):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e}getGroupResults(e){var t=e._getSelf(),i=e.getSubGroups(),s={};return i.forEach((e=>{s[e.getKey()]=this.getGroupResults(e)})),{top:t.calcs.top?t.calcs.top.getData():{},bottom:t.calcs.bottom?t.calcs.bottom.getData():{},groups:s}}}C.moduleName="columnCalcs",C.calculations=w;class E extends t{constructor(e){super(e),this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.displayIndex=0,this.registerTableOption("dataTree",!1),this.registerTableOption("dataTreeFilter",!0),this.registerTableOption("dataTreeSort",!0),this.registerTableOption("dataTreeElementColumn",!1),this.registerTableOption("dataTreeBranchElement",!0),this.registerTableOption("dataTreeChildIndent",9),this.registerTableOption("dataTreeChildField","_children"),this.registerTableOption("dataTreeCollapseElement",!1),this.registerTableOption("dataTreeExpandElement",!1),this.registerTableOption("dataTreeStartExpanded",!1),this.registerTableOption("dataTreeChildColumnCalcs",!1),this.registerTableOption("dataTreeSelectPropagate",!1),this.registerComponentFunction("row","treeCollapse",this.collapseRow.bind(this)),this.registerComponentFunction("row","treeExpand",this.expandRow.bind(this)),this.registerComponentFunction("row","treeToggle",this.toggleRow.bind(this)),this.registerComponentFunction("row","getTreeParent",this.getTreeParent.bind(this)),this.registerComponentFunction("row","getTreeChildren",this.getRowChildren.bind(this)),this.registerComponentFunction("row","addTreeChild",this.addTreeChildRow.bind(this)),this.registerComponentFunction("row","isTreeExpanded",this.isRowExpanded.bind(this))}initialize(){if(this.table.options.dataTree){var e=null,t=this.table.options;switch(this.field=t.dataTreeChildField,this.indent=t.dataTreeChildIndent,t.dataTreeBranchElement&&(!0===t.dataTreeBranchElement?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):"string"==typeof t.dataTreeBranchElement?((e=document.createElement("div")).innerHTML=t.dataTreeBranchElement,this.branchEl=e.firstChild):this.branchEl=t.dataTreeBranchElement),t.dataTreeCollapseElement?"string"==typeof t.dataTreeCollapseElement?((e=document.createElement("div")).innerHTML=t.dataTreeCollapseElement,this.collapseEl=e.firstChild):this.collapseEl=t.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="
"),t.dataTreeExpandElement?"string"==typeof t.dataTreeExpandElement?((e=document.createElement("div")).innerHTML=t.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=t.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="
"),typeof t.dataTreeStartExpanded){case"boolean":this.startOpen=function(e,i){return t.dataTreeStartExpanded};break;case"function":this.startOpen=t.dataTreeStartExpanded;break;default:this.startOpen=function(e,i){return t.dataTreeStartExpanded[i]}}this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("row-deleted",this.rowDelete.bind(this),0),this.subscribe("row-data-changed",this.rowDataChanged.bind(this),10),this.subscribe("cell-value-updated",this.cellValueChanged.bind(this)),this.subscribe("edit-cancelled",this.cellValueChanged.bind(this)),this.subscribe("column-moving-rows",this.columnMoving.bind(this)),this.subscribe("table-built",this.initializeElementField.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),30)}}initializeElementField(){var e=this.table.columnManager.getFirstVisibleColumn();this.elementField=this.table.options.dataTreeElementColumn||!!e&&e.field}getRowChildren(e){return this.getTreeChildren(e,!0)}columnMoving(){var e=[];return this.table.rowManager.rows.forEach((t=>{e=e.concat(this.getTreeChildren(t,!1,!0))})),e}rowDataChanged(e,t,i){this.redrawNeeded(i)&&(this.initializeRow(e),t&&(this.layoutRow(e),this.refreshData(!0)))}cellValueChanged(e){e.column.getField()===this.elementField&&this.layoutRow(e.row)}initializeRow(e){var t=e.getData()[this.field],i=Array.isArray(t),s=i||!i&&"object"==typeof t&&null!==t;!s&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!s&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:!!s&&(e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0)),controlEl:!(!e.modules.dataTree||!s)&&e.modules.dataTree.controlEl,branchEl:!(!e.modules.dataTree||!s)&&e.modules.dataTree.branchEl,parent:!!e.modules.dataTree&&e.modules.dataTree.parent,children:s}}reinitializeRowChildren(e){this.getTreeChildren(e,!1,!0).forEach((function(e){e.reinitialize(!0)}))}layoutRow(e){var t=(this.elementField?e.getCell(this.elementField):e.getCells()[0]).getElement(),i=e.modules.dataTree;i.branchEl&&(i.branchEl.parentNode&&i.branchEl.parentNode.removeChild(i.branchEl),i.branchEl=!1),i.controlEl&&(i.controlEl.parentNode&&i.controlEl.parentNode.removeChild(i.controlEl),i.controlEl=!1),this.generateControlElement(e,t),e.getElement().classList.add("tabulator-tree-level-"+i.index),i.index&&(this.branchEl?(i.branchEl=this.branchEl.cloneNode(!0),t.insertBefore(i.branchEl,t.firstChild),this.table.rtl?i.branchEl.style.marginRight=(i.branchEl.offsetWidth+i.branchEl.style.marginLeft)*(i.index-1)+i.index*this.indent+"px":i.branchEl.style.marginLeft=(i.branchEl.offsetWidth+i.branchEl.style.marginRight)*(i.index-1)+i.index*this.indent+"px"):this.table.rtl?t.style.paddingRight=parseInt(window.getComputedStyle(t,null).getPropertyValue("padding-right"))+i.index*this.indent+"px":t.style.paddingLeft=parseInt(window.getComputedStyle(t,null).getPropertyValue("padding-left"))+i.index*this.indent+"px")}generateControlElement(e,t){var i=e.modules.dataTree,s=(t=t||e.getCells()[0].getElement(),i.controlEl);!1!==i.children&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",(t=>{t.stopPropagation(),this.collapseRow(e)}))):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",(t=>{t.stopPropagation(),this.expandRow(e)}))),i.controlEl.addEventListener("mousedown",(e=>{e.stopPropagation()})),s&&s.parentNode===t?s.parentNode.replaceChild(i.controlEl,s):t.insertBefore(i.controlEl,t.firstChild))}setDisplayIndex(e){this.displayIndex=e}getDisplayIndex(){return this.displayIndex}getRows(e){var t=[];return e.forEach(((e,i)=>{var s;t.push(e),e instanceof v&&(e.create(),(s=e.modules.dataTree.children).index||!1===s.children||this.getChildren(e).forEach((e=>{e.create(),t.push(e)})))})),t}getChildren(e,t){var i=e.modules.dataTree,s=[],o=[];return!1!==i.children&&(i.open||t)&&(Array.isArray(i.children)||(i.children=this.generateChildren(e)),s=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(i.children):i.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(s),s.forEach((e=>{o.push(e),this.getChildren(e).forEach((e=>{o.push(e)}))}))),o}generateChildren(e){var t=[],i=e.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach((i=>{var s=new v(i||{},this.table.rowManager);s.create(),s.modules.dataTree.index=e.modules.dataTree.index+1,s.modules.dataTree.parent=e,s.modules.dataTree.children&&(s.modules.dataTree.open=this.startOpen(s.getComponent(),s.modules.dataTree.index)),t.push(s)})),t}expandRow(e,t){var i=e.modules.dataTree;!1!==i.children&&(i.open=!0,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowExpanded",e.getComponent(),e.modules.dataTree.index))}collapseRow(e){var t=e.modules.dataTree;!1!==t.children&&(t.open=!1,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowCollapsed",e.getComponent(),e.modules.dataTree.index))}toggleRow(e){var t=e.modules.dataTree;!1!==t.children&&(t.open?this.collapseRow(e):this.expandRow(e))}isRowExpanded(e){return e.modules.dataTree.open}getTreeParent(e){return!!e.modules.dataTree.parent&&e.modules.dataTree.parent.getComponent()}getFilteredTreeChildren(e){var t=e.modules.dataTree,i=[];return t.children&&(Array.isArray(t.children)||(t.children=this.generateChildren(e)),(this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(t.children):t.children).forEach((e=>{e instanceof v&&i.push(e)}))),i}rowDelete(e){var t,i=e.modules.dataTree.parent;i&&(!1!==(t=this.findChildIndex(e,i))&&i.data[this.field].splice(t,1),i.data[this.field].length||delete i.data[this.field],this.initializeRow(i),this.layoutRow(i)),this.refreshData(!0)}addTreeChildRow(e,t,i,s){var o=!1;"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),void 0!==s&&!1!==(o=this.findChildIndex(s,e))&&e.data[this.field].splice(i?o:o+1,0,t),!1===o&&(i?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.refreshData(!0)}findChildIndex(e,t){var i=!1;return"object"==typeof e?e instanceof v?i=e.data:e instanceof RowComponent?i=e._getSelf().data:"undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&t.modules.dataTree&&(i=t.modules.dataTree.children.find((t=>t instanceof v&&t.element===e)))&&(i=i.data):i=null!=e&&t.data[this.field].find((t=>t.data[this.table.options.index]==e)),i&&(Array.isArray(t.data[this.field])&&(i=t.data[this.field].indexOf(i)),-1==i&&(i=!1)),i}getTreeChildren(e,t,i){var s=e.modules.dataTree,o=[];return s.children&&(Array.isArray(s.children)||(s.children=this.generateChildren(e)),s.children.forEach((e=>{e instanceof v&&(o.push(t?e.getComponent():e),i&&(o=o.concat(this.getTreeChildren(e,t,i))))}))),o}getChildField(){return this.field}redrawNeeded(e){return!!this.field&&void 0!==e[this.field]||!!this.elementField&&void 0!==e[this.elementField]}}E.moduleName="dataTree";var y={csv:function(e,t,i){var s=t&&t.delimiter?t.delimiter:",",o=[],n=[];e.forEach((e=>{var t=[];switch(e.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":e.columns.forEach(((e,t)=>{e&&1===e.depth&&(n[t]=void 0===e.value||null===e.value?"":'"'+String(e.value).split('"').join('""')+'"')}));break;case"row":e.columns.forEach((e=>{if(e){switch(typeof e.value){case"object":e.value=JSON.stringify(e.value);break;case"undefined":case"null":e.value=""}t.push('"'+String(e.value).split('"').join('""')+'"')}})),o.push(t.join(s))}})),n.length&&o.unshift(n.join(s)),o=o.join("\n"),t.bom&&(o="\ufeff"+o),i(o,"text/csv")},json:function(e,t,i){var s=[];e.forEach((e=>{var t={};switch(e.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":e.columns.forEach((e=>{e&&(t[e.component.getTitleDownload()||e.component.getField()]=e.value)})),s.push(t)}})),i(s=JSON.stringify(s,null,"\t"),"application/json")},jsonLines:function(e,t,i){const s=[];e.forEach((e=>{const t={};switch(e.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":e.columns.forEach((e=>{e&&(t[e.component.getTitleDownload()||e.component.getField()]=e.value)})),s.push(JSON.stringify(t))}})),i(s.join("\n"),"application/x-ndjson")},pdf:function(e,t,i){var s=[],o=[],n={},r=t.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},a=t.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},l=t.jsPDF||{},h=t&&t.title?t.title:"";function d(e,t){var i=[];return e.columns.forEach((e=>{var s;if(e){switch(typeof e.value){case"object":e.value=JSON.stringify(e.value);break;case"undefined":case"null":e.value=""}s={content:e.value,colSpan:e.width,rowSpan:e.height},t&&(s.styles=t),i.push(s)}})),i}l.orientation||(l.orientation=t.orientation||"landscape"),l.unit||(l.unit="pt"),e.forEach((e=>{switch(e.type){case"header":s.push(d(e));break;case"group":o.push(d(e,r));break;case"calc":o.push(d(e,a));break;case"row":o.push(d(e))}}));var c=new jspdf.jsPDF(l);t&&t.autoTable&&(n="function"==typeof t.autoTable?t.autoTable(c)||{}:t.autoTable),h&&(n.didDrawPage=function(e){c.text(h,40,30)}),n.head=s,n.body=o,c.autoTable(n),t&&t.documentProcessing&&t.documentProcessing(c),i(c.output("arraybuffer"),"application/pdf")},xlsx:function(t,i,s){var o=i.sheetName||"Sheet1",n=XLSX.utils.book_new(),r=new e(this);function a(){var e=[],i=[],s={},o={s:{c:0,r:0},e:{c:t[0]?t[0].columns.reduce(((e,t)=>e+(t&&t.width?t.width:1)),0):0,r:t.length}};return t.forEach(((t,s)=>{var o=[];t.columns.forEach((function(e,t){e?(o.push(e.value instanceof Date||"object"!=typeof e.value?e.value:JSON.stringify(e.value)),(e.width>1||e.height>-1)&&(e.height>1||e.width>1)&&i.push({s:{r:s,c:t},e:{r:s+e.height-1,c:t+e.width-1}})):o.push("")})),e.push(o)})),XLSX.utils.sheet_add_aoa(s,e),s["!ref"]=XLSX.utils.encode_range(o),i.length&&(s["!merges"]=i),s}if(n.SheetNames=[],n.Sheets={},i.sheetOnly)s(a());else{if(i.sheets)for(var l in i.sheets)!0===i.sheets[l]?(n.SheetNames.push(l),n.Sheets[l]=a()):(n.SheetNames.push(l),r.commsSend(i.sheets[l],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:this.active,intercept:function(e){n.Sheets[l]=e}}));else n.SheetNames.push(o),n.Sheets[o]=a();i.documentProcessing&&(n=i.documentProcessing(n)),s(function(e){for(var t=new ArrayBuffer(e.length),i=new Uint8Array(t),s=0;s!=e.length;++s)i[s]=255&e.charCodeAt(s);return t}(XLSX.write(n,{bookType:"xlsx",bookSST:!0,type:"binary"})),"application/octet-stream")}},html:function(e,t,i){this.modExists("export",!0)&&i(this.modules.export.genereateHTMLTable(e),"text/html")}};class R extends t{constructor(e){super(e),this.registerTableOption("downloadReady",(function(e,t){return t})),this.registerTableOption("downloadConfig",{}),this.registerTableOption("downloadRowRange","active"),this.registerColumnOption("download"),this.registerColumnOption("titleDownload")}initialize(){this.registerTableFunction("download",this.download.bind(this)),this.registerTableFunction("downloadToTab",this.downloadToTab.bind(this))}downloadToTab(e,t,i,s){this.download(e,t,i,s,!0)}download(e,t,i,s,o){var n=!1;if("function"==typeof e?n=e:R.downloaders[e]?n=R.downloaders[e]:console.warn("Download Error - No such download type found: ",e),n){var r=this.generateExportList(s);n.call(this.table,r,i||{},function(i,s){o?!0===o?this.triggerDownload(i,s,e,t,!0):o(i):this.triggerDownload(i,s,e,t)}.bind(this))}}generateExportList(e){var t=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,e||this.table.options.downloadRowRange,"download"),i=this.table.options.groupHeaderDownload;return i&&!Array.isArray(i)&&(i=[i]),t.forEach((e=>{var t;"group"===e.type&&(t=e.columns[0],i&&i[e.indent]&&(t.value=i[e.indent](t.value,e.component._group.getRowCount(),e.component._group.getData(),e.component)))})),t}triggerDownload(e,t,i,s,o){var n=document.createElement("a"),r=new Blob([e],{type:t});s=s||"Tabulator."+("function"==typeof i?"txt":i);(r=this.table.options.downloadReady(e,r))&&(o?window.open(window.URL.createObjectURL(r)):navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(r,s):(n.setAttribute("href",window.URL.createObjectURL(r)),n.setAttribute("download",s),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)),this.dispatchExternal("downloadComplete"))}commsReceived(e,t,i){switch(t){case"intercept":this.download(i.type,"",i.options,i.active,i.intercept)}}}function x(e,t){var i=t.mask,s=void 0!==t.maskLetterChar?t.maskLetterChar:"A",o=void 0!==t.maskNumberChar?t.maskNumberChar:"9",n=void 0!==t.maskWildcardChar?t.maskWildcardChar:"*";function r(t){var a=i[t];void 0!==a&&a!==n&&a!==s&&a!==o&&(e.value=e.value+""+a,r(t+1))}e.addEventListener("keydown",(t=>{var r=e.value.length,a=t.key;if(t.keyCode>46){if(r>=i.length)return t.preventDefault(),t.stopPropagation(),!1;switch(i[r]){case s:if(a.toUpperCase()==a.toLowerCase())return t.preventDefault(),t.stopPropagation(),!1;break;case o:if(isNaN(a))return t.preventDefault(),t.stopPropagation(),!1;break;case n:break;default:if(a!==i[r])return t.preventDefault(),t.stopPropagation(),!1}}})),e.addEventListener("keyup",(i=>{i.keyCode>46&&t.maskAutoFill&&r(e.value.length)})),e.placeholder||(e.placeholder=i),t.maskAutoFill&&r(e.value.length)}R.moduleName="download",R.downloaders=y;var M={input:function(e,t,i,s,o){var n=e.getValue(),r=document.createElement("input");if(r.setAttribute("type",o.search?"search":"text"),r.style.padding="4px",r.style.width="100%",r.style.boxSizing="border-box",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),r.setAttribute(e,r.getAttribute(e)+o.elementAttributes["+"+e])):r.setAttribute(e,o.elementAttributes[e]);function a(e){null==n&&""!==r.value||r.value!==n?i(r.value)&&(n=r.value):s()}return r.value=void 0!==n?n:"",t((function(){r.focus({preventScroll:!0}),r.style.height="100%"})),r.addEventListener("change",a),r.addEventListener("blur",a),r.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:a();break;case 27:s();break;case 35:case 36:e.stopPropagation()}})),o.mask&&x(r,o),r},textarea:function(e,t,i,s,o){var n=e.getValue(),r=o.verticalNavigation||"hybrid",a=String(null!=n?n:""),l=((a.match(/(?:\r\n|\r|\n)/g)||[]).length,document.createElement("textarea")),h=0;if(l.style.display="block",l.style.padding="2px",l.style.height="100%",l.style.width="100%",l.style.boxSizing="border-box",l.style.whiteSpace="pre-wrap",l.style.resize="none",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),l.setAttribute(e,l.getAttribute(e)+o.elementAttributes["+"+e])):l.setAttribute(e,o.elementAttributes[e]);function d(t){null==n&&""!==l.value||l.value!==n?(i(l.value)&&(n=l.value),setTimeout((function(){e.getRow().normalizeHeight()}),300)):s()}return l.value=a,t((function(){l.focus({preventScroll:!0}),l.style.height="100%",l.scrollHeight,l.style.height=l.scrollHeight+"px",e.getRow().normalizeHeight()})),l.addEventListener("change",d),l.addEventListener("blur",d),l.addEventListener("keyup",(function(){l.style.height="";var t=l.scrollHeight;l.style.height=t+"px",t!=h&&(h=t,e.getRow().normalizeHeight())})),l.addEventListener("keydown",(function(e){switch(e.keyCode){case 27:s();break;case 38:("editor"==r||"hybrid"==r&&l.selectionStart)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 40:("editor"==r||"hybrid"==r&&l.selectionStart!==l.value.length)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}})),o.mask&&x(l,o),l},number:function(e,t,i,s,o){var n=e.getValue(),r=o.verticalNavigation||"editor",a=document.createElement("input");if(a.setAttribute("type","number"),void 0!==o.max&&a.setAttribute("max",o.max),void 0!==o.min&&a.setAttribute("min",o.min),void 0!==o.step&&a.setAttribute("step",o.step),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),a.setAttribute(e,a.getAttribute(e)+o.elementAttributes["+"+e])):a.setAttribute(e,o.elementAttributes[e]);a.value=n;var l=function(e){h()};function h(){var e=a.value;isNaN(e)||""===e||(e=Number(e)),e!==n?i(e)&&(n=e):s()}return t((function(){a.removeEventListener("blur",l),a.focus({preventScroll:!0}),a.style.height="100%",a.addEventListener("blur",l)})),a.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:h();break;case 27:s();break;case 38:case 40:"editor"==r&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}})),o.mask&&x(a,o),a},range:function(e,t,i,s,o){var n=e.getValue(),r=document.createElement("input");if(r.setAttribute("type","range"),void 0!==o.max&&r.setAttribute("max",o.max),void 0!==o.min&&r.setAttribute("min",o.min),void 0!==o.step&&r.setAttribute("step",o.step),r.style.padding="4px",r.style.width="100%",r.style.boxSizing="border-box",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),r.setAttribute(e,r.getAttribute(e)+o.elementAttributes["+"+e])):r.setAttribute(e,o.elementAttributes[e]);function a(){var e=r.value;isNaN(e)||""===e||(e=Number(e)),e!=n?i(e)&&(n=e):s()}return r.value=n,t((function(){r.focus({preventScroll:!0}),r.style.height="100%"})),r.addEventListener("blur",(function(e){a()})),r.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:a();break;case 27:s()}})),r},select:function(e,t,i,o,n){var r=this,a=e.getElement(),l=e.getValue(),h=n.verticalNavigation||"editor",d=void 0!==l||null===l?Array.isArray(l)?l:[l]:void 0!==n.defaultValue?n.defaultValue:[],c=document.createElement("input"),u=document.createElement("div"),m=n.multiselect,p=[],g={},b=[],f=[],v=!0,w=!1,C="",E=null;function y(t){var i,s={},o=r.table.getData();return(i=t?r.table.columnManager.getColumnByField(t):e.getColumn()._getSelf())?o.forEach((function(e){var t=i.getFieldValue(e);null!=t&&""!==t&&(s[t]=!0)})):console.warn("unable to find matching column to create select lookup list:",t),Object.keys(s)}function R(t,i){var s=[],o=[];function r(e){e={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1};return i.indexOf(e.value)>-1&&M(e),s.push(e),o.push(e),e}if("function"==typeof t&&(t=t(e)),Array.isArray(t))t.forEach((function(e){var t;"object"==typeof e?e.options?(t={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1},o.push(t),e.options.forEach((function(e){r(e)}))):r(e):(t={label:e,value:e,element:!1},i.indexOf(t.value)>-1&&M(t),s.push(t),o.push(t))}));else for(var a in t){var l={label:t[a],value:a,element:!1};i.indexOf(l.value)>-1&&M(l),s.push(l),o.push(l)}n.sortValuesList&&(s.sort(((e,t)=>e.labelt.label?1:0)),o.sort(((e,t)=>e.labelt.label?1:0)),"asc"!==n.sortValuesList&&(s.reverse(),o.reverse())),p=s,b=o,function(){for(;u.firstChild;)u.removeChild(u.firstChild);b.forEach((function(t){var i=t.element;if(!i){if(i=document.createElement("div"),t.label=n.listItemFormatter?n.listItemFormatter(t.value,t.label,e,i,t.itemParams):t.label,t.group?(i.classList.add("tabulator-edit-select-list-group"),i.tabIndex=0,i.innerHTML=""===t.label?" ":t.label):(i.classList.add("tabulator-edit-select-list-item"),i.tabIndex=0,i.innerHTML=""===t.label?" ":t.label,i.addEventListener("click",(function(){w=!0,setTimeout((()=>{w=!1}),10),m?(L(t),c.focus()):k(t)})),f.indexOf(t)>-1&&i.classList.add("active")),t.elementAttributes&&"object"==typeof t.elementAttributes)for(let e in t.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),i.setAttribute(e,c.getAttribute(e)+t.elementAttributes["+"+e])):i.setAttribute(e,t.elementAttributes[e]);i.addEventListener("mousedown",(function(){v=!1,setTimeout((function(){v=!0}),10)})),t.element=i}u.appendChild(i)}))}()}function x(e,t){!m&&g&&g.element&&g.element.classList.remove("active"),g&&g.element&&g.element.classList.remove("focused"),g=e,e.element&&(e.element.classList.add("focused"),t&&e.element.classList.add("active")),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function M(e){-1==f.indexOf(e)&&(f.push(e),x(e,!0)),S()}function T(e){var t=f[e];e>-1&&(f.splice(e,1),t.element&&t.element.classList.remove("active"))}function L(e){e||(e=g);var t=f.indexOf(e);t>-1?T(t):(!0!==m&&f.length>=m&&T(0),M(e)),S()}function k(e){z(),e||(e=g),e&&(c.value=e.label,i(e.value)),d=[e.value]}function D(e){e||z();var t=[];f.forEach((e=>{t.push(e.value)})),d=t,i(t)}function S(){var e=[];f.forEach((t=>{e.push(t.label)})),c.value=e.join(", "),!1===r.currentCell&&D(!0)}function F(){z(),o()}function z(){u.parentNode&&u.parentNode.removeChild(u),r.table.rowManager.element.removeEventListener("scroll",F)}if((Array.isArray(n)||!Array.isArray(n)&&"object"==typeof n&&!n.values)&&(console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"),n={values:n}),c.setAttribute("type","text"),c.style.padding="4px",c.style.width="100%",c.style.boxSizing="border-box",c.style.cursor="default",c.readOnly=0!=this.currentCell,n.elementAttributes&&"object"==typeof n.elementAttributes)for(let e in n.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),c.setAttribute(e,c.getAttribute(e)+n.elementAttributes["+"+e])):c.setAttribute(e,n.elementAttributes[e]);return c.value=void 0!==l||null===l?l:"",c.addEventListener("search",(function(e){c.value||(!function(){var e=f.length;for(let t=0;t0&&x(p[t-1],!m));break;case 40:t=p.indexOf(g),("editor"==h||"hybrid"==h&&t=38&&e.keyCode<=90&&function(e){clearTimeout(E);var t=String.fromCharCode(event.keyCode).toLowerCase();C+=t.toLowerCase();var i=p.find((e=>void 0!==e.label&&e.label.toLowerCase().startsWith(C)));i&&x(i,!m),E=setTimeout((()=>{C=""}),800)}(e.keyCode)}})),c.addEventListener("blur",(function(e){v&&(m?D():F())})),c.addEventListener("focus",(function(e){w||function(){if(f=[],!u.parentNode){!0===n.values?R(y(),d):"string"==typeof n.values?R(y(n.values),d):R(n.values||[],d);var e=s.elOffset(a);u.style.minWidth=a.offsetWidth+"px",u.style.top=e.top+a.offsetHeight+"px",u.style.left=e.left+"px",u.addEventListener("mousedown",(function(e){v=!1,setTimeout((function(){v=!0}),10)})),document.body.appendChild(u)}}()})),(u=document.createElement("div")).classList.add("tabulator-edit-select-list"),t((function(){c.style.height="100%",c.focus({preventScroll:!0})})),setTimeout((()=>{this.table.rowManager.element.addEventListener("scroll",F)}),10),c},autocomplete:function(e,t,i,o,n){var r=this,a=e.getElement(),l=e.getValue(),h=n.verticalNavigation||"editor",d=void 0!==l||null===l?l:void 0!==n.defaultValue?n.defaultValue:"",c=document.createElement("input"),u=document.createElement("div"),m=[],p=!1,g=!0,b=!1;if(c.setAttribute("type","search"),c.style.padding="4px",c.style.width="100%",c.style.boxSizing="border-box",n.elementAttributes&&"object"==typeof n.elementAttributes)for(let e in n.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),c.setAttribute(e,c.getAttribute(e)+n.elementAttributes["+"+e])):c.setAttribute(e,n.elementAttributes[e]);function f(){!0===n.values?b=v():"string"==typeof n.values&&(b=v(n.values))}function v(t){var i,s={},o=r.table.getData();return(i=t?r.table.columnManager.getColumnByField(t):e.getColumn()._getSelf())?(o.forEach((function(e){var t=i.getFieldValue(e);null!=t&&""!==t&&(s[t]=!0)})),s=n.sortValuesList?"asc"==n.sortValuesList?Object.keys(s).sort():Object.keys(s).sort().reverse():Object.keys(s)):console.warn("unable to find matching column to create autocomplete lookup list:",t),s}function w(e,t){var i,s,o=[];i=b||(n.values||[]),n.searchFunc?(o=n.searchFunc(e,i))instanceof Promise?(C(void 0!==n.searchingPlaceholder?n.searchingPlaceholder:"Searching..."),o.then((e=>{R(E(e),t)})).catch((e=>{console.err("error in autocomplete search promise:",e)}))):R(E(o),t):(s=E(i),""===e?n.showListOnEmpty&&(o=s):s.forEach((function(t){null===t.value&&void 0===t.value||(String(t.value).toLowerCase().indexOf(String(e).toLowerCase())>-1||String(t.title).toLowerCase().indexOf(String(e).toLowerCase())>-1)&&o.push(t)})),R(o,t))}function C(e){var t=document.createElement("div");y(),!1!==e&&(t.classList.add("tabulator-edit-select-list-notice"),t.tabIndex=0,e instanceof Node?t.appendChild(e):t.innerHTML=e,u.appendChild(t))}function E(e){var t=[];if(Array.isArray(e))e.forEach((function(e){var i={};"object"==typeof e?(i.title=n.listItemFormatter?n.listItemFormatter(e.value,e.label):e.label,i.value=e.value):(i.title=n.listItemFormatter?n.listItemFormatter(e,e):e,i.value=e),t.push(i)}));else for(var i in e){var s={title:n.listItemFormatter?n.listItemFormatter(i,e[i]):e[i],value:i};t.push(s)}return t}function y(){for(;u.firstChild;)u.removeChild(u.firstChild)}function R(e,t){e.length?function(e,t){var i=!1;y(),(m=e).forEach((function(e){var s=e.element;s||((s=document.createElement("div")).classList.add("tabulator-edit-select-list-item"),s.tabIndex=0,s.innerHTML=e.title,s.addEventListener("click",(function(t){T(e),M()})),s.addEventListener("mousedown",(function(e){g=!1,setTimeout((function(){g=!0}),10)})),e.element=s,t&&e.value==l&&(c.value=e.title,e.element.classList.add("active"),i=!0),e===p&&(e.element.classList.add("active"),i=!0)),u.appendChild(s)})),i||T(!1)}(e,t):n.emptyPlaceholder&&C(n.emptyPlaceholder)}function M(){L(),p?l!==p.value?(l=p.value,c.value=p.title,i(p.value)):o():n.freetext||n.allowEmpty&&""===c.value?(l=c.value,i(c.value)):o()}function T(e,t){p&&p.element&&p.element.classList.remove("active"),p=e,e&&e.element&&e.element.classList.add("active"),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function L(){u.parentNode&&u.parentNode.removeChild(u),r.table.rowManager.element.removeEventListener("scroll",k)}function k(){L(),o()}return u.classList.add("tabulator-edit-select-list"),u.addEventListener("mousedown",(function(e){g=!1,setTimeout((function(){g=!0}),10)})),c.addEventListener("keydown",(function(e){var t;switch(e.keyCode){case 38:t=m.indexOf(p),("editor"==h||"hybrid"==h&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),T(t>0&&m[t-1]));break;case 40:t=m.indexOf(p),("editor"==h||"hybrid"==h&&t{this.table.rowManager.element.addEventListener("scroll",k)}),10),f(),c.value=d,w(d,!0),c},star:function(e,t,i,s,o){var n=this,r=e.getElement(),a=e.getValue(),l=r.getElementsByTagName("svg").length||5,h=r.getElementsByTagName("svg")[0]?r.getElementsByTagName("svg")[0].getAttribute("width"):14,d=[],c=document.createElement("div"),u=document.createElementNS("http://www.w3.org/2000/svg","svg");function m(e){d.forEach((function(t,i){i'):("ie"==n.table.browser?t.setAttribute("class","tabulator-star-inactive"):t.classList.replace("tabulator-star-active","tabulator-star-inactive"),t.innerHTML='')}))}function p(e){var t=document.createElement("span"),s=u.cloneNode(!0);d.push(s),t.addEventListener("mouseenter",(function(t){t.stopPropagation(),t.stopImmediatePropagation(),m(e)})),t.addEventListener("mousemove",(function(e){e.stopPropagation(),e.stopImmediatePropagation()})),t.addEventListener("click",(function(t){t.stopPropagation(),t.stopImmediatePropagation(),i(e),r.blur()})),t.appendChild(s),c.appendChild(t)}function g(e){a=e,m(e)}if(r.style.whiteSpace="nowrap",r.style.overflow="hidden",r.style.textOverflow="ellipsis",c.style.verticalAlign="middle",c.style.display="inline-block",c.style.padding="4px",u.setAttribute("width",h),u.setAttribute("height",h),u.setAttribute("viewBox","0 0 512 512"),u.setAttribute("xml:space","preserve"),u.style.padding="0 1px",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),c.setAttribute(e,c.getAttribute(e)+o.elementAttributes["+"+e])):c.setAttribute(e,o.elementAttributes[e]);for(var b=1;b<=l;b++)p(b);return m(a=Math.min(parseInt(a),l)),c.addEventListener("mousemove",(function(e){m(0)})),c.addEventListener("click",(function(e){i(0)})),r.addEventListener("blur",(function(e){s()})),r.addEventListener("keydown",(function(e){switch(e.keyCode){case 39:g(a+1);break;case 37:g(a-1);break;case 13:i(a);break;case 27:s()}})),c},progress:function(e,t,i,s,o){var n,r,a=e.getElement(),l=void 0===o.max?a.getElementsByTagName("div")[0]&&a.getElementsByTagName("div")[0].getAttribute("max")||100:o.max,h=void 0===o.min?a.getElementsByTagName("div")[0]&&a.getElementsByTagName("div")[0].getAttribute("min")||0:o.min,d=(l-h)/100,c=e.getValue()||0,u=document.createElement("div"),m=document.createElement("div");function p(){var e=window.getComputedStyle(a,null),t=d*Math.round(m.offsetWidth/((a.clientWidth-parseInt(e.getPropertyValue("padding-left"))-parseInt(e.getPropertyValue("padding-right")))/100))+h;i(t),a.setAttribute("aria-valuenow",t),a.setAttribute("aria-label",c)}if(u.style.position="absolute",u.style.right="0",u.style.top="0",u.style.bottom="0",u.style.width="5px",u.classList.add("tabulator-progress-handle"),m.style.display="inline-block",m.style.position="relative",m.style.height="100%",m.style.backgroundColor="#488CE9",m.style.maxWidth="100%",m.style.minWidth="0%",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),m.setAttribute(e,m.getAttribute(e)+o.elementAttributes["+"+e])):m.setAttribute(e,o.elementAttributes[e]);return a.style.padding="4px 4px",c=Math.min(parseFloat(c),l),c=Math.max(parseFloat(c),h),c=Math.round((c-h)/d),m.style.width=c+"%",a.setAttribute("aria-valuemin",h),a.setAttribute("aria-valuemax",l),m.appendChild(u),u.addEventListener("mousedown",(function(e){n=e.screenX,r=m.offsetWidth})),u.addEventListener("mouseover",(function(){u.style.cursor="ew-resize"})),a.addEventListener("mousemove",(function(e){n&&(m.style.width=r+e.screenX-n+"px")})),a.addEventListener("mouseup",(function(e){n&&(e.stopPropagation(),e.stopImmediatePropagation(),n=!1,r=!1,p())})),a.addEventListener("keydown",(function(e){switch(e.keyCode){case 39:e.preventDefault(),m.style.width=m.clientWidth+a.clientWidth/100+"px";break;case 37:e.preventDefault(),m.style.width=m.clientWidth-a.clientWidth/100+"px";break;case 9:case 13:p();break;case 27:s()}})),a.addEventListener("blur",(function(){s()})),m},tickCross:function(e,t,i,s,o){var n=e.getValue(),r=document.createElement("input"),a=o.tristate,l=void 0===o.indeterminateValue?null:o.indeterminateValue,h=!1;if(r.setAttribute("type","checkbox"),r.style.marginTop="5px",r.style.boxSizing="border-box",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),r.setAttribute(e,r.getAttribute(e)+o.elementAttributes["+"+e])):r.setAttribute(e,o.elementAttributes[e]);function d(e){return a?e?h?l:r.checked:r.checked&&!h?(r.checked=!1,r.indeterminate=!0,h=!0,l):(h=!1,r.checked):r.checked}return r.value=n,!a||void 0!==n&&n!==l&&""!==n||(h=!0,r.indeterminate=!0),"firefox"!=this.table.browser&&t((function(){r.focus({preventScroll:!0})})),r.checked=!0===n||"true"===n||"True"===n||1===n,t((function(){r.focus()})),r.addEventListener("change",(function(e){i(d())})),r.addEventListener("blur",(function(e){i(d(!0))})),r.addEventListener("keydown",(function(e){13==e.keyCode&&i(d()),27==e.keyCode&&s()})),r}};class T extends t{constructor(e){super(e),this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[],this.editors=T.editors,this.registerColumnOption("editable"),this.registerColumnOption("editor"),this.registerColumnOption("editorParams"),this.registerColumnOption("cellEditing"),this.registerColumnOption("cellEdited"),this.registerColumnOption("cellEditCancelled"),this.registerTableFunction("getEditedCells",this.getEditedCells.bind(this)),this.registerTableFunction("clearCellEdited",this.clearCellEdited.bind(this)),this.registerTableFunction("navigatePrev",this.navigatePrev.bind(this)),this.registerTableFunction("navigateNext",this.navigateNext.bind(this)),this.registerTableFunction("navigateLeft",this.navigateLeft.bind(this)),this.registerTableFunction("navigateRight",this.navigateRight.bind(this)),this.registerTableFunction("navigateUp",this.navigateUp.bind(this)),this.registerTableFunction("navigateDown",this.navigateDown.bind(this)),this.registerComponentFunction("cell","isEdited",this.cellisEdited.bind(this)),this.registerComponentFunction("cell","clearEdited",this.clearEdited.bind(this)),this.registerComponentFunction("cell","edit",this.editCell.bind(this)),this.registerComponentFunction("cell","cancelEdit",this.cellCancelEdit.bind(this)),this.registerComponentFunction("cell","navigatePrev",this.navigatePrev.bind(this)),this.registerComponentFunction("cell","navigateNext",this.navigateNext.bind(this)),this.registerComponentFunction("cell","navigateLeft",this.navigateLeft.bind(this)),this.registerComponentFunction("cell","navigateRight",this.navigateRight.bind(this)),this.registerComponentFunction("cell","navigateUp",this.navigateUp.bind(this)),this.registerComponentFunction("cell","navigateDown",this.navigateDown.bind(this))}initialize(){this.subscribe("cell-init",this.bindEditor.bind(this)),this.subscribe("cell-delete",this.clearEdited.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this)),this.subscribe("column-delete",this.columnDeleteCheck.bind(this)),this.subscribe("row-deleting",this.rowDeleteCheck.bind(this)),this.subscribe("data-refreshing",this.cancelEdit.bind(this)),this.subscribe("keybinding-nav-prev",this.navigatePrev.bind(this,void 0)),this.subscribe("keybinding-nav-next",this.keybindingNavigateNext.bind(this)),this.subscribe("keybinding-nav-left",this.navigateLeft.bind(this,void 0)),this.subscribe("keybinding-nav-right",this.navigateRight.bind(this,void 0)),this.subscribe("keybinding-nav-up",this.navigateUp.bind(this,void 0)),this.subscribe("keybinding-nav-down",this.navigateDown.bind(this,void 0))}keybindingNavigateNext(e){var t=this.currentCell,i=this.options("tabEndNewRow");t&&(this.navigateNext(t,e)||i&&(t.getElement().firstChild.blur(),(i=!0===i?this.table.addRow({}):"function"==typeof i?this.table.addRow(i(t.row.getComponent())):this.table.addRow(Object.assign({},i))).then((()=>{setTimeout((()=>{t.getComponent().navigateNext()}))}))))}cellisEdited(e){return!!e.modules.edit&&e.modules.edit.edited}cellCancelEdit(e){e===this.currentCell?this.table.modules.edit.cancelEdit():console.warn("Cancel Editor Error - This cell is not currently being edited ")}clearCellEdited(e){e||(e=this.table.modules.edit.getEditedCells()),Array.isArray(e)||(e=[e]),e.forEach((e=>{this.table.modules.edit.clearEdited(e._getSelf())}))}navigatePrev(e=this.currentCell,t){var i,s;if(e){if(t&&t.preventDefault(),i=this.navigateLeft())return!0;if((s=this.table.rowManager.prevDisplayRow(e.row,!0))&&(i=this.findNextEditableCell(s,s.cells.length)))return i.getComponent().edit(),!0}return!1}navigateNext(e=this.currentCell,t){var i,s;if(e){if(t&&t.preventDefault(),i=this.navigateRight())return!0;if((s=this.table.rowManager.nextDisplayRow(e.row,!0))&&(i=this.findNextEditableCell(s,-1)))return i.getComponent().edit(),!0}return!1}navigateLeft(e=this.currentCell,t){var i,s;return!!(e&&(t&&t.preventDefault(),i=e.getIndex(),s=this.findPrevEditableCell(e.row,i)))&&(s.getComponent().edit(),!0)}navigateRight(e=this.currentCell,t){var i,s;return!!(e&&(t&&t.preventDefault(),i=e.getIndex(),s=this.findNextEditableCell(e.row,i)))&&(s.getComponent().edit(),!0)}navigateUp(e=this.currentCell,t){var i,s;return!!(e&&(t&&t.preventDefault(),i=e.getIndex(),s=this.table.rowManager.prevDisplayRow(e.row,!0)))&&(s.cells[i].getComponent().edit(),!0)}navigateDown(e=this.currentCell,t){var i,s;return!!(e&&(t&&t.preventDefault(),i=e.getIndex(),s=this.table.rowManager.nextDisplayRow(e.row,!0)))&&(s.cells[i].getComponent().edit(),!0)}findNextEditableCell(e,t){var i=!1;if(t0)for(var o=t-1;o>=0;o--){let t=e.cells[o],n=!0;if(t.column.modules.edit&&s.elVisible(t.getElement())&&("function"==typeof t.column.modules.edit.check&&(n=t.column.modules.edit.check(t.getComponent())),n)){i=t;break}}return i}initializeColumnCheck(e){void 0!==e.definition.editor&&this.initializeColumn(e)}columnDeleteCheck(e){this.currentCell&&this.currentCell.column===e&&this.cancelEdit()}rowDeleteCheck(e){this.currentCell&&this.currentCell.row===e&&this.cancelEdit()}initializeColumn(e){var t={editor:!1,blocked:!1,check:e.definition.editable,params:e.definition.editorParams||{}};switch(typeof e.definition.editor){case"string":this.editors[e.definition.editor]?t.editor=this.editors[e.definition.editor]:console.warn("Editor Error - No such editor found: ",e.definition.editor);break;case"function":t.editor=e.definition.editor;break;case"boolean":!0===e.definition.editor&&("function"!=typeof e.definition.formatter?this.editors[e.definition.formatter]?t.editor=this.editors[e.definition.formatter]:t.editor=this.editors.input:console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",e.definition.formatter))}t.editor&&(e.modules.edit=t)}getCurrentCell(){return!!this.currentCell&&this.currentCell.getComponent()}clearEditor(e){var t,i=this.currentCell;if(this.invalidEdit=!1,i){for(this.currentCell=!1,t=i.getElement(),e?i.column.modules.validate&&this.table.modExists("validate")&&this.table.modules.validate.cellValidate(i):t.classList.remove("tabulator-validation-fail"),t.classList.remove("tabulator-editing");t.firstChild;)t.removeChild(t.firstChild);i.row.getElement().classList.remove("tabulator-row-editing")}}cancelEdit(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(!0),e.setValueActual(e.getValue()),e.cellRendered(),("textarea"==e.column.definition.editor||e.column.definition.variableHeight)&&e.row.normalizeHeight(!0),e.column.definition.cellEditCancelled&&e.column.definition.cellEditCancelled.call(this.table,t),this.dispatch("edit-cancelled",e),this.dispatchExternal("cellEditCancelled",t)}}bindEditor(e){if(e.column.modules.edit){var t=this,i=e.getElement(!0);i.setAttribute("tabindex",0),i.addEventListener("click",(function(e){i.classList.contains("tabulator-editing")||i.focus({preventScroll:!0})})),i.addEventListener("mousedown",(function(e){2===e.button?e.preventDefault():t.mouseClick=!0})),i.addEventListener("focus",(function(i){t.recursionBlock||t.edit(e,i,!1)}))}}focusCellNoEvent(e,t){this.recursionBlock=!0,t&&"ie"===this.table.browser||e.getElement().focus({preventScroll:!0}),this.recursionBlock=!1}editCell(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)}focusScrollAdjust(e){if("virtual"==this.table.rowManager.getRenderMode()){var t=this.table.rowManager.element.scrollTop,i=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,s=e.row.getElement();s.offsetTop;s.offsetTopi&&(this.table.rowManager.element.scrollTop+=s.offsetTop+s.offsetHeight-i);var o=this.table.rowManager.element.scrollLeft,n=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,r=e.getElement();r.offsetLeft;this.table.modExists("frozenColumns")&&(o+=parseInt(this.table.modules.frozenColumns.leftMargin),n-=parseInt(this.table.modules.frozenColumns.rightMargin)),"virtual"===this.table.options.renderHorizontal&&(o-=parseInt(this.table.columnManager.renderer.vDomPadLeft),n-=parseInt(this.table.columnManager.renderer.vDomPadLeft)),r.offsetLeftn&&(this.table.rowManager.element.scrollLeft+=r.offsetLeft+r.offsetWidth-n)}}edit(e,t,i){var s,o,n,r=this,a=!0,l=function(){},h=e.getElement();if(!this.currentCell){if(e.column.modules.edit.blocked)return this.mouseClick=!1,h.blur(),!1;switch(t&&t.stopPropagation(),typeof e.column.modules.edit.check){case"function":a=e.column.modules.edit.check(e.getComponent());break;case"boolean":a=e.column.modules.edit.check}if(a||i){if(r.cancelEdit(),r.currentCell=e,this.focusScrollAdjust(e),o=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.definition.cellClick&&e.column.definition.cellClick.call(this.table,t,o)),e.column.definition.cellEditing&&e.column.definition.cellEditing.call(this.table,o),this.dispatchExternal("cellEditing",o),n="function"==typeof e.column.modules.edit.params?e.column.modules.edit.params(o):e.column.modules.edit.params,!1===(s=e.column.modules.edit.editor.call(r,o,(function(e){l=e}),(function(t){if(r.currentCell===e){var i=!0;return e.column.modules.validate&&r.table.modExists("validate")&&"manual"!=r.table.options.validationMode&&(i=r.table.modules.validate.validate(e.column.modules.validate,e,t)),!0===i||"highlight"===r.table.options.validationMode?(r.clearEditor(),e.modules.edit||(e.modules.edit={}),e.modules.edit.edited=!0,-1==r.editedCells.indexOf(e)&&r.editedCells.push(e),e.setValue(t,!0),!0===i||(h.classList.add("tabulator-validation-fail"),r.table.externalEvents.dispatch("validationFailed",e.getComponent(),t,i),!1)):(r.invalidEdit=!0,h.classList.add("tabulator-validation-fail"),r.focusCellNoEvent(e,!0),l(),r.table.externalEvents.dispatch("validationFailed",e.getComponent(),t,i),!1)}}),(function(){r.currentCell===e&&r.cancelEdit()}),n)))return h.blur(),!1;if(!(s instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",s),h.blur(),!1;for(h.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-row-editing");h.firstChild;)h.removeChild(h.firstChild);h.appendChild(s),l();for(var d=h.children,c=0;c{e.push(t.getComponent())})),e}clearEdited(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.edit.edited=!1,e.modules.validate&&(e.modules.validate.invalid=!1)),(t=this.editedCells.indexOf(e))>-1&&this.editedCells.splice(t,1)}}T.moduleName="edit",T.editors=M;class L{constructor(e,t,i,s){this.type=e,this.columns=t,this.component=i||!1,this.indent=s||0}}class k{constructor(e,t,i,s,o){this.value=e,this.component=t||!1,this.width=i,this.height=s,this.depth=o}}class D extends t{constructor(e){super(e),this.config={},this.cloneTableStyle=!0,this.colVisProp="",this.registerTableOption("htmlOutputConfig",!1),this.registerColumnOption("htmlOutput"),this.registerColumnOption("titleHtmlOutput")}initialize(){this.registerTableFunction("getHtml",this.getHtml.bind(this))}generateExportList(e,t,i,s){this.cloneTableStyle=t,this.config=e||{},this.colVisProp=s;var o=!1!==this.config.columnHeaders?this.headersToExportRows(this.generateColumnGroupHeaders()):[],n=this.bodyToExportRows(this.rowLookup(i));return o.concat(n)}genereateTable(e,t,i,s){var o=this.generateExportList(e,t,i,s);return this.genereateTableElement(o)}rowLookup(e){var t=[];if("function"==typeof e)e.call(this.table).forEach((e=>{(e=this.table.rowManager.findRow(e))&&t.push(e)}));else switch(e){case!0:case"visible":t=this.table.rowManager.getVisibleRows(!1,!0);break;case"all":t=this.table.rowManager.rows;break;case"selected":t=this.table.modules.selectRow.selectedRows;break;case"active":default:t=this.table.options.pagination?this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length-2):this.table.rowManager.getDisplayRows()}return Object.assign([],t)}generateColumnGroupHeaders(){var e=[];return(!1!==this.config.columnGroups?this.table.columnManager.columns:this.table.columnManager.columnsByIndex).forEach((t=>{var i=this.processColumnGroup(t);i&&e.push(i)})),e}processColumnGroup(e){var t=e.columns,i=0,s={title:e.definition["title"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))]||e.definition.title,column:e,depth:1};if(t.length){if(s.subGroups=[],s.width=0,t.forEach((e=>{var t=this.processColumnGroup(e);t&&(s.width+=t.width,s.subGroups.push(t),t.depth>i&&(i=t.depth))})),s.depth+=i,!s.width)return!1}else{if(!this.columnVisCheck(e))return!1;s.width=1}return s}columnVisCheck(e){return!1!==e.definition[this.colVisProp]&&(e.visible||!e.visible&&e.definition[this.colVisProp])}headersToExportRows(e){var t=[],i=0,s=[];function o(e,s){var n=i-s;if(void 0===t[s]&&(t[s]=[]),e.height=e.subGroups?1:n-e.depth+1,t[s].push(e),e.height>1)for(let i=1;i1)for(let i=1;ii&&(i=e.depth)})),e.forEach((function(e){o(e,0)})),t.forEach((e=>{var t=[];e.forEach((e=>{if(e){let i=void 0===e.title?"":e.title;t.push(new k(i,e.column.getComponent(),e.width,e.height,e.depth))}else t.push(null)})),s.push(new L("header",t))})),s}bodyToExportRows(e){var t=[],i=[];return this.table.columnManager.columnsByIndex.forEach((e=>{this.columnVisCheck(e)&&t.push(e.getComponent())})),!1!==this.config.columnCalcs&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&e.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&e.push(this.table.modules.columnCalcs.botRow)),(e=e.filter((e=>{switch(e.type){case"group":return!1!==this.config.rowGroups;case"calc":return!1!==this.config.columnCalcs;case"row":return!(this.table.options.dataTree&&!1===this.config.dataTree&&e.modules.dataTree.parent)}return!0}))).forEach(((e,s)=>{var o=e.getData(this.colVisProp),n=[],r=0;switch(e.type){case"group":r=e.level,n.push(new k(e.key,e.getComponent(),t.length,1));break;case"calc":case"row":t.forEach((e=>{n.push(new k(e._column.getFieldValue(o),e,1,1))})),this.table.options.dataTree&&!1!==this.config.dataTree&&(r=e.modules.dataTree.index)}i.push(new L(e.type,n,e.getComponent(),r))})),i}genereateTableElement(e){var t=document.createElement("table"),i=document.createElement("thead"),s=document.createElement("tbody"),o=this.lookupTableStyles(),n=this.table.options["rowFormatter"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],r={};return r.rowFormatter=null!==n?n:this.table.options.rowFormatter,this.table.options.dataTree&&!1!==this.config.dataTree&&this.table.modExists("columnCalcs")&&(r.treeElementField=this.table.modules.dataTree.elementField),r.groupHeader=this.table.options["groupHeader"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],r.groupHeader&&!Array.isArray(r.groupHeader)&&(r.groupHeader=[r.groupHeader]),t.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),i,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),e.forEach(((e,t)=>{switch(e.type){case"header":i.appendChild(this.genereateHeaderElement(e,r,o));break;case"group":s.appendChild(this.genereateGroupElement(e,r,o));break;case"calc":s.appendChild(this.genereateCalcElement(e,r,o));break;case"row":let n=this.genereateRowElement(e,r,o);this.mapElementStyles(t%2&&o.evenRow?o.evenRow:o.oddRow,n,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),s.appendChild(n)}})),i.innerHTML&&t.appendChild(i),t.appendChild(s),this.mapElementStyles(this.table.element,t,["border-top","border-left","border-right","border-bottom"]),t}lookupTableStyles(){var e={};return this.cloneTableStyle&&window.getComputedStyle&&(e.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),e.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),e.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),e.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),e.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],e.firstRow&&(e.styleCells=e.firstRow.getElementsByClassName("tabulator-cell"),e.firstCell=e.styleCells[0],e.lastCell=e.styleCells[e.styleCells.length-1])),e}genereateHeaderElement(e,t,i){var s=document.createElement("tr");return e.columns.forEach((e=>{if(e){var t=document.createElement("th"),i=e.component._column.definition.cssClass?e.component._column.definition.cssClass.split(" "):[];t.colSpan=e.width,t.rowSpan=e.height,t.innerHTML=e.value,this.cloneTableStyle&&(t.style.boxSizing="border-box"),i.forEach((function(e){t.classList.add(e)})),this.mapElementStyles(e.component.getElement(),t,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),this.mapElementStyles(e.component._column.contentElement,t,["padding-top","padding-left","padding-right","padding-bottom"]),e.component._column.visible?this.mapElementStyles(e.component.getElement(),t,["width"]):e.component._column.definition.width&&(t.style.width=e.component._column.definition.width+"px"),e.component._column.parent&&this.mapElementStyles(e.component._column.parent.groupElement,t,["border-top"]),s.appendChild(t)}})),s}genereateGroupElement(e,t,i){var s=document.createElement("tr"),o=document.createElement("td"),n=e.columns[0];return s.classList.add("tabulator-print-table-row"),t.groupHeader&&t.groupHeader[e.indent]?n.value=t.groupHeader[e.indent](n.value,e.component._group.getRowCount(),e.component._group.getData(),e.component):!1===t.groupHeader?n.value=n.value:n.value=e.component._group.generator(n.value,e.component._group.getRowCount(),e.component._group.getData(),e.component),o.colSpan=n.width,o.innerHTML=n.value,s.classList.add("tabulator-print-table-group"),s.classList.add("tabulator-group-level-"+e.indent),n.component.isVisible()&&s.classList.add("tabulator-group-visible"),this.mapElementStyles(i.firstGroup,s,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(i.firstGroup,o,["padding-top","padding-left","padding-right","padding-bottom"]),s.appendChild(o),s}genereateCalcElement(e,t,i){var s=this.genereateRowElement(e,t,i);return s.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(i.calcRow,s,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),s}genereateRowElement(e,t,s){var o=document.createElement("tr");return o.classList.add("tabulator-print-table-row"),e.columns.forEach((n=>{if(n){var r=document.createElement("td"),a=n.component._column,l=this.table.columnManager.findColumnIndex(a),h=n.value,d={modules:{},getValue:function(){return h},getField:function(){return a.definition.field},getElement:function(){return r},getColumn:function(){return a.getComponent()},getData:function(){return e.component.getData()},getRow:function(){return e.component},getComponent:function(){return d},column:a};if((a.definition.cssClass?a.definition.cssClass.split(" "):[]).forEach((function(e){r.classList.add(e)})),this.table.modExists("format")&&!1!==this.config.formatCells)h=this.table.modules.format.formatExportValue(d,this.colVisProp);else switch(typeof h){case"object":h=JSON.stringify(h);break;case"undefined":case"null":h="";break;default:h=h}h instanceof Node?r.appendChild(h):r.innerHTML=h,(s.styleCells[l]||s.firstCell)&&(this.mapElementStyles(s.styleCells[l]||s.firstCell,r,["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"]),a.definition.align&&(r.style.textAlign=a.definition.align)),this.table.options.dataTree&&!1!==this.config.dataTree&&(t.treeElementField&&t.treeElementField==a.field||!t.treeElementField&&0==i)&&(e.component._row.modules.dataTree.controlEl&&r.insertBefore(e.component._row.modules.dataTree.controlEl.cloneNode(!0),r.firstChild),e.component._row.modules.dataTree.branchEl&&r.insertBefore(e.component._row.modules.dataTree.branchEl.cloneNode(!0),r.firstChild)),o.appendChild(r),d.modules.format&&d.modules.format.renderedCallback&&d.modules.format.renderedCallback(),t.rowFormatter&&!1!==this.config.formatCells&&t.rowFormatter(e.component)}})),o}genereateHTMLTable(e){var t=document.createElement("div");return t.appendChild(this.genereateTableElement(e)),t.innerHTML}getHtml(e,t,i,s){var o=this.generateExportList(i||this.table.options.htmlOutputConfig,t,e,s||"htmlOutput");return this.genereateHTMLTable(o)}mapElementStyles(e,t,i){if(this.cloneTableStyle&&e&&t){var s={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var o=window.getComputedStyle(e);i.forEach((function(e){t.style[s[e]]=o.getPropertyValue(e)}))}}}}D.moduleName="export";var S={"=":function(e,t,i,s){return t==e},"<":function(e,t,i,s){return t":function(e,t,i,s){return t>e},">=":function(e,t,i,s){return t>=e},"!=":function(e,t,i,s){return t!=e},regex:function(e,t,i,s){return"string"==typeof e&&(e=new RegExp(e)),e.test(t)},like:function(e,t,i,s){return null==e?t===e:null!=t&&String(t).toLowerCase().indexOf(e.toLowerCase())>-1},keywords:function(e,t,i,s){var o=e.toLowerCase().split(void 0===s.separator?" ":s.separator),n=String(null==t?"":t).toLowerCase(),r=[];return o.forEach((e=>{n.includes(e)&&r.push(!0)})),s.matchAll?r.length===o.length:!!r.length},starts:function(e,t,i,s){return null==e?t===e:null!=t&&String(t).toLowerCase().startsWith(e.toLowerCase())},ends:function(e,t,i,s){return null==e?t===e:null!=t&&String(t).toLowerCase().endsWith(e.toLowerCase())},in:function(e,t,i,s){return Array.isArray(e)?!e.length||e.indexOf(t)>-1:(console.warn("Filter Error - filter value is not an array:",e),!1)}};class F extends t{constructor(e){super(e),this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1,this.tableInitialized=!1,this.registerTableOption("filterMode","local"),this.registerTableOption("initialFilter",!1),this.registerTableOption("initialHeaderFilter",!1),this.registerTableOption("headerFilterLiveFilterDelay",300),this.registerColumnOption("headerFilter"),this.registerColumnOption("headerFilterPlaceholder"),this.registerColumnOption("headerFilterParams"),this.registerColumnOption("headerFilterEmptyCheck"),this.registerColumnOption("headerFilterFunc"),this.registerColumnOption("headerFilterFuncParams"),this.registerColumnOption("headerFilterLiveFilter"),this.registerTableFunction("searchRows",this.searchRows.bind(this)),this.registerTableFunction("searchData",this.searchData.bind(this)),this.registerTableFunction("setFilter",this.userSetFilter.bind(this)),this.registerTableFunction("refreshFilter",this.userRefreshFilter.bind(this)),this.registerTableFunction("addFilter",this.userAddFilter.bind(this)),this.registerTableFunction("getFilters",this.getFilters.bind(this)),this.registerTableFunction("setHeaderFilterFocus",this.userSetHeaderFilterFocus.bind(this)),this.registerTableFunction("getHeaderFilterValue",this.userGetHeaderFilterValue.bind(this)),this.registerTableFunction("setHeaderFilterValue",this.userSetHeaderFilterValue.bind(this)),this.registerTableFunction("getHeaderFilters",this.getHeaderFilters.bind(this)),this.registerTableFunction("removeFilter",this.userRemoveFilter.bind(this)),this.registerTableFunction("clearFilter",this.userClearFilter.bind(this)),this.registerTableFunction("clearHeaderFilter",this.userClearHeaderFilter.bind(this)),this.registerComponentFunction("column","headerFilterFocus",this.setHeaderFilterFocus.bind(this)),this.registerComponentFunction("column","reloadHeaderFilter",this.reloadHeaderFilter.bind(this)),this.registerComponentFunction("column","getHeaderFilterValue",this.getHeaderFilterValue.bind(this)),this.registerComponentFunction("column","setHeaderFilterValue",this.setHeaderFilterValue.bind(this))}initialize(){this.subscribe("column-init",this.initializeColumnHeaderFilter.bind(this)),this.subscribe("column-width-fit-before",this.hideHeaderFilterElements.bind(this)),this.subscribe("column-width-fit-after",this.showHeaderFilterElements.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),"remote"===this.table.options.filterMode&&this.subscribe("data-params",this.remoteFilterParams.bind(this)),this.registerDataHandler(this.filter.bind(this),10)}tableBuilt(){this.table.options.initialFilter&&this.setFilter(this.table.options.initialFilter),this.table.options.initialHeaderFilter&&this.table.options.initialHeaderFilter.forEach((e=>{var t=this.table.columnManager.findColumn(e.field);if(!t)return console.warn("Column Filter Error - No matching column found:",e.field),!1;this.setHeaderFilterValue(t,e.value)})),this.tableInitialized=!0}remoteFilterParams(e,t,i,s){return s.filter=this.getFilters(!0,!0),s}userSetFilter(e,t,i,s){this.setFilter(e,t,i,s),this.refreshFilter()}userRefreshFilter(){this.refreshFilter()}userAddFilter(e,t,i,s){this.addFilter(e,t,i,s),this.refreshFilter()}userSetHeaderFilterFocus(e){var t=this.table.columnManager.findColumn(e);if(!t)return console.warn("Column Filter Focus Error - No matching column found:",e),!1;this.setHeaderFilterFocus(t)}userGetHeaderFilterValue(e){var t=this.table.columnManager.findColumn(e);if(t)return this.getHeaderFilterValue(t);console.warn("Column Filter Error - No matching column found:",e)}userSetHeaderFilterValue(e,t){var i=this.table.columnManager.findColumn(e);if(!i)return console.warn("Column Filter Error - No matching column found:",e),!1;this.setHeaderFilterValue(i,t)}userRemoveFilter(e,t,i){this.removeFilter(e,t,i),this.refreshFilter()}userClearFilter(e){this.clearFilter(e),this.refreshFilter()}userClearHeaderFilter(){this.clearHeaderFilter(),this.refreshFilter()}searchRows(e,t,i){return this.search("rows",e,t,i)}searchData(e,t,i){return this.search("data",e,t,i)}initializeColumnHeaderFilter(e){var t=e.definition;t.headerFilter&&(void 0!==t.headerFilterPlaceholder&&t.field&&this.module("localize").setHeaderFilterColumnPlaceholder(t.field,t.headerFilterPlaceholder),this.initializeColumn(e))}initializeColumn(e,t){var i=this,s=e.getField();e.modules.filter={success:function(t){var o,n="input"==e.modules.filter.tagType&&"text"==e.modules.filter.attrType||"textarea"==e.modules.filter.tagType?"partial":"match",r="",a="";if(void 0===e.modules.filter.prevSuccess||e.modules.filter.prevSuccess!==t){if(e.modules.filter.prevSuccess=t,e.modules.filter.emptyFunc(t))delete i.headerFilters[s];else{switch(e.modules.filter.value=t,typeof e.definition.headerFilterFunc){case"string":F.filters[e.definition.headerFilterFunc]?(r=e.definition.headerFilterFunc,o=function(i){var s=e.definition.headerFilterFuncParams||{},o=e.getFieldValue(i);return s="function"==typeof s?s(t,o,i):s,F.filters[e.definition.headerFilterFunc](t,o,i,s)}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":r=o=function(i){var s=e.definition.headerFilterFuncParams||{},o=e.getFieldValue(i);return s="function"==typeof s?s(t,o,i):s,e.definition.headerFilterFunc(t,o,i,s)}}if(!o)switch(n){case"partial":o=function(i){var s=e.getFieldValue(i);return null!=s&&String(s).toLowerCase().indexOf(String(t).toLowerCase())>-1},r="like";break;default:o=function(i){return e.getFieldValue(i)==t},r="="}i.headerFilters[s]={value:t,func:o,type:r,params:{}}}a=JSON.stringify(i.headerFilters),i.prevHeaderFilterChangeCheck!==a&&(i.prevHeaderFilterChangeCheck=a,i.trackChanges(),i.refreshFilter())}return!0},attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(e)}generateHeaderFilterElement(e,t,i){var s,o,n,r,a,l,h,d=this,c=e.modules.filter.success,u=e.getField();if(e.modules.filter.headerElement&&e.modules.filter.headerElement.parentNode&&e.contentElement.removeChild(e.modules.filter.headerElement.parentNode),u){switch(e.modules.filter.emptyFunc=e.definition.headerFilterEmptyCheck||function(e){return!e&&"0"!==e&&0!==e},(s=document.createElement("div")).classList.add("tabulator-header-filter"),typeof e.definition.headerFilter){case"string":d.table.modules.edit.editors[e.definition.headerFilter]?(o=d.table.modules.edit.editors[e.definition.headerFilter],"tick"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":o=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?o=e.modules.edit.editor:e.definition.formatter&&d.table.modules.edit.editors[e.definition.formatter]?(o=d.table.modules.edit.editors[e.definition.formatter],"tick"!==e.definition.formatter&&"tickCross"!==e.definition.formatter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):o=d.table.modules.edit.editors.input}if(o){if(r={getValue:function(){return void 0!==t?t:""},getField:function(){return e.definition.field},getElement:function(){return s},getColumn:function(){return e.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},h="function"==typeof(h=e.definition.headerFilterParams||{})?h.call(d.table,r):h,!(n=o.call(this.table.modules.edit,r,(function(){}),c,(function(){}),h)))return void console.warn("Filter Error - Cannot add filter to "+u+" column, editor returned a value of false");if(!(n instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+u+" column, editor should return an instance of Node, the editor returned:",n);u?d.langBind("headerFilters|columns|"+e.definition.field,(function(e){n.setAttribute("placeholder",void 0!==e&&e?e:d.langText("headerFilters|default"))})):d.langBind("headerFilters|default",(function(e){n.setAttribute("placeholder",e)})),n.addEventListener("click",(function(e){e.stopPropagation(),n.focus()})),n.addEventListener("focus",(e=>{var t=this.table.columnManager.element.scrollLeft;t!==this.table.rowManager.element.scrollLeft+parseInt(this.table.columnManager.element.style.marginLeft)&&(this.table.rowManager.scrollHorizontal(t),this.table.columnManager.scrollHorizontal(t))})),a=!1,l=function(e){a&&clearTimeout(a),a=setTimeout((function(){c(n.value)}),d.table.options.headerFilterLiveFilterDelay)},e.modules.filter.headerElement=n,e.modules.filter.attrType=n.hasAttribute("type")?n.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=n.tagName.toLowerCase(),!1!==e.definition.headerFilterLiveFilter&&("autocomplete"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter&&("autocomplete"!==e.definition.editor&&"tickCross"!==e.definition.editor||!0!==e.definition.headerFilter)&&(n.addEventListener("keyup",l),n.addEventListener("search",l),"number"==e.modules.filter.attrType&&n.addEventListener("change",(function(e){c(n.value)})),"text"==e.modules.filter.attrType&&"ie"!==this.table.browser&&n.setAttribute("type","search")),"input"!=e.modules.filter.tagType&&"select"!=e.modules.filter.tagType&&"textarea"!=e.modules.filter.tagType||n.addEventListener("mousedown",(function(e){e.stopPropagation()}))),s.appendChild(n),e.contentElement.appendChild(s),i||d.headerFilterColumns.push(e)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)}hideHeaderFilterElements(){this.headerFilterColumns.forEach((function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="none")}))}showHeaderFilterElements(){this.headerFilterColumns.forEach((function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="")}))}setHeaderFilterFocus(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())}getHeaderFilterValue(e){if(e.modules.filter&&e.modules.filter.headerElement)return e.modules.filter.headerElement.value;console.warn("Column Filter Error - No header filter set on column:",e.getField())}setHeaderFilterValue(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t,!0),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}reloadHeaderFilter(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}refreshFilter(){this.tableInitialized&&("remote"===this.table.options.filterMode?this.reloadData():this.refreshData(!0))}trackChanges(){this.changed=!0,this.dispatch("filter-changed")}hasChanged(){var e=this.changed;return this.changed=!1,e}setFilter(e,t,i,s){this.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:i,params:s}]),this.addFilter(e)}addFilter(e,t,i,s){var o=!1;Array.isArray(e)||(e=[{field:e,type:t,value:i,params:s}]),e.forEach((e=>{(e=this.findFilter(e))&&(this.filterList.push(e),o=!0)})),o&&this.trackChanges()}findFilter(e){var t;if(Array.isArray(e))return this.findSubFilters(e);var i=!1;return"function"==typeof e.field?i=function(t){return e.field(t,e.type||{})}:F.filters[e.type]?i=(t=this.table.columnManager.getColumnByField(e.field))?function(i){return F.filters[e.type](e.value,t.getFieldValue(i),i,e.params||{})}:function(t){return F.filters[e.type](e.value,t[e.field],t,e.params||{})}:console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=i,!!e.func&&e}findSubFilters(e){var t=[];return e.forEach((e=>{(e=this.findFilter(e))&&t.push(e)})),!!t.length&&t}getFilters(e,t){var i=[];return e&&(i=this.getHeaderFilters()),t&&i.forEach((function(e){"function"==typeof e.type&&(e.type="function")})),i=i.concat(this.filtersToArray(this.filterList,t))}filtersToArray(e,t){var i=[];return e.forEach((e=>{var s;Array.isArray(e)?i.push(this.filtersToArray(e,t)):(s={field:e.field,type:e.type,value:e.value},t&&"function"==typeof s.type&&(s.type="function"),i.push(s))})),i}getHeaderFilters(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e}removeFilter(e,t,i){Array.isArray(e)||(e=[{field:e,type:t,value:i}]),e.forEach((e=>{var t=-1;(t="object"==typeof e.field?this.filterList.findIndex((t=>e===t)):this.filterList.findIndex((t=>e.field===t.field&&e.type===t.type&&e.value===t.value)))>-1?this.filterList.splice(t,1):console.warn("Filter Error - No matching filter type found, ignoring: ",e.type)})),this.trackChanges()}clearFilter(e){this.filterList=[],e&&this.clearHeaderFilter(),this.trackChanges()}clearHeaderFilter(){this.headerFilters={},this.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach((e=>{void 0!==e.modules.filter.value&&delete e.modules.filter.value,e.modules.filter.prevSuccess=void 0,this.reloadHeaderFilter(e)})),this.trackChanges()}search(e,t,i,s){var o=[],n=[];return Array.isArray(t)||(t=[{field:t,type:i,value:s}]),t.forEach((e=>{(e=this.findFilter(e))&&n.push(e)})),this.table.rowManager.rows.forEach((t=>{var i=!0;n.forEach((e=>{this.filterRecurse(e,t.getData())||(i=!1)})),i&&o.push("data"===e?t.getData("data"):t.getComponent())})),o}filter(e,t){var i=[],s=[];return this.subscribedExternal("dataFiltering")&&this.dispatchExternal("dataFiltering",this.getFilters()),"remote"!==this.table.options.filterMode&&(this.filterList.length||Object.keys(this.headerFilters).length)?e.forEach((e=>{this.filterRow(e)&&i.push(e)})):i=e.slice(0),this.subscribedExternal("dataFiltered")&&(i.forEach((e=>{s.push(e.getComponent())})),this.dispatchExternal("dataFiltered",this.getFilters(),s)),i}filterRow(e,t){var i=!0,s=e.getData();for(var o in this.filterList.forEach((e=>{this.filterRecurse(e,s)||(i=!1)})),this.headerFilters)this.headerFilters[o].func(s)||(i=!1);return i}filterRecurse(e,t){var i=!1;return Array.isArray(e)?e.forEach((e=>{this.filterRecurse(e,t)&&(i=!0)})):i=e.func(t),i}}F.moduleName="filter",F.filters=S;var z={plaintext:function(e,t,i){return this.emptyToSpace(this.sanitizeHTML(e.getValue()))},html:function(e,t,i){return e.getValue()},textarea:function(e,t,i){return e.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(e.getValue()))},money:function(e,t,i){var s,o,n,r,a=parseFloat(e.getValue()),l="",h=t.decimal||".",d=t.thousand||",",c=t.negativeSign||"-",u=t.symbol||"",m=!!t.symbolAfter,p=void 0!==t.precision?t.precision:2;if(isNaN(a))return this.emptyToSpace(this.sanitizeHTML(e.getValue()));for(a<0&&(a=Math.abs(a),l=c),s=!1!==p?a.toFixed(p):a,o=(s=String(s).split("."))[0],n=s.length>1?h+s[1]:"",r=/(\d+)(\d{3})/;r.test(o);)o=o.replace(r,"$1"+d+"$2");return m?l+o+n+u:l+u+o+n},link:function(e,t,i){var s=e.getValue(),o=t.urlPrefix||"",n=t.download,r=s,a=document.createElement("a");if(t.labelField&&(r=e.getData()[t.labelField]),t.label)switch(typeof t.label){case"string":r=t.label;break;case"function":r=t.label(e)}if(r){if(t.urlField&&(s=e.getData()[t.urlField]),t.url)switch(typeof t.url){case"string":s=t.url;break;case"function":s=t.url(e)}return a.setAttribute("href",o+s),t.target&&a.setAttribute("target",t.target),t.download&&(n="function"==typeof n?n(e):!0===n?"":n,a.setAttribute("download",n)),a.innerHTML=this.emptyToSpace(this.sanitizeHTML(r)),a}return" "},image:function(e,t,i){var s=document.createElement("img"),o=e.getValue();switch(t.urlPrefix&&(o=t.urlPrefix+e.getValue()),t.urlSuffix&&(o+=t.urlSuffix),s.setAttribute("src",o),typeof t.height){case"number":s.style.height=t.height+"px";break;case"string":s.style.height=t.height}switch(typeof t.width){case"number":s.style.width=t.width+"px";break;case"string":s.style.width=t.width}return s.addEventListener("load",(function(){e.getRow().normalizeHeight()})),s},tickCross:function(e,t,i){var s=e.getValue(),o=e.getElement(),n=t.allowEmpty,r=t.allowTruthy,a=void 0!==t.tickElement?t.tickElement:'',l=void 0!==t.crossElement?t.crossElement:'';return r&&s||!0===s||"true"===s||"True"===s||1===s||"1"===s?(o.setAttribute("aria-checked",!0),a||""):!n||"null"!==s&&""!==s&&null!=s?(o.setAttribute("aria-checked",!1),l||""):(o.setAttribute("aria-checked","mixed"),"")},datetime:function(e,t,i){var s=window.DateTime||luxon.DateTime,o=t.inputFormat||"yyyy-MM-dd HH:mm:ss",n=t.outputFormat||"dd/MM/yyyy HH:mm:ss",r=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",a=e.getValue();if(void 0!==s){var l="iso"===o?s.fromISO(String(a)):s.fromFormat(String(a),o);return l.isValid?(t.timezone&&(l=l.shiftTimezone(t.timezone)),l.toFormat(n)):!0!==r&&a?"function"==typeof r?r(a):r:a}console.error("Format Error - 'datetime' formatter is dependant on luxon.js")},datetimediff:function(e,t,i){var s=window.DateTime||luxon.DateTime,o=t.inputFormat||"yyyy-MM-dd HH:mm:ss",n=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",r=void 0!==t.suffix&&t.suffix,a=void 0!==t.unit?t.unit:"days",l=void 0!==t.humanize&&t.humanize,h=void 0!==t.date?t.date:s.now(),d=e.getValue();if(void 0!==s){var c="iso"===o?s.fromISO(String(d)):s.fromFormat(String(d),o);if(!c.isValid)return!0===n?d:"function"==typeof n?n(d):n;if(!l)return parseInt(c.diff(h,a)[a])+(r?" "+r:"")}else console.error("Format Error - 'datetimediff' formatter is dependant on luxon.js")},lookup:function(e,t,i){var s=e.getValue();return void 0===t[s]?(console.warn("Missing display value for "+s),s):t[s]},star:function(e,t,i){var s=e.getValue(),o=e.getElement(),n=t&&t.stars?t.stars:5,r=document.createElement("span"),a=document.createElementNS("http://www.w3.org/2000/svg","svg");r.style.verticalAlign="middle",a.setAttribute("width","14"),a.setAttribute("height","14"),a.setAttribute("viewBox","0 0 512 512"),a.setAttribute("xml:space","preserve"),a.style.padding="0 1px",s=s&&!isNaN(s)?parseInt(s):0,s=Math.max(0,Math.min(s,n));for(var l=1;l<=n;l++){var h=a.cloneNode(!0);h.innerHTML=l<=s?'':'',r.appendChild(h)}return o.style.whiteSpace="nowrap",o.style.overflow="hidden",o.style.textOverflow="ellipsis",o.setAttribute("aria-label",s),r},traffic:function(e,t,i){var s,o,n=this.sanitizeHTML(e.getValue())||0,r=document.createElement("span"),a=t&&t.max?t.max:100,l=t&&t.min?t.min:0,h=t&&void 0!==t.color?t.color:["red","orange","green"],d="#666666";if(!isNaN(n)&&void 0!==e.getValue()){switch(r.classList.add("tabulator-traffic-light"),o=parseFloat(n)<=a?parseFloat(n):a,o=parseFloat(o)>=l?parseFloat(o):l,s=(a-l)/100,o=Math.round((o-l)/s),typeof h){case"string":d=h;break;case"function":d=h(n);break;case"object":if(Array.isArray(h)){var c=100/h.length,u=Math.floor(o/c);u=Math.min(u,h.length-1),d=h[u=Math.max(u,0)];break}}return r.style.backgroundColor=d,r}},progress:function(e,t,i){var s,o,n,r,a,l=this.sanitizeHTML(e.getValue())||0,h=e.getElement(),d=t&&t.max?t.max:100,c=t&&t.min?t.min:0,m=t&&t.legendAlign?t.legendAlign:"center";switch(o=parseFloat(l)<=d?parseFloat(l):d,o=parseFloat(o)>=c?parseFloat(o):c,s=(d-c)/100,o=Math.round((o-c)/s),typeof t.color){case"string":n=t.color;break;case"function":n=t.color(l);break;case"object":if(Array.isArray(t.color)){var p=100/t.color.length,g=Math.floor(o/p);g=Math.min(g,t.color.length-1),g=Math.max(g,0),n=t.color[g];break}default:n="#2DC214"}switch(typeof t.legend){case"string":r=t.legend;break;case"function":r=t.legend(l);break;case"boolean":r=l;break;default:r=!1}switch(typeof t.legendColor){case"string":a=t.legendColor;break;case"function":a=t.legendColor(l);break;case"object":if(Array.isArray(t.legendColor)){p=100/t.legendColor.length,g=Math.floor(o/p);g=Math.min(g,t.legendColor.length-1),g=Math.max(g,0),a=t.legendColor[g]}break;default:a="#000"}h.style.minWidth="30px",h.style.position="relative",h.setAttribute("aria-label",o);var b=document.createElement("div");b.style.display="inline-block",b.style.position="absolute",b.style.width=o+"%",b.style.backgroundColor=n,b.style.height="100%",b.setAttribute("data-max",d),b.setAttribute("data-min",c);var f=document.createElement("div");if(f.style.position="relative",f.style.width="100%",f.style.height="100%",r){var v=document.createElement("div");v.style.position="absolute",v.style.top=0,v.style.left=0,v.style.textAlign=m,v.style.width="100%",v.style.color=a,v.innerHTML=r}return i((function(){if(!(e instanceof u)){var t=document.createElement("div");t.style.position="absolute",t.style.top="4px",t.style.bottom="4px",t.style.left="4px",t.style.right="4px",h.appendChild(t),h=t}h.appendChild(f),f.appendChild(b),r&&f.appendChild(v)})),""},color:function(e,t,i){return e.getElement().style.backgroundColor=this.sanitizeHTML(e.getValue()),""},buttonTick:function(e,t,i){return''},buttonCross:function(e,t,i){return''},rownum:function(e,t,i){return this.table.rowManager.activeRows.indexOf(e.getRow()._getSelf())+1||""},handle:function(e,t,i){return e.getElement().classList.add("tabulator-row-handle"),"
"},responsiveCollapse:function(e,t,i){var s=document.createElement("div"),o=e.getRow()._row.modules.responsiveLayout;function n(e){var t=o.element;o.open=e,t&&(o.open?(s.classList.add("open"),t.style.display=""):(s.classList.remove("open"),t.style.display="none"))}return s.classList.add("tabulator-responsive-collapse-toggle"),s.innerHTML="+-",e.getElement().classList.add("tabulator-row-handle"),s.addEventListener("click",(function(e){e.stopImmediatePropagation(),n(!o.open)})),n(o.open),s},rowSelection:function(e,t,i){var s=document.createElement("input"),o=!1;if(s.type="checkbox",s.setAttribute("aria-label","Select Row"),this.table.modExists("selectRow",!0))if(s.addEventListener("click",(e=>{e.stopPropagation()})),"function"==typeof e.getRow){var n=e.getRow();n instanceof f?(s.addEventListener("change",(e=>{"click"===this.table.options.selectableRangeMode&&o?o=!1:n.toggleSelect()})),"click"===this.table.options.selectableRangeMode&&s.addEventListener("click",(e=>{o=!0,this.table.modules.selectRow.handleComplexRowClick(n._row,e)})),s.checked=n.isSelected&&n.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(n,s)):s=""}else s.addEventListener("change",(e=>{this.table.modules.selectRow.selectedRows.length?this.table.deselectRow():this.table.selectRow(t.rowRange)})),this.table.modules.selectRow.registerHeaderSelectCheckbox(s);return s}};class P extends t{constructor(e){super(e),this.registerColumnOption("formatter"),this.registerColumnOption("formatterParams"),this.registerColumnOption("formatterPrint"),this.registerColumnOption("formatterPrintParams"),this.registerColumnOption("formatterClipboard"),this.registerColumnOption("formatterClipboardParams"),this.registerColumnOption("formatterHtmlOutput"),this.registerColumnOption("formatterHtmlOutputParams"),this.registerColumnOption("titleFormatter"),this.registerColumnOption("titleFormatterParams")}initialize(){this.subscribe("cell-format",this.formatValue.bind(this)),this.subscribe("cell-rendered",this.cellRendered.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-format",this.formatHeader.bind(this))}initializeColumn(e){e.modules.format=this.lookupFormatter(e,""),void 0!==e.definition.formatterPrint&&(e.modules.format.print=this.lookupFormatter(e,"Print")),void 0!==e.definition.formatterClipboard&&(e.modules.format.clipboard=this.lookupFormatter(e,"Clipboard")),void 0!==e.definition.formatterHtmlOutput&&(e.modules.format.htmlOutput=this.lookupFormatter(e,"HtmlOutput"))}lookupFormatter(e,t){var i={params:e.definition["formatter"+t+"Params"]||{}},s=e.definition["formatter"+t];switch(typeof s){case"string":P.formatters[s]?i.formatter=P.formatters[s]:(console.warn("Formatter Error - No such formatter found: ",s),i.formatter=P.formatters.plaintext);break;case"function":i.formatter=s;break;default:i.formatter=P.formatters.plaintext}return i}cellRendered(e){e.modules.format&&e.modules.format.renderedCallback&&!e.modules.format.rendered&&(e.modules.format.renderedCallback(),e.modules.format.rendered=!0)}formatHeader(e,t,i){var s,o,n,r;return e.definition.titleFormatter?(s=this.getFormatter(e.definition.titleFormatter),n=t=>{e.titleFormatterRendered=t},r={getValue:function(){return t},getElement:function(){return i}},o="function"==typeof(o=e.definition.titleFormatterParams||{})?o():o,s.call(this,r,o,n)):t}formatValue(e){var t=e.getComponent(),i="function"==typeof e.column.modules.format.params?e.column.modules.format.params(t):e.column.modules.format.params;return e.column.modules.format.formatter.call(this,t,i,(function(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1}))}formatExportValue(e,t){var i,s=e.column.modules.format[t];if(s){return i="function"==typeof s.params?s.params(component):s.params,s.formatter.call(this,e.getComponent(),i,(function(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1}))}return this.formatValue(e)}sanitizeHTML(e){if(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=\/]/g,(function(e){return t[e]}))}return e}emptyToSpace(e){return null==e||""===e?" ":e}getFormatter(e){switch(typeof e){case"string":P.formatters[e]?e=P.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),e=P.formatters.plaintext);break;case"function":e=e;break;default:e=P.formatters.plaintext}return e}}P.moduleName="format",P.formatters=z;class H extends t{constructor(e){super(e),this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightPadding=0,this.initializationMode="left",this.active=!1,this.scrollEndTimer=!1,this.blocked=!0,this.registerColumnOption("frozen")}reset(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightMargin=0,this.active=!1,this.table.columnManager.headersElement.style.marginLeft=0,this.table.columnManager.element.style.paddingRight=0}initialize(){this.subscribe("cell-layout",this.layoutCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-width",this.layout.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("table-layout",this.layout.bind(this)),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("columns-loading",this.reset.bind(this)),this.subscribe("table-redraw",this.layout.bind(this)),this.subscribe("layout-refreshing",this.blockLayout.bind(this)),this.subscribe("layout-refreshed",this.unblockLayout.bind(this))}blockLayout(){this.blocked=!0}unblockLayout(){this.blocked=!1}layoutCell(e){this.layoutElement(e.element,e.column)}initializeColumn(e){var t={margin:0,edge:!1};e.isGroup||(this.frozenCheck(e)?(t.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(e):this.rightColumns.unshift(e),this.active=!0,e.modules.frozen=t):this.initializationMode="right")}frozenCheck(e){return e.parent.isGroup&&e.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),e.parent.isGroup?this.frozenCheck(e.parent):e.definition.frozen}scrollHorizontal(){var e;this.active&&(clearTimeout(this.scrollEndTimer),e=this.table.rowManager.getVisibleRows(),this.calcMargins(!0),this.layoutColumnPosition(),this.layoutCalcRows(),e.forEach((e=>{"row"===e.type&&this.layoutRow(e)})))}calcMargins(e){e||(this.leftMargin=this._calcSpace(this.leftColumns,this.leftColumns.length)+"px",this.rightMargin=this._calcSpace(this.rightColumns,this.rightColumns.length)+"px",this.table.rowManager.tableElement.style.marginRight=this.rightMargin),this.rightPadding=this.table.rowManager.element.clientWidth+this.table.columnManager.scrollLeft}layoutCalcRows(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow),this.table.modExists("groupRows")&&this.layoutGroupCalcs(this.table.modules.groupRows.getGroups()))}layoutGroupCalcs(e){e.forEach((e=>{e.calcs.top&&this.layoutRow(e.calcs.top),e.calcs.bottom&&this.layoutRow(e.calcs.bottom),e.groupList&&e.groupList.length&&this.layoutGroupCalcs(e.groupList&&e.groupList)}))}layoutColumnPosition(e){var t=[],i=0,s=0;this.table.columnManager.headersElement.style.marginLeft=this.leftMargin,this.table.columnManager.element.style.paddingRight=this.rightMargin,this.leftColumns.forEach(((s,o)=>{if(s.modules.frozen.margin=i+this.table.columnManager.scrollLeft+"px",s.visible&&(i+=s.getWidth()),o==this.leftColumns.length-1?s.modules.frozen.edge=!0:s.modules.frozen.edge=!1,s.parent.isGroup){var n=this.getColGroupParentElement(s);t.includes(n)||(this.layoutElement(n,s),t.push(n)),s.modules.frozen.edge&&n.classList.add("tabulator-frozen-"+s.modules.frozen.position)}else this.layoutElement(s.getElement(),s);e&&s.cells.forEach((e=>{this.layoutElement(e.getElement(!0),s)}))})),this.rightColumns.forEach(((t,i)=>{t.visible&&(s+=t.getWidth()),t.modules.frozen.margin=this.rightPadding-s+"px",i==this.rightColumns.length-1?t.modules.frozen.edge=!0:t.modules.frozen.edge=!1,t.parent.isGroup?this.layoutElement(this.getColGroupParentElement(t),t):this.layoutElement(t.getElement(),t),e&&t.cells.forEach((e=>{this.layoutElement(e.getElement(!0),t)}))}))}getColGroupParentElement(e){return e.parent.isGroup?this.getColGroupParentElement(e.parent):e.getElement()}layout(){this.active&&!this.blocked&&(this.calcMargins(),this.table.rowManager.getDisplayRows().forEach((e=>{"row"===e.type&&this.layoutRow(e)})),this.layoutCalcRows(),this.layoutColumnPosition(!0))}layoutRow(e){e.getElement().style.paddingLeft=this.leftMargin,"fitDataFill"===this.table.options.layout&&this.rightColumns.length&&(this.table.rowManager.getTableElement().style.minWidth="calc(100% - "+this.rightMargin+")"),this.leftColumns.forEach((t=>{var i=e.getCell(t);i&&this.layoutElement(i.getElement(!0),t)})),this.rightColumns.forEach((t=>{var i=e.getCell(t);i&&this.layoutElement(i.getElement(!0),t)}))}layoutElement(e,t){t.modules.frozen&&(e.style.position="absolute",e.style.left=t.modules.frozen.margin,e.classList.add("tabulator-frozen"),t.modules.frozen.edge&&e.classList.add("tabulator-frozen-"+t.modules.frozen.position))}_calcSpace(e,t){var i=0;for(let s=0;s-1}isFrozen(){return!!this.rows.length}visibleRows(e,t){return this.rows.forEach((e=>{t.push(e)})),t}getRows(e){var t=e.slice(0);return this.rows.forEach((function(e){var i=t.indexOf(e);i>-1&&t.splice(i,1)})),t}freezeRow(e){e.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(e.modules.frozen=!0,this.topElement.appendChild(e.getElement()),e.initialize(),e.normalizeHeight(),this.table.rowManager.adjustTableSize(),this.rows.push(e),this.refreshData(!1,"display"),this.styleRows())}unfreezeRow(e){this.rows.indexOf(e);e.modules.frozen?(e.modules.frozen=!1,this.detachRow(e),this.table.rowManager.adjustTableSize(),this.refreshData(!1,"display"),this.rows.length&&this.styleRows()):console.warn("Freeze Error - Row is already unfrozen")}detachRow(e){var t=this.rows.indexOf(e);if(t>-1){var i=e.getElement();i.parentNode&&i.parentNode.removeChild(i),this.rows.splice(t,1)}}styleRows(e){this.rows.forEach(((e,t)=>{this.table.rowManager.styleRow(e,t)}))}}A.moduleName="frozenRows";class O{constructor(e){return this._group=e,this.type="GroupComponent",new Proxy(this,{get:function(e,t,i){return void 0!==e[t]?e[t]:e._group.groupManager.table.componentFunctionBinder.handle("row",e._group,t)}})}getKey(){return this._group.key}getField(){return this._group.field}getElement(){return this._group.element}getRows(){return this._group.getRows(!0)}getSubGroups(){return this._group.getSubGroups(!0)}getParentGroup(){return!!this._group.parent&&this._group.parent.getComponent()}isVisible(){return this._group.visible}show(){this._group.show()}hide(){this._group.hide()}toggle(){this._group.toggleVisibility()}_getSelf(){return this._group}getTable(){return this._group.groupManager.table}}class _{constructor(e,t,i,s,o,n,r){this.groupManager=e,this.parent=t,this.key=s,this.level=i,this.field=o,this.hasSubGroups=i{e.modules&&delete e.modules.group})),this.element=!1,this.arrowElement=!1,this.elementContents=!1}createElements(){var e=document.createElement("div");e.classList.add("tabulator-arrow"),this.element=document.createElement("div"),this.element.classList.add("tabulator-row"),this.element.classList.add("tabulator-group"),this.element.classList.add("tabulator-group-level-"+this.level),this.element.setAttribute("role","rowgroup"),this.arrowElement=document.createElement("div"),this.arrowElement.classList.add("tabulator-group-toggle"),this.arrowElement.appendChild(e),!1!==this.groupManager.table.options.movableRows&&this.groupManager.table.modExists("moveRow")&&this.groupManager.table.modules.moveRow.initializeGroupHeader(this)}createValueGroups(){var e=this.level+1;this.groupManager.allowedValues&&this.groupManager.allowedValues[e]&&this.groupManager.allowedValues[e].forEach((t=>{this._createGroup(t,e)}))}addBindings(){this.groupManager.table.options.groupToggleElement&&("arrow"==this.groupManager.table.options.groupToggleElement?this.arrowElement:this.element).addEventListener("click",(e=>{e.stopPropagation(),e.stopImmediatePropagation(),this.toggleVisibility()}))}_createGroup(e,t){var i=t+"_"+e,s=new _(this.groupManager,this,t,e,this.groupManager.groupIDLookups[t].field,this.groupManager.headerGenerator[t]||this.groupManager.headerGenerator[0],!!this.old&&this.old.groups[i]);this.groups[i]=s,this.groupList.push(s)}_addRowToGroup(e){var t=this.level+1;if(this.hasSubGroups){var i=this.groupManager.groupIDLookups[t].func(e.getData()),s=t+"_"+i;this.groupManager.allowedValues&&this.groupManager.allowedValues[t]?this.groups[s]&&this.groups[s].addRow(e):(this.groups[s]||this._createGroup(i,t),this.groups[s].addRow(e))}}_addRow(e){this.rows.push(e),e.modules.group=this}insertRow(e,t,i){var s=this.conformRowData({});e.updateData(s);var o=this.rows.indexOf(t);o>-1?i?this.rows.splice(o+1,0,e):this.rows.splice(o,0,e):i?this.rows.push(e):this.rows.unshift(e),e.modules.group=this,this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)}scrollHeader(e){this.arrowElement&&(this.arrowElement.style.marginLeft=e,this.groupList.forEach((function(t){t.scrollHeader(e)})))}getRowIndex(e){}conformRowData(e){return this.field?e[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(e=this.parent.conformRowData(e)),e}removeRow(e){var t=this.rows.indexOf(e),i=e.getElement();t>-1&&this.rows.splice(t,1),this.groupManager.table.options.groupValues||this.rows.length?(i.parentNode&&i.parentNode.removeChild(i),this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))}removeGroup(e){var t,i=e.level+"_"+e.key;this.groups[i]&&(delete this.groups[i],(t=this.groupList.indexOf(e))>-1&&this.groupList.splice(t,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))}getHeadersAndRows(e){var t=[];return t.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach((function(i){t=t.concat(i.getHeadersAndRows(e))})):(!e&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top)),t=t.concat(this.rows),!e&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(!e&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top))),!e&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom)))),t}getData(e,t){var i=[];return this._visSet(),(!e||e&&this.visible)&&this.rows.forEach((e=>{i.push(e.getData(t||"data"))})),i}getRowCount(){var e=0;return this.groupList.length?this.groupList.forEach((t=>{e+=t.getRowCount()})):e=this.rows.length,e}toggleVisibility(){this.visible?this.hide():this.show()}hide(){this.visible=!1,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination?this.groupManager.updateGroupRows(!0):(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach((e=>{e.getHeadersAndRows().forEach((e=>{e.detachElement()}))})):this.rows.forEach((e=>{var t=e.getElement();t.parentNode.removeChild(t)})),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()),this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!1)}show(){if(this.visible=!0,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var e=this.generateElement();this.groupList.length?this.groupList.forEach((t=>{t.getHeadersAndRows().forEach((t=>{var i=t.getElement();e.parentNode.insertBefore(i,e.nextSibling),t.initialize(),e=i}))})):this.rows.forEach((t=>{var i=t.getElement();e.parentNode.insertBefore(i,e.nextSibling),t.initialize(),e=i})),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()}this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!0)}_visSet(){var e=[];"function"==typeof this.visible&&(this.rows.forEach((function(t){e.push(t.getData())})),this.visible=this.visible(this.key,this.getRowCount(),e,this.getComponent()))}getRowGroup(e){var t=!1;return this.groupList.length?this.groupList.forEach((function(i){var s=i.getRowGroup(e);s&&(t=s)})):this.rows.find((function(t){return t===e}))&&(t=this),t}getSubGroups(e){var t=[];return this.groupList.forEach((function(i){t.push(e?i.getComponent():i)})),t}getRows(e){var t=[];return this.rows.forEach((function(i){t.push(e?i.getComponent():i)})),t}generateGroupHeaderContents(){var e=[];for(this.rows.forEach((function(t){e.push(t.getData())})),this.elementContents=this.generator(this.key,this.getRowCount(),e,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)}getPath(e=[]){return e.unshift(this.key),this.parent&&this.parent.getPath(e),e}getElement(){return this.elementContents?this.element:this.generateElement()}generateElement(){this.addBindings=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var e=0;ei.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),this.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],this.langBind("groups|item",((e,t)=>{this.headerGenerator[0]=(i,s,o)=>(void 0===i?"":i)+"("+s+" "+(1===s?e:t.groups.items)+")"})),this.groupIDLookups=[],Array.isArray(e)||e)this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs)this.table.columnManager.getRealColumns().forEach((e=>{e.definition.topCalc&&this.table.modules.columnCalcs.initializeTopRow(),e.definition.bottomCalc&&this.table.modules.columnCalcs.initializeBottomRow()}));Array.isArray(e)||(e=[e]),e.forEach(((e,t)=>{var i,s;i="function"==typeof e?e:(s=this.table.columnManager.getColumnByField(e))?function(e){return s.getFieldValue(e)}:function(t){return t[e]},this.groupIDLookups.push({field:"function"!=typeof e&&e,func:i,values:!!this.allowedValues&&this.allowedValues[t]})})),t&&(Array.isArray(t)||(t=[t]),t.forEach((e=>{})),this.startOpen=t),i&&(this.headerGenerator=Array.isArray(i)?i:[i])}}rowSample(e,t){var i=this.getGroups(!1)[0];return t.push(i.getRows(!1)[0]),t}virtualRenderFill(){var e=this.table.rowManager.tableElement,t=this.table.rowManager.getVisibleRows();t=t.filter((e=>"group"!==e.type)),e.style.minWidth=t.length?"":this.table.columnManager.getWidth()+"px"}rowAddingIndex(e,t,i){this.assignRowToGroup(e);var s=e.modules.group.rows;return s.length>1&&(!t||t&&-1==s.indexOf(t)?i?s[0]!==e&&(t=s[0],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)):s[s.length-1]!==e&&(t=s[s.length-1],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)):this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)),t}trackChanges(){this.dispatch("group-changed")}setGroupBy(e){this.table.options.groupBy=e,this.initialized?this.configureGroupSetup():this.initialize(),this.refreshData(),this.trackChanges()}setGroupValues(e){this.table.options.groupValues=e,this.configureGroupSetup(),this.refreshData(),this.trackChanges()}setGroupStartOpen(e){this.table.options.groupStartOpen=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}setGroupHeader(e){this.table.options.groupHeader=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}userGetGroups(e){return this.getGroups(!0)}userGetGroupedData(){return this.table.options.groupBy?this.getGroupedData():this.getData()}rowGetGroup(e){return!!e.modules.group&&e.modules.group.getComponent()}rowMoving(e,t,i){!i&&t instanceof _&&(t=this.table.rowManager.prevDisplayRow(e)||t);var s=t instanceof _?t:t.modules.group,o=e instanceof _?e:e.modules.group;s===o?this.table.rowManager.moveRowInArray(s.rows,e,t,i):(o&&o.removeRow(e),s.insertRow(e,t,i))}rowDeleting(e){e.modules.group&&e.modules.group.removeRow(e)}rowsUpdated(e){this.updateGroupRows(!0)}cellUpdated(e){this.reassignRowToGroup(e.row)}setDisplayIndex(e){this.displayIndex=e}getDisplayIndex(){return this.displayIndex}getRows(e){return this.table.options.groupBy&&this.groupIDLookups.length?(this.dispatchExternal("dataGrouping"),this.generateGroups(e),this.subscribedExternal("dataGrouped")&&this.dispatchExternal("dataGrouped",this.getGroups(!0)),this.updateGroupRows()):e.slice(0)}getGroups(e){var t=[];return this.groupList.forEach((function(i){t.push(e?i.getComponent():i)})),t}getChildGroups(e){var t=[];return e||(e=this),e.groupList.forEach((e=>{e.groupList.length?t=t.concat(this.getChildGroups(e)):t.push(e)})),t}wipe(){this.groupList.forEach((function(e){e.wipe()}))}pullGroupListData(e){var t=[];return e.forEach((e=>{var i={level:0,rowCount:0,headerContent:""},s=[];e.hasSubGroups?(s=this.pullGroupListData(e.groupList),i.level=e.level,i.rowCount=s.length-e.groupList.length,i.headerContent=e.generator(e.key,i.rowCount,e.rows,e),t.push(i),t=t.concat(s)):(i.level=e.level,i.headerContent=e.generator(e.key,e.rows.length,e.rows,e),i.rowCount=e.getRows().length,t.push(i),e.getRows().forEach((e=>{t.push(e.getData("data"))})))})),t}getGroupedData(){return this.pullGroupListData(this.groupList)}getRowGroup(e){var t=!1;return this.groupList.forEach((i=>{var s=i.getRowGroup(e);s&&(t=s)})),t}countGroups(){return this.groupList.length}generateGroups(e){var t=this.groups;this.groups={},this.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach((e=>{this.createGroup(e,0,t)})),e.forEach((e=>{this.assignRowToExistingGroup(e,t)}))):e.forEach((e=>{this.assignRowToGroup(e,t)}))}createGroup(e,t,i){var s,o=t+"_"+e;i=i||[],s=new _(this,!1,t,e,this.groupIDLookups[0].field,this.headerGenerator[0],i[o]),this.groups[o]=s,this.groupList.push(s)}assignRowToExistingGroup(e,t){var i="0_"+this.groupIDLookups[0].func(e.getData());this.groups[i]&&this.groups[i].addRow(e)}assignRowToGroup(e,t){var i=this.groupIDLookups[0].func(e.getData()),s=!this.groups["0_"+i];return s&&this.createGroup(i,0,t),this.groups["0_"+i].addRow(e),!s}reassignRowToGroup(e){if("row"===e.type){var t=e.modules.group,i=t.getPath(),s=this.getExpectedPath(e);i.length==s.length&&i.every(((e,t)=>e===s[t]))||(t.removeRow(e),this.assignRowToGroup(e,this.groups),this.refreshData(!0))}}getExpectedPath(e){var t=[],i=e.getData();return this.groupIDLookups.forEach((e=>{t.push(e.func(i))})),t}updateGroupRows(e){var t=[];return this.groupList.forEach((e=>{t=t.concat(e.getHeadersAndRows())})),e&&this.refreshData(!0,this.displayHandler),t}scrollHeaders(e){"virtual"===this.table.options.renderHorizontal&&(e-=this.table.columnManager.renderer.vDomPadLeft),e+="px",this.groupList.forEach((t=>{t.scrollHeader(e)}))}removeGroup(e){var t,i=e.level+"_"+e.key;this.groups[i]&&(delete this.groups[i],(t=this.groupList.indexOf(e))>-1&&this.groupList.splice(t,1))}}B.moduleName="groupRows";class N extends t{constructor(e){super(e),this.history=[],this.index=-1,this.registerTableOption("history",!1)}initialize(){this.table.options.history&&(this.subscribe("cell-value-updated",this.cellUpdated.bind(this)),this.subscribe("cell-delete",this.clearComponentHistory.bind(this)),this.subscribe("row-delete",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clear.bind(this)),this.subscribe("row-added",this.rowAdded.bind(this)),this.subscribe("row-move",this.rowMoved.bind(this))),this.registerTableFunction("undo",this.undo.bind(this)),this.registerTableFunction("redo",this.redo.bind(this)),this.registerTableFunction("getHistoryUndoSize",this.getHistoryUndoSize.bind(this)),this.registerTableFunction("getHistoryRedoSize",this.getHistoryRedoSize.bind(this)),this.registerTableFunction("clearHistory",this.clear.bind(this))}rowMoved(e,t,i){this.action("rowMove",e,{posFrom:this.table.rowManager.getRowPosition(e),posTo:this.table.rowManager.getRowPosition(t),to:t,after:i})}rowAdded(e,t,i,s){this.action("rowAdd",e,{data:t,pos:i,index:s})}rowDeleted(e){var t,i;this.table.options.groupBy?(t=(i=e.getComponent().getGroup().rows).indexOf(e))&&(t=i[t-1]):(t=e.table.rowManager.getRowIndex(e))&&(t=e.table.rowManager.rows[t-1]),this.action("rowDelete",e,{data:e.getData(),pos:!t,index:t})}cellUpdated(e){this.action("cellEdit",e,{oldValue:e.oldValue,newValue:e.value})}clear(){this.history=[],this.index=-1}action(e,t,i){this.history=this.history.slice(0,this.index+1),this.history.push({type:e,component:t,data:i}),this.index++}getHistoryUndoSize(){return this.index+1}getHistoryRedoSize(){return this.history.length-(this.index+1)}clearComponentHistory(e){var t=this.history.findIndex((function(t){return t.component===e}));t>-1&&(this.history.splice(t,1),t<=this.index&&this.index--,this.clearComponentHistory(e))}undo(){if(this.index>-1){let e=this.history[this.index];return N.undoers[e.type].call(this,e),this.index--,this.dispatchExternal("historyUndo",e.type,e.component.getComponent(),e.data),!0}return console.warn("History Undo Error - No more history to undo"),!1}redo(){if(this.history.length-1>this.index){this.index++;let e=this.history[this.index];return N.redoers[e.type].call(this,e),this.dispatchExternal("historyRedo",e.type,e.component.getComponent(),e.data),!0}return console.warn("History Redo Error - No more history to redo"),!1}_rebindRow(e,t){this.history.forEach((function(i){if(i.component instanceof v)i.component===e&&(i.component=t);else if(i.component instanceof m&&i.component.row===e){var s=i.component.column.getField();s&&(i.component=t.getCell(s))}}))}}N.moduleName="history",N.undoers={cellEdit:function(e){e.component.setValueProcessData(e.data.oldValue),e.component.cellRendered()},rowAdd:function(e){e.component.deleteActual()},rowDelete:function(e){var t=this.table.rowManager.addRowActual(e.data.data,e.data.pos,e.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(e.component,t)},rowMove:function(e){this.table.rowManager.moveRowActual(e.component,this.table.rowManager.rows[e.data.posFrom],!e.data.after),this.table.rowManager.redraw()}},N.redoers={cellEdit:function(e){e.component.setValueProcessData(e.data.newValue),e.component.cellRendered()},rowAdd:function(e){var t=this.table.rowManager.addRowActual(e.data.data,e.data.pos,e.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(e.component,t)},rowDelete:function(e){e.component.deleteActual()},rowMove:function(e){this.table.rowManager.moveRowActual(e.component,this.table.rowManager.rows[e.data.posTo],e.data.after),this.table.rowManager.redraw()}};class V extends t{constructor(e){super(e),this.fieldIndex=[],this.hasIndex=!1}initialize(){this.tableElementCheck()}tableElementCheck(){this.table.originalElement&&"TABLE"===this.table.originalElement.tagName&&this.parseTable()}parseTable(){var e=this.table.originalElement,t=this.table.options,i=(t.columns,e.getElementsByTagName("th")),s=e.getElementsByTagName("tbody")[0],o=[];this.hasIndex=!1,this.dispatchExternal("htmlImporting"),s=s?s.getElementsByTagName("tr"):[],this._extractOptions(e,t),i.length?this._extractHeaders(i,s):this._generateBlankHeaders(i,s);for(var n=0;n{n[e.toLowerCase()]=e})),s){var a,l=s[r];l&&"object"==typeof l&&l.name&&0===l.name.indexOf("tabulator-")&&(a=l.name.replace("tabulator-",""),void 0!==n[a]&&(t[n[a]]=this._attribValue(l.value)))}}_attribValue(e){return"true"===e||"false"!==e&&e}_findCol(e){return this.table.options.columns.find((t=>t.title===e))||!1}_extractHeaders(e,t){for(var i=0;i(console.error("Import Error:",e||"Unable to import data"),Promise.reject(e))))}lookupImporter(e){var t;return e||(e=this.table.options.importFormat),(t="string"==typeof e?W.importers[e]:e)||console.error("Import Error - Importer not found:",e),t}importFromFile(e,t){var i=this.lookupImporter(e);if(i)return this.pickFile(t).then(this.importData.bind(this,i)).then(this.structureData.bind(this)).then(this.setData.bind(this)).catch((e=>(console.error("Import Error:",e||"Unable to import file"),Promise.reject(e))))}pickFile(e){return new Promise(((t,i)=>{var s=document.createElement("input");s.type="file",s.accept=e,s.addEventListener("change",(e=>{var o=s.files[0],n=new FileReader;switch(this.table.options.importReader){case"buffer":n.readAsArrayBuffer(o);break;case"binary":n.readAsBinaryString(o);break;case"url":n.readAsDataURL(o);break;case"text":default:n.readAsText(o)}n.onload=e=>{t(n.result)},n.onerror=e=>{console.warn("File Load Error - Unable to read file"),i()}})),s.click()}))}importData(e,t){var i=e.call(this.table,t);return i instanceof Promise?i:i?Promise.resolve(i):Promise.reject()}structureData(e){return Array.isArray(e)&&e.length&&Array.isArray(e[0])?this.table.options.autoColumns?this.structureArrayToObject(e):this.structureArrayToColumns(e):e}structureArrayToObject(e){var t=e.shift();return e.map((e=>{var i={};return t.forEach(((t,s)=>{i[t]=e[s]})),i}))}structureArrayToColumns(e){var t=[],i=this.table.getColumns();return i[0]&&e[0][0]&&i[0].getDefinition().title===e[0][0]&&e.shift(),e.forEach((e=>{var s={};e.forEach(((e,t)=>{var o=i[t];o&&(s[o.getField()]=e)})),t.push(s)})),t}setData(e){return this.table.setData(e)}}W.moduleName="import",W.importers=I;class j extends t{constructor(e){super(e),this.eventMap={rowClick:"row-click",rowDblClick:"row-dblclick",rowContext:"row-contextmenu",rowMouseEnter:"row-mouseenter",rowMouseLeave:"row-mouseleave",rowMouseOver:"row-mouseover",rowMouseOut:"row-mouseout",rowMouseMove:"row-mousemove",rowTap:"row",rowDblTap:"row",rowTapHold:"row",cellClick:"cell-click",cellDblClick:"cell-dblclick",cellContext:"cell-contextmenu",cellMouseEnter:"cell-mouseenter",cellMouseLeave:"cell-mouseleave",cellMouseOver:"cell-mouseover",cellMouseOut:"cell-mouseout",cellMouseMove:"cell-mousemove",cellTap:"cell",cellDblTap:"cell",cellTapHold:"cell",headerClick:"column-click",headerDblClick:"column-dblclick",headerContext:"column-contextmenu",headerMouseEnter:"column-mouseenter",headerMouseLeave:"column-mouseleave",headerMouseOver:"column-mouseover",headerMouseOut:"column-mouseout",headerMouseMove:"column-mousemove",headerTap:"column",headerDblTap:"column",headerTapHold:"column",groupClick:"group-click",groupDblClick:"group-dblclick",groupContext:"group-contextmenu",groupMouseEnter:"group-mouseenter",groupMouseLeave:"group-mouseleave",groupMouseOver:"group-mouseover",groupMouseOut:"group-mouseout",groupMouseMove:"group-mousemove",groupTap:"group",groupDblTap:"group",groupTapHold:"group"},this.subscribers={},this.touchSubscribers={},this.columnSubscribers={},this.touchWatchers={row:{tap:null,tapDbl:null,tapHold:null},cell:{tap:null,tapDbl:null,tapHold:null},column:{tap:null,tapDbl:null,tapHold:null},group:{tap:null,tapDbl:null,tapHold:null}},this.registerColumnOption("headerClick"),this.registerColumnOption("headerDblClick"),this.registerColumnOption("headerContext"),this.registerColumnOption("headerMouseEnter"),this.registerColumnOption("headerMouseLeave"),this.registerColumnOption("headerMouseOver"),this.registerColumnOption("headerMouseOut"),this.registerColumnOption("headerMouseMove"),this.registerColumnOption("headerTap"),this.registerColumnOption("headerDblTap"),this.registerColumnOption("headerTapHold"),this.registerColumnOption("cellClick"),this.registerColumnOption("cellDblClick"),this.registerColumnOption("cellContext"),this.registerColumnOption("cellMouseEnter"),this.registerColumnOption("cellMouseLeave"),this.registerColumnOption("cellMouseOver"),this.registerColumnOption("cellMouseOut"),this.registerColumnOption("cellMouseMove"),this.registerColumnOption("cellTap"),this.registerColumnOption("cellDblTap"),this.registerColumnOption("cellTapHold")}initialize(){this.initializeExternalEvents(),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("cell-dblclick",this.cellContentsSelectionFixer.bind(this))}cellContentsSelectionFixer(e,t){if(!this.table.modExists("edit")||this.table.modules.edit.currentCell!==this){e.preventDefault();try{if(document.selection)(i=document.body.createTextRange()).moveToElementText(this.element),i.select();else if(window.getSelection){var i;(i=document.createRange()).selectNode(this.element),window.getSelection().removeAllRanges(),window.getSelection().addRange(i)}}catch(e){}}}initializeExternalEvents(){for(let e in this.eventMap)this.subscriptionChangeExternal(e,this.subscriptionChanged.bind(this,e))}subscriptionChanged(e,t){t?this.subscribers[e]||(this.eventMap[e].includes("-")?(this.subscribers[e]=this.handle.bind(this,e),this.subscribe(this.eventMap[e],this.subscribers[e])):this.subscribeTouchEvents(e)):this.eventMap[e].includes("-")?!this.subscribers[e]||this.columnSubscribers[e]||this.subscribedExternal(e)||(this.unsubscribe(this.eventMap[e],this.subscribers[e]),delete this.subscribers[e]):this.unsubscribeTouchEvents(e)}subscribeTouchEvents(e){var t=this.eventMap[e];this.touchSubscribers[t+"-touchstart"]||(this.touchSubscribers[t+"-touchstart"]=this.handleTouch.bind(this,t,"start"),this.touchSubscribers[t+"-touchend"]=this.handleTouch.bind(this,t,"end"),this.subscribe(t+"-touchstart",this.touchSubscribers[t+"-touchstart"]),this.subscribe(t+"-touchend",this.touchSubscribers[t+"-touchend"])),this.subscribers[e]=!0}unsubscribeTouchEvents(e){var t=!0,i=this.eventMap[e];if(this.subscribers[e]&&!this.subscribedExternal(e)){delete this.subscribers[e];for(let e in this.eventMap)this.eventMap[e]===i&&this.subscribers[e]&&(t=!1);t&&(this.unsubscribe(i+"-touchstart",this.touchSubscribers[i+"-touchstart"]),this.unsubscribe(i+"-touchend",this.touchSubscribers[i+"-touchend"]),delete this.touchSubscribers[i+"-touchstart"],delete this.touchSubscribers[i+"-touchend"])}}initializeColumn(e){var t=e.definition;for(let i in this.eventMap)t[i]&&(this.subscriptionChanged(i,!0),this.columnSubscribers[i]||(this.columnSubscribers[i]=[]),this.columnSubscribers[i].push(e))}handle(e,t,i){this.dispatchEvent(e,t,i)}handleTouch(e,t,i,s){var o=this.touchWatchers[e];switch("column"===e&&(e="header"),t){case"start":o.tap=!0,clearTimeout(o.tapHold),o.tapHold=setTimeout((()=>{clearTimeout(o.tapHold),o.tapHold=null,o.tap=null,clearTimeout(o.tapDbl),o.tapDbl=null,this.dispatchEvent(e+"TapHold",i,s)}),1e3);break;case"end":o.tap&&(o.tap=null,this.dispatchEvent(e+"Tap",i,s)),o.tapDbl?(clearTimeout(o.tapDbl),o.tapDbl=null,this.dispatchEvent(e+"DblTap",i,s)):o.tapDbl=setTimeout((()=>{clearTimeout(o.tapDbl),o.tapDbl=null}),300),clearTimeout(o.tapHold),o.tapHold=null}}dispatchEvent(e,t,i){var s,o=i.getComponent();this.columnSubscribers[e]&&(i instanceof m?s=i.column.definition[e]:i instanceof b&&(s=i.definition[e]),s&&s(t,o)),this.dispatchExternal(e,t,o)}}j.moduleName="interaction";class G extends t{constructor(e){super(e),this.watchKeys=null,this.pressedKeys=null,this.keyupBinding=!1,this.keydownBinding=!1,this.registerTableOption("keybindings",{}),this.registerTableOption("tabEndNewRow",!1)}initialize(){var e=this.table.options.keybindings,t={};this.watchKeys={},this.pressedKeys=[],!1!==e&&(Object.assign(t,G.bindings),Object.assign(t,e),this.mapBindings(t),this.bindEvents()),this.subscribe("table-destroy",this.clearBindings.bind(this))}mapBindings(e){for(let t in e)G.actions[t]?e[t]&&("object"!=typeof e[t]&&(e[t]=[e[t]]),e[t].forEach((e=>{(Array.isArray(e)?e:[e]).forEach((e=>{this.mapBinding(t,e)}))}))):console.warn("Key Binding Error - no such action:",t)}mapBinding(e,t){var i={action:G.actions[e],keys:[],ctrl:!1,shift:!1,meta:!1};t.toString().toLowerCase().split(" ").join("").split("+").forEach((e=>{switch(e){case"ctrl":i.ctrl=!0;break;case"shift":i.shift=!0;break;case"meta":i.meta=!0;break;default:e=isNaN(e)?e.toUpperCase().charCodeAt(0):parseInt(e),i.keys.push(e),this.watchKeys[e]||(this.watchKeys[e]=[]),this.watchKeys[e].push(i)}}))}bindEvents(){var e=this;this.keyupBinding=function(t){var i=t.keyCode,s=e.watchKeys[i];s&&(e.pressedKeys.push(i),s.forEach((function(i){e.checkBinding(t,i)})))},this.keydownBinding=function(t){var i=t.keyCode;if(e.watchKeys[i]){var s=e.pressedKeys.indexOf(i);s>-1&&e.pressedKeys.splice(s,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)}clearBindings(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)}checkBinding(e,t){var i=!0;return e.ctrlKey==t.ctrl&&e.shiftKey==t.shift&&e.metaKey==t.meta&&(t.keys.forEach((e=>{-1==this.pressedKeys.indexOf(e)&&(i=!1)})),i&&t.action.call(this,e),!0)}}G.moduleName="keybindings",G.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:["ctrl + 90","meta + 90"],redo:["ctrl + 89","meta + 89"],copyToClipboard:["ctrl + 67","meta + 89"]},G.actions={keyBlock:function(e){e.stopPropagation(),e.preventDefault()},scrollPageUp:function(e){var t=this.table.rowManager,i=t.scrollTop-t.element.clientHeight;t.element.scrollHeight;e.preventDefault(),t.displayRowsCount&&(i>=0?t.element.scrollTop=i:t.scrollToRow(t.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(e){var t=this.table.rowManager,i=t.scrollTop+t.element.clientHeight,s=t.element.scrollHeight;e.preventDefault(),t.displayRowsCount&&(i<=s?t.element.scrollTop=i:t.scrollToRow(t.getDisplayRows()[t.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(e){var t=this.table.rowManager;e.preventDefault(),t.displayRowsCount&&t.scrollToRow(t.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(e){var t=this.table.rowManager;e.preventDefault(),t.displayRowsCount&&t.scrollToRow(t.getDisplayRows()[t.displayRowsCount-1]),this.table.element.focus()},navPrev:function(e){this.dispatch("keybinding-nav-prev",e)},navNext:function(e){this.dispatch("keybinding-nav-next",e)},navLeft:function(e){this.dispatch("keybinding-nav-left",e)},navRight:function(e){this.dispatch("keybinding-nav-right",e)},navUp:function(e){this.dispatch("keybinding-nav-up",e)},navDown:function(e){this.dispatch("keybinding-nav-down",e)},undo:function(e){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(e.preventDefault(),this.table.modules.history.undo()))},redo:function(e){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(e.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(e){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}};class U extends t{constructor(e){super(e),this.menuContainer=null,this.menuElements=[],this.blurEvent=this.hideMenu.bind(this),this.escEvent=this.escMenu.bind(this),this.nestedMenuBlock=!1,this.positionReversedX=!1,this.currentComponent=null,this.columnSubscribers={},this.registerTableOption("rowContextMenu",!1),this.registerTableOption("rowClickMenu",!1),this.registerTableOption("groupContextMenu",!1),this.registerTableOption("groupClickMenu",!1),this.registerTableOption("menuContainer",!1),this.registerColumnOption("headerContextMenu"),this.registerColumnOption("headerClickMenu"),this.registerColumnOption("headerMenu"),this.registerColumnOption("contextMenu"),this.registerColumnOption("clickMenu")}initialize(){this.lookupMenuContainer(),this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}lookupMenuContainer(){this.menuContainer=this.table.options.menuContainer,"string"==typeof this.menuContainer?(this.menuContainer=document.querySelector(this.menuContainer),this.menuContainer||console.warn("Menu Error - no container element found matching selector:",this.table.options.menuContainer,"(defaulting to document body)")):!0===this.menuContainer&&(this.menuContainer=this.table.element),this.menuContainer&&!this.checkMenuContainerIsParent(this.menuContainer)&&(this.menuContainer=!1,console.warn("Menu Error - container element does not contain this table:",this.table.options.menuContainer,"(defaulting to document body)")),this.menuContainer||(this.menuContainer=document.body)}checkMenuContainerIsParent(e,t=this.table.element){return e===t||!!t.parentNode&&this.checkMenuContainerIsParent(e,t.parentNode)}initializeRowWatchers(){this.table.options.rowContextMenu&&(this.subscribe("row-contextmenu",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu)),this.table.on("rowTapHold",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu))),this.table.options.rowClickMenu&&this.subscribe("row-click",this.loadMenuEvent.bind(this,this.table.options.rowClickMenu))}initializeGroupWatchers(){this.table.options.groupContextMenu&&(this.subscribe("group-contextmenu",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu)),this.table.on("groupTapHold",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu))),this.table.options.groupClickMenu&&this.subscribe("group-click",this.loadMenuEvent.bind(this,this.table.options.groupClickMenu))}initializeColumn(e){var t=e.definition;t.headerContextMenu&&!this.columnSubscribers.headerContextMenu&&(this.columnSubscribers.headerContextMenu=this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextMenu),this.table.on("headerTapHold",this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"))),t.headerClickMenu&&!this.columnSubscribers.headerClickMenu&&(this.columnSubscribers.headerClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerClickMenu"),this.subscribe("column-click",this.columnSubscribers.headerClickMenu)),t.headerMenu&&this.initializeColumnHeaderMenu(e),t.contextMenu&&!this.columnSubscribers.contextMenu&&(this.columnSubscribers.contextMenu=this.loadMenuTableCellEvent.bind(this,"contextMenu"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextMenu),this.table.on("cellTapHold",this.loadMenuTableCellEvent.bind(this,"contextMenu"))),t.clickMenu&&!this.columnSubscribers.clickMenu&&(this.columnSubscribers.clickMenu=this.loadMenuTableCellEvent.bind(this,"clickMenu"),this.subscribe("cell-click",this.columnSubscribers.clickMenu))}initializeColumnHeaderMenu(e){var t;(t=document.createElement("span")).classList.add("tabulator-header-menu-button"),t.innerHTML="⋮",t.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault(),this.loadMenuEvent(e.definition.headerMenu,t,e)})),e.titleElement.insertBefore(t,e.titleElement.firstChild)}loadMenuTableCellEvent(e,t,i){i._cell&&(i=i._cell),i.column.definition[e]&&this.loadMenuEvent(i.column.definition[e],t,i)}loadMenuTableColumnEvent(e,t,i){i._column&&(i=i._column),i.definition[e]&&this.loadMenuEvent(i.definition[e],t,i)}loadMenuEvent(e,t,i){i._group?i=i._group:i._row&&(i=i._row),e="function"==typeof e?e.call(this.table,i.getComponent(),t):e,this.loadMenu(t,i,e)}loadMenu(e,t,i,s){var o=!(e instanceof MouseEvent),n=document.createElement("div");if(n.classList.add("tabulator-menu"),o||e.preventDefault(),i&&i.length){if(!s){if(this.nestedMenuBlock){if(this.isOpen())return}else this.nestedMenuBlock=setTimeout((()=>{this.nestedMenuBlock=!1}),100);this.hideMenu(),this.menuElements=[]}i.forEach((e=>{var i=document.createElement("div"),s=e.label,o=e.disabled;e.separator?i.classList.add("tabulator-menu-separator"):(i.classList.add("tabulator-menu-item"),"function"==typeof s&&(s=s.call(this.table,t.getComponent())),s instanceof Node?i.appendChild(s):i.innerHTML=s,"function"==typeof o&&(o=o.call(this.table,t.getComponent())),o?(i.classList.add("tabulator-menu-item-disabled"),i.addEventListener("click",(e=>{e.stopPropagation()}))):e.menu&&e.menu.length?i.addEventListener("click",(s=>{s.stopPropagation(),this.hideOldSubMenus(n),this.loadMenu(s,t,e.menu,i)})):e.action&&i.addEventListener("click",(i=>{e.action(i,t.getComponent())})),e.menu&&e.menu.length&&i.classList.add("tabulator-menu-item-submenu")),n.appendChild(i)})),n.addEventListener("click",(e=>{this.hideMenu()})),this.menuElements.push(n),this.positionMenu(n,s,o,e),this.currentComponent=t,this.dispatchExternal("menuOpened",t.getComponent())}}hideOldSubMenus(e){var t=this.menuElements.indexOf(e);if(t>-1)for(let e=this.menuElements.length-1;e>t;e--){var i=this.menuElements[e];i.parentNode&&i.parentNode.removeChild(i),this.menuElements.pop()}}positionMenu(e,t,i,o){var n,r,a;t?(n=(a=s.elOffset(t)).left+t.offsetWidth,r=a.top-1):(n=i?o.touches[0].pageX:o.pageX,r=i?o.touches[0].pageY:o.pageY,this.menuContainer!==document.body&&(n-=(a=s.elOffset(this.menuContainer)).left,r-=a.top),this.positionReversedX=!1),e.style.top=r+"px",e.style.left=n+"px",setTimeout((()=>{this.table.rowManager.element.addEventListener("scroll",this.blurEvent),document.body.addEventListener("click",this.blurEvent),document.body.addEventListener("contextmenu",this.blurEvent),window.addEventListener("resize",this.blurEvent),document.body.addEventListener("keydown",this.escEvent)}),100),this.menuContainer.appendChild(e),(n+e.offsetWidth>=this.menuContainer.offsetWidth||this.positionReversedX)&&(e.style.left="",e.style.right=t?this.menuContainer.offsetWidth-a.left+"px":this.menuContainer.offsetWidth-n+"px",this.positionReversedX=!0),r+e.offsetHeight>this.menuContainer.offsetHeight&&(e.style.top=t?parseInt(e.style.top)-e.offsetHeight+t.offsetHeight+1+"px":parseInt(e.style.top)-e.offsetHeight+"px")}isOpen(){return!!this.menuElements.length}escMenu(e){27==e.keyCode&&this.hideMenu()}hideMenu(){this.menuElements.forEach((e=>{e.parentNode&&e.parentNode.removeChild(e)})),document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.currentComponent&&(this.dispatchExternal("menuClosed",this.currentComponent.getComponent()),this.currentComponent=null)}}U.moduleName="menu";class X extends t{constructor(e){super(e),this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.registerTableOption("movableColumns",!1)}createPlaceholderElement(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.classList.add("tabulator-col-placeholder"),e}initialize(){this.table.options.movableColumns&&this.subscribe("column-init",this.initializeColumn.bind(this))}initializeColumn(e){var t,i=this,o={};e.modules.frozen||(t=e.getElement(),o.mousemove=function(o){e.parent===i.moving.parent&&((i.touchMove?o.touches[0].pageX:o.pageX)-s.elOffset(t).left+i.table.columnManager.element.scrollLeft>e.getWidth()/2?i.toCol===e&&i.toColAfter||(t.parentNode.insertBefore(i.placeholderElement,t.nextSibling),i.moveColumn(e,!0)):(i.toCol!==e||i.toColAfter)&&(t.parentNode.insertBefore(i.placeholderElement,t),i.moveColumn(e,!1)))}.bind(i),t.addEventListener("mousedown",(function(t){i.touchMove=!1,1===t.which&&(i.checkTimeout=setTimeout((function(){i.startMove(t,e)}),i.checkPeriod))})),t.addEventListener("mouseup",(function(e){1===e.which&&i.checkTimeout&&clearTimeout(i.checkTimeout)})),i.bindTouchEvents(e)),e.modules.moveColumn=o}bindTouchEvents(e){var t,i,s,o,n,r,a=e.getElement(),l=!1;a.addEventListener("touchstart",(a=>{this.checkTimeout=setTimeout((()=>{this.touchMove=!0,t=e.nextColumn(),s=t?t.getWidth()/2:0,i=e.prevColumn(),o=i?i.getWidth()/2:0,n=0,r=0,l=!1,this.startMove(a,e)}),this.checkPeriod)}),{passive:!0}),a.addEventListener("touchmove",(a=>{var h,d;this.moving&&(this.moveHover(a),l||(l=a.touches[0].pageX),(h=a.touches[0].pageX-l)>0?t&&h-n>s&&(d=t)!==e&&(l=a.touches[0].pageX,d.getElement().parentNode.insertBefore(this.placeholderElement,d.getElement().nextSibling),this.moveColumn(d,!0)):i&&-h-r>o&&(d=i)!==e&&(l=a.touches[0].pageX,d.getElement().parentNode.insertBefore(this.placeholderElement,d.getElement()),this.moveColumn(d,!1)),d&&(t=d.nextColumn(),n=s,s=t?t.getWidth()/2:0,i=d.prevColumn(),r=o,o=i?i.getWidth()/2:0))}),{passive:!0}),a.addEventListener("touchend",(e=>{this.checkTimeout&&clearTimeout(this.checkTimeout),this.moving&&this.endMove(e)}))}startMove(e,t){var i=t.getElement(),o=this.table.columnManager.getElement(),n=this.table.columnManager.getHeadersElement();this.moving=t,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-s.elOffset(i).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.table.columnManager.getElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom=o.clientHeight-n.offsetHeight+"px",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(e)}_bindMouseMove(){this.table.columnManager.columnsByIndex.forEach((function(e){e.modules.moveColumn.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveColumn.mousemove)}))}_unbindMouseMove(){this.table.columnManager.columnsByIndex.forEach((function(e){e.modules.moveColumn.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveColumn.mousemove)}))}moveColumn(e,t){var i=this.moving.getCells();this.toCol=e,this.toColAfter=t,t?e.getCells().forEach((function(e,t){var s=e.getElement(!0);s.parentNode&&i[t]&&s.parentNode.insertBefore(i[t].getElement(),s.nextSibling)})):e.getCells().forEach((function(e,t){var s=e.getElement(!0);s.parentNode&&i[t]&&s.parentNode.insertBefore(i[t].getElement(),s)}))}endMove(e){(1===e.which||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))}moveHover(e){var t,i=this.table.columnManager.getElement(),o=i.scrollLeft,n=(this.touchMove?e.touches[0].pageX:e.pageX)-s.elOffset(i).left+o;this.hoverElement.style.left=n-this.startX+"px",n-o{t=Math.max(0,o-5),this.table.rowManager.getElement().scrollLeft=t,this.autoScrollTimeout=!1}),1))),o+i.clientWidth-n{t=Math.min(i.clientWidth,o+5),this.table.rowManager.getElement().scrollLeft=t,this.autoScrollTimeout=!1}),1)))}}X.moduleName="moveColumn";class q extends t{constructor(e){super(e),this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=150,this.moving=!1,this.toRow=!1,this.toRowAfter=!1,this.hasHandle=!1,this.startY=0,this.startX=0,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.tableRowDropEvent=!1,this.touchMove=!1,this.connection=!1,this.connectionSelectorsTables=!1,this.connectionSelectorsElements=!1,this.connectionElements=[],this.connections=[],this.connectedTable=!1,this.connectedRow=!1,this.registerTableOption("movableRows",!1),this.registerTableOption("movableRowsConnectedTables",!1),this.registerTableOption("movableRowsConnectedElements",!1),this.registerTableOption("movableRowsSender",!1),this.registerTableOption("movableRowsReceiver","insert"),this.registerColumnOption("rowHandle")}createPlaceholderElement(){var e=document.createElement("div");return e.classList.add("tabulator-row"),e.classList.add("tabulator-row-placeholder"),e}initialize(){this.table.options.movableRows&&(this.connectionSelectorsTables=this.table.options.movableRowsConnectedTables,this.connectionSelectorsElements=this.table.options.movableRowsConnectedElements,this.connection=this.connectionSelectorsTables||this.connectionSelectorsElements,this.subscribe("cell-init",this.initializeCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("row-init",this.initializeRow.bind(this)))}initializeGroupHeader(e){var t=this,i={};i.mouseup=function(e){t.tableRowDrop(e,row)}.bind(t),i.mousemove=function(i){var o;i.pageY-s.elOffset(e.element).top+t.table.rowManager.element.scrollTop>e.getHeight()/2?t.toRow===e&&t.toRowAfter||((o=e.getElement()).parentNode.insertBefore(t.placeholderElement,o.nextSibling),t.moveRow(e,!0)):(t.toRow!==e||t.toRowAfter)&&(o=e.getElement()).previousSibling&&(o.parentNode.insertBefore(t.placeholderElement,o),t.moveRow(e,!1))}.bind(t),e.modules.moveRow=i}initializeRow(e){var t,i=this,o={};o.mouseup=function(t){i.tableRowDrop(t,e)}.bind(i),o.mousemove=function(t){var o=e.getElement();t.pageY-s.elOffset(o).top+i.table.rowManager.element.scrollTop>e.getHeight()/2?i.toRow===e&&i.toRowAfter||(o.parentNode.insertBefore(i.placeholderElement,o.nextSibling),i.moveRow(e,!0)):(i.toRow!==e||i.toRowAfter)&&(o.parentNode.insertBefore(i.placeholderElement,o),i.moveRow(e,!1))}.bind(i),this.hasHandle||((t=e.getElement()).addEventListener("mousedown",(function(t){1===t.which&&(i.checkTimeout=setTimeout((function(){i.startMove(t,e)}),i.checkPeriod))})),t.addEventListener("mouseup",(function(e){1===e.which&&i.checkTimeout&&clearTimeout(i.checkTimeout)})),this.bindTouchEvents(e,e.getElement())),e.modules.moveRow=o}initializeColumn(e){e.definition.rowHandle&&!1!==this.table.options.movableRows&&(this.hasHandle=!0)}initializeCell(e){if(e.column.definition.rowHandle&&!1!==this.table.options.movableRows){var t=this,i=e.getElement(!0);i.addEventListener("mousedown",(function(i){1===i.which&&(t.checkTimeout=setTimeout((function(){t.startMove(i,e.row)}),t.checkPeriod))})),i.addEventListener("mouseup",(function(e){1===e.which&&t.checkTimeout&&clearTimeout(t.checkTimeout)})),this.bindTouchEvents(e.row,i)}}bindTouchEvents(e,t){var i,s,o,n,r,a,l=!1;t.addEventListener("touchstart",(t=>{this.checkTimeout=setTimeout((()=>{this.touchMove=!0,i=e.nextRow(),o=i?i.getHeight()/2:0,s=e.prevRow(),n=s?s.getHeight()/2:0,r=0,a=0,l=!1,this.startMove(t,e)}),this.checkPeriod)}),{passive:!0}),this.moving,this.toRow,this.toRowAfter,t.addEventListener("touchmove",(t=>{var h,d;this.moving&&(t.preventDefault(),this.moveHover(t),l||(l=t.touches[0].pageY),(h=t.touches[0].pageY-l)>0?i&&h-r>o&&(d=i)!==e&&(l=t.touches[0].pageY,d.getElement().parentNode.insertBefore(this.placeholderElement,d.getElement().nextSibling),this.moveRow(d,!0)):s&&-h-a>n&&(d=s)!==e&&(l=t.touches[0].pageY,d.getElement().parentNode.insertBefore(this.placeholderElement,d.getElement()),this.moveRow(d,!1)),d&&(i=d.nextRow(),r=o,o=i?i.getHeight()/2:0,s=d.prevRow(),a=n,n=s?s.getHeight()/2:0))})),t.addEventListener("touchend",(e=>{this.checkTimeout&&clearTimeout(this.checkTimeout),this.moving&&(this.endMove(e),this.touchMove=!1)}))}_bindMouseMove(){this.table.rowManager.getDisplayRows().forEach((e=>{("row"===e.type||"group"===e.type)&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveRow.mousemove)}))}_unbindMouseMove(){this.table.rowManager.getDisplayRows().forEach((e=>{("row"===e.type||"group"===e.type)&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveRow.mousemove)}))}startMove(e,t){var i=t.getElement();this.setStartPosition(e,t),this.moving=t,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(t)):(i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i)),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.dispatchExternal("rowMoving",t.getComponent()),this.moveHover(e)}setStartPosition(e,t){var i,s,o=this.touchMove?e.touches[0].pageX:e.pageX,n=this.touchMove?e.touches[0].pageY:e.pageY;i=t.getElement(),this.connection?(s=i.getBoundingClientRect(),this.startX=s.left-o+window.pageXOffset,this.startY=s.top-n+window.pageYOffset):this.startY=n-i.getBoundingClientRect().top}endMove(e){e&&1!==e.which&&!this.touchMove||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow?this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter):this.dispatchExternal("rowMoveCancelled",this.moving.getComponent()),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))}moveRow(e,t){this.toRow=e,this.toRowAfter=t}moveHover(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)}moveHoverTable(e){var t=this.table.rowManager.getElement(),i=t.scrollTop,s=(this.touchMove?e.touches[0].pageY:e.pageY)-t.getBoundingClientRect().top+i;this.hoverElement.style.top=s-this.startY+"px"}moveHoverConnections(e){this.hoverElement.style.left=this.startX+(this.touchMove?e.touches[0].pageX:e.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?e.touches[0].pageY:e.pageY)+"px"}elementRowDrop(e,t,i){this.dispatchExternal("movableRowsElementDrop",e,t,!!i&&i.getComponent())}connectToTables(e){var t;this.connectionSelectorsTables&&(t=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStart",t),this.commsSend(this.connectionSelectorsTables,"moveRow","connect",{row:e})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach((e=>{"string"==typeof e?this.connectionElements=this.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(e))):this.connectionElements.push(e)})),this.connectionElements.forEach((e=>{var t=t=>{this.elementRowDrop(t,e,this.moving)};e.addEventListener("mouseup",t),e.tabulatorElementDropEvent=t,e.classList.add("tabulator-movingrow-receiving")})))}disconnectFromTables(){var e;this.connectionSelectorsTables&&(e=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStop",e),this.commsSend(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach((e=>{e.classList.remove("tabulator-movingrow-receiving"),e.removeEventListener("mouseup",e.tabulatorElementDropEvent),delete e.tabulatorElementDropEvent}))}connect(e,t){return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=e,this.connectedRow=t,this.table.element.classList.add("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach((e=>{"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().addEventListener("mouseup",e.modules.moveRow.mouseup)})),this.tableRowDropEvent=this.tableRowDrop.bind(this),this.table.element.addEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStart",t,e),!0)}disconnect(e){e===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach((e=>{"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().removeEventListener("mouseup",e.modules.moveRow.mouseup)})),this.table.element.removeEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStop",e)):console.warn("Move Row Error - trying to disconnect from non connected table")}dropComplete(e,t,i){var s=!1;if(i){switch(typeof this.table.options.movableRowsSender){case"string":s=this.senders[this.table.options.movableRowsSender];break;case"function":s=this.table.options.movableRowsSender}s?s.call(this,this.moving.getComponent(),t?t.getComponent():void 0,e):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.dispatchExternal("movableRowsSent",this.moving.getComponent(),t?t.getComponent():void 0,e)}else this.dispatchExternal("movableRowsSentFailed",this.moving.getComponent(),t?t.getComponent():void 0,e);this.endMove()}tableRowDrop(e,t){var i=!1,s=!1;switch(e.stopImmediatePropagation(),typeof this.table.options.movableRowsReceiver){case"string":i=this.receivers[this.table.options.movableRowsReceiver];break;case"function":i=this.table.options.movableRowsReceiver}i?s=i.call(this,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),s?this.dispatchExternal("movableRowsReceived",this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):this.dispatchExternal("movableRowsReceivedFailed",this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable),this.commsSend(this.connectedTable,"moveRow","dropcomplete",{row:t,success:s})}commsReceived(e,t,i){switch(t){case"connect":return this.connect(e,i.row);case"disconnect":return this.disconnect(e);case"dropcomplete":return this.dropComplete(e,i.row,i.success)}}}q.prototype.receivers={insert:function(e,t,i){return this.table.addRow(e.getData(),void 0,t),!0},add:function(e,t,i){return this.table.addRow(e.getData()),!0},update:function(e,t,i){return!!t&&(t.update(e.getData()),!0)},replace:function(e,t,i){return!!t&&(this.table.addRow(e.getData(),void 0,t),t.delete(),!0)}},q.prototype.senders={delete:function(e,t,i){e.delete()}},q.moduleName="moveRow";class K extends t{constructor(e){super(e),this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0,this.registerColumnOption("mutator"),this.registerColumnOption("mutatorParams"),this.registerColumnOption("mutatorData"),this.registerColumnOption("mutatorDataParams"),this.registerColumnOption("mutatorEdit"),this.registerColumnOption("mutatorEditParams"),this.registerColumnOption("mutatorClipboard"),this.registerColumnOption("mutatorClipboardParams")}initialize(){this.subscribe("cell-value-changing",this.transformCell.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-init-before",this.rowDataChanged.bind(this)),this.subscribe("row-data-changing",this.rowDataChanged.bind(this))}rowDataChanged(e,t,i){return this.transformRow(t,"data",i)}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach((s=>{var o,n="mutator"+(s.charAt(0).toUpperCase()+s.slice(1));e.definition[n]&&(o=this.lookupMutator(e.definition[n]))&&(t=!0,i[n]={mutator:o,params:e.definition[n+"Params"]||{}})})),t&&(e.modules.mutate=i)}lookupMutator(e){var t=!1;switch(typeof e){case"string":K.mutators[e]?t=K.mutators[e]:console.warn("Mutator Error - No such mutator found, ignoring: ",e);break;case"function":t=e}return t}transformRow(e,t,i){var s,o="mutator"+(t.charAt(0).toUpperCase()+t.slice(1));return this.enabled&&this.table.columnManager.traverse((n=>{var r,a,l;n.modules.mutate&&(r=n.modules.mutate[o]||n.modules.mutate.mutator||!1)&&(s=n.getFieldValue(void 0!==i?i:e),"data"!=t&&void 0===s||(l=n.getComponent(),a="function"==typeof r.params?r.params(s,e,t,l):r.params,n.setFieldValue(e,r.mutator(s,e,t,a,l))))})),e}transformCell(e,t){if(e.column.modules.mutate){var i=e.column.modules.mutate.mutatorEdit||e.column.modules.mutate.mutator||!1,s={};if(i)return s=Object.assign(s,e.row.getData()),e.column.setFieldValue(s,t),i.mutator(t,s,"edit",i.params,e.getComponent())}return t}enable(){this.enabled=!0}disable(){this.enabled=!1}}K.moduleName="mutator",K.mutators={};var Y={rows:function(e,t,i,s,o){var n=document.createElement("span"),r=document.createElement("span"),a=document.createElement("span"),l=document.createElement("span"),h=document.createElement("span"),d=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",(e=>{r.innerHTML=e})),this.table.modules.localize.langBind("pagination|counter|of",(e=>{l.innerHTML=e})),this.table.modules.localize.langBind("pagination|counter|rows",(e=>{d.innerHTML=e})),s?(a.innerHTML=" "+t+"-"+Math.min(t+e-1,s)+" ",h.innerHTML=" "+s+" ",n.appendChild(r),n.appendChild(a),n.appendChild(l),n.appendChild(h),n.appendChild(d)):(a.innerHTML=" 0 ",n.appendChild(r),n.appendChild(a),n.appendChild(d)),n},pages:function(e,t,i,s,o){var n=document.createElement("span"),r=document.createElement("span"),a=document.createElement("span"),l=document.createElement("span"),h=document.createElement("span"),d=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",(e=>{r.innerHTML=e})),a.innerHTML=" "+i+" ",this.table.modules.localize.langBind("pagination|counter|of",(e=>{l.innerHTML=e})),h.innerHTML=" "+o+" ",this.table.modules.localize.langBind("pagination|counter|pages",(e=>{d.innerHTML=e})),n.appendChild(r),n.appendChild(a),n.appendChild(l),n.appendChild(h),n.appendChild(d),n}};class J extends t{constructor(e){super(e),this.mode="local",this.progressiveLoad=!1,this.element=null,this.pageCounterElement=null,this.pageCounter=null,this.size=0,this.page=1,this.count=5,this.max=1,this.remoteRowCountEstimate=null,this.displayIndex=0,this.initialLoad=!0,this.dataChanging=!1,this.pageSizes=[],this.registerTableOption("pagination",!1),this.registerTableOption("paginationMode","local"),this.registerTableOption("paginationSize",!1),this.registerTableOption("paginationInitialPage",1),this.registerTableOption("paginationCounter",!1),this.registerTableOption("paginationCounterElement",!1),this.registerTableOption("paginationButtonCount",5),this.registerTableOption("paginationSizeSelector",!1),this.registerTableOption("paginationElement",!1),this.registerTableOption("paginationAddRow","page"),this.registerTableOption("progressiveLoad",!1),this.registerTableOption("progressiveLoadDelay",0),this.registerTableOption("progressiveLoadScrollMargin",0),this.registerTableFunction("setMaxPage",this.setMaxPage.bind(this)),this.registerTableFunction("setPage",this.setPage.bind(this)),this.registerTableFunction("setPageToRow",this.userSetPageToRow.bind(this)),this.registerTableFunction("setPageSize",this.userSetPageSize.bind(this)),this.registerTableFunction("getPageSize",this.getPageSize.bind(this)),this.registerTableFunction("previousPage",this.previousPage.bind(this)),this.registerTableFunction("nextPage",this.nextPage.bind(this)),this.registerTableFunction("getPage",this.getPage.bind(this)),this.registerTableFunction("getPageMax",this.getPageMax.bind(this)),this.registerComponentFunction("row","pageTo",this.setPageToRow.bind(this))}initialize(){this.table.options.pagination?(this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),"page"==this.table.options.paginationAddRow&&this.subscribe("row-adding-position",this.rowAddingPosition.bind(this)),"remote"===this.table.options.paginationMode&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this))),this.table.options.progressiveLoad&&console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time"),this.registerDisplayHandler(this.restOnRenderBefore.bind(this),40),this.registerDisplayHandler(this.getRows.bind(this),50),this.createElements(),this.initializePageCounter(),this.initializePaginator()):this.table.options.progressiveLoad&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.initializeProgressive(this.table.options.progressiveLoad),"scroll"===this.table.options.progressiveLoad&&this.subscribe("scroll-vertical",this.scrollVertical.bind(this)))}rowAddingPosition(e,t){var i,s=this.table.rowManager,o=s.getDisplayRows();return t?o.length?i=o[0]:s.activeRows.length&&(i=s.activeRows[s.activeRows.length-1],t=!1):o.length&&(i=o[o.length-1],t=!(o.length{}))}restOnRenderBefore(e,t){return t||"local"===this.mode&&this.reset(),e}rowsUpdated(){this.refreshData(!0,"all")}createElements(){var e;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),(e=document.createElement("button")).classList.add("tabulator-page"),e.setAttribute("type","button"),e.setAttribute("role","button"),e.setAttribute("aria-label",""),e.setAttribute("title",""),this.firstBut=e.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=e.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=e.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=e.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))}generatePageSizeSelectList(){var e=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))e=this.table.options.paginationSizeSelector,this.pageSizes=e,-1==this.pageSizes.indexOf(this.size)&&e.unshift(this.size);else if(-1==this.pageSizes.indexOf(this.size)){e=[];for(let t=1;t<5;t++)e.push(this.size*t);this.pageSizes=e}else e=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);e.forEach((e=>{var t=document.createElement("option");t.value=e,!0===e?this.langBind("pagination|all",(function(e){t.innerHTML=e})):t.innerHTML=e,this.pageSizeSelect.appendChild(t)})),this.pageSizeSelect.value=this.size}}initializePageCounter(){var e=this.table.options.paginationCounter,t=null;e&&((t="function"==typeof e?e:J.pageCounters[e])?(this.pageCounter=t,this.pageCounterElement=document.createElement("span"),this.pageCounterElement.classList.add("tabulator-page-counter")):console.warn("Pagination Error - No such page counter found: ",e))}initializePaginator(e){var t,i;e||(this.langBind("pagination|first",(e=>{this.firstBut.innerHTML=e})),this.langBind("pagination|first_title",(e=>{this.firstBut.setAttribute("aria-label",e),this.firstBut.setAttribute("title",e)})),this.langBind("pagination|prev",(e=>{this.prevBut.innerHTML=e})),this.langBind("pagination|prev_title",(e=>{this.prevBut.setAttribute("aria-label",e),this.prevBut.setAttribute("title",e)})),this.langBind("pagination|next",(e=>{this.nextBut.innerHTML=e})),this.langBind("pagination|next_title",(e=>{this.nextBut.setAttribute("aria-label",e),this.nextBut.setAttribute("title",e)})),this.langBind("pagination|last",(e=>{this.lastBut.innerHTML=e})),this.langBind("pagination|last_title",(e=>{this.lastBut.setAttribute("aria-label",e),this.lastBut.setAttribute("title",e)})),this.firstBut.addEventListener("click",(()=>{this.setPage(1)})),this.prevBut.addEventListener("click",(()=>{this.previousPage()})),this.nextBut.addEventListener("click",(()=>{this.nextPage()})),this.lastBut.addEventListener("click",(()=>{this.setPage(this.max)})),this.table.options.paginationElement&&(this.element=this.table.options.paginationElement),this.pageSizeSelect&&(t=document.createElement("label"),this.langBind("pagination|page_size",(e=>{this.pageSizeSelect.setAttribute("aria-label",e),this.pageSizeSelect.setAttribute("title",e),t.innerHTML=e})),this.element.appendChild(t),this.element.appendChild(this.pageSizeSelect),this.pageSizeSelect.addEventListener("change",(e=>{this.setPageSize("true"==this.pageSizeSelect.value||this.pageSizeSelect.value),this.setPage(1)}))),this.element.appendChild(this.firstBut),this.element.appendChild(this.prevBut),this.element.appendChild(this.pagesElement),this.element.appendChild(this.nextBut),this.element.appendChild(this.lastBut),this.table.options.paginationElement||e||(this.table.options.paginationCounter&&(this.table.options.paginationCounterElement?this.table.options.paginationCounterElement instanceof HTMLElement?this.table.options.paginationCounterElement.appendChild(this.pageCounterElement):"string"==typeof this.table.options.paginationCounterElement&&((i=document.querySelector(this.table.options.paginationCounterElement))?i.appendChild(this.pageCounterElement):console.warn("Pagination Error - Unable to find element matching paginationCounterElement selector:",this.table.options.paginationCounterElement)):this.table.footerManager.append(this.pageCounterElement)),this.table.footerManager.append(this.element,this)),this.page=this.table.options.paginationInitialPage,this.count=this.table.options.paginationButtonCount),this.mode=this.table.options.paginationMode}initializeProgressive(e){this.initializePaginator(!0),this.mode="progressive_"+e,this.progressiveLoad=!0}trackChanges(){this.dispatch("page-changed")}setDisplayIndex(e){this.displayIndex=e}getDisplayIndex(){return this.displayIndex}setMaxRows(e){this.max=e?!0===this.size?1:Math.ceil(e/this.size):1,this.page>this.max&&(this.page=this.max)}reset(e){this.initialLoad||("local"==this.mode||e)&&(this.page=1)}setMaxPage(e){e=parseInt(e),this.max=e||1,this.page>this.max&&(this.page=this.max,this.trigger())}setPage(e){switch(e){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return(e=parseInt(e))>0&&e<=this.max||"local"!==this.mode?(this.page=e,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Requested page is out of range of 1 - "+this.max+":",e),Promise.reject())}setPageToRow(e){var t=this.table.rowManager.getDisplayRows(this.displayIndex-1).indexOf(e);if(t>-1){var i=!0===this.size?1:Math.ceil((t+1)/this.size);return this.setPage(i)}return console.warn("Pagination Error - Requested row is not visible"),Promise.reject()}setPageSize(e){!0!==e&&(e=parseInt(e)),e>0&&(this.size=e),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.trackChanges()}_setPageCounter(e,t,i){var s;if(this.pageCounter)switch("remote"===this.mode&&(t=this.size,i=(this.page-1)*this.size+1,e=this.remoteRowCountEstimate),typeof(s=this.pageCounter.call(this,t,i,this.page,e,this.max))){case"object":if(s instanceof Node){for(;this.pageCounterElement.firstChild;)this.pageCounterElement.removeChild(this.pageCounterElement.firstChild);this.pageCounterElement.appendChild(s)}else this.pageCounterElement.innerHTML="",null!=s&&console.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:",s);break;case"undefined":case"null":this.pageCounterElement.innerHTML="";break;default:this.pageCounterElement.innerHTML=s}}_setPageButtons(){let e=Math.floor((this.count-1)/2),t=Math.ceil((this.count-1)/2),i=this.max-this.page+e+10&&e<=this.max&&this.pagesElement.appendChild(this._generatePageButton(e));this.footerRedraw()}_generatePageButton(e){var t=document.createElement("button");return t.classList.add("tabulator-page"),e==this.page&&t.classList.add("active"),t.setAttribute("type","button"),t.setAttribute("role","button"),this.langBind("pagination|page_title",(i=>{t.setAttribute("aria-label",i+" "+e),t.setAttribute("title",i+" "+e)})),t.setAttribute("data-page",e),t.textContent=e,t.addEventListener("click",(t=>{this.setPage(e)})),t}previousPage(){return this.page>1?(this.page--,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Previous page would be less than page 1:",0),Promise.reject())}nextPage(){return this.page"row"===e.type));if("local"==this.mode){t=[],this.setMaxRows(e.length),!0===this.size?(i=0,s=e.length):s=(i=this.size*(this.page-1))+parseInt(this.size),this._setPageButtons();for(let r=i;r{this.dataChanging=!1}));case"progressive_load":case"progressive_scroll":return this.reloadData(null,!0);default:return console.warn("Pagination Error - no such pagination mode:",this.mode),Promise.reject()}}_parseRemoteData(e){var t;if(void 0===e.last_page&&console.warn("Remote Pagination Error - Server response missing '"+(this.options("dataReceiveParams").last_page||"last_page")+"' property"),e.data){if(this.max=parseInt(e.last_page)||1,this.remoteRowCountEstimate=void 0!==e.last_row?e.last_row:e.last_page*this.size-(this.page==e.last_page?this.size-e.data.length:0),this.progressiveLoad){switch(this.mode){case"progressive_load":1==this.page?this.table.rowManager.setData(e.data,!1,1==this.page):this.table.rowManager.addRows(e.data),this.page{this.nextPage()}),this.table.options.progressiveLoadDelay);break;case"progressive_scroll":e=1===this.page?e.data:this.table.rowManager.getData().concat(e.data),this.table.rowManager.setData(e,1!==this.page,1==this.page),t=this.table.options.progressiveLoadScrollMargin||2*this.table.rowManager.element.clientHeight,this.table.rowManager.element.scrollHeight<=this.table.rowManager.element.clientHeight+t&&this.page{this.nextPage()}))}return!1}this.dispatchExternal("pageLoaded",this.getPage())}else console.warn("Remote Pagination Error - Server response missing '"+(this.options("dataReceiveParams").data||"data")+"' property");return e.data}footerRedraw(){var e=this.table.footerManager.containerElement;Math.ceil(e.clientWidth)-e.scrollWidth<0?this.pagesElement.style.display="none":(this.pagesElement.style.display="",Math.ceil(e.clientWidth)-e.scrollWidth<0&&(this.pagesElement.style.display="none"))}}J.moduleName="page",J.pageCounters=Y;var $={local:function(e,t){var i=localStorage.getItem(e+"-"+t);return!!i&&JSON.parse(i)},cookie:function(e,t){var i,s,o=document.cookie,n=e+"-"+t,r=o.indexOf(n+"=");return r>-1&&((i=(o=o.slice(r)).indexOf(";"))>-1&&(o=o.slice(0,i)),s=o.replace(n+"=","")),!!s&&JSON.parse(s)}},Q={local:function(e,t,i){localStorage.setItem(e+"-"+t,JSON.stringify(i))},cookie:function(e,t,i){var s=new Date;s.setDate(s.getDate()+1e4),document.cookie=e+"-"+t+"="+JSON.stringify(i)+"; expires="+s.toUTCString()}};class Z extends t{constructor(e){super(e),this.mode="",this.id="",this.defWatcherBlock=!1,this.config={},this.readFunc=!1,this.writeFunc=!1,this.registerTableOption("persistence",!1),this.registerTableOption("persistenceID",""),this.registerTableOption("persistenceMode",!0),this.registerTableOption("persistenceReaderFunc",!1),this.registerTableOption("persistenceWriterFunc",!1)}localStorageTest(){var e="_tabulator_test";try{return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}}initialize(){if(this.table.options.persistence){var e,t=this.table.options.persistenceMode,i=this.table.options.persistenceID;this.mode=!0!==t?t:this.localStorageTest()?"local":"cookie",this.table.options.persistenceReaderFunc?"function"==typeof this.table.options.persistenceReaderFunc?this.readFunc=this.table.options.persistenceReaderFunc:Z.readers[this.table.options.persistenceReaderFunc]?this.readFunc=Z.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):Z.readers[this.mode]?this.readFunc=Z.readers[this.mode]:console.warn("Persistence Read Error - invalid reader set",this.mode),this.table.options.persistenceWriterFunc?"function"==typeof this.table.options.persistenceWriterFunc?this.writeFunc=this.table.options.persistenceWriterFunc:Z.writers[this.table.options.persistenceWriterFunc]?this.writeFunc=Z.writers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):Z.writers[this.mode]?this.writeFunc=Z.writers[this.mode]:console.warn("Persistence Write Error - invalid writer set",this.mode),this.id="tabulator-"+(i||this.table.element.getAttribute("id")||""),this.config={sort:!0===this.table.options.persistence||this.table.options.persistence.sort,filter:!0===this.table.options.persistence||this.table.options.persistence.filter,group:!0===this.table.options.persistence||this.table.options.persistence.group,page:!0===this.table.options.persistence||this.table.options.persistence.page,columns:!0===this.table.options.persistence?["title","width","visible"]:this.table.options.persistence.columns},this.config.page&&(e=this.retreiveData("page"))&&(void 0===e.paginationSize||!0!==this.config.page&&!this.config.page.size||(this.table.options.paginationSize=e.paginationSize),void 0===e.paginationInitialPage||!0!==this.config.page&&!this.config.page.page||(this.table.options.paginationInitialPage=e.paginationInitialPage)),this.config.group&&(e=this.retreiveData("group"))&&(void 0===e.groupBy||!0!==this.config.group&&!this.config.group.groupBy||(this.table.options.groupBy=e.groupBy),void 0===e.groupStartOpen||!0!==this.config.group&&!this.config.group.groupStartOpen||(this.table.options.groupStartOpen=e.groupStartOpen),void 0===e.groupHeader||!0!==this.config.group&&!this.config.group.groupHeader||(this.table.options.groupHeader=e.groupHeader)),this.config.columns&&(this.table.options.columns=this.load("columns",this.table.options.columns),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-show",this.save.bind(this,"columns")),this.subscribe("column-hide",this.save.bind(this,"columns")),this.subscribe("column-moved",this.save.bind(this,"columns"))),this.subscribe("table-built",this.tableBuilt.bind(this),0),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("filter-changed",this.eventSave.bind(this,"filter")),this.subscribe("sort-changed",this.eventSave.bind(this,"sort")),this.subscribe("group-changed",this.eventSave.bind(this,"group")),this.subscribe("page-changed",this.eventSave.bind(this,"page")),this.subscribe("column-resized",this.eventSave.bind(this,"columns")),this.subscribe("layout-refreshed",this.eventSave.bind(this,"columns"))}this.registerTableFunction("getColumnLayout",this.getColumnLayout.bind(this)),this.registerTableFunction("setColumnLayout",this.setColumnLayout.bind(this))}eventSave(e){this.config[e]&&this.save(e)}tableBuilt(){var e,t;this.table.options;this.config.sort&&!1==!(e=this.load("sort"))&&(this.table.options.initialSort=e),this.config.filter&&!1==!(t=this.load("filter"))&&(this.table.options.initialFilter=t)}tableRedraw(e){e&&this.config.columns&&this.save("columns")}getColumnLayout(){return this.parseColumns(this.table.columnManager.getColumns())}setColumnLayout(e){return this.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns,e)),!0}initializeColumn(e){var t;this.config.columns&&(this.defWatcherBlock=!0,t=e.getDefinition(),(!0===this.config.columns?Object.keys(t):this.config.columns).forEach((e=>{var i=Object.getOwnPropertyDescriptor(t,e),s=t[e];i&&Object.defineProperty(t,e,{set:function(e){s=e,this.defWatcherBlock||this.save("columns"),i.set&&i.set(e)},get:function(){return i.get&&i.get(),s}})})),this.defWatcherBlock=!1)}load(e,t){var i=this.retreiveData(e);return t&&(i=i?this.mergeDefinition(t,i):t),i}retreiveData(e){return!!this.readFunc&&this.readFunc(this.id,e)}mergeDefinition(e,t){var i=[];return(t=t||[]).forEach(((t,s)=>{var o,n=this._findColumn(e,t);n&&(!0===this.config.columns||null==this.config.columns?(o=Object.keys(n)).push("width"):o=this.config.columns,o.forEach((e=>{"columns"!==e&&void 0!==t[e]&&(n[e]=t[e])})),n.columns&&(n.columns=this.mergeDefinition(n.columns,t.columns)),i.push(n))})),e.forEach(((e,s)=>{this._findColumn(t,e)||(i.length>s?i.splice(s,0,e):i.push(e))})),i}_findColumn(e,t){var i=t.columns?"group":t.field?"field":"object";return e.find((function(e){switch(i){case"group":return e.title===t.title&&e.columns.length===t.columns.length;case"field":return e.field===t.field;case"object":return e===t}}))}save(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort());break;case"group":t=this.getGroupConfig();break;case"page":t=this.getPageConfig()}this.writeFunc&&this.writeFunc(this.id,e,t)}validateSorters(e){return e.forEach((function(e){e.column=e.field,delete e.field})),e}getGroupConfig(){var e={};return this.config.group&&((!0===this.config.group||this.config.group.groupBy)&&(e.groupBy=this.table.options.groupBy),(!0===this.config.group||this.config.group.groupStartOpen)&&(e.groupStartOpen=this.table.options.groupStartOpen),(!0===this.config.group||this.config.group.groupHeader)&&(e.groupHeader=this.table.options.groupHeader)),e}getPageConfig(){var e={};return this.config.page&&((!0===this.config.page||this.config.page.size)&&(e.paginationSize=this.table.modules.page.getPageSize()),(!0===this.config.page||this.config.page.page)&&(e.paginationInitialPage=this.table.modules.page.getPage())),e}parseColumns(e){var t=[],i=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return e.forEach((e=>{var s,o={},n=e.getDefinition();e.isGroup?(o.title=n.title,o.columns=this.parseColumns(e.getColumns())):(o.field=e.getField(),!0===this.config.columns||null==this.config.columns?(s=Object.keys(n)).push("width"):s=this.config.columns,s.forEach((t=>{switch(t){case"width":o.width=e.getWidth();break;case"visible":o.visible=e.visible;break;default:"function"!=typeof n[t]&&-1===i.indexOf(t)&&(o[t]=n[t])}}))),t.push(o)})),t}}Z.moduleName="persistence",Z.moduleInitOrder=1,Z.readers=$,Z.writers=Q;class ee extends t{constructor(e){super(e),this.element=!1,this.manualBlock=!1,this.registerTableOption("printAsHtml",!1),this.registerTableOption("printFormatter",!1),this.registerTableOption("printHeader",!1),this.registerTableOption("printFooter",!1),this.registerTableOption("printStyled",!0),this.registerTableOption("printRowRange","visible"),this.registerTableOption("printConfig",{}),this.registerColumnOption("print"),this.registerColumnOption("titlePrint")}initialize(){this.table.options.printAsHtml&&(window.addEventListener("beforeprint",this.replaceTable.bind(this)),window.addEventListener("afterprint",this.cleanup.bind(this))),this.registerTableFunction("print",this.printFullscreen.bind(this))}replaceTable(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))}cleanup(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")}printFullscreen(e,t,i){var s,o,n=window.scrollX,r=window.scrollY,a=document.createElement("div"),l=document.createElement("div"),h=this.table.modules.export.genereateTable(void 0!==i?i:this.table.options.printConfig,void 0!==t?t:this.table.options.printStyled,e||this.table.options.printRowRange,"print");this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(a.classList.add("tabulator-print-header"),"string"==typeof(s="function"==typeof this.table.options.printHeader?this.table.options.printHeader.call(this.table):this.table.options.printHeader)?a.innerHTML=s:a.appendChild(s),this.element.appendChild(a)),this.element.appendChild(h),this.table.options.printFooter&&(l.classList.add("tabulator-print-footer"),"string"==typeof(o="function"==typeof this.table.options.printFooter?this.table.options.printFooter.call(this.table):this.table.options.printFooter)?l.innerHTML=o:l.appendChild(o),this.element.appendChild(l)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,h),window.print(),this.cleanup(),window.scrollTo(n,r),this.manualBlock=!1}}ee.moduleName="print";class te extends t{constructor(e){super(e),this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0,this.registerTableOption("reactiveData",!1)}initialize(){this.table.options.reactiveData&&(this.subscribe("cell-value-save-before",this.block.bind(this)),this.subscribe("cell-value-save-after",this.unblock.bind(this)),this.subscribe("row-data-save-before",this.block.bind(this)),this.subscribe("row-data-save-after",this.unblock.bind(this)),this.subscribe("row-data-init-after",this.watchRow.bind(this)),this.subscribe("data-processing",this.watchData.bind(this)),this.subscribe("table-destroy",this.unwatchData.bind(this)))}watchData(e){var t,i=this;this.currentVersion++,t=this.currentVersion,this.unwatchData(),this.data=e,this.origFuncs.push=e.push,Object.defineProperty(this.data,"push",{enumerable:!1,configurable:!0,value:function(){var s=Array.from(arguments);return i.blocked||t!==i.currentVersion||s.forEach((e=>{i.table.rowManager.addRowActual(e,!1)})),i.origFuncs.push.apply(e,arguments)}}),this.origFuncs.unshift=e.unshift,Object.defineProperty(this.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var s=Array.from(arguments);return i.blocked||t!==i.currentVersion||s.forEach((e=>{i.table.rowManager.addRowActual(e,!0)})),i.origFuncs.unshift.apply(e,arguments)}}),this.origFuncs.shift=e.shift,Object.defineProperty(this.data,"shift",{enumerable:!1,configurable:!0,value:function(){var s;return i.blocked||t!==i.currentVersion||i.data.length&&(s=i.table.rowManager.getRowFromDataObject(i.data[0]))&&s.deleteActual(),i.origFuncs.shift.call(e)}}),this.origFuncs.pop=e.pop,Object.defineProperty(this.data,"pop",{enumerable:!1,configurable:!0,value:function(){var s;return i.blocked||t!==i.currentVersion||i.data.length&&(s=i.table.rowManager.getRowFromDataObject(i.data[i.data.length-1]))&&s.deleteActual(),i.origFuncs.pop.call(e)}}),this.origFuncs.splice=e.splice,Object.defineProperty(this.data,"splice",{enumerable:!1,configurable:!0,value:function(){var s,o=Array.from(arguments),n=o[0]<0?e.length+o[0]:o[0],r=o[1],a=!!o[2]&&o.slice(2);if(!i.blocked&&t===i.currentVersion){if(a&&((s=!!e[n]&&i.table.rowManager.getRowFromDataObject(e[n]))?a.forEach((e=>{i.table.rowManager.addRowActual(e,!0,s,!0)})):(a=a.slice().reverse()).forEach((e=>{i.table.rowManager.addRowActual(e,!0,!1,!0)}))),0!==r){var l=e.slice(n,void 0===o[1]?o[1]:n+r);l.forEach(((e,t)=>{var s=i.table.rowManager.getRowFromDataObject(e);s&&s.deleteActual(t!==l.length-1)}))}(a||0!==r)&&i.table.rowManager.reRenderInPosition()}return i.origFuncs.splice.apply(e,arguments)}})}unwatchData(){if(!1!==this.data)for(var e in this.origFuncs)Object.defineProperty(this.data,e,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})}watchRow(e){var t=e.getData();for(var i in this.blocked=!0,t)this.watchKey(e,t,i);this.table.options.dataTree&&this.watchTreeChildren(e),this.blocked=!1}watchTreeChildren(e){var t=e.getData()[this.table.options.dataTreeChildField],i={};function s(){this.table.modules.dataTree.initializeRow(e),this.table.modules.dataTree.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)}t&&(i.push=t.push,Object.defineProperty(t,"push",{enumerable:!1,configurable:!0,value:()=>{var e=i.push.apply(t,arguments);return s(),e}}),i.unshift=t.unshift,Object.defineProperty(t,"unshift",{enumerable:!1,configurable:!0,value:()=>{var e=i.unshift.apply(t,arguments);return s(),e}}),i.shift=t.shift,Object.defineProperty(t,"shift",{enumerable:!1,configurable:!0,value:()=>{var e=i.shift.call(t);return s(),e}}),i.pop=t.pop,Object.defineProperty(t,"pop",{enumerable:!1,configurable:!0,value:()=>{var e=i.pop.call(t);return s(),e}}),i.splice=t.splice,Object.defineProperty(t,"splice",{enumerable:!1,configurable:!0,value:()=>{var e=i.splice.apply(t,arguments);return s(),e}}))}watchKey(e,t,i){var s=Object.getOwnPropertyDescriptor(t,i),o=t[i],n=this.currentVersion;Object.defineProperty(t,i,{set:t=>{if(o=t,!this.blocked&&n===this.currentVersion){var r={};r[i]=t,e.updateData(r)}s.set&&s.set(t)},get:()=>(s.get&&s.get(),o)})}unwatchRow(e){var t=e.getData();for(var i in t)Object.defineProperty(t,i,{value:t[i]})}block(){this.blocked=!0}unblock(){this.blocked=!1}}te.moduleName="reactiveData";class ie extends t{constructor(e){super(e),this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.handle=null,this.prevHandle=null,this.registerColumnOption("resizable",!0)}initialize(){this.subscribe("cell-layout",this.layoutCellHandles.bind(this)),this.subscribe("column-init",this.layoutColumnHeader.bind(this))}layoutCellHandles(e){"row"===e.row.type&&this.initializeColumn("cell",e.column,e.element)}layoutColumnHeader(e){this.initializeColumn("header",e,e.element)}initializeColumn(e,t,i){var s=this,o=!1,n=t.definition.resizable;if("header"===e&&(o="textarea"==t.definition.formatter||t.definition.variableHeight,t.modules.resize={variableHeight:o}),!0===n||n==e){var r=document.createElement("div");r.className="tabulator-col-resize-handle";var a=document.createElement("div");a.className="tabulator-col-resize-handle prev",r.addEventListener("click",(function(e){e.stopPropagation()}));var l=function(e){var i=t.getLastColumn();i&&s._checkResizability(i)&&(s.startColumn=t,s._mouseDown(e,i,r))};r.addEventListener("mousedown",l),r.addEventListener("touchstart",l,{passive:!0}),r.addEventListener("dblclick",(function(e){var i,o=t.getLastColumn();o&&s._checkResizability(o)&&(i=o.getWidth(),e.stopPropagation(),o.reinitializeWidth(!0),i!==o.getWidth()&&(s.dispatch("column-resized",o),s.table.externalEvents.dispatch("columnResized",o.getComponent())))})),a.addEventListener("click",(function(e){e.stopPropagation()}));var h=function(e){var i,o,n;(i=t.getFirstColumn())&&(n=(o=s.table.columnManager.findColumnIndex(i))>0&&s.table.columnManager.getColumnByIndex(o-1))&&s._checkResizability(n)&&(s.startColumn=t,s._mouseDown(e,n,a))};a.addEventListener("mousedown",h),a.addEventListener("touchstart",h,{passive:!0}),a.addEventListener("dblclick",(function(e){var i,o,n;(i=t.getFirstColumn())&&(n=(o=s.table.columnManager.findColumnIndex(i))>0&&s.table.columnManager.getColumnByIndex(o-1))&&s._checkResizability(n)&&(e.stopPropagation(),n.reinitializeWidth(!0))})),i.appendChild(r),i.appendChild(a)}}_checkResizability(e){return e.definition.resizable}_mouseDown(e,t,i){var s=this;function o(e){s.table.rtl?t.setWidth(s.startWidth-((void 0===e.screenX?e.touches[0].screenX:e.screenX)-s.startX)):t.setWidth(s.startWidth+((void 0===e.screenX?e.touches[0].screenX:e.screenX)-s.startX)),s.table.columnManager.renderer.rerenderColumns(!0),!s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}function n(e){s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!1),s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",n),document.body.removeEventListener("mousemove",o),i.removeEventListener("touchmove",o),i.removeEventListener("touchend",n),s.table.element.classList.remove("tabulator-block-select"),s.startWidth!==t.getWidth()&&(s.dispatch("column-resized",t),s.table.externalEvents.dispatch("columnResized",t.getComponent()))}s.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!0),s.startX=void 0===e.screenX?e.touches[0].screenX:e.screenX,s.startWidth=t.getWidth(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",n),i.addEventListener("touchmove",o,{passive:!0}),i.addEventListener("touchend",n)}}ie.moduleName="resizeColumns";class se extends t{constructor(e){super(e),this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null,this.registerTableOption("resizableRows",!1)}initialize(){this.table.options.resizableRows&&this.subscribe("row-layout-after",this.initializeRow.bind(this))}initializeRow(e){var t=this,i=e.getElement(),s=document.createElement("div");s.className="tabulator-row-resize-handle";var o=document.createElement("div");o.className="tabulator-row-resize-handle prev",s.addEventListener("click",(function(e){e.stopPropagation()}));var n=function(i){t.startRow=e,t._mouseDown(i,e,s)};s.addEventListener("mousedown",n),s.addEventListener("touchstart",n,{passive:!0}),o.addEventListener("click",(function(e){e.stopPropagation()}));var r=function(i){var s=t.table.rowManager.prevDisplayRow(e);s&&(t.startRow=s,t._mouseDown(i,s,o))};o.addEventListener("mousedown",r),o.addEventListener("touchstart",r,{passive:!0}),i.appendChild(s),i.appendChild(o)}_mouseDown(e,t,i){var s=this;function o(e){t.setHeight(s.startHeight+((void 0===e.screenY?e.touches[0].screenY:e.screenY)-s.startY))}function n(e){document.body.removeEventListener("mouseup",o),document.body.removeEventListener("mousemove",o),i.removeEventListener("touchmove",o),i.removeEventListener("touchend",n),s.table.element.classList.remove("tabulator-block-select"),s.dispatchExternal("rowResized",t.getComponent())}s.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),s.startY=void 0===e.screenY?e.touches[0].screenY:e.screenY,s.startHeight=t.getHeight(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",n),i.addEventListener("touchmove",o,{passive:!0}),i.addEventListener("touchend",n)}}se.moduleName="resizeRows";class oe extends t{constructor(e){super(e),this.binding=!1,this.observer=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1,this.registerTableOption("autoResize",!0)}initialize(){if(this.table.options.autoResize){var e,t=this.table;this.tableHeight=t.element.clientHeight,this.tableWidth=t.element.clientWidth,t.element.parentNode&&(this.containerHeight=t.element.parentNode.clientHeight,this.containerWidth=t.element.parentNode.clientWidth),"undefined"!=typeof ResizeObserver&&"virtual"===t.rowManager.getRenderMode()?(this.autoResize=!0,this.observer=new ResizeObserver((e=>{if(!t.browserMobile||t.browserMobile&&!t.modules.edit.currentCell){var i=Math.floor(e[0].contentRect.height),s=Math.floor(e[0].contentRect.width);this.tableHeight==i&&this.tableWidth==s||(this.tableHeight=i,this.tableWidth=s,t.element.parentNode&&(this.containerHeight=t.element.parentNode.clientHeight,this.containerWidth=t.element.parentNode.clientWidth),this.table.columnManager.renderer.rerenderColumns(!0),t.redraw())}})),this.observer.observe(t.element),e=window.getComputedStyle(t.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(e.getPropertyValue("max-height")||e.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver((e=>{if(!t.browserMobile||t.browserMobile&&!t.modules.edit.currentCell){var i=Math.floor(e[0].contentRect.height),s=Math.floor(e[0].contentRect.width);this.containerHeight==i&&this.containerWidth==s||(this.containerHeight=i,this.containerWidth=s,this.tableHeight=t.element.clientHeight,this.tableWidth=t.element.clientWidth),t.columnManager.renderer.rerenderColumns(!0),t.redraw()}})),this.containerObserver.observe(this.table.element.parentNode)),this.subscribe("table-resize",this.tableResized.bind(this))):(this.binding=function(){(!t.browserMobile||t.browserMobile&&!t.modules.edit.currentCell)&&(t.columnManager.renderer.rerenderColumns(!0),t.redraw())},window.addEventListener("resize",this.binding)),this.subscribe("table-destroy",this.clearBindings.bind(this))}}tableResized(){this.table.rowManager.redraw()}clearBindings(){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)}}oe.moduleName="resizeTable";class ne extends t{constructor(e){super(e),this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1,this.registerTableOption("responsiveLayout",!1),this.registerTableOption("responsiveLayoutCollapseStartOpen",!0),this.registerTableOption("responsiveLayoutCollapseUseFormatters",!0),this.registerTableOption("responsiveLayoutCollapseFormatter",!1),this.registerColumnOption("responsive")}initialize(){this.table.options.responsiveLayout&&(this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-show",this.updateColumnVisibility.bind(this)),this.subscribe("column-hide",this.updateColumnVisibility.bind(this)),this.subscribe("columns-loaded",this.initializeResponsivity.bind(this)),this.subscribe("column-moved",this.initializeResponsivity.bind(this)),this.subscribe("column-add",this.initializeResponsivity.bind(this)),this.subscribe("column-delete",this.initializeResponsivity.bind(this)),this.subscribe("table-redrawing",this.tableRedraw.bind(this)),"collapse"===this.table.options.responsiveLayout&&(this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout",this.layoutRow.bind(this))))}tableRedraw(e){-1===["fitColumns","fitDataStretch"].indexOf(this.layoutMode())&&(e||this.update())}initializeResponsivity(){var e=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach(((t,i)=>{t.modules.responsive&&t.modules.responsive.order&&t.modules.responsive.visible&&(t.modules.responsive.index=i,e.push(t),t.visible||"collapse"!==this.mode||this.hiddenColumns.push(t))})),e=(e=e.reverse()).sort(((e,t)=>t.modules.responsive.order-e.modules.responsive.order||t.modules.responsive.index-e.modules.responsive.index)),this.columns=e,"collapse"===this.mode&&this.generateCollapsedContent();for(let e of this.table.columnManager.columnsByIndex)if("responsiveCollapse"==e.definition.formatter){this.collapseHandleColumn=e;break}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())}initializeColumn(e){var t=e.getDefinition();e.modules.responsive={order:void 0===t.responsive?1:t.responsive,visible:!1!==t.visible}}initializeRow(e){var t;"calc"!==e.type&&((t=document.createElement("div")).classList.add("tabulator-responsive-collapse"),e.modules.responsiveLayout={element:t,open:this.collapseStartOpen},this.collapseStartOpen||(t.style.display="none"))}layoutRow(e){var t=e.getElement();e.modules.responsiveLayout&&(t.appendChild(e.modules.responsiveLayout.element),this.generateCollapsedRowContent(e))}updateColumnVisibility(e,t){!t&&e.modules.responsive&&(e.modules.responsive.visible=e.visible,this.initializeResponsivity())}hideColumn(e){var t=this.hiddenColumns.length;e.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent(),this.collapseHandleColumn&&!t&&this.collapseHandleColumn.show())}showColumn(e){var t;e.show(!1,!0),e.setWidth(e.getWidth()),"collapse"===this.mode&&((t=this.hiddenColumns.indexOf(e))>-1&&this.hiddenColumns.splice(t,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())}update(){for(var e=this,t=!0;t;){let i="fitColumns"==e.table.modules.layout.getMode()?e.table.columnManager.getFlexBaseWidth():e.table.columnManager.getWidth(),s=(e.table.options.headerVisible?e.table.columnManager.element.clientWidth:e.table.element.clientWidth)-i;if(s<0){let i=e.columns[e.index];i?(e.hideColumn(i),e.index++):t=!1}else{let i=e.columns[e.index-1];i&&s>0&&s>=i.getWidth()?(e.showColumn(i),e.index--):t=!1}e.table.rowManager.activeRowsCount||e.table.rowManager.renderEmptyScroll()}}generateCollapsedContent(){var e=this;this.table.rowManager.getDisplayRows().forEach((function(t){e.generateCollapsedRowContent(t)}))}generateCollapsedRowContent(e){var t,i;if(e.modules.responsiveLayout){for(t=e.modules.responsiveLayout.element;t.firstChild;)t.removeChild(t.firstChild);(i=this.collapseFormatter(this.generateCollapsedRowData(e)))&&t.appendChild(i)}}generateCollapsedRowData(e){var t,i=this,s=e.getData(),o=[];return this.hiddenColumns.forEach((function(n){var r=n.getFieldValue(s);if(n.definition.title&&n.field)if(n.modules.format&&i.table.options.responsiveLayoutCollapseUseFormatters){t={value:!1,data:{},getValue:function(){return r},getData:function(){return s},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return n.getComponent()}},o.push({field:n.field,title:n.definition.title,value:n.modules.format.formatter.call(i.table.modules.format,t,n.modules.format.params,(function(e){e()}))})}else o.push({field:n.field,title:n.definition.title,value:r})})),o}formatCollapsedData(e){var t=document.createElement("table");return e.forEach((function(e){var i,s=document.createElement("tr"),o=document.createElement("td"),n=document.createElement("td"),r=document.createElement("strong");o.appendChild(r),this.langBind("columns|"+e.field,(function(t){r.innerHTML=t||e.title})),e.value instanceof Node?((i=document.createElement("div")).appendChild(e.value),n.appendChild(i)):n.innerHTML=e.value,s.appendChild(o),s.appendChild(n),t.appendChild(s)}),this),Object.keys(e).length?t:""}}ne.moduleName="responsiveLayout";class re extends t{constructor(e){super(e),this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null,this.registerTableOption("selectable","highlight"),this.registerTableOption("selectableRangeMode","drag"),this.registerTableOption("selectableRollingSelection",!0),this.registerTableOption("selectablePersistence",!0),this.registerTableOption("selectableCheck",(function(e,t){return!0})),this.registerTableFunction("selectRow",this.selectRows.bind(this)),this.registerTableFunction("deselectRow",this.deselectRows.bind(this)),this.registerTableFunction("toggleSelectRow",this.toggleRow.bind(this)),this.registerTableFunction("getSelectedRows",this.getSelectedRows.bind(this)),this.registerTableFunction("getSelectedData",this.getSelectedData.bind(this)),this.registerComponentFunction("row","select",this.selectRows.bind(this)),this.registerComponentFunction("row","deselect",this.deselectRows.bind(this)),this.registerComponentFunction("row","toggleSelect",this.toggleRow.bind(this)),this.registerComponentFunction("row","isSelected",this.isRowSelected.bind(this))}initialize(){!1!==this.table.options.selectable&&(this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-deleting",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clearSelectionData.bind(this)),this.subscribe("rows-retrieve",this.rowRetrieve.bind(this)),this.table.options.selectable&&!this.table.options.selectablePersistence&&this.subscribe("data-refreshing",this.deselectRows.bind(this)))}rowRetrieve(e,t){return"selected"===e?this.selectedRows:t}rowDeleted(e){this._deselectRow(e,!0)}clearSelectionData(e){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],!0!==e&&this._rowSelectionChanged()}initializeRow(e){var t=this,i=e.getElement(),s=function(){setTimeout((function(){t.selecting=!1}),50),document.body.removeEventListener("mouseup",s)};e.modules.select={selected:!1},t.table.options.selectableCheck.call(this.table,e.getComponent())?(i.classList.add("tabulator-selectable"),i.classList.remove("tabulator-unselectable"),t.table.options.selectable&&"highlight"!=t.table.options.selectable&&("click"===t.table.options.selectableRangeMode?i.addEventListener("click",this.handleComplexRowClick.bind(this,e)):(i.addEventListener("click",(function(i){t.table.modExists("edit")&&t.table.modules.edit.getCurrentCell()||t.table._clearSelection(),t.selecting||t.toggleRow(e)})),i.addEventListener("mousedown",(function(i){if(i.shiftKey)return t.table._clearSelection(),t.selecting=!0,t.selectPrev=[],document.body.addEventListener("mouseup",s),document.body.addEventListener("keyup",s),t.toggleRow(e),!1})),i.addEventListener("mouseenter",(function(i){t.selecting&&(t.table._clearSelection(),t.toggleRow(e),t.selectPrev[1]==e&&t.toggleRow(t.selectPrev[0]))})),i.addEventListener("mouseout",(function(i){t.selecting&&(t.table._clearSelection(),t.selectPrev.unshift(e))}))))):(i.classList.add("tabulator-unselectable"),i.classList.remove("tabulator-selectable"))}handleComplexRowClick(e,t){if(t.shiftKey){this.table._clearSelection(),this.lastClickedRow=this.lastClickedRow||e;var i=this.table.rowManager.getDisplayRowIndex(this.lastClickedRow),s=this.table.rowManager.getDisplayRowIndex(e),o=i<=s?i:s,n=i>=s?i:s,r=this.table.rowManager.getDisplayRows().slice(0).splice(o,n-o+1);t.ctrlKey||t.metaKey?(r.forEach((t=>{t!==this.lastClickedRow&&(!0===this.table.options.selectable||this.isRowSelected(e)||this.selectedRows.lengththis.table.options.selectable&&(r=r.slice(0,this.table.options.selectable)),this.selectRows(r)),this.table._clearSelection()}else t.ctrlKey||t.metaKey?(this.toggleRow(e),this.lastClickedRow=e):(this.deselectRows(void 0,!0),this.selectRows(e),this.lastClickedRow=e)}toggleRow(e){this.table.options.selectableCheck.call(this.table,e.getComponent())&&(e.modules.select&&e.modules.select.selected?this._deselectRow(e):this._selectRow(e))}selectRows(e){var t;switch(typeof e){case"undefined":this.table.rowManager.rows.forEach((e=>{this._selectRow(e,!0,!0)})),this._rowSelectionChanged();break;case"string":(t=this.table.rowManager.findRow(e))?this._selectRow(t,!0,!0):this.table.rowManager.getRows(e).forEach((e=>{this._selectRow(e,!0,!0)})),this._rowSelectionChanged();break;default:Array.isArray(e)?(e.forEach((e=>{this._selectRow(e,!0,!0)})),this._rowSelectionChanged()):this._selectRow(e,!1,!0)}}_selectRow(e,t,i){if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!i&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var s=this.table.rowManager.findRow(e);s?-1==this.selectedRows.indexOf(s)&&(s.getElement().classList.add("tabulator-selected"),s.modules.select||(s.modules.select={}),s.modules.select.selected=!0,s.modules.select.checkboxEl&&(s.modules.select.checkboxEl.checked=!0),this.selectedRows.push(s),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(s,!0),this.dispatchExternal("rowSelected",s.getComponent()),this._rowSelectionChanged(t)):t||console.warn("Selection Error - No such row found, ignoring selection:"+e)}isRowSelected(e){return-1!==this.selectedRows.indexOf(e)}deselectRows(e,t){var i,s=this;if(void 0===e){i=s.selectedRows.length;for(let e=0;e-1&&(o.getElement().classList.remove("tabulator-selected"),o.modules.select||(o.modules.select={}),o.modules.select.selected=!1,o.modules.select.checkboxEl&&(o.modules.select.checkboxEl.checked=!1),s.selectedRows.splice(i,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(o,!1),this.dispatchExternal("rowDeselected",o.getComponent()),s._rowSelectionChanged(t)):t||console.warn("Deselection Error - No such row found, ignoring selection:"+e)}getSelectedData(){var e=[];return this.selectedRows.forEach((function(t){e.push(t.getData())})),e}getSelectedRows(){var e=[];return this.selectedRows.forEach((function(t){e.push(t.getComponent())})),e}_rowSelectionChanged(e){this.headerCheckboxElement&&(0===this.selectedRows.length?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),e||this.dispatchExternal("rowSelectionChanged",this.getSelectedData(),this.getSelectedRows())}registerRowSelectCheckbox(e,t){e._row.modules.select||(e._row.modules.select={}),e._row.modules.select.checkboxEl=t}registerHeaderSelectCheckbox(e){this.headerCheckboxElement=e}childRowSelection(e,t){var i=this.table.modules.dataTree.getChildren(e,!0);if(t)for(let e of i)this._selectRow(e,!0);else for(let e of i)this._deselectRow(e,!0)}}function ae(e,t,i,s,o,n,r){var a=window.DateTime||luxon.DateTime,l=r.format||"dd/MM/yyyy HH:mm:ss",h=r.alignEmptyValues,d=0;if(void 0!==a){if(e="iso"===l?a.fromISO(String(e)):a.fromFormat(String(e),l),t="iso"===l?a.fromISO(String(t)):a.fromFormat(String(t),l),e.isValid){if(t.isValid)return e-t;d=1}else d=t.isValid?-1:0;return("top"===h&&"desc"===n||"bottom"===h&&"asc"===n)&&(d*=-1),d}console.error("Sort Error - 'datetime' sorter is dependant on luxon.js")}re.moduleName="selectRow";var le={number:function(e,t,i,s,o,n,r){var a=r.alignEmptyValues,l=r.decimalSeparator,h=r.thousandSeparator,d=0;if(e=String(e),t=String(t),h&&(e=e.split(h).join(""),t=t.split(h).join("")),l&&(e=e.split(l).join("."),t=t.split(l).join(".")),e=parseFloat(e),t=parseFloat(t),isNaN(e))d=isNaN(t)?0:-1;else{if(!isNaN(t))return e-t;d=1}return("top"===a&&"desc"===n||"bottom"===a&&"asc"===n)&&(d*=-1),d},string:function(e,t,i,s,o,n,r){var a,l=r.alignEmptyValues,h=0;if(e){if(t){switch(typeof r.locale){case"boolean":r.locale&&(a=this.langLocale());break;case"string":a=r.locale}return String(e).toLowerCase().localeCompare(String(t).toLowerCase(),a)}h=1}else h=t?-1:0;return("top"===l&&"desc"===n||"bottom"===l&&"asc"===n)&&(h*=-1),h},date:function(e,t,i,s,o,n,r){return r.format||(r.format="dd/MM/yyyy"),ae.call(this,e,t,i,s,o,n,r)},time:function(e,t,i,s,o,n,r){return r.format||(r.format="HH:mm"),ae.call(this,e,t,i,s,o,n,r)},datetime:ae,boolean:function(e,t,i,s,o,n,r){return(!0===e||"true"===e||"True"===e||1===e?1:0)-(!0===t||"true"===t||"True"===t||1===t?1:0)},array:function(e,t,i,s,o,n,r){var a=r.type||"length",l=r.alignEmptyValues,h=0;function d(e){switch(a){case"length":return e.length;case"sum":return e.reduce((function(e,t){return e+t}));case"max":return Math.max.apply(null,e);case"min":return Math.min.apply(null,e);case"avg":return e.reduce((function(e,t){return e+t}))/e.length}}if(Array.isArray(e)){if(Array.isArray(t))return(e?d(e):0)-(t?d(t):0);l=1}else l=Array.isArray(t)?-1:0;return("top"===l&&"desc"===n||"bottom"===l&&"asc"===n)&&(h*=-1),h},exists:function(e,t,i,s,o,n,r){return(void 0===e?0:1)-(void 0===t?0:1)},alphanum:function(e,t,i,s,o,n,r){var a,l,h,d,c,u=0,m=/(\d+)|(\D+)/g,p=/\d/,g=r.alignEmptyValues,b=0;if(e||0===e){if(t||0===t){if(isFinite(e)&&isFinite(t))return e-t;if((a=String(e).toLowerCase())===(l=String(t).toLowerCase()))return 0;if(!p.test(a)||!p.test(l))return a>l?1:-1;for(a=a.match(m),l=l.match(m),c=a.length>l.length?l.length:a.length;ud?1:-1;return a.length>l.length}b=1}else b=t||0===t?-1:0;return("top"===g&&"desc"===n||"bottom"===g&&"asc"===n)&&(b*=-1),b}};class he extends t{constructor(e){super(e),this.sortList=[],this.changed=!1,this.registerTableOption("sortMode","local"),this.registerTableOption("initialSort",!1),this.registerTableOption("columnHeaderSortMulti",!0),this.registerTableOption("sortOrderReverse",!1),this.registerTableOption("headerSortElement","
"),this.registerColumnOption("sorter"),this.registerColumnOption("sorterParams"),this.registerColumnOption("headerSort",!0),this.registerColumnOption("headerSortStartingDir"),this.registerColumnOption("headerSortTristate")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),this.registerDataHandler(this.sort.bind(this),20),this.registerTableFunction("setSort",this.userSetSort.bind(this)),this.registerTableFunction("getSorters",this.getSort.bind(this)),this.registerTableFunction("clearSort",this.clearSort.bind(this)),"remote"===this.table.options.sortMode&&this.subscribe("data-params",this.remoteSortParams.bind(this))}tableBuilt(){this.table.options.initialSort&&this.setSort(this.table.options.initialSort)}remoteSortParams(e,t,i,s){var o=this.getSort();return o.forEach((e=>{delete e.column})),s.sort=o,s}userSetSort(e,t){this.setSort(e,t),this.refreshSort()}clearSort(){this.clear(),this.refreshSort()}initializeColumn(e){var t,i,s=!1;switch(typeof e.definition.sorter){case"string":he.sorters[e.definition.sorter]?s=he.sorters[e.definition.sorter]:console.warn("Sort Error - No such sorter found: ",e.definition.sorter);break;case"function":s=e.definition.sorter}e.modules.sort={sorter:s,dir:"none",params:e.definition.sorterParams||{},startingDir:e.definition.headerSortStartingDir||"asc",tristate:e.definition.headerSortTristate},!1!==e.definition.headerSort&&((t=e.getElement()).classList.add("tabulator-sortable"),(i=document.createElement("div")).classList.add("tabulator-col-sorter"),"object"==typeof this.table.options.headerSortElement?i.appendChild(this.table.options.headerSortElement):i.innerHTML=this.table.options.headerSortElement,e.titleHolderElement.appendChild(i),e.modules.sort.element=i,t.addEventListener("click",(t=>{var i="",s=[],o=!1;if(e.modules.sort){if(e.modules.sort.tristate)i="none"==e.modules.sort.dir?e.modules.sort.startingDir:e.modules.sort.dir==e.modules.sort.startingDir?"asc"==e.modules.sort.dir?"desc":"asc":"none";else switch(e.modules.sort.dir){case"asc":i="desc";break;case"desc":i="asc";break;default:i=e.modules.sort.startingDir}this.table.options.columnHeaderSortMulti&&(t.shiftKey||t.ctrlKey)?((o=(s=this.getSort()).findIndex((t=>t.field===e.getField())))>-1?(s[o].dir=i,o!=s.length-1&&(o=s.splice(o,1)[0],"none"!=i&&s.push(o))):"none"!=i&&s.push({column:e,dir:i}),this.setSort(s)):"none"==i?this.clear():this.setSort(e,i),this.refreshSort()}})))}refreshSort(){"remote"===this.table.options.sortMode?this.reloadData():this.refreshData(!0)}hasChanged(){var e=this.changed;return this.changed=!1,e}getSort(){var e=[];return this.sortList.forEach((function(t){t.column&&e.push({column:t.column.getComponent(),field:t.column.getField(),dir:t.dir})})),e}setSort(e,t){var i=this,s=[];Array.isArray(e)||(e=[{column:e,dir:t}]),e.forEach((function(e){var t;(t=i.table.columnManager.findColumn(e.column))?(e.column=t,s.push(e),i.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",e.column)})),i.sortList=s,this.dispatch("sort-changed")}clear(){this.setSort([])}findSorter(e){var t,i=this.table.rowManager.activeRows[0],s="string";if(i&&(i=i.getData(),e.getField()))switch(typeof(t=e.getFieldValue(i))){case"undefined":s="string";break;case"boolean":s="boolean";break;default:isNaN(t)||""===t?t.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(s="alphanum"):s="number"}return he.sorters[s]}sort(e){var t=this,i=this.table.options.sortOrderReverse?t.sortList.slice().reverse():t.sortList,s=[],o=[];return this.subscribedExternal("dataSorting")&&this.dispatchExternal("dataSorting",t.getSort()),t.clearColumnHeaders(),"remote"!==this.table.options.sortMode?(i.forEach((function(e,i){var o=e.column.modules.sort;e.column&&o&&(o.sorter||(o.sorter=t.findSorter(e.column)),e.params="function"==typeof o.params?o.params(e.column.getComponent(),e.dir):o.params,s.push(e)),t.setColumnHeader(e.column,e.dir)})),s.length&&t._sortItems(e,s)):i.forEach((function(e,i){t.setColumnHeader(e.column,e.dir)})),this.subscribedExternal("dataSorted")&&(e.forEach((e=>{o.push(e.getComponent())})),this.dispatchExternal("dataSorted",t.getSort(),o)),e}clearColumnHeaders(){this.table.columnManager.getRealColumns().forEach((function(e){e.modules.sort&&(e.modules.sort.dir="none",e.getElement().setAttribute("aria-sort","none"))}))}setColumnHeader(e,t){e.modules.sort.dir=t,e.getElement().setAttribute("aria-sort",t)}_sortItems(e,t){var i=t.length-1;e.sort(((e,s)=>{for(var o,n=i;n>=0;n--){let i=t[n];if(0!==(o=this._sortRow(e,s,i.column,i.dir,i.params)))break}return o}))}_sortRow(e,t,i,s,o){var n,r,a="asc"==s?e:t,l="asc"==s?t:e;return e=void 0!==(e=i.getFieldValue(a.getData()))?e:"",t=void 0!==(t=i.getFieldValue(l.getData()))?t:"",n=a.getComponent(),r=l.getComponent(),i.modules.sort.sorter.call(this,e,t,n,r,i.getComponent(),s,o)}}he.moduleName="sort",he.sorters=le;var de={integer:function(e,t,i){return""===t||null==t||"number"==typeof(t=Number(t))&&isFinite(t)&&Math.floor(t)===t},float:function(e,t,i){return""===t||null==t||"number"==typeof(t=Number(t))&&isFinite(t)&&t%1!=0},numeric:function(e,t,i){return""===t||null==t||!isNaN(t)},string:function(e,t,i){return""===t||null==t||isNaN(t)},max:function(e,t,i){return""===t||null==t||parseFloat(t)<=i},min:function(e,t,i){return""===t||null==t||parseFloat(t)>=i},starts:function(e,t,i){return""===t||null==t||String(t).toLowerCase().startsWith(String(i).toLowerCase())},ends:function(e,t,i){return""===t||null==t||String(t).toLowerCase().endsWith(String(i).toLowerCase())},minLength:function(e,t,i){return""===t||null==t||String(t).length>=i},maxLength:function(e,t,i){return""===t||null==t||String(t).length<=i},in:function(e,t,i){return""===t||null==t||("string"==typeof i&&(i=i.split("|")),""===t||i.indexOf(t)>-1)},regex:function(e,t,i){return""===t||null==t||new RegExp(i).test(t)},unique:function(e,t,i){if(""===t||null==t)return!0;var s=!0,o=e.getData(),n=e.getColumn()._getSelf();return this.table.rowManager.rows.forEach((function(e){var i=e.getData();i!==o&&t==n.getFieldValue(i)&&(s=!1)})),s},required:function(e,t,i){return""!==t&&null!=t}};class ce extends t{constructor(e){super(e),this.invalidCells=[],this.registerTableOption("validationMode","blocking"),this.registerColumnOption("validator"),this.registerTableFunction("getInvalidCells",this.getInvalidCells.bind(this)),this.registerTableFunction("clearCellValidation",this.userClearCellValidation.bind(this)),this.registerTableFunction("validate",this.userValidate.bind(this)),this.registerComponentFunction("cell","isValid",this.cellIsValid.bind(this)),this.registerComponentFunction("cell","clearValidation",this.clearValidation.bind(this)),this.registerComponentFunction("cell","validate",this.cellValidate.bind(this)),this.registerComponentFunction("column","validate",this.columnValidate.bind(this)),this.registerComponentFunction("row","validate",this.rowValidate.bind(this))}initialize(){this.subscribe("cell-delete",this.clearValidation.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this))}cellIsValid(e){return!e.modules.validate||!e.modules.validate.invalid}cellValidate(e){return this.validate(e.column.modules.validate,e,e.getValue())}columnValidate(e){var t=[];return e.cells.forEach((e=>{this.cellValidate(e)||t.push(e.getComponent())})),!t.length||t}rowValidate(e){var t=[];return e.cells.forEach((e=>{this.cellValidate(e)||t.push(e.getComponent())})),!t.length||t}userClearCellValidation(e){e||(e=this.getInvalidCells()),Array.isArray(e)||(e=[e]),e.forEach((e=>{this.clearValidation(e._getSelf())}))}userValidate(e){var t=[];return this.table.rowManager.rows.forEach((e=>{var i=(e=e.getComponent()).validate();!0!==i&&(t=t.concat(i))})),!t.length||t}initializeColumnCheck(e){void 0!==e.definition.validator&&this.initializeColumn(e)}initializeColumn(e){var t,i=this,s=[];e.definition.validator&&(Array.isArray(e.definition.validator)?e.definition.validator.forEach((e=>{(t=i._extractValidator(e))&&s.push(t)})):(t=this._extractValidator(e.definition.validator))&&s.push(t),e.modules.validate=!!s.length&&s)}_extractValidator(e){var t,i,s;switch(typeof e){case"string":return(s=e.indexOf(":"))>-1?(t=e.substring(0,s),i=e.substring(s+1)):t=e,this._buildValidator(t,i);case"function":return this._buildValidator(e);case"object":return this._buildValidator(e.type,e.parameters)}}_buildValidator(e,t){var i="function"==typeof e?e:ce.validators[e];return i?{type:"function"==typeof e?"function":e,func:i,params:t}:(console.warn("Validator Setup Error - No matching validator found:",e),!1)}validate(e,t,i){var s=this,o=[],n=this.invalidCells.indexOf(t);return e&&e.forEach((e=>{e.func.call(s,t.getComponent(),i,e.params)||o.push({type:e.type,parameters:e.params})})),o=!o.length||o,t.modules.validate||(t.modules.validate={}),!0===o?(t.modules.validate.invalid=!1,t.getElement().classList.remove("tabulator-validation-fail"),n>-1&&this.invalidCells.splice(n,1)):(t.modules.validate.invalid=!0,"manual"!==this.table.options.validationMode&&t.getElement().classList.add("tabulator-validation-fail"),-1==n&&this.invalidCells.push(t)),o}getInvalidCells(){var e=[];return this.invalidCells.forEach((t=>{e.push(t.getComponent())})),e}clearValidation(e){var t;e.modules.validate&&e.modules.validate.invalid&&(e.getElement().classList.remove("tabulator-validation-fail"),e.modules.validate.invalid=!1,(t=this.invalidCells.indexOf(e))>-1&&this.invalidCells.splice(t,1))}}ce.moduleName="validate",ce.validators=de;var ue=Object.freeze({__proto__:null,AccessorModule:o,AjaxModule:h,ClipboardModule:d,ColumnCalcsModule:C,DataTreeModule:E,DownloadModule:R,EditModule:T,ExportModule:D,FilterModule:F,FormatModule:P,FrozenColumnsModule:H,FrozenRowsModule:A,GroupRowsModule:B,HistoryModule:N,HtmlTableImportModule:V,ImportModule:W,InteractionModule:j,KeybindingsModule:G,MenuModule:U,MoveColumnsModule:X,MoveRowsModule:q,MutatorModule:K,PageModule:J,PersistenceModule:Z,PrintModule:ee,ReactiveDataModule:te,ResizeColumnsModule:ie,ResizeRowsModule:se,ResizeTableModule:oe,ResponsiveLayoutModule:ne,SelectRowModule:re,SortModule:he,ValidateModule:ce});class me{constructor(e,t,i={}){this.table=e,this.msgType=t,this.registeredDefaults=Object.assign({},i)}register(e,t){this.registeredDefaults[e]=t}generate(e,t={}){var i=Object.assign({},this.registeredDefaults);if(Object.assign(i,e),!1!==t.debugInvalidOptions||this.table.options.debugInvalidOptions)for(var s in t)i.hasOwnProperty(s)||console.warn("Invalid "+this.msgType+" option:",s);for(var s in i)s in t?i[s]=t[s]:Array.isArray(i[s])?i[s]=Object.assign([],i[s]):"object"==typeof i[s]&&null!==i[s]?i[s]=Object.assign({},i[s]):void 0===i[s]&&delete i[s];return i}}class pe extends e{constructor(e){super(e),this.elementVertical=e.rowManager.element,this.elementHorizontal=e.columnManager.element,this.tableElement=e.rowManager.tableElement,this.verticalFillMode="fit"}initialize(){}clearRows(){}clearColumns(){}reinitializeColumnWidths(e){}renderRows(){}renderColumns(){}rerenderRows(e){e&&e()}rerenderColumns(e,t){}renderRowCells(e){}rerenderRowCells(e,t){}scrollColumns(e,t){}scrollRows(e,t){}resize(){}scrollToRow(e){}scrollToRowNearestTop(e){}visibleRows(e){return[]}rows(){return this.table.rowManager.getDisplayRows()}styleRow(e,t){var i=e.getElement();t%2?(i.classList.add("tabulator-row-even"),i.classList.remove("tabulator-row-odd")):(i.classList.add("tabulator-row-odd"),i.classList.remove("tabulator-row-even"))}clear(){this.clearRows(),this.clearColumns()}render(){this.renderRows(),this.renderColumns()}rerender(e){this.rerenderRows(),this.rerenderColumns()}scrollToRowPosition(e,t,i){var o=this.rows().indexOf(e),n=e.getElement(),r=0;return new Promise(((a,l)=>{if(o>-1){if(void 0===i&&(i=this.table.options.scrollToRowIfVisible),!i&&s.elVisible(n)&&(r=s.elOffset(n).top-s.elOffset(this.elementVertical).top)>0&&r{e.element.appendChild(t.getElement()),t.cellRendered()}))}reinitializeColumnWidths(e){e.forEach((function(e){e.reinitializeWidth()}))}}class be extends pe{constructor(e){super(e),this.leftCol=0,this.rightCol=0,this.scrollLeft=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0,this.fitDataColAvg=0,this.windowBuffer=200,this.visibleRows=null,this.initialized=!1,this.isFitData=!1,this.columns=[]}initialize(){this.compatibilityCheck(),this.layoutCheck(),this.vertScrollListen()}compatibilityCheck(){var e=this.options("columns"),t=!0;return"fitDataTable"==this.options("layout")&&(console.warn("Horizontal Virtual DOM is not compatible with fitDataTable layout mode"),t=!1),this.options("responsiveLayout")&&(console.warn("Horizontal Virtual DOM is not compatible with responsive columns"),t=!1),this.options("rtl")&&(console.warn("Horizontal Virtual DOM is not currently compatible with RTL text direction"),t=!1),e&&e.find((e=>e.frozen))&&(console.warn("Horizontal Virtual DOM is not compatible with frozen columns"),t=!1),t}layoutCheck(){this.isFitData=this.options("layout").startsWith("fitData")}vertScrollListen(){this.subscribe("scroll-vertical",this.clearVisRowCache.bind(this)),this.subscribe("data-refreshed",this.clearVisRowCache.bind(this))}clearVisRowCache(){this.visibleRows=null}renderColumns(e,t){this.dataChange()}scrollColumns(e,t){this.scrollLeft!=e&&(this.scrollLeft=e,this.scroll(e-(this.vDomScrollPosLeft+this.windowBuffer)))}calcWindowBuffer(){var e=this.elementVertical.clientWidth;this.table.columnManager.columnsByIndex.forEach((t=>{if(t.visible){var i=t.getWidth();i>e&&(e=i)}})),this.windowBuffer=2*e}rerenderColumns(e,t){var i={cols:this.columns,leftCol:this.leftCol,rightCol:this.rightCol},s=0;e&&!this.initialized||(this.clear(),this.calcWindowBuffer(),this.scrollLeft=this.elementVertical.scrollLeft,this.vDomScrollPosLeft=this.scrollLeft-this.windowBuffer,this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,this.table.columnManager.columnsByIndex.forEach((e=>{var t={};if(e.visible){var i=e.getWidth();t.leftPos=s,t.rightPos=s+i,t.width=i,this.isFitData&&(t.fitDataCheck=!e.modules.vdomHoz||e.modules.vdomHoz.fitDataCheck),s+i>this.vDomScrollPosLeft&&s{e.element.appendChild(t.getElement()),t.cellRendered()}))}rerenderRowCells(e,t){this.reinitializeRow(e,t)}reinitializeColumnWidths(e){for(let e=this.leftCol;e<=this.rightCol;e++)this.columns[e].reinitializeWidth()}deinitialize(){this.initialized=!1}clear(){this.columns=[],this.leftCol=-1,this.rightCol=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0}dataChange(){var e,t,i=!1,s=0;if(this.isFitData){if(this.table.columnManager.columnsByIndex.forEach((e=>{!e.definition.width&&e.visible&&(i=!0)})),i&&i&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,t=this.chain("rows-sample",[1],[],(()=>this.table.rowManager.getDisplayRows()))[0])){e=t.getElement(),t.generateCells(),this.tableElement.appendChild(e);for(s=0;s{e!==this.columns[i]&&(t=!1)})),!t)}reinitializeRows(){this.getVisibleRows().forEach((e=>{this.reinitializeRow(e,!0)}))}getVisibleRows(){return this.visibleRows||(this.visibleRows=this.table.rowManager.getVisibleRows()),this.visibleRows}scroll(e){this.vDomScrollPosLeft+=e,this.vDomScrollPosRight+=e,Math.abs(e)>this.windowBuffer/2?this.rerenderColumns():e>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())}colPositionAdjust(e,t,i){for(let s=e;s{if("group"!==e.type){var i=e.getCell(t);e.getElement().appendChild(i.getElement()),i.cellRendered()}})),this.fitDataColActualWidthCheck(t),this.rightCol++,this.rightCol>=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=t.getWidth()}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}addColLeft(){for(var e=!1;;){let t=this.columns[this.leftCol-1];if(!t)break;if(!(t.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft))break;{e=!0,this.getVisibleRows().forEach((e=>{if("group"!==e.type){var i=e.getCell(t);e.getElement().prepend(i.getElement()),i.cellRendered()}})),this.leftCol--,this.leftCol<=0?this.vDomPadLeft=0:this.vDomPadLeft-=t.getWidth();let i=this.fitDataColActualWidthCheck(t);i&&(this.scrollLeft=this.elementVertical.scrollLeft=this.elementVertical.scrollLeft+i,this.vDomPadRight-=i)}}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}removeColRight(){for(var e=!1;;){let t=this.columns[this.rightCol];if(!t)break;if(!(t.modules.vdomHoz.leftPos>this.vDomScrollPosRight))break;e=!0,this.getVisibleRows().forEach((e=>{if("group"!==e.type){var i=e.getCell(t);try{e.getElement().removeChild(i.getElement())}catch(e){console.warn("Could not removeColRight",e.message)}}})),this.vDomPadRight+=t.getWidth(),this.rightCol--}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}removeColLeft(){for(var e=!1;;){let t=this.columns[this.leftCol];if(!t)break;if(!(t.modules.vdomHoz.rightPos{if("group"!==e.type){var i=e.getCell(t);try{e.getElement().removeChild(i.getElement())}catch(e){console.warn("Could not removeColLeft",e.message)}}})),this.vDomPadLeft+=t.getWidth(),this.leftCol++}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}fitDataColActualWidthCheck(e){var t,i;return e.modules.vdomHoz.fitDataCheck&&(e.reinitializeWidth(),(i=(t=e.getWidth())-e.modules.vdomHoz.width)&&(e.modules.vdomHoz.rightPos+=i,e.modules.vdomHoz.width=t,this.colPositionAdjust(this.columns.indexOf(e)+1,this.columns.length,i)),e.modules.vdomHoz.fitDataCheck=!1),i}initializeRow(e){if("group"!==e.type){e.modules.vdomHoz={leftCol:this.leftCol,rightCol:this.rightCol};for(let t=this.leftCol;t<=this.rightCol;t++){let i=this.columns[t];if(i&&i.visible){let t=e.getCell(i);e.getElement().appendChild(t.getElement()),t.cellRendered()}}}}reinitializeRow(e,t){if("group"!==e.type&&(t||!e.modules.vdomHoz||e.modules.vdomHoz.leftCol!==this.leftCol||e.modules.vdomHoz.rightCol!==this.rightCol)){for(var i=e.getElement();i.firstChild;)i.removeChild(i.firstChild);this.initializeRow(e)}}}class fe extends e{constructor(e){super(e),this.blockHozScrollEvent=!1,this.headersElement=null,this.element=null,this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.scrollLeft=0,this.optionsList=new me(this.table,"column definition",g),this.renderer=null}initialize(){this.initializeRenderer(),this.headersElement=this.createHeadersElement(),this.element=this.createHeaderElement(),this.element.insertBefore(this.headersElement,this.element.firstChild),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this))}initializeRenderer(){var e,t={virtual:be,basic:ge};(e="string"==typeof this.table.options.renderHorizontal?t[this.table.options.renderHorizontal]:this.table.options.renderHorizontal)?(this.renderer=new e(this.table,this.element,this.tableElement),this.renderer.initialize()):console.error("Unable to find matching renderer:",table.options.renderHorizontal)}createHeadersElement(){var e=document.createElement("div");return e.classList.add("tabulator-headers"),e.setAttribute("role","row"),e}createHeaderElement(){var e=document.createElement("div");return e.classList.add("tabulator-header"),e.setAttribute("role","rowgroup"),this.table.options.headerVisible||e.classList.add("tabulator-header-hidden"),e}getElement(){return this.element}getHeadersElement(){return this.headersElement}scrollHorizontal(e){var t=0,i=this.element.scrollWidth-this.table.element.clientWidth;this.element.scrollLeft=e,e>i?(t=e-i,this.element.style.marginLeft=-t+"px"):this.element.style.marginLeft=0,this.scrollLeft=e,this.renderer.scrollColumns(e)}generateColumnsFromRowData(e){var t,i,s=[],o=this.table.options.autoColumnsDefinitions;if(e&&e.length){for(var n in t=e[0]){let e={field:n,title:n},o=t[n];switch(typeof o){case"undefined":i="string";break;case"boolean":i="boolean";break;case"object":i=Array.isArray(o)?"array":"string";break;default:i=isNaN(o)||""===o?o.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?"alphanum":"string":"number"}e.sorter=i,s.push(e)}if(o)switch(typeof o){case"function":this.table.options.columns=o.call(this.table,s);break;case"object":Array.isArray(o)?s.forEach((e=>{var t=o.find((t=>t.field===e.field));t&&Object.assign(e,t)})):s.forEach((e=>{o[e.field]&&Object.assign(e,o[e.field])})),this.table.options.columns=s}else this.table.options.columns=s;this.setColumns(this.table.options.columns)}}setColumns(e,t){for(;this.headersElement.firstChild;)this.headersElement.removeChild(this.headersElement.firstChild);this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.dispatch("columns-loading"),e.forEach(((e,t)=>{this._addColumn(e)})),this._reIndexColumns(),this.dispatch("columns-loaded"),this.renderer.rerenderColumns(!1,!0),this.redraw(!0)}_addColumn(e,t,i){var s=new b(e,this),o=s.getElement(),n=i?this.findColumnIndex(i):i;if(i&&n>-1){var r=i.getTopColumn(),a=this.columns.indexOf(r),l=r.getElement();t?(this.columns.splice(a,0,s),l.parentNode.insertBefore(o,l)):(this.columns.splice(a+1,0,s),l.parentNode.insertBefore(o,l.nextSibling))}else t?(this.columns.unshift(s),this.headersElement.insertBefore(s.getElement(),this.headersElement.firstChild)):(this.columns.push(s),this.headersElement.appendChild(s.getElement()));return s.columnRendered(),s}registerColumnField(e){e.definition.field&&(this.columnsByField[e.definition.field]=e)}registerColumnPosition(e){this.columnsByIndex.push(e)}_reIndexColumns(){this.columnsByIndex=[],this.columns.forEach((function(e){e.reRegisterPosition()}))}verticalAlignHeaders(){var e=0;this.columns.forEach((t=>{var i;t.clearVerticalAlign(),(i=t.getHeight())>e&&(e=i)})),this.columns.forEach((t=>{t.verticalAlign(this.table.options.columnHeaderVertAlign,e)})),this.table.rowManager.adjustTableSize()}findColumn(e){if("object"!=typeof e)return this.columnsByField[e]||!1;if(e instanceof b)return e;if(e instanceof p)return e._getSelf()||!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){return this.columns.find((t=>t.element===e))||!1}return!1}getColumnByField(e){return this.columnsByField[e]}getColumnsByFieldRoot(e){var t=[];return Object.keys(this.columnsByField).forEach((i=>{i.split(".")[0]===e&&t.push(this.columnsByField[i])})),t}getColumnByIndex(e){return this.columnsByIndex[e]}getFirstVisibleColumn(e){return(e=this.columnsByIndex.findIndex((e=>e.visible)))>-1&&this.columnsByIndex[e]}getColumns(){return this.columns}findColumnIndex(e){return this.columnsByIndex.findIndex((t=>e===t))}getRealColumns(){return this.columnsByIndex}traverse(e){this.columnsByIndex.forEach(((t,i)=>{e(t,i)}))}getDefinitions(e){var t=[];return this.columnsByIndex.forEach((i=>{(!e||e&&i.visible)&&t.push(i.getDefinition())})),t}getDefinitionTree(){var e=[];return this.columns.forEach((t=>{e.push(t.getDefinition(!0))})),e}getComponents(e){var t=[];return(e?this.columns:this.columnsByIndex).forEach((e=>{t.push(e.getComponent())})),t}getWidth(){var e=0;return this.columnsByIndex.forEach((t=>{t.visible&&(e+=t.getWidth())})),e}moveColumn(e,t,i){this.moveColumnActual(e,t,i),t.element.parentNode.insertBefore(e.element,t.element),i&&t.element.parentNode.insertBefore(t.element,e.element),this.verticalAlignHeaders(),this.table.rowManager.reinitialize()}moveColumnActual(e,t,i){e.parent.isGroup?this._moveColumnInArray(e.parent.columns,e,t,i):this._moveColumnInArray(this.columns,e,t,i),this._moveColumnInArray(this.columnsByIndex,e,t,i,!0),this.renderer.rerenderColumns(!0),this.dispatch("column-moved",e,t,i),this.subscribedExternal("columnMoved")&&this.dispatchExternal("columnMoved",e.getComponent(),this.table.columnManager.getComponents())}_moveColumnInArray(e,t,i,s,o){var n,r=e.indexOf(t);r>-1&&(e.splice(r,1),(n=e.indexOf(i))>-1?s&&(n+=1):n=r,e.splice(n,0,t),o&&(this.chain("column-moving-rows",[t,i,s],null,[])||[]).concat(this.table.rowManager.rows).forEach((function(e){if(e.cells.length){var t=e.cells.splice(r,1)[0];e.cells.splice(n,0,t)}})))}scrollToColumn(e,t,i){var s=0,o=0,n=0,r=e.getElement();return new Promise(((a,l)=>{if(void 0===t&&(t=this.table.options.scrollToColumnPosition),void 0===i&&(i=this.table.options.scrollToColumnIfVisible),e.visible){switch(t){case"middle":case"center":n=-this.element.clientWidth/2;break;case"right":n=r.clientWidth-this.headersElement.clientWidth}if(!i&&(o=r.offsetLeft)>0&&o+r.offsetWidth{t.push(i.generateCell(e))})),t}getFlexBaseWidth(){var e=this.table.element.clientWidth,t=0;return this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(e-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),this.columnsByIndex.forEach((function(i){var s,o,n;i.visible&&(s=i.definition.width||0,o=parseInt(i.minWidth),n="string"==typeof s?s.indexOf("%")>-1?e/100*parseInt(s):parseInt(s):s,t+=n>o?n:o)})),t}addColumn(e,t,i){return new Promise(((s,o)=>{var n=this._addColumn(e,t,i);this._reIndexColumns(),this.dispatch("column-add",e,t,i),"fitColumns"!=this.layoutMode()&&n.reinitializeWidth(),this.redraw(!0),this.table.rowManager.reinitialize(),this.renderer.rerenderColumns(),s(n)}))}deregisterColumn(e){var t,i=e.getField();i&&delete this.columnsByField[i],(t=this.columnsByIndex.indexOf(e))>-1&&this.columnsByIndex.splice(t,1),(t=this.columns.indexOf(e))>-1&&this.columns.splice(t,1),this.verticalAlignHeaders(),this.redraw()}redraw(e){s.elVisible(this.element)&&this.verticalAlignHeaders(),e&&(this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),this.confirm("table-redrawing",e)||this.layoutRefresh(),this.dispatch("table-redraw",e),this.table.footerManager.redraw()}}class ve extends pe{constructor(e){super(e),this.verticalFillMode="fill",this.scrollTop=0,this.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0}clearRows(){for(var e=this.tableElement;e.firstChild;)e.removeChild(e.firstChild);e.scrollTop=0,e.scrollLeft=0,e.style.minWidth="",e.style.minHeight="",e.style.display="",e.style.visibility=""}renderRows(){var e=this.tableElement,t=!0;this.rows().forEach(((i,s)=>{this.styleRow(i,s),e.appendChild(i.getElement()),i.initialize(!0),"group"!==i.type&&(t=!1)})),e.style.minWidth=t?this.table.columnManager.getWidth()+"px":""}rerenderRows(e){this.clearRows(),this.renderRows(),e&&e()}scrollToRowNearestTop(e){var t=s.elOffset(e.getElement()).top;return!(Math.abs(this.elementVertical.scrollTop-t)>Math.abs(this.elementVertical.scrollTop+this.elementVertical.clientHeight-t))}scrollToRow(e){var t=e.getElement();this.elementVertical.scrollTop=s.elOffset(t).top-s.elOffset(this.elementVertical).top+this.elementVertical.scrollTop}visibleRows(e){return this.rows()}}class we extends pe{constructor(e){super(e),this.verticalFillMode="fill",this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[]}clearRows(){for(var e=this.tableElement;e.firstChild;)e.removeChild(e.firstChild);e.style.paddingTop="",e.style.paddingBottom="",e.style.minHeight="",e.style.display="",e.style.visibility="",this.elementVertical.scrollTop=0,this.elementVertical.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0,this.vDomTop=0,this.vDomBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0}renderRows(){this._virtualRenderFill()}rerenderRows(e){for(var t=this.elementVertical.scrollTop,i=!1,s=!1,o=this.table.rowManager.scrollLeft,n=this.rows(),r=this.vDomTop;r<=this.vDomBottom;r++)if(n[r]){var a=t-n[r].getElement().offsetTop;if(!(!1===s||Math.abs(a){e.deinitializeHeight()})),e&&e(),this._virtualRenderFill(!1===i?this.rows.length-1:i,!0,s||0),this.scrollColumns(o)}scrollColumns(e){this.table.rowManager.scrollHorizontal(e)}scrollRows(e,t){var i=e-this.vDomScrollPosTop,s=e-this.vDomScrollPosBottom,o=2*this.vDomWindowBuffer,n=this.rows();if(this.scrollTop=e,-i>o||s>o){var r=this.table.rowManager.scrollLeft;this._virtualRenderFill(Math.floor(this.elementVertical.scrollTop/this.elementVertical.scrollHeight*n.length)),this.scrollColumns(r)}else t?(i<0&&this._addTopRow(n,-i),s<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(n,-s):this.vDomScrollPosBottom=this.scrollTop)):(s>=0&&this._addBottomRow(n,s),i>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(n,i):this.vDomScrollPosTop=this.scrollTop))}resize(){this.vDomWindowBuffer=this.table.options.renderVerticalBuffer||this.elementVertical.clientHeight}scrollToRowNearestTop(e){var t=this.rows().indexOf(e);return!(Math.abs(this.vDomTop-t)>Math.abs(this.vDomBottom-t))}scrollToRow(e){var t=this.rows().indexOf(e);t>-1&&this._virtualRenderFill(t,!0)}visibleRows(e){var t=this.elementVertical.scrollTop,i=this.elementVertical.clientHeight+t,s=!1,o=0,n=0,r=this.rows();if(e)o=this.vDomTop,n=this.vDomBottom;else for(var a=this.vDomTop;a<=this.vDomBottom;a++)if(r[a])if(s){if(!(i-r[a].getElement().offsetTop>=0))break;n=a}else if(t-r[a].getElement().offsetTop>=0)o=a;else{if(s=!0,!(i-r[a].getElement().offsetTop>=0))break;n=a}return r.slice(o,n+1)}_virtualRenderFill(e,t,i){var o=this.tableElement,n=this.elementVertical,r=0,a=0,l=0,h=0,d=0,c=this.rows(),u=c.length,m=this.elementVertical.clientHeight;if(i=i||0,e=e||0){for(;o.firstChild;)o.removeChild(o.firstChild);(l=(u-e+1)*this.vDomRowHeight)this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*p),this.vDomBottom++,d++}e?(this.vDomTopPad=t?this.vDomRowHeight*this.vDomTop+i:this.scrollTop-h,this.vDomBottomPad=this.vDomBottom==u-1?0:Math.max(this.vDomScrollHeight-this.vDomTopPad-a-h,0)):(this.vDomTopPad=0,this.vDomRowHeight=Math.floor((a+h)/d),this.vDomBottomPad=this.vDomRowHeight*(u-this.vDomBottom-1),this.vDomScrollHeight=h+a+this.vDomBottomPad-m),o.style.paddingTop=this.vDomTopPad+"px",o.style.paddingBottom=this.vDomBottomPad+"px",t&&(this.scrollTop=this.vDomTopPad+h+i-(this.elementVertical.scrollWidth>this.elementVertical.clientWidth?this.elementVertical.offsetHeight-m:0)),this.scrollTop=Math.min(this.scrollTop,this.elementVertical.scrollHeight-m),this.elementVertical.scrollWidth>this.elementVertical.offsetWidth&&t&&(this.scrollTop+=this.elementVertical.offsetHeight-m),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,n.scrollTop=this.scrollTop,this.dispatch("render-virtual-fill")}}_addTopRow(e,t){for(var i=this.tableElement,s=[],o=0,n=this.vDomTop-1,r=0;this.vDomTop;){let a,l,h=e[n];if(!(h&&r=a))break;this.styleRow(h,n),i.insertBefore(h.getElement(),i.firstChild),h.initialized&&h.heightInitialized||s.push(h),h.initialize(),l||(a=h.getElement().offsetHeight,a>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*a)),t-=a,o+=a,this.vDomTop--,n--,r++}for(let e of s)e.clearCellHeight();this._quickNormalizeRowHeight(s),o&&(this.vDomTopPad-=o,this.vDomTopPad<0&&(this.vDomTopPad=n*this.vDomRowHeight),n<1&&(this.vDomTopPad=0),i.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=o)}_removeTopRow(e,t){for(var i=[],s=0,o=0;;){let n,r=e[this.vDomTop];if(!(r&&o=n))break;this.vDomTop++,t-=n,s+=n,i.push(r),o++}for(let e of i){let t=e.getElement();t.parentNode&&t.parentNode.removeChild(t)}s&&(this.vDomTopPad+=s,this.tableElement.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?s:s+this.vDomWindowBuffer)}_addBottomRow(e,t){for(var i=this.tableElement,s=[],o=0,n=this.vDomBottom+1,r=0;;){let a,l,h=e[n];if(!(h&&r=a))break;this.styleRow(h,n),i.appendChild(h.getElement()),h.initialized&&h.heightInitialized||s.push(h),h.initialize(),l||(a=h.getElement().offsetHeight,a>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*a)),t-=a,o+=a,this.vDomBottom++,n++,r++}for(let e of s)e.clearCellHeight();this._quickNormalizeRowHeight(s),o&&(this.vDomBottomPad-=o,(this.vDomBottomPad<0||n==e.length-1)&&(this.vDomBottomPad=0),i.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=o)}_removeBottomRow(e,t){for(var i=[],s=0,o=0;;){let n,r=e[this.vDomBottom];if(!(r&&o=n))break;this.vDomBottom--,t-=n,s+=n,i.push(r),o++}for(let e of i){let t=e.getElement();t.parentNode&&t.parentNode.removeChild(t)}s&&(this.vDomBottomPad+=s,this.vDomBottomPad<0&&(this.vDomBottomPad=0),this.tableElement.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=s)}_quickNormalizeRowHeight(e){for(let t of e)t.calcHeight();for(let t of e)t.setCellHeight()}}class Ce extends e{constructor(e){super(e),this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.placeholder=null,this.placeholderContents=null,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRowsPipeline=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.rowNumColumn=!1,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRenderInPosition=!1,this.dataPipeline=[],this.displayPipeline=[],this.renderer=null}createHolderElement(){var e=document.createElement("div");return e.classList.add("tabulator-tableholder"),e.setAttribute("tabindex",0),e.setAttribute("role","rowgroup"),e}createTableElement(){var e=document.createElement("div");return e.classList.add("tabulator-table"),e.setAttribute("role","rowgroup"),e}initializePlaceholder(){if("string"==typeof this.table.options.placeholder){let e=document.createElement("div");e.classList.add("tabulator-placeholder");let t=document.createElement("div");t.classList.add("tabulator-placeholder-contents"),t.innerHTML=this.table.options.placeholder,e.appendChild(t),this.placeholderContents=t,this.placeholder=e}}getElement(){return this.element}getTableElement(){return this.tableElement}getRowPosition(e,t){return t?this.activeRows.indexOf(e):this.rows.indexOf(e)}initialize(){this.initializePlaceholder(),this.initializeRenderer(),this.element.appendChild(this.tableElement),this.firstRender=!0,this.element.addEventListener("scroll",(()=>{var e=this.element.scrollLeft,t=this.scrollLeft>e,i=this.element.scrollTop,s=this.scrollTop>i;this.scrollLeft!=e&&(this.scrollLeft=e,this.dispatch("scroll-horizontal",e,t),this.dispatchExternal("scrollHorizontal",e,t),this._positionPlaceholder()),this.scrollTop!=i&&(this.scrollTop=i,this.renderer.scrollRows(i,s),this.dispatch("scroll-vertical",i,s),this.dispatchExternal("scrollVertical",i,s))}))}findRow(e){if("object"!=typeof e){if(null==e)return!1;return this.rows.find((t=>t.data[this.table.options.index]==e))||!1}if(e instanceof v)return e;if(e instanceof f)return e._getSelf()||!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){return this.rows.find((t=>t.getElement()===e))||!1}return!1}getRowFromDataObject(e){return this.rows.find((t=>t.data===e))||!1}getRowFromPosition(e,t){return t?this.activeRows[e]:this.rows[e]}scrollToRow(e,t,i){return this.renderer.scrollToRowPosition(e,t,i)}setData(e,t,i){return new Promise(((s,o)=>{t&&this.getDisplayRows().length?this.table.options.pagination?this._setDataActual(e,!0):this.reRenderInPosition((()=>{this._setDataActual(e)})):(this.table.options.autoColumns&&i&&this.table.initialized&&this.table.columnManager.generateColumnsFromRowData(e),this.resetScroll(),this._setDataActual(e)),s()}))}_setDataActual(e,t){this.dispatchExternal("dataProcessing",e),this._wipeElements(),Array.isArray(e)?(this.dispatch("data-processing",e),e.forEach(((e,t)=>{if(e&&"object"==typeof e){var i=new v(e,this);this.rows.push(i)}else console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:",e)})),this.refreshActiveData(!1,!1,t),this.dispatch("data-processed",e),this.dispatchExternal("dataProcessed",e)):console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ",typeof e,"\nData: ",e)}_wipeElements(){this.dispatch("rows-wipe"),this.rows.forEach((e=>{e.wipe()})),this.rows=[],this.activeRows=[],this.activeRowsPipeline=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.adjustTableSize()}deleteRow(e,t){var i=this.rows.indexOf(e),s=this.activeRows.indexOf(e);s>-1&&this.activeRows.splice(s,1),i>-1&&this.rows.splice(i,1),this.setActiveRows(this.activeRows),this.displayRowIterator((t=>{var i=t.indexOf(e);i>-1&&t.splice(i,1)})),t||this.reRenderInPosition(),this.regenerateRowNumbers(),this.dispatchExternal("rowDeleted",e.getComponent()),this.displayRowsCount||this._showPlaceholder(),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.getData())}addRow(e,t,i,s){return this.addRowActual(e,t,i,s)}addRows(e,t,i){var s=[];return new Promise(((o,n)=>{t=this.findAddRowPos(t),Array.isArray(e)||(e=[e]),e.length,(void 0===i&&t||void 0!==i&&!t)&&e.reverse(),e.forEach(((o,n)=>{var r=this.addRow(o,t,i,!0);s.push(r),this.dispatch("row-added",r,e,t,i)})),this.refreshActiveData(!1,!1,!0),this.regenerateRowNumbers(),s.length&&this._clearPlaceholder(),o(s)}))}findAddRowPos(e){return void 0===e&&(e=this.table.options.addRowPos),"pos"===e&&(e=!0),"bottom"===e&&(e=!1),e}addRowActual(e,t,i,s){var o,n,r=e instanceof v?e:new v(e||{},this),a=this.findAddRowPos(t),l=-1;return i||(n=this.chain("row-adding-position",[r,a],null,{index:i,top:a}),i=n.index,a=n.top),void 0!==i&&(i=this.findRow(i)),(i=this.chain("row-adding-index",[r,i,a],null,i))&&(l=this.rows.indexOf(i)),i&&l>-1?(o=this.activeRows.indexOf(i),this.displayRowIterator((function(e){var t=e.indexOf(i);t>-1&&e.splice(a?t:t+1,0,r)})),o>-1&&this.activeRows.splice(a?o:o+1,0,r),this.rows.splice(a?l:l+1,0,r)):a?(this.displayRowIterator((function(e){e.unshift(r)})),this.activeRows.unshift(r),this.rows.unshift(r)):(this.displayRowIterator((function(e){e.push(r)})),this.activeRows.push(r),this.rows.push(r)),this.setActiveRows(this.activeRows),this.dispatchExternal("rowAdded",r.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),s||this.reRenderInPosition(),r}moveRow(e,t,i){this.dispatch("row-move",e,t,i),this.moveRowActual(e,t,i),this.regenerateRowNumbers(),this.dispatch("row-moved",e,t,i),this.dispatchExternal("rowMoved",e.getComponent())}moveRowActual(e,t,i){this.moveRowInArray(this.rows,e,t,i),this.moveRowInArray(this.activeRows,e,t,i),this.displayRowIterator((s=>{this.moveRowInArray(s,e,t,i)})),this.dispatch("row-moving",e,t,i)}moveRowInArray(e,t,i,s){var o,n,r;if(t!==i&&((o=e.indexOf(t))>-1&&(e.splice(o,1),(n=e.indexOf(i))>-1?s?e.splice(n+1,0,t):e.splice(n,0,t):e.splice(o,0,t)),e===this.getDisplayRows())){r=n>o?n:o+1;for(let t=o-1&&t}nextDisplayRow(e,t){var i=this.getDisplayRowIndex(e),s=!1;return!1!==i&&i-1)&&i}getData(e,t){var i=[];return this.getRows(e).forEach((function(e){"row"==e.type&&i.push(e.getData(t||"data"))})),i}getComponents(e){var t=[];return this.getRows(e).forEach((function(e){t.push(e.getComponent())})),t}getDataCount(e){return this.getRows(e).length}scrollHorizontal(e){this.scrollLeft=e,this.element.scrollLeft=e,this.dispatch("scroll-horizontal",e)}registerDataPipelineHandler(e,t){void 0!==t?(this.dataPipeline.push({handler:e,priority:t}),this.dataPipeline.sort(((e,t)=>e.priority-t.priority))):console.error("Data pipeline handlers must have a priority in order to be registered")}registerDisplayPipelineHandler(e,t){void 0!==t?(this.displayPipeline.push({handler:e,priority:t}),this.displayPipeline.sort(((e,t)=>e.priority-t.priority))):console.error("Display pipeline handlers must have a priority in order to be registered")}refreshActiveData(e,t,i){var o=this.table,n="",r=0,a=["all","dataPipeline","display","displayPipeline","end"];if("function"==typeof e)if((r=this.dataPipeline.findIndex((t=>t.handler===e)))>-1)n="dataPipeline",t&&(r==this.dataPipeline.length-1?n="display":r++);else{if(!((r=this.displayPipeline.findIndex((t=>t.handler===e)))>-1))return void console.error("Unable to refresh data, invalid handler provided",e);n="displayPipeline",t&&(r==this.displayPipeline.length-1?n="end":r++)}else n=e||"all",r=0;this.redrawBlock?(!this.redrawBlockRestoreConfig||this.redrawBlockRestoreConfig&&(this.redrawBlockRestoreConfig.stage===n&&r{var t=e.getCell(this.rowNumColumn);t&&t._generateContents()}))}setActiveRows(e){this.activeRows=e,this.activeRowsCount=this.activeRows.length}resetDisplayRows(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length}getNextDisplayIndex(){return this.displayRows.length}setDisplayRows(e,t){var i=!0;return t&&void 0!==this.displayRows[t]?(this.displayRows[t]=e,i=!0):(this.displayRows.push(e),i=t=this.displayRows.length-1),t==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length),i}getDisplayRows(e){return void 0===e?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[e]||[]}getVisibleRows(e,t){var i=Object.assign([],this.renderer.visibleRows(!t));return e&&(i=this.chain("rows-visible",[t],i,i)),i}displayRowIterator(e){this.activeRowsPipeline.forEach(e),this.displayRows.forEach(e),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length}getRows(e){var t;switch(e){case"active":t=this.activeRows;break;case"display":t=this.table.rowManager.getDisplayRows();break;case"visible":t=this.getVisibleRows(!1,!0);break;default:t=this.chain("rows-retrieve",e,null,this.rows)||this.rows}return t}reRenderInPosition(e){this.redrawBlock?e?e():this.redrawBlockRenderInPosition=!0:this.renderer.rerenderRows(e)}initializeRenderer(){var e,t={virtual:we,basic:ve};(e="string"==typeof this.table.options.renderVertical?t[this.table.options.renderVertical]:this.table.options.renderVertical)?(this.renderer=new e(this.table,this.element,this.tableElement),this.renderer.initialize(),this.table.element.clientHeight||this.table.options.height?this.fixedHeight=!0:this.fixedHeight=!1):console.error("Unable to find matching renderer:",table.options.renderVertical)}getRenderMode(){return this.renderMode}renderTable(){this.dispatchExternal("renderStarted"),this.element.scrollTop=0,this._clearTable(),this.displayRowsCount?(this.renderer.renderRows(),this.firstRender&&(this.firstRender=!1,this.layoutRefresh())):this.renderEmptyScroll(),this.fixedHeight||this.adjustTableSize(),this.dispatch("table-layout"),this.displayRowsCount||this._showPlaceholder(),this.dispatchExternal("renderComplete")}renderEmptyScroll(){this.placeholder?this.tableElement.style.display="none":this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px"}_clearTable(){this.tableElement;this._clearPlaceholder(),this.scrollTop=0,this.scrollLeft=0,this.renderer.clearRows()}_showPlaceholder(){this.placeholder&&(this.placeholder.setAttribute("tabulator-render-mode",this.renderMode),this.getElement().appendChild(this.placeholder),this._positionPlaceholder())}_clearPlaceholder(){this.placeholder&&this.placeholder.parentNode&&this.placeholder.parentNode.removeChild(this.placeholder)}_positionPlaceholder(){this.placeholder&&this.placeholder.parentNode&&(this.placeholder.style.width=this.table.columnManager.getWidth()+"px",this.placeholderContents.style.width=this.table.rowManager.element.clientWidth+"px",this.placeholderContents.style.marginLeft=this.scrollLeft+"px")}styleRow(e,t){var i=e.getElement();t%2?(i.classList.add("tabulator-row-even"),i.classList.remove("tabulator-row-odd")):(i.classList.add("tabulator-row-odd"),i.classList.remove("tabulator-row-even"))}normalizeHeight(){this.activeRows.forEach((function(e){e.normalizeHeight()}))}adjustTableSize(){var e=this.element.clientHeight;if("fill"===this.renderer.verticalFillMode){let t=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));this.fixedHeight?(this.element.style.minHeight="calc(100% - "+t+"px)",this.element.style.height="calc(100% - "+t+"px)",this.element.style.maxHeight="calc(100% - "+t+"px)"):(this.element.style.height="",this.element.style.height=this.table.element.clientHeight-t+"px",this.element.scrollTop=this.scrollTop),this.renderer.resize(),this.fixedHeight||e==this.element.clientHeight||(this.subscribed("table-resize")?this.dispatch("table-resize"):this.redraw())}this._positionPlaceholder()}reinitialize(){this.rows.forEach((function(e){e.reinitialize(!0)}))}blockRedraw(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1}restoreRedraw(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.handler,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRenderInPosition&&this.reRenderInPosition(),this.redrawBlockRenderInPosition=!1}redraw(e){var t=this.scrollLeft;this.adjustTableSize(),this.table.tableWidth=this.table.element.clientWidth,e?this.renderTable():(this.reRenderInPosition(),this.scrollHorizontal(t))}resetScroll(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var e=document.createEvent("Event");e.initEvent("scroll",!1,!0),this.element.dispatchEvent(e)}else this.element.dispatchEvent(new Event("scroll"))}}class Ee extends e{constructor(e){super(e),this.active=!1,this.element=this.createElement(),this.containerElement=this.createContainerElement(),this.external=!1,this.links=[]}initialize(){this.initializeElement()}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-footer"),e}createContainerElement(){var e=document.createElement("div");return e.classList.add("tabulator-footer-contents"),this.element.appendChild(e),e}initializeElement(){if(this.table.options.footerElement)switch(typeof this.table.options.footerElement){case"string":"<"===this.table.options.footerElement[0]?this.containerElement.innerHTML=this.table.options.footerElement:(this.external=!0,this.containerElement=document.querySelector(this.table.options.footerElement));break;default:this.element=this.table.options.footerElement}}getElement(){return this.element}append(e,t){this.activate(t),this.containerElement.appendChild(e),this.table.rowManager.adjustTableSize()}prepend(e,t){this.activate(t),this.element.insertBefore(e,this.element.firstChild),this.table.rowManager.adjustTableSize()}remove(e){e.parentNode.removeChild(e),this.deactivate()}deactivate(e){this.element.firstChild&&!e||(this.external||this.element.parentNode.removeChild(this.element),this.active=!1)}activate(e){this.active||(this.active=!0,this.external||(this.table.element.appendChild(this.getElement()),this.table.element.style.display="")),e&&this.links.push(e)}redraw(){this.links.forEach((function(e){e.footerRedraw()}))}}class ye extends e{constructor(e){super(e),this.el=null,this.abortClasses=["tabulator-headers","tabulator-table"],this.previousTargets={},this.listeners=["click","dblclick","contextmenu","mouseenter","mouseleave","mouseover","mouseout","mousemove","touchstart","touchend"],this.componentMap={"tabulator-cell":"cell","tabulator-row":"row","tabulator-group":"group","tabulator-col":"column"},this.pseudoTrackers={row:{subscriber:null,target:null},cell:{subscriber:null,target:null},group:{subscriber:null,target:null},column:{subscriber:null,target:null}},this.pseudoTracking=!1}initialize(){this.el=this.table.element,this.buildListenerMap(),this.bindSubscriptionWatchers()}buildListenerMap(){var e={};this.listeners.forEach((t=>{e[t]={handler:null,components:[]}})),this.listeners=e}bindPseudoEvents(){Object.keys(this.pseudoTrackers).forEach((e=>{this.pseudoTrackers[e].subscriber=this.pseudoMouseEnter.bind(this,e),this.subscribe(e+"-mouseover",this.pseudoTrackers[e].subscriber)})),this.pseudoTracking=!0}pseudoMouseEnter(e,t,i){this.pseudoTrackers[e].target!==i&&(this.pseudoTrackers[e].target&&this.dispatch(e+"-mouseleave",t,i),this.pseudoMouseLeave(e,t),this.pseudoTrackers[e].target=i,this.dispatch(e+"-mouseenter",t,i))}pseudoMouseLeave(e,t){var i=Object.keys(this.pseudoTrackers),s={row:["cell"],cell:["row"]};(i=i.filter((t=>{var i=s[e];return t!==e&&(!i||i&&!i.includes(t))}))).forEach((e=>{var i=this.pseudoTrackers[e].target;this.pseudoTrackers[e].target&&(this.dispatch(e+"-mouseleave",t,i),this.pseudoTrackers[e].target=null)}))}bindSubscriptionWatchers(){var e=Object.keys(this.listeners),t=Object.values(this.componentMap);for(let i of t)for(let t of e){let e=i+"-"+t;this.subscriptionChange(e,this.subscriptionChanged.bind(this,i,t))}this.subscribe("table-destroy",this.clearWatchers.bind(this))}subscriptionChanged(e,t,i){var s=this.listeners[t].components,o=s.indexOf(e),n=!1;i?-1===o&&(s.push(e),n=!0):this.subscribed(e+"-"+t)||o>-1&&(s.splice(o,1),n=!0),"mouseenter"!==t&&"mouseleave"!==t||this.pseudoTracking||this.bindPseudoEvents(),n&&this.updateEventListeners()}updateEventListeners(){for(let e in this.listeners){let t=this.listeners[e];t.components.length?t.handler||(t.handler=this.track.bind(this,e),this.el.addEventListener(e,t.handler)):t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}track(e,t){var i=t.composedPath&&t.composedPath()||t.path,s=this.findTargets(i);s=this.bindComponents(e,s),this.triggerEvents(e,t,s),!this.pseudoTracking||"mouseover"!=e&&"mouseleave"!=e||Object.keys(s).length||this.pseudoMouseLeave("none",t)}findTargets(e){var t={};let i=Object.keys(this.componentMap);for(let s of e){let e=s.classList?[...s.classList]:[];if(e.filter((e=>this.abortClasses.includes(e))).length)break;let o=e.filter((e=>i.includes(e)));for(let e of o)t[this.componentMap[e]]=s}return t.group&&t.group===t.row&&delete t.row,t}bindComponents(e,t){var i=Object.keys(t).reverse(),s=this.listeners[e],o={};for(let e of i){let i,n=t[e],r=this.previousTargets[e];if(r&&r.target===n)i=r.component;else switch(e){case"row":case"group":if(s.components.includes("row")||s.components.includes("cell")||s.components.includes("group")){i=this.table.rowManager.getVisibleRows(!0).find((e=>e.getElement()===n)),t.row&&t.row.parentNode&&t.row.parentNode.closest(".tabulator-row")&&(t[e]=!1)}break;case"column":s.components.includes("column")&&(i=this.table.columnManager.findColumn(n));break;case"cell":s.components.includes("cell")&&(t.row instanceof v?i=t.row.findCell(n):t.row&&console.warn("Event Target Lookup Error - The row this cell is attached to cannot be found, has the table been reinitialized without being destroyed first?"))}i&&(t[e]=i,o[e]={target:n,component:i})}return this.previousTargets=o,t}triggerEvents(e,t,i){var s=this.listeners[e];for(let o in i)i[o]&&s.components.includes(o)&&this.dispatch(o+"-"+e,t,i[o])}clearWatchers(){for(let e in this.listeners){let t=this.listeners[e];t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}}class Re{constructor(e){this.table=e,this.bindings={}}bind(e,t,i){this.bindings[e]||(this.bindings[e]={}),this.bindings[e][t]?console.warn("Unable to bind component handler, a matching function name is already bound",e,t,hanlder):this.bindings[e][t]=i}handle(e,t,i){if(this.bindings[e]&&this.bindings[e][i])return this.bindings[e][i].bind(null,t);"then"===i||"string"!=typeof i||i.startsWith("_")||console.error("The "+e+" component does not have a "+i+" function, have you checked that you have the correct Tabulator module installed?")}}class xe extends e{constructor(e){super(e),this.loaderElement=this.createLoaderElement(),this.msgElement=this.createMsgElement(),this.loadingElement=null,this.errorElement=null,this.requestOrder=0,this.loading=!1}initialize(){var e;this.loaderElement.appendChild(this.msgElement),this.table.options.dataLoaderLoading&&("string"==typeof this.table.options.dataLoaderLoading?((e=document.createElement("template")).innerHTML=this.table.options.dataLoaderLoading.trim(),this.loadingElement=e.firstElementChild):this.loadingElement=this.table.options.dataLoaderLoading),this.table.options.dataLoaderError&&("string"==typeof this.table.options.dataLoaderError?((e=document.createElement("template")).innerHTML=this.table.options.dataLoaderError.trim(),this.errorElement=e.firstElementChild):this.errorElement=this.table.options.dataLoaderError)}createLoaderElement(){var e=document.createElement("div");return e.classList.add("tabulator-loader"),e}createMsgElement(){var e=document.createElement("div");return e.classList.add("tabulator-loader-msg"),e.setAttribute("role","alert"),e}load(e,t,i,s,o){var n=++this.requestOrder;return this.dispatchExternal("dataLoading",e),!e||0!=e.indexOf("{")&&0!=e.indexOf("[")||(e=JSON.parse(e)),this.confirm("data-loading",[e,t,i,o])?(this.loading=!0,o||this.showLoader(),t=this.chain("data-params",[e,i,o],t||{},t||{}),t=this.mapParams(t,this.table.options.dataSendParams),this.chain("data-load",[e,t,i,o],!1,Promise.resolve([])).then((e=>{Array.isArray(e)||"object"!=typeof e||(e=this.mapParams(e,this.objectInvert(this.table.options.dataReceiveParams)));var t=this.chain("data-loaded",e,null,e);n==this.requestOrder?(this.hideLoader(),!1!==t&&(this.dispatchExternal("dataLoaded",t),this.table.rowManager.setData(t,s,!s))):console.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")})).catch((e=>{console.error("Data Load Error: ",e),this.dispatchExternal("dataLoadError",e),o||this.showError(),setTimeout((()=>{this.hideLoader()}),this.table.options.dataLoaderErrorTimeout)})).finally((()=>{this.loading=!1}))):(this.dispatchExternal("dataLoaded",e),e||(e=[]),this.table.rowManager.setData(e,s,!s),Promise.resolve())}mapParams(e,t){var i={};for(let s in e)i[t.hasOwnProperty(s)?t[s]:s]=e[s];return i}objectInvert(e){var t={};for(let i in e)t[e[i]]=i;return t}blockActiveLoad(){this.requestOrder++}showLoader(){if("function"==typeof this.table.options.dataLoader?this.table.options.dataLoader():this.table.options.dataLoader){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-error"),this.msgElement.classList.add("tabulator-loading"),this.loadingElement?this.msgElement.appendChild(this.loadingElement):this.msgElement.innerHTML=this.langText("data|loading"),this.table.element.appendChild(this.loaderElement)}}showError(){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-loading"),this.msgElement.classList.add("tabulator-error"),this.errorElement?this.msgElement.appendChild(this.errorElement):this.msgElement.innerHTML=this.langText("data|error"),this.table.element.appendChild(this.loaderElement)}hideLoader(){this.loaderElement.parentNode&&this.loaderElement.parentNode.removeChild(this.loaderElement)}}class Me{constructor(e,t,i){this.table=e,this.events={},this.optionsList=t||{},this.subscriptionNotifiers={},this.dispatch=i?this._debugDispatch.bind(this):this._dispatch.bind(this),this.debug=i}subscriptionChange(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifiySubscriptionChange(e,!0)}subscribe(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t),this._notifiySubscriptionChange(e,!0)}unsubscribe(e,t){var i;if(this.events[e]){if(t){if(!((i=this.events[e].findIndex((e=>e===t)))>-1))return void console.warn("Cannot remove event, no matching event found:",e,t);this.events[e].splice(i,1)}else delete this.events[e];this._notifiySubscriptionChange(e,!1)}else console.warn("Cannot remove event, no events set on:",e)}subscribed(e){return this.events[e]&&this.events[e].length}_notifiySubscriptionChange(e,t){var i=this.subscriptionNotifiers[e];i&&i.forEach((e=>{e(t)}))}_dispatch(){var e,t=Array.from(arguments),i=t.shift();return this.events[i]&&this.events[i].forEach(((i,s)=>{let o=i.apply(this.table,t);s||(e=o)})),e}_debugDispatch(){var e=Array.from(arguments),t=e[0];return e[0]="ExternalEvent:"+e[0],(!0===this.debug||this.debug.includes(t))&&console.log(...e),this._dispatch(...arguments)}}class Te{constructor(e){this.events={},this.subscriptionNotifiers={},this.dispatch=e?this._debugDispatch.bind(this):this._dispatch.bind(this),this.chain=e?this._debugChain.bind(this):this._chain.bind(this),this.confirm=e?this._debugConfirm.bind(this):this._confirm.bind(this),this.debug=e}subscriptionChange(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifiySubscriptionChange(e,!0)}subscribe(e,t,i=1e4){this.events[e]||(this.events[e]=[]),this.events[e].push({callback:t,priority:i}),this.events[e].sort(((e,t)=>e.priority-t.priority)),this._notifiySubscriptionChange(e,!0)}unsubscribe(e,t){var i;if(this.events[e]){if(t){if(!((i=this.events[e].findIndex((e=>e.callback===t)))>-1))return void console.warn("Cannot remove event, no matching event found:",e,t);this.events[e].splice(i,1)}this._notifiySubscriptionChange(e,!1)}else console.warn("Cannot remove event, no events set on:",e)}subscribed(e){return this.events[e]&&this.events[e].length}_chain(e,t,i,s){var o=i;return Array.isArray(t)||(t=[t]),this.subscribed(e)?(this.events[e].forEach(((e,i)=>{o=e.callback.apply(this,t.concat([o]))})),o):"function"==typeof s?s():s}_confirm(e,t){var i=!1;return Array.isArray(t)||(t=[t]),this.subscribed(e)&&this.events[e].forEach(((e,s)=>{e.callback.apply(this,t)&&(i=!0)})),i}_notifiySubscriptionChange(e,t){var i=this.subscriptionNotifiers[e];i&&i.forEach((e=>{e(t)}))}_dispatch(){var e=Array.from(arguments),t=e.shift();this.events[t]&&this.events[t].forEach((t=>{t.callback.apply(this,e)}))}_debugDispatch(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(!0===this.debug||this.debug.includes(t))&&console.log(...e),this._dispatch(...arguments)}_debugChain(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(!0===this.debug||this.debug.includes(t))&&console.log(...e),this._chain(...arguments)}_debugConfirm(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(!0===this.debug||this.debug.includes(t))&&console.log(...e),this._confirm(...arguments)}}class Le{static register(e){Le.tables.push(e)}static deregister(e){var t=Le.tables.indexOf(e);t>-1&&Le.tables.splice(t,1)}static lookupTable(e,t){var i,s,o=[];if("string"==typeof e){if((i=document.querySelectorAll(e)).length)for(var n=0;n{e.widthFixed||e.reinitializeWidth(),(this.table.options.responsiveLayout?e.modules.responsive.visible:e.visible)&&(o=e),e.visible&&(t+=e.getWidth())})),o?(s=i-t+o.getWidth(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&(o.setWidth(0),this.table.modules.responsiveLayout.update()),s>0?o.setWidth(s):o.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(e){var t,i,s=this.table.element.clientWidth,o=0,n=0,r=0,a=[],l=[],h=0,d=0;function c(e){return"string"==typeof e?e.indexOf("%")>-1?s/100*parseInt(e):parseInt(e):e}function u(e,t,i,s){var o=[],n=0,a=0,l=0,h=r,d=0,m=0,p=[];function g(e){return i*(e.column.definition.widthGrow||1)}function b(e){return c(e.width)-i*(e.column.definition.widthShrink||0)}return e.forEach((function(e,n){var r=s?b(e):g(e);e.column.minWidth>=r?o.push(e):e.column.maxWidth&&e.column.maxWidththis.table.rowManager.element.clientHeight&&(s-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),e.forEach((function(e){var t,i,s;e.visible&&(t=e.definition.width,i=parseInt(e.minWidth),t?(s=c(t),o+=s>i?s:i,e.definition.widthShrink&&(l.push({column:e,width:s>i?s:i}),h+=e.definition.widthShrink)):(a.push({column:e,width:0}),r+=e.definition.widthGrow||1))})),n=s-o,t=Math.floor(n/r),d=u(a,n,t,!1),a.length&&d>0&&(a[a.length-1].width+=+d),a.forEach((function(e){n-=e.width})),(i=Math.abs(d)+n)>0&&h&&(d=u(l,i,Math.floor(i/h),!0)),l.length&&(l[l.length-1].width-=d),a.forEach((function(e){e.column.setWidth(e.width)})),l.forEach((function(e){e.column.setWidth(e.width)}))}};class Se extends t{constructor(e){super(e,"layout"),this.mode=null,this.registerTableOption("layout","fitData"),this.registerTableOption("layoutColumnsOnNewData",!1),this.registerColumnOption("widthGrow"),this.registerColumnOption("widthShrink")}initialize(){var e=this.table.options.layout;Se.modes[e]?this.mode=e:(console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : "+e),this.mode="fitData"),this.table.element.setAttribute("tabulator-layout",this.mode)}getMode(){return this.mode}layout(){this.dispatch("layout-refreshing"),Se.modes[this.mode].call(this,this.table.columnManager.columnsByIndex),this.dispatch("layout-refreshed")}}Se.moduleName="layout",Se.modes=De;class Fe extends t{constructor(e){super(e),this.locale="default",this.lang=!1,this.bindings={},this.langList={},this.registerTableOption("locale",!1),this.registerTableOption("langs",{})}initialize(){this.langList=s.deepClone(Fe.langs),!1!==this.table.options.columnDefaults.headerFilterPlaceholder&&this.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder);for(let e in this.table.options.langs)this.installLang(e,this.table.options.langs[e]);this.setLocale(this.table.options.locale),this.registerTableFunction("setLocale",this.setLocale.bind(this)),this.registerTableFunction("getLocale",this.getLocale.bind(this)),this.registerTableFunction("getLang",this.getLang.bind(this))}setHeaderFilterPlaceholder(e){this.langList.default.headerFilters.default=e}setHeaderFilterColumnPlaceholder(e,t){this.langList.default.headerFilters.columns[e]=t,this.lang&&!this.lang.headerFilters.columns[e]&&(this.lang.headerFilters.columns[e]=t)}installLang(e,t){this.langList[e]?this._setLangProp(this.langList[e],t):this.langList[e]=t}_setLangProp(e,t){for(let i in t)e[i]&&"object"==typeof e[i]?this._setLangProp(e[i],t[i]):e[i]=t[i]}setLocale(e){if(!0===(e=e||"default")&&navigator.language&&(e=navigator.language.toLowerCase()),e&&!this.langList[e]){let t=e.split("-")[0];this.langList[t]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",e,t),e=t):(console.warn("Localization Error - Matching locale not found, using default: ",e),e="default")}this.locale=e,this.lang=s.deepClone(this.langList.default||{}),"default"!=e&&function e(t,i){for(var s in t)"object"==typeof t[s]?(i[s]||(i[s]={}),e(t[s],i[s])):i[s]=t[s]}(this.langList[e],this.lang),this.dispatchExternal("localized",this.locale,this.lang),this._executeBindings()}getLocale(e){return this.locale}getLang(e){return e?this.langList[e]:this.lang}getText(e,t){var i=(e=t?e+"|"+t:e).split("|");return this._getLangElement(i,this.locale)||""}_getLangElement(e,t){var i=this.lang;return e.forEach((function(e){var t;i&&(t=i[e],i=void 0!==t&&t)})),i}bind(e,t){this.bindings[e]||(this.bindings[e]=[]),this.bindings[e].push(t),t(this.getText(e),this.lang)}_executeBindings(){for(let e in this.bindings)this.bindings[e].forEach((t=>{t(this.getText(e),this.lang)}))}}Fe.moduleName="localize",Fe.langs={default:{groups:{item:"item",items:"items"},columns:{},data:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All",counter:{showing:"Showing",of:"of",rows:"rows",pages:"pages"}},headerFilters:{default:"filter column...",columns:{}}}};class ze extends t{constructor(e){super(e)}initialize(){this.registerTableFunction("tableComms",this.receive.bind(this))}getConnections(e){var t=[];return Le.lookupTable(e).forEach((e=>{this.table!==e&&t.push(e)})),t}send(e,t,i,s){var o=this.getConnections(e);o.forEach((e=>{e.tableComms(this.table.element,t,i,s)})),!o.length&&e&&console.warn("Table Connection Error - No tables matching selector found",e)}receive(e,t,i,s){if(this.table.modExists(t))return this.table.modules[t].commsReceived(e,i,s);console.warn("Inter-table Comms Error - no such module:",t)}}ze.moduleName="comms";var Pe=Object.freeze({__proto__:null,LayoutModule:Se,LocalizeModule:Fe,CommsModule:ze});class He{constructor(e,t){this.bindStaticFuctionality(e),this.bindModules(e,Pe,!0),t&&this.bindModules(e,t)}bindStaticFuctionality(e){e.moduleBindings={},e.extendModule=function(t,i,s){if(e.moduleBindings[t]){var o=e.moduleBindings[t][i];if(o)if("object"==typeof s)for(let e in s)o[e]=s[e];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",i)}else console.warn("Module Error - module does not exist:",t)},e.registerModule=function(t){Array.isArray(t)||(t=[t]),t.forEach((t=>{e.registerModuleBinding(t)}))},e.registerModuleBinding=function(t){e.moduleBindings[t.moduleName]=t},e.findTable=function(e){var t=Le.lookupTable(e,!0);return!(Array.isArray(t)&&!t.length)&&t},e.prototype.bindModules=function(){var t=[],i=[];for(var s in this.modules={},e.moduleBindings){let o=e.moduleBindings[s],n=new o(this);this.modules[s]=n,o.prototype.moduleCore?this.modulesCore.push(n):o.moduleInitOrder?t.push(n):i.push(n)}t.sort(((e,t)=>e.moduleInitOrder>t.moduleInitOrder?1:-1)),this.modulesRegular=t.concat(i)}}bindModules(e,t,i){var s=Object.values(t);i&&s.forEach((e=>{e.prototype.moduleCore=!0})),e.registerModule(s)}}class Ae{constructor(e,t){this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.vdomHoz=null,this.externalEvents=null,this.eventBus=null,this.interactionMonitor=!1,this.browser="",this.browserSlow=!1,this.browserMobile=!1,this.rtl=!1,this.originalElement=null,this.componentFunctionBinder=new Re(this),this.dataLoader=!1,this.modules={},this.modulesCore=[],this.modulesRegular=[],this.optionsList=new me(this,"table constructor"),this.initialized=!1,this.initializeElement(e)&&(this.initializeCoreSystems(t),setTimeout((()=>{this._create()}))),Le.register(this)}initializeElement(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement?(this.element=e,!0):"string"==typeof e?(this.element=document.querySelector(e),!!this.element||(console.error("Tabulator Creation Error - no element found matching selector: ",e),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",e),!1)}initializeCoreSystems(e){this.columnManager=new fe(this),this.rowManager=new Ce(this),this.footerManager=new Ee(this),this.dataLoader=new xe(this),this.bindModules(),this.options=this.optionsList.generate(Ae.defaultOptions,e),this._clearObjectPointers(),this._mapDeprecatedFunctionality(),this.externalEvents=new Me(this,this.options,this.options.debugEventsExternal),this.eventBus=new Te(this.options.debugEventsInternal),this.interactionMonitor=new ye(this),this.dataLoader.initialize(),this.footerManager.initialize()}_mapDeprecatedFunctionality(){}_clearSelection(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")}_create(){this.externalEvents.dispatch("tableBuilding"),this.eventBus.dispatch("table-building"),this._rtlCheck(),this._buildElement(),this._initializeTable(),this._loadInitialData(),this.initialized=!0,this.externalEvents.dispatch("tableBuilt")}_rtlCheck(){var e=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if("rtl"!==e.direction)break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}}_clearObjectPointers(){this.options.columns=this.options.columns.slice(0),Array.isArray(this.options.data)&&!this.options.reactiveData&&(this.options.data=this.options.data.slice(0))}_buildElement(){var e,t=this.element,i=this.options;if("TABLE"===t.tagName){this.originalElement=this.element,e=document.createElement("div");var s=t.attributes;for(var o in s)"object"==typeof s[o]&&e.setAttribute(s[o].name,s[o].value);t.parentNode.replaceChild(e,t),this.element=t=e}for(t.classList.add("tabulator"),t.setAttribute("role","grid");t.firstChild;)t.removeChild(t.firstChild);i.height&&(i.height=isNaN(i.height)?i.height:i.height+"px",t.style.height=i.height),!1!==i.minHeight&&(i.minHeight=isNaN(i.minHeight)?i.minHeight:i.minHeight+"px",t.style.minHeight=i.minHeight),!1!==i.maxHeight&&(i.maxHeight=isNaN(i.maxHeight)?i.maxHeight:i.maxHeight+"px",t.style.maxHeight=i.maxHeight)}_initializeTable(){var e=this.element,t=this.options;this.interactionMonitor.initialize(),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modulesCore.forEach((e=>{e.initialize()})),e.appendChild(this.columnManager.getElement()),e.appendChild(this.rowManager.getElement()),t.footerElement&&this.footerManager.activate(),t.autoColumns&&t.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modulesRegular.forEach((e=>{e.initialize()})),this.columnManager.setColumns(t.columns),this.eventBus.dispatch("table-built")}_loadInitialData(){this.dataLoader.load(this.options.data)}destroy(){var e=this.element;for(Le.deregister(this),this.eventBus.dispatch("table-destroy"),this.rowManager.rows.forEach((function(e){e.wipe()})),this.rowManager.rows=[],this.rowManager.activeRows=[],this.rowManager.displayRows=[];e.firstChild;)e.removeChild(e.firstChild);e.classList.remove("tabulator")}_detectBrowser(){var e=navigator.userAgent||navigator.vendor||window.opera;e.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):e.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):e.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.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(e)||/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(e.slice(0,4))}blockRedraw(){return this.rowManager.blockRedraw()}restoreRedraw(){return this.rowManager.restoreRedraw()}setData(e,t,i){if(this.initialized)return this.dataLoader.load(e,t,i,!1);console.warn("setData failed - table not yet initialized. To set initial data please use the 'data' property in the table constructor.")}clearData(){this.dataLoader.blockActiveLoad(),this.rowManager.clearData()}getData(e){return this.rowManager.getData(e)}getDataCount(e){return this.rowManager.getDataCount(e)}replaceData(e,t,i){if(this.initialized)return this.dataLoader.load(e,t,i,!0,!0);console.warn("replaceData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}updateData(e){var t=0;if(this.initialized)return new Promise(((i,s)=>{this.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e?e.forEach((e=>{var s=this.rowManager.findRow(e[this.options.index]);s&&(t++,s.updateData(e).then((()=>{--t||i()})))})):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))}));console.warn("updateData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}addData(e,t,i){if(this.initialized)return new Promise(((s,o)=>{this.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e?this.rowManager.addRows(e,t,i).then((e=>{var t=[];e.forEach((function(e){t.push(e.getComponent())})),s(t)})):(console.warn("Update Error - No data provided"),o("Update Error - No data provided"))}));console.warn("addData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}updateOrAddData(e){var t=[],i=0;if(this.initialized)return new Promise(((s,o)=>{this.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e?e.forEach((e=>{var o=this.rowManager.findRow(e[this.options.index]);i++,o?o.updateData(e).then((()=>{i--,t.push(o.getComponent()),i||s(t)})):this.rowManager.addRows(e).then((e=>{i--,t.push(e[0].getComponent()),i||s(t)}))})):(console.warn("Update Error - No data provided"),o("Update Error - No data provided"))}));console.warn("updateOrAddData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}getRow(e){var t=this.rowManager.findRow(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}getRowFromPosition(e,t){var i=this.rowManager.getRowFromPosition(e,t);return i?i.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}deleteRow(e){var t=[];Array.isArray(e)||(e=[e]);for(let i of e){let e=this.rowManager.findRow(i,!0);if(!e)return console.error("Delete Error - No matching row found:",i),Promise.reject("Delete Error - No matching row found");t.push(e)}return t.sort(((e,t)=>this.rowManager.rows.indexOf(e)>this.rowManager.rows.indexOf(t)?1:-1)),t.forEach((e=>{e.delete()})),this.rowManager.reRenderInPosition(),Promise.resolve()}addRow(e,t,i){if(this.initialized)return"string"==typeof e&&(e=JSON.parse(e)),this.rowManager.addRows(e,t,i).then((e=>e[0].getComponent()));console.warn("addRow failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}updateOrAddRow(e,t){var i=this.rowManager.findRow(e);return"string"==typeof t&&(t=JSON.parse(t)),i?i.updateData(t).then((()=>i.getComponent())):this.rowManager.addRows(t).then((e=>e[0].getComponent()))}updateRow(e,t){var i=this.rowManager.findRow(e);return"string"==typeof t&&(t=JSON.parse(t)),i?i.updateData(t).then((()=>Promise.resolve(i.getComponent()))):(console.warn("Update Error - No matching row found:",e),Promise.reject("Update Error - No matching row found"))}scrollToRow(e,t,i){var s=this.rowManager.findRow(e);return s?this.rowManager.scrollToRow(s,t,i):(console.warn("Scroll Error - No matching row found:",e),Promise.reject("Scroll Error - No matching row found"))}moveRow(e,t,i){var s=this.rowManager.findRow(e);s?s.moveToRow(t,i):console.warn("Move Error - No matching row found:",e)}getRows(e){return this.rowManager.getComponents(e)}getRowPosition(e,t){var i=this.rowManager.findRow(e);return i?this.rowManager.getRowPosition(i,t):(console.warn("Position Error - No matching row found:",e),!1)}setColumns(e){this.initialized?this.columnManager.setColumns(e):console.warn("setColumns failed - table not yet initialized. To set initial data please use the 'columns' property in the table constructor.")}getColumns(e){return this.columnManager.getComponents(e)}getColumn(e){var t=this.columnManager.findColumn(e);return t?t.getComponent():(console.warn("Find Error - No matching column found:",e),!1)}getColumnDefinitions(){return this.columnManager.getDefinitionTree()}showColumn(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Show Error - No matching column found:",e),!1;t.show()}hideColumn(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Hide Error - No matching column found:",e),!1;t.hide()}toggleColumn(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Visibility Toggle Error - No matching column found:",e),!1;t.visible?t.hide():t.show()}addColumn(e,t,i){var s=this.columnManager.findColumn(i);return this.columnManager.addColumn(e,t,s).then((e=>e.getComponent()))}deleteColumn(e){var t=this.columnManager.findColumn(e);return t?t.delete():(console.warn("Column Delete Error - No matching column found:",e),Promise.reject())}updateColumnDefinition(e,t){var i=this.columnManager.findColumn(e);return i?i.updateDefinition(t):(console.warn("Column Update Error - No matching column found:",e),Promise.reject())}moveColumn(e,t,i){var s=this.columnManager.findColumn(e),o=this.columnManager.findColumn(t);s?o?this.columnManager.moveColumn(s,o,i):console.warn("Move Error - No matching column found:",o):console.warn("Move Error - No matching column found:",e)}scrollToColumn(e,t,i){return new Promise(((s,o)=>{var n=this.columnManager.findColumn(e);return n?this.columnManager.scrollToColumn(n,t,i):(console.warn("Scroll Error - No matching column found:",e),Promise.reject("Scroll Error - No matching column found"))}))}redraw(e){this.initialized?(this.columnManager.redraw(e),this.rowManager.redraw(e)):console.warn("redraw failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}setHeight(e){this.options.height=isNaN(e)?e:e+"px",this.element.style.height=this.options.height,this.rowManager.initializeRenderer(),this.rowManager.redraw()}on(e,t){this.externalEvents.subscribe(e,t)}off(e,t){this.externalEvents.unsubscribe(e,t)}dispatchEvent(){Array.from(arguments).shift();this.externalEvents.dispatch(...arguments)}modExists(e,t){return!!this.modules[e]||(t&&console.error("Tabulator Module Not Installed: "+e),!1)}module(e){var t=this.modules[e];return t||console.error("Tabulator module not installed: "+e),t}}Ae.defaultOptions={debugEventsExternal:!1,debugEventsInternal:!1,debugInvalidOptions:!0,height:!1,minHeight:!1,maxHeight:!1,columnHeaderVertAlign:"top",columns:[],columnDefaults:{},data:!1,autoColumns:!1,autoColumnsDefinitions:!1,nestedFieldSeparator:".",tooltipGenerationMode:"load",footerElement:!1,index:"id",textDirection:"auto",addRowPos:"bottom",headerVisible:!0,renderVertical:"virtual",renderHorizontal:"basic",renderVerticalBuffer:0,scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,placeholder:!1,dataLoader:!0,dataLoaderLoading:!1,dataLoaderError:!1,dataLoaderErrorTimeout:3e3,dataSendParams:{},dataReceiveParams:{}},new He(Ae);class Oe extends Ae{}new He(Oe,ue);class _e{constructor(e){this.type=e,this.element=this._createElement()}_createElement(){var e=document.createElement("div");return e.classList.add("tabulator-row"),e}getElement(){return this.element}getComponent(){return!1}getData(){return{}}getHeight(){return this.element.outerHeight}initialize(){}reinitialize(){}normalizeHeight(){}generateCells(){}reinitializeHeight(){}calcHeight(){}setCellHeight(){}clearCellHeight(){}}export{o as AccessorModule,h as AjaxModule,c as CalcComponent,u as CellComponent,d as ClipboardModule,C as ColumnCalcsModule,p as ColumnComponent,E as DataTreeModule,R as DownloadModule,T as EditModule,D as ExportModule,F as FilterModule,P as FormatModule,H as FrozenColumnsModule,A as FrozenRowsModule,O as GroupComponent,B as GroupRowsModule,N as HistoryModule,V as HtmlTableImportModule,W as ImportModule,j as InteractionModule,G as KeybindingsModule,U as MenuModule,t as Module,X as MoveColumnsModule,q as MoveRowsModule,K as MutatorModule,J as PageModule,Z as PersistenceModule,ee as PrintModule,_e as PseudoRow,te as ReactiveDataModule,pe as Renderer,ie as ResizeColumnsModule,se as ResizeRowsModule,oe as ResizeTableModule,ne as ResponsiveLayoutModule,f as RowComponent,re as SelectRowModule,he as SortModule,Ae as Tabulator,Oe as TabulatorFull,ce as ValidateModule}; +/* Tabulator v5.1.8 (c) Oliver Folkerd 2022 */ +class e{constructor(e){this.table=e}reloadData(e,t){return this.table.dataLoader.load(e,void 0,void 0,void 0,t)}langText(){return this.table.modules.localize.getText(...arguments)}langBind(){return this.table.modules.localize.bind(...arguments)}langLocale(){return this.table.modules.localize.getLocale(...arguments)}commsConnections(){return this.table.modules.comms.getConnections(...arguments)}commsSend(){return this.table.modules.comms.send(...arguments)}layoutMode(){return this.table.modules.layout.getMode()}layoutRefresh(){return this.table.modules.layout.layout()}subscribe(){return this.table.eventBus.subscribe(...arguments)}unsubscribe(){return this.table.eventBus.unsubscribe(...arguments)}subscribed(e){return this.table.eventBus.subscribed(e)}subscriptionChange(){return this.table.eventBus.subscriptionChange(...arguments)}dispatch(){return this.table.eventBus.dispatch(...arguments)}chain(){return this.table.eventBus.chain(...arguments)}confirm(){return this.table.eventBus.confirm(...arguments)}dispatchExternal(){return this.table.externalEvents.dispatch(...arguments)}subscribedExternal(e){return this.table.externalEvents.subscribed(e)}subscriptionChangeExternal(){return this.table.externalEvents.subscriptionChange(...arguments)}options(e){return this.table.options[e]}setOption(e,t){return void 0!==t&&(this.table.options[e]=t),this.table.options[e]}module(e){return this.table.module(e)}}class t extends e{constructor(e,t){super(e),this._handler=null}initialize(){}registerTableOption(e,t){this.table.optionsList.register(e,t)}registerColumnOption(e,t){this.table.columnManager.optionsList.register(e,t)}registerTableFunction(e,t){void 0===this.table[e]?this.table[e]=t:console.warn("Unable to bind table function, name already in use",e)}registerComponentFunction(e,t,i){return this.table.componentFunctionBinder.bind(e,t,i)}registerDataHandler(e,t){this.table.rowManager.registerDataPipelineHandler(e,t),this._handler=e}registerDisplayHandler(e,t){this.table.rowManager.registerDisplayPipelineHandler(e,t),this._handler=e}refreshData(e,t){t||(t=this._handler),t&&this.table.rowManager.refreshActiveData(t,!1,e)}}class s{static elVisible(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)}static elOffset(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}}static deepClone(e,t,i=[]){var s={}.__proto__,o=[].__proto__;for(var n in t||(t=Object.assign(Array.isArray(e)?[]:{},e)),e){let r,a,l=e[n];null==l||"object"!=typeof l||l.__proto__!==s&&l.__proto__!==o||(r=i.findIndex((e=>e.subject===l)),r>-1?t[n]=i[r].copy:(a=Object.assign(Array.isArray(l)?[]:{},l),i.unshift({subject:l,copy:a}),t[n]=this.deepClone(l,a,i)))}return t}}class o extends t{constructor(e){super(e),this.allowedTypes=["","data","download","clipboard","print","htmlOutput"],this.registerColumnOption("accessor"),this.registerColumnOption("accessorParams"),this.registerColumnOption("accessorData"),this.registerColumnOption("accessorDataParams"),this.registerColumnOption("accessorDownload"),this.registerColumnOption("accessorDownloadParams"),this.registerColumnOption("accessorClipboard"),this.registerColumnOption("accessorClipboardParams"),this.registerColumnOption("accessorPrint"),this.registerColumnOption("accessorPrintParams"),this.registerColumnOption("accessorHtmlOutput"),this.registerColumnOption("accessorHtmlOutputParams")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-retrieve",this.transformRow.bind(this))}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach((s=>{var o,n="accessor"+(s.charAt(0).toUpperCase()+s.slice(1));e.definition[n]&&(o=this.lookupAccessor(e.definition[n]))&&(t=!0,i[n]={accessor:o,params:e.definition[n+"Params"]||{}})})),t&&(e.modules.accessor=i)}lookupAccessor(e){var t=!1;switch(typeof e){case"string":o.accessors[e]?t=o.accessors[e]:console.warn("Accessor Error - No such accessor found, ignoring: ",e);break;case"function":t=e}return t}transformRow(e,t){var i="accessor"+(t.charAt(0).toUpperCase()+t.slice(1)),o=e.getComponent(),n=s.deepClone(e.data||{});return this.table.columnManager.traverse((function(e){var s,r,a,l;e.modules.accessor&&(r=e.modules.accessor[i]||e.modules.accessor.accessor||!1)&&"undefined"!=(s=e.getFieldValue(n))&&(l=e.getComponent(),a="function"==typeof r.params?r.params(s,n,t,l,o):r.params,e.setFieldValue(n,r.accessor(s,n,t,a,l,o)))})),n}}o.moduleName="accessor",o.accessors={};function n(e,t){var i=[];if(t=t||"",Array.isArray(e))e.forEach(((e,s)=>{i=i.concat(n(e,t?t+"["+s+"]":s))}));else if("object"==typeof e)for(var s in e)i=i.concat(n(e[s],t?t+"["+s+"]":s));else i.push({key:t,value:e});return i}function r(e){var t=n(e),i=[];return t.forEach((function(e){i.push(encodeURIComponent(e.key)+"="+encodeURIComponent(e.value))})),i.join("&")}function a(e,t){var i=[];if(t=t||"",Array.isArray(e))e.forEach(((e,s)=>{i=i.concat(a(e,t?t+"["+s+"]":s))}));else if("object"==typeof e)for(var s in e)i=i.concat(a(e[s],t?t+"["+s+"]":s));else i.push({key:t,value:e});return i}var l={json:{headers:{"Content-Type":"application/json"},body:function(e,t,i){return JSON.stringify(i)}},form:{headers:{},body:function(e,t,i){var s=a(i),o=new FormData;return s.forEach((function(e){o.append(e.key,e.value)})),o}}};class h extends t{constructor(e){super(e),this.config={},this.url="",this.urlGenerator=!1,this.params=!1,this.loaderPromise=!1,this.registerTableOption("ajaxURL",!1),this.registerTableOption("ajaxURLGenerator",!1),this.registerTableOption("ajaxParams",{}),this.registerTableOption("ajaxConfig","get"),this.registerTableOption("ajaxContentType","form"),this.registerTableOption("ajaxRequestFunc",!1),this.registerTableOption("ajaxRequesting",(function(){})),this.registerTableOption("ajaxResponse",!1),this.contentTypeFormatters=h.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||h.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||h.defaultURLGenerator,this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.setDefaultConfig(this.table.options.ajaxConfig),this.registerTableFunction("getAjaxUrl",this.getUrl.bind(this)),this.subscribe("data-loading",this.requestDataCheck.bind(this)),this.subscribe("data-params",this.requestParams.bind(this)),this.subscribe("data-load",this.requestData.bind(this))}requestParams(e,t,i,s){var o=this.table.options.ajaxParams;return o&&("function"==typeof o&&(o=o.call(this.table)),s=Object.assign(s,o)),s}requestDataCheck(e,t,i,s){return!((e||!this.url)&&"string"!=typeof e)}requestData(e,t,i,s,o){var n;return!o&&this.requestDataCheck(e)?(e&&this.setUrl(e),n=this.generateConfig(i),this.sendRequest(this.url,t,n)):o}setDefaultConfig(e={}){this.config=Object.assign({},h.defaultConfig),"string"==typeof e?this.config.method=e:Object.assign(this.config,e)}generateConfig(e={}){var t=Object.assign({},this.config);return"string"==typeof e?t.method=e:Object.assign(t,e),t}setUrl(e){this.url=e}getUrl(){return this.url}sendRequest(e,t,i){return!1!==this.table.options.ajaxRequesting.call(this.table,e,t)?this.loaderPromise(e,i,t).then((i=>(this.table.options.ajaxResponse&&(i=this.table.options.ajaxResponse.call(this.table,e,t,i)),i))):Promise.reject()}}h.moduleName="ajax",h.defaultConfig={method:"GET"},h.defaultURLGenerator=function(e,t,i){return e&&i&&Object.keys(i).length&&(t.method&&"get"!=t.method.toLowerCase()||(t.method="get",e+=(e.includes("?")?"&":"?")+r(i))),e},h.defaultLoaderPromise=function(e,t,i){var s;return new Promise(((o,n)=>{if(e=this.urlGenerator.call(this.table,e,t,i),"GET"!=t.method.toUpperCase())if(s="object"==typeof this.table.options.ajaxContentType?this.table.options.ajaxContentType:this.contentTypeFormatters[this.table.options.ajaxContentType]){for(var r in s.headers)t.headers||(t.headers={}),void 0===t.headers[r]&&(t.headers[r]=s.headers[r]);t.body=s.body.call(this,e,t,i)}else console.warn("Ajax Error - Invalid ajaxContentType value:",this.table.options.ajaxContentType);e?(void 0===t.headers&&(t.headers={}),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),void 0===t.headers["X-Requested-With"]&&(t.headers["X-Requested-With"]="XMLHttpRequest"),void 0===t.mode&&(t.mode="cors"),"cors"==t.mode?(void 0===t.headers.Origin&&(t.headers.Origin=window.location.origin),void 0===t.credentials&&(t.credentials="same-origin")):void 0===t.credentials&&(t.credentials="include"),fetch(e,t).then((e=>{e.ok?e.json().then((e=>{o(e)})).catch((e=>{n(e),console.warn("Ajax Load Error - Invalid JSON returned",e)})):(console.error("Ajax Load Error - Connection Error: "+e.status,e.statusText),n(e))})).catch((e=>{console.error("Ajax Load Error - Connection Error: ",e),n(e)}))):(console.warn("Ajax Load Error - No URL Set"),o([]))}))},h.contentTypeFormatters=l;class d extends t{constructor(e){super(e),this.mode=!0,this.pasteParser=function(){},this.pasteAction=function(){},this.customSelection=!1,this.rowRange=!1,this.blocked=!0,this.registerTableOption("clipboard",!1),this.registerTableOption("clipboardCopyStyled",!0),this.registerTableOption("clipboardCopyConfig",!1),this.registerTableOption("clipboardCopyFormatter",!1),this.registerTableOption("clipboardCopyRowRange","active"),this.registerTableOption("clipboardPasteParser","table"),this.registerTableOption("clipboardPasteAction","insert"),this.registerColumnOption("clipboard"),this.registerColumnOption("titleClipboard")}initialize(){this.mode=this.table.options.clipboard,this.rowRange=this.table.options.clipboardCopyRowRange,!0!==this.mode&&"copy"!==this.mode||this.table.element.addEventListener("copy",(e=>{var t,i;if(!this.blocked){if(e.preventDefault(),this.customSelection)t=this.customSelection,this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t));else{var s=this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig,this.table.options.clipboardCopyStyled,this.rowRange,"clipboard");t=(i=this.table.modules.export.genereateHTMLTable(s))?this.generatePlainContent(s):"",this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t),i=this.table.options.clipboardCopyFormatter("html",i))}window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",t):e.clipboardData&&e.clipboardData.setData?(e.clipboardData.setData("text/plain",t),i&&e.clipboardData.setData("text/html",i)):e.originalEvent&&e.originalEvent.clipboardData.setData&&(e.originalEvent.clipboardData.setData("text/plain",t),i&&e.originalEvent.clipboardData.setData("text/html",i)),this.dispatchExternal("clipboardCopied",t,i),this.reset()}})),!0!==this.mode&&"paste"!==this.mode||this.table.element.addEventListener("paste",(e=>{this.paste(e)})),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction),this.registerTableFunction("copyToClipboard",this.copy.bind(this))}reset(){this.blocked=!0,this.customSelection=!1}generatePlainContent(e){var t=[];return e.forEach((e=>{var i=[];e.columns.forEach((t=>{var s="";if(t)if("group"===e.type&&(t.value=t.component.getKey()),null===t.value)s="";else switch(typeof t.value){case"object":s=JSON.stringify(t.value);break;case"undefined":s="";break;default:s=t.value}i.push(s)})),t.push(i.join("\t"))})),t.join("\n")}copy(e,t){var i,s;this.blocked=!1,this.customSelection=!1,!0!==this.mode&&"copy"!==this.mode||(this.rowRange=e||this.table.options.clipboardCopyRowRange,void 0!==window.getSelection&&void 0!==document.createRange?((e=document.createRange()).selectNodeContents(this.table.element),(i=window.getSelection()).toString()&&t&&(this.customSelection=i.toString()),i.removeAllRanges(),i.addRange(e)):void 0!==document.selection&&void 0!==document.body.createTextRange&&((s=document.body.createTextRange()).moveToElementText(this.table.element),s.select()),document.execCommand("copy"),i&&i.removeAllRanges())}setPasteAction(e){switch(typeof e){case"string":this.pasteAction=d.pasteActions[e],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",e);break;case"function":this.pasteAction=e}}setPasteParser(e){switch(typeof e){case"string":this.pasteParser=d.pasteParsers[e],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",e);break;case"function":this.pasteParser=e}}paste(e){var t,i,s;this.checkPaseOrigin(e)&&(t=this.getPasteData(e),(i=this.pasteParser.call(this,t))?(e.preventDefault(),this.table.modExists("mutator")&&(i=this.mutateData(i)),s=this.pasteAction.call(this,i),this.dispatchExternal("clipboardPasted",t,i,s)):this.dispatchExternal("clipboardPasteError",t))}mutateData(e){var t=[];return Array.isArray(e)?e.forEach((e=>{t.push(this.table.modules.mutator.transformRow(e,"clipboard"))})):t=e,t}checkPaseOrigin(e){var t=!0;return("DIV"!=e.target.tagName||this.table.modules.edit.currentCell)&&(t=!1),t}getPasteData(e){var t;return window.clipboardData&&window.clipboardData.getData?t=window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?t=e.clipboardData.getData("text/plain"):e.originalEvent&&e.originalEvent.clipboardData.getData&&(t=e.originalEvent.clipboardData.getData("text/plain")),t}}d.moduleName="clipboard",d.pasteActions={replace:function(e){return this.table.setData(e)},update:function(e){return this.table.updateOrAddData(e)},insert:function(e){return this.table.addData(e)}},d.pasteParsers={table:function(e){var t=[],i=!0,s=this.table.columnManager.columns,o=[],n=[];return(e=e.split("\n")).forEach((function(e){t.push(e.split("\t"))})),!(!t.length||1===t.length&&t[0].length<2)&&(t[0].forEach((function(e){var t=s.find((function(t){return e&&t.definition.title&&e.trim()&&t.definition.title.trim()===e.trim()}));t?o.push(t):i=!1})),i||(i=!0,o=[],t[0].forEach((function(e){var t=s.find((function(t){return e&&t.field&&e.trim()&&t.field.trim()===e.trim()}));t?o.push(t):i=!1})),i||(o=this.table.columnManager.columnsByIndex)),i&&t.shift(),t.forEach((function(e){var t={};e.forEach((function(e,i){o[i]&&(t[o[i].field]=e)})),n.push(t)})),n)}};class c{constructor(e){return this._row=e,new Proxy(this,{get:function(e,t,i){return void 0!==e[t]?e[t]:e._row.table.componentFunctionBinder.handle("row",e._row,t)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getTable(){return this._row.table}getCells(){var e=[];return this._row.getCells().forEach((function(t){e.push(t.getComponent())})),e}getCell(e){var t=this._row.getCell(e);return!!t&&t.getComponent()}_getSelf(){return this._row}}class u{constructor(e){return this._cell=e,new Proxy(this,{get:function(e,t,i){return void 0!==e[t]?e[t]:e._cell.table.componentFunctionBinder.handle("cell",e._cell,t)}})}getValue(){return this._cell.getValue()}getOldValue(){return this._cell.getOldValue()}getInitialValue(){return this._cell.initialValue}getElement(){return this._cell.getElement()}getRow(){return this._cell.row.getComponent()}getData(){return this._cell.row.getData()}getField(){return this._cell.column.getField()}getColumn(){return this._cell.column.getComponent()}setValue(e,t){void 0===t&&(t=!0),this._cell.setValue(e,t)}restoreOldValue(){this._cell.setValueActual(this._cell.getOldValue())}restoreInitialValue(){this._cell.setValueActual(this._cell.initialValue)}checkHeight(){this._cell.checkHeight()}getTable(){return this._cell.table}_getSelf(){return this._cell}}class m extends e{constructor(e,t){super(e.table),this.table=e.table,this.column=e,this.row=t,this.element=null,this.value=null,this.initialValue,this.oldValue=null,this.modules={},this.height=null,this.width=null,this.minWidth=null,this.component=null,this.loaded=!1,this.build()}build(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data)),this.initialValue=this.value}generateElement(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell"),this.element=this.element}_configureCell(){var e=this.element,t=this.column.getField();(e.style.textAlign=this.column.hozAlign,this.column.vertAlign&&(e.style.display="inline-flex",e.style.alignItems={top:"flex-start",bottom:"flex-end",middle:"center"}[this.column.vertAlign]||"",this.column.hozAlign&&(e.style.justifyContent={left:"flex-start",right:"flex-end",center:"center"}[this.column.hozAlign]||"")),t&&e.setAttribute("tabulator-field",t),this.column.definition.cssClass)&&this.column.definition.cssClass.split(" ").forEach((t=>{e.classList.add(t)}));"hover"===this.table.options.tooltipGenerationMode&&e.addEventListener("mouseenter",(e=>{this._generateTooltip()})),this.dispatch("cell-init",this),this.column.visible||this.hide()}_generateContents(){var e;switch(typeof(e=this.chain("cell-format",this,null,(()=>this.element.innerHTML=this.value)))){case"object":if(e instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(e)}else this.element.innerHTML="",null!=e&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",e);break;case"undefined":case"null":this.element.innerHTML="";break;default:this.element.innerHTML=e}}cellRendered(){this.dispatch("cell-rendered",this)}_generateTooltip(){var e=this.column.tooltip;e?(!0===e?e=this.value:"function"==typeof e&&!1===(e=e(this.getComponent()))&&(e=""),void 0===e&&(e=""),this.element.setAttribute("title",e)):this.element.setAttribute("title","")}getElement(e){return this.loaded||(this.loaded=!0,e||this.layoutElement()),this.element}getValue(){return this.value}getOldValue(){return this.oldValue}setValue(e,t){this.setValueProcessData(e,t)&&(this.dispatch("cell-value-updated",this),this.cellRendered(),this.column.definition.cellEdited&&this.column.definition.cellEdited.call(this.table,this.getComponent()),this.dispatchExternal("cellEdited",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()))}setValueProcessData(e,t){var i=!1;return this.value!==e&&(i=!0,t&&(e=this.chain("cell-value-changing",[this,e],null,e))),this.setValueActual(e),i&&this.dispatch("cell-value-changed",this),i}setValueActual(e){this.oldValue=this.value,this.value=e,this.dispatch("cell-value-save-before",this),this.column.setFieldValue(this.row.data,e),this.dispatch("cell-value-save-after",this),this.loaded&&this.layoutElement()}layoutElement(){this._generateContents(),this._generateTooltip(),this.dispatch("cell-layout",this)}setWidth(){this.width=this.column.width,this.element.style.width=this.column.widthStyled}clearWidth(){this.width="",this.element.style.width=""}getWidth(){return this.width||this.element.offsetWidth}setMinWidth(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled}setMaxWidth(){this.maxWidth=this.column.maxWidth,this.element.style.maxWidth=this.column.maxWidthStyled}checkHeight(){this.row.reinitializeHeight()}clearHeight(){this.element.style.height="",this.height=null}setHeight(){this.height=this.row.height,this.element.style.height=this.row.heightStyled}getHeight(){return this.height||this.element.offsetHeight}show(){this.element.style.display=this.column.vertAlign?"inline-flex":""}hide(){this.element.style.display="none"}delete(){this.dispatch("cell-delete",this),!this.table.rowManager.redrawBlock&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.column.deleteCell(this),this.row.deleteCell(this),this.calcs={}}getIndex(){return this.row.getCellIndex(this)}getComponent(){return this.component||(this.component=new u(this)),this.component}}class p{constructor(e){return this._column=e,this.type="ColumnComponent",new Proxy(this,{get:function(e,t,i){return void 0!==e[t]?e[t]:e._column.table.componentFunctionBinder.handle("column",e._column,t)}})}getElement(){return this._column.getElement()}getDefinition(){return this._column.getDefinition()}getField(){return this._column.getField()}getTitleDownload(){return this._column.getTitleDownload()}getCells(){var e=[];return this._column.cells.forEach((function(t){e.push(t.getComponent())})),e}isVisible(){return this._column.visible}show(){this._column.isGroup?this._column.columns.forEach((function(e){e.show()})):this._column.show()}hide(){this._column.isGroup?this._column.columns.forEach((function(e){e.hide()})):this._column.hide()}toggle(){this._column.visible?this.hide():this.show()}delete(){return this._column.delete()}getSubColumns(){var e=[];return this._column.columns.length&&this._column.columns.forEach((function(t){e.push(t.getComponent())})),e}getParentColumn(){return this._column.parent instanceof b&&this._column.parent.getComponent()}_getSelf(){return this._column}scrollTo(){return this._column.table.columnManager.scrollToColumn(this._column)}getTable(){return this._column.table}move(e,t){var i=this._column.table.columnManager.findColumn(e);i?this._column.table.columnManager.moveColumn(this._column,i,t):console.warn("Move Error - No matching column found:",i)}getNextColumn(){var e=this._column.nextColumn();return!!e&&e.getComponent()}getPrevColumn(){var e=this._column.prevColumn();return!!e&&e.getComponent()}updateDefinition(e){return this._column.updateDefinition(e)}getWidth(){return this._column.getWidth()}setWidth(e){var t;return t=!0===e?this._column.reinitializeWidth(!0):this._column.setWidth(e),this._column.table.columnManager.renderer.rerenderColumns(!0),t}}var g={title:void 0,field:void 0,columns:void 0,visible:void 0,hozAlign:void 0,vertAlign:void 0,width:void 0,minWidth:40,maxWidth:void 0,maxInitialWidth:void 0,tooltip:void 0,cssClass:void 0,variableHeight:void 0,headerTooltip:void 0,headerVertical:void 0,headerHozAlign:void 0,editableTitle:void 0};class b extends e{constructor(e,t){super(t.table),this.definition=e,this.parent=t,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleDownload=null,this.titleFormatterRendered=!1,this.mapDefinitions(),this.setField(this.definition.field),this.modules={},this.width=null,this.widthStyled="",this.maxWidth=null,this.maxWidthStyled="",this.maxInitialWidth=null,this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this.definition.columns?(this.isGroup=!0,this.definition.columns.forEach(((e,t)=>{var i=new b(e,this);this.attachColumn(i)})),this.checkColumnVisibility()):t.registerColumnField(this),this._initialize(),this.bindModuleColumns()}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),e}createGroupElement(){var e=document.createElement("div");return e.classList.add("tabulator-col-group-cols"),e}mapDefinitions(){var e=this.table.options.columnDefaults;if(e)for(let t in e)void 0===this.definition[t]&&(this.definition[t]=e[t]);this.definition=this.table.columnManager.optionsList.generate(b.defaultOptionList,this.definition)}checkDefinition(){Object.keys(this.definition).forEach((e=>{-1===b.defaultOptionList.indexOf(e)&&console.warn("Invalid column definition option in '"+(this.field||this.definition.title)+"' column:",e)}))}setField(e){this.field=e,this.fieldStructure=e?this.table.options.nestedFieldSeparator?e.split(this.table.options.nestedFieldSeparator):[e]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData}registerColumnPosition(e){this.parent.registerColumnPosition(e)}registerColumnField(e){this.parent.registerColumnField(e)}reRegisterPosition(){this.isGroup?this.columns.forEach((function(e){e.reRegisterPosition()})):this.registerColumnPosition(this)}_mapDepricatedFunctionality(){}setTooltip(){var e=this.definition,t=e.headerTooltip;t?!0===t?e.field?this.langBind("columns|"+e.field,(t=>{this.element.setAttribute("title",t||e.title)})):this.element.setAttribute("title",e.title):("function"==typeof t&&!1===(t=t(this.getComponent()))&&(t=""),this.element.setAttribute("title",t)):this.element.setAttribute("title","")}_initialize(){for(var e=this.definition;this.element.firstChild;)this.element.removeChild(this.element.firstChild);e.headerVertical&&(this.element.classList.add("tabulator-col-vertical"),"flip"===e.headerVertical&&this.element.classList.add("tabulator-col-vertical-flip")),this.contentElement=this._bindEvents(),this.contentElement=this._buildColumnHeaderContent(),this.element.appendChild(this.contentElement),this.isGroup?this._buildGroupHeader():this._buildColumnHeader(),this.setTooltip(),this.dispatch("column-init",this),this.element.addEventListener("mouseenter",(e=>{this.setTooltip()}))}_bindEvents(){var e,t,i,s=this.definition;"function"==typeof s.headerClick&&this.element.addEventListener("click",(e=>{s.headerClick(e,this.getComponent())})),"function"==typeof s.headerDblClick&&this.element.addEventListener("dblclick",(e=>{s.headerDblClick(e,this.getComponent())})),"function"==typeof s.headerContext&&this.element.addEventListener("contextmenu",(e=>{s.headerContext(e,this.getComponent())})),"function"==typeof s.headerTap&&(i=!1,this.element.addEventListener("touchstart",(e=>{i=!0}),{passive:!0}),this.element.addEventListener("touchend",(e=>{i&&s.headerTap(e,this.getComponent()),i=!1}))),"function"==typeof s.headerDblTap&&(e=null,this.element.addEventListener("touchend",(t=>{e?(clearTimeout(e),e=null,s.headerDblTap(t,this.getComponent())):e=setTimeout((()=>{clearTimeout(e),e=null}),300)}))),"function"==typeof s.headerTapHold&&(t=null,this.element.addEventListener("touchstart",(e=>{clearTimeout(t),t=setTimeout((function(){clearTimeout(t),t=null,i=!1,s.headerTapHold(e,this.getComponent())}),1e3)}),{passive:!0}),this.element.addEventListener("touchend",(e=>{clearTimeout(t),t=null})))}_buildColumnHeader(){var e=this.definition;this.table;(this.dispatch("column-layout",this),void 0!==e.visible&&(e.visible?this.show(!0):this.hide(!0)),e.cssClass)&&e.cssClass.split(" ").forEach((e=>{this.element.classList.add(e)}));e.field&&this.element.setAttribute("tabulator-field",e.field),this.setMinWidth(parseInt(e.minWidth)),e.maxInitialWidth&&(this.maxInitialWidth=parseInt(e.maxInitialWidth)),e.maxWidth&&this.setMaxWidth(parseInt(e.maxWidth)),this.reinitializeWidth(),this.tooltip=this.definition.tooltip,this.hozAlign=this.definition.hozAlign,this.vertAlign=this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign}_buildColumnHeaderContent(){this.definition,this.table;var e=document.createElement("div");return e.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),e.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),e}_buildColumnHeaderTitle(){var e=this.definition,t=document.createElement("div");if(t.classList.add("tabulator-col-title"),e.editableTitle){var i=document.createElement("input");i.classList.add("tabulator-title-editor"),i.addEventListener("click",(e=>{e.stopPropagation(),i.focus()})),i.addEventListener("change",(()=>{e.title=i.value,this.dispatchExternal("columnTitleChanged",this.getComponent())})),t.appendChild(i),e.field?this.langBind("columns|"+e.field,(t=>{i.value=t||e.title||" "})):i.value=e.title||" "}else e.field?this.langBind("columns|"+e.field,(i=>{this._formatColumnHeaderTitle(t,i||e.title||" ")})):this._formatColumnHeaderTitle(t,e.title||" ");return t}_formatColumnHeaderTitle(e,t){var i=this.chain("column-format",[this,t,e],null,(()=>t));switch(typeof i){case"object":i instanceof Node?e.appendChild(i):(e.innerHTML="",console.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:",i));break;case"undefined":case"null":e.innerHTML="";break;default:e.innerHTML=i}}_buildGroupHeader(){(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass)&&this.definition.cssClass.split(" ").forEach((e=>{this.element.classList.add(e)}));this.titleElement.style.textAlign=this.definition.headerHozAlign,this.element.appendChild(this.groupElement)}_getFlatData(e){return e[this.field]}_getNestedData(e){var t,i=e,s=this.fieldStructure,o=s.length;for(let e=0;e-1&&this.columns.splice(t,1),this.columns.length||this.delete()}setWidth(e){this.widthFixed=!0,this.setWidthActual(e)}setWidthActual(e){isNaN(e)&&(e=Math.floor(this.table.element.clientWidth/100*parseInt(e))),e=Math.max(this.minWidth,e),this.maxWidth&&(e=Math.min(this.maxWidth,e)),this.width=e,this.widthStyled=e?e+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach((function(e){e.setWidth()})),this.parent.isGroup&&this.parent.matchChildWidths(),this.dispatch("column-width",this)}checkCellHeights(){var e=[];this.cells.forEach((function(t){t.row.heightInitialized&&(null!==t.row.getElement().offsetParent?(e.push(t.row),t.row.clearCellHeight()):t.row.heightInitialized=!1)})),e.forEach((function(e){e.calcHeight()})),e.forEach((function(e){e.setCellHeight()}))}getWidth(){var e=0;return this.isGroup?this.columns.forEach((function(t){t.visible&&(e+=t.getWidth())})):e=this.width,e}getHeight(){return Math.ceil(this.element.getBoundingClientRect().height)}setMinWidth(e){this.minWidth=e,this.minWidthStyled=e?e+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach((function(e){e.setMinWidth()}))}setMaxWidth(e){this.maxWidth=e,this.maxWidthStyled=e?e+"px":"",this.element.style.maxWidth=this.maxWidthStyled,this.cells.forEach((function(e){e.setMaxWidth()}))}delete(){return new Promise(((e,t)=>{this.isGroup&&this.columns.forEach((function(e){e.delete()})),this.dispatch("column-delete",this);var i=this.cells.length;for(let e=0;e-1&&this._nextVisibleColumn(e+1)}_nextVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._nextVisibleColumn(e+1)}prevColumn(){var e=this.table.columnManager.findColumnIndex(this);return e>-1&&this._prevVisibleColumn(e-1)}_prevVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._prevVisibleColumn(e-1)}reinitializeWidth(e){this.widthFixed=!1,void 0===this.definition.width||e||this.setWidth(this.definition.width),this.dispatch("column-width-fit-before",this),this.fitToData(e),this.dispatch("column-width-fit-after",this)}fitToData(e){if(!this.isGroup){this.widthFixed||(this.element.style.width="",this.cells.forEach((e=>{e.clearWidth()})));var t=this.element.offsetWidth;if((!this.width||!this.widthFixed)&&(this.cells.forEach((e=>{var i=e.getWidth();i>t&&(t=i)})),t)){var i=t+1;this.maxInitialWidth&&!e&&(i=Math.min(i,this.maxInitialWidth)),this.setWidthActual(i)}}}updateDefinition(e){var t;return this.isGroup||this.parent.isGroup?(console.error("Column Update Error - The updateDefinition function is only available on ungrouped columns"),Promise.reject("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(t=Object.assign({},this.getDefinition()),t=Object.assign(t,e),this.table.columnManager.addColumn(t,!1,this).then((e=>(t.field==this.field&&(this.field=!1),this.delete().then((()=>e.getComponent()))))))}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}getComponent(){return this.component||(this.component=new p(this)),this.component}}b.defaultOptionList=g;class f{constructor(e){return this._row=e,new Proxy(this,{get:function(e,t,i){return void 0!==e[t]?e[t]:e._row.table.componentFunctionBinder.handle("row",e._row,t)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getCells(){var e=[];return this._row.getCells().forEach((function(t){e.push(t.getComponent())})),e}getCell(e){var t=this._row.getCell(e);return!!t&&t.getComponent()}getIndex(){return this._row.getData("data")[this._row.table.options.index]}getPosition(e){return this._row.table.rowManager.getRowPosition(this._row,e)}delete(){return this._row.delete()}scrollTo(){return this._row.table.rowManager.scrollToRow(this._row)}move(e,t){this._row.moveToRow(e,t)}update(e){return this._row.updateData(e)}normalizeHeight(){this._row.normalizeHeight(!0)}_getSelf(){return this._row}reformat(){return this._row.reinitialize()}getTable(){return this._row.table}getNextRow(){var e=this._row.nextRow();return e?e.getComponent():e}getPrevRow(){var e=this._row.prevRow();return e?e.getComponent():e}}class v extends e{constructor(e,t,i="row"){super(t.table),this.parent=t,this.data={},this.type=i,this.element=!1,this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.component=null,this.created=!1,this.setData(e)}create(){this.created||(this.created=!0,this.generateElement())}createElement(){var e=document.createElement("div");e.classList.add("tabulator-row"),e.setAttribute("role","row"),this.element=e}getElement(){return this.create(),this.element}detachElement(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}generateElement(){this.createElement(),this.dispatch("row-init",this)}generateCells(){this.cells=this.table.columnManager.generateCells(this)}initialize(e){if(this.create(),!this.initialized||e){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.dispatch("row-layout-before",this),this.generateCells(),this.initialized=!0,this.table.columnManager.renderer.renderRowCells(this),e&&this.normalizeHeight(),this.dispatch("row-layout",this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.dispatch("row-layout-after",this)}else this.table.columnManager.renderer.rerenderRowCells(this)}reinitializeHeight(){this.heightInitialized=!1,this.element&&null!==this.element.offsetParent&&this.normalizeHeight(!0)}deinitializeHeight(){this.heightInitialized=!1}reinitialize(e){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&null!==this.element.offsetParent&&this.initialize(!0),this.dispatch("row-relayout",this)}calcHeight(e){var t=0,i=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach((function(e){var i=e.getHeight();i>t&&(t=i)})),this.height=e?Math.max(t,i):this.manualHeight?this.height:Math.max(t,i),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight}setCellHeight(){this.cells.forEach((function(e){e.setHeight()})),this.heightInitialized=!0}clearCellHeight(){this.cells.forEach((function(e){e.clearHeight()}))}normalizeHeight(e){e&&this.clearCellHeight(),this.calcHeight(e),this.setCellHeight()}setHeight(e,t){(this.height!=e||t)&&(this.manualHeight=!0,this.height=e,this.heightStyled=e?e+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)}getHeight(){return this.outerHeight}getWidth(){return this.element.offsetWidth}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}setData(e){this.data=this.chain("row-data-init-before",[this,e],void 0,e),this.dispatch("row-data-init-after",this)}updateData(e){var t,i=this.element&&s.elVisible(this.element),o={};return new Promise(((s,n)=>{for(var r in"string"==typeof e&&(e=JSON.parse(e)),this.dispatch("row-data-save-before",this),this.subscribed("row-data-changing")&&(o=Object.assign(o,this.data),o=Object.assign(o,e)),t=this.chain("row-data-changing",[this,o,e],null,e))this.data[r]=t[r];for(var r in this.dispatch("row-data-save-after",this),e){this.table.columnManager.getColumnsByFieldRoot(r).forEach((e=>{let s=this.getCell(e.getField());if(s){let o=e.getFieldValue(t);s.getValue()!=o&&(s.setValueProcessData(o),i&&s.cellRendered())}}))}i?(this.normalizeHeight(!0),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent())):(this.initialized=!1,this.height=0,this.heightStyled=""),this.dispatch("row-data-changed",this,i,e),this.dispatchExternal("rowUpdated",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),s()}))}getData(e){return e?this.chain("row-data-retrieve",[this,e],null,this.data):this.data}getCell(e){return e=this.table.columnManager.findColumn(e),this.initialized||this.generateCells(),this.cells.find((function(t){return t.column===e}))}getCellIndex(e){return this.cells.findIndex((function(t){return t===e}))}findCell(e){return this.cells.find((t=>t.element===e))}getCells(){return this.initialized||this.generateCells(),this.cells}nextRow(){return this.table.rowManager.nextDisplayRow(this,!0)||!1}prevRow(){return this.table.rowManager.prevDisplayRow(this,!0)||!1}moveToRow(e,t){var i=this.table.rowManager.findRow(e);i?(this.table.rowManager.moveRowActual(this,i,!t),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",e)}delete(){return this.dispatch("row-delete",this),this.deleteActual(),Promise.resolve()}deleteActual(e){this.table.rowManager.getRowIndex(this);this.detatchModules(),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.dispatch("row-deleted",this)}detatchModules(){this.dispatch("row-deleting",this)}deleteCells(){var e=this.cells.length;for(let t=0;ts||null===s)&&(s=e)})),null!==s?!1!==o?s.toFixed(o):s:""},min:function(e,t,i){var s=null,o=void 0!==i.precision&&i.precision;return e.forEach((function(e){((e=Number(e)){this.recalcGroup(e)})))}recalcGroup(e){var t,i;e&&e.calcs&&(e.calcs.bottom&&(t=this.rowsToData(e.rows),i=this.generateRowData("bottom",t),e.calcs.bottom.updateData(i),e.calcs.bottom.reinitialize()),e.calcs.top&&(t=this.rowsToData(e.rows),i=this.generateRowData("top",t),e.calcs.top.updateData(i),e.calcs.top.reinitialize()))}generateTopRow(e){return this.generateRow("top",this.rowsToData(e))}generateBottomRow(e){return this.generateRow("bottom",this.rowsToData(e))}rowsToData(e){var t=[];return e.forEach((e=>{if(t.push(e.getData()),this.table.options.dataTree&&this.table.options.dataTreeChildColumnCalcs&&e.modules.dataTree&&e.modules.dataTree.open){var i=this.rowsToData(this.table.modules.dataTree.getFilteredTreeChildren(e));t=t.concat(i)}})),t}generateRow(e,t){var i,s=this.generateRowData(e,t);return this.table.modExists("mutator")&&this.table.modules.mutator.disable(),i=new v(s,this,"calc"),this.table.modExists("mutator")&&this.table.modules.mutator.enable(),i.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+e),i.component=!1,i.getComponent=()=>(i.component||(i.component=new c(i)),i.component),i.generateCells=()=>{var t=[];this.table.columnManager.columnsByIndex.forEach((s=>{this.genColumn.setField(s.getField()),this.genColumn.hozAlign=s.hozAlign,s.definition[e+"CalcFormatter"]&&this.table.modExists("format")?this.genColumn.modules.format={formatter:this.table.modules.format.getFormatter(s.definition[e+"CalcFormatter"]),params:s.definition[e+"CalcFormatterParams"]||{}}:this.genColumn.modules.format={formatter:this.table.modules.format.getFormatter("plaintext"),params:{}},this.genColumn.definition.cssClass=s.definition.cssClass;var o=new m(this.genColumn,i);o.getElement(),o.column=s,o.setWidth(),s.cells.push(o),t.push(o),s.visible||o.hide()})),i.cells=t},i}generateRowData(e,t){var i,s,o={},n="top"==e?this.topCalcs:this.botCalcs,r="top"==e?"topCalc":"botCalc";return n.forEach((function(e){var n=[];e.modules.columnCalcs&&e.modules.columnCalcs[r]&&(t.forEach((function(t){n.push(e.getFieldValue(t))})),s=r+"Params",i="function"==typeof e.modules.columnCalcs[s]?e.modules.columnCalcs[s](n,t):e.modules.columnCalcs[s],e.setFieldValue(o,e.modules.columnCalcs[r](n,t,i)))})),o}hasTopCalcs(){return!!this.topCalcs.length}hasBottomCalcs(){return!!this.botCalcs.length}redraw(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)}getResults(){var e={};return this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.getGroups(!0).forEach((t=>{e[t.getKey()]=this.getGroupResults(t)})):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e}getGroupResults(e){var t=e._getSelf(),i=e.getSubGroups(),s={};return i.forEach((e=>{s[e.getKey()]=this.getGroupResults(e)})),{top:t.calcs.top?t.calcs.top.getData():{},bottom:t.calcs.bottom?t.calcs.bottom.getData():{},groups:s}}}C.moduleName="columnCalcs",C.calculations=w;class E extends t{constructor(e){super(e),this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.displayIndex=0,this.registerTableOption("dataTree",!1),this.registerTableOption("dataTreeFilter",!0),this.registerTableOption("dataTreeSort",!0),this.registerTableOption("dataTreeElementColumn",!1),this.registerTableOption("dataTreeBranchElement",!0),this.registerTableOption("dataTreeChildIndent",9),this.registerTableOption("dataTreeChildField","_children"),this.registerTableOption("dataTreeCollapseElement",!1),this.registerTableOption("dataTreeExpandElement",!1),this.registerTableOption("dataTreeStartExpanded",!1),this.registerTableOption("dataTreeChildColumnCalcs",!1),this.registerTableOption("dataTreeSelectPropagate",!1),this.registerComponentFunction("row","treeCollapse",this.collapseRow.bind(this)),this.registerComponentFunction("row","treeExpand",this.expandRow.bind(this)),this.registerComponentFunction("row","treeToggle",this.toggleRow.bind(this)),this.registerComponentFunction("row","getTreeParent",this.getTreeParent.bind(this)),this.registerComponentFunction("row","getTreeChildren",this.getRowChildren.bind(this)),this.registerComponentFunction("row","addTreeChild",this.addTreeChildRow.bind(this)),this.registerComponentFunction("row","isTreeExpanded",this.isRowExpanded.bind(this))}initialize(){if(this.table.options.dataTree){var e=null,t=this.table.options;switch(this.field=t.dataTreeChildField,this.indent=t.dataTreeChildIndent,t.dataTreeBranchElement&&(!0===t.dataTreeBranchElement?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):"string"==typeof t.dataTreeBranchElement?((e=document.createElement("div")).innerHTML=t.dataTreeBranchElement,this.branchEl=e.firstChild):this.branchEl=t.dataTreeBranchElement),t.dataTreeCollapseElement?"string"==typeof t.dataTreeCollapseElement?((e=document.createElement("div")).innerHTML=t.dataTreeCollapseElement,this.collapseEl=e.firstChild):this.collapseEl=t.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="
"),t.dataTreeExpandElement?"string"==typeof t.dataTreeExpandElement?((e=document.createElement("div")).innerHTML=t.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=t.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="
"),typeof t.dataTreeStartExpanded){case"boolean":this.startOpen=function(e,i){return t.dataTreeStartExpanded};break;case"function":this.startOpen=t.dataTreeStartExpanded;break;default:this.startOpen=function(e,i){return t.dataTreeStartExpanded[i]}}this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("row-deleted",this.rowDelete.bind(this),0),this.subscribe("row-data-changed",this.rowDataChanged.bind(this),10),this.subscribe("cell-value-updated",this.cellValueChanged.bind(this)),this.subscribe("edit-cancelled",this.cellValueChanged.bind(this)),this.subscribe("column-moving-rows",this.columnMoving.bind(this)),this.subscribe("table-built",this.initializeElementField.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),30)}}initializeElementField(){var e=this.table.columnManager.getFirstVisibleColumn();this.elementField=this.table.options.dataTreeElementColumn||!!e&&e.field}getRowChildren(e){return this.getTreeChildren(e,!0)}columnMoving(){var e=[];return this.table.rowManager.rows.forEach((t=>{e=e.concat(this.getTreeChildren(t,!1,!0))})),e}rowDataChanged(e,t,i){this.redrawNeeded(i)&&(this.initializeRow(e),t&&(this.layoutRow(e),this.refreshData(!0)))}cellValueChanged(e){e.column.getField()===this.elementField&&this.layoutRow(e.row)}initializeRow(e){var t=e.getData()[this.field],i=Array.isArray(t),s=i||!i&&"object"==typeof t&&null!==t;!s&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!s&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:!!s&&(e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0)),controlEl:!(!e.modules.dataTree||!s)&&e.modules.dataTree.controlEl,branchEl:!(!e.modules.dataTree||!s)&&e.modules.dataTree.branchEl,parent:!!e.modules.dataTree&&e.modules.dataTree.parent,children:s}}reinitializeRowChildren(e){this.getTreeChildren(e,!1,!0).forEach((function(e){e.reinitialize(!0)}))}layoutRow(e){var t=(this.elementField?e.getCell(this.elementField):e.getCells()[0]).getElement(),i=e.modules.dataTree;i.branchEl&&(i.branchEl.parentNode&&i.branchEl.parentNode.removeChild(i.branchEl),i.branchEl=!1),i.controlEl&&(i.controlEl.parentNode&&i.controlEl.parentNode.removeChild(i.controlEl),i.controlEl=!1),this.generateControlElement(e,t),e.getElement().classList.add("tabulator-tree-level-"+i.index),i.index&&(this.branchEl?(i.branchEl=this.branchEl.cloneNode(!0),t.insertBefore(i.branchEl,t.firstChild),this.table.rtl?i.branchEl.style.marginRight=(i.branchEl.offsetWidth+i.branchEl.style.marginLeft)*(i.index-1)+i.index*this.indent+"px":i.branchEl.style.marginLeft=(i.branchEl.offsetWidth+i.branchEl.style.marginRight)*(i.index-1)+i.index*this.indent+"px"):this.table.rtl?t.style.paddingRight=parseInt(window.getComputedStyle(t,null).getPropertyValue("padding-right"))+i.index*this.indent+"px":t.style.paddingLeft=parseInt(window.getComputedStyle(t,null).getPropertyValue("padding-left"))+i.index*this.indent+"px")}generateControlElement(e,t){var i=e.modules.dataTree,s=(t=t||e.getCells()[0].getElement(),i.controlEl);!1!==i.children&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",(t=>{t.stopPropagation(),this.collapseRow(e)}))):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",(t=>{t.stopPropagation(),this.expandRow(e)}))),i.controlEl.addEventListener("mousedown",(e=>{e.stopPropagation()})),s&&s.parentNode===t?s.parentNode.replaceChild(i.controlEl,s):t.insertBefore(i.controlEl,t.firstChild))}setDisplayIndex(e){this.displayIndex=e}getDisplayIndex(){return this.displayIndex}getRows(e){var t=[];return e.forEach(((e,i)=>{var s;t.push(e),e instanceof v&&(e.create(),(s=e.modules.dataTree.children).index||!1===s.children||this.getChildren(e).forEach((e=>{e.create(),t.push(e)})))})),t}getChildren(e,t){var i=e.modules.dataTree,s=[],o=[];return!1!==i.children&&(i.open||t)&&(Array.isArray(i.children)||(i.children=this.generateChildren(e)),s=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(i.children):i.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(s),s.forEach((e=>{o.push(e),this.getChildren(e).forEach((e=>{o.push(e)}))}))),o}generateChildren(e){var t=[],i=e.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach((i=>{var s=new v(i||{},this.table.rowManager);s.create(),s.modules.dataTree.index=e.modules.dataTree.index+1,s.modules.dataTree.parent=e,s.modules.dataTree.children&&(s.modules.dataTree.open=this.startOpen(s.getComponent(),s.modules.dataTree.index)),t.push(s)})),t}expandRow(e,t){var i=e.modules.dataTree;!1!==i.children&&(i.open=!0,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowExpanded",e.getComponent(),e.modules.dataTree.index))}collapseRow(e){var t=e.modules.dataTree;!1!==t.children&&(t.open=!1,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowCollapsed",e.getComponent(),e.modules.dataTree.index))}toggleRow(e){var t=e.modules.dataTree;!1!==t.children&&(t.open?this.collapseRow(e):this.expandRow(e))}isRowExpanded(e){return e.modules.dataTree.open}getTreeParent(e){return!!e.modules.dataTree.parent&&e.modules.dataTree.parent.getComponent()}getFilteredTreeChildren(e){var t=e.modules.dataTree,i=[];return t.children&&(Array.isArray(t.children)||(t.children=this.generateChildren(e)),(this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(t.children):t.children).forEach((e=>{e instanceof v&&i.push(e)}))),i}rowDelete(e){var t,i=e.modules.dataTree.parent;i&&(!1!==(t=this.findChildIndex(e,i))&&i.data[this.field].splice(t,1),i.data[this.field].length||delete i.data[this.field],this.initializeRow(i),this.layoutRow(i)),this.refreshData(!0)}addTreeChildRow(e,t,i,s){var o=!1;"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),void 0!==s&&!1!==(o=this.findChildIndex(s,e))&&e.data[this.field].splice(i?o:o+1,0,t),!1===o&&(i?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.refreshData(!0)}findChildIndex(e,t){var i=!1;return"object"==typeof e?e instanceof v?i=e.data:e instanceof RowComponent?i=e._getSelf().data:"undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&t.modules.dataTree&&(i=t.modules.dataTree.children.find((t=>t instanceof v&&t.element===e)))&&(i=i.data):i=null!=e&&t.data[this.field].find((t=>t.data[this.table.options.index]==e)),i&&(Array.isArray(t.data[this.field])&&(i=t.data[this.field].indexOf(i)),-1==i&&(i=!1)),i}getTreeChildren(e,t,i){var s=e.modules.dataTree,o=[];return s.children&&(Array.isArray(s.children)||(s.children=this.generateChildren(e)),s.children.forEach((e=>{e instanceof v&&(o.push(t?e.getComponent():e),i&&(o=o.concat(this.getTreeChildren(e,t,i))))}))),o}getChildField(){return this.field}redrawNeeded(e){return!!this.field&&void 0!==e[this.field]||!!this.elementField&&void 0!==e[this.elementField]}}E.moduleName="dataTree";var y={csv:function(e,t,i){var s=t&&t.delimiter?t.delimiter:",",o=[],n=[];e.forEach((e=>{var t=[];switch(e.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":e.columns.forEach(((e,t)=>{e&&1===e.depth&&(n[t]=void 0===e.value||null===e.value?"":'"'+String(e.value).split('"').join('""')+'"')}));break;case"row":e.columns.forEach((e=>{if(e){switch(typeof e.value){case"object":e.value=JSON.stringify(e.value);break;case"undefined":case"null":e.value=""}t.push('"'+String(e.value).split('"').join('""')+'"')}})),o.push(t.join(s))}})),n.length&&o.unshift(n.join(s)),o=o.join("\n"),t.bom&&(o="\ufeff"+o),i(o,"text/csv")},json:function(e,t,i){var s=[];e.forEach((e=>{var t={};switch(e.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":e.columns.forEach((e=>{e&&(t[e.component.getTitleDownload()||e.component.getField()]=e.value)})),s.push(t)}})),i(s=JSON.stringify(s,null,"\t"),"application/json")},jsonLines:function(e,t,i){const s=[];e.forEach((e=>{const t={};switch(e.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":e.columns.forEach((e=>{e&&(t[e.component.getTitleDownload()||e.component.getField()]=e.value)})),s.push(JSON.stringify(t))}})),i(s.join("\n"),"application/x-ndjson")},pdf:function(e,t,i){var s=[],o=[],n={},r=t.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},a=t.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},l=t.jsPDF||{},h=t&&t.title?t.title:"";function d(e,t){var i=[];return e.columns.forEach((e=>{var s;if(e){switch(typeof e.value){case"object":e.value=JSON.stringify(e.value);break;case"undefined":case"null":e.value=""}s={content:e.value,colSpan:e.width,rowSpan:e.height},t&&(s.styles=t),i.push(s)}})),i}l.orientation||(l.orientation=t.orientation||"landscape"),l.unit||(l.unit="pt"),e.forEach((e=>{switch(e.type){case"header":s.push(d(e));break;case"group":o.push(d(e,r));break;case"calc":o.push(d(e,a));break;case"row":o.push(d(e))}}));var c=new jspdf.jsPDF(l);t&&t.autoTable&&(n="function"==typeof t.autoTable?t.autoTable(c)||{}:t.autoTable),h&&(n.didDrawPage=function(e){c.text(h,40,30)}),n.head=s,n.body=o,c.autoTable(n),t&&t.documentProcessing&&t.documentProcessing(c),i(c.output("arraybuffer"),"application/pdf")},xlsx:function(t,i,s){var o=i.sheetName||"Sheet1",n=XLSX.utils.book_new(),r=new e(this);function a(){var e=[],i=[],s={},o={s:{c:0,r:0},e:{c:t[0]?t[0].columns.reduce(((e,t)=>e+(t&&t.width?t.width:1)),0):0,r:t.length}};return t.forEach(((t,s)=>{var o=[];t.columns.forEach((function(e,t){e?(o.push(e.value instanceof Date||"object"!=typeof e.value?e.value:JSON.stringify(e.value)),(e.width>1||e.height>-1)&&(e.height>1||e.width>1)&&i.push({s:{r:s,c:t},e:{r:s+e.height-1,c:t+e.width-1}})):o.push("")})),e.push(o)})),XLSX.utils.sheet_add_aoa(s,e),s["!ref"]=XLSX.utils.encode_range(o),i.length&&(s["!merges"]=i),s}if(n.SheetNames=[],n.Sheets={},i.sheetOnly)s(a());else{if(i.sheets)for(var l in i.sheets)!0===i.sheets[l]?(n.SheetNames.push(l),n.Sheets[l]=a()):(n.SheetNames.push(l),r.commsSend(i.sheets[l],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:this.active,intercept:function(e){n.Sheets[l]=e}}));else n.SheetNames.push(o),n.Sheets[o]=a();i.documentProcessing&&(n=i.documentProcessing(n)),s(function(e){for(var t=new ArrayBuffer(e.length),i=new Uint8Array(t),s=0;s!=e.length;++s)i[s]=255&e.charCodeAt(s);return t}(XLSX.write(n,{bookType:"xlsx",bookSST:!0,type:"binary"})),"application/octet-stream")}},html:function(e,t,i){this.modExists("export",!0)&&i(this.modules.export.genereateHTMLTable(e),"text/html")}};class R extends t{constructor(e){super(e),this.registerTableOption("downloadReady",(function(e,t){return t})),this.registerTableOption("downloadConfig",{}),this.registerTableOption("downloadRowRange","active"),this.registerColumnOption("download"),this.registerColumnOption("titleDownload")}initialize(){this.registerTableFunction("download",this.download.bind(this)),this.registerTableFunction("downloadToTab",this.downloadToTab.bind(this))}downloadToTab(e,t,i,s){this.download(e,t,i,s,!0)}download(e,t,i,s,o){var n=!1;if("function"==typeof e?n=e:R.downloaders[e]?n=R.downloaders[e]:console.warn("Download Error - No such download type found: ",e),n){var r=this.generateExportList(s);n.call(this.table,r,i||{},function(i,s){o?!0===o?this.triggerDownload(i,s,e,t,!0):o(i):this.triggerDownload(i,s,e,t)}.bind(this))}}generateExportList(e){var t=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,e||this.table.options.downloadRowRange,"download"),i=this.table.options.groupHeaderDownload;return i&&!Array.isArray(i)&&(i=[i]),t.forEach((e=>{var t;"group"===e.type&&(t=e.columns[0],i&&i[e.indent]&&(t.value=i[e.indent](t.value,e.component._group.getRowCount(),e.component._group.getData(),e.component)))})),t}triggerDownload(e,t,i,s,o){var n=document.createElement("a"),r=new Blob([e],{type:t});s=s||"Tabulator."+("function"==typeof i?"txt":i);(r=this.table.options.downloadReady(e,r))&&(o?window.open(window.URL.createObjectURL(r)):navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(r,s):(n.setAttribute("href",window.URL.createObjectURL(r)),n.setAttribute("download",s),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)),this.dispatchExternal("downloadComplete"))}commsReceived(e,t,i){switch(t){case"intercept":this.download(i.type,"",i.options,i.active,i.intercept)}}}function x(e,t){var i=t.mask,s=void 0!==t.maskLetterChar?t.maskLetterChar:"A",o=void 0!==t.maskNumberChar?t.maskNumberChar:"9",n=void 0!==t.maskWildcardChar?t.maskWildcardChar:"*";function r(t){var a=i[t];void 0!==a&&a!==n&&a!==s&&a!==o&&(e.value=e.value+""+a,r(t+1))}e.addEventListener("keydown",(t=>{var r=e.value.length,a=t.key;if(t.keyCode>46){if(r>=i.length)return t.preventDefault(),t.stopPropagation(),!1;switch(i[r]){case s:if(a.toUpperCase()==a.toLowerCase())return t.preventDefault(),t.stopPropagation(),!1;break;case o:if(isNaN(a))return t.preventDefault(),t.stopPropagation(),!1;break;case n:break;default:if(a!==i[r])return t.preventDefault(),t.stopPropagation(),!1}}})),e.addEventListener("keyup",(i=>{i.keyCode>46&&t.maskAutoFill&&r(e.value.length)})),e.placeholder||(e.placeholder=i),t.maskAutoFill&&r(e.value.length)}R.moduleName="download",R.downloaders=y;var M={input:function(e,t,i,s,o){var n=e.getValue(),r=document.createElement("input");if(r.setAttribute("type",o.search?"search":"text"),r.style.padding="4px",r.style.width="100%",r.style.boxSizing="border-box",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),r.setAttribute(e,r.getAttribute(e)+o.elementAttributes["+"+e])):r.setAttribute(e,o.elementAttributes[e]);function a(e){null==n&&""!==r.value||r.value!==n?i(r.value)&&(n=r.value):s()}return r.value=void 0!==n?n:"",t((function(){r.focus({preventScroll:!0}),r.style.height="100%"})),r.addEventListener("change",a),r.addEventListener("blur",a),r.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:a();break;case 27:s();break;case 35:case 36:e.stopPropagation()}})),o.mask&&x(r,o),r},textarea:function(e,t,i,s,o){var n=e.getValue(),r=o.verticalNavigation||"hybrid",a=String(null!=n?n:""),l=((a.match(/(?:\r\n|\r|\n)/g)||[]).length,document.createElement("textarea")),h=0;if(l.style.display="block",l.style.padding="2px",l.style.height="100%",l.style.width="100%",l.style.boxSizing="border-box",l.style.whiteSpace="pre-wrap",l.style.resize="none",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),l.setAttribute(e,l.getAttribute(e)+o.elementAttributes["+"+e])):l.setAttribute(e,o.elementAttributes[e]);function d(t){null==n&&""!==l.value||l.value!==n?(i(l.value)&&(n=l.value),setTimeout((function(){e.getRow().normalizeHeight()}),300)):s()}return l.value=a,t((function(){l.focus({preventScroll:!0}),l.style.height="100%",l.scrollHeight,l.style.height=l.scrollHeight+"px",e.getRow().normalizeHeight()})),l.addEventListener("change",d),l.addEventListener("blur",d),l.addEventListener("keyup",(function(){l.style.height="";var t=l.scrollHeight;l.style.height=t+"px",t!=h&&(h=t,e.getRow().normalizeHeight())})),l.addEventListener("keydown",(function(e){switch(e.keyCode){case 27:s();break;case 38:("editor"==r||"hybrid"==r&&l.selectionStart)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 40:("editor"==r||"hybrid"==r&&l.selectionStart!==l.value.length)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}})),o.mask&&x(l,o),l},number:function(e,t,i,s,o){var n=e.getValue(),r=o.verticalNavigation||"editor",a=document.createElement("input");if(a.setAttribute("type","number"),void 0!==o.max&&a.setAttribute("max",o.max),void 0!==o.min&&a.setAttribute("min",o.min),void 0!==o.step&&a.setAttribute("step",o.step),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),a.setAttribute(e,a.getAttribute(e)+o.elementAttributes["+"+e])):a.setAttribute(e,o.elementAttributes[e]);a.value=n;var l=function(e){h()};function h(){var e=a.value;isNaN(e)||""===e||(e=Number(e)),e!==n?i(e)&&(n=e):s()}return t((function(){a.removeEventListener("blur",l),a.focus({preventScroll:!0}),a.style.height="100%",a.addEventListener("blur",l)})),a.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:h();break;case 27:s();break;case 38:case 40:"editor"==r&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}})),o.mask&&x(a,o),a},range:function(e,t,i,s,o){var n=e.getValue(),r=document.createElement("input");if(r.setAttribute("type","range"),void 0!==o.max&&r.setAttribute("max",o.max),void 0!==o.min&&r.setAttribute("min",o.min),void 0!==o.step&&r.setAttribute("step",o.step),r.style.padding="4px",r.style.width="100%",r.style.boxSizing="border-box",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),r.setAttribute(e,r.getAttribute(e)+o.elementAttributes["+"+e])):r.setAttribute(e,o.elementAttributes[e]);function a(){var e=r.value;isNaN(e)||""===e||(e=Number(e)),e!=n?i(e)&&(n=e):s()}return r.value=n,t((function(){r.focus({preventScroll:!0}),r.style.height="100%"})),r.addEventListener("blur",(function(e){a()})),r.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:a();break;case 27:s()}})),r},select:function(e,t,i,o,n){var r=this,a=e.getElement(),l=e.getValue(),h=n.verticalNavigation||"editor",d=void 0!==l||null===l?Array.isArray(l)?l:[l]:void 0!==n.defaultValue?n.defaultValue:[],c=document.createElement("input"),u=document.createElement("div"),m=n.multiselect,p=[],g={},b=[],f=[],v=!0,w=!1,C="",E=null;function y(t){var i,s={},o=r.table.getData();return(i=t?r.table.columnManager.getColumnByField(t):e.getColumn()._getSelf())?o.forEach((function(e){var t=i.getFieldValue(e);null!=t&&""!==t&&(s[t]=!0)})):console.warn("unable to find matching column to create select lookup list:",t),Object.keys(s)}function R(t,i){var s=[],o=[];function r(e){e={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1};return i.indexOf(e.value)>-1&&M(e),s.push(e),o.push(e),e}if("function"==typeof t&&(t=t(e)),Array.isArray(t))t.forEach((function(e){var t;"object"==typeof e?e.options?(t={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1},o.push(t),e.options.forEach((function(e){r(e)}))):r(e):(t={label:e,value:e,element:!1},i.indexOf(t.value)>-1&&M(t),s.push(t),o.push(t))}));else for(var a in t){var l={label:t[a],value:a,element:!1};i.indexOf(l.value)>-1&&M(l),s.push(l),o.push(l)}n.sortValuesList&&(s.sort(((e,t)=>e.labelt.label?1:0)),o.sort(((e,t)=>e.labelt.label?1:0)),"asc"!==n.sortValuesList&&(s.reverse(),o.reverse())),p=s,b=o,function(){for(;u.firstChild;)u.removeChild(u.firstChild);b.forEach((function(t){var i=t.element;if(!i){if(i=document.createElement("div"),t.label=n.listItemFormatter?n.listItemFormatter(t.value,t.label,e,i,t.itemParams):t.label,t.group?(i.classList.add("tabulator-edit-select-list-group"),i.tabIndex=0,i.innerHTML=""===t.label?" ":t.label):(i.classList.add("tabulator-edit-select-list-item"),i.tabIndex=0,i.innerHTML=""===t.label?" ":t.label,i.addEventListener("click",(function(){w=!0,setTimeout((()=>{w=!1}),10),m?(L(t),c.focus()):k(t)})),f.indexOf(t)>-1&&i.classList.add("active")),t.elementAttributes&&"object"==typeof t.elementAttributes)for(let e in t.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),i.setAttribute(e,c.getAttribute(e)+t.elementAttributes["+"+e])):i.setAttribute(e,t.elementAttributes[e]);i.addEventListener("mousedown",(function(){v=!1,setTimeout((function(){v=!0}),10)})),t.element=i}u.appendChild(i)}))}()}function x(e,t){!m&&g&&g.element&&g.element.classList.remove("active"),g&&g.element&&g.element.classList.remove("focused"),g=e,e.element&&(e.element.classList.add("focused"),t&&e.element.classList.add("active")),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function M(e){-1==f.indexOf(e)&&(f.push(e),x(e,!0)),S()}function T(e){var t=f[e];e>-1&&(f.splice(e,1),t.element&&t.element.classList.remove("active"))}function L(e){e||(e=g);var t=f.indexOf(e);t>-1?T(t):(!0!==m&&f.length>=m&&T(0),M(e)),S()}function k(e){P(),e||(e=g),e&&(c.value=e.label,i(e.value)),d=[e.value]}function D(e){e||P();var t=[];f.forEach((e=>{t.push(e.value)})),d=t,i(t)}function S(){var e=[];f.forEach((t=>{e.push(t.label)})),c.value=e.join(", "),!1===r.currentCell&&D(!0)}function F(){P(),o()}function P(){u.parentNode&&u.parentNode.removeChild(u),r.table.rowManager.element.removeEventListener("scroll",F)}if((Array.isArray(n)||!Array.isArray(n)&&"object"==typeof n&&!n.values)&&(console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"),n={values:n}),c.setAttribute("type","text"),c.style.padding="4px",c.style.width="100%",c.style.boxSizing="border-box",c.style.cursor="default",c.readOnly=0!=this.currentCell,n.elementAttributes&&"object"==typeof n.elementAttributes)for(let e in n.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),c.setAttribute(e,c.getAttribute(e)+n.elementAttributes["+"+e])):c.setAttribute(e,n.elementAttributes[e]);return c.value=void 0!==l||null===l?l:"",c.addEventListener("search",(function(e){c.value||(!function(){var e=f.length;for(let t=0;t0&&x(p[t-1],!m));break;case 40:t=p.indexOf(g),("editor"==h||"hybrid"==h&&t=38&&e.keyCode<=90&&function(e){clearTimeout(E);var t=String.fromCharCode(event.keyCode).toLowerCase();C+=t.toLowerCase();var i=p.find((e=>void 0!==e.label&&e.label.toLowerCase().startsWith(C)));i&&x(i,!m),E=setTimeout((()=>{C=""}),800)}(e.keyCode)}})),c.addEventListener("blur",(function(e){v&&(m?D():F())})),c.addEventListener("focus",(function(e){w||function(){if(f=[],!u.parentNode){!0===n.values?R(y(),d):"string"==typeof n.values?R(y(n.values),d):R(n.values||[],d);var e=s.elOffset(a);u.style.minWidth=a.offsetWidth+"px",u.style.top=e.top+a.offsetHeight+"px",u.style.left=e.left+"px",u.addEventListener("mousedown",(function(e){v=!1,setTimeout((function(){v=!0}),10)})),document.body.appendChild(u)}}()})),(u=document.createElement("div")).classList.add("tabulator-edit-select-list"),t((function(){c.style.height="100%",c.focus({preventScroll:!0})})),setTimeout((()=>{this.table.rowManager.element.addEventListener("scroll",F)}),10),c},autocomplete:function(e,t,i,o,n){var r=this,a=e.getElement(),l=e.getValue(),h=n.verticalNavigation||"editor",d=void 0!==l||null===l?l:void 0!==n.defaultValue?n.defaultValue:"",c=document.createElement("input"),u=document.createElement("div"),m=[],p=!1,g=!0,b=!1;if(c.setAttribute("type","search"),c.style.padding="4px",c.style.width="100%",c.style.boxSizing="border-box",n.elementAttributes&&"object"==typeof n.elementAttributes)for(let e in n.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),c.setAttribute(e,c.getAttribute(e)+n.elementAttributes["+"+e])):c.setAttribute(e,n.elementAttributes[e]);function f(){!0===n.values?b=v():"string"==typeof n.values&&(b=v(n.values))}function v(t){var i,s={},o=r.table.getData();return(i=t?r.table.columnManager.getColumnByField(t):e.getColumn()._getSelf())?(o.forEach((function(e){var t=i.getFieldValue(e);null!=t&&""!==t&&(s[t]=!0)})),s=n.sortValuesList?"asc"==n.sortValuesList?Object.keys(s).sort():Object.keys(s).sort().reverse():Object.keys(s)):console.warn("unable to find matching column to create autocomplete lookup list:",t),s}function w(e,t){var i,s,o=[];i=b||(n.values||[]),n.searchFunc?(o=n.searchFunc(e,i))instanceof Promise?(C(void 0!==n.searchingPlaceholder?n.searchingPlaceholder:"Searching..."),o.then((e=>{R(E(e),t)})).catch((e=>{console.err("error in autocomplete search promise:",e)}))):R(E(o),t):(s=E(i),""===e?n.showListOnEmpty&&(o=s):s.forEach((function(t){null===t.value&&void 0===t.value||(String(t.value).toLowerCase().indexOf(String(e).toLowerCase())>-1||String(t.title).toLowerCase().indexOf(String(e).toLowerCase())>-1)&&o.push(t)})),R(o,t))}function C(e){var t=document.createElement("div");y(),!1!==e&&(t.classList.add("tabulator-edit-select-list-notice"),t.tabIndex=0,e instanceof Node?t.appendChild(e):t.innerHTML=e,u.appendChild(t))}function E(e){var t=[];if(Array.isArray(e))e.forEach((function(e){var i={};"object"==typeof e?(i.title=n.listItemFormatter?n.listItemFormatter(e.value,e.label):e.label,i.value=e.value):(i.title=n.listItemFormatter?n.listItemFormatter(e,e):e,i.value=e),t.push(i)}));else for(var i in e){var s={title:n.listItemFormatter?n.listItemFormatter(i,e[i]):e[i],value:i};t.push(s)}return t}function y(){for(;u.firstChild;)u.removeChild(u.firstChild)}function R(e,t){e.length?function(e,t){var i=!1;y(),(m=e).forEach((function(e){var s=e.element;s||((s=document.createElement("div")).classList.add("tabulator-edit-select-list-item"),s.tabIndex=0,s.innerHTML=e.title,s.addEventListener("click",(function(t){T(e),M()})),s.addEventListener("mousedown",(function(e){g=!1,setTimeout((function(){g=!0}),10)})),e.element=s,t&&e.value==l&&(c.value=e.title,e.element.classList.add("active"),i=!0),e===p&&(e.element.classList.add("active"),i=!0)),u.appendChild(s)})),i||T(!1)}(e,t):n.emptyPlaceholder&&C(n.emptyPlaceholder)}function M(){L(),p?l!==p.value?(l=p.value,c.value=p.title,i(p.value)):o():n.freetext||n.allowEmpty&&""===c.value?(l=c.value,i(c.value)):o()}function T(e,t){p&&p.element&&p.element.classList.remove("active"),p=e,e&&e.element&&e.element.classList.add("active"),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function L(){u.parentNode&&u.parentNode.removeChild(u),r.table.rowManager.element.removeEventListener("scroll",k)}function k(){L(),o()}return u.classList.add("tabulator-edit-select-list"),u.addEventListener("mousedown",(function(e){g=!1,setTimeout((function(){g=!0}),10)})),c.addEventListener("keydown",(function(e){var t;switch(e.keyCode){case 38:t=m.indexOf(p),("editor"==h||"hybrid"==h&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),T(t>0&&m[t-1]));break;case 40:t=m.indexOf(p),("editor"==h||"hybrid"==h&&t{this.table.rowManager.element.addEventListener("scroll",k)}),10),f(),c.value=d,w(d,!0),c},star:function(e,t,i,s,o){var n=this,r=e.getElement(),a=e.getValue(),l=r.getElementsByTagName("svg").length||5,h=r.getElementsByTagName("svg")[0]?r.getElementsByTagName("svg")[0].getAttribute("width"):14,d=[],c=document.createElement("div"),u=document.createElementNS("http://www.w3.org/2000/svg","svg");function m(e){d.forEach((function(t,i){i'):("ie"==n.table.browser?t.setAttribute("class","tabulator-star-inactive"):t.classList.replace("tabulator-star-active","tabulator-star-inactive"),t.innerHTML='')}))}function p(e){var t=document.createElement("span"),s=u.cloneNode(!0);d.push(s),t.addEventListener("mouseenter",(function(t){t.stopPropagation(),t.stopImmediatePropagation(),m(e)})),t.addEventListener("mousemove",(function(e){e.stopPropagation(),e.stopImmediatePropagation()})),t.addEventListener("click",(function(t){t.stopPropagation(),t.stopImmediatePropagation(),i(e),r.blur()})),t.appendChild(s),c.appendChild(t)}function g(e){a=e,m(e)}if(r.style.whiteSpace="nowrap",r.style.overflow="hidden",r.style.textOverflow="ellipsis",c.style.verticalAlign="middle",c.style.display="inline-block",c.style.padding="4px",u.setAttribute("width",h),u.setAttribute("height",h),u.setAttribute("viewBox","0 0 512 512"),u.setAttribute("xml:space","preserve"),u.style.padding="0 1px",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),c.setAttribute(e,c.getAttribute(e)+o.elementAttributes["+"+e])):c.setAttribute(e,o.elementAttributes[e]);for(var b=1;b<=l;b++)p(b);return m(a=Math.min(parseInt(a),l)),c.addEventListener("mousemove",(function(e){m(0)})),c.addEventListener("click",(function(e){i(0)})),r.addEventListener("blur",(function(e){s()})),r.addEventListener("keydown",(function(e){switch(e.keyCode){case 39:g(a+1);break;case 37:g(a-1);break;case 13:i(a);break;case 27:s()}})),c},progress:function(e,t,i,s,o){var n,r,a=e.getElement(),l=void 0===o.max?a.getElementsByTagName("div")[0]&&a.getElementsByTagName("div")[0].getAttribute("max")||100:o.max,h=void 0===o.min?a.getElementsByTagName("div")[0]&&a.getElementsByTagName("div")[0].getAttribute("min")||0:o.min,d=(l-h)/100,c=e.getValue()||0,u=document.createElement("div"),m=document.createElement("div");function p(){var e=window.getComputedStyle(a,null),t=d*Math.round(m.offsetWidth/((a.clientWidth-parseInt(e.getPropertyValue("padding-left"))-parseInt(e.getPropertyValue("padding-right")))/100))+h;i(t),a.setAttribute("aria-valuenow",t),a.setAttribute("aria-label",c)}if(u.style.position="absolute",u.style.right="0",u.style.top="0",u.style.bottom="0",u.style.width="5px",u.classList.add("tabulator-progress-handle"),m.style.display="inline-block",m.style.position="relative",m.style.height="100%",m.style.backgroundColor="#488CE9",m.style.maxWidth="100%",m.style.minWidth="0%",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),m.setAttribute(e,m.getAttribute(e)+o.elementAttributes["+"+e])):m.setAttribute(e,o.elementAttributes[e]);return a.style.padding="4px 4px",c=Math.min(parseFloat(c),l),c=Math.max(parseFloat(c),h),c=Math.round((c-h)/d),m.style.width=c+"%",a.setAttribute("aria-valuemin",h),a.setAttribute("aria-valuemax",l),m.appendChild(u),u.addEventListener("mousedown",(function(e){n=e.screenX,r=m.offsetWidth})),u.addEventListener("mouseover",(function(){u.style.cursor="ew-resize"})),a.addEventListener("mousemove",(function(e){n&&(m.style.width=r+e.screenX-n+"px")})),a.addEventListener("mouseup",(function(e){n&&(e.stopPropagation(),e.stopImmediatePropagation(),n=!1,r=!1,p())})),a.addEventListener("keydown",(function(e){switch(e.keyCode){case 39:e.preventDefault(),m.style.width=m.clientWidth+a.clientWidth/100+"px";break;case 37:e.preventDefault(),m.style.width=m.clientWidth-a.clientWidth/100+"px";break;case 9:case 13:p();break;case 27:s()}})),a.addEventListener("blur",(function(){s()})),m},tickCross:function(e,t,i,s,o){var n=e.getValue(),r=document.createElement("input"),a=o.tristate,l=void 0===o.indeterminateValue?null:o.indeterminateValue,h=!1;if(r.setAttribute("type","checkbox"),r.style.marginTop="5px",r.style.boxSizing="border-box",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),r.setAttribute(e,r.getAttribute(e)+o.elementAttributes["+"+e])):r.setAttribute(e,o.elementAttributes[e]);function d(e){return a?e?h?l:r.checked:r.checked&&!h?(r.checked=!1,r.indeterminate=!0,h=!0,l):(h=!1,r.checked):r.checked}return r.value=n,!a||void 0!==n&&n!==l&&""!==n||(h=!0,r.indeterminate=!0),"firefox"!=this.table.browser&&t((function(){r.focus({preventScroll:!0})})),r.checked=!0===n||"true"===n||"True"===n||1===n,t((function(){r.focus()})),r.addEventListener("change",(function(e){i(d())})),r.addEventListener("blur",(function(e){i(d(!0))})),r.addEventListener("keydown",(function(e){13==e.keyCode&&i(d()),27==e.keyCode&&s()})),r}};class T extends t{constructor(e){super(e),this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[],this.editors=T.editors,this.registerColumnOption("editable"),this.registerColumnOption("editor"),this.registerColumnOption("editorParams"),this.registerColumnOption("cellEditing"),this.registerColumnOption("cellEdited"),this.registerColumnOption("cellEditCancelled"),this.registerTableFunction("getEditedCells",this.getEditedCells.bind(this)),this.registerTableFunction("clearCellEdited",this.clearCellEdited.bind(this)),this.registerTableFunction("navigatePrev",this.navigatePrev.bind(this)),this.registerTableFunction("navigateNext",this.navigateNext.bind(this)),this.registerTableFunction("navigateLeft",this.navigateLeft.bind(this)),this.registerTableFunction("navigateRight",this.navigateRight.bind(this)),this.registerTableFunction("navigateUp",this.navigateUp.bind(this)),this.registerTableFunction("navigateDown",this.navigateDown.bind(this)),this.registerComponentFunction("cell","isEdited",this.cellisEdited.bind(this)),this.registerComponentFunction("cell","clearEdited",this.clearEdited.bind(this)),this.registerComponentFunction("cell","edit",this.editCell.bind(this)),this.registerComponentFunction("cell","cancelEdit",this.cellCancelEdit.bind(this)),this.registerComponentFunction("cell","navigatePrev",this.navigatePrev.bind(this)),this.registerComponentFunction("cell","navigateNext",this.navigateNext.bind(this)),this.registerComponentFunction("cell","navigateLeft",this.navigateLeft.bind(this)),this.registerComponentFunction("cell","navigateRight",this.navigateRight.bind(this)),this.registerComponentFunction("cell","navigateUp",this.navigateUp.bind(this)),this.registerComponentFunction("cell","navigateDown",this.navigateDown.bind(this))}initialize(){this.subscribe("cell-init",this.bindEditor.bind(this)),this.subscribe("cell-delete",this.clearEdited.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this)),this.subscribe("column-delete",this.columnDeleteCheck.bind(this)),this.subscribe("row-deleting",this.rowDeleteCheck.bind(this)),this.subscribe("data-refreshing",this.cancelEdit.bind(this)),this.subscribe("keybinding-nav-prev",this.navigatePrev.bind(this,void 0)),this.subscribe("keybinding-nav-next",this.keybindingNavigateNext.bind(this)),this.subscribe("keybinding-nav-left",this.navigateLeft.bind(this,void 0)),this.subscribe("keybinding-nav-right",this.navigateRight.bind(this,void 0)),this.subscribe("keybinding-nav-up",this.navigateUp.bind(this,void 0)),this.subscribe("keybinding-nav-down",this.navigateDown.bind(this,void 0))}keybindingNavigateNext(e){var t=this.currentCell,i=this.options("tabEndNewRow");t&&(this.navigateNext(t,e)||i&&(t.getElement().firstChild.blur(),(i=!0===i?this.table.addRow({}):"function"==typeof i?this.table.addRow(i(t.row.getComponent())):this.table.addRow(Object.assign({},i))).then((()=>{setTimeout((()=>{t.getComponent().navigateNext()}))}))))}cellisEdited(e){return!!e.modules.edit&&e.modules.edit.edited}cellCancelEdit(e){e===this.currentCell?this.table.modules.edit.cancelEdit():console.warn("Cancel Editor Error - This cell is not currently being edited ")}clearCellEdited(e){e||(e=this.table.modules.edit.getEditedCells()),Array.isArray(e)||(e=[e]),e.forEach((e=>{this.table.modules.edit.clearEdited(e._getSelf())}))}navigatePrev(e=this.currentCell,t){var i,s;if(e){if(t&&t.preventDefault(),i=this.navigateLeft())return!0;if((s=this.table.rowManager.prevDisplayRow(e.row,!0))&&(i=this.findNextEditableCell(s,s.cells.length)))return i.getComponent().edit(),!0}return!1}navigateNext(e=this.currentCell,t){var i,s;if(e){if(t&&t.preventDefault(),i=this.navigateRight())return!0;if((s=this.table.rowManager.nextDisplayRow(e.row,!0))&&(i=this.findNextEditableCell(s,-1)))return i.getComponent().edit(),!0}return!1}navigateLeft(e=this.currentCell,t){var i,s;return!!(e&&(t&&t.preventDefault(),i=e.getIndex(),s=this.findPrevEditableCell(e.row,i)))&&(s.getComponent().edit(),!0)}navigateRight(e=this.currentCell,t){var i,s;return!!(e&&(t&&t.preventDefault(),i=e.getIndex(),s=this.findNextEditableCell(e.row,i)))&&(s.getComponent().edit(),!0)}navigateUp(e=this.currentCell,t){var i,s;return!!(e&&(t&&t.preventDefault(),i=e.getIndex(),s=this.table.rowManager.prevDisplayRow(e.row,!0)))&&(s.cells[i].getComponent().edit(),!0)}navigateDown(e=this.currentCell,t){var i,s;return!!(e&&(t&&t.preventDefault(),i=e.getIndex(),s=this.table.rowManager.nextDisplayRow(e.row,!0)))&&(s.cells[i].getComponent().edit(),!0)}findNextEditableCell(e,t){var i=!1;if(t0)for(var o=t-1;o>=0;o--){let t=e.cells[o],n=!0;if(t.column.modules.edit&&s.elVisible(t.getElement())&&("function"==typeof t.column.modules.edit.check&&(n=t.column.modules.edit.check(t.getComponent())),n)){i=t;break}}return i}initializeColumnCheck(e){void 0!==e.definition.editor&&this.initializeColumn(e)}columnDeleteCheck(e){this.currentCell&&this.currentCell.column===e&&this.cancelEdit()}rowDeleteCheck(e){this.currentCell&&this.currentCell.row===e&&this.cancelEdit()}initializeColumn(e){var t={editor:!1,blocked:!1,check:e.definition.editable,params:e.definition.editorParams||{}};switch(typeof e.definition.editor){case"string":this.editors[e.definition.editor]?t.editor=this.editors[e.definition.editor]:console.warn("Editor Error - No such editor found: ",e.definition.editor);break;case"function":t.editor=e.definition.editor;break;case"boolean":!0===e.definition.editor&&("function"!=typeof e.definition.formatter?this.editors[e.definition.formatter]?t.editor=this.editors[e.definition.formatter]:t.editor=this.editors.input:console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",e.definition.formatter))}t.editor&&(e.modules.edit=t)}getCurrentCell(){return!!this.currentCell&&this.currentCell.getComponent()}clearEditor(e){var t,i=this.currentCell;if(this.invalidEdit=!1,i){for(this.currentCell=!1,t=i.getElement(),e?i.column.modules.validate&&this.table.modExists("validate")&&this.table.modules.validate.cellValidate(i):t.classList.remove("tabulator-validation-fail"),t.classList.remove("tabulator-editing");t.firstChild;)t.removeChild(t.firstChild);i.row.getElement().classList.remove("tabulator-row-editing")}}cancelEdit(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(!0),e.setValueActual(e.getValue()),e.cellRendered(),("textarea"==e.column.definition.editor||e.column.definition.variableHeight)&&e.row.normalizeHeight(!0),e.column.definition.cellEditCancelled&&e.column.definition.cellEditCancelled.call(this.table,t),this.dispatch("edit-cancelled",e),this.dispatchExternal("cellEditCancelled",t)}}bindEditor(e){if(e.column.modules.edit){var t=this,i=e.getElement(!0);i.setAttribute("tabindex",0),i.addEventListener("click",(function(e){i.classList.contains("tabulator-editing")||i.focus({preventScroll:!0})})),i.addEventListener("mousedown",(function(e){2===e.button?e.preventDefault():t.mouseClick=!0})),i.addEventListener("focus",(function(i){t.recursionBlock||t.edit(e,i,!1)}))}}focusCellNoEvent(e,t){this.recursionBlock=!0,t&&"ie"===this.table.browser||e.getElement().focus({preventScroll:!0}),this.recursionBlock=!1}editCell(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)}focusScrollAdjust(e){if("virtual"==this.table.rowManager.getRenderMode()){var t=this.table.rowManager.element.scrollTop,i=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,s=e.row.getElement();s.offsetTop;s.offsetTopi&&(this.table.rowManager.element.scrollTop+=s.offsetTop+s.offsetHeight-i);var o=this.table.rowManager.element.scrollLeft,n=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,r=e.getElement();r.offsetLeft;this.table.modExists("frozenColumns")&&(o+=parseInt(this.table.modules.frozenColumns.leftMargin),n-=parseInt(this.table.modules.frozenColumns.rightMargin)),"virtual"===this.table.options.renderHorizontal&&(o-=parseInt(this.table.columnManager.renderer.vDomPadLeft),n-=parseInt(this.table.columnManager.renderer.vDomPadLeft)),r.offsetLeftn&&(this.table.rowManager.element.scrollLeft+=r.offsetLeft+r.offsetWidth-n)}}edit(e,t,i){var s,o,n,r=this,a=!0,l=function(){},h=e.getElement();if(!this.currentCell){if(e.column.modules.edit.blocked)return this.mouseClick=!1,h.blur(),!1;switch(t&&t.stopPropagation(),typeof e.column.modules.edit.check){case"function":a=e.column.modules.edit.check(e.getComponent());break;case"boolean":a=e.column.modules.edit.check}if(a||i){if(r.cancelEdit(),r.currentCell=e,this.focusScrollAdjust(e),o=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.definition.cellClick&&e.column.definition.cellClick.call(this.table,t,o)),e.column.definition.cellEditing&&e.column.definition.cellEditing.call(this.table,o),this.dispatch("cell-editing",e),this.dispatchExternal("cellEditing",o),n="function"==typeof e.column.modules.edit.params?e.column.modules.edit.params(o):e.column.modules.edit.params,!1===(s=e.column.modules.edit.editor.call(r,o,(function(e){l=e}),(function(t){if(r.currentCell===e){var i=!0;return e.column.modules.validate&&r.table.modExists("validate")&&"manual"!=r.table.options.validationMode&&(i=r.table.modules.validate.validate(e.column.modules.validate,e,t)),!0===i||"highlight"===r.table.options.validationMode?(r.clearEditor(),e.modules.edit||(e.modules.edit={}),e.modules.edit.edited=!0,-1==r.editedCells.indexOf(e)&&r.editedCells.push(e),e.setValue(t,!0),!0===i||(h.classList.add("tabulator-validation-fail"),r.table.externalEvents.dispatch("validationFailed",e.getComponent(),t,i),!1)):(r.invalidEdit=!0,h.classList.add("tabulator-validation-fail"),r.focusCellNoEvent(e,!0),l(),r.table.externalEvents.dispatch("validationFailed",e.getComponent(),t,i),!1)}}),(function(){r.currentCell===e&&r.cancelEdit()}),n)))return h.blur(),!1;if(!(s instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",s),h.blur(),!1;for(h.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-row-editing");h.firstChild;)h.removeChild(h.firstChild);h.appendChild(s),l();for(var d=h.children,c=0;c{e.push(t.getComponent())})),e}clearEdited(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.edit.edited=!1,e.modules.validate&&(e.modules.validate.invalid=!1)),(t=this.editedCells.indexOf(e))>-1&&this.editedCells.splice(t,1)}}T.moduleName="edit",T.editors=M;class L{constructor(e,t,i,s){this.type=e,this.columns=t,this.component=i||!1,this.indent=s||0}}class k{constructor(e,t,i,s,o){this.value=e,this.component=t||!1,this.width=i,this.height=s,this.depth=o}}class D extends t{constructor(e){super(e),this.config={},this.cloneTableStyle=!0,this.colVisProp="",this.registerTableOption("htmlOutputConfig",!1),this.registerColumnOption("htmlOutput"),this.registerColumnOption("titleHtmlOutput")}initialize(){this.registerTableFunction("getHtml",this.getHtml.bind(this))}generateExportList(e,t,i,s){this.cloneTableStyle=t,this.config=e||{},this.colVisProp=s;var o=!1!==this.config.columnHeaders?this.headersToExportRows(this.generateColumnGroupHeaders()):[],n=this.bodyToExportRows(this.rowLookup(i));return o.concat(n)}genereateTable(e,t,i,s){var o=this.generateExportList(e,t,i,s);return this.genereateTableElement(o)}rowLookup(e){var t=[];if("function"==typeof e)e.call(this.table).forEach((e=>{(e=this.table.rowManager.findRow(e))&&t.push(e)}));else switch(e){case!0:case"visible":t=this.table.rowManager.getVisibleRows(!1,!0);break;case"all":t=this.table.rowManager.rows;break;case"selected":t=this.table.modules.selectRow.selectedRows;break;case"active":default:t=this.table.options.pagination?this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length-2):this.table.rowManager.getDisplayRows()}return Object.assign([],t)}generateColumnGroupHeaders(){var e=[];return(!1!==this.config.columnGroups?this.table.columnManager.columns:this.table.columnManager.columnsByIndex).forEach((t=>{var i=this.processColumnGroup(t);i&&e.push(i)})),e}processColumnGroup(e){var t=e.columns,i=0,s={title:e.definition["title"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))]||e.definition.title,column:e,depth:1};if(t.length){if(s.subGroups=[],s.width=0,t.forEach((e=>{var t=this.processColumnGroup(e);t&&(s.width+=t.width,s.subGroups.push(t),t.depth>i&&(i=t.depth))})),s.depth+=i,!s.width)return!1}else{if(!this.columnVisCheck(e))return!1;s.width=1}return s}columnVisCheck(e){return!1!==e.definition[this.colVisProp]&&(e.visible||!e.visible&&e.definition[this.colVisProp])}headersToExportRows(e){var t=[],i=0,s=[];function o(e,s){var n=i-s;if(void 0===t[s]&&(t[s]=[]),e.height=e.subGroups?1:n-e.depth+1,t[s].push(e),e.height>1)for(let i=1;i1)for(let i=1;ii&&(i=e.depth)})),e.forEach((function(e){o(e,0)})),t.forEach((e=>{var t=[];e.forEach((e=>{if(e){let i=void 0===e.title?"":e.title;t.push(new k(i,e.column.getComponent(),e.width,e.height,e.depth))}else t.push(null)})),s.push(new L("header",t))})),s}bodyToExportRows(e){var t=[],i=[];return this.table.columnManager.columnsByIndex.forEach((e=>{this.columnVisCheck(e)&&t.push(e.getComponent())})),!1!==this.config.columnCalcs&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&e.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&e.push(this.table.modules.columnCalcs.botRow)),(e=e.filter((e=>{switch(e.type){case"group":return!1!==this.config.rowGroups;case"calc":return!1!==this.config.columnCalcs;case"row":return!(this.table.options.dataTree&&!1===this.config.dataTree&&e.modules.dataTree.parent)}return!0}))).forEach(((e,s)=>{var o=e.getData(this.colVisProp),n=[],r=0;switch(e.type){case"group":r=e.level,n.push(new k(e.key,e.getComponent(),t.length,1));break;case"calc":case"row":t.forEach((e=>{n.push(new k(e._column.getFieldValue(o),e,1,1))})),this.table.options.dataTree&&!1!==this.config.dataTree&&(r=e.modules.dataTree.index)}i.push(new L(e.type,n,e.getComponent(),r))})),i}genereateTableElement(e){var t=document.createElement("table"),i=document.createElement("thead"),s=document.createElement("tbody"),o=this.lookupTableStyles(),n=this.table.options["rowFormatter"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],r={};return r.rowFormatter=null!==n?n:this.table.options.rowFormatter,this.table.options.dataTree&&!1!==this.config.dataTree&&this.table.modExists("columnCalcs")&&(r.treeElementField=this.table.modules.dataTree.elementField),r.groupHeader=this.table.options["groupHeader"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],r.groupHeader&&!Array.isArray(r.groupHeader)&&(r.groupHeader=[r.groupHeader]),t.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),i,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),e.forEach(((e,t)=>{switch(e.type){case"header":i.appendChild(this.genereateHeaderElement(e,r,o));break;case"group":s.appendChild(this.genereateGroupElement(e,r,o));break;case"calc":s.appendChild(this.genereateCalcElement(e,r,o));break;case"row":let n=this.genereateRowElement(e,r,o);this.mapElementStyles(t%2&&o.evenRow?o.evenRow:o.oddRow,n,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),s.appendChild(n)}})),i.innerHTML&&t.appendChild(i),t.appendChild(s),this.mapElementStyles(this.table.element,t,["border-top","border-left","border-right","border-bottom"]),t}lookupTableStyles(){var e={};return this.cloneTableStyle&&window.getComputedStyle&&(e.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),e.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),e.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),e.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),e.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],e.firstRow&&(e.styleCells=e.firstRow.getElementsByClassName("tabulator-cell"),e.firstCell=e.styleCells[0],e.lastCell=e.styleCells[e.styleCells.length-1])),e}genereateHeaderElement(e,t,i){var s=document.createElement("tr");return e.columns.forEach((e=>{if(e){var t=document.createElement("th"),i=e.component._column.definition.cssClass?e.component._column.definition.cssClass.split(" "):[];t.colSpan=e.width,t.rowSpan=e.height,t.innerHTML=e.value,this.cloneTableStyle&&(t.style.boxSizing="border-box"),i.forEach((function(e){t.classList.add(e)})),this.mapElementStyles(e.component.getElement(),t,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),this.mapElementStyles(e.component._column.contentElement,t,["padding-top","padding-left","padding-right","padding-bottom"]),e.component._column.visible?this.mapElementStyles(e.component.getElement(),t,["width"]):e.component._column.definition.width&&(t.style.width=e.component._column.definition.width+"px"),e.component._column.parent&&this.mapElementStyles(e.component._column.parent.groupElement,t,["border-top"]),s.appendChild(t)}})),s}genereateGroupElement(e,t,i){var s=document.createElement("tr"),o=document.createElement("td"),n=e.columns[0];return s.classList.add("tabulator-print-table-row"),t.groupHeader&&t.groupHeader[e.indent]?n.value=t.groupHeader[e.indent](n.value,e.component._group.getRowCount(),e.component._group.getData(),e.component):!1===t.groupHeader?n.value=n.value:n.value=e.component._group.generator(n.value,e.component._group.getRowCount(),e.component._group.getData(),e.component),o.colSpan=n.width,o.innerHTML=n.value,s.classList.add("tabulator-print-table-group"),s.classList.add("tabulator-group-level-"+e.indent),n.component.isVisible()&&s.classList.add("tabulator-group-visible"),this.mapElementStyles(i.firstGroup,s,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(i.firstGroup,o,["padding-top","padding-left","padding-right","padding-bottom"]),s.appendChild(o),s}genereateCalcElement(e,t,i){var s=this.genereateRowElement(e,t,i);return s.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(i.calcRow,s,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),s}genereateRowElement(e,t,s){var o=document.createElement("tr");return o.classList.add("tabulator-print-table-row"),e.columns.forEach((n=>{if(n){var r=document.createElement("td"),a=n.component._column,l=this.table.columnManager.findColumnIndex(a),h=n.value,d={modules:{},getValue:function(){return h},getField:function(){return a.definition.field},getElement:function(){return r},getColumn:function(){return a.getComponent()},getData:function(){return e.component.getData()},getRow:function(){return e.component},getComponent:function(){return d},column:a};if((a.definition.cssClass?a.definition.cssClass.split(" "):[]).forEach((function(e){r.classList.add(e)})),this.table.modExists("format")&&!1!==this.config.formatCells)h=this.table.modules.format.formatExportValue(d,this.colVisProp);else switch(typeof h){case"object":h=JSON.stringify(h);break;case"undefined":case"null":h="";break;default:h=h}h instanceof Node?r.appendChild(h):r.innerHTML=h,(s.styleCells[l]||s.firstCell)&&(this.mapElementStyles(s.styleCells[l]||s.firstCell,r,["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"]),a.definition.align&&(r.style.textAlign=a.definition.align)),this.table.options.dataTree&&!1!==this.config.dataTree&&(t.treeElementField&&t.treeElementField==a.field||!t.treeElementField&&0==i)&&(e.component._row.modules.dataTree.controlEl&&r.insertBefore(e.component._row.modules.dataTree.controlEl.cloneNode(!0),r.firstChild),e.component._row.modules.dataTree.branchEl&&r.insertBefore(e.component._row.modules.dataTree.branchEl.cloneNode(!0),r.firstChild)),o.appendChild(r),d.modules.format&&d.modules.format.renderedCallback&&d.modules.format.renderedCallback(),t.rowFormatter&&!1!==this.config.formatCells&&t.rowFormatter(e.component)}})),o}genereateHTMLTable(e){var t=document.createElement("div");return t.appendChild(this.genereateTableElement(e)),t.innerHTML}getHtml(e,t,i,s){var o=this.generateExportList(i||this.table.options.htmlOutputConfig,t,e,s||"htmlOutput");return this.genereateHTMLTable(o)}mapElementStyles(e,t,i){if(this.cloneTableStyle&&e&&t){var s={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var o=window.getComputedStyle(e);i.forEach((function(e){t.style[s[e]]=o.getPropertyValue(e)}))}}}}D.moduleName="export";var S={"=":function(e,t,i,s){return t==e},"<":function(e,t,i,s){return t":function(e,t,i,s){return t>e},">=":function(e,t,i,s){return t>=e},"!=":function(e,t,i,s){return t!=e},regex:function(e,t,i,s){return"string"==typeof e&&(e=new RegExp(e)),e.test(t)},like:function(e,t,i,s){return null==e?t===e:null!=t&&String(t).toLowerCase().indexOf(e.toLowerCase())>-1},keywords:function(e,t,i,s){var o=e.toLowerCase().split(void 0===s.separator?" ":s.separator),n=String(null==t?"":t).toLowerCase(),r=[];return o.forEach((e=>{n.includes(e)&&r.push(!0)})),s.matchAll?r.length===o.length:!!r.length},starts:function(e,t,i,s){return null==e?t===e:null!=t&&String(t).toLowerCase().startsWith(e.toLowerCase())},ends:function(e,t,i,s){return null==e?t===e:null!=t&&String(t).toLowerCase().endsWith(e.toLowerCase())},in:function(e,t,i,s){return Array.isArray(e)?!e.length||e.indexOf(t)>-1:(console.warn("Filter Error - filter value is not an array:",e),!1)}};class F extends t{constructor(e){super(e),this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1,this.tableInitialized=!1,this.registerTableOption("filterMode","local"),this.registerTableOption("initialFilter",!1),this.registerTableOption("initialHeaderFilter",!1),this.registerTableOption("headerFilterLiveFilterDelay",300),this.registerColumnOption("headerFilter"),this.registerColumnOption("headerFilterPlaceholder"),this.registerColumnOption("headerFilterParams"),this.registerColumnOption("headerFilterEmptyCheck"),this.registerColumnOption("headerFilterFunc"),this.registerColumnOption("headerFilterFuncParams"),this.registerColumnOption("headerFilterLiveFilter"),this.registerTableFunction("searchRows",this.searchRows.bind(this)),this.registerTableFunction("searchData",this.searchData.bind(this)),this.registerTableFunction("setFilter",this.userSetFilter.bind(this)),this.registerTableFunction("refreshFilter",this.userRefreshFilter.bind(this)),this.registerTableFunction("addFilter",this.userAddFilter.bind(this)),this.registerTableFunction("getFilters",this.getFilters.bind(this)),this.registerTableFunction("setHeaderFilterFocus",this.userSetHeaderFilterFocus.bind(this)),this.registerTableFunction("getHeaderFilterValue",this.userGetHeaderFilterValue.bind(this)),this.registerTableFunction("setHeaderFilterValue",this.userSetHeaderFilterValue.bind(this)),this.registerTableFunction("getHeaderFilters",this.getHeaderFilters.bind(this)),this.registerTableFunction("removeFilter",this.userRemoveFilter.bind(this)),this.registerTableFunction("clearFilter",this.userClearFilter.bind(this)),this.registerTableFunction("clearHeaderFilter",this.userClearHeaderFilter.bind(this)),this.registerComponentFunction("column","headerFilterFocus",this.setHeaderFilterFocus.bind(this)),this.registerComponentFunction("column","reloadHeaderFilter",this.reloadHeaderFilter.bind(this)),this.registerComponentFunction("column","getHeaderFilterValue",this.getHeaderFilterValue.bind(this)),this.registerComponentFunction("column","setHeaderFilterValue",this.setHeaderFilterValue.bind(this))}initialize(){this.subscribe("column-init",this.initializeColumnHeaderFilter.bind(this)),this.subscribe("column-width-fit-before",this.hideHeaderFilterElements.bind(this)),this.subscribe("column-width-fit-after",this.showHeaderFilterElements.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),"remote"===this.table.options.filterMode&&this.subscribe("data-params",this.remoteFilterParams.bind(this)),this.registerDataHandler(this.filter.bind(this),10)}tableBuilt(){this.table.options.initialFilter&&this.setFilter(this.table.options.initialFilter),this.table.options.initialHeaderFilter&&this.table.options.initialHeaderFilter.forEach((e=>{var t=this.table.columnManager.findColumn(e.field);if(!t)return console.warn("Column Filter Error - No matching column found:",e.field),!1;this.setHeaderFilterValue(t,e.value)})),this.tableInitialized=!0}remoteFilterParams(e,t,i,s){return s.filter=this.getFilters(!0,!0),s}userSetFilter(e,t,i,s){this.setFilter(e,t,i,s),this.refreshFilter()}userRefreshFilter(){this.refreshFilter()}userAddFilter(e,t,i,s){this.addFilter(e,t,i,s),this.refreshFilter()}userSetHeaderFilterFocus(e){var t=this.table.columnManager.findColumn(e);if(!t)return console.warn("Column Filter Focus Error - No matching column found:",e),!1;this.setHeaderFilterFocus(t)}userGetHeaderFilterValue(e){var t=this.table.columnManager.findColumn(e);if(t)return this.getHeaderFilterValue(t);console.warn("Column Filter Error - No matching column found:",e)}userSetHeaderFilterValue(e,t){var i=this.table.columnManager.findColumn(e);if(!i)return console.warn("Column Filter Error - No matching column found:",e),!1;this.setHeaderFilterValue(i,t)}userRemoveFilter(e,t,i){this.removeFilter(e,t,i),this.refreshFilter()}userClearFilter(e){this.clearFilter(e),this.refreshFilter()}userClearHeaderFilter(){this.clearHeaderFilter(),this.refreshFilter()}searchRows(e,t,i){return this.search("rows",e,t,i)}searchData(e,t,i){return this.search("data",e,t,i)}initializeColumnHeaderFilter(e){var t=e.definition;t.headerFilter&&(void 0!==t.headerFilterPlaceholder&&t.field&&this.module("localize").setHeaderFilterColumnPlaceholder(t.field,t.headerFilterPlaceholder),this.initializeColumn(e))}initializeColumn(e,t){var i=this,s=e.getField();e.modules.filter={success:function(t){var o,n="input"==e.modules.filter.tagType&&"text"==e.modules.filter.attrType||"textarea"==e.modules.filter.tagType?"partial":"match",r="",a="";if(void 0===e.modules.filter.prevSuccess||e.modules.filter.prevSuccess!==t){if(e.modules.filter.prevSuccess=t,e.modules.filter.emptyFunc(t))delete i.headerFilters[s];else{switch(e.modules.filter.value=t,typeof e.definition.headerFilterFunc){case"string":F.filters[e.definition.headerFilterFunc]?(r=e.definition.headerFilterFunc,o=function(i){var s=e.definition.headerFilterFuncParams||{},o=e.getFieldValue(i);return s="function"==typeof s?s(t,o,i):s,F.filters[e.definition.headerFilterFunc](t,o,i,s)}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":r=o=function(i){var s=e.definition.headerFilterFuncParams||{},o=e.getFieldValue(i);return s="function"==typeof s?s(t,o,i):s,e.definition.headerFilterFunc(t,o,i,s)}}if(!o)switch(n){case"partial":o=function(i){var s=e.getFieldValue(i);return null!=s&&String(s).toLowerCase().indexOf(String(t).toLowerCase())>-1},r="like";break;default:o=function(i){return e.getFieldValue(i)==t},r="="}i.headerFilters[s]={value:t,func:o,type:r,params:{}}}a=JSON.stringify(i.headerFilters),i.prevHeaderFilterChangeCheck!==a&&(i.prevHeaderFilterChangeCheck=a,i.trackChanges(),i.refreshFilter())}return!0},attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(e)}generateHeaderFilterElement(e,t,i){var s,o,n,r,a,l,h,d=this,c=e.modules.filter.success,u=e.getField();if(e.modules.filter.headerElement&&e.modules.filter.headerElement.parentNode&&e.contentElement.removeChild(e.modules.filter.headerElement.parentNode),u){switch(e.modules.filter.emptyFunc=e.definition.headerFilterEmptyCheck||function(e){return!e&&"0"!==e&&0!==e},(s=document.createElement("div")).classList.add("tabulator-header-filter"),typeof e.definition.headerFilter){case"string":d.table.modules.edit.editors[e.definition.headerFilter]?(o=d.table.modules.edit.editors[e.definition.headerFilter],"tick"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":o=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?o=e.modules.edit.editor:e.definition.formatter&&d.table.modules.edit.editors[e.definition.formatter]?(o=d.table.modules.edit.editors[e.definition.formatter],"tick"!==e.definition.formatter&&"tickCross"!==e.definition.formatter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):o=d.table.modules.edit.editors.input}if(o){if(r={getValue:function(){return void 0!==t?t:""},getField:function(){return e.definition.field},getElement:function(){return s},getColumn:function(){return e.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},h="function"==typeof(h=e.definition.headerFilterParams||{})?h.call(d.table,r):h,!(n=o.call(this.table.modules.edit,r,(function(){}),c,(function(){}),h)))return void console.warn("Filter Error - Cannot add filter to "+u+" column, editor returned a value of false");if(!(n instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+u+" column, editor should return an instance of Node, the editor returned:",n);u?d.langBind("headerFilters|columns|"+e.definition.field,(function(e){n.setAttribute("placeholder",void 0!==e&&e?e:d.langText("headerFilters|default"))})):d.langBind("headerFilters|default",(function(e){n.setAttribute("placeholder",e)})),n.addEventListener("click",(function(e){e.stopPropagation(),n.focus()})),n.addEventListener("focus",(e=>{var t=this.table.columnManager.element.scrollLeft;t!==this.table.rowManager.element.scrollLeft+parseInt(this.table.columnManager.element.style.marginLeft)&&(this.table.rowManager.scrollHorizontal(t),this.table.columnManager.scrollHorizontal(t))})),a=!1,l=function(e){a&&clearTimeout(a),a=setTimeout((function(){c(n.value)}),d.table.options.headerFilterLiveFilterDelay)},e.modules.filter.headerElement=n,e.modules.filter.attrType=n.hasAttribute("type")?n.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=n.tagName.toLowerCase(),!1!==e.definition.headerFilterLiveFilter&&("autocomplete"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter&&("autocomplete"!==e.definition.editor&&"tickCross"!==e.definition.editor||!0!==e.definition.headerFilter)&&(n.addEventListener("keyup",l),n.addEventListener("search",l),"number"==e.modules.filter.attrType&&n.addEventListener("change",(function(e){c(n.value)})),"text"==e.modules.filter.attrType&&"ie"!==this.table.browser&&n.setAttribute("type","search")),"input"!=e.modules.filter.tagType&&"select"!=e.modules.filter.tagType&&"textarea"!=e.modules.filter.tagType||n.addEventListener("mousedown",(function(e){e.stopPropagation()}))),s.appendChild(n),e.contentElement.appendChild(s),i||d.headerFilterColumns.push(e)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)}hideHeaderFilterElements(){this.headerFilterColumns.forEach((function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="none")}))}showHeaderFilterElements(){this.headerFilterColumns.forEach((function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="")}))}setHeaderFilterFocus(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())}getHeaderFilterValue(e){if(e.modules.filter&&e.modules.filter.headerElement)return e.modules.filter.headerElement.value;console.warn("Column Filter Error - No header filter set on column:",e.getField())}setHeaderFilterValue(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t,!0),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}reloadHeaderFilter(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}refreshFilter(){this.tableInitialized&&("remote"===this.table.options.filterMode?this.reloadData():this.refreshData(!0))}trackChanges(){this.changed=!0,this.dispatch("filter-changed")}hasChanged(){var e=this.changed;return this.changed=!1,e}setFilter(e,t,i,s){this.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:i,params:s}]),this.addFilter(e)}addFilter(e,t,i,s){var o=!1;Array.isArray(e)||(e=[{field:e,type:t,value:i,params:s}]),e.forEach((e=>{(e=this.findFilter(e))&&(this.filterList.push(e),o=!0)})),o&&this.trackChanges()}findFilter(e){var t;if(Array.isArray(e))return this.findSubFilters(e);var i=!1;return"function"==typeof e.field?i=function(t){return e.field(t,e.type||{})}:F.filters[e.type]?i=(t=this.table.columnManager.getColumnByField(e.field))?function(i){return F.filters[e.type](e.value,t.getFieldValue(i),i,e.params||{})}:function(t){return F.filters[e.type](e.value,t[e.field],t,e.params||{})}:console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=i,!!e.func&&e}findSubFilters(e){var t=[];return e.forEach((e=>{(e=this.findFilter(e))&&t.push(e)})),!!t.length&&t}getFilters(e,t){var i=[];return e&&(i=this.getHeaderFilters()),t&&i.forEach((function(e){"function"==typeof e.type&&(e.type="function")})),i=i.concat(this.filtersToArray(this.filterList,t))}filtersToArray(e,t){var i=[];return e.forEach((e=>{var s;Array.isArray(e)?i.push(this.filtersToArray(e,t)):(s={field:e.field,type:e.type,value:e.value},t&&"function"==typeof s.type&&(s.type="function"),i.push(s))})),i}getHeaderFilters(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e}removeFilter(e,t,i){Array.isArray(e)||(e=[{field:e,type:t,value:i}]),e.forEach((e=>{var t=-1;(t="object"==typeof e.field?this.filterList.findIndex((t=>e===t)):this.filterList.findIndex((t=>e.field===t.field&&e.type===t.type&&e.value===t.value)))>-1?this.filterList.splice(t,1):console.warn("Filter Error - No matching filter type found, ignoring: ",e.type)})),this.trackChanges()}clearFilter(e){this.filterList=[],e&&this.clearHeaderFilter(),this.trackChanges()}clearHeaderFilter(){this.headerFilters={},this.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach((e=>{void 0!==e.modules.filter.value&&delete e.modules.filter.value,e.modules.filter.prevSuccess=void 0,this.reloadHeaderFilter(e)})),this.trackChanges()}search(e,t,i,s){var o=[],n=[];return Array.isArray(t)||(t=[{field:t,type:i,value:s}]),t.forEach((e=>{(e=this.findFilter(e))&&n.push(e)})),this.table.rowManager.rows.forEach((t=>{var i=!0;n.forEach((e=>{this.filterRecurse(e,t.getData())||(i=!1)})),i&&o.push("data"===e?t.getData("data"):t.getComponent())})),o}filter(e,t){var i=[],s=[];return this.subscribedExternal("dataFiltering")&&this.dispatchExternal("dataFiltering",this.getFilters()),"remote"!==this.table.options.filterMode&&(this.filterList.length||Object.keys(this.headerFilters).length)?e.forEach((e=>{this.filterRow(e)&&i.push(e)})):i=e.slice(0),this.subscribedExternal("dataFiltered")&&(i.forEach((e=>{s.push(e.getComponent())})),this.dispatchExternal("dataFiltered",this.getFilters(),s)),i}filterRow(e,t){var i=!0,s=e.getData();for(var o in this.filterList.forEach((e=>{this.filterRecurse(e,s)||(i=!1)})),this.headerFilters)this.headerFilters[o].func(s)||(i=!1);return i}filterRecurse(e,t){var i=!1;return Array.isArray(e)?e.forEach((e=>{this.filterRecurse(e,t)&&(i=!0)})):i=e.func(t),i}}F.moduleName="filter",F.filters=S;var P={plaintext:function(e,t,i){return this.emptyToSpace(this.sanitizeHTML(e.getValue()))},html:function(e,t,i){return e.getValue()},textarea:function(e,t,i){return e.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(e.getValue()))},money:function(e,t,i){var s,o,n,r,a=parseFloat(e.getValue()),l="",h=t.decimal||".",d=t.thousand||",",c=t.negativeSign||"-",u=t.symbol||"",m=!!t.symbolAfter,p=void 0!==t.precision?t.precision:2;if(isNaN(a))return this.emptyToSpace(this.sanitizeHTML(e.getValue()));for(a<0&&(a=Math.abs(a),l=c),s=!1!==p?a.toFixed(p):a,o=(s=String(s).split("."))[0],n=s.length>1?h+s[1]:"",r=/(\d+)(\d{3})/;r.test(o);)o=o.replace(r,"$1"+d+"$2");return m?l+o+n+u:l+u+o+n},link:function(e,t,i){var s=e.getValue(),o=t.urlPrefix||"",n=t.download,r=s,a=document.createElement("a");if(t.labelField&&(r=e.getData()[t.labelField]),t.label)switch(typeof t.label){case"string":r=t.label;break;case"function":r=t.label(e)}if(r){if(t.urlField&&(s=e.getData()[t.urlField]),t.url)switch(typeof t.url){case"string":s=t.url;break;case"function":s=t.url(e)}return a.setAttribute("href",o+s),t.target&&a.setAttribute("target",t.target),t.download&&(n="function"==typeof n?n(e):!0===n?"":n,a.setAttribute("download",n)),a.innerHTML=this.emptyToSpace(this.sanitizeHTML(r)),a}return" "},image:function(e,t,i){var s=document.createElement("img"),o=e.getValue();switch(t.urlPrefix&&(o=t.urlPrefix+e.getValue()),t.urlSuffix&&(o+=t.urlSuffix),s.setAttribute("src",o),typeof t.height){case"number":s.style.height=t.height+"px";break;case"string":s.style.height=t.height}switch(typeof t.width){case"number":s.style.width=t.width+"px";break;case"string":s.style.width=t.width}return s.addEventListener("load",(function(){e.getRow().normalizeHeight()})),s},tickCross:function(e,t,i){var s=e.getValue(),o=e.getElement(),n=t.allowEmpty,r=t.allowTruthy,a=void 0!==t.tickElement?t.tickElement:'',l=void 0!==t.crossElement?t.crossElement:'';return r&&s||!0===s||"true"===s||"True"===s||1===s||"1"===s?(o.setAttribute("aria-checked",!0),a||""):!n||"null"!==s&&""!==s&&null!=s?(o.setAttribute("aria-checked",!1),l||""):(o.setAttribute("aria-checked","mixed"),"")},datetime:function(e,t,i){var s=window.DateTime||luxon.DateTime,o=t.inputFormat||"yyyy-MM-dd HH:mm:ss",n=t.outputFormat||"dd/MM/yyyy HH:mm:ss",r=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",a=e.getValue();if(void 0!==s){var l="iso"===o?s.fromISO(String(a)):s.fromFormat(String(a),o);return l.isValid?(t.timezone&&(l=l.setZone(t.timezone)),l.toFormat(n)):!0!==r&&a?"function"==typeof r?r(a):r:a}console.error("Format Error - 'datetime' formatter is dependant on luxon.js")},datetimediff:function(e,t,i){var s=window.DateTime||luxon.DateTime,o=t.inputFormat||"yyyy-MM-dd HH:mm:ss",n=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",r=void 0!==t.suffix&&t.suffix,a=void 0!==t.unit?t.unit:"days",l=void 0!==t.humanize&&t.humanize,h=void 0!==t.date?t.date:s.now(),d=e.getValue();if(void 0!==s){var c="iso"===o?s.fromISO(String(d)):s.fromFormat(String(d),o);if(!c.isValid)return!0===n?d:"function"==typeof n?n(d):n;if(!l)return parseInt(c.diff(h,a)[a])+(r?" "+r:"")}else console.error("Format Error - 'datetimediff' formatter is dependant on luxon.js")},lookup:function(e,t,i){var s=e.getValue();return void 0===t[s]?(console.warn("Missing display value for "+s),s):t[s]},star:function(e,t,i){var s=e.getValue(),o=e.getElement(),n=t&&t.stars?t.stars:5,r=document.createElement("span"),a=document.createElementNS("http://www.w3.org/2000/svg","svg");r.style.verticalAlign="middle",a.setAttribute("width","14"),a.setAttribute("height","14"),a.setAttribute("viewBox","0 0 512 512"),a.setAttribute("xml:space","preserve"),a.style.padding="0 1px",s=s&&!isNaN(s)?parseInt(s):0,s=Math.max(0,Math.min(s,n));for(var l=1;l<=n;l++){var h=a.cloneNode(!0);h.innerHTML=l<=s?'':'',r.appendChild(h)}return o.style.whiteSpace="nowrap",o.style.overflow="hidden",o.style.textOverflow="ellipsis",o.setAttribute("aria-label",s),r},traffic:function(e,t,i){var s,o,n=this.sanitizeHTML(e.getValue())||0,r=document.createElement("span"),a=t&&t.max?t.max:100,l=t&&t.min?t.min:0,h=t&&void 0!==t.color?t.color:["red","orange","green"],d="#666666";if(!isNaN(n)&&void 0!==e.getValue()){switch(r.classList.add("tabulator-traffic-light"),o=parseFloat(n)<=a?parseFloat(n):a,o=parseFloat(o)>=l?parseFloat(o):l,s=(a-l)/100,o=Math.round((o-l)/s),typeof h){case"string":d=h;break;case"function":d=h(n);break;case"object":if(Array.isArray(h)){var c=100/h.length,u=Math.floor(o/c);u=Math.min(u,h.length-1),d=h[u=Math.max(u,0)];break}}return r.style.backgroundColor=d,r}},progress:function(e,t,i){var s,o,n,r,a,l=this.sanitizeHTML(e.getValue())||0,h=e.getElement(),d=t&&t.max?t.max:100,c=t&&t.min?t.min:0,m=t&&t.legendAlign?t.legendAlign:"center";switch(o=parseFloat(l)<=d?parseFloat(l):d,o=parseFloat(o)>=c?parseFloat(o):c,s=(d-c)/100,o=Math.round((o-c)/s),typeof t.color){case"string":n=t.color;break;case"function":n=t.color(l);break;case"object":if(Array.isArray(t.color)){var p=100/t.color.length,g=Math.floor(o/p);g=Math.min(g,t.color.length-1),g=Math.max(g,0),n=t.color[g];break}default:n="#2DC214"}switch(typeof t.legend){case"string":r=t.legend;break;case"function":r=t.legend(l);break;case"boolean":r=l;break;default:r=!1}switch(typeof t.legendColor){case"string":a=t.legendColor;break;case"function":a=t.legendColor(l);break;case"object":if(Array.isArray(t.legendColor)){p=100/t.legendColor.length,g=Math.floor(o/p);g=Math.min(g,t.legendColor.length-1),g=Math.max(g,0),a=t.legendColor[g]}break;default:a="#000"}h.style.minWidth="30px",h.style.position="relative",h.setAttribute("aria-label",o);var b=document.createElement("div");b.style.display="inline-block",b.style.position="absolute",b.style.width=o+"%",b.style.backgroundColor=n,b.style.height="100%",b.setAttribute("data-max",d),b.setAttribute("data-min",c);var f=document.createElement("div");if(f.style.position="relative",f.style.width="100%",f.style.height="100%",r){var v=document.createElement("div");v.style.position="absolute",v.style.top=0,v.style.left=0,v.style.textAlign=m,v.style.width="100%",v.style.color=a,v.innerHTML=r}return i((function(){if(!(e instanceof u)){var t=document.createElement("div");t.style.position="absolute",t.style.top="4px",t.style.bottom="4px",t.style.left="4px",t.style.right="4px",h.appendChild(t),h=t}h.appendChild(f),f.appendChild(b),r&&f.appendChild(v)})),""},color:function(e,t,i){return e.getElement().style.backgroundColor=this.sanitizeHTML(e.getValue()),""},buttonTick:function(e,t,i){return''},buttonCross:function(e,t,i){return''},rownum:function(e,t,i){return this.table.rowManager.activeRows.indexOf(e.getRow()._getSelf())+1||""},handle:function(e,t,i){return e.getElement().classList.add("tabulator-row-handle"),"
"},responsiveCollapse:function(e,t,i){var s=document.createElement("div"),o=e.getRow()._row.modules.responsiveLayout;function n(e){var t=o.element;o.open=e,t&&(o.open?(s.classList.add("open"),t.style.display=""):(s.classList.remove("open"),t.style.display="none"))}return s.classList.add("tabulator-responsive-collapse-toggle"),s.innerHTML="+-",e.getElement().classList.add("tabulator-row-handle"),s.addEventListener("click",(function(e){e.stopImmediatePropagation(),n(!o.open)})),n(o.open),s},rowSelection:function(e,t,i){var s=document.createElement("input"),o=!1;if(s.type="checkbox",s.setAttribute("aria-label","Select Row"),this.table.modExists("selectRow",!0))if(s.addEventListener("click",(e=>{e.stopPropagation()})),"function"==typeof e.getRow){var n=e.getRow();n instanceof f?(s.addEventListener("change",(e=>{"click"===this.table.options.selectableRangeMode&&o?o=!1:n.toggleSelect()})),"click"===this.table.options.selectableRangeMode&&s.addEventListener("click",(e=>{o=!0,this.table.modules.selectRow.handleComplexRowClick(n._row,e)})),s.checked=n.isSelected&&n.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(n,s)):s=""}else s.addEventListener("change",(e=>{this.table.modules.selectRow.selectedRows.length?this.table.deselectRow():this.table.selectRow(t.rowRange)})),this.table.modules.selectRow.registerHeaderSelectCheckbox(s);return s}};class z extends t{constructor(e){super(e),this.registerColumnOption("formatter"),this.registerColumnOption("formatterParams"),this.registerColumnOption("formatterPrint"),this.registerColumnOption("formatterPrintParams"),this.registerColumnOption("formatterClipboard"),this.registerColumnOption("formatterClipboardParams"),this.registerColumnOption("formatterHtmlOutput"),this.registerColumnOption("formatterHtmlOutputParams"),this.registerColumnOption("titleFormatter"),this.registerColumnOption("titleFormatterParams")}initialize(){this.subscribe("cell-format",this.formatValue.bind(this)),this.subscribe("cell-rendered",this.cellRendered.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-format",this.formatHeader.bind(this))}initializeColumn(e){e.modules.format=this.lookupFormatter(e,""),void 0!==e.definition.formatterPrint&&(e.modules.format.print=this.lookupFormatter(e,"Print")),void 0!==e.definition.formatterClipboard&&(e.modules.format.clipboard=this.lookupFormatter(e,"Clipboard")),void 0!==e.definition.formatterHtmlOutput&&(e.modules.format.htmlOutput=this.lookupFormatter(e,"HtmlOutput"))}lookupFormatter(e,t){var i={params:e.definition["formatter"+t+"Params"]||{}},s=e.definition["formatter"+t];switch(typeof s){case"string":z.formatters[s]?i.formatter=z.formatters[s]:(console.warn("Formatter Error - No such formatter found: ",s),i.formatter=z.formatters.plaintext);break;case"function":i.formatter=s;break;default:i.formatter=z.formatters.plaintext}return i}cellRendered(e){e.modules.format&&e.modules.format.renderedCallback&&!e.modules.format.rendered&&(e.modules.format.renderedCallback(),e.modules.format.rendered=!0)}formatHeader(e,t,i){var s,o,n,r;return e.definition.titleFormatter?(s=this.getFormatter(e.definition.titleFormatter),n=t=>{e.titleFormatterRendered=t},r={getValue:function(){return t},getElement:function(){return i}},o="function"==typeof(o=e.definition.titleFormatterParams||{})?o():o,s.call(this,r,o,n)):t}formatValue(e){var t=e.getComponent(),i="function"==typeof e.column.modules.format.params?e.column.modules.format.params(t):e.column.modules.format.params;return e.column.modules.format.formatter.call(this,t,i,(function(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1}))}formatExportValue(e,t){var i,s=e.column.modules.format[t];if(s){return i="function"==typeof s.params?s.params(component):s.params,s.formatter.call(this,e.getComponent(),i,(function(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1}))}return this.formatValue(e)}sanitizeHTML(e){if(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=\/]/g,(function(e){return t[e]}))}return e}emptyToSpace(e){return null==e||""===e?" ":e}getFormatter(e){switch(typeof e){case"string":z.formatters[e]?e=z.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),e=z.formatters.plaintext);break;case"function":e=e;break;default:e=z.formatters.plaintext}return e}}z.moduleName="format",z.formatters=P;class H extends t{constructor(e){super(e),this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightPadding=0,this.initializationMode="left",this.active=!1,this.scrollEndTimer=!1,this.blocked=!0,this.registerColumnOption("frozen")}reset(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightMargin=0,this.active=!1,this.table.columnManager.headersElement.style.marginLeft=0,this.table.columnManager.element.style.paddingRight=0}initialize(){this.subscribe("cell-layout",this.layoutCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-width",this.layout.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("table-layout",this.layout.bind(this)),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("columns-loading",this.reset.bind(this)),this.subscribe("table-redraw",this.layout.bind(this)),this.subscribe("layout-refreshing",this.blockLayout.bind(this)),this.subscribe("layout-refreshed",this.unblockLayout.bind(this))}blockLayout(){this.blocked=!0}unblockLayout(){this.blocked=!1}layoutCell(e){this.layoutElement(e.element,e.column)}initializeColumn(e){var t={margin:0,edge:!1};e.isGroup||(this.frozenCheck(e)?(t.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(e):this.rightColumns.unshift(e),this.active=!0,e.modules.frozen=t):this.initializationMode="right")}frozenCheck(e){return e.parent.isGroup&&e.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),e.parent.isGroup?this.frozenCheck(e.parent):e.definition.frozen}scrollHorizontal(){var e;this.active&&(clearTimeout(this.scrollEndTimer),e=this.table.rowManager.getVisibleRows(),this.calcMargins(!0),this.layoutColumnPosition(),this.layoutCalcRows(),e.forEach((e=>{"row"===e.type&&this.layoutRow(e)})))}calcMargins(e){e||(this.leftMargin=this._calcSpace(this.leftColumns,this.leftColumns.length)+"px",this.rightMargin=this._calcSpace(this.rightColumns,this.rightColumns.length)+"px",this.table.rowManager.tableElement.style.marginRight=this.rightMargin),this.rightPadding=this.table.rowManager.element.clientWidth+this.table.columnManager.scrollLeft}layoutCalcRows(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow),this.table.modExists("groupRows")&&this.layoutGroupCalcs(this.table.modules.groupRows.getGroups()))}layoutGroupCalcs(e){e.forEach((e=>{e.calcs.top&&this.layoutRow(e.calcs.top),e.calcs.bottom&&this.layoutRow(e.calcs.bottom),e.groupList&&e.groupList.length&&this.layoutGroupCalcs(e.groupList&&e.groupList)}))}layoutColumnPosition(e){var t=[],i=0,s=0;this.table.columnManager.headersElement.style.marginLeft=this.leftMargin,this.table.columnManager.element.style.paddingRight=this.rightMargin,this.leftColumns.forEach(((s,o)=>{if(s.modules.frozen.margin=i+this.table.columnManager.scrollLeft+"px",s.visible&&(i+=s.getWidth()),o==this.leftColumns.length-1?s.modules.frozen.edge=!0:s.modules.frozen.edge=!1,s.parent.isGroup){var n=this.getColGroupParentElement(s);t.includes(n)||(this.layoutElement(n,s),t.push(n)),s.modules.frozen.edge&&n.classList.add("tabulator-frozen-"+s.modules.frozen.position)}else this.layoutElement(s.getElement(),s);e&&s.cells.forEach((e=>{this.layoutElement(e.getElement(!0),s)}))})),this.rightColumns.forEach(((t,i)=>{t.visible&&(s+=t.getWidth()),t.modules.frozen.margin=this.rightPadding-s+"px",i==this.rightColumns.length-1?t.modules.frozen.edge=!0:t.modules.frozen.edge=!1,t.parent.isGroup?this.layoutElement(this.getColGroupParentElement(t),t):this.layoutElement(t.getElement(),t),e&&t.cells.forEach((e=>{this.layoutElement(e.getElement(!0),t)}))}))}getColGroupParentElement(e){return e.parent.isGroup?this.getColGroupParentElement(e.parent):e.getElement()}layout(){this.active&&!this.blocked&&(this.calcMargins(),this.table.rowManager.getDisplayRows().forEach((e=>{"row"===e.type&&this.layoutRow(e)})),this.layoutCalcRows(),this.layoutColumnPosition(!0))}layoutRow(e){e.getElement().style.paddingLeft=this.leftMargin,"fitDataFill"===this.table.options.layout&&this.rightColumns.length&&(this.table.rowManager.getTableElement().style.minWidth="calc(100% - "+this.rightMargin+")"),this.leftColumns.forEach((t=>{var i=e.getCell(t);i&&this.layoutElement(i.getElement(!0),t)})),this.rightColumns.forEach((t=>{var i=e.getCell(t);i&&this.layoutElement(i.getElement(!0),t)}))}layoutElement(e,t){t.modules.frozen&&(e.style.position="absolute",e.style.left=t.modules.frozen.margin,e.classList.add("tabulator-frozen"),t.modules.frozen.edge&&e.classList.add("tabulator-frozen-"+t.modules.frozen.position))}_calcSpace(e,t){var i=0;for(let s=0;s-1}isFrozen(){return!!this.rows.length}visibleRows(e,t){return this.rows.forEach((e=>{t.push(e)})),t}getRows(e){var t=e.slice(0);return this.rows.forEach((function(e){var i=t.indexOf(e);i>-1&&t.splice(i,1)})),t}freezeRow(e){e.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(e.modules.frozen=!0,this.topElement.appendChild(e.getElement()),e.initialize(),e.normalizeHeight(),this.table.rowManager.adjustTableSize(),this.rows.push(e),this.refreshData(!1,"display"),this.styleRows())}unfreezeRow(e){this.rows.indexOf(e);e.modules.frozen?(e.modules.frozen=!1,this.detachRow(e),this.table.rowManager.adjustTableSize(),this.refreshData(!1,"display"),this.rows.length&&this.styleRows()):console.warn("Freeze Error - Row is already unfrozen")}detachRow(e){var t=this.rows.indexOf(e);if(t>-1){var i=e.getElement();i.parentNode&&i.parentNode.removeChild(i),this.rows.splice(t,1)}}styleRows(e){this.rows.forEach(((e,t)=>{this.table.rowManager.styleRow(e,t)}))}}A.moduleName="frozenRows";class O{constructor(e){return this._group=e,this.type="GroupComponent",new Proxy(this,{get:function(e,t,i){return void 0!==e[t]?e[t]:e._group.groupManager.table.componentFunctionBinder.handle("row",e._group,t)}})}getKey(){return this._group.key}getField(){return this._group.field}getElement(){return this._group.element}getRows(){return this._group.getRows(!0)}getSubGroups(){return this._group.getSubGroups(!0)}getParentGroup(){return!!this._group.parent&&this._group.parent.getComponent()}isVisible(){return this._group.visible}show(){this._group.show()}hide(){this._group.hide()}toggle(){this._group.toggleVisibility()}_getSelf(){return this._group}getTable(){return this._group.groupManager.table}}class _{constructor(e,t,i,s,o,n,r){this.groupManager=e,this.parent=t,this.key=s,this.level=i,this.field=o,this.hasSubGroups=i{e.modules&&delete e.modules.group})),this.element=!1,this.arrowElement=!1,this.elementContents=!1}createElements(){var e=document.createElement("div");e.classList.add("tabulator-arrow"),this.element=document.createElement("div"),this.element.classList.add("tabulator-row"),this.element.classList.add("tabulator-group"),this.element.classList.add("tabulator-group-level-"+this.level),this.element.setAttribute("role","rowgroup"),this.arrowElement=document.createElement("div"),this.arrowElement.classList.add("tabulator-group-toggle"),this.arrowElement.appendChild(e),!1!==this.groupManager.table.options.movableRows&&this.groupManager.table.modExists("moveRow")&&this.groupManager.table.modules.moveRow.initializeGroupHeader(this)}createValueGroups(){var e=this.level+1;this.groupManager.allowedValues&&this.groupManager.allowedValues[e]&&this.groupManager.allowedValues[e].forEach((t=>{this._createGroup(t,e)}))}addBindings(){this.groupManager.table.options.groupToggleElement&&("arrow"==this.groupManager.table.options.groupToggleElement?this.arrowElement:this.element).addEventListener("click",(e=>{e.stopPropagation(),e.stopImmediatePropagation(),this.toggleVisibility()}))}_createGroup(e,t){var i=t+"_"+e,s=new _(this.groupManager,this,t,e,this.groupManager.groupIDLookups[t].field,this.groupManager.headerGenerator[t]||this.groupManager.headerGenerator[0],!!this.old&&this.old.groups[i]);this.groups[i]=s,this.groupList.push(s)}_addRowToGroup(e){var t=this.level+1;if(this.hasSubGroups){var i=this.groupManager.groupIDLookups[t].func(e.getData()),s=t+"_"+i;this.groupManager.allowedValues&&this.groupManager.allowedValues[t]?this.groups[s]&&this.groups[s].addRow(e):(this.groups[s]||this._createGroup(i,t),this.groups[s].addRow(e))}}_addRow(e){this.rows.push(e),e.modules.group=this}insertRow(e,t,i){var s=this.conformRowData({});e.updateData(s);var o=this.rows.indexOf(t);o>-1?i?this.rows.splice(o+1,0,e):this.rows.splice(o,0,e):i?this.rows.push(e):this.rows.unshift(e),e.modules.group=this,this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)}scrollHeader(e){this.arrowElement&&(this.arrowElement.style.marginLeft=e,this.groupList.forEach((function(t){t.scrollHeader(e)})))}getRowIndex(e){}conformRowData(e){return this.field?e[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(e=this.parent.conformRowData(e)),e}removeRow(e){var t=this.rows.indexOf(e),i=e.getElement();t>-1&&this.rows.splice(t,1),this.groupManager.table.options.groupValues||this.rows.length?(i.parentNode&&i.parentNode.removeChild(i),this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))}removeGroup(e){var t,i=e.level+"_"+e.key;this.groups[i]&&(delete this.groups[i],(t=this.groupList.indexOf(e))>-1&&this.groupList.splice(t,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))}getHeadersAndRows(e){var t=[];return t.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach((function(i){t=t.concat(i.getHeadersAndRows(e))})):(!e&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top)),t=t.concat(this.rows),!e&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(!e&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top))),!e&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom)))),t}getData(e,t){var i=[];return this._visSet(),(!e||e&&this.visible)&&this.rows.forEach((e=>{i.push(e.getData(t||"data"))})),i}getRowCount(){var e=0;return this.groupList.length?this.groupList.forEach((t=>{e+=t.getRowCount()})):e=this.rows.length,e}toggleVisibility(){this.visible?this.hide():this.show()}hide(){this.visible=!1,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination?this.groupManager.updateGroupRows(!0):(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach((e=>{e.getHeadersAndRows().forEach((e=>{e.detachElement()}))})):this.rows.forEach((e=>{var t=e.getElement();t.parentNode.removeChild(t)})),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()),this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!1)}show(){if(this.visible=!0,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var e=this.generateElement();this.groupList.length?this.groupList.forEach((t=>{t.getHeadersAndRows().forEach((t=>{var i=t.getElement();e.parentNode.insertBefore(i,e.nextSibling),t.initialize(),e=i}))})):this.rows.forEach((t=>{var i=t.getElement();e.parentNode.insertBefore(i,e.nextSibling),t.initialize(),e=i})),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()}this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!0)}_visSet(){var e=[];"function"==typeof this.visible&&(this.rows.forEach((function(t){e.push(t.getData())})),this.visible=this.visible(this.key,this.getRowCount(),e,this.getComponent()))}getRowGroup(e){var t=!1;return this.groupList.length?this.groupList.forEach((function(i){var s=i.getRowGroup(e);s&&(t=s)})):this.rows.find((function(t){return t===e}))&&(t=this),t}getSubGroups(e){var t=[];return this.groupList.forEach((function(i){t.push(e?i.getComponent():i)})),t}getRows(e){var t=[];return this.rows.forEach((function(i){t.push(e?i.getComponent():i)})),t}generateGroupHeaderContents(){var e=[];for(this.rows.forEach((function(t){e.push(t.getData())})),this.elementContents=this.generator(this.key,this.getRowCount(),e,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)}getPath(e=[]){return e.unshift(this.key),this.parent&&this.parent.getPath(e),e}getElement(){return this.elementContents?this.element:this.generateElement()}generateElement(){this.addBindings=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var e=0;ei.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),this.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],this.langBind("groups|item",((e,t)=>{this.headerGenerator[0]=(i,s,o)=>(void 0===i?"":i)+"("+s+" "+(1===s?e:t.groups.items)+")"})),this.groupIDLookups=[],Array.isArray(e)||e)this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs)this.table.columnManager.getRealColumns().forEach((e=>{e.definition.topCalc&&this.table.modules.columnCalcs.initializeTopRow(),e.definition.bottomCalc&&this.table.modules.columnCalcs.initializeBottomRow()}));Array.isArray(e)||(e=[e]),e.forEach(((e,t)=>{var i,s;i="function"==typeof e?e:(s=this.table.columnManager.getColumnByField(e))?function(e){return s.getFieldValue(e)}:function(t){return t[e]},this.groupIDLookups.push({field:"function"!=typeof e&&e,func:i,values:!!this.allowedValues&&this.allowedValues[t]})})),t&&(Array.isArray(t)||(t=[t]),t.forEach((e=>{})),this.startOpen=t),i&&(this.headerGenerator=Array.isArray(i)?i:[i])}}rowSample(e,t){var i=this.getGroups(!1)[0];return t.push(i.getRows(!1)[0]),t}virtualRenderFill(){var e=this.table.rowManager.tableElement,t=this.table.rowManager.getVisibleRows();t=t.filter((e=>"group"!==e.type)),e.style.minWidth=t.length?"":this.table.columnManager.getWidth()+"px"}rowAddingIndex(e,t,i){this.assignRowToGroup(e);var s=e.modules.group.rows;return s.length>1&&(!t||t&&-1==s.indexOf(t)?i?s[0]!==e&&(t=s[0],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)):s[s.length-1]!==e&&(t=s[s.length-1],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)):this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)),t}trackChanges(){this.dispatch("group-changed")}setGroupBy(e){this.table.options.groupBy=e,this.initialized?this.configureGroupSetup():this.initialize(),this.refreshData(),this.trackChanges()}setGroupValues(e){this.table.options.groupValues=e,this.configureGroupSetup(),this.refreshData(),this.trackChanges()}setGroupStartOpen(e){this.table.options.groupStartOpen=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}setGroupHeader(e){this.table.options.groupHeader=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}userGetGroups(e){return this.getGroups(!0)}userGetGroupedData(){return this.table.options.groupBy?this.getGroupedData():this.getData()}rowGetGroup(e){return!!e.modules.group&&e.modules.group.getComponent()}rowMoving(e,t,i){!i&&t instanceof _&&(t=this.table.rowManager.prevDisplayRow(e)||t);var s=t instanceof _?t:t.modules.group,o=e instanceof _?e:e.modules.group;s===o?this.table.rowManager.moveRowInArray(s.rows,e,t,i):(o&&o.removeRow(e),s.insertRow(e,t,i))}rowDeleting(e){e.modules.group&&e.modules.group.removeRow(e)}rowsUpdated(e){this.updateGroupRows(!0)}cellUpdated(e){this.reassignRowToGroup(e.row)}setDisplayIndex(e){this.displayIndex=e}getDisplayIndex(){return this.displayIndex}getRows(e){return this.table.options.groupBy&&this.groupIDLookups.length?(this.dispatchExternal("dataGrouping"),this.generateGroups(e),this.subscribedExternal("dataGrouped")&&this.dispatchExternal("dataGrouped",this.getGroups(!0)),this.updateGroupRows()):e.slice(0)}getGroups(e){var t=[];return this.groupList.forEach((function(i){t.push(e?i.getComponent():i)})),t}getChildGroups(e){var t=[];return e||(e=this),e.groupList.forEach((e=>{e.groupList.length?t=t.concat(this.getChildGroups(e)):t.push(e)})),t}wipe(){this.groupList.forEach((function(e){e.wipe()}))}pullGroupListData(e){var t=[];return e.forEach((e=>{var i={level:0,rowCount:0,headerContent:""},s=[];e.hasSubGroups?(s=this.pullGroupListData(e.groupList),i.level=e.level,i.rowCount=s.length-e.groupList.length,i.headerContent=e.generator(e.key,i.rowCount,e.rows,e),t.push(i),t=t.concat(s)):(i.level=e.level,i.headerContent=e.generator(e.key,e.rows.length,e.rows,e),i.rowCount=e.getRows().length,t.push(i),e.getRows().forEach((e=>{t.push(e.getData("data"))})))})),t}getGroupedData(){return this.pullGroupListData(this.groupList)}getRowGroup(e){var t=!1;return this.groupList.forEach((i=>{var s=i.getRowGroup(e);s&&(t=s)})),t}countGroups(){return this.groupList.length}generateGroups(e){var t=this.groups;this.groups={},this.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach((e=>{this.createGroup(e,0,t)})),e.forEach((e=>{this.assignRowToExistingGroup(e,t)}))):e.forEach((e=>{this.assignRowToGroup(e,t)}))}createGroup(e,t,i){var s,o=t+"_"+e;i=i||[],s=new _(this,!1,t,e,this.groupIDLookups[0].field,this.headerGenerator[0],i[o]),this.groups[o]=s,this.groupList.push(s)}assignRowToExistingGroup(e,t){var i="0_"+this.groupIDLookups[0].func(e.getData());this.groups[i]&&this.groups[i].addRow(e)}assignRowToGroup(e,t){var i=this.groupIDLookups[0].func(e.getData()),s=!this.groups["0_"+i];return s&&this.createGroup(i,0,t),this.groups["0_"+i].addRow(e),!s}reassignRowToGroup(e){if("row"===e.type){var t=e.modules.group,i=t.getPath(),s=this.getExpectedPath(e);i.length==s.length&&i.every(((e,t)=>e===s[t]))||(t.removeRow(e),this.assignRowToGroup(e,this.groups),this.refreshData(!0))}}getExpectedPath(e){var t=[],i=e.getData();return this.groupIDLookups.forEach((e=>{t.push(e.func(i))})),t}updateGroupRows(e){var t=[];return this.groupList.forEach((e=>{t=t.concat(e.getHeadersAndRows())})),e&&this.refreshData(!0,this.displayHandler),t}scrollHeaders(e){"virtual"===this.table.options.renderHorizontal&&(e-=this.table.columnManager.renderer.vDomPadLeft),e+="px",this.groupList.forEach((t=>{t.scrollHeader(e)}))}removeGroup(e){var t,i=e.level+"_"+e.key;this.groups[i]&&(delete this.groups[i],(t=this.groupList.indexOf(e))>-1&&this.groupList.splice(t,1))}}B.moduleName="groupRows";class N extends t{constructor(e){super(e),this.history=[],this.index=-1,this.registerTableOption("history",!1)}initialize(){this.table.options.history&&(this.subscribe("cell-value-updated",this.cellUpdated.bind(this)),this.subscribe("cell-delete",this.clearComponentHistory.bind(this)),this.subscribe("row-delete",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clear.bind(this)),this.subscribe("row-added",this.rowAdded.bind(this)),this.subscribe("row-move",this.rowMoved.bind(this))),this.registerTableFunction("undo",this.undo.bind(this)),this.registerTableFunction("redo",this.redo.bind(this)),this.registerTableFunction("getHistoryUndoSize",this.getHistoryUndoSize.bind(this)),this.registerTableFunction("getHistoryRedoSize",this.getHistoryRedoSize.bind(this)),this.registerTableFunction("clearHistory",this.clear.bind(this))}rowMoved(e,t,i){this.action("rowMove",e,{posFrom:this.table.rowManager.getRowPosition(e),posTo:this.table.rowManager.getRowPosition(t),to:t,after:i})}rowAdded(e,t,i,s){this.action("rowAdd",e,{data:t,pos:i,index:s})}rowDeleted(e){var t,i;this.table.options.groupBy?(t=(i=e.getComponent().getGroup().rows).indexOf(e))&&(t=i[t-1]):(t=e.table.rowManager.getRowIndex(e))&&(t=e.table.rowManager.rows[t-1]),this.action("rowDelete",e,{data:e.getData(),pos:!t,index:t})}cellUpdated(e){this.action("cellEdit",e,{oldValue:e.oldValue,newValue:e.value})}clear(){this.history=[],this.index=-1}action(e,t,i){this.history=this.history.slice(0,this.index+1),this.history.push({type:e,component:t,data:i}),this.index++}getHistoryUndoSize(){return this.index+1}getHistoryRedoSize(){return this.history.length-(this.index+1)}clearComponentHistory(e){var t=this.history.findIndex((function(t){return t.component===e}));t>-1&&(this.history.splice(t,1),t<=this.index&&this.index--,this.clearComponentHistory(e))}undo(){if(this.index>-1){let e=this.history[this.index];return N.undoers[e.type].call(this,e),this.index--,this.dispatchExternal("historyUndo",e.type,e.component.getComponent(),e.data),!0}return console.warn("History Undo Error - No more history to undo"),!1}redo(){if(this.history.length-1>this.index){this.index++;let e=this.history[this.index];return N.redoers[e.type].call(this,e),this.dispatchExternal("historyRedo",e.type,e.component.getComponent(),e.data),!0}return console.warn("History Redo Error - No more history to redo"),!1}_rebindRow(e,t){this.history.forEach((function(i){if(i.component instanceof v)i.component===e&&(i.component=t);else if(i.component instanceof m&&i.component.row===e){var s=i.component.column.getField();s&&(i.component=t.getCell(s))}}))}}N.moduleName="history",N.undoers={cellEdit:function(e){e.component.setValueProcessData(e.data.oldValue),e.component.cellRendered()},rowAdd:function(e){e.component.deleteActual()},rowDelete:function(e){var t=this.table.rowManager.addRowActual(e.data.data,e.data.pos,e.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(e.component,t)},rowMove:function(e){this.table.rowManager.moveRowActual(e.component,this.table.rowManager.rows[e.data.posFrom],!e.data.after),this.table.rowManager.redraw()}},N.redoers={cellEdit:function(e){e.component.setValueProcessData(e.data.newValue),e.component.cellRendered()},rowAdd:function(e){var t=this.table.rowManager.addRowActual(e.data.data,e.data.pos,e.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(e.component,t)},rowDelete:function(e){e.component.deleteActual()},rowMove:function(e){this.table.rowManager.moveRowActual(e.component,this.table.rowManager.rows[e.data.posTo],e.data.after),this.table.rowManager.redraw()}};class V extends t{constructor(e){super(e),this.fieldIndex=[],this.hasIndex=!1}initialize(){this.tableElementCheck()}tableElementCheck(){this.table.originalElement&&"TABLE"===this.table.originalElement.tagName&&this.parseTable()}parseTable(){var e=this.table.originalElement,t=this.table.options,i=(t.columns,e.getElementsByTagName("th")),s=e.getElementsByTagName("tbody")[0],o=[];this.hasIndex=!1,this.dispatchExternal("htmlImporting"),s=s?s.getElementsByTagName("tr"):[],this._extractOptions(e,t),i.length?this._extractHeaders(i,s):this._generateBlankHeaders(i,s);for(var n=0;n{n[e.toLowerCase()]=e})),s){var a,l=s[r];l&&"object"==typeof l&&l.name&&0===l.name.indexOf("tabulator-")&&(a=l.name.replace("tabulator-",""),void 0!==n[a]&&(t[n[a]]=this._attribValue(l.value)))}}_attribValue(e){return"true"===e||"false"!==e&&e}_findCol(e){return this.table.options.columns.find((t=>t.title===e))||!1}_extractHeaders(e,t){for(var i=0;i(console.error("Import Error:",e||"Unable to import data"),Promise.reject(e))))}lookupImporter(e){var t;return e||(e=this.table.options.importFormat),(t="string"==typeof e?W.importers[e]:e)||console.error("Import Error - Importer not found:",e),t}importFromFile(e,t){var i=this.lookupImporter(e);if(i)return this.pickFile(t).then(this.importData.bind(this,i)).then(this.structureData.bind(this)).then(this.setData.bind(this)).catch((e=>(console.error("Import Error:",e||"Unable to import file"),Promise.reject(e))))}pickFile(e){return new Promise(((t,i)=>{var s=document.createElement("input");s.type="file",s.accept=e,s.addEventListener("change",(e=>{var o=s.files[0],n=new FileReader;switch(this.table.options.importReader){case"buffer":n.readAsArrayBuffer(o);break;case"binary":n.readAsBinaryString(o);break;case"url":n.readAsDataURL(o);break;case"text":default:n.readAsText(o)}n.onload=e=>{t(n.result)},n.onerror=e=>{console.warn("File Load Error - Unable to read file"),i()}})),s.click()}))}importData(e,t){var i=e.call(this.table,t);return i instanceof Promise?i:i?Promise.resolve(i):Promise.reject()}structureData(e){return Array.isArray(e)&&e.length&&Array.isArray(e[0])?this.table.options.autoColumns?this.structureArrayToObject(e):this.structureArrayToColumns(e):e}structureArrayToObject(e){var t=e.shift();return e.map((e=>{var i={};return t.forEach(((t,s)=>{i[t]=e[s]})),i}))}structureArrayToColumns(e){var t=[],i=this.table.getColumns();return i[0]&&e[0][0]&&i[0].getDefinition().title===e[0][0]&&e.shift(),e.forEach((e=>{var s={};e.forEach(((e,t)=>{var o=i[t];o&&(s[o.getField()]=e)})),t.push(s)})),t}setData(e){return this.table.setData(e)}}W.moduleName="import",W.importers=I;class j extends t{constructor(e){super(e),this.eventMap={rowClick:"row-click",rowDblClick:"row-dblclick",rowContext:"row-contextmenu",rowMouseEnter:"row-mouseenter",rowMouseLeave:"row-mouseleave",rowMouseOver:"row-mouseover",rowMouseOut:"row-mouseout",rowMouseMove:"row-mousemove",rowTap:"row",rowDblTap:"row",rowTapHold:"row",cellClick:"cell-click",cellDblClick:"cell-dblclick",cellContext:"cell-contextmenu",cellMouseEnter:"cell-mouseenter",cellMouseLeave:"cell-mouseleave",cellMouseOver:"cell-mouseover",cellMouseOut:"cell-mouseout",cellMouseMove:"cell-mousemove",cellTap:"cell",cellDblTap:"cell",cellTapHold:"cell",headerClick:"column-click",headerDblClick:"column-dblclick",headerContext:"column-contextmenu",headerMouseEnter:"column-mouseenter",headerMouseLeave:"column-mouseleave",headerMouseOver:"column-mouseover",headerMouseOut:"column-mouseout",headerMouseMove:"column-mousemove",headerTap:"column",headerDblTap:"column",headerTapHold:"column",groupClick:"group-click",groupDblClick:"group-dblclick",groupContext:"group-contextmenu",groupMouseEnter:"group-mouseenter",groupMouseLeave:"group-mouseleave",groupMouseOver:"group-mouseover",groupMouseOut:"group-mouseout",groupMouseMove:"group-mousemove",groupTap:"group",groupDblTap:"group",groupTapHold:"group"},this.subscribers={},this.touchSubscribers={},this.columnSubscribers={},this.touchWatchers={row:{tap:null,tapDbl:null,tapHold:null},cell:{tap:null,tapDbl:null,tapHold:null},column:{tap:null,tapDbl:null,tapHold:null},group:{tap:null,tapDbl:null,tapHold:null}},this.registerColumnOption("headerClick"),this.registerColumnOption("headerDblClick"),this.registerColumnOption("headerContext"),this.registerColumnOption("headerMouseEnter"),this.registerColumnOption("headerMouseLeave"),this.registerColumnOption("headerMouseOver"),this.registerColumnOption("headerMouseOut"),this.registerColumnOption("headerMouseMove"),this.registerColumnOption("headerTap"),this.registerColumnOption("headerDblTap"),this.registerColumnOption("headerTapHold"),this.registerColumnOption("cellClick"),this.registerColumnOption("cellDblClick"),this.registerColumnOption("cellContext"),this.registerColumnOption("cellMouseEnter"),this.registerColumnOption("cellMouseLeave"),this.registerColumnOption("cellMouseOver"),this.registerColumnOption("cellMouseOut"),this.registerColumnOption("cellMouseMove"),this.registerColumnOption("cellTap"),this.registerColumnOption("cellDblTap"),this.registerColumnOption("cellTapHold")}initialize(){this.initializeExternalEvents(),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("cell-dblclick",this.cellContentsSelectionFixer.bind(this))}cellContentsSelectionFixer(e,t){if(!this.table.modExists("edit")||this.table.modules.edit.currentCell!==this){e.preventDefault();try{if(document.selection)(i=document.body.createTextRange()).moveToElementText(this.element),i.select();else if(window.getSelection){var i;(i=document.createRange()).selectNode(this.element),window.getSelection().removeAllRanges(),window.getSelection().addRange(i)}}catch(e){}}}initializeExternalEvents(){for(let e in this.eventMap)this.subscriptionChangeExternal(e,this.subscriptionChanged.bind(this,e))}subscriptionChanged(e,t){t?this.subscribers[e]||(this.eventMap[e].includes("-")?(this.subscribers[e]=this.handle.bind(this,e),this.subscribe(this.eventMap[e],this.subscribers[e])):this.subscribeTouchEvents(e)):this.eventMap[e].includes("-")?!this.subscribers[e]||this.columnSubscribers[e]||this.subscribedExternal(e)||(this.unsubscribe(this.eventMap[e],this.subscribers[e]),delete this.subscribers[e]):this.unsubscribeTouchEvents(e)}subscribeTouchEvents(e){var t=this.eventMap[e];this.touchSubscribers[t+"-touchstart"]||(this.touchSubscribers[t+"-touchstart"]=this.handleTouch.bind(this,t,"start"),this.touchSubscribers[t+"-touchend"]=this.handleTouch.bind(this,t,"end"),this.subscribe(t+"-touchstart",this.touchSubscribers[t+"-touchstart"]),this.subscribe(t+"-touchend",this.touchSubscribers[t+"-touchend"])),this.subscribers[e]=!0}unsubscribeTouchEvents(e){var t=!0,i=this.eventMap[e];if(this.subscribers[e]&&!this.subscribedExternal(e)){delete this.subscribers[e];for(let e in this.eventMap)this.eventMap[e]===i&&this.subscribers[e]&&(t=!1);t&&(this.unsubscribe(i+"-touchstart",this.touchSubscribers[i+"-touchstart"]),this.unsubscribe(i+"-touchend",this.touchSubscribers[i+"-touchend"]),delete this.touchSubscribers[i+"-touchstart"],delete this.touchSubscribers[i+"-touchend"])}}initializeColumn(e){var t=e.definition;for(let i in this.eventMap)t[i]&&(this.subscriptionChanged(i,!0),this.columnSubscribers[i]||(this.columnSubscribers[i]=[]),this.columnSubscribers[i].push(e))}handle(e,t,i){this.dispatchEvent(e,t,i)}handleTouch(e,t,i,s){var o=this.touchWatchers[e];switch("column"===e&&(e="header"),t){case"start":o.tap=!0,clearTimeout(o.tapHold),o.tapHold=setTimeout((()=>{clearTimeout(o.tapHold),o.tapHold=null,o.tap=null,clearTimeout(o.tapDbl),o.tapDbl=null,this.dispatchEvent(e+"TapHold",i,s)}),1e3);break;case"end":o.tap&&(o.tap=null,this.dispatchEvent(e+"Tap",i,s)),o.tapDbl?(clearTimeout(o.tapDbl),o.tapDbl=null,this.dispatchEvent(e+"DblTap",i,s)):o.tapDbl=setTimeout((()=>{clearTimeout(o.tapDbl),o.tapDbl=null}),300),clearTimeout(o.tapHold),o.tapHold=null}}dispatchEvent(e,t,i){var s,o=i.getComponent();this.columnSubscribers[e]&&(i instanceof m?s=i.column.definition[e]:i instanceof b&&(s=i.definition[e]),s&&s(t,o)),this.dispatchExternal(e,t,o)}}j.moduleName="interaction";class G extends t{constructor(e){super(e),this.watchKeys=null,this.pressedKeys=null,this.keyupBinding=!1,this.keydownBinding=!1,this.registerTableOption("keybindings",{}),this.registerTableOption("tabEndNewRow",!1)}initialize(){var e=this.table.options.keybindings,t={};this.watchKeys={},this.pressedKeys=[],!1!==e&&(Object.assign(t,G.bindings),Object.assign(t,e),this.mapBindings(t),this.bindEvents()),this.subscribe("table-destroy",this.clearBindings.bind(this))}mapBindings(e){for(let t in e)G.actions[t]?e[t]&&("object"!=typeof e[t]&&(e[t]=[e[t]]),e[t].forEach((e=>{(Array.isArray(e)?e:[e]).forEach((e=>{this.mapBinding(t,e)}))}))):console.warn("Key Binding Error - no such action:",t)}mapBinding(e,t){var i={action:G.actions[e],keys:[],ctrl:!1,shift:!1,meta:!1};t.toString().toLowerCase().split(" ").join("").split("+").forEach((e=>{switch(e){case"ctrl":i.ctrl=!0;break;case"shift":i.shift=!0;break;case"meta":i.meta=!0;break;default:e=isNaN(e)?e.toUpperCase().charCodeAt(0):parseInt(e),i.keys.push(e),this.watchKeys[e]||(this.watchKeys[e]=[]),this.watchKeys[e].push(i)}}))}bindEvents(){var e=this;this.keyupBinding=function(t){var i=t.keyCode,s=e.watchKeys[i];s&&(e.pressedKeys.push(i),s.forEach((function(i){e.checkBinding(t,i)})))},this.keydownBinding=function(t){var i=t.keyCode;if(e.watchKeys[i]){var s=e.pressedKeys.indexOf(i);s>-1&&e.pressedKeys.splice(s,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)}clearBindings(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)}checkBinding(e,t){var i=!0;return e.ctrlKey==t.ctrl&&e.shiftKey==t.shift&&e.metaKey==t.meta&&(t.keys.forEach((e=>{-1==this.pressedKeys.indexOf(e)&&(i=!1)})),i&&t.action.call(this,e),!0)}}G.moduleName="keybindings",G.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:["ctrl + 90","meta + 90"],redo:["ctrl + 89","meta + 89"],copyToClipboard:["ctrl + 67","meta + 89"]},G.actions={keyBlock:function(e){e.stopPropagation(),e.preventDefault()},scrollPageUp:function(e){var t=this.table.rowManager,i=t.scrollTop-t.element.clientHeight;t.element.scrollHeight;e.preventDefault(),t.displayRowsCount&&(i>=0?t.element.scrollTop=i:t.scrollToRow(t.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(e){var t=this.table.rowManager,i=t.scrollTop+t.element.clientHeight,s=t.element.scrollHeight;e.preventDefault(),t.displayRowsCount&&(i<=s?t.element.scrollTop=i:t.scrollToRow(t.getDisplayRows()[t.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(e){var t=this.table.rowManager;e.preventDefault(),t.displayRowsCount&&t.scrollToRow(t.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(e){var t=this.table.rowManager;e.preventDefault(),t.displayRowsCount&&t.scrollToRow(t.getDisplayRows()[t.displayRowsCount-1]),this.table.element.focus()},navPrev:function(e){this.dispatch("keybinding-nav-prev",e)},navNext:function(e){this.dispatch("keybinding-nav-next",e)},navLeft:function(e){this.dispatch("keybinding-nav-left",e)},navRight:function(e){this.dispatch("keybinding-nav-right",e)},navUp:function(e){this.dispatch("keybinding-nav-up",e)},navDown:function(e){this.dispatch("keybinding-nav-down",e)},undo:function(e){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(e.preventDefault(),this.table.modules.history.undo()))},redo:function(e){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(e.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(e){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}};class U extends t{constructor(e){super(e),this.menuContainer=null,this.menuElements=[],this.blurEvent=this.hideMenu.bind(this),this.escEvent=this.escMenu.bind(this),this.nestedMenuBlock=!1,this.positionReversedX=!1,this.currentComponent=null,this.columnSubscribers={},this.registerTableOption("rowContextMenu",!1),this.registerTableOption("rowClickMenu",!1),this.registerTableOption("groupContextMenu",!1),this.registerTableOption("groupClickMenu",!1),this.registerTableOption("menuContainer",!1),this.registerColumnOption("headerContextMenu"),this.registerColumnOption("headerClickMenu"),this.registerColumnOption("headerMenu"),this.registerColumnOption("contextMenu"),this.registerColumnOption("clickMenu")}initialize(){this.lookupMenuContainer(),this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}lookupMenuContainer(){this.menuContainer=this.table.options.menuContainer,"string"==typeof this.menuContainer?(this.menuContainer=document.querySelector(this.menuContainer),this.menuContainer||console.warn("Menu Error - no container element found matching selector:",this.table.options.menuContainer,"(defaulting to document body)")):!0===this.menuContainer&&(this.menuContainer=this.table.element),this.menuContainer&&!this.checkMenuContainerIsParent(this.menuContainer)&&(this.menuContainer=!1,console.warn("Menu Error - container element does not contain this table:",this.table.options.menuContainer,"(defaulting to document body)")),this.menuContainer||(this.menuContainer=document.body)}checkMenuContainerIsParent(e,t=this.table.element){return e===t||!!t.parentNode&&this.checkMenuContainerIsParent(e,t.parentNode)}initializeRowWatchers(){this.table.options.rowContextMenu&&(this.subscribe("row-contextmenu",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu)),this.table.on("rowTapHold",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu))),this.table.options.rowClickMenu&&this.subscribe("row-click",this.loadMenuEvent.bind(this,this.table.options.rowClickMenu))}initializeGroupWatchers(){this.table.options.groupContextMenu&&(this.subscribe("group-contextmenu",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu)),this.table.on("groupTapHold",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu))),this.table.options.groupClickMenu&&this.subscribe("group-click",this.loadMenuEvent.bind(this,this.table.options.groupClickMenu))}initializeColumn(e){var t=e.definition;t.headerContextMenu&&!this.columnSubscribers.headerContextMenu&&(this.columnSubscribers.headerContextMenu=this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextMenu),this.table.on("headerTapHold",this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"))),t.headerClickMenu&&!this.columnSubscribers.headerClickMenu&&(this.columnSubscribers.headerClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerClickMenu"),this.subscribe("column-click",this.columnSubscribers.headerClickMenu)),t.headerMenu&&this.initializeColumnHeaderMenu(e),t.contextMenu&&!this.columnSubscribers.contextMenu&&(this.columnSubscribers.contextMenu=this.loadMenuTableCellEvent.bind(this,"contextMenu"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextMenu),this.table.on("cellTapHold",this.loadMenuTableCellEvent.bind(this,"contextMenu"))),t.clickMenu&&!this.columnSubscribers.clickMenu&&(this.columnSubscribers.clickMenu=this.loadMenuTableCellEvent.bind(this,"clickMenu"),this.subscribe("cell-click",this.columnSubscribers.clickMenu))}initializeColumnHeaderMenu(e){var t;(t=document.createElement("span")).classList.add("tabulator-header-menu-button"),t.innerHTML="⋮",t.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault(),this.loadMenuEvent(e.definition.headerMenu,t,e)})),e.titleElement.insertBefore(t,e.titleElement.firstChild)}loadMenuTableCellEvent(e,t,i){i._cell&&(i=i._cell),i.column.definition[e]&&this.loadMenuEvent(i.column.definition[e],t,i)}loadMenuTableColumnEvent(e,t,i){i._column&&(i=i._column),i.definition[e]&&this.loadMenuEvent(i.definition[e],t,i)}loadMenuEvent(e,t,i){i._group?i=i._group:i._row&&(i=i._row),e="function"==typeof e?e.call(this.table,i.getComponent(),t):e,this.loadMenu(t,i,e)}loadMenu(e,t,i,s){var o=!(e instanceof MouseEvent),n=document.createElement("div");if(n.classList.add("tabulator-menu"),o||e.preventDefault(),i&&i.length){if(!s){if(this.nestedMenuBlock){if(this.isOpen())return}else this.nestedMenuBlock=setTimeout((()=>{this.nestedMenuBlock=!1}),100);this.hideMenu(),this.menuElements=[]}i.forEach((e=>{var i=document.createElement("div"),s=e.label,o=e.disabled;e.separator?i.classList.add("tabulator-menu-separator"):(i.classList.add("tabulator-menu-item"),"function"==typeof s&&(s=s.call(this.table,t.getComponent())),s instanceof Node?i.appendChild(s):i.innerHTML=s,"function"==typeof o&&(o=o.call(this.table,t.getComponent())),o?(i.classList.add("tabulator-menu-item-disabled"),i.addEventListener("click",(e=>{e.stopPropagation()}))):e.menu&&e.menu.length?i.addEventListener("click",(s=>{s.stopPropagation(),this.hideOldSubMenus(n),this.loadMenu(s,t,e.menu,i)})):e.action&&i.addEventListener("click",(i=>{e.action(i,t.getComponent())})),e.menu&&e.menu.length&&i.classList.add("tabulator-menu-item-submenu")),n.appendChild(i)})),n.addEventListener("click",(e=>{this.hideMenu()})),this.menuElements.push(n),this.positionMenu(n,s,o,e),this.currentComponent=t,this.dispatchExternal("menuOpened",t.getComponent())}}hideOldSubMenus(e){var t=this.menuElements.indexOf(e);if(t>-1)for(let e=this.menuElements.length-1;e>t;e--){var i=this.menuElements[e];i.parentNode&&i.parentNode.removeChild(i),this.menuElements.pop()}}positionMenu(e,t,i,o){var n,r,a;t?(n=(a=s.elOffset(t)).left+t.offsetWidth,r=a.top-1):(n=i?o.touches[0].pageX:o.pageX,r=i?o.touches[0].pageY:o.pageY,this.menuContainer!==document.body&&(n-=(a=s.elOffset(this.menuContainer)).left,r-=a.top),this.positionReversedX=!1),e.style.top=r+"px",e.style.left=n+"px",setTimeout((()=>{this.table.rowManager.element.addEventListener("scroll",this.blurEvent),this.subscribe("cell-editing",this.blurEvent),document.body.addEventListener("click",this.blurEvent),document.body.addEventListener("contextmenu",this.blurEvent),window.addEventListener("resize",this.blurEvent),document.body.addEventListener("keydown",this.escEvent)}),100),this.menuContainer.appendChild(e),(n+e.offsetWidth>=this.menuContainer.offsetWidth||this.positionReversedX)&&(e.style.left="",e.style.right=t?this.menuContainer.offsetWidth-a.left+"px":this.menuContainer.offsetWidth-n+"px",this.positionReversedX=!0),r+e.offsetHeight>this.menuContainer.offsetHeight&&(e.style.top=t?parseInt(e.style.top)-e.offsetHeight+t.offsetHeight+1+"px":parseInt(e.style.top)-e.offsetHeight+"px")}isOpen(){return!!this.menuElements.length}escMenu(e){27==e.keyCode&&this.hideMenu()}hideMenu(){this.menuElements.forEach((e=>{e.parentNode&&e.parentNode.removeChild(e)})),document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.unsubscribe("cell-editing",this.blurEvent),this.currentComponent&&(this.dispatchExternal("menuClosed",this.currentComponent.getComponent()),this.currentComponent=null)}}U.moduleName="menu";class X extends t{constructor(e){super(e),this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.registerTableOption("movableColumns",!1)}createPlaceholderElement(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.classList.add("tabulator-col-placeholder"),e}initialize(){this.table.options.movableColumns&&this.subscribe("column-init",this.initializeColumn.bind(this))}initializeColumn(e){var t,i=this,o={};e.modules.frozen||(t=e.getElement(),o.mousemove=function(o){e.parent===i.moving.parent&&((i.touchMove?o.touches[0].pageX:o.pageX)-s.elOffset(t).left+i.table.columnManager.element.scrollLeft>e.getWidth()/2?i.toCol===e&&i.toColAfter||(t.parentNode.insertBefore(i.placeholderElement,t.nextSibling),i.moveColumn(e,!0)):(i.toCol!==e||i.toColAfter)&&(t.parentNode.insertBefore(i.placeholderElement,t),i.moveColumn(e,!1)))}.bind(i),t.addEventListener("mousedown",(function(t){i.touchMove=!1,1===t.which&&(i.checkTimeout=setTimeout((function(){i.startMove(t,e)}),i.checkPeriod))})),t.addEventListener("mouseup",(function(e){1===e.which&&i.checkTimeout&&clearTimeout(i.checkTimeout)})),i.bindTouchEvents(e)),e.modules.moveColumn=o}bindTouchEvents(e){var t,i,s,o,n,r,a=e.getElement(),l=!1;a.addEventListener("touchstart",(a=>{this.checkTimeout=setTimeout((()=>{this.touchMove=!0,t=e.nextColumn(),s=t?t.getWidth()/2:0,i=e.prevColumn(),o=i?i.getWidth()/2:0,n=0,r=0,l=!1,this.startMove(a,e)}),this.checkPeriod)}),{passive:!0}),a.addEventListener("touchmove",(a=>{var h,d;this.moving&&(this.moveHover(a),l||(l=a.touches[0].pageX),(h=a.touches[0].pageX-l)>0?t&&h-n>s&&(d=t)!==e&&(l=a.touches[0].pageX,d.getElement().parentNode.insertBefore(this.placeholderElement,d.getElement().nextSibling),this.moveColumn(d,!0)):i&&-h-r>o&&(d=i)!==e&&(l=a.touches[0].pageX,d.getElement().parentNode.insertBefore(this.placeholderElement,d.getElement()),this.moveColumn(d,!1)),d&&(t=d.nextColumn(),n=s,s=t?t.getWidth()/2:0,i=d.prevColumn(),r=o,o=i?i.getWidth()/2:0))}),{passive:!0}),a.addEventListener("touchend",(e=>{this.checkTimeout&&clearTimeout(this.checkTimeout),this.moving&&this.endMove(e)}))}startMove(e,t){var i=t.getElement(),o=this.table.columnManager.getElement(),n=this.table.columnManager.getHeadersElement();this.moving=t,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-s.elOffset(i).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.table.columnManager.getElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom=o.clientHeight-n.offsetHeight+"px",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(e)}_bindMouseMove(){this.table.columnManager.columnsByIndex.forEach((function(e){e.modules.moveColumn.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveColumn.mousemove)}))}_unbindMouseMove(){this.table.columnManager.columnsByIndex.forEach((function(e){e.modules.moveColumn.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveColumn.mousemove)}))}moveColumn(e,t){var i=this.moving.getCells();this.toCol=e,this.toColAfter=t,t?e.getCells().forEach((function(e,t){var s=e.getElement(!0);s.parentNode&&i[t]&&s.parentNode.insertBefore(i[t].getElement(),s.nextSibling)})):e.getCells().forEach((function(e,t){var s=e.getElement(!0);s.parentNode&&i[t]&&s.parentNode.insertBefore(i[t].getElement(),s)}))}endMove(e){(1===e.which||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))}moveHover(e){var t,i=this.table.columnManager.getElement(),o=i.scrollLeft,n=(this.touchMove?e.touches[0].pageX:e.pageX)-s.elOffset(i).left+o;this.hoverElement.style.left=n-this.startX+"px",n-o{t=Math.max(0,o-5),this.table.rowManager.getElement().scrollLeft=t,this.autoScrollTimeout=!1}),1))),o+i.clientWidth-n{t=Math.min(i.clientWidth,o+5),this.table.rowManager.getElement().scrollLeft=t,this.autoScrollTimeout=!1}),1)))}}X.moduleName="moveColumn";class q extends t{constructor(e){super(e),this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=150,this.moving=!1,this.toRow=!1,this.toRowAfter=!1,this.hasHandle=!1,this.startY=0,this.startX=0,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.tableRowDropEvent=!1,this.touchMove=!1,this.connection=!1,this.connectionSelectorsTables=!1,this.connectionSelectorsElements=!1,this.connectionElements=[],this.connections=[],this.connectedTable=!1,this.connectedRow=!1,this.registerTableOption("movableRows",!1),this.registerTableOption("movableRowsConnectedTables",!1),this.registerTableOption("movableRowsConnectedElements",!1),this.registerTableOption("movableRowsSender",!1),this.registerTableOption("movableRowsReceiver","insert"),this.registerColumnOption("rowHandle")}createPlaceholderElement(){var e=document.createElement("div");return e.classList.add("tabulator-row"),e.classList.add("tabulator-row-placeholder"),e}initialize(){this.table.options.movableRows&&(this.connectionSelectorsTables=this.table.options.movableRowsConnectedTables,this.connectionSelectorsElements=this.table.options.movableRowsConnectedElements,this.connection=this.connectionSelectorsTables||this.connectionSelectorsElements,this.subscribe("cell-init",this.initializeCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("row-init",this.initializeRow.bind(this)))}initializeGroupHeader(e){var t=this,i={};i.mouseup=function(e){t.tableRowDrop(e,row)}.bind(t),i.mousemove=function(i){var o;i.pageY-s.elOffset(e.element).top+t.table.rowManager.element.scrollTop>e.getHeight()/2?t.toRow===e&&t.toRowAfter||((o=e.getElement()).parentNode.insertBefore(t.placeholderElement,o.nextSibling),t.moveRow(e,!0)):(t.toRow!==e||t.toRowAfter)&&(o=e.getElement()).previousSibling&&(o.parentNode.insertBefore(t.placeholderElement,o),t.moveRow(e,!1))}.bind(t),e.modules.moveRow=i}initializeRow(e){var t,i=this,o={};o.mouseup=function(t){i.tableRowDrop(t,e)}.bind(i),o.mousemove=function(t){var o=e.getElement();t.pageY-s.elOffset(o).top+i.table.rowManager.element.scrollTop>e.getHeight()/2?i.toRow===e&&i.toRowAfter||(o.parentNode.insertBefore(i.placeholderElement,o.nextSibling),i.moveRow(e,!0)):(i.toRow!==e||i.toRowAfter)&&(o.parentNode.insertBefore(i.placeholderElement,o),i.moveRow(e,!1))}.bind(i),this.hasHandle||((t=e.getElement()).addEventListener("mousedown",(function(t){1===t.which&&(i.checkTimeout=setTimeout((function(){i.startMove(t,e)}),i.checkPeriod))})),t.addEventListener("mouseup",(function(e){1===e.which&&i.checkTimeout&&clearTimeout(i.checkTimeout)})),this.bindTouchEvents(e,e.getElement())),e.modules.moveRow=o}initializeColumn(e){e.definition.rowHandle&&!1!==this.table.options.movableRows&&(this.hasHandle=!0)}initializeCell(e){if(e.column.definition.rowHandle&&!1!==this.table.options.movableRows){var t=this,i=e.getElement(!0);i.addEventListener("mousedown",(function(i){1===i.which&&(t.checkTimeout=setTimeout((function(){t.startMove(i,e.row)}),t.checkPeriod))})),i.addEventListener("mouseup",(function(e){1===e.which&&t.checkTimeout&&clearTimeout(t.checkTimeout)})),this.bindTouchEvents(e.row,i)}}bindTouchEvents(e,t){var i,s,o,n,r,a,l=!1;t.addEventListener("touchstart",(t=>{this.checkTimeout=setTimeout((()=>{this.touchMove=!0,i=e.nextRow(),o=i?i.getHeight()/2:0,s=e.prevRow(),n=s?s.getHeight()/2:0,r=0,a=0,l=!1,this.startMove(t,e)}),this.checkPeriod)}),{passive:!0}),this.moving,this.toRow,this.toRowAfter,t.addEventListener("touchmove",(t=>{var h,d;this.moving&&(t.preventDefault(),this.moveHover(t),l||(l=t.touches[0].pageY),(h=t.touches[0].pageY-l)>0?i&&h-r>o&&(d=i)!==e&&(l=t.touches[0].pageY,d.getElement().parentNode.insertBefore(this.placeholderElement,d.getElement().nextSibling),this.moveRow(d,!0)):s&&-h-a>n&&(d=s)!==e&&(l=t.touches[0].pageY,d.getElement().parentNode.insertBefore(this.placeholderElement,d.getElement()),this.moveRow(d,!1)),d&&(i=d.nextRow(),r=o,o=i?i.getHeight()/2:0,s=d.prevRow(),a=n,n=s?s.getHeight()/2:0))})),t.addEventListener("touchend",(e=>{this.checkTimeout&&clearTimeout(this.checkTimeout),this.moving&&(this.endMove(e),this.touchMove=!1)}))}_bindMouseMove(){this.table.rowManager.getDisplayRows().forEach((e=>{("row"===e.type||"group"===e.type)&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveRow.mousemove)}))}_unbindMouseMove(){this.table.rowManager.getDisplayRows().forEach((e=>{("row"===e.type||"group"===e.type)&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveRow.mousemove)}))}startMove(e,t){var i=t.getElement();this.setStartPosition(e,t),this.moving=t,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(t)):(i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i)),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.dispatchExternal("rowMoving",t.getComponent()),this.moveHover(e)}setStartPosition(e,t){var i,s,o=this.touchMove?e.touches[0].pageX:e.pageX,n=this.touchMove?e.touches[0].pageY:e.pageY;i=t.getElement(),this.connection?(s=i.getBoundingClientRect(),this.startX=s.left-o+window.pageXOffset,this.startY=s.top-n+window.pageYOffset):this.startY=n-i.getBoundingClientRect().top}endMove(e){e&&1!==e.which&&!this.touchMove||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow?this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter):this.dispatchExternal("rowMoveCancelled",this.moving.getComponent()),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))}moveRow(e,t){this.toRow=e,this.toRowAfter=t}moveHover(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)}moveHoverTable(e){var t=this.table.rowManager.getElement(),i=t.scrollTop,s=(this.touchMove?e.touches[0].pageY:e.pageY)-t.getBoundingClientRect().top+i;this.hoverElement.style.top=s-this.startY+"px"}moveHoverConnections(e){this.hoverElement.style.left=this.startX+(this.touchMove?e.touches[0].pageX:e.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?e.touches[0].pageY:e.pageY)+"px"}elementRowDrop(e,t,i){this.dispatchExternal("movableRowsElementDrop",e,t,!!i&&i.getComponent())}connectToTables(e){var t;this.connectionSelectorsTables&&(t=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStart",t),this.commsSend(this.connectionSelectorsTables,"moveRow","connect",{row:e})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach((e=>{"string"==typeof e?this.connectionElements=this.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(e))):this.connectionElements.push(e)})),this.connectionElements.forEach((e=>{var t=t=>{this.elementRowDrop(t,e,this.moving)};e.addEventListener("mouseup",t),e.tabulatorElementDropEvent=t,e.classList.add("tabulator-movingrow-receiving")})))}disconnectFromTables(){var e;this.connectionSelectorsTables&&(e=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStop",e),this.commsSend(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach((e=>{e.classList.remove("tabulator-movingrow-receiving"),e.removeEventListener("mouseup",e.tabulatorElementDropEvent),delete e.tabulatorElementDropEvent}))}connect(e,t){return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=e,this.connectedRow=t,this.table.element.classList.add("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach((e=>{"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().addEventListener("mouseup",e.modules.moveRow.mouseup)})),this.tableRowDropEvent=this.tableRowDrop.bind(this),this.table.element.addEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStart",t,e),!0)}disconnect(e){e===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach((e=>{"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().removeEventListener("mouseup",e.modules.moveRow.mouseup)})),this.table.element.removeEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStop",e)):console.warn("Move Row Error - trying to disconnect from non connected table")}dropComplete(e,t,i){var s=!1;if(i){switch(typeof this.table.options.movableRowsSender){case"string":s=this.senders[this.table.options.movableRowsSender];break;case"function":s=this.table.options.movableRowsSender}s?s.call(this,this.moving.getComponent(),t?t.getComponent():void 0,e):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.dispatchExternal("movableRowsSent",this.moving.getComponent(),t?t.getComponent():void 0,e)}else this.dispatchExternal("movableRowsSentFailed",this.moving.getComponent(),t?t.getComponent():void 0,e);this.endMove()}tableRowDrop(e,t){var i=!1,s=!1;switch(e.stopImmediatePropagation(),typeof this.table.options.movableRowsReceiver){case"string":i=this.receivers[this.table.options.movableRowsReceiver];break;case"function":i=this.table.options.movableRowsReceiver}i?s=i.call(this,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),s?this.dispatchExternal("movableRowsReceived",this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):this.dispatchExternal("movableRowsReceivedFailed",this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable),this.commsSend(this.connectedTable,"moveRow","dropcomplete",{row:t,success:s})}commsReceived(e,t,i){switch(t){case"connect":return this.connect(e,i.row);case"disconnect":return this.disconnect(e);case"dropcomplete":return this.dropComplete(e,i.row,i.success)}}}q.prototype.receivers={insert:function(e,t,i){return this.table.addRow(e.getData(),void 0,t),!0},add:function(e,t,i){return this.table.addRow(e.getData()),!0},update:function(e,t,i){return!!t&&(t.update(e.getData()),!0)},replace:function(e,t,i){return!!t&&(this.table.addRow(e.getData(),void 0,t),t.delete(),!0)}},q.prototype.senders={delete:function(e,t,i){e.delete()}},q.moduleName="moveRow";class K extends t{constructor(e){super(e),this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0,this.registerColumnOption("mutator"),this.registerColumnOption("mutatorParams"),this.registerColumnOption("mutatorData"),this.registerColumnOption("mutatorDataParams"),this.registerColumnOption("mutatorEdit"),this.registerColumnOption("mutatorEditParams"),this.registerColumnOption("mutatorClipboard"),this.registerColumnOption("mutatorClipboardParams")}initialize(){this.subscribe("cell-value-changing",this.transformCell.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-init-before",this.rowDataChanged.bind(this)),this.subscribe("row-data-changing",this.rowDataChanged.bind(this))}rowDataChanged(e,t,i){return this.transformRow(t,"data",i)}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach((s=>{var o,n="mutator"+(s.charAt(0).toUpperCase()+s.slice(1));e.definition[n]&&(o=this.lookupMutator(e.definition[n]))&&(t=!0,i[n]={mutator:o,params:e.definition[n+"Params"]||{}})})),t&&(e.modules.mutate=i)}lookupMutator(e){var t=!1;switch(typeof e){case"string":K.mutators[e]?t=K.mutators[e]:console.warn("Mutator Error - No such mutator found, ignoring: ",e);break;case"function":t=e}return t}transformRow(e,t,i){var s,o="mutator"+(t.charAt(0).toUpperCase()+t.slice(1));return this.enabled&&this.table.columnManager.traverse((n=>{var r,a,l;n.modules.mutate&&(r=n.modules.mutate[o]||n.modules.mutate.mutator||!1)&&(s=n.getFieldValue(void 0!==i?i:e),"data"!=t&&void 0===s||(l=n.getComponent(),a="function"==typeof r.params?r.params(s,e,t,l):r.params,n.setFieldValue(e,r.mutator(s,e,t,a,l))))})),e}transformCell(e,t){if(e.column.modules.mutate){var i=e.column.modules.mutate.mutatorEdit||e.column.modules.mutate.mutator||!1,s={};if(i)return s=Object.assign(s,e.row.getData()),e.column.setFieldValue(s,t),i.mutator(t,s,"edit",i.params,e.getComponent())}return t}enable(){this.enabled=!0}disable(){this.enabled=!1}}K.moduleName="mutator",K.mutators={};var Y={rows:function(e,t,i,s,o){var n=document.createElement("span"),r=document.createElement("span"),a=document.createElement("span"),l=document.createElement("span"),h=document.createElement("span"),d=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",(e=>{r.innerHTML=e})),this.table.modules.localize.langBind("pagination|counter|of",(e=>{l.innerHTML=e})),this.table.modules.localize.langBind("pagination|counter|rows",(e=>{d.innerHTML=e})),s?(a.innerHTML=" "+t+"-"+Math.min(t+e-1,s)+" ",h.innerHTML=" "+s+" ",n.appendChild(r),n.appendChild(a),n.appendChild(l),n.appendChild(h),n.appendChild(d)):(a.innerHTML=" 0 ",n.appendChild(r),n.appendChild(a),n.appendChild(d)),n},pages:function(e,t,i,s,o){var n=document.createElement("span"),r=document.createElement("span"),a=document.createElement("span"),l=document.createElement("span"),h=document.createElement("span"),d=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",(e=>{r.innerHTML=e})),a.innerHTML=" "+i+" ",this.table.modules.localize.langBind("pagination|counter|of",(e=>{l.innerHTML=e})),h.innerHTML=" "+o+" ",this.table.modules.localize.langBind("pagination|counter|pages",(e=>{d.innerHTML=e})),n.appendChild(r),n.appendChild(a),n.appendChild(l),n.appendChild(h),n.appendChild(d),n}};class J extends t{constructor(e){super(e),this.mode="local",this.progressiveLoad=!1,this.element=null,this.pageCounterElement=null,this.pageCounter=null,this.size=0,this.page=1,this.count=5,this.max=1,this.remoteRowCountEstimate=null,this.displayIndex=0,this.initialLoad=!0,this.dataChanging=!1,this.pageSizes=[],this.registerTableOption("pagination",!1),this.registerTableOption("paginationMode","local"),this.registerTableOption("paginationSize",!1),this.registerTableOption("paginationInitialPage",1),this.registerTableOption("paginationCounter",!1),this.registerTableOption("paginationCounterElement",!1),this.registerTableOption("paginationButtonCount",5),this.registerTableOption("paginationSizeSelector",!1),this.registerTableOption("paginationElement",!1),this.registerTableOption("paginationAddRow","page"),this.registerTableOption("progressiveLoad",!1),this.registerTableOption("progressiveLoadDelay",0),this.registerTableOption("progressiveLoadScrollMargin",0),this.registerTableFunction("setMaxPage",this.setMaxPage.bind(this)),this.registerTableFunction("setPage",this.setPage.bind(this)),this.registerTableFunction("setPageToRow",this.userSetPageToRow.bind(this)),this.registerTableFunction("setPageSize",this.userSetPageSize.bind(this)),this.registerTableFunction("getPageSize",this.getPageSize.bind(this)),this.registerTableFunction("previousPage",this.previousPage.bind(this)),this.registerTableFunction("nextPage",this.nextPage.bind(this)),this.registerTableFunction("getPage",this.getPage.bind(this)),this.registerTableFunction("getPageMax",this.getPageMax.bind(this)),this.registerComponentFunction("row","pageTo",this.setPageToRow.bind(this))}initialize(){this.table.options.pagination?(this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),"page"==this.table.options.paginationAddRow&&this.subscribe("row-adding-position",this.rowAddingPosition.bind(this)),"remote"===this.table.options.paginationMode&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this))),this.table.options.progressiveLoad&&console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time"),this.registerDisplayHandler(this.restOnRenderBefore.bind(this),40),this.registerDisplayHandler(this.getRows.bind(this),50),this.createElements(),this.initializePageCounter(),this.initializePaginator()):this.table.options.progressiveLoad&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.initializeProgressive(this.table.options.progressiveLoad),"scroll"===this.table.options.progressiveLoad&&this.subscribe("scroll-vertical",this.scrollVertical.bind(this)))}rowAddingPosition(e,t){var i,s=this.table.rowManager,o=s.getDisplayRows();return t?o.length?i=o[0]:s.activeRows.length&&(i=s.activeRows[s.activeRows.length-1],t=!1):o.length&&(i=o[o.length-1],t=!(o.length{}))}restOnRenderBefore(e,t){return t||"local"===this.mode&&this.reset(),e}rowsUpdated(){this.refreshData(!0,"all")}createElements(){var e;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),(e=document.createElement("button")).classList.add("tabulator-page"),e.setAttribute("type","button"),e.setAttribute("role","button"),e.setAttribute("aria-label",""),e.setAttribute("title",""),this.firstBut=e.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=e.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=e.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=e.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))}generatePageSizeSelectList(){var e=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))e=this.table.options.paginationSizeSelector,this.pageSizes=e,-1==this.pageSizes.indexOf(this.size)&&e.unshift(this.size);else if(-1==this.pageSizes.indexOf(this.size)){e=[];for(let t=1;t<5;t++)e.push(this.size*t);this.pageSizes=e}else e=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);e.forEach((e=>{var t=document.createElement("option");t.value=e,!0===e?this.langBind("pagination|all",(function(e){t.innerHTML=e})):t.innerHTML=e,this.pageSizeSelect.appendChild(t)})),this.pageSizeSelect.value=this.size}}initializePageCounter(){var e=this.table.options.paginationCounter,t=null;e&&((t="function"==typeof e?e:J.pageCounters[e])?(this.pageCounter=t,this.pageCounterElement=document.createElement("span"),this.pageCounterElement.classList.add("tabulator-page-counter")):console.warn("Pagination Error - No such page counter found: ",e))}initializePaginator(e){var t,i;e||(this.langBind("pagination|first",(e=>{this.firstBut.innerHTML=e})),this.langBind("pagination|first_title",(e=>{this.firstBut.setAttribute("aria-label",e),this.firstBut.setAttribute("title",e)})),this.langBind("pagination|prev",(e=>{this.prevBut.innerHTML=e})),this.langBind("pagination|prev_title",(e=>{this.prevBut.setAttribute("aria-label",e),this.prevBut.setAttribute("title",e)})),this.langBind("pagination|next",(e=>{this.nextBut.innerHTML=e})),this.langBind("pagination|next_title",(e=>{this.nextBut.setAttribute("aria-label",e),this.nextBut.setAttribute("title",e)})),this.langBind("pagination|last",(e=>{this.lastBut.innerHTML=e})),this.langBind("pagination|last_title",(e=>{this.lastBut.setAttribute("aria-label",e),this.lastBut.setAttribute("title",e)})),this.firstBut.addEventListener("click",(()=>{this.setPage(1)})),this.prevBut.addEventListener("click",(()=>{this.previousPage()})),this.nextBut.addEventListener("click",(()=>{this.nextPage()})),this.lastBut.addEventListener("click",(()=>{this.setPage(this.max)})),this.table.options.paginationElement&&(this.element=this.table.options.paginationElement),this.pageSizeSelect&&(t=document.createElement("label"),this.langBind("pagination|page_size",(e=>{this.pageSizeSelect.setAttribute("aria-label",e),this.pageSizeSelect.setAttribute("title",e),t.innerHTML=e})),this.element.appendChild(t),this.element.appendChild(this.pageSizeSelect),this.pageSizeSelect.addEventListener("change",(e=>{this.setPageSize("true"==this.pageSizeSelect.value||this.pageSizeSelect.value),this.setPage(1)}))),this.element.appendChild(this.firstBut),this.element.appendChild(this.prevBut),this.element.appendChild(this.pagesElement),this.element.appendChild(this.nextBut),this.element.appendChild(this.lastBut),this.table.options.paginationElement||e||(this.table.options.paginationCounter&&(this.table.options.paginationCounterElement?this.table.options.paginationCounterElement instanceof HTMLElement?this.table.options.paginationCounterElement.appendChild(this.pageCounterElement):"string"==typeof this.table.options.paginationCounterElement&&((i=document.querySelector(this.table.options.paginationCounterElement))?i.appendChild(this.pageCounterElement):console.warn("Pagination Error - Unable to find element matching paginationCounterElement selector:",this.table.options.paginationCounterElement)):this.table.footerManager.append(this.pageCounterElement)),this.table.footerManager.append(this.element,this)),this.page=this.table.options.paginationInitialPage,this.count=this.table.options.paginationButtonCount),this.mode=this.table.options.paginationMode}initializeProgressive(e){this.initializePaginator(!0),this.mode="progressive_"+e,this.progressiveLoad=!0}trackChanges(){this.dispatch("page-changed")}setDisplayIndex(e){this.displayIndex=e}getDisplayIndex(){return this.displayIndex}setMaxRows(e){this.max=e?!0===this.size?1:Math.ceil(e/this.size):1,this.page>this.max&&(this.page=this.max)}reset(e){this.initialLoad||("local"==this.mode||e)&&(this.page=1)}setMaxPage(e){e=parseInt(e),this.max=e||1,this.page>this.max&&(this.page=this.max,this.trigger())}setPage(e){switch(e){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return(e=parseInt(e))>0&&e<=this.max||"local"!==this.mode?(this.page=e,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Requested page is out of range of 1 - "+this.max+":",e),Promise.reject())}setPageToRow(e){var t=this.table.rowManager.getDisplayRows(this.displayIndex-1).indexOf(e);if(t>-1){var i=!0===this.size?1:Math.ceil((t+1)/this.size);return this.setPage(i)}return console.warn("Pagination Error - Requested row is not visible"),Promise.reject()}setPageSize(e){!0!==e&&(e=parseInt(e)),e>0&&(this.size=e),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.trackChanges()}_setPageCounter(e,t,i){var s;if(this.pageCounter)switch("remote"===this.mode&&(t=this.size,i=(this.page-1)*this.size+1,e=this.remoteRowCountEstimate),typeof(s=this.pageCounter.call(this,t,i,this.page,e,this.max))){case"object":if(s instanceof Node){for(;this.pageCounterElement.firstChild;)this.pageCounterElement.removeChild(this.pageCounterElement.firstChild);this.pageCounterElement.appendChild(s)}else this.pageCounterElement.innerHTML="",null!=s&&console.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:",s);break;case"undefined":case"null":this.pageCounterElement.innerHTML="";break;default:this.pageCounterElement.innerHTML=s}}_setPageButtons(){let e=Math.floor((this.count-1)/2),t=Math.ceil((this.count-1)/2),i=this.max-this.page+e+10&&e<=this.max&&this.pagesElement.appendChild(this._generatePageButton(e));this.footerRedraw()}_generatePageButton(e){var t=document.createElement("button");return t.classList.add("tabulator-page"),e==this.page&&t.classList.add("active"),t.setAttribute("type","button"),t.setAttribute("role","button"),this.langBind("pagination|page_title",(i=>{t.setAttribute("aria-label",i+" "+e),t.setAttribute("title",i+" "+e)})),t.setAttribute("data-page",e),t.textContent=e,t.addEventListener("click",(t=>{this.setPage(e)})),t}previousPage(){return this.page>1?(this.page--,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Previous page would be less than page 1:",0),Promise.reject())}nextPage(){return this.page"row"===e.type));if("local"==this.mode){t=[],this.setMaxRows(e.length),!0===this.size?(i=0,s=e.length):s=(i=this.size*(this.page-1))+parseInt(this.size),this._setPageButtons();for(let r=i;r{this.dataChanging=!1}));case"progressive_load":case"progressive_scroll":return this.reloadData(null,!0);default:return console.warn("Pagination Error - no such pagination mode:",this.mode),Promise.reject()}}_parseRemoteData(e){var t;if(void 0===e.last_page&&console.warn("Remote Pagination Error - Server response missing '"+(this.options("dataReceiveParams").last_page||"last_page")+"' property"),e.data){if(this.max=parseInt(e.last_page)||1,this.remoteRowCountEstimate=void 0!==e.last_row?e.last_row:e.last_page*this.size-(this.page==e.last_page?this.size-e.data.length:0),this.progressiveLoad){switch(this.mode){case"progressive_load":1==this.page?this.table.rowManager.setData(e.data,!1,1==this.page):this.table.rowManager.addRows(e.data),this.page{this.nextPage()}),this.table.options.progressiveLoadDelay);break;case"progressive_scroll":e=1===this.page?e.data:this.table.rowManager.getData().concat(e.data),this.table.rowManager.setData(e,1!==this.page,1==this.page),t=this.table.options.progressiveLoadScrollMargin||2*this.table.rowManager.element.clientHeight,this.table.rowManager.element.scrollHeight<=this.table.rowManager.element.clientHeight+t&&this.page{this.nextPage()}))}return!1}this.dispatchExternal("pageLoaded",this.getPage())}else console.warn("Remote Pagination Error - Server response missing '"+(this.options("dataReceiveParams").data||"data")+"' property");return e.data}footerRedraw(){var e=this.table.footerManager.containerElement;Math.ceil(e.clientWidth)-e.scrollWidth<0?this.pagesElement.style.display="none":(this.pagesElement.style.display="",Math.ceil(e.clientWidth)-e.scrollWidth<0&&(this.pagesElement.style.display="none"))}}J.moduleName="page",J.pageCounters=Y;var $={local:function(e,t){var i=localStorage.getItem(e+"-"+t);return!!i&&JSON.parse(i)},cookie:function(e,t){var i,s,o=document.cookie,n=e+"-"+t,r=o.indexOf(n+"=");return r>-1&&((i=(o=o.slice(r)).indexOf(";"))>-1&&(o=o.slice(0,i)),s=o.replace(n+"=","")),!!s&&JSON.parse(s)}},Z={local:function(e,t,i){localStorage.setItem(e+"-"+t,JSON.stringify(i))},cookie:function(e,t,i){var s=new Date;s.setDate(s.getDate()+1e4),document.cookie=e+"-"+t+"="+JSON.stringify(i)+"; expires="+s.toUTCString()}};class Q extends t{constructor(e){super(e),this.mode="",this.id="",this.defWatcherBlock=!1,this.config={},this.readFunc=!1,this.writeFunc=!1,this.registerTableOption("persistence",!1),this.registerTableOption("persistenceID",""),this.registerTableOption("persistenceMode",!0),this.registerTableOption("persistenceReaderFunc",!1),this.registerTableOption("persistenceWriterFunc",!1)}localStorageTest(){var e="_tabulator_test";try{return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}}initialize(){if(this.table.options.persistence){var e,t=this.table.options.persistenceMode,i=this.table.options.persistenceID;this.mode=!0!==t?t:this.localStorageTest()?"local":"cookie",this.table.options.persistenceReaderFunc?"function"==typeof this.table.options.persistenceReaderFunc?this.readFunc=this.table.options.persistenceReaderFunc:Q.readers[this.table.options.persistenceReaderFunc]?this.readFunc=Q.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):Q.readers[this.mode]?this.readFunc=Q.readers[this.mode]:console.warn("Persistence Read Error - invalid reader set",this.mode),this.table.options.persistenceWriterFunc?"function"==typeof this.table.options.persistenceWriterFunc?this.writeFunc=this.table.options.persistenceWriterFunc:Q.writers[this.table.options.persistenceWriterFunc]?this.writeFunc=Q.writers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):Q.writers[this.mode]?this.writeFunc=Q.writers[this.mode]:console.warn("Persistence Write Error - invalid writer set",this.mode),this.id="tabulator-"+(i||this.table.element.getAttribute("id")||""),this.config={sort:!0===this.table.options.persistence||this.table.options.persistence.sort,filter:!0===this.table.options.persistence||this.table.options.persistence.filter,group:!0===this.table.options.persistence||this.table.options.persistence.group,page:!0===this.table.options.persistence||this.table.options.persistence.page,columns:!0===this.table.options.persistence?["title","width","visible"]:this.table.options.persistence.columns},this.config.page&&(e=this.retreiveData("page"))&&(void 0===e.paginationSize||!0!==this.config.page&&!this.config.page.size||(this.table.options.paginationSize=e.paginationSize),void 0===e.paginationInitialPage||!0!==this.config.page&&!this.config.page.page||(this.table.options.paginationInitialPage=e.paginationInitialPage)),this.config.group&&(e=this.retreiveData("group"))&&(void 0===e.groupBy||!0!==this.config.group&&!this.config.group.groupBy||(this.table.options.groupBy=e.groupBy),void 0===e.groupStartOpen||!0!==this.config.group&&!this.config.group.groupStartOpen||(this.table.options.groupStartOpen=e.groupStartOpen),void 0===e.groupHeader||!0!==this.config.group&&!this.config.group.groupHeader||(this.table.options.groupHeader=e.groupHeader)),this.config.columns&&(this.table.options.columns=this.load("columns",this.table.options.columns),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-show",this.save.bind(this,"columns")),this.subscribe("column-hide",this.save.bind(this,"columns")),this.subscribe("column-moved",this.save.bind(this,"columns"))),this.subscribe("table-built",this.tableBuilt.bind(this),0),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("filter-changed",this.eventSave.bind(this,"filter")),this.subscribe("sort-changed",this.eventSave.bind(this,"sort")),this.subscribe("group-changed",this.eventSave.bind(this,"group")),this.subscribe("page-changed",this.eventSave.bind(this,"page")),this.subscribe("column-resized",this.eventSave.bind(this,"columns")),this.subscribe("layout-refreshed",this.eventSave.bind(this,"columns"))}this.registerTableFunction("getColumnLayout",this.getColumnLayout.bind(this)),this.registerTableFunction("setColumnLayout",this.setColumnLayout.bind(this))}eventSave(e){this.config[e]&&this.save(e)}tableBuilt(){var e,t;this.table.options;this.config.sort&&!1==!(e=this.load("sort"))&&(this.table.options.initialSort=e),this.config.filter&&!1==!(t=this.load("filter"))&&(this.table.options.initialFilter=t)}tableRedraw(e){e&&this.config.columns&&this.save("columns")}getColumnLayout(){return this.parseColumns(this.table.columnManager.getColumns())}setColumnLayout(e){return this.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns,e)),!0}initializeColumn(e){var t;this.config.columns&&(this.defWatcherBlock=!0,t=e.getDefinition(),(!0===this.config.columns?Object.keys(t):this.config.columns).forEach((e=>{var i=Object.getOwnPropertyDescriptor(t,e),s=t[e];i&&Object.defineProperty(t,e,{set:function(e){s=e,this.defWatcherBlock||this.save("columns"),i.set&&i.set(e)},get:function(){return i.get&&i.get(),s}})})),this.defWatcherBlock=!1)}load(e,t){var i=this.retreiveData(e);return t&&(i=i?this.mergeDefinition(t,i):t),i}retreiveData(e){return!!this.readFunc&&this.readFunc(this.id,e)}mergeDefinition(e,t){var i=[];return(t=t||[]).forEach(((t,s)=>{var o,n=this._findColumn(e,t);n&&(!0===this.config.columns||null==this.config.columns?(o=Object.keys(n)).push("width"):o=this.config.columns,o.forEach((e=>{"columns"!==e&&void 0!==t[e]&&(n[e]=t[e])})),n.columns&&(n.columns=this.mergeDefinition(n.columns,t.columns)),i.push(n))})),e.forEach(((e,s)=>{this._findColumn(t,e)||(i.length>s?i.splice(s,0,e):i.push(e))})),i}_findColumn(e,t){var i=t.columns?"group":t.field?"field":"object";return e.find((function(e){switch(i){case"group":return e.title===t.title&&e.columns.length===t.columns.length;case"field":return e.field===t.field;case"object":return e===t}}))}save(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort());break;case"group":t=this.getGroupConfig();break;case"page":t=this.getPageConfig()}this.writeFunc&&this.writeFunc(this.id,e,t)}validateSorters(e){return e.forEach((function(e){e.column=e.field,delete e.field})),e}getGroupConfig(){var e={};return this.config.group&&((!0===this.config.group||this.config.group.groupBy)&&(e.groupBy=this.table.options.groupBy),(!0===this.config.group||this.config.group.groupStartOpen)&&(e.groupStartOpen=this.table.options.groupStartOpen),(!0===this.config.group||this.config.group.groupHeader)&&(e.groupHeader=this.table.options.groupHeader)),e}getPageConfig(){var e={};return this.config.page&&((!0===this.config.page||this.config.page.size)&&(e.paginationSize=this.table.modules.page.getPageSize()),(!0===this.config.page||this.config.page.page)&&(e.paginationInitialPage=this.table.modules.page.getPage())),e}parseColumns(e){var t=[],i=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return e.forEach((e=>{var s,o={},n=e.getDefinition();e.isGroup?(o.title=n.title,o.columns=this.parseColumns(e.getColumns())):(o.field=e.getField(),!0===this.config.columns||null==this.config.columns?(s=Object.keys(n)).push("width"):s=this.config.columns,s.forEach((t=>{switch(t){case"width":o.width=e.getWidth();break;case"visible":o.visible=e.visible;break;default:"function"!=typeof n[t]&&-1===i.indexOf(t)&&(o[t]=n[t])}}))),t.push(o)})),t}}Q.moduleName="persistence",Q.moduleInitOrder=1,Q.readers=$,Q.writers=Z;class ee extends t{constructor(e){super(e),this.element=!1,this.manualBlock=!1,this.registerTableOption("printAsHtml",!1),this.registerTableOption("printFormatter",!1),this.registerTableOption("printHeader",!1),this.registerTableOption("printFooter",!1),this.registerTableOption("printStyled",!0),this.registerTableOption("printRowRange","visible"),this.registerTableOption("printConfig",{}),this.registerColumnOption("print"),this.registerColumnOption("titlePrint")}initialize(){this.table.options.printAsHtml&&(window.addEventListener("beforeprint",this.replaceTable.bind(this)),window.addEventListener("afterprint",this.cleanup.bind(this))),this.registerTableFunction("print",this.printFullscreen.bind(this))}replaceTable(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))}cleanup(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")}printFullscreen(e,t,i){var s,o,n=window.scrollX,r=window.scrollY,a=document.createElement("div"),l=document.createElement("div"),h=this.table.modules.export.genereateTable(void 0!==i?i:this.table.options.printConfig,void 0!==t?t:this.table.options.printStyled,e||this.table.options.printRowRange,"print");this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(a.classList.add("tabulator-print-header"),"string"==typeof(s="function"==typeof this.table.options.printHeader?this.table.options.printHeader.call(this.table):this.table.options.printHeader)?a.innerHTML=s:a.appendChild(s),this.element.appendChild(a)),this.element.appendChild(h),this.table.options.printFooter&&(l.classList.add("tabulator-print-footer"),"string"==typeof(o="function"==typeof this.table.options.printFooter?this.table.options.printFooter.call(this.table):this.table.options.printFooter)?l.innerHTML=o:l.appendChild(o),this.element.appendChild(l)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,h),window.print(),this.cleanup(),window.scrollTo(n,r),this.manualBlock=!1}}ee.moduleName="print";class te extends t{constructor(e){super(e),this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0,this.registerTableOption("reactiveData",!1)}initialize(){this.table.options.reactiveData&&(this.subscribe("cell-value-save-before",this.block.bind(this)),this.subscribe("cell-value-save-after",this.unblock.bind(this)),this.subscribe("row-data-save-before",this.block.bind(this)),this.subscribe("row-data-save-after",this.unblock.bind(this)),this.subscribe("row-data-init-after",this.watchRow.bind(this)),this.subscribe("data-processing",this.watchData.bind(this)),this.subscribe("table-destroy",this.unwatchData.bind(this)))}watchData(e){var t,i=this;this.currentVersion++,t=this.currentVersion,this.unwatchData(),this.data=e,this.origFuncs.push=e.push,Object.defineProperty(this.data,"push",{enumerable:!1,configurable:!0,value:function(){var s=Array.from(arguments);return i.blocked||t!==i.currentVersion||s.forEach((e=>{i.table.rowManager.addRowActual(e,!1)})),i.origFuncs.push.apply(e,arguments)}}),this.origFuncs.unshift=e.unshift,Object.defineProperty(this.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var s=Array.from(arguments);return i.blocked||t!==i.currentVersion||s.forEach((e=>{i.table.rowManager.addRowActual(e,!0)})),i.origFuncs.unshift.apply(e,arguments)}}),this.origFuncs.shift=e.shift,Object.defineProperty(this.data,"shift",{enumerable:!1,configurable:!0,value:function(){var s;return i.blocked||t!==i.currentVersion||i.data.length&&(s=i.table.rowManager.getRowFromDataObject(i.data[0]))&&s.deleteActual(),i.origFuncs.shift.call(e)}}),this.origFuncs.pop=e.pop,Object.defineProperty(this.data,"pop",{enumerable:!1,configurable:!0,value:function(){var s;return i.blocked||t!==i.currentVersion||i.data.length&&(s=i.table.rowManager.getRowFromDataObject(i.data[i.data.length-1]))&&s.deleteActual(),i.origFuncs.pop.call(e)}}),this.origFuncs.splice=e.splice,Object.defineProperty(this.data,"splice",{enumerable:!1,configurable:!0,value:function(){var s,o=Array.from(arguments),n=o[0]<0?e.length+o[0]:o[0],r=o[1],a=!!o[2]&&o.slice(2);if(!i.blocked&&t===i.currentVersion){if(a&&((s=!!e[n]&&i.table.rowManager.getRowFromDataObject(e[n]))?a.forEach((e=>{i.table.rowManager.addRowActual(e,!0,s,!0)})):(a=a.slice().reverse()).forEach((e=>{i.table.rowManager.addRowActual(e,!0,!1,!0)}))),0!==r){var l=e.slice(n,void 0===o[1]?o[1]:n+r);l.forEach(((e,t)=>{var s=i.table.rowManager.getRowFromDataObject(e);s&&s.deleteActual(t!==l.length-1)}))}(a||0!==r)&&i.table.rowManager.reRenderInPosition()}return i.origFuncs.splice.apply(e,arguments)}})}unwatchData(){if(!1!==this.data)for(var e in this.origFuncs)Object.defineProperty(this.data,e,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})}watchRow(e){var t=e.getData();for(var i in this.blocked=!0,t)this.watchKey(e,t,i);this.table.options.dataTree&&this.watchTreeChildren(e),this.blocked=!1}watchTreeChildren(e){var t=e.getData()[this.table.options.dataTreeChildField],i={};function s(){this.table.modules.dataTree.initializeRow(e),this.table.modules.dataTree.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)}t&&(i.push=t.push,Object.defineProperty(t,"push",{enumerable:!1,configurable:!0,value:()=>{var e=i.push.apply(t,arguments);return s(),e}}),i.unshift=t.unshift,Object.defineProperty(t,"unshift",{enumerable:!1,configurable:!0,value:()=>{var e=i.unshift.apply(t,arguments);return s(),e}}),i.shift=t.shift,Object.defineProperty(t,"shift",{enumerable:!1,configurable:!0,value:()=>{var e=i.shift.call(t);return s(),e}}),i.pop=t.pop,Object.defineProperty(t,"pop",{enumerable:!1,configurable:!0,value:()=>{var e=i.pop.call(t);return s(),e}}),i.splice=t.splice,Object.defineProperty(t,"splice",{enumerable:!1,configurable:!0,value:()=>{var e=i.splice.apply(t,arguments);return s(),e}}))}watchKey(e,t,i){var s=Object.getOwnPropertyDescriptor(t,i),o=t[i],n=this.currentVersion;Object.defineProperty(t,i,{set:t=>{if(o=t,!this.blocked&&n===this.currentVersion){var r={};r[i]=t,e.updateData(r)}s.set&&s.set(t)},get:()=>(s.get&&s.get(),o)})}unwatchRow(e){var t=e.getData();for(var i in t)Object.defineProperty(t,i,{value:t[i]})}block(){this.blocked=!0}unblock(){this.blocked=!1}}te.moduleName="reactiveData";class ie extends t{constructor(e){super(e),this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.handle=null,this.prevHandle=null,this.registerColumnOption("resizable",!0)}initialize(){this.subscribe("cell-layout",this.layoutCellHandles.bind(this)),this.subscribe("column-init",this.layoutColumnHeader.bind(this))}layoutCellHandles(e){"row"===e.row.type&&this.initializeColumn("cell",e.column,e.element)}layoutColumnHeader(e){this.initializeColumn("header",e,e.element)}initializeColumn(e,t,i){var s=this,o=!1,n=t.definition.resizable;if("header"===e&&(o="textarea"==t.definition.formatter||t.definition.variableHeight,t.modules.resize={variableHeight:o}),!0===n||n==e){var r=document.createElement("div");r.className="tabulator-col-resize-handle";var a=document.createElement("div");a.className="tabulator-col-resize-handle prev",r.addEventListener("click",(function(e){e.stopPropagation()}));var l=function(e){var i=t.getLastColumn();i&&s._checkResizability(i)&&(s.startColumn=t,s._mouseDown(e,i,r))};r.addEventListener("mousedown",l),r.addEventListener("touchstart",l,{passive:!0}),r.addEventListener("dblclick",(function(e){var i,o=t.getLastColumn();o&&s._checkResizability(o)&&(i=o.getWidth(),e.stopPropagation(),o.reinitializeWidth(!0),i!==o.getWidth()&&(s.dispatch("column-resized",o),s.table.externalEvents.dispatch("columnResized",o.getComponent())))})),a.addEventListener("click",(function(e){e.stopPropagation()}));var h=function(e){var i,o,n;(i=t.getFirstColumn())&&(n=(o=s.table.columnManager.findColumnIndex(i))>0&&s.table.columnManager.getColumnByIndex(o-1))&&s._checkResizability(n)&&(s.startColumn=t,s._mouseDown(e,n,a))};a.addEventListener("mousedown",h),a.addEventListener("touchstart",h,{passive:!0}),a.addEventListener("dblclick",(function(e){var i,o,n;(i=t.getFirstColumn())&&(n=(o=s.table.columnManager.findColumnIndex(i))>0&&s.table.columnManager.getColumnByIndex(o-1))&&s._checkResizability(n)&&(e.stopPropagation(),n.reinitializeWidth(!0))})),i.appendChild(r),i.appendChild(a)}}_checkResizability(e){return e.definition.resizable}_mouseDown(e,t,i){var s=this;function o(e){s.table.rtl?t.setWidth(s.startWidth-((void 0===e.screenX?e.touches[0].screenX:e.screenX)-s.startX)):t.setWidth(s.startWidth+((void 0===e.screenX?e.touches[0].screenX:e.screenX)-s.startX)),s.table.columnManager.renderer.rerenderColumns(!0),!s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}function n(e){s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!1),s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",n),document.body.removeEventListener("mousemove",o),i.removeEventListener("touchmove",o),i.removeEventListener("touchend",n),s.table.element.classList.remove("tabulator-block-select"),s.startWidth!==t.getWidth()&&(s.dispatch("column-resized",t),s.table.externalEvents.dispatch("columnResized",t.getComponent()))}s.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!0),s.startX=void 0===e.screenX?e.touches[0].screenX:e.screenX,s.startWidth=t.getWidth(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",n),i.addEventListener("touchmove",o,{passive:!0}),i.addEventListener("touchend",n)}}ie.moduleName="resizeColumns";class se extends t{constructor(e){super(e),this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null,this.registerTableOption("resizableRows",!1)}initialize(){this.table.options.resizableRows&&this.subscribe("row-layout-after",this.initializeRow.bind(this))}initializeRow(e){var t=this,i=e.getElement(),s=document.createElement("div");s.className="tabulator-row-resize-handle";var o=document.createElement("div");o.className="tabulator-row-resize-handle prev",s.addEventListener("click",(function(e){e.stopPropagation()}));var n=function(i){t.startRow=e,t._mouseDown(i,e,s)};s.addEventListener("mousedown",n),s.addEventListener("touchstart",n,{passive:!0}),o.addEventListener("click",(function(e){e.stopPropagation()}));var r=function(i){var s=t.table.rowManager.prevDisplayRow(e);s&&(t.startRow=s,t._mouseDown(i,s,o))};o.addEventListener("mousedown",r),o.addEventListener("touchstart",r,{passive:!0}),i.appendChild(s),i.appendChild(o)}_mouseDown(e,t,i){var s=this;function o(e){t.setHeight(s.startHeight+((void 0===e.screenY?e.touches[0].screenY:e.screenY)-s.startY))}function n(e){document.body.removeEventListener("mouseup",o),document.body.removeEventListener("mousemove",o),i.removeEventListener("touchmove",o),i.removeEventListener("touchend",n),s.table.element.classList.remove("tabulator-block-select"),s.dispatchExternal("rowResized",t.getComponent())}s.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),s.startY=void 0===e.screenY?e.touches[0].screenY:e.screenY,s.startHeight=t.getHeight(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",n),i.addEventListener("touchmove",o,{passive:!0}),i.addEventListener("touchend",n)}}se.moduleName="resizeRows";class oe extends t{constructor(e){super(e),this.binding=!1,this.observer=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1,this.registerTableOption("autoResize",!0)}initialize(){if(this.table.options.autoResize){var e,t=this.table;this.tableHeight=t.element.clientHeight,this.tableWidth=t.element.clientWidth,t.element.parentNode&&(this.containerHeight=t.element.parentNode.clientHeight,this.containerWidth=t.element.parentNode.clientWidth),"undefined"!=typeof ResizeObserver&&"virtual"===t.rowManager.getRenderMode()?(this.autoResize=!0,this.observer=new ResizeObserver((e=>{if(!t.browserMobile||t.browserMobile&&!t.modules.edit.currentCell){var i=Math.floor(e[0].contentRect.height),s=Math.floor(e[0].contentRect.width);this.tableHeight==i&&this.tableWidth==s||(this.tableHeight=i,this.tableWidth=s,t.element.parentNode&&(this.containerHeight=t.element.parentNode.clientHeight,this.containerWidth=t.element.parentNode.clientWidth),this.table.columnManager.renderer.rerenderColumns(!0),t.redraw())}})),this.observer.observe(t.element),e=window.getComputedStyle(t.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(e.getPropertyValue("max-height")||e.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver((e=>{if(!t.browserMobile||t.browserMobile&&!t.modules.edit.currentCell){var i=Math.floor(e[0].contentRect.height),s=Math.floor(e[0].contentRect.width);this.containerHeight==i&&this.containerWidth==s||(this.containerHeight=i,this.containerWidth=s,this.tableHeight=t.element.clientHeight,this.tableWidth=t.element.clientWidth),t.columnManager.renderer.rerenderColumns(!0),t.redraw()}})),this.containerObserver.observe(this.table.element.parentNode)),this.subscribe("table-resize",this.tableResized.bind(this))):(this.binding=function(){(!t.browserMobile||t.browserMobile&&!t.modules.edit.currentCell)&&(t.columnManager.renderer.rerenderColumns(!0),t.redraw())},window.addEventListener("resize",this.binding)),this.subscribe("table-destroy",this.clearBindings.bind(this))}}tableResized(){this.table.rowManager.redraw()}clearBindings(){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)}}oe.moduleName="resizeTable";class ne extends t{constructor(e){super(e),this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1,this.registerTableOption("responsiveLayout",!1),this.registerTableOption("responsiveLayoutCollapseStartOpen",!0),this.registerTableOption("responsiveLayoutCollapseUseFormatters",!0),this.registerTableOption("responsiveLayoutCollapseFormatter",!1),this.registerColumnOption("responsive")}initialize(){this.table.options.responsiveLayout&&(this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-show",this.updateColumnVisibility.bind(this)),this.subscribe("column-hide",this.updateColumnVisibility.bind(this)),this.subscribe("columns-loaded",this.initializeResponsivity.bind(this)),this.subscribe("column-moved",this.initializeResponsivity.bind(this)),this.subscribe("column-add",this.initializeResponsivity.bind(this)),this.subscribe("column-delete",this.initializeResponsivity.bind(this)),this.subscribe("table-redrawing",this.tableRedraw.bind(this)),"collapse"===this.table.options.responsiveLayout&&(this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout",this.layoutRow.bind(this))))}tableRedraw(e){-1===["fitColumns","fitDataStretch"].indexOf(this.layoutMode())&&(e||this.update())}initializeResponsivity(){var e=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach(((t,i)=>{t.modules.responsive&&t.modules.responsive.order&&t.modules.responsive.visible&&(t.modules.responsive.index=i,e.push(t),t.visible||"collapse"!==this.mode||this.hiddenColumns.push(t))})),e=(e=e.reverse()).sort(((e,t)=>t.modules.responsive.order-e.modules.responsive.order||t.modules.responsive.index-e.modules.responsive.index)),this.columns=e,"collapse"===this.mode&&this.generateCollapsedContent();for(let e of this.table.columnManager.columnsByIndex)if("responsiveCollapse"==e.definition.formatter){this.collapseHandleColumn=e;break}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())}initializeColumn(e){var t=e.getDefinition();e.modules.responsive={order:void 0===t.responsive?1:t.responsive,visible:!1!==t.visible}}initializeRow(e){var t;"calc"!==e.type&&((t=document.createElement("div")).classList.add("tabulator-responsive-collapse"),e.modules.responsiveLayout={element:t,open:this.collapseStartOpen},this.collapseStartOpen||(t.style.display="none"))}layoutRow(e){var t=e.getElement();e.modules.responsiveLayout&&(t.appendChild(e.modules.responsiveLayout.element),this.generateCollapsedRowContent(e))}updateColumnVisibility(e,t){!t&&e.modules.responsive&&(e.modules.responsive.visible=e.visible,this.initializeResponsivity())}hideColumn(e){var t=this.hiddenColumns.length;e.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent(),this.collapseHandleColumn&&!t&&this.collapseHandleColumn.show())}showColumn(e){var t;e.show(!1,!0),e.setWidth(e.getWidth()),"collapse"===this.mode&&((t=this.hiddenColumns.indexOf(e))>-1&&this.hiddenColumns.splice(t,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())}update(){for(var e=this,t=!0;t;){let i="fitColumns"==e.table.modules.layout.getMode()?e.table.columnManager.getFlexBaseWidth():e.table.columnManager.getWidth(),s=(e.table.options.headerVisible?e.table.columnManager.element.clientWidth:e.table.element.clientWidth)-i;if(s<0){let i=e.columns[e.index];i?(e.hideColumn(i),e.index++):t=!1}else{let i=e.columns[e.index-1];i&&s>0&&s>=i.getWidth()?(e.showColumn(i),e.index--):t=!1}e.table.rowManager.activeRowsCount||e.table.rowManager.renderEmptyScroll()}}generateCollapsedContent(){var e=this;this.table.rowManager.getDisplayRows().forEach((function(t){e.generateCollapsedRowContent(t)}))}generateCollapsedRowContent(e){var t,i;if(e.modules.responsiveLayout){for(t=e.modules.responsiveLayout.element;t.firstChild;)t.removeChild(t.firstChild);(i=this.collapseFormatter(this.generateCollapsedRowData(e)))&&t.appendChild(i)}}generateCollapsedRowData(e){var t,i=this,s=e.getData(),o=[];return this.hiddenColumns.forEach((function(n){var r=n.getFieldValue(s);if(n.definition.title&&n.field)if(n.modules.format&&i.table.options.responsiveLayoutCollapseUseFormatters){t={value:!1,data:{},getValue:function(){return r},getData:function(){return s},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return n.getComponent()}},o.push({field:n.field,title:n.definition.title,value:n.modules.format.formatter.call(i.table.modules.format,t,n.modules.format.params,(function(e){e()}))})}else o.push({field:n.field,title:n.definition.title,value:r})})),o}formatCollapsedData(e){var t=document.createElement("table");return e.forEach((function(e){var i,s=document.createElement("tr"),o=document.createElement("td"),n=document.createElement("td"),r=document.createElement("strong");o.appendChild(r),this.langBind("columns|"+e.field,(function(t){r.innerHTML=t||e.title})),e.value instanceof Node?((i=document.createElement("div")).appendChild(e.value),n.appendChild(i)):n.innerHTML=e.value,s.appendChild(o),s.appendChild(n),t.appendChild(s)}),this),Object.keys(e).length?t:""}}ne.moduleName="responsiveLayout";class re extends t{constructor(e){super(e),this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null,this.registerTableOption("selectable","highlight"),this.registerTableOption("selectableRangeMode","drag"),this.registerTableOption("selectableRollingSelection",!0),this.registerTableOption("selectablePersistence",!0),this.registerTableOption("selectableCheck",(function(e,t){return!0})),this.registerTableFunction("selectRow",this.selectRows.bind(this)),this.registerTableFunction("deselectRow",this.deselectRows.bind(this)),this.registerTableFunction("toggleSelectRow",this.toggleRow.bind(this)),this.registerTableFunction("getSelectedRows",this.getSelectedRows.bind(this)),this.registerTableFunction("getSelectedData",this.getSelectedData.bind(this)),this.registerComponentFunction("row","select",this.selectRows.bind(this)),this.registerComponentFunction("row","deselect",this.deselectRows.bind(this)),this.registerComponentFunction("row","toggleSelect",this.toggleRow.bind(this)),this.registerComponentFunction("row","isSelected",this.isRowSelected.bind(this))}initialize(){!1!==this.table.options.selectable&&(this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-deleting",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clearSelectionData.bind(this)),this.subscribe("rows-retrieve",this.rowRetrieve.bind(this)),this.table.options.selectable&&!this.table.options.selectablePersistence&&this.subscribe("data-refreshing",this.deselectRows.bind(this)))}rowRetrieve(e,t){return"selected"===e?this.selectedRows:t}rowDeleted(e){this._deselectRow(e,!0)}clearSelectionData(e){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],!0!==e&&this._rowSelectionChanged()}initializeRow(e){var t=this,i=e.getElement(),s=function(){setTimeout((function(){t.selecting=!1}),50),document.body.removeEventListener("mouseup",s)};e.modules.select={selected:!1},t.table.options.selectableCheck.call(this.table,e.getComponent())?(i.classList.add("tabulator-selectable"),i.classList.remove("tabulator-unselectable"),t.table.options.selectable&&"highlight"!=t.table.options.selectable&&("click"===t.table.options.selectableRangeMode?i.addEventListener("click",this.handleComplexRowClick.bind(this,e)):(i.addEventListener("click",(function(i){t.table.modExists("edit")&&t.table.modules.edit.getCurrentCell()||t.table._clearSelection(),t.selecting||t.toggleRow(e)})),i.addEventListener("mousedown",(function(i){if(i.shiftKey)return t.table._clearSelection(),t.selecting=!0,t.selectPrev=[],document.body.addEventListener("mouseup",s),document.body.addEventListener("keyup",s),t.toggleRow(e),!1})),i.addEventListener("mouseenter",(function(i){t.selecting&&(t.table._clearSelection(),t.toggleRow(e),t.selectPrev[1]==e&&t.toggleRow(t.selectPrev[0]))})),i.addEventListener("mouseout",(function(i){t.selecting&&(t.table._clearSelection(),t.selectPrev.unshift(e))}))))):(i.classList.add("tabulator-unselectable"),i.classList.remove("tabulator-selectable"))}handleComplexRowClick(e,t){if(t.shiftKey){this.table._clearSelection(),this.lastClickedRow=this.lastClickedRow||e;var i=this.table.rowManager.getDisplayRowIndex(this.lastClickedRow),s=this.table.rowManager.getDisplayRowIndex(e),o=i<=s?i:s,n=i>=s?i:s,r=this.table.rowManager.getDisplayRows().slice(0).splice(o,n-o+1);t.ctrlKey||t.metaKey?(r.forEach((t=>{t!==this.lastClickedRow&&(!0===this.table.options.selectable||this.isRowSelected(e)||this.selectedRows.lengththis.table.options.selectable&&(r=r.slice(0,this.table.options.selectable)),this.selectRows(r)),this.table._clearSelection()}else t.ctrlKey||t.metaKey?(this.toggleRow(e),this.lastClickedRow=e):(this.deselectRows(void 0,!0),this.selectRows(e),this.lastClickedRow=e)}toggleRow(e){this.table.options.selectableCheck.call(this.table,e.getComponent())&&(e.modules.select&&e.modules.select.selected?this._deselectRow(e):this._selectRow(e))}selectRows(e){var t;switch(typeof e){case"undefined":this.table.rowManager.rows.forEach((e=>{this._selectRow(e,!0,!0)})),this._rowSelectionChanged();break;case"string":(t=this.table.rowManager.findRow(e))?this._selectRow(t,!0,!0):this.table.rowManager.getRows(e).forEach((e=>{this._selectRow(e,!0,!0)})),this._rowSelectionChanged();break;default:Array.isArray(e)?(e.forEach((e=>{this._selectRow(e,!0,!0)})),this._rowSelectionChanged()):this._selectRow(e,!1,!0)}}_selectRow(e,t,i){if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!i&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var s=this.table.rowManager.findRow(e);s?-1==this.selectedRows.indexOf(s)&&(s.getElement().classList.add("tabulator-selected"),s.modules.select||(s.modules.select={}),s.modules.select.selected=!0,s.modules.select.checkboxEl&&(s.modules.select.checkboxEl.checked=!0),this.selectedRows.push(s),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(s,!0),this.dispatchExternal("rowSelected",s.getComponent()),this._rowSelectionChanged(t)):t||console.warn("Selection Error - No such row found, ignoring selection:"+e)}isRowSelected(e){return-1!==this.selectedRows.indexOf(e)}deselectRows(e,t){var i,s=this;if(void 0===e){i=s.selectedRows.length;for(let e=0;e-1&&(o.getElement().classList.remove("tabulator-selected"),o.modules.select||(o.modules.select={}),o.modules.select.selected=!1,o.modules.select.checkboxEl&&(o.modules.select.checkboxEl.checked=!1),s.selectedRows.splice(i,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(o,!1),this.dispatchExternal("rowDeselected",o.getComponent()),s._rowSelectionChanged(t)):t||console.warn("Deselection Error - No such row found, ignoring selection:"+e)}getSelectedData(){var e=[];return this.selectedRows.forEach((function(t){e.push(t.getData())})),e}getSelectedRows(){var e=[];return this.selectedRows.forEach((function(t){e.push(t.getComponent())})),e}_rowSelectionChanged(e){this.headerCheckboxElement&&(0===this.selectedRows.length?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),e||this.dispatchExternal("rowSelectionChanged",this.getSelectedData(),this.getSelectedRows())}registerRowSelectCheckbox(e,t){e._row.modules.select||(e._row.modules.select={}),e._row.modules.select.checkboxEl=t}registerHeaderSelectCheckbox(e){this.headerCheckboxElement=e}childRowSelection(e,t){var i=this.table.modules.dataTree.getChildren(e,!0);if(t)for(let e of i)this._selectRow(e,!0);else for(let e of i)this._deselectRow(e,!0)}}function ae(e,t,i,s,o,n,r){var a=window.DateTime||luxon.DateTime,l=r.format||"dd/MM/yyyy HH:mm:ss",h=r.alignEmptyValues,d=0;if(void 0!==a){if(e="iso"===l?a.fromISO(String(e)):a.fromFormat(String(e),l),t="iso"===l?a.fromISO(String(t)):a.fromFormat(String(t),l),e.isValid){if(t.isValid)return e-t;d=1}else d=t.isValid?-1:0;return("top"===h&&"desc"===n||"bottom"===h&&"asc"===n)&&(d*=-1),d}console.error("Sort Error - 'datetime' sorter is dependant on luxon.js")}re.moduleName="selectRow";var le={number:function(e,t,i,s,o,n,r){var a=r.alignEmptyValues,l=r.decimalSeparator,h=r.thousandSeparator,d=0;if(e=String(e),t=String(t),h&&(e=e.split(h).join(""),t=t.split(h).join("")),l&&(e=e.split(l).join("."),t=t.split(l).join(".")),e=parseFloat(e),t=parseFloat(t),isNaN(e))d=isNaN(t)?0:-1;else{if(!isNaN(t))return e-t;d=1}return("top"===a&&"desc"===n||"bottom"===a&&"asc"===n)&&(d*=-1),d},string:function(e,t,i,s,o,n,r){var a,l=r.alignEmptyValues,h=0;if(e){if(t){switch(typeof r.locale){case"boolean":r.locale&&(a=this.langLocale());break;case"string":a=r.locale}return String(e).toLowerCase().localeCompare(String(t).toLowerCase(),a)}h=1}else h=t?-1:0;return("top"===l&&"desc"===n||"bottom"===l&&"asc"===n)&&(h*=-1),h},date:function(e,t,i,s,o,n,r){return r.format||(r.format="dd/MM/yyyy"),ae.call(this,e,t,i,s,o,n,r)},time:function(e,t,i,s,o,n,r){return r.format||(r.format="HH:mm"),ae.call(this,e,t,i,s,o,n,r)},datetime:ae,boolean:function(e,t,i,s,o,n,r){return(!0===e||"true"===e||"True"===e||1===e?1:0)-(!0===t||"true"===t||"True"===t||1===t?1:0)},array:function(e,t,i,s,o,n,r){var a=r.type||"length",l=r.alignEmptyValues,h=0;function d(e){switch(a){case"length":return e.length;case"sum":return e.reduce((function(e,t){return e+t}));case"max":return Math.max.apply(null,e);case"min":return Math.min.apply(null,e);case"avg":return e.reduce((function(e,t){return e+t}))/e.length}}if(Array.isArray(e)){if(Array.isArray(t))return(e?d(e):0)-(t?d(t):0);l=1}else l=Array.isArray(t)?-1:0;return("top"===l&&"desc"===n||"bottom"===l&&"asc"===n)&&(h*=-1),h},exists:function(e,t,i,s,o,n,r){return(void 0===e?0:1)-(void 0===t?0:1)},alphanum:function(e,t,i,s,o,n,r){var a,l,h,d,c,u=0,m=/(\d+)|(\D+)/g,p=/\d/,g=r.alignEmptyValues,b=0;if(e||0===e){if(t||0===t){if(isFinite(e)&&isFinite(t))return e-t;if((a=String(e).toLowerCase())===(l=String(t).toLowerCase()))return 0;if(!p.test(a)||!p.test(l))return a>l?1:-1;for(a=a.match(m),l=l.match(m),c=a.length>l.length?l.length:a.length;ud?1:-1;return a.length>l.length}b=1}else b=t||0===t?-1:0;return("top"===g&&"desc"===n||"bottom"===g&&"asc"===n)&&(b*=-1),b}};class he extends t{constructor(e){super(e),this.sortList=[],this.changed=!1,this.registerTableOption("sortMode","local"),this.registerTableOption("initialSort",!1),this.registerTableOption("columnHeaderSortMulti",!0),this.registerTableOption("sortOrderReverse",!1),this.registerTableOption("headerSortElement","
"),this.registerColumnOption("sorter"),this.registerColumnOption("sorterParams"),this.registerColumnOption("headerSort",!0),this.registerColumnOption("headerSortStartingDir"),this.registerColumnOption("headerSortTristate")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),this.registerDataHandler(this.sort.bind(this),20),this.registerTableFunction("setSort",this.userSetSort.bind(this)),this.registerTableFunction("getSorters",this.getSort.bind(this)),this.registerTableFunction("clearSort",this.clearSort.bind(this)),"remote"===this.table.options.sortMode&&this.subscribe("data-params",this.remoteSortParams.bind(this))}tableBuilt(){this.table.options.initialSort&&this.setSort(this.table.options.initialSort)}remoteSortParams(e,t,i,s){var o=this.getSort();return o.forEach((e=>{delete e.column})),s.sort=o,s}userSetSort(e,t){this.setSort(e,t),this.refreshSort()}clearSort(){this.clear(),this.refreshSort()}initializeColumn(e){var t,i,s=!1;switch(typeof e.definition.sorter){case"string":he.sorters[e.definition.sorter]?s=he.sorters[e.definition.sorter]:console.warn("Sort Error - No such sorter found: ",e.definition.sorter);break;case"function":s=e.definition.sorter}e.modules.sort={sorter:s,dir:"none",params:e.definition.sorterParams||{},startingDir:e.definition.headerSortStartingDir||"asc",tristate:e.definition.headerSortTristate},!1!==e.definition.headerSort&&((t=e.getElement()).classList.add("tabulator-sortable"),(i=document.createElement("div")).classList.add("tabulator-col-sorter"),"object"==typeof this.table.options.headerSortElement?i.appendChild(this.table.options.headerSortElement):i.innerHTML=this.table.options.headerSortElement,e.titleHolderElement.appendChild(i),e.modules.sort.element=i,t.addEventListener("click",(t=>{var i="",s=[],o=!1;if(e.modules.sort){if(e.modules.sort.tristate)i="none"==e.modules.sort.dir?e.modules.sort.startingDir:e.modules.sort.dir==e.modules.sort.startingDir?"asc"==e.modules.sort.dir?"desc":"asc":"none";else switch(e.modules.sort.dir){case"asc":i="desc";break;case"desc":i="asc";break;default:i=e.modules.sort.startingDir}this.table.options.columnHeaderSortMulti&&(t.shiftKey||t.ctrlKey)?((o=(s=this.getSort()).findIndex((t=>t.field===e.getField())))>-1?(s[o].dir=i,o!=s.length-1&&(o=s.splice(o,1)[0],"none"!=i&&s.push(o))):"none"!=i&&s.push({column:e,dir:i}),this.setSort(s)):"none"==i?this.clear():this.setSort(e,i),this.refreshSort()}})))}refreshSort(){"remote"===this.table.options.sortMode?this.reloadData():this.refreshData(!0)}hasChanged(){var e=this.changed;return this.changed=!1,e}getSort(){var e=[];return this.sortList.forEach((function(t){t.column&&e.push({column:t.column.getComponent(),field:t.column.getField(),dir:t.dir})})),e}setSort(e,t){var i=this,s=[];Array.isArray(e)||(e=[{column:e,dir:t}]),e.forEach((function(e){var t;(t=i.table.columnManager.findColumn(e.column))?(e.column=t,s.push(e),i.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",e.column)})),i.sortList=s,this.dispatch("sort-changed")}clear(){this.setSort([])}findSorter(e){var t,i=this.table.rowManager.activeRows[0],s="string";if(i&&(i=i.getData(),e.getField()))switch(typeof(t=e.getFieldValue(i))){case"undefined":s="string";break;case"boolean":s="boolean";break;default:isNaN(t)||""===t?t.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(s="alphanum"):s="number"}return he.sorters[s]}sort(e){var t=this,i=this.table.options.sortOrderReverse?t.sortList.slice().reverse():t.sortList,s=[],o=[];return this.subscribedExternal("dataSorting")&&this.dispatchExternal("dataSorting",t.getSort()),t.clearColumnHeaders(),"remote"!==this.table.options.sortMode?(i.forEach((function(e,i){var o=e.column.modules.sort;e.column&&o&&(o.sorter||(o.sorter=t.findSorter(e.column)),e.params="function"==typeof o.params?o.params(e.column.getComponent(),e.dir):o.params,s.push(e)),t.setColumnHeader(e.column,e.dir)})),s.length&&t._sortItems(e,s)):i.forEach((function(e,i){t.setColumnHeader(e.column,e.dir)})),this.subscribedExternal("dataSorted")&&(e.forEach((e=>{o.push(e.getComponent())})),this.dispatchExternal("dataSorted",t.getSort(),o)),e}clearColumnHeaders(){this.table.columnManager.getRealColumns().forEach((function(e){e.modules.sort&&(e.modules.sort.dir="none",e.getElement().setAttribute("aria-sort","none"))}))}setColumnHeader(e,t){e.modules.sort.dir=t,e.getElement().setAttribute("aria-sort",t)}_sortItems(e,t){var i=t.length-1;e.sort(((e,s)=>{for(var o,n=i;n>=0;n--){let i=t[n];if(0!==(o=this._sortRow(e,s,i.column,i.dir,i.params)))break}return o}))}_sortRow(e,t,i,s,o){var n,r,a="asc"==s?e:t,l="asc"==s?t:e;return e=void 0!==(e=i.getFieldValue(a.getData()))?e:"",t=void 0!==(t=i.getFieldValue(l.getData()))?t:"",n=a.getComponent(),r=l.getComponent(),i.modules.sort.sorter.call(this,e,t,n,r,i.getComponent(),s,o)}}he.moduleName="sort",he.sorters=le;var de={integer:function(e,t,i){return""===t||null==t||"number"==typeof(t=Number(t))&&isFinite(t)&&Math.floor(t)===t},float:function(e,t,i){return""===t||null==t||"number"==typeof(t=Number(t))&&isFinite(t)&&t%1!=0},numeric:function(e,t,i){return""===t||null==t||!isNaN(t)},string:function(e,t,i){return""===t||null==t||isNaN(t)},max:function(e,t,i){return""===t||null==t||parseFloat(t)<=i},min:function(e,t,i){return""===t||null==t||parseFloat(t)>=i},starts:function(e,t,i){return""===t||null==t||String(t).toLowerCase().startsWith(String(i).toLowerCase())},ends:function(e,t,i){return""===t||null==t||String(t).toLowerCase().endsWith(String(i).toLowerCase())},minLength:function(e,t,i){return""===t||null==t||String(t).length>=i},maxLength:function(e,t,i){return""===t||null==t||String(t).length<=i},in:function(e,t,i){return""===t||null==t||("string"==typeof i&&(i=i.split("|")),""===t||i.indexOf(t)>-1)},regex:function(e,t,i){return""===t||null==t||new RegExp(i).test(t)},unique:function(e,t,i){if(""===t||null==t)return!0;var s=!0,o=e.getData(),n=e.getColumn()._getSelf();return this.table.rowManager.rows.forEach((function(e){var i=e.getData();i!==o&&t==n.getFieldValue(i)&&(s=!1)})),s},required:function(e,t,i){return""!==t&&null!=t}};class ce extends t{constructor(e){super(e),this.invalidCells=[],this.registerTableOption("validationMode","blocking"),this.registerColumnOption("validator"),this.registerTableFunction("getInvalidCells",this.getInvalidCells.bind(this)),this.registerTableFunction("clearCellValidation",this.userClearCellValidation.bind(this)),this.registerTableFunction("validate",this.userValidate.bind(this)),this.registerComponentFunction("cell","isValid",this.cellIsValid.bind(this)),this.registerComponentFunction("cell","clearValidation",this.clearValidation.bind(this)),this.registerComponentFunction("cell","validate",this.cellValidate.bind(this)),this.registerComponentFunction("column","validate",this.columnValidate.bind(this)),this.registerComponentFunction("row","validate",this.rowValidate.bind(this))}initialize(){this.subscribe("cell-delete",this.clearValidation.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this))}cellIsValid(e){return!e.modules.validate||!e.modules.validate.invalid}cellValidate(e){return this.validate(e.column.modules.validate,e,e.getValue())}columnValidate(e){var t=[];return e.cells.forEach((e=>{this.cellValidate(e)||t.push(e.getComponent())})),!t.length||t}rowValidate(e){var t=[];return e.cells.forEach((e=>{this.cellValidate(e)||t.push(e.getComponent())})),!t.length||t}userClearCellValidation(e){e||(e=this.getInvalidCells()),Array.isArray(e)||(e=[e]),e.forEach((e=>{this.clearValidation(e._getSelf())}))}userValidate(e){var t=[];return this.table.rowManager.rows.forEach((e=>{var i=(e=e.getComponent()).validate();!0!==i&&(t=t.concat(i))})),!t.length||t}initializeColumnCheck(e){void 0!==e.definition.validator&&this.initializeColumn(e)}initializeColumn(e){var t,i=this,s=[];e.definition.validator&&(Array.isArray(e.definition.validator)?e.definition.validator.forEach((e=>{(t=i._extractValidator(e))&&s.push(t)})):(t=this._extractValidator(e.definition.validator))&&s.push(t),e.modules.validate=!!s.length&&s)}_extractValidator(e){var t,i,s;switch(typeof e){case"string":return(s=e.indexOf(":"))>-1?(t=e.substring(0,s),i=e.substring(s+1)):t=e,this._buildValidator(t,i);case"function":return this._buildValidator(e);case"object":return this._buildValidator(e.type,e.parameters)}}_buildValidator(e,t){var i="function"==typeof e?e:ce.validators[e];return i?{type:"function"==typeof e?"function":e,func:i,params:t}:(console.warn("Validator Setup Error - No matching validator found:",e),!1)}validate(e,t,i){var s=this,o=[],n=this.invalidCells.indexOf(t);return e&&e.forEach((e=>{e.func.call(s,t.getComponent(),i,e.params)||o.push({type:e.type,parameters:e.params})})),o=!o.length||o,t.modules.validate||(t.modules.validate={}),!0===o?(t.modules.validate.invalid=!1,t.getElement().classList.remove("tabulator-validation-fail"),n>-1&&this.invalidCells.splice(n,1)):(t.modules.validate.invalid=!0,"manual"!==this.table.options.validationMode&&t.getElement().classList.add("tabulator-validation-fail"),-1==n&&this.invalidCells.push(t)),o}getInvalidCells(){var e=[];return this.invalidCells.forEach((t=>{e.push(t.getComponent())})),e}clearValidation(e){var t;e.modules.validate&&e.modules.validate.invalid&&(e.getElement().classList.remove("tabulator-validation-fail"),e.modules.validate.invalid=!1,(t=this.invalidCells.indexOf(e))>-1&&this.invalidCells.splice(t,1))}}ce.moduleName="validate",ce.validators=de;var ue=Object.freeze({__proto__:null,AccessorModule:o,AjaxModule:h,ClipboardModule:d,ColumnCalcsModule:C,DataTreeModule:E,DownloadModule:R,EditModule:T,ExportModule:D,FilterModule:F,FormatModule:z,FrozenColumnsModule:H,FrozenRowsModule:A,GroupRowsModule:B,HistoryModule:N,HtmlTableImportModule:V,ImportModule:W,InteractionModule:j,KeybindingsModule:G,MenuModule:U,MoveColumnsModule:X,MoveRowsModule:q,MutatorModule:K,PageModule:J,PersistenceModule:Q,PrintModule:ee,ReactiveDataModule:te,ResizeColumnsModule:ie,ResizeRowsModule:se,ResizeTableModule:oe,ResponsiveLayoutModule:ne,SelectRowModule:re,SortModule:he,ValidateModule:ce});class me{constructor(e,t,i={}){this.table=e,this.msgType=t,this.registeredDefaults=Object.assign({},i)}register(e,t){this.registeredDefaults[e]=t}generate(e,t={}){var i=Object.assign({},this.registeredDefaults);if(Object.assign(i,e),!1!==t.debugInvalidOptions||this.table.options.debugInvalidOptions)for(var s in t)i.hasOwnProperty(s)||console.warn("Invalid "+this.msgType+" option:",s);for(var s in i)s in t?i[s]=t[s]:Array.isArray(i[s])?i[s]=Object.assign([],i[s]):"object"==typeof i[s]&&null!==i[s]?i[s]=Object.assign({},i[s]):void 0===i[s]&&delete i[s];return i}}class pe extends e{constructor(e){super(e),this.elementVertical=e.rowManager.element,this.elementHorizontal=e.columnManager.element,this.tableElement=e.rowManager.tableElement,this.verticalFillMode="fit"}initialize(){}clearRows(){}clearColumns(){}reinitializeColumnWidths(e){}renderRows(){}renderColumns(){}rerenderRows(e){e&&e()}rerenderColumns(e,t){}renderRowCells(e){}rerenderRowCells(e,t){}scrollColumns(e,t){}scrollRows(e,t){}resize(){}scrollToRow(e){}scrollToRowNearestTop(e){}visibleRows(e){return[]}rows(){return this.table.rowManager.getDisplayRows()}styleRow(e,t){var i=e.getElement();t%2?(i.classList.add("tabulator-row-even"),i.classList.remove("tabulator-row-odd")):(i.classList.add("tabulator-row-odd"),i.classList.remove("tabulator-row-even"))}clear(){this.clearRows(),this.clearColumns()}render(){this.renderRows(),this.renderColumns()}rerender(e){this.rerenderRows(),this.rerenderColumns()}scrollToRowPosition(e,t,i){var o=this.rows().indexOf(e),n=e.getElement(),r=0;return new Promise(((a,l)=>{if(o>-1){if(void 0===i&&(i=this.table.options.scrollToRowIfVisible),!i&&s.elVisible(n)&&(r=s.elOffset(n).top-s.elOffset(this.elementVertical).top)>0&&r{e.element.appendChild(t.getElement()),t.cellRendered()}))}reinitializeColumnWidths(e){e.forEach((function(e){e.reinitializeWidth()}))}}class be extends pe{constructor(e){super(e),this.leftCol=0,this.rightCol=0,this.scrollLeft=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0,this.fitDataColAvg=0,this.windowBuffer=200,this.visibleRows=null,this.initialized=!1,this.isFitData=!1,this.columns=[]}initialize(){this.compatibilityCheck(),this.layoutCheck(),this.vertScrollListen()}compatibilityCheck(){var e=this.options("columns"),t=!0;return"fitDataTable"==this.options("layout")&&(console.warn("Horizontal Virtual DOM is not compatible with fitDataTable layout mode"),t=!1),this.options("responsiveLayout")&&(console.warn("Horizontal Virtual DOM is not compatible with responsive columns"),t=!1),this.options("rtl")&&(console.warn("Horizontal Virtual DOM is not currently compatible with RTL text direction"),t=!1),e&&e.find((e=>e.frozen))&&(console.warn("Horizontal Virtual DOM is not compatible with frozen columns"),t=!1),t}layoutCheck(){this.isFitData=this.options("layout").startsWith("fitData")}vertScrollListen(){this.subscribe("scroll-vertical",this.clearVisRowCache.bind(this)),this.subscribe("data-refreshed",this.clearVisRowCache.bind(this))}clearVisRowCache(){this.visibleRows=null}renderColumns(e,t){this.dataChange()}scrollColumns(e,t){this.scrollLeft!=e&&(this.scrollLeft=e,this.scroll(e-(this.vDomScrollPosLeft+this.windowBuffer)))}calcWindowBuffer(){var e=this.elementVertical.clientWidth;this.table.columnManager.columnsByIndex.forEach((t=>{if(t.visible){var i=t.getWidth();i>e&&(e=i)}})),this.windowBuffer=2*e}rerenderColumns(e,t){var i={cols:this.columns,leftCol:this.leftCol,rightCol:this.rightCol},s=0;e&&!this.initialized||(this.clear(),this.calcWindowBuffer(),this.scrollLeft=this.elementVertical.scrollLeft,this.vDomScrollPosLeft=this.scrollLeft-this.windowBuffer,this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,this.table.columnManager.columnsByIndex.forEach((e=>{var t={};if(e.visible){var i=e.getWidth();t.leftPos=s,t.rightPos=s+i,t.width=i,this.isFitData&&(t.fitDataCheck=!e.modules.vdomHoz||e.modules.vdomHoz.fitDataCheck),s+i>this.vDomScrollPosLeft&&s{e.element.appendChild(t.getElement()),t.cellRendered()}))}rerenderRowCells(e,t){this.reinitializeRow(e,t)}reinitializeColumnWidths(e){for(let e=this.leftCol;e<=this.rightCol;e++)this.columns[e].reinitializeWidth()}deinitialize(){this.initialized=!1}clear(){this.columns=[],this.leftCol=-1,this.rightCol=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0}dataChange(){var e,t,i=!1,s=0;if(this.isFitData){if(this.table.columnManager.columnsByIndex.forEach((e=>{!e.definition.width&&e.visible&&(i=!0)})),i&&i&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,t=this.chain("rows-sample",[1],[],(()=>this.table.rowManager.getDisplayRows()))[0])){e=t.getElement(),t.generateCells(),this.tableElement.appendChild(e);for(s=0;s{e!==this.columns[i]&&(t=!1)})),!t)}reinitializeRows(){this.getVisibleRows().forEach((e=>{this.reinitializeRow(e,!0)}))}getVisibleRows(){return this.visibleRows||(this.visibleRows=this.table.rowManager.getVisibleRows()),this.visibleRows}scroll(e){this.vDomScrollPosLeft+=e,this.vDomScrollPosRight+=e,Math.abs(e)>this.windowBuffer/2?this.rerenderColumns():e>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())}colPositionAdjust(e,t,i){for(let s=e;s{if("group"!==e.type){var i=e.getCell(t);e.getElement().appendChild(i.getElement()),i.cellRendered()}})),this.fitDataColActualWidthCheck(t),this.rightCol++,this.rightCol>=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=t.getWidth()}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}addColLeft(){for(var e=!1;;){let t=this.columns[this.leftCol-1];if(!t)break;if(!(t.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft))break;{e=!0,this.getVisibleRows().forEach((e=>{if("group"!==e.type){var i=e.getCell(t);e.getElement().prepend(i.getElement()),i.cellRendered()}})),this.leftCol--,this.leftCol<=0?this.vDomPadLeft=0:this.vDomPadLeft-=t.getWidth();let i=this.fitDataColActualWidthCheck(t);i&&(this.scrollLeft=this.elementVertical.scrollLeft=this.elementVertical.scrollLeft+i,this.vDomPadRight-=i)}}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}removeColRight(){for(var e=!1;;){let t=this.columns[this.rightCol];if(!t)break;if(!(t.modules.vdomHoz.leftPos>this.vDomScrollPosRight))break;e=!0,this.getVisibleRows().forEach((e=>{if("group"!==e.type){var i=e.getCell(t);try{e.getElement().removeChild(i.getElement())}catch(e){console.warn("Could not removeColRight",e.message)}}})),this.vDomPadRight+=t.getWidth(),this.rightCol--}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}removeColLeft(){for(var e=!1;;){let t=this.columns[this.leftCol];if(!t)break;if(!(t.modules.vdomHoz.rightPos{if("group"!==e.type){var i=e.getCell(t);try{e.getElement().removeChild(i.getElement())}catch(e){console.warn("Could not removeColLeft",e.message)}}})),this.vDomPadLeft+=t.getWidth(),this.leftCol++}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}fitDataColActualWidthCheck(e){var t,i;return e.modules.vdomHoz.fitDataCheck&&(e.reinitializeWidth(),(i=(t=e.getWidth())-e.modules.vdomHoz.width)&&(e.modules.vdomHoz.rightPos+=i,e.modules.vdomHoz.width=t,this.colPositionAdjust(this.columns.indexOf(e)+1,this.columns.length,i)),e.modules.vdomHoz.fitDataCheck=!1),i}initializeRow(e){if("group"!==e.type){e.modules.vdomHoz={leftCol:this.leftCol,rightCol:this.rightCol};for(let t=this.leftCol;t<=this.rightCol;t++){let i=this.columns[t];if(i&&i.visible){let t=e.getCell(i);e.getElement().appendChild(t.getElement()),t.cellRendered()}}}}reinitializeRow(e,t){if("group"!==e.type&&(t||!e.modules.vdomHoz||e.modules.vdomHoz.leftCol!==this.leftCol||e.modules.vdomHoz.rightCol!==this.rightCol)){for(var i=e.getElement();i.firstChild;)i.removeChild(i.firstChild);this.initializeRow(e)}}}class fe extends e{constructor(e){super(e),this.blockHozScrollEvent=!1,this.headersElement=null,this.element=null,this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.scrollLeft=0,this.optionsList=new me(this.table,"column definition",g),this.renderer=null}initialize(){this.initializeRenderer(),this.headersElement=this.createHeadersElement(),this.element=this.createHeaderElement(),this.element.insertBefore(this.headersElement,this.element.firstChild),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this))}initializeRenderer(){var e,t={virtual:be,basic:ge};(e="string"==typeof this.table.options.renderHorizontal?t[this.table.options.renderHorizontal]:this.table.options.renderHorizontal)?(this.renderer=new e(this.table,this.element,this.tableElement),this.renderer.initialize()):console.error("Unable to find matching renderer:",table.options.renderHorizontal)}createHeadersElement(){var e=document.createElement("div");return e.classList.add("tabulator-headers"),e.setAttribute("role","row"),e}createHeaderElement(){var e=document.createElement("div");return e.classList.add("tabulator-header"),e.setAttribute("role","rowgroup"),this.table.options.headerVisible||e.classList.add("tabulator-header-hidden"),e}getElement(){return this.element}getHeadersElement(){return this.headersElement}scrollHorizontal(e){var t=0,i=this.element.scrollWidth-this.table.element.clientWidth;this.element.scrollLeft=e,e>i?(t=e-i,this.element.style.marginLeft=-t+"px"):this.element.style.marginLeft=0,this.scrollLeft=e,this.renderer.scrollColumns(e)}generateColumnsFromRowData(e){var t,i,s=[],o=this.table.options.autoColumnsDefinitions;if(e&&e.length){for(var n in t=e[0]){let e={field:n,title:n},o=t[n];switch(typeof o){case"undefined":i="string";break;case"boolean":i="boolean";break;case"object":i=Array.isArray(o)?"array":"string";break;default:i=isNaN(o)||""===o?o.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?"alphanum":"string":"number"}e.sorter=i,s.push(e)}if(o)switch(typeof o){case"function":this.table.options.columns=o.call(this.table,s);break;case"object":Array.isArray(o)?s.forEach((e=>{var t=o.find((t=>t.field===e.field));t&&Object.assign(e,t)})):s.forEach((e=>{o[e.field]&&Object.assign(e,o[e.field])})),this.table.options.columns=s}else this.table.options.columns=s;this.setColumns(this.table.options.columns)}}setColumns(e,t){for(;this.headersElement.firstChild;)this.headersElement.removeChild(this.headersElement.firstChild);this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.dispatch("columns-loading"),e.forEach(((e,t)=>{this._addColumn(e)})),this._reIndexColumns(),this.dispatch("columns-loaded"),this.renderer.rerenderColumns(!1,!0),this.redraw(!0)}_addColumn(e,t,i){var s=new b(e,this),o=s.getElement(),n=i?this.findColumnIndex(i):i;if(i&&n>-1){var r=i.getTopColumn(),a=this.columns.indexOf(r),l=r.getElement();t?(this.columns.splice(a,0,s),l.parentNode.insertBefore(o,l)):(this.columns.splice(a+1,0,s),l.parentNode.insertBefore(o,l.nextSibling))}else t?(this.columns.unshift(s),this.headersElement.insertBefore(s.getElement(),this.headersElement.firstChild)):(this.columns.push(s),this.headersElement.appendChild(s.getElement()));return s.columnRendered(),s}registerColumnField(e){e.definition.field&&(this.columnsByField[e.definition.field]=e)}registerColumnPosition(e){this.columnsByIndex.push(e)}_reIndexColumns(){this.columnsByIndex=[],this.columns.forEach((function(e){e.reRegisterPosition()}))}verticalAlignHeaders(){var e=0;this.columns.forEach((t=>{var i;t.clearVerticalAlign(),(i=t.getHeight())>e&&(e=i)})),this.columns.forEach((t=>{t.verticalAlign(this.table.options.columnHeaderVertAlign,e)})),this.table.rowManager.adjustTableSize()}findColumn(e){if("object"!=typeof e)return this.columnsByField[e]||!1;if(e instanceof b)return e;if(e instanceof p)return e._getSelf()||!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){return this.columns.find((t=>t.element===e))||!1}return!1}getColumnByField(e){return this.columnsByField[e]}getColumnsByFieldRoot(e){var t=[];return Object.keys(this.columnsByField).forEach((i=>{i.split(".")[0]===e&&t.push(this.columnsByField[i])})),t}getColumnByIndex(e){return this.columnsByIndex[e]}getFirstVisibleColumn(e){return(e=this.columnsByIndex.findIndex((e=>e.visible)))>-1&&this.columnsByIndex[e]}getColumns(){return this.columns}findColumnIndex(e){return this.columnsByIndex.findIndex((t=>e===t))}getRealColumns(){return this.columnsByIndex}traverse(e){this.columnsByIndex.forEach(((t,i)=>{e(t,i)}))}getDefinitions(e){var t=[];return this.columnsByIndex.forEach((i=>{(!e||e&&i.visible)&&t.push(i.getDefinition())})),t}getDefinitionTree(){var e=[];return this.columns.forEach((t=>{e.push(t.getDefinition(!0))})),e}getComponents(e){var t=[];return(e?this.columns:this.columnsByIndex).forEach((e=>{t.push(e.getComponent())})),t}getWidth(){var e=0;return this.columnsByIndex.forEach((t=>{t.visible&&(e+=t.getWidth())})),e}moveColumn(e,t,i){this.moveColumnActual(e,t,i),t.element.parentNode.insertBefore(e.element,t.element),i&&t.element.parentNode.insertBefore(t.element,e.element),this.verticalAlignHeaders(),this.table.rowManager.reinitialize()}moveColumnActual(e,t,i){e.parent.isGroup?this._moveColumnInArray(e.parent.columns,e,t,i):this._moveColumnInArray(this.columns,e,t,i),this._moveColumnInArray(this.columnsByIndex,e,t,i,!0),this.renderer.rerenderColumns(!0),this.dispatch("column-moved",e,t,i),this.subscribedExternal("columnMoved")&&this.dispatchExternal("columnMoved",e.getComponent(),this.table.columnManager.getComponents())}_moveColumnInArray(e,t,i,s,o){var n,r=e.indexOf(t);r>-1&&(e.splice(r,1),(n=e.indexOf(i))>-1?s&&(n+=1):n=r,e.splice(n,0,t),o&&(this.chain("column-moving-rows",[t,i,s],null,[])||[]).concat(this.table.rowManager.rows).forEach((function(e){if(e.cells.length){var t=e.cells.splice(r,1)[0];e.cells.splice(n,0,t)}})))}scrollToColumn(e,t,i){var s=0,o=0,n=0,r=e.getElement();return new Promise(((a,l)=>{if(void 0===t&&(t=this.table.options.scrollToColumnPosition),void 0===i&&(i=this.table.options.scrollToColumnIfVisible),e.visible){switch(t){case"middle":case"center":n=-this.element.clientWidth/2;break;case"right":n=r.clientWidth-this.headersElement.clientWidth}if(!i&&(o=r.offsetLeft)>0&&o+r.offsetWidth{t.push(i.generateCell(e))})),t}getFlexBaseWidth(){var e=this.table.element.clientWidth,t=0;return this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(e-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),this.columnsByIndex.forEach((function(i){var s,o,n;i.visible&&(s=i.definition.width||0,o=parseInt(i.minWidth),n="string"==typeof s?s.indexOf("%")>-1?e/100*parseInt(s):parseInt(s):s,t+=n>o?n:o)})),t}addColumn(e,t,i){return new Promise(((s,o)=>{var n=this._addColumn(e,t,i);this._reIndexColumns(),this.dispatch("column-add",e,t,i),"fitColumns"!=this.layoutMode()&&n.reinitializeWidth(),this.redraw(!0),this.table.rowManager.reinitialize(),this.renderer.rerenderColumns(),s(n)}))}deregisterColumn(e){var t,i=e.getField();i&&delete this.columnsByField[i],(t=this.columnsByIndex.indexOf(e))>-1&&this.columnsByIndex.splice(t,1),(t=this.columns.indexOf(e))>-1&&this.columns.splice(t,1),this.verticalAlignHeaders(),this.redraw()}redraw(e){s.elVisible(this.element)&&this.verticalAlignHeaders(),e&&(this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),this.confirm("table-redrawing",e)||this.layoutRefresh(),this.dispatch("table-redraw",e),this.table.footerManager.redraw()}}class ve extends pe{constructor(e){super(e),this.verticalFillMode="fill",this.scrollTop=0,this.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0}clearRows(){for(var e=this.tableElement;e.firstChild;)e.removeChild(e.firstChild);e.scrollTop=0,e.scrollLeft=0,e.style.minWidth="",e.style.minHeight="",e.style.display="",e.style.visibility=""}renderRows(){var e=this.tableElement,t=!0;this.rows().forEach(((i,s)=>{this.styleRow(i,s),e.appendChild(i.getElement()),i.initialize(!0),"group"!==i.type&&(t=!1)})),e.style.minWidth=t?this.table.columnManager.getWidth()+"px":""}rerenderRows(e){this.clearRows(),this.renderRows(),e&&e()}scrollToRowNearestTop(e){var t=s.elOffset(e.getElement()).top;return!(Math.abs(this.elementVertical.scrollTop-t)>Math.abs(this.elementVertical.scrollTop+this.elementVertical.clientHeight-t))}scrollToRow(e){var t=e.getElement();this.elementVertical.scrollTop=s.elOffset(t).top-s.elOffset(this.elementVertical).top+this.elementVertical.scrollTop}visibleRows(e){return this.rows()}}class we extends pe{constructor(e){super(e),this.verticalFillMode="fill",this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[]}clearRows(){for(var e=this.tableElement;e.firstChild;)e.removeChild(e.firstChild);e.style.paddingTop="",e.style.paddingBottom="",e.style.minHeight="",e.style.display="",e.style.visibility="",this.elementVertical.scrollTop=0,this.elementVertical.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0,this.vDomTop=0,this.vDomBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0}renderRows(){this._virtualRenderFill()}rerenderRows(e){for(var t=this.elementVertical.scrollTop,i=!1,s=!1,o=this.table.rowManager.scrollLeft,n=this.rows(),r=this.vDomTop;r<=this.vDomBottom;r++)if(n[r]){var a=t-n[r].getElement().offsetTop;if(!(!1===s||Math.abs(a){e.deinitializeHeight()})),e&&e(),this._virtualRenderFill(!1===i?this.rows.length-1:i,!0,s||0),this.scrollColumns(o)}scrollColumns(e){this.table.rowManager.scrollHorizontal(e)}scrollRows(e,t){var i=e-this.vDomScrollPosTop,s=e-this.vDomScrollPosBottom,o=2*this.vDomWindowBuffer,n=this.rows();if(this.scrollTop=e,-i>o||s>o){var r=this.table.rowManager.scrollLeft;this._virtualRenderFill(Math.floor(this.elementVertical.scrollTop/this.elementVertical.scrollHeight*n.length)),this.scrollColumns(r)}else t?(i<0&&this._addTopRow(n,-i),s<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(n,-s):this.vDomScrollPosBottom=this.scrollTop)):(s>=0&&this._addBottomRow(n,s),i>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(n,i):this.vDomScrollPosTop=this.scrollTop))}resize(){this.vDomWindowBuffer=this.table.options.renderVerticalBuffer||this.elementVertical.clientHeight}scrollToRowNearestTop(e){var t=this.rows().indexOf(e);return!(Math.abs(this.vDomTop-t)>Math.abs(this.vDomBottom-t))}scrollToRow(e){var t=this.rows().indexOf(e);t>-1&&this._virtualRenderFill(t,!0)}visibleRows(e){var t=this.elementVertical.scrollTop,i=this.elementVertical.clientHeight+t,s=!1,o=0,n=0,r=this.rows();if(e)o=this.vDomTop,n=this.vDomBottom;else for(var a=this.vDomTop;a<=this.vDomBottom;a++)if(r[a])if(s){if(!(i-r[a].getElement().offsetTop>=0))break;n=a}else if(t-r[a].getElement().offsetTop>=0)o=a;else{if(s=!0,!(i-r[a].getElement().offsetTop>=0))break;n=a}return r.slice(o,n+1)}_virtualRenderFill(e,t,i){var o=this.tableElement,n=this.elementVertical,r=0,a=0,l=0,h=0,d=0,c=this.rows(),u=c.length,m=this.elementVertical.clientHeight;if(i=i||0,e=e||0){for(;o.firstChild;)o.removeChild(o.firstChild);(l=(u-e+1)*this.vDomRowHeight)this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*p),this.vDomBottom++,d++}e?(this.vDomTopPad=t?this.vDomRowHeight*this.vDomTop+i:this.scrollTop-h,this.vDomBottomPad=this.vDomBottom==u-1?0:Math.max(this.vDomScrollHeight-this.vDomTopPad-a-h,0)):(this.vDomTopPad=0,this.vDomRowHeight=Math.floor((a+h)/d),this.vDomBottomPad=this.vDomRowHeight*(u-this.vDomBottom-1),this.vDomScrollHeight=h+a+this.vDomBottomPad-m),o.style.paddingTop=this.vDomTopPad+"px",o.style.paddingBottom=this.vDomBottomPad+"px",t&&(this.scrollTop=this.vDomTopPad+h+i-(this.elementVertical.scrollWidth>this.elementVertical.clientWidth?this.elementVertical.offsetHeight-m:0)),this.scrollTop=Math.min(this.scrollTop,this.elementVertical.scrollHeight-m),this.elementVertical.scrollWidth>this.elementVertical.offsetWidth&&t&&(this.scrollTop+=this.elementVertical.offsetHeight-m),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,n.scrollTop=this.scrollTop,this.dispatch("render-virtual-fill")}}_addTopRow(e,t){for(var i=this.tableElement,s=[],o=0,n=this.vDomTop-1,r=0;this.vDomTop;){let a,l,h=e[n];if(!(h&&r=a))break;this.styleRow(h,n),i.insertBefore(h.getElement(),i.firstChild),h.initialized&&h.heightInitialized||s.push(h),h.initialize(),l||(a=h.getElement().offsetHeight,a>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*a)),t-=a,o+=a,this.vDomTop--,n--,r++}for(let e of s)e.clearCellHeight();this._quickNormalizeRowHeight(s),o&&(this.vDomTopPad-=o,this.vDomTopPad<0&&(this.vDomTopPad=n*this.vDomRowHeight),n<1&&(this.vDomTopPad=0),i.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=o)}_removeTopRow(e,t){for(var i=[],s=0,o=0;;){let n,r=e[this.vDomTop];if(!(r&&o=n))break;this.vDomTop++,t-=n,s+=n,i.push(r),o++}for(let e of i){let t=e.getElement();t.parentNode&&t.parentNode.removeChild(t)}s&&(this.vDomTopPad+=s,this.tableElement.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?s:s+this.vDomWindowBuffer)}_addBottomRow(e,t){for(var i=this.tableElement,s=[],o=0,n=this.vDomBottom+1,r=0;;){let a,l,h=e[n];if(!(h&&r=a))break;this.styleRow(h,n),i.appendChild(h.getElement()),h.initialized&&h.heightInitialized||s.push(h),h.initialize(),l||(a=h.getElement().offsetHeight,a>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*a)),t-=a,o+=a,this.vDomBottom++,n++,r++}for(let e of s)e.clearCellHeight();this._quickNormalizeRowHeight(s),o&&(this.vDomBottomPad-=o,(this.vDomBottomPad<0||n==e.length-1)&&(this.vDomBottomPad=0),i.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=o)}_removeBottomRow(e,t){for(var i=[],s=0,o=0;;){let n,r=e[this.vDomBottom];if(!(r&&o=n))break;this.vDomBottom--,t-=n,s+=n,i.push(r),o++}for(let e of i){let t=e.getElement();t.parentNode&&t.parentNode.removeChild(t)}s&&(this.vDomBottomPad+=s,this.vDomBottomPad<0&&(this.vDomBottomPad=0),this.tableElement.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=s)}_quickNormalizeRowHeight(e){for(let t of e)t.calcHeight();for(let t of e)t.setCellHeight()}}class Ce extends e{constructor(e){super(e),this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.placeholder=null,this.placeholderContents=null,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRowsPipeline=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.rowNumColumn=!1,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRenderInPosition=!1,this.dataPipeline=[],this.displayPipeline=[],this.renderer=null}createHolderElement(){var e=document.createElement("div");return e.classList.add("tabulator-tableholder"),e.setAttribute("tabindex",0),e.setAttribute("role","rowgroup"),e}createTableElement(){var e=document.createElement("div");return e.classList.add("tabulator-table"),e.setAttribute("role","rowgroup"),e}initializePlaceholder(){if("string"==typeof this.table.options.placeholder){let e=document.createElement("div");e.classList.add("tabulator-placeholder");let t=document.createElement("div");t.classList.add("tabulator-placeholder-contents"),t.innerHTML=this.table.options.placeholder,e.appendChild(t),this.placeholderContents=t,this.placeholder=e}}getElement(){return this.element}getTableElement(){return this.tableElement}getRowPosition(e,t){return t?this.activeRows.indexOf(e):this.rows.indexOf(e)}initialize(){this.initializePlaceholder(),this.initializeRenderer(),this.element.appendChild(this.tableElement),this.firstRender=!0,this.element.addEventListener("scroll",(()=>{var e=this.element.scrollLeft,t=this.scrollLeft>e,i=this.element.scrollTop,s=this.scrollTop>i;this.scrollLeft!=e&&(this.scrollLeft=e,this.dispatch("scroll-horizontal",e,t),this.dispatchExternal("scrollHorizontal",e,t),this._positionPlaceholder()),this.scrollTop!=i&&(this.scrollTop=i,this.renderer.scrollRows(i,s),this.dispatch("scroll-vertical",i,s),this.dispatchExternal("scrollVertical",i,s))}))}findRow(e){if("object"!=typeof e){if(null==e)return!1;return this.rows.find((t=>t.data[this.table.options.index]==e))||!1}if(e instanceof v)return e;if(e instanceof f)return e._getSelf()||!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){return this.rows.find((t=>t.getElement()===e))||!1}return!1}getRowFromDataObject(e){return this.rows.find((t=>t.data===e))||!1}getRowFromPosition(e,t){return t?this.activeRows[e]:this.rows[e]}scrollToRow(e,t,i){return this.renderer.scrollToRowPosition(e,t,i)}setData(e,t,i){return new Promise(((s,o)=>{t&&this.getDisplayRows().length?this.table.options.pagination?this._setDataActual(e,!0):this.reRenderInPosition((()=>{this._setDataActual(e)})):(this.table.options.autoColumns&&i&&this.table.initialized&&this.table.columnManager.generateColumnsFromRowData(e),this.resetScroll(),this._setDataActual(e)),s()}))}_setDataActual(e,t){this.dispatchExternal("dataProcessing",e),this._wipeElements(),Array.isArray(e)?(this.dispatch("data-processing",e),e.forEach(((e,t)=>{if(e&&"object"==typeof e){var i=new v(e,this);this.rows.push(i)}else console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:",e)})),this.refreshActiveData(!1,!1,t),this.dispatch("data-processed",e),this.dispatchExternal("dataProcessed",e)):console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ",typeof e,"\nData: ",e)}_wipeElements(){this.dispatch("rows-wipe"),this.rows.forEach((e=>{e.wipe()})),this.rows=[],this.activeRows=[],this.activeRowsPipeline=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.adjustTableSize()}deleteRow(e,t){var i=this.rows.indexOf(e),s=this.activeRows.indexOf(e);s>-1&&this.activeRows.splice(s,1),i>-1&&this.rows.splice(i,1),this.setActiveRows(this.activeRows),this.displayRowIterator((t=>{var i=t.indexOf(e);i>-1&&t.splice(i,1)})),t||this.reRenderInPosition(),this.regenerateRowNumbers(),this.dispatchExternal("rowDeleted",e.getComponent()),this.displayRowsCount||this._showPlaceholder(),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.getData())}addRow(e,t,i,s){return this.addRowActual(e,t,i,s)}addRows(e,t,i){var s=[];return new Promise(((o,n)=>{t=this.findAddRowPos(t),Array.isArray(e)||(e=[e]),e.length,(void 0===i&&t||void 0!==i&&!t)&&e.reverse(),e.forEach(((o,n)=>{var r=this.addRow(o,t,i,!0);s.push(r),this.dispatch("row-added",r,e,t,i)})),this.refreshActiveData(!1,!1,!0),this.regenerateRowNumbers(),s.length&&this._clearPlaceholder(),o(s)}))}findAddRowPos(e){return void 0===e&&(e=this.table.options.addRowPos),"pos"===e&&(e=!0),"bottom"===e&&(e=!1),e}addRowActual(e,t,i,s){var o,n,r=e instanceof v?e:new v(e||{},this),a=this.findAddRowPos(t),l=-1;return i||(n=this.chain("row-adding-position",[r,a],null,{index:i,top:a}),i=n.index,a=n.top),void 0!==i&&(i=this.findRow(i)),(i=this.chain("row-adding-index",[r,i,a],null,i))&&(l=this.rows.indexOf(i)),i&&l>-1?(o=this.activeRows.indexOf(i),this.displayRowIterator((function(e){var t=e.indexOf(i);t>-1&&e.splice(a?t:t+1,0,r)})),o>-1&&this.activeRows.splice(a?o:o+1,0,r),this.rows.splice(a?l:l+1,0,r)):a?(this.displayRowIterator((function(e){e.unshift(r)})),this.activeRows.unshift(r),this.rows.unshift(r)):(this.displayRowIterator((function(e){e.push(r)})),this.activeRows.push(r),this.rows.push(r)),this.setActiveRows(this.activeRows),this.dispatchExternal("rowAdded",r.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),s||this.reRenderInPosition(),r}moveRow(e,t,i){this.dispatch("row-move",e,t,i),this.moveRowActual(e,t,i),this.regenerateRowNumbers(),this.dispatch("row-moved",e,t,i),this.dispatchExternal("rowMoved",e.getComponent())}moveRowActual(e,t,i){this.moveRowInArray(this.rows,e,t,i),this.moveRowInArray(this.activeRows,e,t,i),this.displayRowIterator((s=>{this.moveRowInArray(s,e,t,i)})),this.dispatch("row-moving",e,t,i)}moveRowInArray(e,t,i,s){var o,n,r;if(t!==i&&((o=e.indexOf(t))>-1&&(e.splice(o,1),(n=e.indexOf(i))>-1?s?e.splice(n+1,0,t):e.splice(n,0,t):e.splice(o,0,t)),e===this.getDisplayRows())){r=n>o?n:o+1;for(let t=o-1&&t}nextDisplayRow(e,t){var i=this.getDisplayRowIndex(e),s=!1;return!1!==i&&i-1)&&i}getData(e,t){var i=[];return this.getRows(e).forEach((function(e){"row"==e.type&&i.push(e.getData(t||"data"))})),i}getComponents(e){var t=[];return this.getRows(e).forEach((function(e){t.push(e.getComponent())})),t}getDataCount(e){return this.getRows(e).length}scrollHorizontal(e){this.scrollLeft=e,this.element.scrollLeft=e,this.dispatch("scroll-horizontal",e)}registerDataPipelineHandler(e,t){void 0!==t?(this.dataPipeline.push({handler:e,priority:t}),this.dataPipeline.sort(((e,t)=>e.priority-t.priority))):console.error("Data pipeline handlers must have a priority in order to be registered")}registerDisplayPipelineHandler(e,t){void 0!==t?(this.displayPipeline.push({handler:e,priority:t}),this.displayPipeline.sort(((e,t)=>e.priority-t.priority))):console.error("Display pipeline handlers must have a priority in order to be registered")}refreshActiveData(e,t,i){var o=this.table,n="",r=0,a=["all","dataPipeline","display","displayPipeline","end"];if("function"==typeof e)if((r=this.dataPipeline.findIndex((t=>t.handler===e)))>-1)n="dataPipeline",t&&(r==this.dataPipeline.length-1?n="display":r++);else{if(!((r=this.displayPipeline.findIndex((t=>t.handler===e)))>-1))return void console.error("Unable to refresh data, invalid handler provided",e);n="displayPipeline",t&&(r==this.displayPipeline.length-1?n="end":r++)}else n=e||"all",r=0;this.redrawBlock?(!this.redrawBlockRestoreConfig||this.redrawBlockRestoreConfig&&(this.redrawBlockRestoreConfig.stage===n&&r{var t=e.getCell(this.rowNumColumn);t&&t._generateContents()}))}setActiveRows(e){this.activeRows=e,this.activeRowsCount=this.activeRows.length}resetDisplayRows(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length}getNextDisplayIndex(){return this.displayRows.length}setDisplayRows(e,t){var i=!0;return t&&void 0!==this.displayRows[t]?(this.displayRows[t]=e,i=!0):(this.displayRows.push(e),i=t=this.displayRows.length-1),t==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length),i}getDisplayRows(e){return void 0===e?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[e]||[]}getVisibleRows(e,t){var i=Object.assign([],this.renderer.visibleRows(!t));return e&&(i=this.chain("rows-visible",[t],i,i)),i}displayRowIterator(e){this.activeRowsPipeline.forEach(e),this.displayRows.forEach(e),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length}getRows(e){var t;switch(e){case"active":t=this.activeRows;break;case"display":t=this.table.rowManager.getDisplayRows();break;case"visible":t=this.getVisibleRows(!1,!0);break;default:t=this.chain("rows-retrieve",e,null,this.rows)||this.rows}return t}reRenderInPosition(e){this.redrawBlock?e?e():this.redrawBlockRenderInPosition=!0:this.renderer.rerenderRows(e)}initializeRenderer(){var e,t={virtual:we,basic:ve};(e="string"==typeof this.table.options.renderVertical?t[this.table.options.renderVertical]:this.table.options.renderVertical)?(this.renderer=new e(this.table,this.element,this.tableElement),this.renderer.initialize(),this.table.element.clientHeight||this.table.options.height?this.fixedHeight=!0:this.fixedHeight=!1):console.error("Unable to find matching renderer:",table.options.renderVertical)}getRenderMode(){return this.renderMode}renderTable(){this.dispatchExternal("renderStarted"),this.element.scrollTop=0,this._clearTable(),this.displayRowsCount?(this.renderer.renderRows(),this.firstRender&&(this.firstRender=!1,this.layoutRefresh())):this.renderEmptyScroll(),this.fixedHeight||this.adjustTableSize(),this.dispatch("table-layout"),this.displayRowsCount||this._showPlaceholder(),this.dispatchExternal("renderComplete")}renderEmptyScroll(){this.placeholder?this.tableElement.style.display="none":this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px"}_clearTable(){this.tableElement;this._clearPlaceholder(),this.scrollTop=0,this.scrollLeft=0,this.renderer.clearRows()}_showPlaceholder(){this.placeholder&&(this.placeholder.setAttribute("tabulator-render-mode",this.renderMode),this.getElement().appendChild(this.placeholder),this._positionPlaceholder())}_clearPlaceholder(){this.placeholder&&this.placeholder.parentNode&&this.placeholder.parentNode.removeChild(this.placeholder)}_positionPlaceholder(){this.placeholder&&this.placeholder.parentNode&&(this.placeholder.style.width=this.table.columnManager.getWidth()+"px",this.placeholderContents.style.width=this.table.rowManager.element.clientWidth+"px",this.placeholderContents.style.marginLeft=this.scrollLeft+"px")}styleRow(e,t){var i=e.getElement();t%2?(i.classList.add("tabulator-row-even"),i.classList.remove("tabulator-row-odd")):(i.classList.add("tabulator-row-odd"),i.classList.remove("tabulator-row-even"))}normalizeHeight(){this.activeRows.forEach((function(e){e.normalizeHeight()}))}adjustTableSize(){var e=this.element.clientHeight;if("fill"===this.renderer.verticalFillMode){let t=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));this.fixedHeight?(this.element.style.minHeight="calc(100% - "+t+"px)",this.element.style.height="calc(100% - "+t+"px)",this.element.style.maxHeight="calc(100% - "+t+"px)"):(this.element.style.height="",this.element.style.height=this.table.element.clientHeight-t+"px",this.element.scrollTop=this.scrollTop),this.renderer.resize(),this.fixedHeight||e==this.element.clientHeight||(this.subscribed("table-resize")?this.dispatch("table-resize"):this.redraw())}this._positionPlaceholder()}reinitialize(){this.rows.forEach((function(e){e.reinitialize(!0)}))}blockRedraw(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1}restoreRedraw(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.handler,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRenderInPosition&&this.reRenderInPosition(),this.redrawBlockRenderInPosition=!1}redraw(e){var t=this.scrollLeft;this.adjustTableSize(),this.table.tableWidth=this.table.element.clientWidth,e?this.renderTable():(this.reRenderInPosition(),this.scrollHorizontal(t))}resetScroll(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var e=document.createEvent("Event");e.initEvent("scroll",!1,!0),this.element.dispatchEvent(e)}else this.element.dispatchEvent(new Event("scroll"))}}class Ee extends e{constructor(e){super(e),this.active=!1,this.element=this.createElement(),this.containerElement=this.createContainerElement(),this.external=!1,this.links=[]}initialize(){this.initializeElement()}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-footer"),e}createContainerElement(){var e=document.createElement("div");return e.classList.add("tabulator-footer-contents"),this.element.appendChild(e),e}initializeElement(){if(this.table.options.footerElement)switch(typeof this.table.options.footerElement){case"string":"<"===this.table.options.footerElement[0]?this.containerElement.innerHTML=this.table.options.footerElement:(this.external=!0,this.containerElement=document.querySelector(this.table.options.footerElement));break;default:this.element=this.table.options.footerElement}}getElement(){return this.element}append(e,t){this.activate(t),this.containerElement.appendChild(e),this.table.rowManager.adjustTableSize()}prepend(e,t){this.activate(t),this.element.insertBefore(e,this.element.firstChild),this.table.rowManager.adjustTableSize()}remove(e){e.parentNode.removeChild(e),this.deactivate()}deactivate(e){this.element.firstChild&&!e||(this.external||this.element.parentNode.removeChild(this.element),this.active=!1)}activate(e){this.active||(this.active=!0,this.external||(this.table.element.appendChild(this.getElement()),this.table.element.style.display="")),e&&this.links.push(e)}redraw(){this.links.forEach((function(e){e.footerRedraw()}))}}class ye extends e{constructor(e){super(e),this.el=null,this.abortClasses=["tabulator-headers","tabulator-table"],this.previousTargets={},this.listeners=["click","dblclick","contextmenu","mouseenter","mouseleave","mouseover","mouseout","mousemove","touchstart","touchend"],this.componentMap={"tabulator-cell":"cell","tabulator-row":"row","tabulator-group":"group","tabulator-col":"column"},this.pseudoTrackers={row:{subscriber:null,target:null},cell:{subscriber:null,target:null},group:{subscriber:null,target:null},column:{subscriber:null,target:null}},this.pseudoTracking=!1}initialize(){this.el=this.table.element,this.buildListenerMap(),this.bindSubscriptionWatchers()}buildListenerMap(){var e={};this.listeners.forEach((t=>{e[t]={handler:null,components:[]}})),this.listeners=e}bindPseudoEvents(){Object.keys(this.pseudoTrackers).forEach((e=>{this.pseudoTrackers[e].subscriber=this.pseudoMouseEnter.bind(this,e),this.subscribe(e+"-mouseover",this.pseudoTrackers[e].subscriber)})),this.pseudoTracking=!0}pseudoMouseEnter(e,t,i){this.pseudoTrackers[e].target!==i&&(this.pseudoTrackers[e].target&&this.dispatch(e+"-mouseleave",t,i),this.pseudoMouseLeave(e,t),this.pseudoTrackers[e].target=i,this.dispatch(e+"-mouseenter",t,i))}pseudoMouseLeave(e,t){var i=Object.keys(this.pseudoTrackers),s={row:["cell"],cell:["row"]};(i=i.filter((t=>{var i=s[e];return t!==e&&(!i||i&&!i.includes(t))}))).forEach((e=>{var i=this.pseudoTrackers[e].target;this.pseudoTrackers[e].target&&(this.dispatch(e+"-mouseleave",t,i),this.pseudoTrackers[e].target=null)}))}bindSubscriptionWatchers(){var e=Object.keys(this.listeners),t=Object.values(this.componentMap);for(let i of t)for(let t of e){let e=i+"-"+t;this.subscriptionChange(e,this.subscriptionChanged.bind(this,i,t))}this.subscribe("table-destroy",this.clearWatchers.bind(this))}subscriptionChanged(e,t,i){var s=this.listeners[t].components,o=s.indexOf(e),n=!1;i?-1===o&&(s.push(e),n=!0):this.subscribed(e+"-"+t)||o>-1&&(s.splice(o,1),n=!0),"mouseenter"!==t&&"mouseleave"!==t||this.pseudoTracking||this.bindPseudoEvents(),n&&this.updateEventListeners()}updateEventListeners(){for(let e in this.listeners){let t=this.listeners[e];t.components.length?t.handler||(t.handler=this.track.bind(this,e),this.el.addEventListener(e,t.handler)):t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}track(e,t){var i=t.composedPath&&t.composedPath()||t.path,s=this.findTargets(i);s=this.bindComponents(e,s),this.triggerEvents(e,t,s),!this.pseudoTracking||"mouseover"!=e&&"mouseleave"!=e||Object.keys(s).length||this.pseudoMouseLeave("none",t)}findTargets(e){var t={};let i=Object.keys(this.componentMap);for(let s of e){let e=s.classList?[...s.classList]:[];if(e.filter((e=>this.abortClasses.includes(e))).length)break;let o=e.filter((e=>i.includes(e)));for(let e of o)t[this.componentMap[e]]=s}return t.group&&t.group===t.row&&delete t.row,t}bindComponents(e,t){var i=Object.keys(t).reverse(),s=this.listeners[e],o={};for(let e of i){let i,n=t[e],r=this.previousTargets[e];if(r&&r.target===n)i=r.component;else switch(e){case"row":case"group":if(s.components.includes("row")||s.components.includes("cell")||s.components.includes("group")){i=this.table.rowManager.getVisibleRows(!0).find((e=>e.getElement()===n)),t.row&&t.row.parentNode&&t.row.parentNode.closest(".tabulator-row")&&(t[e]=!1)}break;case"column":s.components.includes("column")&&(i=this.table.columnManager.findColumn(n));break;case"cell":s.components.includes("cell")&&(t.row instanceof v?i=t.row.findCell(n):t.row&&console.warn("Event Target Lookup Error - The row this cell is attached to cannot be found, has the table been reinitialized without being destroyed first?"))}i&&(t[e]=i,o[e]={target:n,component:i})}return this.previousTargets=o,t}triggerEvents(e,t,i){var s=this.listeners[e];for(let o in i)i[o]&&s.components.includes(o)&&this.dispatch(o+"-"+e,t,i[o])}clearWatchers(){for(let e in this.listeners){let t=this.listeners[e];t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}}class Re{constructor(e){this.table=e,this.bindings={}}bind(e,t,i){this.bindings[e]||(this.bindings[e]={}),this.bindings[e][t]?console.warn("Unable to bind component handler, a matching function name is already bound",e,t,i):this.bindings[e][t]=i}handle(e,t,i){if(this.bindings[e]&&this.bindings[e][i]&&"function"==typeof this.bindings[e][i].bind)return this.bindings[e][i].bind(null,t);"then"===i||"string"!=typeof i||i.startsWith("_")||console.error("The "+e+" component does not have a "+i+" function, have you checked that you have the correct Tabulator module installed?")}}class xe extends e{constructor(e){super(e),this.loaderElement=this.createLoaderElement(),this.msgElement=this.createMsgElement(),this.loadingElement=null,this.errorElement=null,this.requestOrder=0,this.loading=!1}initialize(){var e;this.loaderElement.appendChild(this.msgElement),this.table.options.dataLoaderLoading&&("string"==typeof this.table.options.dataLoaderLoading?((e=document.createElement("template")).innerHTML=this.table.options.dataLoaderLoading.trim(),this.loadingElement=e.firstElementChild):this.loadingElement=this.table.options.dataLoaderLoading),this.table.options.dataLoaderError&&("string"==typeof this.table.options.dataLoaderError?((e=document.createElement("template")).innerHTML=this.table.options.dataLoaderError.trim(),this.errorElement=e.firstElementChild):this.errorElement=this.table.options.dataLoaderError)}createLoaderElement(){var e=document.createElement("div");return e.classList.add("tabulator-loader"),e}createMsgElement(){var e=document.createElement("div");return e.classList.add("tabulator-loader-msg"),e.setAttribute("role","alert"),e}load(e,t,i,s,o){var n=++this.requestOrder;return this.dispatchExternal("dataLoading",e),!e||0!=e.indexOf("{")&&0!=e.indexOf("[")||(e=JSON.parse(e)),this.confirm("data-loading",[e,t,i,o])?(this.loading=!0,o||this.showLoader(),t=this.chain("data-params",[e,i,o],t||{},t||{}),t=this.mapParams(t,this.table.options.dataSendParams),this.chain("data-load",[e,t,i,o],!1,Promise.resolve([])).then((e=>{Array.isArray(e)||"object"!=typeof e||(e=this.mapParams(e,this.objectInvert(this.table.options.dataReceiveParams)));var t=this.chain("data-loaded",e,null,e);n==this.requestOrder?(this.hideLoader(),!1!==t&&(this.dispatchExternal("dataLoaded",t),this.table.rowManager.setData(t,s,!s))):console.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")})).catch((e=>{console.error("Data Load Error: ",e),this.dispatchExternal("dataLoadError",e),o||this.showError(),setTimeout((()=>{this.hideLoader()}),this.table.options.dataLoaderErrorTimeout)})).finally((()=>{this.loading=!1}))):(this.dispatchExternal("dataLoaded",e),e||(e=[]),this.table.rowManager.setData(e,s,!s),Promise.resolve())}mapParams(e,t){var i={};for(let s in e)i[t.hasOwnProperty(s)?t[s]:s]=e[s];return i}objectInvert(e){var t={};for(let i in e)t[e[i]]=i;return t}blockActiveLoad(){this.requestOrder++}showLoader(){if("function"==typeof this.table.options.dataLoader?this.table.options.dataLoader():this.table.options.dataLoader){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-error"),this.msgElement.classList.add("tabulator-loading"),this.loadingElement?this.msgElement.appendChild(this.loadingElement):this.msgElement.innerHTML=this.langText("data|loading"),this.table.element.appendChild(this.loaderElement)}}showError(){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-loading"),this.msgElement.classList.add("tabulator-error"),this.errorElement?this.msgElement.appendChild(this.errorElement):this.msgElement.innerHTML=this.langText("data|error"),this.table.element.appendChild(this.loaderElement)}hideLoader(){this.loaderElement.parentNode&&this.loaderElement.parentNode.removeChild(this.loaderElement)}}class Me{constructor(e,t,i){this.table=e,this.events={},this.optionsList=t||{},this.subscriptionNotifiers={},this.dispatch=i?this._debugDispatch.bind(this):this._dispatch.bind(this),this.debug=i}subscriptionChange(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifiySubscriptionChange(e,!0)}subscribe(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t),this._notifiySubscriptionChange(e,!0)}unsubscribe(e,t){var i;if(this.events[e]){if(t){if(!((i=this.events[e].findIndex((e=>e===t)))>-1))return void console.warn("Cannot remove event, no matching event found:",e,t);this.events[e].splice(i,1)}else delete this.events[e];this._notifiySubscriptionChange(e,!1)}else console.warn("Cannot remove event, no events set on:",e)}subscribed(e){return this.events[e]&&this.events[e].length}_notifiySubscriptionChange(e,t){var i=this.subscriptionNotifiers[e];i&&i.forEach((e=>{e(t)}))}_dispatch(){var e,t=Array.from(arguments),i=t.shift();return this.events[i]&&this.events[i].forEach(((i,s)=>{let o=i.apply(this.table,t);s||(e=o)})),e}_debugDispatch(){var e=Array.from(arguments),t=e[0];return e[0]="ExternalEvent:"+e[0],(!0===this.debug||this.debug.includes(t))&&console.log(...e),this._dispatch(...arguments)}}class Te{constructor(e){this.events={},this.subscriptionNotifiers={},this.dispatch=e?this._debugDispatch.bind(this):this._dispatch.bind(this),this.chain=e?this._debugChain.bind(this):this._chain.bind(this),this.confirm=e?this._debugConfirm.bind(this):this._confirm.bind(this),this.debug=e}subscriptionChange(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifiySubscriptionChange(e,!0)}subscribe(e,t,i=1e4){this.events[e]||(this.events[e]=[]),this.events[e].push({callback:t,priority:i}),this.events[e].sort(((e,t)=>e.priority-t.priority)),this._notifiySubscriptionChange(e,!0)}unsubscribe(e,t){var i;if(this.events[e]){if(t){if(!((i=this.events[e].findIndex((e=>e.callback===t)))>-1))return void console.warn("Cannot remove event, no matching event found:",e,t);this.events[e].splice(i,1)}this._notifiySubscriptionChange(e,!1)}else console.warn("Cannot remove event, no events set on:",e)}subscribed(e){return this.events[e]&&this.events[e].length}_chain(e,t,i,s){var o=i;return Array.isArray(t)||(t=[t]),this.subscribed(e)?(this.events[e].forEach(((e,i)=>{o=e.callback.apply(this,t.concat([o]))})),o):"function"==typeof s?s():s}_confirm(e,t){var i=!1;return Array.isArray(t)||(t=[t]),this.subscribed(e)&&this.events[e].forEach(((e,s)=>{e.callback.apply(this,t)&&(i=!0)})),i}_notifiySubscriptionChange(e,t){var i=this.subscriptionNotifiers[e];i&&i.forEach((e=>{e(t)}))}_dispatch(){var e=Array.from(arguments),t=e.shift();this.events[t]&&this.events[t].forEach((t=>{t.callback.apply(this,e)}))}_debugDispatch(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(!0===this.debug||this.debug.includes(t))&&console.log(...e),this._dispatch(...arguments)}_debugChain(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(!0===this.debug||this.debug.includes(t))&&console.log(...e),this._chain(...arguments)}_debugConfirm(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(!0===this.debug||this.debug.includes(t))&&console.log(...e),this._confirm(...arguments)}}class Le{static register(e){Le.tables.push(e)}static deregister(e){var t=Le.tables.indexOf(e);t>-1&&Le.tables.splice(t,1)}static lookupTable(e,t){var i,s,o=[];if("string"==typeof e){if((i=document.querySelectorAll(e)).length)for(var n=0;n{e.widthFixed||e.reinitializeWidth(),(this.table.options.responsiveLayout?e.modules.responsive.visible:e.visible)&&(o=e),e.visible&&(t+=e.getWidth())})),o?(s=i-t+o.getWidth(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&(o.setWidth(0),this.table.modules.responsiveLayout.update()),s>0?o.setWidth(s):o.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(e){var t,i,s=this.table.element.clientWidth,o=0,n=0,r=0,a=[],l=[],h=0,d=0;function c(e){return"string"==typeof e?e.indexOf("%")>-1?s/100*parseInt(e):parseInt(e):e}function u(e,t,i,s){var o=[],n=0,a=0,l=0,h=r,d=0,m=0,p=[];function g(e){return i*(e.column.definition.widthGrow||1)}function b(e){return c(e.width)-i*(e.column.definition.widthShrink||0)}return e.forEach((function(e,n){var r=s?b(e):g(e);e.column.minWidth>=r?o.push(e):e.column.maxWidth&&e.column.maxWidththis.table.rowManager.element.clientHeight&&(s-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),e.forEach((function(e){var t,i,s;e.visible&&(t=e.definition.width,i=parseInt(e.minWidth),t?(s=c(t),o+=s>i?s:i,e.definition.widthShrink&&(l.push({column:e,width:s>i?s:i}),h+=e.definition.widthShrink)):(a.push({column:e,width:0}),r+=e.definition.widthGrow||1))})),n=s-o,t=Math.floor(n/r),d=u(a,n,t,!1),a.length&&d>0&&(a[a.length-1].width+=+d),a.forEach((function(e){n-=e.width})),(i=Math.abs(d)+n)>0&&h&&(d=u(l,i,Math.floor(i/h),!0)),l.length&&(l[l.length-1].width-=d),a.forEach((function(e){e.column.setWidth(e.width)})),l.forEach((function(e){e.column.setWidth(e.width)}))}};class Se extends t{constructor(e){super(e,"layout"),this.mode=null,this.registerTableOption("layout","fitData"),this.registerTableOption("layoutColumnsOnNewData",!1),this.registerColumnOption("widthGrow"),this.registerColumnOption("widthShrink")}initialize(){var e=this.table.options.layout;Se.modes[e]?this.mode=e:(console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : "+e),this.mode="fitData"),this.table.element.setAttribute("tabulator-layout",this.mode)}getMode(){return this.mode}layout(){this.dispatch("layout-refreshing"),Se.modes[this.mode].call(this,this.table.columnManager.columnsByIndex),this.dispatch("layout-refreshed")}}Se.moduleName="layout",Se.modes=De;class Fe extends t{constructor(e){super(e),this.locale="default",this.lang=!1,this.bindings={},this.langList={},this.registerTableOption("locale",!1),this.registerTableOption("langs",{})}initialize(){this.langList=s.deepClone(Fe.langs),!1!==this.table.options.columnDefaults.headerFilterPlaceholder&&this.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder);for(let e in this.table.options.langs)this.installLang(e,this.table.options.langs[e]);this.setLocale(this.table.options.locale),this.registerTableFunction("setLocale",this.setLocale.bind(this)),this.registerTableFunction("getLocale",this.getLocale.bind(this)),this.registerTableFunction("getLang",this.getLang.bind(this))}setHeaderFilterPlaceholder(e){this.langList.default.headerFilters.default=e}setHeaderFilterColumnPlaceholder(e,t){this.langList.default.headerFilters.columns[e]=t,this.lang&&!this.lang.headerFilters.columns[e]&&(this.lang.headerFilters.columns[e]=t)}installLang(e,t){this.langList[e]?this._setLangProp(this.langList[e],t):this.langList[e]=t}_setLangProp(e,t){for(let i in t)e[i]&&"object"==typeof e[i]?this._setLangProp(e[i],t[i]):e[i]=t[i]}setLocale(e){if(!0===(e=e||"default")&&navigator.language&&(e=navigator.language.toLowerCase()),e&&!this.langList[e]){let t=e.split("-")[0];this.langList[t]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",e,t),e=t):(console.warn("Localization Error - Matching locale not found, using default: ",e),e="default")}this.locale=e,this.lang=s.deepClone(this.langList.default||{}),"default"!=e&&function e(t,i){for(var s in t)"object"==typeof t[s]?(i[s]||(i[s]={}),e(t[s],i[s])):i[s]=t[s]}(this.langList[e],this.lang),this.dispatchExternal("localized",this.locale,this.lang),this._executeBindings()}getLocale(e){return this.locale}getLang(e){return e?this.langList[e]:this.lang}getText(e,t){var i=(e=t?e+"|"+t:e).split("|");return this._getLangElement(i,this.locale)||""}_getLangElement(e,t){var i=this.lang;return e.forEach((function(e){var t;i&&(t=i[e],i=void 0!==t&&t)})),i}bind(e,t){this.bindings[e]||(this.bindings[e]=[]),this.bindings[e].push(t),t(this.getText(e),this.lang)}_executeBindings(){for(let e in this.bindings)this.bindings[e].forEach((t=>{t(this.getText(e),this.lang)}))}}Fe.moduleName="localize",Fe.langs={default:{groups:{item:"item",items:"items"},columns:{},data:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All",counter:{showing:"Showing",of:"of",rows:"rows",pages:"pages"}},headerFilters:{default:"filter column...",columns:{}}}};class Pe extends t{constructor(e){super(e)}initialize(){this.registerTableFunction("tableComms",this.receive.bind(this))}getConnections(e){var t=[];return Le.lookupTable(e).forEach((e=>{this.table!==e&&t.push(e)})),t}send(e,t,i,s){var o=this.getConnections(e);o.forEach((e=>{e.tableComms(this.table.element,t,i,s)})),!o.length&&e&&console.warn("Table Connection Error - No tables matching selector found",e)}receive(e,t,i,s){if(this.table.modExists(t))return this.table.modules[t].commsReceived(e,i,s);console.warn("Inter-table Comms Error - no such module:",t)}}Pe.moduleName="comms";var ze=Object.freeze({__proto__:null,LayoutModule:Se,LocalizeModule:Fe,CommsModule:Pe});class He{constructor(e,t){this.bindStaticFuctionality(e),this.bindModules(e,ze,!0),t&&this.bindModules(e,t)}bindStaticFuctionality(e){e.moduleBindings={},e.extendModule=function(t,i,s){if(e.moduleBindings[t]){var o=e.moduleBindings[t][i];if(o)if("object"==typeof s)for(let e in s)o[e]=s[e];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",i)}else console.warn("Module Error - module does not exist:",t)},e.registerModule=function(t){Array.isArray(t)||(t=[t]),t.forEach((t=>{e.registerModuleBinding(t)}))},e.registerModuleBinding=function(t){e.moduleBindings[t.moduleName]=t},e.findTable=function(e){var t=Le.lookupTable(e,!0);return!(Array.isArray(t)&&!t.length)&&t},e.prototype.bindModules=function(){var t=[],i=[];for(var s in this.modules={},e.moduleBindings){let o=e.moduleBindings[s],n=new o(this);this.modules[s]=n,o.prototype.moduleCore?this.modulesCore.push(n):o.moduleInitOrder?t.push(n):i.push(n)}t.sort(((e,t)=>e.moduleInitOrder>t.moduleInitOrder?1:-1)),this.modulesRegular=t.concat(i)}}bindModules(e,t,i){var s=Object.values(t);i&&s.forEach((e=>{e.prototype.moduleCore=!0})),e.registerModule(s)}}class Ae{constructor(e,t){this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.vdomHoz=null,this.externalEvents=null,this.eventBus=null,this.interactionMonitor=!1,this.browser="",this.browserSlow=!1,this.browserMobile=!1,this.rtl=!1,this.originalElement=null,this.componentFunctionBinder=new Re(this),this.dataLoader=!1,this.modules={},this.modulesCore=[],this.modulesRegular=[],this.optionsList=new me(this,"table constructor"),this.initialized=!1,this.initializeElement(e)&&(this.initializeCoreSystems(t),setTimeout((()=>{this._create()}))),Le.register(this)}initializeElement(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement?(this.element=e,!0):"string"==typeof e?(this.element=document.querySelector(e),!!this.element||(console.error("Tabulator Creation Error - no element found matching selector: ",e),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",e),!1)}initializeCoreSystems(e){this.columnManager=new fe(this),this.rowManager=new Ce(this),this.footerManager=new Ee(this),this.dataLoader=new xe(this),this.bindModules(),this.options=this.optionsList.generate(Ae.defaultOptions,e),this._clearObjectPointers(),this._mapDeprecatedFunctionality(),this.externalEvents=new Me(this,this.options,this.options.debugEventsExternal),this.eventBus=new Te(this.options.debugEventsInternal),this.interactionMonitor=new ye(this),this.dataLoader.initialize(),this.footerManager.initialize()}_mapDeprecatedFunctionality(){}_clearSelection(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")}_create(){this.externalEvents.dispatch("tableBuilding"),this.eventBus.dispatch("table-building"),this._rtlCheck(),this._buildElement(),this._initializeTable(),this._loadInitialData(),this.initialized=!0,this.externalEvents.dispatch("tableBuilt")}_rtlCheck(){var e=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if("rtl"!==e.direction)break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}}_clearObjectPointers(){this.options.columns=this.options.columns.slice(0),Array.isArray(this.options.data)&&!this.options.reactiveData&&(this.options.data=this.options.data.slice(0))}_buildElement(){var e,t=this.element,i=this.options;if("TABLE"===t.tagName){this.originalElement=this.element,e=document.createElement("div");var s=t.attributes;for(var o in s)"object"==typeof s[o]&&e.setAttribute(s[o].name,s[o].value);t.parentNode.replaceChild(e,t),this.element=t=e}for(t.classList.add("tabulator"),t.setAttribute("role","grid");t.firstChild;)t.removeChild(t.firstChild);i.height&&(i.height=isNaN(i.height)?i.height:i.height+"px",t.style.height=i.height),!1!==i.minHeight&&(i.minHeight=isNaN(i.minHeight)?i.minHeight:i.minHeight+"px",t.style.minHeight=i.minHeight),!1!==i.maxHeight&&(i.maxHeight=isNaN(i.maxHeight)?i.maxHeight:i.maxHeight+"px",t.style.maxHeight=i.maxHeight)}_initializeTable(){var e=this.element,t=this.options;this.interactionMonitor.initialize(),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modulesCore.forEach((e=>{e.initialize()})),e.appendChild(this.columnManager.getElement()),e.appendChild(this.rowManager.getElement()),t.footerElement&&this.footerManager.activate(),t.autoColumns&&t.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modulesRegular.forEach((e=>{e.initialize()})),this.columnManager.setColumns(t.columns),this.eventBus.dispatch("table-built")}_loadInitialData(){this.dataLoader.load(this.options.data)}destroy(){var e=this.element;for(Le.deregister(this),this.eventBus.dispatch("table-destroy"),this.rowManager.rows.forEach((function(e){e.wipe()})),this.rowManager.rows=[],this.rowManager.activeRows=[],this.rowManager.displayRows=[];e.firstChild;)e.removeChild(e.firstChild);e.classList.remove("tabulator")}_detectBrowser(){var e=navigator.userAgent||navigator.vendor||window.opera;e.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):e.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):e.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.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(e)||/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(e.slice(0,4))}blockRedraw(){return this.rowManager.blockRedraw()}restoreRedraw(){return this.rowManager.restoreRedraw()}setData(e,t,i){if(this.initialized)return this.dataLoader.load(e,t,i,!1);console.warn("setData failed - table not yet initialized. To set initial data please use the 'data' property in the table constructor.")}clearData(){this.dataLoader.blockActiveLoad(),this.rowManager.clearData()}getData(e){return this.rowManager.getData(e)}getDataCount(e){return this.rowManager.getDataCount(e)}replaceData(e,t,i){if(this.initialized)return this.dataLoader.load(e,t,i,!0,!0);console.warn("replaceData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}updateData(e){var t=0;if(this.initialized)return new Promise(((i,s)=>{this.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e?e.forEach((e=>{var s=this.rowManager.findRow(e[this.options.index]);s&&(t++,s.updateData(e).then((()=>{--t||i()})))})):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))}));console.warn("updateData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}addData(e,t,i){if(this.initialized)return new Promise(((s,o)=>{this.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e?this.rowManager.addRows(e,t,i).then((e=>{var t=[];e.forEach((function(e){t.push(e.getComponent())})),s(t)})):(console.warn("Update Error - No data provided"),o("Update Error - No data provided"))}));console.warn("addData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}updateOrAddData(e){var t=[],i=0;if(this.initialized)return new Promise(((s,o)=>{this.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e?e.forEach((e=>{var o=this.rowManager.findRow(e[this.options.index]);i++,o?o.updateData(e).then((()=>{i--,t.push(o.getComponent()),i||s(t)})):this.rowManager.addRows(e).then((e=>{i--,t.push(e[0].getComponent()),i||s(t)}))})):(console.warn("Update Error - No data provided"),o("Update Error - No data provided"))}));console.warn("updateOrAddData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}getRow(e){var t=this.rowManager.findRow(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}getRowFromPosition(e,t){var i=this.rowManager.getRowFromPosition(e,t);return i?i.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}deleteRow(e){var t=[];Array.isArray(e)||(e=[e]);for(let i of e){let e=this.rowManager.findRow(i,!0);if(!e)return console.error("Delete Error - No matching row found:",i),Promise.reject("Delete Error - No matching row found");t.push(e)}return t.sort(((e,t)=>this.rowManager.rows.indexOf(e)>this.rowManager.rows.indexOf(t)?1:-1)),t.forEach((e=>{e.delete()})),this.rowManager.reRenderInPosition(),Promise.resolve()}addRow(e,t,i){if(this.initialized)return"string"==typeof e&&(e=JSON.parse(e)),this.rowManager.addRows(e,t,i).then((e=>e[0].getComponent()));console.warn("addRow failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}updateOrAddRow(e,t){var i=this.rowManager.findRow(e);return"string"==typeof t&&(t=JSON.parse(t)),i?i.updateData(t).then((()=>i.getComponent())):this.rowManager.addRows(t).then((e=>e[0].getComponent()))}updateRow(e,t){var i=this.rowManager.findRow(e);return"string"==typeof t&&(t=JSON.parse(t)),i?i.updateData(t).then((()=>Promise.resolve(i.getComponent()))):(console.warn("Update Error - No matching row found:",e),Promise.reject("Update Error - No matching row found"))}scrollToRow(e,t,i){var s=this.rowManager.findRow(e);return s?this.rowManager.scrollToRow(s,t,i):(console.warn("Scroll Error - No matching row found:",e),Promise.reject("Scroll Error - No matching row found"))}moveRow(e,t,i){var s=this.rowManager.findRow(e);s?s.moveToRow(t,i):console.warn("Move Error - No matching row found:",e)}getRows(e){return this.rowManager.getComponents(e)}getRowPosition(e,t){var i=this.rowManager.findRow(e);return i?this.rowManager.getRowPosition(i,t):(console.warn("Position Error - No matching row found:",e),!1)}setColumns(e){this.initialized?this.columnManager.setColumns(e):console.warn("setColumns failed - table not yet initialized. To set initial data please use the 'columns' property in the table constructor.")}getColumns(e){return this.columnManager.getComponents(e)}getColumn(e){var t=this.columnManager.findColumn(e);return t?t.getComponent():(console.warn("Find Error - No matching column found:",e),!1)}getColumnDefinitions(){return this.columnManager.getDefinitionTree()}showColumn(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Show Error - No matching column found:",e),!1;t.show()}hideColumn(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Hide Error - No matching column found:",e),!1;t.hide()}toggleColumn(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Visibility Toggle Error - No matching column found:",e),!1;t.visible?t.hide():t.show()}addColumn(e,t,i){var s=this.columnManager.findColumn(i);return this.columnManager.addColumn(e,t,s).then((e=>e.getComponent()))}deleteColumn(e){var t=this.columnManager.findColumn(e);return t?t.delete():(console.warn("Column Delete Error - No matching column found:",e),Promise.reject())}updateColumnDefinition(e,t){var i=this.columnManager.findColumn(e);return i?i.updateDefinition(t):(console.warn("Column Update Error - No matching column found:",e),Promise.reject())}moveColumn(e,t,i){var s=this.columnManager.findColumn(e),o=this.columnManager.findColumn(t);s?o?this.columnManager.moveColumn(s,o,i):console.warn("Move Error - No matching column found:",o):console.warn("Move Error - No matching column found:",e)}scrollToColumn(e,t,i){return new Promise(((s,o)=>{var n=this.columnManager.findColumn(e);return n?this.columnManager.scrollToColumn(n,t,i):(console.warn("Scroll Error - No matching column found:",e),Promise.reject("Scroll Error - No matching column found"))}))}redraw(e){this.initialized?(this.columnManager.redraw(e),this.rowManager.redraw(e)):console.warn("redraw failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.")}setHeight(e){this.options.height=isNaN(e)?e:e+"px",this.element.style.height=this.options.height,this.rowManager.initializeRenderer(),this.rowManager.redraw()}on(e,t){this.externalEvents.subscribe(e,t)}off(e,t){this.externalEvents.unsubscribe(e,t)}dispatchEvent(){Array.from(arguments).shift();this.externalEvents.dispatch(...arguments)}modExists(e,t){return!!this.modules[e]||(t&&console.error("Tabulator Module Not Installed: "+e),!1)}module(e){var t=this.modules[e];return t||console.error("Tabulator module not installed: "+e),t}}Ae.defaultOptions={debugEventsExternal:!1,debugEventsInternal:!1,debugInvalidOptions:!0,height:!1,minHeight:!1,maxHeight:!1,columnHeaderVertAlign:"top",columns:[],columnDefaults:{},data:!1,autoColumns:!1,autoColumnsDefinitions:!1,nestedFieldSeparator:".",tooltipGenerationMode:"load",footerElement:!1,index:"id",textDirection:"auto",addRowPos:"bottom",headerVisible:!0,renderVertical:"virtual",renderHorizontal:"basic",renderVerticalBuffer:0,scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,placeholder:!1,dataLoader:!0,dataLoaderLoading:!1,dataLoaderError:!1,dataLoaderErrorTimeout:3e3,dataSendParams:{},dataReceiveParams:{}},new He(Ae);class Oe extends Ae{}new He(Oe,ue);class _e{constructor(e){this.type=e,this.element=this._createElement()}_createElement(){var e=document.createElement("div");return e.classList.add("tabulator-row"),e}getElement(){return this.element}getComponent(){return!1}getData(){return{}}getHeight(){return this.element.outerHeight}initialize(){}reinitialize(){}normalizeHeight(){}generateCells(){}reinitializeHeight(){}calcHeight(){}setCellHeight(){}clearCellHeight(){}}export{o as AccessorModule,h as AjaxModule,c as CalcComponent,u as CellComponent,d as ClipboardModule,C as ColumnCalcsModule,p as ColumnComponent,E as DataTreeModule,R as DownloadModule,T as EditModule,D as ExportModule,F as FilterModule,z as FormatModule,H as FrozenColumnsModule,A as FrozenRowsModule,O as GroupComponent,B as GroupRowsModule,N as HistoryModule,V as HtmlTableImportModule,W as ImportModule,j as InteractionModule,G as KeybindingsModule,U as MenuModule,t as Module,X as MoveColumnsModule,q as MoveRowsModule,K as MutatorModule,J as PageModule,Q as PersistenceModule,ee as PrintModule,_e as PseudoRow,te as ReactiveDataModule,pe as Renderer,ie as ResizeColumnsModule,se as ResizeRowsModule,oe as ResizeTableModule,ne as ResponsiveLayoutModule,f as RowComponent,re as SelectRowModule,he as SortModule,Ae as Tabulator,Oe as TabulatorFull,ce as ValidateModule}; //# sourceMappingURL=tabulator_esm.min.js.map diff --git a/dist/js/tabulator_esm.min.js.map b/dist/js/tabulator_esm.min.js.map index 31cd4bd23..4fbbbb7cd 100644 --- a/dist/js/tabulator_esm.min.js.map +++ b/dist/js/tabulator_esm.min.js.map @@ -1 +1 @@ -{"version":3,"file":"tabulator_esm.min.js","sources":["../../src/js/core/CoreFeature.js","../../src/js/core/Module.js","../../src/js/core/tools/Helpers.js","../../src/js/modules/Accessor/Accessor.js","../../src/js/modules/Accessor/defaults/accessors.js","../../src/js/modules/Ajax/defaults/urlGenerator.js","../../src/js/modules/Ajax/defaults/contentTypeFormatters.js","../../src/js/modules/Ajax/Ajax.js","../../src/js/modules/Ajax/defaults/config.js","../../src/js/modules/Ajax/defaults/loaderPromise.js","../../src/js/modules/Clipboard/Clipboard.js","../../src/js/modules/Clipboard/defaults/pasteActions.js","../../src/js/modules/Clipboard/defaults/pasteParsers.js","../../src/js/modules/ColumnCalcs/CalcComponent.js","../../src/js/core/cell/CellComponent.js","../../src/js/core/cell/Cell.js","../../src/js/core/column/ColumnComponent.js","../../src/js/core/column/defaults/options.js","../../src/js/core/column/Column.js","../../src/js/core/row/RowComponent.js","../../src/js/core/row/Row.js","../../src/js/modules/ColumnCalcs/defaults/calculations.js","../../src/js/modules/ColumnCalcs/ColumnCalcs.js","../../src/js/modules/DataTree/DataTree.js","../../src/js/modules/Download/defaults/downloaders.js","../../src/js/modules/Download/defaults/downloaders/csv.js","../../src/js/modules/Download/defaults/downloaders/json.js","../../src/js/modules/Download/defaults/downloaders/jsonLines.js","../../src/js/modules/Download/defaults/downloaders/pdf.js","../../src/js/modules/Download/defaults/downloaders/xlsx.js","../../src/js/modules/Download/defaults/downloaders/html.js","../../src/js/modules/Download/Download.js","../../src/js/modules/Edit/inputMask.js","../../src/js/modules/Edit/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/select.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/plaintext.js","../../src/js/modules/Format/defaults/formatters.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/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/defaults/undoers.js","../../src/js/modules/History/History.js","../../src/js/modules/HtmlTableImport/HtmlTableImport.js","../../src/js/modules/History/defaults/redoers.js","../../src/js/modules/Import/defaults/importers/csv.js","../../src/js/modules/Import/Import.js","../../src/js/modules/Import/defaults/importers/json.js","../../src/js/modules/Interaction/Interaction.js","../../src/js/modules/Keybindings/defaults/bindings.js","../../src/js/modules/Keybindings/Keybindings.js","../../src/js/modules/Menu/Menu.js","../../src/js/modules/Keybindings/defaults/actions.js","../../src/js/modules/MoveColumns/MoveColumns.js","../../src/js/modules/MoveRows/MoveRows.js","../../src/js/modules/Mutator/defaults/mutators.js","../../src/js/modules/Mutator/Mutator.js","../../src/js/modules/Page/defaults/pageCounters/rows.js","../../src/js/modules/Page/Page.js","../../src/js/modules/Page/defaults/pageCounters/pages.js","../../src/js/modules/Page/defaults/pageCounters.js","../../src/js/modules/Persistence/defaults/readers.js","../../src/js/modules/Persistence/defaults/writers.js","../../src/js/modules/Persistence/Persistence.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/date.js","../../src/js/modules/Sort/defaults/sorters/number.js","../../src/js/modules/Sort/defaults/sorters.js","../../src/js/modules/Sort/defaults/sorters/string.js","../../src/js/modules/Sort/defaults/sorters/time.js","../../src/js/modules/Sort/defaults/sorters/boolean.js","../../src/js/modules/Sort/Sort.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/Validate/defaults/validators.js","../../src/js/modules/Validate/Validate.js","../../src/js/core/defaults/options.js","../../src/js/core/tools/OptionsList.js","../../src/js/core/rendering/Renderer.js","../../src/js/core/rendering/renderers/BasicHorizontal.js","../../src/js/core/rendering/renderers/VirtualDomHorizontal.js","../../src/js/core/ColumnManager.js","../../src/js/core/rendering/renderers/BasicVertical.js","../../src/js/core/rendering/renderers/VirtualDomVertical.js","../../src/js/core/RowManager.js","../../src/js/core/FooterManager.js","../../src/js/core/tools/InteractionMonitor.js","../../src/js/core/tools/ComponentFunctionBinder.js","../../src/js/core/tools/DataLoader.js","../../src/js/core/tools/ExternalEventBus.js","../../src/js/core/tools/InternalEventBus.js","../../src/js/core/tools/TableRegistry.js","../../src/js/modules/Layout/defaults/modes/fitData.js","../../src/js/modules/Layout/defaults/modes/fitDataStretch.js","../../src/js/modules/Layout/defaults/modes/fitDataGeneral.js","../../src/js/modules/Layout/Layout.js","../../src/js/modules/Layout/defaults/modes/fitColumns.js","../../src/js/modules/Layout/defaults/modes.js","../../src/js/modules/Localize/defaults/langs.js","../../src/js/modules/Localize/Localize.js","../../src/js/modules/Comms/Comms.js","../../src/js/core/tools/ModuleBinder.js","../../src/js/core/Tabulator.js","../../src/js/core/row/PseudoRow.js"],"sourcesContent":["export default class CoreFeature{\r\n\r\n\tconstructor(table){\r\n\t\tthis.table = table;\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t/////////////// DataLoad /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\treloadData(data, silent){\r\n\t\treturn this.table.dataLoader.load(data, undefined, undefined, undefined, silent);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t///////////// Localization ///////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tlangText(){\r\n\t\treturn this.table.modules.localize.getText(...arguments);\r\n\t}\r\n\r\n\tlangBind(){\r\n\t\treturn this.table.modules.localize.bind(...arguments);\r\n\t}\r\n\r\n\tlangLocale(){\r\n\t\treturn this.table.modules.localize.getLocale(...arguments);\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t////////// Inter Table Comms /////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tcommsConnections(){\r\n\t\treturn this.table.modules.comms.getConnections(...arguments);\r\n\t}\r\n\r\n\tcommsSend(){\r\n\t\treturn this.table.modules.comms.send(...arguments);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Layout /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tlayoutMode(){\r\n\t\treturn this.table.modules.layout.getMode();\r\n\t}\r\n\r\n\tlayoutRefresh(){\r\n\t\treturn this.table.modules.layout.layout();\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t/////////////// Event Bus ////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tsubscribe(){\r\n\t\treturn this.table.eventBus.subscribe(...arguments);\r\n\t}\r\n\r\n\tunsubscribe(){\r\n\t\treturn this.table.eventBus.unsubscribe(...arguments);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.table.eventBus.subscribed(key);\r\n\t}\r\n\r\n\tsubscriptionChange(){\r\n\t\treturn this.table.eventBus.subscriptionChange(...arguments);\r\n\t}\r\n\r\n\tdispatch(){\r\n\t\treturn this.table.eventBus.dispatch(...arguments);\r\n\t}\r\n\r\n\tchain(){\r\n\t\treturn this.table.eventBus.chain(...arguments);\r\n\t}\r\n\r\n\tconfirm(){\r\n\t\treturn this.table.eventBus.confirm(...arguments);\r\n\t}\r\n\r\n\tdispatchExternal(){\r\n\t\treturn this.table.externalEvents.dispatch(...arguments);\r\n\t}\r\n\r\n\tsubscribedExternal(key){\r\n\t\treturn this.table.externalEvents.subscribed(key);\r\n\t}\r\n\r\n\tsubscriptionChangeExternal(){\r\n\t\treturn this.table.externalEvents.subscriptionChange(...arguments);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Options /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\toptions(key){\r\n\t\treturn this.table.options[key];\r\n\t}\r\n\r\n\tsetOption(key, value){\r\n\t\tif(typeof value !== \"undefined\"){\r\n\t\t\tthis.table.options[key] = value;\r\n\t\t}\r\n\r\n\t\treturn this.table.options[key];\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Modules /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tmodule(key){\r\n\t\treturn this.table.module(key);\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\n\r\nclass Module extends CoreFeature{\r\n\r\n\tconstructor(table, name){\r\n\t\tsuper(table);\r\n\r\n\t\tthis._handler = null;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\t// setup module when table is initialized, to be overriden in module\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t////// Options Registration ///////\r\n\t///////////////////////////////////\r\n\r\n\tregisterTableOption(key, value){\r\n\t\tthis.table.optionsList.register(key, value);\r\n\t}\r\n\r\n\tregisterColumnOption(key, value){\r\n\t\tthis.table.columnManager.optionsList.register(key, value);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t/// Public Function Registation ///\r\n\t///////////////////////////////////\r\n\r\n\tregisterTableFunction(name, func){\r\n\t\tif(typeof this.table[name] === \"undefined\"){\r\n\t\t\tthis.table[name] = func;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Unable to bind table function, name already in use\", name)\r\n\t\t}\r\n\t}\r\n\r\n\tregisterComponentFunction(component, func, handler){\r\n\t\treturn this.table.componentFunctionBinder.bind(component, func, handler);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Data Pipeline //////////\r\n\t///////////////////////////////////\r\n\r\n\tregisterDataHandler(handler, priority){\r\n\t\tthis.table.rowManager.registerDataPipelineHandler(handler, priority)\r\n\t\tthis._handler = handler;\r\n\t}\r\n\r\n\tregisterDisplayHandler(handler, priority){\r\n\t\tthis.table.rowManager.registerDisplayPipelineHandler(handler, priority)\r\n\t\tthis._handler = handler;\r\n\t}\r\n\r\n\trefreshData(renderInPosition, handler){\r\n\t\tif(!handler){\r\n\t\t\thandler = this._handler;\r\n\t\t}\r\n\r\n\t\tif(handler){\r\n\t\t\tthis.table.rowManager.refreshActiveData(handler, false, renderInPosition);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport default Module;","export default class Helpers{\r\n\r\n\tstatic elVisible(el){\r\n\t\treturn !(el.offsetWidth <= 0 && el.offsetHeight <= 0);\r\n\t}\r\n\r\n\tstatic elOffset(el){\r\n\t\tvar box = el.getBoundingClientRect();\r\n\r\n\t\treturn {\r\n\t\t\ttop: box.top + window.pageYOffset - document.documentElement.clientTop,\r\n\t\t\tleft: box.left + window.pageXOffset - document.documentElement.clientLeft\r\n\t\t};\r\n\t}\r\n\r\n\tstatic deepClone(obj, clone, list = []){\r\n\t\tvar objectProto = {}.__proto__,\r\n\t\tarrayProto = [].__proto__;\r\n\r\n\t\tif (!clone){\r\n\t\t\tclone = Object.assign(Array.isArray(obj) ? [] : {}, obj);\r\n\t\t}\r\n\r\n\t\tfor(var i in obj) {\r\n\t\t\tlet subject = obj[i],\r\n\t\t\tmatch, copy;\r\n\r\n\t\t\tif(subject != null && typeof subject === \"object\" && (subject.__proto__ === objectProto || subject.__proto__ === arrayProto)){\r\n\t\t\t\tmatch = list.findIndex((item) => {\r\n\t\t\t\t\treturn item.subject === subject;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(match > -1){\r\n\t\t\t\t\tclone[i] = list[match].copy;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcopy = Object.assign(Array.isArray(subject) ? [] : {}, subject);\r\n\r\n\t\t\t\t\tlist.unshift({subject, copy});\r\n\r\n\t\t\t\t\tclone[i] = this.deepClone(subject, copy, list);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn clone;\r\n\t}\r\n}","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defautlAccessors from './defaults/accessors.js';\r\n\r\nclass Accessor extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.allowedTypes = [\"\", \"data\", \"download\", \"clipboard\", \"print\", \"htmlOutput\"] //list of accessor types\r\n\r\n\t\tthis.registerColumnOption(\"accessor\");\r\n\t\tthis.registerColumnOption(\"accessorParams\");\r\n\t\tthis.registerColumnOption(\"accessorData\");\r\n\t\tthis.registerColumnOption(\"accessorDataParams\");\r\n\t\tthis.registerColumnOption(\"accessorDownload\");\r\n\t\tthis.registerColumnOption(\"accessorDownloadParams\");\r\n\t\tthis.registerColumnOption(\"accessorClipboard\");\r\n\t\tthis.registerColumnOption(\"accessorClipboardParams\");\r\n\t\tthis.registerColumnOption(\"accessorPrint\");\r\n\t\tthis.registerColumnOption(\"accessorPrintParams\");\r\n\t\tthis.registerColumnOption(\"accessorHtmlOutput\");\r\n\t\tthis.registerColumnOption(\"accessorHtmlOutputParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"row-data-retrieve\", this.transformRow.bind(this));\r\n\t}\r\n\r\n\t//initialize column accessor\r\n\tinitializeColumn(column){\r\n\t\tvar match = false,\r\n\t\tconfig = {};\r\n\r\n\t\tthis.allowedTypes.forEach((type) => {\r\n\t\t\tvar key = \"accessor\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\t\taccessor;\r\n\r\n\t\t\tif(column.definition[key]){\r\n\t\t\t\taccessor = this.lookupAccessor(column.definition[key]);\r\n\r\n\t\t\t\tif(accessor){\r\n\t\t\t\t\tmatch = true;\r\n\r\n\t\t\t\t\tconfig[key] = {\r\n\t\t\t\t\t\taccessor:accessor,\r\n\t\t\t\t\t\tparams: column.definition[key + \"Params\"] || {},\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tcolumn.modules.accessor = config;\r\n\t\t}\r\n\t}\r\n\r\n\tlookupAccessor(value){\r\n\t\tvar accessor = false;\r\n\r\n\t\t//set column accessor\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Accessor.accessors[value]){\r\n\t\t\t\taccessor = Accessor.accessors[value]\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Accessor Error - No such accessor found, ignoring: \", value);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\taccessor = value;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn accessor;\r\n\t}\r\n\r\n\t//apply accessor to row\r\n\ttransformRow(row, type){\r\n\t\tvar key = \"accessor\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\trowComponent = row.getComponent();\r\n\r\n\t\t//clone data object with deep copy to isolate internal data from returned result\r\n\t\tvar data = Helpers.deepClone(row.data || {});\r\n\r\n\t\tthis.table.columnManager.traverse(function(column){\r\n\t\t\tvar value, accessor, params, colCompnent;\r\n\r\n\t\t\tif(column.modules.accessor){\r\n\r\n\t\t\t\taccessor = column.modules.accessor[key] || column.modules.accessor.accessor || false;\r\n\r\n\t\t\t\tif(accessor){\r\n\t\t\t\t\tvalue = column.getFieldValue(data);\r\n\r\n\t\t\t\t\tif(value != \"undefined\"){\r\n\t\t\t\t\t\tcolCompnent = column.getComponent();\r\n\t\t\t\t\t\tparams = typeof accessor.params === \"function\" ? accessor.params(value, data, type, colCompnent, rowComponent) : accessor.params;\r\n\t\t\t\t\t\tcolumn.setFieldValue(data, accessor.accessor(value, data, type, params, colCompnent, rowComponent));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n}\r\n\r\n//load defaults\r\nAccessor.moduleName = \"accessor\";\r\nAccessor.accessors = defautlAccessors;\r\n\r\nexport default Accessor;","export default {}","function generateParamsList(data, prefix){\r\n\tvar output = [];\r\n\r\n\tprefix = prefix || \"\";\r\n\r\n\tif(Array.isArray(data)){\r\n\t\tdata.forEach((item, i) => {\r\n\t\t\toutput = output.concat(generateParamsList(item, prefix ? prefix + \"[\" + i + \"]\" : i));\r\n\t\t});\r\n\t}else if (typeof data === \"object\"){\r\n\t\tfor (var key in data){\r\n\t\t\toutput = output.concat(generateParamsList(data[key], prefix ? prefix + \"[\" + key + \"]\" : key));\r\n\t\t}\r\n\t}else{\r\n\t\toutput.push({key:prefix, value:data});\r\n\t}\r\n\r\n\treturn output;\r\n}\r\n\r\nfunction serializeParams(params){\r\n\tvar output = generateParamsList(params),\r\n\tencoded = [];\r\n\r\n\toutput.forEach(function(item){\r\n\t\tencoded.push(encodeURIComponent(item.key) + \"=\" + encodeURIComponent(item.value));\r\n\t});\r\n\r\n\treturn encoded.join(\"&\");\r\n}\r\n\r\nexport default function(url, config, params){\r\n\tif(url){\r\n\t\tif(params && Object.keys(params).length){\r\n\t\t\tif(!config.method || config.method.toLowerCase() == \"get\"){\r\n\t\t\t\tconfig.method = \"get\";\r\n\r\n\t\t\t\turl += (url.includes(\"?\") ? \"&\" : \"?\") + serializeParams(params);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn url;\r\n};","function generateParamsList(data, prefix){\r\n\tvar output = [];\r\n\r\n\tprefix = prefix || \"\";\r\n\r\n\tif(Array.isArray(data)){\r\n\t\tdata.forEach((item, i) => {\r\n\t\t\toutput = output.concat(generateParamsList(item, prefix ? prefix + \"[\" + i + \"]\" : i));\r\n\t\t});\r\n\t}else if (typeof data === \"object\"){\r\n\t\tfor (var key in data){\r\n\t\t\toutput = output.concat(generateParamsList(data[key], prefix ? prefix + \"[\" + key + \"]\" : key));\r\n\t\t}\r\n\t}else{\r\n\t\toutput.push({key:prefix, value:data});\r\n\t}\r\n\r\n\treturn output;\r\n}\r\n\r\nexport default {\r\n\t\"json\":{\r\n\t\theaders:{\r\n\t\t\t'Content-Type': 'application/json',\r\n\t\t},\r\n\t\tbody:function(url, config, params){\r\n\t\t\treturn JSON.stringify(params);\r\n\t\t},\r\n\t},\r\n\t\"form\":{\r\n\t\theaders:{\r\n\t\t},\r\n\t\tbody:function(url, config, params){\r\n\r\n\t\t\tvar output = generateParamsList(params),\r\n\t\t\tform = new FormData();\r\n\r\n\t\t\toutput.forEach(function(item){\r\n\t\t\t\tform.append(item.key, item.value);\r\n\t\t\t});\r\n\r\n\t\t\treturn form;\r\n\t\t},\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultConfig from './defaults/config.js';\r\nimport defaultURLGenerator from './defaults/urlGenerator.js';\r\nimport defaultLoaderPromise from './defaults/loaderPromise.js';\r\nimport defaultContentTypeFormatters from './defaults/contentTypeFormatters.js';\r\n\r\nclass Ajax extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.config = {}; //hold config object for ajax request\r\n\t\tthis.url = \"\"; //request URL\r\n\t\tthis.urlGenerator = false;\r\n\t\tthis.params = false; //request parameters\r\n\t\t\r\n\t\tthis.loaderPromise = false;\r\n\t\t\r\n\t\tthis.registerTableOption(\"ajaxURL\", false); //url for ajax loading\r\n\t\tthis.registerTableOption(\"ajaxURLGenerator\", false);\r\n\t\tthis.registerTableOption(\"ajaxParams\", {}); //params for ajax loading\r\n\t\tthis.registerTableOption(\"ajaxConfig\", \"get\"); //ajax request type\r\n\t\tthis.registerTableOption(\"ajaxContentType\", \"form\"); //ajax request type\r\n\t\tthis.registerTableOption(\"ajaxRequestFunc\", false); //promise function\r\n\t\t\r\n\t\tthis.registerTableOption(\"ajaxRequesting\", function(){});\r\n\t\tthis.registerTableOption(\"ajaxResponse\", false);\r\n\t\t\r\n\t\tthis.contentTypeFormatters = Ajax.contentTypeFormatters;\r\n\t}\r\n\t\r\n\t//initialize setup options\r\n\tinitialize(){\r\n\t\tthis.loaderPromise = this.table.options.ajaxRequestFunc || Ajax.defaultLoaderPromise;\r\n\t\tthis.urlGenerator = this.table.options.ajaxURLGenerator || Ajax.defaultURLGenerator;\r\n\t\t\r\n\t\tif(this.table.options.ajaxURL){\r\n\t\t\tthis.setUrl(this.table.options.ajaxURL);\r\n\t\t}\r\n\r\n\r\n\t\tthis.setDefaultConfig(this.table.options.ajaxConfig);\r\n\t\t\r\n\t\tthis.registerTableFunction(\"getAjaxUrl\", this.getUrl.bind(this));\r\n\t\t\r\n\t\tthis.subscribe(\"data-loading\", this.requestDataCheck.bind(this));\r\n\t\tthis.subscribe(\"data-params\", this.requestParams.bind(this));\r\n\t\tthis.subscribe(\"data-load\", this.requestData.bind(this));\r\n\t}\r\n\t\r\n\trequestParams(data, config, silent, params){\r\n\t\tvar ajaxParams = this.table.options.ajaxParams;\r\n\t\t\r\n\t\tif(ajaxParams){\r\n\t\t\tif(typeof ajaxParams === \"function\"){\r\n\t\t\t\tajaxParams = ajaxParams.call(this.table);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tparams = Object.assign(params, ajaxParams);\r\n\t\t}\t\t\r\n\t\t\r\n\t\treturn params;\r\n\t}\r\n\t\r\n\trequestDataCheck(data, params, config, silent){\r\n\t\treturn !!((!data && this.url) || typeof data === \"string\");\r\n\t}\r\n\t\r\n\trequestData(url, params, config, silent, previousData){\r\n\t\tvar ajaxConfig;\r\n\t\t\r\n\t\tif(!previousData && this.requestDataCheck(url)){\r\n\t\t\tif(url){\r\n\t\t\t\tthis.setUrl(url);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tajaxConfig = this.generateConfig(config);\r\n\t\t\t\r\n\t\t\treturn this.sendRequest(this.url, params, ajaxConfig);\r\n\t\t}else{\r\n\t\t\treturn previousData;\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetDefaultConfig(config = {}){\r\n\t\tthis.config = Object.assign({}, Ajax.defaultConfig);\r\n\r\n\t\tif(typeof config == \"string\"){\r\n\t\t\tthis.config.method = config;\r\n\t\t}else{\r\n\t\t\tObject.assign(this.config, config);\r\n\t\t}\r\n\t}\r\n\t\r\n\t//load config object\r\n\tgenerateConfig(config = {}){\r\n\t\tvar ajaxConfig = Object.assign({}, this.config)\r\n\t\t\r\n\t\tif(typeof config == \"string\"){\r\n\t\t\tajaxConfig.method = config;\r\n\t\t}else{\r\n\t\t\tObject.assign(ajaxConfig, config);\r\n\t\t}\r\n\t\t\r\n\t\treturn ajaxConfig;\r\n\t}\r\n\t\r\n\t//set request url\r\n\tsetUrl(url){\r\n\t\tthis.url = url;\r\n\t}\r\n\t\r\n\t//get request url\r\n\tgetUrl(){\r\n\t\treturn this.url;\r\n\t}\r\n\t\r\n\t//send ajax request\r\n\tsendRequest(url, params, config){\r\n\t\tif(this.table.options.ajaxRequesting.call(this.table, url, params) !== false){\r\n\t\t\treturn this.loaderPromise(url, config, params)\r\n\t\t\t.then((data)=>{\r\n\t\t\t\tif(this.table.options.ajaxResponse){\r\n\t\t\t\t\tdata = this.table.options.ajaxResponse.call(this.table, url, params, data);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn data;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n}\r\n\r\nAjax.moduleName = \"ajax\";\r\n\r\n//load defaults\r\nAjax.defaultConfig = defaultConfig;\r\nAjax.defaultURLGenerator = defaultURLGenerator;\r\nAjax.defaultLoaderPromise = defaultLoaderPromise;\r\nAjax.contentTypeFormatters = defaultContentTypeFormatters;\r\n\r\nexport default Ajax;","export default {\r\n\tmethod: \"GET\",\r\n};","export default function(url, config, params){\r\n\tvar contentType;\r\n\r\n\treturn new Promise((resolve, reject) => {\r\n\t\t//set url\r\n\t\turl = this.urlGenerator.call(this.table, url, config, params);\r\n\r\n\t\t//set body content if not GET request\r\n\t\tif(config.method.toUpperCase() != \"GET\"){\r\n\t\t\tcontentType = typeof this.table.options.ajaxContentType === \"object\" ? this.table.options.ajaxContentType : this.contentTypeFormatters[this.table.options.ajaxContentType];\r\n\t\t\tif(contentType){\r\n\r\n\t\t\t\tfor(var key in contentType.headers){\r\n\t\t\t\t\tif(!config.headers){\r\n\t\t\t\t\t\tconfig.headers = {};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(typeof config.headers[key] === \"undefined\"){\r\n\t\t\t\t\t\tconfig.headers[key] = contentType.headers[key];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconfig.body = contentType.body.call(this, url, config, params);\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Ajax Error - Invalid ajaxContentType value:\", this.table.options.ajaxContentType);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(url){\r\n\t\t\t//configure headers\r\n\t\t\tif(typeof config.headers === \"undefined\"){\r\n\t\t\t\tconfig.headers = {};\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.headers.Accept === \"undefined\"){\r\n\t\t\t\tconfig.headers.Accept = \"application/json\";\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.headers[\"X-Requested-With\"] === \"undefined\"){\r\n\t\t\t\tconfig.headers[\"X-Requested-With\"] = \"XMLHttpRequest\";\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.mode === \"undefined\"){\r\n\t\t\t\tconfig.mode = \"cors\";\r\n\t\t\t}\r\n\r\n\t\t\tif(config.mode == \"cors\"){\r\n\t\t\t\tif(typeof config.headers[\"Origin\"] === \"undefined\"){\r\n\t\t\t\t\tconfig.headers[\"Origin\"] = window.location.origin;\r\n\t\t\t\t}\r\n \r\n\t\t\t\tif(typeof config.credentials === \"undefined\"){\r\n\t\t\t\t\tconfig.credentials = 'same-origin';\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(typeof config.credentials === \"undefined\"){\r\n\t\t\t\t\tconfig.credentials = 'include';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//send request\r\n\t\t\tfetch(url, config)\r\n\t\t\t.then((response)=>{\r\n\t\t\t\tif(response.ok) {\r\n\t\t\t\t\tresponse.json()\r\n\t\t\t\t\t.then((data)=>{\r\n\t\t\t\t\t\tresolve(data);\r\n\t\t\t\t\t}).catch((error)=>{\r\n\t\t\t\t\t\treject(error);\r\n\t\t\t\t\t\tconsole.warn(\"Ajax Load Error - Invalid JSON returned\", error);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \" + response.status, response.statusText);\r\n\t\t\t\t\treject(response);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.catch((error)=>{\r\n\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \", error);\r\n\t\t\t\treject(error);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Ajax Load Error - No URL Set\");\r\n\t\t\tresolve([]);\r\n\t\t}\r\n\t});\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultPasteActions from './defaults/pasteActions.js';\r\nimport defaultPasteParsers from './defaults/pasteParsers.js';\r\n\r\nclass Clipboard extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.mode = true;\r\n\t\tthis.pasteParser = function(){};\r\n\t\tthis.pasteAction = function(){};\r\n\t\tthis.customSelection = false;\r\n\t\tthis.rowRange = false;\r\n\t\tthis.blocked = true; //block copy actions not originating from this command\r\n\r\n\t\tthis.registerTableOption(\"clipboard\", false); //enable clipboard\r\n\t\tthis.registerTableOption(\"clipboardCopyStyled\", true); //formatted table data\r\n\t\tthis.registerTableOption(\"clipboardCopyConfig\", false); //clipboard config\r\n\t\tthis.registerTableOption(\"clipboardCopyFormatter\", false); //DEPRICATED - REMOVE in 5.0\r\n\t\tthis.registerTableOption(\"clipboardCopyRowRange\", \"active\"); //restrict clipboard to visible rows only\r\n\t\tthis.registerTableOption(\"clipboardPasteParser\", \"table\"); //convert pasted clipboard data to rows\r\n\t\tthis.registerTableOption(\"clipboardPasteAction\", \"insert\"); //how to insert pasted data into the table\r\n\r\n\t\tthis.registerColumnOption(\"clipboard\");\r\n\t\tthis.registerColumnOption(\"titleClipboard\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.mode = this.table.options.clipboard;\r\n\r\n\t\tthis.rowRange = this.table.options.clipboardCopyRowRange;\r\n\r\n\t\tif(this.mode === true || this.mode === \"copy\"){\r\n\t\t\tthis.table.element.addEventListener(\"copy\", (e) => {\r\n\t\t\t\tvar plain, html, list;\r\n\r\n\t\t\t\tif(!this.blocked){\r\n\t\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\t\tif(this.customSelection){\r\n\t\t\t\t\t\tplain = this.customSelection;\r\n\r\n\t\t\t\t\t\tif(this.table.options.clipboardCopyFormatter){\r\n\t\t\t\t\t\t\tplain = this.table.options.clipboardCopyFormatter(\"plain\", plain);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\r\n\t\t\t\t\t\tvar list = this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig, this.table.options.clipboardCopyStyled, this.rowRange, \"clipboard\");\r\n\r\n\t\t\t\t\t\thtml = this.table.modules.export.genereateHTMLTable(list);\r\n\t\t\t\t\t\tplain = html ? this.generatePlainContent(list) : \"\";\r\n\r\n\t\t\t\t\t\tif(this.table.options.clipboardCopyFormatter){\r\n\t\t\t\t\t\t\tplain = this.table.options.clipboardCopyFormatter(\"plain\", plain);\r\n\t\t\t\t\t\t\thtml = this.table.options.clipboardCopyFormatter(\"html\", html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (window.clipboardData && window.clipboardData.setData) {\r\n\t\t\t\t\t\twindow.clipboardData.setData('Text', plain);\r\n\t\t\t\t\t} else if (e.clipboardData && e.clipboardData.setData) {\r\n\t\t\t\t\t\te.clipboardData.setData('text/plain', plain);\r\n\t\t\t\t\t\tif(html){\r\n\t\t\t\t\t\t\te.clipboardData.setData('text/html', html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (e.originalEvent && e.originalEvent.clipboardData.setData) {\r\n\t\t\t\t\t\te.originalEvent.clipboardData.setData('text/plain', plain);\r\n\t\t\t\t\t\tif(html){\r\n\t\t\t\t\t\t\te.originalEvent.clipboardData.setData('text/html', html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.dispatchExternal(\"clipboardCopied\", plain, html);\r\n\r\n\t\t\t\t\tthis.reset();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.mode === true || this.mode === \"paste\"){\r\n\t\t\tthis.table.element.addEventListener(\"paste\", (e) => {\r\n\t\t\t\tthis.paste(e);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.setPasteParser(this.table.options.clipboardPasteParser);\r\n\t\tthis.setPasteAction(this.table.options.clipboardPasteAction);\r\n\r\n\t\tthis.registerTableFunction(\"copyToClipboard\", this.copy.bind(this));\r\n\t}\r\n\r\n\treset(){\r\n\t\tthis.blocked = true;\r\n\t\tthis.customSelection = false;\r\n\t}\r\n\r\n\tgeneratePlainContent (list) {\r\n\t\tvar output = [];\r\n\r\n\t\tlist.forEach((row) => {\r\n\t\t\tvar rowData = [];\r\n\r\n\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\tvar value = \"\";\r\n\r\n\t\t\t\tif(col){\r\n\r\n\t\t\t\t\tif(row.type === \"group\"){\r\n\t\t\t\t\t\tcol.value = col.component.getKey();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(col.value === null){\r\n\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\t\tvalue = JSON.stringify(col.value);\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tvalue = col.value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowData.push(value);\r\n\t\t\t});\r\n\r\n\t\t\toutput.push(rowData.join(\"\\t\"));\r\n\t\t});\r\n\r\n\t\treturn output.join(\"\\n\");\r\n\t}\r\n\r\n\tcopy (range, internal) {\r\n\t\tvar range, sel, textRange;\r\n\t\tthis.blocked = false;\r\n\t\tthis.customSelection = false;\r\n\r\n\t\tif (this.mode === true || this.mode === \"copy\") {\r\n\r\n\t\t\tthis.rowRange = range || this.table.options.clipboardCopyRowRange;\r\n\r\n\t\t\tif (typeof window.getSelection != \"undefined\" && typeof document.createRange != \"undefined\") {\r\n\t\t\t\trange = document.createRange();\r\n\t\t\t\trange.selectNodeContents(this.table.element);\r\n\t\t\t\tsel = window.getSelection();\r\n\r\n\t\t\t\tif (sel.toString() && internal) {\r\n\t\t\t\t\tthis.customSelection = sel.toString();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsel.removeAllRanges();\r\n\t\t\t\tsel.addRange(range);\r\n\t\t\t} else if (typeof document.selection != \"undefined\" && typeof document.body.createTextRange != \"undefined\") {\r\n\t\t\t\ttextRange = document.body.createTextRange();\r\n\t\t\t\ttextRange.moveToElementText(this.table.element);\r\n\t\t\t\ttextRange.select();\r\n\t\t\t}\r\n\r\n\t\t\tdocument.execCommand('copy');\r\n\r\n\t\t\tif (sel) {\r\n\t\t\t\tsel.removeAllRanges();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//PASTE EVENT HANDLING\r\n\tsetPasteAction(action){\r\n\r\n\t\tswitch(typeof action){\r\n\t\t\tcase \"string\":\r\n\t\t\tthis.pasteAction = Clipboard.pasteActions[action];\r\n\r\n\t\t\tif(!this.pasteAction){\r\n\t\t\t\tconsole.warn(\"Clipboard Error - No such paste action found:\", action);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tthis.pasteAction = action;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tsetPasteParser(parser){\r\n\t\tswitch(typeof parser){\r\n\t\t\tcase \"string\":\r\n\t\t\tthis.pasteParser = Clipboard.pasteParsers[parser];\r\n\r\n\t\t\tif(!this.pasteParser){\r\n\t\t\t\tconsole.warn(\"Clipboard Error - No such paste parser found:\", parser);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tthis.pasteParser = parser;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tpaste(e){\r\n\t\tvar data, rowData, rows;\r\n\r\n\t\tif(this.checkPaseOrigin(e)){\r\n\r\n\t\t\tdata = this.getPasteData(e);\r\n\r\n\t\t\trowData = this.pasteParser.call(this, data);\r\n\r\n\t\t\tif(rowData){\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\t\t\trowData = this.mutateData(rowData);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trows = this.pasteAction.call(this, rowData);\r\n\r\n\t\t\t\tthis.dispatchExternal(\"clipboardPasted\", data, rowData, rows);\r\n\t\t\t}else{\r\n\t\t\t\tthis.dispatchExternal(\"clipboardPasteError\", data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmutateData(data){\r\n\t\tvar output = [];\r\n\r\n\t\tif(Array.isArray(data)){\r\n\t\t\tdata.forEach((row) => {\r\n\t\t\t\toutput.push(this.table.modules.mutator.transformRow(row, \"clipboard\"));\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\toutput = data;\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\r\n\tcheckPaseOrigin(e){\r\n\t\tvar valid = true;\r\n\r\n\t\tif(e.target.tagName != \"DIV\" || this.table.modules.edit.currentCell){\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\r\n\t\treturn valid;\r\n\t}\r\n\r\n\tgetPasteData(e){\r\n\t\tvar data;\r\n\r\n\t\tif (window.clipboardData && window.clipboardData.getData) {\r\n\t\t\tdata = window.clipboardData.getData('Text');\r\n\t\t} else if (e.clipboardData && e.clipboardData.getData) {\r\n\t\t\tdata = e.clipboardData.getData('text/plain');\r\n\t\t} else if (e.originalEvent && e.originalEvent.clipboardData.getData) {\r\n\t\t\tdata = e.originalEvent.clipboardData.getData('text/plain');\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n}\r\n\r\nClipboard.moduleName = \"clipboard\";\r\n\r\n//load defaults\r\nClipboard.pasteActions = defaultPasteActions;\r\nClipboard.pasteParsers = defaultPasteParsers;\r\n\r\nexport default Clipboard;","export default {\r\n\treplace:function(rows){\r\n\t\treturn this.table.setData(rows);\r\n\t},\r\n\tupdate:function(rows){\r\n\t\treturn this.table.updateOrAddData(rows);\r\n\t},\r\n\tinsert:function(rows){\r\n\t\treturn this.table.addData(rows);\r\n\t},\r\n};","export default {\r\n\ttable:function(clipboard){\r\n\t\tvar data = [],\r\n\t\tsuccess = false,\r\n\t\theaderFindSuccess = true,\r\n\t\tcolumns = this.table.columnManager.columns,\r\n\t\tcolumnMap = [],\r\n\t\trows = [];\r\n\r\n\t\t//get data from clipboard into array of columns and rows.\r\n\t\tclipboard = clipboard.split(\"\\n\");\r\n\r\n\t\tclipboard.forEach(function(row){\r\n\t\t\tdata.push(row.split(\"\\t\"));\r\n\t\t});\r\n\r\n\t\tif(data.length && !(data.length === 1 && data[0].length < 2)){\r\n\t\t\tsuccess = true;\r\n\r\n\t\t\t//check if headers are present by title\r\n\t\t\tdata[0].forEach(function(value){\r\n\t\t\t\tvar column = columns.find(function(column){\r\n\t\t\t\t\treturn value && column.definition.title && value.trim() && column.definition.title.trim() === value.trim();\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tcolumnMap.push(column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\theaderFindSuccess = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t//check if column headers are present by field\r\n\t\t\tif(!headerFindSuccess){\r\n\t\t\t\theaderFindSuccess = true;\r\n\t\t\t\tcolumnMap = [];\r\n\r\n\t\t\t\tdata[0].forEach(function(value){\r\n\t\t\t\t\tvar column = columns.find(function(column){\r\n\t\t\t\t\t\treturn value && column.field && value.trim() && column.field.trim() === value.trim();\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(column){\r\n\t\t\t\t\t\tcolumnMap.push(column);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\theaderFindSuccess = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(!headerFindSuccess){\r\n\t\t\t\t\tcolumnMap = this.table.columnManager.columnsByIndex;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//remove header row if found\r\n\t\t\tif(headerFindSuccess){\r\n\t\t\t\tdata.shift();\r\n\t\t\t}\r\n\r\n\t\t\tdata.forEach(function(item){\r\n\t\t\t\tvar row = {};\r\n\r\n\t\t\t\titem.forEach(function(value, i){\r\n\t\t\t\t\tif(columnMap[i]){\r\n\t\t\t\t\t\trow[columnMap[i].field] = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\trows.push(row);\r\n\t\t\t});\r\n\r\n\t\t\treturn rows;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n};","class CalcComponent{\r\n\tconstructor (row){\r\n\t\tthis._row = row;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._row.table.componentFunctionBinder.handle(\"row\", target._row, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\treturn this._row.getData(transform);\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._row.getElement();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._row.table;\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._row.getCells().forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar cell = this._row.getCell(column);\r\n\t\treturn cell ? cell.getComponent() : false;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._row;\r\n\t}\r\n}\r\n\r\nexport default CalcComponent;","//public cell object\r\nexport default class CellComponent {\r\n\r\n\tconstructor (cell){\r\n\t\tthis._cell = cell;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._cell.table.componentFunctionBinder.handle(\"cell\", target._cell, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetValue(){\r\n\t\treturn this._cell.getValue();\r\n\t}\r\n\r\n\tgetOldValue(){\r\n\t\treturn this._cell.getOldValue();\r\n\t}\r\n\r\n\tgetInitialValue(){\r\n\t\treturn this._cell.initialValue;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._cell.getElement();\r\n\t}\r\n\r\n\tgetRow(){\r\n\t\treturn this._cell.row.getComponent();\r\n\t}\r\n\r\n\tgetData(){\r\n\t\treturn this._cell.row.getData();\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._cell.column.getField();\r\n\t}\r\n\r\n\tgetColumn(){\r\n\t\treturn this._cell.column.getComponent();\r\n\t}\r\n\r\n\tsetValue(value, mutate){\r\n\t\tif(typeof mutate == \"undefined\"){\r\n\t\t\tmutate = true;\r\n\t\t}\r\n\r\n\t\tthis._cell.setValue(value, mutate);\r\n\t}\r\n\r\n\trestoreOldValue(){\r\n\t\tthis._cell.setValueActual(this._cell.getOldValue());\r\n\t}\r\n\r\n\trestoreInitialValue(){\r\n\t\tthis._cell.setValueActual(this._cell.initialValue);\r\n\t}\r\n\r\n\tcheckHeight(){\r\n\t\tthis._cell.checkHeight();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._cell.table;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._cell;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport CellComponent from './CellComponent.js';\r\n\r\nexport default class Cell extends CoreFeature{\r\n\tconstructor(column, row){\r\n\t\tsuper(column.table);\r\n\r\n\t\tthis.table = column.table;\r\n\t\tthis.column = column;\r\n\t\tthis.row = row;\r\n\t\tthis.element = null;\r\n\t\tthis.value = null;\r\n\t\tthis.initialValue;\r\n\t\tthis.oldValue = null;\r\n\t\tthis.modules = {};\r\n\r\n\t\tthis.height = null;\r\n\t\tthis.width = null;\r\n\t\tthis.minWidth = null;\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\tthis.loaded = false; //track if the cell has been added to the DOM yet\r\n\r\n\t\tthis.build();\r\n\t}\r\n\r\n\t//////////////// Setup Functions /////////////////\r\n\t//generate element\r\n\tbuild(){\r\n\t\tthis.generateElement();\r\n\r\n\t\tthis.setWidth();\r\n\r\n\t\tthis._configureCell();\r\n\r\n\t\tthis.setValueActual(this.column.getFieldValue(this.row.data));\r\n\r\n\t\tthis.initialValue = this.value;\r\n\t}\r\n\r\n\tgenerateElement(){\r\n\t\tthis.element = document.createElement('div');\r\n\t\tthis.element.className = \"tabulator-cell\";\r\n\t\tthis.element.setAttribute(\"role\", \"gridcell\");\r\n\t\tthis.element = this.element;\r\n\t}\r\n\r\n\t_configureCell(){\r\n\t\tvar element = this.element,\r\n\t\tfield = this.column.getField(),\r\n\t\tvertAligns = {\r\n\t\t\ttop:\"flex-start\",\r\n\t\t\tbottom:\"flex-end\",\r\n\t\t\tmiddle:\"center\",\r\n\t\t},\r\n\t\thozAligns = {\r\n\t\t\tleft:\"flex-start\",\r\n\t\t\tright:\"flex-end\",\r\n\t\t\tcenter:\"center\",\r\n\t\t};\r\n\r\n\t\t//set text alignment\r\n\t\telement.style.textAlign = this.column.hozAlign;\r\n\r\n\t\tif(this.column.vertAlign){\r\n\t\t\telement.style.display = \"inline-flex\";\r\n\r\n\t\t\telement.style.alignItems = vertAligns[this.column.vertAlign] || \"\";\r\n\r\n\t\t\tif(this.column.hozAlign){\r\n\t\t\t\telement.style.justifyContent = hozAligns[this.column.hozAlign] || \"\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(field){\r\n\t\t\telement.setAttribute(\"tabulator-field\", field);\r\n\t\t}\r\n\r\n\t\t//add class to cell if needed\r\n\t\tif(this.column.definition.cssClass){\r\n\t\t\tvar classNames = this.column.definition.cssClass.split(\" \")\r\n\t\t\tclassNames.forEach((className) => {\r\n\t\t\t\telement.classList.add(className)\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t//update tooltip on mouse enter\r\n\t\tif (this.table.options.tooltipGenerationMode === \"hover\"){\r\n\t\t\telement.addEventListener(\"mouseenter\", (e) => {\r\n\t\t\t\tthis._generateTooltip();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"cell-init\", this);\r\n\r\n\t\t//hide cell if not visible\r\n\t\tif(!this.column.visible){\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\r\n\t//generate cell contents\r\n\t_generateContents(){\r\n\t\tvar val;\r\n\r\n\t\tval = this.chain(\"cell-format\", this, null, () => {\r\n\t\t\treturn this.element.innerHTML = this.value;\r\n\t\t});\r\n\r\n\t\tswitch(typeof val){\r\n\t\t\tcase \"object\":\r\n\t\t\tif(val instanceof Node){\r\n\r\n\t\t\t\t//clear previous cell contents\r\n\t\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\t\tthis.element.appendChild(val);\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.innerHTML = \"\";\r\n\r\n\t\t\t\tif(val != null){\r\n\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);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\tcase \"null\":\r\n\t\t\tthis.element.innerHTML = \"\";\r\n\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\tthis.element.innerHTML = val;\r\n\t\t}\r\n\t}\r\n\r\n\tcellRendered(){\r\n\t\tthis.dispatch(\"cell-rendered\", this);\r\n\t}\r\n\r\n\t//generate tooltip text\r\n\t_generateTooltip(){\r\n\t\tvar tooltip = this.column.tooltip;\r\n\r\n\t\tif(tooltip){\r\n\t\t\tif(tooltip === true){\r\n\t\t\t\ttooltip = this.value;\r\n\t\t\t}else if(typeof(tooltip) == \"function\"){\r\n\t\t\t\ttooltip = tooltip(this.getComponent());\r\n\r\n\t\t\t\tif(tooltip === false){\r\n\t\t\t\t\ttooltip = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof tooltip === \"undefined\"){\r\n\t\t\t\ttooltip = \"\";\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.setAttribute(\"title\", tooltip);\r\n\t\t}else{\r\n\t\t\tthis.element.setAttribute(\"title\", \"\");\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////////// Getters ////////////////////\r\n\tgetElement(containerOnly){\r\n\t\tif(!this.loaded){\r\n\t\t\tthis.loaded = true;\r\n\t\t\tif(!containerOnly){\r\n\t\t\t\tthis.layoutElement();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tgetValue(){\r\n\t\treturn this.value;\r\n\t}\r\n\r\n\tgetOldValue(){\r\n\t\treturn this.oldValue;\r\n\t}\r\n\r\n\t//////////////////// Actions ////////////////////\r\n\tsetValue(value, mutate){\r\n\t\tvar changed = this.setValueProcessData(value, mutate);\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.dispatch(\"cell-value-updated\", this);\r\n\r\n\t\t\tthis.cellRendered();\r\n\r\n\t\t\tif(this.column.definition.cellEdited){\r\n\t\t\t\tthis.column.definition.cellEdited.call(this.table, this.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"cellEdited\", this.getComponent());\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tsetValueProcessData(value, mutate){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(this.value !== value){\r\n\r\n\t\t\tchanged = true;\r\n\r\n\t\t\tif(mutate){\r\n\t\t\t\tvalue = this.chain(\"cell-value-changing\", [this, value], null, value);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.setValueActual(value);\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.dispatch(\"cell-value-changed\", this);\r\n\t\t}\r\n\r\n\t\treturn changed;\r\n\t}\r\n\r\n\tsetValueActual(value){\r\n\t\tthis.oldValue = this.value;\r\n\r\n\t\tthis.value = value;\r\n\r\n\t\tthis.dispatch(\"cell-value-save-before\", this);\r\n\r\n\t\tthis.column.setFieldValue(this.row.data, value);\r\n\r\n\t\tthis.dispatch(\"cell-value-save-after\", this);\r\n\r\n\t\tif(this.loaded){\r\n\t\t\tthis.layoutElement();\r\n\t\t}\r\n\t}\r\n\r\n\tlayoutElement(){\r\n\t\tthis._generateContents();\r\n\t\tthis._generateTooltip();\r\n\r\n\t\tthis.dispatch(\"cell-layout\", this);\r\n\t}\r\n\r\n\tsetWidth(){\r\n\t\tthis.width = this.column.width;\r\n\t\tthis.element.style.width = this.column.widthStyled;\r\n\t}\r\n\r\n\tclearWidth(){\r\n\t\tthis.width = \"\";\r\n\t\tthis.element.style.width = \"\";\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\treturn this.width || this.element.offsetWidth;\r\n\t}\r\n\r\n\tsetMinWidth(){\r\n\t\tthis.minWidth = this.column.minWidth;\r\n\t\tthis.element.style.minWidth = this.column.minWidthStyled;\r\n\t}\r\n\r\n\tsetMaxWidth(){\r\n\t\tthis.maxWidth = this.column.maxWidth;\r\n\t\tthis.element.style.maxWidth = this.column.maxWidthStyled;\r\n\t}\r\n\r\n\tcheckHeight(){\r\n\t\t// var height = this.element.css(\"height\");\r\n\t\tthis.row.reinitializeHeight();\r\n\t}\r\n\r\n\tclearHeight(){\r\n\t\tthis.element.style.height = \"\";\r\n\t\tthis.height = null;\r\n\t}\r\n\r\n\tsetHeight(){\r\n\t\tthis.height = this.row.height;\r\n\t\tthis.element.style.height = this.row.heightStyled;\r\n\t}\r\n\r\n\tgetHeight(){\r\n\t\treturn this.height || this.element.offsetHeight;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tthis.element.style.display = this.column.vertAlign ? \"inline-flex\" : \"\";\r\n\t}\r\n\r\n\thide(){\r\n\t\tthis.element.style.display = \"none\";\r\n\t}\r\n\r\n\tdelete(){\r\n\t\tthis.dispatch(\"cell-delete\", this);\r\n\r\n\t\tif(!this.table.rowManager.redrawBlock && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.column.deleteCell(this);\r\n\t\tthis.row.deleteCell(this);\r\n\t\tthis.calcs = {};\r\n\t}\r\n\r\n\tgetIndex(){\r\n\t\treturn this.row.getCellIndex(this);\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new CellComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}","import Column from './Column.js';\r\n\r\n//public column object\r\nexport default class ColumnComponent {\r\n\tconstructor (column){\r\n\t\tthis._column = column;\r\n\t\tthis.type = \"ColumnComponent\";\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._column.table.componentFunctionBinder.handle(\"column\", target._column, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._column.getElement();\r\n\t}\r\n\r\n\tgetDefinition(){\r\n\t\treturn this._column.getDefinition();\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._column.getField();\r\n\t}\r\n\r\n\tgetTitleDownload() {\r\n\t\treturn this._column.getTitleDownload();\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._column.cells.forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tisVisible(){\r\n\t\treturn this._column.visible;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tif(this._column.isGroup){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\tcolumn.show();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis._column.show();\r\n\t\t}\r\n\t}\r\n\r\n\thide(){\r\n\t\tif(this._column.isGroup){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\tcolumn.hide();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis._column.hide();\r\n\t\t}\r\n\t}\r\n\r\n\ttoggle(){\r\n\t\tif(this._column.visible){\r\n\t\t\tthis.hide();\r\n\t\t}else{\r\n\t\t\tthis.show();\r\n\t\t}\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn this._column.delete();\r\n\t}\r\n\r\n\tgetSubColumns(){\r\n\t\tvar output = [];\r\n\r\n\t\tif(this._column.columns.length){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\toutput.push(column.getComponent());\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetParentColumn(){\r\n\t\treturn this._column.parent instanceof Column ? this._column.parent.getComponent() : false;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._column;\r\n\t}\r\n\r\n\tscrollTo(){\r\n\t\treturn this._column.table.columnManager.scrollToColumn(this._column);\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._column.table;\r\n\t}\r\n\r\n\tmove(to, after){\r\n\t\tvar toColumn = this._column.table.columnManager.findColumn(to);\r\n\r\n\t\tif(toColumn){\r\n\t\t\tthis._column.table.columnManager.moveColumn(this._column, toColumn, after)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching column found:\", toColumn);\r\n\t\t}\r\n\t}\r\n\r\n\tgetNextColumn(){\r\n\t\tvar nextCol = this._column.nextColumn();\r\n\r\n\t\treturn nextCol ? nextCol.getComponent() : false;\r\n\t}\r\n\r\n\tgetPrevColumn(){\r\n\t\tvar prevCol = this._column.prevColumn();\r\n\r\n\t\treturn prevCol ? prevCol.getComponent() : false;\r\n\t}\r\n\r\n\tupdateDefinition(updates){\r\n\t\treturn this._column.updateDefinition(updates);\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\treturn this._column.getWidth();\r\n\t}\r\n\r\n\tsetWidth(width){\r\n\t\tvar result;\r\n\r\n\t\tif(width === true){\r\n\t\t\tresult = this._column.reinitializeWidth(true);\r\n\t\t}else{\r\n\t\t\tresult = this._column.setWidth(width);\r\n\t\t}\r\n\r\n\t\tthis._column.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\treturn result;\r\n\t}\r\n}","export default {\r\n\t\"title\": undefined,\r\n\t\"field\": undefined,\r\n\t\"columns\": undefined,\r\n\t\"visible\": undefined,\r\n\t\"hozAlign\": undefined,\r\n\t\"vertAlign\": undefined,\r\n\t\"width\": undefined,\r\n\t\"minWidth\": 40,\r\n\t\"maxWidth\": undefined,\r\n\t\"maxInitialWidth\": undefined,\r\n\t\"tooltip\": undefined,\r\n\t\"cssClass\": undefined,\r\n\t\"variableHeight\": undefined,\r\n\t\"headerTooltip\": undefined,\r\n\t\"headerVertical\": undefined,\r\n\t\"headerHozAlign\": undefined,\r\n\t\"editableTitle\": undefined,\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport ColumnComponent from './ColumnComponent.js';\r\nimport defaultOptions from './defaults/options.js';\r\n\r\nimport Cell from '../cell/Cell.js';\r\n\r\nclass Column extends CoreFeature{\r\n\r\n\tconstructor(def, parent){\r\n\t\tsuper(parent.table);\r\n\r\n\t\tthis.definition = def; //column definition\r\n\t\tthis.parent = parent; //hold parent object\r\n\t\tthis.type = \"column\"; //type of element\r\n\t\tthis.columns = []; //child columns\r\n\t\tthis.cells = []; //cells bound to this column\r\n\t\tthis.element = this.createElement(); //column header element\r\n\t\tthis.contentElement = false;\r\n\t\tthis.titleHolderElement = false;\r\n\t\tthis.titleElement = false;\r\n\t\tthis.groupElement = this.createGroupElement(); //column group holder element\r\n\t\tthis.isGroup = false;\r\n\t\tthis.tooltip = false; //hold column tooltip\r\n\t\tthis.hozAlign = \"\"; //horizontal text alignment\r\n\t\tthis.vertAlign = \"\"; //vert text alignment\r\n\r\n\t\t//multi dimensional filed handling\r\n\t\tthis.field =\"\";\r\n\t\tthis.fieldStructure = \"\";\r\n\t\tthis.getFieldValue = \"\";\r\n\t\tthis.setFieldValue = \"\";\r\n\r\n\t\tthis.titleDownload = null;\r\n\t\tthis.titleFormatterRendered = false;\r\n\r\n\t\tthis.mapDefinitions();\r\n\r\n\t\tthis.setField(this.definition.field);\r\n\r\n\t\tthis.modules = {}; //hold module variables;\r\n\r\n\t\tthis.width = null; //column width\r\n\t\tthis.widthStyled = \"\"; //column width prestyled to improve render efficiency\r\n\t\tthis.maxWidth = null; //column maximum width\r\n\t\tthis.maxWidthStyled = \"\"; //column maximum prestyled to improve render efficiency\r\n\t\tthis.maxInitialWidth = null;\r\n\t\tthis.minWidth = null; //column minimum width\r\n\t\tthis.minWidthStyled = \"\"; //column minimum prestyled to improve render efficiency\r\n\t\tthis.widthFixed = false; //user has specified a width for this column\r\n\r\n\t\tthis.visible = true; //default visible state\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\t//initialize column\r\n\t\tif(this.definition.columns){\r\n\r\n\t\t\tthis.isGroup = true;\r\n\r\n\t\t\tthis.definition.columns.forEach((def, i) => {\r\n\t\t\t\tvar newCol = new Column(def, this);\r\n\t\t\t\tthis.attachColumn(newCol);\r\n\t\t\t});\r\n\r\n\t\t\tthis.checkColumnVisibility();\r\n\t\t}else{\r\n\t\t\tparent.registerColumnField(this);\r\n\t\t}\r\n\r\n\t\tthis._initialize();\r\n\r\n\t\tthis.bindModuleColumns();\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-col\");\r\n\t\tel.setAttribute(\"role\", \"columnheader\");\r\n\t\tel.setAttribute(\"aria-sort\", \"none\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateGroupElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-col-group-cols\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tmapDefinitions(){\r\n\t\tvar defaults = this.table.options.columnDefaults;\r\n\r\n\t\t//map columnDefaults onto column definitions\r\n\t\tif(defaults){\r\n\t\t\tfor(let key in defaults){\r\n\t\t\t\tif(typeof this.definition[key] === \"undefined\"){\r\n\t\t\t\t\tthis.definition[key] = defaults[key];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.definition = this.table.columnManager.optionsList.generate(Column.defaultOptionList, this.definition)\r\n\t}\r\n\r\n\tcheckDefinition(){\r\n\t\tObject.keys(this.definition).forEach((key) => {\r\n\t\t\tif(Column.defaultOptionList.indexOf(key) === -1){\r\n\t\t\t\tconsole.warn(\"Invalid column definition option in '\" + (this.field || this.definition.title) + \"' column:\", key)\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tsetField(field){\r\n\t\tthis.field = field;\r\n\t\tthis.fieldStructure = field ? (this.table.options.nestedFieldSeparator ? field.split(this.table.options.nestedFieldSeparator) : [field]) : [];\r\n\t\tthis.getFieldValue = this.fieldStructure.length > 1 ? this._getNestedData : this._getFlatData;\r\n\t\tthis.setFieldValue = this.fieldStructure.length > 1 ? this._setNestedData : this._setFlatData;\r\n\t}\r\n\r\n\t//register column position with column manager\r\n\tregisterColumnPosition(column){\r\n\t\tthis.parent.registerColumnPosition(column);\r\n\t}\r\n\r\n\t//register column position with column manager\r\n\tregisterColumnField(column){\r\n\t\tthis.parent.registerColumnField(column);\r\n\t}\r\n\r\n\t//trigger position registration\r\n\treRegisterPosition(){\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tcolumn.reRegisterPosition();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis.registerColumnPosition(this);\r\n\t\t}\r\n\t}\r\n\r\n\t_mapDepricatedFunctionality(){\r\n\t\t//all previously deprecated functionality removed in the 5.0 release\r\n\t}\r\n\r\n\tsetTooltip(){\r\n\t\tvar def = this.definition;\r\n\r\n\t\t//set header tooltips\r\n\t\tvar tooltip = def.headerTooltip;\r\n\r\n\t\tif(tooltip){\r\n\t\t\tif(tooltip === true){\r\n\t\t\t\tif(def.field){\r\n\t\t\t\t\tthis.langBind(\"columns|\" + def.field, (value) => {\r\n\t\t\t\t\t\tthis.element.setAttribute(\"title\", value || def.title);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.element.setAttribute(\"title\", def.title);\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tif(typeof(tooltip) == \"function\"){\r\n\t\t\t\t\ttooltip = tooltip(this.getComponent());\r\n\r\n\t\t\t\t\tif(tooltip === false){\r\n\t\t\t\t\t\ttooltip = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.element.setAttribute(\"title\", tooltip);\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tthis.element.setAttribute(\"title\", \"\");\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element\r\n\t_initialize(){\r\n\t\tvar def = this.definition;\r\n\r\n\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\tif(def.headerVertical){\r\n\t\t\tthis.element.classList.add(\"tabulator-col-vertical\");\r\n\r\n\t\t\tif(def.headerVertical === \"flip\"){\r\n\t\t\t\tthis.element.classList.add(\"tabulator-col-vertical-flip\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.contentElement = this._bindEvents();\r\n\r\n\t\tthis.contentElement = this._buildColumnHeaderContent();\r\n\r\n\t\tthis.element.appendChild(this.contentElement);\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis._buildGroupHeader();\r\n\t\t}else{\r\n\t\t\tthis._buildColumnHeader();\r\n\t\t}\r\n\r\n\t\tthis.setTooltip();\r\n\r\n\t\tthis.dispatch(\"column-init\", this);\r\n\r\n\t\t//update header tooltip on mouse enter\r\n\t\tthis.element.addEventListener(\"mouseenter\", (e) => {\r\n\t\t\tthis.setTooltip();\r\n\t\t});\r\n\t}\r\n\r\n\t_bindEvents(){\r\n\t\tvar def = this.definition,\r\n\t\tdblTap,\ttapHold, tap;\r\n\r\n\t\t//setup header click event bindings\r\n\t\tif(typeof(def.headerClick) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"click\", (e) => {def.headerClick(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerDblClick) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"dblclick\", (e) => {def.headerDblClick(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerContext) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"contextmenu\", (e) => {def.headerContext(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\t//setup header tap event bindings\r\n\t\tif(typeof(def.headerTap) == \"function\"){\r\n\t\t\ttap = false;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchstart\", (e) => {\r\n\t\t\t\ttap = true;\r\n\t\t\t}, {passive: true});\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\t\t\t\tif(tap){\r\n\t\t\t\t\tdef.headerTap(e, this.getComponent());\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttap = false;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerDblTap) == \"function\"){\r\n\t\t\tdblTap = null;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\r\n\t\t\t\tif(dblTap){\r\n\t\t\t\t\tclearTimeout(dblTap);\r\n\t\t\t\t\tdblTap = null;\r\n\r\n\t\t\t\t\tdef.headerDblTap(e, this.getComponent());\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tdblTap = setTimeout(() => {\r\n\t\t\t\t\t\tclearTimeout(dblTap);\r\n\t\t\t\t\t\tdblTap = null;\r\n\t\t\t\t\t}, 300);\r\n\t\t\t\t}\r\n\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerTapHold) == \"function\"){\r\n\t\t\ttapHold = null;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchstart\", (e) => {\r\n\t\t\t\tclearTimeout(tapHold);\r\n\r\n\t\t\t\ttapHold = setTimeout(function(){\r\n\t\t\t\t\tclearTimeout(tapHold);\r\n\t\t\t\t\ttapHold = null;\r\n\t\t\t\t\ttap = false;\r\n\t\t\t\t\tdef.headerTapHold(e, this.getComponent());\r\n\t\t\t\t}, 1000);\r\n\r\n\t\t\t}, {passive: true});\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\t\t\t\tclearTimeout(tapHold);\r\n\t\t\t\ttapHold = null;\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element for header\r\n\t_buildColumnHeader(){\r\n\t\tvar def = this.definition,\r\n\t\ttable = this.table;\r\n\r\n\t\tthis.dispatch(\"column-layout\", this);\r\n\r\n\t\t//set column visibility\r\n\t\tif(typeof def.visible != \"undefined\"){\r\n\t\t\tif(def.visible){\r\n\t\t\t\tthis.show(true);\r\n\t\t\t}else{\r\n\t\t\t\tthis.hide(true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//asign additional css classes to column header\r\n\t\tif(def.cssClass){\r\n\t\t\tvar classeNames = def.cssClass.split(\" \");\r\n\t\t\tclasseNames.forEach((className) => {\r\n\t\t\t\tthis.element.classList.add(className);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(def.field){\r\n\t\t\tthis.element.setAttribute(\"tabulator-field\", def.field);\r\n\t\t}\r\n\r\n\t\t//set min width if present\r\n\t\tthis.setMinWidth(parseInt(def.minWidth));\r\n\r\n\t\tif (def.maxInitialWidth) {\r\n\t\t\tthis.maxInitialWidth = parseInt(def.maxInitialWidth);\r\n\t\t}\r\n\t\t\r\n\t\tif(def.maxWidth){\r\n\t\t\tthis.setMaxWidth(parseInt(def.maxWidth));\r\n\t\t}\r\n\r\n\t\tthis.reinitializeWidth();\r\n\r\n\t\t//set tooltip if present\r\n\t\tthis.tooltip = this.definition.tooltip;\r\n\r\n\t\t//set orizontal text alignment\r\n\t\tthis.hozAlign = this.definition.hozAlign;\r\n\t\tthis.vertAlign = this.definition.vertAlign;\r\n\r\n\t\tthis.titleElement.style.textAlign = this.definition.headerHozAlign;\r\n\t}\r\n\r\n\t_buildColumnHeaderContent(){\r\n\t\tvar def = this.definition,\r\n\t\ttable = this.table;\r\n\r\n\t\tvar contentElement = document.createElement(\"div\");\r\n\t\tcontentElement.classList.add(\"tabulator-col-content\");\r\n\r\n\t\tthis.titleHolderElement = document.createElement(\"div\");\r\n\t\tthis.titleHolderElement.classList.add(\"tabulator-col-title-holder\");\r\n\r\n\t\tcontentElement.appendChild(this.titleHolderElement);\r\n\r\n\t\tthis.titleElement = this._buildColumnHeaderTitle();\r\n\r\n\t\tthis.titleHolderElement.appendChild(this.titleElement);\r\n\r\n\t\treturn contentElement;\r\n\t}\r\n\r\n\t//build title element of column\r\n\t_buildColumnHeaderTitle(){\r\n\t\tvar def = this.definition,\r\n\t\ttitle;\r\n\r\n\t\tvar titleHolderElement = document.createElement(\"div\");\r\n\t\ttitleHolderElement.classList.add(\"tabulator-col-title\");\r\n\r\n\t\tif(def.editableTitle){\r\n\t\t\tvar titleElement = document.createElement(\"input\");\r\n\t\t\ttitleElement.classList.add(\"tabulator-title-editor\");\r\n\r\n\t\t\ttitleElement.addEventListener(\"click\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\ttitleElement.focus();\r\n\t\t\t});\r\n\r\n\t\t\ttitleElement.addEventListener(\"change\", () => {\r\n\t\t\t\tdef.title = titleElement.value;\r\n\t\t\t\tthis.dispatchExternal(\"columnTitleChanged\", this.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\ttitleHolderElement.appendChild(titleElement);\r\n\r\n\t\t\tif(def.field){\r\n\t\t\t\tthis.langBind(\"columns|\" + def.field, (text) => {\r\n\t\t\t\t\ttitleElement.value = text || (def.title || \" \");\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\ttitleElement.value = def.title || \" \";\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tif(def.field){\r\n\t\t\t\tthis.langBind(\"columns|\" + def.field, (text) => {\r\n\t\t\t\t\tthis._formatColumnHeaderTitle(titleHolderElement, text || (def.title || \" \"));\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tthis._formatColumnHeaderTitle(titleHolderElement, def.title || \" \");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn titleHolderElement;\r\n\t}\r\n\r\n\t_formatColumnHeaderTitle(el, title){\r\n\t\tvar contents = this.chain(\"column-format\", [this, title, el], null, () => {\r\n\t\t\treturn title;\r\n\t\t});\r\n\r\n\t\tswitch(typeof contents){\r\n\t\t\tcase \"object\":\r\n\t\t\tif(contents instanceof Node){\r\n\t\t\t\tel.appendChild(contents);\r\n\t\t\t}else{\r\n\t\t\t\tel.innerHTML = \"\";\r\n\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);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\tcase \"null\":\r\n\t\t\tel.innerHTML = \"\";\r\n\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\tel.innerHTML = contents;\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element for column group\r\n\t_buildGroupHeader(){\r\n\t\tthis.element.classList.add(\"tabulator-col-group\");\r\n\t\tthis.element.setAttribute(\"role\", \"columngroup\");\r\n\t\tthis.element.setAttribute(\"aria-title\", this.definition.title);\r\n\r\n\t\t//asign additional css classes to column header\r\n\t\tif(this.definition.cssClass){\r\n\t\t\tvar classeNames = this.definition.cssClass.split(\" \");\r\n\t\t\tclasseNames.forEach((className) => {\r\n\t\t\t\tthis.element.classList.add(className);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.titleElement.style.textAlign = this.definition.headerHozAlign;\r\n\r\n\t\tthis.element.appendChild(this.groupElement);\r\n\t}\r\n\r\n\t//flat field lookup\r\n\t_getFlatData(data){\r\n\t\treturn data[this.field];\r\n\t}\r\n\r\n\t//nested field lookup\r\n\t_getNestedData(data){\r\n\t\tvar dataObj = data,\r\n\t\tstructure = this.fieldStructure,\r\n\t\tlength = structure.length,\r\n\t\toutput;\r\n\r\n\t\tfor(let i = 0; i < length; i++){\r\n\r\n\t\t\tdataObj = dataObj[structure[i]];\r\n\r\n\t\t\toutput = dataObj;\r\n\r\n\t\t\tif(!dataObj){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//flat field set\r\n\t_setFlatData(data, value){\r\n\t\tif(this.field){\r\n\t\t\tdata[this.field] = value;\r\n\t\t}\r\n\t}\r\n\r\n\t//nested field set\r\n\t_setNestedData(data, value){\r\n\t\tvar dataObj = data,\r\n\t\tstructure = this.fieldStructure,\r\n\t\tlength = structure.length;\r\n\r\n\t\tfor(let i = 0; i < length; i++){\r\n\r\n\t\t\tif(i == length -1){\r\n\t\t\t\tdataObj[structure[i]] = value;\r\n\t\t\t}else{\r\n\t\t\t\tif(!dataObj[structure[i]]){\r\n\t\t\t\t\tif(typeof value !== \"undefined\"){\r\n\t\t\t\t\t\tdataObj[structure[i]] = {};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdataObj = dataObj[structure[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//attach column to this group\r\n\tattachColumn(column){\r\n\t\tif(this.groupElement){\r\n\t\t\tthis.columns.push(column);\r\n\t\t\tthis.groupElement.appendChild(column.getElement());\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Warning - Column being attached to another column instead of column group\");\r\n\t\t}\r\n\t}\r\n\r\n\t//vertically align header in column\r\n\tverticalAlign(alignment, height){\r\n\r\n\t\t//calculate height of column header and group holder element\r\n\t\tvar parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : (height || this.parent.getHeadersElement().clientHeight);\r\n\t\t// var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : this.parent.getHeadersElement().clientHeight;\r\n\r\n\t\tthis.element.style.height = parentHeight + \"px\";\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.groupElement.style.minHeight = (parentHeight - this.contentElement.offsetHeight) + \"px\";\r\n\t\t}\r\n\r\n\t\t//vertically align cell contents\r\n\t\tif(!this.isGroup && alignment !== \"top\"){\r\n\t\t\tif(alignment === \"bottom\"){\r\n\t\t\t\tthis.element.style.paddingTop = (this.element.clientHeight - this.contentElement.offsetHeight) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.paddingTop = ((this.element.clientHeight - this.contentElement.offsetHeight) / 2) + \"px\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.verticalAlign(alignment);\r\n\t\t});\r\n\t}\r\n\r\n\t//clear vertical alignmenet\r\n\tclearVerticalAlign(){\r\n\t\tthis.element.style.paddingTop = \"\";\r\n\t\tthis.element.style.height = \"\";\r\n\t\tthis.element.style.minHeight = \"\";\r\n\t\tthis.groupElement.style.minHeight = \"\";\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.clearVerticalAlign();\r\n\t\t});\r\n\t}\r\n\r\n\tbindModuleColumns (){\r\n\t\t//check if rownum formatter is being used on a column\r\n\t\tif(this.definition.formatter == \"rownum\"){\r\n\t\t\tthis.table.rowManager.rowNumColumn = this;\r\n\t\t}\r\n\t}\r\n\r\n\t//// Retreive Column Information ////\r\n\t//return column header element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\t//return colunm group element\r\n\tgetGroupElement(){\r\n\t\treturn this.groupElement;\r\n\t}\r\n\r\n\t//return field name\r\n\tgetField(){\r\n\t\treturn this.field;\r\n\t}\r\n\r\n\tgetTitleDownload() {\r\n\t\treturn this.titleDownload;\r\n\t}\r\n\r\n\t//return the first column in a group\r\n\tgetFirstColumn(){\r\n\t\tif(!this.isGroup){\r\n\t\t\treturn this;\r\n\t\t}else{\r\n\t\t\tif(this.columns.length){\r\n\t\t\t\treturn this.columns[0].getFirstColumn();\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//return the last column in a group\r\n\tgetLastColumn(){\r\n\t\tif(!this.isGroup){\r\n\t\t\treturn this;\r\n\t\t}else{\r\n\t\t\tif(this.columns.length){\r\n\t\t\t\treturn this.columns[this.columns.length -1].getLastColumn();\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//return all columns in a group\r\n\tgetColumns(){\r\n\t\treturn this.columns;\r\n\t}\r\n\r\n\t//return all columns in a group\r\n\tgetCells(){\r\n\t\treturn this.cells;\r\n\t}\r\n\r\n\t//retreive the top column in a group of columns\r\n\tgetTopColumn(){\r\n\t\tif(this.parent.isGroup){\r\n\t\t\treturn this.parent.getTopColumn();\r\n\t\t}else{\r\n\t\t\treturn this;\r\n\t\t}\r\n\t}\r\n\r\n\t//return column definition object\r\n\tgetDefinition(updateBranches){\r\n\t\tvar colDefs = [];\r\n\r\n\t\tif(this.isGroup && updateBranches){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tcolDefs.push(column.getDefinition(true));\r\n\t\t\t});\r\n\r\n\t\t\tthis.definition.columns = colDefs;\r\n\t\t}\r\n\r\n\t\treturn this.definition;\r\n\t}\r\n\r\n\t//////////////////// Actions ////////////////////\r\n\tcheckColumnVisibility(){\r\n\t\tvar visible = false;\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvisible = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(visible){\r\n\t\t\tthis.show();\r\n\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), false);\r\n\t\t}else{\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\r\n\t//show column\r\n\tshow(silent, responsiveToggle){\r\n\t\tif(!this.visible){\r\n\t\t\tthis.visible = true;\r\n\r\n\t\t\tthis.element.style.display = \"\";\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.checkColumnVisibility();\r\n\t\t\t}\r\n\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.show();\r\n\t\t\t});\r\n\r\n\t\t\tif(!this.isGroup && this.width === null){\r\n\t\t\t\tthis.reinitializeWidth();\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.columnManager.verticalAlignHeaders();\r\n\r\n\t\t\tthis.dispatch(\"column-show\", this, responsiveToggle);\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), true);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\r\n\t\t\tif(!this.silent){\r\n\t\t\t\tthis.table.columnManager.renderer.rerenderColumns();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//hide column\r\n\thide(silent, responsiveToggle){\r\n\t\tif(this.visible){\r\n\t\t\tthis.visible = false;\r\n\r\n\t\t\tthis.element.style.display = \"none\";\r\n\r\n\t\t\tthis.table.columnManager.verticalAlignHeaders();\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.checkColumnVisibility();\r\n\t\t\t}\r\n\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.hide();\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatch(\"column-hide\", this, responsiveToggle);\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), false);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\r\n\t\t\tif(!this.silent){\r\n\t\t\t\tthis.table.columnManager.renderer.rerenderColumns();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmatchChildWidths(){\r\n\t\tvar childWidth = 0;\r\n\r\n\t\tif(this.contentElement && this.columns.length){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tif(column.visible){\r\n\t\t\t\t\tchildWidth += column.getWidth();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.contentElement.style.maxWidth = (childWidth - 1) + \"px\";\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tremoveChild(child){\r\n\t\tvar index = this.columns.indexOf(child);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columns.splice(index, 1);\r\n\t\t}\r\n\r\n\t\tif(!this.columns.length){\r\n\t\t\tthis.delete();\r\n\t\t}\r\n\t}\r\n\r\n\tsetWidth(width){\r\n\t\tthis.widthFixed = true;\r\n\t\tthis.setWidthActual(width);\r\n\t}\r\n\r\n\tsetWidthActual(width){\r\n\t\tif(isNaN(width)){\r\n\t\t\twidth = Math.floor((this.table.element.clientWidth/100) * parseInt(width));\r\n\t\t}\r\n\r\n\t\twidth = Math.max(this.minWidth, width);\r\n\r\n\t\tif(this.maxWidth){\r\n\t\t\twidth = Math.min(this.maxWidth, width);\r\n\t\t}\r\n\r\n\t\tthis.width = width;\r\n\t\tthis.widthStyled = width ? width + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.width = this.widthStyled;\r\n\r\n\t\tif(!this.isGroup){\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.setWidth();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.parent.isGroup){\r\n\t\t\tthis.parent.matchChildWidths();\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"column-width\", this);\r\n\t}\r\n\r\n\tcheckCellHeights(){\r\n\t\tvar rows = [];\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tif(cell.row.heightInitialized){\r\n\t\t\t\tif(cell.row.getElement().offsetParent !== null){\r\n\t\t\t\t\trows.push(cell.row);\r\n\t\t\t\t\tcell.row.clearCellHeight();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcell.row.heightInitialized = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\trow.calcHeight();\r\n\t\t});\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\trow.setCellHeight();\r\n\t\t});\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\tvar width = 0;\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tif(column.visible){\r\n\t\t\t\t\twidth += column.getWidth();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\twidth = this.width;\r\n\t\t}\r\n\r\n\t\treturn width;\r\n\t}\r\n\r\n\tgetHeight(){\r\n\t\treturn Math.ceil(this.element.getBoundingClientRect().height);\r\n\t}\r\n\r\n\tsetMinWidth(minWidth){\r\n\t\tthis.minWidth = minWidth;\r\n\t\tthis.minWidthStyled = minWidth ? minWidth + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.minWidth = this.minWidthStyled;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setMinWidth();\r\n\t\t});\r\n\t}\r\n\r\n\tsetMaxWidth(maxWidth){\r\n\t\tthis.maxWidth = maxWidth;\r\n\t\tthis.maxWidthStyled = maxWidth ? maxWidth + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.maxWidth = this.maxWidthStyled;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setMaxWidth();\r\n\t\t});\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar index;\r\n\r\n\t\t\tif(this.isGroup){\r\n\t\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\t\tcolumn.delete();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"column-delete\", this);\r\n\r\n\t\t\tvar cellCount = this.cells.length;\r\n\r\n\t\t\tfor(let i = 0; i < cellCount; i++){\r\n\t\t\t\tthis.cells[0].delete();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.element.parentNode){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element = false;\r\n\t\t\tthis.contentElement = false;\r\n\t\t\tthis.titleElement = false;\r\n\t\t\tthis.groupElement = false;\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.removeChild(this);\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.columnManager.deregisterColumn(this);\r\n\r\n\t\t\tthis.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\r\n\tcolumnRendered(){\r\n\t\tif(this.titleFormatterRendered){\r\n\t\t\tthis.titleFormatterRendered();\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\t//generate cell for this column\r\n\tgenerateCell(row){\r\n\t\tvar cell = new Cell(this, row);\r\n\r\n\t\tthis.cells.push(cell);\r\n\r\n\t\treturn cell;\r\n\t}\r\n\r\n\tnextColumn(){\r\n\t\tvar index = this.table.columnManager.findColumnIndex(this);\r\n\t\treturn index > -1 ? this._nextVisibleColumn(index + 1) : false;\r\n\t}\r\n\r\n\t_nextVisibleColumn(index){\r\n\t\tvar column = this.table.columnManager.getColumnByIndex(index);\r\n\t\treturn !column || column.visible ? column : this._nextVisibleColumn(index + 1);\r\n\t}\r\n\r\n\tprevColumn(){\r\n\t\tvar index = this.table.columnManager.findColumnIndex(this);\r\n\t\treturn index > -1 ? this._prevVisibleColumn(index - 1) : false;\r\n\t}\r\n\r\n\t_prevVisibleColumn(index){\r\n\t\tvar column = this.table.columnManager.getColumnByIndex(index);\r\n\t\treturn !column || column.visible ? column : this._prevVisibleColumn(index - 1);\r\n\t}\r\n\r\n\treinitializeWidth(force){\r\n\t\tthis.widthFixed = false;\r\n\r\n\t\t//set width if present\r\n\t\tif(typeof this.definition.width !== \"undefined\" && !force){\r\n\t\t\t// maxInitialWidth ignored here as width specified\r\n\t\t\tthis.setWidth(this.definition.width);\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"column-width-fit-before\", this);\r\n\r\n\t\tthis.fitToData(force);\r\n\r\n\t\tthis.dispatch(\"column-width-fit-after\", this);\r\n\t}\r\n\r\n\t//set column width to maximum cell width for non group columns\r\n\tfitToData(force){\r\n\t\tif(this.isGroup){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif(!this.widthFixed){\r\n\t\t\tthis.element.style.width = \"\";\r\n\r\n\t\t\tthis.cells.forEach((cell) => {\r\n\t\t\t\tcell.clearWidth();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tvar maxWidth = this.element.offsetWidth;\r\n\r\n\t\tif(!this.width || !this.widthFixed){\r\n\t\t\tthis.cells.forEach((cell) => {\r\n\t\t\t\tvar width = cell.getWidth();\r\n\r\n\t\t\t\tif(width > maxWidth){\r\n\t\t\t\t\tmaxWidth = width;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(maxWidth){\r\n\t\t\t\tvar setTo = maxWidth + 1;\r\n\t\t\t\tif (this.maxInitialWidth && !force) {\r\n\t\t\t\t\tsetTo = Math.min(setTo, this.maxInitialWidth);\r\n\t\t\t\t}\r\n\t\t\t\tthis.setWidthActual(setTo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateDefinition(updates){\r\n\t\tvar definition;\r\n\r\n\t\tif(!this.isGroup){\r\n\t\t\tif(!this.parent.isGroup){\r\n\t\t\t\tdefinition = Object.assign({}, this.getDefinition());\r\n\t\t\t\tdefinition = Object.assign(definition, updates);\r\n\r\n\t\t\t\treturn this.table.columnManager.addColumn(definition, false, this)\r\n\t\t\t\t.then((column) => {\r\n\r\n\t\t\t\t\tif(definition.field == this.field){\r\n\t\t\t\t\t\tthis.field = false; //cleair field name to prevent deletion of duplicate column from arrays\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn this.delete()\r\n\t\t\t\t\t.then(() => {\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Column Update Error - The updateDefinition function is only available on ungrouped columns\");\r\n\t\t\t\treturn Promise.reject(\"Column Update Error - The updateDefinition function is only available on columns, not column groups\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Column Update Error - The updateDefinition function is only available on ungrouped columns\");\r\n\t\t\treturn Promise.reject(\"Column Update Error - The updateDefinition function is only available on columns, not column groups\");\r\n\t\t}\r\n\t}\r\n\r\n\tdeleteCell(cell){\r\n\t\tvar index = this.cells.indexOf(cell);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.cells.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new ColumnComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}\r\n\r\nColumn.defaultOptionList = defaultOptions;\r\n\r\nexport default Column;","//public row object\r\nexport default class RowComponent {\r\n\r\n\tconstructor (row){\r\n\t\tthis._row = row;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._row.table.componentFunctionBinder.handle(\"row\", target._row, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\treturn this._row.getData(transform);\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._row.getElement();\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._row.getCells().forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar cell = this._row.getCell(column);\r\n\t\treturn cell ? cell.getComponent() : false;\r\n\t}\r\n\r\n\tgetIndex(){\r\n\t\treturn this._row.getData(\"data\")[this._row.table.options.index];\r\n\t}\r\n\r\n\tgetPosition(active){\r\n\t\treturn this._row.table.rowManager.getRowPosition(this._row, active);\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn this._row.delete();\r\n\t}\r\n\r\n\tscrollTo(){\r\n\t\treturn this._row.table.rowManager.scrollToRow(this._row);\r\n\t}\r\n\r\n\tmove(to, after){\r\n\t\tthis._row.moveToRow(to, after);\r\n\t}\r\n\r\n\tupdate(data){\r\n\t\treturn this._row.updateData(data);\r\n\t}\r\n\r\n\tnormalizeHeight(){\r\n\t\tthis._row.normalizeHeight(true);\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._row;\r\n\t}\r\n\r\n\treformat(){\r\n\t\treturn this._row.reinitialize();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._row.table;\r\n\t}\r\n\r\n\tgetNextRow(){\r\n\t\tvar row = this._row.nextRow();\r\n\t\treturn row ? row.getComponent() : row;\r\n\t}\r\n\r\n\tgetPrevRow(){\r\n\t\tvar row = this._row.prevRow();\r\n\t\treturn row ? row.getComponent() : row;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport RowComponent from './RowComponent.js';\r\nimport Helpers from '../tools/Helpers.js';\r\n\r\nexport default class Row extends CoreFeature{\r\n\tconstructor (data, parent, type = \"row\"){\r\n\t\tsuper(parent.table);\r\n\r\n\t\tthis.parent = parent;\r\n\t\tthis.data = {};\r\n\t\tthis.type = type; //type of element\r\n\t\tthis.element = false;\r\n\t\tthis.modules = {}; //hold module variables;\r\n\t\tthis.cells = [];\r\n\t\tthis.height = 0; //hold element height\r\n\t\tthis.heightStyled = \"\"; //hold element height prestyled to improve render efficiency\r\n\t\tthis.manualHeight = false; //user has manually set row height\r\n\t\tthis.outerHeight = 0; //holde lements outer height\r\n\t\tthis.initialized = false; //element has been rendered\r\n\t\tthis.heightInitialized = false; //element has resized cells to fit\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\tthis.created = false;\r\n\r\n\t\tthis.setData(data);\r\n\t}\r\n\r\n\tcreate(){\r\n\t\tif(!this.created){\r\n\t\t\tthis.created = true;\r\n\t\t\tthis.generateElement();\r\n\t\t}\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\r\n\t\tthis.element = el;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\tthis.create();\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tdetachElement(){\r\n\t\tif (this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateElement(){\r\n\t\tthis.createElement();\r\n\t\tthis.dispatch(\"row-init\", this);\r\n\t}\r\n\r\n\tgenerateCells(){\r\n\t\tthis.cells = this.table.columnManager.generateCells(this);\r\n\t}\r\n\r\n\t//functions to setup on first render\r\n\tinitialize(force){\r\n\t\tthis.create();\r\n\r\n\t\tif(!this.initialized || force){\r\n\r\n\t\t\tthis.deleteCells();\r\n\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\tthis.dispatch(\"row-layout-before\", this);\r\n\r\n\t\t\tthis.generateCells();\r\n\r\n\t\t\tthis.initialized = true;\r\n\r\n\t\t\tthis.table.columnManager.renderer.renderRowCells(this);\r\n\r\n\t\t\tif(force){\r\n\t\t\t\tthis.normalizeHeight();\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-layout\", this);\r\n\r\n\t\t\tif(this.table.options.rowFormatter){\r\n\t\t\t\tthis.table.options.rowFormatter(this.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-layout-after\", this);\r\n\t\t}else{\r\n\t\t\tthis.table.columnManager.renderer.rerenderRowCells(this);\r\n\t\t}\r\n\t}\r\n\r\n\treinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\r\n\t\tif(this.element && this.element.offsetParent !== null){\r\n\t\t\tthis.normalizeHeight(true);\r\n\t\t}\r\n\t}\r\n\r\n\tdeinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\t}\r\n\r\n\treinitialize(children){\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\r\n\t\tif(!this.manualHeight){\r\n\t\t\tthis.height = 0;\r\n\t\t\tthis.heightStyled = \"\";\r\n\t\t}\r\n\r\n\t\tif(this.element && this.element.offsetParent !== null){\r\n\t\t\tthis.initialize(true);\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"row-relayout\", this);\r\n\t}\r\n\r\n\t//get heights when doing bulk row style calcs in virtual DOM\r\n\tcalcHeight(force){\r\n\r\n\t\tvar maxHeight = 0,\r\n\t\tminHeight = this.table.options.resizableRows ? this.element.clientHeight : 0;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tvar height = cell.getHeight();\r\n\t\t\tif(height > maxHeight){\r\n\t\t\t\tmaxHeight = height;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(force){\r\n\t\t\tthis.height = Math.max(maxHeight, minHeight);\r\n\t\t}else{\r\n\t\t\tthis.height = this.manualHeight ? this.height : Math.max(maxHeight, minHeight);\r\n\t\t}\r\n\r\n\t\tthis.heightStyled = this.height ? this.height + \"px\" : \"\";\r\n\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t}\r\n\r\n\t//set of cells\r\n\tsetCellHeight(){\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setHeight();\r\n\t\t});\r\n\r\n\t\tthis.heightInitialized = true;\r\n\t}\r\n\r\n\tclearCellHeight(){\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.clearHeight();\r\n\t\t});\r\n\t}\r\n\r\n\t//normalize the height of elements in the row\r\n\tnormalizeHeight(force){\r\n\t\tif(force){\r\n\t\t\tthis.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis.calcHeight(force);\r\n\r\n\t\tthis.setCellHeight();\r\n\t}\r\n\r\n\t//set height of rows\r\n\tsetHeight(height, force){\r\n\t\tif(this.height != height || force){\r\n\r\n\t\t\tthis.manualHeight = true;\r\n\r\n\t\t\tthis.height = height;\r\n\t\t\tthis.heightStyled = height ? height + \"px\" : \"\";\r\n\r\n\t\t\tthis.setCellHeight();\r\n\r\n\t\t\t// this.outerHeight = this.element.outerHeight();\r\n\t\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t\t}\r\n\t}\r\n\r\n\t//return rows outer height\r\n\tgetHeight(){\r\n\t\treturn this.outerHeight;\r\n\t}\r\n\r\n\t//return rows outer Width\r\n\tgetWidth(){\r\n\t\treturn this.element.offsetWidth;\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\tdeleteCell(cell){\r\n\t\tvar index = this.cells.indexOf(cell);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.cells.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Data Management /////////////////\r\n\tsetData(data){\r\n\t\tthis.data = this.chain(\"row-data-init-before\", [this, data], undefined, data);\r\n\r\n\t\tthis.dispatch(\"row-data-init-after\", this);\r\n\t}\r\n\r\n\t//update the rows data\r\n\tupdateData(updatedData){\r\n\t\tvar visible = this.element && Helpers.elVisible(this.element),\r\n\t\ttempData = {},\r\n\t\tnewRowData;\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\r\n\t\t\tif(typeof updatedData === \"string\"){\r\n\t\t\t\tupdatedData = JSON.parse(updatedData);\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-save-before\", this);\r\n\r\n\t\t\tif(this.subscribed(\"row-data-changing\")){\r\n\t\t\t\ttempData = Object.assign(tempData, this.data);\r\n\t\t\t\ttempData = Object.assign(tempData, updatedData);\r\n\t\t\t}\r\n\r\n\t\t\tnewRowData = this.chain(\"row-data-changing\", [this, tempData, updatedData], null, updatedData);\r\n\r\n\t\t\t//set data\r\n\t\t\tfor (var attrname in newRowData) {\r\n\t\t\t\tthis.data[attrname] = newRowData[attrname];\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-save-after\", this);\r\n\r\n\t\t\t//update affected cells only\r\n\t\t\tfor (var attrname in updatedData) {\r\n\r\n\t\t\t\tlet columns = this.table.columnManager.getColumnsByFieldRoot(attrname);\r\n\r\n\t\t\t\tcolumns.forEach((column) => {\r\n\t\t\t\t\tlet cell = this.getCell(column.getField());\r\n\r\n\t\t\t\t\tif(cell){\r\n\t\t\t\t\t\tlet value = column.getFieldValue(newRowData);\r\n\t\t\t\t\t\tif(cell.getValue() != value){\r\n\t\t\t\t\t\t\tcell.setValueProcessData(value);\r\n\r\n\t\t\t\t\t\t\tif(visible){\r\n\t\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t//Partial reinitialization if visible\r\n\t\t\tif(visible){\r\n\t\t\t\tthis.normalizeHeight(true);\r\n\r\n\t\t\t\tif(this.table.options.rowFormatter){\r\n\t\t\t\t\tthis.table.options.rowFormatter(this.getComponent());\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.initialized = false;\r\n\t\t\t\tthis.height = 0;\r\n\t\t\t\tthis.heightStyled = \"\";\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-changed\", this, visible, updatedData);\r\n\r\n\t\t\t//this.reinitialize();\r\n\r\n\t\t\tthis.dispatchExternal(\"rowUpdated\", this.getComponent());\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t\t}\r\n\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\tif(transform){\r\n\t\t\treturn this.chain(\"row-data-retrieve\", [this, transform], null, this.data);\r\n\t\t}\r\n\r\n\t\treturn this.data;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar match = false;\r\n\r\n\t\tcolumn = this.table.columnManager.findColumn(column);\r\n\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\r\n\t\tmatch = this.cells.find(function(cell){\r\n\t\t\treturn cell.column === column;\r\n\t\t});\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tgetCellIndex(findCell){\r\n\t\treturn this.cells.findIndex(function(cell){\r\n\t\t\treturn cell === findCell;\r\n\t\t});\r\n\t}\r\n\r\n\tfindCell(subject){\r\n\t\treturn this.cells.find((cell) => {\r\n\t\t\treturn cell.element === subject;\r\n\t\t});\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\r\n\t\treturn this.cells;\r\n\t}\r\n\r\n\tnextRow(){\r\n\t\tvar row = this.table.rowManager.nextDisplayRow(this, true);\r\n\t\treturn row || false;\r\n\t}\r\n\r\n\tprevRow(){\r\n\t\tvar row = this.table.rowManager.prevDisplayRow(this, true);\r\n\t\treturn row || false;\r\n\t}\r\n\r\n\tmoveToRow(to, before){\r\n\t\tvar toRow = this.table.rowManager.findRow(to);\r\n\r\n\t\tif(toRow){\r\n\t\t\tthis.table.rowManager.moveRowActual(this, toRow, !before);\r\n\t\t\tthis.table.rowManager.refreshActiveData(\"display\", false, true);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching row found:\", to);\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////// Actions /////////////////////\r\n\tdelete(){\r\n\t\tthis.dispatch(\"row-delete\", this);\r\n\r\n\t\tthis.deleteActual();\r\n\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\r\n\tdeleteActual(blockRedraw){\r\n\t\tvar index = this.table.rowManager.getRowIndex(this);\r\n\r\n\t\tthis.detatchModules();\r\n\r\n\t\tthis.table.rowManager.deleteRow(this, blockRedraw);\r\n\r\n\t\tthis.deleteCells();\r\n\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\t\tthis.element = false;\r\n\r\n\t\tthis.dispatch(\"row-deleted\", this);\r\n\t}\r\n\r\n\tdetatchModules(){\r\n\t\tthis.dispatch(\"row-deleting\", this);\r\n\t}\r\n\r\n\tdeleteCells(){\r\n\t\tvar cellCount = this.cells.length;\r\n\r\n\t\tfor(let i = 0; i < cellCount; i++){\r\n\t\t\tthis.cells[0].delete();\r\n\t\t}\r\n\t}\r\n\r\n\twipe(){\r\n\t\tthis.detatchModules();\r\n\t\tthis.deleteCells();\r\n\r\n\t\tif(this.element){\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\tif(this.element.parentNode){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.modules = {};\r\n\t}\r\n\r\n\tgetGroup(){\r\n\t\treturn this.modules.group || false;\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new RowComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}","export default {\r\n\t\"avg\":function(values, data, calcParams){\r\n\t\tvar output = 0,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : 2\r\n\r\n\t\tif(values.length){\r\n\t\t\toutput = values.reduce(function(sum, value){\r\n\t\t\t\treturn Number(sum) + Number(value);\r\n\t\t\t});\r\n\r\n\t\t\toutput = output / values.length;\r\n\r\n\t\t\toutput = precision !== false ? output.toFixed(precision) : output;\r\n\t\t}\r\n\r\n\t\treturn parseFloat(output).toString();\r\n\t},\r\n\t\"max\":function(values, data, calcParams){\r\n\t\tvar output = null,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tvalues.forEach(function(value){\r\n\r\n\t\t\tvalue = Number(value);\r\n\r\n\t\t\tif(value > output || output === null){\r\n\t\t\t\toutput = value;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output !== null ? (precision !== false ? output.toFixed(precision) : output) : \"\";\r\n\t},\r\n\t\"min\":function(values, data, calcParams){\r\n\t\tvar output = null,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tvalues.forEach(function(value){\r\n\r\n\t\t\tvalue = Number(value);\r\n\r\n\t\t\tif(value < output || output === null){\r\n\t\t\t\toutput = value;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output !== null ? (precision !== false ? output.toFixed(precision) : output) : \"\";\r\n\t},\r\n\t\"sum\":function(values, data, calcParams){\r\n\t\tvar output = 0,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tif(values.length){\r\n\t\t\tvalues.forEach(function(value){\r\n\t\t\t\tvalue = Number(value);\r\n\r\n\t\t\t\toutput += !isNaN(value) ? Number(value) : 0;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn precision !== false ? output.toFixed(precision) : output;\r\n\t},\r\n\t\"concat\":function(values, data, calcParams){\r\n\t\tvar output = 0;\r\n\r\n\t\tif(values.length){\r\n\t\t\toutput = values.reduce(function(sum, value){\r\n\t\t\t\treturn String(sum) + String(value);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t},\r\n\t\"count\":function(values, data, calcParams){\r\n\t\tvar output = 0;\r\n\r\n\t\tif(values.length){\r\n\t\t\tvalues.forEach(function(value){\r\n\t\t\t\tif(value){\r\n\t\t\t\t\toutput ++;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport CalcComponent from './CalcComponent.js';\r\n\r\nimport Cell from '../../core/cell/Cell.js';\r\nimport Column from '../../core/column/Column.js';\r\nimport Row from '../../core/row/Row.js';\r\n\r\nimport defaultCalculations from './defaults/calculations.js';\r\n\r\nclass ColumnCalcs extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.topCalcs = [];\r\n\t\tthis.botCalcs = [];\r\n\t\tthis.genColumn = false;\r\n\t\tthis.topElement = this.createElement();\r\n\t\tthis.botElement = this.createElement();\r\n\t\tthis.topRow = false;\r\n\t\tthis.botRow = false;\r\n\t\tthis.topInitialized = false;\r\n\t\tthis.botInitialized = false;\r\n\r\n\t\tthis.registerTableOption(\"columnCalcs\", true);\r\n\r\n\t\tthis.registerColumnOption(\"topCalc\");\r\n\t\tthis.registerColumnOption(\"topCalcParams\");\r\n\t\tthis.registerColumnOption(\"topCalcFormatter\");\r\n\t\tthis.registerColumnOption(\"topCalcFormatterParams\");\r\n\t\tthis.registerColumnOption(\"bottomCalc\");\r\n\t\tthis.registerColumnOption(\"bottomCalcParams\");\r\n\t\tthis.registerColumnOption(\"bottomCalcFormatter\");\r\n\t\tthis.registerColumnOption(\"bottomCalcFormatterParams\");\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-calcs-holder\");\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.genColumn = new Column({field:\"value\"}, this);\r\n\r\n\t\tthis.subscribe(\"cell-value-changed\", this.cellValueChanged.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumnCheck.bind(this));\r\n\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t\tthis.subscribe(\"row-added\", this.rowsUpdated.bind(this));\r\n\t\tthis.subscribe(\"column-moved\", this.recalcActiveRows.bind(this));\r\n\t\tthis.subscribe(\"column-add\", this.recalcActiveRows.bind(this));\r\n\t\tthis.subscribe(\"data-refreshed\", this.recalcActiveRowsRefresh.bind(this));\r\n\t\tthis.subscribe(\"table-redraw\", this.tableRedraw.bind(this));\r\n\t\tthis.subscribe(\"rows-visible\", this.visibleRows.bind(this));\r\n\r\n\t\tthis.registerTableFunction(\"getCalcResults\", this.getResults.bind(this));\r\n\t\tthis.registerTableFunction(\"recalc\", this.userRecalc.bind(this));\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\r\n\t\tif(force){\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\tuserRecalc(){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tvisibleRows(viewable, rows){\r\n\t\tif(this.topRow){\r\n\t\t\trows.unshift(this.topRow);\r\n\t\t}\r\n\r\n\t\tif(this.botRow){\r\n\t\t\trows.push(this.botRow);\r\n\t\t}\r\n\t\r\n\t\treturn rows;\r\n\t}\r\n\r\n\trowsUpdated(row){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.recalcRowGroup(this);\r\n\t\t}else{\r\n\t\t\tthis.recalcActiveRows();\r\n\t\t}\r\n\t}\r\n\r\n\trecalcActiveRowsRefresh(){\r\n\t\tif(this.table.options.groupBy && this.table.options.dataTreeStartExpanded && this.table.options.dataTree){\r\n\t\t\tthis.recalcAll();\r\n\t\t}else{\r\n\t\t\tthis.recalcActiveRows();\r\n\t\t}\r\n\t}\r\n\r\n\trecalcActiveRows(){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t}\r\n\r\n\tcellValueChanged(cell){\r\n\t\tif(cell.column.definition.topCalc || cell.column.definition.bottomCalc){\r\n\t\t\tif(this.table.options.groupBy){\r\n\t\t\t\tif(this.table.options.columnCalcs == \"table\" || this.table.options.columnCalcs == \"both\"){\r\n\t\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"table\"){\r\n\t\t\t\t\tthis.recalcRowGroup(cell.row);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(column.definition.topCalc || column.definition.bottomCalc){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column calcs\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition\r\n\r\n\t\tvar config = {\r\n\t\t\ttopCalcParams:def.topCalcParams || {},\r\n\t\t\tbotCalcParams:def.bottomCalcParams || {},\r\n\t\t};\r\n\r\n\t\tif(def.topCalc){\r\n\r\n\t\t\tswitch(typeof def.topCalc){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(ColumnCalcs.calculations[def.topCalc]){\r\n\t\t\t\t\tconfig.topCalc = ColumnCalcs.calculations[def.topCalc]\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.topCalc);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tconfig.topCalc = def.topCalc;\r\n\t\t\t\tbreak\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(config.topCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.topCalcs.push(column);\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"group\"){\r\n\t\t\t\t\tthis.initializeTopRow();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tif(def.bottomCalc){\r\n\t\t\tswitch(typeof def.bottomCalc){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(ColumnCalcs.calculations[def.bottomCalc]){\r\n\t\t\t\t\tconfig.botCalc = ColumnCalcs.calculations[def.bottomCalc]\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.bottomCalc);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tconfig.botCalc = def.bottomCalc;\r\n\t\t\t\tbreak\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(config.botCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.botCalcs.push(column);\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"group\"){\r\n\t\t\t\t\tthis.initializeBottomRow();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t//dummy functions to handle being mock column manager\r\n\tregisterColumnField(){};\r\n\r\n\tremoveCalcs(){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(this.topInitialized){\r\n\t\t\tthis.topInitialized = false;\r\n\t\t\tthis.topElement.parentNode.removeChild(this.topElement);\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\r\n\t\tif(this.botInitialized){\r\n\t\t\tthis.botInitialized = false;\r\n\t\t\tthis.table.footerManager.remove(this.botElement);\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeTopRow(){\r\n\t\tif(!this.topInitialized){\r\n\t\t\tthis.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\r\n\t\t\tthis.topInitialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeBottomRow(){\r\n\t\tif(!this.botInitialized){\r\n\t\t\tthis.table.footerManager.prepend(this.botElement);\r\n\t\t\tthis.botInitialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tscrollHorizontal(left){\r\n\t\tif(this.botInitialized && this.botRow){\r\n\t\t\tthis.botRow.getElement().style.marginLeft = (-left) + \"px\";\r\n\t\t}\r\n\t}\r\n\r\n\trecalc(rows){\r\n\t\tvar data, row;\r\n\r\n\t\tif(this.topInitialized || this.botInitialized){\r\n\t\t\tdata = this.rowsToData(rows);\r\n\r\n\t\t\tif(this.topInitialized){\r\n\t\t\t\tif(this.topRow){\r\n\t\t\t\t\tthis.topRow.deleteCells();\r\n\t\t\t\t}\r\n\r\n\t\t\t\trow = this.generateRow(\"top\", this.rowsToData(rows))\r\n\t\t\t\tthis.topRow = row;\r\n\t\t\t\twhile(this.topElement.firstChild) this.topElement.removeChild(this.topElement.firstChild);\r\n\t\t\t\tthis.topElement.appendChild(row.getElement());\r\n\t\t\t\trow.initialize(true);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.botInitialized){\r\n\t\t\t\tif(this.botRow){\r\n\t\t\t\t\tthis.botRow.deleteCells();\r\n\t\t\t\t}\r\n\r\n\t\t\t\trow = this.generateRow(\"bottom\", this.rowsToData(rows))\r\n\t\t\t\tthis.botRow = row;\r\n\t\t\t\twhile(this.botElement.firstChild) this.botElement.removeChild(this.botElement.firstChild);\r\n\t\t\t\tthis.botElement.appendChild(row.getElement());\r\n\t\t\t\trow.initialize(true);\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\t//set resizable handles\r\n\t\t\tif(this.table.modExists(\"frozenColumns\")){\r\n\t\t\t\tthis.table.modules.frozenColumns.layout();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trecalcRowGroup(row){\r\n\t\tthis.recalcGroup(this.table.modules.groupRows.getRowGroup(row));\r\n\t}\r\n\r\n\trecalcAll(){\r\n\t\tif(this.topCalcs.length || this.botCalcs.length){\r\n\t\t\tif(this.table.options.columnCalcs !== \"group\"){\r\n\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.groupBy && this.table.options.columnCalcs !== \"table\"){\r\n\r\n\t\t\t\tvar groups = this.table.modules.groupRows.getChildGroups();\r\n\r\n\t\t\t\tgroups.forEach((group) => {\r\n\t\t\t\t\tthis.recalcGroup(group);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trecalcGroup(group){\r\n\t\tvar data, rowData;\r\n\r\n\t\tif(group){\r\n\t\t\tif(group.calcs){\r\n\t\t\t\tif(group.calcs.bottom){\r\n\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\trowData = this.generateRowData(\"bottom\", data);\r\n\r\n\t\t\t\t\tgroup.calcs.bottom.updateData(rowData);\r\n\t\t\t\t\tgroup.calcs.bottom.reinitialize();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(group.calcs.top){\r\n\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\trowData = this.generateRowData(\"top\", data);\r\n\r\n\t\t\t\t\tgroup.calcs.top.updateData(rowData);\r\n\t\t\t\t\tgroup.calcs.top.reinitialize();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//generate top stats row\r\n\tgenerateTopRow(rows){\r\n\t\treturn this.generateRow(\"top\", this.rowsToData(rows));\r\n\t}\r\n\t//generate bottom stats row\r\n\tgenerateBottomRow(rows){\r\n\t\treturn this.generateRow(\"bottom\", this.rowsToData(rows));\r\n\t}\r\n\r\n\trowsToData(rows){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\trows.forEach((row) => {\r\n\t\t\tdata.push(row.getData());\r\n\r\n\t\t\tif(this.table.options.dataTree && this.table.options.dataTreeChildColumnCalcs){\r\n\t\t\t\tif(row.modules.dataTree && row.modules.dataTree.open){\r\n\t\t\t\t\tvar children = this.rowsToData(this.table.modules.dataTree.getFilteredTreeChildren(row));\r\n\t\t\t\t\tdata = data.concat(children);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//generate stats row\r\n\tgenerateRow(pos, data){\r\n\t\tvar rowData = this.generateRowData(pos, data),\r\n\t\trow;\r\n\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.disable();\r\n\t\t}\r\n\r\n\t\trow = new Row(rowData, this, \"calc\");\r\n\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.enable();\r\n\t\t}\r\n\r\n\t\trow.getElement().classList.add(\"tabulator-calcs\", \"tabulator-calcs-\" + pos);\r\n\r\n\t\trow.component = false;\r\n\r\n\t\trow.getComponent = () => {\r\n\t\t\tif(!row.component){\r\n\t\t\t\trow.component = new CalcComponent(row);\r\n\t\t\t}\r\n\r\n\t\t\treturn row.component;\r\n\t\t};\r\n\r\n\t\trow.generateCells = () => {\r\n\r\n\t\t\tvar cells = [];\r\n\r\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\r\n\t\t\t\t\t//set field name of mock column\r\n\t\t\t\t\tthis.genColumn.setField(column.getField());\r\n\t\t\t\t\tthis.genColumn.hozAlign = column.hozAlign;\r\n\r\n\t\t\t\t\tif(column.definition[pos + \"CalcFormatter\"] && this.table.modExists(\"format\")){\r\n\t\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(column.definition[pos + \"CalcFormatter\"]),\r\n\t\t\t\t\t\t\tparams: column.definition[pos + \"CalcFormatterParams\"] || {},\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(\"plaintext\"),\r\n\t\t\t\t\t\t\tparams:{}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//ensure css class defintion is replicated to calculation cell\r\n\t\t\t\t\tthis.genColumn.definition.cssClass = column.definition.cssClass;\r\n\r\n\t\t\t\t\t//generate cell and assign to correct column\r\n\t\t\t\t\tvar cell = new Cell(this.genColumn, row);\r\n\t\t\t\t\tcell.getElement();\r\n\t\t\t\t\tcell.column = column;\r\n\t\t\t\t\tcell.setWidth();\r\n\r\n\t\t\t\t\tcolumn.cells.push(cell);\r\n\t\t\t\t\tcells.push(cell);\r\n\r\n\t\t\t\t\tif(!column.visible){\r\n\t\t\t\t\t\tcell.hide();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\trow.cells = cells;\r\n\t\t};\r\n\r\n\t\treturn row;\r\n\t}\r\n\r\n\t//generate stats row\r\n\tgenerateRowData(pos, data){\r\n\t\tvar rowData = {},\r\n\t\tcalcs = pos == \"top\" ? this.topCalcs : this.botCalcs,\r\n\t\ttype = pos == \"top\" ? \"topCalc\" : \"botCalc\",\r\n\t\tparams, paramKey;\r\n\r\n\t\tcalcs.forEach(function(column){\r\n\t\t\tvar values = [];\r\n\r\n\t\t\tif(column.modules.columnCalcs && column.modules.columnCalcs[type]){\r\n\t\t\t\tdata.forEach(function(item){\r\n\t\t\t\t\tvalues.push(column.getFieldValue(item));\r\n\t\t\t\t});\r\n\r\n\t\t\t\tparamKey = type + \"Params\";\r\n\t\t\t\tparams = typeof column.modules.columnCalcs[paramKey] === \"function\" ? column.modules.columnCalcs[paramKey](values, data) : column.modules.columnCalcs[paramKey];\r\n\r\n\t\t\t\tcolumn.setFieldValue(rowData, column.modules.columnCalcs[type](values, data, params));\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowData;\r\n\t}\r\n\r\n\thasTopCalcs(){\r\n\t\treturn\t!!(this.topCalcs.length);\r\n\t}\r\n\r\n\thasBottomCalcs(){\r\n\t\treturn\t!!(this.botCalcs.length);\r\n\t}\r\n\r\n\t//handle table redraw\r\n\tredraw(){\r\n\t\tif(this.topRow){\r\n\t\t\tthis.topRow.normalizeHeight(true);\r\n\t\t}\r\n\t\tif(this.botRow){\r\n\t\t\tthis.botRow.normalizeHeight(true);\r\n\t\t}\r\n\t}\r\n\r\n\t//return the calculated\r\n\tgetResults(){\r\n\t\tvar results = {},\r\n\t\tgroups;\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tgroups = this.table.modules.groupRows.getGroups(true);\r\n\r\n\t\t\tgroups.forEach((group) => {\r\n\t\t\t\tresults[group.getKey()] = this.getGroupResults(group);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tresults = {\r\n\t\t\t\ttop: this.topRow ? this.topRow.getData() : {},\r\n\t\t\t\tbottom: this.botRow ? this.botRow.getData() : {},\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n\r\n\t//get results from a group\r\n\tgetGroupResults(group){\r\n\t\tvar groupObj = group._getSelf(),\r\n\t\tsubGroups = group.getSubGroups(),\r\n\t\tsubGroupResults = {},\r\n\t\tresults = {};\r\n\r\n\t\tsubGroups.forEach((subgroup) => {\r\n\t\t\tsubGroupResults[subgroup.getKey()] = this.getGroupResults(subgroup);\r\n\t\t});\r\n\r\n\t\tresults = {\r\n\t\t\ttop: groupObj.calcs.top ? groupObj.calcs.top.getData() : {},\r\n\t\t\tbottom: groupObj.calcs.bottom ? groupObj.calcs.bottom.getData() : {},\r\n\t\t\tgroups: subGroupResults,\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n}\r\n\r\nColumnCalcs.moduleName = \"columnCalcs\";\r\n\r\n//load defaults\r\nColumnCalcs.calculations = defaultCalculations;\r\n\r\nexport default ColumnCalcs;","import Module from '../../core/Module.js';\r\n\r\nimport Row from '../../core/row/Row.js';\r\n\r\nclass DataTree extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.indent = 10;\r\n\t\tthis.field = \"\";\r\n\t\tthis.collapseEl = null;\r\n\t\tthis.expandEl = null;\r\n\t\tthis.branchEl = null;\r\n\t\tthis.elementField = false;\r\n\r\n\t\tthis.startOpen = function(){};\r\n\r\n\t\tthis.displayIndex = 0;\r\n\r\n\t\tthis.registerTableOption(\"dataTree\", false); //enable data tree\r\n\t\tthis.registerTableOption(\"dataTreeFilter\", true); //filter child rows\r\n\t\tthis.registerTableOption(\"dataTreeSort\", true); //sort child rows\r\n\t\tthis.registerTableOption(\"dataTreeElementColumn\", false);\r\n\t\tthis.registerTableOption(\"dataTreeBranchElement\", true);//show data tree branch element\r\n\t\tthis.registerTableOption(\"dataTreeChildIndent\", 9); //data tree child indent in px\r\n\t\tthis.registerTableOption(\"dataTreeChildField\", \"_children\");//data tre column field to look for child rows\r\n\t\tthis.registerTableOption(\"dataTreeCollapseElement\", false);//data tree row collapse element\r\n\t\tthis.registerTableOption(\"dataTreeExpandElement\", false);//data tree row expand element\r\n\t\tthis.registerTableOption(\"dataTreeStartExpanded\", false);\r\n\t\tthis.registerTableOption(\"dataTreeChildColumnCalcs\", false);//include visible data tree rows in column calculations\r\n\t\tthis.registerTableOption(\"dataTreeSelectPropagate\", false);//seleccting a parent row selects its children\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"treeCollapse\", this.collapseRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"treeExpand\", this.expandRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"treeToggle\", this.toggleRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"getTreeParent\", this.getTreeParent.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"getTreeChildren\", this.getRowChildren.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"addTreeChild\", this.addTreeChildRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isTreeExpanded\", this.isRowExpanded.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.dataTree){\r\n\t\t\tvar dummyEl = null,\r\n\t\t\toptions = this.table.options;\r\n\r\n\t\t\tthis.field = options.dataTreeChildField;\r\n\t\t\tthis.indent = options.dataTreeChildIndent;\r\n\r\n\t\t\tif(options.dataTreeBranchElement){\r\n\r\n\t\t\t\tif(options.dataTreeBranchElement === true){\r\n\t\t\t\t\tthis.branchEl = document.createElement(\"div\");\r\n\t\t\t\t\tthis.branchEl.classList.add(\"tabulator-data-tree-branch\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(typeof options.dataTreeBranchElement === \"string\"){\r\n\t\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\t\tdummyEl.innerHTML = options.dataTreeBranchElement;\r\n\t\t\t\t\t\tthis.branchEl = dummyEl.firstChild;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.branchEl = options.dataTreeBranchElement;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(options.dataTreeCollapseElement){\r\n\t\t\t\tif(typeof options.dataTreeCollapseElement === \"string\"){\r\n\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\tdummyEl.innerHTML = options.dataTreeCollapseElement;\r\n\t\t\t\t\tthis.collapseEl = dummyEl.firstChild;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.collapseEl = options.dataTreeCollapseElement;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.collapseEl = document.createElement(\"div\");\r\n\t\t\t\tthis.collapseEl.classList.add(\"tabulator-data-tree-control\");\r\n\t\t\t\tthis.collapseEl.tabIndex = 0;\r\n\t\t\t\tthis.collapseEl.innerHTML = \"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif(options.dataTreeExpandElement){\r\n\t\t\t\tif(typeof options.dataTreeExpandElement === \"string\"){\r\n\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\tdummyEl.innerHTML = options.dataTreeExpandElement;\r\n\t\t\t\t\tthis.expandEl = dummyEl.firstChild;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.expandEl = options.dataTreeExpandElement;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.expandEl = document.createElement(\"div\");\r\n\t\t\t\tthis.expandEl.classList.add(\"tabulator-data-tree-control\");\r\n\t\t\t\tthis.expandEl.tabIndex = 0;\r\n\t\t\t\tthis.expandEl.innerHTML = \"
\";\r\n\t\t\t}\r\n\r\n\r\n\t\t\tswitch(typeof options.dataTreeStartExpanded){\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\treturn options.dataTreeStartExpanded;\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tthis.startOpen = options.dataTreeStartExpanded;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\treturn options.dataTreeStartExpanded[index];\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-layout-after\", this.layoutRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowDelete.bind(this),0);\r\n\t\t\tthis.subscribe(\"row-data-changed\", this.rowDataChanged.bind(this), 10);\r\n\t\t\tthis.subscribe(\"cell-value-updated\", this.cellValueChanged.bind(this));\r\n\t\t\tthis.subscribe(\"edit-cancelled\", this.cellValueChanged.bind(this));\r\n\t\t\tthis.subscribe(\"column-moving-rows\", this.columnMoving.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.initializeElementField.bind(this));\r\n\r\n\t\t\tthis.registerDisplayHandler(this.getRows.bind(this), 30);\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeElementField(){\r\n\t\tvar firstCol = this.table.columnManager.getFirstVisibleColumn();\r\n\r\n\t\tthis.elementField = this.table.options.dataTreeElementColumn || (firstCol ? firstCol.field : false);\r\n\t}\r\n\t\r\n\tgetRowChildren(row){\r\n\t\treturn this.getTreeChildren(row, true);\r\n\t}\r\n\r\n\tcolumnMoving(){\r\n\t\tvar rows = [];\r\n\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\trows = rows.concat(this.getTreeChildren(row, false, true));\r\n\t\t});\r\n\r\n\t\treturn rows;\r\n\t}\r\n\r\n\trowDataChanged(row, visible, updatedData){\r\n\t\tif(this.redrawNeeded(updatedData)){\r\n\t\t\tthis.initializeRow(row);\r\n\r\n\t\t\tif(visible){\r\n\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tcellValueChanged(cell){\r\n\t\tvar field = cell.column.getField();\r\n\r\n\t\tif(field === this.elementField){\r\n\t\t\tthis.layoutRow(cell.row);\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar childArray = row.getData()[this.field];\r\n\t\tvar isArray = Array.isArray(childArray);\r\n\r\n\t\tvar children = isArray || (!isArray && typeof childArray === \"object\" && childArray !== null);\r\n\r\n\t\tif(!children && row.modules.dataTree && row.modules.dataTree.branchEl){\r\n\t\t\trow.modules.dataTree.branchEl.parentNode.removeChild(row.modules.dataTree.branchEl);\r\n\t\t}\r\n\r\n\t\tif(!children && row.modules.dataTree && row.modules.dataTree.controlEl){\r\n\t\t\trow.modules.dataTree.controlEl.parentNode.removeChild(row.modules.dataTree.controlEl);\r\n\t\t}\r\n\r\n\t\trow.modules.dataTree = {\r\n\t\t\tindex: row.modules.dataTree ? row.modules.dataTree.index : 0,\r\n\t\t\topen: children ? (row.modules.dataTree ? row.modules.dataTree.open : this.startOpen(row.getComponent(), 0)) : false,\r\n\t\t\tcontrolEl: row.modules.dataTree && children ? row.modules.dataTree.controlEl : false,\r\n\t\t\tbranchEl: row.modules.dataTree && children ? row.modules.dataTree.branchEl : false,\r\n\t\t\tparent: row.modules.dataTree ? row.modules.dataTree.parent : false,\r\n\t\t\tchildren:children,\r\n\t\t};\r\n\t}\r\n\r\n\treinitializeRowChildren(row){\r\n\t\tvar children = this.getTreeChildren(row, false, true);\r\n\r\n\t\tchildren.forEach(function(child){\r\n\t\t\tchild.reinitialize(true);\r\n\t\t});\r\n\t}\r\n\r\n\tlayoutRow(row){\r\n\t\tvar cell = this.elementField ? row.getCell(this.elementField) : row.getCells()[0],\r\n\t\tel = cell.getElement(),\r\n\t\tconfig = row.modules.dataTree;\r\n\r\n\t\tif(config.branchEl){\r\n\t\t\tif(config.branchEl.parentNode){\r\n\t\t\t\tconfig.branchEl.parentNode.removeChild(config.branchEl);\r\n\t\t\t}\r\n\t\t\tconfig.branchEl = false;\r\n\t\t}\r\n\r\n\t\tif(config.controlEl){\r\n\t\t\tif(config.controlEl.parentNode){\r\n\t\t\t\tconfig.controlEl.parentNode.removeChild(config.controlEl);\r\n\t\t\t}\r\n\t\t\tconfig.controlEl = false;\r\n\t\t}\r\n\r\n\t\tthis.generateControlElement(row, el);\r\n\r\n\t\trow.getElement().classList.add(\"tabulator-tree-level-\" + config.index);\r\n\r\n\t\tif(config.index){\r\n\t\t\tif(this.branchEl){\r\n\t\t\t\tconfig.branchEl = this.branchEl.cloneNode(true);\r\n\t\t\t\tel.insertBefore(config.branchEl, el.firstChild);\r\n\r\n\t\t\t\tif(this.table.rtl){\r\n\t\t\t\t\tconfig.branchEl.style.marginRight = (((config.branchEl.offsetWidth + config.branchEl.style.marginLeft) * (config.index - 1)) + (config.index * this.indent)) + \"px\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.branchEl.style.marginLeft = (((config.branchEl.offsetWidth + config.branchEl.style.marginRight) * (config.index - 1)) + (config.index * this.indent)) + \"px\";\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\r\n\t\t\t\tif(this.table.rtl){\r\n\t\t\t\t\tel.style.paddingRight = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-right')) + (config.index * this.indent) + \"px\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.style.paddingLeft = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-left')) + (config.index * this.indent) + \"px\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateControlElement(row, el){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\tel = el || row.getCells()[0].getElement(),\r\n\t\toldControl = config.controlEl;\r\n\r\n\t\tif(config.children !== false){\r\n\r\n\t\t\tif(config.open){\r\n\t\t\t\tconfig.controlEl = this.collapseEl.cloneNode(true);\r\n\t\t\t\tconfig.controlEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tthis.collapseRow(row);\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconfig.controlEl = this.expandEl.cloneNode(true);\r\n\t\t\t\tconfig.controlEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tthis.expandRow(row);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tconfig.controlEl.addEventListener(\"mousedown\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\r\n\t\t\tif(oldControl && oldControl.parentNode === el){\r\n\t\t\t\toldControl.parentNode.replaceChild(config.controlEl,oldControl);\r\n\t\t\t}else{\r\n\t\t\t\tel.insertBefore(config.controlEl, el.firstChild);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tsetDisplayIndex (index) {\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\r\n\tgetDisplayIndex () {\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\r\n\tgetRows(rows){\r\n\t\tvar output = [];\r\n\r\n\t\trows.forEach((row, i) => {\r\n\t\t\tvar config, children;\r\n\r\n\t\t\toutput.push(row);\r\n\r\n\t\t\tif(row instanceof Row){\r\n\r\n\t\t\t\trow.create();\r\n\r\n\t\t\t\tconfig = row.modules.dataTree.children;\r\n\r\n\t\t\t\tif(!config.index && config.children !== false){\r\n\t\t\t\t\tchildren = this.getChildren(row);\r\n\r\n\t\t\t\t\tchildren.forEach((child) => {\r\n\t\t\t\t\t\tchild.create();\r\n\t\t\t\t\t\toutput.push(child);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetChildren(row, allChildren){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\tchildren = [],\r\n\t\toutput = [];\r\n\r\n\t\tif(config.children !== false && (config.open || allChildren)){\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"filter\") && this.table.options.dataTreeFilter){\r\n\t\t\t\tchildren = this.table.modules.filter.filter(config.children);\r\n\t\t\t}else{\r\n\t\t\t\tchildren = config.children;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"sort\") && this.table.options.dataTreeSort){\r\n\t\t\t\tthis.table.modules.sort.sort(children);\r\n\t\t\t}\r\n\r\n\t\t\tchildren.forEach((child) => {\r\n\t\t\t\toutput.push(child);\r\n\r\n\t\t\t\tvar subChildren = this.getChildren(child);\r\n\r\n\t\t\t\tsubChildren.forEach((sub) => {\r\n\t\t\t\t\toutput.push(sub);\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgenerateChildren(row){\r\n\t\tvar children = [];\r\n\r\n\t\tvar childArray = row.getData()[this.field];\r\n\r\n\t\tif(!Array.isArray(childArray)){\r\n\t\t\tchildArray = [childArray];\r\n\t\t}\r\n\r\n\t\tchildArray.forEach((childData) => {\r\n\t\t\tvar childRow = new Row(childData || {}, this.table.rowManager);\r\n\r\n\t\t\tchildRow.create();\r\n\r\n\t\t\tchildRow.modules.dataTree.index = row.modules.dataTree.index + 1;\r\n\t\t\tchildRow.modules.dataTree.parent = row;\r\n\r\n\t\t\tif(childRow.modules.dataTree.children){\r\n\t\t\t\tchildRow.modules.dataTree.open = this.startOpen(childRow.getComponent(), childRow.modules.dataTree.index);\r\n\t\t\t}\r\n\t\t\tchildren.push(childRow);\r\n\t\t});\r\n\r\n\t\treturn children;\r\n\t}\r\n\r\n\texpandRow(row, silent){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tconfig.open = true;\r\n\r\n\t\t\trow.reinitialize();\r\n\r\n\t\t\tthis.refreshData(true);\r\n\r\n\t\t\tthis.dispatchExternal(\"dataTreeRowExpanded\", row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\t}\r\n\r\n\tcollapseRow(row){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tconfig.open = false;\r\n\r\n\t\t\trow.reinitialize();\r\n\r\n\t\t\tthis.refreshData(true);\r\n\r\n\t\t\tthis.dispatchExternal(\"dataTreeRowCollapsed\", row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\t}\r\n\r\n\ttoggleRow(row){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tif(config.open){\r\n\t\t\t\tthis.collapseRow(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.expandRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tisRowExpanded(row){\r\n\t\treturn row.modules.dataTree.open;\r\n\t}\r\n\r\n\tgetTreeParent(row){\r\n\t\treturn row.modules.dataTree.parent ? row.modules.dataTree.parent.getComponent() : false;\r\n\t}\r\n\r\n\tgetFilteredTreeChildren(row){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\toutput = [], children;\r\n\r\n\t\tif(config.children){\r\n\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"filter\") && this.table.options.dataTreeFilter){\r\n\t\t\t\tchildren = this.table.modules.filter.filter(config.children);\r\n\t\t\t}else{\r\n\t\t\t\tchildren = config.children;\r\n\t\t\t}\r\n\r\n\t\t\tchildren.forEach((childRow) => {\r\n\t\t\t\tif(childRow instanceof Row){\r\n\t\t\t\t\toutput.push(childRow);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\trowDelete(row){\r\n\t\tvar parent = row.modules.dataTree.parent,\r\n\t\tchildIndex;\r\n\r\n\t\tif(parent){\r\n\t\t\tchildIndex = this.findChildIndex(row, parent);\r\n\r\n\t\t\tif(childIndex !== false){\r\n\t\t\t\tparent.data[this.field].splice(childIndex, 1);\r\n\t\t\t}\r\n\r\n\t\t\tif(!parent.data[this.field].length){\r\n\t\t\t\tdelete parent.data[this.field];\r\n\t\t\t}\r\n\r\n\t\t\tthis.initializeRow(parent);\r\n\t\t\tthis.layoutRow(parent);\r\n\t\t}\r\n\r\n\t\tthis.refreshData(true);\r\n\t}\r\n\r\n\taddTreeChildRow(row, data, top, index){\r\n\t\tvar childIndex = false;\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(row.data[this.field])){\r\n\t\t\trow.data[this.field] = [];\r\n\r\n\t\t\trow.modules.dataTree.open = this.startOpen(row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\r\n\t\tif(typeof index !== \"undefined\"){\r\n\t\t\tchildIndex = this.findChildIndex(index, row);\r\n\r\n\t\t\tif(childIndex !== false){\r\n\t\t\t\trow.data[this.field].splice((top ? childIndex : childIndex + 1), 0, data);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(childIndex === false){\r\n\t\t\tif(top){\r\n\t\t\t\trow.data[this.field].unshift(data);\r\n\t\t\t}else{\r\n\t\t\t\trow.data[this.field].push(data);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.initializeRow(row);\r\n\t\tthis.layoutRow(row);\r\n\r\n\t\tthis.refreshData(true);\r\n\t}\r\n\r\n\tfindChildIndex(subject, parent){\r\n\t\tvar match = false;\r\n\r\n\t\tif(typeof subject == \"object\"){\r\n\r\n\t\t\tif(subject instanceof Row){\r\n\t\t\t\t//subject is row element\r\n\t\t\t\tmatch = subject.data;\r\n\t\t\t}else if(subject instanceof RowComponent){\r\n\t\t\t\t//subject is public row component\r\n\t\t\t\tmatch = subject._getSelf().data;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\tif(parent.modules.dataTree){\r\n\t\t\t\t\tmatch = parent.modules.dataTree.children.find((childRow) => {\r\n\t\t\t\t\t\treturn childRow instanceof Row ? childRow.element === subject : false;\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(match){\r\n\t\t\t\t\t\tmatch = match.data;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}else if(typeof subject == \"undefined\" || subject === null){\r\n\t\t\tmatch = false\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the index of the row\r\n\t\t\tmatch = parent.data[this.field].find((row) => {\r\n\t\t\t\treturn row.data[this.table.options.index] == subject;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(match){\r\n\r\n\t\t\tif(Array.isArray(parent.data[this.field])){\r\n\t\t\t\tmatch = parent.data[this.field].indexOf(match);\r\n\t\t\t}\r\n\r\n\t\t\tif(match == -1){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//catch all for any other type of input\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tgetTreeChildren(row, component, recurse){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\toutput = [];\r\n\r\n\t\tif(config.children){\r\n\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tconfig.children.forEach((childRow) => {\r\n\t\t\t\tif(childRow instanceof Row){\r\n\t\t\t\t\toutput.push(component ? childRow.getComponent() : childRow);\r\n\r\n\t\t\t\t\tif(recurse){\r\n\t\t\t\t\t\toutput = output.concat(this.getTreeChildren(childRow, component, recurse));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetChildField(){\r\n\t\treturn this.field;\r\n\t}\r\n\r\n\tredrawNeeded(data){\r\n\t\treturn (this.field ? typeof data[this.field] !== \"undefined\" : false) || (this.elementField ? typeof data[this.elementField] !== \"undefined\" : false);\r\n\t}\r\n}\r\n\r\nDataTree.moduleName = \"dataTree\";\r\n\r\nexport default DataTree;","import csv from './downloaders/csv.js';\r\nimport json from './downloaders/json.js';\r\nimport pdf from './downloaders/pdf.js';\r\nimport xlsx from './downloaders/xlsx.js';\r\nimport html from './downloaders/html.js';\r\nimport jsonLines from './downloaders/jsonLines.js';\r\n\r\nexport default {\r\n\tcsv:csv,\r\n\tjson:json,\r\n\tjsonLines:jsonLines,\r\n\tpdf:pdf,\r\n\txlsx:xlsx,\r\n\thtml:html,\r\n};","export default function(list, options, setFileContents){\r\n\tvar delimiter = options && options.delimiter ? options.delimiter : \",\",\r\n\tfileContents = [],\r\n\theaders = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tvar item = [];\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"group\":\r\n\t\t\tconsole.warn(\"Download Warning - CSV downloader cannot process row groups\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tconsole.warn(\"Download Warning - CSV downloader cannot process column calculations\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"header\":\r\n\t\t\trow.columns.forEach((col, i) => {\r\n\t\t\t\tif(col && col.depth === 1){\r\n\t\t\t\t\theaders[i] = typeof col.value == \"undefined\" || col.value === null ? \"\" : ('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\trow.columns.forEach((col) => {\r\n\r\n\t\t\t\tif(col){\r\n\r\n\t\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tcol.value = JSON.stringify(col.value);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\t\tcol.value = \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\titem.push('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tfileContents.push(item.join(delimiter));\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(headers.length){\r\n\t\tfileContents.unshift(headers.join(delimiter));\r\n\t}\r\n\r\n\tfileContents = fileContents.join(\"\\n\");\r\n\r\n\tif(options.bom){\r\n\t\tfileContents = \"\\ufeff\" + fileContents;\r\n\t}\r\n\r\n\tsetFileContents(fileContents, \"text/csv\");\r\n};","export default function(list, options, setFileContents){\r\n\tvar fileContents = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tvar item = {};\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"header\":\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process row groups\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process column calculations\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\tif(col){\r\n\t\t\t\t\titem[col.component.getTitleDownload() || col.component.getField()] = col.value;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tfileContents.push(item);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tfileContents = JSON.stringify(fileContents, null, '\\t');\r\n\r\n\tsetFileContents(fileContents, \"application/json\");\r\n};","export default function (list, options, setFileContents) {\r\n\tconst fileContents = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tconst item = {};\r\n\r\n\t\tswitch (row.type) {\r\n\t\t\tcase \"header\":\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process row groups\");\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process column calculations\");\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\t\tif (col) {\r\n\t\t\t\t\t\titem[col.component.getTitleDownload() || col.component.getField()] = col.value;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tfileContents.push(JSON.stringify(item));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tsetFileContents(fileContents.join(\"\\n\"), \"application/x-ndjson\");\r\n};","export default function(list, options, setFileContents){\r\n\tvar header = [],\r\n\tbody = [],\r\n\tautoTableParams = {},\r\n\trowGroupStyles = options.rowGroupStyles || {\r\n\t\tfontStyle: \"bold\",\r\n\t\tfontSize: 12,\r\n\t\tcellPadding: 6,\r\n\t\tfillColor: 220,\r\n\t},\r\n\trowCalcStyles = options.rowCalcStyles || {\r\n\t\tfontStyle: \"bold\",\r\n\t\tfontSize: 10,\r\n\t\tcellPadding: 4,\r\n\t\tfillColor: 232,\r\n\t},\r\n\tjsPDFParams = options.jsPDF || {},\r\n\ttitle = options && options.title ? options.title : \"\";\r\n\r\n\tif(!jsPDFParams.orientation){\r\n\t\tjsPDFParams.orientation = options.orientation || \"landscape\";\r\n\t}\r\n\r\n\tif(!jsPDFParams.unit){\r\n\t\tjsPDFParams.unit = \"pt\";\r\n\t}\r\n\r\n\t//parse row list\r\n\tlist.forEach((row) => {\r\n\t\tvar item = {};\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"header\":\r\n\t\t\theader.push(parseRow(row));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tbody.push(parseRow(row, rowGroupStyles));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tbody.push(parseRow(row, rowCalcStyles));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\tbody.push(parseRow(row));\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tfunction parseRow(row, styles){\r\n\t\tvar rowData = [];\r\n\r\n\t\trow.columns.forEach((col) =>{\r\n\t\t\tvar cell;\r\n\r\n\t\t\tif(col){\r\n\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tcol.value = JSON.stringify(col.value);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\tcol.value = \"\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcell = {\r\n\t\t\t\t\tcontent:col.value,\r\n\t\t\t\t\tcolSpan:col.width,\r\n\t\t\t\t\trowSpan:col.height,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tif(styles){\r\n\t\t\t\t\tcell.styles = styles;\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowData.push(cell);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowData;\r\n\t}\r\n\r\n\r\n\t//configure PDF\r\n\tvar doc = new jspdf.jsPDF(jsPDFParams); //set document to landscape, better for most tables\r\n\r\n\tif(options && options.autoTable){\r\n\t\tif(typeof options.autoTable === \"function\"){\r\n\t\t\tautoTableParams = options.autoTable(doc) || {};\r\n\t\t}else{\r\n\t\t\tautoTableParams = options.autoTable;\r\n\t\t}\r\n\t}\r\n\r\n\tif(title){\r\n\t\tautoTableParams.didDrawPage = function(data) {\r\n\t\t\tdoc.text(title, 40, 30);\r\n\t\t};\r\n\t}\r\n\r\n\tautoTableParams.head = header;\r\n\tautoTableParams.body = body;\r\n\r\n\tdoc.autoTable(autoTableParams);\r\n\r\n\tif(options && options.documentProcessing){\r\n\t\toptions.documentProcessing(doc);\r\n\t}\r\n\r\n\tsetFileContents(doc.output(\"arraybuffer\"), \"application/pdf\");\r\n};","import CoreFeature from '../../../../core/CoreFeature.js';\r\n\r\nexport default function(list, options, setFileContents){\r\n\tvar self = this,\r\n\tsheetName = options.sheetName || \"Sheet1\",\r\n\tworkbook = XLSX.utils.book_new(),\r\n\ttableFeatures = new CoreFeature(this),\r\n\toutput;\r\n\r\n\tworkbook.SheetNames = [];\r\n\tworkbook.Sheets = {};\r\n\r\n\tfunction generateSheet(){\r\n\t\tvar rows = [],\r\n\t\tmerges = [],\r\n\t\tworksheet = {},\r\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 }};\r\n\r\n\t\t//parse row list\r\n\t\tlist.forEach((row, i) => {\r\n\t\t\tvar rowData = [];\r\n\r\n\t\t\trow.columns.forEach(function(col, j){\r\n\r\n\t\t\t\tif(col){\r\n\t\t\t\t\trowData.push(!(col.value instanceof Date) && typeof col.value === \"object\" ? JSON.stringify(col.value) : col.value);\r\n\r\n\t\t\t\t\tif(col.width > 1 || col.height > -1){\r\n\t\t\t\t\t\tif(col.height > 1 || col.width > 1){\r\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}});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\trowData.push(\"\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\trows.push(rowData);\r\n\t\t});\r\n\r\n\t\t//convert rows to worksheet\r\n\t\tXLSX.utils.sheet_add_aoa(worksheet, rows);\r\n\r\n\t\tworksheet['!ref'] = XLSX.utils.encode_range(range);\r\n\r\n\t\tif(merges.length){\r\n\t\t\tworksheet[\"!merges\"] = merges;\r\n\t\t}\r\n\r\n\t\treturn worksheet;\r\n\t}\r\n\r\n\tif(options.sheetOnly){\r\n\t\tsetFileContents(generateSheet());\r\n\t\treturn;\r\n\t}\r\n\r\n\tif(options.sheets){\r\n\t\tfor(var sheet in options.sheets){\r\n\r\n\t\t\tif(options.sheets[sheet] === true){\r\n\t\t\t\tworkbook.SheetNames.push(sheet);\r\n\t\t\t\tworkbook.Sheets[sheet] = generateSheet();\r\n\t\t\t}else{\r\n\r\n\t\t\t\tworkbook.SheetNames.push(sheet);\r\n\r\n\t\t\t\ttableFeatures.commsSend(options.sheets[sheet], \"download\", \"intercept\",{\r\n\t\t\t\t\ttype:\"xlsx\",\r\n\t\t\t\t\toptions:{sheetOnly:true},\r\n\t\t\t\t\tactive:self.active,\r\n\t\t\t\t\tintercept:function(data){\r\n\t\t\t\t\t\tworkbook.Sheets[sheet] = data;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tworkbook.SheetNames.push(sheetName);\r\n\t\tworkbook.Sheets[sheetName] = generateSheet();\r\n\t}\r\n\r\n\tif(options.documentProcessing){\r\n\t\tworkbook = options.documentProcessing(workbook);\r\n\t}\r\n\r\n\t//convert workbook to binary array\r\n\tfunction s2ab(s) {\r\n\t\tvar buf = new ArrayBuffer(s.length);\r\n\t\tvar view = new Uint8Array(buf);\r\n\t\tfor (var i=0; i!=s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;\r\n\t\t\treturn buf;\r\n\t}\r\n\r\n\toutput = XLSX.write(workbook, {bookType:'xlsx', bookSST:true, type: 'binary'});\r\n\r\n\tsetFileContents(s2ab(output), \"application/octet-stream\");\r\n};","export default function(list, options, setFileContents){\r\n\tif(this.modExists(\"export\", true)){\r\n\t\tsetFileContents(this.modules.export.genereateHTMLTable(list), \"text/html\");\r\n\t}\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultDownloaders from './defaults/downloaders.js';\r\n\r\nclass Download extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.registerTableOption(\"downloadReady\", function(data, blob){return blob;}); //function to manipulate download data\r\n\t\tthis.registerTableOption(\"downloadConfig\", {}); //download config\r\n\t\tthis.registerTableOption(\"downloadRowRange\", \"active\"); //restrict download to active rows only\r\n\r\n\t\tthis.registerColumnOption(\"download\");\r\n\t\tthis.registerColumnOption(\"titleDownload\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"download\", this.download.bind(this));\r\n\t\tthis.registerTableFunction(\"downloadToTab\", this.downloadToTab.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tdownloadToTab(type, filename, options, active){\r\n\t\tthis.download(type, filename, options, active, true);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\t//trigger file download\r\n\tdownload(type, filename, options, range, interceptCallback){\r\n\t\tvar downloadFunc = false;\r\n\r\n\t\tfunction buildLink(data, mime){\r\n\t\t\tif(interceptCallback){\r\n\t\t\t\tif(interceptCallback === true){\r\n\t\t\t\t\tthis.triggerDownload(data, mime, type, filename, true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tinterceptCallback(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tthis.triggerDownload(data, mime, type, filename);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(typeof type == \"function\"){\r\n\t\t\tdownloadFunc = type;\r\n\t\t}else{\r\n\t\t\tif(Download.downloaders[type]){\r\n\t\t\t\tdownloadFunc = Download.downloaders[type];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Download Error - No such download type found: \", type);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(downloadFunc){\r\n\t\t\tvar list = this.generateExportList(range);\r\n\r\n\t\t\tdownloadFunc.call(this.table, list , options || {}, buildLink.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateExportList(range){\r\n\t\tvar list = this.table.modules.export.generateExportList(this.table.options.downloadConfig, false, range || this.table.options.downloadRowRange, \"download\");\r\n\r\n\t\t//assign group header formatter\r\n\t\tvar groupHeader = this.table.options.groupHeaderDownload;\r\n\r\n\t\tif(groupHeader && !Array.isArray(groupHeader)){\r\n\t\t\tgroupHeader = [groupHeader];\r\n\t\t}\r\n\r\n\t\tlist.forEach((row) => {\r\n\t\t\tvar group;\r\n\r\n\t\t\tif(row.type === \"group\"){\r\n\t\t\t\tgroup = row.columns[0];\r\n\r\n\t\t\t\tif(groupHeader && groupHeader[row.indent]){\r\n\t\t\t\t\tgroup.value = groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn list;\r\n\t}\r\n\r\n\ttriggerDownload(data, mime, type, filename, newTab){\r\n\t\tvar element = document.createElement('a'),\r\n\t\tblob = new Blob([data],{type:mime}),\r\n\t\tfilename = filename || \"Tabulator.\" + (typeof type === \"function\" ? \"txt\" : type);\r\n\r\n\t\tblob = this.table.options.downloadReady(data, blob);\r\n\r\n\t\tif(blob){\r\n\r\n\t\t\tif(newTab){\r\n\t\t\t\twindow.open(window.URL.createObjectURL(blob));\r\n\t\t\t}else{\r\n\t\t\t\tif(navigator.msSaveOrOpenBlob){\r\n\t\t\t\t\tnavigator.msSaveOrOpenBlob(blob, filename);\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.setAttribute('href', window.URL.createObjectURL(blob));\r\n\r\n\t\t\t\t\t//set file title\r\n\t\t\t\t\telement.setAttribute('download', filename);\r\n\r\n\t\t\t\t\t//trigger download\r\n\t\t\t\t\telement.style.display = 'none';\r\n\t\t\t\t\tdocument.body.appendChild(element);\r\n\t\t\t\t\telement.click();\r\n\r\n\t\t\t\t\t//remove temporary link element\r\n\t\t\t\t\tdocument.body.removeChild(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"downloadComplete\");\r\n\t\t}\r\n\t}\r\n\r\n\tcommsReceived(table, action, data){\r\n\t\tswitch(action){\r\n\t\t\tcase \"intercept\":\r\n\t\t\tthis.download(data.type, \"\", data.options, data.active, data.intercept);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nDownload.moduleName = \"download\";\r\n\r\n//load defaults\r\nDownload.downloaders = defaultDownloaders;\r\n\r\nexport default Download;","export default function maskInput(el, options){\r\n\tvar mask = options.mask,\r\n\tmaskLetter = typeof options.maskLetterChar !== \"undefined\" ? options.maskLetterChar : \"A\",\r\n\tmaskNumber = typeof options.maskNumberChar !== \"undefined\" ? options.maskNumberChar : \"9\",\r\n\tmaskWildcard = typeof options.maskWildcardChar !== \"undefined\" ? options.maskWildcardChar : \"*\",\r\n\tsuccess = false;\r\n\r\n\tfunction fillSymbols(index){\r\n\t\tvar symbol = mask[index];\r\n\t\tif(typeof symbol !== \"undefined\" && symbol !== maskWildcard && symbol !== maskLetter && symbol !== maskNumber){\r\n\t\t\tel.value = el.value + \"\" + symbol;\r\n\t\t\tfillSymbols(index+1);\r\n\t\t}\r\n\t}\r\n\r\n\tel.addEventListener(\"keydown\", (e) => {\r\n\t\tvar index = el.value.length,\r\n\t\tchar = e.key;\r\n\r\n\t\tif(e.keyCode > 46){\r\n\t\t\tif(index >= mask.length){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tsuccess = false;\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\tswitch(mask[index]){\r\n\t\t\t\t\tcase maskLetter:\r\n\t\t\t\t\tif(char.toUpperCase() == char.toLowerCase()){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase maskNumber:\r\n\t\t\t\t\tif(isNaN(char)){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase maskWildcard:\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(char !== mask[index]){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\r\n\t\treturn;\r\n\t});\r\n\r\n\tel.addEventListener(\"keyup\", (e) => {\r\n\t\tif(e.keyCode > 46){\r\n\t\t\tif(options.maskAutoFill){\r\n\t\t\t\tfillSymbols(el.value.length);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\r\n\tif(!el.placeholder){\r\n\t\tel.placeholder = mask;\r\n\t}\r\n\r\n\tif(options.maskAutoFill){\r\n\t\tfillSymbols(el.value.length);\r\n\t}\r\n}","import input from './editors/input.js';\r\nimport textarea from './editors/textarea.js';\r\nimport number from './editors/number.js';\r\nimport range from './editors/range.js';\r\nimport select from './editors/select.js';\r\nimport autocomplete from './editors/autocomplete.js';\r\nimport star from './editors/star.js';\r\nimport progress from './editors/progress.js';\r\nimport tickCross from './editors/tickCross.js';\r\n\r\nexport default {\r\n\tinput:input,\r\n\ttextarea:textarea,\r\n number:number,\r\n range:range,\r\n\tselect:select,\r\n\tautocomplete:autocomplete,\r\n\tstar:star,\r\n\tprogress:progress,\r\n\ttickCross:tickCross,\r\n};","import maskInput from '../../inputMask.js';\r\n\r\n//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", editorParams.search ? \"search\" : \"text\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t});\r\n\r\n\tfunction onChange(e){\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\r\n\t\t\tif(success(input.value)){\r\n\t\t\t\tcellValue = input.value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\t// case 9:\r\n\t\t\tcase 13:\r\n\t\t\tonChange(e);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\te.stopPropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\treturn input;\r\n};","import maskInput from '../../inputMask.js';\r\n\r\n//resizable text area element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n var self = this,\r\n cellValue = cell.getValue(),\r\n vertNav = editorParams.verticalNavigation || \"hybrid\",\r\n value = String(cellValue !== null && typeof cellValue !== \"undefined\" ? cellValue : \"\"),\r\n count = (value.match(/(?:\\r\\n|\\r|\\n)/g) || []).length + 1,\r\n input = document.createElement(\"textarea\"),\r\n scrollHeight = 0;\r\n\r\n //create and style input\r\n input.style.display = \"block\";\r\n input.style.padding = \"2px\";\r\n input.style.height = \"100%\";\r\n input.style.width = \"100%\";\r\n input.style.boxSizing = \"border-box\";\r\n input.style.whiteSpace = \"pre-wrap\";\r\n input.style.resize = \"none\";\r\n\r\n if(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n for (let key in editorParams.elementAttributes){\r\n if(key.charAt(0) == \"+\"){\r\n key = key.slice(1);\r\n input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n }else{\r\n input.setAttribute(key, editorParams.elementAttributes[key]);\r\n }\r\n }\r\n }\r\n\r\n input.value = value;\r\n\r\n onRendered(function(){\r\n input.focus({preventScroll: true});\r\n input.style.height = \"100%\";\r\n\r\n input.scrollHeight;\r\n input.style.height = input.scrollHeight + \"px\";\r\n cell.getRow().normalizeHeight();\r\n });\r\n\r\n function onChange(e){\r\n\r\n if(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\r\n\r\n if(success(input.value)){\r\n cellValue = input.value; //persist value if successfully validated incase editor is used as header filter\r\n }\r\n\r\n setTimeout(function(){\r\n cell.getRow().normalizeHeight();\r\n },300)\r\n }else{\r\n cancel();\r\n }\r\n }\r\n\r\n //submit new value on blur or change\r\n input.addEventListener(\"change\", onChange);\r\n input.addEventListener(\"blur\", onChange);\r\n\r\n input.addEventListener(\"keyup\", function(){\r\n\r\n input.style.height = \"\";\r\n\r\n var heightNow = input.scrollHeight;\r\n\r\n input.style.height = heightNow + \"px\";\r\n\r\n if(heightNow != scrollHeight){\r\n scrollHeight = heightNow;\r\n cell.getRow().normalizeHeight();\r\n }\r\n });\r\n\r\n input.addEventListener(\"keydown\", function(e){\r\n\r\n switch(e.keyCode){\r\n case 27:\r\n cancel();\r\n break;\r\n\r\n case 38: //up arrow\r\n if(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart)){\r\n e.stopImmediatePropagation();\r\n e.stopPropagation();\r\n }\r\n\r\n break;\r\n\r\n case 40: //down arrow\r\n if(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart !== input.value.length)){\r\n e.stopImmediatePropagation();\r\n e.stopPropagation();\r\n }\r\n break;\r\n\r\n case 35:\r\n case 36:\r\n e.stopPropagation();\r\n break;\r\n }\r\n });\r\n\r\n if(editorParams.mask){\r\n maskInput(input, editorParams);\r\n }\r\n\r\n return input;\r\n};","import maskInput from '../../inputMask.js';\r\n\r\n//input element with type of number\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar cellValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", \"number\");\r\n\r\n\tif(typeof editorParams.max != \"undefined\"){\r\n\t\tinput.setAttribute(\"max\", editorParams.max);\r\n\t}\r\n\r\n\tif(typeof editorParams.min != \"undefined\"){\r\n\t\tinput.setAttribute(\"min\", editorParams.min);\r\n\t}\r\n\r\n\tif(typeof editorParams.step != \"undefined\"){\r\n\t\tinput.setAttribute(\"step\", editorParams.step);\r\n\t}\r\n\r\n\t//create and style input\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\r\n\tvar blurFunc = function(e){\r\n\t\tonChange();\r\n\t};\r\n\r\n\tonRendered(function () {\r\n\t\t//submit new value on blur\r\n\t\tinput.removeEventListener(\"blur\", blurFunc);\r\n\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\r\n\t\t//submit new value on blur\r\n\t\tinput.addEventListener(\"blur\", blurFunc);\r\n\t});\r\n\r\n\tfunction onChange(){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(!isNaN(value) && value !==\"\"){\r\n\t\t\tvalue = Number(value);\r\n\t\t}\r\n\r\n\t\tif(value !== cellValue){\r\n\t\t\tif(success(value)){\r\n\t\t\t\tcellValue = value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 13:\r\n\t\t\t// case 9:\r\n\t\t\tonChange();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tcase 40: //down arrow\r\n\t\t\tif(vertNav == \"editor\"){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\te.stopPropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\treturn input;\r\n};","//input element with type of number\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", \"range\");\r\n\r\n\tif (typeof editorParams.max != \"undefined\") {\r\n\t\tinput.setAttribute(\"max\", editorParams.max);\r\n\t}\r\n\r\n\tif (typeof editorParams.min != \"undefined\") {\r\n\t\tinput.setAttribute(\"min\", editorParams.min);\r\n\t}\r\n\r\n\tif (typeof editorParams.step != \"undefined\") {\r\n\t\tinput.setAttribute(\"step\", editorParams.step);\r\n\t}\r\n\r\n\t//create and style input\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\r\n\tonRendered(function () {\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t});\r\n\r\n\tfunction onChange(){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(!isNaN(value) && value !==\"\"){\r\n\t\t\tvalue = Number(value);\r\n\t\t}\r\n\r\n\t\tif(value != cellValue){\r\n\t\t\tif(success(value)){\r\n\t\t\t\tcellValue = value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tonChange();\r\n\t});\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 13:\r\n\t\t\t// case 9:\r\n\t\t\tonChange();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\treturn input;\r\n};","import Helpers from '../../../../core/tools/Helpers.js';\r\n\r\n//dropdown select editor\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\tcellEl = cell.getElement(),\r\n\tinitialValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinitialDisplayValue = typeof initialValue !== \"undefined\" || initialValue === null ? (Array.isArray(initialValue) ? initialValue : [initialValue]) : (typeof editorParams.defaultValue !== \"undefined\" ? editorParams.defaultValue : []),\r\n\tinput = document.createElement(\"input\"),\r\n\tlistEl = document.createElement(\"div\"),\r\n\tmultiselect = editorParams.multiselect,\r\n\tdataItems = [],\r\n\tcurrentItem = {},\r\n\tdisplayItems = [],\r\n\tcurrentItems = [],\r\n\tblurable = true,\r\n\tblockListShow = false,\r\n\tsearchWord = \"\",\r\n\tsearchWordTimeout = null;\r\n\r\n\tif(Array.isArray(editorParams) || (!Array.isArray(editorParams) && typeof editorParams === \"object\" && !editorParams.values)){\r\n\t\tconsole.warn(\"DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object\");\r\n\t\teditorParams = {values:editorParams};\r\n\t}\r\n\r\n\tfunction getUniqueColumnValues(field){\r\n\t\tvar output = {},\r\n\t\tdata = self.table.getData(),\r\n\t\tcolumn;\r\n\r\n\t\tif(field){\r\n\t\t\tcolumn = self.table.columnManager.getColumnByField(field);\r\n\t\t}else{\r\n\t\t\tcolumn = cell.getColumn()._getSelf();\r\n\t\t}\r\n\r\n\t\tif(column){\r\n\t\t\tdata.forEach(function(row){\r\n\t\t\t\tvar val = column.getFieldValue(row);\r\n\r\n\t\t\t\tif(val !== null && typeof val !== \"undefined\" && val !== \"\"){\r\n\t\t\t\t\toutput[val] = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"unable to find matching column to create select lookup list:\", field);\r\n\t\t}\r\n\r\n\t\treturn Object.keys(output);\r\n\t}\r\n\r\n\tfunction parseItems(inputValues, curentValues){\r\n\t\tvar dataList = [];\r\n\t\tvar displayList = [];\r\n\r\n\t\tfunction processComplexListItem(item){\r\n\t\t\tvar item = {\r\n\t\t\t\tlabel:item.label,\r\n\t\t\t\tvalue:item.value,\r\n\t\t\t\titemParams:item.itemParams,\r\n\t\t\t\telementAttributes: item.elementAttributes,\r\n\t\t\t\telement:false,\r\n\t\t\t};\r\n\r\n\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t// }\r\n\r\n\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\tsetItem(item);\r\n\t\t\t}\r\n\r\n\t\t\tdataList.push(item);\r\n\t\t\tdisplayList.push(item);\r\n\r\n\t\t\treturn item;\r\n\t\t}\r\n\r\n\t\tif(typeof inputValues == \"function\"){\r\n\t\t\tinputValues = inputValues(cell);\r\n\t\t}\r\n\r\n\t\tif(Array.isArray(inputValues)){\r\n\t\t\tinputValues.forEach(function(value){\r\n\t\t\t\tvar item;\r\n\r\n\t\t\t\tif(typeof value === \"object\"){\r\n\r\n\t\t\t\t\tif(value.options){\r\n\t\t\t\t\t\titem = {\r\n\t\t\t\t\t\t\tlabel:value.label,\r\n\t\t\t\t\t\t\tgroup:true,\r\n\t\t\t\t\t\t\titemParams:value.itemParams,\r\n\t\t\t\t\t\t\telementAttributes:value.elementAttributes,\r\n\t\t\t\t\t\t\telement:false,\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\tdisplayList.push(item);\r\n\r\n\t\t\t\t\t\tvalue.options.forEach(function(item){\r\n\t\t\t\t\t\t\tprocessComplexListItem(item);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tprocessComplexListItem(value);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\titem = {\r\n\t\t\t\t\t\tlabel:value,\r\n\t\t\t\t\t\tvalue:value,\r\n\t\t\t\t\t\telement:false,\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t\t\t// }\r\n\r\n\t\t\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\t\t\tsetItem(item);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdataList.push(item);\r\n\t\t\t\t\tdisplayList.push(item);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tfor(var key in inputValues){\r\n\t\t\t\tvar item = {\r\n\t\t\t\t\tlabel:inputValues[key],\r\n\t\t\t\t\tvalue:key,\r\n\t\t\t\t\telement:false,\r\n\t\t\t\t};\r\n\r\n\t\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t\t// }\r\n\r\n\t\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\t\tsetItem(item);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdataList.push(item);\r\n\t\t\t\tdisplayList.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(editorParams.sortValuesList){\r\n\t\t\tdataList.sort((a, b) => {\r\n\t\t\t\treturn a.label < b.label ? -1 : (a.label > b.label ? 1 : 0);\r\n\t\t\t});\r\n\r\n\t\t\tdisplayList.sort((a, b) => {\r\n\t\t\t\treturn a.label < b.label ? -1 : (a.label > b.label ? 1 : 0);\r\n\t\t\t});\r\n\r\n\t\t\tif(editorParams.sortValuesList !== \"asc\"){\r\n\t\t\t\tdataList.reverse();\r\n\t\t\t\tdisplayList.reverse();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataItems = dataList;\r\n\t\tdisplayItems = displayList;\r\n\r\n\t\tfillList();\r\n\t}\r\n\r\n\tfunction fillList(){\r\n\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\r\n\t\tdisplayItems.forEach(function(item){\r\n\r\n\t\t\tvar el = item.element;\r\n\r\n\t\t\tif(!el){\r\n\t\t\t\tel = document.createElement(\"div\");\r\n\t\t\t\titem.label = editorParams.listItemFormatter ? editorParams.listItemFormatter(item.value, item.label, cell, el, item.itemParams) : item.label;\r\n\t\t\t\tif(item.group){\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-select-list-group\");\r\n\t\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\t\tel.innerHTML = item.label === \"\" ? \" \" : item.label;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-select-list-item\");\r\n\t\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\t\tel.innerHTML = item.label === \"\" ? \" \" : item.label;\r\n\r\n\t\t\t\t\tel.addEventListener(\"click\", function(){\r\n\t\t\t\t\t\tblockListShow = true;\r\n\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tblockListShow = false;\r\n\t\t\t\t\t\t}, 10);\r\n\r\n\t\t\t\t\t\t// setCurrentItem(item);\r\n\t\t\t\t\t\t// chooseItem();\r\n\t\t\t\t\t\tif(multiselect){\r\n\t\t\t\t\t\t\ttoggleItem(item);\r\n\t\t\t\t\t\t\tinput.focus();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tchooseItem(item);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t// if(item === currentItem){\r\n\t\t\t\t\t// \tel.classList.add(\"active\");\r\n\t\t\t\t\t// }\r\n\r\n\t\t\t\t\tif(currentItems.indexOf(item) > -1){\r\n\t\t\t\t\t\tel.classList.add(\"active\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(item.elementAttributes && typeof item.elementAttributes == \"object\"){\r\n\t\t\t\t\tfor (let key in item.elementAttributes){\r\n\t\t\t\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\t\t\t\tkey = key.slice(1);\r\n\t\t\t\t\t\t\tel.setAttribute(key, input.getAttribute(key) + item.elementAttributes[\"+\" + key]);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tel.setAttribute(key, item.elementAttributes[key]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tel.addEventListener(\"mousedown\", function(){\r\n\t\t\t\t\tblurable = false;\r\n\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tblurable = true;\r\n\t\t\t\t\t}, 10);\r\n\t\t\t\t});\r\n\r\n\t\t\t\titem.element = el;\r\n\r\n\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(el);\r\n\t\t});\r\n\t}\r\n\r\n\r\n\tfunction setCurrentItem(item, active){\r\n\r\n\t\tif(!multiselect && currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"active\");\r\n\t\t}\r\n\r\n\t\tif(currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"focused\");\r\n\t\t}\r\n\r\n\t\tcurrentItem = item;\r\n\r\n\t\tif(item.element){\r\n\t\t\titem.element.classList.add(\"focused\");\r\n\t\t\tif(active){\r\n\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(item && item.element && item.element.scrollIntoView){\r\n\t\t\titem.element.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'start'});\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t// function chooseItem(){\r\n\t// \thideList();\r\n\r\n\t// \tif(initialValue !== currentItem.value){\r\n\t// \t\tinitialValue = currentItem.value;\r\n\t// \t\tsuccess(currentItem.value);\r\n\t// \t}else{\r\n\t// \t\tcancel();\r\n\t// \t}\r\n\t// }\r\n\r\n\tfunction setItem(item) {\r\n\t\tvar index = currentItems.indexOf(item);\r\n\r\n\t\tif(index == -1){\r\n\t\t\tcurrentItems.push(item);\r\n\t\t\tsetCurrentItem(item, true);\r\n\t\t}\r\n\r\n\t\tfillInput();\r\n\t}\r\n\r\n\tfunction unsetItem(index) {\r\n\t\tvar item = currentItems[index];\r\n\r\n\t\tif(index > -1){\r\n\t\t\tcurrentItems.splice(index, 1);\r\n\t\t\tif(item.element){\r\n\t\t\t\titem.element.classList.remove(\"active\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction toggleItem(item) {\r\n\t\tif(!item){\r\n\t\t\titem = currentItem;\r\n\t\t}\r\n\r\n\t\tvar index = currentItems.indexOf(item);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tunsetItem(index);\r\n\t\t}else{\r\n\t\t\tif(multiselect !== true && currentItems.length >= multiselect){\r\n\t\t\t\tunsetItem(0);\r\n\t\t\t}\r\n\r\n\t\t\tsetItem(item);\r\n\t\t}\r\n\r\n\t\tfillInput();\r\n\r\n\t}\r\n\r\n\tfunction chooseItem(item){\r\n\t\thideList();\r\n\r\n\t\tif(!item){\r\n\t\t\titem = currentItem;\r\n\t\t}\r\n\r\n\t\tif(item){\r\n\t\t\tinput.value = item.label;\r\n\t\t\tsuccess(item.value);\r\n\t\t}\r\n\r\n\t\tinitialDisplayValue = [item.value];\r\n\t}\r\n\r\n\r\n\tfunction chooseItems(silent){\r\n\t\tif(!silent){\r\n\t\t\thideList();\r\n\t\t}\r\n\r\n\t\tvar output = [];\r\n\r\n\t\tcurrentItems.forEach((item) => {\r\n\t\t\toutput.push(item.value);\r\n\t\t});\r\n\r\n\t\tinitialDisplayValue = output;\r\n\r\n\t\tsuccess(output);\r\n\t}\r\n\r\n\tfunction fillInput(){\r\n\t\tvar output = [];\r\n\r\n\t\tcurrentItems.forEach((item) => {\r\n\t\t\toutput.push(item.label);\r\n\t\t});\r\n\r\n\t\tinput.value = output.join(\", \");\r\n\r\n\t\tif(self.currentCell === false){\r\n\t\t\tchooseItems(true);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tfunction unsetItems() {\r\n\r\n\t\tvar len = currentItems.length;\r\n\r\n\t\tfor(let i = 0; i < len; i++){\r\n\t\t\tunsetItem(0);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction cancelItem(){\r\n\t\thideList();\r\n\t\tcancel();\r\n\t}\r\n\r\n\tfunction showList(){\r\n\t\tcurrentItems = [];\r\n\r\n\t\tif(!listEl.parentNode){\r\n\t\t\tif(editorParams.values === true){\r\n\t\t\t\tparseItems(getUniqueColumnValues(), initialDisplayValue);\r\n\t\t\t}else if(typeof editorParams.values === \"string\"){\r\n\t\t\t\tparseItems(getUniqueColumnValues(editorParams.values), initialDisplayValue);\r\n\t\t\t}else{\r\n\t\t\t\tparseItems(editorParams.values || [], initialDisplayValue);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tvar offset = Helpers.elOffset(cellEl);\r\n\r\n\t\t\tlistEl.style.minWidth = cellEl.offsetWidth + \"px\";\r\n\r\n\t\t\tlistEl.style.top = (offset.top + cellEl.offsetHeight) + \"px\";\r\n\t\t\tlistEl.style.left = offset.left + \"px\";\r\n\r\n\r\n\t\t\tlistEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tblurable = false;\r\n\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tblurable = true;\r\n\t\t\t\t}, 10);\r\n\t\t\t});\r\n\r\n\t\t\tdocument.body.appendChild(listEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction hideList(){\r\n\t\tif(listEl.parentNode){\r\n\t\t\tlistEl.parentNode.removeChild(listEl);\r\n\t\t}\r\n\r\n\t\tremoveScrollListener();\r\n\t}\r\n\r\n\tfunction removeScrollListener() {\r\n\t\tself.table.rowManager.element.removeEventListener(\"scroll\", cancelItem);\r\n\t}\r\n\r\n\tfunction scrollTovalue(char){\r\n\r\n\t\tclearTimeout(searchWordTimeout);\r\n\r\n\t\tvar character = String.fromCharCode(event.keyCode).toLowerCase();\r\n\t\tsearchWord += character.toLowerCase();\r\n\r\n\t\tvar match = dataItems.find((item) => {\r\n\t\t\treturn typeof item.label !== \"undefined\" && item.label.toLowerCase().startsWith(searchWord);\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tsetCurrentItem(match, !multiselect);\r\n\t\t}\r\n\r\n\t\tsearchWordTimeout = setTimeout(() => {\r\n\t\t\tsearchWord = \"\";\r\n\t\t}, 800)\r\n\t}\r\n\r\n\t//style input\r\n\tinput.setAttribute(\"type\", \"text\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\tinput.style.cursor = \"default\";\r\n\tinput.readOnly = (this.currentCell != false);\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = typeof initialValue !== \"undefined\" || initialValue === null ? initialValue : \"\";\r\n\r\n\t// if(editorParams.values === true){\r\n\t// \tparseItems(getUniqueColumnValues(), initialValue);\r\n\t// }else if(typeof editorParams.values === \"string\"){\r\n\t// \tparseItems(getUniqueColumnValues(editorParams.values), initialValue);\r\n\t// }else{\r\n\t// \tparseItems(editorParams.values || [], initialValue);\r\n\t// }\r\n\r\n\tinput.addEventListener(\"search\", function(e){\r\n\t\tif(!input.value){\r\n\t\t\tunsetItems();\r\n\t\t\tchooseItems();\r\n\t\t}\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tvar index;\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tindex = dataItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index > 0){\r\n\t\t\t\t\tsetCurrentItem(dataItems[index - 1], !multiselect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 40: //down arrow\r\n\t\t\tindex = dataItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index < dataItems.length - 1)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index < dataItems.length - 1){\r\n\t\t\t\t\tif(index == -1){\r\n\t\t\t\t\t\tsetCurrentItem(dataItems[0], !multiselect);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsetCurrentItem(dataItems[index + 1], !multiselect);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\t// chooseItem();\r\n\r\n\t\t\tif(multiselect){\r\n\t\t\t\ttoggleItem();\r\n\t\t\t}else{\r\n\t\t\t\tchooseItem();\r\n\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancelItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 9: //tab\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tif(self.currentCell === false){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tif(e.keyCode >= 38 && e.keyCode <= 90){\r\n\t\t\t\tscrollTovalue(e.keyCode);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tif(blurable){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tchooseItems();\r\n\t\t\t}else{\r\n\t\t\t\tcancelItem();\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"focus\", function(e){\r\n\t\tif(!blockListShow){\r\n\t\t\tshowList();\r\n\t\t}\r\n\t});\r\n\r\n\t//style list element\r\n\tlistEl = document.createElement(\"div\");\r\n\tlistEl.classList.add(\"tabulator-edit-select-list\");\r\n\r\n\tonRendered(function(){\r\n\t\tinput.style.height = \"100%\";\r\n\t\tinput.focus({preventScroll: true});\r\n\t});\r\n\r\n\tsetTimeout(() => {\r\n\t\tthis.table.rowManager.element.addEventListener(\"scroll\", cancelItem);\r\n\t}, 10);\r\n\r\n\treturn input;\r\n};","import Helpers from '../../../../core/tools/Helpers.js';\r\nimport maskInput from '../../inputMask.js';\r\n\r\n//autocomplete\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\tcellEl = cell.getElement(),\r\n\tinitialValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinitialDisplayValue = typeof initialValue !== \"undefined\" || initialValue === null ? initialValue : (typeof editorParams.defaultValue !== \"undefined\" ? editorParams.defaultValue : \"\"),\r\n\tinput = document.createElement(\"input\"),\r\n\tlistEl = document.createElement(\"div\"),\r\n\tallItems = [],\r\n\tdisplayItems = [],\r\n\tvalues = [],\r\n\tcurrentItem = false,\r\n\tblurable = true,\r\n\tuniqueColumnValues = false;\r\n\r\n\t//style input\r\n\tinput.setAttribute(\"type\", \"search\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//style list element\r\n\tlistEl.classList.add(\"tabulator-edit-select-list\");\r\n\r\n\tlistEl.addEventListener(\"mousedown\", function(e){\r\n\t\tblurable = false;\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tblurable = true;\r\n\t\t}, 10);\r\n\t});\r\n\r\n\r\n\tfunction genUniqueColumnValues(){\r\n\t\tif(editorParams.values === true){\r\n\t\t\tuniqueColumnValues = getUniqueColumnValues();\r\n\t\t}else if(typeof editorParams.values === \"string\"){\r\n\t\t\tuniqueColumnValues = getUniqueColumnValues(editorParams.values);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getUniqueColumnValues(field){\r\n\t\tvar output = {},\r\n\t\tdata = self.table.getData(),\r\n\t\tcolumn;\r\n\r\n\t\tif(field){\r\n\t\t\tcolumn = self.table.columnManager.getColumnByField(field);\r\n\t\t}else{\r\n\t\t\tcolumn = cell.getColumn()._getSelf();\r\n\t\t}\r\n\r\n\t\tif(column){\r\n\t\t\tdata.forEach(function(row){\r\n\t\t\t\tvar val = column.getFieldValue(row);\r\n\r\n\t\t\t\tif(val !== null && typeof val !== \"undefined\" && val !== \"\"){\r\n\t\t\t\t\toutput[val] = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(editorParams.sortValuesList){\r\n\t\t\t\tif(editorParams.sortValuesList == \"asc\"){\r\n\t\t\t\t\toutput = Object.keys(output).sort();\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput = Object.keys(output).sort().reverse();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\toutput = Object.keys(output);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"unable to find matching column to create autocomplete lookup list:\", field);\r\n\t\t}\r\n\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tfunction filterList(term, intialLoad){\r\n\t\tvar matches = [],\r\n\t\tvalues, items, searchEl;\r\n\r\n\t\t//lookup base values list\r\n\t\tif(uniqueColumnValues){\r\n\t\t\tvalues = uniqueColumnValues;\r\n\t\t}else{\r\n\t\t\tvalues = editorParams.values || [];\r\n\t\t}\r\n\r\n\t\tif(editorParams.searchFunc){\r\n\t\t\tmatches = editorParams.searchFunc(term, values);\r\n\r\n\t\t\tif(matches instanceof Promise){\r\n\r\n\t\t\t\taddNotice(typeof editorParams.searchingPlaceholder !== \"undefined\" ? editorParams.searchingPlaceholder : \"Searching...\");\r\n\r\n\t\t\t\tmatches.then((result) => {\r\n\t\t\t\t\tfillListIfNotEmpty(parseItems(result), intialLoad);\r\n\t\t\t\t}).catch((err) => {\r\n\t\t\t\t\tconsole.err(\"error in autocomplete search promise:\", err);\r\n\t\t\t\t});\r\n\r\n\t\t\t}else{\r\n\t\t\t\tfillListIfNotEmpty(parseItems(matches), intialLoad);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\titems = parseItems(values);\r\n\r\n\t\t\tif(term === \"\"){\r\n\t\t\t\tif(editorParams.showListOnEmpty){\r\n\t\t\t\t\tmatches = items;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\titems.forEach(function(item){\r\n\t\t\t\t\tif(item.value !== null || typeof item.value !== \"undefined\"){\r\n\t\t\t\t\t\tif(String(item.value).toLowerCase().indexOf(String(term).toLowerCase()) > -1 || String(item.title).toLowerCase().indexOf(String(term).toLowerCase()) > -1){\r\n\t\t\t\t\t\t\tmatches.push(item);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tfillListIfNotEmpty(matches, intialLoad);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction addNotice(notice){\r\n\t\tvar searchEl = document.createElement(\"div\");\r\n\r\n\t\tclearList();\r\n\r\n\t\tif(notice !== false){\r\n\t\t\tsearchEl.classList.add(\"tabulator-edit-select-list-notice\");\r\n\t\t\tsearchEl.tabIndex = 0;\r\n\r\n\t\t\tif(notice instanceof Node){\r\n\t\t\t\tsearchEl.appendChild(notice);\r\n\t\t\t}else{\r\n\t\t\t\tsearchEl.innerHTML = notice;\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(searchEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction parseItems(inputValues){\r\n\t\tvar itemList = [];\r\n\r\n\t\tif(Array.isArray(inputValues)){\r\n\t\t\tinputValues.forEach(function(value){\r\n\r\n\t\t\t\tvar item = {};\r\n\r\n\t\t\t\tif(typeof value === \"object\"){\r\n\t\t\t\t\titem.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value.value, value.label) : value.label;\r\n\t\t\t\t\titem.value = value.value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\titem.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value;\r\n\t\t\t\t\titem.value = value;\r\n\t\t\t\t}\r\n\r\n\t\t\t\titemList.push(item);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tfor(var key in inputValues){\r\n\t\t\t\tvar item = {\r\n\t\t\t\t\ttitle:editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : inputValues[key],\r\n\t\t\t\t\tvalue:key,\r\n\t\t\t\t};\r\n\r\n\t\t\t\titemList.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn itemList;\r\n\t}\r\n\r\n\tfunction clearList(){\r\n\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\t}\r\n\r\n\tfunction fillListIfNotEmpty(items, intialLoad){\r\n\t\tif(items.length){\r\n\t\t\tfillList(items, intialLoad);\r\n\t\t}else{\r\n\t\t\tif(editorParams.emptyPlaceholder){\r\n\t\t\t\taddNotice(editorParams.emptyPlaceholder);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fillList(items, intialLoad){\r\n\t\tvar current = false;\r\n\r\n\t\tclearList();\r\n\r\n\t\tdisplayItems = items;\r\n\r\n\t\tdisplayItems.forEach(function(item){\r\n\t\t\tvar el = item.element;\r\n\r\n\t\t\tif(!el){\r\n\t\t\t\tel = document.createElement(\"div\");\r\n\t\t\t\tel.classList.add(\"tabulator-edit-select-list-item\");\r\n\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\tel.innerHTML = item.title;\r\n\r\n\t\t\t\tel.addEventListener(\"click\", function(e){\r\n\t\t\t\t\tsetCurrentItem(item);\r\n\t\t\t\t\tchooseItem();\r\n\t\t\t\t});\r\n\r\n\t\t\t\tel.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\t\tblurable = false;\r\n\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tblurable = true;\r\n\t\t\t\t\t}, 10);\r\n\t\t\t\t});\r\n\r\n\t\t\t\titem.element = el;\r\n\r\n\t\t\t\tif(intialLoad && item.value == initialValue){\r\n\t\t\t\t\tinput.value = item.title;\r\n\t\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t\t\tcurrent = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(item === currentItem){\r\n\t\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t\t\tcurrent = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(el);\r\n\t\t});\r\n\r\n\t\tif(!current){\r\n\t\t\tsetCurrentItem(false);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction chooseItem(){\r\n\t\thideList();\r\n\r\n\t\tif(currentItem){\r\n\t\t\tif(initialValue !== currentItem.value){\r\n\t\t\t\tinitialValue = currentItem.value;\r\n\t\t\t\tinput.value = currentItem.title;\r\n\t\t\t\tsuccess(currentItem.value);\r\n\t\t\t}else{\r\n\t\t\t\tcancel();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(editorParams.freetext){\r\n\t\t\t\tinitialValue = input.value;\r\n\t\t\t\tsuccess(input.value);\r\n\t\t\t}else{\r\n\t\t\t\tif(editorParams.allowEmpty && input.value === \"\"){\r\n\t\t\t\t\tinitialValue = input.value;\r\n\t\t\t\t\tsuccess(input.value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcancel();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction showList(){\r\n\t\tif(!listEl.parentNode){\r\n\t\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\r\n\t\t\tvar offset = Helpers.elOffset(cellEl);\r\n\r\n\t\t\tlistEl.style.minWidth = cellEl.offsetWidth + \"px\";\r\n\r\n\t\t\tlistEl.style.top = (offset.top + cellEl.offsetHeight) + \"px\";\r\n\t\t\tlistEl.style.left = offset.left + \"px\";\r\n\t\t\tdocument.body.appendChild(listEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setCurrentItem(item, showInputValue){\r\n\t\tif(currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"active\");\r\n\t\t}\r\n\r\n\t\tcurrentItem = item;\r\n\r\n\t\tif(item && item.element){\r\n\t\t\titem.element.classList.add(\"active\");\r\n\t\t}\r\n\r\n\t\tif(item && item.element && item.element.scrollIntoView){\r\n\t\t\titem.element.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'start'});\r\n\t\t}\r\n\t}\r\n\r\n\tfunction hideList(){\r\n\t\tif(listEl.parentNode){\r\n\t\t\tlistEl.parentNode.removeChild(listEl);\r\n\t\t}\r\n\r\n\t\tremoveScrollListener();\r\n\t}\r\n\r\n\r\n\tfunction cancelItem(){\r\n\t\thideList();\r\n\t\tcancel();\r\n\t}\r\n\r\n\tfunction removeScrollListener() {\r\n\t\tself.table.rowManager.element.removeEventListener(\"scroll\", cancelItem);\r\n\t}\r\n\r\n\t//allow key based navigation\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tvar index;\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tindex = displayItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index > 0){\r\n\t\t\t\t\tsetCurrentItem(displayItems[index - 1]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tsetCurrentItem(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 40: //down arrow\r\n\r\n\t\t\tindex = displayItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index < displayItems.length - 1)){\r\n\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index < displayItems.length - 1){\r\n\t\t\t\t\tif(index == -1){\r\n\t\t\t\t\t\tsetCurrentItem(displayItems[0]);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsetCurrentItem(displayItems[index + 1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\t// e.preventDefault();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\tchooseItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancelItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 36: //home\r\n\t\t\tcase 35: //end\r\n\t\t\t//prevent table navigation while using input element\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"keyup\", function(e){\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //up arrow\r\n\t\t\tcase 40: //right arrow\r\n\t\t\tcase 13: //enter\r\n\t\t\tcase 27: //escape\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tfilterList(input.value);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\tinput.addEventListener(\"search\", function(e){\r\n\t\tfilterList(input.value);\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tif(blurable){\r\n\t\t\tchooseItem();\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"focus\", function(e){\r\n\t\tvar value = initialDisplayValue;\r\n\t\tgenUniqueColumnValues();\r\n\t\tshowList();\r\n\t\tinput.value = value;\r\n\t\tfilterList(value, true);\r\n\t});\r\n\r\n\r\n\tonRendered(function(){\r\n\t\tinput.style.height = \"100%\";\r\n\t\tinput.focus({preventScroll: true});\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\tsetTimeout(() => {\r\n\t\tthis.table.rowManager.element.addEventListener(\"scroll\", cancelItem);\r\n\t}, 10);\r\n\r\n\tgenUniqueColumnValues();\r\n\tinput.value = initialDisplayValue;\r\n\tfilterList(initialDisplayValue, true);\r\n\r\n\treturn input;\r\n};","//star rating\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\telement = cell.getElement(),\r\n\tvalue = cell.getValue(),\r\n\tmaxStars = element.getElementsByTagName(\"svg\").length || 5,\r\n\tsize = element.getElementsByTagName(\"svg\")[0] ? element.getElementsByTagName(\"svg\")[0].getAttribute(\"width\") : 14,\r\n\tstars = [],\r\n\tstarsHolder = document.createElement(\"div\"),\r\n\tstar = document.createElementNS('http://www.w3.org/2000/svg', \"svg\");\r\n\r\n\r\n\t//change star type\r\n\tfunction starChange(val){\r\n\t\tstars.forEach(function(star, i){\r\n\t\t\tif(i < val){\r\n\t\t\t\tif(self.table.browser == \"ie\"){\r\n\t\t\t\t\tstar.setAttribute(\"class\", \"tabulator-star-active\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tstar.classList.replace(\"tabulator-star-inactive\", \"tabulator-star-active\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstar.innerHTML = '';\r\n\t\t\t}else{\r\n\t\t\t\tif(self.table.browser == \"ie\"){\r\n\t\t\t\t\tstar.setAttribute(\"class\", \"tabulator-star-inactive\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tstar.classList.replace(\"tabulator-star-active\", \"tabulator-star-inactive\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstar.innerHTML = '';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//build stars\r\n\tfunction buildStar(i){\r\n\r\n\t\tvar starHolder = document.createElement(\"span\");\r\n\t\tvar nextStar = star.cloneNode(true);\r\n\r\n\t\tstars.push(nextStar);\r\n\r\n\t\tstarHolder.addEventListener(\"mouseenter\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tstarChange(i);\r\n\t\t});\r\n\r\n\t\tstarHolder.addEventListener(\"mousemove\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t});\r\n\r\n\t\tstarHolder.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tsuccess(i);\r\n\t\t\telement.blur();\r\n\t\t});\r\n\r\n\t\tstarHolder.appendChild(nextStar);\r\n\t\tstarsHolder.appendChild(starHolder);\r\n\r\n\t}\r\n\r\n\t//handle keyboard navigation value change\r\n\tfunction changeValue(val){\r\n\t\tvalue = val;\r\n\t\tstarChange(val);\r\n\t}\r\n\r\n\t//style cell\r\n\telement.style.whiteSpace = \"nowrap\";\r\n\telement.style.overflow = \"hidden\";\r\n\telement.style.textOverflow = \"ellipsis\";\r\n\r\n\t//style holding element\r\n\tstarsHolder.style.verticalAlign = \"middle\";\r\n\tstarsHolder.style.display = \"inline-block\";\r\n\tstarsHolder.style.padding = \"4px\";\r\n\r\n\t//style star\r\n\tstar.setAttribute(\"width\", size);\r\n\tstar.setAttribute(\"height\", size);\r\n\tstar.setAttribute(\"viewBox\", \"0 0 512 512\");\r\n\tstar.setAttribute(\"xml:space\", \"preserve\");\r\n\tstar.style.padding = \"0 1px\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tstarsHolder.setAttribute(key, starsHolder.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tstarsHolder.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//create correct number of stars\r\n\tfor(var i=1;i<= maxStars;i++){\r\n\t\tbuildStar(i);\r\n\t}\r\n\r\n\t//ensure value does not exceed number of stars\r\n\tvalue = Math.min(parseInt(value), maxStars);\r\n\r\n\t// set initial styling of stars\r\n\tstarChange(value);\r\n\r\n\tstarsHolder.addEventListener(\"mousemove\", function(e){\r\n\t\tstarChange(0);\r\n\t});\r\n\r\n\tstarsHolder.addEventListener(\"click\", function(e){\r\n\t\tsuccess(0);\r\n\t});\r\n\r\n\telement.addEventListener(\"blur\", function(e){\r\n\t\tcancel();\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\telement.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 39: //right arrow\r\n\t\t\tchangeValue(value + 1);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tchangeValue(value - 1);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\tsuccess(value);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\treturn starsHolder;\r\n};","//draggable progress bar\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar element = cell.getElement(),\r\n\tmax = typeof editorParams.max === \"undefined\" ? ((element.getElementsByTagName(\"div\")[0] && element.getElementsByTagName(\"div\")[0].getAttribute(\"max\")) || 100) : editorParams.max,\r\n\tmin = typeof editorParams.min === \"undefined\" ? ((element.getElementsByTagName(\"div\")[0] && element.getElementsByTagName(\"div\")[0].getAttribute(\"min\")) || 0) : editorParams.min,\r\n\tpercent = (max - min) / 100,\r\n\tvalue = cell.getValue() || 0,\r\n\thandle = document.createElement(\"div\"),\r\n\tbar = document.createElement(\"div\"),\r\n\tmouseDrag, mouseDragWidth;\r\n\r\n\t//set new value\r\n\tfunction updateValue(){\r\n\t\tvar style = window.getComputedStyle(element, null);\r\n\r\n\t\tvar calcVal = (percent * Math.round(bar.offsetWidth / ((element.clientWidth - parseInt(style.getPropertyValue(\"padding-left\")) - parseInt(style.getPropertyValue(\"padding-right\")))/100))) + min;\r\n\t\tsuccess(calcVal);\r\n\t\telement.setAttribute(\"aria-valuenow\", calcVal);\r\n\t\telement.setAttribute(\"aria-label\", value);\r\n\t}\r\n\r\n\t//style handle\r\n\thandle.style.position = \"absolute\";\r\n\thandle.style.right = \"0\";\r\n\thandle.style.top = \"0\";\r\n\thandle.style.bottom = \"0\";\r\n\thandle.style.width = \"5px\";\r\n\thandle.classList.add(\"tabulator-progress-handle\");\r\n\r\n\t//style bar\r\n\tbar.style.display = \"inline-block\";\r\n\tbar.style.position = \"relative\";\r\n\t// bar.style.top = \"8px\";\r\n\t// bar.style.bottom = \"8px\";\r\n\t// bar.style.left = \"4px\";\r\n\t// bar.style.marginRight = \"4px\";\r\n\tbar.style.height = \"100%\";\r\n\tbar.style.backgroundColor = \"#488CE9\";\r\n\tbar.style.maxWidth = \"100%\";\r\n\tbar.style.minWidth = \"0%\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tbar.setAttribute(key, bar.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tbar.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//style cell\r\n\telement.style.padding = \"4px 4px\";\r\n\r\n\t//make sure value is in range\r\n\tvalue = Math.min(parseFloat(value), max);\r\n\tvalue = Math.max(parseFloat(value), min);\r\n\r\n\t//workout percentage\r\n\tvalue = Math.round((value - min) / percent);\r\n\t// bar.style.right = value + \"%\";\r\n\tbar.style.width = value + \"%\";\r\n\r\n\telement.setAttribute(\"aria-valuemin\", min);\r\n\telement.setAttribute(\"aria-valuemax\", max);\r\n\r\n\tbar.appendChild(handle);\r\n\r\n\thandle.addEventListener(\"mousedown\", function(e){\r\n\t\tmouseDrag = e.screenX;\r\n\t\tmouseDragWidth = bar.offsetWidth;\r\n\t});\r\n\r\n\thandle.addEventListener(\"mouseover\", function(){\r\n\t\thandle.style.cursor = \"ew-resize\";\r\n\t});\r\n\r\n\telement.addEventListener(\"mousemove\", function(e){\r\n\t\tif(mouseDrag){\r\n\t\t\tbar.style.width = (mouseDragWidth + e.screenX - mouseDrag) + \"px\";\r\n\t\t}\r\n\t});\r\n\r\n\telement.addEventListener(\"mouseup\", function(e){\r\n\t\tif(mouseDrag){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\r\n\t\t\tmouseDrag = false;\r\n\t\t\tmouseDragWidth = false;\r\n\r\n\t\t\tupdateValue();\r\n\t\t}\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\telement.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.preventDefault();\r\n\t\t\tbar.style.width = (bar.clientWidth + element.clientWidth/100) + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\te.preventDefault();\r\n\t\t\tbar.style.width = (bar.clientWidth - element.clientWidth/100) + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 9: //tab\r\n\t\t\tcase 13: //enter\r\n\t\t\tupdateValue();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t}\r\n\t});\r\n\r\n\telement.addEventListener(\"blur\", function(){\r\n\t\tcancel();\r\n\t});\r\n\r\n\treturn bar;\r\n};","//checkbox\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar value = cell.getValue(),\r\n\tinput = document.createElement(\"input\"),\r\n\ttristate = editorParams.tristate,\r\n\tindetermValue = typeof editorParams.indeterminateValue === \"undefined\" ? null : editorParams.indeterminateValue,\r\n\tindetermState = false;\r\n\r\n\tinput.setAttribute(\"type\", \"checkbox\");\r\n\tinput.style.marginTop = \"5px\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = value;\r\n\r\n\tif(tristate && (typeof value === \"undefined\" || value === indetermValue || value === \"\")){\r\n\t\tindetermState = true;\r\n\t\tinput.indeterminate = true;\r\n\t}\r\n\r\n\tif(this.table.browser != \"firefox\"){ //prevent blur issue on mac firefox\r\n\t\tonRendered(function(){\r\n\t\t\tinput.focus({preventScroll: true});\r\n\t\t});\r\n\t}\r\n\r\n\tinput.checked = value === true || value === \"true\" || value === \"True\" || value === 1;\r\n\r\n\tonRendered(function(){\r\n\t\tinput.focus();\r\n\t});\r\n\r\n\tfunction setValue(blur){\r\n\t\tif(tristate){\r\n\t\t\tif(!blur){\r\n\t\t\t\tif(input.checked && !indetermState){\r\n\t\t\t\t\tinput.checked = false;\r\n\t\t\t\t\tinput.indeterminate = true;\r\n\t\t\t\t\tindetermState = true;\r\n\t\t\t\t\treturn indetermValue;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tindetermState = false;\r\n\t\t\t\t\treturn input.checked;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(indetermState){\r\n\t\t\t\t\treturn indetermValue;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn input.checked;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn input.checked;\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur\r\n\tinput.addEventListener(\"change\", function(e){\r\n\t\tsuccess(setValue());\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tsuccess(setValue(true));\r\n\t});\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tif(e.keyCode == 13){\r\n\t\t\tsuccess(setValue());\r\n\t\t}\r\n\t\tif(e.keyCode == 27){\r\n\t\t\tcancel();\r\n\t\t}\r\n\t});\r\n\r\n\treturn input;\r\n};","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defaultEditors from './defaults/editors.js';\r\n\r\nclass Edit extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.currentCell = false; //hold currently editing cell\r\n\t\tthis.mouseClick = false; //hold mousedown state to prevent click binding being overriden by editor opening\r\n\t\tthis.recursionBlock = false; //prevent focus recursion\r\n\t\tthis.invalidEdit = false;\r\n\t\tthis.editedCells = [];\r\n\r\n\t\tthis.editors = Edit.editors;\r\n\r\n\t\tthis.registerColumnOption(\"editable\");\r\n\t\tthis.registerColumnOption(\"editor\");\r\n\t\tthis.registerColumnOption(\"editorParams\");\r\n\r\n\t\tthis.registerColumnOption(\"cellEditing\");\r\n\t\tthis.registerColumnOption(\"cellEdited\");\r\n\t\tthis.registerColumnOption(\"cellEditCancelled\");\r\n\r\n\t\tthis.registerTableFunction(\"getEditedCells\", this.getEditedCells.bind(this));\r\n\t\tthis.registerTableFunction(\"clearCellEdited\", this.clearCellEdited.bind(this));\r\n\t\tthis.registerTableFunction(\"navigatePrev\", this.navigatePrev.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateNext\", this.navigateNext.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateLeft\", this.navigateLeft.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateRight\", this.navigateRight.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateUp\", this.navigateUp.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateDown\", this.navigateDown.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"isEdited\", this.cellisEdited.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"clearEdited\", this.clearEdited.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"edit\", this.editCell.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"cancelEdit\", this.cellCancelEdit.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigatePrev\", this.navigatePrev.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateNext\", this.navigateNext.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateLeft\", this.navigateLeft.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateRight\", this.navigateRight.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateUp\", this.navigateUp.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateDown\", this.navigateDown.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-init\", this.bindEditor.bind(this));\r\n\t\tthis.subscribe(\"cell-delete\", this.clearEdited.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumnCheck.bind(this));\r\n\t\tthis.subscribe(\"column-delete\", this.columnDeleteCheck.bind(this));\r\n\t\tthis.subscribe(\"row-deleting\", this.rowDeleteCheck.bind(this));\r\n\t\tthis.subscribe(\"data-refreshing\", this.cancelEdit.bind(this));\r\n\r\n\t\tthis.subscribe(\"keybinding-nav-prev\", this.navigatePrev.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-next\", this.keybindingNavigateNext.bind(this));\r\n\t\tthis.subscribe(\"keybinding-nav-left\", this.navigateLeft.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-right\", this.navigateRight.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-up\", this.navigateUp.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-down\", this.navigateDown.bind(this, undefined));\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t////// Keybinding Functions ///////\r\n\t///////////////////////////////////\r\n\r\n\tkeybindingNavigateNext(e){\r\n\t\tvar cell = this.currentCell,\r\n\t\tnewRow = this.options(\"tabEndNewRow\");\r\n\r\n\t\tif(cell){\r\n\t\t\tif(!this.navigateNext(cell, e)){\r\n\t\t\t\tif(newRow){\r\n\t\t\t\t\tcell.getElement().firstChild.blur();\r\n\r\n\t\t\t\t\tif(newRow === true){\r\n\t\t\t\t\t\tnewRow = this.table.addRow({})\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(typeof newRow == \"function\"){\r\n\t\t\t\t\t\t\tnewRow = this.table.addRow(newRow(cell.row.getComponent()))\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnewRow = this.table.addRow(Object.assign({}, newRow));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tnewRow.then(() => {\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tcell.getComponent().navigateNext();\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Cell Functions //////////\r\n\t///////////////////////////////////\r\n\r\n\tcellisEdited(cell){\r\n\t\treturn !! cell.modules.edit && cell.modules.edit.edited;\r\n\t}\r\n\r\n\tcellCancelEdit(cell){\r\n\t\tif(cell === this.currentCell){\r\n\t\t\tthis.table.modules.edit.cancelEdit();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cancel Editor Error - This cell is not currently being edited \");\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\tclearCellEdited(cells){\r\n\t\tif(!cells){\r\n\t\t\tcells = this.table.modules.edit.getEditedCells();\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\r\n\t\tcells.forEach((cell) => {\r\n\t\t\tthis.table.modules.edit.clearEdited(cell._getSelf());\r\n\t\t});\r\n\t}\r\n\r\n\tnavigatePrev(cell = this.currentCell, e){\r\n\t\tvar nextCell, prevRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tnextCell = this.navigateLeft();\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tprevRow = this.table.rowManager.prevDisplayRow(cell.row, true);\r\n\r\n\t\t\t\tif(prevRow){\r\n\t\t\t\t\tnextCell = this.findNextEditableCell(prevRow, prevRow.cells.length);\r\n\r\n\t\t\t\t\tif(nextCell){\r\n\t\t\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateNext(cell = this.currentCell, e){\r\n\t\tvar nextCell, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tnextCell = this.navigateRight();\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\r\n\r\n\t\t\t\tif(nextRow){\r\n\t\t\t\t\tnextCell = this.findNextEditableCell(nextRow, -1);\r\n\r\n\t\t\t\t\tif(nextCell){\r\n\t\t\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateLeft(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findPrevEditableCell(cell.row, index);\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateRight(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findNextEditableCell(cell.row, index);\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateUp(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.prevDisplayRow(cell.row, true);\r\n\r\n\t\t\tif(nextRow){\r\n\t\t\t\tnextRow.cells[index].getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateDown(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\r\n\r\n\t\t\tif(nextRow){\r\n\t\t\t\tnextRow.cells[index].getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfindNextEditableCell(row, index){\r\n\t\tvar nextCell = false;\r\n\r\n\t\tif(index < row.cells.length-1){\r\n\t\t\tfor(var i = index+1; i < row.cells.length; i++){\r\n\t\t\t\tlet cell = row.cells[i];\r\n\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tlet allowEdit = true;\r\n\r\n\t\t\t\t\tif(typeof cell.column.modules.edit.check == \"function\"){\r\n\t\t\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(allowEdit){\r\n\t\t\t\t\t\tnextCell = cell;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn nextCell;\r\n\t}\r\n\r\n\tfindPrevEditableCell(row, index){\r\n\t\tvar prevCell = false;\r\n\r\n\t\tif(index > 0){\r\n\t\t\tfor(var i = index-1; i >= 0; i--){\r\n\t\t\t\tlet cell = row.cells[i],\r\n\t\t\t\tallowEdit = true;\r\n\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tif(typeof cell.column.modules.edit.check == \"function\"){\r\n\t\t\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(allowEdit){\r\n\t\t\t\t\t\tprevCell = cell;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn prevCell;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(typeof column.definition.editor !== \"undefined\"){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\tcolumnDeleteCheck(column){\r\n\t\tif(this.currentCell && this.currentCell.column === column){\r\n\t\t\tthis.cancelEdit();\r\n\t\t}\r\n\t}\r\n\r\n\trowDeleteCheck(row){\r\n\t\tif(this.currentCell && this.currentCell.row === row){\r\n\t\t\tthis.cancelEdit();\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column editor\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = {\r\n\t\t\teditor:false,\r\n\t\t\tblocked:false,\r\n\t\t\tcheck:column.definition.editable,\r\n\t\t\tparams:column.definition.editorParams || {}\r\n\t\t};\r\n\r\n\t\t//set column editor\r\n\t\tswitch(typeof column.definition.editor){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(this.editors[column.definition.editor]){\r\n\t\t\t\tconfig.editor = this.editors[column.definition.editor];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Editor Error - No such editor found: \", column.definition.editor);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tconfig.editor = column.definition.editor;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"boolean\":\r\n\t\t\tif(column.definition.editor === true){\r\n\t\t\t\tif(typeof column.definition.formatter !== \"function\"){\r\n\t\t\t\t\tif(this.editors[column.definition.formatter]){\r\n\t\t\t\t\t\tconfig.editor = this.editors[column.definition.formatter];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconfig.editor = this.editors[\"input\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Editor Error - Cannot auto lookup editor for a custom formatter: \", column.definition.formatter);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(config.editor){\r\n\t\t\tcolumn.modules.edit = config;\r\n\t\t}\r\n\t}\r\n\r\n\tgetCurrentCell(){\r\n\t\treturn this.currentCell ? this.currentCell.getComponent() : false;\r\n\t}\r\n\r\n\tclearEditor(cancel){\r\n\t\tvar cell = this.currentCell,\r\n\t\tcellEl;\r\n\r\n\t\tthis.invalidEdit = false;\r\n\r\n\t\tif(cell){\r\n\t\t\tthis.currentCell = false;\r\n\r\n\t\t\tcellEl = cell.getElement();\r\n\r\n\t\t\tif(cancel){\r\n\t\t\t\tif(cell.column.modules.validate && this.table.modExists(\"validate\")){\r\n\t\t\t\t\tthis.table.modules.validate.cellValidate(cell);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcellEl.classList.remove(\"tabulator-validation-fail\");\r\n\t\t\t}\r\n\r\n\t\t\tcellEl.classList.remove(\"tabulator-editing\");\r\n\r\n\t\t\twhile(cellEl.firstChild) cellEl.removeChild(cellEl.firstChild);\r\n\r\n\t\t\tcell.row.getElement().classList.remove(\"tabulator-row-editing\");\r\n\t\t}\r\n\t}\r\n\r\n\tcancelEdit(){\r\n\t\tif(this.currentCell){\r\n\t\t\tvar cell = this.currentCell;\r\n\t\t\tvar component = this.currentCell.getComponent();\r\n\r\n\t\t\tthis.clearEditor(true);\r\n\t\t\tcell.setValueActual(cell.getValue());\r\n\t\t\tcell.cellRendered();\r\n\r\n\t\t\tif(cell.column.definition.editor == \"textarea\" || cell.column.definition.variableHeight){\r\n\t\t\t\tcell.row.normalizeHeight(true);\r\n\t\t\t}\r\n\r\n\t\t\tif(cell.column.definition.cellEditCancelled){\r\n\t\t\t\tcell.column.definition.cellEditCancelled.call(this.table, component);\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"edit-cancelled\", cell);\r\n\t\t\tthis.dispatchExternal(\"cellEditCancelled\", component);\r\n\t\t}\r\n\t}\r\n\r\n\t//return a formatted value for a cell\r\n\tbindEditor(cell){\r\n\t\tif(cell.column.modules.edit){\r\n\t\t\tvar self = this,\r\n\t\t\telement = cell.getElement(true);\r\n\r\n\t\t\telement.setAttribute(\"tabindex\", 0);\r\n\r\n\t\t\telement.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(!element.classList.contains(\"tabulator-editing\")){\r\n\t\t\t\t\telement.focus({preventScroll: true});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\telement.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif (e.button === 2) {\r\n\t\t\t\t\te.preventDefault();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.mouseClick = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\telement.addEventListener(\"focus\", function(e){\r\n\t\t\t\tif(!self.recursionBlock){\r\n\t\t\t\t\tself.edit(cell, e, false);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tfocusCellNoEvent(cell, block){\r\n\t\tthis.recursionBlock = true;\r\n\r\n\t\tif(!(block && this.table.browser === \"ie\")){\r\n\t\t\tcell.getElement().focus({preventScroll: true});\r\n\t\t}\r\n\r\n\t\tthis.recursionBlock = false;\r\n\t}\r\n\r\n\teditCell(cell, forceEdit){\r\n\t\tthis.focusCellNoEvent(cell);\r\n\t\tthis.edit(cell, false, forceEdit);\r\n\t}\r\n\r\n\tfocusScrollAdjust(cell){\r\n\t\tif(this.table.rowManager.getRenderMode() == \"virtual\"){\r\n\t\t\tvar topEdge = this.table.rowManager.element.scrollTop,\r\n\t\t\tbottomEdge = this.table.rowManager.element.clientHeight + this.table.rowManager.element.scrollTop,\r\n\t\t\trowEl = cell.row.getElement(),\r\n\t\t\toffset = rowEl.offsetTop;\r\n\r\n\t\t\tif(rowEl.offsetTop < topEdge){\r\n\t\t\t\tthis.table.rowManager.element.scrollTop -= (topEdge - rowEl.offsetTop);\r\n\t\t\t}else{\r\n\t\t\t\tif(rowEl.offsetTop + rowEl.offsetHeight > bottomEdge){\r\n\t\t\t\t\tthis.table.rowManager.element.scrollTop += (rowEl.offsetTop + rowEl.offsetHeight - bottomEdge);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar leftEdge = this.table.rowManager.element.scrollLeft,\r\n\t\t\trightEdge = this.table.rowManager.element.clientWidth + this.table.rowManager.element.scrollLeft,\r\n\t\t\tcellEl = cell.getElement(),\r\n\t\t\toffset = cellEl.offsetLeft;\r\n\r\n\t\t\tif(this.table.modExists(\"frozenColumns\")){\r\n\t\t\t\tleftEdge += parseInt(this.table.modules.frozenColumns.leftMargin);\r\n\t\t\t\trightEdge -= parseInt(this.table.modules.frozenColumns.rightMargin);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.renderHorizontal === \"virtual\"){\r\n\t\t\t\tleftEdge -= parseInt(this.table.columnManager.renderer.vDomPadLeft);\r\n\t\t\t\trightEdge -= parseInt(this.table.columnManager.renderer.vDomPadLeft);\r\n\t\t\t}\r\n\r\n\t\t\tif(cellEl.offsetLeft < leftEdge){\r\n\r\n\t\t\t\tthis.table.rowManager.element.scrollLeft -= (leftEdge - cellEl.offsetLeft);\r\n\t\t\t}else{\r\n\t\t\t\tif(cellEl.offsetLeft + cellEl.offsetWidth > rightEdge){\r\n\t\t\t\t\tthis.table.rowManager.element.scrollLeft += (cellEl.offsetLeft + cellEl.offsetWidth - rightEdge);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tedit(cell, e, forceEdit){\r\n\t\tvar self = this,\r\n\t\tallowEdit = true,\r\n\t\trendered = function(){},\r\n\t\telement = cell.getElement(),\r\n\t\tcellEditor, component, params;\r\n\r\n\t\t//prevent editing if another cell is refusing to leave focus (eg. validation fail)\r\n\t\tif(this.currentCell){\r\n\t\t\tif(!this.invalidEdit){\r\n\t\t\t\tthis.cancelEdit();\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//handle successfull value change\r\n\t\tfunction success(value){\r\n\t\t\tif(self.currentCell === cell){\r\n\t\t\t\tvar valid = true;\r\n\r\n\t\t\t\tif(cell.column.modules.validate && self.table.modExists(\"validate\") && self.table.options.validationMode != \"manual\"){\r\n\t\t\t\t\tvalid = self.table.modules.validate.validate(cell.column.modules.validate, cell, value);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(valid === true || self.table.options.validationMode === \"highlight\"){\r\n\t\t\t\t\tself.clearEditor();\r\n\r\n\r\n\t\t\t\t\tif(!cell.modules.edit){\r\n\t\t\t\t\t\tcell.modules.edit = {};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcell.modules.edit.edited = true;\r\n\r\n\t\t\t\t\tif(self.editedCells.indexOf(cell) == -1){\r\n\t\t\t\t\t\tself.editedCells.push(cell);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcell.setValue(value, true);\r\n\r\n\t\t\t\t\tif(valid !== true){\r\n\t\t\t\t\t\telement.classList.add(\"tabulator-validation-fail\");\r\n\t\t\t\t\t\tself.table.externalEvents.dispatch(\"validationFailed\", cell.getComponent(), value, valid);\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.invalidEdit = true;\r\n\t\t\t\t\telement.classList.add(\"tabulator-validation-fail\");\r\n\t\t\t\t\tself.focusCellNoEvent(cell, true);\r\n\t\t\t\t\trendered();\r\n\t\t\t\t\tself.table.externalEvents.dispatch(\"validationFailed\", cell.getComponent(), value, valid);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t// console.warn(\"Edit Success Error - cannot call success on a cell that is no longer being edited\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//handle aborted edit\r\n\t\tfunction cancel(){\r\n\t\t\tif(self.currentCell === cell){\r\n\t\t\t\tself.cancelEdit();\r\n\t\t\t}else{\r\n\t\t\t\t// console.warn(\"Edit Success Error - cannot call cancel on a cell that is no longer being edited\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\trendered = callback;\r\n\t\t}\r\n\r\n\t\tif(!cell.column.modules.edit.blocked){\r\n\t\t\tif(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t}\r\n\r\n\t\t\tswitch(typeof cell.column.modules.edit.check){\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tallowEdit = cell.column.modules.edit.check;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(allowEdit || forceEdit){\r\n\r\n\t\t\t\tself.cancelEdit();\r\n\r\n\t\t\t\tself.currentCell = cell;\r\n\r\n\t\t\t\tthis.focusScrollAdjust(cell);\r\n\r\n\t\t\t\tcomponent = cell.getComponent();\r\n\r\n\t\t\t\tif(this.mouseClick){\r\n\t\t\t\t\tthis.mouseClick = false;\r\n\r\n\t\t\t\t\tif(cell.column.definition.cellClick){\r\n\t\t\t\t\t\tcell.column.definition.cellClick.call(this.table, e, component);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(cell.column.definition.cellEditing){\r\n\t\t\t\t\tcell.column.definition.cellEditing.call(this.table, component);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.dispatchExternal(\"cellEditing\", component);\r\n\r\n\t\t\t\tparams = typeof cell.column.modules.edit.params === \"function\" ? cell.column.modules.edit.params(component) : cell.column.modules.edit.params;\r\n\r\n\t\t\t\tcellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params);\r\n\r\n\t\t\t\t//if editor returned, add to DOM, if false, abort edit\r\n\t\t\t\tif(cellEditor !== false){\r\n\r\n\t\t\t\t\tif(cellEditor instanceof Node){\r\n\t\t\t\t\t\telement.classList.add(\"tabulator-editing\");\r\n\t\t\t\t\t\tcell.row.getElement().classList.add(\"tabulator-row-editing\");\r\n\t\t\t\t\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\t\t\t\t\t\telement.appendChild(cellEditor);\r\n\r\n\t\t\t\t\t\t//trigger onRendered Callback\r\n\t\t\t\t\t\trendered();\r\n\r\n\t\t\t\t\t\t//prevent editing from triggering rowClick event\r\n\t\t\t\t\t\tvar children = element.children;\r\n\r\n\t\t\t\t\t\tfor (var i = 0; i < children.length; i++) {\r\n\t\t\t\t\t\t\tchildren[i].addEventListener(\"click\", function(e){\r\n\t\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Edit Error - Editor should return an instance of Node, the editor returned:\", cellEditor);\r\n\t\t\t\t\t\telement.blur();\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.blur();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tthis.mouseClick = false;\r\n\t\t\t\telement.blur();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.mouseClick = false;\r\n\t\t\telement.blur();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tgetEditedCells(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.editedCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tclearEdited(cell){\r\n\t\tvar editIndex;\r\n\r\n\t\tif(cell.modules.edit && cell.modules.edit.edited){\r\n\t\t\tcell.modules.edit.edited = false;\r\n\r\n\t\t\tif(cell.modules.validate){\r\n\t\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\teditIndex = this.editedCells.indexOf(cell);\r\n\r\n\t\tif(editIndex > -1){\r\n\t\t\tthis.editedCells.splice(editIndex, 1);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nEdit.moduleName = \"edit\";\r\n\r\n//load defaults\r\nEdit.editors = defaultEditors;\r\n\r\n\r\nexport default Edit;\r\n","class ExportRow{\r\n\tconstructor(type, columns, component, indent){\r\n\t\tthis.type = type;\r\n\t\tthis.columns = columns;\r\n\t\tthis.component = component || false;\r\n\t\tthis.indent = indent || 0;\r\n\t}\r\n}\r\n\r\nexport default ExportRow;","class ExportColumn{\r\n\tconstructor(value, component, width, height, depth){\r\n\t\tthis.value = value;\r\n\t\tthis.component = component || false;\r\n\t\tthis.width = width;\r\n\t\tthis.height = height;\r\n\t\tthis.depth = depth;\r\n\t}\r\n}\r\n\r\nexport default ExportColumn;","import Module from '../../core/Module.js';\r\n\r\nimport ExportRow from './ExportRow.js';\r\nimport ExportColumn from './ExportColumn.js';\r\n\r\nclass Export extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.config = {};\r\n\t\tthis.cloneTableStyle = true;\r\n\t\tthis.colVisProp = \"\";\r\n\r\n\t\tthis.registerTableOption(\"htmlOutputConfig\", false); //html outypu config\r\n\r\n\t\tthis.registerColumnOption(\"htmlOutput\");\r\n\t\tthis.registerColumnOption(\"titleHtmlOutput\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"getHtml\", this.getHtml.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tgenerateExportList(config, style, range, colVisProp){\r\n\t\tthis.cloneTableStyle = style;\r\n\t\tthis.config = config || {};\r\n\t\tthis.colVisProp = colVisProp;\r\n\r\n\t\tvar headers = this.config.columnHeaders !== false ? this.headersToExportRows(this.generateColumnGroupHeaders()) : [];\r\n\t\tvar body = this.bodyToExportRows(this.rowLookup(range));\r\n\r\n\t\treturn headers.concat(body);\r\n\t}\r\n\r\n\tgenereateTable(config, style, range, colVisProp){\r\n\t\tvar list = this.generateExportList(config, style, range, colVisProp);\r\n\r\n\t\treturn this.genereateTableElement(list);\r\n\t}\r\n\r\n\trowLookup(range){\r\n\t\tvar rows = [];\r\n\r\n\t\tif(typeof range == \"function\"){\r\n\t\t\trange.call(this.table).forEach((row) =>{\r\n\t\t\t\trow = this.table.rowManager.findRow(row);\r\n\r\n\t\t\t\tif(row){\r\n\t\t\t\t\trows.push(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tswitch(range){\r\n\t\t\t\tcase true:\r\n\t\t\t\tcase \"visible\":\r\n\t\t\t\trows = this.table.rowManager.getVisibleRows(false, true);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"all\":\r\n\t\t\t\trows = this.table.rowManager.rows;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"selected\":\r\n\t\t\t\trows = this.table.modules.selectRow.selectedRows;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"active\":\r\n\t\t\t\tdefault:\r\n\t\t\t\tif(this.table.options.pagination){\r\n\t\t\t\t\trows = this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length - 2);\r\n\t\t\t\t}else{\r\n\t\t\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn Object.assign([], rows);\r\n\t}\r\n\r\n\tgenerateColumnGroupHeaders(){\r\n\t\tvar output = [];\r\n\r\n\t\tvar columns = this.config.columnGroups !== false ? this.table.columnManager.columns : this.table.columnManager.columnsByIndex;\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\tvar colData = this.processColumnGroup(column);\r\n\r\n\t\t\tif(colData){\r\n\t\t\t\toutput.push(colData);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tprocessColumnGroup(column){\r\n\t\tvar subGroups = column.columns,\r\n\t\tmaxDepth = 0,\r\n\t\ttitle = column.definition[\"title\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))] || column.definition.title;\r\n\r\n\t\tvar groupData = {\r\n\t\t\ttitle:title,\r\n\t\t\tcolumn:column,\r\n\t\t\tdepth:1,\r\n\t\t};\r\n\r\n\t\tif(subGroups.length){\r\n\t\t\tgroupData.subGroups = [];\r\n\t\t\tgroupData.width = 0;\r\n\r\n\t\t\tsubGroups.forEach((subGroup) => {\r\n\t\t\t\tvar subGroupData = this.processColumnGroup(subGroup);\r\n\r\n\t\t\t\tif(subGroupData){\r\n\t\t\t\t\tgroupData.width += subGroupData.width;\r\n\t\t\t\t\tgroupData.subGroups.push(subGroupData);\r\n\r\n\t\t\t\t\tif(subGroupData.depth > maxDepth){\r\n\t\t\t\t\t\tmaxDepth = subGroupData.depth;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tgroupData.depth += maxDepth;\r\n\r\n\t\t\tif(!groupData.width){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.columnVisCheck(column)){\r\n\t\t\t\tgroupData.width = 1;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn groupData;\r\n\t}\r\n\r\n\tcolumnVisCheck(column){\r\n\t\treturn column.definition[this.colVisProp] !== false && (column.visible || (!column.visible && column.definition[this.colVisProp]));\r\n\t}\r\n\r\n\theadersToExportRows(columns){\r\n\t\tvar headers = [],\r\n\t\theaderDepth = 0,\r\n\t\texportRows = [];\r\n\r\n\t\tfunction parseColumnGroup(column, level){\r\n\r\n\t\t\tvar depth = headerDepth - level;\r\n\r\n\t\t\tif(typeof headers[level] === \"undefined\"){\r\n\t\t\t\theaders[level] = [];\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.height = column.subGroups ? 1 : (depth - column.depth) + 1;\r\n\r\n\t\t\theaders[level].push(column);\r\n\r\n\t\t\tif(column.height > 1){\r\n\t\t\t\tfor(let i = 1; i < column.height; i ++){\r\n\r\n\t\t\t\t\tif(typeof headers[level + i] === \"undefined\"){\r\n\t\t\t\t\t\theaders[level + i] = [];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\theaders[level + i].push(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(column.width > 1){\r\n\t\t\t\tfor(let i = 1; i < column.width; i ++){\r\n\t\t\t\t\theaders[level].push(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(column.subGroups){\r\n\t\t\t\tcolumn.subGroups.forEach(function(subGroup){\r\n\t\t\t\t\tparseColumnGroup(subGroup, level+1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//calculate maximum header debth\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tif(column.depth > headerDepth){\r\n\t\t\t\theaderDepth = column.depth;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tparseColumnGroup(column,0);\r\n\t\t});\r\n\r\n\t\theaders.forEach((header) => {\r\n\t\t\tvar columns = [];\r\n\r\n\t\t\theader.forEach((col) => {\r\n\t\t\t\tif(col){\r\n\t\t\t\t\tlet title = typeof col.title === \"undefined\" ? \"\" : col.title;\r\n\t\t\t\t\tcolumns.push(new ExportColumn(title, col.column.getComponent(), col.width, col.height, col.depth));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolumns.push(null);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\texportRows.push(new ExportRow(\"header\", columns));\r\n\t\t});\r\n\r\n\t\treturn exportRows;\r\n\t}\r\n\r\n\tbodyToExportRows(rows){\r\n\r\n\t\tvar columns = [];\r\n\t\tvar exportRows = [];\r\n\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tif (this.columnVisCheck(column)) {\r\n\t\t\t\tcolumns.push(column.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(this.config.columnCalcs !== false && this.table.modExists(\"columnCalcs\")){\r\n\t\t\tif(this.table.modules.columnCalcs.topInitialized){\r\n\t\t\t\trows.unshift(this.table.modules.columnCalcs.topRow);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modules.columnCalcs.botInitialized){\r\n\t\t\t\trows.push(this.table.modules.columnCalcs.botRow);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\trows = rows.filter((row) => {\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\treturn this.config.rowGroups !== false;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\treturn this.config.columnCalcs !== false;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\treturn !(this.table.options.dataTree && this.config.dataTree === false && row.modules.dataTree.parent);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\trows.forEach((row, i) => {\r\n\t\t\tvar rowData = row.getData(this.colVisProp);\r\n\t\t\tvar exportCols = [];\r\n\t\t\tvar indent = 0;\r\n\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\tindent = row.level;\r\n\t\t\t\texportCols.push(new ExportColumn(row.key, row.getComponent(), columns.length, 1));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\" :\r\n\t\t\t\tcase \"row\" :\r\n\t\t\t\tcolumns.forEach((col) => {\r\n\t\t\t\t\texportCols.push(new ExportColumn(col._column.getFieldValue(rowData), col, 1, 1));\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\r\n\t\t\t\t\tindent = row.modules.dataTree.index;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\texportRows.push(new ExportRow(row.type, exportCols, row.getComponent(), indent));\r\n\t\t});\r\n\r\n\t\treturn exportRows;\r\n\t}\r\n\r\n\tgenereateTableElement(list){\r\n\t\tvar table = document.createElement(\"table\"),\r\n\t\theaderEl = document.createElement(\"thead\"),\r\n\t\tbodyEl = document.createElement(\"tbody\"),\r\n\t\tstyles = this.lookupTableStyles(),\r\n\t\trowFormatter = this.table.options[\"rowFormatter\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))],\r\n\t\tsetup = {};\r\n\r\n\t\tsetup.rowFormatter = rowFormatter !== null ? rowFormatter : this.table.options.rowFormatter;\r\n\r\n\t\tif(this.table.options.dataTree &&this.config.dataTree !== false && this.table.modExists(\"columnCalcs\")){\r\n\t\t\tsetup.treeElementField = this.table.modules.dataTree.elementField;\r\n\t\t}\r\n\r\n\t\t//assign group header formatter\r\n\t\tsetup.groupHeader = this.table.options[\"groupHeader\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))];\r\n\r\n\t\tif(setup.groupHeader && !Array.isArray(setup.groupHeader)){\r\n\t\t\tsetup.groupHeader = [setup.groupHeader];\r\n\t\t}\r\n\r\n\t\ttable.classList.add(\"tabulator-print-table\");\r\n\r\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\"]);\r\n\r\n\r\n\t\tif(list.length > 1000){\r\n\t\t\tconsole.warn(\"It may take a long time to render an HTML table with more than 1000 rows\");\r\n\t\t}\r\n\r\n\t\tlist.forEach((row, i) => {\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"header\":\r\n\t\t\t\theaderEl.appendChild(this.genereateHeaderElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\tbodyEl.appendChild(this.genereateGroupElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\tbodyEl.appendChild(this.genereateCalcElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\tlet rowEl = this.genereateRowElement(row, setup, styles);\r\n\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\"]);\r\n\t\t\t\tbodyEl.appendChild(rowEl);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(headerEl.innerHTML){\r\n\t\t\ttable.appendChild(headerEl);\r\n\t\t}\r\n\r\n\t\ttable.appendChild(bodyEl);\r\n\r\n\r\n\t\tthis.mapElementStyles(this.table.element, table, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\"]);\r\n\t\treturn table;\r\n\t}\r\n\r\n\tlookupTableStyles(){\r\n\t\tvar styles = {};\r\n\r\n\t\t//lookup row styles\r\n\t\tif(this.cloneTableStyle && window.getComputedStyle){\r\n\t\t\tstyles.oddRow = this.table.element.querySelector(\".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.evenRow = this.table.element.querySelector(\".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.calcRow = this.table.element.querySelector(\".tabulator-row.tabulator-calcs\");\r\n\t\t\tstyles.firstRow = this.table.element.querySelector(\".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.firstGroup = this.table.element.getElementsByClassName(\"tabulator-group\")[0];\r\n\r\n\t\t\tif(styles.firstRow){\r\n\t\t\t\tstyles.styleCells = styles.firstRow.getElementsByClassName(\"tabulator-cell\");\r\n\t\t\t\tstyles.firstCell = styles.styleCells[0];\r\n\t\t\t\tstyles.lastCell = styles.styleCells[styles.styleCells.length - 1];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn styles;\r\n\t}\r\n\r\n\tgenereateHeaderElement(row, setup, styles){\r\n\t\tvar rowEl = document.createElement(\"tr\");\r\n\r\n\t\trow.columns.forEach((column) => {\r\n\t\t\tif(column){\r\n\t\t\t\tvar cellEl = document.createElement(\"th\");\r\n\t\t\t\tvar classNames = column.component._column.definition.cssClass ? column.component._column.definition.cssClass.split(\" \") : [];\r\n\r\n\t\t\t\tcellEl.colSpan = column.width;\r\n\t\t\t\tcellEl.rowSpan = column.height;\r\n\r\n\t\t\t\tcellEl.innerHTML = column.value;\r\n\r\n\t\t\t\tif(this.cloneTableStyle){\r\n\t\t\t\t\tcellEl.style.boxSizing = \"border-box\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tclassNames.forEach(function(className) {\r\n\t\t\t\t\tcellEl.classList.add(className);\r\n\t\t\t\t});\r\n\r\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\"]);\r\n\t\t\t\tthis.mapElementStyles(column.component._column.contentElement, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\"]);\r\n\r\n\t\t\t\tif(column.component._column.visible){\r\n\t\t\t\t\tthis.mapElementStyles(column.component.getElement(), cellEl, [\"width\"]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(column.component._column.definition.width){\r\n\t\t\t\t\t\tcellEl.style.width = column.component._column.definition.width + \"px\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(column.component._column.parent){\r\n\t\t\t\t\tthis.mapElementStyles(column.component._column.parent.groupElement, cellEl, [\"border-top\"]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowEl.appendChild(cellEl);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateGroupElement(row, setup, styles){\r\n\r\n\t\tvar rowEl = document.createElement(\"tr\"),\r\n\t\tcellEl = document.createElement(\"td\"),\r\n\t\tgroup = row.columns[0];\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-row\");\r\n\r\n\t\tif(setup.groupHeader && setup.groupHeader[row.indent]){\r\n\t\t\tgroup.value = setup.groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t}else{\r\n\t\t\tif(setup.groupHeader === false){\r\n\t\t\t\tgroup.value = group.value;\r\n\t\t\t}else{\r\n\t\t\t\tgroup.value = row.component._group.generator(group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcellEl.colSpan = group.width;\r\n\t\tcellEl.innerHTML = group.value;\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-group\");\r\n\t\trowEl.classList.add(\"tabulator-group-level-\" + row.indent);\r\n\r\n\t\tif(group.component.isVisible()){\r\n\t\t\trowEl.classList.add(\"tabulator-group-visible\");\r\n\t\t}\r\n\r\n\t\tthis.mapElementStyles(styles.firstGroup, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\r\n\t\tthis.mapElementStyles(styles.firstGroup, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\"]);\r\n\r\n\t\trowEl.appendChild(cellEl);\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateCalcElement(row, setup, styles){\r\n\t\tvar rowEl = this.genereateRowElement(row, setup, styles);\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-calcs\");\r\n\t\tthis.mapElementStyles(styles.calcRow, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateRowElement(row, setup, styles){\r\n\t\tvar rowEl = document.createElement(\"tr\");\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-row\");\r\n\r\n\t\trow.columns.forEach((col) => {\r\n\t\t\tif(col){\r\n\t\t\t\tvar cellEl = document.createElement(\"td\"),\r\n\t\t\t\tcolumn = col.component._column,\r\n\t\t\t\tindex = this.table.columnManager.findColumnIndex(column),\r\n\t\t\t\tvalue = col.value;\r\n\r\n\t\t\t\tvar cellWrapper = {\r\n\t\t\t\t\tmodules:{},\r\n\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetField:function(){\r\n\t\t\t\t\t\treturn column.definition.field;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\treturn cellEl;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetData:function(){\r\n\t\t\t\t\t\treturn row.component.getData();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\treturn row.component;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetComponent:function(){\r\n\t\t\t\t\t\treturn cellWrapper;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcolumn:column,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tvar classNames = column.definition.cssClass ? column.definition.cssClass.split(\" \") : [];\r\n\r\n\t\t\t\tclassNames.forEach(function(className) {\r\n\t\t\t\t\tcellEl.classList.add(className);\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.modExists(\"format\") && this.config.formatCells !== false){\r\n\t\t\t\t\tvalue = this.table.modules.format.formatExportValue(cellWrapper, this.colVisProp);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tvalue = JSON.stringify(value);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tvalue = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(value instanceof Node){\r\n\t\t\t\t\tcellEl.appendChild(value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcellEl.innerHTML = value;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(styles.styleCells[index] || styles.firstCell){\r\n\t\t\t\t\tthis.mapElementStyles(styles.styleCells[index] || styles.firstCell, 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\"]);\r\n\r\n\t\t\t\t\tif(column.definition.align){\r\n\t\t\t\t\t\tcellEl.style.textAlign = column.definition.align;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\r\n\t\t\t\t\tif((setup.treeElementField && setup.treeElementField == column.field) || (!setup.treeElementField && i == 0)){\r\n\t\t\t\t\t\tif(row.component._row.modules.dataTree.controlEl){\r\n\t\t\t\t\t\t\tcellEl.insertBefore(row.component._row.modules.dataTree.controlEl.cloneNode(true), cellEl.firstChild);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(row.component._row.modules.dataTree.branchEl){\r\n\t\t\t\t\t\t\tcellEl.insertBefore(row.component._row.modules.dataTree.branchEl.cloneNode(true), cellEl.firstChild);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowEl.appendChild(cellEl);\r\n\r\n\t\t\t\tif(cellWrapper.modules.format && cellWrapper.modules.format.renderedCallback){\r\n\t\t\t\t\tcellWrapper.modules.format.renderedCallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(setup.rowFormatter && this.config.formatCells !== false){\r\n\t\t\t\t\tsetup.rowFormatter(row.component);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateHTMLTable(list){\r\n\t\tvar holder = document.createElement(\"div\");\r\n\r\n\t\tholder.appendChild(this.genereateTableElement(list));\r\n\r\n\t\treturn holder.innerHTML;\r\n\t}\r\n\r\n\tgetHtml(visible, style, config, colVisProp){\r\n\t\tvar list = this.generateExportList(config || this.table.options.htmlOutputConfig, style, visible, colVisProp || \"htmlOutput\");\r\n\r\n\t\treturn this.genereateHTMLTable(list);\r\n\t}\r\n\r\n\tmapElementStyles(from, to, props){\r\n\t\tif(this.cloneTableStyle && from && to){\r\n\r\n\t\t\tvar lookup = {\r\n\t\t\t\t\"background-color\" : \"backgroundColor\",\r\n\t\t\t\t\"color\" : \"fontColor\",\r\n\t\t\t\t\"width\" : \"width\",\r\n\t\t\t\t\"font-weight\" : \"fontWeight\",\r\n\t\t\t\t\"font-family\" : \"fontFamily\",\r\n\t\t\t\t\"font-size\" : \"fontSize\",\r\n\t\t\t\t\"text-align\" : \"textAlign\",\r\n\t\t\t\t\"border-top\" : \"borderTop\",\r\n\t\t\t\t\"border-left\" : \"borderLeft\",\r\n\t\t\t\t\"border-right\" : \"borderRight\",\r\n\t\t\t\t\"border-bottom\" : \"borderBottom\",\r\n\t\t\t\t\"padding-top\" : \"paddingTop\",\r\n\t\t\t\t\"padding-left\" : \"paddingLeft\",\r\n\t\t\t\t\"padding-right\" : \"paddingRight\",\r\n\t\t\t\t\"padding-bottom\" : \"paddingBottom\",\r\n\t\t\t};\r\n\r\n\t\t\tif(window.getComputedStyle){\r\n\t\t\t\tvar fromStyle = window.getComputedStyle(from);\r\n\r\n\t\t\t\tprops.forEach(function(prop){\r\n\t\t\t\t\tto.style[lookup[prop]] = fromStyle.getPropertyValue(prop);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nExport.moduleName = \"export\";\r\n\r\nexport default Export;\r\n","export default {\r\n\r\n\t//equal to\r\n\t\"=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal == filterVal ? true : false;\r\n\t},\r\n\r\n\t//less than\r\n\t\"<\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal < filterVal ? true : false;\r\n\t},\r\n\r\n\t//less than or equal to\r\n\t\"<=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal <= filterVal ? true : false;\r\n\t},\r\n\r\n\t//greater than\r\n\t\">\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal > filterVal ? true : false;\r\n\t},\r\n\r\n\t//greater than or equal to\r\n\t\">=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal >= filterVal ? true : false;\r\n\t},\r\n\r\n\t//not equal to\r\n\t\"!=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal != filterVal ? true : false;\r\n\t},\r\n\r\n\t\"regex\":function(filterVal, rowVal, rowData, filterParams){\r\n\r\n\t\tif(typeof filterVal == \"string\"){\r\n\t\t\tfilterVal = new RegExp(filterVal);\r\n\t\t}\r\n\r\n\t\treturn filterVal.test(rowVal);\r\n\t},\r\n\r\n\t//contains the string\r\n\t\"like\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().indexOf(filterVal.toLowerCase()) > -1;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//contains the keywords\r\n\t\"keywords\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tvar keywords = filterVal.toLowerCase().split(typeof filterParams.separator === \"undefined\" ? \" \" : filterParams.separator),\r\n\t\tvalue = String(rowVal === null || typeof rowVal === \"undefined\" ? \"\" : rowVal).toLowerCase(),\r\n\t\tmatches = [];\r\n\r\n\t\tkeywords.forEach((keyword) =>{\r\n\t\t\tif(value.includes(keyword)){\r\n\t\t\t\tmatches.push(true);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn filterParams.matchAll ? matches.length === keywords.length : !!matches.length;\r\n\t},\r\n\r\n\t//starts with the string\r\n\t\"starts\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().startsWith(filterVal.toLowerCase());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//ends with the string\r\n\t\"ends\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().endsWith(filterVal.toLowerCase());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//in array\r\n\t\"in\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(Array.isArray(filterVal)){\r\n\t\t\treturn filterVal.length ? filterVal.indexOf(rowVal) > -1 : true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Filter Error - filter value is not an array:\", filterVal);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultFilters from './defaults/filters.js';\r\n\r\nclass Filter extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.filterList = []; //hold filter list\r\n\t\tthis.headerFilters = {}; //hold column filters\r\n\t\tthis.headerFilterColumns = []; //hold columns that use header filters\r\n\r\n\t\tthis.prevHeaderFilterChangeCheck = \"\";\r\n\t\tthis.prevHeaderFilterChangeCheck = \"{}\";\r\n\r\n\t\tthis.changed = false; //has filtering changed since last render\r\n\t\tthis.tableInitialized = false;\r\n\r\n\t\tthis.registerTableOption(\"filterMode\", \"local\"); //local or remote filtering\r\n\r\n\t\tthis.registerTableOption(\"initialFilter\", false); //initial filtering criteria\r\n\t\tthis.registerTableOption(\"initialHeaderFilter\", false); //initial header filtering criteria\r\n\t\tthis.registerTableOption(\"headerFilterLiveFilterDelay\", 300); //delay before updating column after user types in header filter\r\n\r\n\t\tthis.registerColumnOption(\"headerFilter\");\r\n\t\tthis.registerColumnOption(\"headerFilterPlaceholder\");\r\n\t\tthis.registerColumnOption(\"headerFilterParams\");\r\n\t\tthis.registerColumnOption(\"headerFilterEmptyCheck\");\r\n\t\tthis.registerColumnOption(\"headerFilterFunc\");\r\n\t\tthis.registerColumnOption(\"headerFilterFuncParams\");\r\n\t\tthis.registerColumnOption(\"headerFilterLiveFilter\");\r\n\r\n\t\tthis.registerTableFunction(\"searchRows\", this.searchRows.bind(this));\r\n\t\tthis.registerTableFunction(\"searchData\", this.searchData.bind(this));\r\n\r\n\t\tthis.registerTableFunction(\"setFilter\", this.userSetFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"refreshFilter\", this.userRefreshFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"addFilter\", this.userAddFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"getFilters\", this.getFilters.bind(this));\r\n\t\tthis.registerTableFunction(\"setHeaderFilterFocus\", this.userSetHeaderFilterFocus.bind(this));\r\n\t\tthis.registerTableFunction(\"getHeaderFilterValue\", this.userGetHeaderFilterValue.bind(this));\r\n\t\tthis.registerTableFunction(\"setHeaderFilterValue\", this.userSetHeaderFilterValue.bind(this));\r\n\t\tthis.registerTableFunction(\"getHeaderFilters\", this.getHeaderFilters.bind(this));\r\n\t\tthis.registerTableFunction(\"removeFilter\", this.userRemoveFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"clearFilter\", this.userClearFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"clearHeaderFilter\", this.userClearHeaderFilter.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"column\", \"headerFilterFocus\", this.setHeaderFilterFocus.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"reloadHeaderFilter\", this.reloadHeaderFilter.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"getHeaderFilterValue\", this.getHeaderFilterValue.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"setHeaderFilterValue\", this.setHeaderFilterValue.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumnHeaderFilter.bind(this));\r\n\t\tthis.subscribe(\"column-width-fit-before\", this.hideHeaderFilterElements.bind(this));\r\n\t\tthis.subscribe(\"column-width-fit-after\", this.showHeaderFilterElements.bind(this));\r\n\t\tthis.subscribe(\"table-built\", this.tableBuilt.bind(this));\r\n\r\n\t\tif(this.table.options.filterMode === \"remote\"){\r\n\t\t\tthis.subscribe(\"data-params\", this.remoteFilterParams.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerDataHandler(this.filter.bind(this), 10);\r\n\t}\r\n\r\n\ttableBuilt(){\r\n\t\tif(this.table.options.initialFilter){\r\n\t\t\tthis.setFilter(this.table.options.initialFilter);\r\n\t\t}\r\n\r\n\t\tif(this.table.options.initialHeaderFilter){\r\n\t\t\tthis.table.options.initialHeaderFilter.forEach((item) => {\r\n\r\n\t\t\t\tvar column = this.table.columnManager.findColumn(item.field);\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tthis.setHeaderFilterValue(column, item.value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", item.field);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.tableInitialized = true;\r\n\t}\r\n\r\n\tremoteFilterParams(data, config, silent, params){\r\n\t\tparams.filter = this.getFilters(true, true);\r\n\t\treturn params;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\t//set standard filters\r\n\tuserSetFilter(field, type, value, params){\r\n\t\tthis.setFilter(field, type, value, params);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//set standard filters\r\n\tuserRefreshFilter(){\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//add filter to array\r\n\tuserAddFilter(field, type, value, params){\r\n\t\tthis.addFilter(field, type, value, params);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\tuserSetHeaderFilterFocus(field){\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tthis.setHeaderFilterFocus(column);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Focus Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tuserGetHeaderFilterValue(field) {\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn this.getHeaderFilterValue(column);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", field);\r\n\t\t}\r\n\t}\r\n\r\n\tuserSetHeaderFilterValue(field, value){\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tthis.setHeaderFilterValue(column, value);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//remove filter from array\r\n\tuserRemoveFilter(field, type, value){\r\n\t\tthis.removeFilter(field, type, value);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//clear filters\r\n\tuserClearFilter(all){\r\n\t\tthis.clearFilter(all);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//clear header filters\r\n\tuserClearHeaderFilter(){\r\n\t\tthis.clearHeaderFilter();\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\r\n\t//search for specific row components\r\n\tsearchRows(field, type, value){\r\n\t\treturn this.search(\"rows\", field, type, value);\r\n\t}\r\n\r\n\t//search for specific data\r\n\tsearchData(field, type, value){\r\n\t\treturn this.search(\"data\", field, type, value);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnHeaderFilter(column){\r\n\t\tvar def = column.definition;\r\n\r\n\t\tif(def.headerFilter){\r\n\r\n\t\t\tif(typeof def.headerFilterPlaceholder !== \"undefined\" && def.field){\r\n\t\t\t\tthis.module(\"localize\").setHeaderFilterColumnPlaceholder(def.field, def.headerFilterPlaceholder);\r\n\t\t\t}\r\n\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column header filter\r\n\tinitializeColumn(column, value){\r\n\t\tvar self = this,\r\n\t\tfield = column.getField(),\r\n\t\tparams;\r\n\r\n\t\t//handle successfull value change\r\n\t\tfunction success(value){\r\n\t\t\tvar filterType = (column.modules.filter.tagType == \"input\" && column.modules.filter.attrType == \"text\") || column.modules.filter.tagType == \"textarea\" ? \"partial\" : \"match\",\r\n\t\t\ttype = \"\",\r\n\t\t\tfilterChangeCheck = \"\",\r\n\t\t\tfilterFunc;\r\n\r\n\t\t\tif(typeof column.modules.filter.prevSuccess === \"undefined\" || column.modules.filter.prevSuccess !== value){\r\n\r\n\t\t\t\tcolumn.modules.filter.prevSuccess = value;\r\n\r\n\t\t\t\tif(!column.modules.filter.emptyFunc(value)){\r\n\t\t\t\t\tcolumn.modules.filter.value = value;\r\n\r\n\t\t\t\t\tswitch(typeof column.definition.headerFilterFunc){\r\n\t\t\t\t\t\tcase \"string\":\r\n\t\t\t\t\t\tif(Filter.filters[column.definition.headerFilterFunc]){\r\n\t\t\t\t\t\t\ttype = column.definition.headerFilterFunc;\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\r\n\t\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\t\tparams = typeof params === \"function\" ? params(value, fieldVal, data) : params;\r\n\r\n\t\t\t\t\t\t\t\treturn Filter.filters[column.definition.headerFilterFunc](value, fieldVal, data, params);\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tconsole.warn(\"Header Filter Error - Matching filter function not found: \", column.definition.headerFilterFunc);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\r\n\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\tparams = typeof params === \"function\" ? params(value, fieldVal, data) : params;\r\n\r\n\t\t\t\t\t\t\treturn column.definition.headerFilterFunc(value, fieldVal, data, params);\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\ttype = filterFunc;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(!filterFunc){\r\n\t\t\t\t\t\tswitch(filterType){\r\n\t\t\t\t\t\t\tcase \"partial\":\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\tvar colVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\t\tif(typeof colVal !== 'undefined' && colVal !== null){\r\n\t\t\t\t\t\t\t\t\treturn String(colVal).toLowerCase().indexOf(String(value).toLowerCase()) > -1;\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\ttype = \"like\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\treturn column.getFieldValue(data) == value;\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\ttype = \"=\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tself.headerFilters[field] = {value:value, func:filterFunc, type:type, params:params || {}};\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdelete self.headerFilters[field];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfilterChangeCheck = JSON.stringify(self.headerFilters);\r\n\r\n\t\t\t\tif(self.prevHeaderFilterChangeCheck !== filterChangeCheck){\r\n\t\t\t\t\tself.prevHeaderFilterChangeCheck = filterChangeCheck;\r\n\r\n\t\t\t\t\tself.trackChanges();\r\n\t\t\t\t\tself.refreshFilter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tcolumn.modules.filter = {\r\n\t\t\tsuccess:success,\r\n\t\t\tattrType:false,\r\n\t\t\ttagType:false,\r\n\t\t\temptyFunc:false,\r\n\t\t};\r\n\r\n\t\tthis.generateHeaderFilterElement(column);\r\n\t}\r\n\r\n\tgenerateHeaderFilterElement(column, initialValue, reinitialize){\r\n\t\tvar self = this,\r\n\t\tsuccess = column.modules.filter.success,\r\n\t\tfield = column.getField(),\r\n\t\tfilterElement, editor, editorElement, cellWrapper, typingTimer, searchTrigger, params;\r\n\r\n\t\t//handle aborted edit\r\n\t\tfunction cancel(){}\r\n\r\n\t\tif(column.modules.filter.headerElement && column.modules.filter.headerElement.parentNode){\r\n\t\t\tcolumn.contentElement.removeChild(column.modules.filter.headerElement.parentNode);\r\n\t\t}\r\n\r\n\t\tif(field){\r\n\r\n\t\t\t//set empty value function\r\n\t\t\tcolumn.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function(value){\r\n\t\t\t\treturn !value && value !== \"0\" && value !== 0;\r\n\t\t\t};\r\n\r\n\t\t\tfilterElement = document.createElement(\"div\");\r\n\t\t\tfilterElement.classList.add(\"tabulator-header-filter\");\r\n\r\n\t\t\t//set column editor\r\n\t\t\tswitch(typeof column.definition.headerFilter){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(self.table.modules.edit.editors[column.definition.headerFilter]){\r\n\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.headerFilter];\r\n\r\n\t\t\t\t\tif((column.definition.headerFilter === \"tick\" || column.definition.headerFilter === \"tickCross\") && !column.definition.headerFilterEmptyCheck){\r\n\t\t\t\t\t\tcolumn.modules.filter.emptyFunc = function(value){\r\n\t\t\t\t\t\t\treturn value !== true && value !== false;\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Filter Error - Cannot build header filter, No such editor found: \", column.definition.editor);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\teditor = column.definition.headerFilter;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tif(column.modules.edit && column.modules.edit.editor){\r\n\t\t\t\t\teditor = column.modules.edit.editor;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]){\r\n\t\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.formatter];\r\n\r\n\t\t\t\t\t\tif((column.definition.formatter === \"tick\" || column.definition.formatter === \"tickCross\") && !column.definition.headerFilterEmptyCheck){\r\n\t\t\t\t\t\t\tcolumn.modules.filter.emptyFunc = function(value){\r\n\t\t\t\t\t\t\t\treturn value !== true && value !== false;\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\teditor = self.table.modules.edit.editors[\"input\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(editor){\r\n\r\n\t\t\t\tcellWrapper = {\r\n\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\treturn typeof initialValue !== \"undefined\" ? initialValue : \"\";\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetField:function(){\r\n\t\t\t\t\t\treturn column.definition.field;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\treturn filterElement;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\tnormalizeHeight:function(){\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\tparams = column.definition.headerFilterParams || {};\r\n\r\n\t\t\t\tparams = typeof params === \"function\" ? params.call(self.table, cellWrapper) : params;\r\n\r\n\t\t\t\teditorElement = editor.call(this.table.modules.edit, cellWrapper, function(){}, success, cancel, params);\r\n\r\n\t\t\t\tif(!editorElement){\r\n\t\t\t\t\tconsole.warn(\"Filter Error - Cannot add filter to \" + field + \" column, editor returned a value of false\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!(editorElement instanceof Node)){\r\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);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//set Placeholder Text\r\n\t\t\t\tif(field){\r\n\t\t\t\t\tself.langBind(\"headerFilters|columns|\" + column.definition.field, function(value){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"placeholder\", typeof value !== \"undefined\" && value ? value : self.langText(\"headerFilters|default\"));\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.langBind(\"headerFilters|default\", function(value){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"placeholder\", value);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//focus on element on click\r\n\t\t\t\teditorElement.addEventListener(\"click\", function(e){\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\teditorElement.focus();\r\n\t\t\t\t});\r\n\r\n\t\t\t\teditorElement.addEventListener(\"focus\", (e) => {\r\n\t\t\t\t\tvar left = this.table.columnManager.element.scrollLeft;\r\n\r\n\t\t\t\t\tvar headerPos = this.table.rowManager.element.scrollLeft + parseInt(this.table.columnManager.element.style.marginLeft);\r\n\r\n\t\t\t\t\tif(left !== headerPos){\r\n\t\t\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\t\t\tthis.table.columnManager.scrollHorizontal(left);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\t//live update filters as user types\r\n\t\t\t\ttypingTimer = false;\r\n\r\n\t\t\t\tsearchTrigger = function(e){\r\n\t\t\t\t\tif(typingTimer){\r\n\t\t\t\t\t\tclearTimeout(typingTimer);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ttypingTimer = setTimeout(function(){\r\n\t\t\t\t\t\tsuccess(editorElement.value);\r\n\t\t\t\t\t},self.table.options.headerFilterLiveFilterDelay);\r\n\t\t\t\t};\r\n\r\n\t\t\t\tcolumn.modules.filter.headerElement = editorElement;\r\n\t\t\t\tcolumn.modules.filter.attrType = editorElement.hasAttribute(\"type\") ? editorElement.getAttribute(\"type\").toLowerCase() : \"\" ;\r\n\t\t\t\tcolumn.modules.filter.tagType = editorElement.tagName.toLowerCase();\r\n\r\n\t\t\t\tif(column.definition.headerFilterLiveFilter !== false){\r\n\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\t!(\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === 'autocomplete' ||\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === 'tickCross' ||\r\n\t\t\t\t\t\t\t((column.definition.editor === 'autocomplete' ||\r\n\t\t\t\t\t\t\t\tcolumn.definition.editor === 'tickCross') &&\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === true)\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\teditorElement.addEventListener(\"keyup\", searchTrigger);\r\n\t\t\t\t\teditorElement.addEventListener(\"search\", searchTrigger);\r\n\r\n\r\n\t\t\t\t\t//update number filtered columns on change\r\n\t\t\t\t\tif(column.modules.filter.attrType == \"number\"){\r\n\t\t\t\t\t\teditorElement.addEventListener(\"change\", function(e){\r\n\t\t\t\t\t\t\tsuccess(editorElement.value);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//change text inputs to search inputs to allow for clearing of field\r\n\t\t\t\t\tif(column.modules.filter.attrType == \"text\" && this.table.browser !== \"ie\"){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"type\", \"search\");\r\n\t\t\t\t\t\t// editorElement.off(\"change blur\"); //prevent blur from triggering filter and preventing selection click\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\t//prevent input and select elements from propegating click to column sorters etc\r\n\t\t\t\t\tif(column.modules.filter.tagType == \"input\" || column.modules.filter.tagType == \"select\" || column.modules.filter.tagType == \"textarea\"){\r\n\t\t\t\t\t\teditorElement.addEventListener(\"mousedown\",function(e){\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfilterElement.appendChild(editorElement);\r\n\r\n\t\t\t\tcolumn.contentElement.appendChild(filterElement);\r\n\r\n\t\t\t\tif(!reinitialize){\r\n\t\t\t\t\tself.headerFilterColumns.push(column);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Filter Error - Cannot add header filter, column has no field set:\", column.definition.title);\r\n\t\t}\r\n\t}\r\n\r\n\t//hide all header filter elements (used to ensure correct column widths in \"fitData\" layout mode)\r\n\thideHeaderFilterElements(){\r\n\t\tthis.headerFilterColumns.forEach(function(column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tcolumn.modules.filter.headerElement.style.display = 'none';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//show all header filter elements (used to ensure correct column widths in \"fitData\" layout mode)\r\n\tshowHeaderFilterElements(){\r\n\t\tthis.headerFilterColumns.forEach(function(column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tcolumn.modules.filter.headerElement.style.display = '';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//programatically set focus of header filter\r\n\tsetHeaderFilterFocus(column){\r\n\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\tcolumn.modules.filter.headerElement.focus();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Focus Error - No header filter set on column:\", column.getField());\r\n\t\t}\r\n\t}\r\n\r\n\t//programmatically get value of header filter\r\n\tgetHeaderFilterValue(column){\r\n\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\treturn column.modules.filter.headerElement.value;\r\n\t\t} else {\r\n\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t}\r\n\t}\r\n\r\n\t//programatically set value of header filter\r\n\tsetHeaderFilterValue(column, value){\r\n\t\tif (column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tthis.generateHeaderFilterElement(column, value, true);\r\n\t\t\t\tcolumn.modules.filter.success(value);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treloadHeaderFilter(column){\r\n\t\tif (column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tthis.generateHeaderFilterElement(column, column.modules.filter.value, true);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trefreshFilter(){\r\n\t\tif(this.tableInitialized){\r\n\t\t\tif(this.table.options.filterMode === \"remote\"){\r\n\t\t\t\tthis.reloadData();\r\n\t\t\t}else{\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//TODO - Persist left position of row manager\r\n\t\t// left = this.scrollLeft;\r\n\t\t// this.scrollHorizontal(left);\r\n\t}\r\n\r\n\t//check if the filters has changed since last use\r\n\ttrackChanges(){\r\n\t\tthis.changed = true;\r\n\t\tthis.dispatch(\"filter-changed\");\r\n\t}\r\n\r\n\t//check if the filters has changed since last use\r\n\thasChanged(){\r\n\t\tvar changed = this.changed;\r\n\t\tthis.changed = false;\r\n\t\treturn changed;\r\n\t}\r\n\r\n\t//set standard filters\r\n\tsetFilter(field, type, value, params){\r\n\t\tthis.filterList = [];\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value, params:params}];\r\n\t\t}\r\n\r\n\t\tthis.addFilter(field);\r\n\t}\r\n\r\n\t//add filter to array\r\n\taddFilter(field, type, value, params){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value, params:params}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\tthis.filterList.push(filter);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.trackChanges();\r\n\t\t}\r\n\t}\r\n\r\n\tfindFilter(filter){\r\n\t\tvar column;\r\n\r\n\t\tif(Array.isArray(filter)){\r\n\t\t\treturn this.findSubFilters(filter);\r\n\t\t}\r\n\r\n\t\tvar filterFunc = false;\r\n\r\n\t\tif(typeof filter.field == \"function\"){\r\n\t\t\tfilterFunc = function(data){\r\n\t\t\t\treturn filter.field(data, filter.type || {})// pass params to custom filter function\r\n\t\t\t};\r\n\t\t}else{\r\n\r\n\t\t\tif(Filter.filters[filter.type]){\r\n\r\n\t\t\t\tcolumn = this.table.columnManager.getColumnByField(filter.field);\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\treturn Filter.filters[filter.type](filter.value, column.getFieldValue(data), data, filter.params || {});\r\n\t\t\t\t\t};\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\treturn Filter.filters[filter.type](filter.value, data[filter.field], data, filter.params || {});\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Filter Error - No such filter type found, ignoring: \", filter.type);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfilter.func = filterFunc;\r\n\r\n\t\treturn filter.func ? filter : false;\r\n\t}\r\n\r\n\tfindSubFilters(filters){\r\n\t\tvar output = [];\r\n\r\n\t\tfilters.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\toutput.push(filter);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output.length ? output : false;\r\n\t}\r\n\r\n\t//get all filters\r\n\tgetFilters(all, ajax){\r\n\t\tvar output = [];\r\n\r\n\t\tif(all){\r\n\t\t\toutput = this.getHeaderFilters();\r\n\t\t}\r\n\r\n\t\tif(ajax){\r\n\t\t\toutput.forEach(function(item){\r\n\t\t\t\tif(typeof item.type == \"function\"){\r\n\t\t\t\t\titem.type = \"function\";\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\toutput = output.concat(this.filtersToArray(this.filterList, ajax));\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//filter to Object\r\n\tfiltersToArray(filterList, ajax){\r\n\t\tvar output = [];\r\n\r\n\t\tfilterList.forEach((filter) => {\r\n\t\t\tvar item;\r\n\r\n\t\t\tif(Array.isArray(filter)){\r\n\t\t\t\toutput.push(this.filtersToArray(filter, ajax));\r\n\t\t\t}else{\r\n\t\t\t\titem = {field:filter.field, type:filter.type, value:filter.value}\r\n\r\n\t\t\t\tif(ajax){\r\n\t\t\t\t\tif(typeof item.type == \"function\"){\r\n\t\t\t\t\t\titem.type = \"function\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\toutput.push(item);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//get all filters\r\n\tgetHeaderFilters(){\r\n\t\tvar output = [];\r\n\r\n\t\tfor(var key in this.headerFilters){\r\n\t\t\toutput.push({field:key, type:this.headerFilters[key].type, value:this.headerFilters[key].value});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//remove filter from array\r\n\tremoveFilter(field, type, value){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tvar index = -1;\r\n\r\n\t\t\tif(typeof filter.field == \"object\"){\r\n\t\t\t\tindex = this.filterList.findIndex((element) => {\r\n\t\t\t\t\treturn filter === element;\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tindex = this.filterList.findIndex((element) => {\r\n\t\t\t\t\treturn filter.field === element.field && filter.type === element.type && filter.value === element.value;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.filterList.splice(index, 1);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Filter Error - No matching filter type found, ignoring: \", filter.type);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//clear filters\r\n\tclearFilter(all){\r\n\t\tthis.filterList = [];\r\n\r\n\t\tif(all){\r\n\t\t\tthis.clearHeaderFilter();\r\n\t\t}\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//clear header filters\r\n\tclearHeaderFilter(){\r\n\t\tthis.headerFilters = {};\r\n\t\tthis.prevHeaderFilterChangeCheck = \"{}\";\r\n\r\n\t\tthis.headerFilterColumns.forEach((column) => {\r\n\t\t\tif(typeof column.modules.filter.value !== \"undefined\"){\r\n\t\t\t\tdelete column.modules.filter.value;\r\n\t\t\t}\r\n\t\t\tcolumn.modules.filter.prevSuccess = undefined;\r\n\t\t\tthis.reloadHeaderFilter(column);\r\n\t\t});\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//search data and return matching rows\r\n\tsearch (searchType, field, type, value){\r\n\t\tvar activeRows = [],\r\n\t\tfilterList = [];\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\tfilterList.push(filter);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\tvar match = true;\r\n\r\n\t\t\tfilterList.forEach((filter) => {\r\n\t\t\t\tif(!this.filterRecurse(filter, row.getData())){\r\n\t\t\t\t\tmatch = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tactiveRows.push(searchType === \"data\" ? row.getData(\"data\") : row.getComponent());\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\t\treturn activeRows;\r\n\t}\r\n\r\n\t//filter row array\r\n\tfilter(rowList, filters){\r\n\t\tvar activeRows = [],\r\n\t\tactiveRowComponents = [];\r\n\r\n\t\tif(this.subscribedExternal(\"dataFiltering\")){\r\n\t\t\tthis.dispatchExternal(\"dataFiltering\", this.getFilters());\r\n\t\t}\r\n\r\n\t\tif(this.table.options.filterMode !== \"remote\" && (this.filterList.length || Object.keys(this.headerFilters).length)){\r\n\r\n\t\t\trowList.forEach((row) => {\r\n\t\t\t\tif(this.filterRow(row)){\r\n\t\t\t\t\tactiveRows.push(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t}else{\r\n\t\t\tactiveRows = rowList.slice(0);\r\n\t\t}\r\n\r\n\t\tif(this.subscribedExternal(\"dataFiltered\")){\r\n\r\n\t\t\tactiveRows.forEach((row) => {\r\n\t\t\t\tactiveRowComponents.push(row.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatchExternal(\"dataFiltered\", this.getFilters(), activeRowComponents);\r\n\t\t}\r\n\r\n\t\treturn activeRows;\r\n\t}\r\n\r\n\t//filter individual row\r\n\tfilterRow(row, filters){\r\n\t\tvar match = true,\r\n\t\tdata = row.getData();\r\n\r\n\t\tthis.filterList.forEach((filter) => {\r\n\t\t\tif(!this.filterRecurse(filter, data)){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\tfor(var field in this.headerFilters){\r\n\t\t\tif(!this.headerFilters[field].func(data)){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tfilterRecurse(filter, data){\r\n\t\tvar match = false;\r\n\r\n\t\tif(Array.isArray(filter)){\r\n\t\t\tfilter.forEach((subFilter) => {\r\n\t\t\t\tif(this.filterRecurse(subFilter, data)){\r\n\t\t\t\t\tmatch = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tmatch = filter.func(data);\r\n\t\t}\r\n\r\n\t\treturn match;\r\n\t}\r\n}\r\n\r\nFilter.moduleName = \"filter\";\r\n\r\n//load defaults\r\nFilter.filters = defaultFilters;\r\n\r\nexport default Filter;","export default function(cell, formatterParams, onRendered){\r\n\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n};","import plaintext from './formatters/plaintext.js';\r\nimport html from './formatters/html.js';\r\nimport textarea from './formatters/textarea.js';\r\nimport money from './formatters/money.js';\r\nimport link from './formatters/link.js';\r\nimport image from './formatters/image.js';\r\nimport tickCross from './formatters/tickCross.js';\r\nimport datetime from './formatters/datetime.js';\r\nimport datetimediff from './formatters/datetimediff.js';\r\nimport lookup from './formatters/lookup.js';\r\nimport star from './formatters/star.js';\r\nimport traffic from './formatters/traffic.js';\r\nimport progress from './formatters/progress.js';\r\nimport color from './formatters/color.js';\r\nimport buttonTick from './formatters/buttonTick.js';\r\nimport buttonCross from './formatters/buttonCross.js';\r\nimport rownum from './formatters/rownum.js';\r\nimport handle from './formatters/handle.js';\r\nimport responsiveCollapse from './formatters/responsiveCollapse.js';\r\nimport rowSelection from './formatters/rowSelection.js';\r\n\r\nexport default {\r\n\tplaintext:plaintext,\r\n\thtml:html,\r\n\ttextarea:textarea,\r\n\tmoney:money,\r\n\tlink:link,\r\n\timage:image,\r\n\ttickCross:tickCross,\r\n\tdatetime:datetime,\r\n\tdatetimediff:datetimediff,\r\n\tlookup:lookup,\r\n\tstar:star,\r\n\ttraffic:traffic,\r\n\tprogress:progress,\r\n\tcolor:color,\r\n\tbuttonTick:buttonTick,\r\n\tbuttonCross:buttonCross,\r\n\trownum:rownum,\r\n\thandle:handle,\r\n\tresponsiveCollapse:responsiveCollapse,\r\n\trowSelection:rowSelection,\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn cell.getValue();\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().style.whiteSpace = \"pre-wrap\";\r\n\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar floatVal = parseFloat(cell.getValue()),\r\n\tsign = \"\",\r\n\tnumber, integer, decimal, rgx;\r\n\r\n\tvar decimalSym = formatterParams.decimal || \".\";\r\n\tvar thousandSym = formatterParams.thousand || \",\";\r\n\tvar negativeSign = formatterParams.negativeSign || \"-\";\r\n\tvar symbol = formatterParams.symbol || \"\";\r\n\tvar after = !!formatterParams.symbolAfter;\r\n\tvar precision = typeof formatterParams.precision !== \"undefined\" ? formatterParams.precision : 2;\r\n\r\n\tif(isNaN(floatVal)){\r\n\t\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n\t}\r\n\r\n\tif(floatVal < 0){\r\n\t\tfloatVal = Math.abs(floatVal);\r\n\t\tsign = negativeSign;\r\n\t}\r\n\r\n\tnumber = precision !== false ? floatVal.toFixed(precision) : floatVal;\r\n\tnumber = String(number).split(\".\");\r\n\r\n\tinteger = number[0];\r\n\tdecimal = number.length > 1 ? decimalSym + number[1] : \"\";\r\n\r\n\trgx = /(\\d+)(\\d{3})/;\r\n\r\n\twhile (rgx.test(integer)){\r\n\t\tinteger = integer.replace(rgx, \"$1\" + thousandSym + \"$2\");\r\n\t}\r\n\r\n\treturn after ? sign + integer + decimal + symbol : sign + symbol + integer + decimal;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\turlPrefix = formatterParams.urlPrefix || \"\",\r\n\tdownload = formatterParams.download,\r\n\tlabel = value,\r\n\tel = document.createElement(\"a\"),\r\n\tdata;\r\n\r\n\tif(formatterParams.labelField){\r\n\t\tdata = cell.getData();\r\n\t\tlabel = data[formatterParams.labelField];\r\n\t}\r\n\r\n\tif(formatterParams.label){\r\n\t\tswitch(typeof formatterParams.label){\r\n\t\t\tcase \"string\":\r\n\t\t\tlabel = formatterParams.label;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tlabel = formatterParams.label(cell);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(label){\r\n\t\tif(formatterParams.urlField){\r\n\t\t\tdata = cell.getData();\r\n\t\t\tvalue = data[formatterParams.urlField];\r\n\t\t}\r\n\r\n\t\tif(formatterParams.url){\r\n\t\t\tswitch(typeof formatterParams.url){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tvalue = formatterParams.url;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tvalue = formatterParams.url(cell);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tel.setAttribute(\"href\", urlPrefix + value);\r\n\r\n\t\tif(formatterParams.target){\r\n\t\t\tel.setAttribute(\"target\", formatterParams.target);\r\n\t\t}\r\n\r\n\t\tif(formatterParams.download){\r\n\r\n\t\t\tif(typeof download == \"function\"){\r\n\t\t\t\tdownload = download(cell);\r\n\t\t\t}else{\r\n\t\t\t\tdownload = download === true ? \"\" : download;\r\n\t\t\t}\r\n\r\n\t\t\tel.setAttribute(\"download\", download);\r\n\t\t}\r\n\r\n\t\tel.innerHTML = this.emptyToSpace(this.sanitizeHTML(label));\r\n\r\n\t\treturn el;\r\n\t}else{\r\n\t\treturn \" \";\r\n\t}\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar el = document.createElement(\"img\"),\r\n\tsrc = cell.getValue();\r\n\r\n\tif(formatterParams.urlPrefix){\r\n\t\tsrc = formatterParams.urlPrefix + cell.getValue();\r\n\t}\r\n\r\n\tif(formatterParams.urlSuffix){\r\n\t\tsrc = src + formatterParams.urlSuffix;\r\n\t}\r\n\r\n\tel.setAttribute(\"src\", src);\r\n\r\n\tswitch(typeof formatterParams.height){\r\n\t\tcase \"number\":\r\n\t\tel.style.height = formatterParams.height + \"px\";\r\n\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\tel.style.height = formatterParams.height;\r\n\t\tbreak;\r\n\t}\r\n\r\n\tswitch(typeof formatterParams.width){\r\n\t\tcase \"number\":\r\n\t\tel.style.width = formatterParams.width + \"px\";\r\n\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\tel.style.width = formatterParams.width;\r\n\t\tbreak;\r\n\t}\r\n\r\n\tel.addEventListener(\"load\", function(){\r\n\t\tcell.getRow().normalizeHeight();\r\n\t});\r\n\r\n\treturn el;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\telement = cell.getElement(),\r\n\tempty = formatterParams.allowEmpty,\r\n\ttruthy = formatterParams.allowTruthy,\r\n\ttick = typeof formatterParams.tickElement !== \"undefined\" ? formatterParams.tickElement : '',\r\n\tcross = typeof formatterParams.crossElement !== \"undefined\" ? formatterParams.crossElement : '';\r\n\r\n\tif((truthy && value) || (value === true || value === \"true\" || value === \"True\" || value === 1 || value === \"1\")){\r\n\t\telement.setAttribute(\"aria-checked\", true);\r\n\t\treturn tick || \"\";\r\n\t}else{\r\n\t\tif(empty && (value === \"null\" || value === \"\" || value === null || typeof value === \"undefined\")){\r\n\t\t\telement.setAttribute(\"aria-checked\", \"mixed\");\r\n\t\t\treturn \"\";\r\n\t\t}else{\r\n\t\t\telement.setAttribute(\"aria-checked\", false);\r\n\t\t\treturn cross || \"\";\r\n\t\t}\r\n\t}\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar inputFormat = formatterParams.inputFormat || \"yyyy-MM-dd HH:mm:ss\";\r\n\tvar\toutputFormat = formatterParams.outputFormat || \"dd/MM/yyyy HH:mm:ss\";\r\n\tvar\tinvalid = typeof formatterParams.invalidPlaceholder !== \"undefined\" ? formatterParams.invalidPlaceholder : \"\";\r\n\tvar value = cell.getValue();\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\tvar newDatetime = inputFormat === \"iso\" ? DT.fromISO(String(value)) : DT.fromFormat(String(value), inputFormat);\r\n\r\n\t\tif(newDatetime.isValid){\r\n\r\n\t\t\tif(formatterParams.timezone){\r\n\t\t\t\tnewDatetime = newDatetime.shiftTimezone(formatterParams.timezone);\r\n\t\t\t}\r\n\r\n\t\t\treturn newDatetime.toFormat(outputFormat);\r\n\t\t}else{\r\n\r\n\t\t\tif(invalid === true || !value){\r\n\t\t\t\treturn value;\r\n\t\t\t}else if(typeof invalid === \"function\"){\r\n\t\t\t\treturn invalid(value);\r\n\t\t\t}else{\r\n\t\t\t\treturn invalid;\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tconsole.error(\"Format Error - 'datetime' formatter is dependant on luxon.js\");\r\n\t}\r\n};","export default function (cell, formatterParams, onRendered) {\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar inputFormat = formatterParams.inputFormat || \"yyyy-MM-dd HH:mm:ss\";\r\n\tvar invalid = typeof formatterParams.invalidPlaceholder !== \"undefined\" ? formatterParams.invalidPlaceholder : \"\";\r\n\tvar suffix = typeof formatterParams.suffix !== \"undefined\" ? formatterParams.suffix : false;\r\n\tvar unit = typeof formatterParams.unit !== \"undefined\" ? formatterParams.unit : \"days\";\r\n\tvar humanize = typeof formatterParams.humanize !== \"undefined\" ? formatterParams.humanize : false;\r\n\tvar date = typeof formatterParams.date !== \"undefined\" ? formatterParams.date : DT.now();\r\n\tvar value = cell.getValue();\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\t\r\n\t\tvar newDatetime = inputFormat === \"iso\" ? DT.fromISO(String(value)) : DT.fromFormat(String(value), inputFormat);\r\n\r\n\t\tif (newDatetime.isValid){\r\n\t\t\tif(humanize){\r\n\t\t\t\t// return moment.duration(newDatetime.diff(date)).humanize(suffix);\r\n\t\t\t}else{\r\n\t\t\t\treturn parseInt(newDatetime.diff(date, unit)[unit]) + (suffix ? \" \" + suffix : \"\");\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\tif (invalid === true) {\r\n\t\t\t\treturn value;\r\n\t\t\t} else if (typeof invalid === \"function\") {\r\n\t\t\t\treturn invalid(value);\r\n\t\t\t} else {\r\n\t\t\t\treturn invalid;\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tconsole.error(\"Format Error - 'datetimediff' formatter is dependant on luxon.js\");\r\n\t}\r\n};","export default function (cell, formatterParams, onRendered) {\r\n\tvar value = cell.getValue();\r\n\r\n\tif (typeof formatterParams[value] === \"undefined\") {\r\n\t\tconsole.warn('Missing display value for ' + value);\r\n\t\treturn value;\r\n\t}\r\n\r\n\treturn formatterParams[value];\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\telement = cell.getElement(),\r\n\tmaxStars = formatterParams && formatterParams.stars ? formatterParams.stars : 5,\r\n\tstars = document.createElement(\"span\"),\r\n\tstar = document.createElementNS('http://www.w3.org/2000/svg', \"svg\"),\r\n\tstarActive = '',\r\n\tstarInactive = '';\r\n\r\n\t//style stars holder\r\n\tstars.style.verticalAlign = \"middle\";\r\n\r\n\t//style star\r\n\tstar.setAttribute(\"width\", \"14\");\r\n\tstar.setAttribute(\"height\", \"14\");\r\n\tstar.setAttribute(\"viewBox\", \"0 0 512 512\");\r\n\tstar.setAttribute(\"xml:space\", \"preserve\");\r\n\tstar.style.padding = \"0 1px\";\r\n\r\n\tvalue = value && !isNaN(value) ? parseInt(value) : 0;\r\n\r\n\tvalue = Math.max(0, Math.min(value, maxStars));\r\n\r\n\tfor(var i=1;i<= maxStars;i++){\r\n\t\tvar nextStar = star.cloneNode(true);\r\n\t\tnextStar.innerHTML = i <= value ? starActive : starInactive;\r\n\r\n\t\tstars.appendChild(nextStar);\r\n\t}\r\n\r\n\telement.style.whiteSpace = \"nowrap\";\r\n\telement.style.overflow = \"hidden\";\r\n\telement.style.textOverflow = \"ellipsis\";\r\n\r\n\telement.setAttribute(\"aria-label\", value);\r\n\r\n\treturn stars;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = this.sanitizeHTML(cell.getValue()) || 0,\r\n\tel = document.createElement(\"span\"),\r\n\tmax = formatterParams && formatterParams.max ? formatterParams.max : 100,\r\n\tmin = formatterParams && formatterParams.min ? formatterParams.min : 0,\r\n\tcolors = formatterParams && typeof formatterParams.color !== \"undefined\" ? formatterParams.color : [\"red\", \"orange\", \"green\"],\r\n\tcolor = \"#666666\",\r\n\tpercent, percentValue;\r\n\r\n\tif(isNaN(value) || typeof cell.getValue() === \"undefined\"){\r\n\t\treturn;\r\n\t}\r\n\r\n\tel.classList.add(\"tabulator-traffic-light\");\r\n\r\n\t//make sure value is in range\r\n\tpercentValue = parseFloat(value) <= max ? parseFloat(value) : max;\r\n\tpercentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min;\r\n\r\n\t//workout percentage\r\n\tpercent = (max - min) / 100;\r\n\tpercentValue = Math.round((percentValue - min) / percent);\r\n\r\n\t//set color\r\n\tswitch(typeof colors){\r\n\t\tcase \"string\":\r\n\t\tcolor = colors;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tcolor = colors(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(colors)){\r\n\t\t\tvar unit = 100 / colors.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, colors.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tcolor = colors[index];\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tel.style.backgroundColor = color;\r\n\r\n\treturn el;\r\n};","import CellComponent from '../../../../core/cell/CellComponent.js';\r\n\r\nexport default function(cell, formatterParams, onRendered){ //progress bar\r\n\tvar value = this.sanitizeHTML(cell.getValue()) || 0,\r\n\telement = cell.getElement(),\r\n\tmax = formatterParams && formatterParams.max ? formatterParams.max : 100,\r\n\tmin = formatterParams && formatterParams.min ? formatterParams.min : 0,\r\n\tlegendAlign = formatterParams && formatterParams.legendAlign ? formatterParams.legendAlign : \"center\",\r\n\tpercent, percentValue, color, legend, legendColor, top, left, right, bottom;\r\n\r\n\t//make sure value is in range\r\n\tpercentValue = parseFloat(value) <= max ? parseFloat(value) : max;\r\n\tpercentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min;\r\n\r\n\t//workout percentage\r\n\tpercent = (max - min) / 100;\r\n\tpercentValue = Math.round((percentValue - min) / percent);\r\n\r\n\t//set bar color\r\n\tswitch(typeof formatterParams.color){\r\n\t\tcase \"string\":\r\n\t\tcolor = formatterParams.color;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tcolor = formatterParams.color(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(formatterParams.color)){\r\n\t\t\tvar unit = 100 / formatterParams.color.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, formatterParams.color.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tcolor = formatterParams.color[index];\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tdefault:\r\n\t\tcolor = \"#2DC214\";\r\n\t}\r\n\r\n\t//generate legend\r\n\tswitch(typeof formatterParams.legend){\r\n\t\tcase \"string\":\r\n\t\tlegend = formatterParams.legend;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tlegend = formatterParams.legend(value);\r\n\t\tbreak;\r\n\t\tcase \"boolean\":\r\n\t\tlegend = value;\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\tlegend = false;\r\n\t}\r\n\r\n\t//set legend color\r\n\tswitch(typeof formatterParams.legendColor){\r\n\t\tcase \"string\":\r\n\t\tlegendColor = formatterParams.legendColor;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tlegendColor = formatterParams.legendColor(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(formatterParams.legendColor)){\r\n\t\t\tvar unit = 100 / formatterParams.legendColor.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, formatterParams.legendColor.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tlegendColor = formatterParams.legendColor[index];\r\n\t\t}\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\tlegendColor = \"#000\";\r\n\t}\r\n\r\n\telement.style.minWidth = \"30px\";\r\n\telement.style.position = \"relative\";\r\n\r\n\telement.setAttribute(\"aria-label\", percentValue);\r\n\r\n\tvar barEl = document.createElement(\"div\");\r\n\tbarEl.style.display = \"inline-block\";\r\n\tbarEl.style.position = \"absolute\";\r\n\tbarEl.style.width = percentValue + \"%\";\r\n\tbarEl.style.backgroundColor = color;\r\n\tbarEl.style.height = \"100%\";\r\n\r\n\tbarEl.setAttribute('data-max', max);\r\n\tbarEl.setAttribute('data-min', min);\r\n\r\n\tvar barContainer = document.createElement(\"div\");\r\n\tbarContainer.style.position = \"relative\";\r\n\tbarContainer.style.width = \"100%\";\r\n\tbarContainer.style.height = \"100%\";\r\n\r\n\tif(legend){\r\n\t\tvar legendEl = document.createElement(\"div\");\r\n\t\tlegendEl.style.position = \"absolute\";\r\n\t\tlegendEl.style.top = 0;\r\n\t\tlegendEl.style.left = 0;\r\n\t\tlegendEl.style.textAlign = legendAlign;\r\n\t\tlegendEl.style.width = \"100%\";\r\n\t\tlegendEl.style.color = legendColor;\r\n\t\tlegendEl.innerHTML = legend;\r\n\t}\r\n\r\n\tonRendered(function(){\r\n\r\n\t\t//handle custom element needed if formatter is to be included in printed/downloaded output\r\n\t\tif(!(cell instanceof CellComponent)){\r\n\t\t\tvar holderEl = document.createElement(\"div\");\r\n\t\t\tholderEl.style.position = \"absolute\";\r\n\t\t\tholderEl.style.top = \"4px\";\r\n\t\t\tholderEl.style.bottom = \"4px\";\r\n\t\t\tholderEl.style.left = \"4px\";\r\n\t\t\tholderEl.style.right = \"4px\";\r\n\r\n\t\t\telement.appendChild(holderEl);\r\n\r\n\t\t\telement = holderEl;\r\n\t\t}\r\n\r\n\t\telement.appendChild(barContainer);\r\n\t\tbarContainer.appendChild(barEl);\r\n\r\n\t\tif(legend){\r\n\t\t\tbarContainer.appendChild(legendEl);\r\n\t\t}\r\n\t});\r\n\r\n\treturn \"\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().style.backgroundColor = this.sanitizeHTML(cell.getValue());\r\n\treturn \"\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().classList.add(\"tabulator-row-handle\");\r\n\treturn \"
\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar open = false,\r\n\tel = document.createElement(\"div\"),\r\n\tconfig = cell.getRow()._row.modules.responsiveLayout;\r\n\r\n\tel.classList.add(\"tabulator-responsive-collapse-toggle\");\r\n\tel.innerHTML = \"+-\";\r\n\r\n\tcell.getElement().classList.add(\"tabulator-row-handle\");\r\n\r\n\tfunction toggleList(isOpen){\r\n\t\tvar collapseEl = config.element;\r\n\r\n\t\tconfig.open = isOpen;\r\n\r\n\t\tif(collapseEl){\r\n\r\n\t\t\tif(config.open){\r\n\t\t\t\tel.classList.add(\"open\");\r\n\t\t\t\tcollapseEl.style.display = '';\r\n\t\t\t}else{\r\n\t\t\t\tel.classList.remove(\"open\");\r\n\t\t\t\tcollapseEl.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tel.addEventListener(\"click\", function(e){\r\n\t\te.stopImmediatePropagation();\r\n\t\ttoggleList(!config.open);\r\n\t});\r\n\r\n\ttoggleList(config.open);\r\n\r\n\treturn el;\r\n};","import RowComponent from '../../../../core/row/RowComponent.js';\r\n\r\nexport default function(cell, formatterParams, onRendered){\r\n\tvar checkbox = document.createElement(\"input\");\r\n\tvar blocked = false;\r\n\r\n\tcheckbox.type = 'checkbox';\r\n\r\n\tcheckbox.setAttribute(\"aria-label\", \"Select Row\");\r\n\t\r\n\tif(this.table.modExists(\"selectRow\", true)){\r\n\r\n\t\tcheckbox.addEventListener(\"click\", (e) => {\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tif(typeof cell.getRow == 'function'){\r\n\t\t\tvar row = cell.getRow();\r\n\r\n\t\t\tif(row instanceof RowComponent){\r\n\r\n\t\t\t\tcheckbox.addEventListener(\"change\", (e) => {\r\n\t\t\t\t\tif(this.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\t\tif(!blocked){\r\n\t\t\t\t\t\t\trow.toggleSelect();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tblocked = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trow.toggleSelect();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\tcheckbox.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\tblocked = true;\r\n\t\t\t\t\t\tthis.table.modules.selectRow.handleComplexRowClick(row._row, e);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcheckbox.checked = row.isSelected && row.isSelected();\r\n\t\t\t\tthis.table.modules.selectRow.registerRowSelectCheckbox(row, checkbox);\r\n\t\t\t}else{\r\n\t\t\t\tcheckbox = \"\";\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tcheckbox.addEventListener(\"change\", (e) => {\r\n\t\t\t\tif(this.table.modules.selectRow.selectedRows.length){\r\n\t\t\t\t\tthis.table.deselectRow();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis.table.selectRow(formatterParams.rowRange);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.table.modules.selectRow.registerHeaderSelectCheckbox(checkbox);\r\n\t\t}\r\n\t}\r\n\r\n\treturn checkbox;\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultFormatters from './defaults/formatters.js';\r\n\r\nclass Format extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.registerColumnOption(\"formatter\");\r\n\t\tthis.registerColumnOption(\"formatterParams\");\r\n\r\n\t\tthis.registerColumnOption(\"formatterPrint\");\r\n\t\tthis.registerColumnOption(\"formatterPrintParams\");\r\n\t\tthis.registerColumnOption(\"formatterClipboard\");\r\n\t\tthis.registerColumnOption(\"formatterClipboardParams\");\r\n\t\tthis.registerColumnOption(\"formatterHtmlOutput\");\r\n\t\tthis.registerColumnOption(\"formatterHtmlOutputParams\");\r\n\t\tthis.registerColumnOption(\"titleFormatter\");\r\n\t\tthis.registerColumnOption(\"titleFormatterParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-format\", this.formatValue.bind(this));\r\n\t\tthis.subscribe(\"cell-rendered\", this.cellRendered.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"column-format\", this.formatHeader.bind(this));\r\n\t}\r\n\r\n\t//initialize column formatter\r\n\tinitializeColumn(column){\r\n\t\tcolumn.modules.format = this.lookupFormatter(column, \"\");\r\n\r\n\t\tif(typeof column.definition.formatterPrint !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.print = this.lookupFormatter(column, \"Print\");\r\n\t\t}\r\n\r\n\t\tif(typeof column.definition.formatterClipboard !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.clipboard = this.lookupFormatter(column, \"Clipboard\");\r\n\t\t}\r\n\r\n\t\tif(typeof column.definition.formatterHtmlOutput !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.htmlOutput = this.lookupFormatter(column, \"HtmlOutput\");\r\n\t\t}\r\n\t}\r\n\r\n\tlookupFormatter(column, type){\r\n\t\tvar config = {params:column.definition[\"formatter\" + type + \"Params\"] || {}},\r\n\t\tformatter = column.definition[\"formatter\" + type];\r\n\r\n\t\t//set column formatter\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\tconfig.formatter = Format.formatters[formatter];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tconfig.formatter = formatter;\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn config;\r\n\t}\r\n\r\n\tcellRendered(cell){\r\n\t\tif(cell.modules.format && cell.modules.format.renderedCallback && !cell.modules.format.rendered){\r\n\t\t\tcell.modules.format.renderedCallback();\r\n\t\t\tcell.modules.format.rendered = true;\r\n\t\t}\r\n\t}\r\n\r\n\t//return a formatted value for a column header\r\n\tformatHeader(column, title, el){\r\n\t\tvar formatter, params, onRendered, mockCell;\r\n\r\n\t\tif(column.definition.titleFormatter){\r\n\t\t\tformatter = this.getFormatter(column.definition.titleFormatter);\r\n\r\n\t\t\tonRendered = (callback) => {\r\n\t\t\t\tcolumn.titleFormatterRendered = callback;\r\n\t\t\t};\r\n\r\n\t\t\tmockCell = {\r\n\t\t\t\tgetValue:function(){\r\n\t\t\t\t\treturn title;\r\n\t\t\t\t},\r\n\t\t\t\tgetElement:function(){\r\n\t\t\t\t\treturn el;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tparams = column.definition.titleFormatterParams || {};\r\n\r\n\t\t\tparams = typeof params === \"function\" ? params() : params;\r\n\r\n\t\t\treturn formatter.call(this, mockCell, params, onRendered);\r\n\t\t}else{\r\n\t\t\treturn title;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//return a formatted value for a cell\r\n\tformatValue(cell){\r\n\t\tvar component = cell.getComponent(),\r\n\t\tparams = typeof cell.column.modules.format.params === \"function\" ? cell.column.modules.format.params(component) : cell.column.modules.format.params;\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\tif(!cell.modules.format){\r\n\t\t\t\tcell.modules.format = {};\r\n\t\t\t}\r\n\r\n\t\t\tcell.modules.format.renderedCallback = callback;\r\n\t\t\tcell.modules.format.rendered = false;\r\n\t\t}\r\n\r\n\t\treturn cell.column.modules.format.formatter.call(this, component, params, onRendered);\r\n\t}\r\n\r\n\tformatExportValue(cell, type){\r\n\t\tvar formatter = cell.column.modules.format[type],\r\n\t\tparams;\r\n\r\n\t\tif(formatter){\r\n\t\t\tparams = typeof formatter.params === \"function\" ? formatter.params(component) : formatter.params;\r\n\r\n\t\t\tfunction onRendered(callback){\r\n\t\t\t\tif(!cell.modules.format){\r\n\t\t\t\t\tcell.modules.format = {};\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcell.modules.format.renderedCallback = callback;\r\n\t\t\t\tcell.modules.format.rendered = false;\r\n\t\t\t}\r\n\r\n\t\t\treturn formatter.formatter.call(this, cell.getComponent(), params, onRendered);\r\n\r\n\t\t}else{\r\n\t\t\treturn this.formatValue(cell);\r\n\t\t}\r\n\t}\r\n\r\n\tsanitizeHTML(value){\r\n\t\tif(value){\r\n\t\t\tvar entityMap = {\r\n\t\t\t\t'&': '&',\r\n\t\t\t\t'<': '<',\r\n\t\t\t\t'>': '>',\r\n\t\t\t\t'\"': '"',\r\n\t\t\t\t\"'\": ''',\r\n\t\t\t\t'/': '/',\r\n\t\t\t\t'`': '`',\r\n\t\t\t\t'=': '='\r\n\t\t\t};\r\n\r\n\t\t\treturn String(value).replace(/[&<>\"'`=\\/]/g, function (s) {\r\n\t\t\t\treturn entityMap[s];\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn value;\r\n\t\t}\r\n\t}\r\n\r\n\temptyToSpace(value){\r\n\t\treturn value === null || typeof value === \"undefined\" || value === \"\" ? \" \" : value;\r\n\t}\r\n\r\n\t//get formatter for cell\r\n\tgetFormatter(formatter){\r\n\t\tvar formatter;\r\n\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\tformatter = Format.formatters[formatter]\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tformatter = formatter;\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn formatter;\r\n\t}\r\n}\r\n\r\nFormat.moduleName = \"format\";\r\n\r\n//load defaults\r\nFormat.formatters = defaultFormatters;\r\n\r\nexport default Format;","import Module from '../../core/Module.js';\r\n\r\nclass FrozenColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.leftColumns = [];\r\n\t\tthis.rightColumns = [];\r\n\t\tthis.leftMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.rightPadding = 0;\r\n\t\tthis.initializationMode = \"left\";\r\n\t\tthis.active = false;\r\n\t\tthis.scrollEndTimer = false;\r\n\t\tthis.blocked = true;\r\n\t\t\r\n\t\tthis.registerColumnOption(\"frozen\");\r\n\t}\r\n\t\r\n\t//reset initial state\r\n\treset(){\r\n\t\tthis.initializationMode = \"left\";\r\n\t\tthis.leftColumns = [];\r\n\t\tthis.rightColumns = [];\r\n\t\tthis.leftMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.active = false;\r\n\t\t\r\n\t\tthis.table.columnManager.headersElement.style.marginLeft = 0;\r\n\t\tthis.table.columnManager.element.style.paddingRight = 0;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-layout\", this.layoutCell.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"column-width\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"row-layout-after\", this.layoutRow.bind(this));\r\n\t\tthis.subscribe(\"table-layout\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t\tthis.subscribe(\"columns-loading\", this.reset.bind(this));\r\n\t\tthis.subscribe(\"table-redraw\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"layout-refreshing\", this.blockLayout.bind(this));\r\n\t\tthis.subscribe(\"layout-refreshed\", this.unblockLayout.bind(this));\r\n\t}\r\n\t\r\n\tblockLayout(){\r\n\t\tthis.blocked = true;\r\n\t}\r\n\t\r\n\tunblockLayout(){\r\n\t\tthis.blocked = false;\r\n\t}\r\n\t\r\n\tlayoutCell(cell){\r\n\t\tthis.layoutElement(cell.element, cell.column)\r\n\t}\r\n\t\r\n\t//initialize specific column\r\n\tinitializeColumn(column){\r\n\t\tvar config = {margin:0, edge:false};\r\n\t\t\r\n\t\tif(!column.isGroup){\r\n\t\t\t\r\n\t\t\tif(this.frozenCheck(column)){\r\n\t\t\t\t\r\n\t\t\t\tconfig.position = this.initializationMode;\r\n\t\t\t\t\r\n\t\t\t\tif(this.initializationMode == \"left\"){\r\n\t\t\t\t\tthis.leftColumns.push(column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.rightColumns.unshift(column);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.active = true;\r\n\t\t\t\t\r\n\t\t\t\tcolumn.modules.frozen = config;\r\n\t\t\t}else{\r\n\t\t\t\tthis.initializationMode = \"right\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfrozenCheck(column){\r\n\t\tvar frozen = false;\r\n\t\t\r\n\t\tif(column.parent.isGroup && column.definition.frozen){\r\n\t\t\tconsole.warn(\"Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups\");\r\n\t\t}\r\n\t\t\r\n\t\tif(column.parent.isGroup){\r\n\t\t\treturn this.frozenCheck(column.parent);\r\n\t\t}else{\r\n\t\t\treturn column.definition.frozen;\r\n\t\t}\r\n\t\t\r\n\t\treturn frozen;\r\n\t}\r\n\t\r\n\t//quick layout to smooth horizontal scrolling\r\n\tscrollHorizontal(){\r\n\t\tvar rows;\r\n\t\t\r\n\t\tif(this.active){\r\n\t\t\tclearTimeout(this.scrollEndTimer);\r\n\r\n\t\t\trows = this.table.rowManager.getVisibleRows();\r\n\t\t\t\r\n\t\t\tthis.calcMargins(true);\r\n\t\t\t\r\n\t\t\tthis.layoutColumnPosition();\r\n\t\t\t\r\n\t\t\tthis.layoutCalcRows();\r\n\t\t\t\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\t//calculate margins for rows\r\n\tcalcMargins(scroll){\r\n\t\t\r\n\t\tif(!scroll){\r\n\t\t\tthis.leftMargin = this._calcSpace(this.leftColumns, this.leftColumns.length) + \"px\";\t\t\t\r\n\t\t\tthis.rightMargin = this._calcSpace(this.rightColumns, this.rightColumns.length) + \"px\";\t\r\n\t\t\tthis.table.rowManager.tableElement.style.marginRight = this.rightMargin;\r\n\t\t}\r\n\t\r\n\t\t//calculate right frozen columns\r\n\t\tthis.rightPadding = this.table.rowManager.element.clientWidth + this.table.columnManager.scrollLeft;\r\n\t}\r\n\t\r\n\t//layout calculation rows\r\n\tlayoutCalcRows(){\r\n\t\tif(this.table.modExists(\"columnCalcs\")){\r\n\t\t\tif(this.table.modules.columnCalcs.topInitialized && this.table.modules.columnCalcs.topRow){\r\n\t\t\t\tthis.layoutRow(this.table.modules.columnCalcs.topRow);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.modules.columnCalcs.botInitialized && this.table.modules.columnCalcs.botRow){\r\n\t\t\t\tthis.layoutRow(this.table.modules.columnCalcs.botRow);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.modExists(\"groupRows\")){\r\n\t\t\t\tthis.layoutGroupCalcs(this.table.modules.groupRows.getGroups())\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutGroupCalcs(groups){\r\n\t\tgroups.forEach((group) => {\r\n\t\t\tif(group.calcs.top){\r\n\t\t\t\tthis.layoutRow(group.calcs.top);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(group.calcs.bottom){\r\n\t\t\t\tthis.layoutRow(group.calcs.bottom);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(group.groupList && group.groupList.length){\r\n\t\t\t\tthis.layoutGroupCalcs(group.groupList && group.groupList);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//calculate column positions and layout headers\r\n\tlayoutColumnPosition(allCells){\r\n\t\tvar leftParents = [];\r\n\t\t\r\n\t\tvar leftMargin = 0;\r\n\t\tvar rightMargin = 0;\r\n\t\t\r\n\t\tthis.table.columnManager.headersElement.style.marginLeft = this.leftMargin;\r\n\t\tthis.table.columnManager.element.style.paddingRight = this.rightMargin;\r\n\r\n\t\tthis.leftColumns.forEach((column, i) => {\t\r\n\t\t\tcolumn.modules.frozen.margin = (leftMargin + this.table.columnManager.scrollLeft) + \"px\";\r\n\r\n\t\t\tif(column.visible){\r\n\t\t\t\tleftMargin += column.getWidth();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(i == this.leftColumns.length - 1){\r\n\t\t\t\tcolumn.modules.frozen.edge = true;\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.modules.frozen.edge = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(column.parent.isGroup){\r\n\t\t\t\tvar parentEl = this.getColGroupParentElement(column);\r\n\t\t\t\tif(!leftParents.includes(parentEl)){\r\n\t\t\t\t\tthis.layoutElement(parentEl, column);\r\n\t\t\t\t\tleftParents.push(parentEl);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(column.modules.frozen.edge){\r\n\t\t\t\t\tparentEl.classList.add(\"tabulator-frozen-\" + column.modules.frozen.position);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.layoutElement(column.getElement(), column);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(allCells){\r\n\t\t\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.rightColumns.forEach((column, i) => {\r\n\r\n\t\t\tif(column.visible){\r\n\t\t\t\trightMargin += column.getWidth();\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.modules.frozen.margin = (this.rightPadding - rightMargin) + \"px\";\r\n\t\t\t\r\n\t\t\tif(i == this.rightColumns.length - 1){\r\n\t\t\t\tcolumn.modules.frozen.edge = true;\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.modules.frozen.edge = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(column.parent.isGroup){\r\n\t\t\t\tthis.layoutElement(this.getColGroupParentElement(column), column);\r\n\t\t\t}else{\r\n\t\t\t\tthis.layoutElement(column.getElement(), column);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(allCells){\r\n\t\t\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tgetColGroupParentElement(column){\r\n\t\treturn column.parent.isGroup ? this.getColGroupParentElement(column.parent) : column.getElement();\r\n\t}\r\n\t\r\n\t//layout columns appropriately\r\n\tlayout(){\r\n\t\tif(this.active && !this.blocked){\r\n\t\t\t//calculate row padding\r\n\t\t\tthis.calcMargins();\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) =>{\r\n\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.layoutCalcRows();\r\n\t\t\t\r\n\t\t\t//calculate left columns\r\n\t\t\tthis.layoutColumnPosition(true);\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\t\t\r\n\t\trowEl.style.paddingLeft = this.leftMargin;\r\n\t\t\r\n\t\tif(this.table.options.layout === \"fitDataFill\" && this.rightColumns.length){\r\n\t\t\tthis.table.rowManager.getTableElement().style.minWidth = \"calc(100% - \" + this.rightMargin + \")\";\r\n\t\t}\r\n\t\t\r\n\t\tthis.leftColumns.forEach((column) => {\r\n\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\r\n\t\t\tif(cell){\r\n\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.rightColumns.forEach((column) => {\r\n\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\r\n\t\t\tif(cell){\r\n\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tlayoutElement(element, column){\r\n\t\t\r\n\t\tif(column.modules.frozen){\r\n\t\t\telement.style.position = \"absolute\";\r\n\t\t\telement.style.left = column.modules.frozen.margin;\r\n\t\t\t\r\n\t\t\telement.classList.add(\"tabulator-frozen\");\r\n\t\t\t\r\n\t\t\tif(column.modules.frozen.edge){\r\n\t\t\t\telement.classList.add(\"tabulator-frozen-\" + column.modules.frozen.position);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_calcSpace(columns, index){\r\n\t\tvar width = 0;\r\n\t\t\r\n\t\tfor (let i = 0; i < index; i++){\r\n\t\t\tif(columns[i].visible){\r\n\t\t\t\twidth += columns[i].getWidth();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn width;\r\n\t}\r\n}\r\n\r\nFrozenColumns.moduleName = \"frozenColumns\";\r\n\r\nexport default FrozenColumns;","import Module from '../../core/Module.js';\r\n\r\nclass FrozenRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.topElement = document.createElement(\"div\");\r\n\t\tthis.rows = [];\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"freeze\", this.freezeRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"unfreeze\", this.unfreezeRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isFrozen\", this.isRowFrozen.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.rows = [];\r\n\r\n\t\tthis.topElement.classList.add(\"tabulator-frozen-rows-holder\");\r\n\r\n\t\t// this.table.columnManager.element.append(this.topElement);\r\n\t\tthis.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\r\n\r\n\t\tthis.subscribe(\"row-deleting\", this.detachRow.bind(this));\r\n\t\tthis.subscribe(\"rows-visible\", this.visibleRows.bind(this));\r\n\r\n\t\tthis.registerDisplayHandler(this.getRows.bind(this), 10);\r\n\t}\r\n\r\n\tisRowFrozen(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\t\treturn index > -1;\r\n\t}\r\n\r\n\tisFrozen(){\r\n\t\treturn !!this.rows.length;\r\n\t}\r\n\r\n\tvisibleRows(viewable, rows){\r\n\t\tthis.rows.forEach((row) => {\r\n\t\t\trows.push(row);\r\n\t\t});\r\n\r\n\t\treturn rows;\r\n\t}\r\n\r\n\t//filter frozen rows out of display data\r\n\tgetRows(rows){\r\n\t\tvar self = this,\r\n\t\tfrozen = [],\r\n\t\toutput = rows.slice(0);\r\n\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\tvar index = output.indexOf(row);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\toutput.splice(index, 1);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tfreezeRow(row){\r\n\t\tif(!row.modules.frozen){\r\n\t\t\trow.modules.frozen = true;\r\n\t\t\tthis.topElement.appendChild(row.getElement());\r\n\t\t\trow.initialize();\r\n\t\t\trow.normalizeHeight();\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\tthis.rows.push(row);\r\n\r\n\t\t\tthis.refreshData(false, \"display\")\r\n\r\n\t\t\tthis.styleRows();\r\n\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Freeze Error - Row is already frozen\");\r\n\t\t}\r\n\t}\r\n\r\n\tunfreezeRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\r\n\t\tif(row.modules.frozen){\r\n\r\n\t\t\trow.modules.frozen = false;\r\n\r\n\t\t\tthis.detachRow(row);\r\n\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\tthis.refreshData(false, \"display\")\r\n\r\n\t\t\tif(this.rows.length){\r\n\t\t\t\tthis.styleRows();\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Freeze Error - Row is already unfrozen\");\r\n\t\t}\r\n\t}\r\n\r\n\tdetachRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tvar rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\r\n\t\t\tthis.rows.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\tstyleRows(row){\r\n\t\tthis.rows.forEach((row, i) => {\r\n\t\t\tthis.table.rowManager.styleRow(row, i);\r\n\t\t});\r\n\t}\r\n}\r\n\r\nFrozenRows.moduleName = \"frozenRows\";\r\n\r\nexport default FrozenRows;","//public group object\r\nclass GroupComponent {\r\n\tconstructor (group){\r\n\t\tthis._group = group;\r\n\t\tthis.type = \"GroupComponent\";\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._group.groupManager.table.componentFunctionBinder.handle(\"row\", target._group, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetKey(){\r\n\t\treturn this._group.key;\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._group.field;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._group.element;\r\n\t}\r\n\r\n\tgetRows(){\r\n\t\treturn this._group.getRows(true);\r\n\t}\r\n\r\n\tgetSubGroups(){\r\n\t\treturn this._group.getSubGroups(true);\r\n\t}\r\n\r\n\tgetParentGroup(){\r\n\t\treturn this._group.parent ? this._group.parent.getComponent() : false;\r\n\t}\r\n\r\n\tisVisible(){\r\n\t\treturn this._group.visible;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tthis._group.show();\r\n\t}\r\n\r\n\thide(){\r\n\t\tthis._group.hide();\r\n\t}\r\n\r\n\ttoggle(){\r\n\t\tthis._group.toggleVisibility();\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._group;\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._group.groupManager.table;\r\n\t}\r\n}\r\n\r\nexport default GroupComponent;","import Helpers from '../../core/tools/Helpers.js';\r\nimport GroupComponent from './GroupComponent.js';\r\n\r\n//Group functions\r\nclass Group{\r\n\t\r\n\tconstructor(groupManager, parent, level, key, field, generator, oldGroup){\r\n\t\tthis.groupManager = groupManager;\r\n\t\tthis.parent = parent;\r\n\t\tthis.key = key;\r\n\t\tthis.level = level;\r\n\t\tthis.field = field;\r\n\t\tthis.hasSubGroups = level < (groupManager.groupIDLookups.length - 1);\r\n\t\tthis.addRow = this.hasSubGroups ? this._addRowToGroup : this._addRow;\r\n\t\tthis.type = \"group\"; //type of element\r\n\t\tthis.old = oldGroup;\r\n\t\tthis.rows = [];\r\n\t\tthis.groups = [];\r\n\t\tthis.groupList = [];\r\n\t\tthis.generator = generator;\r\n\t\tthis.element = false;\r\n\t\tthis.elementContents = false;\r\n\t\tthis.height = 0;\r\n\t\tthis.outerHeight = 0;\r\n\t\tthis.initialized = false;\r\n\t\tthis.calcs = {};\r\n\t\tthis.initialized = false;\r\n\t\tthis.modules = {};\r\n\t\tthis.arrowElement = false;\r\n\t\t\r\n\t\tthis.visible = oldGroup ? oldGroup.visible : (typeof groupManager.startOpen[level] !== \"undefined\" ? groupManager.startOpen[level] : groupManager.startOpen[0]);\r\n\t\t\r\n\t\tthis.component = null;\r\n\t\t\r\n\t\tthis.createElements();\r\n\t\tthis.addBindings();\r\n\t\t\r\n\t\tthis.createValueGroups();\r\n\t}\r\n\t\r\n\twipe(){\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\tgroup.wipe();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\tif(row.modules){\r\n\t\t\t\t\tdelete row.modules.group;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\tthis.element = false;\r\n\t\tthis.arrowElement = false;\r\n\t\tthis.elementContents = false;\r\n\t}\r\n\t\r\n\tcreateElements(){\r\n\t\tvar arrow = document.createElement(\"div\");\r\n\t\tarrow.classList.add(\"tabulator-arrow\");\r\n\t\t\r\n\t\tthis.element = document.createElement(\"div\");\r\n\t\tthis.element.classList.add(\"tabulator-row\");\r\n\t\tthis.element.classList.add(\"tabulator-group\");\r\n\t\tthis.element.classList.add(\"tabulator-group-level-\" + this.level);\r\n\t\tthis.element.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\tthis.arrowElement = document.createElement(\"div\");\r\n\t\tthis.arrowElement.classList.add(\"tabulator-group-toggle\");\r\n\t\tthis.arrowElement.appendChild(arrow);\r\n\t\t\r\n\t\t//setup movable rows\r\n\t\tif(this.groupManager.table.options.movableRows !== false && this.groupManager.table.modExists(\"moveRow\")){\r\n\t\t\tthis.groupManager.table.modules.moveRow.initializeGroupHeader(this);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcreateValueGroups(){\r\n\t\tvar level = this.level + 1;\r\n\t\tif(this.groupManager.allowedValues && this.groupManager.allowedValues[level]){\r\n\t\t\tthis.groupManager.allowedValues[level].forEach((value) => {\r\n\t\t\t\tthis._createGroup(value, level);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\taddBindings(){\r\n\t\tvar toggleElement;\r\n\t\t\r\n\t\tif(this.groupManager.table.options.groupToggleElement){\r\n\t\t\ttoggleElement = this.groupManager.table.options.groupToggleElement == \"arrow\" ? this.arrowElement : this.element;\r\n\t\t\t\r\n\t\t\ttoggleElement.addEventListener(\"click\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\tthis.toggleVisibility();\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\t_createGroup(groupID, level){\r\n\t\tvar groupKey = level + \"_\" + groupID;\r\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);\r\n\t\t\r\n\t\tthis.groups[groupKey] = group;\r\n\t\tthis.groupList.push(group);\r\n\t}\r\n\t\r\n\t_addRowToGroup(row){\r\n\t\t\r\n\t\tvar level = this.level + 1;\r\n\t\t\r\n\t\tif(this.hasSubGroups){\r\n\t\t\tvar groupID = this.groupManager.groupIDLookups[level].func(row.getData()),\r\n\t\t\tgroupKey = level + \"_\" + groupID;\r\n\t\t\t\r\n\t\t\tif(this.groupManager.allowedValues && this.groupManager.allowedValues[level]){\r\n\t\t\t\tif(this.groups[groupKey]){\r\n\t\t\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(!this.groups[groupKey]){\r\n\t\t\t\t\tthis._createGroup(groupID, level);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_addRow(row){\r\n\t\tthis.rows.push(row);\r\n\t\trow.modules.group = this;\r\n\t}\r\n\t\r\n\tinsertRow(row, to, after){\r\n\t\tvar data = this.conformRowData({});\r\n\t\t\r\n\t\trow.updateData(data);\r\n\t\t\r\n\t\tvar toIndex = this.rows.indexOf(to);\r\n\t\t\r\n\t\tif(toIndex > -1){\r\n\t\t\tif(after){\r\n\t\t\t\tthis.rows.splice(toIndex+1, 0, row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.splice(toIndex, 0, row);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(after){\r\n\t\t\t\tthis.rows.push(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.unshift(row);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\trow.modules.group = this;\r\n\t\t\r\n\t\tthis.generateGroupHeaderContents();\r\n\t\t\r\n\t\tif(this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\tthis.groupManager.table.modules.columnCalcs.recalcGroup(this);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.updateGroupRows(true);\r\n\t}\r\n\t\r\n\tscrollHeader(left){\r\n\t\tif(this.arrowElement){\r\n\t\t\tthis.arrowElement.style.marginLeft = left;\r\n\t\t\t\r\n\t\t\tthis.groupList.forEach(function(child){\r\n\t\t\t\tchild.scrollHeader(left);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRowIndex(row){}\r\n\t\r\n\t//update row data to match grouping contraints\r\n\tconformRowData(data){\r\n\t\tif(this.field){\r\n\t\t\tdata[this.field] = this.key;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Data Conforming Error - Cannot conform row data to match new group as groupBy is a function\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.parent){\r\n\t\t\tdata = this.parent.conformRowData(data);\r\n\t\t}\r\n\t\t\r\n\t\treturn data;\r\n\t}\r\n\t\r\n\tremoveRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\t\tvar el = row.getElement();\r\n\t\t\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.rows.splice(index, 1);\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.groupManager.table.options.groupValues && !this.rows.length){\r\n\t\t\tif(this.parent){\r\n\t\t\t\tthis.parent.removeGroup(this);\r\n\t\t\t}else{\r\n\t\t\t\tthis.groupManager.removeGroup(this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tif(el.parentNode){\r\n\t\t\t\tel.parentNode.removeChild(el);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.generateGroupHeaderContents();\r\n\t\t\t\r\n\t\t\tif(this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\t\tthis.groupManager.table.modules.columnCalcs.recalcGroup(this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveGroup(group){\r\n\t\tvar groupKey = group.level + \"_\" + group.key,\r\n\t\tindex;\r\n\t\t\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tdelete this.groups[groupKey];\r\n\t\t\t\r\n\t\t\tindex = this.groupList.indexOf(group);\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.groupList.splice(index, 1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!this.groupList.length){\r\n\t\t\t\tif(this.parent){\r\n\t\t\t\t\tthis.parent.removeGroup(this);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.groupManager.removeGroup(this);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetHeadersAndRows(noCalc){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\toutput.push(this);\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(this.visible){\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\t\toutput = output.concat(group.getHeadersAndRows(noCalc));\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tif(!noCalc && this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\r\n\t\t\t\t\tif(this.calcs.top){\r\n\t\t\t\t\t\tthis.calcs.top.detachElement();\r\n\t\t\t\t\t\tthis.calcs.top.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows);\r\n\t\t\t\t\toutput.push(this.calcs.top);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\toutput = output.concat(this.rows);\r\n\t\t\t\t\r\n\t\t\t\tif(!noCalc && this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\r\n\t\t\t\t\tif(this.calcs.bottom){\r\n\t\t\t\t\t\tthis.calcs.bottom.detachElement();\r\n\t\t\t\t\t\tthis.calcs.bottom.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows);\r\n\t\t\t\t\toutput.push(this.calcs.bottom);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!this.groupList.length && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\t\t\r\n\t\t\t\tif(this.groupManager.table.modExists(\"columnCalcs\")){\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!noCalc && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\r\n\t\t\t\t\t\tif(this.calcs.top){\r\n\t\t\t\t\t\t\tthis.calcs.top.detachElement();\r\n\t\t\t\t\t\t\tthis.calcs.top.deleteCells();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.groupManager.table.options.groupClosedShowCalcs){\r\n\t\t\t\t\t\t\tthis.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows);\r\n\t\t\t\t\t\t\toutput.push(this.calcs.top);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!noCalc && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\r\n\t\t\t\t\t\tif(this.calcs.bottom){\r\n\t\t\t\t\t\t\tthis.calcs.bottom.detachElement();\r\n\t\t\t\t\t\t\tthis.calcs.bottom.deleteCells();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.groupManager.table.options.groupClosedShowCalcs){\r\n\t\t\t\t\t\t\tthis.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows);\r\n\t\t\t\t\t\t\toutput.push(this.calcs.bottom);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetData(visible, transform){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(!visible || (visible && this.visible)){\r\n\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\toutput.push(row.getData(transform || \"data\"));\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetRowCount(){\r\n\t\tvar count = 0;\r\n\t\t\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\tcount += group.getRowCount();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tcount = this.rows.length;\r\n\t\t}\r\n\t\treturn count;\r\n\t}\r\n\t\r\n\ttoggleVisibility(){\r\n\t\tif(this.visible){\r\n\t\t\tthis.hide();\r\n\t\t}else{\r\n\t\t\tthis.show();\r\n\t\t}\r\n\t}\r\n\t\r\n\thide(){\r\n\t\tthis.visible = false;\r\n\t\t\r\n\t\tif(this.groupManager.table.rowManager.getRenderMode() == \"classic\" && !this.groupManager.table.options.pagination){\r\n\t\t\t\r\n\t\t\tthis.element.classList.remove(\"tabulator-group-visible\");\r\n\t\t\t\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar rows = group.getHeadersAndRows();\r\n\t\t\t\t\t\r\n\t\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\t\trow.detachElement();\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex());\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth();\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.table.externalEvents.dispatch(\"groupVisibilityChanged\", this.getComponent(), false);\r\n\t}\r\n\t\r\n\tshow(){\r\n\t\tthis.visible = true;\r\n\t\t\r\n\t\tif(this.groupManager.table.rowManager.getRenderMode() == \"classic\" && !this.groupManager.table.options.pagination){\r\n\t\t\t\r\n\t\t\tthis.element.classList.add(\"tabulator-group-visible\");\r\n\t\t\t\r\n\t\t\tvar prev = this.generateElement();\r\n\t\t\t\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\t\tvar rows = group.getHeadersAndRows();\r\n\t\t\t\t\t\r\n\t\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\t\tprev.parentNode.insertBefore(rowEl, prev.nextSibling);\r\n\t\t\t\t\t\trow.initialize();\r\n\t\t\t\t\t\tprev = rowEl;\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\tprev.parentNode.insertBefore(rowEl, prev.nextSibling);\r\n\t\t\t\t\trow.initialize();\r\n\t\t\t\t\tprev = rowEl;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex());\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth();\r\n\t\t}else{\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.table.externalEvents.dispatch(\"groupVisibilityChanged\", this.getComponent(), true);\r\n\t}\r\n\t\r\n\t_visSet(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tif(typeof this.visible == \"function\"){\r\n\t\t\t\r\n\t\t\tthis.rows.forEach(function(row){\r\n\t\t\t\tdata.push(row.getData());\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.visible = this.visible(this.key, this.getRowCount(), data, this.getComponent());\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRowGroup(row){\r\n\t\tvar match = false;\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\tvar result = group.getRowGroup(row);\r\n\t\t\t\t\r\n\t\t\t\tif(result){\r\n\t\t\t\t\tmatch = result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tif(this.rows.find(function(item){\r\n\t\t\t\treturn item === row;\r\n\t\t\t})){\r\n\t\t\t\tmatch = this;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn match;\r\n\t}\r\n\t\r\n\tgetSubGroups(component){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.groupList.forEach(function(child){\r\n\t\t\toutput.push(component ? child.getComponent() : child);\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetRows(compoment){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\toutput.push(compoment ? row.getComponent() : row);\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgenerateGroupHeaderContents(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\tdata.push(row.getData());\r\n\t\t});\r\n\t\t\r\n\t\tthis.elementContents = this.generator(this.key, this.getRowCount(), data, this.getComponent());\r\n\t\t\r\n\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\t\t\r\n\t\tif(typeof this.elementContents === \"string\"){\r\n\t\t\tthis.element.innerHTML = this.elementContents;\r\n\t\t}else{\r\n\t\t\tthis.element.appendChild(this.elementContents);\r\n\t\t}\r\n\t\t\r\n\t\tthis.element.insertBefore(this.arrowElement, this.element.firstChild);\r\n\t}\r\n\t\r\n\tgetPath(path = []) {\r\n\t\tpath.unshift(this.key);\r\n\t\tif(this.parent) {\r\n\t\t\tthis.parent.getPath(path);\r\n\t\t}\r\n\t\treturn path;\r\n\t}\r\n\t\r\n\t////////////// Standard Row Functions //////////////\r\n\t\r\n\tgetElement(){\r\n\t\treturn this.elementContents ? this.element : this.generateElement();\r\n\t}\r\n\t\r\n\tgenerateElement(){\r\n\t\tthis.addBindings = false;\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(this.visible){\r\n\t\t\tthis.element.classList.add(\"tabulator-group-visible\");\r\n\t\t}else{\r\n\t\t\tthis.element.classList.remove(\"tabulator-group-visible\");\r\n\t\t}\r\n\t\t\r\n\t\tfor(var i = 0; i < this.element.childNodes.length; ++i){\r\n\t\t\tthis.element.childNodes[i].parentNode.removeChild(this.element.childNodes[i]);\r\n\t\t}\r\n\t\t\r\n\t\tthis.generateGroupHeaderContents();\r\n\t\t\r\n\t\t// this.addBindings();\r\n\t\t\r\n\t\treturn this.element;\r\n\t}\r\n\t\r\n\tdetachElement(){\r\n\t\tif (this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\t//normalize the height of elements in the row\r\n\tnormalizeHeight(){\r\n\t\tthis.setHeight(this.element.clientHeight);\r\n\t}\r\n\t\r\n\tinitialize(force){\r\n\t\tif(!this.initialized || force){\r\n\t\t\tthis.normalizeHeight();\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitialize(){\r\n\t\tthis.initialized = false;\r\n\t\tthis.height = 0;\r\n\t\t\r\n\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\tthis.initialize(true);\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetHeight(height){\r\n\t\tif(this.height != height){\r\n\t\t\tthis.height = height;\r\n\t\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return rows outer height\r\n\tgetHeight(){\r\n\t\treturn this.outerHeight;\r\n\t}\r\n\t\r\n\tgetGroup(){\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\treinitializeHeight(){}\r\n\t\r\n\tcalcHeight(){}\r\n\t\r\n\tsetCellHeight(){}\r\n\t\r\n\tclearCellHeight(){}\r\n\t\r\n\tdeinitializeHeight(){}\r\n\t\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new GroupComponent(this);\r\n\t\t}\r\n\t\t\r\n\t\treturn this.component;\r\n\t}\r\n}\r\n\r\nexport default Group;","import Module from '../../core/Module.js';\r\n\r\nimport GroupComponent from './GroupComponent.js';\r\nimport Group from './Group.js';\r\n\r\nclass GroupRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.groupIDLookups = false; //enable table grouping and set field to group by\r\n\t\tthis.startOpen = [function(){return false;}]; //starting state of group\r\n\t\tthis.headerGenerator = [function(){return \"\";}];\r\n\t\tthis.groupList = []; //ordered list of groups\r\n\t\tthis.allowedValues = false;\r\n\t\tthis.groups = {}; //hold row groups\r\n\t\tthis.displayIndex = 0; //index in display pipeline\r\n\r\n\t\tthis.displayHandler = this.getRows.bind(this);\r\n\r\n\t\t//register table options\r\n\t\tthis.registerTableOption(\"groupBy\", false); //enable table grouping and set field to group by\r\n\t\tthis.registerTableOption(\"groupStartOpen\", true); //starting state of group\r\n\t\tthis.registerTableOption(\"groupValues\", false);\r\n\t\tthis.registerTableOption(\"groupUpdateOnCellEdit\", false);\r\n\t\tthis.registerTableOption(\"groupHeader\", false); //header generation function\r\n\t\tthis.registerTableOption(\"groupHeaderPrint\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderClipboard\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderHtmlOutput\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderDownload\", null);\r\n\t\tthis.registerTableOption(\"groupToggleElement\", \"arrow\");\r\n\t\tthis.registerTableOption(\"groupClosedShowCalcs\", false);\r\n\r\n\t\t//register table functions\r\n\t\tthis.registerTableFunction(\"setGroupBy\", this.setGroupBy.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupValues\", this.setGroupValues.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupStartOpen\", this.setGroupStartOpen.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupHeader\", this.setGroupHeader.bind(this));\r\n\t\tthis.registerTableFunction(\"getGroups\", this.userGetGroups.bind(this));\r\n\t\tthis.registerTableFunction(\"getGroupedData\", this.userGetGroupedData.bind(this));\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"getGroup\", this.rowGetGroup.bind(this));\r\n\t}\r\n\r\n\t//initialize group configuration\r\n\tinitialize(){\r\n\t\tif(this.table.options.groupBy){\r\n\r\n\t\t\tif(this.table.options.groupUpdateOnCellEdit){\r\n\t\t\t\tthis.subscribe(\"cell-value-updated\", this.cellUpdated.bind(this));\r\n\t\t\t\tthis.subscribe(\"row-data-changed\", this.reassignRowToGroup.bind(this), 0);\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-built\", this.configureGroupSetup.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"row-deleting\", this.rowDeleting.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHeaders.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.wipe.bind(this));\r\n\t\t\tthis.subscribe(\"rows-added\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"row-moving\", this.rowMoving.bind(this));\r\n\t\t\tthis.subscribe(\"row-adding-index\", this.rowAddingIndex.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"rows-sample\", this.rowSample.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"render-virtual-fill\", this.virtualRenderFill.bind(this));\r\n\r\n\t\t\tthis.registerDisplayHandler(this.displayHandler, 20);\r\n\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tconfigureGroupSetup(){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tvar groupBy = this.table.options.groupBy,\r\n\t\t\tstartOpen = this.table.options.groupStartOpen,\r\n\t\t\tgroupHeader = this.table.options.groupHeader;\r\n\r\n\t\t\tthis.allowedValues = this.table.options.groupValues;\r\n\r\n\t\t\tif(Array.isArray(groupBy) && Array.isArray(groupHeader) && groupBy.length > groupHeader.length){\r\n\t\t\t\tconsole.warn(\"Error creating group headers, groupHeader array is shorter than groupBy array\");\r\n\t\t\t}\r\n\r\n\t\t\tthis.headerGenerator = [function(){return \"\";}];\r\n\t\t\tthis.startOpen = [function(){return false;}]; //starting state of group\r\n\r\n\t\t\tthis.langBind(\"groups|item\", (langValue, lang) => {\r\n\t\t\t\tthis.headerGenerator[0] = (value, count, data) => { //header layout function\r\n\t\t\t\t\treturn (typeof value === \"undefined\" ? \"\" : value) + \"(\" + count + \" \" + ((count === 1) ? langValue : lang.groups.items) + \")\";\r\n\t\t\t\t};\r\n\t\t\t});\r\n\r\n\t\t\tthis.groupIDLookups = [];\r\n\r\n\t\t\tif(Array.isArray(groupBy) || groupBy){\r\n\t\t\t\tif(this.table.modExists(\"columnCalcs\") && this.table.options.columnCalcs != \"table\" && this.table.options.columnCalcs != \"both\"){\r\n\t\t\t\t\tthis.table.modules.columnCalcs.removeCalcs();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.modExists(\"columnCalcs\") && this.table.options.columnCalcs != \"group\"){\r\n\r\n\t\t\t\t\tvar cols = this.table.columnManager.getRealColumns();\r\n\r\n\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\tif(col.definition.topCalc){\r\n\t\t\t\t\t\t\tthis.table.modules.columnCalcs.initializeTopRow();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(col.definition.bottomCalc){\r\n\t\t\t\t\t\t\tthis.table.modules.columnCalcs.initializeBottomRow();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(!Array.isArray(groupBy)){\r\n\t\t\t\tgroupBy = [groupBy];\r\n\t\t\t}\r\n\r\n\t\t\tgroupBy.forEach((group, i) => {\r\n\t\t\t\tvar lookupFunc, column;\r\n\r\n\t\t\t\tif(typeof group == \"function\"){\r\n\t\t\t\t\tlookupFunc = group;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolumn = this.table.columnManager.getColumnByField(group);\r\n\r\n\t\t\t\t\tif(column){\r\n\t\t\t\t\t\tlookupFunc = function(data){\r\n\t\t\t\t\t\t\treturn column.getFieldValue(data);\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tlookupFunc = function(data){\r\n\t\t\t\t\t\t\treturn data[group];\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.groupIDLookups.push({\r\n\t\t\t\t\tfield: typeof group === \"function\" ? false : group,\r\n\t\t\t\t\tfunc:lookupFunc,\r\n\t\t\t\t\tvalues:this.allowedValues ? this.allowedValues[i] : false,\r\n\t\t\t\t});\r\n\t\t\t});\r\n\r\n\t\t\tif(startOpen){\r\n\t\t\t\tif(!Array.isArray(startOpen)){\r\n\t\t\t\t\tstartOpen = [startOpen];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstartOpen.forEach((level) => {\r\n\t\t\t\t\tlevel = typeof level == \"function\" ? level : function(){return true;};\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.startOpen = startOpen;\r\n\t\t\t}\r\n\r\n\t\t\tif(groupHeader){\r\n\t\t\t\tthis.headerGenerator = Array.isArray(groupHeader) ? groupHeader : [groupHeader];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trowSample(rows, prevValue){\r\n\t\tvar group = this.getGroups(false)[0];\r\n\r\n\t\tprevValue.push(group.getRows(false)[0]);\r\n\r\n\t\treturn prevValue;\r\n\t}\r\n\r\n\tvirtualRenderFill(){\r\n\t\tvar el = this.table.rowManager.tableElement;\r\n\t\tvar rows = this.table.rowManager.getVisibleRows();\r\n\r\n\t\trows = rows.filter((row) => {\r\n\t\t\treturn row.type !== \"group\";\r\n\t\t});\r\n\r\n\t\tel.style.minWidth = !rows.length ? this.table.columnManager.getWidth() + \"px\" : \"\";\r\n\r\n\t\t// if(this.table.options.groupBy){\r\n\t\t// \tif(this.layoutMode() != \"fitDataFill\" && rowsCount == this.table.modules.groupRows.countGroups()){\r\n\t\t// \t\tel.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t// \t}\r\n\t\t// }\r\n\t}\r\n\r\n\trowAddingIndex(row, index, top){\r\n\t\tthis.assignRowToGroup(row);\r\n\r\n\t\tvar groupRows = row.modules.group.rows;\r\n\r\n\t\tif(groupRows.length > 1){\r\n\t\t\tif(!index || (index && groupRows.indexOf(index) == -1)){\r\n\t\t\t\tif(top){\r\n\t\t\t\t\tif(groupRows[0] !== row){\r\n\t\t\t\t\t\tindex = groupRows[0];\r\n\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(groupRows[groupRows.length -1] !== row){\r\n\t\t\t\t\t\tindex = groupRows[groupRows.length -1];\r\n\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn index;\r\n\t}\r\n\r\n\ttrackChanges(){\r\n\t\tthis.dispatch(\"group-changed\");\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tsetGroupBy(groups){\r\n\t\tthis.table.options.groupBy = groups;\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.initialize();\r\n\t\t}else{\r\n\t\t\tthis.configureGroupSetup();\r\n\t\t}\r\n\r\n\t\tthis.refreshData();\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\tsetGroupValues(groupValues){\r\n\t\tthis.table.options.groupValues = groupValues;\r\n\t\tthis.configureGroupSetup();\r\n\t\tthis.refreshData();\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\tsetGroupStartOpen(values){\r\n\t\tthis.table.options.groupStartOpen = values;\r\n\t\tthis.configureGroupSetup();\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\r\n\t\t\tthis.trackChanges();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Grouping Update - cant refresh view, no groups have been set\");\r\n\t\t}\r\n\t}\r\n\r\n\tsetGroupHeader(values){\r\n\t\tthis.table.options.groupHeader = values;\r\n\t\tthis.configureGroupSetup();\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\r\n\t\t\tthis.trackChanges();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Grouping Update - cant refresh view, no groups have been set\");\r\n\t\t}\r\n\t}\r\n\r\n\tuserGetGroups(values){\r\n\t\treturn this.getGroups(true);\r\n\t}\r\n\r\n\t// get grouped table data in the same format as getData()\r\n\tuserGetGroupedData(){\r\n\t\treturn this.table.options.groupBy ?\r\n\t\tthis.getGroupedData() : this.getData()\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////////\r\n\t///////// Component Functions /////////\r\n\t///////////////////////////////////////\r\n\r\n\trowGetGroup(row){\r\n\t\treturn row.modules.group ? row.modules.group.getComponent() : false;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\trowMoving(from, to, after){\r\n\t\tif(!after && to instanceof Group){\r\n\t\t\tto = this.table.rowManager.prevDisplayRow(from) || to;\r\n\t\t}\r\n\r\n\t\tvar toGroup = to instanceof Group ? to : to.modules.group;\r\n\t\tvar fromGroup = from instanceof Group ? from : from.modules.group;\r\n\r\n\t\tif(toGroup === fromGroup){\r\n\t\t\tthis.table.rowManager.moveRowInArray(toGroup.rows, from, to, after);\r\n\t\t}else{\r\n\t\t\tif(fromGroup){\r\n\t\t\t\tfromGroup.removeRow(from);\r\n\t\t\t}\r\n\r\n\t\t\ttoGroup.insertRow(from, to, after);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trowDeleting(row){\r\n\t\t//remove from group\r\n\t\tif(row.modules.group){\r\n\t\t\trow.modules.group.removeRow(row);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trowsUpdated(row){\r\n\t\tthis.updateGroupRows(true);\r\n\t}\r\n\r\n\tcellUpdated(cell){\r\n\t\tthis.reassignRowToGroup(cell.row);\r\n\t}\r\n\r\n\r\n\tsetDisplayIndex(index){\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\r\n\tgetDisplayIndex(){\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\r\n\t//return appropriate rows with group headers\r\n\tgetRows(rows){\r\n\t\tif(this.table.options.groupBy && this.groupIDLookups.length){\r\n\r\n\t\t\tthis.dispatchExternal(\"dataGrouping\");\r\n\r\n\t\t\tthis.generateGroups(rows);\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataGrouped\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataGrouped\", this.getGroups(true));\r\n\t\t\t}\r\n\r\n\t\t\treturn this.updateGroupRows();\r\n\r\n\t\t}else{\r\n\t\t\treturn rows.slice(0);\r\n\t\t}\r\n\t}\r\n\r\n\tgetGroups(component){\r\n\t\tvar groupComponents = [];\r\n\r\n\t\tthis.groupList.forEach(function(group){\r\n\t\t\tgroupComponents.push(component ? group.getComponent() : group);\r\n\t\t});\r\n\r\n\t\treturn groupComponents;\r\n\t}\r\n\r\n\tgetChildGroups(group){\r\n\t\tvar groupComponents = [];\r\n\r\n\t\tif(!group){\r\n\t\t\tgroup = this;\r\n\t\t}\r\n\r\n\t\tgroup.groupList.forEach((child) => {\r\n\t\t\tif(child.groupList.length){\r\n\t\t\t\tgroupComponents = groupComponents.concat(this.getChildGroups(child));\r\n\t\t\t}else{\r\n\t\t\t\tgroupComponents.push(child);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn groupComponents;\r\n\t}\r\n\r\n\twipe(){\r\n\t\tthis.groupList.forEach(function(group){\r\n\t\t\tgroup.wipe();\r\n\t\t});\r\n\t}\r\n\r\n\tpullGroupListData(groupList) {\r\n\t\tvar groupListData = [];\r\n\r\n\t\tgroupList.forEach((group) => {\r\n\t\t\tvar groupHeader = {};\r\n\t\t\tgroupHeader.level = 0;\r\n\t\t\tgroupHeader.rowCount = 0;\r\n\t\t\tgroupHeader.headerContent = \"\";\r\n\t\t\tvar childData = [];\r\n\r\n\t\t\tif (group.hasSubGroups) {\r\n\t\t\t\tchildData = this.pullGroupListData(group.groupList);\r\n\r\n\t\t\t\tgroupHeader.level = group.level;\r\n\t\t\t\tgroupHeader.rowCount = childData.length - group.groupList.length; // data length minus number of sub-headers\r\n\t\t\t\tgroupHeader.headerContent = group.generator(group.key, groupHeader.rowCount, group.rows, group);\r\n\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\t\t\t\tgroupListData = groupListData.concat(childData);\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tgroupHeader.level = group.level;\r\n\t\t\t\tgroupHeader.headerContent = group.generator(group.key, group.rows.length, group.rows, group);\r\n\t\t\t\tgroupHeader.rowCount = group.getRows().length;\r\n\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\r\n\t\t\t\tgroup.getRows().forEach((row) => {\r\n\t\t\t\t\tgroupListData.push(row.getData(\"data\"));\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn groupListData\r\n\t}\r\n\r\n\tgetGroupedData(){\r\n\r\n\t\treturn this.pullGroupListData(this.groupList);\r\n\t}\r\n\r\n\tgetRowGroup(row){\r\n\t\tvar match = false;\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\tvar result = group.getRowGroup(row);\r\n\r\n\t\t\tif(result){\r\n\t\t\t\tmatch = result;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tcountGroups(){\r\n\t\treturn this.groupList.length;\r\n\t}\r\n\r\n\tgenerateGroups(rows){\r\n\t\tvar oldGroups = this.groups;\r\n\r\n\t\tthis.groups = {};\r\n\t\tthis.groupList = [];\r\n\r\n\t\tif(this.allowedValues && this.allowedValues[0]){\r\n\t\t\tthis.allowedValues[0].forEach((value) => {\r\n\t\t\t\tthis.createGroup(value, 0, oldGroups);\r\n\t\t\t});\r\n\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tthis.assignRowToExistingGroup(row, oldGroups);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tthis.assignRowToGroup(row, oldGroups);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tcreateGroup(groupID, level, oldGroups){\r\n\t\tvar groupKey = level + \"_\" + groupID,\r\n\t\tgroup;\r\n\r\n\t\toldGroups = oldGroups || [];\r\n\r\n\t\tgroup = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]);\r\n\r\n\t\tthis.groups[groupKey] = group;\r\n\t\tthis.groupList.push(group);\r\n\t}\r\n\r\n\tassignRowToExistingGroup(row, oldGroups){\r\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\r\n\t\tgroupKey = \"0_\" + groupID;\r\n\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t}\r\n\t}\r\n\r\n\tassignRowToGroup(row, oldGroups){\r\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\r\n\t\tnewGroupNeeded = !this.groups[\"0_\" + groupID];\r\n\r\n\t\tif(newGroupNeeded){\r\n\t\t\tthis.createGroup(groupID, 0, oldGroups);\r\n\t\t}\r\n\r\n\t\tthis.groups[\"0_\" + groupID].addRow(row);\r\n\r\n\t\treturn !newGroupNeeded;\r\n\t}\r\n\r\n\treassignRowToGroup(row){\r\n\t\tif(row.type === \"row\"){\r\n\t\t\tvar oldRowGroup = row.modules.group,\r\n\t\t\toldGroupPath = oldRowGroup.getPath(),\r\n\t\t\tnewGroupPath = this.getExpectedPath(row),\r\n\t\t\tsamePath = true;\r\n\r\n\t\t\t// figure out if new group path is the same as old group path\r\n\t\t\tvar samePath = (oldGroupPath.length == newGroupPath.length) && oldGroupPath.every((element, index) => {\r\n\t\t\t\treturn element === newGroupPath[index];\r\n\t\t\t});\r\n\r\n\t\t\t// refresh if they new path and old path aren't the same (aka the row's groupings have changed)\r\n\t\t\tif(!samePath) {\r\n\t\t\t\toldRowGroup.removeRow(row);\r\n\t\t\t\tthis.assignRowToGroup(row, this.groups);\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgetExpectedPath(row) {\r\n\t\tvar groupPath = [], rowData = row.getData();\r\n\r\n\t\tthis.groupIDLookups.forEach((groupId) => {\r\n\t\t\tgroupPath.push(groupId.func(rowData));\r\n\t\t});\r\n\r\n\t\treturn groupPath;\r\n\t}\r\n\r\n\tupdateGroupRows(force){\r\n\t\tvar output = [],\r\n\t\toldRowCount;\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\toutput = output.concat(group.getHeadersAndRows());\r\n\t\t});\r\n\r\n\t\tif(force){\r\n\t\t\tthis.refreshData(true, this.displayHandler);\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tscrollHeaders(left){\r\n\t\tif(this.table.options.renderHorizontal === \"virtual\"){\r\n\t\t\tleft -= this.table.columnManager.renderer.vDomPadLeft;\r\n\t\t}\r\n\r\n\t\tleft = left + \"px\";\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\tgroup.scrollHeader(left);\r\n\t\t});\r\n\t}\r\n\r\n\tremoveGroup(group){\r\n\t\tvar groupKey = group.level + \"_\" + group.key,\r\n\t\tindex;\r\n\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tdelete this.groups[groupKey];\r\n\r\n\t\t\tindex = this.groupList.indexOf(group);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.groupList.splice(index, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nGroupRows.moduleName = \"groupRows\";\r\n\r\nexport default GroupRows;","export default {\r\n\tcellEdit: function(action){\r\n\t\taction.component.setValueProcessData(action.data.oldValue);\r\n\t\taction.component.cellRendered();\r\n\t},\r\n\r\n\trowAdd: function(action){\r\n\t\taction.component.deleteActual();\r\n\t},\r\n\r\n\trowDelete: function(action){\r\n\t\tvar newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index);\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tthis.table.modules.groupRows.updateGroupRows(true);\r\n\t\t}\r\n\r\n\t\tthis._rebindRow(action.component, newRow);\r\n\t},\r\n\r\n\trowMove: function(action){\r\n\t\tthis.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posFrom], !action.data.after);\r\n\t\tthis.table.rowManager.redraw();\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\nimport Row from '../../core/row/Row.js';\r\nimport Cell from '../../core/cell/Cell.js';\r\n\r\nimport defaultUndoers from './defaults/undoers.js';\r\nimport defaultRedoers from './defaults/redoers.js';\r\n\r\nclass History extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.history = [];\r\n\t\tthis.index = -1;\r\n\r\n\t\tthis.registerTableOption(\"history\", false); //enable edit history\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.history){\r\n\t\t\tthis.subscribe(\"cell-value-updated\", this.cellUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"cell-delete\", this.clearComponentHistory.bind(this));\r\n\t\t\tthis.subscribe(\"row-delete\", this.rowDeleted.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.clear.bind(this));\r\n\t\t\tthis.subscribe(\"row-added\", this.rowAdded.bind(this));\r\n\t\t\tthis.subscribe(\"row-move\", this.rowMoved.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"undo\", this.undo.bind(this));\r\n\t\tthis.registerTableFunction(\"redo\", this.redo.bind(this));\r\n\t\tthis.registerTableFunction(\"getHistoryUndoSize\", this.getHistoryUndoSize.bind(this));\r\n\t\tthis.registerTableFunction(\"getHistoryRedoSize\", this.getHistoryRedoSize.bind(this));\r\n\t\tthis.registerTableFunction(\"clearHistory\", this.clear.bind(this));\r\n\t}\r\n\r\n\trowMoved(from, to, after){\r\n\t\tthis.action(\"rowMove\", from, {posFrom:this.table.rowManager.getRowPosition(from), posTo:this.table.rowManager.getRowPosition(to), to:to, after:after});\r\n\t}\r\n\r\n\trowAdded(row, data, pos, index){\r\n\t\tthis.action(\"rowAdd\", row, {data:data, pos:pos, index:index});\r\n\t}\r\n\r\n\trowDeleted(row){\r\n\t\tvar index, rows;\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\r\n\t\t\trows = row.getComponent().getGroup().rows\r\n\t\t\tindex = rows.indexOf(row);\r\n\r\n\t\t\tif(index){\r\n\t\t\t\tindex = rows[index-1];\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tindex = row.table.rowManager.getRowIndex(row);\r\n\r\n\t\t\tif(index){\r\n\t\t\t\tindex = row.table.rowManager.rows[index-1];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.action(\"rowDelete\", row, {data:row.getData(), pos:!index, index:index});\r\n\t}\r\n\r\n\tcellUpdated(cell){\r\n\t\tthis.action(\"cellEdit\", cell, {oldValue:cell.oldValue, newValue:cell.value});\r\n\t}\r\n\r\n\tclear(){\r\n\t\tthis.history = [];\r\n\t\tthis.index = -1;\r\n\t}\r\n\r\n\taction(type, component, data){\r\n\t\tthis.history = this.history.slice(0, this.index + 1);\r\n\r\n\t\tthis.history.push({\r\n\t\t\ttype:type,\r\n\t\t\tcomponent:component,\r\n\t\t\tdata:data,\r\n\t\t});\r\n\r\n\t\tthis.index ++;\r\n\t}\r\n\r\n\tgetHistoryUndoSize(){\r\n\t\treturn this.index + 1;\r\n\t}\r\n\r\n\tgetHistoryRedoSize(){\r\n\t\treturn this.history.length - (this.index + 1);\r\n\t}\r\n\r\n\tclearComponentHistory(component){\r\n\t\tvar index = this.history.findIndex(function(item){\r\n\t\t\treturn item.component === component;\r\n\t\t});\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.history.splice(index, 1);\r\n\t\t\tif(index <= this.index){\r\n\t\t\t\tthis.index--;\r\n\t\t\t}\r\n\r\n\t\t\tthis.clearComponentHistory(component);\r\n\t\t}\r\n\t}\r\n\r\n\tundo(){\r\n\t\tif(this.index > -1){\r\n\t\t\tlet action = this.history[this.index];\r\n\r\n\t\t\tHistory.undoers[action.type].call(this, action);\r\n\r\n\t\t\tthis.index--;\r\n\r\n\t\t\tthis.dispatchExternal(\"historyUndo\", action.type, action.component.getComponent(), action.data);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"History Undo Error - No more history to undo\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tredo(){\r\n\t\tif(this.history.length-1 > this.index){\r\n\r\n\t\t\tthis.index++;\r\n\r\n\t\t\tlet action = this.history[this.index];\r\n\r\n\t\t\tHistory.redoers[action.type].call(this, action);\r\n\r\n\t\t\tthis.dispatchExternal(\"historyRedo\", action.type, action.component.getComponent(), action.data);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"History Redo Error - No more history to redo\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//rebind rows to new element after deletion\r\n\t_rebindRow(oldRow, newRow){\r\n\t\tthis.history.forEach(function(action){\r\n\t\t\tif(action.component instanceof Row){\r\n\t\t\t\tif(action.component === oldRow){\r\n\t\t\t\t\taction.component = newRow;\r\n\t\t\t\t}\r\n\t\t\t}else if(action.component instanceof Cell){\r\n\t\t\t\tif(action.component.row === oldRow){\r\n\t\t\t\t\tvar field = action.component.column.getField();\r\n\r\n\t\t\t\t\tif(field){\r\n\t\t\t\t\t\taction.component = newRow.getCell(field);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}\r\n\r\nHistory.moduleName = \"history\";\r\n\r\n//load defaults\r\nHistory.undoers = defaultUndoers;\r\nHistory.redoers = defaultRedoers;\r\n\r\nexport default History;","import Module from '../../core/Module.js';\r\nimport Column from '../../core/column/Column.js';\r\n\r\nclass HtmlTableImport extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.fieldIndex = [];\r\n\t\tthis.hasIndex = false;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.tableElementCheck();\r\n\t}\r\n\r\n\ttableElementCheck(){\r\n\t\tif(this.table.originalElement && this.table.originalElement.tagName === \"TABLE\"){\r\n\t\t\tthis.parseTable();\r\n\t\t}\r\n\t}\r\n\r\n\tparseTable(){\r\n\t\tvar element = this.table.originalElement,\r\n\t\toptions = this.table.options,\r\n\t\tcolumns = options.columns,\r\n\t\theaders = element.getElementsByTagName(\"th\"),\r\n\t\trows = element.getElementsByTagName(\"tbody\")[0],\r\n\t\tdata = [],\r\n\t\tnewTable;\r\n\r\n\t\tthis.hasIndex = false;\r\n\r\n\t\tthis.dispatchExternal(\"htmlImporting\");\r\n\r\n\t\trows = rows ? rows.getElementsByTagName(\"tr\") : [];\r\n\r\n\t\t//check for Tabulator inline options\r\n\t\tthis._extractOptions(element, options);\r\n\r\n\t\tif(headers.length){\r\n\t\t\tthis._extractHeaders(headers, rows);\r\n\t\t}else{\r\n\t\t\tthis._generateBlankHeaders(headers, rows);\r\n\t\t}\r\n\r\n\t\t//iterate through table rows and build data set\r\n\t\tfor(var index = 0; index < rows.length; index++){\r\n\t\t\tvar row = rows[index],\r\n\t\t\tcells = row.getElementsByTagName(\"td\"),\r\n\t\t\titem = {};\r\n\r\n\t\t\t//create index if the dont exist in table\r\n\t\t\tif(!this.hasIndex){\r\n\t\t\t\titem[options.index] = index;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\tvar cell = cells[i];\r\n\t\t\t\tif(typeof this.fieldIndex[i] !== \"undefined\"){\r\n\t\t\t\t\titem[this.fieldIndex[i]] = cell.innerHTML;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//add row data to item\r\n\t\t\tdata.push(item);\r\n\t\t}\r\n\r\n\t\toptions.data = data;\r\n\r\n\t\tthis.dispatchExternal(\"htmlImported\");\r\n\t}\r\n\r\n\t//extract tabulator attribute options\r\n\t_extractOptions(element, options, defaultOptions){\r\n\t\tvar attributes = element.attributes;\r\n\t\tvar optionsArr = defaultOptions ? Object.keys(defaultOptions) : Object.keys(options);\r\n\t\tvar optionsList = {};\r\n\r\n\t\toptionsArr.forEach((item) => {\r\n\t\t\toptionsList[item.toLowerCase()] = item;\r\n\t\t});\r\n\r\n\t\tfor(var index in attributes){\r\n\t\t\tvar attrib = attributes[index];\r\n\t\t\tvar name;\r\n\r\n\t\t\tif(attrib && typeof attrib == \"object\" && attrib.name && attrib.name.indexOf(\"tabulator-\") === 0){\r\n\t\t\t\tname = attrib.name.replace(\"tabulator-\", \"\");\r\n\r\n\t\t\t\tif(typeof optionsList[name] !== \"undefined\"){\r\n\t\t\t\t\toptions[optionsList[name]] = this._attribValue(attrib.value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//get value of attribute\r\n\t_attribValue(value){\r\n\t\tif(value === \"true\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif(value === \"false\"){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\t//find column if it has already been defined\r\n\t_findCol(title){\r\n\t\tvar match = this.table.options.columns.find((column) => {\r\n\t\t\treturn column.title === title;\r\n\t\t});\r\n\r\n\t\treturn match || false;\r\n\t}\r\n\r\n\t//extract column from headers\r\n\t_extractHeaders(headers, rows){\r\n\t\tfor(var index = 0; index < headers.length; index++){\r\n\t\t\tvar header = headers[index],\r\n\t\t\texists = false,\r\n\t\t\tcol = this._findCol(header.textContent),\r\n\t\t\twidth, attributes;\r\n\r\n\t\t\tif(col){\r\n\t\t\t\texists = true;\r\n\t\t\t}else{\r\n\t\t\t\tcol = {title:header.textContent.trim()};\r\n\t\t\t}\r\n\r\n\t\t\tif(!col.field) {\r\n\t\t\t\tcol.field = header.textContent.trim().toLowerCase().replace(\" \", \"_\");\r\n\t\t\t}\r\n\r\n\t\t\twidth = header.getAttribute(\"width\");\r\n\r\n\t\t\tif(width && !col.width)\t{\r\n\t\t\t\tcol.width = width;\r\n\t\t\t}\r\n\r\n\t\t\t//check for Tabulator inline options\r\n\t\t\tthis._extractOptions(header, col, this.table.columnManager.optionsList.registeredDefaults);\r\n\r\n\t\t\tthis.fieldIndex[index] = col.field;\r\n\r\n\t\t\tif(col.field == this.table.options.index){\r\n\t\t\t\tthis.hasIndex = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(!exists){\r\n\t\t\t\tthis.table.options.columns.push(col);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\r\n\t//generate blank headers\r\n\t_generateBlankHeaders(headers, rows){\r\n\t\tfor(var index = 0; index < headers.length; index++){\r\n\t\t\tvar header = headers[index],\r\n\t\t\tcol = {title:\"\", field:\"col\" + index};\r\n\r\n\t\t\tthis.fieldIndex[index] = col.field;\r\n\r\n\t\t\tvar width = header.getAttribute(\"width\");\r\n\r\n\t\t\tif(width){\r\n\t\t\t\tcol.width = width;\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.options.columns.push(col);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nHtmlTableImport.moduleName = \"htmlTableImport\";\r\n\r\nexport default HtmlTableImport;","export default {\r\n\tcellEdit: function(action){\r\n\t\taction.component.setValueProcessData(action.data.newValue);\r\n\t\taction.component.cellRendered();\r\n\t},\r\n\r\n\trowAdd: function(action){\r\n\t\tvar newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index);\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tthis.table.modules.groupRows.updateGroupRows(true);\r\n\t\t}\r\n\r\n\t\tthis._rebindRow(action.component, newRow);\r\n\t},\r\n\r\n\trowDelete:function(action){\r\n\t\taction.component.deleteActual();\r\n\t},\r\n\r\n\trowMove: function(action){\r\n\t\tthis.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posTo], action.data.after);\r\n\t\tthis.table.rowManager.redraw();\r\n\t},\r\n};","function csvImporter(input){\r\n var data = [],\r\n row = 0, \r\n col = 0,\r\n inQuote = false;\r\n \r\n //Iterate over each character\r\n for (let index = 0; index < input.length; index++) {\r\n let char = input[index], \r\n nextChar = input[index+1]; \r\n \r\n //Initialize empty row\r\n if(!data[row]){\r\n data[row] = [];\r\n }\r\n\r\n //Initialize empty column\r\n if(!data[row][col]){\r\n data[row][col] = \"\";\r\n }\r\n \r\n //Handle quotation mark inside string\r\n if (char == '\"' && inQuote && nextChar == '\"') { \r\n data[row][col] += char; \r\n index++;\r\n continue; \r\n }\r\n \r\n //Begin / End Quote\r\n if (char == '\"') { \r\n inQuote = !inQuote;\r\n continue;\r\n }\r\n \r\n //Next column (if not in quote)\r\n if (char == ',' && !inQuote) { \r\n col++;\r\n continue; \r\n }\r\n \r\n //New row if new line and not in quote (CRLF) \r\n if (char == '\\r' && nextChar == '\\n' && !inQuote) { \r\n col = 0; \r\n row++; \r\n index++; \r\n continue; \r\n }\r\n \r\n //New row if new line and not in quote (CR or LF) \r\n if ((char == '\\r' || char == '\\n') && !inQuote) { \r\n col = 0;\r\n row++;\r\n continue; \r\n }\r\n\r\n //Normal Character, append to column\r\n data[row][col] += char;\r\n }\r\n\r\n return data;\r\n}\r\n\r\nexport default csvImporter;","import Module from '../../core/Module.js';\r\n\r\nimport defaultImporters from './defaults/importers.js';\r\n\r\nclass Import extends Module{\r\n \r\n constructor(table){\r\n super(table);\r\n \r\n this.registerTableOption(\"importFormat\");\r\n this.registerTableOption(\"importReader\", \"text\");\r\n }\r\n \r\n initialize(){\r\n this.registerTableFunction(\"import\", this.importFromFile.bind(this));\r\n\r\n if(this.table.options.importFormat){\r\n this.subscribe(\"data-loading\", this.loadDataCheck.bind(this), 10);\r\n this.subscribe(\"data-load\", this.loadData.bind(this), 10);\r\n }\r\n }\r\n\r\n loadDataCheck(data){\r\n return typeof data === \"string\";\r\n }\r\n\r\n loadData(data, params, config, silent, previousData){\r\n return this.importData(this.lookupImporter(), data)\r\n .then(this.structureData.bind(this))\r\n .catch((err) => {\r\n console.error(\"Import Error:\", err || \"Unable to import data\")\r\n return Promise.reject(err);\r\n })\r\n }\r\n\r\n lookupImporter(importFormat){\r\n var importer;\r\n \r\n if(!importFormat){\r\n importFormat = this.table.options.importFormat;\r\n }\r\n \r\n if(typeof importFormat === \"string\"){\r\n importer = Import.importers[importFormat];\r\n }else{\r\n importer = importFormat;\r\n }\r\n\r\n if(!importer){\r\n console.error(\"Import Error - Importer not found:\", importFormat);\r\n }\r\n \r\n return importer;\r\n }\r\n \r\n importFromFile(importFormat, extension){\r\n var importer = this.lookupImporter(importFormat);\r\n \r\n if(importer){\r\n return this.pickFile(extension)\r\n .then(this.importData.bind(this, importer))\r\n .then(this.structureData.bind(this))\r\n .then(this.setData.bind(this))\r\n .catch((err) => {\r\n console.error(\"Import Error:\", err || \"Unable to import file\")\r\n return Promise.reject(err);\r\n })\r\n }\r\n }\r\n \r\n pickFile(extensions){\r\n return new Promise((resolve, reject) => {\r\n var input = document.createElement(\"input\");\r\n input.type = \"file\";\r\n input.accept = extensions;\r\n \r\n input.addEventListener(\"change\", (e) => {\r\n var file = input.files[0],\r\n reader = new FileReader(),\r\n data;\r\n \r\n switch(this.table.options.importReader){\r\n case \"buffer\":\r\n reader.readAsArrayBuffer(file);\r\n break;\r\n\r\n case \"binary\":\r\n reader.readAsBinaryString(file);\r\n break;\r\n\r\n case \"url\":\r\n reader.readAsDataURL(file);\r\n break;\r\n\r\n case \"text\":\r\n default:\r\n reader.readAsText(file);\r\n }\r\n \r\n reader.onload = (e) => {\r\n resolve(reader.result)\r\n };\r\n \r\n reader.onerror = (e) => {\r\n console.warn(\"File Load Error - Unable to read file\");\r\n reject();\r\n };\r\n });\r\n \r\n input.click();\r\n });\r\n }\r\n \r\n importData(importer, fileContents){\r\n var data = importer.call(this.table, fileContents);\r\n \r\n if(data instanceof Promise){\r\n return data;\r\n }else{\r\n return data ? Promise.resolve(data) : Promise.reject();\r\n }\r\n }\r\n\r\n structureData(parsedData){\r\n var data = [];\r\n \r\n if(Array.isArray(parsedData) && parsedData.length && Array.isArray(parsedData[0])){\r\n if(this.table.options.autoColumns){\r\n data = this.structureArrayToObject(parsedData);\r\n }else{\r\n data = this.structureArrayToColumns(parsedData);\r\n }\r\n\r\n return data;\r\n }else{\r\n return parsedData;\r\n }\r\n }\r\n\r\n structureArrayToObject(parsedData){\r\n var columns = parsedData.shift();\r\n\r\n var data = parsedData.map((values) => {\r\n var row = {};\r\n\r\n columns.forEach((key, i) => {\r\n row[key] = values[i];\r\n })\r\n\r\n return row;\r\n })\r\n\r\n return data;\r\n }\r\n\r\n structureArrayToColumns(parsedData){\r\n var data = [],\r\n columns = this.table.getColumns();\r\n\r\n //remove first row if it is the column names\r\n if(columns[0] && parsedData[0][0]){\r\n if(columns[0].getDefinition().title === parsedData[0][0]){\r\n parsedData.shift();\r\n }\r\n }\r\n \r\n //convert row arrays to objects\r\n parsedData.forEach((rowData) => {\r\n var row = {};\r\n\r\n rowData.forEach((value, index) => {\r\n var column = columns[index];\r\n\r\n if(column){\r\n row[column.getField()] = value;\r\n }\r\n })\r\n\r\n data.push(row);\r\n });\r\n\r\n return data;\r\n }\r\n \r\n setData(data){\r\n return this.table.setData(data);\r\n }\r\n}\r\n\r\nImport.moduleName = \"import\";\r\n\r\n//load defaults\r\nImport.importers = defaultImporters;\r\n\r\nexport default Import;","export default function(input){\r\n try {\r\n return JSON.parse(input);\r\n } catch(e) {\r\n console.warn(\"JSON Import Error - File contents is invalid JSON\", e);\r\n return Promise.reject();\r\n }\r\n}","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport Cell from '../../core/cell/Cell';\r\nimport Column from '../../core/column/Column';\r\n\r\nclass Interaction extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.eventMap = {\r\n\t\t\t//row events\r\n\t\t\trowClick:\"row-click\",\r\n\t\t\trowDblClick:\"row-dblclick\",\r\n\t\t\trowContext:\"row-contextmenu\",\r\n\t\t\trowMouseEnter:\"row-mouseenter\",\r\n\t\t\trowMouseLeave:\"row-mouseleave\",\r\n\t\t\trowMouseOver:\"row-mouseover\",\r\n\t\t\trowMouseOut:\"row-mouseout\",\r\n\t\t\trowMouseMove:\"row-mousemove\",\r\n\t\t\trowTap:\"row\",\r\n\t\t\trowDblTap:\"row\",\r\n\t\t\trowTapHold:\"row\",\r\n\r\n\t\t\t//cell events\r\n\t\t\tcellClick:\"cell-click\",\r\n\t\t\tcellDblClick:\"cell-dblclick\",\r\n\t\t\tcellContext:\"cell-contextmenu\",\r\n\t\t\tcellMouseEnter:\"cell-mouseenter\",\r\n\t\t\tcellMouseLeave:\"cell-mouseleave\",\r\n\t\t\tcellMouseOver:\"cell-mouseover\",\r\n\t\t\tcellMouseOut:\"cell-mouseout\",\r\n\t\t\tcellMouseMove:\"cell-mousemove\",\r\n\t\t\tcellTap:\"cell\",\r\n\t\t\tcellDblTap:\"cell\",\r\n\t\t\tcellTapHold:\"cell\",\r\n\r\n\t\t\t//column header events\r\n\t\t\theaderClick:\"column-click\",\r\n\t\t\theaderDblClick:\"column-dblclick\",\r\n\t\t\theaderContext:\"column-contextmenu\",\r\n\t\t\theaderMouseEnter:\"column-mouseenter\",\r\n\t\t\theaderMouseLeave:\"column-mouseleave\",\r\n\t\t\theaderMouseOver:\"column-mouseover\",\r\n\t\t\theaderMouseOut:\"column-mouseout\",\r\n\t\t\theaderMouseMove:\"column-mousemove\",\r\n\t\t\theaderTap:\"column\",\r\n\t\t\theaderDblTap:\"column\",\r\n\t\t\theaderTapHold:\"column\",\r\n\r\n\t\t\t//group header\r\n\t\t\tgroupClick:\"group-click\",\r\n\t\t\tgroupDblClick:\"group-dblclick\",\r\n\t\t\tgroupContext:\"group-contextmenu\",\r\n\t\t\tgroupMouseEnter:\"group-mouseenter\",\r\n\t\t\tgroupMouseLeave:\"group-mouseleave\",\r\n\t\t\tgroupMouseOver:\"group-mouseover\",\r\n\t\t\tgroupMouseOut:\"group-mouseout\",\r\n\t\t\tgroupMouseMove:\"group-mousemove\",\r\n\t\t\tgroupTap:\"group\",\r\n\t\t\tgroupDblTap:\"group\",\r\n\t\t\tgroupTapHold:\"group\",\r\n\t\t}\r\n\r\n\t\tthis.subscribers = {};\r\n\r\n\t\tthis.touchSubscribers = {};\r\n\r\n\t\tthis.columnSubscribers = {};\r\n\r\n\t\tthis.touchWatchers = {\r\n\t\t\trow:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tcell:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tcolumn:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tgroup:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.registerColumnOption(\"headerClick\");\r\n\t\tthis.registerColumnOption(\"headerDblClick\");\r\n\t\tthis.registerColumnOption(\"headerContext\");\r\n\t\tthis.registerColumnOption(\"headerMouseEnter\");\r\n\t\tthis.registerColumnOption(\"headerMouseLeave\");\r\n\t\tthis.registerColumnOption(\"headerMouseOver\");\r\n\t\tthis.registerColumnOption(\"headerMouseOut\");\r\n\t\tthis.registerColumnOption(\"headerMouseMove\");\r\n\t\tthis.registerColumnOption(\"headerTap\");\r\n\t\tthis.registerColumnOption(\"headerDblTap\");\r\n\t\tthis.registerColumnOption(\"headerTapHold\");\r\n\r\n\t\tthis.registerColumnOption(\"cellClick\");\r\n\t\tthis.registerColumnOption(\"cellDblClick\");\r\n\t\tthis.registerColumnOption(\"cellContext\");\r\n\t\tthis.registerColumnOption(\"cellMouseEnter\");\r\n\t\tthis.registerColumnOption(\"cellMouseLeave\");\r\n\t\tthis.registerColumnOption(\"cellMouseOver\");\r\n\t\tthis.registerColumnOption(\"cellMouseOut\");\r\n\t\tthis.registerColumnOption(\"cellMouseMove\");\r\n\t\tthis.registerColumnOption(\"cellTap\");\r\n\t\tthis.registerColumnOption(\"cellDblTap\");\r\n\t\tthis.registerColumnOption(\"cellTapHold\");\r\n\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeExternalEvents();\r\n\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this))\r\n\t\tthis.subscribe(\"cell-dblclick\", this.cellContentsSelectionFixer.bind(this))\r\n\t}\r\n\r\n\tcellContentsSelectionFixer(e, cell){\r\n\t\tif(this.table.modExists(\"edit\")){\r\n\t\t\tif (this.table.modules.edit.currentCell === this){\r\n\t\t\t\treturn; //prevent instant selection of editor content\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\ttry{\r\n\t\t\tif (document.selection) { // IE\r\n\t\t\t\tvar range = document.body.createTextRange();\r\n\t\t\t\trange.moveToElementText(this.element);\r\n\t\t\t\trange.select();\r\n\t\t\t} else if (window.getSelection) {\r\n\t\t\t\tvar range = document.createRange();\r\n\t\t\t\trange.selectNode(this.element);\r\n\t\t\t\twindow.getSelection().removeAllRanges();\r\n\t\t\t\twindow.getSelection().addRange(range);\r\n\t\t\t}\r\n\t\t}catch(e){}\r\n\t}\r\n\r\n\tinitializeExternalEvents(){\r\n\t\tfor(let key in this.eventMap){\r\n\t\t\tthis.subscriptionChangeExternal(key, this.subscriptionChanged.bind(this, key))\r\n\t\t}\r\n\t}\r\n\r\n\tsubscriptionChanged(key, added){\r\n\t\tvar index;\r\n\r\n\t\tif(added){\r\n\t\t\tif(!this.subscribers[key]){\r\n\t\t\t\tif(this.eventMap[key].includes(\"-\")){\r\n\t\t\t\t\tthis.subscribers[key] = this.handle.bind(this, key);\r\n\t\t\t\t\tthis.subscribe(this.eventMap[key], this.subscribers[key]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.subscribeTouchEvents(key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.eventMap[key].includes(\"-\")){\r\n\t\t\t\tif(this.subscribers[key] && !this.columnSubscribers[key] && !this.subscribedExternal(key)){\r\n\t\t\t\t\tthis.unsubscribe(this.eventMap[key], this.subscribers[key]);\r\n\t\t\t\t\tdelete this.subscribers[key];\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.unsubscribeTouchEvents(key);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tsubscribeTouchEvents(key){\r\n\t\tvar type = this.eventMap[key];\r\n\r\n\t\tif(!this.touchSubscribers[type + \"-touchstart\"]){\r\n\t\t\tthis.touchSubscribers[type + \"-touchstart\"] = this.handleTouch.bind(this, type, \"start\");\r\n\t\t\tthis.touchSubscribers[type + \"-touchend\"] = this.handleTouch.bind(this, type, \"end\");\r\n\r\n\t\t\tthis.subscribe(type + \"-touchstart\", this.touchSubscribers[type + \"-touchstart\"]);\r\n\t\t\tthis.subscribe(type + \"-touchend\", this.touchSubscribers[type + \"-touchend\"]);\r\n\t\t}\r\n\r\n\t\tthis.subscribers[key] = true;\r\n\t}\r\n\r\n\tunsubscribeTouchEvents(key){\r\n\t\tvar notouch = true,\r\n\t\ttype = this.eventMap[key];\r\n\r\n\t\tif(this.subscribers[key] && !this.subscribedExternal(key)){\r\n\t\t\tdelete this.subscribers[key];\r\n\r\n\t\t\tfor(let i in this.eventMap){\r\n\t\t\t\tif(this.eventMap[i] === type){\r\n\t\t\t\t\tif(this.subscribers[i]){\r\n\t\t\t\t\t\tnotouch = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(notouch){\r\n\t\t\t\tthis.unsubscribe(type + \"-touchstart\", this.touchSubscribers[type + \"-touchstart\"]);\r\n\t\t\t\tthis.unsubscribe(type + \"-touchend\", this.touchSubscribers[type + \"-touchend\"]);\r\n\r\n\t\t\t\tdelete this.touchSubscribers[type + \"-touchstart\"];\r\n\t\t\t\tdelete this.touchSubscribers[type + \"-touchend\"];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition;\r\n\r\n\t\tfor(let key in this.eventMap){\r\n\t\t\tif(def[key]){\r\n\t\t\t\tthis.subscriptionChanged(key, true);\r\n\r\n\t\t\t\tif(!this.columnSubscribers[key]){\r\n\t\t\t\t\tthis.columnSubscribers[key] = [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.columnSubscribers[key].push(column);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\thandle(action, e, component){\r\n\t\tthis.dispatchEvent(action, e, component);\r\n\t}\r\n\r\n\thandleTouch(type, action, e, component){\r\n\t\tvar watchers = this.touchWatchers[type];\r\n\r\n\t\tif(type === \"column\"){\r\n\t\t\ttype = \"header\";\r\n\t\t}\r\n\r\n\t\tswitch(action){\r\n\t\t\tcase \"start\":\r\n\t\t\twatchers.tap = true;\r\n\r\n\t\t\tclearTimeout(watchers.tapHold);\r\n\r\n\t\t\twatchers.tapHold = setTimeout(() => {\r\n\t\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\t\twatchers.tapHold = null;\r\n\r\n\t\t\t\twatchers.tap = null;\r\n\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\tthis.dispatchEvent(type + \"TapHold\", e, component);\r\n\t\t\t}, 1000);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"end\":\r\n\t\t\tif(watchers.tap){\r\n\r\n\t\t\t\twatchers.tap = null;\r\n\t\t\t\tthis.dispatchEvent(type + \"Tap\", e, component);\r\n\t\t\t}\r\n\r\n\t\t\tif(watchers.tapDbl){\r\n\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\tthis.dispatchEvent(type + \"DblTap\", e, component);\r\n\t\t\t}else{\r\n\t\t\t\twatchers.tapDbl = setTimeout(() => {\r\n\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\twatchers.tapDbl = null;\r\n\t\t\t\t}, 300);\r\n\t\t\t}\r\n\r\n\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\twatchers.tapHold = null;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tdispatchEvent(action, e, component){\r\n\t\tvar componentObj = component.getComponent(),\r\n\t\tcallback;\r\n\r\n\t\tif(this.columnSubscribers[action]){\r\n\r\n\t\t\tif(component instanceof Cell){\r\n\t\t\t\tcallback = component.column.definition[action];\r\n\t\t\t}else if(component instanceof Column){\r\n\t\t\t\tcallback = component.definition[action];\r\n\t\t\t}\r\n\r\n\t\t\tif(callback){\r\n\t\t\t\tcallback(e, componentObj);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.dispatchExternal(action, e, componentObj);\r\n\t}\r\n}\r\n\r\nInteraction.moduleName = \"interaction\";\r\n\r\nexport default Interaction;","export default {\r\n\tnavPrev:\"shift + 9\",\r\n\tnavNext:9,\r\n\tnavUp:38,\r\n\tnavDown:40,\r\n\tscrollPageUp:33,\r\n\tscrollPageDown:34,\r\n\tscrollToStart:36,\r\n\tscrollToEnd:35,\r\n\tundo:[\"ctrl + 90\", \"meta + 90\"],\r\n\tredo:[\"ctrl + 89\", \"meta + 89\"],\r\n\tcopyToClipboard:[\"ctrl + 67\", \"meta + 89\"],\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultBindings from './defaults/bindings.js';\r\nimport defaultActions from './defaults/actions.js';\r\n\r\nclass Keybindings extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.watchKeys = null;\r\n\t\tthis.pressedKeys = null;\r\n\t\tthis.keyupBinding = false;\r\n\t\tthis.keydownBinding = false;\r\n\r\n\t\tthis.registerTableOption(\"keybindings\", {}); //array for keybindings\r\n\t\tthis.registerTableOption(\"tabEndNewRow\", false); //create new row when tab to end of table\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tvar bindings = this.table.options.keybindings,\r\n\t\tmergedBindings = {};\r\n\r\n\t\tthis.watchKeys = {};\r\n\t\tthis.pressedKeys = [];\r\n\r\n\t\tif(bindings !== false){\r\n\t\t\tObject.assign(mergedBindings, Keybindings.bindings)\r\n\t\t\tObject.assign(mergedBindings, bindings)\r\n\r\n\t\t\tthis.mapBindings(mergedBindings);\r\n\t\t\tthis.bindEvents();\r\n\t\t}\r\n\r\n\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\r\n\t}\r\n\r\n\tmapBindings(bindings){\r\n\t\tfor(let key in bindings){\r\n\t\t\tif(Keybindings.actions[key]){\r\n\t\t\t\tif(bindings[key]){\r\n\t\t\t\t\tif(typeof bindings[key] !== \"object\"){\r\n\t\t\t\t\t\tbindings[key] = [bindings[key]];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbindings[key].forEach((binding) => {\r\n\t\t\t\t\t\tvar bindingList = Array.isArray(binding) ? binding : [binding];\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tbindingList.forEach((item) => {\r\n\t\t\t\t\t\t\tthis.mapBinding(key, item);\r\n\t\t\t\t\t\t});\t\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Key Binding Error - no such action:\", key);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmapBinding(action, symbolsList){\r\n\t\tvar binding = {\r\n\t\t\taction: Keybindings.actions[action],\r\n\t\t\tkeys: [],\r\n\t\t\tctrl: false,\r\n\t\t\tshift: false,\r\n\t\t\tmeta: false,\r\n\t\t};\r\n\r\n\t\tvar symbols = symbolsList.toString().toLowerCase().split(\" \").join(\"\").split(\"+\");\r\n\r\n\t\tsymbols.forEach((symbol) => {\r\n\t\t\tswitch(symbol){\r\n\t\t\t\tcase \"ctrl\":\r\n\t\t\t\tbinding.ctrl = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"shift\":\r\n\t\t\t\tbinding.shift = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"meta\":\r\n\t\t\t\tbinding.meta = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tsymbol = isNaN(symbol) ? symbol.toUpperCase().charCodeAt(0) : parseInt(symbol);\r\n\t\t\t\tbinding.keys.push(symbol);\r\n\r\n\t\t\t\tif(!this.watchKeys[symbol]){\r\n\t\t\t\t\tthis.watchKeys[symbol] = [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.watchKeys[symbol].push(binding);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tbindEvents(){\r\n\t\tvar self = this;\r\n\r\n\t\tthis.keyupBinding = function(e){\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tvar bindings = self.watchKeys[code];\r\n\r\n\t\t\tif(bindings){\r\n\r\n\t\t\t\tself.pressedKeys.push(code);\r\n\r\n\t\t\t\tbindings.forEach(function(binding){\r\n\t\t\t\t\tself.checkBinding(e, binding);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.keydownBinding = function(e){\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tvar bindings = self.watchKeys[code];\r\n\r\n\t\t\tif(bindings){\r\n\r\n\t\t\t\tvar index = self.pressedKeys.indexOf(code);\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tself.pressedKeys.splice(index, 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.table.element.addEventListener(\"keydown\", this.keyupBinding);\r\n\r\n\t\tthis.table.element.addEventListener(\"keyup\", this.keydownBinding);\r\n\t}\r\n\r\n\tclearBindings(){\r\n\t\tif(this.keyupBinding){\r\n\t\t\tthis.table.element.removeEventListener(\"keydown\", this.keyupBinding);\r\n\t\t}\r\n\r\n\t\tif(this.keydownBinding){\r\n\t\t\tthis.table.element.removeEventListener(\"keyup\", this.keydownBinding);\r\n\t\t}\r\n\t}\r\n\r\n\tcheckBinding(e, binding){\r\n\t\tvar match = true;\r\n\r\n\t\tif(e.ctrlKey == binding.ctrl && e.shiftKey == binding.shift && e.metaKey == binding.meta){\r\n\t\t\tbinding.keys.forEach((key) => {\r\n\t\t\t\tvar index = this.pressedKeys.indexOf(key);\r\n\r\n\t\t\t\tif(index == -1){\r\n\t\t\t\t\tmatch = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tbinding.action.call(this, e);\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nKeybindings.moduleName = \"keybindings\";\r\n\r\n//load defaults\r\nKeybindings.bindings = defaultBindings;\r\nKeybindings.actions = defaultActions;\r\n\r\nexport default Keybindings;","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass Menu extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.menuContainer = null;\r\n\t\tthis.menuElements = [];\r\n\t\tthis.blurEvent = this.hideMenu.bind(this);\r\n\t\tthis.escEvent = this.escMenu.bind(this);\r\n\t\tthis.nestedMenuBlock = false;\r\n\t\tthis.positionReversedX = false;\r\n\t\t\r\n\t\tthis.currentComponent = null;\r\n\t\t\r\n\t\tthis.columnSubscribers = {};\r\n\t\t\r\n\t\tthis.registerTableOption(\"rowContextMenu\", false);\r\n\t\tthis.registerTableOption(\"rowClickMenu\", false);\r\n\t\tthis.registerTableOption(\"groupContextMenu\", false);\r\n\t\tthis.registerTableOption(\"groupClickMenu\", false);\r\n\t\tthis.registerTableOption(\"menuContainer\", false);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"headerContextMenu\");\r\n\t\tthis.registerColumnOption(\"headerClickMenu\");\r\n\t\tthis.registerColumnOption(\"headerMenu\");\r\n\t\tthis.registerColumnOption(\"contextMenu\");\r\n\t\tthis.registerColumnOption(\"clickMenu\");\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.lookupMenuContainer();\r\n\t\t\r\n\t\tthis.initializeRowWatchers();\r\n\t\tthis.initializeGroupWatchers();\r\n\t\t\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t}\r\n\t\r\n\tlookupMenuContainer(){\r\n\t\t\r\n\t\tthis.menuContainer = this.table.options.menuContainer;\r\n\t\t\r\n\t\tif(typeof this.menuContainer === \"string\"){\r\n\t\t\tthis.menuContainer = document.querySelector(this.menuContainer);\r\n\t\t\t\r\n\t\t\tif(!this.menuContainer){\r\n\t\t\t\tconsole.warn(\"Menu Error - no container element found matching selector:\", this.table.options.menuContainer , \"(defaulting to document body)\");\r\n\t\t\t}\r\n\t\t}else if (this.menuContainer === true){\r\n\t\t\tthis.menuContainer = this.table.element;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.menuContainer && !this.checkMenuContainerIsParent(this.menuContainer)){\r\n\t\t\tthis.menuContainer = false;\r\n\t\t\tconsole.warn(\"Menu Error - container element does not contain this table:\", this.table.options.menuContainer , \"(defaulting to document body)\");\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.menuContainer){\r\n\t\t\tthis.menuContainer = document.body;\r\n\t\t}\r\n\t}\r\n\t\r\n\tcheckMenuContainerIsParent(container, element = this.table.element){\r\n\t\tif(container === element){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn element.parentNode ? this.checkMenuContainerIsParent(container, element.parentNode) : false;\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRowWatchers(){\r\n\t\tif(this.table.options.rowContextMenu){\r\n\t\t\tthis.subscribe(\"row-contextmenu\", this.loadMenuEvent.bind(this, this.table.options.rowContextMenu));\r\n\t\t\tthis.table.on(\"rowTapHold\", this.loadMenuEvent.bind(this, this.table.options.rowContextMenu));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.rowClickMenu){\r\n\t\t\tthis.subscribe(\"row-click\", this.loadMenuEvent.bind(this, this.table.options.rowClickMenu));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeGroupWatchers(){\r\n\t\tif(this.table.options.groupContextMenu){\r\n\t\t\tthis.subscribe(\"group-contextmenu\", this.loadMenuEvent.bind(this, this.table.options.groupContextMenu));\r\n\t\t\tthis.table.on(\"groupTapHold\", this.loadMenuEvent.bind(this, this.table.options.groupContextMenu));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.groupClickMenu){\r\n\t\t\tthis.subscribe(\"group-click\", this.loadMenuEvent.bind(this, this.table.options.groupClickMenu));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar options = [\"headerContextMenu\", \"headerClickMenu\"],\r\n\t\tdef = column.definition;\r\n\t\t\r\n\t\t//handle column events\r\n\t\tif(def.headerContextMenu && !this.columnSubscribers.headerContextMenu){\r\n\t\t\tthis.columnSubscribers.headerContextMenu = this.loadMenuTableColumnEvent.bind(this, \"headerContextMenu\");\r\n\t\t\tthis.subscribe(\"column-contextmenu\", this.columnSubscribers.headerContextMenu);\r\n\t\t\tthis.table.on(\"headerTapHold\", this.loadMenuTableColumnEvent.bind(this, \"headerContextMenu\"))\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerClickMenu && !this.columnSubscribers.headerClickMenu){\r\n\t\t\tthis.columnSubscribers.headerClickMenu = this.loadMenuTableColumnEvent.bind(this, \"headerClickMenu\");\r\n\t\t\tthis.subscribe(\"column-click\", this.columnSubscribers.headerClickMenu);\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerMenu){\r\n\t\t\tthis.initializeColumnHeaderMenu(column);\r\n\t\t}\r\n\t\t\r\n\t\t//handle cell events\r\n\t\tif(def.contextMenu && !this.columnSubscribers.contextMenu){\r\n\t\t\tthis.columnSubscribers.contextMenu = this.loadMenuTableCellEvent.bind(this, \"contextMenu\");\r\n\t\t\tthis.subscribe(\"cell-contextmenu\", this.columnSubscribers.contextMenu);\r\n\t\t\tthis.table.on(\"cellTapHold\", this.loadMenuTableCellEvent.bind(this, \"contextMenu\"))\r\n\t\t}\r\n\t\t\r\n\t\tif(def.clickMenu && !this.columnSubscribers.clickMenu){\r\n\t\t\tthis.columnSubscribers.clickMenu = this.loadMenuTableCellEvent.bind(this, \"clickMenu\");\r\n\t\t\tthis.subscribe(\"cell-click\", this.columnSubscribers.clickMenu);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumnHeaderMenu(column){\r\n\t\tvar headerMenuEl;\r\n\t\t\r\n\t\theaderMenuEl = document.createElement(\"span\");\r\n\t\theaderMenuEl.classList.add(\"tabulator-header-menu-button\");\r\n\t\theaderMenuEl.innerHTML = \"⋮\";\r\n\t\t\r\n\t\theaderMenuEl.addEventListener(\"click\", (e) => {\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\t\r\n\t\t\tthis.loadMenuEvent(column.definition.headerMenu, e, column);\r\n\t\t});\r\n\t\t\r\n\t\tcolumn.titleElement.insertBefore(headerMenuEl, column.titleElement.firstChild);\r\n\t}\r\n\t\r\n\tloadMenuTableCellEvent(option, e, cell){\r\n\t\tif(cell._cell){\r\n\t\t\tcell = cell._cell;\r\n\t\t}\r\n\t\t\r\n\t\tif(cell.column.definition[option]){\r\n\t\t\tthis.loadMenuEvent(cell.column.definition[option], e, cell);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadMenuTableColumnEvent(option, e, column){\r\n\t\tif(column._column){\r\n\t\t\tcolumn = column._column;\r\n\t\t}\r\n\t\t\r\n\t\tif(column.definition[option]){\r\n\t\t\tthis.loadMenuEvent(column.definition[option], e, column);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadMenuEvent(menu, e, component){\r\n\t\tif(component._group){\r\n\t\t\tcomponent = component._group;\r\n\t\t}else if(component._row){\r\n\t\t\tcomponent = component._row;\r\n\t\t}\r\n\t\t\r\n\t\tmenu = typeof menu == \"function\" ? menu.call(this.table, component.getComponent(), e) : menu;\r\n\t\t\r\n\t\tthis.loadMenu(e, component, menu);\r\n\t}\r\n\t\r\n\tloadMenu(e, component, menu, parentEl){\r\n\t\tvar touch = !(e instanceof MouseEvent);\r\n\t\t\r\n\t\tvar menuEl = document.createElement(\"div\");\r\n\t\tmenuEl.classList.add(\"tabulator-menu\");\r\n\t\t\r\n\t\tif(!touch){\r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t\t\r\n\t\t//abort if no menu set\r\n\t\tif(!menu || !menu.length){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(!parentEl){\r\n\t\t\tif(this.nestedMenuBlock){\r\n\t\t\t\t//abort if child menu already open\r\n\t\t\t\tif(this.isOpen()){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.nestedMenuBlock = setTimeout(() => {\r\n\t\t\t\t\tthis.nestedMenuBlock = false;\r\n\t\t\t\t}, 100)\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.hideMenu();\r\n\t\t\tthis.menuElements = [];\r\n\t\t}\r\n\t\t\r\n\t\tmenu.forEach((item) => {\r\n\t\t\tvar itemEl = document.createElement(\"div\"),\r\n\t\t\tlabel = item.label,\r\n\t\t\tdisabled = item.disabled;\r\n\t\t\t\r\n\t\t\tif(item.separator){\r\n\t\t\t\titemEl.classList.add(\"tabulator-menu-separator\");\r\n\t\t\t}else{\r\n\t\t\t\titemEl.classList.add(\"tabulator-menu-item\");\r\n\t\t\t\t\r\n\t\t\t\tif(typeof label == \"function\"){\r\n\t\t\t\t\tlabel = label.call(this.table, component.getComponent());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(label instanceof Node){\r\n\t\t\t\t\titemEl.appendChild(label);\r\n\t\t\t\t}else{\r\n\t\t\t\t\titemEl.innerHTML = label;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(typeof disabled == \"function\"){\r\n\t\t\t\t\tdisabled = disabled.call(this.table, component.getComponent());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(disabled){\r\n\t\t\t\t\titemEl.classList.add(\"tabulator-menu-item-disabled\");\r\n\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(item.menu && item.menu.length){\r\n\t\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\tthis.hideOldSubMenus(menuEl);\r\n\t\t\t\t\t\t\tthis.loadMenu(e, component, item.menu, itemEl);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(item.action){\r\n\t\t\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\t\t\titem.action(e, component.getComponent());\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(item.menu && item.menu.length){\r\n\t\t\t\t\titemEl.classList.add(\"tabulator-menu-item-submenu\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tmenuEl.appendChild(itemEl);\r\n\t\t});\r\n\t\t\r\n\t\tmenuEl.addEventListener(\"click\", (e) => {\r\n\t\t\tthis.hideMenu();\r\n\t\t});\r\n\t\t\r\n\t\tthis.menuElements.push(menuEl);\r\n\t\tthis.positionMenu(menuEl, parentEl, touch, e);\r\n\t\t\r\n\t\tthis.currentComponent = component\r\n\t\t\r\n\t\tthis.dispatchExternal(\"menuOpened\", component.getComponent())\r\n\t}\r\n\t\r\n\thideOldSubMenus(menuEl){\r\n\t\tvar index = this.menuElements.indexOf(menuEl);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tfor(let i = this.menuElements.length - 1; i > index; i--){\r\n\t\t\t\tvar el = this.menuElements[i];\r\n\t\t\t\t\r\n\t\t\t\tif(el.parentNode){\r\n\t\t\t\t\tel.parentNode.removeChild(el);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.menuElements.pop();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tpositionMenu(element, parentEl, touch, e){\r\n\t\tvar x, y, parentOffset;\r\n\t\t\r\n\t\tif(!parentEl){\r\n\t\t\tx = touch ? e.touches[0].pageX : e.pageX;\r\n\t\t\ty = touch ? e.touches[0].pageY : e.pageY;\r\n\t\t\t\r\n\t\t\tif(this.menuContainer !== document.body){\r\n\t\t\t\tparentOffset = Helpers.elOffset(this.menuContainer);\r\n\t\t\t\t\r\n\t\t\t\tx -= parentOffset.left;\r\n\t\t\t\ty -= parentOffset.top;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.positionReversedX = false;\r\n\t\t}else{\r\n\t\t\tparentOffset = Helpers.elOffset(parentEl);\r\n\t\t\tx = parentOffset.left + parentEl.offsetWidth;\r\n\t\t\ty = parentOffset.top - 1;\r\n\t\t}\r\n\t\t\r\n\t\telement.style.top = y + \"px\";\r\n\t\telement.style.left = x + \"px\";\r\n\t\t\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.table.rowManager.element.addEventListener(\"scroll\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"click\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"contextmenu\", this.blurEvent);\r\n\t\t\twindow.addEventListener(\"resize\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"keydown\", this.escEvent);\r\n\t\t}, 100);\r\n\t\t\r\n\t\tthis.menuContainer.appendChild(element);\r\n\t\t\r\n\t\t//move menu to start on right edge if it is too close to the edge of the screen\r\n\t\tif((x + element.offsetWidth) >= this.menuContainer.offsetWidth || this.positionReversedX){\r\n\t\t\telement.style.left = \"\";\r\n\t\t\t\r\n\t\t\tif(parentEl){\r\n\t\t\t\telement.style.right = (this.menuContainer.offsetWidth - parentOffset.left) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\telement.style.right = (this.menuContainer.offsetWidth - x) + \"px\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.positionReversedX = true;\r\n\t\t}\r\n\t\t\r\n\t\t//move menu to start on bottom edge if it is too close to the edge of the screen\r\n\t\tif((y + element.offsetHeight) > this.menuContainer.offsetHeight) {\r\n\t\t\tif(parentEl){\r\n\t\t\t\telement.style.top = (parseInt(element.style.top) - element.offsetHeight + parentEl.offsetHeight + 1) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\telement.style.top = (parseInt(element.style.top) - element.offsetHeight) + \"px\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tisOpen(){\r\n\t\treturn !!this.menuElements.length;\r\n\t}\r\n\t\r\n\tescMenu(e){\r\n\t\tif(e.keyCode == 27){\r\n\t\t\tthis.hideMenu();\r\n\t\t}\r\n\t}\r\n\t\r\n\thideMenu(){\t\r\n\t\tthis.menuElements.forEach((menuEl) => {\r\n\t\t\tif(menuEl.parentNode){\r\n\t\t\t\tmenuEl.parentNode.removeChild(menuEl);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tdocument.body.removeEventListener(\"keydown\", this.escEvent);\r\n\t\tdocument.body.removeEventListener(\"click\", this.blurEvent);\r\n\t\tdocument.body.removeEventListener(\"contextmenu\", this.blurEvent);\r\n\t\twindow.removeEventListener(\"resize\", this.blurEvent);\r\n\t\tthis.table.rowManager.element.removeEventListener(\"scroll\", this.blurEvent);\r\n\t\t\r\n\t\tif(this.currentComponent){\r\n\t\t\tthis.dispatchExternal(\"menuClosed\", this.currentComponent.getComponent());\r\n\t\t\tthis.currentComponent = null;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMenu.moduleName = \"menu\";\r\n\r\nexport default Menu;","export default {\r\n\tkeyBlock:function(e){\r\n\t\te.stopPropagation();\r\n\t\te.preventDefault();\r\n\t},\r\n\tscrollPageUp:function(e){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tnewPos = rowManager.scrollTop - rowManager.element.clientHeight,\r\n\t\tscrollMax = rowManager.element.scrollHeight;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\tif(newPos >= 0){\r\n\t\t\t\trowManager.element.scrollTop = newPos;\r\n\t\t\t}else{\r\n\t\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[0]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tscrollPageDown:function(e){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tnewPos = rowManager.scrollTop + rowManager.element.clientHeight,\r\n\t\tscrollMax = rowManager.element.scrollHeight;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\tif(newPos <= scrollMax){\r\n\t\t\t\trowManager.element.scrollTop = newPos;\r\n\t\t\t}else{\r\n\t\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\r\n\t},\r\n\tscrollToStart:function(e){\r\n\t\tvar rowManager = this.table.rowManager;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[0]);\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tscrollToEnd:function(e){\r\n\t\tvar rowManager = this.table.rowManager;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]);\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tnavPrev:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-prev\", e);\r\n\t},\r\n\r\n\tnavNext:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-next\", e);\r\n\t},\r\n\r\n\tnavLeft:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-left\", e);\r\n\t},\r\n\r\n\tnavRight:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-right\", e);\r\n\t},\r\n\r\n\tnavUp:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-up\", e);\r\n\t},\r\n\r\n\tnavDown:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-down\", e);\r\n\t},\r\n\r\n\tundo:function(e){\r\n\t\tvar cell = false;\r\n\t\tif(this.table.options.history && this.table.modExists(\"history\") && this.table.modExists(\"edit\")){\r\n\r\n\t\t\tcell = this.table.modules.edit.currentCell;\r\n\r\n\t\t\tif(!cell){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tthis.table.modules.history.undo();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tredo:function(e){\r\n\t\tvar cell = false;\r\n\t\tif(this.table.options.history && this.table.modExists(\"history\") && this.table.modExists(\"edit\")){\r\n\r\n\t\t\tcell = this.table.modules.edit.currentCell;\r\n\r\n\t\t\tif(!cell){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tthis.table.modules.history.redo();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tcopyToClipboard:function(e){\r\n\t\tif(!this.table.modules.edit.currentCell){\r\n\t\t\tif(this.table.modExists(\"clipboard\", true)){\r\n\t\t\t\tthis.table.modules.clipboard.copy(false, true);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass MoveColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.placeholderElement = this.createPlaceholderElement();\r\n\t\tthis.hoverElement = false; //floating column header element\r\n\t\tthis.checkTimeout = false; //click check timeout holder\r\n\t\tthis.checkPeriod = 250; //period to wait on mousedown to consider this a move and not a click\r\n\t\tthis.moving = false; //currently moving column\r\n\t\tthis.toCol = false; //destination column\r\n\t\tthis.toColAfter = false; //position of moving column relative to the desitnation column\r\n\t\tthis.startX = 0; //starting position within header element\r\n\t\tthis.autoScrollMargin = 40; //auto scroll on edge when within margin\r\n\t\tthis.autoScrollStep = 5; //auto scroll distance in pixels\r\n\t\tthis.autoScrollTimeout = false; //auto scroll timeout\r\n\t\tthis.touchMove = false;\r\n\t\t\r\n\t\tthis.moveHover = this.moveHover.bind(this);\r\n\t\tthis.endMove = this.endMove.bind(this);\r\n\t\t\r\n\t\tthis.registerTableOption(\"movableColumns\", false); //enable movable columns\r\n\t}\r\n\t\r\n\tcreatePlaceholderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-col\");\r\n\t\tel.classList.add(\"tabulator-col-placeholder\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.movableColumns){\r\n\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\tcolEl;\r\n\t\t\r\n\t\tif(!column.modules.frozen){\r\n\t\t\tcolEl = column.getElement();\r\n\t\t\t\r\n\t\t\tconfig.mousemove = function(e){\r\n\t\t\t\tif(column.parent === self.moving.parent){\r\n\t\t\t\t\tif((((self.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(colEl).left) + self.table.columnManager.element.scrollLeft) > (column.getWidth() / 2)){\r\n\t\t\t\t\t\tif(self.toCol !== column || !self.toColAfter){\r\n\t\t\t\t\t\t\tcolEl.parentNode.insertBefore(self.placeholderElement, colEl.nextSibling);\r\n\t\t\t\t\t\t\tself.moveColumn(column, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(self.toCol !== column || self.toColAfter){\r\n\t\t\t\t\t\t\tcolEl.parentNode.insertBefore(self.placeholderElement, colEl);\r\n\t\t\t\t\t\t\tself.moveColumn(column, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}.bind(self);\r\n\t\t\t\r\n\t\t\tcolEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tself.touchMove = false;\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, column);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tcolEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tself.bindTouchEvents(column);\r\n\t\t}\r\n\t\t\r\n\t\tcolumn.modules.moveColumn = config;\r\n\t}\r\n\t\r\n\tbindTouchEvents(column){\r\n\t\tvar colEl = column.getElement(),\r\n\t\tstartXMove = false, //shifting center position of the cell\r\n\t\tdir = false,\r\n\t\tcurrentCol, nextCol, prevCol, nextColWidth, prevColWidth, nextColWidthLast, prevColWidthLast;\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchstart\", (e) => {\r\n\t\t\tthis.checkTimeout = setTimeout(() => {\r\n\t\t\t\tthis.touchMove = true;\r\n\t\t\t\tcurrentCol = column;\r\n\t\t\t\tnextCol = column.nextColumn();\r\n\t\t\t\tnextColWidth = nextCol ? nextCol.getWidth()/2 : 0;\r\n\t\t\t\tprevCol = column.prevColumn();\r\n\t\t\t\tprevColWidth = prevCol ? prevCol.getWidth()/2 : 0;\r\n\t\t\t\tnextColWidthLast = 0;\r\n\t\t\t\tprevColWidthLast = 0;\r\n\t\t\t\tstartXMove = false;\r\n\t\t\t\t\r\n\t\t\t\tthis.startMove(e, column);\r\n\t\t\t}, this.checkPeriod);\r\n\t\t}, {passive: true});\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchmove\", (e) => {\r\n\t\t\tvar halfCol, diff, moveToCol;\r\n\t\t\t\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.moveHover(e);\r\n\t\t\t\t\r\n\t\t\t\tif(!startXMove){\r\n\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tdiff = e.touches[0].pageX - startXMove;\r\n\t\t\t\t\r\n\t\t\t\tif(diff > 0){\r\n\t\t\t\t\tif(nextCol && diff - nextColWidthLast > nextColWidth){\r\n\t\t\t\t\t\tmoveToCol = nextCol;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(moveToCol !== column){\r\n\t\t\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t\t\t\tmoveToCol.getElement().parentNode.insertBefore(this.placeholderElement, moveToCol.getElement().nextSibling);\r\n\t\t\t\t\t\t\tthis.moveColumn(moveToCol, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(prevCol && -diff - prevColWidthLast > prevColWidth){\r\n\t\t\t\t\t\tmoveToCol = prevCol;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(moveToCol !== column){\r\n\t\t\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t\t\t\tmoveToCol.getElement().parentNode.insertBefore(this.placeholderElement, moveToCol.getElement());\r\n\t\t\t\t\t\t\tthis.moveColumn(moveToCol, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(moveToCol){\r\n\t\t\t\t\tcurrentCol = moveToCol;\r\n\t\t\t\t\tnextCol = moveToCol.nextColumn();\r\n\t\t\t\t\tnextColWidthLast = nextColWidth;\r\n\t\t\t\t\tnextColWidth = nextCol ? nextCol.getWidth() / 2 : 0;\r\n\t\t\t\t\tprevCol = moveToCol.prevColumn();\r\n\t\t\t\t\tprevColWidthLast = prevColWidth;\r\n\t\t\t\t\tprevColWidth = prevCol ? prevCol.getWidth() / 2 : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}, {passive: true});\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchend\", (e) => {\r\n\t\t\tif(this.checkTimeout){\r\n\t\t\t\tclearTimeout(this.checkTimeout);\r\n\t\t\t}\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.endMove(e);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tstartMove(e, column){\r\n\t\tvar element = column.getElement(),\r\n\t\theaderElement = this.table.columnManager.getElement(),\r\n\t\theadersElement = this.table.columnManager.getHeadersElement();\r\n\t\t\r\n\t\tthis.moving = column;\r\n\t\tthis.startX = (this.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(element).left;\r\n\t\t\r\n\t\tthis.table.element.classList.add(\"tabulator-block-select\");\r\n\t\t\r\n\t\t//create placeholder\r\n\t\tthis.placeholderElement.style.width = column.getWidth() + \"px\";\r\n\t\tthis.placeholderElement.style.height = column.getHeight() + \"px\";\r\n\t\t\r\n\t\telement.parentNode.insertBefore(this.placeholderElement, element);\r\n\t\telement.parentNode.removeChild(element);\r\n\t\t\r\n\t\t//create hover element\r\n\t\tthis.hoverElement = element.cloneNode(true);\r\n\t\tthis.hoverElement.classList.add(\"tabulator-moving\");\r\n\t\t\r\n\t\tthis.table.columnManager.getElement().appendChild(this.hoverElement);\r\n\t\t\r\n\t\tthis.hoverElement.style.left = \"0\";\r\n\t\tthis.hoverElement.style.bottom = (headerElement.clientHeight - headersElement.offsetHeight) + \"px\";\r\n\t\t\r\n\t\tif(!this.touchMove){\r\n\t\t\tthis._bindMouseMove();\r\n\t\t\t\r\n\t\t\tdocument.body.addEventListener(\"mousemove\", this.moveHover);\r\n\t\t\tdocument.body.addEventListener(\"mouseup\", this.endMove);\r\n\t\t}\r\n\t\t\r\n\t\tthis.moveHover(e);\r\n\t}\r\n\t\r\n\t_bindMouseMove(){\r\n\t\tthis.table.columnManager.columnsByIndex.forEach(function(column){\r\n\t\t\tif(column.modules.moveColumn.mousemove){\r\n\t\t\t\tcolumn.getElement().addEventListener(\"mousemove\", column.modules.moveColumn.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t_unbindMouseMove(){\r\n\t\tthis.table.columnManager.columnsByIndex.forEach(function(column){\r\n\t\t\tif(column.modules.moveColumn.mousemove){\r\n\t\t\t\tcolumn.getElement().removeEventListener(\"mousemove\", column.modules.moveColumn.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tmoveColumn(column, after){\r\n\t\tvar movingCells = this.moving.getCells();\r\n\t\t\r\n\t\tthis.toCol = column;\r\n\t\tthis.toColAfter = after;\r\n\t\t\r\n\t\tif(after){\r\n\t\t\tcolumn.getCells().forEach(function(cell, i){\r\n\t\t\t\tvar cellEl = cell.getElement(true);\r\n\t\t\t\t\r\n\t\t\t\tif(cellEl.parentNode && movingCells[i]){\r\n\t\t\t\t\tcellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tcolumn.getCells().forEach(function(cell, i){\r\n\t\t\t\tvar cellEl = cell.getElement(true);\r\n\t\t\t\t\r\n\t\t\t\tif(cellEl.parentNode && movingCells[i]){\r\n\t\t\t\t\tcellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tendMove(e){\r\n\t\tif(e.which === 1 || this.touchMove){\r\n\t\t\tthis._unbindMouseMove();\r\n\t\t\t\r\n\t\t\tthis.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling);\r\n\t\t\tthis.placeholderElement.parentNode.removeChild(this.placeholderElement);\r\n\t\t\tthis.hoverElement.parentNode.removeChild(this.hoverElement);\r\n\t\t\t\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-block-select\");\r\n\t\t\t\r\n\t\t\tif(this.toCol){\r\n\t\t\t\tthis.table.columnManager.moveColumnActual(this.moving, this.toCol, this.toColAfter);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.moving = false;\r\n\t\t\tthis.toCol = false;\r\n\t\t\tthis.toColAfter = false;\r\n\t\t\t\r\n\t\t\tif(!this.touchMove){\r\n\t\t\t\tdocument.body.removeEventListener(\"mousemove\", this.moveHover);\r\n\t\t\t\tdocument.body.removeEventListener(\"mouseup\", this.endMove);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tmoveHover(e){\r\n\t\tvar columnHolder = this.table.columnManager.getElement(),\r\n\t\tscrollLeft = columnHolder.scrollLeft,\r\n\t\txPos = ((this.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(columnHolder).left) + scrollLeft,\r\n\t\tscrollPos;\r\n\t\t\r\n\t\tthis.hoverElement.style.left = (xPos - this.startX) + \"px\";\r\n\t\t\r\n\t\tif(xPos - scrollLeft < this.autoScrollMargin){\r\n\t\t\tif(!this.autoScrollTimeout){\r\n\t\t\t\tthis.autoScrollTimeout = setTimeout(() => {\r\n\t\t\t\t\tscrollPos = Math.max(0,scrollLeft-5);\r\n\t\t\t\t\tthis.table.rowManager.getElement().scrollLeft = scrollPos;\r\n\t\t\t\t\tthis.autoScrollTimeout = false;\r\n\t\t\t\t}, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(scrollLeft + columnHolder.clientWidth - xPos < this.autoScrollMargin){\r\n\t\t\tif(!this.autoScrollTimeout){\r\n\t\t\t\tthis.autoScrollTimeout = setTimeout(() => {\r\n\t\t\t\t\tscrollPos = Math.min(columnHolder.clientWidth, scrollLeft+5);\r\n\t\t\t\t\tthis.table.rowManager.getElement().scrollLeft = scrollPos;\r\n\t\t\t\t\tthis.autoScrollTimeout = false;\r\n\t\t\t\t}, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMoveColumns.moduleName = \"moveColumn\";\r\n\r\nexport default MoveColumns;\r\n","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass MoveRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.placeholderElement = this.createPlaceholderElement();\r\n\t\tthis.hoverElement = false; //floating row header element\r\n\t\tthis.checkTimeout = false; //click check timeout holder\r\n\t\tthis.checkPeriod = 150; //period to wait on mousedown to consider this a move and not a click\r\n\t\tthis.moving = false; //currently moving row\r\n\t\tthis.toRow = false; //destination row\r\n\t\tthis.toRowAfter = false; //position of moving row relative to the desitnation row\r\n\t\tthis.hasHandle = false; //row has handle instead of fully movable row\r\n\t\tthis.startY = 0; //starting Y position within header element\r\n\t\tthis.startX = 0; //starting X position within header element\r\n\r\n\t\tthis.moveHover = this.moveHover.bind(this);\r\n\t\tthis.endMove = this.endMove.bind(this);\r\n\t\tthis.tableRowDropEvent = false;\r\n\r\n\t\tthis.touchMove = false;\r\n\r\n\t\tthis.connection = false;\r\n\t\tthis.connectionSelectorsTables = false;\r\n\t\tthis.connectionSelectorsElements = false;\r\n\t\tthis.connectionElements = [];\r\n\t\tthis.connections = [];\r\n\r\n\t\tthis.connectedTable = false;\r\n\t\tthis.connectedRow = false;\r\n\r\n\t\tthis.registerTableOption(\"movableRows\", false); //enable movable rows\r\n\t\tthis.registerTableOption(\"movableRowsConnectedTables\", false); //tables for movable rows to be connected to\r\n\t\tthis.registerTableOption(\"movableRowsConnectedElements\", false); //other elements for movable rows to be connected to\r\n\t\tthis.registerTableOption(\"movableRowsSender\", false);\r\n\t\tthis.registerTableOption(\"movableRowsReceiver\", \"insert\");\r\n\r\n\t\tthis.registerColumnOption(\"rowHandle\");\r\n\t}\r\n\r\n\tcreatePlaceholderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\tel.classList.add(\"tabulator-row-placeholder\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.movableRows){\r\n\t\t\tthis.connectionSelectorsTables = this.table.options.movableRowsConnectedTables;\r\n\t\t\tthis.connectionSelectorsElements = this.table.options.movableRowsConnectedElements;\r\n\r\n\t\t\tthis.connection = this.connectionSelectorsTables || this.connectionSelectorsElements;\r\n\r\n\t\t\tthis.subscribe(\"cell-init\", this.initializeCell.bind(this));\r\n\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeGroupHeader(group){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\trowEl;\r\n\r\n\t\t//inter table drag drop\r\n\t\tconfig.mouseup = function(e){\r\n\t\t\tself.tableRowDrop(e, row);\r\n\t\t}.bind(self);\r\n\r\n\t\t//same table drag drop\r\n\t\tconfig.mousemove = function(e){\r\n\t\t\tif(((e.pageY - Helpers.elOffset(group.element).top) + self.table.rowManager.element.scrollTop) > (group.getHeight() / 2)){\r\n\t\t\t\tif(self.toRow !== group || !self.toRowAfter){\r\n\t\t\t\t\tvar rowEl = group.getElement();\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling);\r\n\t\t\t\t\tself.moveRow(group, true);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(self.toRow !== group || self.toRowAfter){\r\n\t\t\t\t\tvar rowEl = group.getElement();\r\n\t\t\t\t\tif(rowEl.previousSibling){\r\n\t\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl);\r\n\t\t\t\t\t\tself.moveRow(group, false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.bind(self);\r\n\r\n\t\tgroup.modules.moveRow = config;\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\trowEl;\r\n\r\n\t\t//inter table drag drop\r\n\t\tconfig.mouseup = function(e){\r\n\t\t\tself.tableRowDrop(e, row);\r\n\t\t}.bind(self);\r\n\r\n\t\t//same table drag drop\r\n\t\tconfig.mousemove = function(e){\r\n\t\t\tvar rowEl = row.getElement();\r\n\r\n\t\t\tif(((e.pageY - Helpers.elOffset(rowEl).top) + self.table.rowManager.element.scrollTop) > (row.getHeight() / 2)){\r\n\t\t\t\tif(self.toRow !== row || !self.toRowAfter){\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling);\r\n\t\t\t\t\tself.moveRow(row, true);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(self.toRow !== row || self.toRowAfter){\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl);\r\n\t\t\t\t\tself.moveRow(row, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.bind(self);\r\n\r\n\r\n\t\tif(!this.hasHandle){\r\n\r\n\t\t\trowEl = row.getElement();\r\n\r\n\t\t\trowEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, row);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\trowEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.bindTouchEvents(row, row.getElement());\r\n\t\t}\r\n\r\n\t\trow.modules.moveRow = config;\r\n\t}\r\n\r\n\tinitializeColumn(column){\r\n\t\tif(column.definition.rowHandle && this.table.options.movableRows !== false){\r\n\t\t\tthis.hasHandle = true;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeCell(cell){\r\n\t\tif(cell.column.definition.rowHandle && this.table.options.movableRows !== false){\r\n\t\t\tvar self = this,\r\n\t\t\tcellEl = cell.getElement(true);\r\n\r\n\t\t\tcellEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, cell.row);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tcellEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.bindTouchEvents(cell.row, cellEl);\r\n\t\t}\r\n\t}\r\n\r\n\tbindTouchEvents(row, element){\r\n\t\tvar startYMove = false, //shifting center position of the cell\r\n\t\tdir = false,\r\n\t\tcurrentRow, nextRow, prevRow, nextRowHeight, prevRowHeight, nextRowHeightLast, prevRowHeightLast;\r\n\r\n\t\telement.addEventListener(\"touchstart\", (e) => {\r\n\t\t\tthis.checkTimeout = setTimeout(() => {\r\n\t\t\t\tthis.touchMove = true;\r\n\t\t\t\tcurrentRow = row;\r\n\t\t\t\tnextRow = row.nextRow();\r\n\t\t\t\tnextRowHeight = nextRow ? nextRow.getHeight()/2 : 0;\r\n\t\t\t\tprevRow = row.prevRow();\r\n\t\t\t\tprevRowHeight = prevRow ? prevRow.getHeight()/2 : 0;\r\n\t\t\t\tnextRowHeightLast = 0;\r\n\t\t\t\tprevRowHeightLast = 0;\r\n\t\t\t\tstartYMove = false;\r\n\r\n\t\t\t\tthis.startMove(e, row);\r\n\t\t\t}, this.checkPeriod);\r\n\t\t}, {passive: true});\r\n\t\tthis.moving, this.toRow, this.toRowAfter\r\n\t\telement.addEventListener(\"touchmove\", (e) => {\r\n\r\n\t\t\tvar halfCol, diff, moveToRow;\r\n\r\n\t\t\tif(this.moving){\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tthis.moveHover(e);\r\n\r\n\t\t\t\tif(!startYMove){\r\n\t\t\t\t\tstartYMove = e.touches[0].pageY;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdiff = e.touches[0].pageY - startYMove;\r\n\r\n\t\t\t\tif(diff > 0){\r\n\t\t\t\t\tif(nextRow && diff - nextRowHeightLast > nextRowHeight){\r\n\t\t\t\t\t\tmoveToRow = nextRow;\r\n\r\n\t\t\t\t\t\tif(moveToRow !== row){\r\n\t\t\t\t\t\t\tstartYMove = e.touches[0].pageY\r\n\t\t\t\t\t\t\tmoveToRow.getElement().parentNode.insertBefore(this.placeholderElement, moveToRow.getElement().nextSibling);\r\n\t\t\t\t\t\t\tthis.moveRow(moveToRow, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(prevRow && -diff - prevRowHeightLast > prevRowHeight){\r\n\t\t\t\t\t\tmoveToRow = prevRow;\r\n\r\n\t\t\t\t\t\tif(moveToRow !== row){\r\n\t\t\t\t\t\t\tstartYMove = e.touches[0].pageY;\r\n\t\t\t\t\t\t\tmoveToRow.getElement().parentNode.insertBefore(this.placeholderElement, moveToRow.getElement());\r\n\t\t\t\t\t\t\tthis.moveRow(moveToRow, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(moveToRow){\r\n\t\t\t\t\tcurrentRow = moveToRow;\r\n\t\t\t\t\tnextRow = moveToRow.nextRow();\r\n\t\t\t\t\tnextRowHeightLast = nextRowHeight;\r\n\t\t\t\t\tnextRowHeight = nextRow ? nextRow.getHeight() / 2 : 0;\r\n\t\t\t\t\tprevRow = moveToRow.prevRow();\r\n\t\t\t\t\tprevRowHeightLast = prevRowHeight;\r\n\t\t\t\t\tprevRowHeight = prevRow ? prevRow.getHeight() / 2 : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\telement.addEventListener(\"touchend\", (e) => {\r\n\t\t\tif(this.checkTimeout){\r\n\t\t\t\tclearTimeout(this.checkTimeout);\r\n\t\t\t}\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.endMove(e);\r\n\t\t\t\tthis.touchMove = false;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t_bindMouseMove(){\r\n\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\tif((row.type === \"row\" || row.type === \"group\") && row.modules.moveRow && row.modules.moveRow.mousemove){\r\n\t\t\t\trow.getElement().addEventListener(\"mousemove\", row.modules.moveRow.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t_unbindMouseMove(){\r\n\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\tif((row.type === \"row\" || row.type === \"group\") && row.modules.moveRow && row.modules.moveRow.mousemove){\r\n\t\t\t\trow.getElement().removeEventListener(\"mousemove\", row.modules.moveRow.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tstartMove(e, row){\r\n\t\tvar element = row.getElement();\r\n\r\n\t\tthis.setStartPosition(e, row);\r\n\r\n\t\tthis.moving = row;\r\n\r\n\t\tthis.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\t//create placeholder\r\n\t\tthis.placeholderElement.style.width = row.getWidth() + \"px\";\r\n\t\tthis.placeholderElement.style.height = row.getHeight() + \"px\";\r\n\r\n\t\tif(!this.connection){\r\n\t\t\telement.parentNode.insertBefore(this.placeholderElement, element);\r\n\t\t\telement.parentNode.removeChild(element);\r\n\t\t}else{\r\n\t\t\tthis.table.element.classList.add(\"tabulator-movingrow-sending\");\r\n\t\t\tthis.connectToTables(row);\r\n\t\t}\r\n\r\n\t\t//create hover element\r\n\t\tthis.hoverElement = element.cloneNode(true);\r\n\t\tthis.hoverElement.classList.add(\"tabulator-moving\");\r\n\r\n\t\tif(this.connection){\r\n\t\t\tdocument.body.appendChild(this.hoverElement);\r\n\t\t\tthis.hoverElement.style.left = \"0\";\r\n\t\t\tthis.hoverElement.style.top = \"0\";\r\n\t\t\tthis.hoverElement.style.width = this.table.element.clientWidth + \"px\";\r\n\t\t\tthis.hoverElement.style.whiteSpace = \"nowrap\";\r\n\t\t\tthis.hoverElement.style.overflow = \"hidden\";\r\n\t\t\tthis.hoverElement.style.pointerEvents = \"none\";\r\n\t\t}else{\r\n\t\t\tthis.table.rowManager.getTableElement().appendChild(this.hoverElement);\r\n\r\n\t\t\tthis.hoverElement.style.left = \"0\";\r\n\t\t\tthis.hoverElement.style.top = \"0\";\r\n\r\n\t\t\tthis._bindMouseMove();\r\n\t\t}\r\n\r\n\t\tdocument.body.addEventListener(\"mousemove\", this.moveHover);\r\n\t\tdocument.body.addEventListener(\"mouseup\", this.endMove);\r\n\r\n\t\tthis.dispatchExternal(\"rowMoving\", row.getComponent());\r\n\r\n\t\tthis.moveHover(e);\r\n\t}\r\n\r\n\tsetStartPosition(e, row){\r\n\t\tvar pageX = this.touchMove ? e.touches[0].pageX : e.pageX,\r\n\t\tpageY = this.touchMove ? e.touches[0].pageY : e.pageY,\r\n\t\telement, position;\r\n\r\n\t\telement = row.getElement();\r\n\t\tif(this.connection){\r\n\t\t\tposition = element.getBoundingClientRect();\r\n\r\n\t\t\tthis.startX = position.left - pageX + window.pageXOffset;\r\n\t\t\tthis.startY = position.top - pageY + window.pageYOffset;\r\n\t\t}else{\r\n\t\t\tthis.startY = (pageY - element.getBoundingClientRect().top);\r\n\t\t}\r\n\t}\r\n\r\n\tendMove(e){\r\n\t\tif(!e || e.which === 1 || this.touchMove){\r\n\t\t\tthis._unbindMouseMove();\r\n\r\n\t\t\tif(!this.connection){\r\n\t\t\t\tthis.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling);\r\n\t\t\t\tthis.placeholderElement.parentNode.removeChild(this.placeholderElement);\r\n\t\t\t}\r\n\r\n\t\t\tthis.hoverElement.parentNode.removeChild(this.hoverElement);\r\n\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tif(this.toRow){\r\n\t\t\t\tthis.table.rowManager.moveRow(this.moving, this.toRow, this.toRowAfter);\r\n\t\t\t}else{\r\n\t\t\t\tthis.dispatchExternal(\"rowMoveCancelled\", this.moving.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.moving = false;\r\n\t\t\tthis.toRow = false;\r\n\t\t\tthis.toRowAfter = false;\r\n\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", this.moveHover);\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", this.endMove);\r\n\r\n\t\t\tif(this.connection){\r\n\t\t\t\tthis.table.element.classList.remove(\"tabulator-movingrow-sending\");\r\n\t\t\t\tthis.disconnectFromTables();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmoveRow(row, after){\r\n\t\tthis.toRow = row;\r\n\t\tthis.toRowAfter = after;\r\n\t}\r\n\r\n\tmoveHover(e){\r\n\t\tif(this.connection){\r\n\t\t\tthis.moveHoverConnections.call(this, e);\r\n\t\t}else{\r\n\t\t\tthis.moveHoverTable.call(this, e);\r\n\t\t}\r\n\t}\r\n\r\n\tmoveHoverTable(e){\r\n\t\tvar rowHolder = this.table.rowManager.getElement(),\r\n\t\tscrollTop = rowHolder.scrollTop,\r\n\t\tyPos = ((this.touchMove ? e.touches[0].pageY : e.pageY) - rowHolder.getBoundingClientRect().top) + scrollTop,\r\n\t\tscrollPos;\r\n\r\n\t\tthis.hoverElement.style.top = (yPos - this.startY) + \"px\";\r\n\t}\r\n\r\n\tmoveHoverConnections(e){\r\n\t\tthis.hoverElement.style.left = (this.startX + (this.touchMove ? e.touches[0].pageX : e.pageX)) + \"px\";\r\n\t\tthis.hoverElement.style.top = (this.startY + (this.touchMove ? e.touches[0].pageY : e.pageY)) + \"px\";\r\n\t}\r\n\r\n\telementRowDrop(e, element, row){\r\n\t\tthis.dispatchExternal(\"movableRowsElementDrop\", e, element, row ? row.getComponent() : false);\r\n\t}\r\n\r\n\t//establish connection with other tables\r\n\tconnectToTables(row){\r\n\t\tvar connectionTables;\r\n\r\n\t\tif(this.connectionSelectorsTables){\r\n\t\t\tconnectionTables = this.commsConnections(this.connectionSelectorsTables);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSendingStart\", connectionTables);\r\n\r\n\t\t\tthis.commsSend(this.connectionSelectorsTables, \"moveRow\", \"connect\", {\r\n\t\t\t\trow:row,\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.connectionSelectorsElements){\r\n\r\n\t\t\tthis.connectionElements = [];\r\n\r\n\t\t\tif(!Array.isArray(this.connectionSelectorsElements)){\r\n\t\t\t\tthis.connectionSelectorsElements = [this.connectionSelectorsElements];\r\n\t\t\t}\r\n\r\n\t\t\tthis.connectionSelectorsElements.forEach((query) => {\r\n\t\t\t\tif(typeof query === \"string\"){\r\n\t\t\t\t\tthis.connectionElements = this.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(query)));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.connectionElements.push(query);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.connectionElements.forEach((element) => {\r\n\t\t\t\tvar dropEvent = (e) => {\r\n\t\t\t\t\tthis.elementRowDrop(e, element, this.moving);\r\n\t\t\t\t};\r\n\r\n\t\t\t\telement.addEventListener(\"mouseup\", dropEvent);\r\n\t\t\t\telement.tabulatorElementDropEvent = dropEvent;\r\n\r\n\t\t\t\telement.classList.add(\"tabulator-movingrow-receiving\");\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t//disconnect from other tables\r\n\tdisconnectFromTables(){\r\n\t\tvar connectionTables;\r\n\r\n\t\tif(this.connectionSelectorsTables){\r\n\t\t\tconnectionTables = this.commsConnections(this.connectionSelectorsTables);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSendingStop\", connectionTables);\r\n\r\n\t\t\tthis.commsSend(this.connectionSelectorsTables, \"moveRow\", \"disconnect\");\r\n\t\t}\r\n\r\n\t\tthis.connectionElements.forEach((element) => {\r\n\t\t\telement.classList.remove(\"tabulator-movingrow-receiving\");\r\n\t\t\telement.removeEventListener(\"mouseup\", element.tabulatorElementDropEvent);\r\n\t\t\tdelete element.tabulatorElementDropEvent;\r\n\t\t});\r\n\t}\r\n\r\n\t//accept incomming connection\r\n\tconnect(table, row){\r\n\t\tif(!this.connectedTable){\r\n\t\t\tthis.connectedTable = table;\r\n\t\t\tthis.connectedRow = row;\r\n\r\n\t\t\tthis.table.element.classList.add(\"tabulator-movingrow-receiving\");\r\n\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\t\tif(row.type === \"row\" && row.modules.moveRow && row.modules.moveRow.mouseup){\r\n\t\t\t\t\trow.getElement().addEventListener(\"mouseup\", row.modules.moveRow.mouseup);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.tableRowDropEvent = this.tableRowDrop.bind(this);\r\n\r\n\t\t\tthis.table.element.addEventListener(\"mouseup\", this.tableRowDropEvent);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivingStart\", row, table);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Row Error - Table cannot accept connection, already connected to table:\", this.connectedTable);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//close incomming connection\r\n\tdisconnect(table){\r\n\t\tif(table === this.connectedTable){\r\n\t\t\tthis.connectedTable = false;\r\n\t\t\tthis.connectedRow = false;\r\n\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-movingrow-receiving\");\r\n\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) =>{\r\n\t\t\t\tif(row.type === \"row\" && row.modules.moveRow && row.modules.moveRow.mouseup){\r\n\t\t\t\t\trow.getElement().removeEventListener(\"mouseup\", row.modules.moveRow.mouseup);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.table.element.removeEventListener(\"mouseup\", this.tableRowDropEvent);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivingStop\", table);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Row Error - trying to disconnect from non connected table\")\r\n\t\t}\r\n\t}\r\n\r\n\tdropComplete(table, row, success){\r\n\t\tvar sender = false;\r\n\r\n\t\tif(success){\r\n\r\n\t\t\tswitch(typeof this.table.options.movableRowsSender){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tsender = this.senders[this.table.options.movableRowsSender];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tsender = this.table.options.movableRowsSender;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(sender){\r\n\t\t\t\tsender.call(this, this.moving.getComponent(), row ? row.getComponent() : undefined, table)\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.options.movableRowsSender){\r\n\t\t\t\t\tconsole.warn(\"Mover Row Error - no matching sender found:\", this.table.options.movableRowsSender);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSent\", this.moving.getComponent(), row ? row.getComponent() : undefined, table);\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"movableRowsSentFailed\", this.moving.getComponent(), row ? row.getComponent() : undefined, table);\r\n\t\t}\r\n\r\n\t\tthis.endMove();\r\n\t}\r\n\r\n\ttableRowDrop(e, row){\r\n\t\tvar receiver = false,\r\n\t\tsuccess = false;\r\n\r\n\t\te.stopImmediatePropagation();\r\n\r\n\t\tswitch(typeof this.table.options.movableRowsReceiver){\r\n\t\t\tcase \"string\":\r\n\t\t\treceiver = this.receivers[this.table.options.movableRowsReceiver];\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\treceiver = this.table.options.movableRowsReceiver;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(receiver){\r\n\t\t\tsuccess = receiver.call(this, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Mover Row Error - no matching receiver found:\", this.table.options.movableRowsReceiver)\r\n\t\t}\r\n\r\n\t\tif(success){\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceived\", this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable);\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivedFailed\", this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable);\r\n\t\t}\r\n\r\n\t\tthis.commsSend(this.connectedTable, \"moveRow\", \"dropcomplete\", {\r\n\t\t\trow:row,\r\n\t\t\tsuccess:success,\r\n\t\t});\r\n\t}\r\n\r\n\tcommsReceived(table, action, data){\r\n\t\tswitch(action){\r\n\t\t\tcase \"connect\":\r\n\t\t\treturn this.connect(table, data.row);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"disconnect\":\r\n\t\t\treturn this.disconnect(table);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"dropcomplete\":\r\n\t\t\treturn this.dropComplete(table, data.row, data.success);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMoveRows.prototype.receivers = {\r\n\tinsert:function(fromRow, toRow, fromTable){\r\n\t\tthis.table.addRow(fromRow.getData(), undefined, toRow);\r\n\t\treturn true;\r\n\t},\r\n\r\n\tadd:function(fromRow, toRow, fromTable){\r\n\t\tthis.table.addRow(fromRow.getData());\r\n\t\treturn true;\r\n\t},\r\n\r\n\tupdate:function(fromRow, toRow, fromTable){\r\n\t\tif(toRow){\r\n\t\t\ttoRow.update(fromRow.getData());\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\r\n\treplace:function(fromRow, toRow, fromTable){\r\n\t\tif(toRow){\r\n\t\t\tthis.table.addRow(fromRow.getData(), undefined, toRow);\r\n\t\t\ttoRow.delete();\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n};\r\n\r\nMoveRows.prototype.senders = {\r\n\tdelete:function(fromRow, toRow, toTable){\r\n\t\tfromRow.delete();\r\n\t}\r\n};\r\n\r\nMoveRows.moduleName = \"moveRow\";\r\n\r\nexport default MoveRows;","export default {};","import Module from '../../core/Module.js';\r\n\r\nimport defaultMutators from './defaults/mutators.js';\r\n\r\nclass Mutator extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.allowedTypes = [\"\", \"data\", \"edit\", \"clipboard\"]; //list of muatation types\r\n\t\tthis.enabled = true;\r\n\r\n\t\tthis.registerColumnOption(\"mutator\");\r\n\t\tthis.registerColumnOption(\"mutatorParams\");\r\n\t\tthis.registerColumnOption(\"mutatorData\");\r\n\t\tthis.registerColumnOption(\"mutatorDataParams\");\r\n\t\tthis.registerColumnOption(\"mutatorEdit\");\r\n\t\tthis.registerColumnOption(\"mutatorEditParams\");\r\n\t\tthis.registerColumnOption(\"mutatorClipboard\");\r\n\t\tthis.registerColumnOption(\"mutatorClipboardParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-value-changing\", this.transformCell.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"row-data-init-before\", this.rowDataChanged.bind(this));\r\n\t\tthis.subscribe(\"row-data-changing\", this.rowDataChanged.bind(this));\r\n\t}\r\n\r\n\trowDataChanged(row, tempData, updatedData){\r\n\t\treturn this.transformRow(tempData, \"data\", updatedData);\r\n\t}\r\n\r\n\t//initialize column mutator\r\n\tinitializeColumn(column){\r\n\t\tvar match = false,\r\n\t\tconfig = {};\r\n\r\n\t\tthis.allowedTypes.forEach((type) => {\r\n\t\t\tvar key = \"mutator\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\t\tmutator;\r\n\r\n\t\t\tif(column.definition[key]){\r\n\t\t\t\tmutator = this.lookupMutator(column.definition[key]);\r\n\r\n\t\t\t\tif(mutator){\r\n\t\t\t\t\tmatch = true;\r\n\r\n\t\t\t\t\tconfig[key] = {\r\n\t\t\t\t\t\tmutator:mutator,\r\n\t\t\t\t\t\tparams: column.definition[key + \"Params\"] || {},\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tcolumn.modules.mutate = config;\r\n\t\t}\r\n\t}\r\n\r\n\tlookupMutator(value){\r\n\t\tvar mutator = false;\r\n\r\n\t\t//set column mutator\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Mutator.mutators[value]){\r\n\t\t\t\tmutator = Mutator.mutators[value];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Mutator Error - No such mutator found, ignoring: \", value);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tmutator = value;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn mutator;\r\n\t}\r\n\r\n\t//apply mutator to row\r\n\ttransformRow(data, type, updatedData){\r\n\t\tvar key = \"mutator\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\tvalue;\r\n\r\n\t\tif(this.enabled){\r\n\r\n\t\t\tthis.table.columnManager.traverse((column) => {\r\n\t\t\t\tvar mutator, params, component;\r\n\r\n\t\t\t\tif(column.modules.mutate){\r\n\t\t\t\t\tmutator = column.modules.mutate[key] || column.modules.mutate.mutator || false;\r\n\r\n\t\t\t\t\tif(mutator){\r\n\t\t\t\t\t\tvalue = column.getFieldValue(typeof updatedData !== \"undefined\" ? updatedData : data);\r\n\r\n\t\t\t\t\t\tif(type == \"data\" || typeof value !== \"undefined\"){\r\n\t\t\t\t\t\t\tcomponent = column.getComponent();\r\n\t\t\t\t\t\t\tparams = typeof mutator.params === \"function\" ? mutator.params(value, data, type, component) : mutator.params;\r\n\t\t\t\t\t\t\tcolumn.setFieldValue(data, mutator.mutator(value, data, type, params, component));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//apply mutator to new cell value\r\n\ttransformCell(cell, value){\r\n\t\tif(cell.column.modules.mutate){\r\n\t\t\tvar mutator = cell.column.modules.mutate.mutatorEdit || cell.column.modules.mutate.mutator || false,\r\n\t\t\ttempData = {};\r\n\r\n\t\t\tif(mutator){\r\n\t\t\t\ttempData = Object.assign(tempData, cell.row.getData());\r\n\t\t\t\tcell.column.setFieldValue(tempData, value);\r\n\t\t\t\treturn mutator.mutator(value, tempData, \"edit\", mutator.params, cell.getComponent());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\tenable(){\r\n\t\tthis.enabled = true;\r\n\t}\r\n\r\n\tdisable(){\r\n\t\tthis.enabled = false;\r\n\t}\r\n}\r\n\r\nMutator.moduleName = \"mutator\";\r\n\r\n//load defaults\r\nMutator.mutators = defaultMutators;\r\n\r\nexport default Mutator;","export default function(pageSize, currentRow, currentPage, totalRows, totalPages){\r\n\tvar el = document.createElement(\"span\"),\r\n\tshowingEl = document.createElement(\"span\"),\r\n\tvalueEl = document.createElement(\"span\"),\r\n\tofEl = document.createElement(\"span\"),\r\n\ttotalEl = document.createElement(\"span\"),\r\n\trowsEl = document.createElement(\"span\");\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|showing\", (value) => {\r\n\t\tshowingEl.innerHTML = value;\r\n\t});\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|of\", (value) => {\r\n\t\tofEl.innerHTML = value;\r\n\t});\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|rows\", (value) => {\r\n\t\trowsEl.innerHTML = value;\r\n\t});\r\n\r\n\tif(totalRows){\r\n\t\tvalueEl.innerHTML = \" \" + currentRow + \"-\" + Math.min((currentRow + pageSize - 1), totalRows) + \" \";\r\n\t\t\r\n\t\ttotalEl.innerHTML = \" \" + totalRows + \" \";\r\n\t\t\r\n\t\tel.appendChild(showingEl);\r\n\t\tel.appendChild(valueEl);\r\n\t\tel.appendChild(ofEl);\r\n\t\tel.appendChild(totalEl);\r\n\t\tel.appendChild(rowsEl);\r\n\t}else{\r\n\t\tvalueEl.innerHTML = \" 0 \";\r\n\r\n\t\tel.appendChild(showingEl);\r\n\t\tel.appendChild(valueEl);\r\n\t\tel.appendChild(rowsEl);\r\n\t}\r\n\t\r\n\treturn el;\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultPageCounters from './defaults/pageCounters.js';\r\n\r\nclass Page extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.mode = \"local\";\r\n\t\tthis.progressiveLoad = false;\r\n\t\t\r\n\t\tthis.element = null;\r\n\t\tthis.pageCounterElement = null;\r\n\t\tthis.pageCounter = null;\r\n\t\t\r\n\t\tthis.size = 0;\r\n\t\tthis.page = 1;\r\n\t\tthis.count = 5;\r\n\t\tthis.max = 1;\r\n\r\n\t\tthis.remoteRowCountEstimate = null;\r\n\t\t\r\n\t\tthis.displayIndex = 0; //index in display pipeline\r\n\t\t\r\n\t\tthis.initialLoad = true;\r\n\t\tthis.dataChanging = false; //flag to check if data is being changed by this module\r\n\t\t\r\n\t\tthis.pageSizes = [];\r\n\t\t\r\n\t\tthis.registerTableOption(\"pagination\", false); //set pagination type\r\n\t\tthis.registerTableOption(\"paginationMode\", \"local\"); //local or remote pagination\r\n\t\tthis.registerTableOption(\"paginationSize\", false); //set number of rows to a page\r\n\t\tthis.registerTableOption(\"paginationInitialPage\", 1); //initial page to show on load\r\n\t\tthis.registerTableOption(\"paginationCounter\", false); // set pagination counter\r\n\t\tthis.registerTableOption(\"paginationCounterElement\", false); // set pagination counter\r\n\t\tthis.registerTableOption(\"paginationButtonCount\", 5); // set count of page button\r\n\t\tthis.registerTableOption(\"paginationSizeSelector\", false); //add pagination size selector element\r\n\t\tthis.registerTableOption(\"paginationElement\", false); //element to hold pagination numbers\r\n\t\t// this.registerTableOption(\"paginationDataSent\", {}); //pagination data sent to the server\r\n\t\t// this.registerTableOption(\"paginationDataReceived\", {}); //pagination data received from the server\r\n\t\tthis.registerTableOption(\"paginationAddRow\", \"page\"); //add rows on table or page\r\n\t\t\r\n\t\tthis.registerTableOption(\"progressiveLoad\", false); //progressive loading\r\n\t\tthis.registerTableOption(\"progressiveLoadDelay\", 0); //delay between requests\r\n\t\tthis.registerTableOption(\"progressiveLoadScrollMargin\", 0); //margin before scroll begins\r\n\t\t\r\n\t\tthis.registerTableFunction(\"setMaxPage\", this.setMaxPage.bind(this));\r\n\t\tthis.registerTableFunction(\"setPage\", this.setPage.bind(this));\r\n\t\tthis.registerTableFunction(\"setPageToRow\", this.userSetPageToRow.bind(this));\r\n\t\tthis.registerTableFunction(\"setPageSize\", this.userSetPageSize.bind(this));\r\n\t\tthis.registerTableFunction(\"getPageSize\", this.getPageSize.bind(this));\r\n\t\tthis.registerTableFunction(\"previousPage\", this.previousPage.bind(this));\r\n\t\tthis.registerTableFunction(\"nextPage\", this.nextPage.bind(this));\r\n\t\tthis.registerTableFunction(\"getPage\", this.getPage.bind(this));\r\n\t\tthis.registerTableFunction(\"getPageMax\", this.getPageMax.bind(this));\r\n\t\t\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"pageTo\", this.setPageToRow.bind(this));\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"row-added\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"data-processed\", this.initialLoadComplete.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.calculatePageSizes.bind(this));\r\n\r\n\t\t\tif(this.table.options.paginationAddRow == \"page\"){\r\n\t\t\t\tthis.subscribe(\"row-adding-position\", this.rowAddingPosition.bind(this));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.options.paginationMode === \"remote\"){\r\n\t\t\t\tthis.subscribe(\"data-params\", this.remotePageParams.bind(this));\r\n\t\t\t\tthis.subscribe(\"data-loaded\", this._parseRemoteData.bind(this));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.options.progressiveLoad){\r\n\t\t\t\tconsole.error(\"Progressive Load Error - Pagination and progressive load cannot be used at the same time\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.registerDisplayHandler(this.restOnRenderBefore.bind(this), 40);\r\n\t\t\tthis.registerDisplayHandler(this.getRows.bind(this), 50);\r\n\t\t\t\r\n\t\t\tthis.createElements();\r\n\t\t\tthis.initializePageCounter();\r\n\t\t\tthis.initializePaginator();\r\n\t\t}else if(this.table.options.progressiveLoad){\r\n\t\t\tthis.subscribe(\"data-params\", this.remotePageParams.bind(this));\r\n\t\t\tthis.subscribe(\"data-loaded\", this._parseRemoteData.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.calculatePageSizes.bind(this));\r\n\t\t\tthis.subscribe(\"data-processed\", this.initialLoadComplete.bind(this));\r\n\t\t\t\r\n\t\t\tthis.initializeProgressive(this.table.options.progressiveLoad)\r\n\t\t\t\r\n\t\t\tif(this.table.options.progressiveLoad === \"scroll\"){\r\n\t\t\t\tthis.subscribe(\"scroll-vertical\", this.scrollVertical.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trowAddingPosition(row, top){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tdispRows = rowManager.getDisplayRows(),\r\n\t\tindex;\r\n\t\t\r\n\t\tif(top){\r\n\t\t\tif(dispRows.length){\r\n\t\t\t\tindex = dispRows[0];\r\n\t\t\t}else{\r\n\t\t\t\tif(rowManager.activeRows.length){\r\n\t\t\t\t\tindex = rowManager.activeRows[rowManager.activeRows.length-1];\r\n\t\t\t\t\ttop = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(dispRows.length){\r\n\t\t\t\tindex = dispRows[dispRows.length - 1];\r\n\t\t\t\ttop = dispRows.length < this.size ? false : true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn {index, top}\r\n\t}\r\n\t\r\n\tcalculatePageSizes(){\r\n\t\tvar testElRow, testElCell;\r\n\t\t\r\n\t\tif(this.table.options.paginationSize){\r\n\t\t\tthis.size = this.table.options.paginationSize;\r\n\t\t}else{\r\n\t\t\ttestElRow = document.createElement(\"div\");\r\n\t\t\ttestElRow.classList.add(\"tabulator-row\");\r\n\t\t\ttestElRow.style.visibility = \"hidden\";\r\n\t\t\t\r\n\t\t\ttestElCell = document.createElement(\"div\");\r\n\t\t\ttestElCell.classList.add(\"tabulator-cell\");\r\n\t\t\ttestElCell.innerHTML = \"Page Row Test\";\r\n\t\t\t\r\n\t\t\ttestElRow.appendChild(testElCell);\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getTableElement().appendChild(testElRow);\r\n\t\t\t\r\n\t\t\tthis.size = Math.floor(this.table.rowManager.getElement().clientHeight / testElRow.offsetHeight);\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getTableElement().removeChild(testElRow);\r\n\t\t}\r\n\t\t\r\n\t\tthis.generatePageSizeSelectList();\r\n\t}\r\n\t\r\n\tinitialLoadComplete(){\r\n\t\tthis.initialLoad = false;\r\n\t}\r\n\t\r\n\tremotePageParams(data, config, silent, params){\r\n\t\tif(!this.initialLoad){\r\n\t\t\tif((this.progressiveLoad && !silent) || (!this.progressiveLoad && !this.dataChanging)){\r\n\t\t\t\tthis.reset(true);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//configure request params\r\n\t\tparams.page = this.page;\r\n\t\t\r\n\t\t//set page size if defined\r\n\t\tif(this.size){\r\n\t\t\tparams.size = this.size;\r\n\t\t}\r\n\t\t\r\n\t\treturn params;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\tuserSetPageToRow(row){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\trow = this.rowManager.findRow(row);\r\n\t\t\t\r\n\t\t\tif(row){\r\n\t\t\t\treturn this.setPageToRow(row)\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn Promise.reject();\r\n\t}\r\n\t\r\n\tuserSetPageSize(size){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\tthis.setPageSize(size);\r\n\t\t\treturn this.setPage(1);\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\r\n\tscrollVertical(top, dir){\r\n\t\tvar element, diff, margin;\r\n\t\tif(!dir && !this.table.dataLoader.loading){\r\n\t\t\telement = this.table.rowManager.getElement();\r\n\t\t\tdiff = element.scrollHeight - element.clientHeight - top;\r\n\t\t\tmargin = this.table.options.progressiveLoadScrollMargin || (element.clientHeight * 2);\r\n\t\t\t\r\n\t\t\tif(diff < margin){\r\n\t\t\t\tthis.nextPage()\r\n\t\t\t\t.catch(() => {}); //consume the exception thrown when on the last page\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trestOnRenderBefore(rows, renderInPosition){\r\n\t\tif(!renderInPosition){\r\n\t\t\tif(this.mode === \"local\"){\r\n\t\t\t\tthis.reset();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\trowsUpdated(){\r\n\t\tthis.refreshData(true, \"all\");\r\n\t}\r\n\t\r\n\tcreateElements(){\r\n\t\tvar button;\r\n\t\t\r\n\t\tthis.element = document.createElement(\"span\");\r\n\t\tthis.element.classList.add(\"tabulator-paginator\");\r\n\t\t\r\n\t\tthis.pagesElement = document.createElement(\"span\");\r\n\t\tthis.pagesElement.classList.add(\"tabulator-pages\");\r\n\t\t\r\n\t\tbutton = document.createElement(\"button\");\r\n\t\tbutton.classList.add(\"tabulator-page\");\r\n\t\tbutton.setAttribute(\"type\", \"button\");\r\n\t\tbutton.setAttribute(\"role\", \"button\");\r\n\t\tbutton.setAttribute(\"aria-label\", \"\");\r\n\t\tbutton.setAttribute(\"title\", \"\");\r\n\t\t\r\n\t\tthis.firstBut = button.cloneNode(true);\r\n\t\tthis.firstBut.setAttribute(\"data-page\", \"first\");\r\n\t\t\r\n\t\tthis.prevBut = button.cloneNode(true);\r\n\t\tthis.prevBut.setAttribute(\"data-page\", \"prev\");\r\n\t\t\r\n\t\tthis.nextBut = button.cloneNode(true);\r\n\t\tthis.nextBut.setAttribute(\"data-page\", \"next\");\r\n\t\t\r\n\t\tthis.lastBut = button.cloneNode(true);\r\n\t\tthis.lastBut.setAttribute(\"data-page\", \"last\");\r\n\t\t\r\n\t\tif(this.table.options.paginationSizeSelector){\r\n\t\t\tthis.pageSizeSelect = document.createElement(\"select\");\r\n\t\t\tthis.pageSizeSelect.classList.add(\"tabulator-page-size\");\r\n\t\t}\r\n\t}\r\n\t\r\n\tgeneratePageSizeSelectList(){\r\n\t\tvar pageSizes = [];\r\n\t\t\r\n\t\tif(this.pageSizeSelect){\r\n\t\t\t\r\n\t\t\tif(Array.isArray(this.table.options.paginationSizeSelector)){\r\n\t\t\t\tpageSizes = this.table.options.paginationSizeSelector;\r\n\t\t\t\tthis.pageSizes = pageSizes;\r\n\t\t\t\t\r\n\t\t\t\tif(this.pageSizes.indexOf(this.size) == -1){\r\n\t\t\t\t\tpageSizes.unshift(this.size);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t\r\n\t\t\t\tif(this.pageSizes.indexOf(this.size) == -1){\r\n\t\t\t\t\tpageSizes = [];\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (let i = 1; i < 5; i++){\r\n\t\t\t\t\t\tpageSizes.push(this.size * i);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.pageSizes = pageSizes;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tpageSizes = this.pageSizes;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\twhile(this.pageSizeSelect.firstChild) this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);\r\n\t\t\t\r\n\t\t\tpageSizes.forEach((item) => {\r\n\t\t\t\tvar itemEl = document.createElement(\"option\");\r\n\t\t\t\titemEl.value = item;\r\n\t\t\t\t\r\n\t\t\t\tif(item === true){\r\n\t\t\t\t\tthis.langBind(\"pagination|all\", function(value){\r\n\t\t\t\t\t\titemEl.innerHTML = value;\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\titemEl.innerHTML = item;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tthis.pageSizeSelect.appendChild(itemEl);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.pageSizeSelect.value = this.size;\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializePageCounter(){\r\n\t\tvar counter = this.table.options.paginationCounter,\r\n\t\tpageCounter = null;\r\n\t\t\r\n\t\tif(counter){\r\n\t\t\tif(typeof counter === \"function\"){\r\n\t\t\t\tpageCounter = counter;\r\n\t\t\t}else{\r\n\t\t\t\tpageCounter = Page.pageCounters[counter];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(pageCounter){\r\n\t\t\t\tthis.pageCounter = pageCounter;\r\n\t\t\t\t\r\n\t\t\t\tthis.pageCounterElement = document.createElement(\"span\");\r\n\t\t\t\tthis.pageCounterElement.classList.add(\"tabulator-page-counter\");\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Pagination Error - No such page counter found: \", counter);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//setup pagination\r\n\tinitializePaginator(hidden){\r\n\t\tvar pageSelectLabel, paginationCounterHolder;\r\n\t\t\r\n\t\tif(!hidden){\r\n\t\t\t//build pagination element\r\n\t\t\t\r\n\t\t\t//bind localizations\r\n\t\t\tthis.langBind(\"pagination|first\", (value) => {\r\n\t\t\t\tthis.firstBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|first_title\", (value) => {\r\n\t\t\t\tthis.firstBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.firstBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|prev\", (value) => {\r\n\t\t\t\tthis.prevBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|prev_title\", (value) => {\r\n\t\t\t\tthis.prevBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.prevBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|next\", (value) => {\r\n\t\t\t\tthis.nextBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|next_title\", (value) => {\r\n\t\t\t\tthis.nextBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.nextBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|last\", (value) => {\r\n\t\t\t\tthis.lastBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|last_title\", (value) => {\r\n\t\t\t\tthis.lastBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.lastBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t//click bindings\r\n\t\t\tthis.firstBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.setPage(1)\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.prevBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.previousPage()\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.nextBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.nextPage()\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.lastBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.setPage(this.max)\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(this.table.options.paginationElement){\r\n\t\t\t\tthis.element = this.table.options.paginationElement;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.pageSizeSelect){\r\n\t\t\t\tpageSelectLabel = document.createElement(\"label\");\r\n\t\t\t\t\r\n\t\t\t\tthis.langBind(\"pagination|page_size\", (value) => {\r\n\t\t\t\t\tthis.pageSizeSelect.setAttribute(\"aria-label\", value);\r\n\t\t\t\t\tthis.pageSizeSelect.setAttribute(\"title\", value);\r\n\t\t\t\t\tpageSelectLabel.innerHTML = value;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.element.appendChild(pageSelectLabel);\r\n\t\t\t\tthis.element.appendChild(this.pageSizeSelect);\r\n\t\t\t\t\r\n\t\t\t\tthis.pageSizeSelect.addEventListener(\"change\", (e) => {\r\n\t\t\t\t\tthis.setPageSize(this.pageSizeSelect.value == \"true\" ? true : this.pageSizeSelect.value);\r\n\t\t\t\t\tthis.setPage(1)\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//append to DOM\r\n\t\t\tthis.element.appendChild(this.firstBut);\r\n\t\t\tthis.element.appendChild(this.prevBut);\r\n\t\t\tthis.element.appendChild(this.pagesElement);\r\n\t\t\tthis.element.appendChild(this.nextBut);\r\n\t\t\tthis.element.appendChild(this.lastBut);\r\n\t\t\t\r\n\t\t\tif(!this.table.options.paginationElement && !hidden){\r\n\t\t\t\tif(this.table.options.paginationCounter){\r\n\r\n\t\t\t\t\tpaginationCounterHolder \r\n\r\n\t\t\t\t\tif(this.table.options.paginationCounterElement){\r\n\t\t\t\t\t\tif(this.table.options.paginationCounterElement instanceof HTMLElement){\r\n\t\t\t\t\t\t\tthis.table.options.paginationCounterElement.appendChild(this.pageCounterElement);\r\n\t\t\t\t\t\t}else if(typeof this.table.options.paginationCounterElement === \"string\"){\r\n\t\t\t\t\t\t\tpaginationCounterHolder = document.querySelector(this.table.options.paginationCounterElement);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(paginationCounterHolder){\r\n\t\t\t\t\t\t\t\tpaginationCounterHolder.appendChild(this.pageCounterElement);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Pagination Error - Unable to find element matching paginationCounterElement selector:\", this.table.options.paginationCounterElement);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.table.footerManager.append(this.pageCounterElement);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.table.footerManager.append(this.element, this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.page = this.table.options.paginationInitialPage;\r\n\t\t\tthis.count = this.table.options.paginationButtonCount;\r\n\t\t}\r\n\t\t\r\n\t\t//set default values\r\n\t\tthis.mode = this.table.options.paginationMode;\r\n\t}\r\n\t\r\n\tinitializeProgressive(mode){\r\n\t\tthis.initializePaginator(true);\r\n\t\tthis.mode = \"progressive_\" + mode;\r\n\t\tthis.progressiveLoad = true;\r\n\t}\r\n\t\r\n\ttrackChanges(){\r\n\t\tthis.dispatch(\"page-changed\");\r\n\t}\r\n\t\r\n\tsetDisplayIndex(index){\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\t\r\n\tgetDisplayIndex(){\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\t\r\n\t//calculate maximum page from number of rows\r\n\tsetMaxRows(rowCount){\r\n\t\tif(!rowCount){\r\n\t\t\tthis.max = 1;\r\n\t\t}else{\r\n\t\t\tthis.max = this.size === true ? 1 : Math.ceil(rowCount/this.size);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.page > this.max){\r\n\t\t\tthis.page = this.max;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//reset to first page without triggering action\r\n\treset(force){\r\n\t\tif(!this.initialLoad){\r\n\t\t\tif(this.mode == \"local\" || force){\r\n\t\t\t\tthis.page = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set the maximum page\r\n\tsetMaxPage(max){\r\n\t\t\r\n\t\tmax = parseInt(max);\r\n\t\t\r\n\t\tthis.max = max || 1;\r\n\t\t\r\n\t\tif(this.page > this.max){\r\n\t\t\tthis.page = this.max;\r\n\t\t\tthis.trigger();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set current page number\r\n\tsetPage(page){\r\n\t\tswitch(page){\r\n\t\t\tcase \"first\":\r\n\t\t\treturn this.setPage(1);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"prev\":\r\n\t\t\treturn this.previousPage();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"next\":\r\n\t\t\treturn this.nextPage();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"last\":\r\n\t\t\treturn this.setPage(this.max);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tpage = parseInt(page);\r\n\t\t\r\n\t\tif((page > 0 && page <= this.max) || this.mode !== \"local\"){\r\n\t\t\tthis.page = page;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Requested page is out of range of 1 - \" + this.max + \":\", page);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetPageToRow(row){\r\n\t\tvar rows = this.table.rowManager.getDisplayRows(this.displayIndex - 1);\r\n\t\tvar index = rows.indexOf(row);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tvar page = this.size === true ? 1 : Math.ceil((index + 1) / this.size);\r\n\t\t\t\r\n\t\t\treturn this.setPage(page)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Requested row is not visible\");\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetPageSize(size){\r\n\t\tif(size !== true){\r\n\t\t\tsize = parseInt(size);\r\n\t\t}\r\n\t\t\r\n\t\tif(size > 0){\r\n\t\t\tthis.size = size;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.pageSizeSelect){\r\n\t\t\t// this.pageSizeSelect.value = size;\r\n\t\t\tthis.generatePageSizeSelectList();\r\n\t\t}\r\n\t\t\r\n\t\tthis.trackChanges();\r\n\t}\r\n\t\r\n\t_setPageCounter(totalRows, size, currentRow){\r\n\t\tvar content;\r\n\t\t\r\n\t\tif(this.pageCounter){\r\n\r\n\t\t\tif(this.mode === \"remote\"){\r\n\t\t\t\tsize = this.size;\r\n\t\t\t\tcurrentRow = ((this.page - 1) * this.size) + 1;\r\n\t\t\t\ttotalRows = this.remoteRowCountEstimate;\r\n\t\t\t}\r\n\r\n\t\t\tcontent = this.pageCounter.call(this, size, currentRow, this.page, totalRows, this.max);\r\n\t\t\t\r\n\t\t\tswitch(typeof content){\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\tif(content instanceof Node){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//clear previous cell contents\r\n\t\t\t\t\twhile(this.pageCounterElement.firstChild) this.pageCounterElement.removeChild(this.pageCounterElement.firstChild);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.pageCounterElement.appendChild(content);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(content != null){\r\n\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);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"undefined\":\r\n\t\t\t\tcase \"null\":\r\n\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.pageCounterElement.innerHTML = content;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//setup the pagination buttons\r\n\t_setPageButtons(){\r\n\t\tlet leftSize = Math.floor((this.count-1) / 2);\r\n\t\tlet rightSize = Math.ceil((this.count-1) / 2);\r\n\t\tlet min = this.max - this.page + leftSize + 1 < this.count ? this.max-this.count+1: Math.max(this.page-leftSize,1);\r\n\t\tlet max = this.page <= rightSize? Math.min(this.count, this.max) :Math.min(this.page+rightSize, this.max);\r\n\t\t\r\n\t\twhile(this.pagesElement.firstChild) this.pagesElement.removeChild(this.pagesElement.firstChild);\r\n\t\t\r\n\t\tif(this.page == 1){\r\n\t\t\tthis.firstBut.disabled = true;\r\n\t\t\tthis.prevBut.disabled = true;\r\n\t\t}else{\r\n\t\t\tthis.firstBut.disabled = false;\r\n\t\t\tthis.prevBut.disabled = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.page == this.max){\r\n\t\t\tthis.lastBut.disabled = true;\r\n\t\t\tthis.nextBut.disabled = true;\r\n\t\t}else{\r\n\t\t\tthis.lastBut.disabled = false;\r\n\t\t\tthis.nextBut.disabled = false;\r\n\t\t}\r\n\t\t\r\n\t\tfor(let i = min; i <= max; i++){\r\n\t\t\tif(i>0 && i <= this.max){\r\n\t\t\t\tthis.pagesElement.appendChild(this._generatePageButton(i));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.footerRedraw();\r\n\t}\r\n\t\r\n\t_generatePageButton(page){\r\n\t\tvar button = document.createElement(\"button\");\r\n\t\t\r\n\t\tbutton.classList.add(\"tabulator-page\");\r\n\t\tif(page == this.page){\r\n\t\t\tbutton.classList.add(\"active\");\r\n\t\t}\r\n\t\t\r\n\t\tbutton.setAttribute(\"type\", \"button\");\r\n\t\tbutton.setAttribute(\"role\", \"button\");\r\n\t\t\r\n\t\tthis.langBind(\"pagination|page_title\", (value) => {\r\n\t\t\tbutton.setAttribute(\"aria-label\", value + \" \" + page);\r\n\t\t\tbutton.setAttribute(\"title\", value + \" \" + page);\r\n\t\t});\r\n\t\t\r\n\t\tbutton.setAttribute(\"data-page\", page);\r\n\t\tbutton.textContent = page;\r\n\t\t\r\n\t\tbutton.addEventListener(\"click\", (e) => {\r\n\t\t\tthis.setPage(page)\r\n\t\t});\r\n\t\t\r\n\t\treturn button;\r\n\t}\r\n\t\r\n\t//previous page\r\n\tpreviousPage(){\r\n\t\tif(this.page > 1){\r\n\t\t\tthis.page--;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger()\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Previous page would be less than page 1:\", 0);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//next page\r\n\tnextPage(){\r\n\t\tif(this.page < this.max){\r\n\t\t\tthis.page++;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger();\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tif(!this.progressiveLoad){\r\n\t\t\t\tconsole.warn(\"Pagination Error - Next page would be greater than maximum page of \" + this.max + \":\", this.max + 1);\r\n\t\t\t}\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return current page number\r\n\tgetPage(){\r\n\t\treturn this.page;\r\n\t}\r\n\t\r\n\t//return max page number\r\n\tgetPageMax(){\r\n\t\treturn this.max;\r\n\t}\r\n\t\r\n\tgetPageSize(size){\r\n\t\treturn this.size;\r\n\t}\r\n\t\r\n\tgetMode(){\r\n\t\treturn this.mode;\r\n\t}\r\n\t\r\n\t//return appropriate rows for current page\r\n\tgetRows(data){\r\n\t\tvar actualRowPageSize = 0,\r\n\t\toutput, start, end, actualStartRow;\r\n\r\n\t\tvar actualRows = data.filter((row) => {\r\n\t\t\treturn row.type === \"row\";\r\n\t\t});\r\n\t\t\r\n\t\tif(this.mode == \"local\"){\r\n\t\t\toutput = [];\r\n\t\t\t\r\n\t\t\tthis.setMaxRows(data.length);\r\n\t\t\t\r\n\t\t\tif(this.size === true){\r\n\t\t\t\tstart = 0;\r\n\t\t\t\tend = data.length;\r\n\t\t\t}else{\r\n\t\t\t\tstart = this.size * (this.page - 1);\r\n\t\t\t\tend = start + parseInt(this.size);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._setPageButtons();\r\n\t\t\t\r\n\t\t\tfor(let i = start; i < end; i++){\r\n\t\t\t\tlet row = data[i];\r\n\r\n\t\t\t\tif(row){\r\n\t\t\t\t\toutput.push(row);\r\n\r\n\t\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\t\tif(!actualStartRow){\r\n\t\t\t\t\t\t\tactualStartRow = row;\r\n\t\t\t\t\t\t}\t\r\n\r\n\t\t\t\t\t\tactualRowPageSize++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._setPageCounter(actualRows.length, actualRowPageSize, actualStartRow ? (actualRows.indexOf(actualStartRow) + 1) : 0);\r\n\t\t\t\r\n\t\t\treturn output;\r\n\t\t}else{\r\n\t\t\tthis._setPageButtons();\r\n\t\t\tthis._setPageCounter(actualRows.length);\r\n\t\t\t\r\n\t\t\treturn data.slice(0);\r\n\t\t}\r\n\t}\r\n\t\r\n\ttrigger(){\r\n\t\tvar left;\r\n\t\t\r\n\t\tswitch(this.mode){\r\n\t\t\tcase \"local\":\r\n\t\t\tleft = this.table.rowManager.scrollLeft;\r\n\t\t\t\r\n\t\t\tthis.refreshData();\r\n\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\r\n\t\t\t\r\n\t\t\treturn Promise.resolve();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"remote\":\r\n\t\t\tthis.dataChanging = true;\r\n\t\t\treturn this.reloadData(null)\r\n\t\t\t.finally(() => {\r\n\t\t\t\tthis.dataChanging = false;\r\n\t\t\t})\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"progressive_load\":\r\n\t\t\tcase \"progressive_scroll\":\r\n\t\t\treturn this.reloadData(null, true);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\tconsole.warn(\"Pagination Error - no such pagination mode:\", this.mode);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_parseRemoteData(data){\r\n\t\tvar left, data, margin;\r\n\t\t\r\n\t\tif(typeof data.last_page === \"undefined\"){\r\n\t\t\tconsole.warn(\"Remote Pagination Error - Server response missing '\" + (this.options(\"dataReceiveParams\").last_page || \"last_page\") + \"' property\");\r\n\t\t}\r\n\t\t\r\n\t\tif(data.data){\r\n\t\t\tthis.max = parseInt(data.last_page) || 1;\r\n\r\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));\r\n\t\t\t\r\n\t\t\tif(this.progressiveLoad){\r\n\t\t\t\tswitch(this.mode){\r\n\t\t\t\t\tcase \"progressive_load\":\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.page == 1){\r\n\t\t\t\t\t\tthis.table.rowManager.setData(data.data, false, this.page == 1)\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.table.rowManager.addRows(data.data);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.page < this.max){\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tthis.nextPage();\r\n\t\t\t\t\t\t}, this.table.options.progressiveLoadDelay);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"progressive_scroll\":\r\n\t\t\t\t\tdata = this.page === 1 ? data.data : this.table.rowManager.getData().concat(data.data);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.table.rowManager.setData(data, this.page !== 1, this.page == 1);\r\n\t\t\t\t\t\r\n\t\t\t\t\tmargin = this.table.options.progressiveLoadScrollMargin || (this.table.rowManager.element.clientHeight * 2);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.table.rowManager.element.scrollHeight <= (this.table.rowManager.element.clientHeight + margin)){\r\n\t\t\t\t\t\tif(this.page < this.max){\r\n\t\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\t\tthis.nextPage();\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\t// left = this.table.rowManager.scrollLeft;\r\n\t\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\r\n\t\t\t\t// this.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\t// this.table.columnManager.scrollHorizontal(left);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Remote Pagination Error - Server response missing '\" + (this.options(\"dataReceiveParams\").data || \"data\") + \"' property\");\r\n\t\t}\r\n\t\t\r\n\t\treturn data.data;\r\n\t}\r\n\t\r\n\t//handle the footer element being redrawn\r\n\tfooterRedraw(){\r\n\t\tvar footer = this.table.footerManager.containerElement;\r\n\r\n\t\tif((Math.ceil(footer.clientWidth) - footer.scrollWidth) < 0){\r\n\t\t\tthis.pagesElement.style.display = 'none';\r\n\t\t}else{\r\n\t\t\tthis.pagesElement.style.display = '';\r\n\t\t\t\r\n\t\t\tif((Math.ceil(footer.clientWidth) - footer.scrollWidth) < 0){\r\n\t\t\t\tthis.pagesElement.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nPage.moduleName = \"page\";\r\n\r\n//load defaults\r\nPage.pageCounters = defaultPageCounters;\r\n\r\nexport default Page;","export default function(pageSize, currentRow, currentPage, totalRows, totalPages){\r\n\r\n var el = document.createElement(\"span\"),\r\n\tshowingEl = document.createElement(\"span\"),\r\n\tvalueEl = document.createElement(\"span\"),\r\n\tofEl = document.createElement(\"span\"),\r\n\ttotalEl = document.createElement(\"span\"),\r\n\trowsEl = document.createElement(\"span\");\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|showing\", (value) => {\r\n\t\tshowingEl.innerHTML = value;\r\n\t});\r\n\t\r\n\tvalueEl.innerHTML = \" \" + currentPage + \" \";\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|of\", (value) => {\r\n\t\tofEl.innerHTML = value;\r\n\t});\r\n\t\r\n\ttotalEl.innerHTML = \" \" + totalPages + \" \";\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|pages\", (value) => {\r\n\t\trowsEl.innerHTML = value;\r\n\t});\r\n\t\r\n\tel.appendChild(showingEl);\r\n\tel.appendChild(valueEl);\r\n\tel.appendChild(ofEl);\r\n\tel.appendChild(totalEl);\r\n\tel.appendChild(rowsEl);\r\n\t\r\n\treturn el;\r\n};","import rows from './pageCounters/rows.js';\r\nimport pages from './pageCounters/pages.js';\r\n\r\n\r\nexport default {\r\n\trows:rows,\r\n\tpages:pages,\r\n};","// read peristence information from storage\r\nexport default {\r\n\tlocal:function(id, type){\r\n\t\tvar data = localStorage.getItem(id + \"-\" + type);\r\n\r\n\t\treturn data ? JSON.parse(data) : false;\r\n\t},\r\n\tcookie:function(id, type){\r\n\t\tvar cookie = document.cookie,\r\n\t\tkey = id + \"-\" + type,\r\n\t\tcookiePos = cookie.indexOf(key + \"=\"),\r\n\t\tend, data;\r\n\r\n\t\t//if cookie exists, decode and load column data into tabulator\r\n\t\tif(cookiePos > -1){\r\n\t\t\tcookie = cookie.slice(cookiePos);\r\n\r\n\t\t\tend = cookie.indexOf(\";\");\r\n\r\n\t\t\tif(end > -1){\r\n\t\t\t\tcookie = cookie.slice(0, end);\r\n\t\t\t}\r\n\r\n\t\t\tdata = cookie.replace(key + \"=\", \"\");\r\n\t\t}\r\n\r\n\t\treturn data ? JSON.parse(data) : false;\r\n\t}\r\n};\r\n","//write persistence information to storage\r\nexport default {\r\n\tlocal:function(id, type, data){\r\n\t\tlocalStorage.setItem(id + \"-\" + type, JSON.stringify(data));\r\n\t},\r\n\tcookie:function(id, type, data){\r\n\t\tvar expireDate = new Date();\r\n\r\n\t\texpireDate.setDate(expireDate.getDate() + 10000);\r\n\r\n\t\tdocument.cookie = id + \"-\" + type + \"=\" + JSON.stringify(data) + \"; expires=\" + expireDate.toUTCString();\r\n\t}\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultReaders from './defaults/readers.js';\r\nimport defaultWriters from './defaults/writers.js';\r\n\r\nclass Persistence extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.mode = \"\";\r\n\t\tthis.id = \"\";\r\n\t\t// this.persistProps = [\"field\", \"width\", \"visible\"];\r\n\t\tthis.defWatcherBlock = false;\r\n\t\tthis.config = {};\r\n\t\tthis.readFunc = false;\r\n\t\tthis.writeFunc = false;\r\n\r\n\t\tthis.registerTableOption(\"persistence\", false);\r\n\t\tthis.registerTableOption(\"persistenceID\", \"\"); //key for persistent storage\r\n\t\tthis.registerTableOption(\"persistenceMode\", true); //mode for storing persistence information\r\n\t\tthis.registerTableOption(\"persistenceReaderFunc\", false); //function for handling persistence data reading\r\n\t\tthis.registerTableOption(\"persistenceWriterFunc\", false); //function for handling persistence data writing\r\n\t}\r\n\r\n\t// Test for whether localStorage is available for use.\r\n\tlocalStorageTest() {\r\n\t\tvar testKey = \"_tabulator_test\";\r\n\r\n\t\ttry {\r\n\t\t\twindow.localStorage.setItem( testKey, testKey);\r\n\t\t\twindow.localStorage.removeItem( testKey );\r\n\t\t\treturn true;\r\n\t\t} catch(e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//setup parameters\r\n\tinitialize(){\r\n\t\tif(this.table.options.persistence){\r\n\t\t\t//determine persistent layout storage type\r\n\t\t\tvar mode = this.table.options.persistenceMode,\r\n\t\t\tid = this.table.options.persistenceID,\r\n\t\t\tretreivedData;\r\n\r\n\t\t\tthis.mode = mode !== true ? mode : (this.localStorageTest() ? \"local\" : \"cookie\");\r\n\r\n\t\t\tif(this.table.options.persistenceReaderFunc){\r\n\t\t\t\tif(typeof this.table.options.persistenceReaderFunc === \"function\"){\r\n\t\t\t\t\tthis.readFunc = this.table.options.persistenceReaderFunc;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(Persistence.readers[this.table.options.persistenceReaderFunc]){\r\n\t\t\t\t\t\tthis.readFunc = Persistence.readers[this.table.options.persistenceReaderFunc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Persistence Read Error - invalid reader set\", this.table.options.persistenceReaderFunc);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(Persistence.readers[this.mode]){\r\n\t\t\t\t\tthis.readFunc = Persistence.readers[this.mode];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Persistence Read Error - invalid reader set\", this.mode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.persistenceWriterFunc){\r\n\t\t\t\tif(typeof this.table.options.persistenceWriterFunc === \"function\"){\r\n\t\t\t\t\tthis.writeFunc = this.table.options.persistenceWriterFunc;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(Persistence.writers[this.table.options.persistenceWriterFunc]){\r\n\t\t\t\t\t\tthis.writeFunc = Persistence.writers[this.table.options.persistenceWriterFunc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Persistence Write Error - invalid reader set\", this.table.options.persistenceWriterFunc);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(Persistence.writers[this.mode]){\r\n\t\t\t\t\tthis.writeFunc = Persistence.writers[this.mode];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Persistence Write Error - invalid writer set\", this.mode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//set storage tag\r\n\t\t\tthis.id = \"tabulator-\" + (id || (this.table.element.getAttribute(\"id\") || \"\"));\r\n\r\n\t\t\tthis.config = {\r\n\t\t\t\tsort:this.table.options.persistence === true || this.table.options.persistence.sort,\r\n\t\t\t\tfilter:this.table.options.persistence === true || this.table.options.persistence.filter,\r\n\t\t\t\tgroup:this.table.options.persistence === true || this.table.options.persistence.group,\r\n\t\t\t\tpage:this.table.options.persistence === true || this.table.options.persistence.page,\r\n\t\t\t\tcolumns:this.table.options.persistence === true ? [\"title\", \"width\", \"visible\"] : this.table.options.persistence.columns,\r\n\t\t\t};\r\n\r\n\t\t\t//load pagination data if needed\r\n\t\t\tif(this.config.page){\r\n\t\t\t\tretreivedData = this.retreiveData(\"page\");\r\n\r\n\t\t\t\tif(retreivedData){\r\n\t\t\t\t\tif(typeof retreivedData.paginationSize !== \"undefined\" && (this.config.page === true || this.config.page.size)){\r\n\t\t\t\t\t\tthis.table.options.paginationSize = retreivedData.paginationSize;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(typeof retreivedData.paginationInitialPage !== \"undefined\" && (this.config.page === true || this.config.page.page)){\r\n\t\t\t\t\t\tthis.table.options.paginationInitialPage = retreivedData.paginationInitialPage;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//load group data if needed\r\n\t\t\tif(this.config.group){\r\n\t\t\t\tretreivedData = this.retreiveData(\"group\");\r\n\r\n\t\t\t\tif(retreivedData){\r\n\t\t\t\t\tif(typeof retreivedData.groupBy !== \"undefined\" && (this.config.group === true || this.config.group.groupBy)){\r\n\t\t\t\t\t\tthis.table.options.groupBy = retreivedData.groupBy;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retreivedData.groupStartOpen !== \"undefined\" && (this.config.group === true || this.config.group.groupStartOpen)){\r\n\t\t\t\t\t\tthis.table.options.groupStartOpen = retreivedData.groupStartOpen;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retreivedData.groupHeader !== \"undefined\" && (this.config.group === true || this.config.group.groupHeader)){\r\n\t\t\t\t\t\tthis.table.options.groupHeader = retreivedData.groupHeader;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.columns){\r\n\t\t\t\tthis.table.options.columns = this.load(\"columns\", this.table.options.columns);\r\n\t\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t\t\tthis.subscribe(\"column-show\", this.save.bind(this, \"columns\"));\r\n\t\t\t\tthis.subscribe(\"column-hide\", this.save.bind(this, \"columns\"));\r\n\t\t\t\tthis.subscribe(\"column-moved\", this.save.bind(this, \"columns\"));\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-built\", this.tableBuilt.bind(this), 0);\r\n\r\n\t\t\tthis.subscribe(\"table-redraw\", this.tableRedraw.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"filter-changed\", this.eventSave.bind(this, \"filter\"));\r\n\t\t\tthis.subscribe(\"sort-changed\", this.eventSave.bind(this, \"sort\"));\r\n\t\t\tthis.subscribe(\"group-changed\", this.eventSave.bind(this, \"group\"));\r\n\t\t\tthis.subscribe(\"page-changed\", this.eventSave.bind(this, \"page\"));\r\n\t\t\tthis.subscribe(\"column-resized\", this.eventSave.bind(this, \"columns\"));\r\n\t\t\tthis.subscribe(\"layout-refreshed\", this.eventSave.bind(this, \"columns\"));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"getColumnLayout\", this.getColumnLayout.bind(this));\r\n\t\tthis.registerTableFunction(\"setColumnLayout\", this.setColumnLayout.bind(this));\r\n\t}\r\n\r\n\teventSave(type){\r\n\t\tif(this.config[type]){\r\n\t\t\tthis.save(type);\r\n\t\t}\r\n\t}\r\n\r\n\ttableBuilt(){\r\n\t\tvar options = this.table.options,\r\n\t\tsorters, filters;\r\n\r\n\t\tif(this.config.sort){\r\n\t\t\tsorters = this.load(\"sort\");\r\n\r\n\t\t\tif(!sorters === false){\r\n\t\t\t\tthis.table.options.initialSort = sorters;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.config.filter){\r\n\t\t\tfilters = this.load(\"filter\");\r\n\r\n\t\t\tif(!filters === false){\r\n\t\t\t\tthis.table.options.initialFilter = filters;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tif(force && this.config.columns){\r\n\t\t\tthis.save(\"columns\");\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tgetColumnLayout(){\r\n\t\treturn this.parseColumns(this.table.columnManager.getColumns());\r\n\t}\r\n\r\n\tsetColumnLayout(layout){\r\n\t\tthis.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns, layout))\r\n\t\treturn true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumn(column){\r\n\t\tvar def, keys;\r\n\r\n\t\tif(this.config.columns){\r\n\t\t\tthis.defWatcherBlock = true;\r\n\r\n\t\t\tdef = column.getDefinition();\r\n\r\n\t\t\tkeys = this.config.columns === true ? Object.keys(def) : this.config.columns;\r\n\r\n\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\tvar props = Object.getOwnPropertyDescriptor(def, key);\r\n\t\t\t\tvar value = def[key];\r\n\t\t\t\tif(props){\r\n\t\t\t\t\tObject.defineProperty(def, key, {\r\n\t\t\t\t\t\tset: function(newValue){\r\n\t\t\t\t\t\t\tvalue = newValue;\r\n\r\n\t\t\t\t\t\t\tif(!this.defWatcherBlock){\r\n\t\t\t\t\t\t\t\tthis.save(\"columns\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif(props.set){\r\n\t\t\t\t\t\t\t\tprops.set(newValue);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tget:function(){\r\n\t\t\t\t\t\t\tif(props.get){\r\n\t\t\t\t\t\t\t\tprops.get();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.defWatcherBlock = false;\r\n\t\t}\r\n\t}\r\n\r\n\t//load saved definitions\r\n\tload(type, current){\r\n\t\tvar data = this.retreiveData(type);\r\n\r\n\t\tif(current){\r\n\t\t\tdata = data ? this.mergeDefinition(current, data) : current;\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//retreive data from memory\r\n\tretreiveData(type){\r\n\t\treturn this.readFunc ? this.readFunc(this.id, type) : false;\r\n\t}\r\n\r\n\t//merge old and new column definitions\r\n\tmergeDefinition(oldCols, newCols){\r\n\t\tvar output = [];\r\n\r\n\t\tnewCols = newCols || [];\r\n\r\n\t\tnewCols.forEach((column, to) => {\r\n\t\t\tvar from = this._findColumn(oldCols, column),\r\n\t\t\tkeys;\r\n\r\n\t\t\tif(from){\r\n\t\t\t\tif(this.config.columns === true || this.config.columns == undefined){\r\n\t\t\t\t\tkeys = Object.keys(from);\r\n\t\t\t\t\tkeys.push(\"width\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tkeys = this.config.columns;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\t\tif(key !== \"columns\" && typeof column[key] !== \"undefined\"){\r\n\t\t\t\t\t\tfrom[key] = column[key];\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(from.columns){\r\n\t\t\t\t\tfrom.columns = this.mergeDefinition(from.columns, column.columns);\r\n\t\t\t\t}\r\n\r\n\t\t\t\toutput.push(from);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\toldCols.forEach((column, i) => {\r\n\t\t\tvar from = this._findColumn(newCols, column);\r\n\r\n\t\t\tif (!from) {\r\n\t\t\t\tif(output.length>i){\r\n\t\t\t\t\toutput.splice(i, 0, column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput.push(column);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//find matching columns\r\n\t_findColumn(columns, subject){\r\n\t\tvar type = subject.columns ? \"group\" : (subject.field ? \"field\" : \"object\");\r\n\r\n\t\treturn columns.find(function(col){\r\n\t\t\tswitch(type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\treturn col.title === subject.title && col.columns.length === subject.columns.length;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"field\":\r\n\t\t\t\treturn col.field === subject.field;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\treturn col === subject;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//save data\r\n\tsave(type){\r\n\t\tvar data = {};\r\n\r\n\t\tswitch(type){\r\n\t\t\tcase \"columns\":\r\n\t\t\tdata = this.parseColumns(this.table.columnManager.getColumns())\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"filter\":\r\n\t\t\tdata = this.table.modules.filter.getFilters();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"sort\":\r\n\t\t\tdata = this.validateSorters(this.table.modules.sort.getSort());\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tdata = this.getGroupConfig();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"page\":\r\n\t\t\tdata = this.getPageConfig();\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(this.writeFunc){\r\n\t\t\tthis.writeFunc(this.id, type, data);\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t//ensure sorters contain no function data\r\n\tvalidateSorters(data){\r\n\t\tdata.forEach(function(item){\r\n\t\t\titem.column = item.field;\r\n\t\t\tdelete item.field;\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\tgetGroupConfig(){\r\n\t\tvar data = {};\r\n\r\n\t\tif(this.config.group){\r\n\t\t\tif(this.config.group === true || this.config.group.groupBy){\r\n\t\t\t\tdata.groupBy = this.table.options.groupBy;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.group === true || this.config.group.groupStartOpen){\r\n\t\t\t\tdata.groupStartOpen = this.table.options.groupStartOpen;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.group === true || this.config.group.groupHeader){\r\n\t\t\t\tdata.groupHeader = this.table.options.groupHeader;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\tgetPageConfig(){\r\n\t\tvar data = {};\r\n\r\n\t\tif(this.config.page){\r\n\t\t\tif(this.config.page === true || this.config.page.size){\r\n\t\t\t\tdata.paginationSize = this.table.modules.page.getPageSize();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.page === true || this.config.page.page){\r\n\t\t\t\tdata.paginationInitialPage = this.table.modules.page.getPage();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\r\n\t//parse columns for data to store\r\n\tparseColumns(columns){\r\n\t\tvar definitions = [],\r\n\t\texcludedKeys = [\"headerContextMenu\", \"headerMenu\", \"contextMenu\", \"clickMenu\"];\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\tvar defStore = {},\r\n\t\t\tcolDef = column.getDefinition(),\r\n\t\t\tkeys;\r\n\r\n\t\t\tif(column.isGroup){\r\n\t\t\t\tdefStore.title = colDef.title;\r\n\t\t\t\tdefStore.columns = this.parseColumns(column.getColumns());\r\n\t\t\t}else{\r\n\t\t\t\tdefStore.field = column.getField();\r\n\r\n\t\t\t\tif(this.config.columns === true || this.config.columns == undefined){\r\n\t\t\t\t\tkeys = Object.keys(colDef);\r\n\t\t\t\t\tkeys.push(\"width\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tkeys = this.config.columns;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\t\tswitch(key){\r\n\t\t\t\t\t\tcase \"width\":\r\n\t\t\t\t\t\tdefStore.width = column.getWidth();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"visible\":\r\n\t\t\t\t\t\tdefStore.visible = column.visible;\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(typeof colDef[key] !== \"function\" && excludedKeys.indexOf(key) === -1){\r\n\t\t\t\t\t\t\tdefStore[key] = colDef[key];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tdefinitions.push(defStore);\r\n\t\t});\r\n\r\n\t\treturn definitions;\r\n\t}\r\n}\r\n\r\nPersistence.moduleName = \"persistence\";\r\n\r\nPersistence.moduleInitOrder = 1;\r\n\r\n//load defaults\r\nPersistence.readers = defaultReaders;\r\nPersistence.writers = defaultWriters;\r\n\r\nexport default Persistence;","import Module from '../../core/Module.js';\r\n\r\nclass Print extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.manualBlock = false;\r\n\r\n\t\tthis.registerTableOption(\"printAsHtml\", false); //enable print as html\r\n\t\tthis.registerTableOption(\"printFormatter\", false); //printing page formatter\r\n\t\tthis.registerTableOption(\"printHeader\", false); //page header contents\r\n\t\tthis.registerTableOption(\"printFooter\", false); //page footer contents\r\n\t\tthis.registerTableOption(\"printStyled\", true); //enable print as html styling\r\n\t\tthis.registerTableOption(\"printRowRange\", \"visible\"); //restrict print to visible rows only\r\n\t\tthis.registerTableOption(\"printConfig\", {}); //print config options\r\n\r\n\t\tthis.registerColumnOption(\"print\");\r\n\t\tthis.registerColumnOption(\"titlePrint\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.printAsHtml){\r\n\t\t\twindow.addEventListener(\"beforeprint\", this.replaceTable.bind(this));\r\n\t\t\twindow.addEventListener(\"afterprint\", this.cleanup.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"print\", this.printFullscreen.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\treplaceTable(){\r\n\t\tif(!this.manualBlock){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"tabulator-print-table\");\r\n\r\n\t\t\tthis.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig, this.table.options.printStyled, this.table.options.printRowRange, \"print\"));\r\n\r\n\t\t\tthis.table.element.style.display = \"none\";\r\n\r\n\t\t\tthis.table.element.parentNode.insertBefore(this.element, this.table.element);\r\n\t\t}\r\n\t}\r\n\r\n\tcleanup(){\r\n\t\tdocument.body.classList.remove(\"tabulator-print-fullscreen-hide\");\r\n\r\n\t\tif(this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\tthis.table.element.style.display = \"\";\r\n\t\t}\r\n\t}\r\n\r\n\tprintFullscreen(visible, style, config){\r\n\t\tvar scrollX = window.scrollX,\r\n\t\tscrollY = window.scrollY,\r\n\t\theaderEl = document.createElement(\"div\"),\r\n\t\tfooterEl = document.createElement(\"div\"),\r\n\t\ttableEl = this.table.modules.export.genereateTable(typeof config != \"undefined\" ? config : this.table.options.printConfig, typeof style != \"undefined\" ? style : this.table.options.printStyled, visible || this.table.options.printRowRange, \"print\"),\r\n\t\theaderContent, footerContent;\r\n\r\n\t\tthis.manualBlock = true;\r\n\r\n\t\tthis.element = document.createElement(\"div\");\r\n\t\tthis.element.classList.add(\"tabulator-print-fullscreen\");\r\n\r\n\t\tif(this.table.options.printHeader){\r\n\t\t\theaderEl.classList.add(\"tabulator-print-header\");\r\n\r\n\t\t\theaderContent = typeof this.table.options.printHeader == \"function\" ? this.table.options.printHeader.call(this.table) : this.table.options.printHeader;\r\n\r\n\t\t\tif(typeof headerContent == \"string\"){\r\n\t\t\t\theaderEl.innerHTML = headerContent;\r\n\t\t\t}else{\r\n\t\t\t\theaderEl.appendChild(headerContent);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.appendChild(headerEl);\r\n\t\t}\r\n\r\n\t\tthis.element.appendChild(tableEl);\r\n\r\n\t\tif(this.table.options.printFooter){\r\n\t\t\tfooterEl.classList.add(\"tabulator-print-footer\");\r\n\r\n\t\t\tfooterContent = typeof this.table.options.printFooter == \"function\" ? this.table.options.printFooter.call(this.table) : this.table.options.printFooter;\r\n\r\n\r\n\t\t\tif(typeof footerContent == \"string\"){\r\n\t\t\t\tfooterEl.innerHTML = footerContent;\r\n\t\t\t}else{\r\n\t\t\t\tfooterEl.appendChild(footerContent);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.appendChild(footerEl);\r\n\t\t}\r\n\r\n\t\tdocument.body.classList.add(\"tabulator-print-fullscreen-hide\");\r\n\t\tdocument.body.appendChild(this.element);\r\n\r\n\t\tif(this.table.options.printFormatter){\r\n\t\t\tthis.table.options.printFormatter(this.element, tableEl);\r\n\t\t}\r\n\r\n\t\twindow.print();\r\n\r\n\t\tthis.cleanup();\r\n\r\n\t\twindow.scrollTo(scrollX, scrollY);\r\n\r\n\t\tthis.manualBlock = false;\r\n\t}\r\n}\r\n\r\nPrint.moduleName = \"print\";\r\n\r\nexport default Print;","import Module from '../../core/Module.js';\r\n\r\nclass ReactiveData extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.data = false;\r\n\t\tthis.blocked = false; //block reactivity while performing update\r\n\t\tthis.origFuncs = {}; // hold original data array functions to allow replacement after data is done with\r\n\t\tthis.currentVersion = 0;\r\n\r\n\t\tthis.registerTableOption(\"reactiveData\", false); //enable data reactivity\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.reactiveData){\r\n\t\t\tthis.subscribe(\"cell-value-save-before\", this.block.bind(this));\r\n\t\t\tthis.subscribe(\"cell-value-save-after\", this.unblock.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-save-before\", this.block.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-save-after\", this.unblock.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-init-after\", this.watchRow.bind(this));\r\n\t\t\tthis.subscribe(\"data-processing\", this.watchData.bind(this));\r\n\t\t\tthis.subscribe(\"table-destroy\", this.unwatchData.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\twatchData(data){\r\n\t\tvar self = this,\r\n\t\tpushFunc, version;\r\n\r\n\t\tthis.currentVersion ++;\r\n\r\n\t\tversion = this.currentVersion;\r\n\r\n\t\tthis.unwatchData();\r\n\r\n\t\tthis.data = data;\r\n\r\n\t\t//override array push function\r\n\t\tthis.origFuncs.push = data.push;\r\n\r\n\t\tObject.defineProperty(this.data, \"push\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments);\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\targs.forEach((arg) => {\r\n\t\t\t\t\t\tself.table.rowManager.addRowActual(arg, false);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.push.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//override array unshift function\r\n\t\tthis.origFuncs.unshift = data.unshift;\r\n\r\n\t\tObject.defineProperty(this.data, \"unshift\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments);\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\targs.forEach((arg) => {\r\n\t\t\t\t\t\tself.table.rowManager.addRowActual(arg, true);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.unshift.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\t//override array shift function\r\n\t\tthis.origFuncs.shift = data.shift;\r\n\r\n\t\tObject.defineProperty(this.data, \"shift\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar row;\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tif(self.data.length){\r\n\t\t\t\t\t\trow = self.table.rowManager.getRowFromDataObject(self.data[0]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.deleteActual();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.shift.call(data);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//override array pop function\r\n\t\tthis.origFuncs.pop = data.pop;\r\n\r\n\t\tObject.defineProperty(this.data, \"pop\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar row;\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tif(self.data.length){\r\n\t\t\t\t\t\trow = self.table.rowManager.getRowFromDataObject(self.data[self.data.length - 1]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.deleteActual();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn self.origFuncs.pop.call(data);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\t//override array splice function\r\n\t\tthis.origFuncs.splice = data.splice;\r\n\r\n\t\tObject.defineProperty(this.data, \"splice\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments),\r\n\t\t\t\tstart = args[0] < 0 ? data.length + args[0] : args[0],\r\n\t\t\t\tend = args[1],\r\n\t\t\t\tnewRows = args[2] ? args.slice(2) : false,\r\n\t\t\t\tstartRow;\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\r\n\t\t\t\t\t//add new rows\r\n\t\t\t\t\tif(newRows){\r\n\t\t\t\t\t\tstartRow = data[start] ? self.table.rowManager.getRowFromDataObject(data[start]) : false;\r\n\r\n\t\t\t\t\t\tif(startRow){\r\n\t\t\t\t\t\t\tnewRows.forEach((rowData) => {\r\n\t\t\t\t\t\t\t\tself.table.rowManager.addRowActual(rowData, true, startRow, true);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnewRows = newRows.slice().reverse();\r\n\r\n\t\t\t\t\t\t\tnewRows.forEach((rowData) => {\r\n\t\t\t\t\t\t\t\tself.table.rowManager.addRowActual(rowData, true, false, true);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//delete removed rows\r\n\t\t\t\t\tif(end !== 0){\r\n\t\t\t\t\t\tvar oldRows = data.slice(start, typeof args[1] === \"undefined\" ? args[1] : start + end);\r\n\r\n\t\t\t\t\t\toldRows.forEach((rowData, i) => {\r\n\t\t\t\t\t\t\tvar row = self.table.rowManager.getRowFromDataObject(rowData);\r\n\r\n\t\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\t\trow.deleteActual(i !== oldRows.length - 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(newRows || end !== 0){\r\n\t\t\t\t\t\tself.table.rowManager.reRenderInPosition();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.splice.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tunwatchData(){\r\n\t\tif(this.data !== false){\r\n\t\t\tfor(var key in this.origFuncs){\r\n\t\t\t\tObject.defineProperty(this.data, key, {\r\n\t\t\t\t\tenumerable: true,\r\n\t\t\t\t\tconfigurable:true,\r\n\t\t\t\t\twritable:true,\r\n\t\t\t\t\tvalue: this.origFuncs.key,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\twatchRow(row){\r\n\t\tvar data = row.getData();\r\n\r\n\t\tthis.blocked = true;\r\n\r\n\t\tfor(var key in data){\r\n\t\t\tthis.watchKey(row, data, key);\r\n\t\t}\r\n\r\n\t\tif(this.table.options.dataTree){\r\n\t\t\tthis.watchTreeChildren(row);\r\n\t\t}\r\n\r\n\t\tthis.blocked = false;\r\n\t}\r\n\r\n\twatchTreeChildren (row){\r\n\t\tvar childField = row.getData()[this.table.options.dataTreeChildField],\r\n\t\torigFuncs = {};\r\n\r\n\t\tfunction rebuildTree(){\r\n\t\t\tthis.table.modules.dataTree.initializeRow(row);\r\n\t\t\tthis.table.modules.dataTree.layoutRow(row);\r\n\t\t\tthis.table.rowManager.refreshActiveData(\"tree\", false, true);\r\n\t\t}\r\n\r\n\t\tif(childField){\r\n\r\n\t\t\torigFuncs.push = childField.push;\r\n\r\n\t\t\tObject.defineProperty(childField, \"push\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.push.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.unshift = childField.unshift;\r\n\r\n\t\t\tObject.defineProperty(childField, \"unshift\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.unshift.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.shift = childField.shift;\r\n\r\n\t\t\tObject.defineProperty(childField, \"shift\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.shift.call(childField);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.pop = childField.pop;\r\n\r\n\t\t\tObject.defineProperty(childField, \"pop\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.pop.call(childField);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.splice = childField.splice;\r\n\r\n\t\t\tObject.defineProperty(childField, \"splice\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.splice.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\twatchKey(row, data, key){\r\n\t\tvar props = Object.getOwnPropertyDescriptor(data, key),\r\n\t\tvalue = data[key],\r\n\t\tversion = this.currentVersion;\r\n\r\n\t\tObject.defineProperty(data, key, {\r\n\t\t\tset: (newValue) => {\r\n\t\t\t\tvalue = newValue;\r\n\t\t\t\tif(!this.blocked && version === this.currentVersion){\r\n\t\t\t\t\tvar update = {};\r\n\t\t\t\t\tupdate[key] = newValue;\r\n\t\t\t\t\trow.updateData(update);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(props.set){\r\n\t\t\t\t\tprops.set(newValue);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tget:() => {\r\n\r\n\t\t\t\tif(props.get){\r\n\t\t\t\t\tprops.get();\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tunwatchRow(row){\r\n\t\tvar data = row.getData();\r\n\r\n\t\tfor(var key in data){\r\n\t\t\tObject.defineProperty(data, key, {\r\n\t\t\t\tvalue:data[key],\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tblock(){\r\n\t\tthis.blocked = true;\r\n\t}\r\n\r\n\tunblock(){\r\n\t\tthis.blocked = false;\r\n\t}\r\n}\r\n\r\nReactiveData.moduleName = \"reactiveData\";\r\n\r\nexport default ReactiveData;\r\n\r\n\r\n\r\n","import Module from '../../core/Module.js';\r\n\r\nclass ResizeColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.startColumn = false;\r\n\t\tthis.startX = false;\r\n\t\tthis.startWidth = false;\r\n\t\tthis.handle = null;\r\n\t\tthis.prevHandle = null;\r\n\t\t\r\n\t\tthis.registerColumnOption(\"resizable\", true);\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\t// if(this.table.options.resizableColumns){\r\n\t\tthis.subscribe(\"cell-layout\", this.layoutCellHandles.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.layoutColumnHeader.bind(this));\r\n\t\t// }\r\n\t}\r\n\t\r\n\tlayoutCellHandles(cell){\r\n\t\tif(cell.row.type === \"row\"){\r\n\t\t\tthis.initializeColumn(\"cell\", cell.column, cell.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutColumnHeader(column){\r\n\t\tthis.initializeColumn(\"header\", column, column.element);\r\n\t}\r\n\t\r\n\tinitializeColumn(type, column, element){\r\n\t\tvar self = this,\r\n\t\tvariableHeight = false,\r\n\t\tmode = column.definition.resizable;\r\n\t\t\r\n\t\t//set column resize mode\r\n\t\tif(type === \"header\"){\r\n\t\t\tvariableHeight = column.definition.formatter == \"textarea\" || column.definition.variableHeight;\r\n\t\t\tcolumn.modules.resize = {variableHeight:variableHeight};\r\n\t\t}\r\n\t\t\r\n\t\tif(mode === true || mode == type){\r\n\t\t\t\r\n\t\t\tvar handle = document.createElement('div');\r\n\t\t\thandle.className = \"tabulator-col-resize-handle\";\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tvar prevHandle = document.createElement('div');\r\n\t\t\tprevHandle.className = \"tabulator-col-resize-handle prev\";\r\n\t\t\t\r\n\t\t\thandle.addEventListener(\"click\", function(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tvar handleDown = function(e){\r\n\t\t\t\tvar nearestColumn = column.getLastColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn && self._checkResizability(nearestColumn)){\r\n\t\t\t\t\tself.startColumn = column;\r\n\t\t\t\t\tself._mouseDown(e, nearestColumn, handle);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\thandle.addEventListener(\"mousedown\", handleDown);\r\n\t\t\thandle.addEventListener(\"touchstart\", handleDown, {passive: true});\r\n\t\t\t\r\n\t\t\t//reszie column on double click\r\n\t\t\thandle.addEventListener(\"dblclick\", function(e){\r\n\t\t\t\tvar col = column.getLastColumn(),\r\n\t\t\t\toldWidth;\r\n\t\t\t\t\r\n\t\t\t\tif(col && self._checkResizability(col)){\r\n\t\t\t\t\toldWidth = col.getWidth();\r\n\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tcol.reinitializeWidth(true);\r\n\r\n\t\t\t\t\tif(oldWidth !== col.getWidth()){\r\n\t\t\t\t\t\tself.dispatch(\"column-resized\", col);\r\n\t\t\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", col.getComponent());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tprevHandle.addEventListener(\"click\", function(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tvar prevHandleDown = function(e){\r\n\t\t\t\tvar nearestColumn, colIndex, prevColumn;\r\n\t\t\t\t\r\n\t\t\t\tnearestColumn = column.getFirstColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn){\r\n\t\t\t\t\tcolIndex = self.table.columnManager.findColumnIndex(nearestColumn);\r\n\t\t\t\t\tprevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(prevColumn && self._checkResizability(prevColumn)){\r\n\t\t\t\t\t\tself.startColumn = column;\r\n\t\t\t\t\t\tself._mouseDown(e, prevColumn, prevHandle);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tprevHandle.addEventListener(\"mousedown\", prevHandleDown);\r\n\t\t\tprevHandle.addEventListener(\"touchstart\", prevHandleDown, {passive: true});\r\n\t\t\t\r\n\t\t\t//resize column on double click\r\n\t\t\tprevHandle.addEventListener(\"dblclick\", function(e){\r\n\t\t\t\tvar nearestColumn, colIndex, prevColumn;\r\n\t\t\t\t\r\n\t\t\t\tnearestColumn = column.getFirstColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn){\r\n\t\t\t\t\tcolIndex = self.table.columnManager.findColumnIndex(nearestColumn);\r\n\t\t\t\t\tprevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(prevColumn && self._checkResizability(prevColumn)){\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tprevColumn.reinitializeWidth(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\telement.appendChild(handle);\r\n\t\t\telement.appendChild(prevHandle);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_checkResizability(column){\r\n\t\treturn column.definition.resizable;\r\n\t}\r\n\t\r\n\t_mouseDown(e, column, handle){\r\n\t\tvar self = this;\r\n\t\t\r\n\t\tself.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tfunction mouseMove(e){\r\n\t\t\t// self.table.columnManager.tempScrollBlock();\r\n\t\t\t\r\n\t\t\tif(self.table.rtl){\r\n\t\t\t\tcolumn.setWidth(self.startWidth - ((typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX) - self.startX));\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.setWidth(self.startWidth + ((typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX) - self.startX));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself.table.columnManager.renderer.rerenderColumns(true);\r\n\t\t\t\r\n\t\t\tif(!self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight){\r\n\t\t\t\tcolumn.checkCellHeights();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfunction mouseUp(e){\r\n\t\t\t\r\n\t\t\t//block editor from taking action while resizing is taking place\r\n\t\t\tif(self.startColumn.modules.edit){\r\n\t\t\t\tself.startColumn.modules.edit.blocked = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight){\r\n\t\t\t\tcolumn.checkCellHeights();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", mouseUp);\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", mouseMove);\r\n\t\t\t\r\n\t\t\thandle.removeEventListener(\"touchmove\", mouseMove);\r\n\t\t\thandle.removeEventListener(\"touchend\", mouseUp);\r\n\t\t\t\r\n\t\t\tself.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tif(self.startWidth !== column.getWidth()){\r\n\t\t\t\tself.dispatch(\"column-resized\", column);\r\n\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", column.getComponent());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\te.stopPropagation(); //prevent resize from interfereing with movable columns\r\n\t\t\r\n\t\t//block editor from taking action while resizing is taking place\r\n\t\tif(self.startColumn.modules.edit){\r\n\t\t\tself.startColumn.modules.edit.blocked = true;\r\n\t\t}\r\n\t\t\r\n\t\tself.startX = typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX;\r\n\t\tself.startWidth = column.getWidth();\r\n\t\t\r\n\t\tdocument.body.addEventListener(\"mousemove\", mouseMove);\r\n\t\tdocument.body.addEventListener(\"mouseup\", mouseUp);\r\n\t\thandle.addEventListener(\"touchmove\", mouseMove, {passive: true});\r\n\t\thandle.addEventListener(\"touchend\", mouseUp);\r\n\t}\r\n}\r\n\r\nResizeColumns.moduleName = \"resizeColumns\";\r\n\r\nexport default ResizeColumns;","import Module from '../../core/Module.js';\r\n\r\nclass ResizeRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.startColumn = false;\r\n\t\tthis.startY = false;\r\n\t\tthis.startHeight = false;\r\n\t\tthis.handle = null;\r\n\t\tthis.prevHandle = null;\r\n\r\n\t\tthis.registerTableOption(\"resizableRows\", false); //resizable rows\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.resizableRows){\r\n\t\t\tthis.subscribe(\"row-layout-after\", this.initializeRow.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\trowEl = row.getElement();\r\n\r\n\t\tvar handle = document.createElement('div');\r\n\t\thandle.className = \"tabulator-row-resize-handle\";\r\n\r\n\t\tvar prevHandle = document.createElement('div');\r\n\t\tprevHandle.className = \"tabulator-row-resize-handle prev\";\r\n\r\n\t\thandle.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tvar handleDown = function(e){\r\n\t\t\tself.startRow = row;\r\n\t\t\tself._mouseDown(e, row, handle);\r\n\t\t};\r\n\r\n\t\thandle.addEventListener(\"mousedown\", handleDown);\r\n\t\thandle.addEventListener(\"touchstart\", handleDown, {passive: true});\r\n\r\n\t\tprevHandle.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tvar prevHandleDown = function(e){\r\n\t\t\tvar prevRow = self.table.rowManager.prevDisplayRow(row);\r\n\r\n\t\t\tif(prevRow){\r\n\t\t\t\tself.startRow = prevRow;\r\n\t\t\t\tself._mouseDown(e, prevRow, prevHandle);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tprevHandle.addEventListener(\"mousedown\",prevHandleDown);\r\n\t\tprevHandle.addEventListener(\"touchstart\",prevHandleDown, {passive: true});\r\n\r\n\t\trowEl.appendChild(handle);\r\n\t\trowEl.appendChild(prevHandle);\r\n\t}\r\n\r\n\t_mouseDown(e, row, handle){\r\n\t\tvar self = this;\r\n\r\n\t\tself.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tfunction mouseMove(e){\r\n\t\t\trow.setHeight(self.startHeight + ((typeof e.screenY === \"undefined\" ? e.touches[0].screenY : e.screenY) - self.startY));\r\n\t\t}\r\n\r\n\t\tfunction mouseUp(e){\r\n\r\n\t\t\t// //block editor from taking action while resizing is taking place\r\n\t\t\t// if(self.startColumn.modules.edit){\r\n\t\t\t// \tself.startColumn.modules.edit.blocked = false;\r\n\t\t\t// }\r\n\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", mouseMove);\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", mouseMove);\r\n\r\n\t\t\thandle.removeEventListener(\"touchmove\", mouseMove);\r\n\t\t\thandle.removeEventListener(\"touchend\", mouseUp);\r\n\r\n\t\t\tself.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tself.dispatchExternal(\"rowResized\", row.getComponent());\r\n\t\t}\r\n\r\n\t\te.stopPropagation(); //prevent resize from interfereing with movable columns\r\n\r\n\t\t//block editor from taking action while resizing is taking place\r\n\t\t// if(self.startColumn.modules.edit){\r\n\t\t// \tself.startColumn.modules.edit.blocked = true;\r\n\t\t// }\r\n\r\n\t\tself.startY = typeof e.screenY === \"undefined\" ? e.touches[0].screenY : e.screenY;\r\n\t\tself.startHeight = row.getHeight();\r\n\r\n\t\tdocument.body.addEventListener(\"mousemove\", mouseMove);\r\n\t\tdocument.body.addEventListener(\"mouseup\", mouseUp);\r\n\r\n\t\thandle.addEventListener(\"touchmove\", mouseMove, {passive: true});\r\n\t\thandle.addEventListener(\"touchend\", mouseUp);\r\n\t}\r\n}\r\n\r\nResizeRows.moduleName = \"resizeRows\";\r\n\r\nexport default ResizeRows;","import Module from '../../core/Module.js';\r\n\r\nclass ResizeTable extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.binding = false;\r\n\t\tthis.observer = false;\r\n\t\tthis.containerObserver = false;\r\n\r\n\t\tthis.tableHeight = 0;\r\n\t\tthis.tableWidth = 0;\r\n\t\tthis.containerHeight = 0;\r\n\t\tthis.containerWidth = 0;\r\n\r\n\t\tthis.autoResize = false;\r\n\r\n\t\tthis.registerTableOption(\"autoResize\", true); //auto resize table\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.autoResize){\r\n\t\t\tvar table = this.table,\r\n\t\t\ttableStyle;\r\n\r\n\t\t\tthis.tableHeight = table.element.clientHeight;\r\n\t\t\tthis.tableWidth = table.element.clientWidth;\r\n\r\n\t\t\tif(table.element.parentNode){\r\n\t\t\t\tthis.containerHeight = table.element.parentNode.clientHeight;\r\n\t\t\t\tthis.containerWidth = table.element.parentNode.clientWidth;\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof ResizeObserver !== \"undefined\" && table.rowManager.getRenderMode() === \"virtual\"){\r\n\r\n\t\t\t\tthis.autoResize = true;\r\n\r\n\t\t\t\tthis.observer = new ResizeObserver((entry) => {\r\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\tvar nodeHeight = Math.floor(entry[0].contentRect.height);\r\n\t\t\t\t\t\tvar nodeWidth = Math.floor(entry[0].contentRect.width);\r\n\r\n\t\t\t\t\t\tif(this.tableHeight != nodeHeight || this.tableWidth != nodeWidth){\r\n\t\t\t\t\t\t\tthis.tableHeight = nodeHeight;\r\n\t\t\t\t\t\t\tthis.tableWidth = nodeWidth;\r\n\r\n\t\t\t\t\t\t\tif(table.element.parentNode){\r\n\t\t\t\t\t\t\t\tthis.containerHeight = table.element.parentNode.clientHeight;\r\n\t\t\t\t\t\t\t\tthis.containerWidth = table.element.parentNode.clientWidth;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tthis.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.observer.observe(table.element);\r\n\r\n\t\t\t\ttableStyle = window.getComputedStyle(table.element);\r\n\r\n\t\t\t\tif(this.table.element.parentNode && !this.table.rowManager.fixedHeight && (tableStyle.getPropertyValue(\"max-height\") || tableStyle.getPropertyValue(\"min-height\"))){\r\n\r\n\t\t\t\t\tthis.containerObserver = new ResizeObserver((entry) => {\r\n\t\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\t\tvar nodeHeight = Math.floor(entry[0].contentRect.height);\r\n\t\t\t\t\t\t\tvar nodeWidth = Math.floor(entry[0].contentRect.width);\r\n\r\n\t\t\t\t\t\t\tif(this.containerHeight != nodeHeight || this.containerWidth != nodeWidth){\r\n\t\t\t\t\t\t\t\tthis.containerHeight = nodeHeight;\r\n\t\t\t\t\t\t\t\tthis.containerWidth = nodeWidth;\r\n\t\t\t\t\t\t\t\tthis.tableHeight = table.element.clientHeight;\r\n\t\t\t\t\t\t\t\tthis.tableWidth = table.element.clientWidth;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\ttable.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tthis.containerObserver.observe(this.table.element.parentNode);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.subscribe(\"table-resize\", this.tableResized.bind(this));\r\n\r\n\t\t\t}else{\r\n\t\t\t\tthis.binding = function(){\r\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile && !table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\ttable.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\twindow.addEventListener(\"resize\", this.binding);\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\ttableResized(){\r\n\t\tthis.table.rowManager.redraw();\r\n\t}\r\n\r\n\tclearBindings(){\r\n\t\tif(this.binding){\r\n\t\t\twindow.removeEventListener(\"resize\", this.binding);\r\n\t\t}\r\n\r\n\t\tif(this.observer){\r\n\t\t\tthis.observer.unobserve(this.table.element);\r\n\t\t}\r\n\r\n\t\tif(this.containerObserver){\r\n\t\t\tthis.containerObserver.unobserve(this.table.element.parentNode);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nResizeTable.moduleName = \"resizeTable\";\r\n\r\nexport default ResizeTable;","import Module from '../../core/Module.js';\r\n\r\nclass ResponsiveLayout extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.columns = [];\r\n\t\tthis.hiddenColumns = [];\r\n\t\tthis.mode = \"\";\r\n\t\tthis.index = 0;\r\n\t\tthis.collapseFormatter = [];\r\n\t\tthis.collapseStartOpen = true;\r\n\t\tthis.collapseHandleColumn = false;\r\n\r\n\t\tthis.registerTableOption(\"responsiveLayout\", false); //responsive layout flags\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseStartOpen\", true); //start showing collapsed data\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseUseFormatters\", true); //responsive layout collapse formatter\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseFormatter\", false); //responsive layout collapse formatter\r\n\r\n\t\tthis.registerColumnOption(\"responsive\");\r\n\t}\r\n\r\n\t//generate responsive columns list\r\n\tinitialize(){\r\n\t\tvar self = this,\r\n\t\tcolumns = [];\r\n\r\n\t\tif(this.table.options.responsiveLayout){\r\n\t\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\t\tthis.subscribe(\"column-show\", this.updateColumnVisibility.bind(this));\r\n\t\t\tthis.subscribe(\"column-hide\", this.updateColumnVisibility.bind(this));\r\n\t\t\tthis.subscribe(\"columns-loaded\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-moved\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-add\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-delete\", this.initializeResponsivity.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"table-redrawing\", this.tableRedraw.bind(this));\r\n\r\n\t\t\tif(this.table.options.responsiveLayout === \"collapse\"){\r\n\t\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\t\tthis.subscribe(\"row-layout\", this.layoutRow.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tif([\"fitColumns\", \"fitDataStretch\"].indexOf(this.layoutMode()) === -1){\r\n\t\t\tif(!force){\r\n\t\t\t\tthis.update();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeResponsivity(){\r\n\t\tvar columns = [];\r\n\r\n\t\tthis.mode = this.table.options.responsiveLayout;\r\n\t\tthis.collapseFormatter = this.table.options.responsiveLayoutCollapseFormatter || this.formatCollapsedData;\r\n\t\tthis.collapseStartOpen = this.table.options.responsiveLayoutCollapseStartOpen;\r\n\t\tthis.hiddenColumns = [];\r\n\r\n\t\t//determine level of responsivity for each column\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column, i) => {\r\n\t\t\tif(column.modules.responsive){\r\n\t\t\t\tif(column.modules.responsive.order && column.modules.responsive.visible){\r\n\t\t\t\t\tcolumn.modules.responsive.index = i;\r\n\t\t\t\t\tcolumns.push(column);\r\n\r\n\t\t\t\t\tif(!column.visible && this.mode === \"collapse\"){\r\n\t\t\t\t\t\tthis.hiddenColumns.push(column);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//sort list by responsivity\r\n\t\tcolumns = columns.reverse();\r\n\t\tcolumns = columns.sort((a, b) => {\r\n\t\t\tvar diff = b.modules.responsive.order - a.modules.responsive.order;\r\n\t\t\treturn diff || (b.modules.responsive.index - a.modules.responsive.index);\r\n\t\t});\r\n\r\n\t\tthis.columns = columns;\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tthis.generateCollapsedContent();\r\n\t\t}\r\n\r\n\t\t//assign collapse column\r\n\t\tfor (let col of this.table.columnManager.columnsByIndex){\r\n\t\t\tif(col.definition.formatter == \"responsiveCollapse\"){\r\n\t\t\t\tthis.collapseHandleColumn = col;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.collapseHandleColumn){\r\n\t\t\tif(this.hiddenColumns.length){\r\n\t\t\t\tthis.collapseHandleColumn.show();\r\n\t\t\t}else{\r\n\t\t\t\tthis.collapseHandleColumn.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//define layout information\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.getDefinition();\r\n\r\n\t\tcolumn.modules.responsive = {order: typeof def.responsive === \"undefined\" ? 1 : def.responsive, visible:def.visible === false ? false : true};\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar el;\r\n\r\n\t\tif(row.type !== \"calc\"){\r\n\t\t\tel = document.createElement(\"div\");\r\n\t\t\tel.classList.add(\"tabulator-responsive-collapse\");\r\n\r\n\t\t\trow.modules.responsiveLayout = {\r\n\t\t\t\telement:el,\r\n\t\t\t\topen:this.collapseStartOpen,\r\n\t\t\t};\r\n\r\n\t\t\tif(!this.collapseStartOpen){\r\n\t\t\t\tel.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tlayoutRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tif(row.modules.responsiveLayout){\r\n\t\t\trowEl.appendChild(row.modules.responsiveLayout.element);\r\n\t\t\tthis.generateCollapsedRowContent(row);\r\n\t\t}\r\n\t}\r\n\r\n\t//update column visibility\r\n\tupdateColumnVisibility(column, responsiveToggle){\r\n\t\tif(!responsiveToggle && column.modules.responsive){\r\n\t\t\tcolumn.modules.responsive.visible = column.visible;\r\n\t\t\tthis.initializeResponsivity();\r\n\t\t}\r\n\t}\r\n\r\n\thideColumn(column){\r\n\t\tvar colCount = this.hiddenColumns.length;\r\n\r\n\t\tcolumn.hide(false, true);\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tthis.hiddenColumns.unshift(column);\r\n\t\t\tthis.generateCollapsedContent();\r\n\r\n\t\t\tif(this.collapseHandleColumn && !colCount){\r\n\t\t\t\tthis.collapseHandleColumn.show();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tshowColumn(column){\r\n\t\tvar index;\r\n\r\n\t\tcolumn.show(false, true);\r\n\t\t//set column width to prevent calculation loops on uninitialized columns\r\n\t\tcolumn.setWidth(column.getWidth());\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tindex = this.hiddenColumns.indexOf(column);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.hiddenColumns.splice(index, 1);\r\n\t\t\t}\r\n\r\n\t\t\tthis.generateCollapsedContent();\r\n\r\n\t\t\tif(this.collapseHandleColumn && !this.hiddenColumns.length){\r\n\t\t\t\tthis.collapseHandleColumn.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//redraw columns to fit space\r\n\tupdate(){\r\n\t\tvar self = this,\r\n\t\tworking = true;\r\n\r\n\t\twhile(working){\r\n\r\n\t\t\tlet width = self.table.modules.layout.getMode() == \"fitColumns\" ? self.table.columnManager.getFlexBaseWidth() : self.table.columnManager.getWidth();\r\n\r\n\t\t\tlet diff = (self.table.options.headerVisible ? self.table.columnManager.element.clientWidth : self.table.element.clientWidth) - width;\r\n\r\n\t\t\tif(diff < 0){\r\n\t\t\t\t//table is too wide\r\n\t\t\t\tlet column = self.columns[self.index];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tself.hideColumn(column);\r\n\t\t\t\t\tself.index ++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tworking = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\r\n\t\t\t\t//table has spare space\r\n\t\t\t\tlet column = self.columns[self.index -1];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tif(diff > 0){\r\n\t\t\t\t\t\tif(diff >= column.getWidth()){\r\n\t\t\t\t\t\t\tself.showColumn(column);\r\n\t\t\t\t\t\t\tself.index --;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tworking = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tworking = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(!self.table.rowManager.activeRowsCount){\r\n\t\t\t\tself.table.rowManager.renderEmptyScroll();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateCollapsedContent(){\r\n\t\tvar self = this,\r\n\t\trows = this.table.rowManager.getDisplayRows();\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\tself.generateCollapsedRowContent(row);\r\n\t\t});\r\n\t}\r\n\r\n\tgenerateCollapsedRowContent(row){\r\n\t\tvar el, contents;\r\n\r\n\t\tif(row.modules.responsiveLayout){\r\n\t\t\tel = row.modules.responsiveLayout.element;\r\n\r\n\t\t\twhile(el.firstChild) el.removeChild(el.firstChild);\r\n\r\n\t\t\tcontents = this.collapseFormatter(this.generateCollapsedRowData(row));\r\n\t\t\tif(contents){\r\n\t\t\t\tel.appendChild(contents);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateCollapsedRowData(row){\r\n\t\tvar self = this,\r\n\t\tdata = row.getData(),\r\n\t\toutput = [],\r\n\t\tmockCellComponent;\r\n\r\n\t\tthis.hiddenColumns.forEach(function(column){\r\n\t\t\tvar value = column.getFieldValue(data);\r\n\r\n\t\t\tif(column.definition.title && column.field){\r\n\t\t\t\tif(column.modules.format && self.table.options.responsiveLayoutCollapseUseFormatters){\r\n\r\n\t\t\t\t\tmockCellComponent = {\r\n\t\t\t\t\t\tvalue:false,\r\n\t\t\t\t\t\tdata:{},\r\n\t\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetData:function(){\r\n\t\t\t\t\t\t\treturn data;\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\t\treturn document.createElement(\"div\");\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\t\treturn row.getComponent();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tfunction onRendered(callback){\r\n\t\t\t\t\t\tcallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\toutput.push({\r\n\t\t\t\t\t\tfield: column.field,\r\n\t\t\t\t\t\ttitle: column.definition.title,\r\n\t\t\t\t\t\tvalue: column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params, onRendered)\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput.push({\r\n\t\t\t\t\t\tfield: column.field,\r\n\t\t\t\t\t\ttitle: column.definition.title,\r\n\t\t\t\t\t\tvalue: value\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tformatCollapsedData(data){\r\n\t\tvar list = document.createElement(\"table\");\r\n\r\n\t\tdata.forEach(function(item){\r\n\t\t\tvar row = document.createElement(\"tr\");\r\n\t\t\tvar titleData = document.createElement(\"td\");\r\n\t\t\tvar valueData = document.createElement(\"td\");\r\n\t\t\tvar node_content;\r\n\r\n\t\t\tvar titleHighlight = document.createElement(\"strong\");\r\n\t\t\ttitleData.appendChild(titleHighlight);\r\n\t\t\tthis.langBind(\"columns|\" + item.field, function(text){\r\n\t\t\t\ttitleHighlight.innerHTML = text || item.title;\r\n\t\t\t});\r\n\r\n\t\t\tif(item.value instanceof Node){\r\n\t\t\t\tnode_content = document.createElement(\"div\");\r\n\t\t\t\tnode_content.appendChild(item.value);\r\n\t\t\t\tvalueData.appendChild(node_content);\r\n\t\t\t}else{\r\n\t\t\t\tvalueData.innerHTML = item.value;\r\n\t\t\t}\r\n\r\n\t\t\trow.appendChild(titleData);\r\n\t\t\trow.appendChild(valueData);\r\n\t\t\tlist.appendChild(row);\r\n\t\t}, this);\r\n\r\n\t\treturn Object.keys(data).length ? list : \"\";\r\n\t}\r\n}\r\n\r\nResponsiveLayout.moduleName = \"responsiveLayout\";\r\n\r\nexport default ResponsiveLayout;","import Module from '../../core/Module.js';\r\n\r\nclass SelectRow extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.selecting = false; //flag selecting in progress\r\n\t\tthis.lastClickedRow = false; //last clicked row\r\n\t\tthis.selectPrev = []; //hold previously selected element for drag drop selection\r\n\t\tthis.selectedRows = []; //hold selected rows\r\n\t\tthis.headerCheckboxElement = null; // hold header select element\r\n\t\t\r\n\t\tthis.registerTableOption(\"selectable\", \"highlight\"); //highlight rows on hover\r\n\t\tthis.registerTableOption(\"selectableRangeMode\", \"drag\"); //highlight rows on hover\r\n\t\tthis.registerTableOption(\"selectableRollingSelection\", true); //roll selection once maximum number of selectable rows is reached\r\n\t\tthis.registerTableOption(\"selectablePersistence\", true); // maintain selection when table view is updated\r\n\t\tthis.registerTableOption(\"selectableCheck\", function(data, row){return true;}); //check wheather row is selectable\r\n\t\t\r\n\t\tthis.registerTableFunction(\"selectRow\", this.selectRows.bind(this));\r\n\t\tthis.registerTableFunction(\"deselectRow\", this.deselectRows.bind(this));\r\n\t\tthis.registerTableFunction(\"toggleSelectRow\", this.toggleRow.bind(this));\r\n\t\tthis.registerTableFunction(\"getSelectedRows\", this.getSelectedRows.bind(this));\r\n\t\tthis.registerTableFunction(\"getSelectedData\", this.getSelectedData.bind(this));\r\n\t\t\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"select\", this.selectRows.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"deselect\", this.deselectRows.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"toggleSelect\", this.toggleRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isSelected\", this.isRowSelected.bind(this));\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.selectable !== false){\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleting\", this.rowDeleted.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.clearSelectionData.bind(this));\r\n\t\t\tthis.subscribe(\"rows-retrieve\", this.rowRetrieve.bind(this));\r\n\t\t\t\r\n\t\t\tif(this.table.options.selectable && !this.table.options.selectablePersistence){\r\n\t\t\t\tthis.subscribe(\"data-refreshing\", this.deselectRows.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trowRetrieve(type, prevValue){\r\n\t\treturn type === \"selected\" ? this.selectedRows : prevValue;\r\n\t}\r\n\t\r\n\trowDeleted(row){\r\n\t\tthis._deselectRow(row, true);\r\n\t}\r\n\t\r\n\tclearSelectionData(silent){\r\n\t\tthis.selecting = false;\r\n\t\tthis.lastClickedRow = false;\r\n\t\tthis.selectPrev = [];\r\n\t\tthis.selectedRows = [];\r\n\t\t\r\n\t\tif(silent !== true){\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\telement = row.getElement();\r\n\t\t\r\n\t\t// trigger end of row selection\r\n\t\tvar endSelect = function(){\r\n\t\t\t\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tself.selecting = false;\r\n\t\t\t}, 50);\r\n\t\t\t\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", endSelect);\r\n\t\t};\r\n\t\t\r\n\t\trow.modules.select = {selected:false};\r\n\t\t\r\n\t\t//set row selection class\r\n\t\tif(self.table.options.selectableCheck.call(this.table, row.getComponent())){\r\n\t\t\telement.classList.add(\"tabulator-selectable\");\r\n\t\t\telement.classList.remove(\"tabulator-unselectable\");\r\n\t\t\t\r\n\t\t\tif(self.table.options.selectable && self.table.options.selectable != \"highlight\"){\r\n\t\t\t\tif(self.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\telement.addEventListener(\"click\", this.handleComplexRowClick.bind(this, row));\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.addEventListener(\"click\", function(e){\r\n\t\t\t\t\t\tif(!self.table.modExists(\"edit\") || !self.table.modules.edit.getCurrentCell()){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(!self.selecting){\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\t\t\tif(e.shiftKey){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.selecting = true;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.selectPrev = [];\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tdocument.body.addEventListener(\"mouseup\", endSelect);\r\n\t\t\t\t\t\t\tdocument.body.addEventListener(\"keyup\", endSelect);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mouseenter\", function(e){\r\n\t\t\t\t\t\tif(self.selecting){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(self.selectPrev[1] == row){\r\n\t\t\t\t\t\t\t\tself.toggleRow(self.selectPrev[0]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mouseout\", function(e){\r\n\t\t\t\t\t\tif(self.selecting){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\tself.selectPrev.unshift(row);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\telement.classList.add(\"tabulator-unselectable\");\r\n\t\t\telement.classList.remove(\"tabulator-selectable\");\r\n\t\t}\r\n\t}\r\n\t\r\n\thandleComplexRowClick(row, e){\r\n\t\tif(e.shiftKey){\r\n\t\t\tthis.table._clearSelection();\r\n\t\t\tthis.lastClickedRow = this.lastClickedRow || row;\r\n\t\t\t\r\n\t\t\tvar lastClickedRowIdx = this.table.rowManager.getDisplayRowIndex(this.lastClickedRow);\r\n\t\t\tvar rowIdx = this.table.rowManager.getDisplayRowIndex(row);\r\n\t\t\t\r\n\t\t\tvar fromRowIdx = lastClickedRowIdx <= rowIdx ? lastClickedRowIdx : rowIdx;\r\n\t\t\tvar toRowIdx = lastClickedRowIdx >= rowIdx ? lastClickedRowIdx : rowIdx;\r\n\t\t\t\r\n\t\t\tvar rows = this.table.rowManager.getDisplayRows().slice(0);\r\n\t\t\tvar toggledRows = rows.splice(fromRowIdx, toRowIdx - fromRowIdx + 1);\r\n\t\t\t\r\n\t\t\tif(e.ctrlKey || e.metaKey){\r\n\t\t\t\ttoggledRows.forEach((toggledRow)=>{\r\n\t\t\t\t\tif(toggledRow !== this.lastClickedRow){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.table.options.selectable !== true && !this.isRowSelected(row)){\r\n\t\t\t\t\t\t\tif(this.selectedRows.length < this.table.options.selectable){\r\n\t\t\t\t\t\t\t\tthis.toggleRow(toggledRow);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.toggleRow(toggledRow);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tthis.lastClickedRow = row;\r\n\t\t\t}else{\r\n\t\t\t\tthis.deselectRows(undefined, true);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.selectable !== true){\r\n\t\t\t\t\tif(toggledRows.length > this.table.options.selectable){\r\n\t\t\t\t\t\ttoggledRows = toggledRows.slice(0, this.table.options.selectable)\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.selectRows(toggledRows);\r\n\t\t\t}\r\n\t\t\tthis.table._clearSelection();\r\n\t\t}\r\n\t\telse if(e.ctrlKey || e.metaKey){\r\n\t\t\tthis.toggleRow(row);\r\n\t\t\tthis.lastClickedRow = row;\r\n\t\t}else{\r\n\t\t\tthis.deselectRows(undefined, true);\r\n\t\t\tthis.selectRows(row);\r\n\t\t\tthis.lastClickedRow = row;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//toggle row selection\r\n\ttoggleRow(row){\r\n\t\tif(this.table.options.selectableCheck.call(this.table, row.getComponent())){\r\n\t\t\tif(row.modules.select && row.modules.select.selected){\r\n\t\t\t\tthis._deselectRow(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis._selectRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//select a number of rows\r\n\tselectRows(rows){\r\n\t\tvar rowMatch;\r\n\t\t\r\n\t\tswitch(typeof rows){\r\n\t\t\tcase \"undefined\":\r\n\t\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"string\":\r\n\t\t\t\r\n\t\t\trowMatch = this.table.rowManager.findRow(rows);\r\n\t\t\t\r\n\t\t\tif(rowMatch){\r\n\t\t\t\tthis._selectRow(rowMatch, true, true);\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.rowManager.getRows(rows).forEach((row) => {\r\n\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\tif(Array.isArray(rows)){\r\n\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis._rowSelectionChanged();\r\n\t\t\t}else{\r\n\t\t\t\tthis._selectRow(rows, false, true);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//select an individual row\r\n\t_selectRow(rowInfo, silent, force){\r\n\t\tvar index;\r\n\t\t\r\n\t\t//handle max row count\r\n\t\tif(!isNaN(this.table.options.selectable) && this.table.options.selectable !== true && !force){\r\n\t\t\tif(this.selectedRows.length >= this.table.options.selectable){\r\n\t\t\t\tif(this.table.options.selectableRollingSelection){\r\n\t\t\t\t\tthis._deselectRow(this.selectedRows[0]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tvar row = this.table.rowManager.findRow(rowInfo);\r\n\t\t\r\n\t\tif(row){\r\n\t\t\tif(this.selectedRows.indexOf(row) == -1){\r\n\t\t\t\trow.getElement().classList.add(\"tabulator-selected\");\r\n\t\t\t\tif(!row.modules.select){\r\n\t\t\t\t\trow.modules.select = {};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\trow.modules.select.selected = true;\r\n\t\t\t\tif(row.modules.select.checkboxEl){\r\n\t\t\t\t\trow.modules.select.checkboxEl.checked = true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.selectedRows.push(row);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.dataTreeSelectPropagate){\r\n\t\t\t\t\tthis.childRowSelection(row, true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatchExternal(\"rowSelected\", row.getComponent());\r\n\t\t\t\t\r\n\t\t\t\tthis._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Selection Error - No such row found, ignoring selection:\" + rowInfo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tisRowSelected(row){\r\n\t\treturn this.selectedRows.indexOf(row) !== -1;\r\n\t}\r\n\t\r\n\t//deselect a number of rows\r\n\tdeselectRows(rows, silent){\r\n\t\tvar self = this,\r\n\t\trowCount;\r\n\t\t\r\n\t\tif(typeof rows == \"undefined\"){\r\n\t\t\t\r\n\t\t\trowCount = self.selectedRows.length;\r\n\t\t\t\r\n\t\t\tfor(let i = 0; i < rowCount; i++){\r\n\t\t\t\tself._deselectRow(self.selectedRows[0], true);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(rowCount){\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tif(Array.isArray(rows)){\r\n\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\tself._deselectRow(row, true);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}else{\r\n\t\t\t\tself._deselectRow(rows, silent);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//deselect an individual row\r\n\t_deselectRow(rowInfo, silent){\r\n\t\tvar self = this,\r\n\t\trow = self.table.rowManager.findRow(rowInfo),\r\n\t\tindex;\r\n\t\t\r\n\t\tif(row){\r\n\t\t\tindex = self.selectedRows.findIndex(function(selectedRow){\r\n\t\t\t\treturn selectedRow == row;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\t\r\n\t\t\t\trow.getElement().classList.remove(\"tabulator-selected\");\r\n\t\t\t\tif(!row.modules.select){\r\n\t\t\t\t\trow.modules.select = {};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\trow.modules.select.selected = false;\r\n\t\t\t\tif(row.modules.select.checkboxEl){\r\n\t\t\t\t\trow.modules.select.checkboxEl.checked = false;\r\n\t\t\t\t}\r\n\t\t\t\tself.selectedRows.splice(index, 1);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.dataTreeSelectPropagate){\r\n\t\t\t\t\tthis.childRowSelection(row, false);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatchExternal(\"rowDeselected\", row.getComponent());\r\n\t\t\t\t\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Deselection Error - No such row found, ignoring selection:\" + rowInfo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSelectedData(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tthis.selectedRows.forEach(function(row){\r\n\t\t\tdata.push(row.getData());\r\n\t\t});\r\n\t\t\r\n\t\treturn data;\r\n\t}\r\n\t\r\n\tgetSelectedRows(){\r\n\t\t\r\n\t\tvar rows = [];\r\n\t\t\r\n\t\tthis.selectedRows.forEach(function(row){\r\n\t\t\trows.push(row.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t_rowSelectionChanged(silent){\r\n\t\tif(this.headerCheckboxElement){\r\n\t\t\tif(this.selectedRows.length === 0){\r\n\t\t\t\tthis.headerCheckboxElement.checked = false;\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = false;\r\n\t\t\t} else if(this.table.rowManager.rows.length === this.selectedRows.length){\r\n\t\t\t\tthis.headerCheckboxElement.checked = true;\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = false;\r\n\t\t\t} else {\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = true;\r\n\t\t\t\tthis.headerCheckboxElement.checked = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(!silent){\r\n\t\t\tthis.dispatchExternal(\"rowSelectionChanged\", this.getSelectedData(), this.getSelectedRows());\r\n\t\t}\r\n\t}\r\n\t\r\n\tregisterRowSelectCheckbox (row, element) {\r\n\t\tif(!row._row.modules.select){\r\n\t\t\trow._row.modules.select = {};\r\n\t\t}\r\n\t\t\r\n\t\trow._row.modules.select.checkboxEl = element;\r\n\t}\r\n\t\r\n\tregisterHeaderSelectCheckbox (element) {\r\n\t\tthis.headerCheckboxElement = element;\r\n\t}\r\n\t\r\n\tchildRowSelection(row, select){\r\n\t\tvar children = this.table.modules.dataTree.getChildren(row, true);\r\n\t\t\r\n\t\tif(select){\r\n\t\t\tfor(let child of children){\r\n\t\t\t\tthis._selectRow(child, true);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tfor(let child of children){\r\n\t\t\t\tthis._deselectRow(child, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nSelectRow.moduleName = \"selectRow\";\r\n\r\nexport default SelectRow;","//sort datetime\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar format = params.format || \"dd/MM/yyyy HH:mm:ss\",\r\n\talignEmptyValues = params.alignEmptyValues,\r\n\temptyAlign = 0;\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\ta = format === \"iso\" ? DT.fromISO(String(a)) : DT.fromFormat(String(a), format);\r\n\t\tb = format === \"iso\" ? DT.fromISO(String(b)) : DT.fromFormat(String(b), format);\r\n\r\n\t\tif(!a.isValid){\r\n\t\t\temptyAlign = !b.isValid ? 0 : -1;\r\n\t\t}else if(!b.isValid){\r\n\t\t\temptyAlign = 1;\r\n\t\t}else{\r\n\t\t\t//compare valid values\r\n\t\t\treturn a - b;\r\n\t\t}\r\n\r\n\t\t//fix empty values in position\r\n\t\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\t\temptyAlign *= -1;\r\n\t\t}\r\n\r\n\t\treturn emptyAlign;\r\n\r\n\t}else{\r\n\t\tconsole.error(\"Sort Error - 'datetime' sorter is dependant on luxon.js\");\r\n\t}\r\n};","import datetime from './datetime.js';\r\n\r\n//sort date\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tif(!params.format){\r\n\t\tparams.format = \"dd/MM/yyyy\";\r\n\t}\r\n\r\n\treturn datetime.call(this, a, b, aRow, bRow, column, dir, params);\r\n};","//sort numbers\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar decimal = params.decimalSeparator;\r\n\tvar thousand = params.thousandSeparator;\r\n\tvar emptyAlign = 0;\r\n\r\n\ta = String(a);\r\n\tb = String(b);\r\n\r\n\tif(thousand){\r\n\t\ta = a.split(thousand).join(\"\");\r\n\t\tb = b.split(thousand).join(\"\");\r\n\t}\r\n\r\n\tif(decimal){\r\n\t\ta = a.split(decimal).join(\".\");\r\n\t\tb = b.split(decimal).join(\".\");\r\n\t}\r\n\r\n\ta = parseFloat(a);\r\n\tb = parseFloat(b);\r\n\r\n\t//handle non numeric values\r\n\tif(isNaN(a)){\r\n\t\temptyAlign = isNaN(b) ? 0 : -1;\r\n\t}else if(isNaN(b)){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\t\t//compare valid values\r\n\t\treturn a - b;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","import number from './sorters/number.js';\r\nimport string from './sorters/string.js';\r\nimport date from './sorters/date.js';\r\nimport time from './sorters/time.js';\r\nimport datetime from './sorters/datetime.js';\r\nimport boolean from './sorters/boolean.js';\r\nimport array from './sorters/array.js';\r\nimport exists from './sorters/exists.js';\r\nimport alphanum from './sorters/alphanum.js';\r\n\r\nexport default {\r\n\tnumber:number,\r\n\tstring:string,\r\n\tdate:date,\r\n\ttime:time,\r\n\tdatetime:datetime,\r\n\tboolean:boolean,\r\n\tarray:array,\r\n\texists:exists,\r\n\talphanum:alphanum\r\n};","//sort strings\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\tvar locale;\r\n\r\n\t//handle empty values\r\n\tif(!a){\r\n\t\temptyAlign = !b ? 0 : -1;\r\n\t}else if(!b){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\t\t//compare valid values\r\n\t\tswitch(typeof params.locale){\r\n\t\t\tcase \"boolean\":\r\n\t\t\tif(params.locale){\r\n\t\t\t\tlocale = this.langLocale();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"string\":\r\n\t\t\tlocale = params.locale;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn String(a).toLowerCase().localeCompare(String(b).toLowerCase(), locale);\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","import datetime from './datetime.js';\r\n\r\n//sort times\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tif(!params.format){\r\n\t\tparams.format = \"HH:mm\";\r\n\t}\r\n\r\n\treturn datetime.call(this, a, b, aRow, bRow, column, dir, params);\r\n};","//sort booleans\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = a === true || a === \"true\" || a === \"True\" || a === 1 ? 1 : 0;\r\n\tvar el2 = b === true || b === \"true\" || b === \"True\" || b === 1 ? 1 : 0;\r\n\r\n\treturn el1 - el2;\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultSorters from './defaults/sorters.js';\r\n\r\nclass Sort extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t \tthis.sortList = []; //holder current sort\r\n\t \tthis.changed = false; //has the sort changed since last render\r\n\r\n\t \tthis.registerTableOption(\"sortMode\", \"local\"); //local or remote sorting\r\n\r\n\t \tthis.registerTableOption(\"initialSort\", false); //initial sorting criteria\r\n\t \tthis.registerTableOption(\"columnHeaderSortMulti\", true); //multiple or single column sorting\r\n\t \tthis.registerTableOption(\"sortOrderReverse\", false); //reverse internal sort ordering\r\n\t \tthis.registerTableOption(\"headerSortElement\", \"
\"); //header sort element\r\n\r\n\t \tthis.registerColumnOption(\"sorter\");\r\n\t \tthis.registerColumnOption(\"sorterParams\");\r\n\r\n\t \tthis.registerColumnOption(\"headerSort\", true);\r\n\t \tthis.registerColumnOption(\"headerSortStartingDir\");\r\n\t \tthis.registerColumnOption(\"headerSortTristate\");\r\n\r\n\t }\r\n\r\n\t initialize(){\r\n\t \tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t \tthis.subscribe(\"table-built\", this.tableBuilt.bind(this));\r\n\t \tthis.registerDataHandler(this.sort.bind(this), 20);\r\n\r\n\t \tthis.registerTableFunction(\"setSort\", this.userSetSort.bind(this));\r\n\t \tthis.registerTableFunction(\"getSorters\", this.getSort.bind(this));\r\n\t \tthis.registerTableFunction(\"clearSort\", this.clearSort.bind(this));\r\n\r\n\t \tif(this.table.options.sortMode === \"remote\"){\r\n\t \t\tthis.subscribe(\"data-params\", this.remoteSortParams.bind(this));\r\n\t \t}\r\n\t }\r\n\r\n\t tableBuilt(){\r\n\t \tif(this.table.options.initialSort){\r\n\t \t\tthis.setSort(this.table.options.initialSort);\r\n\t \t}\r\n\t }\r\n\r\n\t remoteSortParams(data, config, silent, params){\r\n\t \tvar sorters = this.getSort();\r\n\r\n\t \tsorters.forEach((item) => {\r\n\t \t\tdelete item.column;\r\n\t \t});\r\n\r\n\t \tparams.sort = sorters;\r\n\r\n\t \treturn params;\r\n\t }\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tuserSetSort(sortList, dir){\r\n\t\tthis.setSort(sortList, dir);\r\n\t\t// this.table.rowManager.sorterRefresh();\r\n\t\tthis.refreshSort();\r\n\t}\r\n\r\n\tclearSort(){\r\n\t\tthis.clear();\r\n\t\t// this.table.rowManager.sorterRefresh();\r\n\t\tthis.refreshSort();\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\t//initialize column header for sorting\r\n\tinitializeColumn(column){\r\n\t\tvar sorter = false,\r\n\t\tcolEl,\r\n\t\tarrowEl;\r\n\r\n\t\tswitch(typeof column.definition.sorter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Sort.sorters[column.definition.sorter]){\r\n\t\t\t\tsorter = Sort.sorters[column.definition.sorter];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Sort Error - No such sorter found: \", column.definition.sorter);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tsorter = column.definition.sorter;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tcolumn.modules.sort = {\r\n\t\t\tsorter:sorter, dir:\"none\",\r\n\t\t\tparams:column.definition.sorterParams || {},\r\n\t\t\tstartingDir:column.definition.headerSortStartingDir || \"asc\",\r\n\t\t\ttristate: column.definition.headerSortTristate,\r\n\t\t};\r\n\r\n\t\tif(column.definition.headerSort !== false){\r\n\r\n\t\t\tcolEl = column.getElement();\r\n\r\n\t\t\tcolEl.classList.add(\"tabulator-sortable\");\r\n\r\n\r\n\t\t\tarrowEl = document.createElement(\"div\");\r\n\t\t\tarrowEl.classList.add(\"tabulator-col-sorter\");\r\n\r\n\t\t\tif(typeof this.table.options.headerSortElement == \"object\"){\r\n\t\t\t\tarrowEl.appendChild(this.table.options.headerSortElement);\r\n\t\t\t}else{\r\n\t\t\t\tarrowEl.innerHTML = this.table.options.headerSortElement;\r\n\t\t\t}\r\n\r\n\t\t\t//create sorter arrow\r\n\t\t\tcolumn.titleHolderElement.appendChild(arrowEl);\r\n\r\n\t\t\tcolumn.modules.sort.element = arrowEl;\r\n\r\n\t\t\t//sort on click\r\n\t\t\tcolEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\tvar dir = \"\",\r\n\t\t\t\tsorters=[],\r\n\t\t\t\tmatch = false;\r\n\r\n\t\t\t\tif(column.modules.sort){\r\n\t\t\t\t\tif(column.modules.sort.tristate){\r\n\t\t\t\t\t\tif(column.modules.sort.dir == \"none\"){\r\n\t\t\t\t\t\t\tdir = column.modules.sort.startingDir;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(column.modules.sort.dir == column.modules.sort.startingDir){\r\n\t\t\t\t\t\t\t\tdir = column.modules.sort.dir == \"asc\" ? \"desc\" : \"asc\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tdir = \"none\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswitch(column.modules.sort.dir){\r\n\t\t\t\t\t\t\tcase \"asc\":\r\n\t\t\t\t\t\t\tdir = \"desc\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tcase \"desc\":\r\n\t\t\t\t\t\t\tdir = \"asc\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tdir = column.modules.sort.startingDir;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\tif (this.table.options.columnHeaderSortMulti && (e.shiftKey || e.ctrlKey)) {\r\n\t\t\t\t\t\tsorters = this.getSort();\r\n\r\n\t\t\t\t\t\tmatch = sorters.findIndex((sorter) => {\r\n\t\t\t\t\t\t\treturn sorter.field === column.getField();\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tif(match > -1){\r\n\t\t\t\t\t\t\tsorters[match].dir = dir;\r\n\r\n\t\t\t\t\t\t\tif(match != sorters.length -1){\r\n\t\t\t\t\t\t\t\tmatch = sorters.splice(match, 1)[0];\r\n\t\t\t\t\t\t\t\tif(dir != \"none\"){\r\n\t\t\t\t\t\t\t\t\tsorters.push(match);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(dir != \"none\"){\r\n\t\t\t\t\t\t\t\tsorters.push({column:column, dir:dir});\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t//add to existing sort\r\n\t\t\t\t\t\tthis.setSort(sorters);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(dir == \"none\"){\r\n\t\t\t\t\t\t\tthis.clear();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t//sort by column only\r\n\t\t\t\t\t\t\tthis.setSort(column, dir);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// this.table.rowManager.sorterRefresh(!this.sortList.length);\r\n\t\t\t\t\tthis.refreshSort();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\trefreshSort(){\r\n\t\tif(this.table.options.sortMode === \"remote\"){\r\n\t\t\tthis.reloadData();\r\n\t\t}else{\r\n\t\t\tthis.refreshData(true);\r\n\t\t}\r\n\r\n\t\t//TODO - Persist left position of row manager\r\n\t\t// left = this.scrollLeft;\r\n\t\t// this.scrollHorizontal(left);\r\n\t}\r\n\r\n\t//check if the sorters have changed since last use\r\n\thasChanged(){\r\n\t\tvar changed = this.changed;\r\n\t\tthis.changed = false;\r\n\t\treturn changed;\r\n\t}\r\n\r\n\t//return current sorters\r\n\tgetSort(){\r\n\t\tvar self = this,\r\n\t\tsorters = [];\r\n\r\n\t\tself.sortList.forEach(function(item){\r\n\t\t\tif(item.column){\r\n\t\t\t\tsorters.push({column:item.column.getComponent(), field:item.column.getField(), dir:item.dir});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn sorters;\r\n\t}\r\n\r\n\t//change sort list and trigger sort\r\n\tsetSort(sortList, dir){\r\n\t\tvar self = this,\r\n\t\tnewSortList = [];\r\n\r\n\t\tif(!Array.isArray(sortList)){\r\n\t\t\tsortList = [{column: sortList, dir:dir}];\r\n\t\t}\r\n\r\n\t\tsortList.forEach(function(item){\r\n\t\t\tvar column;\r\n\r\n\t\t\tcolumn = self.table.columnManager.findColumn(item.column);\r\n\r\n\t\t\tif(column){\r\n\t\t\t\titem.column = column;\r\n\t\t\t\tnewSortList.push(item);\r\n\t\t\t\tself.changed = true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Sort Warning - Sort field does not exist and is being ignored: \", item.column);\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\t\tself.sortList = newSortList;\r\n\r\n\t\tthis.dispatch(\"sort-changed\");\r\n\t}\r\n\r\n\t//clear sorters\r\n\tclear(){\r\n\t\tthis.setSort([]);\r\n\t}\r\n\r\n\t//find appropriate sorter for column\r\n\tfindSorter(column){\r\n\t\tvar row = this.table.rowManager.activeRows[0],\r\n\t\tsorter = \"string\",\r\n\t\tfield, value;\r\n\r\n\t\tif(row){\r\n\t\t\trow = row.getData();\r\n\t\t\tfield = column.getField();\r\n\r\n\t\t\tif(field){\r\n\r\n\t\t\t\tvalue = column.getFieldValue(row);\r\n\r\n\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){\r\n\t\t\t\t\t\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn Sort.sorters[sorter];\r\n\t}\r\n\r\n\t//work through sort list sorting data\r\n\tsort(data){\r\n\t\tvar self = this,\r\n\t\tsortList = this.table.options.sortOrderReverse ? self.sortList.slice().reverse() : self.sortList,\r\n\t\tsortListActual = [],\r\n\t\trowComponents = [],\r\n\t\tlastSort;\r\n\r\n\t\tif(this.subscribedExternal(\"dataSorting\")){\r\n\t\t\tthis.dispatchExternal(\"dataSorting\", self.getSort());\r\n\t\t}\r\n\r\n\t\tself.clearColumnHeaders();\r\n\r\n\t\tif(this.table.options.sortMode !== \"remote\"){\r\n\r\n\t\t\t//build list of valid sorters and trigger column specific callbacks before sort begins\r\n\t\t\tsortList.forEach(function(item, i){\r\n\t\t\t\tvar sortObj = item.column.modules.sort;\r\n\r\n\t\t\t\tif(item.column && sortObj){\r\n\r\n\t\t\t\t\t//if no sorter has been defined, take a guess\r\n\t\t\t\t\tif(!sortObj.sorter){\r\n\t\t\t\t\t\tsortObj.sorter = self.findSorter(item.column);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\titem.params = typeof sortObj.params === \"function\" ? sortObj.params(item.column.getComponent(), item.dir) : sortObj.params;\r\n\r\n\t\t\t\t\tsortListActual.push(item);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tself.setColumnHeader(item.column, item.dir);\r\n\t\t\t});\r\n\r\n\t\t\t//sort data\r\n\t\t\tif (sortListActual.length) {\r\n\t\t\t\tself._sortItems(data, sortListActual);\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tsortList.forEach(function(item, i){\r\n\t\t\t\tself.setColumnHeader(item.column, item.dir);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.subscribedExternal(\"dataSorted\")){\r\n\t\t\tdata.forEach((row) => {\r\n\t\t\t\trowComponents.push(row.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatchExternal(\"dataSorted\", self.getSort(), rowComponents);\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//clear sort arrows on columns\r\n\tclearColumnHeaders(){\r\n\t\tthis.table.columnManager.getRealColumns().forEach(function(column){\r\n\t\t\tif(column.modules.sort){\r\n\t\t\t\tcolumn.modules.sort.dir = \"none\";\r\n\t\t\t\tcolumn.getElement().setAttribute(\"aria-sort\", \"none\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//set the column header sort direction\r\n\tsetColumnHeader(column, dir){\r\n\t\tcolumn.modules.sort.dir = dir;\r\n\t\tcolumn.getElement().setAttribute(\"aria-sort\", dir);\r\n\t}\r\n\r\n\t//sort each item in sort list\r\n\t_sortItems(data, sortList){\r\n\t\tvar sorterCount = sortList.length - 1;\r\n\r\n\t\tdata.sort((a, b) => {\r\n\t\t\tvar result;\r\n\r\n\t\t\tfor(var i = sorterCount; i>= 0; i--){\r\n\t\t\t\tlet sortItem = sortList[i];\r\n\r\n\t\t\t\tresult = this._sortRow(a, b, sortItem.column, sortItem.dir, sortItem.params);\r\n\r\n\t\t\t\tif(result !== 0){\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn result;\r\n\t\t});\r\n\t}\r\n\r\n\t//process individual rows for a sort function on active data\r\n\t_sortRow(a, b, column, dir, params){\r\n\t\tvar el1Comp, el2Comp, colComp;\r\n\r\n\t\t//switch elements depending on search direction\r\n\t\tvar el1 = dir == \"asc\" ? a : b;\r\n\t\tvar el2 = dir == \"asc\" ? b : a;\r\n\r\n\t\ta = column.getFieldValue(el1.getData());\r\n\t\tb = column.getFieldValue(el2.getData());\r\n\r\n\t\ta = typeof a !== \"undefined\" ? a : \"\";\r\n\t\tb = typeof b !== \"undefined\" ? b : \"\";\r\n\r\n\t\tel1Comp = el1.getComponent();\r\n\t\tel2Comp = el2.getComponent();\r\n\r\n\t\treturn column.modules.sort.sorter.call(this, a, b, el1Comp, el2Comp, column.getComponent(), dir, params);\r\n\t}\r\n}\r\n\r\nSort.moduleName = \"sort\";\r\n\r\n//load defaults\r\nSort.sorters = defaultSorters;\r\n\r\nexport default Sort;","//sort if element contains any data\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = 0;\r\n\tvar el2 = 0;\r\n\tvar type = params.type || \"length\";\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\r\n\tfunction calc(value){\r\n\r\n\t\tswitch(type){\r\n\t\t\tcase \"length\":\r\n\t\t\treturn value.length;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"sum\":\r\n\t\t\treturn value.reduce(function(c, d){\r\n\t\t\t\treturn c + d;\r\n\t\t\t});\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"max\":\r\n\t\t\treturn Math.max.apply(null, value) ;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"min\":\r\n\t\t\treturn Math.min.apply(null, value) ;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"avg\":\r\n\t\t\treturn value.reduce(function(c, d){\r\n\t\t\t\treturn c + d;\r\n\t\t\t}) / value.length;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t//handle non array values\r\n\tif(!Array.isArray(a)){\r\n\t\talignEmptyValues = !Array.isArray(b) ? 0 : -1;\r\n\t}else if(!Array.isArray(b)){\r\n\t\talignEmptyValues = 1;\r\n\t}else{\r\n\r\n\t\t//compare valid values\r\n\t\tel1 = a ? calc(a) : 0;\r\n\t\tel2 = b ? calc(b) : 0;\r\n\r\n\t\treturn el1 - el2;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","//sort if element contains any data\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = typeof a == \"undefined\" ? 0 : 1;\r\n\tvar el2 = typeof b == \"undefined\" ? 0 : 1;\r\n\r\n\treturn el1 - el2;\r\n};","//sort alpha numeric strings\r\nexport default function(as, bs, aRow, bRow, column, dir, params){\r\n\tvar a, b, a1, b1, i= 0, L, rx = /(\\d+)|(\\D+)/g, rd = /\\d/;\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\r\n\t//handle empty values\r\n\tif(!as && as!== 0){\r\n\t\temptyAlign = !bs && bs!== 0 ? 0 : -1;\r\n\t}else if(!bs && bs!== 0){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\r\n\t\tif(isFinite(as) && isFinite(bs)) return as - bs;\r\n\t\ta = String(as).toLowerCase();\r\n\t\tb = String(bs).toLowerCase();\r\n\t\tif(a === b) return 0;\r\n\t\tif(!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1;\r\n\t\ta = a.match(rx);\r\n\t\tb = b.match(rx);\r\n\t\tL = a.length > b.length ? b.length : a.length;\r\n\t\twhile(i < L){\r\n\t\t\ta1= a[i];\r\n\t\t\tb1= b[i++];\r\n\t\t\tif(a1 !== b1){\r\n\t\t\t\tif(isFinite(a1) && isFinite(b1)){\r\n\t\t\t\t\tif(a1.charAt(0) === \"0\") a1 = \".\" + a1;\r\n\t\t\t\t\tif(b1.charAt(0) === \"0\") b1 = \".\" + b1;\r\n\t\t\t\t\treturn a1 - b1;\r\n\t\t\t\t}\r\n\t\t\t\telse return a1 > b1 ? 1 : -1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn a.length > b.length;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","export default {\r\n\t//is integer\r\n\tinteger: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvalue = Number(value);\r\n\t\treturn typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\r\n\t},\r\n\r\n\t//is float\r\n\tfloat: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvalue = Number(value);\r\n\t\treturn typeof value === 'number' && isFinite(value) && value % 1 !== 0;\r\n\t},\r\n\r\n\t//must be a number\r\n\tnumeric: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn !isNaN(value);\r\n\t},\r\n\r\n\t//must be a string\r\n\tstring: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn isNaN(value);\r\n\t},\r\n\r\n\t//maximum value\r\n\tmax: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn parseFloat(value) <= parameters;\r\n\t},\r\n\r\n\t//minimum value\r\n\tmin: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn parseFloat(value) >= parameters;\r\n\t},\r\n\r\n\t//starts with value\r\n\tstarts: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).toLowerCase().startsWith(String(parameters).toLowerCase());\r\n\t},\r\n\r\n\t//ends with value\r\n\tends: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).toLowerCase().endsWith(String(parameters).toLowerCase());\r\n\t},\r\n\r\n\r\n\t//minimum string length\r\n\tminLength: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).length >= parameters;\r\n\t},\r\n\r\n\t//maximum string length\r\n\tmaxLength: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).length <= parameters;\r\n\t},\r\n\r\n\t//in provided value list\r\n\tin: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif(typeof parameters == \"string\"){\r\n\t\t\tparameters = parameters.split(\"|\");\r\n\t\t}\r\n\r\n\t\treturn value === \"\" || parameters.indexOf(value) > -1;\r\n\t},\r\n\r\n\t//must match provided regex\r\n\tregex: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar reg = new RegExp(parameters);\r\n\r\n\t\treturn reg.test(value);\r\n\t},\r\n\r\n\t//value must be unique in this column\r\n\tunique: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar unique = true;\r\n\r\n\t\tvar cellData = cell.getData();\r\n\t\tvar column = cell.getColumn()._getSelf();\r\n\r\n\t\tthis.table.rowManager.rows.forEach(function(row){\r\n\t\t\tvar data = row.getData();\r\n\r\n\t\t\tif(data !== cellData){\r\n\t\t\t\tif(value == column.getFieldValue(data)){\r\n\t\t\t\t\tunique = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn unique;\r\n\t},\r\n\r\n\t//must have a value\r\n\trequired:function(cell, value, parameters){\r\n\t\treturn value !== \"\" && value !== null && typeof value !== \"undefined\";\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultValidators from './defaults/validators.js';\r\n\r\nclass Validate extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.invalidCells = [];\r\n\r\n\t\tthis.registerTableOption(\"validationMode\", \"blocking\");\r\n\r\n\t\tthis.registerColumnOption(\"validator\");\r\n\r\n\t\tthis.registerTableFunction(\"getInvalidCells\", this.getInvalidCells.bind(this));\r\n\t\tthis.registerTableFunction(\"clearCellValidation\", this.userClearCellValidation.bind(this));\r\n\t\tthis.registerTableFunction(\"validate\", this.userValidate.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"isValid\", this.cellIsValid.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"clearValidation\", this.clearValidation.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"validate\", this.cellValidate.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"column\", \"validate\", this.columnValidate.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"validate\", this.rowValidate.bind(this));\r\n\t}\r\n\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-delete\", this.clearValidation.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumnCheck.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Cell Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tcellIsValid(cell){\r\n\t\treturn cell.modules.validate ? !cell.modules.validate.invalid : true;\r\n\t}\r\n\r\n\tcellValidate(cell){\r\n\t\treturn this.validate(cell.column.modules.validate, cell, cell.getValue());\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Column Functions ////////\r\n\t///////////////////////////////////\r\n\r\n\tcolumnValidate(column){\r\n\t\tvar invalid = [];\r\n\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tif(!this.cellValidate(cell)){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Row Functions //////////\r\n\t///////////////////////////////////\r\n\r\n\trowValidate(row){\r\n\t\tvar invalid = [];\r\n\r\n\t\trow.cells.forEach((cell) => {\r\n\t\t\tif(!this.cellValidate(cell)){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\r\n\tuserClearCellValidation(cells){\r\n\t\tif(!cells){\r\n\t\t\tcells = this.getInvalidCells();\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\r\n\t\tcells.forEach((cell) => {\r\n\t\t\tthis.clearValidation(cell._getSelf());\r\n\t\t});\r\n\t}\r\n\r\n\tuserValidate(cells){\r\n\t\tvar output = [];\r\n\r\n\t\t//clear row data\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\trow = row.getComponent();\r\n\r\n\t\t\tvar valid = row.validate();\r\n\r\n\t\t\tif(valid !== true){\r\n\t\t\t\toutput = output.concat(valid);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output.length ? output : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(typeof column.definition.validator !== \"undefined\"){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//validate\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = [],\r\n\t\tvalidator;\r\n\r\n\t\tif(column.definition.validator){\r\n\r\n\t\t\tif(Array.isArray(column.definition.validator)){\r\n\t\t\t\tcolumn.definition.validator.forEach((item) => {\r\n\t\t\t\t\tvalidator = self._extractValidator(item);\r\n\r\n\t\t\t\t\tif(validator){\r\n\t\t\t\t\t\tconfig.push(validator);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t}else{\r\n\t\t\t\tvalidator = this._extractValidator(column.definition.validator);\r\n\r\n\t\t\t\tif(validator){\r\n\t\t\t\t\tconfig.push(validator);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.modules.validate = config.length ? config : false;\r\n\t\t}\r\n\t}\r\n\r\n\t_extractValidator(value){\r\n\t\tvar type, params, pos;\r\n\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tpos = value.indexOf(':');\r\n\r\n\t\t\tif(pos > -1){\r\n\t\t\t\ttype = value.substring(0,pos);\r\n\t\t\t\tparams = value.substring(pos+1);\r\n\t\t\t}else{\r\n\t\t\t\ttype = value;\r\n\t\t\t}\r\n\r\n\t\t\treturn this._buildValidator(type, params);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\treturn this._buildValidator(value);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"object\":\r\n\t\t\treturn this._buildValidator(value.type, value.parameters);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t_buildValidator(type, params){\r\n\r\n\t\tvar func = typeof type == \"function\" ? type : Validate.validators[type];\r\n\r\n\t\tif(!func){\r\n\t\t\tconsole.warn(\"Validator Setup Error - No matching validator found:\", type);\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn {\r\n\t\t\t\ttype:typeof type == \"function\" ? \"function\" : type,\r\n\t\t\t\tfunc:func,\r\n\t\t\t\tparams:params,\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\tvalidate(validators, cell, value){\r\n\t\tvar self = this,\r\n\t\tvalid = [],\r\n\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\r\n\t\tif(validators){\r\n\t\t\tvalidators.forEach((item) => {\r\n\t\t\t\tif(!item.func.call(self, cell.getComponent(), value, item.params)){\r\n\t\t\t\t\tvalid.push({\r\n\t\t\t\t\t\ttype:item.type,\r\n\t\t\t\t\t\tparameters:item.params\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tvalid = valid.length ? valid : true;\r\n\r\n\t\tif(!cell.modules.validate){\r\n\t\t\tcell.modules.validate = {};\r\n\t\t}\r\n\r\n\t\tif(valid === true){\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\r\n\t\t\tif(invalidIndex > -1){\r\n\t\t\t\tthis.invalidCells.splice(invalidIndex, 1);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcell.modules.validate.invalid = true;\r\n\r\n\t\t\tif(this.table.options.validationMode !== \"manual\"){\r\n\t\t\t\tcell.getElement().classList.add(\"tabulator-validation-fail\");\r\n\t\t\t}\r\n\r\n\t\t\tif(invalidIndex == -1){\r\n\t\t\t\tthis.invalidCells.push(cell);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn valid;\r\n\t}\r\n\r\n\tgetInvalidCells(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.invalidCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tclearValidation(cell){\r\n\t\tvar invalidIndex;\r\n\r\n\t\tif(cell.modules.validate && cell.modules.validate.invalid){\r\n\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\r\n\t\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\r\n\t\t\tif(invalidIndex > -1){\r\n\t\t\t\tthis.invalidCells.splice(invalidIndex, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nValidate.moduleName = \"validate\";\r\n\r\n//load defaults\r\nValidate.validators = defaultValidators;\r\n\r\nexport default Validate;","export default {\r\n\r\n\tdebugEventsExternal:false, //flag to console log events\r\n\tdebugEventsInternal:false, //flag to console log events\r\n\tdebugInvalidOptions:true, //allow toggling of invalid option warnings\r\n\r\n\theight:false, //height of tabulator\r\n\tminHeight:false, //minimum height of tabulator\r\n\tmaxHeight:false, //maximum height of tabulator\r\n\r\n\tcolumnHeaderVertAlign:\"top\", //vertical alignment of column headers\r\n\r\n\tcolumns:[],//store for colum header info\r\n\tcolumnDefaults:{}, //store column default props\r\n\r\n\tdata:false, //default starting data\r\n\r\n\tautoColumns:false, //build columns from data row structure\r\n\tautoColumnsDefinitions:false,\r\n\r\n\tnestedFieldSeparator:\".\", //separator for nested data\r\n\r\n\ttooltipGenerationMode:\"load\", //when to generate tooltips\r\n\r\n\tfooterElement:false, //hold footer element\r\n\r\n\tindex:\"id\", //filed for row index\r\n\r\n\ttextDirection:\"auto\",\r\n\r\n\taddRowPos:\"bottom\", //position to insert blank rows, top|bottom\r\n\r\n\theaderVisible:true, //hide header\r\n\r\n\trenderVertical:\"virtual\",\r\n\trenderHorizontal:\"basic\",\r\n\trenderVerticalBuffer:0, // set virtual DOM buffer size\r\n\r\n\tscrollToRowPosition:\"top\",\r\n\tscrollToRowIfVisible:true,\r\n\r\n\tscrollToColumnPosition:\"left\",\r\n\tscrollToColumnIfVisible:true,\r\n\r\n\trowFormatter:false,\r\n\trowFormatterPrint:null,\r\n\trowFormatterClipboard:null,\r\n\trowFormatterHtmlOutput:null,\r\n\r\n\tplaceholder:false,\r\n\r\n\tdataLoader:true,\r\n\tdataLoaderLoading:false,\r\n\tdataLoaderError:false,\r\n\tdataLoaderErrorTimeout:3000,\r\n\r\n\tdataSendParams:{},\r\n\r\n\tdataReceiveParams:{},\r\n}\r\n","export default class OptionsList {\r\n\tconstructor(table, msgType, defaults = {}){\r\n\t\tthis.table = table;\r\n\t\tthis.msgType = msgType;\r\n\t\tthis.registeredDefaults = Object.assign({}, defaults)\r\n\t}\r\n\r\n\tregister(option, value){\r\n\t\tthis.registeredDefaults[option] = value;\r\n\t}\r\n\r\n\tgenerate(defaultOptions, userOptions = {}){\r\n\t\tvar output = Object.assign({}, this.registeredDefaults);\r\n\r\n\t\tObject.assign(output, defaultOptions);\r\n\r\n\t\tif(userOptions.debugInvalidOptions !== false || this.table.options.debugInvalidOptions){\r\n\t\t\tfor (var key in userOptions){\r\n\t\t\t\tif(!output.hasOwnProperty(key)){\r\n\t\t\t\t\tconsole.warn(\"Invalid \" + this.msgType + \" option:\", key)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var key in output){\r\n\t\t\tif(key in userOptions){\r\n\t\t\t\toutput[key] = userOptions[key];\r\n\t\t\t}else{\r\n\t\t\t\tif(Array.isArray(output[key])){\r\n\t\t\t\t\toutput[key] = Object.assign([], output[key]);\r\n\t\t\t\t}else if(typeof output[key] === \"object\" && output[key] !== null){\r\n\t\t\t\t\toutput[key] = Object.assign({}, output[key]);\r\n\t\t\t\t}else if (typeof output[key] === \"undefined\"){\r\n\t\t\t\t\tdelete output[key];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport Helpers from '../tools/Helpers.js';\r\n\r\nexport default class Renderer extends CoreFeature{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.elementVertical = table.rowManager.element;\r\n\t\tthis.elementHorizontal = table.columnManager.element;\r\n\t\tthis.tableElement = table.rowManager.tableElement;\r\n\r\n\t\tthis.verticalFillMode = \"fit\"; // used by row manager to determin how to size the render area (\"fit\" - fits container to the contents, \"fill\" - fills the contianer without resizing it)\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t/////// Internal Bindings /////////\r\n\t///////////////////////////////////\r\n\r\n\tinitialize(){\r\n\t\t//initialize core functionality\r\n\t}\r\n\r\n\tclearRows(){\r\n\t\t//clear down existing rows layout\r\n\t}\r\n\r\n\tclearColumns(){\r\n\t\t//clear down existing columns layout\r\n\t}\r\n\r\n\r\n\treinitializeColumnWidths(columns){\r\n\t\t//resize columns to fit data\r\n\t}\r\n\r\n\r\n\trenderRows(){\r\n\t\t//render rows from a clean slate\r\n\t}\r\n\r\n\trenderColumns(){\r\n\t\t//render columns from a clean slate\r\n\t}\r\n\r\n\trerenderRows(callback){\r\n\t\t// rerender rows and keep position\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\t}\r\n\r\n\trerenderColumns(update, blockRedraw){\r\n\t\t//rerender columns\r\n\t}\r\n\r\n\trenderRowCells(row){\r\n\t\t//render the cells in a row\r\n\t}\r\n\r\n\trerenderRowCells(row, force){\r\n\t\t//rerender the cells in a row\r\n\t}\r\n\r\n\tscrollColumns(left, dir){\r\n\t\t//handle horizontal scrolling\r\n\t}\r\n\r\n\tscrollRows(top, dir){\r\n\t\t//handle vertical scolling\r\n\t}\r\n\r\n\tresize(){\r\n\t\t//container has rezied, carry out any needed recalculations (DO NOT RERENDER IN THIS FUNCTION)\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\t//scroll to a specific row\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\t//determine weather the row is nearest the top or bottom of the table, retur true for top or false for bottom\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\t//return the visible rows\r\n\t\treturn [];\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t//////// Helper Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\trows(){\r\n\t\treturn this.table.rowManager.getDisplayRows();\r\n\t}\r\n\r\n\tstyleRow(row, index){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tif(index % 2){\r\n\t\t\trowEl.classList.add(\"tabulator-row-even\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-odd\");\r\n\t\t}else{\r\n\t\t\trowEl.classList.add(\"tabulator-row-odd\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-even\");\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t/////// External Triggers /////////\r\n\t/////// (DO NOT OVERRIDE) /////////\r\n\t///////////////////////////////////\r\n\r\n\tclear(){\r\n\t\t//clear down existing layout\r\n\t\tthis.clearRows();\r\n\t\tthis.clearColumns();\r\n\t}\r\n\r\n\trender(){\r\n\t\t//render from a clean slate\r\n\t\tthis.renderRows();\r\n\t\tthis.renderColumns();\r\n\t}\r\n\r\n\trerender(callback){\r\n\t\t// rerender and keep position\r\n\t\tthis.rerenderRows();\r\n\t\tthis.rerenderColumns();\r\n\t}\r\n\r\n\tscrollToRowPosition(row, position, ifVisible){\r\n\t\tvar rowIndex = this.rows().indexOf(row),\r\n\t\trowEl = row.getElement(),\r\n\t\toffset = 0;\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tif(rowIndex > -1){\r\n\r\n\t\t\t\tif(typeof ifVisible === \"undefined\"){\r\n\t\t\t\t\tifVisible = this.table.options.scrollToRowIfVisible;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//check row visibility\r\n\t\t\t\tif(!ifVisible){\r\n\t\t\t\t\tif(Helpers.elVisible(rowEl)){\r\n\t\t\t\t\t\toffset = Helpers.elOffset(rowEl).top - Helpers.elOffset(this.elementVertical).top;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(offset > 0 && offset < this.elementVertical.clientHeight - rowEl.offsetHeight){\r\n\t\t\t\t\t\t\tresolve();\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(typeof position === \"undefined\"){\r\n\t\t\t\t\tposition = this.table.options.scrollToRowPosition;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(position === \"nearest\"){\r\n\t\t\t\t\tposition = this.scrollToRowNearestTop(row) ? \"top\" : \"bottom\"\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//scroll to row\r\n\t\t\t\tthis.scrollToRow(row);\r\n\r\n\t\t\t\t//align to correct position\r\n\t\t\t\tswitch(position){\r\n\t\t\t\t\tcase \"middle\":\r\n\t\t\t\t\tcase \"center\":\r\n\r\n\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop + (rowEl.offsetTop - this.elementVertical.scrollTop) - ((this.elementVertical.scrollHeight - rowEl.offsetTop) / 2);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.clientHeight / 2);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"bottom\":\r\n\r\n\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.scrollHeight - rowEl.offsetTop) + rowEl.offsetHeight;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - this.elementVertical.clientHeight + rowEl.offsetHeight;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresolve();\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - Row not visible\");\r\n\t\t\t\treject(\"Scroll Error - Row not visible\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class BaiscHorizontal extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t}\r\n\r\n\trenderRowCells(row){\r\n\t\trow.cells.forEach((cell) => {\r\n\t\t\trow.element.appendChild(cell.getElement());\r\n\t\t\tcell.cellRendered();\r\n\t\t});\r\n\t}\r\n\r\n\treinitializeColumnWidths(columns){\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t});\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class VirtualDomHorizontal extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.leftCol = 0;\r\n\t\tthis.rightCol = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = 0;\r\n\t\tthis.vDomScrollPosRight = 0;\r\n\t\t\r\n\t\tthis.vDomPadLeft = 0;\r\n\t\tthis.vDomPadRight = 0;\r\n\t\t\r\n\t\tthis.fitDataColAvg = 0;\r\n\t\t\r\n\t\tthis.windowBuffer = 200; //pixel margin to make column visible before it is shown on screen\r\n\t\t\r\n\t\tthis.visibleRows = null;\r\n\r\n\t\tthis.initialized = false;\r\n\t\tthis.isFitData = false;\r\n\t\t\r\n\t\tthis.columns = [];\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.compatibilityCheck();\r\n\t\tthis.layoutCheck();\r\n\t\tthis.vertScrollListen();\r\n\t}\r\n\t\r\n\tcompatibilityCheck(){\r\n\t\tvar columns = this.options(\"columns\"),\r\n\t\tfrozen = false,\r\n\t\tok = true;\r\n\t\t\r\n\t\tif(this.options(\"layout\") == \"fitDataTable\"){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with fitDataTable layout mode\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.options(\"responsiveLayout\")){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with responsive columns\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.options(\"rtl\")){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not currently compatible with RTL text direction\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(columns){\r\n\t\t\tfrozen = columns.find((col) => {\r\n\t\t\t\treturn col.frozen;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(frozen){\r\n\t\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with frozen columns\");\r\n\t\t\t\tok = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// if(!ok){\r\n\t\t// \toptions.virtualDomHoz = false;\r\n\t\t// }\r\n\t\t\r\n\t\treturn ok;\r\n\t}\r\n\t\r\n\tlayoutCheck(){\r\n\t\tthis.isFitData = this.options(\"layout\").startsWith('fitData');\r\n\t}\r\n\r\n\tvertScrollListen(){\r\n\t\tthis.subscribe(\"scroll-vertical\", this.clearVisRowCache.bind(this));\r\n\t\tthis.subscribe(\"data-refreshed\", this.clearVisRowCache.bind(this));\r\n\t}\r\n\r\n\tclearVisRowCache(){\r\n\t\tthis.visibleRows = null;\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t///////// Public Functions ///////////\r\n\t//////////////////////////////////////\r\n\t\r\n\trenderColumns(row, force){\r\n\t\tthis.dataChange();\r\n\t}\r\n\r\n\t\r\n\tscrollColumns(left, dir){\r\n\t\tif(this.scrollLeft != left){\r\n\t\t\tthis.scrollLeft = left;\r\n\t\t\t\r\n\t\t\tthis.scroll(left - (this.vDomScrollPosLeft + this.windowBuffer));\r\n\t\t}\r\n\t}\r\n\t\r\n\tcalcWindowBuffer(){\r\n\t\tvar buffer = this.elementVertical.clientWidth;\r\n\t\t\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvar width = column.getWidth();\r\n\t\t\t\t\r\n\t\t\t\tif(width > buffer){\r\n\t\t\t\t\tbuffer = width;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.windowBuffer = buffer * 2;\r\n\t}\r\n\t\r\n\trerenderColumns(update, blockRedraw){\t\t\r\n\t\tvar old = {\r\n\t\t\tcols:this.columns,\r\n\t\t\tleftCol:this.leftCol,\r\n\t\t\trightCol:this.rightCol,\r\n\t\t},\r\n\t\tcolPos = 0;\r\n\t\t\r\n\t\t\r\n\t\tif(update && !this.initialized){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tthis.clear();\r\n\t\t\r\n\t\tthis.calcWindowBuffer();\r\n\t\t\r\n\t\tthis.scrollLeft = this.elementVertical.scrollLeft;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = this.scrollLeft - this.windowBuffer;\r\n\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\r\n\t\t\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tvar config = {};\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvar width = column.getWidth();\r\n\t\t\t\t\r\n\t\t\t\tconfig.leftPos = colPos;\r\n\t\t\t\tconfig.rightPos = colPos + width;\r\n\t\t\t\t\r\n\t\t\t\tconfig.width = width;\r\n\t\t\t\t\r\n\t\t\t\tif (this.isFitData) {\r\n\t\t\t\t\tconfig.fitDataCheck = column.modules.vdomHoz ? column.modules.vdomHoz.fitDataCheck : true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif((colPos + width > this.vDomScrollPosLeft) && (colPos < this.vDomScrollPosRight)){\r\n\t\t\t\t\t//column is visible\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.leftCol == -1){\r\n\t\t\t\t\t\tthis.leftCol = this.columns.length;\r\n\t\t\t\t\t\tthis.vDomPadLeft = colPos;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.rightCol = this.columns.length;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// column is hidden\r\n\t\t\t\t\tif(this.leftCol !== -1){\r\n\t\t\t\t\t\tthis.vDomPadRight += width;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.columns.push(column);\r\n\t\t\t\t\r\n\t\t\t\tcolumn.modules.vdomHoz = config;\r\n\t\t\t\t\r\n\t\t\t\tcolPos += width;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t\r\n\t\tthis.initialized = true;\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tif(!update || this.reinitChanged(old)){\r\n\t\t\t\tthis.reinitializeRows();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.elementVertical.scrollLeft = this.scrollLeft;\r\n\t}\r\n\t\r\n\trenderRowCells(row){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.initializeRow(row);\r\n\t\t}else{\r\n\t\t\trow.cells.forEach((cell) => {\r\n\t\t\t\trow.element.appendChild(cell.getElement());\r\n\t\t\t\tcell.cellRendered();\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\trerenderRowCells(row, force){\r\n\t\tthis.reinitializeRow(row, force);\r\n\t}\r\n\t\r\n\treinitializeColumnWidths(columns){\r\n\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\r\n\t\t\tthis.columns[i].reinitializeWidth();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t//////// Internal Rendering //////////\r\n\t//////////////////////////////////////\r\n\t\r\n\tdeinitialize(){\r\n\t\tthis.initialized = false;\r\n\t}\r\n\t\r\n\tclear(){\r\n\t\tthis.columns = [];\r\n\t\t\r\n\t\tthis.leftCol = -1;\r\n\t\tthis.rightCol = 0;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = 0;\r\n\t\tthis.vDomScrollPosRight = 0;\r\n\t\tthis.vDomPadLeft = 0;\r\n\t\tthis.vDomPadRight = 0;\r\n\t}\r\n\t\r\n\tdataChange(){\r\n\t\tvar change = false,\r\n\t\tcollsWidth = 0,\r\n\t\tcolEnd = 0,\r\n\t\tgroup, row, rowEl;\r\n\t\t\r\n\t\tif(this.isFitData){\r\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\t\tif(!column.definition.width && column.visible){\r\n\t\t\t\t\tchange = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(change){\r\n\t\t\t\tif(change && this.table.rowManager.getDisplayRows().length){\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar row = this.chain(\"rows-sample\", [1], [], () => {\r\n\t\t\t\t\t\treturn this.table.rowManager.getDisplayRows();\r\n\t\t\t\t\t})[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trowEl = row.getElement();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trow.generateCells();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.tableElement.appendChild(rowEl);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfor(var colEnd = 0; colEnd < row.cells.length; colEnd++){\r\n\t\t\t\t\t\t\tlet cell = row.cells[colEnd];\r\n\t\t\t\t\t\t\trowEl.appendChild(cell.getElement());\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcell.column.reinitializeWidth();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcollsWidth += cell.column.getWidth();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// if(collsWidth > this.vDomScrollPosRight){\r\n\t\t\t\t\t\t\t// \tbreak;\r\n\t\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// this.fitDataColAvg = Math.floor(collsWidth / (colEnd + 1));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// for(colEnd; colEnd < this.table.columnManager.columnsByIndex.length; colEnd++){\r\n\t\t\t\t\t\t// \tthis.table.columnManager.columnsByIndex[colEnd].setWidth(this.fitDataColAvg);\r\n\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.rerenderColumns(false, true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.options(\"layout\") === \"fitColumns\"){\r\n\t\t\t\tthis.layoutRefresh();\r\n\t\t\t\tthis.rerenderColumns(false, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitChanged(old){\r\n\t\tvar match = true;\r\n\t\t\r\n\t\tif(old.cols.length !== this.columns.length || old.leftCol !== this.leftCol || old.rightCol !== this.rightCol){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\told.cols.forEach((col, i) => {\r\n\t\t\tif(col !== this.columns[i]){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn !match;\r\n\t}\r\n\t\r\n\treinitializeRows(){\r\n\t\tvar rows = this.getVisibleRows();\r\n\t\trows.forEach((row) => {\r\n\t\t\tthis.reinitializeRow(row, true);\r\n\t\t});\r\n\t}\r\n\t\r\n\tgetVisibleRows(){\r\n\t\tif (!this.visibleRows){\r\n\t\t\tthis.visibleRows = this.table.rowManager.getVisibleRows();\r\n\t\t}\r\n\r\n\t\treturn this.visibleRows;\t\r\n\t}\r\n\t\r\n\tscroll(diff){\r\n\t\tthis.vDomScrollPosLeft += diff;\r\n\t\tthis.vDomScrollPosRight += diff;\r\n\r\n\t\tif(Math.abs(diff) > (this.windowBuffer / 2)){\r\n\t\t\tthis.rerenderColumns();\r\n\t\t}else{\r\n\t\t\tif(diff > 0){\r\n\t\t\t\t//scroll right\r\n\t\t\t\tthis.addColRight();\r\n\t\t\t\tthis.removeColLeft();\r\n\t\t\t}else{\r\n\t\t\t\t//scroll left\r\n\t\t\t\tthis.addColLeft();\r\n\t\t\t\tthis.removeColRight();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tcolPositionAdjust (start, end, diff){\r\n\t\tfor(let i = start; i < end; i++){\r\n\t\t\tlet column = this.columns[i];\r\n\t\t\t\r\n\t\t\tcolumn.modules.vdomHoz.leftPos += diff;\r\n\t\t\tcolumn.modules.vdomHoz.rightPos += diff;\r\n\t\t}\r\n\t}\r\n\t\r\n\taddColRight(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\t\r\n\t\t\tlet column = this.columns[this.rightCol + 1];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.leftPos <= this.vDomScrollPosRight){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\trow.getElement().appendChild(cell.getElement());\r\n\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.fitDataColActualWidthCheck(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.rightCol++; // Don't move this below the >= check below\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.rightCol >= (this.columns.length - 1)){\r\n\t\t\t\t\t\tthis.vDomPadRight = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomPadRight -= column.getWidth();\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\taddColLeft(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.leftCol - 1];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.rightPos >= this.vDomScrollPosLeft){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\trow.getElement().prepend(cell.getElement());\r\n\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.leftCol--; // don't move this below the <= check below\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.leftCol <= 0){ // replicating logic in addColRight\r\n\t\t\t\t\t\tthis.vDomPadLeft = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomPadLeft -= column.getWidth();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tlet diff = this.fitDataColActualWidthCheck(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(diff){\r\n\t\t\t\t\t\tthis.scrollLeft = this.elementVertical.scrollLeft = this.elementVertical.scrollLeft + diff;\r\n\t\t\t\t\t\tthis.vDomPadRight -= diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveColRight(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.rightCol];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.leftPos > this.vDomScrollPosRight){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\trow.getElement().removeChild(cell.getElement());\r\n\t\t\t\t\t\t\t} catch (ex) {\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Could not removeColRight\", ex.message)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomPadRight += column.getWidth();\r\n\t\t\t\t\tthis.rightCol --;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveColLeft(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.leftCol];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.rightPos < this.vDomScrollPosLeft){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\t\t\t\t\t\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\trow.getElement().removeChild(cell.getElement());\r\n\t\t\t\t\t\t\t} catch (ex) {\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Could not removeColLeft\", ex.message)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomPadLeft += column.getWidth();\r\n\t\t\t\t\tthis.leftCol ++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\tfitDataColActualWidthCheck(column){\r\n\t\tvar newWidth, widthDiff;\r\n\t\t\r\n\t\tif(column.modules.vdomHoz.fitDataCheck){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t\t\r\n\t\t\tnewWidth = column.getWidth();\r\n\t\t\twidthDiff = newWidth - column.modules.vdomHoz.width;\r\n\t\t\t\r\n\t\t\tif(widthDiff){\r\n\t\t\t\tcolumn.modules.vdomHoz.rightPos += widthDiff;\r\n\t\t\t\tcolumn.modules.vdomHoz.width = newWidth;\r\n\t\t\t\tthis.colPositionAdjust(this.columns.indexOf(column) + 1, this.columns.length, widthDiff);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcolumn.modules.vdomHoz.fitDataCheck = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn widthDiff;\r\n\t}\r\n\t\r\n\tinitializeRow(row){\r\n\t\tif(row.type !== \"group\"){\r\n\t\t\trow.modules.vdomHoz = {\r\n\t\t\t\tleftCol:this.leftCol,\r\n\t\t\t\trightCol:this.rightCol,\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\r\n\t\t\t\tlet column = this.columns[i];\r\n\t\t\t\t\r\n\t\t\t\tif(column && column.visible){\r\n\t\t\t\t\tlet cell = row.getCell(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\trow.getElement().appendChild(cell.getElement());\r\n\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitializeRow(row, force){\r\n\t\tif(row.type !== \"group\"){\r\n\t\t\tif(force || !row.modules.vdomHoz || row.modules.vdomHoz.leftCol !== this.leftCol || row.modules.vdomHoz.rightCol !== this.rightCol){\r\n\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\twhile(rowEl.firstChild) rowEl.removeChild(rowEl.firstChild);\r\n\t\t\t\t\r\n\t\t\t\tthis.initializeRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\nimport Column from './column/Column.js';\r\nimport ColumnComponent from './column/ColumnComponent.js';\r\nimport Helpers from './tools/Helpers.js';\r\nimport OptionsList from './tools/OptionsList.js';\r\n\r\nimport RendererBasicHorizontal from './rendering/renderers/BasicHorizontal.js';\r\nimport RendererVirtualDomHorizontal from './rendering/renderers/VirtualDomHorizontal.js';\r\n\r\nimport defaultColumnOptions from './column/defaults/options.js';\r\n\r\nexport default class ColumnManager extends CoreFeature {\r\n\r\n\tconstructor (table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.blockHozScrollEvent = false;\r\n\t\tthis.headersElement = null;\r\n\t\tthis.element = null ; //containing element\r\n\t\tthis.columns = []; // column definition object\r\n\t\tthis.columnsByIndex = []; //columns by index\r\n\t\tthis.columnsByField = {}; //columns by field\r\n\t\tthis.scrollLeft = 0;\r\n\t\tthis.optionsList = new OptionsList(this.table, \"column definition\", defaultColumnOptions);\r\n\r\n\t\tthis.renderer = null;\r\n\t}\r\n\r\n\t////////////// Setup Functions /////////////////\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeRenderer();\r\n\r\n\t\tthis.headersElement = this.createHeadersElement();\r\n\t\tthis.element = this.createHeaderElement();\r\n\r\n\t\tthis.element.insertBefore(this.headersElement, this.element.firstChild);\r\n\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t}\r\n\r\n\tinitializeRenderer(){\r\n\t\tvar renderClass;\r\n\r\n\t\tvar renderers = {\r\n\t\t\t\"virtual\": RendererVirtualDomHorizontal,\r\n\t\t\t\"basic\": RendererBasicHorizontal,\r\n\t\t};\r\n\r\n\t\tif(typeof this.table.options.renderHorizontal === \"string\"){\r\n\t\t\trenderClass = renderers[this.table.options.renderHorizontal];\r\n\t\t}else{\r\n\t\t\trenderClass = this.table.options.renderHorizontal;\r\n\t\t}\r\n\r\n\t\tif(renderClass){\r\n\t\t\tthis.renderer = new renderClass(this.table, this.element, this.tableElement);\r\n\t\t\tthis.renderer.initialize();\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Unable to find matching renderer:\", table.options.renderHorizontal);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tcreateHeadersElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-headers\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateHeaderElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-header\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\r\n\t\tif(!this.table.options.headerVisible){\r\n\t\t\tel.classList.add(\"tabulator-header-hidden\");\r\n\t\t}\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\t//return containing element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\t//return header containing element\r\n\tgetHeadersElement(){\r\n\t\treturn this.headersElement;\r\n\t}\r\n\r\n\t//scroll horizontally to match table body\r\n\tscrollHorizontal(left){\r\n\t\tvar hozAdjust = 0,\r\n\t\tscrollWidth = this.element.scrollWidth - this.table.element.clientWidth;\r\n\r\n\t\t// this.tempScrollBlock();\r\n\t\tthis.element.scrollLeft = left;\r\n\r\n\t\t//adjust for vertical scrollbar moving table when present\r\n\t\tif(left > scrollWidth){\r\n\t\t\thozAdjust = left - scrollWidth;\r\n\t\t\tthis.element.style.marginLeft = (-(hozAdjust)) + \"px\";\r\n\t\t}else{\r\n\t\t\tthis.element.style.marginLeft = 0;\r\n\t\t}\r\n\r\n\t\tthis.scrollLeft = left;\r\n\r\n\t\tthis.renderer.scrollColumns(left);\r\n\t}\r\n\r\n\t///////////// Column Setup Functions /////////////\r\n\tgenerateColumnsFromRowData(data){\r\n\t\tvar cols = [],\r\n\t\tdefinitions = this.table.options.autoColumnsDefinitions,\r\n\t\trow, sorter;\r\n\r\n\t\tif(data && data.length){\r\n\r\n\t\t\trow = data[0];\r\n\r\n\t\t\tfor(var key in row){\r\n\t\t\t\tlet col = {\r\n\t\t\t\t\tfield:key,\r\n\t\t\t\t\ttitle:key,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tlet value = row[key];\r\n\r\n\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tif(Array.isArray(value)){\r\n\t\t\t\t\t\tsorter = \"array\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){\r\n\t\t\t\t\t\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcol.sorter = sorter;\r\n\r\n\t\t\t\tcols.push(col);\r\n\t\t\t}\r\n\r\n\t\t\tif(definitions){\r\n\r\n\t\t\t\tswitch(typeof definitions){\r\n\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\tthis.table.options.columns = definitions.call(this.table, cols);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tif(Array.isArray(definitions)){\r\n\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\tvar match = definitions.find((def) => {\r\n\t\t\t\t\t\t\t\treturn def.field === col.field;\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tif(match){\r\n\t\t\t\t\t\t\t\tObject.assign(col, match);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\tif(definitions[col.field]){\r\n\t\t\t\t\t\t\t\tObject.assign(col, definitions[col.field]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.table.options.columns = cols;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.options.columns = cols;\r\n\t\t\t}\r\n\r\n\t\t\tthis.setColumns(this.table.options.columns);\r\n\t\t}\r\n\t}\r\n\r\n\tsetColumns(cols, row){\r\n\t\twhile(this.headersElement.firstChild) this.headersElement.removeChild(this.headersElement.firstChild);\r\n\r\n\t\tthis.columns = [];\r\n\t\tthis.columnsByIndex = [];\r\n\t\tthis.columnsByField = {};\r\n\r\n\t\tthis.dispatch(\"columns-loading\");\r\n\r\n\t\tcols.forEach((def, i) => {\r\n\t\t\tthis._addColumn(def);\r\n\t\t});\r\n\r\n\t\tthis._reIndexColumns();\r\n\r\n\t\tthis.dispatch(\"columns-loaded\");\r\n\r\n\t\tthis.renderer.rerenderColumns(false, true);\r\n\r\n\t\tthis.redraw(true);\r\n\t}\r\n\r\n\t_addColumn(definition, before, nextToColumn){\r\n\t\tvar column = new Column(definition, this),\r\n\t\tcolEl = column.getElement(),\r\n\t\tindex = nextToColumn ? this.findColumnIndex(nextToColumn) : nextToColumn;\r\n\r\n\t\tif(nextToColumn && index > -1){\r\n\t\t\tvar topColumn = nextToColumn.getTopColumn()\r\n\t\t\tvar parentIndex = this.columns.indexOf(topColumn);\r\n\t\t\tvar nextEl = topColumn.getElement();\r\n\r\n\t\t\tif(before){\r\n\t\t\t\tthis.columns.splice(parentIndex, 0, column);\r\n\t\t\t\tnextEl.parentNode.insertBefore(colEl, nextEl);\r\n\t\t\t}else{\r\n\t\t\t\tthis.columns.splice(parentIndex + 1, 0, column);\r\n\t\t\t\tnextEl.parentNode.insertBefore(colEl, nextEl.nextSibling);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(before){\r\n\t\t\t\tthis.columns.unshift(column);\r\n\t\t\t\tthis.headersElement.insertBefore(column.getElement(), this.headersElement.firstChild);\r\n\t\t\t}else{\r\n\t\t\t\tthis.columns.push(column);\r\n\t\t\t\tthis.headersElement.appendChild(column.getElement());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcolumn.columnRendered();\r\n\r\n\t\treturn column;\r\n\t}\r\n\r\n\tregisterColumnField(col){\r\n\t\tif(col.definition.field){\r\n\t\t\tthis.columnsByField[col.definition.field] = col;\r\n\t\t}\r\n\t}\r\n\r\n\tregisterColumnPosition(col){\r\n\t\tthis.columnsByIndex.push(col);\r\n\t}\r\n\r\n\t_reIndexColumns(){\r\n\t\tthis.columnsByIndex = [];\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.reRegisterPosition();\r\n\t\t});\r\n\t}\r\n\r\n\t//ensure column headers take up the correct amount of space in column groups\r\n\tverticalAlignHeaders(){\r\n\t\tvar minHeight = 0;\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\tvar height;\r\n\r\n\t\t\tcolumn.clearVerticalAlign();\r\n\r\n\t\t\theight = column.getHeight();\r\n\r\n\t\t\tif(height > minHeight){\r\n\t\t\t\tminHeight = height;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\tcolumn.verticalAlign(this.table.options.columnHeaderVertAlign, minHeight);\r\n\t\t});\r\n\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\t//////////////// Column Details /////////////////\r\n\tfindColumn(subject){\r\n\t\tif(typeof subject == \"object\"){\r\n\r\n\t\t\tif(subject instanceof Column){\r\n\t\t\t\t//subject is column element\r\n\t\t\t\treturn subject;\r\n\t\t\t}else if(subject instanceof ColumnComponent){\r\n\t\t\t\t//subject is public column component\r\n\t\t\t\treturn subject._getSelf() || false;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\t//subject is a HTML element of the column header\r\n\t\t\t\tlet match = this.columns.find((column) => {\r\n\t\t\t\t\treturn column.element === subject;\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn match || false;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the field name of the column\r\n\t\t\treturn this.columnsByField[subject] || false;\r\n\t\t}\r\n\r\n\t\t//catch all for any other type of input\r\n\t\treturn false;\r\n\t}\r\n\r\n\tgetColumnByField(field){\r\n\t\treturn this.columnsByField[field];\r\n\t}\r\n\r\n\tgetColumnsByFieldRoot(root){\r\n\t\tvar matches = [];\r\n\r\n\t\tObject.keys(this.columnsByField).forEach((field) => {\r\n\t\t\tvar fieldRoot = field.split(\".\")[0];\r\n\t\t\tif(fieldRoot === root){\r\n\t\t\t\tmatches.push(this.columnsByField[field]);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn matches;\r\n\t}\r\n\r\n\tgetColumnByIndex(index){\r\n\t\treturn this.columnsByIndex[index];\r\n\t}\r\n\r\n\tgetFirstVisibleColumn(index){\r\n\t\tvar index = this.columnsByIndex.findIndex((col) => {\r\n\t\t\treturn col.visible;\r\n\t\t});\r\n\r\n\t\treturn index > -1 ? this.columnsByIndex[index] : false;\r\n\t}\r\n\r\n\tgetColumns(){\r\n\t\treturn this.columns;\r\n\t}\r\n\r\n\tfindColumnIndex(column){\r\n\t\treturn this.columnsByIndex.findIndex((col) => {\r\n\t\t\treturn column === col;\r\n\t\t});\r\n\t}\r\n\r\n\t//return all columns that are not groups\r\n\tgetRealColumns(){\r\n\t\treturn this.columnsByIndex;\r\n\t}\r\n\r\n\t//travers across columns and call action\r\n\ttraverse(callback){\r\n\t\tthis.columnsByIndex.forEach((column,i) =>{\r\n\t\t\tcallback(column, i);\r\n\t\t});\r\n\t}\r\n\r\n\t//get defintions of actual columns\r\n\tgetDefinitions(active){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tif(!active || (active && column.visible)){\r\n\t\t\t\toutput.push(column.getDefinition());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//get full nested definition tree\r\n\tgetDefinitionTree(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\toutput.push(column.getDefinition(true));\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetComponents(structured){\r\n\t\tvar output = [],\r\n\t\tcolumns = structured ? this.columns : this.columnsByIndex;\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\toutput.push(column.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\tvar width = 0;\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tif(column.visible){\r\n\t\t\t\twidth += column.getWidth();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn width;\r\n\t}\r\n\r\n\tmoveColumn(from, to, after){\r\n\t\tthis.moveColumnActual(from, to, after);\r\n\r\n\t\tto.element.parentNode.insertBefore(from.element, to.element);\r\n\r\n\t\tif(after){\r\n\t\t\tto.element.parentNode.insertBefore(to.element, from.element);\r\n\t\t}\r\n\r\n\t\tthis.verticalAlignHeaders();\r\n\r\n\t\tthis.table.rowManager.reinitialize();\r\n\t}\r\n\r\n\tmoveColumnActual(from, to, after){\r\n\t\tif(from.parent.isGroup){\r\n\t\t\tthis._moveColumnInArray(from.parent.columns, from, to, after);\r\n\t\t}else{\r\n\t\t\tthis._moveColumnInArray(this.columns, from, to, after);\r\n\t\t}\r\n\r\n\t\tthis._moveColumnInArray(this.columnsByIndex, from, to, after, true);\r\n\r\n\t\tthis.renderer.rerenderColumns(true);\r\n\r\n\t\tthis.dispatch(\"column-moved\", from, to, after);\r\n\r\n\t\tif(this.subscribedExternal(\"columnMoved\")){\r\n\t\t\tthis.dispatchExternal(\"columnMoved\", from.getComponent(), this.table.columnManager.getComponents());\r\n\t\t}\r\n\t}\r\n\r\n\t_moveColumnInArray(columns, from, to, after, updateRows){\r\n\t\tvar\tfromIndex = columns.indexOf(from),\r\n\t\ttoIndex, rows = [];\r\n\r\n\t\tif (fromIndex > -1) {\r\n\r\n\t\t\tcolumns.splice(fromIndex, 1);\r\n\r\n\t\t\ttoIndex = columns.indexOf(to);\r\n\r\n\t\t\tif (toIndex > -1) {\r\n\r\n\t\t\t\tif(after){\r\n\t\t\t\t\ttoIndex = toIndex+1;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\ttoIndex = fromIndex;\r\n\t\t\t}\r\n\r\n\t\t\tcolumns.splice(toIndex, 0, from);\r\n\r\n\t\t\tif(updateRows){\r\n\r\n\t\t\t\trows = this.chain(\"column-moving-rows\", [from, to, after], null, []) || [];\r\n\r\n\t\t\t\trows = rows.concat(this.table.rowManager.rows);\r\n\r\n\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\tif(row.cells.length){\r\n\t\t\t\t\t\tvar cell = row.cells.splice(fromIndex, 1)[0];\r\n\t\t\t\t\t\trow.cells.splice(toIndex, 0, cell);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscrollToColumn(column, position, ifVisible){\r\n\t\tvar left = 0,\r\n\t\toffset = 0,\r\n\t\tadjust = 0,\r\n\t\tcolEl = column.getElement();\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\r\n\t\t\tif(typeof position === \"undefined\"){\r\n\t\t\t\tposition = this.table.options.scrollToColumnPosition;\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof ifVisible === \"undefined\"){\r\n\t\t\t\tifVisible = this.table.options.scrollToColumnIfVisible;\r\n\t\t\t}\r\n\r\n\t\t\tif(column.visible){\r\n\r\n\t\t\t\t//align to correct position\r\n\t\t\t\tswitch(position){\r\n\t\t\t\t\tcase \"middle\":\r\n\t\t\t\t\tcase \"center\":\r\n\t\t\t\t\tadjust = -this.element.clientWidth / 2;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"right\":\r\n\t\t\t\t\tadjust = colEl.clientWidth - this.headersElement.clientWidth;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//check column visibility\r\n\t\t\t\tif(!ifVisible){\r\n\r\n\t\t\t\t\toffset = colEl.offsetLeft;\r\n\r\n\t\t\t\t\tif(offset > 0 && offset + colEl.offsetWidth < this.element.clientWidth){\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//calculate scroll position\r\n\t\t\t\tleft = colEl.offsetLeft + adjust;\r\n\r\n\t\t\t\tleft = Math.max(Math.min(left, this.table.rowManager.element.scrollWidth - this.table.rowManager.element.clientWidth),0);\r\n\r\n\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\tthis.scrollHorizontal(left);\r\n\r\n\t\t\t\tresolve();\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - Column not visible\");\r\n\t\t\t\treject(\"Scroll Error - Column not visible\");\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\tgenerateCells(row){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tcells.push(column.generateCell(row));\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\t//////////////// Column Management /////////////////\r\n\tgetFlexBaseWidth(){\r\n\t\tvar totalWidth = this.table.element.clientWidth, //table element width\r\n\t\tfixedWidth = 0;\r\n\r\n\t\t//adjust for vertical scrollbar if present\r\n\t\tif(this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight){\r\n\t\t\ttotalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth;\r\n\t\t}\r\n\r\n\t\tthis.columnsByIndex.forEach(function(column){\r\n\t\t\tvar width, minWidth, colWidth;\r\n\r\n\t\t\tif(column.visible){\r\n\r\n\t\t\t\twidth = column.definition.width || 0;\r\n\r\n\t\t\t\tminWidth = parseInt(column.minWidth);\r\n\r\n\t\t\t\tif(typeof(width) == \"string\"){\r\n\t\t\t\t\tif(width.indexOf(\"%\") > -1){\r\n\t\t\t\t\t\tcolWidth = (totalWidth / 100) * parseInt(width) ;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tcolWidth = parseInt(width);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolWidth = width;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn fixedWidth;\r\n\t}\r\n\r\n\taddColumn(definition, before, nextToColumn){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar column = this._addColumn(definition, before, nextToColumn);\r\n\r\n\t\t\tthis._reIndexColumns();\r\n\r\n\t\t\tthis.dispatch(\"column-add\", definition, before, nextToColumn);\r\n\r\n\t\t\tif(this.layoutMode() != \"fitColumns\"){\r\n\t\t\t\tcolumn.reinitializeWidth();\r\n\t\t\t}\r\n\r\n\t\t\tthis.redraw(true);\r\n\r\n\t\t\tthis.table.rowManager.reinitialize();\r\n\r\n\t\t\tthis.renderer.rerenderColumns();\r\n\r\n\t\t\tresolve(column);\r\n\t\t});\r\n\t}\r\n\r\n\t//remove column from system\r\n\tderegisterColumn(column){\r\n\t\tvar field = column.getField(),\r\n\t\tindex;\r\n\r\n\t\t//remove from field list\r\n\t\tif(field){\r\n\t\t\tdelete this.columnsByField[field];\r\n\t\t}\r\n\r\n\t\t//remove from index list\r\n\t\tindex = this.columnsByIndex.indexOf(column);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columnsByIndex.splice(index, 1);\r\n\t\t}\r\n\r\n\t\t//remove from column list\r\n\t\tindex = this.columns.indexOf(column);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columns.splice(index, 1);\r\n\t\t}\r\n\r\n\t\tthis.verticalAlignHeaders();\r\n\r\n\t\tthis.redraw();\r\n\t}\r\n\r\n\t//redraw columns\r\n\tredraw(force){\r\n\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\tthis.verticalAlignHeaders();\r\n\t\t}\r\n\r\n\t\tif(force){\r\n\t\t\tthis.table.rowManager.resetScroll();\r\n\t\t\tthis.table.rowManager.reinitialize();\r\n\t\t}\r\n\r\n\t\tif(!this.confirm(\"table-redrawing\", force)){\r\n\t\t\tthis.layoutRefresh();\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"table-redraw\", force);\r\n\r\n\t\tthis.table.footerManager.redraw();\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class BaiscVertical extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.verticalFillMode = \"fill\";\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t}\r\n\r\n\tclearRows(){\r\n\t\tvar element = this.tableElement;\r\n\r\n\t\t// element.children.detach();\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\telement.scrollTop = 0;\r\n\t\telement.scrollLeft = 0;\r\n\r\n\t\telement.style.minWidth = \"\";\r\n\t\telement.style.minHeight = \"\";\r\n\t\telement.style.display = \"\";\r\n\t\telement.style.visibility = \"\";\r\n\t}\r\n\r\n\trenderRows(){\r\n\t\tvar element = this.tableElement,\r\n\t\tonlyGroupHeaders = true;\r\n\r\n\t\tthis.rows().forEach((row, index) => {\r\n\t\t\tthis.styleRow(row, index);\r\n\t\t\telement.appendChild(row.getElement());\r\n\t\t\trow.initialize(true);\r\n\r\n\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\tonlyGroupHeaders = false;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(onlyGroupHeaders){\r\n\t\t\telement.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t}else{\r\n\t\t\telement.style.minWidth = \"\";\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trerenderRows(callback){\r\n\t\tthis.clearRows();\r\n\t\tthis.renderRows();\r\n\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\tvar rowTop = Helpers.elOffset(row.getElement()).top;\r\n\r\n\t\treturn !(Math.abs(this.elementVertical.scrollTop - rowTop) > Math.abs(this.elementVertical.scrollTop + this.elementVertical.clientHeight - rowTop));\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tthis.elementVertical.scrollTop = Helpers.elOffset(rowEl).top - Helpers.elOffset(this.elementVertical).top + this.elementVertical.scrollTop;\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\treturn this.rows();\r\n\t}\r\n\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class VirtualDomVertical extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.verticalFillMode = \"fill\";\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.vDomRowHeight = 20; //approximation of row heights for padding\r\n\r\n\t\tthis.vDomTop = 0; //hold position for first rendered row in the virtual DOM\r\n\t\tthis.vDomBottom = 0; //hold possition for last rendered row in the virtual DOM\r\n\r\n\t\tthis.vDomScrollPosTop = 0; //last scroll position of the vDom top;\r\n\t\tthis.vDomScrollPosBottom = 0; //last scroll position of the vDom bottom;\r\n\r\n\t\tthis.vDomTopPad = 0; //hold value of padding for top of virtual DOM\r\n\t\tthis.vDomBottomPad = 0; //hold value of padding for bottom of virtual DOM\r\n\r\n\t\tthis.vDomMaxRenderChain = 90; //the maximum number of dom elements that can be rendered in 1 go\r\n\r\n\t\tthis.vDomWindowBuffer = 0; //window row buffer before removing elements, to smooth scrolling\r\n\r\n\t\tthis.vDomWindowMinTotalRows = 20; //minimum number of rows to be generated in virtual dom (prevent buffering issues on tables with tall rows)\r\n\t\tthis.vDomWindowMinMarginRows = 5; //minimum number of rows to be generated in virtual dom margin\r\n\r\n\t\tthis.vDomTopNewRows = []; //rows to normalize after appending to optimize render speed\r\n\t\tthis.vDomBottomNewRows = []; //rows to normalize after appending to optimize render speed\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t///////// Public Functions ///////////\r\n\t//////////////////////////////////////\r\n\r\n\tclearRows(){\r\n\t\tvar element = this.tableElement;\r\n\r\n\t\t// element.children.detach();\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\telement.style.paddingTop = \"\";\r\n\t\telement.style.paddingBottom = \"\";\r\n\t\t// element.style.minWidth = \"\";\r\n\t\telement.style.minHeight = \"\";\r\n\t\telement.style.display = \"\";\r\n\t\telement.style.visibility = \"\";\r\n\r\n\t\tthis.elementVertical.scrollTop = 0;\r\n\t\tthis.elementVertical.scrollLeft = 0;\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.vDomTop = 0;\r\n\t\tthis.vDomBottom = 0;\r\n\t\tthis.vDomTopPad = 0;\r\n\t\tthis.vDomBottomPad = 0;\r\n\t\tthis.vDomScrollPosTop = 0;\r\n\t\tthis.vDomScrollPosBottom = 0;\r\n\t}\r\n\r\n\trenderRows(){\r\n\t\tthis._virtualRenderFill();\r\n\t}\r\n\r\n\trerenderRows(callback){\r\n\t\tvar scrollTop = this.elementVertical.scrollTop;\r\n\t\tvar topRow = false;\r\n\t\tvar topOffset = false;\r\n\r\n\t\tvar left = this.table.rowManager.scrollLeft;\r\n\r\n\t\tvar rows = this.rows();\r\n\r\n\t\tfor(var i = this.vDomTop; i <= this.vDomBottom; i++){\r\n\r\n\t\t\tif(rows[i]){\r\n\t\t\t\tvar diff = scrollTop - rows[i].getElement().offsetTop;\r\n\r\n\t\t\t\tif(topOffset === false || Math.abs(diff) < topOffset){\r\n\t\t\t\t\ttopOffset = diff;\r\n\t\t\t\t\ttopRow = i;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\trows.forEach((row) => {\r\n\t\t\trow.deinitializeHeight();\r\n\t\t});\r\n\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\r\n\t\tthis._virtualRenderFill((topRow === false ? this.rows.length - 1 : topRow), true, topOffset || 0);\r\n\r\n\t\tthis.scrollColumns(left);\r\n\t}\r\n\r\n\tscrollColumns(left){\r\n\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t}\r\n\r\n\tscrollRows(top, dir){\r\n\t\tvar topDiff = top - this.vDomScrollPosTop;\r\n\t\tvar bottomDiff = top - this.vDomScrollPosBottom;\r\n\t\tvar margin = this.vDomWindowBuffer * 2;\r\n\t\tvar rows = this.rows();\r\n\r\n\t\tthis.scrollTop = top;\r\n\r\n\t\tif(-topDiff > margin || bottomDiff > margin){\r\n\t\t\t//if big scroll redraw table;\r\n\t\t\tvar left = this.table.rowManager.scrollLeft;\r\n\t\t\tthis._virtualRenderFill(Math.floor((this.elementVertical.scrollTop / this.elementVertical.scrollHeight) * rows.length));\r\n\t\t\tthis.scrollColumns(left);\r\n\t\t}else{\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\t//scrolling up\r\n\t\t\t\tif(topDiff < 0){\r\n\t\t\t\t\tthis._addTopRow(rows, -topDiff);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(bottomDiff < 0){\r\n\t\t\t\t\t//hide bottom row if needed\r\n\t\t\t\t\tif(this.vDomScrollHeight - this.scrollTop > this.vDomWindowBuffer){\r\n\t\t\t\t\t\tthis._removeBottomRow(rows, -bottomDiff);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomScrollPosBottom = this.scrollTop;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\r\n\t\t\t\tif(bottomDiff >= 0){\r\n\t\t\t\t\tthis._addBottomRow(rows, bottomDiff);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//scrolling down\r\n\t\t\t\tif(topDiff >= 0){\r\n\t\t\t\t\t//hide top row if needed\r\n\t\t\t\t\tif(this.scrollTop > this.vDomWindowBuffer){\r\n\t\t\t\t\t\tthis._removeTopRow(rows, topDiff);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomScrollPosTop = this.scrollTop;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tresize(){\r\n\t\tthis.vDomWindowBuffer = this.table.options.renderVerticalBuffer || this.elementVertical.clientHeight;\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\tvar rowIndex = this.rows().indexOf(row);\r\n\r\n\t\treturn !(Math.abs(this.vDomTop - rowIndex) > Math.abs(this.vDomBottom - rowIndex));\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\tvar index = this.rows().indexOf(row);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis._virtualRenderFill(index, true);\r\n\t\t}\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\tvar topEdge = this.elementVertical.scrollTop,\r\n\t\tbottomEdge = this.elementVertical.clientHeight + topEdge,\r\n\t\ttopFound = false,\r\n\t\ttopRow = 0,\r\n\t\tbottomRow = 0,\r\n\t\trows = this.rows();\r\n\r\n\t\tif(includingBuffer){\r\n\t\t\ttopRow = this.vDomTop;\r\n\t\t\tbottomRow = this.vDomBottom;\r\n\t\t}else{\r\n\t\t\tfor(var i = this.vDomTop; i <= this.vDomBottom; i++){\r\n\t\t\t\tif(rows[i]){\r\n\t\t\t\t\tif(!topFound){\r\n\t\t\t\t\t\tif((topEdge - rows[i].getElement().offsetTop) >= 0){\r\n\t\t\t\t\t\t\ttopRow = i;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\ttopFound = true;\r\n\r\n\t\t\t\t\t\t\tif(bottomEdge - rows[i].getElement().offsetTop >= 0){\r\n\t\t\t\t\t\t\t\tbottomRow = i;\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(bottomEdge - rows[i].getElement().offsetTop >= 0){\r\n\t\t\t\t\t\t\tbottomRow = i;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn rows.slice(topRow, bottomRow + 1);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t//////// Internal Rendering //////////\r\n\t//////////////////////////////////////\r\n\r\n\t//full virtual render\r\n\t_virtualRenderFill(position, forceMove, offset){\r\n\t\tvar\telement = this.tableElement,\r\n\t\tholder = this.elementVertical,\r\n\t\ttopPad = 0,\r\n\t\trowsHeight = 0,\r\n\t\theightOccupied = 0,\r\n\t\ttopPadHeight = 0,\r\n\t\ti = 0,\r\n\t\trows = this.rows(),\r\n\t\trowsCount = rows.length,\r\n\t\tcontainerHeight = this.elementVertical.clientHeight;\r\n\r\n\t\tposition = position || 0;\r\n\r\n\t\toffset = offset || 0;\r\n\r\n\t\tif(!position){\r\n\t\t\tthis.clear();\r\n\t\t}else{\r\n\t\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\t\t//check if position is too close to bottom of table\r\n\t\t\theightOccupied = (rowsCount - position + 1) * this.vDomRowHeight;\r\n\r\n\t\t\tif(heightOccupied < containerHeight){\r\n\t\t\t\tposition -= Math.ceil((containerHeight - heightOccupied) / this.vDomRowHeight);\r\n\t\t\t\tif(position < 0){\r\n\t\t\t\t\tposition = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//calculate initial pad\r\n\t\t\ttopPad = Math.min(Math.max(Math.floor(this.vDomWindowBuffer / this.vDomRowHeight), this.vDomWindowMinMarginRows), position);\r\n\t\t\tposition -= topPad;\r\n\t\t}\r\n\r\n\t\tif(rowsCount && Helpers.elVisible(this.elementVertical)){\r\n\t\t\tthis.vDomTop = position;\r\n\r\n\t\t\tthis.vDomBottom = position -1;\r\n\r\n\t\t\twhile ((rowsHeight <= containerHeight + this.vDomWindowBuffer || i < this.vDomWindowMinTotalRows) && this.vDomBottom < rowsCount -1){\r\n\t\t\t\tvar index = this.vDomBottom + 1,\r\n\t\t\t\trow = rows[index],\r\n\t\t\t\trowHeight = 0;\r\n\r\n\t\t\t\tthis.styleRow(row, index);\r\n\r\n\t\t\t\telement.appendChild(row.getElement());\r\n\r\n\t\t\t\trow.initialize();\r\n\r\n\t\t\t\tif(!row.heightInitialized){\r\n\t\t\t\t\trow.normalizeHeight(true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowHeight = row.getHeight();\r\n\r\n\t\t\t\tif(i < topPad){\r\n\t\t\t\t\ttopPadHeight += rowHeight;\r\n\t\t\t\t}else{\r\n\t\t\t\t\trowsHeight += rowHeight;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.vDomBottom ++;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\r\n\t\t\tif(!position){\r\n\t\t\t\tthis.vDomTopPad = 0;\r\n\t\t\t\t//adjust rowheight to match average of rendered elements\r\n\t\t\t\tthis.vDomRowHeight = Math.floor((rowsHeight + topPadHeight) / i);\r\n\t\t\t\tthis.vDomBottomPad = this.vDomRowHeight * (rowsCount - this.vDomBottom -1);\r\n\r\n\t\t\t\tthis.vDomScrollHeight = topPadHeight + rowsHeight + this.vDomBottomPad - containerHeight;\r\n\t\t\t}else{\r\n\t\t\t\tthis.vDomTopPad = !forceMove ? this.scrollTop - topPadHeight : (this.vDomRowHeight * this.vDomTop) + offset;\r\n\t\t\t\tthis.vDomBottomPad = this.vDomBottom == rowsCount-1 ? 0 : Math.max(this.vDomScrollHeight - this.vDomTopPad - rowsHeight - topPadHeight, 0);\r\n\t\t\t}\r\n\r\n\t\t\telement.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\telement.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\r\n\t\t\tif(forceMove){\r\n\t\t\t\tthis.scrollTop = this.vDomTopPad + (topPadHeight) + offset - (this.elementVertical.scrollWidth > this.elementVertical.clientWidth ? this.elementVertical.offsetHeight - containerHeight : 0);\r\n\t\t\t}\r\n\r\n\t\t\tthis.scrollTop = Math.min(this.scrollTop, this.elementVertical.scrollHeight - containerHeight);\r\n\r\n\t\t\t//adjust for horizontal scrollbar if present (and not at top of table)\r\n\t\t\tif(this.elementVertical.scrollWidth > this.elementVertical.offsetWidth && forceMove){\r\n\t\t\t\tthis.scrollTop += this.elementVertical.offsetHeight - containerHeight;\r\n\t\t\t}\r\n\r\n\t\t\tthis.vDomScrollPosTop = this.scrollTop;\r\n\t\t\tthis.vDomScrollPosBottom = this.scrollTop;\r\n\r\n\t\t\tholder.scrollTop = this.scrollTop;\r\n\r\n\t\t\tthis.dispatch(\"render-virtual-fill\");\r\n\t\t}\r\n\t}\r\n\r\n\t_addTopRow(rows, fillableSpace){\r\n\t\tvar table = this.tableElement,\r\n\t\taddedRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\tindex = this.vDomTop -1,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tif(this.vDomTop){\r\n\t\t\t\tlet row = rows[index],\r\n\t\t\t\trowHeight, initialized;\r\n\r\n\t\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\t\t\t\t\tinitialized = row.initialized;\r\n\r\n\t\t\t\t\tif(fillableSpace >= rowHeight){\r\n\r\n\t\t\t\t\t\tthis.styleRow(row, index);\r\n\t\t\t\t\t\ttable.insertBefore(row.getElement(), table.firstChild);\r\n\r\n\t\t\t\t\t\tif(!row.initialized || !row.heightInitialized){\r\n\t\t\t\t\t\t\taddedRows.push(row);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trow.initialize();\r\n\r\n\t\t\t\t\t\tif(!initialized){\r\n\t\t\t\t\t\t\trowHeight = row.getElement().offsetHeight;\r\n\r\n\t\t\t\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\t\tthis.vDomTop--;\r\n\t\t\t\t\t\tindex--;\r\n\t\t\t\t\t\ti++;\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of addedRows){\r\n\t\t\trow.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis._quickNormalizeRowHeight(addedRows);\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomTopPad -= paddingAdjust;\r\n\r\n\t\t\tif(this.vDomTopPad < 0){\r\n\t\t\t\tthis.vDomTopPad = index * this.vDomRowHeight;\r\n\t\t\t}\r\n\r\n\t\t\tif(index < 1){\r\n\t\t\t\tthis.vDomTopPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\ttable.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\tthis.vDomScrollPosTop -= paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_removeTopRow(rows, fillableSpace){\r\n\t\tvar removableRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[this.vDomTop],\r\n\t\t\trowHeight, diff;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\t\t\t\t\tthis.vDomTop++;\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tremovableRows.push(row);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of removableRows){\r\n\t\t\tlet rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomTopPad += paddingAdjust;\r\n\t\t\tthis.tableElement.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\tthis.vDomScrollPosTop += this.vDomTop ? paddingAdjust : paddingAdjust + this.vDomWindowBuffer;\r\n\t\t}\r\n\t}\r\n\r\n\t_addBottomRow(rows, fillableSpace){\r\n\t\tvar table = this.tableElement,\r\n\t\taddedRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\tindex = this.vDomBottom + 1,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[index],\r\n\t\t\trowHeight, initialized;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\t\t\t\tinitialized = row.initialized;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\r\n\t\t\t\t\tthis.styleRow(row, index);\r\n\t\t\t\t\ttable.appendChild(row.getElement());\r\n\r\n\t\t\t\t\tif(!row.initialized || !row.heightInitialized){\r\n\t\t\t\t\t\taddedRows.push(row);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\trow.initialize();\r\n\r\n\t\t\t\t\tif(!initialized){\r\n\t\t\t\t\t\trowHeight = row.getElement().offsetHeight;\r\n\r\n\t\t\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tthis.vDomBottom++;\r\n\t\t\t\t\tindex++;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of addedRows){\r\n\t\t\trow.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis._quickNormalizeRowHeight(addedRows);\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomBottomPad -= paddingAdjust;\r\n\r\n\t\t\tif(this.vDomBottomPad < 0 || index == rows.length -1){\r\n\t\t\t\tthis.vDomBottomPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\ttable.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\t\t\tthis.vDomScrollPosBottom += paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_removeBottomRow(rows, fillableSpace){\r\n\t\tvar removableRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[this.vDomBottom],\r\n\t\t\trowHeight, diff;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\t\t\t\t\tthis.vDomBottom --;\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tremovableRows.push(row);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of removableRows){\r\n\t\t\tlet rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomBottomPad += paddingAdjust;\r\n\r\n\t\t\tif(this.vDomBottomPad < 0){\r\n\t\t\t\tthis.vDomBottomPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\tthis.tableElement.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\t\t\tthis.vDomScrollPosBottom -= paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_quickNormalizeRowHeight(rows){\r\n\t\tfor(let row of rows){\r\n\t\t\trow.calcHeight();\r\n\t\t}\r\n\r\n\t\tfor(let row of rows){\r\n\t\t\trow.setCellHeight();\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\nimport Row from './row/Row.js';\r\nimport RowComponent from './row/RowComponent.js';\r\nimport Helpers from './tools/Helpers.js';\r\n\r\nimport RendererBasicVertical from './rendering/renderers/BasicVertical.js';\r\nimport RendererVirtualDomVertical from './rendering/renderers/VirtualDomVertical.js';\r\n\r\nexport default class RowManager extends CoreFeature{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.element = this.createHolderElement(); //containing element\r\n\t\tthis.tableElement = this.createTableElement(); //table element\r\n\t\tthis.heightFixer = this.createTableElement(); //table element\r\n\t\tthis.placeholder = null; //placeholder element\r\n\t\tthis.placeholderContents = null; //placeholder element\r\n\t\t\r\n\t\tthis.firstRender = false; //handle first render\r\n\t\tthis.renderMode = \"virtual\"; //current rendering mode\r\n\t\tthis.fixedHeight = false; //current rendering mode\r\n\t\t\r\n\t\tthis.rows = []; //hold row data objects\r\n\t\tthis.activeRowsPipeline = []; //hold calculation of active rows\r\n\t\tthis.activeRows = []; //rows currently available to on display in the table\r\n\t\tthis.activeRowsCount = 0; //count of active rows\r\n\t\t\r\n\t\tthis.displayRows = []; //rows currently on display in the table\r\n\t\tthis.displayRowsCount = 0; //count of display rows\r\n\t\t\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.rowNumColumn = false; //hold column component for row number column\r\n\t\t\r\n\t\tthis.redrawBlock = false; //prevent redraws to allow multiple data manipulations before continuing\r\n\t\tthis.redrawBlockRestoreConfig = false; //store latest redraw function calls for when redraw is needed\r\n\t\tthis.redrawBlockRenderInPosition = false; //store latest redraw function calls for when redraw is needed\r\n\t\t\r\n\t\tthis.dataPipeline = []; //hold data pipeline tasks\r\n\t\tthis.displayPipeline = []; //hold data display pipeline tasks\r\n\t\t\r\n\t\tthis.renderer = null;\r\n\t}\r\n\t\r\n\t//////////////// Setup Functions /////////////////\r\n\t\r\n\tcreateHolderElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-tableholder\");\r\n\t\tel.setAttribute(\"tabindex\", 0);\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tcreateTableElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-table\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tinitializePlaceholder(){\r\n\t\t//configure placeholder element\r\n\t\tif(typeof this.table.options.placeholder == \"string\"){\r\n\t\t\tlet el = document.createElement(\"div\");\r\n\t\t\tel.classList.add(\"tabulator-placeholder\");\r\n\t\t\t\r\n\t\t\tlet contents = document.createElement(\"div\");\r\n\t\t\tcontents.classList.add(\"tabulator-placeholder-contents\");\r\n\t\t\tcontents.innerHTML = this.table.options.placeholder;\r\n\t\t\t\r\n\t\t\tel.appendChild(contents);\r\n\t\t\t\r\n\t\t\tthis.placeholderContents = contents;\r\n\t\t\tthis.placeholder = el;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return containing element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\t\r\n\t//return table element\r\n\tgetTableElement(){\r\n\t\treturn this.tableElement;\r\n\t}\r\n\t\r\n\t//return position of row in table\r\n\tgetRowPosition(row, active){\r\n\t\tif(active){\r\n\t\t\treturn this.activeRows.indexOf(row);\r\n\t\t}else{\r\n\t\t\treturn this.rows.indexOf(row);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.initializePlaceholder()\r\n\t\tthis.initializeRenderer();\r\n\t\t\r\n\t\t//initialize manager\r\n\t\tthis.element.appendChild(this.tableElement);\r\n\t\t\r\n\t\tthis.firstRender = true;\r\n\t\t\r\n\t\t//scroll header along with table body\r\n\t\tthis.element.addEventListener(\"scroll\", () => {\r\n\t\t\tvar left = this.element.scrollLeft,\r\n\t\t\tleftDir = this.scrollLeft > left,\r\n\t\t\ttop = this.element.scrollTop,\r\n\t\t\ttopDir = this.scrollTop > top;\r\n\t\t\t\r\n\t\t\t//handle horizontal scrolling\r\n\t\t\tif(this.scrollLeft != left){\r\n\t\t\t\tthis.scrollLeft = left;\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"scroll-horizontal\", left, leftDir);\r\n\t\t\t\tthis.dispatchExternal(\"scrollHorizontal\", left, leftDir);\r\n\r\n\t\t\t\tthis._positionPlaceholder();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//handle vertical scrolling\r\n\t\t\tif(this.scrollTop != top){\r\n\t\t\t\tthis.scrollTop = top;\r\n\t\t\t\t\r\n\t\t\t\tthis.renderer.scrollRows(top, topDir);\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"scroll-vertical\", top, topDir);\r\n\t\t\t\tthis.dispatchExternal(\"scrollVertical\", top, topDir);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t////////////////// Row Manipulation //////////////////\r\n\tfindRow(subject){\r\n\t\tif(typeof subject == \"object\"){\r\n\t\t\tif(subject instanceof Row){\r\n\t\t\t\t//subject is row element\r\n\t\t\t\treturn subject;\r\n\t\t\t}else if(subject instanceof RowComponent){\r\n\t\t\t\t//subject is public row component\r\n\t\t\t\treturn subject._getSelf() || false;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\t//subject is a HTML element of the row\r\n\t\t\t\tlet match = this.rows.find((row) => {\r\n\t\t\t\t\treturn row.getElement() === subject;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\treturn match || false;\r\n\t\t\t}\r\n\t\t}else if(typeof subject == \"undefined\" || subject === null){\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the index of the row\r\n\t\t\tlet match = this.rows.find((row) => {\r\n\t\t\t\treturn row.data[this.table.options.index] == subject;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\treturn match || false;\r\n\t\t}\r\n\t\t\r\n\t\t//catch all for any other type of input\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tgetRowFromDataObject(data){\r\n\t\tvar match = this.rows.find((row) => {\r\n\t\t\treturn row.data === data;\r\n\t\t});\r\n\t\t\r\n\t\treturn match || false;\r\n\t}\r\n\t\r\n\tgetRowFromPosition(position, active){\r\n\t\tif(active){\r\n\t\t\treturn this.activeRows[position];\r\n\t\t}else{\r\n\t\t\treturn this.rows[position];\r\n\t\t}\r\n\t}\r\n\t\r\n\tscrollToRow(row, position, ifVisible){\r\n\t\treturn this.renderer.scrollToRowPosition(row, position, ifVisible);\r\n\t}\r\n\t\r\n\t////////////////// Data Handling //////////////////\r\n\tsetData(data, renderInPosition, columnsChanged){\r\n\t\treturn new Promise((resolve, reject)=>{\r\n\t\t\tif(renderInPosition && this.getDisplayRows().length){\r\n\t\t\t\tif(this.table.options.pagination){\r\n\t\t\t\t\tthis._setDataActual(data, true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.reRenderInPosition(() => {\r\n\t\t\t\t\t\tthis._setDataActual(data);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.options.autoColumns && columnsChanged && this.table.initialized){\r\n\t\t\t\t\tthis.table.columnManager.generateColumnsFromRowData(data);\r\n\t\t\t\t}\r\n\t\t\t\tthis.resetScroll();\r\n\t\t\t\t\r\n\t\t\t\tthis._setDataActual(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\t\r\n\t_setDataActual(data, renderInPosition){\r\n\t\tthis.dispatchExternal(\"dataProcessing\", data);\r\n\t\t\r\n\t\tthis._wipeElements();\r\n\t\t\r\n\t\tif(Array.isArray(data)){\r\n\t\t\tthis.dispatch(\"data-processing\", data);\r\n\t\t\t\r\n\t\t\tdata.forEach((def, i) => {\r\n\t\t\t\tif(def && typeof def === \"object\"){\r\n\t\t\t\t\tvar row = new Row(def, this);\r\n\t\t\t\t\tthis.rows.push(row);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Data Loading Warning - Invalid row data detected and ignored, expecting object but received:\", def);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.refreshActiveData(false, false, renderInPosition);\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"data-processed\", data);\r\n\t\t\tthis.dispatchExternal(\"dataProcessed\", data);\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Data Loading Error - Unable to process data due to invalid data type \\nExpecting: array \\nReceived: \", typeof data, \"\\nData: \", data);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_wipeElements(){\r\n\t\tthis.dispatch(\"rows-wipe\");\r\n\t\t\r\n\t\tthis.rows.forEach((row) => {\r\n\t\t\trow.wipe();\r\n\t\t});\r\n\t\t\r\n\t\tthis.rows = [];\r\n\t\tthis.activeRows = [];\r\n\t\tthis.activeRowsPipeline = [];\r\n\t\tthis.activeRowsCount = 0;\r\n\t\tthis.displayRows = [];\r\n\t\tthis.displayRowsCount = 0;\r\n\t\t\r\n\t\tthis.adjustTableSize();\r\n\t}\r\n\t\r\n\tdeleteRow(row, blockRedraw){\r\n\t\tvar allIndex = this.rows.indexOf(row),\r\n\t\tactiveIndex = this.activeRows.indexOf(row);\r\n\t\t\r\n\t\tif(activeIndex > -1){\r\n\t\t\tthis.activeRows.splice(activeIndex, 1);\r\n\t\t}\r\n\t\t\r\n\t\tif(allIndex > -1){\r\n\t\t\tthis.rows.splice(allIndex, 1);\r\n\t\t}\r\n\t\t\r\n\t\tthis.setActiveRows(this.activeRows);\r\n\t\t\r\n\t\tthis.displayRowIterator((rows) => {\r\n\t\t\tvar displayIndex = rows.indexOf(row);\r\n\t\t\t\r\n\t\t\tif(displayIndex > -1){\r\n\t\t\t\trows.splice(displayIndex, 1);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t}\r\n\t\t\r\n\t\tthis.regenerateRowNumbers();\r\n\t\t\r\n\t\tthis.dispatchExternal(\"rowDeleted\", row.getComponent());\r\n\t\t\r\n\t\tif(!this.displayRowsCount){\r\n\t\t\tthis._showPlaceholder();\r\n\t\t}\r\n\t\t\r\n\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\tthis.dispatchExternal(\"dataChanged\", this.getData());\r\n\t\t}\r\n\t}\r\n\t\r\n\taddRow(data, pos, index, blockRedraw){\r\n\t\tvar row = this.addRowActual(data, pos, index, blockRedraw);\r\n\t\treturn row;\r\n\t}\r\n\t\r\n\t//add multiple rows\r\n\taddRows(data, pos, index){\r\n\t\tvar length = 0,\r\n\t\trows = [];\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tpos = this.findAddRowPos(pos);\r\n\t\t\t\r\n\t\t\tif(!Array.isArray(data)){\r\n\t\t\t\tdata = [data];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlength = data.length - 1;\r\n\t\t\t\r\n\t\t\tif((typeof index == \"undefined\" && pos) || (typeof index !== \"undefined\" && !pos)){\r\n\t\t\t\tdata.reverse();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdata.forEach((item, i) => {\r\n\t\t\t\tvar row = this.addRow(item, pos, index, true);\r\n\t\t\t\trows.push(row);\r\n\t\t\t\tthis.dispatch(\"row-added\", row, data, pos, index);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.refreshActiveData(false, false, true);\r\n\t\t\t\r\n\t\t\tthis.regenerateRowNumbers();\r\n\t\t\t\r\n\t\t\tif(rows.length){\r\n\t\t\t\tthis._clearPlaceholder();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tresolve(rows);\r\n\t\t});\r\n\t}\r\n\t\r\n\tfindAddRowPos(pos){\r\n\t\tif(typeof pos === \"undefined\"){\r\n\t\t\tpos = this.table.options.addRowPos;\r\n\t\t}\r\n\t\t\r\n\t\tif(pos === \"pos\"){\r\n\t\t\tpos = true;\r\n\t\t}\r\n\t\t\r\n\t\tif(pos === \"bottom\"){\r\n\t\t\tpos = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn pos;\r\n\t}\r\n\t\r\n\taddRowActual(data, pos, index, blockRedraw){\r\n\t\tvar row = data instanceof Row ? data : new Row(data || {}, this),\r\n\t\ttop = this.findAddRowPos(pos),\r\n\t\tallIndex = -1,\r\n\t\tactiveIndex, chainResult;\r\n\t\t\r\n\t\tif(!index){\r\n\t\t\tchainResult = this.chain(\"row-adding-position\", [row, top], null, {index, top});\r\n\t\t\t\r\n\t\t\tindex = chainResult.index;\r\n\t\t\ttop = chainResult.top;\r\n\t\t}\r\n\t\t\r\n\t\tif(typeof index !== \"undefined\"){\r\n\t\t\tindex = this.findRow(index);\r\n\t\t}\r\n\t\t\r\n\t\tindex = this.chain(\"row-adding-index\", [row, index, top], null, index);\r\n\t\t\r\n\t\tif(index){\r\n\t\t\tallIndex = this.rows.indexOf(index);\r\n\t\t}\r\n\t\t\r\n\t\tif(index && allIndex > -1){\r\n\t\t\tactiveIndex = this.activeRows.indexOf(index);\r\n\t\t\t\r\n\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\tvar displayIndex = rows.indexOf(index);\r\n\t\t\t\t\r\n\t\t\t\tif(displayIndex > -1){\r\n\t\t\t\t\trows.splice((top ? displayIndex : displayIndex + 1), 0, row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(activeIndex > -1){\r\n\t\t\t\tthis.activeRows.splice((top ? activeIndex : activeIndex + 1), 0, row);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.rows.splice((top ? allIndex : allIndex + 1), 0, row);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tif(top){\r\n\t\t\t\t\r\n\t\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\t\trows.unshift(row);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRows.unshift(row);\r\n\t\t\t\tthis.rows.unshift(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\t\trows.push(row);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRows.push(row);\r\n\t\t\t\tthis.rows.push(row);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.setActiveRows(this.activeRows);\r\n\t\t\r\n\t\tthis.dispatchExternal(\"rowAdded\", row.getComponent());\r\n\t\t\r\n\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t}\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t}\r\n\t\t\r\n\t\treturn row;\r\n\t}\r\n\t\r\n\tmoveRow(from, to, after){\r\n\t\tthis.dispatch(\"row-move\", from, to, after);\r\n\t\t\r\n\t\tthis.moveRowActual(from, to, after);\r\n\t\t\r\n\t\tthis.regenerateRowNumbers();\r\n\t\t\r\n\t\tthis.dispatch(\"row-moved\", from, to, after);\r\n\t\tthis.dispatchExternal(\"rowMoved\", from.getComponent());\r\n\t}\r\n\t\r\n\tmoveRowActual(from, to, after){\r\n\t\tthis.moveRowInArray(this.rows, from, to, after);\r\n\t\tthis.moveRowInArray(this.activeRows, from, to, after);\r\n\t\t\r\n\t\tthis.displayRowIterator((rows) => {\r\n\t\t\tthis.moveRowInArray(rows, from, to, after);\r\n\t\t});\r\n\t\t\r\n\t\tthis.dispatch(\"row-moving\", from, to, after);\r\n\t}\r\n\t\r\n\tmoveRowInArray(rows, from, to, after){\r\n\t\tvar\tfromIndex, toIndex, start, end;\r\n\t\t\r\n\t\tif(from !== to){\r\n\t\t\t\r\n\t\t\tfromIndex = rows.indexOf(from);\r\n\t\t\t\r\n\t\t\tif (fromIndex > -1) {\r\n\t\t\t\t\r\n\t\t\t\trows.splice(fromIndex, 1);\r\n\t\t\t\t\r\n\t\t\t\ttoIndex = rows.indexOf(to);\r\n\t\t\t\t\r\n\t\t\t\tif (toIndex > -1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(after){\r\n\t\t\t\t\t\trows.splice(toIndex+1, 0, from);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trows.splice(toIndex, 0, from);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\trows.splice(fromIndex, 0, from);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//restyle rows\r\n\t\t\tif(rows === this.getDisplayRows()){\r\n\t\t\t\t\r\n\t\t\t\tstart = fromIndex < toIndex ? fromIndex : toIndex;\r\n\t\t\t\tend = toIndex > fromIndex ? toIndex : fromIndex +1;\r\n\t\t\t\t\r\n\t\t\t\tfor(let i = start; i <= end; i++){\r\n\t\t\t\t\tif(rows[i]){\r\n\t\t\t\t\t\tthis.styleRow(rows[i], i);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tclearData(){\r\n\t\tthis.setData([]);\r\n\t}\r\n\t\r\n\tgetRowIndex(row){\r\n\t\treturn this.findRowIndex(row, this.rows);\r\n\t}\r\n\t\r\n\tgetDisplayRowIndex(row){\r\n\t\tvar index = this.getDisplayRows().indexOf(row);\r\n\t\treturn index > -1 ? index : false;\r\n\t}\r\n\t\r\n\tnextDisplayRow(row, rowOnly){\r\n\t\tvar index = this.getDisplayRowIndex(row),\r\n\t\tnextRow = false;\r\n\t\t\r\n\t\t\r\n\t\tif(index !== false && index < this.displayRowsCount -1){\r\n\t\t\tnextRow = this.getDisplayRows()[index+1];\r\n\t\t}\r\n\t\t\r\n\t\tif(nextRow && (!(nextRow instanceof Row) || nextRow.type != \"row\")){\r\n\t\t\treturn this.nextDisplayRow(nextRow, rowOnly);\r\n\t\t}\r\n\t\t\r\n\t\treturn nextRow;\r\n\t}\r\n\t\r\n\tprevDisplayRow(row, rowOnly){\r\n\t\tvar index = this.getDisplayRowIndex(row),\r\n\t\tprevRow = false;\r\n\t\t\r\n\t\tif(index){\r\n\t\t\tprevRow = this.getDisplayRows()[index-1];\r\n\t\t}\r\n\t\t\r\n\t\tif(rowOnly && prevRow && (!(prevRow instanceof Row) || prevRow.type != \"row\")){\r\n\t\t\treturn this.prevDisplayRow(prevRow, rowOnly);\r\n\t\t}\r\n\t\t\r\n\t\treturn prevRow;\r\n\t}\r\n\t\r\n\tfindRowIndex(row, list){\r\n\t\tvar rowIndex;\r\n\t\t\r\n\t\trow = this.findRow(row);\r\n\t\t\r\n\t\tif(row){\r\n\t\t\trowIndex = list.indexOf(row);\r\n\t\t\t\r\n\t\t\tif(rowIndex > -1){\r\n\t\t\t\treturn rowIndex;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tgetData(active, transform){\r\n\t\tvar output = [],\r\n\t\trows = this.getRows(active);\r\n\t\t\r\n\t\trows.forEach(function(row){\r\n\t\t\tif(row.type == \"row\"){\r\n\t\t\t\toutput.push(row.getData(transform || \"data\"));\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetComponents(active){\r\n\t\tvar\toutput = [],\r\n\t\trows = this.getRows(active);\r\n\t\t\r\n\t\trows.forEach(function(row){\r\n\t\t\toutput.push(row.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetDataCount(active){\r\n\t\tvar rows = this.getRows(active);\r\n\t\t\r\n\t\treturn rows.length;\r\n\t}\r\n\t\r\n\tscrollHorizontal(left){\r\n\t\tthis.scrollLeft = left;\r\n\t\tthis.element.scrollLeft = left;\r\n\t\t\r\n\t\tthis.dispatch(\"scroll-horizontal\", left);\r\n\t}\r\n\t\r\n\tregisterDataPipelineHandler(handler, priority){\r\n\t\tif(typeof priority !== \"undefined\"){\r\n\t\t\tthis.dataPipeline.push({handler, priority})\r\n\t\t\tthis.dataPipeline.sort((a, b) => {\r\n\t\t\t\treturn a.priority - b.priority;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Data pipeline handlers must have a priority in order to be registered\")\r\n\t\t}\r\n\t}\r\n\t\r\n\tregisterDisplayPipelineHandler(handler, priority){\r\n\t\tif(typeof priority !== \"undefined\"){\r\n\t\t\tthis.displayPipeline.push({handler, priority})\r\n\t\t\tthis.displayPipeline.sort((a, b) => {\r\n\t\t\t\treturn a.priority - b.priority;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Display pipeline handlers must have a priority in order to be registered\")\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set active data set\r\n\trefreshActiveData(handler, skipStage, renderInPosition){\r\n\t\tvar table = this.table,\r\n\t\tstage = \"\",\r\n\t\tindex = 0,\r\n\t\tcascadeOrder = [\"all\", \"dataPipeline\", \"display\", \"displayPipeline\", \"end\"],\r\n\t\tdisplayIndex;\r\n\t\t\r\n\t\t\r\n\t\tif(typeof handler === \"function\"){\r\n\t\t\tindex = this.dataPipeline.findIndex((item) => {\r\n\t\t\t\treturn item.handler === handler;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\tstage = \"dataPipeline\";\r\n\t\t\t\t\r\n\t\t\t\tif(skipStage){\r\n\t\t\t\t\tif(index == this.dataPipeline.length - 1){\r\n\t\t\t\t\t\tstage = \"display\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tindex++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tindex = this.displayPipeline.findIndex((item) => {\r\n\t\t\t\t\treturn item.handler === handler;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tstage = \"displayPipeline\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(skipStage){\r\n\t\t\t\t\t\tif(index == this.displayPipeline.length - 1){\r\n\t\t\t\t\t\t\tstage = \"end\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tindex++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.error(\"Unable to refresh data, invalid handler provided\", handler)\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tstage = handler || \"all\";\r\n\t\t\tindex = 0;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.redrawBlock){\r\n\t\t\tif(!this.redrawBlockRestoreConfig || (this.redrawBlockRestoreConfig && ((this.redrawBlockRestoreConfig.stage === stage && index < this.redrawBlockRestoreConfig.index) || (cascadeOrder.indexOf(stage) < cascadeOrder.indexOf(this.redrawBlockRestoreConfig.stage))))){\r\n\t\t\t\tthis.redrawBlockRestoreConfig = {\r\n\t\t\t\t\thandler: handler,\r\n\t\t\t\t\tskipStage: skipStage,\r\n\t\t\t\t\trenderInPosition: renderInPosition,\r\n\t\t\t\t\tstage:stage,\r\n\t\t\t\t\tindex:index,\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn;\r\n\t\t}else{\r\n\t\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\t\tif(renderInPosition){\r\n\t\t\t\t\tthis.reRenderInPosition(this.refreshPipelines.bind(this, handler, stage, index, renderInPosition));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!handler){\r\n\t\t\t\t\t\tthis.table.columnManager.renderer.renderColumns();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.renderTable();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(table.options.layoutColumnsOnNewData){\r\n\t\t\t\t\t\tthis.table.columnManager.redraw(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"data-refreshed\");\r\n\t\t}\r\n\t}\r\n\t\r\n\trefreshPipelines(handler, stage, index, renderInPosition){\r\n\t\tthis.dispatch(\"data-refreshing\");\r\n\t\t\r\n\t\tif(!handler){\r\n\t\t\tthis.activeRowsPipeline[0] = this.rows.slice(0);\r\n\t\t}\r\n\t\t\r\n\t\t//cascade through data refresh stages\r\n\t\tswitch(stage){\r\n\t\t\tcase \"all\":\r\n\t\t\t//handle case where alldata needs refreshing\r\n\t\t\t\r\n\t\t\tcase \"dataPipeline\":\r\n\t\t\t\r\n\t\t\tfor(let i = index; i < this.dataPipeline.length; i++){\r\n\t\t\t\tlet result = this.dataPipeline[i].handler(this.activeRowsPipeline[i].slice(0));\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRowsPipeline[i + 1] = result || this.activeRowsPipeline[i].slice(0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);\r\n\t\t\t\r\n\t\t\tthis.regenerateRowNumbers();\r\n\t\t\t\r\n\t\t\tcase \"display\":\r\n\t\t\tindex = 0;\r\n\t\t\tthis.resetDisplayRows();\r\n\t\t\t\r\n\t\t\tcase \"displayPipeline\":\r\n\t\t\tfor(let i = index; i < this.displayPipeline.length; i++){\r\n\t\t\t\tlet result = this.displayPipeline[i].handler((i ? this.getDisplayRows(i - 1) : this.activeRows).slice(0), renderInPosition);\r\n\t\t\t\t\r\n\t\t\t\tthis.setDisplayRows(result || this.getDisplayRows(i - 1).slice(0), i);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase \"end\":\r\n\t\t\t//case to handle scenario when trying to skip past end stage\r\n\t\t}\r\n\t}\r\n\t\r\n\t//regenerate row numbers for row number formatter if in use\r\n\tregenerateRowNumbers(){\r\n\t\tif(this.rowNumColumn){\r\n\t\t\tthis.activeRows.forEach((row) => {\r\n\t\t\t\tvar cell = row.getCell(this.rowNumColumn);\r\n\t\t\t\t\r\n\t\t\t\tif(cell){\r\n\t\t\t\t\tcell._generateContents();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetActiveRows(activeRows){\r\n\t\tthis.activeRows = activeRows;\r\n\t\tthis.activeRowsCount = this.activeRows.length;\r\n\t}\r\n\t\r\n\t//reset display rows array\r\n\tresetDisplayRows(){\r\n\t\tthis.displayRows = [];\r\n\t\t\r\n\t\tthis.displayRows.push(this.activeRows.slice(0));\r\n\t\t\r\n\t\tthis.displayRowsCount = this.displayRows[0].length;\r\n\t}\r\n\t\r\n\tgetNextDisplayIndex(){\r\n\t\treturn this.displayRows.length;\r\n\t}\r\n\t\r\n\t//set display row pipeline data\r\n\tsetDisplayRows(displayRows, index){\r\n\t\t\r\n\t\tvar output = true;\r\n\t\t\r\n\t\tif(index && typeof this.displayRows[index] != \"undefined\"){\r\n\t\t\tthis.displayRows[index] = displayRows;\r\n\t\t\toutput = true;\r\n\t\t}else{\r\n\t\t\tthis.displayRows.push(displayRows)\r\n\t\t\toutput = index = this.displayRows.length -1;\r\n\t\t}\r\n\t\t\r\n\t\tif(index == this.displayRows.length -1){\r\n\t\t\tthis.displayRowsCount = this.displayRows[this.displayRows.length -1].length;\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetDisplayRows(index){\r\n\t\tif(typeof index == \"undefined\"){\r\n\t\t\treturn this.displayRows.length ? this.displayRows[this.displayRows.length -1] : [];\r\n\t\t}else{\r\n\t\t\treturn this.displayRows[index] || [];\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetVisibleRows(chain, viewable){\r\n\t\tvar rows = Object.assign([], this.renderer.visibleRows(!viewable));\r\n\t\t\r\n\t\tif(chain){\r\n\t\t\trows = this.chain(\"rows-visible\", [viewable], rows, rows);\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t//repeat action accross display rows\r\n\tdisplayRowIterator(callback){\r\n\t\tthis.activeRowsPipeline.forEach(callback);\r\n\t\tthis.displayRows.forEach(callback);\r\n\t\t\r\n\t\tthis.displayRowsCount = this.displayRows[this.displayRows.length -1].length;\r\n\t}\r\n\t\r\n\t//return only actual rows (not group headers etc)\r\n\tgetRows(type){\r\n\t\tvar rows;\r\n\t\t\r\n\t\tswitch(type){\r\n\t\t\tcase \"active\":\r\n\t\t\trows = this.activeRows;\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"display\":\r\n\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"visible\":\r\n\t\t\trows = this.getVisibleRows(false, true);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\trows = this.chain(\"rows-retrieve\", type, null, this.rows) || this.rows;\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t///////////////// Table Rendering /////////////////\r\n\t//trigger rerender of table in current position\r\n\treRenderInPosition(callback){\r\n\t\tif(this.redrawBlock){\r\n\t\t\tif(callback){\r\n\t\t\t\tcallback();\r\n\t\t\t}else{\r\n\t\t\t\tthis.redrawBlockRenderInPosition = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.renderer.rerenderRows(callback);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRenderer(){\r\n\t\tvar renderClass;\r\n\t\t\r\n\t\tvar renderers = {\r\n\t\t\t\"virtual\": RendererVirtualDomVertical,\r\n\t\t\t\"basic\": RendererBasicVertical,\r\n\t\t};\r\n\t\t\r\n\t\tif(typeof this.table.options.renderVertical === \"string\"){\r\n\t\t\trenderClass = renderers[this.table.options.renderVertical];\r\n\t\t}else{\r\n\t\t\trenderClass = this.table.options.renderVertical;\r\n\t\t}\r\n\t\t\r\n\t\tif(renderClass){\r\n\t\t\tthis.renderer = new renderClass(this.table, this.element, this.tableElement);\r\n\t\t\tthis.renderer.initialize();\r\n\t\t\t\r\n\t\t\tif((this.table.element.clientHeight || this.table.options.height)){\r\n\t\t\t\tthis.fixedHeight = true;\r\n\t\t\t}else{\r\n\t\t\t\tthis.fixedHeight = false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Unable to find matching renderer:\", table.options.renderVertical);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRenderMode(){\r\n\t\treturn this.renderMode;\r\n\t}\r\n\t\r\n\trenderTable(){\r\n\t\tthis.dispatchExternal(\"renderStarted\");\r\n\t\t\r\n\t\tthis.element.scrollTop = 0;\r\n\t\t\r\n\t\tthis._clearTable();\r\n\t\t\r\n\t\tif(this.displayRowsCount){\r\n\t\t\tthis.renderer.renderRows();\r\n\t\t\t\r\n\t\t\tif(this.firstRender){\r\n\t\t\t\tthis.firstRender = false;\r\n\t\t\t\tthis.layoutRefresh();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.renderEmptyScroll();\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.fixedHeight){\r\n\t\t\tthis.adjustTableSize();\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatch(\"table-layout\");\r\n\t\t\r\n\t\tif(!this.displayRowsCount){\r\n\t\t\tthis._showPlaceholder();\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatchExternal(\"renderComplete\");\r\n\t}\r\n\t\r\n\t//show scrollbars on empty table div\r\n\trenderEmptyScroll(){\r\n\t\tif(this.placeholder){\r\n\t\t\tthis.tableElement.style.display = \"none\";\r\n\t\t}else{\r\n\t\t\tthis.tableElement.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t\t// this.tableElement.style.minHeight = \"1px\";\r\n\t\t\t// this.tableElement.style.visibility = \"hidden\";\r\n\t\t}\r\n\t}\r\n\t\r\n\t_clearTable(){\r\n\t\tvar element = this.tableElement;\r\n\t\t\r\n\t\tthis._clearPlaceholder();\r\n\t\t\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.renderer.clearRows();\r\n\t}\r\n\t\r\n\t_showPlaceholder(){\r\n\t\tif(this.placeholder){\r\n\t\t\tthis.placeholder.setAttribute(\"tabulator-render-mode\", this.renderMode);\r\n\t\t\t\r\n\t\t\tthis.getElement().appendChild(this.placeholder);\r\n\t\t\tthis._positionPlaceholder();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_clearPlaceholder(){\r\n\t\tif(this.placeholder && this.placeholder.parentNode){\r\n\t\t\tthis.placeholder.parentNode.removeChild(this.placeholder);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_positionPlaceholder(){\r\n\t\tif(this.placeholder && this.placeholder.parentNode){\r\n\t\t\tthis.placeholder.style.width = this.table.columnManager.getWidth() + \"px\";\r\n\t\t\tthis.placeholderContents.style.width = this.table.rowManager.element.clientWidth + \"px\";\r\n\t\t\tthis.placeholderContents.style.marginLeft = this.scrollLeft + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tstyleRow(row, index){\r\n\t\tvar rowEl = row.getElement();\r\n\t\t\r\n\t\tif(index % 2){\r\n\t\t\trowEl.classList.add(\"tabulator-row-even\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-odd\");\r\n\t\t}else{\r\n\t\t\trowEl.classList.add(\"tabulator-row-odd\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-even\");\r\n\t\t}\r\n\t}\r\n\t\r\n\t//normalize height of active rows\r\n\tnormalizeHeight(){\r\n\t\tthis.activeRows.forEach(function(row){\r\n\t\t\trow.normalizeHeight();\r\n\t\t});\r\n\t}\r\n\t\r\n\t//adjust the height of the table holder to fit in the Tabulator element\r\n\tadjustTableSize(){\r\n\t\tvar initialHeight = this.element.clientHeight,\r\n\t\tmodExists;\r\n\t\t\r\n\t\tif(this.renderer.verticalFillMode === \"fill\"){\r\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));\r\n\t\t\t\r\n\t\t\tif(this.fixedHeight){\r\n\t\t\t\tthis.element.style.minHeight = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t\tthis.element.style.height = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t\tthis.element.style.maxHeight = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.height = \"\";\r\n\t\t\t\tthis.element.style.height = (this.table.element.clientHeight - otherHeight) + \"px\";\r\n\t\t\t\tthis.element.scrollTop = this.scrollTop;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.renderer.resize();\r\n\t\t\t\r\n\t\t\t//check if the table has changed size when dealing with variable height tables\r\n\t\t\tif(!this.fixedHeight && initialHeight != this.element.clientHeight){\r\n\t\t\t\tif(this.subscribed(\"table-resize\")){\r\n\t\t\t\t\tthis.dispatch(\"table-resize\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.redraw();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._positionPlaceholder();\r\n\t}\r\n\t\r\n\t//renitialize all rows\r\n\treinitialize(){\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\trow.reinitialize(true);\r\n\t\t});\r\n\t}\r\n\t\r\n\t//prevent table from being redrawn\r\n\tblockRedraw (){\r\n\t\tthis.redrawBlock = true;\r\n\t\tthis.redrawBlockRestoreConfig = false;\r\n\t}\r\n\t\r\n\t//restore table redrawing\r\n\trestoreRedraw (){\r\n\t\tthis.redrawBlock = false;\r\n\t\t\r\n\t\tif(this.redrawBlockRestoreConfig){\r\n\t\t\tthis.refreshActiveData(this.redrawBlockRestoreConfig.handler, this.redrawBlockRestoreConfig.skipStage, this.redrawBlockRestoreConfig.renderInPosition)\r\n\t\t\t\r\n\t\t\tthis.redrawBlockRestoreConfig = false;\r\n\t\t}else{\r\n\t\t\tif(this.redrawBlockRenderInPosition){\r\n\t\t\t\tthis.reRenderInPosition();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.redrawBlockRenderInPosition = false;\r\n\t}\r\n\t\r\n\t//redraw table\r\n\tredraw (force){\r\n\t\tvar pos = 0,\r\n\t\tleft = this.scrollLeft;\r\n\t\t\r\n\t\tthis.adjustTableSize();\r\n\t\t\r\n\t\tthis.table.tableWidth = this.table.element.clientWidth;\r\n\t\t\r\n\t\tif(!force){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t\tthis.scrollHorizontal(left);\r\n\t\t}else{\r\n\t\t\tthis.renderTable();\r\n\t\t}\r\n\t}\r\n\t\r\n\tresetScroll(){\r\n\t\tthis.element.scrollLeft = 0;\r\n\t\tthis.element.scrollTop = 0;\r\n\t\t\r\n\t\tif(this.table.browser === \"ie\"){\r\n\t\t\tvar event = document.createEvent(\"Event\");\r\n\t\t\tevent.initEvent(\"scroll\", false, true);\r\n\t\t\tthis.element.dispatchEvent(event);\r\n\t\t}else{\r\n\t\t\tthis.element.dispatchEvent(new Event('scroll'));\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\n\r\nexport default class FooterManager extends CoreFeature{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.active = false;\r\n\t\tthis.element = this.createElement(); //containing element\r\n\t\tthis.containerElement = this.createContainerElement(); //containing element\r\n\t\tthis.external = false;\r\n\t\tthis.links = [];\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeElement();\r\n\t}\r\n\r\n\tcreateElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-footer\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\t\r\n\tcreateContainerElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-footer-contents\");\r\n\r\n\t\tthis.element.appendChild(el);\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitializeElement(){\r\n\t\tif(this.table.options.footerElement){\r\n\r\n\t\t\tswitch(typeof this.table.options.footerElement){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(this.table.options.footerElement[0] === \"<\"){\r\n\t\t\t\t\tthis.containerElement.innerHTML = this.table.options.footerElement;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.external = true;\r\n\t\t\t\t\tthis.containerElement = document.querySelector(this.table.options.footerElement);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.element = this.table.options.footerElement;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tappend(element, parent){\r\n\t\tthis.activate(parent);\r\n\r\n\t\tthis.containerElement.appendChild(element);\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\tprepend(element, parent){\r\n\t\tthis.activate(parent);\r\n\r\n\t\tthis.element.insertBefore(element, this.element.firstChild);\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\tremove(element){\r\n\t\telement.parentNode.removeChild(element);\r\n\t\tthis.deactivate();\r\n\t}\r\n\r\n\tdeactivate(force){\r\n\t\tif(!this.element.firstChild || force){\r\n\t\t\tif(!this.external){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\t\t\tthis.active = false;\r\n\t\t}\r\n\t}\r\n\r\n\tactivate(parent){\r\n\t\tif(!this.active){\r\n\t\t\tthis.active = true;\r\n\t\t\tif(!this.external){\r\n\t\t\t\tthis.table.element.appendChild(this.getElement());\r\n\t\t\t\tthis.table.element.style.display = '';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(parent){\r\n\t\t\tthis.links.push(parent);\r\n\t\t}\r\n\t}\r\n\r\n\tredraw(){\r\n\t\tthis.links.forEach(function(link){\r\n\t\t\tlink.footerRedraw();\r\n\t\t});\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport Helpers from './Helpers.js';\r\nimport Row from '../row/Row.js';\r\n\r\nexport default class InteractionManager extends CoreFeature {\r\n\t\r\n\tconstructor (table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.el = null;\r\n\t\t\r\n\t\tthis.abortClasses = [\"tabulator-headers\", \"tabulator-table\"];\r\n\t\t\r\n\t\tthis.previousTargets = {};\r\n\t\t\r\n\t\tthis.listeners = [\r\n\t\t\t\"click\",\r\n\t\t\t\"dblclick\",\r\n\t\t\t\"contextmenu\",\r\n\t\t\t\"mouseenter\",\r\n\t\t\t\"mouseleave\",\r\n\t\t\t\"mouseover\",\r\n\t\t\t\"mouseout\",\r\n\t\t\t\"mousemove\",\r\n\t\t\t\"touchstart\",\r\n\t\t\t\"touchend\",\r\n\t\t];\r\n\t\t\r\n\t\tthis.componentMap = {\r\n\t\t\t\"tabulator-cell\":\"cell\",\r\n\t\t\t\"tabulator-row\":\"row\",\r\n\t\t\t\"tabulator-group\":\"group\",\r\n\t\t\t\"tabulator-col\":\"column\",\r\n\t\t};\r\n\t\t\r\n\t\tthis.pseudoTrackers = {\r\n\t\t\t\"row\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"cell\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"group\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"column\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t}\r\n\t\t\r\n\t\tthis.pseudoTracking = false;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.el = this.table.element;\r\n\t\t\r\n\t\tthis.buildListenerMap();\r\n\t\tthis.bindSubscriptionWatchers();\r\n\t}\r\n\t\r\n\tbuildListenerMap(){\r\n\t\tvar listenerMap = {};\r\n\t\t\r\n\t\tthis.listeners.forEach((listener) => {\r\n\t\t\tlistenerMap[listener] = {\r\n\t\t\t\thandler:null,\r\n\t\t\t\tcomponents:[],\r\n\t\t\t}\r\n\t\t})\r\n\t\t\r\n\t\tthis.listeners = listenerMap;\r\n\t}\r\n\t\r\n\tbindPseudoEvents(){\r\n\t\tObject.keys(this.pseudoTrackers).forEach((key) => {\r\n\t\t\tthis.pseudoTrackers[key].subscriber = this.pseudoMouseEnter.bind(this, key);\r\n\t\t\tthis.subscribe(key + \"-mouseover\", this.pseudoTrackers[key].subscriber);\r\n\t\t});\r\n\t\t\r\n\t\tthis.pseudoTracking = true;\r\n\t}\r\n\t\r\n\tpseudoMouseEnter(key, e, target){\r\n\t\tif(this.pseudoTrackers[key].target !== target){\r\n\t\t\t\r\n\t\t\tif(this.pseudoTrackers[key].target){\r\n\t\t\t\tthis.dispatch(key + \"-mouseleave\", e, target);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.pseudoMouseLeave(key, e);\r\n\t\t\t\r\n\t\t\tthis.pseudoTrackers[key].target = target;\r\n\t\t\t\r\n\t\t\tthis.dispatch(key + \"-mouseenter\", e, target);\r\n\t\t}\r\n\t}\r\n\t\r\n\tpseudoMouseLeave(key, e){\r\n\t\tvar leaveList = Object.keys(this.pseudoTrackers),\r\n\t\tlinkedKeys = {\r\n\t\t\t\"row\":[\"cell\"],\r\n\t\t\t\"cell\":[\"row\"],\r\n\t\t};\r\n\t\t\r\n\t\tleaveList = leaveList.filter((item) => {\r\n\t\t\tvar links = linkedKeys[key];\r\n\t\t\treturn item !== key && (!links || (links && !links.includes(item)));\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\tleaveList.forEach((key) => {\r\n\t\t\tvar target = this.pseudoTrackers[key].target;\r\n\t\t\t\r\n\t\t\tif(this.pseudoTrackers[key].target){\r\n\t\t\t\tthis.dispatch(key + \"-mouseleave\", e, target);\r\n\t\t\t\t\r\n\t\t\t\tthis.pseudoTrackers[key].target = null;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t\r\n\tbindSubscriptionWatchers(){\r\n\t\tvar listeners = Object.keys(this.listeners),\r\n\t\tcomponents = Object.values(this.componentMap);\r\n\t\t\r\n\t\tfor(let comp of components){\r\n\t\t\tfor(let listener of listeners){\r\n\t\t\t\tlet key = comp + \"-\" + listener;\r\n\t\t\t\t\r\n\t\t\t\tthis.subscriptionChange(key, this.subscriptionChanged.bind(this, comp, listener));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.subscribe(\"table-destroy\", this.clearWatchers.bind(this))\r\n\t}\r\n\t\r\n\tsubscriptionChanged(component, key, added){\r\n\t\tvar listener = this.listeners[key].components,\r\n\t\tindex = listener.indexOf(component),\r\n\t\tchanged = false;\r\n\t\t\r\n\t\tif(added){\r\n\t\t\tif(index === -1){\r\n\t\t\t\tlistener.push(component);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!this.subscribed(component + \"-\" + key)){\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tlistener.splice(index, 1);\r\n\t\t\t\t\tchanged = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif((key === \"mouseenter\" || key === \"mouseleave\") && !this.pseudoTracking){\r\n\t\t\tthis.bindPseudoEvents();\r\n\t\t}\r\n\t\t\r\n\t\tif(changed){\r\n\t\t\tthis.updateEventListeners();\r\n\t\t}\r\n\t}\r\n\t\r\n\tupdateEventListeners(){\r\n\t\tfor(let key in this.listeners){\r\n\t\t\tlet listener = this.listeners[key];\r\n\t\t\t\r\n\t\t\tif(listener.components.length){\r\n\t\t\t\tif(!listener.handler){\r\n\t\t\t\t\tlistener.handler = this.track.bind(this, key);\r\n\t\t\t\t\tthis.el.addEventListener(key, listener.handler)\r\n\t\t\t\t\t// this.el.addEventListener(key, listener.handler, {passive: true})\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(listener.handler){\r\n\t\t\t\t\tthis.el.removeEventListener(key, listener.handler)\r\n\t\t\t\t\tlistener.handler = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\ttrack(type, e){\r\n\t\tvar path = (e.composedPath && e.composedPath()) || e.path;\r\n\t\t\r\n\t\tvar targets = this.findTargets(path);\r\n\t\ttargets = this.bindComponents(type, targets);\r\n\t\t\r\n\t\tthis.triggerEvents(type, e, targets);\r\n\t\t\r\n\t\tif(this.pseudoTracking && (type == \"mouseover\" || type == \"mouseleave\") && !Object.keys(targets).length){\r\n\t\t\tthis.pseudoMouseLeave(\"none\", e);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfindTargets(path){\r\n\t\tvar targets = {};\r\n\t\t\r\n\t\tlet componentMap = Object.keys(this.componentMap);\r\n\t\t\r\n\t\tfor (let el of path) {\r\n\t\t\tlet classList = el.classList ? [...el.classList] : [];\r\n\t\t\t\r\n\t\t\tlet abort = classList.filter((item) => {\r\n\t\t\t\treturn this.abortClasses.includes(item);\r\n\t\t\t})\r\n\t\t\t\r\n\t\t\tif(abort.length){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlet elTargets = classList.filter((item) => {\r\n\t\t\t\treturn componentMap.includes(item);\r\n\t\t\t})\r\n\t\t\t\r\n\t\t\tfor (let target of elTargets) {\r\n\t\t\t\ttargets[this.componentMap[target]] = el;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(targets.group && targets.group === targets.row){\r\n\t\t\tdelete targets.row;\r\n\t\t}\r\n\t\t\r\n\t\treturn targets;\r\n\t}\r\n\t\r\n\tbindComponents(type, targets){\r\n\t\t//ensure row component is looked up before cell\r\n\t\tvar keys = Object.keys(targets).reverse(),\r\n\t\tlistener = this.listeners[type],\r\n\t\ttargetMatches = {};\r\n\t\t\r\n\t\tfor(let key of keys){\r\n\t\t\tlet component;\r\n\t\t\tlet target = targets[key];\r\n\t\t\tlet previousTarget = this.previousTargets[key];\r\n\t\t\t\r\n\t\t\tif(previousTarget && previousTarget.target === target){\r\n\t\t\t\tcomponent = previousTarget.component;\r\n\t\t\t}else{\r\n\t\t\t\tswitch(key){\r\n\t\t\t\t\tcase \"row\":\r\n\t\t\t\t\tcase \"group\":\r\n\t\t\t\t\tif(listener.components.includes(\"row\") || listener.components.includes(\"cell\") || listener.components.includes(\"group\")){\r\n\t\t\t\t\t\tlet rows = this.table.rowManager.getVisibleRows(true);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcomponent = rows.find((row) => {\r\n\t\t\t\t\t\t\treturn row.getElement() === target;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(targets[\"row\"] && targets[\"row\"].parentNode && targets[\"row\"].parentNode.closest(\".tabulator-row\")){\r\n\t\t\t\t\t\t\ttargets[key] = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"column\":\r\n\t\t\t\t\tif(listener.components.includes(\"column\")){\r\n\t\t\t\t\t\tcomponent = this.table.columnManager.findColumn(target);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"cell\":\r\n\t\t\t\t\tif(listener.components.includes(\"cell\")){\r\n\t\t\t\t\t\tif(targets[\"row\"] instanceof Row){\r\n\t\t\t\t\t\t\tcomponent = targets[\"row\"].findCell(target);\r\n\t\t\t\t\t\t}else{\t\r\n\t\t\t\t\t\t\tif(targets[\"row\"]){\r\n\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?\")\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(component){\r\n\t\t\t\ttargets[key] = component;\r\n\t\t\t\ttargetMatches[key] = {\r\n\t\t\t\t\ttarget:target,\r\n\t\t\t\t\tcomponent:component,\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.previousTargets = targetMatches;\r\n\t\t\r\n\t\treturn targets;\r\n\t}\r\n\t\r\n\ttriggerEvents(type, e, targets){\r\n\t\tvar listener = this.listeners[type];\r\n\t\t\r\n\t\tfor(let key in targets){\r\n\t\t\tif(targets[key] && listener.components.includes(key)){\r\n\t\t\t\tthis.dispatch(key + \"-\" + type, e, targets[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tclearWatchers(){\r\n\t\tfor(let key in this.listeners){\r\n\t\t\tlet listener = this.listeners[key];\r\n\t\t\t\r\n\t\t\tif(listener.handler){\r\n\t\t\t\tthis.el.removeEventListener(key, listener.handler)\r\n\t\t\t\tlistener.handler = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}","export default class ComponentFunctionBinder{\r\n\r\n\tconstructor(table){\r\n\t\tthis.table = table;\r\n\r\n\t\tthis.bindings = {};\r\n\t}\r\n\r\n\tbind(type, funcName, handler){\r\n\t\tif(!this.bindings[type]){\r\n\t\t\tthis.bindings[type] = {};\r\n\t\t}\r\n\r\n\t\tif(this.bindings[type][funcName]){\r\n\t\t\tconsole.warn(\"Unable to bind component handler, a matching function name is already bound\", type, funcName, hanlder)\r\n\t\t}else{\r\n\t\t\tthis.bindings[type][funcName] = handler;\r\n\t\t}\r\n\t}\r\n\r\n\thandle(type, component, name){\r\n\t\tif(this.bindings[type] && this.bindings[type][name]){\r\n\t\t\treturn this.bindings[type][name].bind(null, component);\r\n\t\t}else{\r\n\t\t\tif(name !== \"then\" && typeof name === \"string\" && !name.startsWith(\"_\")){\r\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?\")\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\n\r\nexport default class DataLoader extends CoreFeature{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.loaderElement = this.createLoaderElement(); //loader message div\r\n\t\tthis.msgElement = this.createMsgElement(); //message element\r\n\t\tthis.loadingElement = null;\r\n\t\tthis.errorElement = null;\r\n\r\n\t\tthis.requestOrder = 0; //prevent requests comming out of sequence if overridden by another load request\r\n\t\tthis.loading = false;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tvar template;\r\n\r\n\t\tthis.loaderElement.appendChild(this.msgElement);\r\n\r\n\t\tif(this.table.options.dataLoaderLoading){\r\n\t\t\tif(typeof this.table.options.dataLoaderLoading == \"string\"){\r\n\t\t\t\ttemplate = document.createElement('template');\r\n\t\t\t\ttemplate.innerHTML = this.table.options.dataLoaderLoading.trim();\r\n\t\t\t\tthis.loadingElement = template.firstElementChild;\r\n\t\t\t}else{\r\n\t\t\t\tthis.loadingElement = this.table.options.dataLoaderLoading;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.table.options.dataLoaderError){\r\n\t\t\tif(typeof this.table.options.dataLoaderError == \"string\"){\r\n\t\t\t\ttemplate = document.createElement('template');\r\n\t\t\t\ttemplate.innerHTML = this.table.options.dataLoaderError.trim();\r\n\t\t\t\tthis.errorElement = template.firstElementChild;\r\n\t\t\t}else{\r\n\t\t\t\tthis.errorElement = this.table.options.dataLoaderError;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tcreateLoaderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-loader\");\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateMsgElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-loader-msg\");\r\n\t\tel.setAttribute(\"role\", \"alert\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tload(data, params, config, replace, silent){\r\n\t\tvar requestNo = ++this.requestOrder;\r\n\r\n\t\tthis.dispatchExternal(\"dataLoading\", data);\r\n\r\n\t\t//parse json data to array\r\n\t\tif (data && (data.indexOf(\"{\") == 0 || data.indexOf(\"[\") == 0)){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(this.confirm(\"data-loading\", [data, params, config, silent])){\r\n\t\t\tthis.loading = true;\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.showLoader();\r\n\t\t\t}\r\n\r\n\t\t\t//get params for request\r\n\t\t\tparams = this.chain(\"data-params\", [data, config, silent], params || {}, params || {});\r\n\r\n\t\t\tparams = this.mapParams(params, this.table.options.dataSendParams);\r\n\r\n\t\t\tvar result = this.chain(\"data-load\", [data, params, config, silent], false, Promise.resolve([]));\r\n\t\t\t\r\n\t\t\treturn result.then((response) => {\r\n\t\t\t\tif(!Array.isArray(response) && typeof response == \"object\"){\r\n\t\t\t\t\tresponse = this.mapParams(response, this.objectInvert(this.table.options.dataReceiveParams));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar rowData = this.chain(\"data-loaded\", response, null, response);\r\n\r\n\t\t\t\tif(requestNo == this.requestOrder){\r\n\t\t\t\t\tthis.hideLoader();\r\n\r\n\t\t\t\t\tif(rowData !== false){\r\n\t\t\t\t\t\tthis.dispatchExternal(\"dataLoaded\", rowData);\r\n\t\t\t\t\t\tthis.table.rowManager.setData(rowData, replace, !replace);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\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\");\r\n\t\t\t\t}\r\n\t\t\t}).catch((error) => {\r\n\t\t\t\tconsole.error(\"Data Load Error: \", error);\r\n\t\t\t\tthis.dispatchExternal(\"dataLoadError\", error);\r\n\r\n\t\t\t\tif(!silent){\r\n\t\t\t\t\tthis.showError();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.hideLoader();\r\n\t\t\t\t}, this.table.options.dataLoaderErrorTimeout);\r\n\t\t\t})\r\n\t\t\t.finally(() => {\r\n\t\t\t\tthis.loading = false;\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"dataLoaded\", data);\r\n\r\n\t\t\tif(!data){\r\n\t\t\t\tdata = [];\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.rowManager.setData(data, replace, !replace);\r\n\t\t\treturn Promise.resolve();\r\n\t\t}\r\n\t}\r\n\r\n\tmapParams(params, map){\r\n\t\tvar output = {};\r\n\r\n\t\tfor(let key in params){\r\n\t\t\toutput[map.hasOwnProperty(key) ? map[key] : key] = params[key];\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tobjectInvert(obj){\r\n\t\tvar output = {};\r\n\r\n\t\tfor(let key in obj){\r\n\t\t\toutput[obj[key]] = key;\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tblockActiveLoad(){\r\n\t\tthis.requestOrder++;\r\n\t}\r\n\r\n\tshowLoader(){\r\n\t\tvar shouldLoad = typeof this.table.options.dataLoader === \"function\" ? this.table.options.dataLoader() : this.table.options.dataLoader;\r\n\r\n\t\tif(shouldLoad){\r\n\t\t\tthis.hideLoader();\r\n\r\n\t\t\twhile(this.msgElement.firstChild) this.msgElement.removeChild(this.msgElement.firstChild);\r\n\r\n\t\t\tthis.msgElement.classList.remove(\"tabulator-error\");\r\n\t\t\tthis.msgElement.classList.add(\"tabulator-loading\");\r\n\r\n\t\t\tif(this.loadingElement){\r\n\t\t\t\tthis.msgElement.appendChild(this.loadingElement);\r\n\t\t\t}else{\r\n\t\t\t\tthis.msgElement.innerHTML = this.langText(\"data|loading\");\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.element.appendChild(this.loaderElement);\r\n\t\t}\r\n\t}\r\n\r\n\tshowError(){\r\n\t\tthis.hideLoader();\r\n\r\n\t\twhile(this.msgElement.firstChild) this.msgElement.removeChild(this.msgElement.firstChild);\r\n\t\tthis.msgElement.classList.remove(\"tabulator-loading\");\r\n\t\tthis.msgElement.classList.add(\"tabulator-error\");\r\n\r\n\t\tif(this.errorElement){\r\n\t\t\tthis.msgElement.appendChild(this.errorElement);\r\n\t\t}else{\r\n\t\t\tthis.msgElement.innerHTML = this.langText(\"data|error\");\r\n\t\t}\r\n\r\n\t\tthis.table.element.appendChild(this.loaderElement);\r\n\t}\r\n\r\n\r\n\thideLoader(){\r\n\t\tif(this.loaderElement.parentNode){\r\n\t\t\tthis.loaderElement.parentNode.removeChild(this.loaderElement);\r\n\t\t}\r\n\t}\r\n}","export default class ExternalEventBus {\r\n\r\n\tconstructor(table, optionsList, debug){\r\n\t\tthis.table = table;\r\n\t\tthis.events = {};\r\n\t\tthis.optionsList = optionsList || {};\r\n\t\tthis.subscriptionNotifiers = {};\r\n\r\n\t\tthis.dispatch = debug ? this._debugDispatch.bind(this) : this._dispatch.bind(this);\r\n\t\tthis.debug = debug;\r\n\t}\r\n\r\n\tsubscriptionChange(key, callback){\r\n\t\tif(!this.subscriptionNotifiers[key]){\r\n\t\t\tthis.subscriptionNotifiers[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.subscriptionNotifiers[key].push(callback);\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis._notifiySubscriptionChange(key, true);\r\n\t\t}\r\n\t}\r\n\r\n\tsubscribe(key, callback){\r\n\t\tif(!this.events[key]){\r\n\t\t\tthis.events[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.events[key].push(callback);\r\n\r\n\t\tthis._notifiySubscriptionChange(key, true);\r\n\t}\r\n\r\n\tunsubscribe(key, callback){\r\n\t\tvar index;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tif(callback){\r\n\t\t\t\tindex = this.events[key].findIndex((item) => {\r\n\t\t\t\t\treturn item === callback;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tthis.events[key].splice(index, 1);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Cannot remove event, no matching event found:\", key, callback);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tdelete this.events[key];\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cannot remove event, no events set on:\", key);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._notifiySubscriptionChange(key, false);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.events[key] && this.events[key].length;\r\n\t}\r\n\r\n\t_notifiySubscriptionChange(key, subscribed){\r\n\t\tvar notifiers = this.subscriptionNotifiers[key];\r\n\r\n\t\tif(notifiers){\r\n\t\t\tnotifiers.forEach((callback)=>{\r\n\t\t\t\tcallback(subscribed);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_dispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift(),\r\n\t\tresult;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tthis.events[key].forEach((callback, i) => {\r\n\t\t\t\tlet callResult = callback.apply(this.table, args);\r\n\r\n\t\t\t\tif(!i){\r\n\t\t\t\t\tresult = callResult;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t_debugDispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"ExternalEvent:\" + args[0];\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._dispatch(...arguments)\r\n\t}\r\n}","export default class InternalEventBus {\r\n\r\n\tconstructor(debug){\r\n\t\tthis.events = {};\r\n\t\tthis.subscriptionNotifiers = {};\r\n\r\n\t\tthis.dispatch = debug ? this._debugDispatch.bind(this) : this._dispatch.bind(this);\r\n\t\tthis.chain = debug ? this._debugChain.bind(this) : this._chain.bind(this);\r\n\t\tthis.confirm = debug ? this._debugConfirm.bind(this) : this._confirm.bind(this);\r\n\t\tthis.debug = debug;\r\n\t}\r\n\r\n\tsubscriptionChange(key, callback){\r\n\t\tif(!this.subscriptionNotifiers[key]){\r\n\t\t\tthis.subscriptionNotifiers[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.subscriptionNotifiers[key].push(callback);\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis._notifiySubscriptionChange(key, true);\r\n\t\t}\r\n\t}\r\n\r\n\tsubscribe(key, callback, priority = 10000){\r\n\t\tif(!this.events[key]){\r\n\t\t\tthis.events[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.events[key].push({callback, priority});\r\n\r\n\t\tthis.events[key].sort((a, b) => {\r\n\t\t\treturn a.priority - b.priority;\r\n\t\t});\r\n\r\n\t\tthis._notifiySubscriptionChange(key, true);\r\n\t}\r\n\r\n\tunsubscribe(key, callback){\r\n\t\tvar index;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tif(callback){\r\n\t\t\t\tindex = this.events[key].findIndex((item) => {\r\n\t\t\t\t\treturn item.callback === callback;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tthis.events[key].splice(index, 1);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Cannot remove event, no matching event found:\", key, callback);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cannot remove event, no events set on:\", key);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._notifiySubscriptionChange(key, false);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.events[key] && this.events[key].length;\r\n\t}\r\n\r\n\t_chain(key, args, initialValue, fallback){\r\n\t\tvar value = initialValue;\r\n\r\n\t\tif(!Array.isArray(args)){\r\n\t\t\targs = [args];\r\n\t\t}\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis.events[key].forEach((subscriber, i) => {\r\n\t\t\t\tvalue = subscriber.callback.apply(this, args.concat([value]));\r\n\t\t\t});\r\n\r\n\t\t\treturn value;\r\n\t\t}else{\r\n\t\t\treturn typeof fallback === \"function\" ? fallback() : fallback;\r\n\t\t}\r\n\t}\r\n\r\n\t_confirm(key, args){\r\n\t\tvar confirmed = false;\r\n\r\n\t\tif(!Array.isArray(args)){\r\n\t\t\targs = [args];\r\n\t\t}\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis.events[key].forEach((subscriber, i) => {\r\n\t\t\t\tif(subscriber.callback.apply(this, args)){\r\n\t\t\t\t\tconfirmed = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn confirmed;\r\n\t}\r\n\r\n\t_notifiySubscriptionChange(key, subscribed){\r\n\t\tvar notifiers = this.subscriptionNotifiers[key];\r\n\r\n\t\tif(notifiers){\r\n\t\t\tnotifiers.forEach((callback)=>{\r\n\t\t\t\tcallback(subscribed);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_dispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift();\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tthis.events[key].forEach((subscriber) => {\r\n\t\t\t\tlet callResult = subscriber.callback.apply(this, args);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_debugDispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._dispatch(...arguments);\r\n\t}\r\n\r\n\t_debugChain(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._chain(...arguments);\r\n\t}\r\n\r\n\t_debugConfirm(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._confirm(...arguments);\r\n\t}\r\n}","import Tabulator from '../Tabulator.js';\r\n\r\nclass TableRegistry {\r\n\r\n\tstatic register(table){\r\n\t\tTableRegistry.tables.push(table);\r\n\t}\r\n\r\n\tstatic deregister(table){\r\n\t\tvar index = TableRegistry.tables.indexOf(table);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tTableRegistry.tables.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\tstatic lookupTable(query, silent){\r\n\t\tvar results = [],\r\n\t\tmatches, match;\r\n\r\n\t\tif(typeof query === \"string\"){\r\n\t\t\tmatches = document.querySelectorAll(query);\r\n\r\n\t\t\tif(matches.length){\r\n\t\t\t\tfor(var i = 0; i < matches.length; i++){\r\n\t\t\t\t\tmatch = TableRegistry.matchElement(matches[i]);\r\n\r\n\t\t\t\t\tif(match){\r\n\t\t\t\t\t\tresults.push(match);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}else if((typeof HTMLElement !== \"undefined\" && query instanceof HTMLElement) || query instanceof Tabulator){\r\n\t\t\tmatch = TableRegistry.matchElement(query);\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tresults.push(match);\r\n\t\t\t}\r\n\t\t}else if(Array.isArray(query)){\r\n\t\t\tquery.forEach(function(item){\r\n\t\t\t\tresults = results.concat(TableRegistry.lookupTable(item));\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Table Connection Error - Invalid Selector\", query);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n\r\n\tstatic matchElement(element){\r\n\t\treturn TableRegistry.tables.find(function(table){\r\n\t\t\treturn element instanceof Tabulator ? table === element : table.element === element;\r\n\t\t});\r\n\t}\r\n}\r\n\r\nTableRegistry.tables = [];\r\n\r\nexport default TableRegistry;","//resize columns to fit data they contain\r\nexport default function(columns){\r\n\tthis.table.columnManager.renderer.reinitializeColumnWidths(columns);\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n};","//resize columns to fit data the contain and stretch last column to fill table\r\nexport default function(columns){\r\n\tvar colsWidth = 0,\r\n\ttableWidth = this.table.rowManager.element.clientWidth,\r\n\tgap = 0,\r\n\tlastCol = false;\r\n\r\n\tcolumns.forEach((column, i) => {\r\n\t\tif(!column.widthFixed){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t}\r\n\r\n\t\tif(this.table.options.responsiveLayout ? column.modules.responsive.visible : column.visible){\r\n\t\t\tlastCol = column;\r\n\t\t}\r\n\r\n\t\tif(column.visible){\r\n\t\t\tcolsWidth += column.getWidth();\r\n\t\t}\r\n\t});\r\n\r\n\tif(lastCol){\r\n\t\tgap = tableWidth - colsWidth + lastCol.getWidth();\r\n\r\n\t\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\t\tlastCol.setWidth(0);\r\n\t\t\tthis.table.modules.responsiveLayout.update();\r\n\t\t}\r\n\r\n\t\tif(gap > 0){\r\n\t\t\tlastCol.setWidth(gap);\r\n\t\t}else{\r\n\t\t\tlastCol.reinitializeWidth();\r\n\t\t}\r\n\t}else{\r\n\t\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\t\tthis.table.modules.responsiveLayout.update();\r\n\t\t}\r\n\t}\r\n};","//resize columns to fit data they contain and stretch row to fill table, also used for fitDataTable\r\nexport default function(columns){\r\n\tcolumns.forEach(function(column){\r\n\t\tcolumn.reinitializeWidth();\r\n\t});\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultModes from './defaults/modes.js';\r\n\r\nclass Layout extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table, \"layout\");\r\n\r\n\t\tthis.mode = null;\r\n\r\n\t\tthis.registerTableOption(\"layout\", \"fitData\"); //layout type\r\n\t\tthis.registerTableOption(\"layoutColumnsOnNewData\", false); //update column widths on setData\r\n\r\n\t\tthis.registerColumnOption(\"widthGrow\");\r\n\t\tthis.registerColumnOption(\"widthShrink\");\r\n\t}\r\n\r\n\t//initialize layout system\r\n\tinitialize(){\r\n\t\tvar layout = this.table.options.layout;\r\n\r\n\t\tif(Layout.modes[layout]){\r\n\t\t\tthis.mode = layout;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Layout Error - invalid mode set, defaulting to 'fitData' : \" + layout);\r\n\t\t\tthis.mode = 'fitData';\r\n\t\t}\r\n\r\n\t\tthis.table.element.setAttribute(\"tabulator-layout\", this.mode);\r\n\t}\r\n\r\n\tgetMode(){\r\n\t\treturn this.mode;\r\n\t}\r\n\r\n\t//trigger table layout\r\n\tlayout(){\r\n\t\tthis.dispatch(\"layout-refreshing\")\r\n\t\tLayout.modes[this.mode].call(this, this.table.columnManager.columnsByIndex);\r\n\r\n\t\tthis.dispatch(\"layout-refreshed\")\r\n\t}\r\n}\r\n\r\nLayout.moduleName = \"layout\";\r\n\r\n//load defaults\r\nLayout.modes = defaultModes;\r\n\r\nexport default Layout;","//resize columns to fit\r\nexport default function(columns){\r\n\tvar totalWidth = this.table.element.clientWidth; //table element width\r\n\tvar fixedWidth = 0; //total width of columns with a defined width\r\n\tvar flexWidth = 0; //total width available to flexible columns\r\n\tvar flexGrowUnits = 0; //total number of widthGrow blocks accross all columns\r\n\tvar flexColWidth = 0; //desired width of flexible columns\r\n\tvar flexColumns = []; //array of flexible width columns\r\n\tvar fixedShrinkColumns = []; //array of fixed width columns that can shrink\r\n\tvar flexShrinkUnits = 0; //total number of widthShrink blocks accross all columns\r\n\tvar overflowWidth = 0; //horizontal overflow width\r\n\tvar gapFill=0; //number of pixels to be added to final column to close and half pixel gaps\r\n\r\n\tfunction calcWidth(width){\r\n\t\tvar colWidth;\r\n\r\n\t\tif(typeof(width) == \"string\"){\r\n\t\t\tif(width.indexOf(\"%\") > -1){\r\n\t\t\t\tcolWidth = (totalWidth / 100) * parseInt(width);\r\n\t\t\t}else{\r\n\t\t\t\tcolWidth = parseInt(width);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcolWidth = width;\r\n\t\t}\r\n\r\n\t\treturn colWidth;\r\n\t}\r\n\r\n\t//ensure columns resize to take up the correct amount of space\r\n\tfunction scaleColumns(columns, freeSpace, colWidth, shrinkCols){\r\n\r\n\t\tvar oversizeCols = [],\r\n\t\toversizeSpace = 0,\r\n\t\tremainingSpace = 0,\r\n\t\tnextColWidth = 0,\r\n\t\tremainingFlexGrowUnits = flexGrowUnits,\r\n\t\tgap = 0,\r\n\t\tchangeUnits = 0,\r\n\t\tundersizeCols = [];\r\n\r\n\t\tfunction calcGrow(col){\r\n\t\t\treturn (colWidth * (col.column.definition.widthGrow || 1));\r\n\t\t}\r\n\r\n\t\tfunction calcShrink(col){\r\n\t\t\treturn (calcWidth(col.width) - (colWidth * (col.column.definition.widthShrink || 0)))\r\n\t\t}\r\n\r\n\t\tcolumns.forEach(function(col, i){\r\n\t\t\tvar width = shrinkCols ? calcShrink(col) : calcGrow(col);\r\n\t\t\tif(col.column.minWidth >= width){\r\n\t\t\t\toversizeCols.push(col);\r\n\t\t\t}else{\r\n\t\t\t\tif(col.column.maxWidth && col.column.maxWidth < width){\r\n\t\t\t\t\tcol.width = col.column.maxWidth;\r\n\t\t\t\t\tfreeSpace -= col.column.maxWidth;\r\n\r\n\t\t\t\t\tremainingFlexGrowUnits -= shrinkCols ? (col.column.definition.widthShrink || 1) : (col.column.definition.widthGrow || 1);\r\n\r\n\t\t\t\t\tif(remainingFlexGrowUnits){\r\n\t\t\t\t\t\tcolWidth = Math.floor(freeSpace/remainingFlexGrowUnits);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tundersizeCols.push(col);\r\n\t\t\t\t\tchangeUnits += shrinkCols ? (col.column.definition.widthShrink || 1) : (col.column.definition.widthGrow || 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(oversizeCols.length){\r\n\t\t\toversizeCols.forEach(function(col){\r\n\t\t\t\toversizeSpace += shrinkCols ? col.width - col.column.minWidth : col.column.minWidth;\r\n\t\t\t\tcol.width = col.column.minWidth;\r\n\t\t\t});\r\n\r\n\t\t\tremainingSpace = freeSpace - oversizeSpace;\r\n\r\n\t\t\tnextColWidth = changeUnits ? Math.floor(remainingSpace/changeUnits) : remainingSpace;\r\n\r\n\t\t\tgap = remainingSpace - (nextColWidth * changeUnits);\r\n\r\n\t\t\tgap += scaleColumns(undersizeCols, remainingSpace, nextColWidth, shrinkCols);\r\n\t\t}else{\r\n\t\t\tgap = changeUnits ? freeSpace - (Math.floor(freeSpace/changeUnits) * changeUnits) : freeSpace;\r\n\r\n\t\t\tundersizeCols.forEach(function(column){\r\n\t\t\t\tcolumn.width = shrinkCols ? calcShrink(column) : calcGrow(column);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn gap;\r\n\t}\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n\r\n\t//adjust for vertical scrollbar if present\r\n\tif(this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight){\r\n\t\ttotalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth;\r\n\t}\r\n\r\n\tcolumns.forEach(function(column){\r\n\t\tvar width, minWidth, colWidth;\r\n\r\n\t\tif(column.visible){\r\n\r\n\t\t\twidth = column.definition.width;\r\n\t\t\tminWidth = parseInt(column.minWidth);\r\n\r\n\t\t\tif(width){\r\n\r\n\t\t\t\tcolWidth = calcWidth(width);\r\n\r\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\r\n\r\n\t\t\t\tif(column.definition.widthShrink){\r\n\t\t\t\t\tfixedShrinkColumns.push({\r\n\t\t\t\t\t\tcolumn:column,\r\n\t\t\t\t\t\twidth:colWidth > minWidth ? colWidth : minWidth\r\n\t\t\t\t\t});\r\n\t\t\t\t\tflexShrinkUnits += column.definition.widthShrink;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tflexColumns.push({\r\n\t\t\t\t\tcolumn:column,\r\n\t\t\t\t\twidth:0,\r\n\t\t\t\t});\r\n\t\t\t\tflexGrowUnits += column.definition.widthGrow || 1;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\t//calculate available space\r\n\tflexWidth = totalWidth - fixedWidth;\r\n\r\n\t//calculate correct column size\r\n\tflexColWidth = Math.floor(flexWidth / flexGrowUnits)\r\n\r\n\t//generate column widths\r\n\tvar gapFill = scaleColumns(flexColumns, flexWidth, flexColWidth, false);\r\n\r\n\t//increase width of last column to account for rounding errors\r\n\tif(flexColumns.length && gapFill > 0){\r\n\t\tflexColumns[flexColumns.length-1].width += + gapFill;\r\n\t}\r\n\r\n\t//caculate space for columns to be shrunk into\r\n\tflexColumns.forEach(function(col){\r\n\t\tflexWidth -= col.width;\r\n\t});\r\n\r\n\toverflowWidth = Math.abs(gapFill) + flexWidth;\r\n\r\n\t//shrink oversize columns if there is no available space\r\n\tif(overflowWidth > 0 && flexShrinkUnits){\r\n\t\tgapFill = scaleColumns(fixedShrinkColumns, overflowWidth, Math.floor(overflowWidth / flexShrinkUnits), true);\r\n\t}\r\n\r\n\t//decrease width of last column to account for rounding errors\r\n\tif(fixedShrinkColumns.length){\r\n\t\tfixedShrinkColumns[fixedShrinkColumns.length-1].width -= gapFill;\r\n\t}\r\n\r\n\tflexColumns.forEach(function(col){\r\n\t\tcol.column.setWidth(col.width);\r\n\t});\r\n\r\n\tfixedShrinkColumns.forEach(function(col){\r\n\t\tcol.column.setWidth(col.width);\r\n\t});\r\n};","import fitData from './modes/fitData.js';\r\nimport fitDataGeneral from './modes/fitDataGeneral.js';\r\nimport fitDataStretch from './modes/fitDataStretch.js';\r\nimport fitColumns from './modes/fitColumns.js';\r\n\r\nexport default {\r\n\tfitData:fitData,\r\n\tfitDataFill:fitDataGeneral,\r\n\tfitDataTable:fitDataGeneral,\r\n\tfitDataStretch:fitDataStretch,\r\n\tfitColumns:fitColumns ,\r\n};","export default {\r\n\t\"default\":{ //hold default locale text\r\n\t\t\"groups\":{\r\n\t\t\t\"item\":\"item\",\r\n\t\t\t\"items\":\"items\",\r\n\t\t},\r\n\t\t\"columns\":{\r\n\t\t},\r\n\t\t\"data\":{\r\n\t\t\t\"loading\":\"Loading\",\r\n\t\t\t\"error\":\"Error\",\r\n\t\t},\r\n\t\t\"pagination\":{\r\n\t\t\t\"page_size\":\"Page Size\",\r\n\t\t\t\"page_title\":\"Show Page\",\r\n\t\t\t\"first\":\"First\",\r\n\t\t\t\"first_title\":\"First Page\",\r\n\t\t\t\"last\":\"Last\",\r\n\t\t\t\"last_title\":\"Last Page\",\r\n\t\t\t\"prev\":\"Prev\",\r\n\t\t\t\"prev_title\":\"Prev Page\",\r\n\t\t\t\"next\":\"Next\",\r\n\t\t\t\"next_title\":\"Next Page\",\r\n\t\t\t\"all\":\"All\",\r\n\t\t\t\"counter\":{\r\n\t\t\t\t\"showing\": \"Showing\",\r\n\t\t\t\t\"of\": \"of\",\r\n\t\t\t\t\"rows\": \"rows\",\r\n\t\t\t\t\"pages\": \"pages\",\r\n\t\t\t}\r\n\t\t},\r\n\t\t\"headerFilters\":{\r\n\t\t\t\"default\":\"filter column...\",\r\n\t\t\t\"columns\":{}\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defaultLangs from './defaults/langs.js';\r\n\r\nclass Localize extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.locale = \"default\"; //current locale\r\n\t\tthis.lang = false; //current language\r\n\t\tthis.bindings = {}; //update events to call when locale is changed\r\n\t\tthis.langList = {};\r\n\r\n\t\tthis.registerTableOption(\"locale\", false); //current system language\r\n\t\tthis.registerTableOption(\"langs\", {});\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.langList = Helpers.deepClone(Localize.langs);\r\n\r\n\t\tif(this.table.options.columnDefaults.headerFilterPlaceholder !== false){\r\n\t\t\tthis.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder);\r\n\t\t}\r\n\r\n\t\tfor(let locale in this.table.options.langs){\r\n\t\t\tthis.installLang(locale, this.table.options.langs[locale]);\r\n\t\t}\r\n\r\n\t\tthis.setLocale(this.table.options.locale);\r\n\r\n\t\tthis.registerTableFunction(\"setLocale\", this.setLocale.bind(this));\r\n\t\tthis.registerTableFunction(\"getLocale\", this.getLocale.bind(this));\r\n\t\tthis.registerTableFunction(\"getLang\", this.getLang.bind(this));\r\n\t}\r\n\r\n\t//set header placehoder\r\n\tsetHeaderFilterPlaceholder(placeholder){\r\n\t\tthis.langList.default.headerFilters.default = placeholder;\r\n\t}\r\n\r\n\t//set header filter placeholder by column\r\n\tsetHeaderFilterColumnPlaceholder(column, placeholder){\r\n\t\tthis.langList.default.headerFilters.columns[column] = placeholder;\r\n\r\n\t\tif(this.lang && !this.lang.headerFilters.columns[column]){\r\n\t\t\tthis.lang.headerFilters.columns[column] = placeholder;\r\n\t\t}\r\n\t}\r\n\r\n\t//setup a lang description object\r\n\tinstallLang(locale, lang){\r\n\t\tif(this.langList[locale]){\r\n\t\t\tthis._setLangProp(this.langList[locale], lang);\r\n\t\t}else{\r\n\t\t\tthis.langList[locale] = lang;\r\n\t\t}\r\n\t}\r\n\r\n\t_setLangProp(lang, values){\r\n\t\tfor(let key in values){\r\n\t\t\tif(lang[key] && typeof lang[key] == \"object\"){\r\n\t\t\t\tthis._setLangProp(lang[key], values[key])\r\n\t\t\t}else{\r\n\t\t\t\tlang[key] = values[key];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//set current locale\r\n\tsetLocale(desiredLocale){\r\n\t\tdesiredLocale = desiredLocale || \"default\";\r\n\r\n\t\t//fill in any matching languge values\r\n\t\tfunction traverseLang(trans, path){\r\n\t\t\tfor(var prop in trans){\r\n\t\t\t\tif(typeof trans[prop] == \"object\"){\r\n\t\t\t\t\tif(!path[prop]){\r\n\t\t\t\t\t\tpath[prop] = {};\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttraverseLang(trans[prop], path[prop]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tpath[prop] = trans[prop];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//determing correct locale to load\r\n\t\tif(desiredLocale === true && navigator.language){\r\n\t\t\t//get local from system\r\n\t\t\tdesiredLocale = navigator.language.toLowerCase();\r\n\t\t}\r\n\r\n\t\tif(desiredLocale){\r\n\t\t\t//if locale is not set, check for matching top level locale else use default\r\n\t\t\tif(!this.langList[desiredLocale]){\r\n\t\t\t\tlet prefix = desiredLocale.split(\"-\")[0];\r\n\r\n\t\t\t\tif(this.langList[prefix]){\r\n\t\t\t\t\tconsole.warn(\"Localization Error - Exact matching locale not found, using closest match: \", desiredLocale, prefix);\r\n\t\t\t\t\tdesiredLocale = prefix;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Localization Error - Matching locale not found, using default: \", desiredLocale);\r\n\t\t\t\t\tdesiredLocale = \"default\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.locale = desiredLocale;\r\n\r\n\t\t//load default lang template\r\n\t\tthis.lang = Helpers.deepClone(this.langList.default || {});\r\n\r\n\t\tif(desiredLocale != \"default\"){\r\n\t\t\ttraverseLang(this.langList[desiredLocale], this.lang);\r\n\t\t}\r\n\r\n\t\tthis.dispatchExternal(\"localized\", this.locale, this.lang);\r\n\r\n\t\tthis._executeBindings();\r\n\t}\r\n\r\n\t//get current locale\r\n\tgetLocale(locale){\r\n\t\treturn this.locale;\r\n\t}\r\n\r\n\t//get lang object for given local or current if none provided\r\n\tgetLang(locale){\r\n\t\treturn locale ? this.langList[locale] : this.lang;\r\n\t}\r\n\r\n\t//get text for current locale\r\n\tgetText(path, value){\r\n\t\tvar path = value ? path + \"|\" + value : path,\r\n\t\tpathArray = path.split(\"|\"),\r\n\t\ttext = this._getLangElement(pathArray, this.locale);\r\n\r\n\t\t// if(text === false){\r\n\t\t// \tconsole.warn(\"Localization Error - Matching localized text not found for given path: \", path);\r\n\t\t// }\r\n\r\n\t\treturn text || \"\";\r\n\t}\r\n\r\n\t//traverse langs object and find localized copy\r\n\t_getLangElement(path, locale){\r\n\t\tvar root = this.lang;\r\n\r\n\t\tpath.forEach(function(level){\r\n\t\t\tvar rootPath;\r\n\r\n\t\t\tif(root){\r\n\t\t\t\trootPath = root[level];\r\n\r\n\t\t\t\tif(typeof rootPath != \"undefined\"){\r\n\t\t\t\t\troot = rootPath;\r\n\t\t\t\t}else{\r\n\t\t\t\t\troot = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn root;\r\n\t}\r\n\r\n\t//set update binding\r\n\tbind(path, callback){\r\n\t\tif(!this.bindings[path]){\r\n\t\t\tthis.bindings[path] = [];\r\n\t\t}\r\n\r\n\t\tthis.bindings[path].push(callback);\r\n\r\n\t\tcallback(this.getText(path), this.lang);\r\n\t}\r\n\r\n\t//itterate through bindings and trigger updates\r\n\t_executeBindings(){\r\n\t\tfor(let path in this.bindings){\r\n\t\t\tthis.bindings[path].forEach((binding) => {\r\n\t\t\t\tbinding(this.getText(path), this.lang);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}\r\n\r\nLocalize.moduleName = \"localize\";\r\n\r\n//load defaults\r\nLocalize.langs = defaultLangs;\r\n\r\nexport default Localize;","import Module from '../../core/Module.js';\r\nimport TableRegistry from '../../core/tools/TableRegistry.js';\r\n\r\nclass Comms extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"tableComms\", this.receive.bind(this));\r\n\t}\r\n\r\n\tgetConnections(selectors){\r\n\t\tvar connections = [],\r\n\t\tconnection;\r\n\r\n\t\tconnection = TableRegistry.lookupTable(selectors);\r\n\r\n\t\tconnection.forEach((con) =>{\r\n\t\t\tif(this.table !== con){\r\n\t\t\t\tconnections.push(con);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn connections;\r\n\t}\r\n\r\n\tsend(selectors, module, action, data){\r\n\t\tvar connections = this.getConnections(selectors);\r\n\r\n\t\tconnections.forEach((connection) => {\r\n\t\t\tconnection.tableComms(this.table.element, module, action, data);\r\n\t\t});\r\n\r\n\t\tif(!connections.length && selectors){\r\n\t\t\tconsole.warn(\"Table Connection Error - No tables matching selector found\", selectors);\r\n\t\t}\r\n\t}\r\n\r\n\treceive(table, module, action, data){\r\n\t\tif(this.table.modExists(module)){\r\n\t\t\treturn this.table.modules[module].commsReceived(table, action, data);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Inter-table Comms Error - no such module:\", module);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nComms.moduleName = \"comms\";\r\n\r\nexport default Comms;","import * as coreModules from '../modules/core.js';\r\nimport TableRegistry from './TableRegistry.js';\r\n\r\nexport default class ModuleBinder {\r\n\r\n\tconstructor(tabulator, modules){\r\n\t\tthis.bindStaticFuctionality(tabulator);\r\n\t\tthis.bindModules(tabulator, coreModules, true);\r\n\r\n\t\tif(modules){\r\n\t\t\tthis.bindModules(tabulator, modules);\r\n\t\t}\r\n\t}\r\n\r\n\tbindStaticFuctionality(tabulator){\r\n\t\ttabulator.moduleBindings = {};\r\n\r\n\t\ttabulator.extendModule = function(name, property, values){\r\n\t\t\tif(tabulator.moduleBindings[name]){\r\n\t\t\t\tvar source = tabulator.moduleBindings[name][property];\r\n\r\n\t\t\t\tif(source){\r\n\t\t\t\t\tif(typeof values == \"object\"){\r\n\t\t\t\t\t\tfor(let key in values){\r\n\t\t\t\t\t\t\tsource[key] = values[key];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Module Error - Invalid value type, it must be an object\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Module Error - property does not exist:\", property);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Module Error - module does not exist:\", name);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\ttabulator.registerModule = function(modules){\r\n\t\t\tif(!Array.isArray(modules)){\r\n\t\t\t\tmodules = [modules];\r\n\t\t\t}\r\n\r\n\t\t\tmodules.forEach((mod) => {\r\n\t\t\t\ttabulator.registerModuleBinding(mod)\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\ttabulator.registerModuleBinding = function(mod){\r\n\t\t\ttabulator.moduleBindings[mod.moduleName] = mod;\r\n\t\t};\r\n\r\n\t\ttabulator.findTable = function(query){\r\n\t\t\tvar results = TableRegistry.lookupTable(query, true);\r\n\t\t\treturn Array.isArray(results) && !results.length ? false : results;\r\n\t\t}\r\n\r\n\t\t//ensure that module are bound to instantiated function\r\n\t\ttabulator.prototype.bindModules = function(){\r\n\t\t\tvar orderedMods = [],\r\n\t\t\tunOrderedMods = [];\r\n\r\n\t\t\tthis.modules = {};\r\n\r\n\t\t\tfor(var name in tabulator.moduleBindings){\r\n\t\t\t\tlet mod = tabulator.moduleBindings[name];\r\n\t\t\t\tlet module = new mod(this);\r\n\r\n\t\t\t\tthis.modules[name] = module;\r\n\r\n\t\t\t\tif(mod.prototype.moduleCore){\r\n\t\t\t\t\tthis.modulesCore.push(module);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(mod.moduleInitOrder){\r\n\t\t\t\t\t\torderedMods.push(module);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tunOrderedMods.push(module);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\torderedMods.sort((a, b) => a.moduleInitOrder > b.moduleInitOrder ? 1 : -1);\r\n\r\n\t\t\tthis.modulesRegular = orderedMods.concat(unOrderedMods);\r\n\t\t}\r\n\t}\r\n\r\n\tbindModules(tabulator, modules, core){\r\n\t\tvar mods = Object.values(modules);\r\n\r\n\t\tif(core){\r\n\t\t\tmods.forEach((mod) => {\r\n\t\t\t\tmod.prototype.moduleCore = true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\ttabulator.registerModule(mods);\r\n\t}\r\n}","'use strict';\r\n\r\nimport defaultOptions from './defaults/options.js';\r\n\r\nimport ColumnManager from './ColumnManager.js';\r\nimport RowManager from './RowManager.js';\r\nimport FooterManager from './FooterManager.js';\r\n\r\nimport InteractionMonitor from './tools/InteractionMonitor.js';\r\nimport ComponentFunctionBinder from './tools/ComponentFunctionBinder.js';\r\nimport DataLoader from './tools/DataLoader.js';\r\n\r\nimport ExternalEventBus from './tools/ExternalEventBus.js';\r\nimport InternalEventBus from './tools/InternalEventBus.js';\r\n\r\nimport TableRegistry from './tools/TableRegistry.js';\r\nimport ModuleBinder from './tools/ModuleBinder.js';\r\n\r\nimport OptionsList from './tools/OptionsList.js';\r\n\r\nclass Tabulator {\r\n\r\n\tconstructor(element, options){\r\n\r\n\t\tthis.options = {};\r\n\r\n\t\tthis.columnManager = null; // hold Column Manager\r\n\t\tthis.rowManager = null; //hold Row Manager\r\n\t\tthis.footerManager = null; //holder Footer Manager\r\n\t\tthis.vdomHoz = null; //holder horizontal virtual dom\r\n\t\tthis.externalEvents = null; //handle external event messaging\r\n\t\tthis.eventBus = null; //handle internal event messaging\r\n\t\tthis.interactionMonitor = false; //track user interaction\r\n\t\tthis.browser = \"\"; //hold current browser type\r\n\t\tthis.browserSlow = false; //handle reduced functionality for slower browsers\r\n\t\tthis.browserMobile = false; //check if running on mobile, prevent resize cancelling edit on keyboard appearance\r\n\t\tthis.rtl = false; //check if the table is in RTL mode\r\n\t\tthis.originalElement = null; //hold original table element if it has been replaced\r\n\r\n\t\tthis.componentFunctionBinder = new ComponentFunctionBinder(this); //bind component functions\r\n\t\tthis.dataLoader = false; //bind component functions\r\n\r\n\t\tthis.modules = {}; //hold all modules bound to this table\r\n\t\tthis.modulesCore = []; //hold core modules bound to this table (for initialization purposes)\r\n\t\tthis.modulesRegular = []; //hold regular modules bound to this table (for initialization purposes)\r\n\r\n\t\tthis.optionsList = new OptionsList(this, \"table constructor\");\r\n\r\n\t\tthis.initialized = false;\r\n\r\n\t\tif(this.initializeElement(element)){\r\n\r\n\t\t\tthis.initializeCoreSystems(options);\r\n\r\n\t\t\t//delay table creation to allow event bindings immediately after the constructor\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis._create();\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tTableRegistry.register(this); //register table for inter-device communication\r\n\t}\r\n\r\n\tinitializeElement(element){\r\n\t\tif(typeof HTMLElement !== \"undefined\" && element instanceof HTMLElement){\r\n\t\t\tthis.element = element;\r\n\t\t\treturn true;\r\n\t\t}else if(typeof element === \"string\"){\r\n\t\t\tthis.element = document.querySelector(element);\r\n\r\n\t\t\tif(this.element){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Tabulator Creation Error - no element found matching selector: \", element);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Tabulator Creation Error - Invalid element provided:\", element);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeCoreSystems(options){\r\n\t\tthis.columnManager = new ColumnManager(this);\r\n\t\tthis.rowManager = new RowManager(this);\r\n\t\tthis.footerManager = new FooterManager(this);\r\n\t\tthis.dataLoader = new DataLoader(this);\r\n\r\n\t\tthis.bindModules();\r\n\r\n\t\tthis.options = this.optionsList.generate(Tabulator.defaultOptions, options)\r\n\r\n\t\tthis._clearObjectPointers();\r\n\r\n\t\tthis._mapDeprecatedFunctionality();\r\n\r\n\t\tthis.externalEvents = new ExternalEventBus(this, this.options, this.options.debugEventsExternal);\r\n\t\tthis.eventBus = new InternalEventBus(this.options.debugEventsInternal);\r\n\r\n\t\tthis.interactionMonitor = new InteractionMonitor(this);\r\n\r\n\t\tthis.dataLoader.initialize();\r\n\t\t// this.columnManager.initialize();\r\n\t\t// this.rowManager.initialize();\r\n\t\tthis.footerManager.initialize();\r\n\t}\r\n\r\n\t//convert deprecated functionality to new functions\r\n\t_mapDeprecatedFunctionality(){\r\n\t\t//all previously deprecated functionality removed in the 5.0 release\r\n\t}\r\n\r\n\t_clearSelection(){\r\n\r\n\t\tthis.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tif (window.getSelection) {\r\n\t\t if (window.getSelection().empty) { // Chrome\r\n\t\t \twindow.getSelection().empty();\r\n\t\t } else if (window.getSelection().removeAllRanges) { // Firefox\r\n\t\t \twindow.getSelection().removeAllRanges();\r\n\t\t }\r\n\t\t} else if (document.selection) { // IE?\r\n\t\t\tdocument.selection.empty();\r\n\t\t}\r\n\r\n\t\tthis.element.classList.remove(\"tabulator-block-select\");\r\n\t}\r\n\r\n\t//create table\r\n\t_create(){\r\n\t\tthis.externalEvents.dispatch(\"tableBuilding\");\r\n\t\tthis.eventBus.dispatch(\"table-building\");\r\n\r\n\t\tthis._rtlCheck();\r\n\r\n\t\tthis._buildElement();\r\n\r\n\t\tthis._initializeTable();\r\n\r\n\t\tthis._loadInitialData();\r\n\r\n\t\tthis.initialized = true;\r\n\r\n\t\tthis.externalEvents.dispatch(\"tableBuilt\");\r\n\t}\r\n\r\n\t_rtlCheck(){\r\n\t\tvar style = window.getComputedStyle(this.element);\r\n\r\n\t\tswitch(this.options.textDirection){\r\n\t\t\tcase\"auto\":\r\n\t\t\tif(style.direction !== \"rtl\"){\r\n\t\t\t\tbreak;\r\n\t\t\t};\r\n\r\n\t\t\tcase \"rtl\":\r\n\t\t\tthis.element.classList.add(\"tabulator-rtl\");\r\n\t\t\tthis.rtl = true;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"ltr\":\r\n\t\t\tthis.element.classList.add(\"tabulator-ltr\");\r\n\r\n\t\t\tdefault:\r\n\t\t\tthis.rtl = false;\r\n\t\t}\r\n\t}\r\n\r\n\t//clear pointers to objects in default config object\r\n\t_clearObjectPointers(){\r\n\t\tthis.options.columns = this.options.columns.slice(0);\r\n\r\n\t\tif(Array.isArray(this.options.data) && !this.options.reactiveData){\r\n\t\t\tthis.options.data = this.options.data.slice(0);\r\n\t\t}\r\n\t}\r\n\r\n\t//build tabulator element\r\n\t_buildElement(){\r\n\t\tvar element = this.element,\r\n\t\toptions = this.options,\r\n\t\tnewElement;\r\n\r\n\t\tif(element.tagName === \"TABLE\"){\r\n\t\t\tthis.originalElement = this.element;\r\n\t\t\tnewElement = document.createElement(\"div\");\r\n\r\n\t\t\t//transfer attributes to new element\r\n\t\t\tvar attributes = element.attributes;\r\n\r\n\t\t\t// loop through attributes and apply them on div\r\n\t\t\tfor(var i in attributes){\r\n\t\t\t\tif(typeof attributes[i] == \"object\"){\r\n\t\t\t\t\tnewElement.setAttribute(attributes[i].name, attributes[i].value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// replace table with div element\r\n\t\t\telement.parentNode.replaceChild(newElement, element);\r\n\r\n\t\t\tthis.element = element = newElement;\r\n\t\t}\r\n\r\n\t\telement.classList.add(\"tabulator\");\r\n\t\telement.setAttribute(\"role\", \"grid\");\r\n\r\n\t\t//empty element\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\t//set table height\r\n\t\tif(options.height){\r\n\t\t\toptions.height = isNaN(options.height) ? options.height : options.height + \"px\";\r\n\t\t\telement.style.height = options.height;\r\n\t\t}\r\n\r\n\t\t//set table min height\r\n\t\tif(options.minHeight !== false){\r\n\t\t\toptions.minHeight = isNaN(options.minHeight) ? options.minHeight : options.minHeight + \"px\";\r\n\t\t\telement.style.minHeight = options.minHeight;\r\n\t\t}\r\n\r\n\t\t//set table maxHeight\r\n\t\tif(options.maxHeight !== false){\r\n\t\t\toptions.maxHeight = isNaN(options.maxHeight) ? options.maxHeight : options.maxHeight + \"px\";\r\n\t\t\telement.style.maxHeight = options.maxHeight;\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize core systems and modules\r\n\t_initializeTable(){\r\n\t\tvar element = this.element,\r\n\t\toptions = this.options;\r\n\r\n\t\tthis.interactionMonitor.initialize();\r\n\r\n\t\tthis.columnManager.initialize();\r\n\t\tthis.rowManager.initialize();\r\n\r\n\t\tthis._detectBrowser();\r\n\r\n\t\t//initialize core modules\r\n\t\tthis.modulesCore.forEach((mod) => {\r\n\t\t\tmod.initialize();\r\n\t\t})\r\n\r\n\t\t//build table elements\r\n\t\telement.appendChild(this.columnManager.getElement());\r\n\t\telement.appendChild(this.rowManager.getElement());\r\n\r\n\t\tif(options.footerElement){\r\n\t\t\tthis.footerManager.activate();\r\n\t\t}\r\n\r\n\t\tif(options.autoColumns && options.data){\r\n\r\n\t\t\tthis.columnManager.generateColumnsFromRowData(this.options.data);\r\n\t\t}\r\n\r\n\t\t//initialize regular modules\r\n\t\tthis.modulesRegular.forEach((mod) => {\r\n\t\t\tmod.initialize();\r\n\t\t});\r\n\r\n\t\tthis.columnManager.setColumns(options.columns);\r\n\r\n\t\tthis.eventBus.dispatch(\"table-built\");\r\n\t}\r\n\r\n\t_loadInitialData(){\r\n\t\tthis.dataLoader.load(this.options.data);\r\n\t}\r\n\r\n\t//deconstructor\r\n\tdestroy(){\r\n\t\tvar element = this.element;\r\n\r\n\t\tTableRegistry.deregister(this); //deregister table from inter-device communication\r\n\r\n\t\tthis.eventBus.dispatch(\"table-destroy\");\r\n\r\n\t\t//clear row data\r\n\t\tthis.rowManager.rows.forEach(function(row){\r\n\t\t\trow.wipe();\r\n\t\t});\r\n\r\n\t\tthis.rowManager.rows = [];\r\n\t\tthis.rowManager.activeRows = [];\r\n\t\tthis.rowManager.displayRows = [];\r\n\r\n\t\t//clear DOM\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\t\telement.classList.remove(\"tabulator\");\r\n\t}\r\n\r\n\t_detectBrowser(){\r\n\t\tvar ua = navigator.userAgent||navigator.vendor||window.opera;\r\n\r\n\t\tif(ua.indexOf(\"Trident\") > -1){\r\n\t\t\tthis.browser = \"ie\";\r\n\t\t\tthis.browserSlow = true;\r\n\t\t}else if(ua.indexOf(\"Edge\") > -1){\r\n\t\t\tthis.browser = \"edge\";\r\n\t\t\tthis.browserSlow = true;\r\n\t\t}else if(ua.indexOf(\"Firefox\") > -1){\r\n\t\t\tthis.browser = \"firefox\";\r\n\t\t\tthis.browserSlow = false;\r\n\t\t}else{\r\n\t\t\tthis.browser = \"other\";\r\n\t\t\tthis.browserSlow = false;\r\n\t\t}\r\n\r\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));\r\n\t}\r\n\r\n\t////////////////// Data Handling //////////////////\r\n\t//block table redrawing\r\n\tblockRedraw(){\r\n\t\treturn this.rowManager.blockRedraw();\r\n\t}\r\n\r\n\t//restore table redrawing\r\n\trestoreRedraw(){\r\n\t\treturn this.rowManager.restoreRedraw();\r\n\t}\r\n\r\n\t//load data\r\n\tsetData(data, params, config){\r\n\t\tif(this.initialized){\r\n\t\t\treturn this.dataLoader.load(data, params, config, false);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"setData failed - table not yet initialized. To set initial data please use the 'data' property in the table constructor.\")\r\n\t\t}\r\n\t}\r\n\r\n\t//clear data\r\n\tclearData(){\r\n\t\tthis.dataLoader.blockActiveLoad();\r\n\t\tthis.rowManager.clearData();\r\n\t}\r\n\r\n\t//get table data array\r\n\tgetData(active){\r\n\t\treturn this.rowManager.getData(active);\r\n\t}\r\n\r\n\t//get table data array count\r\n\tgetDataCount(active){\r\n\t\treturn this.rowManager.getDataCount(active);\r\n\t}\r\n\r\n\t//replace data, keeping table in position with same sort\r\n\treplaceData(data, params, config){\r\n\t\tif(this.initialized){\r\n\t\t\treturn this.dataLoader.load(data, params, config, true, true);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"replaceData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update table data\r\n\tupdateData(data){\r\n\t\tvar responses = 0;\r\n\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\tresponses++;\r\n\r\n\t\t\t\t\t\t\trow.updateData(item)\r\n\t\t\t\t\t\t\t.then(()=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"updateData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\taddData(data, pos, index){\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tthis.rowManager.addRows(data, pos, index)\r\n\t\t\t\t\t.then((rows) => {\r\n\t\t\t\t\t\tvar output = [];\r\n\r\n\t\t\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\t\t\toutput.push(row.getComponent());\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tresolve(output);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"addData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update table data\r\n\tupdateOrAddData(data){\r\n\t\tvar rows = [],\r\n\t\tresponses = 0;\r\n\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\r\n\t\t\t\t\t\tresponses++;\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.updateData(item)\r\n\t\t\t\t\t\t\t.then(()=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\t\t\t\t\t\t\t\trows.push(row.getComponent());\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve(rows);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.rowManager.addRows(item)\r\n\t\t\t\t\t\t\t.then((newRows)=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\t\t\t\t\t\t\t\trows.push(newRows[0].getComponent());\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve(rows);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"updateOrAddData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//get row object\r\n\tgetRow(index){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching row found:\", index);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//get row object\r\n\tgetRowFromPosition(position, active){\r\n\t\tvar row = this.rowManager.getRowFromPosition(position, active);\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching row found:\", position);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//delete row from table\r\n\tdeleteRow(index){\r\n\t\tvar foundRows = [];\r\n\r\n\t\tif(!Array.isArray(index)){\r\n\t\t\tindex = [index];\r\n\t\t}\r\n\r\n\t\t//find matching rows\r\n\t\tfor(let item of index){\r\n\t\t\tlet row = this.rowManager.findRow(item, true);\r\n\r\n\t\t\tif(row){\r\n\t\t\t\tfoundRows.push(row);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Delete Error - No matching row found:\", item);\r\n\t\t\t\treturn Promise.reject(\"Delete Error - No matching row found\")\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//sort rows into correct order to ensure smooth delete from table\r\n\t\tfoundRows.sort((a, b) => {\r\n\t\t\treturn this.rowManager.rows.indexOf(a) > this.rowManager.rows.indexOf(b) ? 1 : -1;\r\n\t\t});\r\n\r\n\t\t//delete rows\r\n\t\tfoundRows.forEach((row) =>{\r\n\t\t\trow.delete()\r\n\t\t});\r\n\r\n\t\tthis.rowManager.reRenderInPosition();\r\n\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\r\n\t//add row to table\r\n\taddRow(data, pos, index){\r\n\t\tif(this.initialized){\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\r\n\t\t\treturn this.rowManager.addRows(data, pos, index)\r\n\t\t\t.then((rows)=>{\r\n\t\t\t\treturn rows[0].getComponent();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"addRow failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update a row if it exitsts otherwise create it\r\n\tupdateOrAddRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t.then(()=>{\r\n\t\t\t\treturn row.getComponent();\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\treturn this.rowManager.addRows(data)\r\n\t\t\t.then((rows)=>{\r\n\t\t\t\treturn rows[0].getComponent();\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\t//update row data\r\n\tupdateRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t.then(()=>{\r\n\t\t\t\treturn Promise.resolve(row.getComponent());\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Update Error - No matching row found:\", index);\r\n\t\t\treturn Promise.reject(\"Update Error - No matching row found\");\r\n\t\t}\r\n\t}\r\n\r\n\t//scroll to row in DOM\r\n\tscrollToRow(index, position, ifVisible){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn this.rowManager.scrollToRow(row, position, ifVisible)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Scroll Error - No matching row found:\", index);\r\n\t\t\treturn Promise.reject(\"Scroll Error - No matching row found\");\r\n\t\t}\r\n\t}\r\n\r\n\tmoveRow(from, to, after){\r\n\t\tvar fromRow = this.rowManager.findRow(from);\r\n\r\n\t\tif(fromRow){\r\n\t\t\tfromRow.moveToRow(to, after);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching row found:\", from);\r\n\t\t}\r\n\t}\r\n\r\n\tgetRows(active){\r\n\t\treturn this.rowManager.getComponents(active);\r\n\t}\r\n\r\n\t//get position of row in table\r\n\tgetRowPosition(index, active){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn this.rowManager.getRowPosition(row, active);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Position Error - No matching row found:\", index);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t/////////////// Column Functions ///////////////\r\n\tsetColumns(definition){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.columnManager.setColumns(definition);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"setColumns failed - table not yet initialized. To set initial data please use the 'columns' property in the table constructor.\")\r\n\t\t}\r\n\t}\r\n\r\n\tgetColumns(structured){\r\n\t\treturn this.columnManager.getComponents(structured);\r\n\t}\r\n\r\n\tgetColumn(field){\r\n\t\tvar col = this.columnManager.findColumn(field);\r\n\r\n\t\tif(col){\r\n\t\t\treturn col.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tgetColumnDefinitions(){\r\n\t\treturn this.columnManager.getDefinitionTree();\r\n\t}\r\n\r\n\tshowColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tcolumn.show();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Show Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\thideColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tcolumn.hide();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Hide Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\ttoggleColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tif(column.visible){\r\n\t\t\t\tcolumn.hide();\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.show();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Visibility Toggle Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\taddColumn(definition, before, field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\treturn this.columnManager.addColumn(definition, before, column)\r\n\t\t.then((column) => {\r\n\t\t\treturn column.getComponent();\r\n\t\t});\r\n\t}\r\n\r\n\tdeleteColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn column.delete();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Delete Error - No matching column found:\", field);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\r\n\tupdateColumnDefinition(field, definition){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn column.updateDefinition(definition)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Update Error - No matching column found:\", field);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\r\n\tmoveColumn(from, to, after){\r\n\t\tvar fromColumn = this.columnManager.findColumn(from);\r\n\t\tvar toColumn = this.columnManager.findColumn(to);\r\n\r\n\t\tif(fromColumn){\r\n\t\t\tif(toColumn){\r\n\t\t\t\tthis.columnManager.moveColumn(fromColumn, toColumn, after)\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Move Error - No matching column found:\", toColumn);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching column found:\", from);\r\n\t\t}\r\n\t}\r\n\r\n\t//scroll to column in DOM\r\n\tscrollToColumn(field, position, ifVisible){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\t\tif(column){\r\n\t\t\t\treturn this.columnManager.scrollToColumn(column, position, ifVisible)\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - No matching column found:\", field);\r\n\t\t\t\treturn Promise.reject(\"Scroll Error - No matching column found\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//////////// General Public Functions ////////////\r\n\t//redraw list without updating data\r\n\tredraw(force){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.columnManager.redraw(force);\r\n\t\t\tthis.rowManager.redraw(force);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"redraw failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\tsetHeight(height){\r\n\t\tthis.options.height = isNaN(height) ? height : height + \"px\";\r\n\t\tthis.element.style.height = this.options.height;\r\n\t\tthis.rowManager.initializeRenderer();\r\n\t\tthis.rowManager.redraw();\r\n\t}\r\n\r\n\t//////////////////// Event Bus ///////////////////\r\n\r\n\ton(key, callback){\r\n\t\tthis.externalEvents.subscribe(key, callback);\r\n\t}\r\n\r\n\toff(key, callback){\r\n\t\tthis.externalEvents.unsubscribe(key, callback);\r\n\t}\r\n\r\n\tdispatchEvent(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift();\r\n\r\n\t\tthis.externalEvents.dispatch(...arguments)\r\n\t}\r\n\r\n\t////////////// Extension Management //////////////\r\n\tmodExists(plugin, required){\r\n\t\tif(this.modules[plugin]){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tif(required){\r\n\t\t\t\tconsole.error(\"Tabulator Module Not Installed: \" + plugin);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tmodule(key){\r\n\t\tvar mod = this.modules[key];\r\n\r\n\t\tif(!mod){\r\n\t\t\tconsole.error(\"Tabulator module not installed: \" + key);\r\n\t\t}\r\n\r\n\t\treturn mod;\r\n\t}\r\n}\r\n\r\n//default setup options\r\nTabulator.defaultOptions = defaultOptions;\r\n\r\n//bind modules and static functionality\r\nnew ModuleBinder(Tabulator);\r\n\r\nexport default Tabulator;\r\n","export default class PseudoRow {\r\n\r\n\tconstructor (type){\r\n\t\tthis.type = type;\r\n\t\tthis.element = this._createElement();\r\n\t}\r\n\r\n\t_createElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\treturn el;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tgetComponent(){\r\n\t\treturn false;\r\n\t}\r\n\r\n\tgetData(){\r\n\t\treturn {};\r\n\t}\r\n\r\n\tgetHeight(){\r\n\t\treturn this.element.outerHeight;\r\n\t}\r\n\r\n\tinitialize(){}\r\n\r\n\treinitialize(){}\r\n\r\n\tnormalizeHeight(){}\r\n\r\n\tgenerateCells(){}\r\n\r\n\treinitializeHeight(){}\r\n\r\n\tcalcHeight(){}\r\n\r\n\tsetCellHeight(){}\r\n\r\n\tclearCellHeight(){}\r\n}"],"names":["CoreFeature","[object Object]","table","this","data","silent","dataLoader","load","undefined","modules","localize","getText","arguments","bind","getLocale","comms","getConnections","send","layout","getMode","eventBus","subscribe","unsubscribe","key","subscribed","subscriptionChange","dispatch","chain","confirm","externalEvents","options","value","module","Module","name","super","_handler","optionsList","register","columnManager","func","console","warn","component","handler","componentFunctionBinder","priority","rowManager","registerDataPipelineHandler","registerDisplayPipelineHandler","renderInPosition","refreshActiveData","Helpers","el","offsetWidth","offsetHeight","box","getBoundingClientRect","top","window","pageYOffset","document","documentElement","clientTop","left","pageXOffset","clientLeft","obj","clone","list","objectProto","__proto__","arrayProto","i","Object","assign","Array","isArray","match","copy","subject","findIndex","item","unshift","deepClone","Accessor","allowedTypes","registerColumnOption","initializeColumn","transformRow","column","config","forEach","type","accessor","charAt","toUpperCase","slice","definition","lookupAccessor","params","accessors","row","rowComponent","getComponent","traverse","colCompnent","getFieldValue","setFieldValue","moduleName","generateParamsList","prefix","output","concat","push","serializeParams","encoded","encodeURIComponent","join","json","headers","Content-Type","body","url","JSON","stringify","form","FormData","append","Ajax","urlGenerator","loaderPromise","registerTableOption","contentTypeFormatters","ajaxRequestFunc","defaultLoaderPromise","ajaxURLGenerator","defaultURLGenerator","ajaxURL","setUrl","setDefaultConfig","ajaxConfig","registerTableFunction","getUrl","requestDataCheck","requestParams","requestData","ajaxParams","call","previousData","generateConfig","sendRequest","defaultConfig","method","ajaxRequesting","then","ajaxResponse","Promise","reject","keys","length","toLowerCase","includes","contentType","resolve","ajaxContentType","Accept","mode","location","origin","credentials","fetch","response","ok","catch","error","status","statusText","defaultContentTypeFormatters","Clipboard","pasteParser","pasteAction","customSelection","rowRange","blocked","clipboard","clipboardCopyRowRange","element","addEventListener","e","plain","html","preventDefault","clipboardCopyFormatter","export","generateExportList","clipboardCopyConfig","clipboardCopyStyled","genereateHTMLTable","generatePlainContent","clipboardData","setData","originalEvent","dispatchExternal","reset","paste","setPasteParser","clipboardPasteParser","setPasteAction","clipboardPasteAction","rowData","columns","col","getKey","range","internal","sel","textRange","getSelection","createRange","selectNodeContents","toString","removeAllRanges","addRange","selection","createTextRange","moveToElementText","select","execCommand","action","pasteActions","parser","pasteParsers","rows","checkPaseOrigin","getPasteData","modExists","mutateData","mutator","valid","target","tagName","edit","currentCell","getData","replace","update","updateOrAddData","insert","addData","headerFindSuccess","columnMap","split","find","title","trim","field","columnsByIndex","shift","CalcComponent","_row","Proxy","get","receiver","handle","transform","getElement","cells","getCells","cell","getCell","CellComponent","_cell","getValue","getOldValue","initialValue","getField","mutate","setValue","setValueActual","checkHeight","Cell","oldValue","height","width","minWidth","loaded","build","generateElement","setWidth","_configureCell","createElement","className","setAttribute","style","textAlign","hozAlign","vertAlign","display","alignItems","bottom","middle","justifyContent","right","center","cssClass","classList","add","tooltipGenerationMode","_generateTooltip","visible","hide","val","innerHTML","Node","firstChild","removeChild","appendChild","tooltip","containerOnly","layoutElement","setValueProcessData","cellRendered","cellEdited","subscribedExternal","changed","_generateContents","widthStyled","minWidthStyled","maxWidth","maxWidthStyled","reinitializeHeight","heightStyled","redrawBlock","parentNode","deleteCell","calcs","getCellIndex","ColumnComponent","_column","getDefinition","getTitleDownload","isGroup","show","delete","parent","Column","scrollToColumn","to","after","toColumn","findColumn","moveColumn","nextCol","nextColumn","prevCol","prevColumn","updates","updateDefinition","getWidth","result","reinitializeWidth","renderer","rerenderColumns","maxInitialWidth","variableHeight","headerTooltip","headerVertical","headerHozAlign","editableTitle","def","contentElement","titleHolderElement","titleElement","groupElement","createGroupElement","fieldStructure","titleDownload","titleFormatterRendered","mapDefinitions","setField","widthFixed","newCol","attachColumn","checkColumnVisibility","registerColumnField","_initialize","bindModuleColumns","defaults","columnDefaults","generate","defaultOptionList","indexOf","nestedFieldSeparator","_getNestedData","_getFlatData","_setNestedData","_setFlatData","registerColumnPosition","reRegisterPosition","langBind","_bindEvents","_buildColumnHeaderContent","_buildGroupHeader","_buildColumnHeader","setTooltip","dblTap","tapHold","tap","headerClick","headerDblClick","headerContext","passive","headerTap","clearTimeout","headerDblTap","setTimeout","headerTapHold","setMinWidth","parseInt","setMaxWidth","_buildColumnHeaderTitle","contents","structure","dataObj","paddingTop","colDefs","childWidth","heightInitialized","index","setTo","force","active","manualHeight","outerHeight","initialized","created","maxHeight","tempData","updatedData","findCell","moveRowActual","blockRedraw","detatchModules","values","topCalcs","botCalcs","genColumn","topElement","botElement","topRow","botRow","topInitialized","initializeColumnCheck","tableRedraw","recalcRowGroup","recalcAll","groupBy","columnCalcs","topCalcParams","botCalcParams","calculations","botInitialized","generateRow","group","updateData","dataTreeChildColumnCalcs","children","pos","format","formatter","paramKey","results","subGroups","getSubGroups","subGroupResults","groupObj","ColumnCalcs","indent","collapseEl","expandEl","branchEl","registerComponentFunction","expandRow","dataTreeChildField","dummyEl","dataTreeCollapseElement","tabIndex","dataTreeExpandElement","rowDelete","layoutRow","childArray","dataTree","open","controlEl","child","cloneNode","stopPropagation","oldControl","create","allChildren","childData","childRow","collapseRow","Row","initializeRow","defaultDownloaders","csv","setFileContents","fileContents","depth","jsonLines","pdf","header","autoTableParams","fontStyle","fontSize","cellPadding","fillColor","jsPDFParams","content","colSpan","rowSpan","doc","head","xlsx","sheetName","workbook","utils","tableFeatures","generateSheet","merges","worksheet","SheetNames","sheet","buf","s","Uint8Array","download","downloadFunc","triggerDownload","interceptCallback","groupHeader","blob","Blob","navigator","maskInput","maskLetter","maskLetterChar","maskNumber","symbol","char","isNaN","Download","onRendered","input","editorParams","padding","elementAttributes","cellValue","cancel","vertNav","String","boxSizing","onChange","removeEventListener","blurFunc","cellEl","initialDisplayValue","listEl","multiselect","dataItems","currentItem","displayItems","currentItems","blurable","blockListShow","searchWordTimeout","self","getColumnByField","label","itemParams","displayList","dataList","sortValuesList","toggleItem","splice","unsetItem","fillInput","hideList","cancelItem","len","unsetItems","chooseItems","keyCode","stopImmediatePropagation","setCurrentItem","searchWord","parseItems","getUniqueColumnValues","elOffset","showList","autocomplete","uniqueColumnValues","sort","filterList","matches","addNotice","fillListIfNotEmpty","items","clearList","searchEl","notice","fillList","intialLoad","success","chooseItem","genUniqueColumnValues","star","maxStars","size","stars","starChange","nextStar","starsHolder","whiteSpace","verticalAlign","getAttribute","progress","max","min","percent","bar","calcVal","position","backgroundColor","mouseDrag","mouseDragWidth","updateValue","tristate","indetermState","indetermValue","browser","mouseClick","recursionBlock","editedCells","editors","navigatePrev","navigateNext","keybindingNavigateNext","newRow","addRow","nextCell","prevRow","nextRow","allowEdit","elVisible","prevCell","editor","clearEditor","button","forceEdit","getRenderMode","bottomEdge","rowEl","rightEdge","leftEdge","renderHorizontal","scrollLeft","rendered","cancelEdit","invalidEdit","focusCellNoEvent","editIndex","Edit","defaultEditors","ExportRow","ExportColumn","colVisProp","cloneTableStyle","getDisplayRows","groupData","maxDepth","exportRows","headerDepth","headerEl","bodyEl","styles","setup","rowFormatter","oddRow","querySelector","evenRow","calcRow","styleCells","getElementsByClassName","mapElementStyles","treeElementField","holder","genereateTableElement","background-color","color","font-weight","font-family","font-size","text-align","border-top","border-left","border-right","border-bottom","padding-top","padding-left","padding-right","getComputedStyle","Export","filterParams","rowVal","filterVal","headerFilterColumns","prevHeaderFilterChangeCheck","tableInitialized","userSetFilter","userSetHeaderFilterFocus","userRemoveFilter","initialHeaderFilter","getHeaderFilterValue","filterChangeCheck","filter","prevSuccess","Filter","filterFunc","attrType","filterElement","getColumn","normalizeHeight","typingTimer","headerFilterLiveFilterDelay","headerFilter","editorElement","filterMode","ajax","headerFilters","activeRows","getFilters","plaintext","textarea","money","number","sign","decimalSym","thousandSym","negativeSign","integer","link","urlPrefix","formatterParams","image","tickCross","empty","tick","tickElement","datetime","DT","inputFormat","shiftTimezone","toFormat","invalid","datetimediff","invalidPlaceholder","suffix","unit","newDatetime","lookup","Math","traffic","percentValue","round","colors","floor","legend","legendColor","barEl","barContainer","legendEl","legendAlign","holderEl","buttonTick","buttonCross","rownum","checkbox","selectRow","Format","formatters","entityMap","&","<",">","\"","'","/","leftColumns","rightColumns","leftMargin","rightMargin","rightPadding","initializationMode","scrollEndTimer","layoutCell","scrollHorizontal","groups","leftParents","headersElement","frozen","margin","parentEl","allCells","layoutCalcRows","paddingLeft","FrozenColumns","refreshData","FrozenRows","GroupComponent","_group","Group","groupManager","level","hasSubGroups","old","groupList","generator","elementContents","createElements","createValueGroups","arrow","groupKey","groupID","toIndex","generateGroupHeaderContents","marginLeft","noCalc","_visSet","remove","getHeadersAndRows","prev","compoment","groupIDLookups","startOpen","headerGenerator","displayHandler","userGetGroupedData","configureGroupSetup","wipe","rowMoving","groupStartOpen","prevValue","groupRows","moveRowInArray","prevDisplayRow","from","generateGroups","updateGroupRows","groupComponents","headerContent","groupListData","oldGroups","oldRowGroup","groupId","GroupRows","cellUpdated","rowMoved","clear","getRowPosition","history","History","oldRow","rowAdd","deleteActual","_rebindRow","rowMove","hasIndex","_extractOptions","fieldIndex","HtmlTableImport","inQuote","importFormat","importer","extension","pickFile","importData","onerror","parsedData","Import","rowClick","rowDblClick","rowContext","rowMouseEnter","rowMouseLeave","rowMouseMove","rowTap","rowDblTap","rowTapHold","cellClick","cellDblClick","cellContext","cellMouseEnter","cellMouseLeave","cellMouseMove","cellTap","cellDblTap","cellTapHold","headerMouseEnter","headerMouseLeave","headerMouseMove","groupClick","groupDblClick","groupContext","groupMouseEnter","groupMouseLeave","subscribers","touchSubscribers","touchWatchers","tapDbl","added","eventMap","subscribeTouchEvents","subscriptionChanged","watchers","callback","Interaction","Keybindings","watchKeys","pressedKeys","mergedBindings","actions","bindings","meta","binding","navPrev","navNext","navUp","navDown","scrollPageUp","scrollPageDown","undo","scrollToRow","focus","Menu","menuElements","escEvent","positionReversedX","currentComponent","columnSubscribers","menuContainer","checkMenuContainerIsParent","rowClickMenu","headerContextMenu","initializeColumnHeaderMenu","contextMenu","headerMenu","menu","isOpen","hideMenu","itemEl","hideOldSubMenus","x","y","MoveColumns","placeholderElement","hoverElement","checkTimeout","checkPeriod","moving","toCol","startX","autoScrollMargin","autoScrollTimeout","touches","colEl","nextColWidthLast","prevColWidth","startXMove","moveToCol","nextColWidth","headerElement","pageX","clientHeight","toColAfter","_unbindMouseMove","xPos","MoveRows","toRow","toRowAfter","hasHandle","moveHover","endMove","tableRowDropEvent","touchMove","connection","connectionSelectorsTables","connectionElements","connections","connectedTable","connectedRow","movableRowsConnectedTables","connectionSelectorsElements","mousemove","insertBefore","nextSibling","moveRow","tableRowDrop","pageY","which","rowHandle","nextRowHeight","diff","startYMove","moveToRow","nextRowHeightLast","setStartPosition","scrollTop","yPos","connectionTables","commsConnections","prototype","fromRow","Mutator","enabled","ofEl","showingEl","rowsEl","totalRows","valueEl","totalEl","Page","progressiveLoad","pageCounterElement","page","count","displayIndex","initialLoad","dataChanging","pageSizes","setMaxPage","calculatePageSizes","registerDisplayHandler","initializePageCounter","remotePageParams","dispRows","paginationSize","testElRow","testElCell","setPageToRow","firstBut","nextBut","paginationSizeSelector","pageCounter","pageSelectLabel","prevBut","setPage","previousPage","nextPage","paginationElement","pageSizeSelect","lastBut","rowCount","currentRow","rightSize","disabled","end","_setPageButtons","actualStartRow","cookie","cookiePos","localStorage","expireDate","setDate","Persistence","id","defWatcherBlock","persistence","readers","readFunc","persistenceWriterFunc","retreiveData","retreivedData","sorters","initialSort","props","mergeDefinition","current","oldCols","parseColumns","validateSorters","writeFunc","definitions","defStore","moduleInitOrder","defaultReaders","Print","manualBlock","scrollY","tableEl","printHeader","footerContent","scrollX","ReactiveData","origFuncs","currentVersion","version","defineProperty","pop","childField","configurable","apply","getOwnPropertyDescriptor","ResizeColumns","prevHandle","_mouseDown","nearestColumn","colIndex","rtl","mouseUp","startColumn","ResizeRows","handleDown","observer","autoResize","containerHeight","containerWidth","tableHeight","browserMobile","ResizeTable","ResponsiveLayout","hiddenColumns","collapseStartOpen","responsiveLayout","collapseHandleColumn","generateCollapsedRowContent","colCount","working","titleHighlight","text","SelectRow","selecting","lastClickedRow","selectPrev","headerCheckboxElement","toggleRow","shiftKey","rowIdx","fromRowIdx","deselectRows","toggledRows","_rowSelectionChanged","_selectRow","rowInfo","selectedRows","dir","emptyAlign","decimalSeparator","thousandSeparator","a","b","string","langLocale","datetime$1","boolean","d","c","calc","alignEmptyValues","aRow","bs","as","rd","b1","sortList","tableBuilt","setSort","sorter","startingDir","columnHeaderSortMulti","rowComponents","sortMode","sortObj","_sortItems","el1Comp","el2","Sort","Number","isFinite","float","parameters","ends","Validate","clearValidation","_buildValidator","validators","validate","invalidIndex","invalidCells","ResizeTableModule","ResponsiveLayoutModule","SelectRowModule","ValidateModule","ifVisible","rowIndex","elementVertical","VirtualDomHorizontal","rightCol","vDomScrollPosRight","vDomPadLeft","vDomPadRight","fitDataColAvg","visibleRows","isFitData","scroll","cols","colPos","reinitChanged","change","layoutRefresh","removeColRight","fitDataColActualWidthCheck","changes","widthDiff","newWidth","ColumnManager","blockHozScrollEvent","renderClass","renderers","redraw","nextToColumn","parentIndex","nextEl","minHeight","verticalAlignHeaders","updateRows","fromIndex","adjust","offsetLeft","scrollHeight","reinitialize","BaiscVertical","VirtualDomVertical","vDomRowHeight","vDomTop","vDomScrollPosBottom","vDomBottomPad","paddingBottom","topOffset","deinitializeHeight","_addBottomRow","bottomDiff","topPad","heightOccupied","vDomWindowBuffer","fillableSpace","getHeight","vDomScrollPosTop","removableRows","vDomBottom","RowManager","tableElement","heightFixer","placeholder","placeholderContents","firstRender","renderMode","displayRows","displayRowsCount","rowNumColumn","initializePlaceholder","initializeRenderer","_positionPlaceholder","activeIndex","displayRowIterator","regenerateRowNumbers","_clearPlaceholder","setActiveRows","findRowIndex","getRows","skipStage","stage","renderColumns","dataPipeline","displayPipeline","basic","fixedHeight","_clearTable","renderEmptyScroll","_showPlaceholder","otherHeight","redrawBlockRestoreConfig","renderTable","containerElement","links","InteractionManager","tabulator-cell","subscriber","listenerMap","components","pseudoTrackers","pseudoMouseLeave","linkedKeys","listeners","listener","targets","previousTargets","funcName","msgElement","dataLoaderLoading","template","loadingElement","requestOrder","errorElement","debug","subscriptionNotifiers","args","events","_notifiySubscriptionChange","confirmed","notifiers","_confirm","TableRegistry","lastCol","flexGrowUnits","remainingSpace","changeUnits","calcShrink","remainingFlexGrowUnits","shrinkCols","oversizeCols","oversizeSpace","freeSpace","fixedWidth","fixedShrinkColumns","flexColWidth","flexColumns","Layout","Localize","lang","_setLangProp","langList","desiredLocale","locale","path","trans","root","rootPath","loading","page_size","next","next_title","all","Comms","con","coreModules","tabulator","registerModule","query","orderedMods","moduleBindings","moduleCore","Tabulator","footerManager","vdomHoz","interactionMonitor","originalElement","ComponentFunctionBinder","bindModules","initialize","_loadInitialData","attributes","setColumns","parse","responses","findRow","foundRows","plugin","debugEventsInternal","debugInvalidOptions","autoColumns","addRowPos","headerVisible","renderVerticalBuffer","scrollToRowPosition","scrollToColumnIfVisible","rowF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B7J,4BACC,IAAIyF,4PAgBGnD,4sBAqCPpC,KAAK4C,gCACL5C,iCAMAA,KAAK0B,eAAeR,sJAerBpB,UAAUk2C,KACT,6IAce,yCCrzBFf,0C3BYdgB,uBACAC,uBAEA1kC,uBAEA0J,oDAKAhD,kBAEAjY,QAEAk2C,gHASAz7B,gCAIA07B,mBAEAC,0CAGA7sB,yBACA8sB,uBAEAC,gFAIAC,2BAEA1rB,gBACA2rB,kDAEAC,4BAEA5H,kDCzDA6H,sF0BED,WAIA,qBAEA,IAAIC,UAEJ,SAEC92C,eACCE,UAAY0F,EACZ1F,oDAIA"} \ No newline at end of file +{"version":3,"file":"tabulator_esm.min.js","sources":["../../src/js/core/CoreFeature.js","../../src/js/core/Module.js","../../src/js/core/tools/Helpers.js","../../src/js/modules/Accessor/Accessor.js","../../src/js/modules/Accessor/defaults/accessors.js","../../src/js/modules/Ajax/defaults/urlGenerator.js","../../src/js/modules/Ajax/defaults/contentTypeFormatters.js","../../src/js/modules/Ajax/Ajax.js","../../src/js/modules/Ajax/defaults/config.js","../../src/js/modules/Ajax/defaults/loaderPromise.js","../../src/js/modules/Clipboard/Clipboard.js","../../src/js/modules/Clipboard/defaults/pasteActions.js","../../src/js/modules/Clipboard/defaults/pasteParsers.js","../../src/js/modules/ColumnCalcs/CalcComponent.js","../../src/js/core/cell/CellComponent.js","../../src/js/core/cell/Cell.js","../../src/js/core/column/ColumnComponent.js","../../src/js/core/column/defaults/options.js","../../src/js/core/column/Column.js","../../src/js/core/row/RowComponent.js","../../src/js/core/row/Row.js","../../src/js/modules/ColumnCalcs/defaults/calculations.js","../../src/js/modules/ColumnCalcs/ColumnCalcs.js","../../src/js/modules/DataTree/DataTree.js","../../src/js/modules/Download/defaults/downloaders.js","../../src/js/modules/Download/defaults/downloaders/csv.js","../../src/js/modules/Download/defaults/downloaders/json.js","../../src/js/modules/Download/defaults/downloaders/jsonLines.js","../../src/js/modules/Download/defaults/downloaders/pdf.js","../../src/js/modules/Download/defaults/downloaders/xlsx.js","../../src/js/modules/Download/defaults/downloaders/html.js","../../src/js/modules/Download/Download.js","../../src/js/modules/Edit/inputMask.js","../../src/js/modules/Edit/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/select.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/plaintext.js","../../src/js/modules/Format/defaults/formatters.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/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/defaults/undoers.js","../../src/js/modules/History/History.js","../../src/js/modules/HtmlTableImport/HtmlTableImport.js","../../src/js/modules/History/defaults/redoers.js","../../src/js/modules/Import/defaults/importers/csv.js","../../src/js/modules/Import/Import.js","../../src/js/modules/Import/defaults/importers/json.js","../../src/js/modules/Interaction/Interaction.js","../../src/js/modules/Keybindings/defaults/bindings.js","../../src/js/modules/Keybindings/Keybindings.js","../../src/js/modules/Menu/Menu.js","../../src/js/modules/Keybindings/defaults/actions.js","../../src/js/modules/MoveColumns/MoveColumns.js","../../src/js/modules/MoveRows/MoveRows.js","../../src/js/modules/Mutator/defaults/mutators.js","../../src/js/modules/Mutator/Mutator.js","../../src/js/modules/Page/defaults/pageCounters/rows.js","../../src/js/modules/Page/Page.js","../../src/js/modules/Page/defaults/pageCounters/pages.js","../../src/js/modules/Page/defaults/pageCounters.js","../../src/js/modules/Persistence/defaults/readers.js","../../src/js/modules/Persistence/defaults/writers.js","../../src/js/modules/Persistence/Persistence.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/date.js","../../src/js/modules/Sort/defaults/sorters/number.js","../../src/js/modules/Sort/defaults/sorters.js","../../src/js/modules/Sort/defaults/sorters/string.js","../../src/js/modules/Sort/defaults/sorters/time.js","../../src/js/modules/Sort/defaults/sorters/boolean.js","../../src/js/modules/Sort/Sort.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/Validate/defaults/validators.js","../../src/js/modules/Validate/Validate.js","../../src/js/core/defaults/options.js","../../src/js/core/tools/OptionsList.js","../../src/js/core/rendering/Renderer.js","../../src/js/core/rendering/renderers/BasicHorizontal.js","../../src/js/core/rendering/renderers/VirtualDomHorizontal.js","../../src/js/core/ColumnManager.js","../../src/js/core/rendering/renderers/BasicVertical.js","../../src/js/core/rendering/renderers/VirtualDomVertical.js","../../src/js/core/RowManager.js","../../src/js/core/FooterManager.js","../../src/js/core/tools/InteractionMonitor.js","../../src/js/core/tools/ComponentFunctionBinder.js","../../src/js/core/tools/DataLoader.js","../../src/js/core/tools/ExternalEventBus.js","../../src/js/core/tools/InternalEventBus.js","../../src/js/core/tools/TableRegistry.js","../../src/js/modules/Layout/defaults/modes/fitData.js","../../src/js/modules/Layout/defaults/modes/fitDataStretch.js","../../src/js/modules/Layout/defaults/modes/fitDataGeneral.js","../../src/js/modules/Layout/Layout.js","../../src/js/modules/Layout/defaults/modes/fitColumns.js","../../src/js/modules/Layout/defaults/modes.js","../../src/js/modules/Localize/defaults/langs.js","../../src/js/modules/Localize/Localize.js","../../src/js/modules/Comms/Comms.js","../../src/js/core/tools/ModuleBinder.js","../../src/js/core/Tabulator.js","../../src/js/core/row/PseudoRow.js"],"sourcesContent":["export default class CoreFeature{\r\n\r\n\tconstructor(table){\r\n\t\tthis.table = table;\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t/////////////// DataLoad /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\treloadData(data, silent){\r\n\t\treturn this.table.dataLoader.load(data, undefined, undefined, undefined, silent);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t///////////// Localization ///////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tlangText(){\r\n\t\treturn this.table.modules.localize.getText(...arguments);\r\n\t}\r\n\r\n\tlangBind(){\r\n\t\treturn this.table.modules.localize.bind(...arguments);\r\n\t}\r\n\r\n\tlangLocale(){\r\n\t\treturn this.table.modules.localize.getLocale(...arguments);\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t////////// Inter Table Comms /////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tcommsConnections(){\r\n\t\treturn this.table.modules.comms.getConnections(...arguments);\r\n\t}\r\n\r\n\tcommsSend(){\r\n\t\treturn this.table.modules.comms.send(...arguments);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Layout /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tlayoutMode(){\r\n\t\treturn this.table.modules.layout.getMode();\r\n\t}\r\n\r\n\tlayoutRefresh(){\r\n\t\treturn this.table.modules.layout.layout();\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t/////////////// Event Bus ////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tsubscribe(){\r\n\t\treturn this.table.eventBus.subscribe(...arguments);\r\n\t}\r\n\r\n\tunsubscribe(){\r\n\t\treturn this.table.eventBus.unsubscribe(...arguments);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.table.eventBus.subscribed(key);\r\n\t}\r\n\r\n\tsubscriptionChange(){\r\n\t\treturn this.table.eventBus.subscriptionChange(...arguments);\r\n\t}\r\n\r\n\tdispatch(){\r\n\t\treturn this.table.eventBus.dispatch(...arguments);\r\n\t}\r\n\r\n\tchain(){\r\n\t\treturn this.table.eventBus.chain(...arguments);\r\n\t}\r\n\r\n\tconfirm(){\r\n\t\treturn this.table.eventBus.confirm(...arguments);\r\n\t}\r\n\r\n\tdispatchExternal(){\r\n\t\treturn this.table.externalEvents.dispatch(...arguments);\r\n\t}\r\n\r\n\tsubscribedExternal(key){\r\n\t\treturn this.table.externalEvents.subscribed(key);\r\n\t}\r\n\r\n\tsubscriptionChangeExternal(){\r\n\t\treturn this.table.externalEvents.subscriptionChange(...arguments);\r\n\t}\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Options /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\toptions(key){\r\n\t\treturn this.table.options[key];\r\n\t}\r\n\r\n\tsetOption(key, value){\r\n\t\tif(typeof value !== \"undefined\"){\r\n\t\t\tthis.table.options[key] = value;\r\n\t\t}\r\n\r\n\t\treturn this.table.options[key];\r\n\t}\r\n\r\n\r\n\t//////////////////////////////////////////\r\n\t//////////////// Modules /////////////////\r\n\t//////////////////////////////////////////\r\n\r\n\tmodule(key){\r\n\t\treturn this.table.module(key);\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\n\r\nclass Module extends CoreFeature{\r\n\r\n\tconstructor(table, name){\r\n\t\tsuper(table);\r\n\r\n\t\tthis._handler = null;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\t// setup module when table is initialized, to be overriden in module\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t////// Options Registration ///////\r\n\t///////////////////////////////////\r\n\r\n\tregisterTableOption(key, value){\r\n\t\tthis.table.optionsList.register(key, value);\r\n\t}\r\n\r\n\tregisterColumnOption(key, value){\r\n\t\tthis.table.columnManager.optionsList.register(key, value);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t/// Public Function Registation ///\r\n\t///////////////////////////////////\r\n\r\n\tregisterTableFunction(name, func){\r\n\t\tif(typeof this.table[name] === \"undefined\"){\r\n\t\t\tthis.table[name] = func;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Unable to bind table function, name already in use\", name)\r\n\t\t}\r\n\t}\r\n\r\n\tregisterComponentFunction(component, func, handler){\r\n\t\treturn this.table.componentFunctionBinder.bind(component, func, handler);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Data Pipeline //////////\r\n\t///////////////////////////////////\r\n\r\n\tregisterDataHandler(handler, priority){\r\n\t\tthis.table.rowManager.registerDataPipelineHandler(handler, priority)\r\n\t\tthis._handler = handler;\r\n\t}\r\n\r\n\tregisterDisplayHandler(handler, priority){\r\n\t\tthis.table.rowManager.registerDisplayPipelineHandler(handler, priority)\r\n\t\tthis._handler = handler;\r\n\t}\r\n\r\n\trefreshData(renderInPosition, handler){\r\n\t\tif(!handler){\r\n\t\t\thandler = this._handler;\r\n\t\t}\r\n\r\n\t\tif(handler){\r\n\t\t\tthis.table.rowManager.refreshActiveData(handler, false, renderInPosition);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport default Module;","export default class Helpers{\r\n\r\n\tstatic elVisible(el){\r\n\t\treturn !(el.offsetWidth <= 0 && el.offsetHeight <= 0);\r\n\t}\r\n\r\n\tstatic elOffset(el){\r\n\t\tvar box = el.getBoundingClientRect();\r\n\r\n\t\treturn {\r\n\t\t\ttop: box.top + window.pageYOffset - document.documentElement.clientTop,\r\n\t\t\tleft: box.left + window.pageXOffset - document.documentElement.clientLeft\r\n\t\t};\r\n\t}\r\n\r\n\tstatic deepClone(obj, clone, list = []){\r\n\t\tvar objectProto = {}.__proto__,\r\n\t\tarrayProto = [].__proto__;\r\n\r\n\t\tif (!clone){\r\n\t\t\tclone = Object.assign(Array.isArray(obj) ? [] : {}, obj);\r\n\t\t}\r\n\r\n\t\tfor(var i in obj) {\r\n\t\t\tlet subject = obj[i],\r\n\t\t\tmatch, copy;\r\n\r\n\t\t\tif(subject != null && typeof subject === \"object\" && (subject.__proto__ === objectProto || subject.__proto__ === arrayProto)){\r\n\t\t\t\tmatch = list.findIndex((item) => {\r\n\t\t\t\t\treturn item.subject === subject;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(match > -1){\r\n\t\t\t\t\tclone[i] = list[match].copy;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcopy = Object.assign(Array.isArray(subject) ? [] : {}, subject);\r\n\r\n\t\t\t\t\tlist.unshift({subject, copy});\r\n\r\n\t\t\t\t\tclone[i] = this.deepClone(subject, copy, list);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn clone;\r\n\t}\r\n}","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defautlAccessors from './defaults/accessors.js';\r\n\r\nclass Accessor extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.allowedTypes = [\"\", \"data\", \"download\", \"clipboard\", \"print\", \"htmlOutput\"] //list of accessor types\r\n\r\n\t\tthis.registerColumnOption(\"accessor\");\r\n\t\tthis.registerColumnOption(\"accessorParams\");\r\n\t\tthis.registerColumnOption(\"accessorData\");\r\n\t\tthis.registerColumnOption(\"accessorDataParams\");\r\n\t\tthis.registerColumnOption(\"accessorDownload\");\r\n\t\tthis.registerColumnOption(\"accessorDownloadParams\");\r\n\t\tthis.registerColumnOption(\"accessorClipboard\");\r\n\t\tthis.registerColumnOption(\"accessorClipboardParams\");\r\n\t\tthis.registerColumnOption(\"accessorPrint\");\r\n\t\tthis.registerColumnOption(\"accessorPrintParams\");\r\n\t\tthis.registerColumnOption(\"accessorHtmlOutput\");\r\n\t\tthis.registerColumnOption(\"accessorHtmlOutputParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"row-data-retrieve\", this.transformRow.bind(this));\r\n\t}\r\n\r\n\t//initialize column accessor\r\n\tinitializeColumn(column){\r\n\t\tvar match = false,\r\n\t\tconfig = {};\r\n\r\n\t\tthis.allowedTypes.forEach((type) => {\r\n\t\t\tvar key = \"accessor\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\t\taccessor;\r\n\r\n\t\t\tif(column.definition[key]){\r\n\t\t\t\taccessor = this.lookupAccessor(column.definition[key]);\r\n\r\n\t\t\t\tif(accessor){\r\n\t\t\t\t\tmatch = true;\r\n\r\n\t\t\t\t\tconfig[key] = {\r\n\t\t\t\t\t\taccessor:accessor,\r\n\t\t\t\t\t\tparams: column.definition[key + \"Params\"] || {},\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tcolumn.modules.accessor = config;\r\n\t\t}\r\n\t}\r\n\r\n\tlookupAccessor(value){\r\n\t\tvar accessor = false;\r\n\r\n\t\t//set column accessor\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Accessor.accessors[value]){\r\n\t\t\t\taccessor = Accessor.accessors[value]\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Accessor Error - No such accessor found, ignoring: \", value);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\taccessor = value;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn accessor;\r\n\t}\r\n\r\n\t//apply accessor to row\r\n\ttransformRow(row, type){\r\n\t\tvar key = \"accessor\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\trowComponent = row.getComponent();\r\n\r\n\t\t//clone data object with deep copy to isolate internal data from returned result\r\n\t\tvar data = Helpers.deepClone(row.data || {});\r\n\r\n\t\tthis.table.columnManager.traverse(function(column){\r\n\t\t\tvar value, accessor, params, colCompnent;\r\n\r\n\t\t\tif(column.modules.accessor){\r\n\r\n\t\t\t\taccessor = column.modules.accessor[key] || column.modules.accessor.accessor || false;\r\n\r\n\t\t\t\tif(accessor){\r\n\t\t\t\t\tvalue = column.getFieldValue(data);\r\n\r\n\t\t\t\t\tif(value != \"undefined\"){\r\n\t\t\t\t\t\tcolCompnent = column.getComponent();\r\n\t\t\t\t\t\tparams = typeof accessor.params === \"function\" ? accessor.params(value, data, type, colCompnent, rowComponent) : accessor.params;\r\n\t\t\t\t\t\tcolumn.setFieldValue(data, accessor.accessor(value, data, type, params, colCompnent, rowComponent));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n}\r\n\r\n//load defaults\r\nAccessor.moduleName = \"accessor\";\r\nAccessor.accessors = defautlAccessors;\r\n\r\nexport default Accessor;","export default {}","function generateParamsList(data, prefix){\r\n\tvar output = [];\r\n\r\n\tprefix = prefix || \"\";\r\n\r\n\tif(Array.isArray(data)){\r\n\t\tdata.forEach((item, i) => {\r\n\t\t\toutput = output.concat(generateParamsList(item, prefix ? prefix + \"[\" + i + \"]\" : i));\r\n\t\t});\r\n\t}else if (typeof data === \"object\"){\r\n\t\tfor (var key in data){\r\n\t\t\toutput = output.concat(generateParamsList(data[key], prefix ? prefix + \"[\" + key + \"]\" : key));\r\n\t\t}\r\n\t}else{\r\n\t\toutput.push({key:prefix, value:data});\r\n\t}\r\n\r\n\treturn output;\r\n}\r\n\r\nfunction serializeParams(params){\r\n\tvar output = generateParamsList(params),\r\n\tencoded = [];\r\n\r\n\toutput.forEach(function(item){\r\n\t\tencoded.push(encodeURIComponent(item.key) + \"=\" + encodeURIComponent(item.value));\r\n\t});\r\n\r\n\treturn encoded.join(\"&\");\r\n}\r\n\r\nexport default function(url, config, params){\r\n\tif(url){\r\n\t\tif(params && Object.keys(params).length){\r\n\t\t\tif(!config.method || config.method.toLowerCase() == \"get\"){\r\n\t\t\t\tconfig.method = \"get\";\r\n\r\n\t\t\t\turl += (url.includes(\"?\") ? \"&\" : \"?\") + serializeParams(params);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn url;\r\n};","function generateParamsList(data, prefix){\r\n\tvar output = [];\r\n\r\n\tprefix = prefix || \"\";\r\n\r\n\tif(Array.isArray(data)){\r\n\t\tdata.forEach((item, i) => {\r\n\t\t\toutput = output.concat(generateParamsList(item, prefix ? prefix + \"[\" + i + \"]\" : i));\r\n\t\t});\r\n\t}else if (typeof data === \"object\"){\r\n\t\tfor (var key in data){\r\n\t\t\toutput = output.concat(generateParamsList(data[key], prefix ? prefix + \"[\" + key + \"]\" : key));\r\n\t\t}\r\n\t}else{\r\n\t\toutput.push({key:prefix, value:data});\r\n\t}\r\n\r\n\treturn output;\r\n}\r\n\r\nexport default {\r\n\t\"json\":{\r\n\t\theaders:{\r\n\t\t\t'Content-Type': 'application/json',\r\n\t\t},\r\n\t\tbody:function(url, config, params){\r\n\t\t\treturn JSON.stringify(params);\r\n\t\t},\r\n\t},\r\n\t\"form\":{\r\n\t\theaders:{\r\n\t\t},\r\n\t\tbody:function(url, config, params){\r\n\r\n\t\t\tvar output = generateParamsList(params),\r\n\t\t\tform = new FormData();\r\n\r\n\t\t\toutput.forEach(function(item){\r\n\t\t\t\tform.append(item.key, item.value);\r\n\t\t\t});\r\n\r\n\t\t\treturn form;\r\n\t\t},\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultConfig from './defaults/config.js';\r\nimport defaultURLGenerator from './defaults/urlGenerator.js';\r\nimport defaultLoaderPromise from './defaults/loaderPromise.js';\r\nimport defaultContentTypeFormatters from './defaults/contentTypeFormatters.js';\r\n\r\nclass Ajax extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.config = {}; //hold config object for ajax request\r\n\t\tthis.url = \"\"; //request URL\r\n\t\tthis.urlGenerator = false;\r\n\t\tthis.params = false; //request parameters\r\n\t\t\r\n\t\tthis.loaderPromise = false;\r\n\t\t\r\n\t\tthis.registerTableOption(\"ajaxURL\", false); //url for ajax loading\r\n\t\tthis.registerTableOption(\"ajaxURLGenerator\", false);\r\n\t\tthis.registerTableOption(\"ajaxParams\", {}); //params for ajax loading\r\n\t\tthis.registerTableOption(\"ajaxConfig\", \"get\"); //ajax request type\r\n\t\tthis.registerTableOption(\"ajaxContentType\", \"form\"); //ajax request type\r\n\t\tthis.registerTableOption(\"ajaxRequestFunc\", false); //promise function\r\n\t\t\r\n\t\tthis.registerTableOption(\"ajaxRequesting\", function(){});\r\n\t\tthis.registerTableOption(\"ajaxResponse\", false);\r\n\t\t\r\n\t\tthis.contentTypeFormatters = Ajax.contentTypeFormatters;\r\n\t}\r\n\t\r\n\t//initialize setup options\r\n\tinitialize(){\r\n\t\tthis.loaderPromise = this.table.options.ajaxRequestFunc || Ajax.defaultLoaderPromise;\r\n\t\tthis.urlGenerator = this.table.options.ajaxURLGenerator || Ajax.defaultURLGenerator;\r\n\t\t\r\n\t\tif(this.table.options.ajaxURL){\r\n\t\t\tthis.setUrl(this.table.options.ajaxURL);\r\n\t\t}\r\n\r\n\r\n\t\tthis.setDefaultConfig(this.table.options.ajaxConfig);\r\n\t\t\r\n\t\tthis.registerTableFunction(\"getAjaxUrl\", this.getUrl.bind(this));\r\n\t\t\r\n\t\tthis.subscribe(\"data-loading\", this.requestDataCheck.bind(this));\r\n\t\tthis.subscribe(\"data-params\", this.requestParams.bind(this));\r\n\t\tthis.subscribe(\"data-load\", this.requestData.bind(this));\r\n\t}\r\n\t\r\n\trequestParams(data, config, silent, params){\r\n\t\tvar ajaxParams = this.table.options.ajaxParams;\r\n\t\t\r\n\t\tif(ajaxParams){\r\n\t\t\tif(typeof ajaxParams === \"function\"){\r\n\t\t\t\tajaxParams = ajaxParams.call(this.table);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tparams = Object.assign(params, ajaxParams);\r\n\t\t}\t\t\r\n\t\t\r\n\t\treturn params;\r\n\t}\r\n\t\r\n\trequestDataCheck(data, params, config, silent){\r\n\t\treturn !!((!data && this.url) || typeof data === \"string\");\r\n\t}\r\n\t\r\n\trequestData(url, params, config, silent, previousData){\r\n\t\tvar ajaxConfig;\r\n\t\t\r\n\t\tif(!previousData && this.requestDataCheck(url)){\r\n\t\t\tif(url){\r\n\t\t\t\tthis.setUrl(url);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tajaxConfig = this.generateConfig(config);\r\n\t\t\t\r\n\t\t\treturn this.sendRequest(this.url, params, ajaxConfig);\r\n\t\t}else{\r\n\t\t\treturn previousData;\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetDefaultConfig(config = {}){\r\n\t\tthis.config = Object.assign({}, Ajax.defaultConfig);\r\n\r\n\t\tif(typeof config == \"string\"){\r\n\t\t\tthis.config.method = config;\r\n\t\t}else{\r\n\t\t\tObject.assign(this.config, config);\r\n\t\t}\r\n\t}\r\n\t\r\n\t//load config object\r\n\tgenerateConfig(config = {}){\r\n\t\tvar ajaxConfig = Object.assign({}, this.config)\r\n\t\t\r\n\t\tif(typeof config == \"string\"){\r\n\t\t\tajaxConfig.method = config;\r\n\t\t}else{\r\n\t\t\tObject.assign(ajaxConfig, config);\r\n\t\t}\r\n\t\t\r\n\t\treturn ajaxConfig;\r\n\t}\r\n\t\r\n\t//set request url\r\n\tsetUrl(url){\r\n\t\tthis.url = url;\r\n\t}\r\n\t\r\n\t//get request url\r\n\tgetUrl(){\r\n\t\treturn this.url;\r\n\t}\r\n\t\r\n\t//send ajax request\r\n\tsendRequest(url, params, config){\r\n\t\tif(this.table.options.ajaxRequesting.call(this.table, url, params) !== false){\r\n\t\t\treturn this.loaderPromise(url, config, params)\r\n\t\t\t.then((data)=>{\r\n\t\t\t\tif(this.table.options.ajaxResponse){\r\n\t\t\t\t\tdata = this.table.options.ajaxResponse.call(this.table, url, params, data);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn data;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n}\r\n\r\nAjax.moduleName = \"ajax\";\r\n\r\n//load defaults\r\nAjax.defaultConfig = defaultConfig;\r\nAjax.defaultURLGenerator = defaultURLGenerator;\r\nAjax.defaultLoaderPromise = defaultLoaderPromise;\r\nAjax.contentTypeFormatters = defaultContentTypeFormatters;\r\n\r\nexport default Ajax;","export default {\r\n\tmethod: \"GET\",\r\n};","export default function(url, config, params){\r\n\tvar contentType;\r\n\r\n\treturn new Promise((resolve, reject) => {\r\n\t\t//set url\r\n\t\turl = this.urlGenerator.call(this.table, url, config, params);\r\n\r\n\t\t//set body content if not GET request\r\n\t\tif(config.method.toUpperCase() != \"GET\"){\r\n\t\t\tcontentType = typeof this.table.options.ajaxContentType === \"object\" ? this.table.options.ajaxContentType : this.contentTypeFormatters[this.table.options.ajaxContentType];\r\n\t\t\tif(contentType){\r\n\r\n\t\t\t\tfor(var key in contentType.headers){\r\n\t\t\t\t\tif(!config.headers){\r\n\t\t\t\t\t\tconfig.headers = {};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(typeof config.headers[key] === \"undefined\"){\r\n\t\t\t\t\t\tconfig.headers[key] = contentType.headers[key];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconfig.body = contentType.body.call(this, url, config, params);\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Ajax Error - Invalid ajaxContentType value:\", this.table.options.ajaxContentType);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(url){\r\n\t\t\t//configure headers\r\n\t\t\tif(typeof config.headers === \"undefined\"){\r\n\t\t\t\tconfig.headers = {};\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.headers.Accept === \"undefined\"){\r\n\t\t\t\tconfig.headers.Accept = \"application/json\";\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.headers[\"X-Requested-With\"] === \"undefined\"){\r\n\t\t\t\tconfig.headers[\"X-Requested-With\"] = \"XMLHttpRequest\";\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.mode === \"undefined\"){\r\n\t\t\t\tconfig.mode = \"cors\";\r\n\t\t\t}\r\n\r\n\t\t\tif(config.mode == \"cors\"){\r\n\t\t\t\tif(typeof config.headers[\"Origin\"] === \"undefined\"){\r\n\t\t\t\t\tconfig.headers[\"Origin\"] = window.location.origin;\r\n\t\t\t\t}\r\n \r\n\t\t\t\tif(typeof config.credentials === \"undefined\"){\r\n\t\t\t\t\tconfig.credentials = 'same-origin';\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(typeof config.credentials === \"undefined\"){\r\n\t\t\t\t\tconfig.credentials = 'include';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//send request\r\n\t\t\tfetch(url, config)\r\n\t\t\t.then((response)=>{\r\n\t\t\t\tif(response.ok) {\r\n\t\t\t\t\tresponse.json()\r\n\t\t\t\t\t.then((data)=>{\r\n\t\t\t\t\t\tresolve(data);\r\n\t\t\t\t\t}).catch((error)=>{\r\n\t\t\t\t\t\treject(error);\r\n\t\t\t\t\t\tconsole.warn(\"Ajax Load Error - Invalid JSON returned\", error);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \" + response.status, response.statusText);\r\n\t\t\t\t\treject(response);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.catch((error)=>{\r\n\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \", error);\r\n\t\t\t\treject(error);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Ajax Load Error - No URL Set\");\r\n\t\t\tresolve([]);\r\n\t\t}\r\n\t});\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultPasteActions from './defaults/pasteActions.js';\r\nimport defaultPasteParsers from './defaults/pasteParsers.js';\r\n\r\nclass Clipboard extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.mode = true;\r\n\t\tthis.pasteParser = function(){};\r\n\t\tthis.pasteAction = function(){};\r\n\t\tthis.customSelection = false;\r\n\t\tthis.rowRange = false;\r\n\t\tthis.blocked = true; //block copy actions not originating from this command\r\n\r\n\t\tthis.registerTableOption(\"clipboard\", false); //enable clipboard\r\n\t\tthis.registerTableOption(\"clipboardCopyStyled\", true); //formatted table data\r\n\t\tthis.registerTableOption(\"clipboardCopyConfig\", false); //clipboard config\r\n\t\tthis.registerTableOption(\"clipboardCopyFormatter\", false); //DEPRICATED - REMOVE in 5.0\r\n\t\tthis.registerTableOption(\"clipboardCopyRowRange\", \"active\"); //restrict clipboard to visible rows only\r\n\t\tthis.registerTableOption(\"clipboardPasteParser\", \"table\"); //convert pasted clipboard data to rows\r\n\t\tthis.registerTableOption(\"clipboardPasteAction\", \"insert\"); //how to insert pasted data into the table\r\n\r\n\t\tthis.registerColumnOption(\"clipboard\");\r\n\t\tthis.registerColumnOption(\"titleClipboard\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.mode = this.table.options.clipboard;\r\n\r\n\t\tthis.rowRange = this.table.options.clipboardCopyRowRange;\r\n\r\n\t\tif(this.mode === true || this.mode === \"copy\"){\r\n\t\t\tthis.table.element.addEventListener(\"copy\", (e) => {\r\n\t\t\t\tvar plain, html, list;\r\n\r\n\t\t\t\tif(!this.blocked){\r\n\t\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\t\tif(this.customSelection){\r\n\t\t\t\t\t\tplain = this.customSelection;\r\n\r\n\t\t\t\t\t\tif(this.table.options.clipboardCopyFormatter){\r\n\t\t\t\t\t\t\tplain = this.table.options.clipboardCopyFormatter(\"plain\", plain);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\r\n\t\t\t\t\t\tvar list = this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig, this.table.options.clipboardCopyStyled, this.rowRange, \"clipboard\");\r\n\r\n\t\t\t\t\t\thtml = this.table.modules.export.genereateHTMLTable(list);\r\n\t\t\t\t\t\tplain = html ? this.generatePlainContent(list) : \"\";\r\n\r\n\t\t\t\t\t\tif(this.table.options.clipboardCopyFormatter){\r\n\t\t\t\t\t\t\tplain = this.table.options.clipboardCopyFormatter(\"plain\", plain);\r\n\t\t\t\t\t\t\thtml = this.table.options.clipboardCopyFormatter(\"html\", html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (window.clipboardData && window.clipboardData.setData) {\r\n\t\t\t\t\t\twindow.clipboardData.setData('Text', plain);\r\n\t\t\t\t\t} else if (e.clipboardData && e.clipboardData.setData) {\r\n\t\t\t\t\t\te.clipboardData.setData('text/plain', plain);\r\n\t\t\t\t\t\tif(html){\r\n\t\t\t\t\t\t\te.clipboardData.setData('text/html', html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (e.originalEvent && e.originalEvent.clipboardData.setData) {\r\n\t\t\t\t\t\te.originalEvent.clipboardData.setData('text/plain', plain);\r\n\t\t\t\t\t\tif(html){\r\n\t\t\t\t\t\t\te.originalEvent.clipboardData.setData('text/html', html);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.dispatchExternal(\"clipboardCopied\", plain, html);\r\n\r\n\t\t\t\t\tthis.reset();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.mode === true || this.mode === \"paste\"){\r\n\t\t\tthis.table.element.addEventListener(\"paste\", (e) => {\r\n\t\t\t\tthis.paste(e);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.setPasteParser(this.table.options.clipboardPasteParser);\r\n\t\tthis.setPasteAction(this.table.options.clipboardPasteAction);\r\n\r\n\t\tthis.registerTableFunction(\"copyToClipboard\", this.copy.bind(this));\r\n\t}\r\n\r\n\treset(){\r\n\t\tthis.blocked = true;\r\n\t\tthis.customSelection = false;\r\n\t}\r\n\r\n\tgeneratePlainContent (list) {\r\n\t\tvar output = [];\r\n\r\n\t\tlist.forEach((row) => {\r\n\t\t\tvar rowData = [];\r\n\r\n\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\tvar value = \"\";\r\n\r\n\t\t\t\tif(col){\r\n\r\n\t\t\t\t\tif(row.type === \"group\"){\r\n\t\t\t\t\t\tcol.value = col.component.getKey();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(col.value === null){\r\n\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\t\tvalue = JSON.stringify(col.value);\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tvalue = col.value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowData.push(value);\r\n\t\t\t});\r\n\r\n\t\t\toutput.push(rowData.join(\"\\t\"));\r\n\t\t});\r\n\r\n\t\treturn output.join(\"\\n\");\r\n\t}\r\n\r\n\tcopy (range, internal) {\r\n\t\tvar range, sel, textRange;\r\n\t\tthis.blocked = false;\r\n\t\tthis.customSelection = false;\r\n\r\n\t\tif (this.mode === true || this.mode === \"copy\") {\r\n\r\n\t\t\tthis.rowRange = range || this.table.options.clipboardCopyRowRange;\r\n\r\n\t\t\tif (typeof window.getSelection != \"undefined\" && typeof document.createRange != \"undefined\") {\r\n\t\t\t\trange = document.createRange();\r\n\t\t\t\trange.selectNodeContents(this.table.element);\r\n\t\t\t\tsel = window.getSelection();\r\n\r\n\t\t\t\tif (sel.toString() && internal) {\r\n\t\t\t\t\tthis.customSelection = sel.toString();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsel.removeAllRanges();\r\n\t\t\t\tsel.addRange(range);\r\n\t\t\t} else if (typeof document.selection != \"undefined\" && typeof document.body.createTextRange != \"undefined\") {\r\n\t\t\t\ttextRange = document.body.createTextRange();\r\n\t\t\t\ttextRange.moveToElementText(this.table.element);\r\n\t\t\t\ttextRange.select();\r\n\t\t\t}\r\n\r\n\t\t\tdocument.execCommand('copy');\r\n\r\n\t\t\tif (sel) {\r\n\t\t\t\tsel.removeAllRanges();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//PASTE EVENT HANDLING\r\n\tsetPasteAction(action){\r\n\r\n\t\tswitch(typeof action){\r\n\t\t\tcase \"string\":\r\n\t\t\tthis.pasteAction = Clipboard.pasteActions[action];\r\n\r\n\t\t\tif(!this.pasteAction){\r\n\t\t\t\tconsole.warn(\"Clipboard Error - No such paste action found:\", action);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tthis.pasteAction = action;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tsetPasteParser(parser){\r\n\t\tswitch(typeof parser){\r\n\t\t\tcase \"string\":\r\n\t\t\tthis.pasteParser = Clipboard.pasteParsers[parser];\r\n\r\n\t\t\tif(!this.pasteParser){\r\n\t\t\t\tconsole.warn(\"Clipboard Error - No such paste parser found:\", parser);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tthis.pasteParser = parser;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tpaste(e){\r\n\t\tvar data, rowData, rows;\r\n\r\n\t\tif(this.checkPaseOrigin(e)){\r\n\r\n\t\t\tdata = this.getPasteData(e);\r\n\r\n\t\t\trowData = this.pasteParser.call(this, data);\r\n\r\n\t\t\tif(rowData){\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\t\t\trowData = this.mutateData(rowData);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trows = this.pasteAction.call(this, rowData);\r\n\r\n\t\t\t\tthis.dispatchExternal(\"clipboardPasted\", data, rowData, rows);\r\n\t\t\t}else{\r\n\t\t\t\tthis.dispatchExternal(\"clipboardPasteError\", data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmutateData(data){\r\n\t\tvar output = [];\r\n\r\n\t\tif(Array.isArray(data)){\r\n\t\t\tdata.forEach((row) => {\r\n\t\t\t\toutput.push(this.table.modules.mutator.transformRow(row, \"clipboard\"));\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\toutput = data;\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\r\n\tcheckPaseOrigin(e){\r\n\t\tvar valid = true;\r\n\r\n\t\tif(e.target.tagName != \"DIV\" || this.table.modules.edit.currentCell){\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\r\n\t\treturn valid;\r\n\t}\r\n\r\n\tgetPasteData(e){\r\n\t\tvar data;\r\n\r\n\t\tif (window.clipboardData && window.clipboardData.getData) {\r\n\t\t\tdata = window.clipboardData.getData('Text');\r\n\t\t} else if (e.clipboardData && e.clipboardData.getData) {\r\n\t\t\tdata = e.clipboardData.getData('text/plain');\r\n\t\t} else if (e.originalEvent && e.originalEvent.clipboardData.getData) {\r\n\t\t\tdata = e.originalEvent.clipboardData.getData('text/plain');\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n}\r\n\r\nClipboard.moduleName = \"clipboard\";\r\n\r\n//load defaults\r\nClipboard.pasteActions = defaultPasteActions;\r\nClipboard.pasteParsers = defaultPasteParsers;\r\n\r\nexport default Clipboard;","export default {\r\n\treplace:function(rows){\r\n\t\treturn this.table.setData(rows);\r\n\t},\r\n\tupdate:function(rows){\r\n\t\treturn this.table.updateOrAddData(rows);\r\n\t},\r\n\tinsert:function(rows){\r\n\t\treturn this.table.addData(rows);\r\n\t},\r\n};","export default {\r\n\ttable:function(clipboard){\r\n\t\tvar data = [],\r\n\t\tsuccess = false,\r\n\t\theaderFindSuccess = true,\r\n\t\tcolumns = this.table.columnManager.columns,\r\n\t\tcolumnMap = [],\r\n\t\trows = [];\r\n\r\n\t\t//get data from clipboard into array of columns and rows.\r\n\t\tclipboard = clipboard.split(\"\\n\");\r\n\r\n\t\tclipboard.forEach(function(row){\r\n\t\t\tdata.push(row.split(\"\\t\"));\r\n\t\t});\r\n\r\n\t\tif(data.length && !(data.length === 1 && data[0].length < 2)){\r\n\t\t\tsuccess = true;\r\n\r\n\t\t\t//check if headers are present by title\r\n\t\t\tdata[0].forEach(function(value){\r\n\t\t\t\tvar column = columns.find(function(column){\r\n\t\t\t\t\treturn value && column.definition.title && value.trim() && column.definition.title.trim() === value.trim();\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tcolumnMap.push(column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\theaderFindSuccess = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t//check if column headers are present by field\r\n\t\t\tif(!headerFindSuccess){\r\n\t\t\t\theaderFindSuccess = true;\r\n\t\t\t\tcolumnMap = [];\r\n\r\n\t\t\t\tdata[0].forEach(function(value){\r\n\t\t\t\t\tvar column = columns.find(function(column){\r\n\t\t\t\t\t\treturn value && column.field && value.trim() && column.field.trim() === value.trim();\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(column){\r\n\t\t\t\t\t\tcolumnMap.push(column);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\theaderFindSuccess = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(!headerFindSuccess){\r\n\t\t\t\t\tcolumnMap = this.table.columnManager.columnsByIndex;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//remove header row if found\r\n\t\t\tif(headerFindSuccess){\r\n\t\t\t\tdata.shift();\r\n\t\t\t}\r\n\r\n\t\t\tdata.forEach(function(item){\r\n\t\t\t\tvar row = {};\r\n\r\n\t\t\t\titem.forEach(function(value, i){\r\n\t\t\t\t\tif(columnMap[i]){\r\n\t\t\t\t\t\trow[columnMap[i].field] = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\trows.push(row);\r\n\t\t\t});\r\n\r\n\t\t\treturn rows;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n};","class CalcComponent{\r\n\tconstructor (row){\r\n\t\tthis._row = row;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._row.table.componentFunctionBinder.handle(\"row\", target._row, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\treturn this._row.getData(transform);\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._row.getElement();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._row.table;\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._row.getCells().forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar cell = this._row.getCell(column);\r\n\t\treturn cell ? cell.getComponent() : false;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._row;\r\n\t}\r\n}\r\n\r\nexport default CalcComponent;","//public cell object\r\nexport default class CellComponent {\r\n\r\n\tconstructor (cell){\r\n\t\tthis._cell = cell;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._cell.table.componentFunctionBinder.handle(\"cell\", target._cell, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetValue(){\r\n\t\treturn this._cell.getValue();\r\n\t}\r\n\r\n\tgetOldValue(){\r\n\t\treturn this._cell.getOldValue();\r\n\t}\r\n\r\n\tgetInitialValue(){\r\n\t\treturn this._cell.initialValue;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._cell.getElement();\r\n\t}\r\n\r\n\tgetRow(){\r\n\t\treturn this._cell.row.getComponent();\r\n\t}\r\n\r\n\tgetData(){\r\n\t\treturn this._cell.row.getData();\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._cell.column.getField();\r\n\t}\r\n\r\n\tgetColumn(){\r\n\t\treturn this._cell.column.getComponent();\r\n\t}\r\n\r\n\tsetValue(value, mutate){\r\n\t\tif(typeof mutate == \"undefined\"){\r\n\t\t\tmutate = true;\r\n\t\t}\r\n\r\n\t\tthis._cell.setValue(value, mutate);\r\n\t}\r\n\r\n\trestoreOldValue(){\r\n\t\tthis._cell.setValueActual(this._cell.getOldValue());\r\n\t}\r\n\r\n\trestoreInitialValue(){\r\n\t\tthis._cell.setValueActual(this._cell.initialValue);\r\n\t}\r\n\r\n\tcheckHeight(){\r\n\t\tthis._cell.checkHeight();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._cell.table;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._cell;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport CellComponent from './CellComponent.js';\r\n\r\nexport default class Cell extends CoreFeature{\r\n\tconstructor(column, row){\r\n\t\tsuper(column.table);\r\n\r\n\t\tthis.table = column.table;\r\n\t\tthis.column = column;\r\n\t\tthis.row = row;\r\n\t\tthis.element = null;\r\n\t\tthis.value = null;\r\n\t\tthis.initialValue;\r\n\t\tthis.oldValue = null;\r\n\t\tthis.modules = {};\r\n\r\n\t\tthis.height = null;\r\n\t\tthis.width = null;\r\n\t\tthis.minWidth = null;\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\tthis.loaded = false; //track if the cell has been added to the DOM yet\r\n\r\n\t\tthis.build();\r\n\t}\r\n\r\n\t//////////////// Setup Functions /////////////////\r\n\t//generate element\r\n\tbuild(){\r\n\t\tthis.generateElement();\r\n\r\n\t\tthis.setWidth();\r\n\r\n\t\tthis._configureCell();\r\n\r\n\t\tthis.setValueActual(this.column.getFieldValue(this.row.data));\r\n\r\n\t\tthis.initialValue = this.value;\r\n\t}\r\n\r\n\tgenerateElement(){\r\n\t\tthis.element = document.createElement('div');\r\n\t\tthis.element.className = \"tabulator-cell\";\r\n\t\tthis.element.setAttribute(\"role\", \"gridcell\");\r\n\t\tthis.element = this.element;\r\n\t}\r\n\r\n\t_configureCell(){\r\n\t\tvar element = this.element,\r\n\t\tfield = this.column.getField(),\r\n\t\tvertAligns = {\r\n\t\t\ttop:\"flex-start\",\r\n\t\t\tbottom:\"flex-end\",\r\n\t\t\tmiddle:\"center\",\r\n\t\t},\r\n\t\thozAligns = {\r\n\t\t\tleft:\"flex-start\",\r\n\t\t\tright:\"flex-end\",\r\n\t\t\tcenter:\"center\",\r\n\t\t};\r\n\r\n\t\t//set text alignment\r\n\t\telement.style.textAlign = this.column.hozAlign;\r\n\r\n\t\tif(this.column.vertAlign){\r\n\t\t\telement.style.display = \"inline-flex\";\r\n\r\n\t\t\telement.style.alignItems = vertAligns[this.column.vertAlign] || \"\";\r\n\r\n\t\t\tif(this.column.hozAlign){\r\n\t\t\t\telement.style.justifyContent = hozAligns[this.column.hozAlign] || \"\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(field){\r\n\t\t\telement.setAttribute(\"tabulator-field\", field);\r\n\t\t}\r\n\r\n\t\t//add class to cell if needed\r\n\t\tif(this.column.definition.cssClass){\r\n\t\t\tvar classNames = this.column.definition.cssClass.split(\" \")\r\n\t\t\tclassNames.forEach((className) => {\r\n\t\t\t\telement.classList.add(className)\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t//update tooltip on mouse enter\r\n\t\tif (this.table.options.tooltipGenerationMode === \"hover\"){\r\n\t\t\telement.addEventListener(\"mouseenter\", (e) => {\r\n\t\t\t\tthis._generateTooltip();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"cell-init\", this);\r\n\r\n\t\t//hide cell if not visible\r\n\t\tif(!this.column.visible){\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\r\n\t//generate cell contents\r\n\t_generateContents(){\r\n\t\tvar val;\r\n\r\n\t\tval = this.chain(\"cell-format\", this, null, () => {\r\n\t\t\treturn this.element.innerHTML = this.value;\r\n\t\t});\r\n\r\n\t\tswitch(typeof val){\r\n\t\t\tcase \"object\":\r\n\t\t\tif(val instanceof Node){\r\n\r\n\t\t\t\t//clear previous cell contents\r\n\t\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\t\tthis.element.appendChild(val);\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.innerHTML = \"\";\r\n\r\n\t\t\t\tif(val != null){\r\n\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);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\tcase \"null\":\r\n\t\t\tthis.element.innerHTML = \"\";\r\n\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\tthis.element.innerHTML = val;\r\n\t\t}\r\n\t}\r\n\r\n\tcellRendered(){\r\n\t\tthis.dispatch(\"cell-rendered\", this);\r\n\t}\r\n\r\n\t//generate tooltip text\r\n\t_generateTooltip(){\r\n\t\tvar tooltip = this.column.tooltip;\r\n\r\n\t\tif(tooltip){\r\n\t\t\tif(tooltip === true){\r\n\t\t\t\ttooltip = this.value;\r\n\t\t\t}else if(typeof(tooltip) == \"function\"){\r\n\t\t\t\ttooltip = tooltip(this.getComponent());\r\n\r\n\t\t\t\tif(tooltip === false){\r\n\t\t\t\t\ttooltip = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof tooltip === \"undefined\"){\r\n\t\t\t\ttooltip = \"\";\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.setAttribute(\"title\", tooltip);\r\n\t\t}else{\r\n\t\t\tthis.element.setAttribute(\"title\", \"\");\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////////// Getters ////////////////////\r\n\tgetElement(containerOnly){\r\n\t\tif(!this.loaded){\r\n\t\t\tthis.loaded = true;\r\n\t\t\tif(!containerOnly){\r\n\t\t\t\tthis.layoutElement();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tgetValue(){\r\n\t\treturn this.value;\r\n\t}\r\n\r\n\tgetOldValue(){\r\n\t\treturn this.oldValue;\r\n\t}\r\n\r\n\t//////////////////// Actions ////////////////////\r\n\tsetValue(value, mutate){\r\n\t\tvar changed = this.setValueProcessData(value, mutate);\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.dispatch(\"cell-value-updated\", this);\r\n\r\n\t\t\tthis.cellRendered();\r\n\r\n\t\t\tif(this.column.definition.cellEdited){\r\n\t\t\t\tthis.column.definition.cellEdited.call(this.table, this.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"cellEdited\", this.getComponent());\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tsetValueProcessData(value, mutate){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(this.value !== value){\r\n\r\n\t\t\tchanged = true;\r\n\r\n\t\t\tif(mutate){\r\n\t\t\t\tvalue = this.chain(\"cell-value-changing\", [this, value], null, value);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.setValueActual(value);\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.dispatch(\"cell-value-changed\", this);\r\n\t\t}\r\n\r\n\t\treturn changed;\r\n\t}\r\n\r\n\tsetValueActual(value){\r\n\t\tthis.oldValue = this.value;\r\n\r\n\t\tthis.value = value;\r\n\r\n\t\tthis.dispatch(\"cell-value-save-before\", this);\r\n\r\n\t\tthis.column.setFieldValue(this.row.data, value);\r\n\r\n\t\tthis.dispatch(\"cell-value-save-after\", this);\r\n\r\n\t\tif(this.loaded){\r\n\t\t\tthis.layoutElement();\r\n\t\t}\r\n\t}\r\n\r\n\tlayoutElement(){\r\n\t\tthis._generateContents();\r\n\t\tthis._generateTooltip();\r\n\r\n\t\tthis.dispatch(\"cell-layout\", this);\r\n\t}\r\n\r\n\tsetWidth(){\r\n\t\tthis.width = this.column.width;\r\n\t\tthis.element.style.width = this.column.widthStyled;\r\n\t}\r\n\r\n\tclearWidth(){\r\n\t\tthis.width = \"\";\r\n\t\tthis.element.style.width = \"\";\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\treturn this.width || this.element.offsetWidth;\r\n\t}\r\n\r\n\tsetMinWidth(){\r\n\t\tthis.minWidth = this.column.minWidth;\r\n\t\tthis.element.style.minWidth = this.column.minWidthStyled;\r\n\t}\r\n\r\n\tsetMaxWidth(){\r\n\t\tthis.maxWidth = this.column.maxWidth;\r\n\t\tthis.element.style.maxWidth = this.column.maxWidthStyled;\r\n\t}\r\n\r\n\tcheckHeight(){\r\n\t\t// var height = this.element.css(\"height\");\r\n\t\tthis.row.reinitializeHeight();\r\n\t}\r\n\r\n\tclearHeight(){\r\n\t\tthis.element.style.height = \"\";\r\n\t\tthis.height = null;\r\n\t}\r\n\r\n\tsetHeight(){\r\n\t\tthis.height = this.row.height;\r\n\t\tthis.element.style.height = this.row.heightStyled;\r\n\t}\r\n\r\n\tgetHeight(){\r\n\t\treturn this.height || this.element.offsetHeight;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tthis.element.style.display = this.column.vertAlign ? \"inline-flex\" : \"\";\r\n\t}\r\n\r\n\thide(){\r\n\t\tthis.element.style.display = \"none\";\r\n\t}\r\n\r\n\tdelete(){\r\n\t\tthis.dispatch(\"cell-delete\", this);\r\n\r\n\t\tif(!this.table.rowManager.redrawBlock && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.column.deleteCell(this);\r\n\t\tthis.row.deleteCell(this);\r\n\t\tthis.calcs = {};\r\n\t}\r\n\r\n\tgetIndex(){\r\n\t\treturn this.row.getCellIndex(this);\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new CellComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}","import Column from './Column.js';\r\n\r\n//public column object\r\nexport default class ColumnComponent {\r\n\tconstructor (column){\r\n\t\tthis._column = column;\r\n\t\tthis.type = \"ColumnComponent\";\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._column.table.componentFunctionBinder.handle(\"column\", target._column, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._column.getElement();\r\n\t}\r\n\r\n\tgetDefinition(){\r\n\t\treturn this._column.getDefinition();\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._column.getField();\r\n\t}\r\n\r\n\tgetTitleDownload() {\r\n\t\treturn this._column.getTitleDownload();\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._column.cells.forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tisVisible(){\r\n\t\treturn this._column.visible;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tif(this._column.isGroup){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\tcolumn.show();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis._column.show();\r\n\t\t}\r\n\t}\r\n\r\n\thide(){\r\n\t\tif(this._column.isGroup){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\tcolumn.hide();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis._column.hide();\r\n\t\t}\r\n\t}\r\n\r\n\ttoggle(){\r\n\t\tif(this._column.visible){\r\n\t\t\tthis.hide();\r\n\t\t}else{\r\n\t\t\tthis.show();\r\n\t\t}\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn this._column.delete();\r\n\t}\r\n\r\n\tgetSubColumns(){\r\n\t\tvar output = [];\r\n\r\n\t\tif(this._column.columns.length){\r\n\t\t\tthis._column.columns.forEach(function(column){\r\n\t\t\t\toutput.push(column.getComponent());\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetParentColumn(){\r\n\t\treturn this._column.parent instanceof Column ? this._column.parent.getComponent() : false;\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._column;\r\n\t}\r\n\r\n\tscrollTo(){\r\n\t\treturn this._column.table.columnManager.scrollToColumn(this._column);\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._column.table;\r\n\t}\r\n\r\n\tmove(to, after){\r\n\t\tvar toColumn = this._column.table.columnManager.findColumn(to);\r\n\r\n\t\tif(toColumn){\r\n\t\t\tthis._column.table.columnManager.moveColumn(this._column, toColumn, after)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching column found:\", toColumn);\r\n\t\t}\r\n\t}\r\n\r\n\tgetNextColumn(){\r\n\t\tvar nextCol = this._column.nextColumn();\r\n\r\n\t\treturn nextCol ? nextCol.getComponent() : false;\r\n\t}\r\n\r\n\tgetPrevColumn(){\r\n\t\tvar prevCol = this._column.prevColumn();\r\n\r\n\t\treturn prevCol ? prevCol.getComponent() : false;\r\n\t}\r\n\r\n\tupdateDefinition(updates){\r\n\t\treturn this._column.updateDefinition(updates);\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\treturn this._column.getWidth();\r\n\t}\r\n\r\n\tsetWidth(width){\r\n\t\tvar result;\r\n\r\n\t\tif(width === true){\r\n\t\t\tresult = this._column.reinitializeWidth(true);\r\n\t\t}else{\r\n\t\t\tresult = this._column.setWidth(width);\r\n\t\t}\r\n\r\n\t\tthis._column.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\treturn result;\r\n\t}\r\n}","export default {\r\n\t\"title\": undefined,\r\n\t\"field\": undefined,\r\n\t\"columns\": undefined,\r\n\t\"visible\": undefined,\r\n\t\"hozAlign\": undefined,\r\n\t\"vertAlign\": undefined,\r\n\t\"width\": undefined,\r\n\t\"minWidth\": 40,\r\n\t\"maxWidth\": undefined,\r\n\t\"maxInitialWidth\": undefined,\r\n\t\"tooltip\": undefined,\r\n\t\"cssClass\": undefined,\r\n\t\"variableHeight\": undefined,\r\n\t\"headerTooltip\": undefined,\r\n\t\"headerVertical\": undefined,\r\n\t\"headerHozAlign\": undefined,\r\n\t\"editableTitle\": undefined,\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport ColumnComponent from './ColumnComponent.js';\r\nimport defaultOptions from './defaults/options.js';\r\n\r\nimport Cell from '../cell/Cell.js';\r\n\r\nclass Column extends CoreFeature{\r\n\r\n\tconstructor(def, parent){\r\n\t\tsuper(parent.table);\r\n\r\n\t\tthis.definition = def; //column definition\r\n\t\tthis.parent = parent; //hold parent object\r\n\t\tthis.type = \"column\"; //type of element\r\n\t\tthis.columns = []; //child columns\r\n\t\tthis.cells = []; //cells bound to this column\r\n\t\tthis.element = this.createElement(); //column header element\r\n\t\tthis.contentElement = false;\r\n\t\tthis.titleHolderElement = false;\r\n\t\tthis.titleElement = false;\r\n\t\tthis.groupElement = this.createGroupElement(); //column group holder element\r\n\t\tthis.isGroup = false;\r\n\t\tthis.tooltip = false; //hold column tooltip\r\n\t\tthis.hozAlign = \"\"; //horizontal text alignment\r\n\t\tthis.vertAlign = \"\"; //vert text alignment\r\n\r\n\t\t//multi dimensional filed handling\r\n\t\tthis.field =\"\";\r\n\t\tthis.fieldStructure = \"\";\r\n\t\tthis.getFieldValue = \"\";\r\n\t\tthis.setFieldValue = \"\";\r\n\r\n\t\tthis.titleDownload = null;\r\n\t\tthis.titleFormatterRendered = false;\r\n\r\n\t\tthis.mapDefinitions();\r\n\r\n\t\tthis.setField(this.definition.field);\r\n\r\n\t\tthis.modules = {}; //hold module variables;\r\n\r\n\t\tthis.width = null; //column width\r\n\t\tthis.widthStyled = \"\"; //column width prestyled to improve render efficiency\r\n\t\tthis.maxWidth = null; //column maximum width\r\n\t\tthis.maxWidthStyled = \"\"; //column maximum prestyled to improve render efficiency\r\n\t\tthis.maxInitialWidth = null;\r\n\t\tthis.minWidth = null; //column minimum width\r\n\t\tthis.minWidthStyled = \"\"; //column minimum prestyled to improve render efficiency\r\n\t\tthis.widthFixed = false; //user has specified a width for this column\r\n\r\n\t\tthis.visible = true; //default visible state\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\t//initialize column\r\n\t\tif(this.definition.columns){\r\n\r\n\t\t\tthis.isGroup = true;\r\n\r\n\t\t\tthis.definition.columns.forEach((def, i) => {\r\n\t\t\t\tvar newCol = new Column(def, this);\r\n\t\t\t\tthis.attachColumn(newCol);\r\n\t\t\t});\r\n\r\n\t\t\tthis.checkColumnVisibility();\r\n\t\t}else{\r\n\t\t\tparent.registerColumnField(this);\r\n\t\t}\r\n\r\n\t\tthis._initialize();\r\n\r\n\t\tthis.bindModuleColumns();\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-col\");\r\n\t\tel.setAttribute(\"role\", \"columnheader\");\r\n\t\tel.setAttribute(\"aria-sort\", \"none\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateGroupElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-col-group-cols\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tmapDefinitions(){\r\n\t\tvar defaults = this.table.options.columnDefaults;\r\n\r\n\t\t//map columnDefaults onto column definitions\r\n\t\tif(defaults){\r\n\t\t\tfor(let key in defaults){\r\n\t\t\t\tif(typeof this.definition[key] === \"undefined\"){\r\n\t\t\t\t\tthis.definition[key] = defaults[key];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.definition = this.table.columnManager.optionsList.generate(Column.defaultOptionList, this.definition)\r\n\t}\r\n\r\n\tcheckDefinition(){\r\n\t\tObject.keys(this.definition).forEach((key) => {\r\n\t\t\tif(Column.defaultOptionList.indexOf(key) === -1){\r\n\t\t\t\tconsole.warn(\"Invalid column definition option in '\" + (this.field || this.definition.title) + \"' column:\", key)\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tsetField(field){\r\n\t\tthis.field = field;\r\n\t\tthis.fieldStructure = field ? (this.table.options.nestedFieldSeparator ? field.split(this.table.options.nestedFieldSeparator) : [field]) : [];\r\n\t\tthis.getFieldValue = this.fieldStructure.length > 1 ? this._getNestedData : this._getFlatData;\r\n\t\tthis.setFieldValue = this.fieldStructure.length > 1 ? this._setNestedData : this._setFlatData;\r\n\t}\r\n\r\n\t//register column position with column manager\r\n\tregisterColumnPosition(column){\r\n\t\tthis.parent.registerColumnPosition(column);\r\n\t}\r\n\r\n\t//register column position with column manager\r\n\tregisterColumnField(column){\r\n\t\tthis.parent.registerColumnField(column);\r\n\t}\r\n\r\n\t//trigger position registration\r\n\treRegisterPosition(){\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tcolumn.reRegisterPosition();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis.registerColumnPosition(this);\r\n\t\t}\r\n\t}\r\n\r\n\t_mapDepricatedFunctionality(){\r\n\t\t//all previously deprecated functionality removed in the 5.0 release\r\n\t}\r\n\r\n\tsetTooltip(){\r\n\t\tvar def = this.definition;\r\n\r\n\t\t//set header tooltips\r\n\t\tvar tooltip = def.headerTooltip;\r\n\r\n\t\tif(tooltip){\r\n\t\t\tif(tooltip === true){\r\n\t\t\t\tif(def.field){\r\n\t\t\t\t\tthis.langBind(\"columns|\" + def.field, (value) => {\r\n\t\t\t\t\t\tthis.element.setAttribute(\"title\", value || def.title);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.element.setAttribute(\"title\", def.title);\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tif(typeof(tooltip) == \"function\"){\r\n\t\t\t\t\ttooltip = tooltip(this.getComponent());\r\n\r\n\t\t\t\t\tif(tooltip === false){\r\n\t\t\t\t\t\ttooltip = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.element.setAttribute(\"title\", tooltip);\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tthis.element.setAttribute(\"title\", \"\");\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element\r\n\t_initialize(){\r\n\t\tvar def = this.definition;\r\n\r\n\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\tif(def.headerVertical){\r\n\t\t\tthis.element.classList.add(\"tabulator-col-vertical\");\r\n\r\n\t\t\tif(def.headerVertical === \"flip\"){\r\n\t\t\t\tthis.element.classList.add(\"tabulator-col-vertical-flip\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.contentElement = this._bindEvents();\r\n\r\n\t\tthis.contentElement = this._buildColumnHeaderContent();\r\n\r\n\t\tthis.element.appendChild(this.contentElement);\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis._buildGroupHeader();\r\n\t\t}else{\r\n\t\t\tthis._buildColumnHeader();\r\n\t\t}\r\n\r\n\t\tthis.setTooltip();\r\n\r\n\t\tthis.dispatch(\"column-init\", this);\r\n\r\n\t\t//update header tooltip on mouse enter\r\n\t\tthis.element.addEventListener(\"mouseenter\", (e) => {\r\n\t\t\tthis.setTooltip();\r\n\t\t});\r\n\t}\r\n\r\n\t_bindEvents(){\r\n\t\tvar def = this.definition,\r\n\t\tdblTap,\ttapHold, tap;\r\n\r\n\t\t//setup header click event bindings\r\n\t\tif(typeof(def.headerClick) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"click\", (e) => {def.headerClick(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerDblClick) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"dblclick\", (e) => {def.headerDblClick(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerContext) == \"function\"){\r\n\t\t\tthis.element.addEventListener(\"contextmenu\", (e) => {def.headerContext(e, this.getComponent());});\r\n\t\t}\r\n\r\n\t\t//setup header tap event bindings\r\n\t\tif(typeof(def.headerTap) == \"function\"){\r\n\t\t\ttap = false;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchstart\", (e) => {\r\n\t\t\t\ttap = true;\r\n\t\t\t}, {passive: true});\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\t\t\t\tif(tap){\r\n\t\t\t\t\tdef.headerTap(e, this.getComponent());\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttap = false;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerDblTap) == \"function\"){\r\n\t\t\tdblTap = null;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\r\n\t\t\t\tif(dblTap){\r\n\t\t\t\t\tclearTimeout(dblTap);\r\n\t\t\t\t\tdblTap = null;\r\n\r\n\t\t\t\t\tdef.headerDblTap(e, this.getComponent());\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tdblTap = setTimeout(() => {\r\n\t\t\t\t\t\tclearTimeout(dblTap);\r\n\t\t\t\t\t\tdblTap = null;\r\n\t\t\t\t\t}, 300);\r\n\t\t\t\t}\r\n\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(typeof(def.headerTapHold) == \"function\"){\r\n\t\t\ttapHold = null;\r\n\r\n\t\t\tthis.element.addEventListener(\"touchstart\", (e) => {\r\n\t\t\t\tclearTimeout(tapHold);\r\n\r\n\t\t\t\ttapHold = setTimeout(function(){\r\n\t\t\t\t\tclearTimeout(tapHold);\r\n\t\t\t\t\ttapHold = null;\r\n\t\t\t\t\ttap = false;\r\n\t\t\t\t\tdef.headerTapHold(e, this.getComponent());\r\n\t\t\t\t}, 1000);\r\n\r\n\t\t\t}, {passive: true});\r\n\r\n\t\t\tthis.element.addEventListener(\"touchend\", (e) => {\r\n\t\t\t\tclearTimeout(tapHold);\r\n\t\t\t\ttapHold = null;\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element for header\r\n\t_buildColumnHeader(){\r\n\t\tvar def = this.definition,\r\n\t\ttable = this.table;\r\n\r\n\t\tthis.dispatch(\"column-layout\", this);\r\n\r\n\t\t//set column visibility\r\n\t\tif(typeof def.visible != \"undefined\"){\r\n\t\t\tif(def.visible){\r\n\t\t\t\tthis.show(true);\r\n\t\t\t}else{\r\n\t\t\t\tthis.hide(true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//asign additional css classes to column header\r\n\t\tif(def.cssClass){\r\n\t\t\tvar classeNames = def.cssClass.split(\" \");\r\n\t\t\tclasseNames.forEach((className) => {\r\n\t\t\t\tthis.element.classList.add(className);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(def.field){\r\n\t\t\tthis.element.setAttribute(\"tabulator-field\", def.field);\r\n\t\t}\r\n\r\n\t\t//set min width if present\r\n\t\tthis.setMinWidth(parseInt(def.minWidth));\r\n\r\n\t\tif (def.maxInitialWidth) {\r\n\t\t\tthis.maxInitialWidth = parseInt(def.maxInitialWidth);\r\n\t\t}\r\n\t\t\r\n\t\tif(def.maxWidth){\r\n\t\t\tthis.setMaxWidth(parseInt(def.maxWidth));\r\n\t\t}\r\n\r\n\t\tthis.reinitializeWidth();\r\n\r\n\t\t//set tooltip if present\r\n\t\tthis.tooltip = this.definition.tooltip;\r\n\r\n\t\t//set orizontal text alignment\r\n\t\tthis.hozAlign = this.definition.hozAlign;\r\n\t\tthis.vertAlign = this.definition.vertAlign;\r\n\r\n\t\tthis.titleElement.style.textAlign = this.definition.headerHozAlign;\r\n\t}\r\n\r\n\t_buildColumnHeaderContent(){\r\n\t\tvar def = this.definition,\r\n\t\ttable = this.table;\r\n\r\n\t\tvar contentElement = document.createElement(\"div\");\r\n\t\tcontentElement.classList.add(\"tabulator-col-content\");\r\n\r\n\t\tthis.titleHolderElement = document.createElement(\"div\");\r\n\t\tthis.titleHolderElement.classList.add(\"tabulator-col-title-holder\");\r\n\r\n\t\tcontentElement.appendChild(this.titleHolderElement);\r\n\r\n\t\tthis.titleElement = this._buildColumnHeaderTitle();\r\n\r\n\t\tthis.titleHolderElement.appendChild(this.titleElement);\r\n\r\n\t\treturn contentElement;\r\n\t}\r\n\r\n\t//build title element of column\r\n\t_buildColumnHeaderTitle(){\r\n\t\tvar def = this.definition,\r\n\t\ttitle;\r\n\r\n\t\tvar titleHolderElement = document.createElement(\"div\");\r\n\t\ttitleHolderElement.classList.add(\"tabulator-col-title\");\r\n\r\n\t\tif(def.editableTitle){\r\n\t\t\tvar titleElement = document.createElement(\"input\");\r\n\t\t\ttitleElement.classList.add(\"tabulator-title-editor\");\r\n\r\n\t\t\ttitleElement.addEventListener(\"click\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\ttitleElement.focus();\r\n\t\t\t});\r\n\r\n\t\t\ttitleElement.addEventListener(\"change\", () => {\r\n\t\t\t\tdef.title = titleElement.value;\r\n\t\t\t\tthis.dispatchExternal(\"columnTitleChanged\", this.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\ttitleHolderElement.appendChild(titleElement);\r\n\r\n\t\t\tif(def.field){\r\n\t\t\t\tthis.langBind(\"columns|\" + def.field, (text) => {\r\n\t\t\t\t\ttitleElement.value = text || (def.title || \" \");\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\ttitleElement.value = def.title || \" \";\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tif(def.field){\r\n\t\t\t\tthis.langBind(\"columns|\" + def.field, (text) => {\r\n\t\t\t\t\tthis._formatColumnHeaderTitle(titleHolderElement, text || (def.title || \" \"));\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tthis._formatColumnHeaderTitle(titleHolderElement, def.title || \" \");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn titleHolderElement;\r\n\t}\r\n\r\n\t_formatColumnHeaderTitle(el, title){\r\n\t\tvar contents = this.chain(\"column-format\", [this, title, el], null, () => {\r\n\t\t\treturn title;\r\n\t\t});\r\n\r\n\t\tswitch(typeof contents){\r\n\t\t\tcase \"object\":\r\n\t\t\tif(contents instanceof Node){\r\n\t\t\t\tel.appendChild(contents);\r\n\t\t\t}else{\r\n\t\t\t\tel.innerHTML = \"\";\r\n\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);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\tcase \"null\":\r\n\t\t\tel.innerHTML = \"\";\r\n\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\tel.innerHTML = contents;\r\n\t\t}\r\n\t}\r\n\r\n\t//build header element for column group\r\n\t_buildGroupHeader(){\r\n\t\tthis.element.classList.add(\"tabulator-col-group\");\r\n\t\tthis.element.setAttribute(\"role\", \"columngroup\");\r\n\t\tthis.element.setAttribute(\"aria-title\", this.definition.title);\r\n\r\n\t\t//asign additional css classes to column header\r\n\t\tif(this.definition.cssClass){\r\n\t\t\tvar classeNames = this.definition.cssClass.split(\" \");\r\n\t\t\tclasseNames.forEach((className) => {\r\n\t\t\t\tthis.element.classList.add(className);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.titleElement.style.textAlign = this.definition.headerHozAlign;\r\n\r\n\t\tthis.element.appendChild(this.groupElement);\r\n\t}\r\n\r\n\t//flat field lookup\r\n\t_getFlatData(data){\r\n\t\treturn data[this.field];\r\n\t}\r\n\r\n\t//nested field lookup\r\n\t_getNestedData(data){\r\n\t\tvar dataObj = data,\r\n\t\tstructure = this.fieldStructure,\r\n\t\tlength = structure.length,\r\n\t\toutput;\r\n\r\n\t\tfor(let i = 0; i < length; i++){\r\n\r\n\t\t\tdataObj = dataObj[structure[i]];\r\n\r\n\t\t\toutput = dataObj;\r\n\r\n\t\t\tif(!dataObj){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//flat field set\r\n\t_setFlatData(data, value){\r\n\t\tif(this.field){\r\n\t\t\tdata[this.field] = value;\r\n\t\t}\r\n\t}\r\n\r\n\t//nested field set\r\n\t_setNestedData(data, value){\r\n\t\tvar dataObj = data,\r\n\t\tstructure = this.fieldStructure,\r\n\t\tlength = structure.length;\r\n\r\n\t\tfor(let i = 0; i < length; i++){\r\n\r\n\t\t\tif(i == length -1){\r\n\t\t\t\tdataObj[structure[i]] = value;\r\n\t\t\t}else{\r\n\t\t\t\tif(!dataObj[structure[i]]){\r\n\t\t\t\t\tif(typeof value !== \"undefined\"){\r\n\t\t\t\t\t\tdataObj[structure[i]] = {};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdataObj = dataObj[structure[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//attach column to this group\r\n\tattachColumn(column){\r\n\t\tif(this.groupElement){\r\n\t\t\tthis.columns.push(column);\r\n\t\t\tthis.groupElement.appendChild(column.getElement());\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Warning - Column being attached to another column instead of column group\");\r\n\t\t}\r\n\t}\r\n\r\n\t//vertically align header in column\r\n\tverticalAlign(alignment, height){\r\n\r\n\t\t//calculate height of column header and group holder element\r\n\t\tvar parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : (height || this.parent.getHeadersElement().clientHeight);\r\n\t\t// var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : this.parent.getHeadersElement().clientHeight;\r\n\r\n\t\tthis.element.style.height = parentHeight + \"px\";\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.groupElement.style.minHeight = (parentHeight - this.contentElement.offsetHeight) + \"px\";\r\n\t\t}\r\n\r\n\t\t//vertically align cell contents\r\n\t\tif(!this.isGroup && alignment !== \"top\"){\r\n\t\t\tif(alignment === \"bottom\"){\r\n\t\t\t\tthis.element.style.paddingTop = (this.element.clientHeight - this.contentElement.offsetHeight) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.paddingTop = ((this.element.clientHeight - this.contentElement.offsetHeight) / 2) + \"px\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.verticalAlign(alignment);\r\n\t\t});\r\n\t}\r\n\r\n\t//clear vertical alignmenet\r\n\tclearVerticalAlign(){\r\n\t\tthis.element.style.paddingTop = \"\";\r\n\t\tthis.element.style.height = \"\";\r\n\t\tthis.element.style.minHeight = \"\";\r\n\t\tthis.groupElement.style.minHeight = \"\";\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.clearVerticalAlign();\r\n\t\t});\r\n\t}\r\n\r\n\tbindModuleColumns (){\r\n\t\t//check if rownum formatter is being used on a column\r\n\t\tif(this.definition.formatter == \"rownum\"){\r\n\t\t\tthis.table.rowManager.rowNumColumn = this;\r\n\t\t}\r\n\t}\r\n\r\n\t//// Retreive Column Information ////\r\n\t//return column header element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\t//return colunm group element\r\n\tgetGroupElement(){\r\n\t\treturn this.groupElement;\r\n\t}\r\n\r\n\t//return field name\r\n\tgetField(){\r\n\t\treturn this.field;\r\n\t}\r\n\r\n\tgetTitleDownload() {\r\n\t\treturn this.titleDownload;\r\n\t}\r\n\r\n\t//return the first column in a group\r\n\tgetFirstColumn(){\r\n\t\tif(!this.isGroup){\r\n\t\t\treturn this;\r\n\t\t}else{\r\n\t\t\tif(this.columns.length){\r\n\t\t\t\treturn this.columns[0].getFirstColumn();\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//return the last column in a group\r\n\tgetLastColumn(){\r\n\t\tif(!this.isGroup){\r\n\t\t\treturn this;\r\n\t\t}else{\r\n\t\t\tif(this.columns.length){\r\n\t\t\t\treturn this.columns[this.columns.length -1].getLastColumn();\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//return all columns in a group\r\n\tgetColumns(){\r\n\t\treturn this.columns;\r\n\t}\r\n\r\n\t//return all columns in a group\r\n\tgetCells(){\r\n\t\treturn this.cells;\r\n\t}\r\n\r\n\t//retreive the top column in a group of columns\r\n\tgetTopColumn(){\r\n\t\tif(this.parent.isGroup){\r\n\t\t\treturn this.parent.getTopColumn();\r\n\t\t}else{\r\n\t\t\treturn this;\r\n\t\t}\r\n\t}\r\n\r\n\t//return column definition object\r\n\tgetDefinition(updateBranches){\r\n\t\tvar colDefs = [];\r\n\r\n\t\tif(this.isGroup && updateBranches){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tcolDefs.push(column.getDefinition(true));\r\n\t\t\t});\r\n\r\n\t\t\tthis.definition.columns = colDefs;\r\n\t\t}\r\n\r\n\t\treturn this.definition;\r\n\t}\r\n\r\n\t//////////////////// Actions ////////////////////\r\n\tcheckColumnVisibility(){\r\n\t\tvar visible = false;\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvisible = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(visible){\r\n\t\t\tthis.show();\r\n\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), false);\r\n\t\t}else{\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\r\n\t//show column\r\n\tshow(silent, responsiveToggle){\r\n\t\tif(!this.visible){\r\n\t\t\tthis.visible = true;\r\n\r\n\t\t\tthis.element.style.display = \"\";\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.checkColumnVisibility();\r\n\t\t\t}\r\n\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.show();\r\n\t\t\t});\r\n\r\n\t\t\tif(!this.isGroup && this.width === null){\r\n\t\t\t\tthis.reinitializeWidth();\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.columnManager.verticalAlignHeaders();\r\n\r\n\t\t\tthis.dispatch(\"column-show\", this, responsiveToggle);\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), true);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\r\n\t\t\tif(!this.silent){\r\n\t\t\t\tthis.table.columnManager.renderer.rerenderColumns();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//hide column\r\n\thide(silent, responsiveToggle){\r\n\t\tif(this.visible){\r\n\t\t\tthis.visible = false;\r\n\r\n\t\t\tthis.element.style.display = \"none\";\r\n\r\n\t\t\tthis.table.columnManager.verticalAlignHeaders();\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.checkColumnVisibility();\r\n\t\t\t}\r\n\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.hide();\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatch(\"column-hide\", this, responsiveToggle);\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), false);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\r\n\t\t\tif(!this.silent){\r\n\t\t\t\tthis.table.columnManager.renderer.rerenderColumns();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmatchChildWidths(){\r\n\t\tvar childWidth = 0;\r\n\r\n\t\tif(this.contentElement && this.columns.length){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tif(column.visible){\r\n\t\t\t\t\tchildWidth += column.getWidth();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.contentElement.style.maxWidth = (childWidth - 1) + \"px\";\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.matchChildWidths();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tremoveChild(child){\r\n\t\tvar index = this.columns.indexOf(child);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columns.splice(index, 1);\r\n\t\t}\r\n\r\n\t\tif(!this.columns.length){\r\n\t\t\tthis.delete();\r\n\t\t}\r\n\t}\r\n\r\n\tsetWidth(width){\r\n\t\tthis.widthFixed = true;\r\n\t\tthis.setWidthActual(width);\r\n\t}\r\n\r\n\tsetWidthActual(width){\r\n\t\tif(isNaN(width)){\r\n\t\t\twidth = Math.floor((this.table.element.clientWidth/100) * parseInt(width));\r\n\t\t}\r\n\r\n\t\twidth = Math.max(this.minWidth, width);\r\n\r\n\t\tif(this.maxWidth){\r\n\t\t\twidth = Math.min(this.maxWidth, width);\r\n\t\t}\r\n\r\n\t\tthis.width = width;\r\n\t\tthis.widthStyled = width ? width + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.width = this.widthStyled;\r\n\r\n\t\tif(!this.isGroup){\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tcell.setWidth();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.parent.isGroup){\r\n\t\t\tthis.parent.matchChildWidths();\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"column-width\", this);\r\n\t}\r\n\r\n\tcheckCellHeights(){\r\n\t\tvar rows = [];\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tif(cell.row.heightInitialized){\r\n\t\t\t\tif(cell.row.getElement().offsetParent !== null){\r\n\t\t\t\t\trows.push(cell.row);\r\n\t\t\t\t\tcell.row.clearCellHeight();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcell.row.heightInitialized = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\trow.calcHeight();\r\n\t\t});\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\trow.setCellHeight();\r\n\t\t});\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\tvar width = 0;\r\n\r\n\t\tif(this.isGroup){\r\n\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\tif(column.visible){\r\n\t\t\t\t\twidth += column.getWidth();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\twidth = this.width;\r\n\t\t}\r\n\r\n\t\treturn width;\r\n\t}\r\n\r\n\tgetHeight(){\r\n\t\treturn Math.ceil(this.element.getBoundingClientRect().height);\r\n\t}\r\n\r\n\tsetMinWidth(minWidth){\r\n\t\tthis.minWidth = minWidth;\r\n\t\tthis.minWidthStyled = minWidth ? minWidth + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.minWidth = this.minWidthStyled;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setMinWidth();\r\n\t\t});\r\n\t}\r\n\r\n\tsetMaxWidth(maxWidth){\r\n\t\tthis.maxWidth = maxWidth;\r\n\t\tthis.maxWidthStyled = maxWidth ? maxWidth + \"px\" : \"\";\r\n\r\n\t\tthis.element.style.maxWidth = this.maxWidthStyled;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setMaxWidth();\r\n\t\t});\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar index;\r\n\r\n\t\t\tif(this.isGroup){\r\n\t\t\t\tthis.columns.forEach(function(column){\r\n\t\t\t\t\tcolumn.delete();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"column-delete\", this);\r\n\r\n\t\t\tvar cellCount = this.cells.length;\r\n\r\n\t\t\tfor(let i = 0; i < cellCount; i++){\r\n\t\t\t\tthis.cells[0].delete();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.element.parentNode){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element = false;\r\n\t\t\tthis.contentElement = false;\r\n\t\t\tthis.titleElement = false;\r\n\t\t\tthis.groupElement = false;\r\n\r\n\t\t\tif(this.parent.isGroup){\r\n\t\t\t\tthis.parent.removeChild(this);\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.columnManager.deregisterColumn(this);\r\n\r\n\t\t\tthis.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\r\n\tcolumnRendered(){\r\n\t\tif(this.titleFormatterRendered){\r\n\t\t\tthis.titleFormatterRendered();\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\t//generate cell for this column\r\n\tgenerateCell(row){\r\n\t\tvar cell = new Cell(this, row);\r\n\r\n\t\tthis.cells.push(cell);\r\n\r\n\t\treturn cell;\r\n\t}\r\n\r\n\tnextColumn(){\r\n\t\tvar index = this.table.columnManager.findColumnIndex(this);\r\n\t\treturn index > -1 ? this._nextVisibleColumn(index + 1) : false;\r\n\t}\r\n\r\n\t_nextVisibleColumn(index){\r\n\t\tvar column = this.table.columnManager.getColumnByIndex(index);\r\n\t\treturn !column || column.visible ? column : this._nextVisibleColumn(index + 1);\r\n\t}\r\n\r\n\tprevColumn(){\r\n\t\tvar index = this.table.columnManager.findColumnIndex(this);\r\n\t\treturn index > -1 ? this._prevVisibleColumn(index - 1) : false;\r\n\t}\r\n\r\n\t_prevVisibleColumn(index){\r\n\t\tvar column = this.table.columnManager.getColumnByIndex(index);\r\n\t\treturn !column || column.visible ? column : this._prevVisibleColumn(index - 1);\r\n\t}\r\n\r\n\treinitializeWidth(force){\r\n\t\tthis.widthFixed = false;\r\n\r\n\t\t//set width if present\r\n\t\tif(typeof this.definition.width !== \"undefined\" && !force){\r\n\t\t\t// maxInitialWidth ignored here as width specified\r\n\t\t\tthis.setWidth(this.definition.width);\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"column-width-fit-before\", this);\r\n\r\n\t\tthis.fitToData(force);\r\n\r\n\t\tthis.dispatch(\"column-width-fit-after\", this);\r\n\t}\r\n\r\n\t//set column width to maximum cell width for non group columns\r\n\tfitToData(force){\r\n\t\tif(this.isGroup){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif(!this.widthFixed){\r\n\t\t\tthis.element.style.width = \"\";\r\n\r\n\t\t\tthis.cells.forEach((cell) => {\r\n\t\t\t\tcell.clearWidth();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tvar maxWidth = this.element.offsetWidth;\r\n\r\n\t\tif(!this.width || !this.widthFixed){\r\n\t\t\tthis.cells.forEach((cell) => {\r\n\t\t\t\tvar width = cell.getWidth();\r\n\r\n\t\t\t\tif(width > maxWidth){\r\n\t\t\t\t\tmaxWidth = width;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(maxWidth){\r\n\t\t\t\tvar setTo = maxWidth + 1;\r\n\t\t\t\tif (this.maxInitialWidth && !force) {\r\n\t\t\t\t\tsetTo = Math.min(setTo, this.maxInitialWidth);\r\n\t\t\t\t}\r\n\t\t\t\tthis.setWidthActual(setTo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateDefinition(updates){\r\n\t\tvar definition;\r\n\r\n\t\tif(!this.isGroup){\r\n\t\t\tif(!this.parent.isGroup){\r\n\t\t\t\tdefinition = Object.assign({}, this.getDefinition());\r\n\t\t\t\tdefinition = Object.assign(definition, updates);\r\n\r\n\t\t\t\treturn this.table.columnManager.addColumn(definition, false, this)\r\n\t\t\t\t.then((column) => {\r\n\r\n\t\t\t\t\tif(definition.field == this.field){\r\n\t\t\t\t\t\tthis.field = false; //cleair field name to prevent deletion of duplicate column from arrays\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn this.delete()\r\n\t\t\t\t\t.then(() => {\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Column Update Error - The updateDefinition function is only available on ungrouped columns\");\r\n\t\t\t\treturn Promise.reject(\"Column Update Error - The updateDefinition function is only available on columns, not column groups\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Column Update Error - The updateDefinition function is only available on ungrouped columns\");\r\n\t\t\treturn Promise.reject(\"Column Update Error - The updateDefinition function is only available on columns, not column groups\");\r\n\t\t}\r\n\t}\r\n\r\n\tdeleteCell(cell){\r\n\t\tvar index = this.cells.indexOf(cell);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.cells.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new ColumnComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}\r\n\r\nColumn.defaultOptionList = defaultOptions;\r\n\r\nexport default Column;","//public row object\r\nexport default class RowComponent {\r\n\r\n\tconstructor (row){\r\n\t\tthis._row = row;\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._row.table.componentFunctionBinder.handle(\"row\", target._row, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\treturn this._row.getData(transform);\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._row.getElement();\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis._row.getCells().forEach(function(cell){\r\n\t\t\tcells.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar cell = this._row.getCell(column);\r\n\t\treturn cell ? cell.getComponent() : false;\r\n\t}\r\n\r\n\tgetIndex(){\r\n\t\treturn this._row.getData(\"data\")[this._row.table.options.index];\r\n\t}\r\n\r\n\tgetPosition(active){\r\n\t\treturn this._row.table.rowManager.getRowPosition(this._row, active);\r\n\t}\r\n\r\n\tdelete(){\r\n\t\treturn this._row.delete();\r\n\t}\r\n\r\n\tscrollTo(){\r\n\t\treturn this._row.table.rowManager.scrollToRow(this._row);\r\n\t}\r\n\r\n\tmove(to, after){\r\n\t\tthis._row.moveToRow(to, after);\r\n\t}\r\n\r\n\tupdate(data){\r\n\t\treturn this._row.updateData(data);\r\n\t}\r\n\r\n\tnormalizeHeight(){\r\n\t\tthis._row.normalizeHeight(true);\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._row;\r\n\t}\r\n\r\n\treformat(){\r\n\t\treturn this._row.reinitialize();\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._row.table;\r\n\t}\r\n\r\n\tgetNextRow(){\r\n\t\tvar row = this._row.nextRow();\r\n\t\treturn row ? row.getComponent() : row;\r\n\t}\r\n\r\n\tgetPrevRow(){\r\n\t\tvar row = this._row.prevRow();\r\n\t\treturn row ? row.getComponent() : row;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport RowComponent from './RowComponent.js';\r\nimport Helpers from '../tools/Helpers.js';\r\n\r\nexport default class Row extends CoreFeature{\r\n\tconstructor (data, parent, type = \"row\"){\r\n\t\tsuper(parent.table);\r\n\r\n\t\tthis.parent = parent;\r\n\t\tthis.data = {};\r\n\t\tthis.type = type; //type of element\r\n\t\tthis.element = false;\r\n\t\tthis.modules = {}; //hold module variables;\r\n\t\tthis.cells = [];\r\n\t\tthis.height = 0; //hold element height\r\n\t\tthis.heightStyled = \"\"; //hold element height prestyled to improve render efficiency\r\n\t\tthis.manualHeight = false; //user has manually set row height\r\n\t\tthis.outerHeight = 0; //holde lements outer height\r\n\t\tthis.initialized = false; //element has been rendered\r\n\t\tthis.heightInitialized = false; //element has resized cells to fit\r\n\r\n\t\tthis.component = null;\r\n\r\n\t\tthis.created = false;\r\n\r\n\t\tthis.setData(data);\r\n\t}\r\n\r\n\tcreate(){\r\n\t\tif(!this.created){\r\n\t\t\tthis.created = true;\r\n\t\t\tthis.generateElement();\r\n\t\t}\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\r\n\t\tthis.element = el;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\tthis.create();\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tdetachElement(){\r\n\t\tif (this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateElement(){\r\n\t\tthis.createElement();\r\n\t\tthis.dispatch(\"row-init\", this);\r\n\t}\r\n\r\n\tgenerateCells(){\r\n\t\tthis.cells = this.table.columnManager.generateCells(this);\r\n\t}\r\n\r\n\t//functions to setup on first render\r\n\tinitialize(force){\r\n\t\tthis.create();\r\n\r\n\t\tif(!this.initialized || force){\r\n\r\n\t\t\tthis.deleteCells();\r\n\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\tthis.dispatch(\"row-layout-before\", this);\r\n\r\n\t\t\tthis.generateCells();\r\n\r\n\t\t\tthis.initialized = true;\r\n\r\n\t\t\tthis.table.columnManager.renderer.renderRowCells(this);\r\n\r\n\t\t\tif(force){\r\n\t\t\t\tthis.normalizeHeight();\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-layout\", this);\r\n\r\n\t\t\tif(this.table.options.rowFormatter){\r\n\t\t\t\tthis.table.options.rowFormatter(this.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-layout-after\", this);\r\n\t\t}else{\r\n\t\t\tthis.table.columnManager.renderer.rerenderRowCells(this);\r\n\t\t}\r\n\t}\r\n\r\n\treinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\r\n\t\tif(this.element && this.element.offsetParent !== null){\r\n\t\t\tthis.normalizeHeight(true);\r\n\t\t}\r\n\t}\r\n\r\n\tdeinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\t}\r\n\r\n\treinitialize(children){\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\r\n\t\tif(!this.manualHeight){\r\n\t\t\tthis.height = 0;\r\n\t\t\tthis.heightStyled = \"\";\r\n\t\t}\r\n\r\n\t\tif(this.element && this.element.offsetParent !== null){\r\n\t\t\tthis.initialize(true);\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"row-relayout\", this);\r\n\t}\r\n\r\n\t//get heights when doing bulk row style calcs in virtual DOM\r\n\tcalcHeight(force){\r\n\r\n\t\tvar maxHeight = 0,\r\n\t\tminHeight = this.table.options.resizableRows ? this.element.clientHeight : 0;\r\n\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tvar height = cell.getHeight();\r\n\t\t\tif(height > maxHeight){\r\n\t\t\t\tmaxHeight = height;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(force){\r\n\t\t\tthis.height = Math.max(maxHeight, minHeight);\r\n\t\t}else{\r\n\t\t\tthis.height = this.manualHeight ? this.height : Math.max(maxHeight, minHeight);\r\n\t\t}\r\n\r\n\t\tthis.heightStyled = this.height ? this.height + \"px\" : \"\";\r\n\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t}\r\n\r\n\t//set of cells\r\n\tsetCellHeight(){\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.setHeight();\r\n\t\t});\r\n\r\n\t\tthis.heightInitialized = true;\r\n\t}\r\n\r\n\tclearCellHeight(){\r\n\t\tthis.cells.forEach(function(cell){\r\n\t\t\tcell.clearHeight();\r\n\t\t});\r\n\t}\r\n\r\n\t//normalize the height of elements in the row\r\n\tnormalizeHeight(force){\r\n\t\tif(force){\r\n\t\t\tthis.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis.calcHeight(force);\r\n\r\n\t\tthis.setCellHeight();\r\n\t}\r\n\r\n\t//set height of rows\r\n\tsetHeight(height, force){\r\n\t\tif(this.height != height || force){\r\n\r\n\t\t\tthis.manualHeight = true;\r\n\r\n\t\t\tthis.height = height;\r\n\t\t\tthis.heightStyled = height ? height + \"px\" : \"\";\r\n\r\n\t\t\tthis.setCellHeight();\r\n\r\n\t\t\t// this.outerHeight = this.element.outerHeight();\r\n\t\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t\t}\r\n\t}\r\n\r\n\t//return rows outer height\r\n\tgetHeight(){\r\n\t\treturn this.outerHeight;\r\n\t}\r\n\r\n\t//return rows outer Width\r\n\tgetWidth(){\r\n\t\treturn this.element.offsetWidth;\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\tdeleteCell(cell){\r\n\t\tvar index = this.cells.indexOf(cell);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.cells.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t//////////////// Data Management /////////////////\r\n\tsetData(data){\r\n\t\tthis.data = this.chain(\"row-data-init-before\", [this, data], undefined, data);\r\n\r\n\t\tthis.dispatch(\"row-data-init-after\", this);\r\n\t}\r\n\r\n\t//update the rows data\r\n\tupdateData(updatedData){\r\n\t\tvar visible = this.element && Helpers.elVisible(this.element),\r\n\t\ttempData = {},\r\n\t\tnewRowData;\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\r\n\t\t\tif(typeof updatedData === \"string\"){\r\n\t\t\t\tupdatedData = JSON.parse(updatedData);\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-save-before\", this);\r\n\r\n\t\t\tif(this.subscribed(\"row-data-changing\")){\r\n\t\t\t\ttempData = Object.assign(tempData, this.data);\r\n\t\t\t\ttempData = Object.assign(tempData, updatedData);\r\n\t\t\t}\r\n\r\n\t\t\tnewRowData = this.chain(\"row-data-changing\", [this, tempData, updatedData], null, updatedData);\r\n\r\n\t\t\t//set data\r\n\t\t\tfor (var attrname in newRowData) {\r\n\t\t\t\tthis.data[attrname] = newRowData[attrname];\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-save-after\", this);\r\n\r\n\t\t\t//update affected cells only\r\n\t\t\tfor (var attrname in updatedData) {\r\n\r\n\t\t\t\tlet columns = this.table.columnManager.getColumnsByFieldRoot(attrname);\r\n\r\n\t\t\t\tcolumns.forEach((column) => {\r\n\t\t\t\t\tlet cell = this.getCell(column.getField());\r\n\r\n\t\t\t\t\tif(cell){\r\n\t\t\t\t\t\tlet value = column.getFieldValue(newRowData);\r\n\t\t\t\t\t\tif(cell.getValue() != value){\r\n\t\t\t\t\t\t\tcell.setValueProcessData(value);\r\n\r\n\t\t\t\t\t\t\tif(visible){\r\n\t\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t//Partial reinitialization if visible\r\n\t\t\tif(visible){\r\n\t\t\t\tthis.normalizeHeight(true);\r\n\r\n\t\t\t\tif(this.table.options.rowFormatter){\r\n\t\t\t\t\tthis.table.options.rowFormatter(this.getComponent());\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.initialized = false;\r\n\t\t\t\tthis.height = 0;\r\n\t\t\t\tthis.heightStyled = \"\";\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"row-data-changed\", this, visible, updatedData);\r\n\r\n\t\t\t//this.reinitialize();\r\n\r\n\t\t\tthis.dispatchExternal(\"rowUpdated\", this.getComponent());\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t\t}\r\n\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\r\n\tgetData(transform){\r\n\t\tif(transform){\r\n\t\t\treturn this.chain(\"row-data-retrieve\", [this, transform], null, this.data);\r\n\t\t}\r\n\r\n\t\treturn this.data;\r\n\t}\r\n\r\n\tgetCell(column){\r\n\t\tvar match = false;\r\n\r\n\t\tcolumn = this.table.columnManager.findColumn(column);\r\n\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\r\n\t\tmatch = this.cells.find(function(cell){\r\n\t\t\treturn cell.column === column;\r\n\t\t});\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tgetCellIndex(findCell){\r\n\t\treturn this.cells.findIndex(function(cell){\r\n\t\t\treturn cell === findCell;\r\n\t\t});\r\n\t}\r\n\r\n\tfindCell(subject){\r\n\t\treturn this.cells.find((cell) => {\r\n\t\t\treturn cell.element === subject;\r\n\t\t});\r\n\t}\r\n\r\n\tgetCells(){\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\r\n\t\treturn this.cells;\r\n\t}\r\n\r\n\tnextRow(){\r\n\t\tvar row = this.table.rowManager.nextDisplayRow(this, true);\r\n\t\treturn row || false;\r\n\t}\r\n\r\n\tprevRow(){\r\n\t\tvar row = this.table.rowManager.prevDisplayRow(this, true);\r\n\t\treturn row || false;\r\n\t}\r\n\r\n\tmoveToRow(to, before){\r\n\t\tvar toRow = this.table.rowManager.findRow(to);\r\n\r\n\t\tif(toRow){\r\n\t\t\tthis.table.rowManager.moveRowActual(this, toRow, !before);\r\n\t\t\tthis.table.rowManager.refreshActiveData(\"display\", false, true);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching row found:\", to);\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////// Actions /////////////////////\r\n\tdelete(){\r\n\t\tthis.dispatch(\"row-delete\", this);\r\n\r\n\t\tthis.deleteActual();\r\n\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\r\n\tdeleteActual(blockRedraw){\r\n\t\tvar index = this.table.rowManager.getRowIndex(this);\r\n\r\n\t\tthis.detatchModules();\r\n\r\n\t\tthis.table.rowManager.deleteRow(this, blockRedraw);\r\n\r\n\t\tthis.deleteCells();\r\n\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\t\tthis.element = false;\r\n\r\n\t\tthis.dispatch(\"row-deleted\", this);\r\n\t}\r\n\r\n\tdetatchModules(){\r\n\t\tthis.dispatch(\"row-deleting\", this);\r\n\t}\r\n\r\n\tdeleteCells(){\r\n\t\tvar cellCount = this.cells.length;\r\n\r\n\t\tfor(let i = 0; i < cellCount; i++){\r\n\t\t\tthis.cells[0].delete();\r\n\t\t}\r\n\t}\r\n\r\n\twipe(){\r\n\t\tthis.detatchModules();\r\n\t\tthis.deleteCells();\r\n\r\n\t\tif(this.element){\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\tif(this.element.parentNode){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.modules = {};\r\n\t}\r\n\r\n\tgetGroup(){\r\n\t\treturn this.modules.group || false;\r\n\t}\r\n\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new RowComponent(this);\r\n\t\t}\r\n\r\n\t\treturn this.component;\r\n\t}\r\n}","export default {\r\n\t\"avg\":function(values, data, calcParams){\r\n\t\tvar output = 0,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : 2\r\n\r\n\t\tif(values.length){\r\n\t\t\toutput = values.reduce(function(sum, value){\r\n\t\t\t\treturn Number(sum) + Number(value);\r\n\t\t\t});\r\n\r\n\t\t\toutput = output / values.length;\r\n\r\n\t\t\toutput = precision !== false ? output.toFixed(precision) : output;\r\n\t\t}\r\n\r\n\t\treturn parseFloat(output).toString();\r\n\t},\r\n\t\"max\":function(values, data, calcParams){\r\n\t\tvar output = null,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tvalues.forEach(function(value){\r\n\r\n\t\t\tvalue = Number(value);\r\n\r\n\t\t\tif(value > output || output === null){\r\n\t\t\t\toutput = value;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output !== null ? (precision !== false ? output.toFixed(precision) : output) : \"\";\r\n\t},\r\n\t\"min\":function(values, data, calcParams){\r\n\t\tvar output = null,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tvalues.forEach(function(value){\r\n\r\n\t\t\tvalue = Number(value);\r\n\r\n\t\t\tif(value < output || output === null){\r\n\t\t\t\toutput = value;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output !== null ? (precision !== false ? output.toFixed(precision) : output) : \"\";\r\n\t},\r\n\t\"sum\":function(values, data, calcParams){\r\n\t\tvar output = 0,\r\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\r\n\r\n\t\tif(values.length){\r\n\t\t\tvalues.forEach(function(value){\r\n\t\t\t\tvalue = Number(value);\r\n\r\n\t\t\t\toutput += !isNaN(value) ? Number(value) : 0;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn precision !== false ? output.toFixed(precision) : output;\r\n\t},\r\n\t\"concat\":function(values, data, calcParams){\r\n\t\tvar output = 0;\r\n\r\n\t\tif(values.length){\r\n\t\t\toutput = values.reduce(function(sum, value){\r\n\t\t\t\treturn String(sum) + String(value);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t},\r\n\t\"count\":function(values, data, calcParams){\r\n\t\tvar output = 0;\r\n\r\n\t\tif(values.length){\r\n\t\t\tvalues.forEach(function(value){\r\n\t\t\t\tif(value){\r\n\t\t\t\t\toutput ++;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport CalcComponent from './CalcComponent.js';\r\n\r\nimport Cell from '../../core/cell/Cell.js';\r\nimport Column from '../../core/column/Column.js';\r\nimport Row from '../../core/row/Row.js';\r\n\r\nimport defaultCalculations from './defaults/calculations.js';\r\n\r\nclass ColumnCalcs extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.topCalcs = [];\r\n\t\tthis.botCalcs = [];\r\n\t\tthis.genColumn = false;\r\n\t\tthis.topElement = this.createElement();\r\n\t\tthis.botElement = this.createElement();\r\n\t\tthis.topRow = false;\r\n\t\tthis.botRow = false;\r\n\t\tthis.topInitialized = false;\r\n\t\tthis.botInitialized = false;\r\n\r\n\t\tthis.registerTableOption(\"columnCalcs\", true);\r\n\r\n\t\tthis.registerColumnOption(\"topCalc\");\r\n\t\tthis.registerColumnOption(\"topCalcParams\");\r\n\t\tthis.registerColumnOption(\"topCalcFormatter\");\r\n\t\tthis.registerColumnOption(\"topCalcFormatterParams\");\r\n\t\tthis.registerColumnOption(\"bottomCalc\");\r\n\t\tthis.registerColumnOption(\"bottomCalcParams\");\r\n\t\tthis.registerColumnOption(\"bottomCalcFormatter\");\r\n\t\tthis.registerColumnOption(\"bottomCalcFormatterParams\");\r\n\t}\r\n\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-calcs-holder\");\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.genColumn = new Column({field:\"value\"}, this);\r\n\r\n\t\tthis.subscribe(\"cell-value-changed\", this.cellValueChanged.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumnCheck.bind(this));\r\n\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t\tthis.subscribe(\"row-added\", this.rowsUpdated.bind(this));\r\n\t\tthis.subscribe(\"column-moved\", this.recalcActiveRows.bind(this));\r\n\t\tthis.subscribe(\"column-add\", this.recalcActiveRows.bind(this));\r\n\t\tthis.subscribe(\"data-refreshed\", this.recalcActiveRowsRefresh.bind(this));\r\n\t\tthis.subscribe(\"table-redraw\", this.tableRedraw.bind(this));\r\n\t\tthis.subscribe(\"rows-visible\", this.visibleRows.bind(this));\r\n\r\n\t\tthis.registerTableFunction(\"getCalcResults\", this.getResults.bind(this));\r\n\t\tthis.registerTableFunction(\"recalc\", this.userRecalc.bind(this));\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\r\n\t\tif(force){\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\tuserRecalc(){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tvisibleRows(viewable, rows){\r\n\t\tif(this.topRow){\r\n\t\t\trows.unshift(this.topRow);\r\n\t\t}\r\n\r\n\t\tif(this.botRow){\r\n\t\t\trows.push(this.botRow);\r\n\t\t}\r\n\t\r\n\t\treturn rows;\r\n\t}\r\n\r\n\trowsUpdated(row){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.recalcRowGroup(this);\r\n\t\t}else{\r\n\t\t\tthis.recalcActiveRows();\r\n\t\t}\r\n\t}\r\n\r\n\trecalcActiveRowsRefresh(){\r\n\t\tif(this.table.options.groupBy && this.table.options.dataTreeStartExpanded && this.table.options.dataTree){\r\n\t\t\tthis.recalcAll();\r\n\t\t}else{\r\n\t\t\tthis.recalcActiveRows();\r\n\t\t}\r\n\t}\r\n\r\n\trecalcActiveRows(){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t}\r\n\r\n\tcellValueChanged(cell){\r\n\t\tif(cell.column.definition.topCalc || cell.column.definition.bottomCalc){\r\n\t\t\tif(this.table.options.groupBy){\r\n\t\t\t\tif(this.table.options.columnCalcs == \"table\" || this.table.options.columnCalcs == \"both\"){\r\n\t\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"table\"){\r\n\t\t\t\t\tthis.recalcRowGroup(cell.row);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(column.definition.topCalc || column.definition.bottomCalc){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column calcs\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition\r\n\r\n\t\tvar config = {\r\n\t\t\ttopCalcParams:def.topCalcParams || {},\r\n\t\t\tbotCalcParams:def.bottomCalcParams || {},\r\n\t\t};\r\n\r\n\t\tif(def.topCalc){\r\n\r\n\t\t\tswitch(typeof def.topCalc){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(ColumnCalcs.calculations[def.topCalc]){\r\n\t\t\t\t\tconfig.topCalc = ColumnCalcs.calculations[def.topCalc]\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.topCalc);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tconfig.topCalc = def.topCalc;\r\n\t\t\t\tbreak\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(config.topCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.topCalcs.push(column);\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"group\"){\r\n\t\t\t\t\tthis.initializeTopRow();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tif(def.bottomCalc){\r\n\t\t\tswitch(typeof def.bottomCalc){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(ColumnCalcs.calculations[def.bottomCalc]){\r\n\t\t\t\t\tconfig.botCalc = ColumnCalcs.calculations[def.bottomCalc]\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.bottomCalc);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tconfig.botCalc = def.bottomCalc;\r\n\t\t\t\tbreak\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(config.botCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.botCalcs.push(column);\r\n\r\n\t\t\t\tif(this.table.options.columnCalcs != \"group\"){\r\n\t\t\t\t\tthis.initializeBottomRow();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t//dummy functions to handle being mock column manager\r\n\tregisterColumnField(){};\r\n\r\n\tremoveCalcs(){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(this.topInitialized){\r\n\t\t\tthis.topInitialized = false;\r\n\t\t\tthis.topElement.parentNode.removeChild(this.topElement);\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\r\n\t\tif(this.botInitialized){\r\n\t\t\tthis.botInitialized = false;\r\n\t\t\tthis.table.footerManager.remove(this.botElement);\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeTopRow(){\r\n\t\tif(!this.topInitialized){\r\n\t\t\tthis.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\r\n\t\t\tthis.topInitialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeBottomRow(){\r\n\t\tif(!this.botInitialized){\r\n\t\t\tthis.table.footerManager.prepend(this.botElement);\r\n\t\t\tthis.botInitialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tscrollHorizontal(left){\r\n\t\tif(this.botInitialized && this.botRow){\r\n\t\t\tthis.botRow.getElement().style.marginLeft = (-left) + \"px\";\r\n\t\t}\r\n\t}\r\n\r\n\trecalc(rows){\r\n\t\tvar data, row;\r\n\r\n\t\tif(this.topInitialized || this.botInitialized){\r\n\t\t\tdata = this.rowsToData(rows);\r\n\r\n\t\t\tif(this.topInitialized){\r\n\t\t\t\tif(this.topRow){\r\n\t\t\t\t\tthis.topRow.deleteCells();\r\n\t\t\t\t}\r\n\r\n\t\t\t\trow = this.generateRow(\"top\", this.rowsToData(rows))\r\n\t\t\t\tthis.topRow = row;\r\n\t\t\t\twhile(this.topElement.firstChild) this.topElement.removeChild(this.topElement.firstChild);\r\n\t\t\t\tthis.topElement.appendChild(row.getElement());\r\n\t\t\t\trow.initialize(true);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.botInitialized){\r\n\t\t\t\tif(this.botRow){\r\n\t\t\t\t\tthis.botRow.deleteCells();\r\n\t\t\t\t}\r\n\r\n\t\t\t\trow = this.generateRow(\"bottom\", this.rowsToData(rows))\r\n\t\t\t\tthis.botRow = row;\r\n\t\t\t\twhile(this.botElement.firstChild) this.botElement.removeChild(this.botElement.firstChild);\r\n\t\t\t\tthis.botElement.appendChild(row.getElement());\r\n\t\t\t\trow.initialize(true);\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\t//set resizable handles\r\n\t\t\tif(this.table.modExists(\"frozenColumns\")){\r\n\t\t\t\tthis.table.modules.frozenColumns.layout();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trecalcRowGroup(row){\r\n\t\tthis.recalcGroup(this.table.modules.groupRows.getRowGroup(row));\r\n\t}\r\n\r\n\trecalcAll(){\r\n\t\tif(this.topCalcs.length || this.botCalcs.length){\r\n\t\t\tif(this.table.options.columnCalcs !== \"group\"){\r\n\t\t\t\tthis.recalcActiveRows();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.groupBy && this.table.options.columnCalcs !== \"table\"){\r\n\r\n\t\t\t\tvar groups = this.table.modules.groupRows.getChildGroups();\r\n\r\n\t\t\t\tgroups.forEach((group) => {\r\n\t\t\t\t\tthis.recalcGroup(group);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trecalcGroup(group){\r\n\t\tvar data, rowData;\r\n\r\n\t\tif(group){\r\n\t\t\tif(group.calcs){\r\n\t\t\t\tif(group.calcs.bottom){\r\n\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\trowData = this.generateRowData(\"bottom\", data);\r\n\r\n\t\t\t\t\tgroup.calcs.bottom.updateData(rowData);\r\n\t\t\t\t\tgroup.calcs.bottom.reinitialize();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(group.calcs.top){\r\n\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\trowData = this.generateRowData(\"top\", data);\r\n\r\n\t\t\t\t\tgroup.calcs.top.updateData(rowData);\r\n\t\t\t\t\tgroup.calcs.top.reinitialize();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//generate top stats row\r\n\tgenerateTopRow(rows){\r\n\t\treturn this.generateRow(\"top\", this.rowsToData(rows));\r\n\t}\r\n\t//generate bottom stats row\r\n\tgenerateBottomRow(rows){\r\n\t\treturn this.generateRow(\"bottom\", this.rowsToData(rows));\r\n\t}\r\n\r\n\trowsToData(rows){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\trows.forEach((row) => {\r\n\t\t\tdata.push(row.getData());\r\n\r\n\t\t\tif(this.table.options.dataTree && this.table.options.dataTreeChildColumnCalcs){\r\n\t\t\t\tif(row.modules.dataTree && row.modules.dataTree.open){\r\n\t\t\t\t\tvar children = this.rowsToData(this.table.modules.dataTree.getFilteredTreeChildren(row));\r\n\t\t\t\t\tdata = data.concat(children);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//generate stats row\r\n\tgenerateRow(pos, data){\r\n\t\tvar rowData = this.generateRowData(pos, data),\r\n\t\trow;\r\n\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.disable();\r\n\t\t}\r\n\r\n\t\trow = new Row(rowData, this, \"calc\");\r\n\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.enable();\r\n\t\t}\r\n\r\n\t\trow.getElement().classList.add(\"tabulator-calcs\", \"tabulator-calcs-\" + pos);\r\n\r\n\t\trow.component = false;\r\n\r\n\t\trow.getComponent = () => {\r\n\t\t\tif(!row.component){\r\n\t\t\t\trow.component = new CalcComponent(row);\r\n\t\t\t}\r\n\r\n\t\t\treturn row.component;\r\n\t\t};\r\n\r\n\t\trow.generateCells = () => {\r\n\r\n\t\t\tvar cells = [];\r\n\r\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\r\n\t\t\t\t\t//set field name of mock column\r\n\t\t\t\t\tthis.genColumn.setField(column.getField());\r\n\t\t\t\t\tthis.genColumn.hozAlign = column.hozAlign;\r\n\r\n\t\t\t\t\tif(column.definition[pos + \"CalcFormatter\"] && this.table.modExists(\"format\")){\r\n\t\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(column.definition[pos + \"CalcFormatter\"]),\r\n\t\t\t\t\t\t\tparams: column.definition[pos + \"CalcFormatterParams\"] || {},\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(\"plaintext\"),\r\n\t\t\t\t\t\t\tparams:{}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//ensure css class defintion is replicated to calculation cell\r\n\t\t\t\t\tthis.genColumn.definition.cssClass = column.definition.cssClass;\r\n\r\n\t\t\t\t\t//generate cell and assign to correct column\r\n\t\t\t\t\tvar cell = new Cell(this.genColumn, row);\r\n\t\t\t\t\tcell.getElement();\r\n\t\t\t\t\tcell.column = column;\r\n\t\t\t\t\tcell.setWidth();\r\n\r\n\t\t\t\t\tcolumn.cells.push(cell);\r\n\t\t\t\t\tcells.push(cell);\r\n\r\n\t\t\t\t\tif(!column.visible){\r\n\t\t\t\t\t\tcell.hide();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\trow.cells = cells;\r\n\t\t};\r\n\r\n\t\treturn row;\r\n\t}\r\n\r\n\t//generate stats row\r\n\tgenerateRowData(pos, data){\r\n\t\tvar rowData = {},\r\n\t\tcalcs = pos == \"top\" ? this.topCalcs : this.botCalcs,\r\n\t\ttype = pos == \"top\" ? \"topCalc\" : \"botCalc\",\r\n\t\tparams, paramKey;\r\n\r\n\t\tcalcs.forEach(function(column){\r\n\t\t\tvar values = [];\r\n\r\n\t\t\tif(column.modules.columnCalcs && column.modules.columnCalcs[type]){\r\n\t\t\t\tdata.forEach(function(item){\r\n\t\t\t\t\tvalues.push(column.getFieldValue(item));\r\n\t\t\t\t});\r\n\r\n\t\t\t\tparamKey = type + \"Params\";\r\n\t\t\t\tparams = typeof column.modules.columnCalcs[paramKey] === \"function\" ? column.modules.columnCalcs[paramKey](values, data) : column.modules.columnCalcs[paramKey];\r\n\r\n\t\t\t\tcolumn.setFieldValue(rowData, column.modules.columnCalcs[type](values, data, params));\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowData;\r\n\t}\r\n\r\n\thasTopCalcs(){\r\n\t\treturn\t!!(this.topCalcs.length);\r\n\t}\r\n\r\n\thasBottomCalcs(){\r\n\t\treturn\t!!(this.botCalcs.length);\r\n\t}\r\n\r\n\t//handle table redraw\r\n\tredraw(){\r\n\t\tif(this.topRow){\r\n\t\t\tthis.topRow.normalizeHeight(true);\r\n\t\t}\r\n\t\tif(this.botRow){\r\n\t\t\tthis.botRow.normalizeHeight(true);\r\n\t\t}\r\n\t}\r\n\r\n\t//return the calculated\r\n\tgetResults(){\r\n\t\tvar results = {},\r\n\t\tgroups;\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tgroups = this.table.modules.groupRows.getGroups(true);\r\n\r\n\t\t\tgroups.forEach((group) => {\r\n\t\t\t\tresults[group.getKey()] = this.getGroupResults(group);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tresults = {\r\n\t\t\t\ttop: this.topRow ? this.topRow.getData() : {},\r\n\t\t\t\tbottom: this.botRow ? this.botRow.getData() : {},\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n\r\n\t//get results from a group\r\n\tgetGroupResults(group){\r\n\t\tvar groupObj = group._getSelf(),\r\n\t\tsubGroups = group.getSubGroups(),\r\n\t\tsubGroupResults = {},\r\n\t\tresults = {};\r\n\r\n\t\tsubGroups.forEach((subgroup) => {\r\n\t\t\tsubGroupResults[subgroup.getKey()] = this.getGroupResults(subgroup);\r\n\t\t});\r\n\r\n\t\tresults = {\r\n\t\t\ttop: groupObj.calcs.top ? groupObj.calcs.top.getData() : {},\r\n\t\t\tbottom: groupObj.calcs.bottom ? groupObj.calcs.bottom.getData() : {},\r\n\t\t\tgroups: subGroupResults,\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n}\r\n\r\nColumnCalcs.moduleName = \"columnCalcs\";\r\n\r\n//load defaults\r\nColumnCalcs.calculations = defaultCalculations;\r\n\r\nexport default ColumnCalcs;","import Module from '../../core/Module.js';\r\n\r\nimport Row from '../../core/row/Row.js';\r\n\r\nclass DataTree extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.indent = 10;\r\n\t\tthis.field = \"\";\r\n\t\tthis.collapseEl = null;\r\n\t\tthis.expandEl = null;\r\n\t\tthis.branchEl = null;\r\n\t\tthis.elementField = false;\r\n\r\n\t\tthis.startOpen = function(){};\r\n\r\n\t\tthis.displayIndex = 0;\r\n\r\n\t\tthis.registerTableOption(\"dataTree\", false); //enable data tree\r\n\t\tthis.registerTableOption(\"dataTreeFilter\", true); //filter child rows\r\n\t\tthis.registerTableOption(\"dataTreeSort\", true); //sort child rows\r\n\t\tthis.registerTableOption(\"dataTreeElementColumn\", false);\r\n\t\tthis.registerTableOption(\"dataTreeBranchElement\", true);//show data tree branch element\r\n\t\tthis.registerTableOption(\"dataTreeChildIndent\", 9); //data tree child indent in px\r\n\t\tthis.registerTableOption(\"dataTreeChildField\", \"_children\");//data tre column field to look for child rows\r\n\t\tthis.registerTableOption(\"dataTreeCollapseElement\", false);//data tree row collapse element\r\n\t\tthis.registerTableOption(\"dataTreeExpandElement\", false);//data tree row expand element\r\n\t\tthis.registerTableOption(\"dataTreeStartExpanded\", false);\r\n\t\tthis.registerTableOption(\"dataTreeChildColumnCalcs\", false);//include visible data tree rows in column calculations\r\n\t\tthis.registerTableOption(\"dataTreeSelectPropagate\", false);//seleccting a parent row selects its children\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"treeCollapse\", this.collapseRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"treeExpand\", this.expandRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"treeToggle\", this.toggleRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"getTreeParent\", this.getTreeParent.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"getTreeChildren\", this.getRowChildren.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"addTreeChild\", this.addTreeChildRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isTreeExpanded\", this.isRowExpanded.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.dataTree){\r\n\t\t\tvar dummyEl = null,\r\n\t\t\toptions = this.table.options;\r\n\r\n\t\t\tthis.field = options.dataTreeChildField;\r\n\t\t\tthis.indent = options.dataTreeChildIndent;\r\n\r\n\t\t\tif(options.dataTreeBranchElement){\r\n\r\n\t\t\t\tif(options.dataTreeBranchElement === true){\r\n\t\t\t\t\tthis.branchEl = document.createElement(\"div\");\r\n\t\t\t\t\tthis.branchEl.classList.add(\"tabulator-data-tree-branch\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(typeof options.dataTreeBranchElement === \"string\"){\r\n\t\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\t\tdummyEl.innerHTML = options.dataTreeBranchElement;\r\n\t\t\t\t\t\tthis.branchEl = dummyEl.firstChild;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.branchEl = options.dataTreeBranchElement;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(options.dataTreeCollapseElement){\r\n\t\t\t\tif(typeof options.dataTreeCollapseElement === \"string\"){\r\n\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\tdummyEl.innerHTML = options.dataTreeCollapseElement;\r\n\t\t\t\t\tthis.collapseEl = dummyEl.firstChild;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.collapseEl = options.dataTreeCollapseElement;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.collapseEl = document.createElement(\"div\");\r\n\t\t\t\tthis.collapseEl.classList.add(\"tabulator-data-tree-control\");\r\n\t\t\t\tthis.collapseEl.tabIndex = 0;\r\n\t\t\t\tthis.collapseEl.innerHTML = \"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif(options.dataTreeExpandElement){\r\n\t\t\t\tif(typeof options.dataTreeExpandElement === \"string\"){\r\n\t\t\t\t\tdummyEl = document.createElement(\"div\");\r\n\t\t\t\t\tdummyEl.innerHTML = options.dataTreeExpandElement;\r\n\t\t\t\t\tthis.expandEl = dummyEl.firstChild;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.expandEl = options.dataTreeExpandElement;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.expandEl = document.createElement(\"div\");\r\n\t\t\t\tthis.expandEl.classList.add(\"tabulator-data-tree-control\");\r\n\t\t\t\tthis.expandEl.tabIndex = 0;\r\n\t\t\t\tthis.expandEl.innerHTML = \"
\";\r\n\t\t\t}\r\n\r\n\r\n\t\t\tswitch(typeof options.dataTreeStartExpanded){\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\treturn options.dataTreeStartExpanded;\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tthis.startOpen = options.dataTreeStartExpanded;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\treturn options.dataTreeStartExpanded[index];\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-layout-after\", this.layoutRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowDelete.bind(this),0);\r\n\t\t\tthis.subscribe(\"row-data-changed\", this.rowDataChanged.bind(this), 10);\r\n\t\t\tthis.subscribe(\"cell-value-updated\", this.cellValueChanged.bind(this));\r\n\t\t\tthis.subscribe(\"edit-cancelled\", this.cellValueChanged.bind(this));\r\n\t\t\tthis.subscribe(\"column-moving-rows\", this.columnMoving.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.initializeElementField.bind(this));\r\n\r\n\t\t\tthis.registerDisplayHandler(this.getRows.bind(this), 30);\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeElementField(){\r\n\t\tvar firstCol = this.table.columnManager.getFirstVisibleColumn();\r\n\r\n\t\tthis.elementField = this.table.options.dataTreeElementColumn || (firstCol ? firstCol.field : false);\r\n\t}\r\n\t\r\n\tgetRowChildren(row){\r\n\t\treturn this.getTreeChildren(row, true);\r\n\t}\r\n\r\n\tcolumnMoving(){\r\n\t\tvar rows = [];\r\n\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\trows = rows.concat(this.getTreeChildren(row, false, true));\r\n\t\t});\r\n\r\n\t\treturn rows;\r\n\t}\r\n\r\n\trowDataChanged(row, visible, updatedData){\r\n\t\tif(this.redrawNeeded(updatedData)){\r\n\t\t\tthis.initializeRow(row);\r\n\r\n\t\t\tif(visible){\r\n\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tcellValueChanged(cell){\r\n\t\tvar field = cell.column.getField();\r\n\r\n\t\tif(field === this.elementField){\r\n\t\t\tthis.layoutRow(cell.row);\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar childArray = row.getData()[this.field];\r\n\t\tvar isArray = Array.isArray(childArray);\r\n\r\n\t\tvar children = isArray || (!isArray && typeof childArray === \"object\" && childArray !== null);\r\n\r\n\t\tif(!children && row.modules.dataTree && row.modules.dataTree.branchEl){\r\n\t\t\trow.modules.dataTree.branchEl.parentNode.removeChild(row.modules.dataTree.branchEl);\r\n\t\t}\r\n\r\n\t\tif(!children && row.modules.dataTree && row.modules.dataTree.controlEl){\r\n\t\t\trow.modules.dataTree.controlEl.parentNode.removeChild(row.modules.dataTree.controlEl);\r\n\t\t}\r\n\r\n\t\trow.modules.dataTree = {\r\n\t\t\tindex: row.modules.dataTree ? row.modules.dataTree.index : 0,\r\n\t\t\topen: children ? (row.modules.dataTree ? row.modules.dataTree.open : this.startOpen(row.getComponent(), 0)) : false,\r\n\t\t\tcontrolEl: row.modules.dataTree && children ? row.modules.dataTree.controlEl : false,\r\n\t\t\tbranchEl: row.modules.dataTree && children ? row.modules.dataTree.branchEl : false,\r\n\t\t\tparent: row.modules.dataTree ? row.modules.dataTree.parent : false,\r\n\t\t\tchildren:children,\r\n\t\t};\r\n\t}\r\n\r\n\treinitializeRowChildren(row){\r\n\t\tvar children = this.getTreeChildren(row, false, true);\r\n\r\n\t\tchildren.forEach(function(child){\r\n\t\t\tchild.reinitialize(true);\r\n\t\t});\r\n\t}\r\n\r\n\tlayoutRow(row){\r\n\t\tvar cell = this.elementField ? row.getCell(this.elementField) : row.getCells()[0],\r\n\t\tel = cell.getElement(),\r\n\t\tconfig = row.modules.dataTree;\r\n\r\n\t\tif(config.branchEl){\r\n\t\t\tif(config.branchEl.parentNode){\r\n\t\t\t\tconfig.branchEl.parentNode.removeChild(config.branchEl);\r\n\t\t\t}\r\n\t\t\tconfig.branchEl = false;\r\n\t\t}\r\n\r\n\t\tif(config.controlEl){\r\n\t\t\tif(config.controlEl.parentNode){\r\n\t\t\t\tconfig.controlEl.parentNode.removeChild(config.controlEl);\r\n\t\t\t}\r\n\t\t\tconfig.controlEl = false;\r\n\t\t}\r\n\r\n\t\tthis.generateControlElement(row, el);\r\n\r\n\t\trow.getElement().classList.add(\"tabulator-tree-level-\" + config.index);\r\n\r\n\t\tif(config.index){\r\n\t\t\tif(this.branchEl){\r\n\t\t\t\tconfig.branchEl = this.branchEl.cloneNode(true);\r\n\t\t\t\tel.insertBefore(config.branchEl, el.firstChild);\r\n\r\n\t\t\t\tif(this.table.rtl){\r\n\t\t\t\t\tconfig.branchEl.style.marginRight = (((config.branchEl.offsetWidth + config.branchEl.style.marginLeft) * (config.index - 1)) + (config.index * this.indent)) + \"px\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.branchEl.style.marginLeft = (((config.branchEl.offsetWidth + config.branchEl.style.marginRight) * (config.index - 1)) + (config.index * this.indent)) + \"px\";\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\r\n\t\t\t\tif(this.table.rtl){\r\n\t\t\t\t\tel.style.paddingRight = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-right')) + (config.index * this.indent) + \"px\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.style.paddingLeft = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-left')) + (config.index * this.indent) + \"px\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateControlElement(row, el){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\tel = el || row.getCells()[0].getElement(),\r\n\t\toldControl = config.controlEl;\r\n\r\n\t\tif(config.children !== false){\r\n\r\n\t\t\tif(config.open){\r\n\t\t\t\tconfig.controlEl = this.collapseEl.cloneNode(true);\r\n\t\t\t\tconfig.controlEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tthis.collapseRow(row);\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconfig.controlEl = this.expandEl.cloneNode(true);\r\n\t\t\t\tconfig.controlEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tthis.expandRow(row);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tconfig.controlEl.addEventListener(\"mousedown\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\r\n\t\t\tif(oldControl && oldControl.parentNode === el){\r\n\t\t\t\toldControl.parentNode.replaceChild(config.controlEl,oldControl);\r\n\t\t\t}else{\r\n\t\t\t\tel.insertBefore(config.controlEl, el.firstChild);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tsetDisplayIndex (index) {\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\r\n\tgetDisplayIndex () {\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\r\n\tgetRows(rows){\r\n\t\tvar output = [];\r\n\r\n\t\trows.forEach((row, i) => {\r\n\t\t\tvar config, children;\r\n\r\n\t\t\toutput.push(row);\r\n\r\n\t\t\tif(row instanceof Row){\r\n\r\n\t\t\t\trow.create();\r\n\r\n\t\t\t\tconfig = row.modules.dataTree.children;\r\n\r\n\t\t\t\tif(!config.index && config.children !== false){\r\n\t\t\t\t\tchildren = this.getChildren(row);\r\n\r\n\t\t\t\t\tchildren.forEach((child) => {\r\n\t\t\t\t\t\tchild.create();\r\n\t\t\t\t\t\toutput.push(child);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetChildren(row, allChildren){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\tchildren = [],\r\n\t\toutput = [];\r\n\r\n\t\tif(config.children !== false && (config.open || allChildren)){\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"filter\") && this.table.options.dataTreeFilter){\r\n\t\t\t\tchildren = this.table.modules.filter.filter(config.children);\r\n\t\t\t}else{\r\n\t\t\t\tchildren = config.children;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"sort\") && this.table.options.dataTreeSort){\r\n\t\t\t\tthis.table.modules.sort.sort(children);\r\n\t\t\t}\r\n\r\n\t\t\tchildren.forEach((child) => {\r\n\t\t\t\toutput.push(child);\r\n\r\n\t\t\t\tvar subChildren = this.getChildren(child);\r\n\r\n\t\t\t\tsubChildren.forEach((sub) => {\r\n\t\t\t\t\toutput.push(sub);\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgenerateChildren(row){\r\n\t\tvar children = [];\r\n\r\n\t\tvar childArray = row.getData()[this.field];\r\n\r\n\t\tif(!Array.isArray(childArray)){\r\n\t\t\tchildArray = [childArray];\r\n\t\t}\r\n\r\n\t\tchildArray.forEach((childData) => {\r\n\t\t\tvar childRow = new Row(childData || {}, this.table.rowManager);\r\n\r\n\t\t\tchildRow.create();\r\n\r\n\t\t\tchildRow.modules.dataTree.index = row.modules.dataTree.index + 1;\r\n\t\t\tchildRow.modules.dataTree.parent = row;\r\n\r\n\t\t\tif(childRow.modules.dataTree.children){\r\n\t\t\t\tchildRow.modules.dataTree.open = this.startOpen(childRow.getComponent(), childRow.modules.dataTree.index);\r\n\t\t\t}\r\n\t\t\tchildren.push(childRow);\r\n\t\t});\r\n\r\n\t\treturn children;\r\n\t}\r\n\r\n\texpandRow(row, silent){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tconfig.open = true;\r\n\r\n\t\t\trow.reinitialize();\r\n\r\n\t\t\tthis.refreshData(true);\r\n\r\n\t\t\tthis.dispatchExternal(\"dataTreeRowExpanded\", row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\t}\r\n\r\n\tcollapseRow(row){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tconfig.open = false;\r\n\r\n\t\t\trow.reinitialize();\r\n\r\n\t\t\tthis.refreshData(true);\r\n\r\n\t\t\tthis.dispatchExternal(\"dataTreeRowCollapsed\", row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\t}\r\n\r\n\ttoggleRow(row){\r\n\t\tvar config = row.modules.dataTree;\r\n\r\n\t\tif(config.children !== false){\r\n\t\t\tif(config.open){\r\n\t\t\t\tthis.collapseRow(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.expandRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tisRowExpanded(row){\r\n\t\treturn row.modules.dataTree.open;\r\n\t}\r\n\r\n\tgetTreeParent(row){\r\n\t\treturn row.modules.dataTree.parent ? row.modules.dataTree.parent.getComponent() : false;\r\n\t}\r\n\r\n\tgetFilteredTreeChildren(row){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\toutput = [], children;\r\n\r\n\t\tif(config.children){\r\n\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modExists(\"filter\") && this.table.options.dataTreeFilter){\r\n\t\t\t\tchildren = this.table.modules.filter.filter(config.children);\r\n\t\t\t}else{\r\n\t\t\t\tchildren = config.children;\r\n\t\t\t}\r\n\r\n\t\t\tchildren.forEach((childRow) => {\r\n\t\t\t\tif(childRow instanceof Row){\r\n\t\t\t\t\toutput.push(childRow);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\trowDelete(row){\r\n\t\tvar parent = row.modules.dataTree.parent,\r\n\t\tchildIndex;\r\n\r\n\t\tif(parent){\r\n\t\t\tchildIndex = this.findChildIndex(row, parent);\r\n\r\n\t\t\tif(childIndex !== false){\r\n\t\t\t\tparent.data[this.field].splice(childIndex, 1);\r\n\t\t\t}\r\n\r\n\t\t\tif(!parent.data[this.field].length){\r\n\t\t\t\tdelete parent.data[this.field];\r\n\t\t\t}\r\n\r\n\t\t\tthis.initializeRow(parent);\r\n\t\t\tthis.layoutRow(parent);\r\n\t\t}\r\n\r\n\t\tthis.refreshData(true);\r\n\t}\r\n\r\n\taddTreeChildRow(row, data, top, index){\r\n\t\tvar childIndex = false;\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(row.data[this.field])){\r\n\t\t\trow.data[this.field] = [];\r\n\r\n\t\t\trow.modules.dataTree.open = this.startOpen(row.getComponent(), row.modules.dataTree.index);\r\n\t\t}\r\n\r\n\t\tif(typeof index !== \"undefined\"){\r\n\t\t\tchildIndex = this.findChildIndex(index, row);\r\n\r\n\t\t\tif(childIndex !== false){\r\n\t\t\t\trow.data[this.field].splice((top ? childIndex : childIndex + 1), 0, data);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(childIndex === false){\r\n\t\t\tif(top){\r\n\t\t\t\trow.data[this.field].unshift(data);\r\n\t\t\t}else{\r\n\t\t\t\trow.data[this.field].push(data);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.initializeRow(row);\r\n\t\tthis.layoutRow(row);\r\n\r\n\t\tthis.refreshData(true);\r\n\t}\r\n\r\n\tfindChildIndex(subject, parent){\r\n\t\tvar match = false;\r\n\r\n\t\tif(typeof subject == \"object\"){\r\n\r\n\t\t\tif(subject instanceof Row){\r\n\t\t\t\t//subject is row element\r\n\t\t\t\tmatch = subject.data;\r\n\t\t\t}else if(subject instanceof RowComponent){\r\n\t\t\t\t//subject is public row component\r\n\t\t\t\tmatch = subject._getSelf().data;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\tif(parent.modules.dataTree){\r\n\t\t\t\t\tmatch = parent.modules.dataTree.children.find((childRow) => {\r\n\t\t\t\t\t\treturn childRow instanceof Row ? childRow.element === subject : false;\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(match){\r\n\t\t\t\t\t\tmatch = match.data;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}else if(typeof subject == \"undefined\" || subject === null){\r\n\t\t\tmatch = false\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the index of the row\r\n\t\t\tmatch = parent.data[this.field].find((row) => {\r\n\t\t\t\treturn row.data[this.table.options.index] == subject;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(match){\r\n\r\n\t\t\tif(Array.isArray(parent.data[this.field])){\r\n\t\t\t\tmatch = parent.data[this.field].indexOf(match);\r\n\t\t\t}\r\n\r\n\t\t\tif(match == -1){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//catch all for any other type of input\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tgetTreeChildren(row, component, recurse){\r\n\t\tvar config = row.modules.dataTree,\r\n\t\toutput = [];\r\n\r\n\t\tif(config.children){\r\n\r\n\t\t\tif(!Array.isArray(config.children)){\r\n\t\t\t\tconfig.children = this.generateChildren(row);\r\n\t\t\t}\r\n\r\n\t\t\tconfig.children.forEach((childRow) => {\r\n\t\t\t\tif(childRow instanceof Row){\r\n\t\t\t\t\toutput.push(component ? childRow.getComponent() : childRow);\r\n\r\n\t\t\t\t\tif(recurse){\r\n\t\t\t\t\t\toutput = output.concat(this.getTreeChildren(childRow, component, recurse));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetChildField(){\r\n\t\treturn this.field;\r\n\t}\r\n\r\n\tredrawNeeded(data){\r\n\t\treturn (this.field ? typeof data[this.field] !== \"undefined\" : false) || (this.elementField ? typeof data[this.elementField] !== \"undefined\" : false);\r\n\t}\r\n}\r\n\r\nDataTree.moduleName = \"dataTree\";\r\n\r\nexport default DataTree;","import csv from './downloaders/csv.js';\r\nimport json from './downloaders/json.js';\r\nimport pdf from './downloaders/pdf.js';\r\nimport xlsx from './downloaders/xlsx.js';\r\nimport html from './downloaders/html.js';\r\nimport jsonLines from './downloaders/jsonLines.js';\r\n\r\nexport default {\r\n\tcsv:csv,\r\n\tjson:json,\r\n\tjsonLines:jsonLines,\r\n\tpdf:pdf,\r\n\txlsx:xlsx,\r\n\thtml:html,\r\n};","export default function(list, options, setFileContents){\r\n\tvar delimiter = options && options.delimiter ? options.delimiter : \",\",\r\n\tfileContents = [],\r\n\theaders = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tvar item = [];\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"group\":\r\n\t\t\tconsole.warn(\"Download Warning - CSV downloader cannot process row groups\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tconsole.warn(\"Download Warning - CSV downloader cannot process column calculations\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"header\":\r\n\t\t\trow.columns.forEach((col, i) => {\r\n\t\t\t\tif(col && col.depth === 1){\r\n\t\t\t\t\theaders[i] = typeof col.value == \"undefined\" || col.value === null ? \"\" : ('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\trow.columns.forEach((col) => {\r\n\r\n\t\t\t\tif(col){\r\n\r\n\t\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tcol.value = JSON.stringify(col.value);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\t\tcol.value = \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\titem.push('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tfileContents.push(item.join(delimiter));\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(headers.length){\r\n\t\tfileContents.unshift(headers.join(delimiter));\r\n\t}\r\n\r\n\tfileContents = fileContents.join(\"\\n\");\r\n\r\n\tif(options.bom){\r\n\t\tfileContents = \"\\ufeff\" + fileContents;\r\n\t}\r\n\r\n\tsetFileContents(fileContents, \"text/csv\");\r\n};","export default function(list, options, setFileContents){\r\n\tvar fileContents = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tvar item = {};\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"header\":\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process row groups\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process column calculations\");\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\tif(col){\r\n\t\t\t\t\titem[col.component.getTitleDownload() || col.component.getField()] = col.value;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tfileContents.push(item);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tfileContents = JSON.stringify(fileContents, null, '\\t');\r\n\r\n\tsetFileContents(fileContents, \"application/json\");\r\n};","export default function (list, options, setFileContents) {\r\n\tconst fileContents = [];\r\n\r\n\tlist.forEach((row) => {\r\n\t\tconst item = {};\r\n\r\n\t\tswitch (row.type) {\r\n\t\t\tcase \"header\":\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process row groups\");\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process column calculations\");\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\t\trow.columns.forEach((col) => {\r\n\t\t\t\t\tif (col) {\r\n\t\t\t\t\t\titem[col.component.getTitleDownload() || col.component.getField()] = col.value;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tfileContents.push(JSON.stringify(item));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tsetFileContents(fileContents.join(\"\\n\"), \"application/x-ndjson\");\r\n};","export default function(list, options, setFileContents){\r\n\tvar header = [],\r\n\tbody = [],\r\n\tautoTableParams = {},\r\n\trowGroupStyles = options.rowGroupStyles || {\r\n\t\tfontStyle: \"bold\",\r\n\t\tfontSize: 12,\r\n\t\tcellPadding: 6,\r\n\t\tfillColor: 220,\r\n\t},\r\n\trowCalcStyles = options.rowCalcStyles || {\r\n\t\tfontStyle: \"bold\",\r\n\t\tfontSize: 10,\r\n\t\tcellPadding: 4,\r\n\t\tfillColor: 232,\r\n\t},\r\n\tjsPDFParams = options.jsPDF || {},\r\n\ttitle = options && options.title ? options.title : \"\";\r\n\r\n\tif(!jsPDFParams.orientation){\r\n\t\tjsPDFParams.orientation = options.orientation || \"landscape\";\r\n\t}\r\n\r\n\tif(!jsPDFParams.unit){\r\n\t\tjsPDFParams.unit = \"pt\";\r\n\t}\r\n\r\n\t//parse row list\r\n\tlist.forEach((row) => {\r\n\t\tvar item = {};\r\n\r\n\t\tswitch(row.type){\r\n\t\t\tcase \"header\":\r\n\t\t\theader.push(parseRow(row));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tbody.push(parseRow(row, rowGroupStyles));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\tbody.push(parseRow(row, rowCalcStyles));\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\tbody.push(parseRow(row));\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tfunction parseRow(row, styles){\r\n\t\tvar rowData = [];\r\n\r\n\t\trow.columns.forEach((col) =>{\r\n\t\t\tvar cell;\r\n\r\n\t\t\tif(col){\r\n\t\t\t\tswitch(typeof col.value){\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tcol.value = JSON.stringify(col.value);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\tcol.value = \"\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcell = {\r\n\t\t\t\t\tcontent:col.value,\r\n\t\t\t\t\tcolSpan:col.width,\r\n\t\t\t\t\trowSpan:col.height,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tif(styles){\r\n\t\t\t\t\tcell.styles = styles;\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowData.push(cell);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowData;\r\n\t}\r\n\r\n\r\n\t//configure PDF\r\n\tvar doc = new jspdf.jsPDF(jsPDFParams); //set document to landscape, better for most tables\r\n\r\n\tif(options && options.autoTable){\r\n\t\tif(typeof options.autoTable === \"function\"){\r\n\t\t\tautoTableParams = options.autoTable(doc) || {};\r\n\t\t}else{\r\n\t\t\tautoTableParams = options.autoTable;\r\n\t\t}\r\n\t}\r\n\r\n\tif(title){\r\n\t\tautoTableParams.didDrawPage = function(data) {\r\n\t\t\tdoc.text(title, 40, 30);\r\n\t\t};\r\n\t}\r\n\r\n\tautoTableParams.head = header;\r\n\tautoTableParams.body = body;\r\n\r\n\tdoc.autoTable(autoTableParams);\r\n\r\n\tif(options && options.documentProcessing){\r\n\t\toptions.documentProcessing(doc);\r\n\t}\r\n\r\n\tsetFileContents(doc.output(\"arraybuffer\"), \"application/pdf\");\r\n};","import CoreFeature from '../../../../core/CoreFeature.js';\r\n\r\nexport default function(list, options, setFileContents){\r\n\tvar self = this,\r\n\tsheetName = options.sheetName || \"Sheet1\",\r\n\tworkbook = XLSX.utils.book_new(),\r\n\ttableFeatures = new CoreFeature(this),\r\n\toutput;\r\n\r\n\tworkbook.SheetNames = [];\r\n\tworkbook.Sheets = {};\r\n\r\n\tfunction generateSheet(){\r\n\t\tvar rows = [],\r\n\t\tmerges = [],\r\n\t\tworksheet = {},\r\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 }};\r\n\r\n\t\t//parse row list\r\n\t\tlist.forEach((row, i) => {\r\n\t\t\tvar rowData = [];\r\n\r\n\t\t\trow.columns.forEach(function(col, j){\r\n\r\n\t\t\t\tif(col){\r\n\t\t\t\t\trowData.push(!(col.value instanceof Date) && typeof col.value === \"object\" ? JSON.stringify(col.value) : col.value);\r\n\r\n\t\t\t\t\tif(col.width > 1 || col.height > -1){\r\n\t\t\t\t\t\tif(col.height > 1 || col.width > 1){\r\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}});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\trowData.push(\"\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\trows.push(rowData);\r\n\t\t});\r\n\r\n\t\t//convert rows to worksheet\r\n\t\tXLSX.utils.sheet_add_aoa(worksheet, rows);\r\n\r\n\t\tworksheet['!ref'] = XLSX.utils.encode_range(range);\r\n\r\n\t\tif(merges.length){\r\n\t\t\tworksheet[\"!merges\"] = merges;\r\n\t\t}\r\n\r\n\t\treturn worksheet;\r\n\t}\r\n\r\n\tif(options.sheetOnly){\r\n\t\tsetFileContents(generateSheet());\r\n\t\treturn;\r\n\t}\r\n\r\n\tif(options.sheets){\r\n\t\tfor(var sheet in options.sheets){\r\n\r\n\t\t\tif(options.sheets[sheet] === true){\r\n\t\t\t\tworkbook.SheetNames.push(sheet);\r\n\t\t\t\tworkbook.Sheets[sheet] = generateSheet();\r\n\t\t\t}else{\r\n\r\n\t\t\t\tworkbook.SheetNames.push(sheet);\r\n\r\n\t\t\t\ttableFeatures.commsSend(options.sheets[sheet], \"download\", \"intercept\",{\r\n\t\t\t\t\ttype:\"xlsx\",\r\n\t\t\t\t\toptions:{sheetOnly:true},\r\n\t\t\t\t\tactive:self.active,\r\n\t\t\t\t\tintercept:function(data){\r\n\t\t\t\t\t\tworkbook.Sheets[sheet] = data;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tworkbook.SheetNames.push(sheetName);\r\n\t\tworkbook.Sheets[sheetName] = generateSheet();\r\n\t}\r\n\r\n\tif(options.documentProcessing){\r\n\t\tworkbook = options.documentProcessing(workbook);\r\n\t}\r\n\r\n\t//convert workbook to binary array\r\n\tfunction s2ab(s) {\r\n\t\tvar buf = new ArrayBuffer(s.length);\r\n\t\tvar view = new Uint8Array(buf);\r\n\t\tfor (var i=0; i!=s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;\r\n\t\t\treturn buf;\r\n\t}\r\n\r\n\toutput = XLSX.write(workbook, {bookType:'xlsx', bookSST:true, type: 'binary'});\r\n\r\n\tsetFileContents(s2ab(output), \"application/octet-stream\");\r\n};","export default function(list, options, setFileContents){\r\n\tif(this.modExists(\"export\", true)){\r\n\t\tsetFileContents(this.modules.export.genereateHTMLTable(list), \"text/html\");\r\n\t}\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultDownloaders from './defaults/downloaders.js';\r\n\r\nclass Download extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.registerTableOption(\"downloadReady\", function(data, blob){return blob;}); //function to manipulate download data\r\n\t\tthis.registerTableOption(\"downloadConfig\", {}); //download config\r\n\t\tthis.registerTableOption(\"downloadRowRange\", \"active\"); //restrict download to active rows only\r\n\r\n\t\tthis.registerColumnOption(\"download\");\r\n\t\tthis.registerColumnOption(\"titleDownload\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"download\", this.download.bind(this));\r\n\t\tthis.registerTableFunction(\"downloadToTab\", this.downloadToTab.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tdownloadToTab(type, filename, options, active){\r\n\t\tthis.download(type, filename, options, active, true);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\t//trigger file download\r\n\tdownload(type, filename, options, range, interceptCallback){\r\n\t\tvar downloadFunc = false;\r\n\r\n\t\tfunction buildLink(data, mime){\r\n\t\t\tif(interceptCallback){\r\n\t\t\t\tif(interceptCallback === true){\r\n\t\t\t\t\tthis.triggerDownload(data, mime, type, filename, true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tinterceptCallback(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tthis.triggerDownload(data, mime, type, filename);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(typeof type == \"function\"){\r\n\t\t\tdownloadFunc = type;\r\n\t\t}else{\r\n\t\t\tif(Download.downloaders[type]){\r\n\t\t\t\tdownloadFunc = Download.downloaders[type];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Download Error - No such download type found: \", type);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(downloadFunc){\r\n\t\t\tvar list = this.generateExportList(range);\r\n\r\n\t\t\tdownloadFunc.call(this.table, list , options || {}, buildLink.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateExportList(range){\r\n\t\tvar list = this.table.modules.export.generateExportList(this.table.options.downloadConfig, false, range || this.table.options.downloadRowRange, \"download\");\r\n\r\n\t\t//assign group header formatter\r\n\t\tvar groupHeader = this.table.options.groupHeaderDownload;\r\n\r\n\t\tif(groupHeader && !Array.isArray(groupHeader)){\r\n\t\t\tgroupHeader = [groupHeader];\r\n\t\t}\r\n\r\n\t\tlist.forEach((row) => {\r\n\t\t\tvar group;\r\n\r\n\t\t\tif(row.type === \"group\"){\r\n\t\t\t\tgroup = row.columns[0];\r\n\r\n\t\t\t\tif(groupHeader && groupHeader[row.indent]){\r\n\t\t\t\t\tgroup.value = groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn list;\r\n\t}\r\n\r\n\ttriggerDownload(data, mime, type, filename, newTab){\r\n\t\tvar element = document.createElement('a'),\r\n\t\tblob = new Blob([data],{type:mime}),\r\n\t\tfilename = filename || \"Tabulator.\" + (typeof type === \"function\" ? \"txt\" : type);\r\n\r\n\t\tblob = this.table.options.downloadReady(data, blob);\r\n\r\n\t\tif(blob){\r\n\r\n\t\t\tif(newTab){\r\n\t\t\t\twindow.open(window.URL.createObjectURL(blob));\r\n\t\t\t}else{\r\n\t\t\t\tif(navigator.msSaveOrOpenBlob){\r\n\t\t\t\t\tnavigator.msSaveOrOpenBlob(blob, filename);\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.setAttribute('href', window.URL.createObjectURL(blob));\r\n\r\n\t\t\t\t\t//set file title\r\n\t\t\t\t\telement.setAttribute('download', filename);\r\n\r\n\t\t\t\t\t//trigger download\r\n\t\t\t\t\telement.style.display = 'none';\r\n\t\t\t\t\tdocument.body.appendChild(element);\r\n\t\t\t\t\telement.click();\r\n\r\n\t\t\t\t\t//remove temporary link element\r\n\t\t\t\t\tdocument.body.removeChild(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"downloadComplete\");\r\n\t\t}\r\n\t}\r\n\r\n\tcommsReceived(table, action, data){\r\n\t\tswitch(action){\r\n\t\t\tcase \"intercept\":\r\n\t\t\tthis.download(data.type, \"\", data.options, data.active, data.intercept);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nDownload.moduleName = \"download\";\r\n\r\n//load defaults\r\nDownload.downloaders = defaultDownloaders;\r\n\r\nexport default Download;","export default function maskInput(el, options){\r\n\tvar mask = options.mask,\r\n\tmaskLetter = typeof options.maskLetterChar !== \"undefined\" ? options.maskLetterChar : \"A\",\r\n\tmaskNumber = typeof options.maskNumberChar !== \"undefined\" ? options.maskNumberChar : \"9\",\r\n\tmaskWildcard = typeof options.maskWildcardChar !== \"undefined\" ? options.maskWildcardChar : \"*\",\r\n\tsuccess = false;\r\n\r\n\tfunction fillSymbols(index){\r\n\t\tvar symbol = mask[index];\r\n\t\tif(typeof symbol !== \"undefined\" && symbol !== maskWildcard && symbol !== maskLetter && symbol !== maskNumber){\r\n\t\t\tel.value = el.value + \"\" + symbol;\r\n\t\t\tfillSymbols(index+1);\r\n\t\t}\r\n\t}\r\n\r\n\tel.addEventListener(\"keydown\", (e) => {\r\n\t\tvar index = el.value.length,\r\n\t\tchar = e.key;\r\n\r\n\t\tif(e.keyCode > 46){\r\n\t\t\tif(index >= mask.length){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tsuccess = false;\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\tswitch(mask[index]){\r\n\t\t\t\t\tcase maskLetter:\r\n\t\t\t\t\tif(char.toUpperCase() == char.toLowerCase()){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase maskNumber:\r\n\t\t\t\t\tif(isNaN(char)){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase maskWildcard:\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(char !== mask[index]){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\r\n\t\treturn;\r\n\t});\r\n\r\n\tel.addEventListener(\"keyup\", (e) => {\r\n\t\tif(e.keyCode > 46){\r\n\t\t\tif(options.maskAutoFill){\r\n\t\t\t\tfillSymbols(el.value.length);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\r\n\tif(!el.placeholder){\r\n\t\tel.placeholder = mask;\r\n\t}\r\n\r\n\tif(options.maskAutoFill){\r\n\t\tfillSymbols(el.value.length);\r\n\t}\r\n}","import input from './editors/input.js';\r\nimport textarea from './editors/textarea.js';\r\nimport number from './editors/number.js';\r\nimport range from './editors/range.js';\r\nimport select from './editors/select.js';\r\nimport autocomplete from './editors/autocomplete.js';\r\nimport star from './editors/star.js';\r\nimport progress from './editors/progress.js';\r\nimport tickCross from './editors/tickCross.js';\r\n\r\nexport default {\r\n\tinput:input,\r\n\ttextarea:textarea,\r\n number:number,\r\n range:range,\r\n\tselect:select,\r\n\tautocomplete:autocomplete,\r\n\tstar:star,\r\n\tprogress:progress,\r\n\ttickCross:tickCross,\r\n};","import maskInput from '../../inputMask.js';\r\n\r\n//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", editorParams.search ? \"search\" : \"text\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t});\r\n\r\n\tfunction onChange(e){\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\r\n\t\t\tif(success(input.value)){\r\n\t\t\t\tcellValue = input.value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\t// case 9:\r\n\t\t\tcase 13:\r\n\t\t\tonChange(e);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\te.stopPropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\treturn input;\r\n};","import maskInput from '../../inputMask.js';\r\n\r\n//resizable text area element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n var self = this,\r\n cellValue = cell.getValue(),\r\n vertNav = editorParams.verticalNavigation || \"hybrid\",\r\n value = String(cellValue !== null && typeof cellValue !== \"undefined\" ? cellValue : \"\"),\r\n count = (value.match(/(?:\\r\\n|\\r|\\n)/g) || []).length + 1,\r\n input = document.createElement(\"textarea\"),\r\n scrollHeight = 0;\r\n\r\n //create and style input\r\n input.style.display = \"block\";\r\n input.style.padding = \"2px\";\r\n input.style.height = \"100%\";\r\n input.style.width = \"100%\";\r\n input.style.boxSizing = \"border-box\";\r\n input.style.whiteSpace = \"pre-wrap\";\r\n input.style.resize = \"none\";\r\n\r\n if(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n for (let key in editorParams.elementAttributes){\r\n if(key.charAt(0) == \"+\"){\r\n key = key.slice(1);\r\n input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n }else{\r\n input.setAttribute(key, editorParams.elementAttributes[key]);\r\n }\r\n }\r\n }\r\n\r\n input.value = value;\r\n\r\n onRendered(function(){\r\n input.focus({preventScroll: true});\r\n input.style.height = \"100%\";\r\n\r\n input.scrollHeight;\r\n input.style.height = input.scrollHeight + \"px\";\r\n cell.getRow().normalizeHeight();\r\n });\r\n\r\n function onChange(e){\r\n\r\n if(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\r\n\r\n if(success(input.value)){\r\n cellValue = input.value; //persist value if successfully validated incase editor is used as header filter\r\n }\r\n\r\n setTimeout(function(){\r\n cell.getRow().normalizeHeight();\r\n },300)\r\n }else{\r\n cancel();\r\n }\r\n }\r\n\r\n //submit new value on blur or change\r\n input.addEventListener(\"change\", onChange);\r\n input.addEventListener(\"blur\", onChange);\r\n\r\n input.addEventListener(\"keyup\", function(){\r\n\r\n input.style.height = \"\";\r\n\r\n var heightNow = input.scrollHeight;\r\n\r\n input.style.height = heightNow + \"px\";\r\n\r\n if(heightNow != scrollHeight){\r\n scrollHeight = heightNow;\r\n cell.getRow().normalizeHeight();\r\n }\r\n });\r\n\r\n input.addEventListener(\"keydown\", function(e){\r\n\r\n switch(e.keyCode){\r\n case 27:\r\n cancel();\r\n break;\r\n\r\n case 38: //up arrow\r\n if(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart)){\r\n e.stopImmediatePropagation();\r\n e.stopPropagation();\r\n }\r\n\r\n break;\r\n\r\n case 40: //down arrow\r\n if(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart !== input.value.length)){\r\n e.stopImmediatePropagation();\r\n e.stopPropagation();\r\n }\r\n break;\r\n\r\n case 35:\r\n case 36:\r\n e.stopPropagation();\r\n break;\r\n }\r\n });\r\n\r\n if(editorParams.mask){\r\n maskInput(input, editorParams);\r\n }\r\n\r\n return input;\r\n};","import maskInput from '../../inputMask.js';\r\n\r\n//input element with type of number\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar cellValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", \"number\");\r\n\r\n\tif(typeof editorParams.max != \"undefined\"){\r\n\t\tinput.setAttribute(\"max\", editorParams.max);\r\n\t}\r\n\r\n\tif(typeof editorParams.min != \"undefined\"){\r\n\t\tinput.setAttribute(\"min\", editorParams.min);\r\n\t}\r\n\r\n\tif(typeof editorParams.step != \"undefined\"){\r\n\t\tinput.setAttribute(\"step\", editorParams.step);\r\n\t}\r\n\r\n\t//create and style input\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\r\n\tvar blurFunc = function(e){\r\n\t\tonChange();\r\n\t};\r\n\r\n\tonRendered(function () {\r\n\t\t//submit new value on blur\r\n\t\tinput.removeEventListener(\"blur\", blurFunc);\r\n\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\r\n\t\t//submit new value on blur\r\n\t\tinput.addEventListener(\"blur\", blurFunc);\r\n\t});\r\n\r\n\tfunction onChange(){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(!isNaN(value) && value !==\"\"){\r\n\t\t\tvalue = Number(value);\r\n\t\t}\r\n\r\n\t\tif(value !== cellValue){\r\n\t\t\tif(success(value)){\r\n\t\t\t\tcellValue = value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 13:\r\n\t\t\t// case 9:\r\n\t\t\tonChange();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tcase 40: //down arrow\r\n\t\t\tif(vertNav == \"editor\"){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\te.stopPropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\treturn input;\r\n};","//input element with type of number\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\r\n\tinput.setAttribute(\"type\", \"range\");\r\n\r\n\tif (typeof editorParams.max != \"undefined\") {\r\n\t\tinput.setAttribute(\"max\", editorParams.max);\r\n\t}\r\n\r\n\tif (typeof editorParams.min != \"undefined\") {\r\n\t\tinput.setAttribute(\"min\", editorParams.min);\r\n\t}\r\n\r\n\tif (typeof editorParams.step != \"undefined\") {\r\n\t\tinput.setAttribute(\"step\", editorParams.step);\r\n\t}\r\n\r\n\t//create and style input\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\r\n\tonRendered(function () {\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t});\r\n\r\n\tfunction onChange(){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(!isNaN(value) && value !==\"\"){\r\n\t\t\tvalue = Number(value);\r\n\t\t}\r\n\r\n\t\tif(value != cellValue){\r\n\t\t\tif(success(value)){\r\n\t\t\t\tcellValue = value; //persist value if successfully validated incase editor is used as header filter\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tonChange();\r\n\t});\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 13:\r\n\t\t\t// case 9:\r\n\t\t\tonChange();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\treturn input;\r\n};","import Helpers from '../../../../core/tools/Helpers.js';\r\n\r\n//dropdown select editor\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\tcellEl = cell.getElement(),\r\n\tinitialValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinitialDisplayValue = typeof initialValue !== \"undefined\" || initialValue === null ? (Array.isArray(initialValue) ? initialValue : [initialValue]) : (typeof editorParams.defaultValue !== \"undefined\" ? editorParams.defaultValue : []),\r\n\tinput = document.createElement(\"input\"),\r\n\tlistEl = document.createElement(\"div\"),\r\n\tmultiselect = editorParams.multiselect,\r\n\tdataItems = [],\r\n\tcurrentItem = {},\r\n\tdisplayItems = [],\r\n\tcurrentItems = [],\r\n\tblurable = true,\r\n\tblockListShow = false,\r\n\tsearchWord = \"\",\r\n\tsearchWordTimeout = null;\r\n\r\n\tif(Array.isArray(editorParams) || (!Array.isArray(editorParams) && typeof editorParams === \"object\" && !editorParams.values)){\r\n\t\tconsole.warn(\"DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object\");\r\n\t\teditorParams = {values:editorParams};\r\n\t}\r\n\r\n\tfunction getUniqueColumnValues(field){\r\n\t\tvar output = {},\r\n\t\tdata = self.table.getData(),\r\n\t\tcolumn;\r\n\r\n\t\tif(field){\r\n\t\t\tcolumn = self.table.columnManager.getColumnByField(field);\r\n\t\t}else{\r\n\t\t\tcolumn = cell.getColumn()._getSelf();\r\n\t\t}\r\n\r\n\t\tif(column){\r\n\t\t\tdata.forEach(function(row){\r\n\t\t\t\tvar val = column.getFieldValue(row);\r\n\r\n\t\t\t\tif(val !== null && typeof val !== \"undefined\" && val !== \"\"){\r\n\t\t\t\t\toutput[val] = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"unable to find matching column to create select lookup list:\", field);\r\n\t\t}\r\n\r\n\t\treturn Object.keys(output);\r\n\t}\r\n\r\n\tfunction parseItems(inputValues, curentValues){\r\n\t\tvar dataList = [];\r\n\t\tvar displayList = [];\r\n\r\n\t\tfunction processComplexListItem(item){\r\n\t\t\tvar item = {\r\n\t\t\t\tlabel:item.label,\r\n\t\t\t\tvalue:item.value,\r\n\t\t\t\titemParams:item.itemParams,\r\n\t\t\t\telementAttributes: item.elementAttributes,\r\n\t\t\t\telement:false,\r\n\t\t\t};\r\n\r\n\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t// }\r\n\r\n\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\tsetItem(item);\r\n\t\t\t}\r\n\r\n\t\t\tdataList.push(item);\r\n\t\t\tdisplayList.push(item);\r\n\r\n\t\t\treturn item;\r\n\t\t}\r\n\r\n\t\tif(typeof inputValues == \"function\"){\r\n\t\t\tinputValues = inputValues(cell);\r\n\t\t}\r\n\r\n\t\tif(Array.isArray(inputValues)){\r\n\t\t\tinputValues.forEach(function(value){\r\n\t\t\t\tvar item;\r\n\r\n\t\t\t\tif(typeof value === \"object\"){\r\n\r\n\t\t\t\t\tif(value.options){\r\n\t\t\t\t\t\titem = {\r\n\t\t\t\t\t\t\tlabel:value.label,\r\n\t\t\t\t\t\t\tgroup:true,\r\n\t\t\t\t\t\t\titemParams:value.itemParams,\r\n\t\t\t\t\t\t\telementAttributes:value.elementAttributes,\r\n\t\t\t\t\t\t\telement:false,\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\tdisplayList.push(item);\r\n\r\n\t\t\t\t\t\tvalue.options.forEach(function(item){\r\n\t\t\t\t\t\t\tprocessComplexListItem(item);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tprocessComplexListItem(value);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\titem = {\r\n\t\t\t\t\t\tlabel:value,\r\n\t\t\t\t\t\tvalue:value,\r\n\t\t\t\t\t\telement:false,\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t\t\t// }\r\n\r\n\t\t\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\t\t\tsetItem(item);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdataList.push(item);\r\n\t\t\t\t\tdisplayList.push(item);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tfor(var key in inputValues){\r\n\t\t\t\tvar item = {\r\n\t\t\t\t\tlabel:inputValues[key],\r\n\t\t\t\t\tvalue:key,\r\n\t\t\t\t\telement:false,\r\n\t\t\t\t};\r\n\r\n\t\t\t\t// if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){\r\n\t\t\t\t// \tsetCurrentItem(item);\r\n\t\t\t\t// }\r\n\r\n\t\t\t\tif(curentValues.indexOf(item.value) > -1){\r\n\t\t\t\t\tsetItem(item);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdataList.push(item);\r\n\t\t\t\tdisplayList.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(editorParams.sortValuesList){\r\n\t\t\tdataList.sort((a, b) => {\r\n\t\t\t\treturn a.label < b.label ? -1 : (a.label > b.label ? 1 : 0);\r\n\t\t\t});\r\n\r\n\t\t\tdisplayList.sort((a, b) => {\r\n\t\t\t\treturn a.label < b.label ? -1 : (a.label > b.label ? 1 : 0);\r\n\t\t\t});\r\n\r\n\t\t\tif(editorParams.sortValuesList !== \"asc\"){\r\n\t\t\t\tdataList.reverse();\r\n\t\t\t\tdisplayList.reverse();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataItems = dataList;\r\n\t\tdisplayItems = displayList;\r\n\r\n\t\tfillList();\r\n\t}\r\n\r\n\tfunction fillList(){\r\n\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\r\n\t\tdisplayItems.forEach(function(item){\r\n\r\n\t\t\tvar el = item.element;\r\n\r\n\t\t\tif(!el){\r\n\t\t\t\tel = document.createElement(\"div\");\r\n\t\t\t\titem.label = editorParams.listItemFormatter ? editorParams.listItemFormatter(item.value, item.label, cell, el, item.itemParams) : item.label;\r\n\t\t\t\tif(item.group){\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-select-list-group\");\r\n\t\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\t\tel.innerHTML = item.label === \"\" ? \" \" : item.label;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-select-list-item\");\r\n\t\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\t\tel.innerHTML = item.label === \"\" ? \" \" : item.label;\r\n\r\n\t\t\t\t\tel.addEventListener(\"click\", function(){\r\n\t\t\t\t\t\tblockListShow = true;\r\n\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tblockListShow = false;\r\n\t\t\t\t\t\t}, 10);\r\n\r\n\t\t\t\t\t\t// setCurrentItem(item);\r\n\t\t\t\t\t\t// chooseItem();\r\n\t\t\t\t\t\tif(multiselect){\r\n\t\t\t\t\t\t\ttoggleItem(item);\r\n\t\t\t\t\t\t\tinput.focus();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tchooseItem(item);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t// if(item === currentItem){\r\n\t\t\t\t\t// \tel.classList.add(\"active\");\r\n\t\t\t\t\t// }\r\n\r\n\t\t\t\t\tif(currentItems.indexOf(item) > -1){\r\n\t\t\t\t\t\tel.classList.add(\"active\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(item.elementAttributes && typeof item.elementAttributes == \"object\"){\r\n\t\t\t\t\tfor (let key in item.elementAttributes){\r\n\t\t\t\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\t\t\t\tkey = key.slice(1);\r\n\t\t\t\t\t\t\tel.setAttribute(key, input.getAttribute(key) + item.elementAttributes[\"+\" + key]);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tel.setAttribute(key, item.elementAttributes[key]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tel.addEventListener(\"mousedown\", function(){\r\n\t\t\t\t\tblurable = false;\r\n\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tblurable = true;\r\n\t\t\t\t\t}, 10);\r\n\t\t\t\t});\r\n\r\n\t\t\t\titem.element = el;\r\n\r\n\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(el);\r\n\t\t});\r\n\t}\r\n\r\n\r\n\tfunction setCurrentItem(item, active){\r\n\r\n\t\tif(!multiselect && currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"active\");\r\n\t\t}\r\n\r\n\t\tif(currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"focused\");\r\n\t\t}\r\n\r\n\t\tcurrentItem = item;\r\n\r\n\t\tif(item.element){\r\n\t\t\titem.element.classList.add(\"focused\");\r\n\t\t\tif(active){\r\n\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(item && item.element && item.element.scrollIntoView){\r\n\t\t\titem.element.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'start'});\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t// function chooseItem(){\r\n\t// \thideList();\r\n\r\n\t// \tif(initialValue !== currentItem.value){\r\n\t// \t\tinitialValue = currentItem.value;\r\n\t// \t\tsuccess(currentItem.value);\r\n\t// \t}else{\r\n\t// \t\tcancel();\r\n\t// \t}\r\n\t// }\r\n\r\n\tfunction setItem(item) {\r\n\t\tvar index = currentItems.indexOf(item);\r\n\r\n\t\tif(index == -1){\r\n\t\t\tcurrentItems.push(item);\r\n\t\t\tsetCurrentItem(item, true);\r\n\t\t}\r\n\r\n\t\tfillInput();\r\n\t}\r\n\r\n\tfunction unsetItem(index) {\r\n\t\tvar item = currentItems[index];\r\n\r\n\t\tif(index > -1){\r\n\t\t\tcurrentItems.splice(index, 1);\r\n\t\t\tif(item.element){\r\n\t\t\t\titem.element.classList.remove(\"active\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction toggleItem(item) {\r\n\t\tif(!item){\r\n\t\t\titem = currentItem;\r\n\t\t}\r\n\r\n\t\tvar index = currentItems.indexOf(item);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tunsetItem(index);\r\n\t\t}else{\r\n\t\t\tif(multiselect !== true && currentItems.length >= multiselect){\r\n\t\t\t\tunsetItem(0);\r\n\t\t\t}\r\n\r\n\t\t\tsetItem(item);\r\n\t\t}\r\n\r\n\t\tfillInput();\r\n\r\n\t}\r\n\r\n\tfunction chooseItem(item){\r\n\t\thideList();\r\n\r\n\t\tif(!item){\r\n\t\t\titem = currentItem;\r\n\t\t}\r\n\r\n\t\tif(item){\r\n\t\t\tinput.value = item.label;\r\n\t\t\tsuccess(item.value);\r\n\t\t}\r\n\r\n\t\tinitialDisplayValue = [item.value];\r\n\t}\r\n\r\n\r\n\tfunction chooseItems(silent){\r\n\t\tif(!silent){\r\n\t\t\thideList();\r\n\t\t}\r\n\r\n\t\tvar output = [];\r\n\r\n\t\tcurrentItems.forEach((item) => {\r\n\t\t\toutput.push(item.value);\r\n\t\t});\r\n\r\n\t\tinitialDisplayValue = output;\r\n\r\n\t\tsuccess(output);\r\n\t}\r\n\r\n\tfunction fillInput(){\r\n\t\tvar output = [];\r\n\r\n\t\tcurrentItems.forEach((item) => {\r\n\t\t\toutput.push(item.label);\r\n\t\t});\r\n\r\n\t\tinput.value = output.join(\", \");\r\n\r\n\t\tif(self.currentCell === false){\r\n\t\t\tchooseItems(true);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tfunction unsetItems() {\r\n\r\n\t\tvar len = currentItems.length;\r\n\r\n\t\tfor(let i = 0; i < len; i++){\r\n\t\t\tunsetItem(0);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction cancelItem(){\r\n\t\thideList();\r\n\t\tcancel();\r\n\t}\r\n\r\n\tfunction showList(){\r\n\t\tcurrentItems = [];\r\n\r\n\t\tif(!listEl.parentNode){\r\n\t\t\tif(editorParams.values === true){\r\n\t\t\t\tparseItems(getUniqueColumnValues(), initialDisplayValue);\r\n\t\t\t}else if(typeof editorParams.values === \"string\"){\r\n\t\t\t\tparseItems(getUniqueColumnValues(editorParams.values), initialDisplayValue);\r\n\t\t\t}else{\r\n\t\t\t\tparseItems(editorParams.values || [], initialDisplayValue);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tvar offset = Helpers.elOffset(cellEl);\r\n\r\n\t\t\tlistEl.style.minWidth = cellEl.offsetWidth + \"px\";\r\n\r\n\t\t\tlistEl.style.top = (offset.top + cellEl.offsetHeight) + \"px\";\r\n\t\t\tlistEl.style.left = offset.left + \"px\";\r\n\r\n\r\n\t\t\tlistEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tblurable = false;\r\n\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tblurable = true;\r\n\t\t\t\t}, 10);\r\n\t\t\t});\r\n\r\n\t\t\tdocument.body.appendChild(listEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction hideList(){\r\n\t\tif(listEl.parentNode){\r\n\t\t\tlistEl.parentNode.removeChild(listEl);\r\n\t\t}\r\n\r\n\t\tremoveScrollListener();\r\n\t}\r\n\r\n\tfunction removeScrollListener() {\r\n\t\tself.table.rowManager.element.removeEventListener(\"scroll\", cancelItem);\r\n\t}\r\n\r\n\tfunction scrollTovalue(char){\r\n\r\n\t\tclearTimeout(searchWordTimeout);\r\n\r\n\t\tvar character = String.fromCharCode(event.keyCode).toLowerCase();\r\n\t\tsearchWord += character.toLowerCase();\r\n\r\n\t\tvar match = dataItems.find((item) => {\r\n\t\t\treturn typeof item.label !== \"undefined\" && item.label.toLowerCase().startsWith(searchWord);\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tsetCurrentItem(match, !multiselect);\r\n\t\t}\r\n\r\n\t\tsearchWordTimeout = setTimeout(() => {\r\n\t\t\tsearchWord = \"\";\r\n\t\t}, 800)\r\n\t}\r\n\r\n\t//style input\r\n\tinput.setAttribute(\"type\", \"text\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\tinput.style.cursor = \"default\";\r\n\tinput.readOnly = (this.currentCell != false);\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = typeof initialValue !== \"undefined\" || initialValue === null ? initialValue : \"\";\r\n\r\n\t// if(editorParams.values === true){\r\n\t// \tparseItems(getUniqueColumnValues(), initialValue);\r\n\t// }else if(typeof editorParams.values === \"string\"){\r\n\t// \tparseItems(getUniqueColumnValues(editorParams.values), initialValue);\r\n\t// }else{\r\n\t// \tparseItems(editorParams.values || [], initialValue);\r\n\t// }\r\n\r\n\tinput.addEventListener(\"search\", function(e){\r\n\t\tif(!input.value){\r\n\t\t\tunsetItems();\r\n\t\t\tchooseItems();\r\n\t\t}\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tvar index;\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tindex = dataItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index > 0){\r\n\t\t\t\t\tsetCurrentItem(dataItems[index - 1], !multiselect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 40: //down arrow\r\n\t\t\tindex = dataItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index < dataItems.length - 1)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index < dataItems.length - 1){\r\n\t\t\t\t\tif(index == -1){\r\n\t\t\t\t\t\tsetCurrentItem(dataItems[0], !multiselect);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsetCurrentItem(dataItems[index + 1], !multiselect);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\t// chooseItem();\r\n\r\n\t\t\tif(multiselect){\r\n\t\t\t\ttoggleItem();\r\n\t\t\t}else{\r\n\t\t\t\tchooseItem();\r\n\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancelItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 9: //tab\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tif(self.currentCell === false){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tif(e.keyCode >= 38 && e.keyCode <= 90){\r\n\t\t\t\tscrollTovalue(e.keyCode);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tif(blurable){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tchooseItems();\r\n\t\t\t}else{\r\n\t\t\t\tcancelItem();\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"focus\", function(e){\r\n\t\tif(!blockListShow){\r\n\t\t\tshowList();\r\n\t\t}\r\n\t});\r\n\r\n\t//style list element\r\n\tlistEl = document.createElement(\"div\");\r\n\tlistEl.classList.add(\"tabulator-edit-select-list\");\r\n\r\n\tonRendered(function(){\r\n\t\tinput.style.height = \"100%\";\r\n\t\tinput.focus({preventScroll: true});\r\n\t});\r\n\r\n\tsetTimeout(() => {\r\n\t\tthis.table.rowManager.element.addEventListener(\"scroll\", cancelItem);\r\n\t}, 10);\r\n\r\n\treturn input;\r\n};","import Helpers from '../../../../core/tools/Helpers.js';\r\nimport maskInput from '../../inputMask.js';\r\n\r\n//autocomplete\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\tcellEl = cell.getElement(),\r\n\tinitialValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"editor\",\r\n\tinitialDisplayValue = typeof initialValue !== \"undefined\" || initialValue === null ? initialValue : (typeof editorParams.defaultValue !== \"undefined\" ? editorParams.defaultValue : \"\"),\r\n\tinput = document.createElement(\"input\"),\r\n\tlistEl = document.createElement(\"div\"),\r\n\tallItems = [],\r\n\tdisplayItems = [],\r\n\tvalues = [],\r\n\tcurrentItem = false,\r\n\tblurable = true,\r\n\tuniqueColumnValues = false;\r\n\r\n\t//style input\r\n\tinput.setAttribute(\"type\", \"search\");\r\n\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//style list element\r\n\tlistEl.classList.add(\"tabulator-edit-select-list\");\r\n\r\n\tlistEl.addEventListener(\"mousedown\", function(e){\r\n\t\tblurable = false;\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tblurable = true;\r\n\t\t}, 10);\r\n\t});\r\n\r\n\r\n\tfunction genUniqueColumnValues(){\r\n\t\tif(editorParams.values === true){\r\n\t\t\tuniqueColumnValues = getUniqueColumnValues();\r\n\t\t}else if(typeof editorParams.values === \"string\"){\r\n\t\t\tuniqueColumnValues = getUniqueColumnValues(editorParams.values);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getUniqueColumnValues(field){\r\n\t\tvar output = {},\r\n\t\tdata = self.table.getData(),\r\n\t\tcolumn;\r\n\r\n\t\tif(field){\r\n\t\t\tcolumn = self.table.columnManager.getColumnByField(field);\r\n\t\t}else{\r\n\t\t\tcolumn = cell.getColumn()._getSelf();\r\n\t\t}\r\n\r\n\t\tif(column){\r\n\t\t\tdata.forEach(function(row){\r\n\t\t\t\tvar val = column.getFieldValue(row);\r\n\r\n\t\t\t\tif(val !== null && typeof val !== \"undefined\" && val !== \"\"){\r\n\t\t\t\t\toutput[val] = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(editorParams.sortValuesList){\r\n\t\t\t\tif(editorParams.sortValuesList == \"asc\"){\r\n\t\t\t\t\toutput = Object.keys(output).sort();\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput = Object.keys(output).sort().reverse();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\toutput = Object.keys(output);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"unable to find matching column to create autocomplete lookup list:\", field);\r\n\t\t}\r\n\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tfunction filterList(term, intialLoad){\r\n\t\tvar matches = [],\r\n\t\tvalues, items, searchEl;\r\n\r\n\t\t//lookup base values list\r\n\t\tif(uniqueColumnValues){\r\n\t\t\tvalues = uniqueColumnValues;\r\n\t\t}else{\r\n\t\t\tvalues = editorParams.values || [];\r\n\t\t}\r\n\r\n\t\tif(editorParams.searchFunc){\r\n\t\t\tmatches = editorParams.searchFunc(term, values);\r\n\r\n\t\t\tif(matches instanceof Promise){\r\n\r\n\t\t\t\taddNotice(typeof editorParams.searchingPlaceholder !== \"undefined\" ? editorParams.searchingPlaceholder : \"Searching...\");\r\n\r\n\t\t\t\tmatches.then((result) => {\r\n\t\t\t\t\tfillListIfNotEmpty(parseItems(result), intialLoad);\r\n\t\t\t\t}).catch((err) => {\r\n\t\t\t\t\tconsole.err(\"error in autocomplete search promise:\", err);\r\n\t\t\t\t});\r\n\r\n\t\t\t}else{\r\n\t\t\t\tfillListIfNotEmpty(parseItems(matches), intialLoad);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\titems = parseItems(values);\r\n\r\n\t\t\tif(term === \"\"){\r\n\t\t\t\tif(editorParams.showListOnEmpty){\r\n\t\t\t\t\tmatches = items;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\titems.forEach(function(item){\r\n\t\t\t\t\tif(item.value !== null || typeof item.value !== \"undefined\"){\r\n\t\t\t\t\t\tif(String(item.value).toLowerCase().indexOf(String(term).toLowerCase()) > -1 || String(item.title).toLowerCase().indexOf(String(term).toLowerCase()) > -1){\r\n\t\t\t\t\t\t\tmatches.push(item);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tfillListIfNotEmpty(matches, intialLoad);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction addNotice(notice){\r\n\t\tvar searchEl = document.createElement(\"div\");\r\n\r\n\t\tclearList();\r\n\r\n\t\tif(notice !== false){\r\n\t\t\tsearchEl.classList.add(\"tabulator-edit-select-list-notice\");\r\n\t\t\tsearchEl.tabIndex = 0;\r\n\r\n\t\t\tif(notice instanceof Node){\r\n\t\t\t\tsearchEl.appendChild(notice);\r\n\t\t\t}else{\r\n\t\t\t\tsearchEl.innerHTML = notice;\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(searchEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction parseItems(inputValues){\r\n\t\tvar itemList = [];\r\n\r\n\t\tif(Array.isArray(inputValues)){\r\n\t\t\tinputValues.forEach(function(value){\r\n\r\n\t\t\t\tvar item = {};\r\n\r\n\t\t\t\tif(typeof value === \"object\"){\r\n\t\t\t\t\titem.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value.value, value.label) : value.label;\r\n\t\t\t\t\titem.value = value.value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\titem.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value;\r\n\t\t\t\t\titem.value = value;\r\n\t\t\t\t}\r\n\r\n\t\t\t\titemList.push(item);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tfor(var key in inputValues){\r\n\t\t\t\tvar item = {\r\n\t\t\t\t\ttitle:editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : inputValues[key],\r\n\t\t\t\t\tvalue:key,\r\n\t\t\t\t};\r\n\r\n\t\t\t\titemList.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn itemList;\r\n\t}\r\n\r\n\tfunction clearList(){\r\n\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\t}\r\n\r\n\tfunction fillListIfNotEmpty(items, intialLoad){\r\n\t\tif(items.length){\r\n\t\t\tfillList(items, intialLoad);\r\n\t\t}else{\r\n\t\t\tif(editorParams.emptyPlaceholder){\r\n\t\t\t\taddNotice(editorParams.emptyPlaceholder);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fillList(items, intialLoad){\r\n\t\tvar current = false;\r\n\r\n\t\tclearList();\r\n\r\n\t\tdisplayItems = items;\r\n\r\n\t\tdisplayItems.forEach(function(item){\r\n\t\t\tvar el = item.element;\r\n\r\n\t\t\tif(!el){\r\n\t\t\t\tel = document.createElement(\"div\");\r\n\t\t\t\tel.classList.add(\"tabulator-edit-select-list-item\");\r\n\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\tel.innerHTML = item.title;\r\n\r\n\t\t\t\tel.addEventListener(\"click\", function(e){\r\n\t\t\t\t\tsetCurrentItem(item);\r\n\t\t\t\t\tchooseItem();\r\n\t\t\t\t});\r\n\r\n\t\t\t\tel.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\t\tblurable = false;\r\n\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tblurable = true;\r\n\t\t\t\t\t}, 10);\r\n\t\t\t\t});\r\n\r\n\t\t\t\titem.element = el;\r\n\r\n\t\t\t\tif(intialLoad && item.value == initialValue){\r\n\t\t\t\t\tinput.value = item.title;\r\n\t\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t\t\tcurrent = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(item === currentItem){\r\n\t\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t\t\tcurrent = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlistEl.appendChild(el);\r\n\t\t});\r\n\r\n\t\tif(!current){\r\n\t\t\tsetCurrentItem(false);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction chooseItem(){\r\n\t\thideList();\r\n\r\n\t\tif(currentItem){\r\n\t\t\tif(initialValue !== currentItem.value){\r\n\t\t\t\tinitialValue = currentItem.value;\r\n\t\t\t\tinput.value = currentItem.title;\r\n\t\t\t\tsuccess(currentItem.value);\r\n\t\t\t}else{\r\n\t\t\t\tcancel();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(editorParams.freetext){\r\n\t\t\t\tinitialValue = input.value;\r\n\t\t\t\tsuccess(input.value);\r\n\t\t\t}else{\r\n\t\t\t\tif(editorParams.allowEmpty && input.value === \"\"){\r\n\t\t\t\t\tinitialValue = input.value;\r\n\t\t\t\t\tsuccess(input.value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcancel();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction showList(){\r\n\t\tif(!listEl.parentNode){\r\n\t\t\twhile(listEl.firstChild) listEl.removeChild(listEl.firstChild);\r\n\r\n\t\t\tvar offset = Helpers.elOffset(cellEl);\r\n\r\n\t\t\tlistEl.style.minWidth = cellEl.offsetWidth + \"px\";\r\n\r\n\t\t\tlistEl.style.top = (offset.top + cellEl.offsetHeight) + \"px\";\r\n\t\t\tlistEl.style.left = offset.left + \"px\";\r\n\t\t\tdocument.body.appendChild(listEl);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setCurrentItem(item, showInputValue){\r\n\t\tif(currentItem && currentItem.element){\r\n\t\t\tcurrentItem.element.classList.remove(\"active\");\r\n\t\t}\r\n\r\n\t\tcurrentItem = item;\r\n\r\n\t\tif(item && item.element){\r\n\t\t\titem.element.classList.add(\"active\");\r\n\t\t}\r\n\r\n\t\tif(item && item.element && item.element.scrollIntoView){\r\n\t\t\titem.element.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'start'});\r\n\t\t}\r\n\t}\r\n\r\n\tfunction hideList(){\r\n\t\tif(listEl.parentNode){\r\n\t\t\tlistEl.parentNode.removeChild(listEl);\r\n\t\t}\r\n\r\n\t\tremoveScrollListener();\r\n\t}\r\n\r\n\r\n\tfunction cancelItem(){\r\n\t\thideList();\r\n\t\tcancel();\r\n\t}\r\n\r\n\tfunction removeScrollListener() {\r\n\t\tself.table.rowManager.element.removeEventListener(\"scroll\", cancelItem);\r\n\t}\r\n\r\n\t//allow key based navigation\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tvar index;\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tindex = displayItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index)){\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index > 0){\r\n\t\t\t\t\tsetCurrentItem(displayItems[index - 1]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tsetCurrentItem(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 40: //down arrow\r\n\r\n\t\t\tindex = displayItems.indexOf(currentItem);\r\n\r\n\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && index < displayItems.length - 1)){\r\n\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tif(index < displayItems.length - 1){\r\n\t\t\t\t\tif(index == -1){\r\n\t\t\t\t\t\tsetCurrentItem(displayItems[0]);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsetCurrentItem(displayItems[index + 1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\t// e.preventDefault();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\tchooseItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancelItem();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 36: //home\r\n\t\t\tcase 35: //end\r\n\t\t\t//prevent table navigation while using input element\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"keyup\", function(e){\r\n\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 38: //up arrow\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //up arrow\r\n\t\t\tcase 40: //right arrow\r\n\t\t\tcase 13: //enter\r\n\t\t\tcase 27: //escape\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tfilterList(input.value);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\tinput.addEventListener(\"search\", function(e){\r\n\t\tfilterList(input.value);\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tif(blurable){\r\n\t\t\tchooseItem();\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"focus\", function(e){\r\n\t\tvar value = initialDisplayValue;\r\n\t\tgenUniqueColumnValues();\r\n\t\tshowList();\r\n\t\tinput.value = value;\r\n\t\tfilterList(value, true);\r\n\t});\r\n\r\n\r\n\tonRendered(function(){\r\n\t\tinput.style.height = \"100%\";\r\n\t\tinput.focus({preventScroll: true});\r\n\t});\r\n\r\n\tif(editorParams.mask){\r\n\t\tmaskInput(input, editorParams);\r\n\t}\r\n\r\n\tsetTimeout(() => {\r\n\t\tthis.table.rowManager.element.addEventListener(\"scroll\", cancelItem);\r\n\t}, 10);\r\n\r\n\tgenUniqueColumnValues();\r\n\tinput.value = initialDisplayValue;\r\n\tfilterList(initialDisplayValue, true);\r\n\r\n\treturn input;\r\n};","//star rating\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar self = this,\r\n\telement = cell.getElement(),\r\n\tvalue = cell.getValue(),\r\n\tmaxStars = element.getElementsByTagName(\"svg\").length || 5,\r\n\tsize = element.getElementsByTagName(\"svg\")[0] ? element.getElementsByTagName(\"svg\")[0].getAttribute(\"width\") : 14,\r\n\tstars = [],\r\n\tstarsHolder = document.createElement(\"div\"),\r\n\tstar = document.createElementNS('http://www.w3.org/2000/svg', \"svg\");\r\n\r\n\r\n\t//change star type\r\n\tfunction starChange(val){\r\n\t\tstars.forEach(function(star, i){\r\n\t\t\tif(i < val){\r\n\t\t\t\tif(self.table.browser == \"ie\"){\r\n\t\t\t\t\tstar.setAttribute(\"class\", \"tabulator-star-active\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tstar.classList.replace(\"tabulator-star-inactive\", \"tabulator-star-active\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstar.innerHTML = '';\r\n\t\t\t}else{\r\n\t\t\t\tif(self.table.browser == \"ie\"){\r\n\t\t\t\t\tstar.setAttribute(\"class\", \"tabulator-star-inactive\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tstar.classList.replace(\"tabulator-star-active\", \"tabulator-star-inactive\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstar.innerHTML = '';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//build stars\r\n\tfunction buildStar(i){\r\n\r\n\t\tvar starHolder = document.createElement(\"span\");\r\n\t\tvar nextStar = star.cloneNode(true);\r\n\r\n\t\tstars.push(nextStar);\r\n\r\n\t\tstarHolder.addEventListener(\"mouseenter\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tstarChange(i);\r\n\t\t});\r\n\r\n\t\tstarHolder.addEventListener(\"mousemove\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t});\r\n\r\n\t\tstarHolder.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\tsuccess(i);\r\n\t\t\telement.blur();\r\n\t\t});\r\n\r\n\t\tstarHolder.appendChild(nextStar);\r\n\t\tstarsHolder.appendChild(starHolder);\r\n\r\n\t}\r\n\r\n\t//handle keyboard navigation value change\r\n\tfunction changeValue(val){\r\n\t\tvalue = val;\r\n\t\tstarChange(val);\r\n\t}\r\n\r\n\t//style cell\r\n\telement.style.whiteSpace = \"nowrap\";\r\n\telement.style.overflow = \"hidden\";\r\n\telement.style.textOverflow = \"ellipsis\";\r\n\r\n\t//style holding element\r\n\tstarsHolder.style.verticalAlign = \"middle\";\r\n\tstarsHolder.style.display = \"inline-block\";\r\n\tstarsHolder.style.padding = \"4px\";\r\n\r\n\t//style star\r\n\tstar.setAttribute(\"width\", size);\r\n\tstar.setAttribute(\"height\", size);\r\n\tstar.setAttribute(\"viewBox\", \"0 0 512 512\");\r\n\tstar.setAttribute(\"xml:space\", \"preserve\");\r\n\tstar.style.padding = \"0 1px\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tstarsHolder.setAttribute(key, starsHolder.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tstarsHolder.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//create correct number of stars\r\n\tfor(var i=1;i<= maxStars;i++){\r\n\t\tbuildStar(i);\r\n\t}\r\n\r\n\t//ensure value does not exceed number of stars\r\n\tvalue = Math.min(parseInt(value), maxStars);\r\n\r\n\t// set initial styling of stars\r\n\tstarChange(value);\r\n\r\n\tstarsHolder.addEventListener(\"mousemove\", function(e){\r\n\t\tstarChange(0);\r\n\t});\r\n\r\n\tstarsHolder.addEventListener(\"click\", function(e){\r\n\t\tsuccess(0);\r\n\t});\r\n\r\n\telement.addEventListener(\"blur\", function(e){\r\n\t\tcancel();\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\telement.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 39: //right arrow\r\n\t\t\tchangeValue(value + 1);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tchangeValue(value - 1);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\tsuccess(value);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\treturn starsHolder;\r\n};","//draggable progress bar\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar element = cell.getElement(),\r\n\tmax = typeof editorParams.max === \"undefined\" ? ((element.getElementsByTagName(\"div\")[0] && element.getElementsByTagName(\"div\")[0].getAttribute(\"max\")) || 100) : editorParams.max,\r\n\tmin = typeof editorParams.min === \"undefined\" ? ((element.getElementsByTagName(\"div\")[0] && element.getElementsByTagName(\"div\")[0].getAttribute(\"min\")) || 0) : editorParams.min,\r\n\tpercent = (max - min) / 100,\r\n\tvalue = cell.getValue() || 0,\r\n\thandle = document.createElement(\"div\"),\r\n\tbar = document.createElement(\"div\"),\r\n\tmouseDrag, mouseDragWidth;\r\n\r\n\t//set new value\r\n\tfunction updateValue(){\r\n\t\tvar style = window.getComputedStyle(element, null);\r\n\r\n\t\tvar calcVal = (percent * Math.round(bar.offsetWidth / ((element.clientWidth - parseInt(style.getPropertyValue(\"padding-left\")) - parseInt(style.getPropertyValue(\"padding-right\")))/100))) + min;\r\n\t\tsuccess(calcVal);\r\n\t\telement.setAttribute(\"aria-valuenow\", calcVal);\r\n\t\telement.setAttribute(\"aria-label\", value);\r\n\t}\r\n\r\n\t//style handle\r\n\thandle.style.position = \"absolute\";\r\n\thandle.style.right = \"0\";\r\n\thandle.style.top = \"0\";\r\n\thandle.style.bottom = \"0\";\r\n\thandle.style.width = \"5px\";\r\n\thandle.classList.add(\"tabulator-progress-handle\");\r\n\r\n\t//style bar\r\n\tbar.style.display = \"inline-block\";\r\n\tbar.style.position = \"relative\";\r\n\t// bar.style.top = \"8px\";\r\n\t// bar.style.bottom = \"8px\";\r\n\t// bar.style.left = \"4px\";\r\n\t// bar.style.marginRight = \"4px\";\r\n\tbar.style.height = \"100%\";\r\n\tbar.style.backgroundColor = \"#488CE9\";\r\n\tbar.style.maxWidth = \"100%\";\r\n\tbar.style.minWidth = \"0%\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tbar.setAttribute(key, bar.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tbar.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//style cell\r\n\telement.style.padding = \"4px 4px\";\r\n\r\n\t//make sure value is in range\r\n\tvalue = Math.min(parseFloat(value), max);\r\n\tvalue = Math.max(parseFloat(value), min);\r\n\r\n\t//workout percentage\r\n\tvalue = Math.round((value - min) / percent);\r\n\t// bar.style.right = value + \"%\";\r\n\tbar.style.width = value + \"%\";\r\n\r\n\telement.setAttribute(\"aria-valuemin\", min);\r\n\telement.setAttribute(\"aria-valuemax\", max);\r\n\r\n\tbar.appendChild(handle);\r\n\r\n\thandle.addEventListener(\"mousedown\", function(e){\r\n\t\tmouseDrag = e.screenX;\r\n\t\tmouseDragWidth = bar.offsetWidth;\r\n\t});\r\n\r\n\thandle.addEventListener(\"mouseover\", function(){\r\n\t\thandle.style.cursor = \"ew-resize\";\r\n\t});\r\n\r\n\telement.addEventListener(\"mousemove\", function(e){\r\n\t\tif(mouseDrag){\r\n\t\t\tbar.style.width = (mouseDragWidth + e.screenX - mouseDrag) + \"px\";\r\n\t\t}\r\n\t});\r\n\r\n\telement.addEventListener(\"mouseup\", function(e){\r\n\t\tif(mouseDrag){\r\n\t\t\te.stopPropagation();\r\n\t\t\te.stopImmediatePropagation();\r\n\r\n\t\t\tmouseDrag = false;\r\n\t\t\tmouseDragWidth = false;\r\n\r\n\t\t\tupdateValue();\r\n\t\t}\r\n\t});\r\n\r\n\t//allow key based navigation\r\n\telement.addEventListener(\"keydown\", function(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\tcase 39: //right arrow\r\n\t\t\te.preventDefault();\r\n\t\t\tbar.style.width = (bar.clientWidth + element.clientWidth/100) + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\te.preventDefault();\r\n\t\t\tbar.style.width = (bar.clientWidth - element.clientWidth/100) + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 9: //tab\r\n\t\t\tcase 13: //enter\r\n\t\t\tupdateValue();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\tcancel();\r\n\t\t\tbreak;\r\n\r\n\t\t}\r\n\t});\r\n\r\n\telement.addEventListener(\"blur\", function(){\r\n\t\tcancel();\r\n\t});\r\n\r\n\treturn bar;\r\n};","//checkbox\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar value = cell.getValue(),\r\n\tinput = document.createElement(\"input\"),\r\n\ttristate = editorParams.tristate,\r\n\tindetermValue = typeof editorParams.indeterminateValue === \"undefined\" ? null : editorParams.indeterminateValue,\r\n\tindetermState = false;\r\n\r\n\tinput.setAttribute(\"type\", \"checkbox\");\r\n\tinput.style.marginTop = \"5px\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\r\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\r\n\t\tfor (let key in editorParams.elementAttributes){\r\n\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\tkey = key.slice(1);\r\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = value;\r\n\r\n\tif(tristate && (typeof value === \"undefined\" || value === indetermValue || value === \"\")){\r\n\t\tindetermState = true;\r\n\t\tinput.indeterminate = true;\r\n\t}\r\n\r\n\tif(this.table.browser != \"firefox\"){ //prevent blur issue on mac firefox\r\n\t\tonRendered(function(){\r\n\t\t\tinput.focus({preventScroll: true});\r\n\t\t});\r\n\t}\r\n\r\n\tinput.checked = value === true || value === \"true\" || value === \"True\" || value === 1;\r\n\r\n\tonRendered(function(){\r\n\t\tinput.focus();\r\n\t});\r\n\r\n\tfunction setValue(blur){\r\n\t\tif(tristate){\r\n\t\t\tif(!blur){\r\n\t\t\t\tif(input.checked && !indetermState){\r\n\t\t\t\t\tinput.checked = false;\r\n\t\t\t\t\tinput.indeterminate = true;\r\n\t\t\t\t\tindetermState = true;\r\n\t\t\t\t\treturn indetermValue;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tindetermState = false;\r\n\t\t\t\t\treturn input.checked;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(indetermState){\r\n\t\t\t\t\treturn indetermValue;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn input.checked;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn input.checked;\r\n\t\t}\r\n\t}\r\n\r\n\t//submit new value on blur\r\n\tinput.addEventListener(\"change\", function(e){\r\n\t\tsuccess(setValue());\r\n\t});\r\n\r\n\tinput.addEventListener(\"blur\", function(e){\r\n\t\tsuccess(setValue(true));\r\n\t});\r\n\r\n\t//submit new value on enter\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\t\tif(e.keyCode == 13){\r\n\t\t\tsuccess(setValue());\r\n\t\t}\r\n\t\tif(e.keyCode == 27){\r\n\t\t\tcancel();\r\n\t\t}\r\n\t});\r\n\r\n\treturn input;\r\n};","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defaultEditors from './defaults/editors.js';\r\n\r\nclass Edit extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.currentCell = false; //hold currently editing cell\r\n\t\tthis.mouseClick = false; //hold mousedown state to prevent click binding being overriden by editor opening\r\n\t\tthis.recursionBlock = false; //prevent focus recursion\r\n\t\tthis.invalidEdit = false;\r\n\t\tthis.editedCells = [];\r\n\r\n\t\tthis.editors = Edit.editors;\r\n\r\n\t\tthis.registerColumnOption(\"editable\");\r\n\t\tthis.registerColumnOption(\"editor\");\r\n\t\tthis.registerColumnOption(\"editorParams\");\r\n\r\n\t\tthis.registerColumnOption(\"cellEditing\");\r\n\t\tthis.registerColumnOption(\"cellEdited\");\r\n\t\tthis.registerColumnOption(\"cellEditCancelled\");\r\n\r\n\t\tthis.registerTableFunction(\"getEditedCells\", this.getEditedCells.bind(this));\r\n\t\tthis.registerTableFunction(\"clearCellEdited\", this.clearCellEdited.bind(this));\r\n\t\tthis.registerTableFunction(\"navigatePrev\", this.navigatePrev.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateNext\", this.navigateNext.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateLeft\", this.navigateLeft.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateRight\", this.navigateRight.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateUp\", this.navigateUp.bind(this));\r\n\t\tthis.registerTableFunction(\"navigateDown\", this.navigateDown.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"isEdited\", this.cellisEdited.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"clearEdited\", this.clearEdited.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"edit\", this.editCell.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"cancelEdit\", this.cellCancelEdit.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigatePrev\", this.navigatePrev.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateNext\", this.navigateNext.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateLeft\", this.navigateLeft.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateRight\", this.navigateRight.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateUp\", this.navigateUp.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"navigateDown\", this.navigateDown.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-init\", this.bindEditor.bind(this));\r\n\t\tthis.subscribe(\"cell-delete\", this.clearEdited.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumnCheck.bind(this));\r\n\t\tthis.subscribe(\"column-delete\", this.columnDeleteCheck.bind(this));\r\n\t\tthis.subscribe(\"row-deleting\", this.rowDeleteCheck.bind(this));\r\n\t\tthis.subscribe(\"data-refreshing\", this.cancelEdit.bind(this));\r\n\r\n\t\tthis.subscribe(\"keybinding-nav-prev\", this.navigatePrev.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-next\", this.keybindingNavigateNext.bind(this));\r\n\t\tthis.subscribe(\"keybinding-nav-left\", this.navigateLeft.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-right\", this.navigateRight.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-up\", this.navigateUp.bind(this, undefined));\r\n\t\tthis.subscribe(\"keybinding-nav-down\", this.navigateDown.bind(this, undefined));\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t////// Keybinding Functions ///////\r\n\t///////////////////////////////////\r\n\r\n\tkeybindingNavigateNext(e){\r\n\t\tvar cell = this.currentCell,\r\n\t\tnewRow = this.options(\"tabEndNewRow\");\r\n\r\n\t\tif(cell){\r\n\t\t\tif(!this.navigateNext(cell, e)){\r\n\t\t\t\tif(newRow){\r\n\t\t\t\t\tcell.getElement().firstChild.blur();\r\n\r\n\t\t\t\t\tif(newRow === true){\r\n\t\t\t\t\t\tnewRow = this.table.addRow({})\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(typeof newRow == \"function\"){\r\n\t\t\t\t\t\t\tnewRow = this.table.addRow(newRow(cell.row.getComponent()))\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnewRow = this.table.addRow(Object.assign({}, newRow));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tnewRow.then(() => {\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tcell.getComponent().navigateNext();\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Cell Functions //////////\r\n\t///////////////////////////////////\r\n\r\n\tcellisEdited(cell){\r\n\t\treturn !! cell.modules.edit && cell.modules.edit.edited;\r\n\t}\r\n\r\n\tcellCancelEdit(cell){\r\n\t\tif(cell === this.currentCell){\r\n\t\t\tthis.table.modules.edit.cancelEdit();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cancel Editor Error - This cell is not currently being edited \");\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\tclearCellEdited(cells){\r\n\t\tif(!cells){\r\n\t\t\tcells = this.table.modules.edit.getEditedCells();\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\r\n\t\tcells.forEach((cell) => {\r\n\t\t\tthis.table.modules.edit.clearEdited(cell._getSelf());\r\n\t\t});\r\n\t}\r\n\r\n\tnavigatePrev(cell = this.currentCell, e){\r\n\t\tvar nextCell, prevRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tnextCell = this.navigateLeft();\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tprevRow = this.table.rowManager.prevDisplayRow(cell.row, true);\r\n\r\n\t\t\t\tif(prevRow){\r\n\t\t\t\t\tnextCell = this.findNextEditableCell(prevRow, prevRow.cells.length);\r\n\r\n\t\t\t\t\tif(nextCell){\r\n\t\t\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateNext(cell = this.currentCell, e){\r\n\t\tvar nextCell, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tnextCell = this.navigateRight();\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\r\n\r\n\t\t\t\tif(nextRow){\r\n\t\t\t\t\tnextCell = this.findNextEditableCell(nextRow, -1);\r\n\r\n\t\t\t\t\tif(nextCell){\r\n\t\t\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateLeft(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findPrevEditableCell(cell.row, index);\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateRight(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findNextEditableCell(cell.row, index);\r\n\r\n\t\t\tif(nextCell){\r\n\t\t\t\tnextCell.getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateUp(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.prevDisplayRow(cell.row, true);\r\n\r\n\t\t\tif(nextRow){\r\n\t\t\t\tnextRow.cells[index].getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tnavigateDown(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\r\n\t\tif(cell){\r\n\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\r\n\r\n\t\t\tif(nextRow){\r\n\t\t\t\tnextRow.cells[index].getComponent().edit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfindNextEditableCell(row, index){\r\n\t\tvar nextCell = false;\r\n\r\n\t\tif(index < row.cells.length-1){\r\n\t\t\tfor(var i = index+1; i < row.cells.length; i++){\r\n\t\t\t\tlet cell = row.cells[i];\r\n\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tlet allowEdit = true;\r\n\r\n\t\t\t\t\tif(typeof cell.column.modules.edit.check == \"function\"){\r\n\t\t\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(allowEdit){\r\n\t\t\t\t\t\tnextCell = cell;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn nextCell;\r\n\t}\r\n\r\n\tfindPrevEditableCell(row, index){\r\n\t\tvar prevCell = false;\r\n\r\n\t\tif(index > 0){\r\n\t\t\tfor(var i = index-1; i >= 0; i--){\r\n\t\t\t\tlet cell = row.cells[i],\r\n\t\t\t\tallowEdit = true;\r\n\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tif(typeof cell.column.modules.edit.check == \"function\"){\r\n\t\t\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(allowEdit){\r\n\t\t\t\t\t\tprevCell = cell;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn prevCell;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(typeof column.definition.editor !== \"undefined\"){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\tcolumnDeleteCheck(column){\r\n\t\tif(this.currentCell && this.currentCell.column === column){\r\n\t\t\tthis.cancelEdit();\r\n\t\t}\r\n\t}\r\n\r\n\trowDeleteCheck(row){\r\n\t\tif(this.currentCell && this.currentCell.row === row){\r\n\t\t\tthis.cancelEdit();\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column editor\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = {\r\n\t\t\teditor:false,\r\n\t\t\tblocked:false,\r\n\t\t\tcheck:column.definition.editable,\r\n\t\t\tparams:column.definition.editorParams || {}\r\n\t\t};\r\n\r\n\t\t//set column editor\r\n\t\tswitch(typeof column.definition.editor){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(this.editors[column.definition.editor]){\r\n\t\t\t\tconfig.editor = this.editors[column.definition.editor];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Editor Error - No such editor found: \", column.definition.editor);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tconfig.editor = column.definition.editor;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"boolean\":\r\n\t\t\tif(column.definition.editor === true){\r\n\t\t\t\tif(typeof column.definition.formatter !== \"function\"){\r\n\t\t\t\t\tif(this.editors[column.definition.formatter]){\r\n\t\t\t\t\t\tconfig.editor = this.editors[column.definition.formatter];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconfig.editor = this.editors[\"input\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Editor Error - Cannot auto lookup editor for a custom formatter: \", column.definition.formatter);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(config.editor){\r\n\t\t\tcolumn.modules.edit = config;\r\n\t\t}\r\n\t}\r\n\r\n\tgetCurrentCell(){\r\n\t\treturn this.currentCell ? this.currentCell.getComponent() : false;\r\n\t}\r\n\r\n\tclearEditor(cancel){\r\n\t\tvar cell = this.currentCell,\r\n\t\tcellEl;\r\n\r\n\t\tthis.invalidEdit = false;\r\n\r\n\t\tif(cell){\r\n\t\t\tthis.currentCell = false;\r\n\r\n\t\t\tcellEl = cell.getElement();\r\n\r\n\t\t\tif(cancel){\r\n\t\t\t\tif(cell.column.modules.validate && this.table.modExists(\"validate\")){\r\n\t\t\t\t\tthis.table.modules.validate.cellValidate(cell);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcellEl.classList.remove(\"tabulator-validation-fail\");\r\n\t\t\t}\r\n\r\n\t\t\tcellEl.classList.remove(\"tabulator-editing\");\r\n\r\n\t\t\twhile(cellEl.firstChild) cellEl.removeChild(cellEl.firstChild);\r\n\r\n\t\t\tcell.row.getElement().classList.remove(\"tabulator-row-editing\");\r\n\t\t}\r\n\t}\r\n\r\n\tcancelEdit(){\r\n\t\tif(this.currentCell){\r\n\t\t\tvar cell = this.currentCell;\r\n\t\t\tvar component = this.currentCell.getComponent();\r\n\r\n\t\t\tthis.clearEditor(true);\r\n\t\t\tcell.setValueActual(cell.getValue());\r\n\t\t\tcell.cellRendered();\r\n\r\n\t\t\tif(cell.column.definition.editor == \"textarea\" || cell.column.definition.variableHeight){\r\n\t\t\t\tcell.row.normalizeHeight(true);\r\n\t\t\t}\r\n\r\n\t\t\tif(cell.column.definition.cellEditCancelled){\r\n\t\t\t\tcell.column.definition.cellEditCancelled.call(this.table, component);\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatch(\"edit-cancelled\", cell);\r\n\t\t\tthis.dispatchExternal(\"cellEditCancelled\", component);\r\n\t\t}\r\n\t}\r\n\r\n\t//return a formatted value for a cell\r\n\tbindEditor(cell){\r\n\t\tif(cell.column.modules.edit){\r\n\t\t\tvar self = this,\r\n\t\t\telement = cell.getElement(true);\r\n\r\n\t\t\telement.setAttribute(\"tabindex\", 0);\r\n\r\n\t\t\telement.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(!element.classList.contains(\"tabulator-editing\")){\r\n\t\t\t\t\telement.focus({preventScroll: true});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\telement.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif (e.button === 2) {\r\n\t\t\t\t\te.preventDefault();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.mouseClick = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\telement.addEventListener(\"focus\", function(e){\r\n\t\t\t\tif(!self.recursionBlock){\r\n\t\t\t\t\tself.edit(cell, e, false);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tfocusCellNoEvent(cell, block){\r\n\t\tthis.recursionBlock = true;\r\n\r\n\t\tif(!(block && this.table.browser === \"ie\")){\r\n\t\t\tcell.getElement().focus({preventScroll: true});\r\n\t\t}\r\n\r\n\t\tthis.recursionBlock = false;\r\n\t}\r\n\r\n\teditCell(cell, forceEdit){\r\n\t\tthis.focusCellNoEvent(cell);\r\n\t\tthis.edit(cell, false, forceEdit);\r\n\t}\r\n\r\n\tfocusScrollAdjust(cell){\r\n\t\tif(this.table.rowManager.getRenderMode() == \"virtual\"){\r\n\t\t\tvar topEdge = this.table.rowManager.element.scrollTop,\r\n\t\t\tbottomEdge = this.table.rowManager.element.clientHeight + this.table.rowManager.element.scrollTop,\r\n\t\t\trowEl = cell.row.getElement(),\r\n\t\t\toffset = rowEl.offsetTop;\r\n\r\n\t\t\tif(rowEl.offsetTop < topEdge){\r\n\t\t\t\tthis.table.rowManager.element.scrollTop -= (topEdge - rowEl.offsetTop);\r\n\t\t\t}else{\r\n\t\t\t\tif(rowEl.offsetTop + rowEl.offsetHeight > bottomEdge){\r\n\t\t\t\t\tthis.table.rowManager.element.scrollTop += (rowEl.offsetTop + rowEl.offsetHeight - bottomEdge);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar leftEdge = this.table.rowManager.element.scrollLeft,\r\n\t\t\trightEdge = this.table.rowManager.element.clientWidth + this.table.rowManager.element.scrollLeft,\r\n\t\t\tcellEl = cell.getElement(),\r\n\t\t\toffset = cellEl.offsetLeft;\r\n\r\n\t\t\tif(this.table.modExists(\"frozenColumns\")){\r\n\t\t\t\tleftEdge += parseInt(this.table.modules.frozenColumns.leftMargin);\r\n\t\t\t\trightEdge -= parseInt(this.table.modules.frozenColumns.rightMargin);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.renderHorizontal === \"virtual\"){\r\n\t\t\t\tleftEdge -= parseInt(this.table.columnManager.renderer.vDomPadLeft);\r\n\t\t\t\trightEdge -= parseInt(this.table.columnManager.renderer.vDomPadLeft);\r\n\t\t\t}\r\n\r\n\t\t\tif(cellEl.offsetLeft < leftEdge){\r\n\r\n\t\t\t\tthis.table.rowManager.element.scrollLeft -= (leftEdge - cellEl.offsetLeft);\r\n\t\t\t}else{\r\n\t\t\t\tif(cellEl.offsetLeft + cellEl.offsetWidth > rightEdge){\r\n\t\t\t\t\tthis.table.rowManager.element.scrollLeft += (cellEl.offsetLeft + cellEl.offsetWidth - rightEdge);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tedit(cell, e, forceEdit){\r\n\t\tvar self = this,\r\n\t\tallowEdit = true,\r\n\t\trendered = function(){},\r\n\t\telement = cell.getElement(),\r\n\t\tcellEditor, component, params;\r\n\r\n\t\t//prevent editing if another cell is refusing to leave focus (eg. validation fail)\r\n\t\tif(this.currentCell){\r\n\t\t\tif(!this.invalidEdit){\r\n\t\t\t\tthis.cancelEdit();\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//handle successfull value change\r\n\t\tfunction success(value){\r\n\t\t\tif(self.currentCell === cell){\r\n\t\t\t\tvar valid = true;\r\n\r\n\t\t\t\tif(cell.column.modules.validate && self.table.modExists(\"validate\") && self.table.options.validationMode != \"manual\"){\r\n\t\t\t\t\tvalid = self.table.modules.validate.validate(cell.column.modules.validate, cell, value);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(valid === true || self.table.options.validationMode === \"highlight\"){\r\n\t\t\t\t\tself.clearEditor();\r\n\r\n\r\n\t\t\t\t\tif(!cell.modules.edit){\r\n\t\t\t\t\t\tcell.modules.edit = {};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcell.modules.edit.edited = true;\r\n\r\n\t\t\t\t\tif(self.editedCells.indexOf(cell) == -1){\r\n\t\t\t\t\t\tself.editedCells.push(cell);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcell.setValue(value, true);\r\n\r\n\t\t\t\t\tif(valid !== true){\r\n\t\t\t\t\t\telement.classList.add(\"tabulator-validation-fail\");\r\n\t\t\t\t\t\tself.table.externalEvents.dispatch(\"validationFailed\", cell.getComponent(), value, valid);\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.invalidEdit = true;\r\n\t\t\t\t\telement.classList.add(\"tabulator-validation-fail\");\r\n\t\t\t\t\tself.focusCellNoEvent(cell, true);\r\n\t\t\t\t\trendered();\r\n\t\t\t\t\tself.table.externalEvents.dispatch(\"validationFailed\", cell.getComponent(), value, valid);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t// console.warn(\"Edit Success Error - cannot call success on a cell that is no longer being edited\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//handle aborted edit\r\n\t\tfunction cancel(){\r\n\t\t\tif(self.currentCell === cell){\r\n\t\t\t\tself.cancelEdit();\r\n\t\t\t}else{\r\n\t\t\t\t// console.warn(\"Edit Success Error - cannot call cancel on a cell that is no longer being edited\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\trendered = callback;\r\n\t\t}\r\n\r\n\t\tif(!cell.column.modules.edit.blocked){\r\n\t\t\tif(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t}\r\n\r\n\t\t\tswitch(typeof cell.column.modules.edit.check){\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tallowEdit = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tallowEdit = cell.column.modules.edit.check;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(allowEdit || forceEdit){\r\n\r\n\t\t\t\tself.cancelEdit();\r\n\r\n\t\t\t\tself.currentCell = cell;\r\n\r\n\t\t\t\tthis.focusScrollAdjust(cell);\r\n\r\n\t\t\t\tcomponent = cell.getComponent();\r\n\r\n\t\t\t\tif(this.mouseClick){\r\n\t\t\t\t\tthis.mouseClick = false;\r\n\r\n\t\t\t\t\tif(cell.column.definition.cellClick){\r\n\t\t\t\t\t\tcell.column.definition.cellClick.call(this.table, e, component);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(cell.column.definition.cellEditing){\r\n\t\t\t\t\tcell.column.definition.cellEditing.call(this.table, component);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.dispatch(\"cell-editing\", cell);\r\n\t\t\t\tthis.dispatchExternal(\"cellEditing\", component);\r\n\r\n\t\t\t\tparams = typeof cell.column.modules.edit.params === \"function\" ? cell.column.modules.edit.params(component) : cell.column.modules.edit.params;\r\n\r\n\t\t\t\tcellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params);\r\n\r\n\t\t\t\t//if editor returned, add to DOM, if false, abort edit\r\n\t\t\t\tif(cellEditor !== false){\r\n\r\n\t\t\t\t\tif(cellEditor instanceof Node){\r\n\t\t\t\t\t\telement.classList.add(\"tabulator-editing\");\r\n\t\t\t\t\t\tcell.row.getElement().classList.add(\"tabulator-row-editing\");\r\n\t\t\t\t\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\t\t\t\t\t\telement.appendChild(cellEditor);\r\n\r\n\t\t\t\t\t\t//trigger onRendered Callback\r\n\t\t\t\t\t\trendered();\r\n\r\n\t\t\t\t\t\t//prevent editing from triggering rowClick event\r\n\t\t\t\t\t\tvar children = element.children;\r\n\r\n\t\t\t\t\t\tfor (var i = 0; i < children.length; i++) {\r\n\t\t\t\t\t\t\tchildren[i].addEventListener(\"click\", function(e){\r\n\t\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Edit Error - Editor should return an instance of Node, the editor returned:\", cellEditor);\r\n\t\t\t\t\t\telement.blur();\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.blur();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tthis.mouseClick = false;\r\n\t\t\t\telement.blur();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.mouseClick = false;\r\n\t\t\telement.blur();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tgetEditedCells(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.editedCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tclearEdited(cell){\r\n\t\tvar editIndex;\r\n\r\n\t\tif(cell.modules.edit && cell.modules.edit.edited){\r\n\t\t\tcell.modules.edit.edited = false;\r\n\r\n\t\t\tif(cell.modules.validate){\r\n\t\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\teditIndex = this.editedCells.indexOf(cell);\r\n\r\n\t\tif(editIndex > -1){\r\n\t\t\tthis.editedCells.splice(editIndex, 1);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nEdit.moduleName = \"edit\";\r\n\r\n//load defaults\r\nEdit.editors = defaultEditors;\r\n\r\n\r\nexport default Edit;\r\n","class ExportRow{\r\n\tconstructor(type, columns, component, indent){\r\n\t\tthis.type = type;\r\n\t\tthis.columns = columns;\r\n\t\tthis.component = component || false;\r\n\t\tthis.indent = indent || 0;\r\n\t}\r\n}\r\n\r\nexport default ExportRow;","class ExportColumn{\r\n\tconstructor(value, component, width, height, depth){\r\n\t\tthis.value = value;\r\n\t\tthis.component = component || false;\r\n\t\tthis.width = width;\r\n\t\tthis.height = height;\r\n\t\tthis.depth = depth;\r\n\t}\r\n}\r\n\r\nexport default ExportColumn;","import Module from '../../core/Module.js';\r\n\r\nimport ExportRow from './ExportRow.js';\r\nimport ExportColumn from './ExportColumn.js';\r\n\r\nclass Export extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.config = {};\r\n\t\tthis.cloneTableStyle = true;\r\n\t\tthis.colVisProp = \"\";\r\n\r\n\t\tthis.registerTableOption(\"htmlOutputConfig\", false); //html outypu config\r\n\r\n\t\tthis.registerColumnOption(\"htmlOutput\");\r\n\t\tthis.registerColumnOption(\"titleHtmlOutput\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"getHtml\", this.getHtml.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tgenerateExportList(config, style, range, colVisProp){\r\n\t\tthis.cloneTableStyle = style;\r\n\t\tthis.config = config || {};\r\n\t\tthis.colVisProp = colVisProp;\r\n\r\n\t\tvar headers = this.config.columnHeaders !== false ? this.headersToExportRows(this.generateColumnGroupHeaders()) : [];\r\n\t\tvar body = this.bodyToExportRows(this.rowLookup(range));\r\n\r\n\t\treturn headers.concat(body);\r\n\t}\r\n\r\n\tgenereateTable(config, style, range, colVisProp){\r\n\t\tvar list = this.generateExportList(config, style, range, colVisProp);\r\n\r\n\t\treturn this.genereateTableElement(list);\r\n\t}\r\n\r\n\trowLookup(range){\r\n\t\tvar rows = [];\r\n\r\n\t\tif(typeof range == \"function\"){\r\n\t\t\trange.call(this.table).forEach((row) =>{\r\n\t\t\t\trow = this.table.rowManager.findRow(row);\r\n\r\n\t\t\t\tif(row){\r\n\t\t\t\t\trows.push(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tswitch(range){\r\n\t\t\t\tcase true:\r\n\t\t\t\tcase \"visible\":\r\n\t\t\t\trows = this.table.rowManager.getVisibleRows(false, true);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"all\":\r\n\t\t\t\trows = this.table.rowManager.rows;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"selected\":\r\n\t\t\t\trows = this.table.modules.selectRow.selectedRows;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"active\":\r\n\t\t\t\tdefault:\r\n\t\t\t\tif(this.table.options.pagination){\r\n\t\t\t\t\trows = this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length - 2);\r\n\t\t\t\t}else{\r\n\t\t\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn Object.assign([], rows);\r\n\t}\r\n\r\n\tgenerateColumnGroupHeaders(){\r\n\t\tvar output = [];\r\n\r\n\t\tvar columns = this.config.columnGroups !== false ? this.table.columnManager.columns : this.table.columnManager.columnsByIndex;\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\tvar colData = this.processColumnGroup(column);\r\n\r\n\t\t\tif(colData){\r\n\t\t\t\toutput.push(colData);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tprocessColumnGroup(column){\r\n\t\tvar subGroups = column.columns,\r\n\t\tmaxDepth = 0,\r\n\t\ttitle = column.definition[\"title\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))] || column.definition.title;\r\n\r\n\t\tvar groupData = {\r\n\t\t\ttitle:title,\r\n\t\t\tcolumn:column,\r\n\t\t\tdepth:1,\r\n\t\t};\r\n\r\n\t\tif(subGroups.length){\r\n\t\t\tgroupData.subGroups = [];\r\n\t\t\tgroupData.width = 0;\r\n\r\n\t\t\tsubGroups.forEach((subGroup) => {\r\n\t\t\t\tvar subGroupData = this.processColumnGroup(subGroup);\r\n\r\n\t\t\t\tif(subGroupData){\r\n\t\t\t\t\tgroupData.width += subGroupData.width;\r\n\t\t\t\t\tgroupData.subGroups.push(subGroupData);\r\n\r\n\t\t\t\t\tif(subGroupData.depth > maxDepth){\r\n\t\t\t\t\t\tmaxDepth = subGroupData.depth;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tgroupData.depth += maxDepth;\r\n\r\n\t\t\tif(!groupData.width){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.columnVisCheck(column)){\r\n\t\t\t\tgroupData.width = 1;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn groupData;\r\n\t}\r\n\r\n\tcolumnVisCheck(column){\r\n\t\treturn column.definition[this.colVisProp] !== false && (column.visible || (!column.visible && column.definition[this.colVisProp]));\r\n\t}\r\n\r\n\theadersToExportRows(columns){\r\n\t\tvar headers = [],\r\n\t\theaderDepth = 0,\r\n\t\texportRows = [];\r\n\r\n\t\tfunction parseColumnGroup(column, level){\r\n\r\n\t\t\tvar depth = headerDepth - level;\r\n\r\n\t\t\tif(typeof headers[level] === \"undefined\"){\r\n\t\t\t\theaders[level] = [];\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.height = column.subGroups ? 1 : (depth - column.depth) + 1;\r\n\r\n\t\t\theaders[level].push(column);\r\n\r\n\t\t\tif(column.height > 1){\r\n\t\t\t\tfor(let i = 1; i < column.height; i ++){\r\n\r\n\t\t\t\t\tif(typeof headers[level + i] === \"undefined\"){\r\n\t\t\t\t\t\theaders[level + i] = [];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\theaders[level + i].push(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(column.width > 1){\r\n\t\t\t\tfor(let i = 1; i < column.width; i ++){\r\n\t\t\t\t\theaders[level].push(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(column.subGroups){\r\n\t\t\t\tcolumn.subGroups.forEach(function(subGroup){\r\n\t\t\t\t\tparseColumnGroup(subGroup, level+1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//calculate maximum header debth\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tif(column.depth > headerDepth){\r\n\t\t\t\theaderDepth = column.depth;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tparseColumnGroup(column,0);\r\n\t\t});\r\n\r\n\t\theaders.forEach((header) => {\r\n\t\t\tvar columns = [];\r\n\r\n\t\t\theader.forEach((col) => {\r\n\t\t\t\tif(col){\r\n\t\t\t\t\tlet title = typeof col.title === \"undefined\" ? \"\" : col.title;\r\n\t\t\t\t\tcolumns.push(new ExportColumn(title, col.column.getComponent(), col.width, col.height, col.depth));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolumns.push(null);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\texportRows.push(new ExportRow(\"header\", columns));\r\n\t\t});\r\n\r\n\t\treturn exportRows;\r\n\t}\r\n\r\n\tbodyToExportRows(rows){\r\n\r\n\t\tvar columns = [];\r\n\t\tvar exportRows = [];\r\n\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tif (this.columnVisCheck(column)) {\r\n\t\t\t\tcolumns.push(column.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(this.config.columnCalcs !== false && this.table.modExists(\"columnCalcs\")){\r\n\t\t\tif(this.table.modules.columnCalcs.topInitialized){\r\n\t\t\t\trows.unshift(this.table.modules.columnCalcs.topRow);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modules.columnCalcs.botInitialized){\r\n\t\t\t\trows.push(this.table.modules.columnCalcs.botRow);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\trows = rows.filter((row) => {\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\treturn this.config.rowGroups !== false;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\treturn this.config.columnCalcs !== false;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\treturn !(this.table.options.dataTree && this.config.dataTree === false && row.modules.dataTree.parent);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\trows.forEach((row, i) => {\r\n\t\t\tvar rowData = row.getData(this.colVisProp);\r\n\t\t\tvar exportCols = [];\r\n\t\t\tvar indent = 0;\r\n\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\tindent = row.level;\r\n\t\t\t\texportCols.push(new ExportColumn(row.key, row.getComponent(), columns.length, 1));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\" :\r\n\t\t\t\tcase \"row\" :\r\n\t\t\t\tcolumns.forEach((col) => {\r\n\t\t\t\t\texportCols.push(new ExportColumn(col._column.getFieldValue(rowData), col, 1, 1));\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\r\n\t\t\t\t\tindent = row.modules.dataTree.index;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\texportRows.push(new ExportRow(row.type, exportCols, row.getComponent(), indent));\r\n\t\t});\r\n\r\n\t\treturn exportRows;\r\n\t}\r\n\r\n\tgenereateTableElement(list){\r\n\t\tvar table = document.createElement(\"table\"),\r\n\t\theaderEl = document.createElement(\"thead\"),\r\n\t\tbodyEl = document.createElement(\"tbody\"),\r\n\t\tstyles = this.lookupTableStyles(),\r\n\t\trowFormatter = this.table.options[\"rowFormatter\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))],\r\n\t\tsetup = {};\r\n\r\n\t\tsetup.rowFormatter = rowFormatter !== null ? rowFormatter : this.table.options.rowFormatter;\r\n\r\n\t\tif(this.table.options.dataTree &&this.config.dataTree !== false && this.table.modExists(\"columnCalcs\")){\r\n\t\t\tsetup.treeElementField = this.table.modules.dataTree.elementField;\r\n\t\t}\r\n\r\n\t\t//assign group header formatter\r\n\t\tsetup.groupHeader = this.table.options[\"groupHeader\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))];\r\n\r\n\t\tif(setup.groupHeader && !Array.isArray(setup.groupHeader)){\r\n\t\t\tsetup.groupHeader = [setup.groupHeader];\r\n\t\t}\r\n\r\n\t\ttable.classList.add(\"tabulator-print-table\");\r\n\r\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\"]);\r\n\r\n\r\n\t\tif(list.length > 1000){\r\n\t\t\tconsole.warn(\"It may take a long time to render an HTML table with more than 1000 rows\");\r\n\t\t}\r\n\r\n\t\tlist.forEach((row, i) => {\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"header\":\r\n\t\t\t\theaderEl.appendChild(this.genereateHeaderElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\tbodyEl.appendChild(this.genereateGroupElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\tbodyEl.appendChild(this.genereateCalcElement(row, setup, styles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\tlet rowEl = this.genereateRowElement(row, setup, styles);\r\n\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\"]);\r\n\t\t\t\tbodyEl.appendChild(rowEl);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(headerEl.innerHTML){\r\n\t\t\ttable.appendChild(headerEl);\r\n\t\t}\r\n\r\n\t\ttable.appendChild(bodyEl);\r\n\r\n\r\n\t\tthis.mapElementStyles(this.table.element, table, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\"]);\r\n\t\treturn table;\r\n\t}\r\n\r\n\tlookupTableStyles(){\r\n\t\tvar styles = {};\r\n\r\n\t\t//lookup row styles\r\n\t\tif(this.cloneTableStyle && window.getComputedStyle){\r\n\t\t\tstyles.oddRow = this.table.element.querySelector(\".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.evenRow = this.table.element.querySelector(\".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.calcRow = this.table.element.querySelector(\".tabulator-row.tabulator-calcs\");\r\n\t\t\tstyles.firstRow = this.table.element.querySelector(\".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)\");\r\n\t\t\tstyles.firstGroup = this.table.element.getElementsByClassName(\"tabulator-group\")[0];\r\n\r\n\t\t\tif(styles.firstRow){\r\n\t\t\t\tstyles.styleCells = styles.firstRow.getElementsByClassName(\"tabulator-cell\");\r\n\t\t\t\tstyles.firstCell = styles.styleCells[0];\r\n\t\t\t\tstyles.lastCell = styles.styleCells[styles.styleCells.length - 1];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn styles;\r\n\t}\r\n\r\n\tgenereateHeaderElement(row, setup, styles){\r\n\t\tvar rowEl = document.createElement(\"tr\");\r\n\r\n\t\trow.columns.forEach((column) => {\r\n\t\t\tif(column){\r\n\t\t\t\tvar cellEl = document.createElement(\"th\");\r\n\t\t\t\tvar classNames = column.component._column.definition.cssClass ? column.component._column.definition.cssClass.split(\" \") : [];\r\n\r\n\t\t\t\tcellEl.colSpan = column.width;\r\n\t\t\t\tcellEl.rowSpan = column.height;\r\n\r\n\t\t\t\tcellEl.innerHTML = column.value;\r\n\r\n\t\t\t\tif(this.cloneTableStyle){\r\n\t\t\t\t\tcellEl.style.boxSizing = \"border-box\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tclassNames.forEach(function(className) {\r\n\t\t\t\t\tcellEl.classList.add(className);\r\n\t\t\t\t});\r\n\r\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\"]);\r\n\t\t\t\tthis.mapElementStyles(column.component._column.contentElement, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\"]);\r\n\r\n\t\t\t\tif(column.component._column.visible){\r\n\t\t\t\t\tthis.mapElementStyles(column.component.getElement(), cellEl, [\"width\"]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(column.component._column.definition.width){\r\n\t\t\t\t\t\tcellEl.style.width = column.component._column.definition.width + \"px\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(column.component._column.parent){\r\n\t\t\t\t\tthis.mapElementStyles(column.component._column.parent.groupElement, cellEl, [\"border-top\"]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowEl.appendChild(cellEl);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateGroupElement(row, setup, styles){\r\n\r\n\t\tvar rowEl = document.createElement(\"tr\"),\r\n\t\tcellEl = document.createElement(\"td\"),\r\n\t\tgroup = row.columns[0];\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-row\");\r\n\r\n\t\tif(setup.groupHeader && setup.groupHeader[row.indent]){\r\n\t\t\tgroup.value = setup.groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t}else{\r\n\t\t\tif(setup.groupHeader === false){\r\n\t\t\t\tgroup.value = group.value;\r\n\t\t\t}else{\r\n\t\t\t\tgroup.value = row.component._group.generator(group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcellEl.colSpan = group.width;\r\n\t\tcellEl.innerHTML = group.value;\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-group\");\r\n\t\trowEl.classList.add(\"tabulator-group-level-\" + row.indent);\r\n\r\n\t\tif(group.component.isVisible()){\r\n\t\t\trowEl.classList.add(\"tabulator-group-visible\");\r\n\t\t}\r\n\r\n\t\tthis.mapElementStyles(styles.firstGroup, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\r\n\t\tthis.mapElementStyles(styles.firstGroup, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\"]);\r\n\r\n\t\trowEl.appendChild(cellEl);\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateCalcElement(row, setup, styles){\r\n\t\tvar rowEl = this.genereateRowElement(row, setup, styles);\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-calcs\");\r\n\t\tthis.mapElementStyles(styles.calcRow, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateRowElement(row, setup, styles){\r\n\t\tvar rowEl = document.createElement(\"tr\");\r\n\r\n\t\trowEl.classList.add(\"tabulator-print-table-row\");\r\n\r\n\t\trow.columns.forEach((col) => {\r\n\t\t\tif(col){\r\n\t\t\t\tvar cellEl = document.createElement(\"td\"),\r\n\t\t\t\tcolumn = col.component._column,\r\n\t\t\t\tindex = this.table.columnManager.findColumnIndex(column),\r\n\t\t\t\tvalue = col.value;\r\n\r\n\t\t\t\tvar cellWrapper = {\r\n\t\t\t\t\tmodules:{},\r\n\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetField:function(){\r\n\t\t\t\t\t\treturn column.definition.field;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\treturn cellEl;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetData:function(){\r\n\t\t\t\t\t\treturn row.component.getData();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\treturn row.component;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetComponent:function(){\r\n\t\t\t\t\t\treturn cellWrapper;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcolumn:column,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tvar classNames = column.definition.cssClass ? column.definition.cssClass.split(\" \") : [];\r\n\r\n\t\t\t\tclassNames.forEach(function(className) {\r\n\t\t\t\t\tcellEl.classList.add(className);\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.modExists(\"format\") && this.config.formatCells !== false){\r\n\t\t\t\t\tvalue = this.table.modules.format.formatExportValue(cellWrapper, this.colVisProp);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tvalue = JSON.stringify(value);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tcase \"null\":\r\n\t\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tvalue = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(value instanceof Node){\r\n\t\t\t\t\tcellEl.appendChild(value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcellEl.innerHTML = value;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(styles.styleCells[index] || styles.firstCell){\r\n\t\t\t\t\tthis.mapElementStyles(styles.styleCells[index] || styles.firstCell, 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\"]);\r\n\r\n\t\t\t\t\tif(column.definition.align){\r\n\t\t\t\t\t\tcellEl.style.textAlign = column.definition.align;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\r\n\t\t\t\t\tif((setup.treeElementField && setup.treeElementField == column.field) || (!setup.treeElementField && i == 0)){\r\n\t\t\t\t\t\tif(row.component._row.modules.dataTree.controlEl){\r\n\t\t\t\t\t\t\tcellEl.insertBefore(row.component._row.modules.dataTree.controlEl.cloneNode(true), cellEl.firstChild);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(row.component._row.modules.dataTree.branchEl){\r\n\t\t\t\t\t\t\tcellEl.insertBefore(row.component._row.modules.dataTree.branchEl.cloneNode(true), cellEl.firstChild);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowEl.appendChild(cellEl);\r\n\r\n\t\t\t\tif(cellWrapper.modules.format && cellWrapper.modules.format.renderedCallback){\r\n\t\t\t\t\tcellWrapper.modules.format.renderedCallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(setup.rowFormatter && this.config.formatCells !== false){\r\n\t\t\t\t\tsetup.rowFormatter(row.component);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn rowEl;\r\n\t}\r\n\r\n\tgenereateHTMLTable(list){\r\n\t\tvar holder = document.createElement(\"div\");\r\n\r\n\t\tholder.appendChild(this.genereateTableElement(list));\r\n\r\n\t\treturn holder.innerHTML;\r\n\t}\r\n\r\n\tgetHtml(visible, style, config, colVisProp){\r\n\t\tvar list = this.generateExportList(config || this.table.options.htmlOutputConfig, style, visible, colVisProp || \"htmlOutput\");\r\n\r\n\t\treturn this.genereateHTMLTable(list);\r\n\t}\r\n\r\n\tmapElementStyles(from, to, props){\r\n\t\tif(this.cloneTableStyle && from && to){\r\n\r\n\t\t\tvar lookup = {\r\n\t\t\t\t\"background-color\" : \"backgroundColor\",\r\n\t\t\t\t\"color\" : \"fontColor\",\r\n\t\t\t\t\"width\" : \"width\",\r\n\t\t\t\t\"font-weight\" : \"fontWeight\",\r\n\t\t\t\t\"font-family\" : \"fontFamily\",\r\n\t\t\t\t\"font-size\" : \"fontSize\",\r\n\t\t\t\t\"text-align\" : \"textAlign\",\r\n\t\t\t\t\"border-top\" : \"borderTop\",\r\n\t\t\t\t\"border-left\" : \"borderLeft\",\r\n\t\t\t\t\"border-right\" : \"borderRight\",\r\n\t\t\t\t\"border-bottom\" : \"borderBottom\",\r\n\t\t\t\t\"padding-top\" : \"paddingTop\",\r\n\t\t\t\t\"padding-left\" : \"paddingLeft\",\r\n\t\t\t\t\"padding-right\" : \"paddingRight\",\r\n\t\t\t\t\"padding-bottom\" : \"paddingBottom\",\r\n\t\t\t};\r\n\r\n\t\t\tif(window.getComputedStyle){\r\n\t\t\t\tvar fromStyle = window.getComputedStyle(from);\r\n\r\n\t\t\t\tprops.forEach(function(prop){\r\n\t\t\t\t\tto.style[lookup[prop]] = fromStyle.getPropertyValue(prop);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nExport.moduleName = \"export\";\r\n\r\nexport default Export;\r\n","export default {\r\n\r\n\t//equal to\r\n\t\"=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal == filterVal ? true : false;\r\n\t},\r\n\r\n\t//less than\r\n\t\"<\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal < filterVal ? true : false;\r\n\t},\r\n\r\n\t//less than or equal to\r\n\t\"<=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal <= filterVal ? true : false;\r\n\t},\r\n\r\n\t//greater than\r\n\t\">\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal > filterVal ? true : false;\r\n\t},\r\n\r\n\t//greater than or equal to\r\n\t\">=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal >= filterVal ? true : false;\r\n\t},\r\n\r\n\t//not equal to\r\n\t\"!=\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\treturn rowVal != filterVal ? true : false;\r\n\t},\r\n\r\n\t\"regex\":function(filterVal, rowVal, rowData, filterParams){\r\n\r\n\t\tif(typeof filterVal == \"string\"){\r\n\t\t\tfilterVal = new RegExp(filterVal);\r\n\t\t}\r\n\r\n\t\treturn filterVal.test(rowVal);\r\n\t},\r\n\r\n\t//contains the string\r\n\t\"like\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().indexOf(filterVal.toLowerCase()) > -1;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//contains the keywords\r\n\t\"keywords\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tvar keywords = filterVal.toLowerCase().split(typeof filterParams.separator === \"undefined\" ? \" \" : filterParams.separator),\r\n\t\tvalue = String(rowVal === null || typeof rowVal === \"undefined\" ? \"\" : rowVal).toLowerCase(),\r\n\t\tmatches = [];\r\n\r\n\t\tkeywords.forEach((keyword) =>{\r\n\t\t\tif(value.includes(keyword)){\r\n\t\t\t\tmatches.push(true);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn filterParams.matchAll ? matches.length === keywords.length : !!matches.length;\r\n\t},\r\n\r\n\t//starts with the string\r\n\t\"starts\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().startsWith(filterVal.toLowerCase());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//ends with the string\r\n\t\"ends\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\r\n\t\t\treturn rowVal === filterVal ? true : false;\r\n\t\t}else{\r\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\r\n\t\t\t\treturn String(rowVal).toLowerCase().endsWith(filterVal.toLowerCase());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//in array\r\n\t\"in\":function(filterVal, rowVal, rowData, filterParams){\r\n\t\tif(Array.isArray(filterVal)){\r\n\t\t\treturn filterVal.length ? filterVal.indexOf(rowVal) > -1 : true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Filter Error - filter value is not an array:\", filterVal);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultFilters from './defaults/filters.js';\r\n\r\nclass Filter extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.filterList = []; //hold filter list\r\n\t\tthis.headerFilters = {}; //hold column filters\r\n\t\tthis.headerFilterColumns = []; //hold columns that use header filters\r\n\r\n\t\tthis.prevHeaderFilterChangeCheck = \"\";\r\n\t\tthis.prevHeaderFilterChangeCheck = \"{}\";\r\n\r\n\t\tthis.changed = false; //has filtering changed since last render\r\n\t\tthis.tableInitialized = false;\r\n\r\n\t\tthis.registerTableOption(\"filterMode\", \"local\"); //local or remote filtering\r\n\r\n\t\tthis.registerTableOption(\"initialFilter\", false); //initial filtering criteria\r\n\t\tthis.registerTableOption(\"initialHeaderFilter\", false); //initial header filtering criteria\r\n\t\tthis.registerTableOption(\"headerFilterLiveFilterDelay\", 300); //delay before updating column after user types in header filter\r\n\r\n\t\tthis.registerColumnOption(\"headerFilter\");\r\n\t\tthis.registerColumnOption(\"headerFilterPlaceholder\");\r\n\t\tthis.registerColumnOption(\"headerFilterParams\");\r\n\t\tthis.registerColumnOption(\"headerFilterEmptyCheck\");\r\n\t\tthis.registerColumnOption(\"headerFilterFunc\");\r\n\t\tthis.registerColumnOption(\"headerFilterFuncParams\");\r\n\t\tthis.registerColumnOption(\"headerFilterLiveFilter\");\r\n\r\n\t\tthis.registerTableFunction(\"searchRows\", this.searchRows.bind(this));\r\n\t\tthis.registerTableFunction(\"searchData\", this.searchData.bind(this));\r\n\r\n\t\tthis.registerTableFunction(\"setFilter\", this.userSetFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"refreshFilter\", this.userRefreshFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"addFilter\", this.userAddFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"getFilters\", this.getFilters.bind(this));\r\n\t\tthis.registerTableFunction(\"setHeaderFilterFocus\", this.userSetHeaderFilterFocus.bind(this));\r\n\t\tthis.registerTableFunction(\"getHeaderFilterValue\", this.userGetHeaderFilterValue.bind(this));\r\n\t\tthis.registerTableFunction(\"setHeaderFilterValue\", this.userSetHeaderFilterValue.bind(this));\r\n\t\tthis.registerTableFunction(\"getHeaderFilters\", this.getHeaderFilters.bind(this));\r\n\t\tthis.registerTableFunction(\"removeFilter\", this.userRemoveFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"clearFilter\", this.userClearFilter.bind(this));\r\n\t\tthis.registerTableFunction(\"clearHeaderFilter\", this.userClearHeaderFilter.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"column\", \"headerFilterFocus\", this.setHeaderFilterFocus.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"reloadHeaderFilter\", this.reloadHeaderFilter.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"getHeaderFilterValue\", this.getHeaderFilterValue.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"setHeaderFilterValue\", this.setHeaderFilterValue.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumnHeaderFilter.bind(this));\r\n\t\tthis.subscribe(\"column-width-fit-before\", this.hideHeaderFilterElements.bind(this));\r\n\t\tthis.subscribe(\"column-width-fit-after\", this.showHeaderFilterElements.bind(this));\r\n\t\tthis.subscribe(\"table-built\", this.tableBuilt.bind(this));\r\n\r\n\t\tif(this.table.options.filterMode === \"remote\"){\r\n\t\t\tthis.subscribe(\"data-params\", this.remoteFilterParams.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerDataHandler(this.filter.bind(this), 10);\r\n\t}\r\n\r\n\ttableBuilt(){\r\n\t\tif(this.table.options.initialFilter){\r\n\t\t\tthis.setFilter(this.table.options.initialFilter);\r\n\t\t}\r\n\r\n\t\tif(this.table.options.initialHeaderFilter){\r\n\t\t\tthis.table.options.initialHeaderFilter.forEach((item) => {\r\n\r\n\t\t\t\tvar column = this.table.columnManager.findColumn(item.field);\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tthis.setHeaderFilterValue(column, item.value);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", item.field);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.tableInitialized = true;\r\n\t}\r\n\r\n\tremoteFilterParams(data, config, silent, params){\r\n\t\tparams.filter = this.getFilters(true, true);\r\n\t\treturn params;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\t//set standard filters\r\n\tuserSetFilter(field, type, value, params){\r\n\t\tthis.setFilter(field, type, value, params);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//set standard filters\r\n\tuserRefreshFilter(){\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//add filter to array\r\n\tuserAddFilter(field, type, value, params){\r\n\t\tthis.addFilter(field, type, value, params);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\tuserSetHeaderFilterFocus(field){\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tthis.setHeaderFilterFocus(column);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Focus Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tuserGetHeaderFilterValue(field) {\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn this.getHeaderFilterValue(column);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", field);\r\n\t\t}\r\n\t}\r\n\r\n\tuserSetHeaderFilterValue(field, value){\r\n\t\tvar column = this.table.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tthis.setHeaderFilterValue(column, value);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//remove filter from array\r\n\tuserRemoveFilter(field, type, value){\r\n\t\tthis.removeFilter(field, type, value);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//clear filters\r\n\tuserClearFilter(all){\r\n\t\tthis.clearFilter(all);\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\t//clear header filters\r\n\tuserClearHeaderFilter(){\r\n\t\tthis.clearHeaderFilter();\r\n\t\tthis.refreshFilter();\r\n\t}\r\n\r\n\r\n\t//search for specific row components\r\n\tsearchRows(field, type, value){\r\n\t\treturn this.search(\"rows\", field, type, value);\r\n\t}\r\n\r\n\t//search for specific data\r\n\tsearchData(field, type, value){\r\n\t\treturn this.search(\"data\", field, type, value);\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnHeaderFilter(column){\r\n\t\tvar def = column.definition;\r\n\r\n\t\tif(def.headerFilter){\r\n\r\n\t\t\tif(typeof def.headerFilterPlaceholder !== \"undefined\" && def.field){\r\n\t\t\t\tthis.module(\"localize\").setHeaderFilterColumnPlaceholder(def.field, def.headerFilterPlaceholder);\r\n\t\t\t}\r\n\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize column header filter\r\n\tinitializeColumn(column, value){\r\n\t\tvar self = this,\r\n\t\tfield = column.getField(),\r\n\t\tparams;\r\n\r\n\t\t//handle successfull value change\r\n\t\tfunction success(value){\r\n\t\t\tvar filterType = (column.modules.filter.tagType == \"input\" && column.modules.filter.attrType == \"text\") || column.modules.filter.tagType == \"textarea\" ? \"partial\" : \"match\",\r\n\t\t\ttype = \"\",\r\n\t\t\tfilterChangeCheck = \"\",\r\n\t\t\tfilterFunc;\r\n\r\n\t\t\tif(typeof column.modules.filter.prevSuccess === \"undefined\" || column.modules.filter.prevSuccess !== value){\r\n\r\n\t\t\t\tcolumn.modules.filter.prevSuccess = value;\r\n\r\n\t\t\t\tif(!column.modules.filter.emptyFunc(value)){\r\n\t\t\t\t\tcolumn.modules.filter.value = value;\r\n\r\n\t\t\t\t\tswitch(typeof column.definition.headerFilterFunc){\r\n\t\t\t\t\t\tcase \"string\":\r\n\t\t\t\t\t\tif(Filter.filters[column.definition.headerFilterFunc]){\r\n\t\t\t\t\t\t\ttype = column.definition.headerFilterFunc;\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\r\n\t\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\t\tparams = typeof params === \"function\" ? params(value, fieldVal, data) : params;\r\n\r\n\t\t\t\t\t\t\t\treturn Filter.filters[column.definition.headerFilterFunc](value, fieldVal, data, params);\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tconsole.warn(\"Header Filter Error - Matching filter function not found: \", column.definition.headerFilterFunc);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\r\n\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\tparams = typeof params === \"function\" ? params(value, fieldVal, data) : params;\r\n\r\n\t\t\t\t\t\t\treturn column.definition.headerFilterFunc(value, fieldVal, data, params);\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\ttype = filterFunc;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(!filterFunc){\r\n\t\t\t\t\t\tswitch(filterType){\r\n\t\t\t\t\t\t\tcase \"partial\":\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\tvar colVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\t\tif(typeof colVal !== 'undefined' && colVal !== null){\r\n\t\t\t\t\t\t\t\t\treturn String(colVal).toLowerCase().indexOf(String(value).toLowerCase()) > -1;\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\ttype = \"like\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\treturn column.getFieldValue(data) == value;\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\ttype = \"=\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tself.headerFilters[field] = {value:value, func:filterFunc, type:type, params:params || {}};\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdelete self.headerFilters[field];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfilterChangeCheck = JSON.stringify(self.headerFilters);\r\n\r\n\t\t\t\tif(self.prevHeaderFilterChangeCheck !== filterChangeCheck){\r\n\t\t\t\t\tself.prevHeaderFilterChangeCheck = filterChangeCheck;\r\n\r\n\t\t\t\t\tself.trackChanges();\r\n\t\t\t\t\tself.refreshFilter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tcolumn.modules.filter = {\r\n\t\t\tsuccess:success,\r\n\t\t\tattrType:false,\r\n\t\t\ttagType:false,\r\n\t\t\temptyFunc:false,\r\n\t\t};\r\n\r\n\t\tthis.generateHeaderFilterElement(column);\r\n\t}\r\n\r\n\tgenerateHeaderFilterElement(column, initialValue, reinitialize){\r\n\t\tvar self = this,\r\n\t\tsuccess = column.modules.filter.success,\r\n\t\tfield = column.getField(),\r\n\t\tfilterElement, editor, editorElement, cellWrapper, typingTimer, searchTrigger, params;\r\n\r\n\t\t//handle aborted edit\r\n\t\tfunction cancel(){}\r\n\r\n\t\tif(column.modules.filter.headerElement && column.modules.filter.headerElement.parentNode){\r\n\t\t\tcolumn.contentElement.removeChild(column.modules.filter.headerElement.parentNode);\r\n\t\t}\r\n\r\n\t\tif(field){\r\n\r\n\t\t\t//set empty value function\r\n\t\t\tcolumn.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function(value){\r\n\t\t\t\treturn !value && value !== \"0\" && value !== 0;\r\n\t\t\t};\r\n\r\n\t\t\tfilterElement = document.createElement(\"div\");\r\n\t\t\tfilterElement.classList.add(\"tabulator-header-filter\");\r\n\r\n\t\t\t//set column editor\r\n\t\t\tswitch(typeof column.definition.headerFilter){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(self.table.modules.edit.editors[column.definition.headerFilter]){\r\n\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.headerFilter];\r\n\r\n\t\t\t\t\tif((column.definition.headerFilter === \"tick\" || column.definition.headerFilter === \"tickCross\") && !column.definition.headerFilterEmptyCheck){\r\n\t\t\t\t\t\tcolumn.modules.filter.emptyFunc = function(value){\r\n\t\t\t\t\t\t\treturn value !== true && value !== false;\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Filter Error - Cannot build header filter, No such editor found: \", column.definition.editor);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\teditor = column.definition.headerFilter;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\tif(column.modules.edit && column.modules.edit.editor){\r\n\t\t\t\t\teditor = column.modules.edit.editor;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]){\r\n\t\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.formatter];\r\n\r\n\t\t\t\t\t\tif((column.definition.formatter === \"tick\" || column.definition.formatter === \"tickCross\") && !column.definition.headerFilterEmptyCheck){\r\n\t\t\t\t\t\t\tcolumn.modules.filter.emptyFunc = function(value){\r\n\t\t\t\t\t\t\t\treturn value !== true && value !== false;\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\teditor = self.table.modules.edit.editors[\"input\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(editor){\r\n\r\n\t\t\t\tcellWrapper = {\r\n\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\treturn typeof initialValue !== \"undefined\" ? initialValue : \"\";\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetField:function(){\r\n\t\t\t\t\t\treturn column.definition.field;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\treturn filterElement;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\tnormalizeHeight:function(){\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\tparams = column.definition.headerFilterParams || {};\r\n\r\n\t\t\t\tparams = typeof params === \"function\" ? params.call(self.table, cellWrapper) : params;\r\n\r\n\t\t\t\teditorElement = editor.call(this.table.modules.edit, cellWrapper, function(){}, success, cancel, params);\r\n\r\n\t\t\t\tif(!editorElement){\r\n\t\t\t\t\tconsole.warn(\"Filter Error - Cannot add filter to \" + field + \" column, editor returned a value of false\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!(editorElement instanceof Node)){\r\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);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//set Placeholder Text\r\n\t\t\t\tif(field){\r\n\t\t\t\t\tself.langBind(\"headerFilters|columns|\" + column.definition.field, function(value){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"placeholder\", typeof value !== \"undefined\" && value ? value : self.langText(\"headerFilters|default\"));\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.langBind(\"headerFilters|default\", function(value){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"placeholder\", value);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//focus on element on click\r\n\t\t\t\teditorElement.addEventListener(\"click\", function(e){\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\teditorElement.focus();\r\n\t\t\t\t});\r\n\r\n\t\t\t\teditorElement.addEventListener(\"focus\", (e) => {\r\n\t\t\t\t\tvar left = this.table.columnManager.element.scrollLeft;\r\n\r\n\t\t\t\t\tvar headerPos = this.table.rowManager.element.scrollLeft + parseInt(this.table.columnManager.element.style.marginLeft);\r\n\r\n\t\t\t\t\tif(left !== headerPos){\r\n\t\t\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\t\t\tthis.table.columnManager.scrollHorizontal(left);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\t//live update filters as user types\r\n\t\t\t\ttypingTimer = false;\r\n\r\n\t\t\t\tsearchTrigger = function(e){\r\n\t\t\t\t\tif(typingTimer){\r\n\t\t\t\t\t\tclearTimeout(typingTimer);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ttypingTimer = setTimeout(function(){\r\n\t\t\t\t\t\tsuccess(editorElement.value);\r\n\t\t\t\t\t},self.table.options.headerFilterLiveFilterDelay);\r\n\t\t\t\t};\r\n\r\n\t\t\t\tcolumn.modules.filter.headerElement = editorElement;\r\n\t\t\t\tcolumn.modules.filter.attrType = editorElement.hasAttribute(\"type\") ? editorElement.getAttribute(\"type\").toLowerCase() : \"\" ;\r\n\t\t\t\tcolumn.modules.filter.tagType = editorElement.tagName.toLowerCase();\r\n\r\n\t\t\t\tif(column.definition.headerFilterLiveFilter !== false){\r\n\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\t!(\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === 'autocomplete' ||\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === 'tickCross' ||\r\n\t\t\t\t\t\t\t((column.definition.editor === 'autocomplete' ||\r\n\t\t\t\t\t\t\t\tcolumn.definition.editor === 'tickCross') &&\r\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === true)\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\teditorElement.addEventListener(\"keyup\", searchTrigger);\r\n\t\t\t\t\teditorElement.addEventListener(\"search\", searchTrigger);\r\n\r\n\r\n\t\t\t\t\t//update number filtered columns on change\r\n\t\t\t\t\tif(column.modules.filter.attrType == \"number\"){\r\n\t\t\t\t\t\teditorElement.addEventListener(\"change\", function(e){\r\n\t\t\t\t\t\t\tsuccess(editorElement.value);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//change text inputs to search inputs to allow for clearing of field\r\n\t\t\t\t\tif(column.modules.filter.attrType == \"text\" && this.table.browser !== \"ie\"){\r\n\t\t\t\t\t\teditorElement.setAttribute(\"type\", \"search\");\r\n\t\t\t\t\t\t// editorElement.off(\"change blur\"); //prevent blur from triggering filter and preventing selection click\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\t//prevent input and select elements from propegating click to column sorters etc\r\n\t\t\t\t\tif(column.modules.filter.tagType == \"input\" || column.modules.filter.tagType == \"select\" || column.modules.filter.tagType == \"textarea\"){\r\n\t\t\t\t\t\teditorElement.addEventListener(\"mousedown\",function(e){\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfilterElement.appendChild(editorElement);\r\n\r\n\t\t\t\tcolumn.contentElement.appendChild(filterElement);\r\n\r\n\t\t\t\tif(!reinitialize){\r\n\t\t\t\t\tself.headerFilterColumns.push(column);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Filter Error - Cannot add header filter, column has no field set:\", column.definition.title);\r\n\t\t}\r\n\t}\r\n\r\n\t//hide all header filter elements (used to ensure correct column widths in \"fitData\" layout mode)\r\n\thideHeaderFilterElements(){\r\n\t\tthis.headerFilterColumns.forEach(function(column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tcolumn.modules.filter.headerElement.style.display = 'none';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//show all header filter elements (used to ensure correct column widths in \"fitData\" layout mode)\r\n\tshowHeaderFilterElements(){\r\n\t\tthis.headerFilterColumns.forEach(function(column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tcolumn.modules.filter.headerElement.style.display = '';\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//programatically set focus of header filter\r\n\tsetHeaderFilterFocus(column){\r\n\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\tcolumn.modules.filter.headerElement.focus();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Filter Focus Error - No header filter set on column:\", column.getField());\r\n\t\t}\r\n\t}\r\n\r\n\t//programmatically get value of header filter\r\n\tgetHeaderFilterValue(column){\r\n\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\treturn column.modules.filter.headerElement.value;\r\n\t\t} else {\r\n\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t}\r\n\t}\r\n\r\n\t//programatically set value of header filter\r\n\tsetHeaderFilterValue(column, value){\r\n\t\tif (column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tthis.generateHeaderFilterElement(column, value, true);\r\n\t\t\t\tcolumn.modules.filter.success(value);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treloadHeaderFilter(column){\r\n\t\tif (column){\r\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\r\n\t\t\t\tthis.generateHeaderFilterElement(column, column.modules.filter.value, true);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trefreshFilter(){\r\n\t\tif(this.tableInitialized){\r\n\t\t\tif(this.table.options.filterMode === \"remote\"){\r\n\t\t\t\tthis.reloadData();\r\n\t\t\t}else{\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//TODO - Persist left position of row manager\r\n\t\t// left = this.scrollLeft;\r\n\t\t// this.scrollHorizontal(left);\r\n\t}\r\n\r\n\t//check if the filters has changed since last use\r\n\ttrackChanges(){\r\n\t\tthis.changed = true;\r\n\t\tthis.dispatch(\"filter-changed\");\r\n\t}\r\n\r\n\t//check if the filters has changed since last use\r\n\thasChanged(){\r\n\t\tvar changed = this.changed;\r\n\t\tthis.changed = false;\r\n\t\treturn changed;\r\n\t}\r\n\r\n\t//set standard filters\r\n\tsetFilter(field, type, value, params){\r\n\t\tthis.filterList = [];\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value, params:params}];\r\n\t\t}\r\n\r\n\t\tthis.addFilter(field);\r\n\t}\r\n\r\n\t//add filter to array\r\n\taddFilter(field, type, value, params){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value, params:params}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\tthis.filterList.push(filter);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(changed){\r\n\t\t\tthis.trackChanges();\r\n\t\t}\r\n\t}\r\n\r\n\tfindFilter(filter){\r\n\t\tvar column;\r\n\r\n\t\tif(Array.isArray(filter)){\r\n\t\t\treturn this.findSubFilters(filter);\r\n\t\t}\r\n\r\n\t\tvar filterFunc = false;\r\n\r\n\t\tif(typeof filter.field == \"function\"){\r\n\t\t\tfilterFunc = function(data){\r\n\t\t\t\treturn filter.field(data, filter.type || {})// pass params to custom filter function\r\n\t\t\t};\r\n\t\t}else{\r\n\r\n\t\t\tif(Filter.filters[filter.type]){\r\n\r\n\t\t\t\tcolumn = this.table.columnManager.getColumnByField(filter.field);\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\treturn Filter.filters[filter.type](filter.value, column.getFieldValue(data), data, filter.params || {});\r\n\t\t\t\t\t};\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\treturn Filter.filters[filter.type](filter.value, data[filter.field], data, filter.params || {});\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Filter Error - No such filter type found, ignoring: \", filter.type);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfilter.func = filterFunc;\r\n\r\n\t\treturn filter.func ? filter : false;\r\n\t}\r\n\r\n\tfindSubFilters(filters){\r\n\t\tvar output = [];\r\n\r\n\t\tfilters.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\toutput.push(filter);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output.length ? output : false;\r\n\t}\r\n\r\n\t//get all filters\r\n\tgetFilters(all, ajax){\r\n\t\tvar output = [];\r\n\r\n\t\tif(all){\r\n\t\t\toutput = this.getHeaderFilters();\r\n\t\t}\r\n\r\n\t\tif(ajax){\r\n\t\t\toutput.forEach(function(item){\r\n\t\t\t\tif(typeof item.type == \"function\"){\r\n\t\t\t\t\titem.type = \"function\";\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\toutput = output.concat(this.filtersToArray(this.filterList, ajax));\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//filter to Object\r\n\tfiltersToArray(filterList, ajax){\r\n\t\tvar output = [];\r\n\r\n\t\tfilterList.forEach((filter) => {\r\n\t\t\tvar item;\r\n\r\n\t\t\tif(Array.isArray(filter)){\r\n\t\t\t\toutput.push(this.filtersToArray(filter, ajax));\r\n\t\t\t}else{\r\n\t\t\t\titem = {field:filter.field, type:filter.type, value:filter.value}\r\n\r\n\t\t\t\tif(ajax){\r\n\t\t\t\t\tif(typeof item.type == \"function\"){\r\n\t\t\t\t\t\titem.type = \"function\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\toutput.push(item);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//get all filters\r\n\tgetHeaderFilters(){\r\n\t\tvar output = [];\r\n\r\n\t\tfor(var key in this.headerFilters){\r\n\t\t\toutput.push({field:key, type:this.headerFilters[key].type, value:this.headerFilters[key].value});\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//remove filter from array\r\n\tremoveFilter(field, type, value){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tvar index = -1;\r\n\r\n\t\t\tif(typeof filter.field == \"object\"){\r\n\t\t\t\tindex = this.filterList.findIndex((element) => {\r\n\t\t\t\t\treturn filter === element;\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tindex = this.filterList.findIndex((element) => {\r\n\t\t\t\t\treturn filter.field === element.field && filter.type === element.type && filter.value === element.value;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.filterList.splice(index, 1);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Filter Error - No matching filter type found, ignoring: \", filter.type);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//clear filters\r\n\tclearFilter(all){\r\n\t\tthis.filterList = [];\r\n\r\n\t\tif(all){\r\n\t\t\tthis.clearHeaderFilter();\r\n\t\t}\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//clear header filters\r\n\tclearHeaderFilter(){\r\n\t\tthis.headerFilters = {};\r\n\t\tthis.prevHeaderFilterChangeCheck = \"{}\";\r\n\r\n\t\tthis.headerFilterColumns.forEach((column) => {\r\n\t\t\tif(typeof column.modules.filter.value !== \"undefined\"){\r\n\t\t\t\tdelete column.modules.filter.value;\r\n\t\t\t}\r\n\t\t\tcolumn.modules.filter.prevSuccess = undefined;\r\n\t\t\tthis.reloadHeaderFilter(column);\r\n\t\t});\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\t//search data and return matching rows\r\n\tsearch (searchType, field, type, value){\r\n\t\tvar activeRows = [],\r\n\t\tfilterList = [];\r\n\r\n\t\tif(!Array.isArray(field)){\r\n\t\t\tfield = [{field:field, type:type, value:value}];\r\n\t\t}\r\n\r\n\t\tfield.forEach((filter) => {\r\n\t\t\tfilter = this.findFilter(filter);\r\n\r\n\t\t\tif(filter){\r\n\t\t\t\tfilterList.push(filter);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\tvar match = true;\r\n\r\n\t\t\tfilterList.forEach((filter) => {\r\n\t\t\t\tif(!this.filterRecurse(filter, row.getData())){\r\n\t\t\t\t\tmatch = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tactiveRows.push(searchType === \"data\" ? row.getData(\"data\") : row.getComponent());\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\t\treturn activeRows;\r\n\t}\r\n\r\n\t//filter row array\r\n\tfilter(rowList, filters){\r\n\t\tvar activeRows = [],\r\n\t\tactiveRowComponents = [];\r\n\r\n\t\tif(this.subscribedExternal(\"dataFiltering\")){\r\n\t\t\tthis.dispatchExternal(\"dataFiltering\", this.getFilters());\r\n\t\t}\r\n\r\n\t\tif(this.table.options.filterMode !== \"remote\" && (this.filterList.length || Object.keys(this.headerFilters).length)){\r\n\r\n\t\t\trowList.forEach((row) => {\r\n\t\t\t\tif(this.filterRow(row)){\r\n\t\t\t\t\tactiveRows.push(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t}else{\r\n\t\t\tactiveRows = rowList.slice(0);\r\n\t\t}\r\n\r\n\t\tif(this.subscribedExternal(\"dataFiltered\")){\r\n\r\n\t\t\tactiveRows.forEach((row) => {\r\n\t\t\t\tactiveRowComponents.push(row.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatchExternal(\"dataFiltered\", this.getFilters(), activeRowComponents);\r\n\t\t}\r\n\r\n\t\treturn activeRows;\r\n\t}\r\n\r\n\t//filter individual row\r\n\tfilterRow(row, filters){\r\n\t\tvar match = true,\r\n\t\tdata = row.getData();\r\n\r\n\t\tthis.filterList.forEach((filter) => {\r\n\t\t\tif(!this.filterRecurse(filter, data)){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\tfor(var field in this.headerFilters){\r\n\t\t\tif(!this.headerFilters[field].func(data)){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tfilterRecurse(filter, data){\r\n\t\tvar match = false;\r\n\r\n\t\tif(Array.isArray(filter)){\r\n\t\t\tfilter.forEach((subFilter) => {\r\n\t\t\t\tif(this.filterRecurse(subFilter, data)){\r\n\t\t\t\t\tmatch = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tmatch = filter.func(data);\r\n\t\t}\r\n\r\n\t\treturn match;\r\n\t}\r\n}\r\n\r\nFilter.moduleName = \"filter\";\r\n\r\n//load defaults\r\nFilter.filters = defaultFilters;\r\n\r\nexport default Filter;","export default function(cell, formatterParams, onRendered){\r\n\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n};","import plaintext from './formatters/plaintext.js';\r\nimport html from './formatters/html.js';\r\nimport textarea from './formatters/textarea.js';\r\nimport money from './formatters/money.js';\r\nimport link from './formatters/link.js';\r\nimport image from './formatters/image.js';\r\nimport tickCross from './formatters/tickCross.js';\r\nimport datetime from './formatters/datetime.js';\r\nimport datetimediff from './formatters/datetimediff.js';\r\nimport lookup from './formatters/lookup.js';\r\nimport star from './formatters/star.js';\r\nimport traffic from './formatters/traffic.js';\r\nimport progress from './formatters/progress.js';\r\nimport color from './formatters/color.js';\r\nimport buttonTick from './formatters/buttonTick.js';\r\nimport buttonCross from './formatters/buttonCross.js';\r\nimport rownum from './formatters/rownum.js';\r\nimport handle from './formatters/handle.js';\r\nimport responsiveCollapse from './formatters/responsiveCollapse.js';\r\nimport rowSelection from './formatters/rowSelection.js';\r\n\r\nexport default {\r\n\tplaintext:plaintext,\r\n\thtml:html,\r\n\ttextarea:textarea,\r\n\tmoney:money,\r\n\tlink:link,\r\n\timage:image,\r\n\ttickCross:tickCross,\r\n\tdatetime:datetime,\r\n\tdatetimediff:datetimediff,\r\n\tlookup:lookup,\r\n\tstar:star,\r\n\ttraffic:traffic,\r\n\tprogress:progress,\r\n\tcolor:color,\r\n\tbuttonTick:buttonTick,\r\n\tbuttonCross:buttonCross,\r\n\trownum:rownum,\r\n\thandle:handle,\r\n\tresponsiveCollapse:responsiveCollapse,\r\n\trowSelection:rowSelection,\r\n};","export default function(cell, formatterParams, onRendered){\r\n\treturn cell.getValue();\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().style.whiteSpace = \"pre-wrap\";\r\n\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar floatVal = parseFloat(cell.getValue()),\r\n\tsign = \"\",\r\n\tnumber, integer, decimal, rgx;\r\n\r\n\tvar decimalSym = formatterParams.decimal || \".\";\r\n\tvar thousandSym = formatterParams.thousand || \",\";\r\n\tvar negativeSign = formatterParams.negativeSign || \"-\";\r\n\tvar symbol = formatterParams.symbol || \"\";\r\n\tvar after = !!formatterParams.symbolAfter;\r\n\tvar precision = typeof formatterParams.precision !== \"undefined\" ? formatterParams.precision : 2;\r\n\r\n\tif(isNaN(floatVal)){\r\n\t\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\r\n\t}\r\n\r\n\tif(floatVal < 0){\r\n\t\tfloatVal = Math.abs(floatVal);\r\n\t\tsign = negativeSign;\r\n\t}\r\n\r\n\tnumber = precision !== false ? floatVal.toFixed(precision) : floatVal;\r\n\tnumber = String(number).split(\".\");\r\n\r\n\tinteger = number[0];\r\n\tdecimal = number.length > 1 ? decimalSym + number[1] : \"\";\r\n\r\n\trgx = /(\\d+)(\\d{3})/;\r\n\r\n\twhile (rgx.test(integer)){\r\n\t\tinteger = integer.replace(rgx, \"$1\" + thousandSym + \"$2\");\r\n\t}\r\n\r\n\treturn after ? sign + integer + decimal + symbol : sign + symbol + integer + decimal;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\turlPrefix = formatterParams.urlPrefix || \"\",\r\n\tdownload = formatterParams.download,\r\n\tlabel = value,\r\n\tel = document.createElement(\"a\"),\r\n\tdata;\r\n\r\n\tif(formatterParams.labelField){\r\n\t\tdata = cell.getData();\r\n\t\tlabel = data[formatterParams.labelField];\r\n\t}\r\n\r\n\tif(formatterParams.label){\r\n\t\tswitch(typeof formatterParams.label){\r\n\t\t\tcase \"string\":\r\n\t\t\tlabel = formatterParams.label;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tlabel = formatterParams.label(cell);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(label){\r\n\t\tif(formatterParams.urlField){\r\n\t\t\tdata = cell.getData();\r\n\t\t\tvalue = data[formatterParams.urlField];\r\n\t\t}\r\n\r\n\t\tif(formatterParams.url){\r\n\t\t\tswitch(typeof formatterParams.url){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tvalue = formatterParams.url;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tvalue = formatterParams.url(cell);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tel.setAttribute(\"href\", urlPrefix + value);\r\n\r\n\t\tif(formatterParams.target){\r\n\t\t\tel.setAttribute(\"target\", formatterParams.target);\r\n\t\t}\r\n\r\n\t\tif(formatterParams.download){\r\n\r\n\t\t\tif(typeof download == \"function\"){\r\n\t\t\t\tdownload = download(cell);\r\n\t\t\t}else{\r\n\t\t\t\tdownload = download === true ? \"\" : download;\r\n\t\t\t}\r\n\r\n\t\t\tel.setAttribute(\"download\", download);\r\n\t\t}\r\n\r\n\t\tel.innerHTML = this.emptyToSpace(this.sanitizeHTML(label));\r\n\r\n\t\treturn el;\r\n\t}else{\r\n\t\treturn \" \";\r\n\t}\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar el = document.createElement(\"img\"),\r\n\tsrc = cell.getValue();\r\n\r\n\tif(formatterParams.urlPrefix){\r\n\t\tsrc = formatterParams.urlPrefix + cell.getValue();\r\n\t}\r\n\r\n\tif(formatterParams.urlSuffix){\r\n\t\tsrc = src + formatterParams.urlSuffix;\r\n\t}\r\n\r\n\tel.setAttribute(\"src\", src);\r\n\r\n\tswitch(typeof formatterParams.height){\r\n\t\tcase \"number\":\r\n\t\tel.style.height = formatterParams.height + \"px\";\r\n\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\tel.style.height = formatterParams.height;\r\n\t\tbreak;\r\n\t}\r\n\r\n\tswitch(typeof formatterParams.width){\r\n\t\tcase \"number\":\r\n\t\tel.style.width = formatterParams.width + \"px\";\r\n\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\tel.style.width = formatterParams.width;\r\n\t\tbreak;\r\n\t}\r\n\r\n\tel.addEventListener(\"load\", function(){\r\n\t\tcell.getRow().normalizeHeight();\r\n\t});\r\n\r\n\treturn el;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\telement = cell.getElement(),\r\n\tempty = formatterParams.allowEmpty,\r\n\ttruthy = formatterParams.allowTruthy,\r\n\ttick = typeof formatterParams.tickElement !== \"undefined\" ? formatterParams.tickElement : '',\r\n\tcross = typeof formatterParams.crossElement !== \"undefined\" ? formatterParams.crossElement : '';\r\n\r\n\tif((truthy && value) || (value === true || value === \"true\" || value === \"True\" || value === 1 || value === \"1\")){\r\n\t\telement.setAttribute(\"aria-checked\", true);\r\n\t\treturn tick || \"\";\r\n\t}else{\r\n\t\tif(empty && (value === \"null\" || value === \"\" || value === null || typeof value === \"undefined\")){\r\n\t\t\telement.setAttribute(\"aria-checked\", \"mixed\");\r\n\t\t\treturn \"\";\r\n\t\t}else{\r\n\t\t\telement.setAttribute(\"aria-checked\", false);\r\n\t\t\treturn cross || \"\";\r\n\t\t}\r\n\t}\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar inputFormat = formatterParams.inputFormat || \"yyyy-MM-dd HH:mm:ss\";\r\n\tvar\toutputFormat = formatterParams.outputFormat || \"dd/MM/yyyy HH:mm:ss\";\r\n\tvar\tinvalid = typeof formatterParams.invalidPlaceholder !== \"undefined\" ? formatterParams.invalidPlaceholder : \"\";\r\n\tvar value = cell.getValue();\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\tvar newDatetime = inputFormat === \"iso\" ? DT.fromISO(String(value)) : DT.fromFormat(String(value), inputFormat);\r\n\r\n\t\tif(newDatetime.isValid){\r\n\t\t\tif(formatterParams.timezone){\r\n\t\t\t\tnewDatetime = newDatetime.setZone(formatterParams.timezone);\r\n\t\t\t}\r\n\r\n\t\t\treturn newDatetime.toFormat(outputFormat);\r\n\t\t}else{\r\n\t\t\tif(invalid === true || !value){\r\n\t\t\t\treturn value;\r\n\t\t\t}else if(typeof invalid === \"function\"){\r\n\t\t\t\treturn invalid(value);\r\n\t\t\t}else{\r\n\t\t\t\treturn invalid;\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tconsole.error(\"Format Error - 'datetime' formatter is dependant on luxon.js\");\r\n\t}\r\n};","export default function (cell, formatterParams, onRendered) {\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar inputFormat = formatterParams.inputFormat || \"yyyy-MM-dd HH:mm:ss\";\r\n\tvar invalid = typeof formatterParams.invalidPlaceholder !== \"undefined\" ? formatterParams.invalidPlaceholder : \"\";\r\n\tvar suffix = typeof formatterParams.suffix !== \"undefined\" ? formatterParams.suffix : false;\r\n\tvar unit = typeof formatterParams.unit !== \"undefined\" ? formatterParams.unit : \"days\";\r\n\tvar humanize = typeof formatterParams.humanize !== \"undefined\" ? formatterParams.humanize : false;\r\n\tvar date = typeof formatterParams.date !== \"undefined\" ? formatterParams.date : DT.now();\r\n\tvar value = cell.getValue();\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\t\r\n\t\tvar newDatetime = inputFormat === \"iso\" ? DT.fromISO(String(value)) : DT.fromFormat(String(value), inputFormat);\r\n\r\n\t\tif (newDatetime.isValid){\r\n\t\t\tif(humanize){\r\n\t\t\t\t// return moment.duration(newDatetime.diff(date)).humanize(suffix);\r\n\t\t\t}else{\r\n\t\t\t\treturn parseInt(newDatetime.diff(date, unit)[unit]) + (suffix ? \" \" + suffix : \"\");\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\tif (invalid === true) {\r\n\t\t\t\treturn value;\r\n\t\t\t} else if (typeof invalid === \"function\") {\r\n\t\t\t\treturn invalid(value);\r\n\t\t\t} else {\r\n\t\t\t\treturn invalid;\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\tconsole.error(\"Format Error - 'datetimediff' formatter is dependant on luxon.js\");\r\n\t}\r\n};","export default function (cell, formatterParams, onRendered) {\r\n\tvar value = cell.getValue();\r\n\r\n\tif (typeof formatterParams[value] === \"undefined\") {\r\n\t\tconsole.warn('Missing display value for ' + value);\r\n\t\treturn value;\r\n\t}\r\n\r\n\treturn formatterParams[value];\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = cell.getValue(),\r\n\telement = cell.getElement(),\r\n\tmaxStars = formatterParams && formatterParams.stars ? formatterParams.stars : 5,\r\n\tstars = document.createElement(\"span\"),\r\n\tstar = document.createElementNS('http://www.w3.org/2000/svg', \"svg\"),\r\n\tstarActive = '',\r\n\tstarInactive = '';\r\n\r\n\t//style stars holder\r\n\tstars.style.verticalAlign = \"middle\";\r\n\r\n\t//style star\r\n\tstar.setAttribute(\"width\", \"14\");\r\n\tstar.setAttribute(\"height\", \"14\");\r\n\tstar.setAttribute(\"viewBox\", \"0 0 512 512\");\r\n\tstar.setAttribute(\"xml:space\", \"preserve\");\r\n\tstar.style.padding = \"0 1px\";\r\n\r\n\tvalue = value && !isNaN(value) ? parseInt(value) : 0;\r\n\r\n\tvalue = Math.max(0, Math.min(value, maxStars));\r\n\r\n\tfor(var i=1;i<= maxStars;i++){\r\n\t\tvar nextStar = star.cloneNode(true);\r\n\t\tnextStar.innerHTML = i <= value ? starActive : starInactive;\r\n\r\n\t\tstars.appendChild(nextStar);\r\n\t}\r\n\r\n\telement.style.whiteSpace = \"nowrap\";\r\n\telement.style.overflow = \"hidden\";\r\n\telement.style.textOverflow = \"ellipsis\";\r\n\r\n\telement.setAttribute(\"aria-label\", value);\r\n\r\n\treturn stars;\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar value = this.sanitizeHTML(cell.getValue()) || 0,\r\n\tel = document.createElement(\"span\"),\r\n\tmax = formatterParams && formatterParams.max ? formatterParams.max : 100,\r\n\tmin = formatterParams && formatterParams.min ? formatterParams.min : 0,\r\n\tcolors = formatterParams && typeof formatterParams.color !== \"undefined\" ? formatterParams.color : [\"red\", \"orange\", \"green\"],\r\n\tcolor = \"#666666\",\r\n\tpercent, percentValue;\r\n\r\n\tif(isNaN(value) || typeof cell.getValue() === \"undefined\"){\r\n\t\treturn;\r\n\t}\r\n\r\n\tel.classList.add(\"tabulator-traffic-light\");\r\n\r\n\t//make sure value is in range\r\n\tpercentValue = parseFloat(value) <= max ? parseFloat(value) : max;\r\n\tpercentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min;\r\n\r\n\t//workout percentage\r\n\tpercent = (max - min) / 100;\r\n\tpercentValue = Math.round((percentValue - min) / percent);\r\n\r\n\t//set color\r\n\tswitch(typeof colors){\r\n\t\tcase \"string\":\r\n\t\tcolor = colors;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tcolor = colors(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(colors)){\r\n\t\t\tvar unit = 100 / colors.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, colors.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tcolor = colors[index];\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tel.style.backgroundColor = color;\r\n\r\n\treturn el;\r\n};","import CellComponent from '../../../../core/cell/CellComponent.js';\r\n\r\nexport default function(cell, formatterParams, onRendered){ //progress bar\r\n\tvar value = this.sanitizeHTML(cell.getValue()) || 0,\r\n\telement = cell.getElement(),\r\n\tmax = formatterParams && formatterParams.max ? formatterParams.max : 100,\r\n\tmin = formatterParams && formatterParams.min ? formatterParams.min : 0,\r\n\tlegendAlign = formatterParams && formatterParams.legendAlign ? formatterParams.legendAlign : \"center\",\r\n\tpercent, percentValue, color, legend, legendColor, top, left, right, bottom;\r\n\r\n\t//make sure value is in range\r\n\tpercentValue = parseFloat(value) <= max ? parseFloat(value) : max;\r\n\tpercentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min;\r\n\r\n\t//workout percentage\r\n\tpercent = (max - min) / 100;\r\n\tpercentValue = Math.round((percentValue - min) / percent);\r\n\r\n\t//set bar color\r\n\tswitch(typeof formatterParams.color){\r\n\t\tcase \"string\":\r\n\t\tcolor = formatterParams.color;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tcolor = formatterParams.color(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(formatterParams.color)){\r\n\t\t\tvar unit = 100 / formatterParams.color.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, formatterParams.color.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tcolor = formatterParams.color[index];\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tdefault:\r\n\t\tcolor = \"#2DC214\";\r\n\t}\r\n\r\n\t//generate legend\r\n\tswitch(typeof formatterParams.legend){\r\n\t\tcase \"string\":\r\n\t\tlegend = formatterParams.legend;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tlegend = formatterParams.legend(value);\r\n\t\tbreak;\r\n\t\tcase \"boolean\":\r\n\t\tlegend = value;\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\tlegend = false;\r\n\t}\r\n\r\n\t//set legend color\r\n\tswitch(typeof formatterParams.legendColor){\r\n\t\tcase \"string\":\r\n\t\tlegendColor = formatterParams.legendColor;\r\n\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\tlegendColor = formatterParams.legendColor(value);\r\n\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\tif(Array.isArray(formatterParams.legendColor)){\r\n\t\t\tvar unit = 100 / formatterParams.legendColor.length;\r\n\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\tindex = Math.min(index, formatterParams.legendColor.length - 1);\r\n\t\t\tindex = Math.max(index, 0);\r\n\t\t\tlegendColor = formatterParams.legendColor[index];\r\n\t\t}\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\tlegendColor = \"#000\";\r\n\t}\r\n\r\n\telement.style.minWidth = \"30px\";\r\n\telement.style.position = \"relative\";\r\n\r\n\telement.setAttribute(\"aria-label\", percentValue);\r\n\r\n\tvar barEl = document.createElement(\"div\");\r\n\tbarEl.style.display = \"inline-block\";\r\n\tbarEl.style.position = \"absolute\";\r\n\tbarEl.style.width = percentValue + \"%\";\r\n\tbarEl.style.backgroundColor = color;\r\n\tbarEl.style.height = \"100%\";\r\n\r\n\tbarEl.setAttribute('data-max', max);\r\n\tbarEl.setAttribute('data-min', min);\r\n\r\n\tvar barContainer = document.createElement(\"div\");\r\n\tbarContainer.style.position = \"relative\";\r\n\tbarContainer.style.width = \"100%\";\r\n\tbarContainer.style.height = \"100%\";\r\n\r\n\tif(legend){\r\n\t\tvar legendEl = document.createElement(\"div\");\r\n\t\tlegendEl.style.position = \"absolute\";\r\n\t\tlegendEl.style.top = 0;\r\n\t\tlegendEl.style.left = 0;\r\n\t\tlegendEl.style.textAlign = legendAlign;\r\n\t\tlegendEl.style.width = \"100%\";\r\n\t\tlegendEl.style.color = legendColor;\r\n\t\tlegendEl.innerHTML = legend;\r\n\t}\r\n\r\n\tonRendered(function(){\r\n\r\n\t\t//handle custom element needed if formatter is to be included in printed/downloaded output\r\n\t\tif(!(cell instanceof CellComponent)){\r\n\t\t\tvar holderEl = document.createElement(\"div\");\r\n\t\t\tholderEl.style.position = \"absolute\";\r\n\t\t\tholderEl.style.top = \"4px\";\r\n\t\t\tholderEl.style.bottom = \"4px\";\r\n\t\t\tholderEl.style.left = \"4px\";\r\n\t\t\tholderEl.style.right = \"4px\";\r\n\r\n\t\t\telement.appendChild(holderEl);\r\n\r\n\t\t\telement = holderEl;\r\n\t\t}\r\n\r\n\t\telement.appendChild(barContainer);\r\n\t\tbarContainer.appendChild(barEl);\r\n\r\n\t\tif(legend){\r\n\t\t\tbarContainer.appendChild(legendEl);\r\n\t\t}\r\n\t});\r\n\r\n\treturn \"\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().style.backgroundColor = this.sanitizeHTML(cell.getValue());\r\n\treturn \"\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tcell.getElement().classList.add(\"tabulator-row-handle\");\r\n\treturn \"
\";\r\n};","export default function(cell, formatterParams, onRendered){\r\n\tvar open = false,\r\n\tel = document.createElement(\"div\"),\r\n\tconfig = cell.getRow()._row.modules.responsiveLayout;\r\n\r\n\tel.classList.add(\"tabulator-responsive-collapse-toggle\");\r\n\tel.innerHTML = \"+-\";\r\n\r\n\tcell.getElement().classList.add(\"tabulator-row-handle\");\r\n\r\n\tfunction toggleList(isOpen){\r\n\t\tvar collapseEl = config.element;\r\n\r\n\t\tconfig.open = isOpen;\r\n\r\n\t\tif(collapseEl){\r\n\r\n\t\t\tif(config.open){\r\n\t\t\t\tel.classList.add(\"open\");\r\n\t\t\t\tcollapseEl.style.display = '';\r\n\t\t\t}else{\r\n\t\t\t\tel.classList.remove(\"open\");\r\n\t\t\t\tcollapseEl.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tel.addEventListener(\"click\", function(e){\r\n\t\te.stopImmediatePropagation();\r\n\t\ttoggleList(!config.open);\r\n\t});\r\n\r\n\ttoggleList(config.open);\r\n\r\n\treturn el;\r\n};","import RowComponent from '../../../../core/row/RowComponent.js';\r\n\r\nexport default function(cell, formatterParams, onRendered){\r\n\tvar checkbox = document.createElement(\"input\");\r\n\tvar blocked = false;\r\n\r\n\tcheckbox.type = 'checkbox';\r\n\r\n\tcheckbox.setAttribute(\"aria-label\", \"Select Row\");\r\n\t\r\n\tif(this.table.modExists(\"selectRow\", true)){\r\n\r\n\t\tcheckbox.addEventListener(\"click\", (e) => {\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tif(typeof cell.getRow == 'function'){\r\n\t\t\tvar row = cell.getRow();\r\n\r\n\t\t\tif(row instanceof RowComponent){\r\n\r\n\t\t\t\tcheckbox.addEventListener(\"change\", (e) => {\r\n\t\t\t\t\tif(this.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\t\tif(!blocked){\r\n\t\t\t\t\t\t\trow.toggleSelect();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tblocked = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trow.toggleSelect();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(this.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\tcheckbox.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\tblocked = true;\r\n\t\t\t\t\t\tthis.table.modules.selectRow.handleComplexRowClick(row._row, e);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcheckbox.checked = row.isSelected && row.isSelected();\r\n\t\t\t\tthis.table.modules.selectRow.registerRowSelectCheckbox(row, checkbox);\r\n\t\t\t}else{\r\n\t\t\t\tcheckbox = \"\";\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tcheckbox.addEventListener(\"change\", (e) => {\r\n\t\t\t\tif(this.table.modules.selectRow.selectedRows.length){\r\n\t\t\t\t\tthis.table.deselectRow();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis.table.selectRow(formatterParams.rowRange);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.table.modules.selectRow.registerHeaderSelectCheckbox(checkbox);\r\n\t\t}\r\n\t}\r\n\r\n\treturn checkbox;\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultFormatters from './defaults/formatters.js';\r\n\r\nclass Format extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.registerColumnOption(\"formatter\");\r\n\t\tthis.registerColumnOption(\"formatterParams\");\r\n\r\n\t\tthis.registerColumnOption(\"formatterPrint\");\r\n\t\tthis.registerColumnOption(\"formatterPrintParams\");\r\n\t\tthis.registerColumnOption(\"formatterClipboard\");\r\n\t\tthis.registerColumnOption(\"formatterClipboardParams\");\r\n\t\tthis.registerColumnOption(\"formatterHtmlOutput\");\r\n\t\tthis.registerColumnOption(\"formatterHtmlOutputParams\");\r\n\t\tthis.registerColumnOption(\"titleFormatter\");\r\n\t\tthis.registerColumnOption(\"titleFormatterParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-format\", this.formatValue.bind(this));\r\n\t\tthis.subscribe(\"cell-rendered\", this.cellRendered.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"column-format\", this.formatHeader.bind(this));\r\n\t}\r\n\r\n\t//initialize column formatter\r\n\tinitializeColumn(column){\r\n\t\tcolumn.modules.format = this.lookupFormatter(column, \"\");\r\n\r\n\t\tif(typeof column.definition.formatterPrint !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.print = this.lookupFormatter(column, \"Print\");\r\n\t\t}\r\n\r\n\t\tif(typeof column.definition.formatterClipboard !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.clipboard = this.lookupFormatter(column, \"Clipboard\");\r\n\t\t}\r\n\r\n\t\tif(typeof column.definition.formatterHtmlOutput !== \"undefined\"){\r\n\t\t\tcolumn.modules.format.htmlOutput = this.lookupFormatter(column, \"HtmlOutput\");\r\n\t\t}\r\n\t}\r\n\r\n\tlookupFormatter(column, type){\r\n\t\tvar config = {params:column.definition[\"formatter\" + type + \"Params\"] || {}},\r\n\t\tformatter = column.definition[\"formatter\" + type];\r\n\r\n\t\t//set column formatter\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\tconfig.formatter = Format.formatters[formatter];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tconfig.formatter = formatter;\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn config;\r\n\t}\r\n\r\n\tcellRendered(cell){\r\n\t\tif(cell.modules.format && cell.modules.format.renderedCallback && !cell.modules.format.rendered){\r\n\t\t\tcell.modules.format.renderedCallback();\r\n\t\t\tcell.modules.format.rendered = true;\r\n\t\t}\r\n\t}\r\n\r\n\t//return a formatted value for a column header\r\n\tformatHeader(column, title, el){\r\n\t\tvar formatter, params, onRendered, mockCell;\r\n\r\n\t\tif(column.definition.titleFormatter){\r\n\t\t\tformatter = this.getFormatter(column.definition.titleFormatter);\r\n\r\n\t\t\tonRendered = (callback) => {\r\n\t\t\t\tcolumn.titleFormatterRendered = callback;\r\n\t\t\t};\r\n\r\n\t\t\tmockCell = {\r\n\t\t\t\tgetValue:function(){\r\n\t\t\t\t\treturn title;\r\n\t\t\t\t},\r\n\t\t\t\tgetElement:function(){\r\n\t\t\t\t\treturn el;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tparams = column.definition.titleFormatterParams || {};\r\n\r\n\t\t\tparams = typeof params === \"function\" ? params() : params;\r\n\r\n\t\t\treturn formatter.call(this, mockCell, params, onRendered);\r\n\t\t}else{\r\n\t\t\treturn title;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//return a formatted value for a cell\r\n\tformatValue(cell){\r\n\t\tvar component = cell.getComponent(),\r\n\t\tparams = typeof cell.column.modules.format.params === \"function\" ? cell.column.modules.format.params(component) : cell.column.modules.format.params;\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\tif(!cell.modules.format){\r\n\t\t\t\tcell.modules.format = {};\r\n\t\t\t}\r\n\r\n\t\t\tcell.modules.format.renderedCallback = callback;\r\n\t\t\tcell.modules.format.rendered = false;\r\n\t\t}\r\n\r\n\t\treturn cell.column.modules.format.formatter.call(this, component, params, onRendered);\r\n\t}\r\n\r\n\tformatExportValue(cell, type){\r\n\t\tvar formatter = cell.column.modules.format[type],\r\n\t\tparams;\r\n\r\n\t\tif(formatter){\r\n\t\t\tparams = typeof formatter.params === \"function\" ? formatter.params(component) : formatter.params;\r\n\r\n\t\t\tfunction onRendered(callback){\r\n\t\t\t\tif(!cell.modules.format){\r\n\t\t\t\t\tcell.modules.format = {};\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcell.modules.format.renderedCallback = callback;\r\n\t\t\t\tcell.modules.format.rendered = false;\r\n\t\t\t}\r\n\r\n\t\t\treturn formatter.formatter.call(this, cell.getComponent(), params, onRendered);\r\n\r\n\t\t}else{\r\n\t\t\treturn this.formatValue(cell);\r\n\t\t}\r\n\t}\r\n\r\n\tsanitizeHTML(value){\r\n\t\tif(value){\r\n\t\t\tvar entityMap = {\r\n\t\t\t\t'&': '&',\r\n\t\t\t\t'<': '<',\r\n\t\t\t\t'>': '>',\r\n\t\t\t\t'\"': '"',\r\n\t\t\t\t\"'\": ''',\r\n\t\t\t\t'/': '/',\r\n\t\t\t\t'`': '`',\r\n\t\t\t\t'=': '='\r\n\t\t\t};\r\n\r\n\t\t\treturn String(value).replace(/[&<>\"'`=\\/]/g, function (s) {\r\n\t\t\t\treturn entityMap[s];\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn value;\r\n\t\t}\r\n\t}\r\n\r\n\temptyToSpace(value){\r\n\t\treturn value === null || typeof value === \"undefined\" || value === \"\" ? \" \" : value;\r\n\t}\r\n\r\n\t//get formatter for cell\r\n\tgetFormatter(formatter){\r\n\t\tvar formatter;\r\n\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\tformatter = Format.formatters[formatter]\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tformatter = formatter;\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn formatter;\r\n\t}\r\n}\r\n\r\nFormat.moduleName = \"format\";\r\n\r\n//load defaults\r\nFormat.formatters = defaultFormatters;\r\n\r\nexport default Format;","import Module from '../../core/Module.js';\r\n\r\nclass FrozenColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.leftColumns = [];\r\n\t\tthis.rightColumns = [];\r\n\t\tthis.leftMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.rightPadding = 0;\r\n\t\tthis.initializationMode = \"left\";\r\n\t\tthis.active = false;\r\n\t\tthis.scrollEndTimer = false;\r\n\t\tthis.blocked = true;\r\n\t\t\r\n\t\tthis.registerColumnOption(\"frozen\");\r\n\t}\r\n\t\r\n\t//reset initial state\r\n\treset(){\r\n\t\tthis.initializationMode = \"left\";\r\n\t\tthis.leftColumns = [];\r\n\t\tthis.rightColumns = [];\r\n\t\tthis.leftMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.rightMargin = 0;\r\n\t\tthis.active = false;\r\n\t\t\r\n\t\tthis.table.columnManager.headersElement.style.marginLeft = 0;\r\n\t\tthis.table.columnManager.element.style.paddingRight = 0;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-layout\", this.layoutCell.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"column-width\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"row-layout-after\", this.layoutRow.bind(this));\r\n\t\tthis.subscribe(\"table-layout\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t\tthis.subscribe(\"columns-loading\", this.reset.bind(this));\r\n\t\tthis.subscribe(\"table-redraw\", this.layout.bind(this));\r\n\t\tthis.subscribe(\"layout-refreshing\", this.blockLayout.bind(this));\r\n\t\tthis.subscribe(\"layout-refreshed\", this.unblockLayout.bind(this));\r\n\t}\r\n\t\r\n\tblockLayout(){\r\n\t\tthis.blocked = true;\r\n\t}\r\n\t\r\n\tunblockLayout(){\r\n\t\tthis.blocked = false;\r\n\t}\r\n\t\r\n\tlayoutCell(cell){\r\n\t\tthis.layoutElement(cell.element, cell.column)\r\n\t}\r\n\t\r\n\t//initialize specific column\r\n\tinitializeColumn(column){\r\n\t\tvar config = {margin:0, edge:false};\r\n\t\t\r\n\t\tif(!column.isGroup){\r\n\t\t\t\r\n\t\t\tif(this.frozenCheck(column)){\r\n\t\t\t\t\r\n\t\t\t\tconfig.position = this.initializationMode;\r\n\t\t\t\t\r\n\t\t\t\tif(this.initializationMode == \"left\"){\r\n\t\t\t\t\tthis.leftColumns.push(column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.rightColumns.unshift(column);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.active = true;\r\n\t\t\t\t\r\n\t\t\t\tcolumn.modules.frozen = config;\r\n\t\t\t}else{\r\n\t\t\t\tthis.initializationMode = \"right\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfrozenCheck(column){\r\n\t\tvar frozen = false;\r\n\t\t\r\n\t\tif(column.parent.isGroup && column.definition.frozen){\r\n\t\t\tconsole.warn(\"Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups\");\r\n\t\t}\r\n\t\t\r\n\t\tif(column.parent.isGroup){\r\n\t\t\treturn this.frozenCheck(column.parent);\r\n\t\t}else{\r\n\t\t\treturn column.definition.frozen;\r\n\t\t}\r\n\t\t\r\n\t\treturn frozen;\r\n\t}\r\n\t\r\n\t//quick layout to smooth horizontal scrolling\r\n\tscrollHorizontal(){\r\n\t\tvar rows;\r\n\t\t\r\n\t\tif(this.active){\r\n\t\t\tclearTimeout(this.scrollEndTimer);\r\n\r\n\t\t\trows = this.table.rowManager.getVisibleRows();\r\n\t\t\t\r\n\t\t\tthis.calcMargins(true);\r\n\t\t\t\r\n\t\t\tthis.layoutColumnPosition();\r\n\t\t\t\r\n\t\t\tthis.layoutCalcRows();\r\n\t\t\t\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\t//calculate margins for rows\r\n\tcalcMargins(scroll){\r\n\t\t\r\n\t\tif(!scroll){\r\n\t\t\tthis.leftMargin = this._calcSpace(this.leftColumns, this.leftColumns.length) + \"px\";\t\t\t\r\n\t\t\tthis.rightMargin = this._calcSpace(this.rightColumns, this.rightColumns.length) + \"px\";\t\r\n\t\t\tthis.table.rowManager.tableElement.style.marginRight = this.rightMargin;\r\n\t\t}\r\n\t\r\n\t\t//calculate right frozen columns\r\n\t\tthis.rightPadding = this.table.rowManager.element.clientWidth + this.table.columnManager.scrollLeft;\r\n\t}\r\n\t\r\n\t//layout calculation rows\r\n\tlayoutCalcRows(){\r\n\t\tif(this.table.modExists(\"columnCalcs\")){\r\n\t\t\tif(this.table.modules.columnCalcs.topInitialized && this.table.modules.columnCalcs.topRow){\r\n\t\t\t\tthis.layoutRow(this.table.modules.columnCalcs.topRow);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.modules.columnCalcs.botInitialized && this.table.modules.columnCalcs.botRow){\r\n\t\t\t\tthis.layoutRow(this.table.modules.columnCalcs.botRow);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.modExists(\"groupRows\")){\r\n\t\t\t\tthis.layoutGroupCalcs(this.table.modules.groupRows.getGroups())\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutGroupCalcs(groups){\r\n\t\tgroups.forEach((group) => {\r\n\t\t\tif(group.calcs.top){\r\n\t\t\t\tthis.layoutRow(group.calcs.top);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(group.calcs.bottom){\r\n\t\t\t\tthis.layoutRow(group.calcs.bottom);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(group.groupList && group.groupList.length){\r\n\t\t\t\tthis.layoutGroupCalcs(group.groupList && group.groupList);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//calculate column positions and layout headers\r\n\tlayoutColumnPosition(allCells){\r\n\t\tvar leftParents = [];\r\n\t\t\r\n\t\tvar leftMargin = 0;\r\n\t\tvar rightMargin = 0;\r\n\t\t\r\n\t\tthis.table.columnManager.headersElement.style.marginLeft = this.leftMargin;\r\n\t\tthis.table.columnManager.element.style.paddingRight = this.rightMargin;\r\n\r\n\t\tthis.leftColumns.forEach((column, i) => {\t\r\n\t\t\tcolumn.modules.frozen.margin = (leftMargin + this.table.columnManager.scrollLeft) + \"px\";\r\n\r\n\t\t\tif(column.visible){\r\n\t\t\t\tleftMargin += column.getWidth();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(i == this.leftColumns.length - 1){\r\n\t\t\t\tcolumn.modules.frozen.edge = true;\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.modules.frozen.edge = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(column.parent.isGroup){\r\n\t\t\t\tvar parentEl = this.getColGroupParentElement(column);\r\n\t\t\t\tif(!leftParents.includes(parentEl)){\r\n\t\t\t\t\tthis.layoutElement(parentEl, column);\r\n\t\t\t\t\tleftParents.push(parentEl);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(column.modules.frozen.edge){\r\n\t\t\t\t\tparentEl.classList.add(\"tabulator-frozen-\" + column.modules.frozen.position);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.layoutElement(column.getElement(), column);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(allCells){\r\n\t\t\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.rightColumns.forEach((column, i) => {\r\n\r\n\t\t\tif(column.visible){\r\n\t\t\t\trightMargin += column.getWidth();\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.modules.frozen.margin = (this.rightPadding - rightMargin) + \"px\";\r\n\t\t\t\r\n\t\t\tif(i == this.rightColumns.length - 1){\r\n\t\t\t\tcolumn.modules.frozen.edge = true;\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.modules.frozen.edge = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(column.parent.isGroup){\r\n\t\t\t\tthis.layoutElement(this.getColGroupParentElement(column), column);\r\n\t\t\t}else{\r\n\t\t\t\tthis.layoutElement(column.getElement(), column);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(allCells){\r\n\t\t\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tgetColGroupParentElement(column){\r\n\t\treturn column.parent.isGroup ? this.getColGroupParentElement(column.parent) : column.getElement();\r\n\t}\r\n\t\r\n\t//layout columns appropriately\r\n\tlayout(){\r\n\t\tif(this.active && !this.blocked){\r\n\t\t\t//calculate row padding\r\n\t\t\tthis.calcMargins();\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) =>{\r\n\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\tthis.layoutRow(row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.layoutCalcRows();\r\n\t\t\t\r\n\t\t\t//calculate left columns\r\n\t\t\tthis.layoutColumnPosition(true);\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\t\t\r\n\t\trowEl.style.paddingLeft = this.leftMargin;\r\n\t\t\r\n\t\tif(this.table.options.layout === \"fitDataFill\" && this.rightColumns.length){\r\n\t\t\tthis.table.rowManager.getTableElement().style.minWidth = \"calc(100% - \" + this.rightMargin + \")\";\r\n\t\t}\r\n\t\t\r\n\t\tthis.leftColumns.forEach((column) => {\r\n\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\r\n\t\t\tif(cell){\r\n\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.rightColumns.forEach((column) => {\r\n\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\r\n\t\t\tif(cell){\r\n\t\t\t\tthis.layoutElement(cell.getElement(true), column);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tlayoutElement(element, column){\r\n\t\t\r\n\t\tif(column.modules.frozen){\r\n\t\t\telement.style.position = \"absolute\";\r\n\t\t\telement.style.left = column.modules.frozen.margin;\r\n\t\t\t\r\n\t\t\telement.classList.add(\"tabulator-frozen\");\r\n\t\t\t\r\n\t\t\tif(column.modules.frozen.edge){\r\n\t\t\t\telement.classList.add(\"tabulator-frozen-\" + column.modules.frozen.position);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_calcSpace(columns, index){\r\n\t\tvar width = 0;\r\n\t\t\r\n\t\tfor (let i = 0; i < index; i++){\r\n\t\t\tif(columns[i].visible){\r\n\t\t\t\twidth += columns[i].getWidth();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn width;\r\n\t}\r\n}\r\n\r\nFrozenColumns.moduleName = \"frozenColumns\";\r\n\r\nexport default FrozenColumns;","import Module from '../../core/Module.js';\r\n\r\nclass FrozenRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.topElement = document.createElement(\"div\");\r\n\t\tthis.rows = [];\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"freeze\", this.freezeRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"unfreeze\", this.unfreezeRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isFrozen\", this.isRowFrozen.bind(this));\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.rows = [];\r\n\r\n\t\tthis.topElement.classList.add(\"tabulator-frozen-rows-holder\");\r\n\r\n\t\t// this.table.columnManager.element.append(this.topElement);\r\n\t\tthis.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\r\n\r\n\t\tthis.subscribe(\"row-deleting\", this.detachRow.bind(this));\r\n\t\tthis.subscribe(\"rows-visible\", this.visibleRows.bind(this));\r\n\r\n\t\tthis.registerDisplayHandler(this.getRows.bind(this), 10);\r\n\t}\r\n\r\n\tisRowFrozen(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\t\treturn index > -1;\r\n\t}\r\n\r\n\tisFrozen(){\r\n\t\treturn !!this.rows.length;\r\n\t}\r\n\r\n\tvisibleRows(viewable, rows){\r\n\t\tthis.rows.forEach((row) => {\r\n\t\t\trows.push(row);\r\n\t\t});\r\n\r\n\t\treturn rows;\r\n\t}\r\n\r\n\t//filter frozen rows out of display data\r\n\tgetRows(rows){\r\n\t\tvar self = this,\r\n\t\tfrozen = [],\r\n\t\toutput = rows.slice(0);\r\n\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\tvar index = output.indexOf(row);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\toutput.splice(index, 1);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tfreezeRow(row){\r\n\t\tif(!row.modules.frozen){\r\n\t\t\trow.modules.frozen = true;\r\n\t\t\tthis.topElement.appendChild(row.getElement());\r\n\t\t\trow.initialize();\r\n\t\t\trow.normalizeHeight();\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\tthis.rows.push(row);\r\n\r\n\t\t\tthis.refreshData(false, \"display\")\r\n\r\n\t\t\tthis.styleRows();\r\n\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Freeze Error - Row is already frozen\");\r\n\t\t}\r\n\t}\r\n\r\n\tunfreezeRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\r\n\t\tif(row.modules.frozen){\r\n\r\n\t\t\trow.modules.frozen = false;\r\n\r\n\t\t\tthis.detachRow(row);\r\n\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\r\n\t\t\tthis.refreshData(false, \"display\")\r\n\r\n\t\t\tif(this.rows.length){\r\n\t\t\t\tthis.styleRows();\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Freeze Error - Row is already unfrozen\");\r\n\t\t}\r\n\t}\r\n\r\n\tdetachRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tvar rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\r\n\t\t\tthis.rows.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\tstyleRows(row){\r\n\t\tthis.rows.forEach((row, i) => {\r\n\t\t\tthis.table.rowManager.styleRow(row, i);\r\n\t\t});\r\n\t}\r\n}\r\n\r\nFrozenRows.moduleName = \"frozenRows\";\r\n\r\nexport default FrozenRows;","//public group object\r\nclass GroupComponent {\r\n\tconstructor (group){\r\n\t\tthis._group = group;\r\n\t\tthis.type = \"GroupComponent\";\r\n\r\n\t\treturn new Proxy(this, {\r\n\t\t\tget: function(target, name, receiver) {\r\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\r\n\t\t\t\t\treturn target[name];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn target._group.groupManager.table.componentFunctionBinder.handle(\"row\", target._group, name)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tgetKey(){\r\n\t\treturn this._group.key;\r\n\t}\r\n\r\n\tgetField(){\r\n\t\treturn this._group.field;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this._group.element;\r\n\t}\r\n\r\n\tgetRows(){\r\n\t\treturn this._group.getRows(true);\r\n\t}\r\n\r\n\tgetSubGroups(){\r\n\t\treturn this._group.getSubGroups(true);\r\n\t}\r\n\r\n\tgetParentGroup(){\r\n\t\treturn this._group.parent ? this._group.parent.getComponent() : false;\r\n\t}\r\n\r\n\tisVisible(){\r\n\t\treturn this._group.visible;\r\n\t}\r\n\r\n\tshow(){\r\n\t\tthis._group.show();\r\n\t}\r\n\r\n\thide(){\r\n\t\tthis._group.hide();\r\n\t}\r\n\r\n\ttoggle(){\r\n\t\tthis._group.toggleVisibility();\r\n\t}\r\n\r\n\t_getSelf(){\r\n\t\treturn this._group;\r\n\t}\r\n\r\n\tgetTable(){\r\n\t\treturn this._group.groupManager.table;\r\n\t}\r\n}\r\n\r\nexport default GroupComponent;","import Helpers from '../../core/tools/Helpers.js';\r\nimport GroupComponent from './GroupComponent.js';\r\n\r\n//Group functions\r\nclass Group{\r\n\t\r\n\tconstructor(groupManager, parent, level, key, field, generator, oldGroup){\r\n\t\tthis.groupManager = groupManager;\r\n\t\tthis.parent = parent;\r\n\t\tthis.key = key;\r\n\t\tthis.level = level;\r\n\t\tthis.field = field;\r\n\t\tthis.hasSubGroups = level < (groupManager.groupIDLookups.length - 1);\r\n\t\tthis.addRow = this.hasSubGroups ? this._addRowToGroup : this._addRow;\r\n\t\tthis.type = \"group\"; //type of element\r\n\t\tthis.old = oldGroup;\r\n\t\tthis.rows = [];\r\n\t\tthis.groups = [];\r\n\t\tthis.groupList = [];\r\n\t\tthis.generator = generator;\r\n\t\tthis.element = false;\r\n\t\tthis.elementContents = false;\r\n\t\tthis.height = 0;\r\n\t\tthis.outerHeight = 0;\r\n\t\tthis.initialized = false;\r\n\t\tthis.calcs = {};\r\n\t\tthis.initialized = false;\r\n\t\tthis.modules = {};\r\n\t\tthis.arrowElement = false;\r\n\t\t\r\n\t\tthis.visible = oldGroup ? oldGroup.visible : (typeof groupManager.startOpen[level] !== \"undefined\" ? groupManager.startOpen[level] : groupManager.startOpen[0]);\r\n\t\t\r\n\t\tthis.component = null;\r\n\t\t\r\n\t\tthis.createElements();\r\n\t\tthis.addBindings();\r\n\t\t\r\n\t\tthis.createValueGroups();\r\n\t}\r\n\t\r\n\twipe(){\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\tgroup.wipe();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\tif(row.modules){\r\n\t\t\t\t\tdelete row.modules.group;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\tthis.element = false;\r\n\t\tthis.arrowElement = false;\r\n\t\tthis.elementContents = false;\r\n\t}\r\n\t\r\n\tcreateElements(){\r\n\t\tvar arrow = document.createElement(\"div\");\r\n\t\tarrow.classList.add(\"tabulator-arrow\");\r\n\t\t\r\n\t\tthis.element = document.createElement(\"div\");\r\n\t\tthis.element.classList.add(\"tabulator-row\");\r\n\t\tthis.element.classList.add(\"tabulator-group\");\r\n\t\tthis.element.classList.add(\"tabulator-group-level-\" + this.level);\r\n\t\tthis.element.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\tthis.arrowElement = document.createElement(\"div\");\r\n\t\tthis.arrowElement.classList.add(\"tabulator-group-toggle\");\r\n\t\tthis.arrowElement.appendChild(arrow);\r\n\t\t\r\n\t\t//setup movable rows\r\n\t\tif(this.groupManager.table.options.movableRows !== false && this.groupManager.table.modExists(\"moveRow\")){\r\n\t\t\tthis.groupManager.table.modules.moveRow.initializeGroupHeader(this);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcreateValueGroups(){\r\n\t\tvar level = this.level + 1;\r\n\t\tif(this.groupManager.allowedValues && this.groupManager.allowedValues[level]){\r\n\t\t\tthis.groupManager.allowedValues[level].forEach((value) => {\r\n\t\t\t\tthis._createGroup(value, level);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\taddBindings(){\r\n\t\tvar toggleElement;\r\n\t\t\r\n\t\tif(this.groupManager.table.options.groupToggleElement){\r\n\t\t\ttoggleElement = this.groupManager.table.options.groupToggleElement == \"arrow\" ? this.arrowElement : this.element;\r\n\t\t\t\r\n\t\t\ttoggleElement.addEventListener(\"click\", (e) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\tthis.toggleVisibility();\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\t_createGroup(groupID, level){\r\n\t\tvar groupKey = level + \"_\" + groupID;\r\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);\r\n\t\t\r\n\t\tthis.groups[groupKey] = group;\r\n\t\tthis.groupList.push(group);\r\n\t}\r\n\t\r\n\t_addRowToGroup(row){\r\n\t\t\r\n\t\tvar level = this.level + 1;\r\n\t\t\r\n\t\tif(this.hasSubGroups){\r\n\t\t\tvar groupID = this.groupManager.groupIDLookups[level].func(row.getData()),\r\n\t\t\tgroupKey = level + \"_\" + groupID;\r\n\t\t\t\r\n\t\t\tif(this.groupManager.allowedValues && this.groupManager.allowedValues[level]){\r\n\t\t\t\tif(this.groups[groupKey]){\r\n\t\t\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(!this.groups[groupKey]){\r\n\t\t\t\t\tthis._createGroup(groupID, level);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_addRow(row){\r\n\t\tthis.rows.push(row);\r\n\t\trow.modules.group = this;\r\n\t}\r\n\t\r\n\tinsertRow(row, to, after){\r\n\t\tvar data = this.conformRowData({});\r\n\t\t\r\n\t\trow.updateData(data);\r\n\t\t\r\n\t\tvar toIndex = this.rows.indexOf(to);\r\n\t\t\r\n\t\tif(toIndex > -1){\r\n\t\t\tif(after){\r\n\t\t\t\tthis.rows.splice(toIndex+1, 0, row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.splice(toIndex, 0, row);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(after){\r\n\t\t\t\tthis.rows.push(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.unshift(row);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\trow.modules.group = this;\r\n\t\t\r\n\t\tthis.generateGroupHeaderContents();\r\n\t\t\r\n\t\tif(this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\tthis.groupManager.table.modules.columnCalcs.recalcGroup(this);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.updateGroupRows(true);\r\n\t}\r\n\t\r\n\tscrollHeader(left){\r\n\t\tif(this.arrowElement){\r\n\t\t\tthis.arrowElement.style.marginLeft = left;\r\n\t\t\t\r\n\t\t\tthis.groupList.forEach(function(child){\r\n\t\t\t\tchild.scrollHeader(left);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRowIndex(row){}\r\n\t\r\n\t//update row data to match grouping contraints\r\n\tconformRowData(data){\r\n\t\tif(this.field){\r\n\t\t\tdata[this.field] = this.key;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Data Conforming Error - Cannot conform row data to match new group as groupBy is a function\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.parent){\r\n\t\t\tdata = this.parent.conformRowData(data);\r\n\t\t}\r\n\t\t\r\n\t\treturn data;\r\n\t}\r\n\t\r\n\tremoveRow(row){\r\n\t\tvar index = this.rows.indexOf(row);\r\n\t\tvar el = row.getElement();\r\n\t\t\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.rows.splice(index, 1);\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.groupManager.table.options.groupValues && !this.rows.length){\r\n\t\t\tif(this.parent){\r\n\t\t\t\tthis.parent.removeGroup(this);\r\n\t\t\t}else{\r\n\t\t\t\tthis.groupManager.removeGroup(this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tif(el.parentNode){\r\n\t\t\t\tel.parentNode.removeChild(el);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.generateGroupHeaderContents();\r\n\t\t\t\r\n\t\t\tif(this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\t\tthis.groupManager.table.modules.columnCalcs.recalcGroup(this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveGroup(group){\r\n\t\tvar groupKey = group.level + \"_\" + group.key,\r\n\t\tindex;\r\n\t\t\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tdelete this.groups[groupKey];\r\n\t\t\t\r\n\t\t\tindex = this.groupList.indexOf(group);\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.groupList.splice(index, 1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!this.groupList.length){\r\n\t\t\t\tif(this.parent){\r\n\t\t\t\t\tthis.parent.removeGroup(this);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.groupManager.removeGroup(this);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetHeadersAndRows(noCalc){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\toutput.push(this);\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(this.visible){\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\t\toutput = output.concat(group.getHeadersAndRows(noCalc));\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tif(!noCalc && this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\r\n\t\t\t\t\tif(this.calcs.top){\r\n\t\t\t\t\t\tthis.calcs.top.detachElement();\r\n\t\t\t\t\t\tthis.calcs.top.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows);\r\n\t\t\t\t\toutput.push(this.calcs.top);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\toutput = output.concat(this.rows);\r\n\t\t\t\t\r\n\t\t\t\tif(!noCalc && this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\r\n\t\t\t\t\tif(this.calcs.bottom){\r\n\t\t\t\t\t\tthis.calcs.bottom.detachElement();\r\n\t\t\t\t\t\tthis.calcs.bottom.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows);\r\n\t\t\t\t\toutput.push(this.calcs.bottom);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!this.groupList.length && this.groupManager.table.options.columnCalcs != \"table\"){\r\n\t\t\t\t\r\n\t\t\t\tif(this.groupManager.table.modExists(\"columnCalcs\")){\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!noCalc && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\r\n\t\t\t\t\t\tif(this.calcs.top){\r\n\t\t\t\t\t\t\tthis.calcs.top.detachElement();\r\n\t\t\t\t\t\t\tthis.calcs.top.deleteCells();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.groupManager.table.options.groupClosedShowCalcs){\r\n\t\t\t\t\t\t\tthis.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows);\r\n\t\t\t\t\t\t\toutput.push(this.calcs.top);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!noCalc && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\r\n\t\t\t\t\t\tif(this.calcs.bottom){\r\n\t\t\t\t\t\t\tthis.calcs.bottom.detachElement();\r\n\t\t\t\t\t\t\tthis.calcs.bottom.deleteCells();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.groupManager.table.options.groupClosedShowCalcs){\r\n\t\t\t\t\t\t\tthis.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows);\r\n\t\t\t\t\t\t\toutput.push(this.calcs.bottom);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetData(visible, transform){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(!visible || (visible && this.visible)){\r\n\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\toutput.push(row.getData(transform || \"data\"));\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetRowCount(){\r\n\t\tvar count = 0;\r\n\t\t\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\tcount += group.getRowCount();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tcount = this.rows.length;\r\n\t\t}\r\n\t\treturn count;\r\n\t}\r\n\t\r\n\ttoggleVisibility(){\r\n\t\tif(this.visible){\r\n\t\t\tthis.hide();\r\n\t\t}else{\r\n\t\t\tthis.show();\r\n\t\t}\r\n\t}\r\n\t\r\n\thide(){\r\n\t\tthis.visible = false;\r\n\t\t\r\n\t\tif(this.groupManager.table.rowManager.getRenderMode() == \"classic\" && !this.groupManager.table.options.pagination){\r\n\t\t\t\r\n\t\t\tthis.element.classList.remove(\"tabulator-group-visible\");\r\n\t\t\t\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar rows = group.getHeadersAndRows();\r\n\t\t\t\t\t\r\n\t\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\t\trow.detachElement();\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex());\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth();\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.table.externalEvents.dispatch(\"groupVisibilityChanged\", this.getComponent(), false);\r\n\t}\r\n\t\r\n\tshow(){\r\n\t\tthis.visible = true;\r\n\t\t\r\n\t\tif(this.groupManager.table.rowManager.getRenderMode() == \"classic\" && !this.groupManager.table.options.pagination){\r\n\t\t\t\r\n\t\t\tthis.element.classList.add(\"tabulator-group-visible\");\r\n\t\t\t\r\n\t\t\tvar prev = this.generateElement();\r\n\t\t\t\r\n\t\t\tif(this.groupList.length){\r\n\t\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\t\tvar rows = group.getHeadersAndRows();\r\n\t\t\t\t\t\r\n\t\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\t\tprev.parentNode.insertBefore(rowEl, prev.nextSibling);\r\n\t\t\t\t\t\trow.initialize();\r\n\t\t\t\t\t\tprev = rowEl;\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tthis.rows.forEach((row) => {\r\n\t\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\t\tprev.parentNode.insertBefore(rowEl, prev.nextSibling);\r\n\t\t\t\t\trow.initialize();\r\n\t\t\t\t\tprev = rowEl;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex());\r\n\t\t\t\r\n\t\t\tthis.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth();\r\n\t\t}else{\r\n\t\t\tthis.groupManager.updateGroupRows(true);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupManager.table.externalEvents.dispatch(\"groupVisibilityChanged\", this.getComponent(), true);\r\n\t}\r\n\t\r\n\t_visSet(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tif(typeof this.visible == \"function\"){\r\n\t\t\t\r\n\t\t\tthis.rows.forEach(function(row){\r\n\t\t\t\tdata.push(row.getData());\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.visible = this.visible(this.key, this.getRowCount(), data, this.getComponent());\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRowGroup(row){\r\n\t\tvar match = false;\r\n\t\tif(this.groupList.length){\r\n\t\t\tthis.groupList.forEach(function(group){\r\n\t\t\t\tvar result = group.getRowGroup(row);\r\n\t\t\t\t\r\n\t\t\t\tif(result){\r\n\t\t\t\t\tmatch = result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tif(this.rows.find(function(item){\r\n\t\t\t\treturn item === row;\r\n\t\t\t})){\r\n\t\t\t\tmatch = this;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn match;\r\n\t}\r\n\t\r\n\tgetSubGroups(component){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.groupList.forEach(function(child){\r\n\t\t\toutput.push(component ? child.getComponent() : child);\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetRows(compoment){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\toutput.push(compoment ? row.getComponent() : row);\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgenerateGroupHeaderContents(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\tdata.push(row.getData());\r\n\t\t});\r\n\t\t\r\n\t\tthis.elementContents = this.generator(this.key, this.getRowCount(), data, this.getComponent());\r\n\t\t\r\n\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\t\t\r\n\t\tif(typeof this.elementContents === \"string\"){\r\n\t\t\tthis.element.innerHTML = this.elementContents;\r\n\t\t}else{\r\n\t\t\tthis.element.appendChild(this.elementContents);\r\n\t\t}\r\n\t\t\r\n\t\tthis.element.insertBefore(this.arrowElement, this.element.firstChild);\r\n\t}\r\n\t\r\n\tgetPath(path = []) {\r\n\t\tpath.unshift(this.key);\r\n\t\tif(this.parent) {\r\n\t\t\tthis.parent.getPath(path);\r\n\t\t}\r\n\t\treturn path;\r\n\t}\r\n\t\r\n\t////////////// Standard Row Functions //////////////\r\n\t\r\n\tgetElement(){\r\n\t\treturn this.elementContents ? this.element : this.generateElement();\r\n\t}\r\n\t\r\n\tgenerateElement(){\r\n\t\tthis.addBindings = false;\r\n\t\t\r\n\t\tthis._visSet();\r\n\t\t\r\n\t\tif(this.visible){\r\n\t\t\tthis.element.classList.add(\"tabulator-group-visible\");\r\n\t\t}else{\r\n\t\t\tthis.element.classList.remove(\"tabulator-group-visible\");\r\n\t\t}\r\n\t\t\r\n\t\tfor(var i = 0; i < this.element.childNodes.length; ++i){\r\n\t\t\tthis.element.childNodes[i].parentNode.removeChild(this.element.childNodes[i]);\r\n\t\t}\r\n\t\t\r\n\t\tthis.generateGroupHeaderContents();\r\n\t\t\r\n\t\t// this.addBindings();\r\n\t\t\r\n\t\treturn this.element;\r\n\t}\r\n\t\r\n\tdetachElement(){\r\n\t\tif (this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\t//normalize the height of elements in the row\r\n\tnormalizeHeight(){\r\n\t\tthis.setHeight(this.element.clientHeight);\r\n\t}\r\n\t\r\n\tinitialize(force){\r\n\t\tif(!this.initialized || force){\r\n\t\t\tthis.normalizeHeight();\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitialize(){\r\n\t\tthis.initialized = false;\r\n\t\tthis.height = 0;\r\n\t\t\r\n\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\tthis.initialize(true);\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetHeight(height){\r\n\t\tif(this.height != height){\r\n\t\t\tthis.height = height;\r\n\t\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return rows outer height\r\n\tgetHeight(){\r\n\t\treturn this.outerHeight;\r\n\t}\r\n\t\r\n\tgetGroup(){\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\treinitializeHeight(){}\r\n\t\r\n\tcalcHeight(){}\r\n\t\r\n\tsetCellHeight(){}\r\n\t\r\n\tclearCellHeight(){}\r\n\t\r\n\tdeinitializeHeight(){}\r\n\t\r\n\t//////////////// Object Generation /////////////////\r\n\tgetComponent(){\r\n\t\tif(!this.component){\r\n\t\t\tthis.component = new GroupComponent(this);\r\n\t\t}\r\n\t\t\r\n\t\treturn this.component;\r\n\t}\r\n}\r\n\r\nexport default Group;","import Module from '../../core/Module.js';\r\n\r\nimport GroupComponent from './GroupComponent.js';\r\nimport Group from './Group.js';\r\n\r\nclass GroupRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.groupIDLookups = false; //enable table grouping and set field to group by\r\n\t\tthis.startOpen = [function(){return false;}]; //starting state of group\r\n\t\tthis.headerGenerator = [function(){return \"\";}];\r\n\t\tthis.groupList = []; //ordered list of groups\r\n\t\tthis.allowedValues = false;\r\n\t\tthis.groups = {}; //hold row groups\r\n\t\tthis.displayIndex = 0; //index in display pipeline\r\n\r\n\t\tthis.displayHandler = this.getRows.bind(this);\r\n\r\n\t\t//register table options\r\n\t\tthis.registerTableOption(\"groupBy\", false); //enable table grouping and set field to group by\r\n\t\tthis.registerTableOption(\"groupStartOpen\", true); //starting state of group\r\n\t\tthis.registerTableOption(\"groupValues\", false);\r\n\t\tthis.registerTableOption(\"groupUpdateOnCellEdit\", false);\r\n\t\tthis.registerTableOption(\"groupHeader\", false); //header generation function\r\n\t\tthis.registerTableOption(\"groupHeaderPrint\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderClipboard\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderHtmlOutput\", null);\r\n\t\tthis.registerTableOption(\"groupHeaderDownload\", null);\r\n\t\tthis.registerTableOption(\"groupToggleElement\", \"arrow\");\r\n\t\tthis.registerTableOption(\"groupClosedShowCalcs\", false);\r\n\r\n\t\t//register table functions\r\n\t\tthis.registerTableFunction(\"setGroupBy\", this.setGroupBy.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupValues\", this.setGroupValues.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupStartOpen\", this.setGroupStartOpen.bind(this));\r\n\t\tthis.registerTableFunction(\"setGroupHeader\", this.setGroupHeader.bind(this));\r\n\t\tthis.registerTableFunction(\"getGroups\", this.userGetGroups.bind(this));\r\n\t\tthis.registerTableFunction(\"getGroupedData\", this.userGetGroupedData.bind(this));\r\n\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"getGroup\", this.rowGetGroup.bind(this));\r\n\t}\r\n\r\n\t//initialize group configuration\r\n\tinitialize(){\r\n\t\tif(this.table.options.groupBy){\r\n\r\n\t\t\tif(this.table.options.groupUpdateOnCellEdit){\r\n\t\t\t\tthis.subscribe(\"cell-value-updated\", this.cellUpdated.bind(this));\r\n\t\t\t\tthis.subscribe(\"row-data-changed\", this.reassignRowToGroup.bind(this), 0);\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-built\", this.configureGroupSetup.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"row-deleting\", this.rowDeleting.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHeaders.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.wipe.bind(this));\r\n\t\t\tthis.subscribe(\"rows-added\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"row-moving\", this.rowMoving.bind(this));\r\n\t\t\tthis.subscribe(\"row-adding-index\", this.rowAddingIndex.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"rows-sample\", this.rowSample.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"render-virtual-fill\", this.virtualRenderFill.bind(this));\r\n\r\n\t\t\tthis.registerDisplayHandler(this.displayHandler, 20);\r\n\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\r\n\tconfigureGroupSetup(){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tvar groupBy = this.table.options.groupBy,\r\n\t\t\tstartOpen = this.table.options.groupStartOpen,\r\n\t\t\tgroupHeader = this.table.options.groupHeader;\r\n\r\n\t\t\tthis.allowedValues = this.table.options.groupValues;\r\n\r\n\t\t\tif(Array.isArray(groupBy) && Array.isArray(groupHeader) && groupBy.length > groupHeader.length){\r\n\t\t\t\tconsole.warn(\"Error creating group headers, groupHeader array is shorter than groupBy array\");\r\n\t\t\t}\r\n\r\n\t\t\tthis.headerGenerator = [function(){return \"\";}];\r\n\t\t\tthis.startOpen = [function(){return false;}]; //starting state of group\r\n\r\n\t\t\tthis.langBind(\"groups|item\", (langValue, lang) => {\r\n\t\t\t\tthis.headerGenerator[0] = (value, count, data) => { //header layout function\r\n\t\t\t\t\treturn (typeof value === \"undefined\" ? \"\" : value) + \"(\" + count + \" \" + ((count === 1) ? langValue : lang.groups.items) + \")\";\r\n\t\t\t\t};\r\n\t\t\t});\r\n\r\n\t\t\tthis.groupIDLookups = [];\r\n\r\n\t\t\tif(Array.isArray(groupBy) || groupBy){\r\n\t\t\t\tif(this.table.modExists(\"columnCalcs\") && this.table.options.columnCalcs != \"table\" && this.table.options.columnCalcs != \"both\"){\r\n\t\t\t\t\tthis.table.modules.columnCalcs.removeCalcs();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.modExists(\"columnCalcs\") && this.table.options.columnCalcs != \"group\"){\r\n\r\n\t\t\t\t\tvar cols = this.table.columnManager.getRealColumns();\r\n\r\n\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\tif(col.definition.topCalc){\r\n\t\t\t\t\t\t\tthis.table.modules.columnCalcs.initializeTopRow();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(col.definition.bottomCalc){\r\n\t\t\t\t\t\t\tthis.table.modules.columnCalcs.initializeBottomRow();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(!Array.isArray(groupBy)){\r\n\t\t\t\tgroupBy = [groupBy];\r\n\t\t\t}\r\n\r\n\t\t\tgroupBy.forEach((group, i) => {\r\n\t\t\t\tvar lookupFunc, column;\r\n\r\n\t\t\t\tif(typeof group == \"function\"){\r\n\t\t\t\t\tlookupFunc = group;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolumn = this.table.columnManager.getColumnByField(group);\r\n\r\n\t\t\t\t\tif(column){\r\n\t\t\t\t\t\tlookupFunc = function(data){\r\n\t\t\t\t\t\t\treturn column.getFieldValue(data);\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tlookupFunc = function(data){\r\n\t\t\t\t\t\t\treturn data[group];\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.groupIDLookups.push({\r\n\t\t\t\t\tfield: typeof group === \"function\" ? false : group,\r\n\t\t\t\t\tfunc:lookupFunc,\r\n\t\t\t\t\tvalues:this.allowedValues ? this.allowedValues[i] : false,\r\n\t\t\t\t});\r\n\t\t\t});\r\n\r\n\t\t\tif(startOpen){\r\n\t\t\t\tif(!Array.isArray(startOpen)){\r\n\t\t\t\t\tstartOpen = [startOpen];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstartOpen.forEach((level) => {\r\n\t\t\t\t\tlevel = typeof level == \"function\" ? level : function(){return true;};\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.startOpen = startOpen;\r\n\t\t\t}\r\n\r\n\t\t\tif(groupHeader){\r\n\t\t\t\tthis.headerGenerator = Array.isArray(groupHeader) ? groupHeader : [groupHeader];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\trowSample(rows, prevValue){\r\n\t\tvar group = this.getGroups(false)[0];\r\n\r\n\t\tprevValue.push(group.getRows(false)[0]);\r\n\r\n\t\treturn prevValue;\r\n\t}\r\n\r\n\tvirtualRenderFill(){\r\n\t\tvar el = this.table.rowManager.tableElement;\r\n\t\tvar rows = this.table.rowManager.getVisibleRows();\r\n\r\n\t\trows = rows.filter((row) => {\r\n\t\t\treturn row.type !== \"group\";\r\n\t\t});\r\n\r\n\t\tel.style.minWidth = !rows.length ? this.table.columnManager.getWidth() + \"px\" : \"\";\r\n\r\n\t\t// if(this.table.options.groupBy){\r\n\t\t// \tif(this.layoutMode() != \"fitDataFill\" && rowsCount == this.table.modules.groupRows.countGroups()){\r\n\t\t// \t\tel.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t// \t}\r\n\t\t// }\r\n\t}\r\n\r\n\trowAddingIndex(row, index, top){\r\n\t\tthis.assignRowToGroup(row);\r\n\r\n\t\tvar groupRows = row.modules.group.rows;\r\n\r\n\t\tif(groupRows.length > 1){\r\n\t\t\tif(!index || (index && groupRows.indexOf(index) == -1)){\r\n\t\t\t\tif(top){\r\n\t\t\t\t\tif(groupRows[0] !== row){\r\n\t\t\t\t\t\tindex = groupRows[0];\r\n\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(groupRows[groupRows.length -1] !== row){\r\n\t\t\t\t\t\tindex = groupRows[groupRows.length -1];\r\n\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn index;\r\n\t}\r\n\r\n\ttrackChanges(){\r\n\t\tthis.dispatch(\"group-changed\");\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tsetGroupBy(groups){\r\n\t\tthis.table.options.groupBy = groups;\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.initialize();\r\n\t\t}else{\r\n\t\t\tthis.configureGroupSetup();\r\n\t\t}\r\n\r\n\t\tthis.refreshData();\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\tsetGroupValues(groupValues){\r\n\t\tthis.table.options.groupValues = groupValues;\r\n\t\tthis.configureGroupSetup();\r\n\t\tthis.refreshData();\r\n\r\n\t\tthis.trackChanges();\r\n\t}\r\n\r\n\tsetGroupStartOpen(values){\r\n\t\tthis.table.options.groupStartOpen = values;\r\n\t\tthis.configureGroupSetup();\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\r\n\t\t\tthis.trackChanges();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Grouping Update - cant refresh view, no groups have been set\");\r\n\t\t}\r\n\t}\r\n\r\n\tsetGroupHeader(values){\r\n\t\tthis.table.options.groupHeader = values;\r\n\t\tthis.configureGroupSetup();\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\r\n\t\t\tthis.trackChanges();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Grouping Update - cant refresh view, no groups have been set\");\r\n\t\t}\r\n\t}\r\n\r\n\tuserGetGroups(values){\r\n\t\treturn this.getGroups(true);\r\n\t}\r\n\r\n\t// get grouped table data in the same format as getData()\r\n\tuserGetGroupedData(){\r\n\t\treturn this.table.options.groupBy ?\r\n\t\tthis.getGroupedData() : this.getData()\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////////\r\n\t///////// Component Functions /////////\r\n\t///////////////////////////////////////\r\n\r\n\trowGetGroup(row){\r\n\t\treturn row.modules.group ? row.modules.group.getComponent() : false;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\trowMoving(from, to, after){\r\n\t\tif(!after && to instanceof Group){\r\n\t\t\tto = this.table.rowManager.prevDisplayRow(from) || to;\r\n\t\t}\r\n\r\n\t\tvar toGroup = to instanceof Group ? to : to.modules.group;\r\n\t\tvar fromGroup = from instanceof Group ? from : from.modules.group;\r\n\r\n\t\tif(toGroup === fromGroup){\r\n\t\t\tthis.table.rowManager.moveRowInArray(toGroup.rows, from, to, after);\r\n\t\t}else{\r\n\t\t\tif(fromGroup){\r\n\t\t\t\tfromGroup.removeRow(from);\r\n\t\t\t}\r\n\r\n\t\t\ttoGroup.insertRow(from, to, after);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trowDeleting(row){\r\n\t\t//remove from group\r\n\t\tif(row.modules.group){\r\n\t\t\trow.modules.group.removeRow(row);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trowsUpdated(row){\r\n\t\tthis.updateGroupRows(true);\r\n\t}\r\n\r\n\tcellUpdated(cell){\r\n\t\tthis.reassignRowToGroup(cell.row);\r\n\t}\r\n\r\n\r\n\tsetDisplayIndex(index){\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\r\n\tgetDisplayIndex(){\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\r\n\t//return appropriate rows with group headers\r\n\tgetRows(rows){\r\n\t\tif(this.table.options.groupBy && this.groupIDLookups.length){\r\n\r\n\t\t\tthis.dispatchExternal(\"dataGrouping\");\r\n\r\n\t\t\tthis.generateGroups(rows);\r\n\r\n\t\t\tif(this.subscribedExternal(\"dataGrouped\")){\r\n\t\t\t\tthis.dispatchExternal(\"dataGrouped\", this.getGroups(true));\r\n\t\t\t}\r\n\r\n\t\t\treturn this.updateGroupRows();\r\n\r\n\t\t}else{\r\n\t\t\treturn rows.slice(0);\r\n\t\t}\r\n\t}\r\n\r\n\tgetGroups(component){\r\n\t\tvar groupComponents = [];\r\n\r\n\t\tthis.groupList.forEach(function(group){\r\n\t\t\tgroupComponents.push(component ? group.getComponent() : group);\r\n\t\t});\r\n\r\n\t\treturn groupComponents;\r\n\t}\r\n\r\n\tgetChildGroups(group){\r\n\t\tvar groupComponents = [];\r\n\r\n\t\tif(!group){\r\n\t\t\tgroup = this;\r\n\t\t}\r\n\r\n\t\tgroup.groupList.forEach((child) => {\r\n\t\t\tif(child.groupList.length){\r\n\t\t\t\tgroupComponents = groupComponents.concat(this.getChildGroups(child));\r\n\t\t\t}else{\r\n\t\t\t\tgroupComponents.push(child);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn groupComponents;\r\n\t}\r\n\r\n\twipe(){\r\n\t\tthis.groupList.forEach(function(group){\r\n\t\t\tgroup.wipe();\r\n\t\t});\r\n\t}\r\n\r\n\tpullGroupListData(groupList) {\r\n\t\tvar groupListData = [];\r\n\r\n\t\tgroupList.forEach((group) => {\r\n\t\t\tvar groupHeader = {};\r\n\t\t\tgroupHeader.level = 0;\r\n\t\t\tgroupHeader.rowCount = 0;\r\n\t\t\tgroupHeader.headerContent = \"\";\r\n\t\t\tvar childData = [];\r\n\r\n\t\t\tif (group.hasSubGroups) {\r\n\t\t\t\tchildData = this.pullGroupListData(group.groupList);\r\n\r\n\t\t\t\tgroupHeader.level = group.level;\r\n\t\t\t\tgroupHeader.rowCount = childData.length - group.groupList.length; // data length minus number of sub-headers\r\n\t\t\t\tgroupHeader.headerContent = group.generator(group.key, groupHeader.rowCount, group.rows, group);\r\n\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\t\t\t\tgroupListData = groupListData.concat(childData);\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tgroupHeader.level = group.level;\r\n\t\t\t\tgroupHeader.headerContent = group.generator(group.key, group.rows.length, group.rows, group);\r\n\t\t\t\tgroupHeader.rowCount = group.getRows().length;\r\n\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\r\n\t\t\t\tgroup.getRows().forEach((row) => {\r\n\t\t\t\t\tgroupListData.push(row.getData(\"data\"));\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn groupListData\r\n\t}\r\n\r\n\tgetGroupedData(){\r\n\r\n\t\treturn this.pullGroupListData(this.groupList);\r\n\t}\r\n\r\n\tgetRowGroup(row){\r\n\t\tvar match = false;\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\tvar result = group.getRowGroup(row);\r\n\r\n\t\t\tif(result){\r\n\t\t\t\tmatch = result;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn match;\r\n\t}\r\n\r\n\tcountGroups(){\r\n\t\treturn this.groupList.length;\r\n\t}\r\n\r\n\tgenerateGroups(rows){\r\n\t\tvar oldGroups = this.groups;\r\n\r\n\t\tthis.groups = {};\r\n\t\tthis.groupList = [];\r\n\r\n\t\tif(this.allowedValues && this.allowedValues[0]){\r\n\t\t\tthis.allowedValues[0].forEach((value) => {\r\n\t\t\t\tthis.createGroup(value, 0, oldGroups);\r\n\t\t\t});\r\n\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tthis.assignRowToExistingGroup(row, oldGroups);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tthis.assignRowToGroup(row, oldGroups);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tcreateGroup(groupID, level, oldGroups){\r\n\t\tvar groupKey = level + \"_\" + groupID,\r\n\t\tgroup;\r\n\r\n\t\toldGroups = oldGroups || [];\r\n\r\n\t\tgroup = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]);\r\n\r\n\t\tthis.groups[groupKey] = group;\r\n\t\tthis.groupList.push(group);\r\n\t}\r\n\r\n\tassignRowToExistingGroup(row, oldGroups){\r\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\r\n\t\tgroupKey = \"0_\" + groupID;\r\n\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tthis.groups[groupKey].addRow(row);\r\n\t\t}\r\n\t}\r\n\r\n\tassignRowToGroup(row, oldGroups){\r\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\r\n\t\tnewGroupNeeded = !this.groups[\"0_\" + groupID];\r\n\r\n\t\tif(newGroupNeeded){\r\n\t\t\tthis.createGroup(groupID, 0, oldGroups);\r\n\t\t}\r\n\r\n\t\tthis.groups[\"0_\" + groupID].addRow(row);\r\n\r\n\t\treturn !newGroupNeeded;\r\n\t}\r\n\r\n\treassignRowToGroup(row){\r\n\t\tif(row.type === \"row\"){\r\n\t\t\tvar oldRowGroup = row.modules.group,\r\n\t\t\toldGroupPath = oldRowGroup.getPath(),\r\n\t\t\tnewGroupPath = this.getExpectedPath(row),\r\n\t\t\tsamePath = true;\r\n\r\n\t\t\t// figure out if new group path is the same as old group path\r\n\t\t\tvar samePath = (oldGroupPath.length == newGroupPath.length) && oldGroupPath.every((element, index) => {\r\n\t\t\t\treturn element === newGroupPath[index];\r\n\t\t\t});\r\n\r\n\t\t\t// refresh if they new path and old path aren't the same (aka the row's groupings have changed)\r\n\t\t\tif(!samePath) {\r\n\t\t\t\toldRowGroup.removeRow(row);\r\n\t\t\t\tthis.assignRowToGroup(row, this.groups);\r\n\t\t\t\tthis.refreshData(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgetExpectedPath(row) {\r\n\t\tvar groupPath = [], rowData = row.getData();\r\n\r\n\t\tthis.groupIDLookups.forEach((groupId) => {\r\n\t\t\tgroupPath.push(groupId.func(rowData));\r\n\t\t});\r\n\r\n\t\treturn groupPath;\r\n\t}\r\n\r\n\tupdateGroupRows(force){\r\n\t\tvar output = [],\r\n\t\toldRowCount;\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\toutput = output.concat(group.getHeadersAndRows());\r\n\t\t});\r\n\r\n\t\tif(force){\r\n\t\t\tthis.refreshData(true, this.displayHandler);\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tscrollHeaders(left){\r\n\t\tif(this.table.options.renderHorizontal === \"virtual\"){\r\n\t\t\tleft -= this.table.columnManager.renderer.vDomPadLeft;\r\n\t\t}\r\n\r\n\t\tleft = left + \"px\";\r\n\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\tgroup.scrollHeader(left);\r\n\t\t});\r\n\t}\r\n\r\n\tremoveGroup(group){\r\n\t\tvar groupKey = group.level + \"_\" + group.key,\r\n\t\tindex;\r\n\r\n\t\tif(this.groups[groupKey]){\r\n\t\t\tdelete this.groups[groupKey];\r\n\r\n\t\t\tindex = this.groupList.indexOf(group);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.groupList.splice(index, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nGroupRows.moduleName = \"groupRows\";\r\n\r\nexport default GroupRows;","export default {\r\n\tcellEdit: function(action){\r\n\t\taction.component.setValueProcessData(action.data.oldValue);\r\n\t\taction.component.cellRendered();\r\n\t},\r\n\r\n\trowAdd: function(action){\r\n\t\taction.component.deleteActual();\r\n\t},\r\n\r\n\trowDelete: function(action){\r\n\t\tvar newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index);\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tthis.table.modules.groupRows.updateGroupRows(true);\r\n\t\t}\r\n\r\n\t\tthis._rebindRow(action.component, newRow);\r\n\t},\r\n\r\n\trowMove: function(action){\r\n\t\tthis.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posFrom], !action.data.after);\r\n\t\tthis.table.rowManager.redraw();\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\nimport Row from '../../core/row/Row.js';\r\nimport Cell from '../../core/cell/Cell.js';\r\n\r\nimport defaultUndoers from './defaults/undoers.js';\r\nimport defaultRedoers from './defaults/redoers.js';\r\n\r\nclass History extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.history = [];\r\n\t\tthis.index = -1;\r\n\r\n\t\tthis.registerTableOption(\"history\", false); //enable edit history\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.history){\r\n\t\t\tthis.subscribe(\"cell-value-updated\", this.cellUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"cell-delete\", this.clearComponentHistory.bind(this));\r\n\t\t\tthis.subscribe(\"row-delete\", this.rowDeleted.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.clear.bind(this));\r\n\t\t\tthis.subscribe(\"row-added\", this.rowAdded.bind(this));\r\n\t\t\tthis.subscribe(\"row-move\", this.rowMoved.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"undo\", this.undo.bind(this));\r\n\t\tthis.registerTableFunction(\"redo\", this.redo.bind(this));\r\n\t\tthis.registerTableFunction(\"getHistoryUndoSize\", this.getHistoryUndoSize.bind(this));\r\n\t\tthis.registerTableFunction(\"getHistoryRedoSize\", this.getHistoryRedoSize.bind(this));\r\n\t\tthis.registerTableFunction(\"clearHistory\", this.clear.bind(this));\r\n\t}\r\n\r\n\trowMoved(from, to, after){\r\n\t\tthis.action(\"rowMove\", from, {posFrom:this.table.rowManager.getRowPosition(from), posTo:this.table.rowManager.getRowPosition(to), to:to, after:after});\r\n\t}\r\n\r\n\trowAdded(row, data, pos, index){\r\n\t\tthis.action(\"rowAdd\", row, {data:data, pos:pos, index:index});\r\n\t}\r\n\r\n\trowDeleted(row){\r\n\t\tvar index, rows;\r\n\r\n\t\tif(this.table.options.groupBy){\r\n\r\n\t\t\trows = row.getComponent().getGroup().rows\r\n\t\t\tindex = rows.indexOf(row);\r\n\r\n\t\t\tif(index){\r\n\t\t\t\tindex = rows[index-1];\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tindex = row.table.rowManager.getRowIndex(row);\r\n\r\n\t\t\tif(index){\r\n\t\t\t\tindex = row.table.rowManager.rows[index-1];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.action(\"rowDelete\", row, {data:row.getData(), pos:!index, index:index});\r\n\t}\r\n\r\n\tcellUpdated(cell){\r\n\t\tthis.action(\"cellEdit\", cell, {oldValue:cell.oldValue, newValue:cell.value});\r\n\t}\r\n\r\n\tclear(){\r\n\t\tthis.history = [];\r\n\t\tthis.index = -1;\r\n\t}\r\n\r\n\taction(type, component, data){\r\n\t\tthis.history = this.history.slice(0, this.index + 1);\r\n\r\n\t\tthis.history.push({\r\n\t\t\ttype:type,\r\n\t\t\tcomponent:component,\r\n\t\t\tdata:data,\r\n\t\t});\r\n\r\n\t\tthis.index ++;\r\n\t}\r\n\r\n\tgetHistoryUndoSize(){\r\n\t\treturn this.index + 1;\r\n\t}\r\n\r\n\tgetHistoryRedoSize(){\r\n\t\treturn this.history.length - (this.index + 1);\r\n\t}\r\n\r\n\tclearComponentHistory(component){\r\n\t\tvar index = this.history.findIndex(function(item){\r\n\t\t\treturn item.component === component;\r\n\t\t});\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.history.splice(index, 1);\r\n\t\t\tif(index <= this.index){\r\n\t\t\t\tthis.index--;\r\n\t\t\t}\r\n\r\n\t\t\tthis.clearComponentHistory(component);\r\n\t\t}\r\n\t}\r\n\r\n\tundo(){\r\n\t\tif(this.index > -1){\r\n\t\t\tlet action = this.history[this.index];\r\n\r\n\t\t\tHistory.undoers[action.type].call(this, action);\r\n\r\n\t\t\tthis.index--;\r\n\r\n\t\t\tthis.dispatchExternal(\"historyUndo\", action.type, action.component.getComponent(), action.data);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"History Undo Error - No more history to undo\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tredo(){\r\n\t\tif(this.history.length-1 > this.index){\r\n\r\n\t\t\tthis.index++;\r\n\r\n\t\t\tlet action = this.history[this.index];\r\n\r\n\t\t\tHistory.redoers[action.type].call(this, action);\r\n\r\n\t\t\tthis.dispatchExternal(\"historyRedo\", action.type, action.component.getComponent(), action.data);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"History Redo Error - No more history to redo\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//rebind rows to new element after deletion\r\n\t_rebindRow(oldRow, newRow){\r\n\t\tthis.history.forEach(function(action){\r\n\t\t\tif(action.component instanceof Row){\r\n\t\t\t\tif(action.component === oldRow){\r\n\t\t\t\t\taction.component = newRow;\r\n\t\t\t\t}\r\n\t\t\t}else if(action.component instanceof Cell){\r\n\t\t\t\tif(action.component.row === oldRow){\r\n\t\t\t\t\tvar field = action.component.column.getField();\r\n\r\n\t\t\t\t\tif(field){\r\n\t\t\t\t\t\taction.component = newRow.getCell(field);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}\r\n\r\nHistory.moduleName = \"history\";\r\n\r\n//load defaults\r\nHistory.undoers = defaultUndoers;\r\nHistory.redoers = defaultRedoers;\r\n\r\nexport default History;","import Module from '../../core/Module.js';\r\nimport Column from '../../core/column/Column.js';\r\n\r\nclass HtmlTableImport extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.fieldIndex = [];\r\n\t\tthis.hasIndex = false;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.tableElementCheck();\r\n\t}\r\n\r\n\ttableElementCheck(){\r\n\t\tif(this.table.originalElement && this.table.originalElement.tagName === \"TABLE\"){\r\n\t\t\tthis.parseTable();\r\n\t\t}\r\n\t}\r\n\r\n\tparseTable(){\r\n\t\tvar element = this.table.originalElement,\r\n\t\toptions = this.table.options,\r\n\t\tcolumns = options.columns,\r\n\t\theaders = element.getElementsByTagName(\"th\"),\r\n\t\trows = element.getElementsByTagName(\"tbody\")[0],\r\n\t\tdata = [],\r\n\t\tnewTable;\r\n\r\n\t\tthis.hasIndex = false;\r\n\r\n\t\tthis.dispatchExternal(\"htmlImporting\");\r\n\r\n\t\trows = rows ? rows.getElementsByTagName(\"tr\") : [];\r\n\r\n\t\t//check for Tabulator inline options\r\n\t\tthis._extractOptions(element, options);\r\n\r\n\t\tif(headers.length){\r\n\t\t\tthis._extractHeaders(headers, rows);\r\n\t\t}else{\r\n\t\t\tthis._generateBlankHeaders(headers, rows);\r\n\t\t}\r\n\r\n\t\t//iterate through table rows and build data set\r\n\t\tfor(var index = 0; index < rows.length; index++){\r\n\t\t\tvar row = rows[index],\r\n\t\t\tcells = row.getElementsByTagName(\"td\"),\r\n\t\t\titem = {};\r\n\r\n\t\t\t//create index if the dont exist in table\r\n\t\t\tif(!this.hasIndex){\r\n\t\t\t\titem[options.index] = index;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\tvar cell = cells[i];\r\n\t\t\t\tif(typeof this.fieldIndex[i] !== \"undefined\"){\r\n\t\t\t\t\titem[this.fieldIndex[i]] = cell.innerHTML;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//add row data to item\r\n\t\t\tdata.push(item);\r\n\t\t}\r\n\r\n\t\toptions.data = data;\r\n\r\n\t\tthis.dispatchExternal(\"htmlImported\");\r\n\t}\r\n\r\n\t//extract tabulator attribute options\r\n\t_extractOptions(element, options, defaultOptions){\r\n\t\tvar attributes = element.attributes;\r\n\t\tvar optionsArr = defaultOptions ? Object.keys(defaultOptions) : Object.keys(options);\r\n\t\tvar optionsList = {};\r\n\r\n\t\toptionsArr.forEach((item) => {\r\n\t\t\toptionsList[item.toLowerCase()] = item;\r\n\t\t});\r\n\r\n\t\tfor(var index in attributes){\r\n\t\t\tvar attrib = attributes[index];\r\n\t\t\tvar name;\r\n\r\n\t\t\tif(attrib && typeof attrib == \"object\" && attrib.name && attrib.name.indexOf(\"tabulator-\") === 0){\r\n\t\t\t\tname = attrib.name.replace(\"tabulator-\", \"\");\r\n\r\n\t\t\t\tif(typeof optionsList[name] !== \"undefined\"){\r\n\t\t\t\t\toptions[optionsList[name]] = this._attribValue(attrib.value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//get value of attribute\r\n\t_attribValue(value){\r\n\t\tif(value === \"true\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif(value === \"false\"){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\t//find column if it has already been defined\r\n\t_findCol(title){\r\n\t\tvar match = this.table.options.columns.find((column) => {\r\n\t\t\treturn column.title === title;\r\n\t\t});\r\n\r\n\t\treturn match || false;\r\n\t}\r\n\r\n\t//extract column from headers\r\n\t_extractHeaders(headers, rows){\r\n\t\tfor(var index = 0; index < headers.length; index++){\r\n\t\t\tvar header = headers[index],\r\n\t\t\texists = false,\r\n\t\t\tcol = this._findCol(header.textContent),\r\n\t\t\twidth, attributes;\r\n\r\n\t\t\tif(col){\r\n\t\t\t\texists = true;\r\n\t\t\t}else{\r\n\t\t\t\tcol = {title:header.textContent.trim()};\r\n\t\t\t}\r\n\r\n\t\t\tif(!col.field) {\r\n\t\t\t\tcol.field = header.textContent.trim().toLowerCase().replace(\" \", \"_\");\r\n\t\t\t}\r\n\r\n\t\t\twidth = header.getAttribute(\"width\");\r\n\r\n\t\t\tif(width && !col.width)\t{\r\n\t\t\t\tcol.width = width;\r\n\t\t\t}\r\n\r\n\t\t\t//check for Tabulator inline options\r\n\t\t\tthis._extractOptions(header, col, this.table.columnManager.optionsList.registeredDefaults);\r\n\r\n\t\t\tthis.fieldIndex[index] = col.field;\r\n\r\n\t\t\tif(col.field == this.table.options.index){\r\n\t\t\t\tthis.hasIndex = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(!exists){\r\n\t\t\t\tthis.table.options.columns.push(col);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\r\n\t//generate blank headers\r\n\t_generateBlankHeaders(headers, rows){\r\n\t\tfor(var index = 0; index < headers.length; index++){\r\n\t\t\tvar header = headers[index],\r\n\t\t\tcol = {title:\"\", field:\"col\" + index};\r\n\r\n\t\t\tthis.fieldIndex[index] = col.field;\r\n\r\n\t\t\tvar width = header.getAttribute(\"width\");\r\n\r\n\t\t\tif(width){\r\n\t\t\t\tcol.width = width;\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.options.columns.push(col);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nHtmlTableImport.moduleName = \"htmlTableImport\";\r\n\r\nexport default HtmlTableImport;","export default {\r\n\tcellEdit: function(action){\r\n\t\taction.component.setValueProcessData(action.data.newValue);\r\n\t\taction.component.cellRendered();\r\n\t},\r\n\r\n\trowAdd: function(action){\r\n\t\tvar newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index);\r\n\r\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\r\n\t\t\tthis.table.modules.groupRows.updateGroupRows(true);\r\n\t\t}\r\n\r\n\t\tthis._rebindRow(action.component, newRow);\r\n\t},\r\n\r\n\trowDelete:function(action){\r\n\t\taction.component.deleteActual();\r\n\t},\r\n\r\n\trowMove: function(action){\r\n\t\tthis.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posTo], action.data.after);\r\n\t\tthis.table.rowManager.redraw();\r\n\t},\r\n};","function csvImporter(input){\r\n var data = [],\r\n row = 0, \r\n col = 0,\r\n inQuote = false;\r\n \r\n //Iterate over each character\r\n for (let index = 0; index < input.length; index++) {\r\n let char = input[index], \r\n nextChar = input[index+1]; \r\n \r\n //Initialize empty row\r\n if(!data[row]){\r\n data[row] = [];\r\n }\r\n\r\n //Initialize empty column\r\n if(!data[row][col]){\r\n data[row][col] = \"\";\r\n }\r\n \r\n //Handle quotation mark inside string\r\n if (char == '\"' && inQuote && nextChar == '\"') { \r\n data[row][col] += char; \r\n index++;\r\n continue; \r\n }\r\n \r\n //Begin / End Quote\r\n if (char == '\"') { \r\n inQuote = !inQuote;\r\n continue;\r\n }\r\n \r\n //Next column (if not in quote)\r\n if (char == ',' && !inQuote) { \r\n col++;\r\n continue; \r\n }\r\n \r\n //New row if new line and not in quote (CRLF) \r\n if (char == '\\r' && nextChar == '\\n' && !inQuote) { \r\n col = 0; \r\n row++; \r\n index++; \r\n continue; \r\n }\r\n \r\n //New row if new line and not in quote (CR or LF) \r\n if ((char == '\\r' || char == '\\n') && !inQuote) { \r\n col = 0;\r\n row++;\r\n continue; \r\n }\r\n\r\n //Normal Character, append to column\r\n data[row][col] += char;\r\n }\r\n\r\n return data;\r\n}\r\n\r\nexport default csvImporter;","import Module from '../../core/Module.js';\r\n\r\nimport defaultImporters from './defaults/importers.js';\r\n\r\nclass Import extends Module{\r\n \r\n constructor(table){\r\n super(table);\r\n \r\n this.registerTableOption(\"importFormat\");\r\n this.registerTableOption(\"importReader\", \"text\");\r\n }\r\n \r\n initialize(){\r\n this.registerTableFunction(\"import\", this.importFromFile.bind(this));\r\n\r\n if(this.table.options.importFormat){\r\n this.subscribe(\"data-loading\", this.loadDataCheck.bind(this), 10);\r\n this.subscribe(\"data-load\", this.loadData.bind(this), 10);\r\n }\r\n }\r\n\r\n loadDataCheck(data){\r\n return typeof data === \"string\";\r\n }\r\n\r\n loadData(data, params, config, silent, previousData){\r\n return this.importData(this.lookupImporter(), data)\r\n .then(this.structureData.bind(this))\r\n .catch((err) => {\r\n console.error(\"Import Error:\", err || \"Unable to import data\")\r\n return Promise.reject(err);\r\n })\r\n }\r\n\r\n lookupImporter(importFormat){\r\n var importer;\r\n \r\n if(!importFormat){\r\n importFormat = this.table.options.importFormat;\r\n }\r\n \r\n if(typeof importFormat === \"string\"){\r\n importer = Import.importers[importFormat];\r\n }else{\r\n importer = importFormat;\r\n }\r\n\r\n if(!importer){\r\n console.error(\"Import Error - Importer not found:\", importFormat);\r\n }\r\n \r\n return importer;\r\n }\r\n \r\n importFromFile(importFormat, extension){\r\n var importer = this.lookupImporter(importFormat);\r\n \r\n if(importer){\r\n return this.pickFile(extension)\r\n .then(this.importData.bind(this, importer))\r\n .then(this.structureData.bind(this))\r\n .then(this.setData.bind(this))\r\n .catch((err) => {\r\n console.error(\"Import Error:\", err || \"Unable to import file\")\r\n return Promise.reject(err);\r\n })\r\n }\r\n }\r\n \r\n pickFile(extensions){\r\n return new Promise((resolve, reject) => {\r\n var input = document.createElement(\"input\");\r\n input.type = \"file\";\r\n input.accept = extensions;\r\n \r\n input.addEventListener(\"change\", (e) => {\r\n var file = input.files[0],\r\n reader = new FileReader(),\r\n data;\r\n \r\n switch(this.table.options.importReader){\r\n case \"buffer\":\r\n reader.readAsArrayBuffer(file);\r\n break;\r\n\r\n case \"binary\":\r\n reader.readAsBinaryString(file);\r\n break;\r\n\r\n case \"url\":\r\n reader.readAsDataURL(file);\r\n break;\r\n\r\n case \"text\":\r\n default:\r\n reader.readAsText(file);\r\n }\r\n \r\n reader.onload = (e) => {\r\n resolve(reader.result)\r\n };\r\n \r\n reader.onerror = (e) => {\r\n console.warn(\"File Load Error - Unable to read file\");\r\n reject();\r\n };\r\n });\r\n \r\n input.click();\r\n });\r\n }\r\n \r\n importData(importer, fileContents){\r\n var data = importer.call(this.table, fileContents);\r\n \r\n if(data instanceof Promise){\r\n return data;\r\n }else{\r\n return data ? Promise.resolve(data) : Promise.reject();\r\n }\r\n }\r\n\r\n structureData(parsedData){\r\n var data = [];\r\n \r\n if(Array.isArray(parsedData) && parsedData.length && Array.isArray(parsedData[0])){\r\n if(this.table.options.autoColumns){\r\n data = this.structureArrayToObject(parsedData);\r\n }else{\r\n data = this.structureArrayToColumns(parsedData);\r\n }\r\n\r\n return data;\r\n }else{\r\n return parsedData;\r\n }\r\n }\r\n\r\n structureArrayToObject(parsedData){\r\n var columns = parsedData.shift();\r\n\r\n var data = parsedData.map((values) => {\r\n var row = {};\r\n\r\n columns.forEach((key, i) => {\r\n row[key] = values[i];\r\n })\r\n\r\n return row;\r\n })\r\n\r\n return data;\r\n }\r\n\r\n structureArrayToColumns(parsedData){\r\n var data = [],\r\n columns = this.table.getColumns();\r\n\r\n //remove first row if it is the column names\r\n if(columns[0] && parsedData[0][0]){\r\n if(columns[0].getDefinition().title === parsedData[0][0]){\r\n parsedData.shift();\r\n }\r\n }\r\n \r\n //convert row arrays to objects\r\n parsedData.forEach((rowData) => {\r\n var row = {};\r\n\r\n rowData.forEach((value, index) => {\r\n var column = columns[index];\r\n\r\n if(column){\r\n row[column.getField()] = value;\r\n }\r\n })\r\n\r\n data.push(row);\r\n });\r\n\r\n return data;\r\n }\r\n \r\n setData(data){\r\n return this.table.setData(data);\r\n }\r\n}\r\n\r\nImport.moduleName = \"import\";\r\n\r\n//load defaults\r\nImport.importers = defaultImporters;\r\n\r\nexport default Import;","export default function(input){\r\n try {\r\n return JSON.parse(input);\r\n } catch(e) {\r\n console.warn(\"JSON Import Error - File contents is invalid JSON\", e);\r\n return Promise.reject();\r\n }\r\n}","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport Cell from '../../core/cell/Cell';\r\nimport Column from '../../core/column/Column';\r\n\r\nclass Interaction extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.eventMap = {\r\n\t\t\t//row events\r\n\t\t\trowClick:\"row-click\",\r\n\t\t\trowDblClick:\"row-dblclick\",\r\n\t\t\trowContext:\"row-contextmenu\",\r\n\t\t\trowMouseEnter:\"row-mouseenter\",\r\n\t\t\trowMouseLeave:\"row-mouseleave\",\r\n\t\t\trowMouseOver:\"row-mouseover\",\r\n\t\t\trowMouseOut:\"row-mouseout\",\r\n\t\t\trowMouseMove:\"row-mousemove\",\r\n\t\t\trowTap:\"row\",\r\n\t\t\trowDblTap:\"row\",\r\n\t\t\trowTapHold:\"row\",\r\n\r\n\t\t\t//cell events\r\n\t\t\tcellClick:\"cell-click\",\r\n\t\t\tcellDblClick:\"cell-dblclick\",\r\n\t\t\tcellContext:\"cell-contextmenu\",\r\n\t\t\tcellMouseEnter:\"cell-mouseenter\",\r\n\t\t\tcellMouseLeave:\"cell-mouseleave\",\r\n\t\t\tcellMouseOver:\"cell-mouseover\",\r\n\t\t\tcellMouseOut:\"cell-mouseout\",\r\n\t\t\tcellMouseMove:\"cell-mousemove\",\r\n\t\t\tcellTap:\"cell\",\r\n\t\t\tcellDblTap:\"cell\",\r\n\t\t\tcellTapHold:\"cell\",\r\n\r\n\t\t\t//column header events\r\n\t\t\theaderClick:\"column-click\",\r\n\t\t\theaderDblClick:\"column-dblclick\",\r\n\t\t\theaderContext:\"column-contextmenu\",\r\n\t\t\theaderMouseEnter:\"column-mouseenter\",\r\n\t\t\theaderMouseLeave:\"column-mouseleave\",\r\n\t\t\theaderMouseOver:\"column-mouseover\",\r\n\t\t\theaderMouseOut:\"column-mouseout\",\r\n\t\t\theaderMouseMove:\"column-mousemove\",\r\n\t\t\theaderTap:\"column\",\r\n\t\t\theaderDblTap:\"column\",\r\n\t\t\theaderTapHold:\"column\",\r\n\r\n\t\t\t//group header\r\n\t\t\tgroupClick:\"group-click\",\r\n\t\t\tgroupDblClick:\"group-dblclick\",\r\n\t\t\tgroupContext:\"group-contextmenu\",\r\n\t\t\tgroupMouseEnter:\"group-mouseenter\",\r\n\t\t\tgroupMouseLeave:\"group-mouseleave\",\r\n\t\t\tgroupMouseOver:\"group-mouseover\",\r\n\t\t\tgroupMouseOut:\"group-mouseout\",\r\n\t\t\tgroupMouseMove:\"group-mousemove\",\r\n\t\t\tgroupTap:\"group\",\r\n\t\t\tgroupDblTap:\"group\",\r\n\t\t\tgroupTapHold:\"group\",\r\n\t\t}\r\n\r\n\t\tthis.subscribers = {};\r\n\r\n\t\tthis.touchSubscribers = {};\r\n\r\n\t\tthis.columnSubscribers = {};\r\n\r\n\t\tthis.touchWatchers = {\r\n\t\t\trow:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tcell:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tcolumn:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t},\r\n\t\t\tgroup:{\r\n\t\t\t\ttap:null,\r\n\t\t\t\ttapDbl:null,\r\n\t\t\t\ttapHold:null,\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.registerColumnOption(\"headerClick\");\r\n\t\tthis.registerColumnOption(\"headerDblClick\");\r\n\t\tthis.registerColumnOption(\"headerContext\");\r\n\t\tthis.registerColumnOption(\"headerMouseEnter\");\r\n\t\tthis.registerColumnOption(\"headerMouseLeave\");\r\n\t\tthis.registerColumnOption(\"headerMouseOver\");\r\n\t\tthis.registerColumnOption(\"headerMouseOut\");\r\n\t\tthis.registerColumnOption(\"headerMouseMove\");\r\n\t\tthis.registerColumnOption(\"headerTap\");\r\n\t\tthis.registerColumnOption(\"headerDblTap\");\r\n\t\tthis.registerColumnOption(\"headerTapHold\");\r\n\r\n\t\tthis.registerColumnOption(\"cellClick\");\r\n\t\tthis.registerColumnOption(\"cellDblClick\");\r\n\t\tthis.registerColumnOption(\"cellContext\");\r\n\t\tthis.registerColumnOption(\"cellMouseEnter\");\r\n\t\tthis.registerColumnOption(\"cellMouseLeave\");\r\n\t\tthis.registerColumnOption(\"cellMouseOver\");\r\n\t\tthis.registerColumnOption(\"cellMouseOut\");\r\n\t\tthis.registerColumnOption(\"cellMouseMove\");\r\n\t\tthis.registerColumnOption(\"cellTap\");\r\n\t\tthis.registerColumnOption(\"cellDblTap\");\r\n\t\tthis.registerColumnOption(\"cellTapHold\");\r\n\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeExternalEvents();\r\n\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this))\r\n\t\tthis.subscribe(\"cell-dblclick\", this.cellContentsSelectionFixer.bind(this))\r\n\t}\r\n\r\n\tcellContentsSelectionFixer(e, cell){\r\n\t\tif(this.table.modExists(\"edit\")){\r\n\t\t\tif (this.table.modules.edit.currentCell === this){\r\n\t\t\t\treturn; //prevent instant selection of editor content\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\ttry{\r\n\t\t\tif (document.selection) { // IE\r\n\t\t\t\tvar range = document.body.createTextRange();\r\n\t\t\t\trange.moveToElementText(this.element);\r\n\t\t\t\trange.select();\r\n\t\t\t} else if (window.getSelection) {\r\n\t\t\t\tvar range = document.createRange();\r\n\t\t\t\trange.selectNode(this.element);\r\n\t\t\t\twindow.getSelection().removeAllRanges();\r\n\t\t\t\twindow.getSelection().addRange(range);\r\n\t\t\t}\r\n\t\t}catch(e){}\r\n\t}\r\n\r\n\tinitializeExternalEvents(){\r\n\t\tfor(let key in this.eventMap){\r\n\t\t\tthis.subscriptionChangeExternal(key, this.subscriptionChanged.bind(this, key))\r\n\t\t}\r\n\t}\r\n\r\n\tsubscriptionChanged(key, added){\r\n\t\tvar index;\r\n\r\n\t\tif(added){\r\n\t\t\tif(!this.subscribers[key]){\r\n\t\t\t\tif(this.eventMap[key].includes(\"-\")){\r\n\t\t\t\t\tthis.subscribers[key] = this.handle.bind(this, key);\r\n\t\t\t\t\tthis.subscribe(this.eventMap[key], this.subscribers[key]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.subscribeTouchEvents(key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.eventMap[key].includes(\"-\")){\r\n\t\t\t\tif(this.subscribers[key] && !this.columnSubscribers[key] && !this.subscribedExternal(key)){\r\n\t\t\t\t\tthis.unsubscribe(this.eventMap[key], this.subscribers[key]);\r\n\t\t\t\t\tdelete this.subscribers[key];\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.unsubscribeTouchEvents(key);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tsubscribeTouchEvents(key){\r\n\t\tvar type = this.eventMap[key];\r\n\r\n\t\tif(!this.touchSubscribers[type + \"-touchstart\"]){\r\n\t\t\tthis.touchSubscribers[type + \"-touchstart\"] = this.handleTouch.bind(this, type, \"start\");\r\n\t\t\tthis.touchSubscribers[type + \"-touchend\"] = this.handleTouch.bind(this, type, \"end\");\r\n\r\n\t\t\tthis.subscribe(type + \"-touchstart\", this.touchSubscribers[type + \"-touchstart\"]);\r\n\t\t\tthis.subscribe(type + \"-touchend\", this.touchSubscribers[type + \"-touchend\"]);\r\n\t\t}\r\n\r\n\t\tthis.subscribers[key] = true;\r\n\t}\r\n\r\n\tunsubscribeTouchEvents(key){\r\n\t\tvar notouch = true,\r\n\t\ttype = this.eventMap[key];\r\n\r\n\t\tif(this.subscribers[key] && !this.subscribedExternal(key)){\r\n\t\t\tdelete this.subscribers[key];\r\n\r\n\t\t\tfor(let i in this.eventMap){\r\n\t\t\t\tif(this.eventMap[i] === type){\r\n\t\t\t\t\tif(this.subscribers[i]){\r\n\t\t\t\t\t\tnotouch = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(notouch){\r\n\t\t\t\tthis.unsubscribe(type + \"-touchstart\", this.touchSubscribers[type + \"-touchstart\"]);\r\n\t\t\t\tthis.unsubscribe(type + \"-touchend\", this.touchSubscribers[type + \"-touchend\"]);\r\n\r\n\t\t\t\tdelete this.touchSubscribers[type + \"-touchstart\"];\r\n\t\t\t\tdelete this.touchSubscribers[type + \"-touchend\"];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition;\r\n\r\n\t\tfor(let key in this.eventMap){\r\n\t\t\tif(def[key]){\r\n\t\t\t\tthis.subscriptionChanged(key, true);\r\n\r\n\t\t\t\tif(!this.columnSubscribers[key]){\r\n\t\t\t\t\tthis.columnSubscribers[key] = [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.columnSubscribers[key].push(column);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\thandle(action, e, component){\r\n\t\tthis.dispatchEvent(action, e, component);\r\n\t}\r\n\r\n\thandleTouch(type, action, e, component){\r\n\t\tvar watchers = this.touchWatchers[type];\r\n\r\n\t\tif(type === \"column\"){\r\n\t\t\ttype = \"header\";\r\n\t\t}\r\n\r\n\t\tswitch(action){\r\n\t\t\tcase \"start\":\r\n\t\t\twatchers.tap = true;\r\n\r\n\t\t\tclearTimeout(watchers.tapHold);\r\n\r\n\t\t\twatchers.tapHold = setTimeout(() => {\r\n\t\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\t\twatchers.tapHold = null;\r\n\r\n\t\t\t\twatchers.tap = null;\r\n\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\tthis.dispatchEvent(type + \"TapHold\", e, component);\r\n\t\t\t}, 1000);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"end\":\r\n\t\t\tif(watchers.tap){\r\n\r\n\t\t\t\twatchers.tap = null;\r\n\t\t\t\tthis.dispatchEvent(type + \"Tap\", e, component);\r\n\t\t\t}\r\n\r\n\t\t\tif(watchers.tapDbl){\r\n\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\tthis.dispatchEvent(type + \"DblTap\", e, component);\r\n\t\t\t}else{\r\n\t\t\t\twatchers.tapDbl = setTimeout(() => {\r\n\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\twatchers.tapDbl = null;\r\n\t\t\t\t}, 300);\r\n\t\t\t}\r\n\r\n\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\twatchers.tapHold = null;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tdispatchEvent(action, e, component){\r\n\t\tvar componentObj = component.getComponent(),\r\n\t\tcallback;\r\n\r\n\t\tif(this.columnSubscribers[action]){\r\n\r\n\t\t\tif(component instanceof Cell){\r\n\t\t\t\tcallback = component.column.definition[action];\r\n\t\t\t}else if(component instanceof Column){\r\n\t\t\t\tcallback = component.definition[action];\r\n\t\t\t}\r\n\r\n\t\t\tif(callback){\r\n\t\t\t\tcallback(e, componentObj);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.dispatchExternal(action, e, componentObj);\r\n\t}\r\n}\r\n\r\nInteraction.moduleName = \"interaction\";\r\n\r\nexport default Interaction;","export default {\r\n\tnavPrev:\"shift + 9\",\r\n\tnavNext:9,\r\n\tnavUp:38,\r\n\tnavDown:40,\r\n\tscrollPageUp:33,\r\n\tscrollPageDown:34,\r\n\tscrollToStart:36,\r\n\tscrollToEnd:35,\r\n\tundo:[\"ctrl + 90\", \"meta + 90\"],\r\n\tredo:[\"ctrl + 89\", \"meta + 89\"],\r\n\tcopyToClipboard:[\"ctrl + 67\", \"meta + 89\"],\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultBindings from './defaults/bindings.js';\r\nimport defaultActions from './defaults/actions.js';\r\n\r\nclass Keybindings extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.watchKeys = null;\r\n\t\tthis.pressedKeys = null;\r\n\t\tthis.keyupBinding = false;\r\n\t\tthis.keydownBinding = false;\r\n\r\n\t\tthis.registerTableOption(\"keybindings\", {}); //array for keybindings\r\n\t\tthis.registerTableOption(\"tabEndNewRow\", false); //create new row when tab to end of table\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tvar bindings = this.table.options.keybindings,\r\n\t\tmergedBindings = {};\r\n\r\n\t\tthis.watchKeys = {};\r\n\t\tthis.pressedKeys = [];\r\n\r\n\t\tif(bindings !== false){\r\n\t\t\tObject.assign(mergedBindings, Keybindings.bindings)\r\n\t\t\tObject.assign(mergedBindings, bindings)\r\n\r\n\t\t\tthis.mapBindings(mergedBindings);\r\n\t\t\tthis.bindEvents();\r\n\t\t}\r\n\r\n\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\r\n\t}\r\n\r\n\tmapBindings(bindings){\r\n\t\tfor(let key in bindings){\r\n\t\t\tif(Keybindings.actions[key]){\r\n\t\t\t\tif(bindings[key]){\r\n\t\t\t\t\tif(typeof bindings[key] !== \"object\"){\r\n\t\t\t\t\t\tbindings[key] = [bindings[key]];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbindings[key].forEach((binding) => {\r\n\t\t\t\t\t\tvar bindingList = Array.isArray(binding) ? binding : [binding];\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tbindingList.forEach((item) => {\r\n\t\t\t\t\t\t\tthis.mapBinding(key, item);\r\n\t\t\t\t\t\t});\t\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Key Binding Error - no such action:\", key);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmapBinding(action, symbolsList){\r\n\t\tvar binding = {\r\n\t\t\taction: Keybindings.actions[action],\r\n\t\t\tkeys: [],\r\n\t\t\tctrl: false,\r\n\t\t\tshift: false,\r\n\t\t\tmeta: false,\r\n\t\t};\r\n\r\n\t\tvar symbols = symbolsList.toString().toLowerCase().split(\" \").join(\"\").split(\"+\");\r\n\r\n\t\tsymbols.forEach((symbol) => {\r\n\t\t\tswitch(symbol){\r\n\t\t\t\tcase \"ctrl\":\r\n\t\t\t\tbinding.ctrl = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"shift\":\r\n\t\t\t\tbinding.shift = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"meta\":\r\n\t\t\t\tbinding.meta = true;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tsymbol = isNaN(symbol) ? symbol.toUpperCase().charCodeAt(0) : parseInt(symbol);\r\n\t\t\t\tbinding.keys.push(symbol);\r\n\r\n\t\t\t\tif(!this.watchKeys[symbol]){\r\n\t\t\t\t\tthis.watchKeys[symbol] = [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.watchKeys[symbol].push(binding);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tbindEvents(){\r\n\t\tvar self = this;\r\n\r\n\t\tthis.keyupBinding = function(e){\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tvar bindings = self.watchKeys[code];\r\n\r\n\t\t\tif(bindings){\r\n\r\n\t\t\t\tself.pressedKeys.push(code);\r\n\r\n\t\t\t\tbindings.forEach(function(binding){\r\n\t\t\t\t\tself.checkBinding(e, binding);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.keydownBinding = function(e){\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tvar bindings = self.watchKeys[code];\r\n\r\n\t\t\tif(bindings){\r\n\r\n\t\t\t\tvar index = self.pressedKeys.indexOf(code);\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tself.pressedKeys.splice(index, 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.table.element.addEventListener(\"keydown\", this.keyupBinding);\r\n\r\n\t\tthis.table.element.addEventListener(\"keyup\", this.keydownBinding);\r\n\t}\r\n\r\n\tclearBindings(){\r\n\t\tif(this.keyupBinding){\r\n\t\t\tthis.table.element.removeEventListener(\"keydown\", this.keyupBinding);\r\n\t\t}\r\n\r\n\t\tif(this.keydownBinding){\r\n\t\t\tthis.table.element.removeEventListener(\"keyup\", this.keydownBinding);\r\n\t\t}\r\n\t}\r\n\r\n\tcheckBinding(e, binding){\r\n\t\tvar match = true;\r\n\r\n\t\tif(e.ctrlKey == binding.ctrl && e.shiftKey == binding.shift && e.metaKey == binding.meta){\r\n\t\t\tbinding.keys.forEach((key) => {\r\n\t\t\t\tvar index = this.pressedKeys.indexOf(key);\r\n\r\n\t\t\t\tif(index == -1){\r\n\t\t\t\t\tmatch = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tbinding.action.call(this, e);\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nKeybindings.moduleName = \"keybindings\";\r\n\r\n//load defaults\r\nKeybindings.bindings = defaultBindings;\r\nKeybindings.actions = defaultActions;\r\n\r\nexport default Keybindings;","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass Menu extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.menuContainer = null;\r\n\t\tthis.menuElements = [];\r\n\t\tthis.blurEvent = this.hideMenu.bind(this);\r\n\t\tthis.escEvent = this.escMenu.bind(this);\r\n\t\tthis.nestedMenuBlock = false;\r\n\t\tthis.positionReversedX = false;\r\n\t\t\r\n\t\tthis.currentComponent = null;\r\n\t\t\r\n\t\tthis.columnSubscribers = {};\r\n\t\t\r\n\t\tthis.registerTableOption(\"rowContextMenu\", false);\r\n\t\tthis.registerTableOption(\"rowClickMenu\", false);\r\n\t\tthis.registerTableOption(\"groupContextMenu\", false);\r\n\t\tthis.registerTableOption(\"groupClickMenu\", false);\r\n\t\tthis.registerTableOption(\"menuContainer\", false);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"headerContextMenu\");\r\n\t\tthis.registerColumnOption(\"headerClickMenu\");\r\n\t\tthis.registerColumnOption(\"headerMenu\");\r\n\t\tthis.registerColumnOption(\"contextMenu\");\r\n\t\tthis.registerColumnOption(\"clickMenu\");\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.lookupMenuContainer();\r\n\t\t\r\n\t\tthis.initializeRowWatchers();\r\n\t\tthis.initializeGroupWatchers();\r\n\t\t\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t}\r\n\t\r\n\tlookupMenuContainer(){\r\n\t\t\r\n\t\tthis.menuContainer = this.table.options.menuContainer;\r\n\t\t\r\n\t\tif(typeof this.menuContainer === \"string\"){\r\n\t\t\tthis.menuContainer = document.querySelector(this.menuContainer);\r\n\t\t\t\r\n\t\t\tif(!this.menuContainer){\r\n\t\t\t\tconsole.warn(\"Menu Error - no container element found matching selector:\", this.table.options.menuContainer , \"(defaulting to document body)\");\r\n\t\t\t}\r\n\t\t}else if (this.menuContainer === true){\r\n\t\t\tthis.menuContainer = this.table.element;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.menuContainer && !this.checkMenuContainerIsParent(this.menuContainer)){\r\n\t\t\tthis.menuContainer = false;\r\n\t\t\tconsole.warn(\"Menu Error - container element does not contain this table:\", this.table.options.menuContainer , \"(defaulting to document body)\");\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.menuContainer){\r\n\t\t\tthis.menuContainer = document.body;\r\n\t\t}\r\n\t}\r\n\t\r\n\tcheckMenuContainerIsParent(container, element = this.table.element){\r\n\t\tif(container === element){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn element.parentNode ? this.checkMenuContainerIsParent(container, element.parentNode) : false;\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRowWatchers(){\r\n\t\tif(this.table.options.rowContextMenu){\r\n\t\t\tthis.subscribe(\"row-contextmenu\", this.loadMenuEvent.bind(this, this.table.options.rowContextMenu));\r\n\t\t\tthis.table.on(\"rowTapHold\", this.loadMenuEvent.bind(this, this.table.options.rowContextMenu));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.rowClickMenu){\r\n\t\t\tthis.subscribe(\"row-click\", this.loadMenuEvent.bind(this, this.table.options.rowClickMenu));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeGroupWatchers(){\r\n\t\tif(this.table.options.groupContextMenu){\r\n\t\t\tthis.subscribe(\"group-contextmenu\", this.loadMenuEvent.bind(this, this.table.options.groupContextMenu));\r\n\t\t\tthis.table.on(\"groupTapHold\", this.loadMenuEvent.bind(this, this.table.options.groupContextMenu));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.groupClickMenu){\r\n\t\t\tthis.subscribe(\"group-click\", this.loadMenuEvent.bind(this, this.table.options.groupClickMenu));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar options = [\"headerContextMenu\", \"headerClickMenu\"],\r\n\t\tdef = column.definition;\r\n\t\t\r\n\t\t//handle column events\r\n\t\tif(def.headerContextMenu && !this.columnSubscribers.headerContextMenu){\r\n\t\t\tthis.columnSubscribers.headerContextMenu = this.loadMenuTableColumnEvent.bind(this, \"headerContextMenu\");\r\n\t\t\tthis.subscribe(\"column-contextmenu\", this.columnSubscribers.headerContextMenu);\r\n\t\t\tthis.table.on(\"headerTapHold\", this.loadMenuTableColumnEvent.bind(this, \"headerContextMenu\"))\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerClickMenu && !this.columnSubscribers.headerClickMenu){\r\n\t\t\tthis.columnSubscribers.headerClickMenu = this.loadMenuTableColumnEvent.bind(this, \"headerClickMenu\");\r\n\t\t\tthis.subscribe(\"column-click\", this.columnSubscribers.headerClickMenu);\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerMenu){\r\n\t\t\tthis.initializeColumnHeaderMenu(column);\r\n\t\t}\r\n\t\t\r\n\t\t//handle cell events\r\n\t\tif(def.contextMenu && !this.columnSubscribers.contextMenu){\r\n\t\t\tthis.columnSubscribers.contextMenu = this.loadMenuTableCellEvent.bind(this, \"contextMenu\");\r\n\t\t\tthis.subscribe(\"cell-contextmenu\", this.columnSubscribers.contextMenu);\r\n\t\t\tthis.table.on(\"cellTapHold\", this.loadMenuTableCellEvent.bind(this, \"contextMenu\"))\r\n\t\t}\r\n\t\t\r\n\t\tif(def.clickMenu && !this.columnSubscribers.clickMenu){\r\n\t\t\tthis.columnSubscribers.clickMenu = this.loadMenuTableCellEvent.bind(this, \"clickMenu\");\r\n\t\t\tthis.subscribe(\"cell-click\", this.columnSubscribers.clickMenu);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumnHeaderMenu(column){\r\n\t\tvar headerMenuEl;\r\n\t\t\r\n\t\theaderMenuEl = document.createElement(\"span\");\r\n\t\theaderMenuEl.classList.add(\"tabulator-header-menu-button\");\r\n\t\theaderMenuEl.innerHTML = \"⋮\";\r\n\t\t\r\n\t\theaderMenuEl.addEventListener(\"click\", (e) => {\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\t\r\n\t\t\tthis.loadMenuEvent(column.definition.headerMenu, e, column);\r\n\t\t});\r\n\t\t\r\n\t\tcolumn.titleElement.insertBefore(headerMenuEl, column.titleElement.firstChild);\r\n\t}\r\n\t\r\n\tloadMenuTableCellEvent(option, e, cell){\r\n\t\tif(cell._cell){\r\n\t\t\tcell = cell._cell;\r\n\t\t}\r\n\t\t\r\n\t\tif(cell.column.definition[option]){\r\n\t\t\tthis.loadMenuEvent(cell.column.definition[option], e, cell);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadMenuTableColumnEvent(option, e, column){\r\n\t\tif(column._column){\r\n\t\t\tcolumn = column._column;\r\n\t\t}\r\n\t\t\r\n\t\tif(column.definition[option]){\r\n\t\t\tthis.loadMenuEvent(column.definition[option], e, column);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadMenuEvent(menu, e, component){\r\n\t\tif(component._group){\r\n\t\t\tcomponent = component._group;\r\n\t\t}else if(component._row){\r\n\t\t\tcomponent = component._row;\r\n\t\t}\r\n\t\t\r\n\t\tmenu = typeof menu == \"function\" ? menu.call(this.table, component.getComponent(), e) : menu;\r\n\t\t\r\n\t\tthis.loadMenu(e, component, menu);\r\n\t}\r\n\t\r\n\tloadMenu(e, component, menu, parentEl){\r\n\t\tvar touch = !(e instanceof MouseEvent);\r\n\t\t\r\n\t\tvar menuEl = document.createElement(\"div\");\r\n\t\tmenuEl.classList.add(\"tabulator-menu\");\r\n\t\t\r\n\t\tif(!touch){\r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t\t\r\n\t\t//abort if no menu set\r\n\t\tif(!menu || !menu.length){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(!parentEl){\r\n\t\t\tif(this.nestedMenuBlock){\r\n\t\t\t\t//abort if child menu already open\r\n\t\t\t\tif(this.isOpen()){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.nestedMenuBlock = setTimeout(() => {\r\n\t\t\t\t\tthis.nestedMenuBlock = false;\r\n\t\t\t\t}, 100)\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.hideMenu();\r\n\t\t\tthis.menuElements = [];\r\n\t\t}\r\n\t\t\r\n\t\tmenu.forEach((item) => {\r\n\t\t\tvar itemEl = document.createElement(\"div\"),\r\n\t\t\tlabel = item.label,\r\n\t\t\tdisabled = item.disabled;\r\n\t\t\t\r\n\t\t\tif(item.separator){\r\n\t\t\t\titemEl.classList.add(\"tabulator-menu-separator\");\r\n\t\t\t}else{\r\n\t\t\t\titemEl.classList.add(\"tabulator-menu-item\");\r\n\t\t\t\t\r\n\t\t\t\tif(typeof label == \"function\"){\r\n\t\t\t\t\tlabel = label.call(this.table, component.getComponent());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(label instanceof Node){\r\n\t\t\t\t\titemEl.appendChild(label);\r\n\t\t\t\t}else{\r\n\t\t\t\t\titemEl.innerHTML = label;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(typeof disabled == \"function\"){\r\n\t\t\t\t\tdisabled = disabled.call(this.table, component.getComponent());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(disabled){\r\n\t\t\t\t\titemEl.classList.add(\"tabulator-menu-item-disabled\");\r\n\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(item.menu && item.menu.length){\r\n\t\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\tthis.hideOldSubMenus(menuEl);\r\n\t\t\t\t\t\t\tthis.loadMenu(e, component, item.menu, itemEl);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(item.action){\r\n\t\t\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\t\t\t\t\titem.action(e, component.getComponent());\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(item.menu && item.menu.length){\r\n\t\t\t\t\titemEl.classList.add(\"tabulator-menu-item-submenu\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tmenuEl.appendChild(itemEl);\r\n\t\t});\r\n\t\t\r\n\t\tmenuEl.addEventListener(\"click\", (e) => {\r\n\t\t\tthis.hideMenu();\r\n\t\t});\r\n\t\t\r\n\t\tthis.menuElements.push(menuEl);\r\n\t\tthis.positionMenu(menuEl, parentEl, touch, e);\r\n\t\t\r\n\t\tthis.currentComponent = component\r\n\t\t\r\n\t\tthis.dispatchExternal(\"menuOpened\", component.getComponent())\r\n\t}\r\n\t\r\n\thideOldSubMenus(menuEl){\r\n\t\tvar index = this.menuElements.indexOf(menuEl);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tfor(let i = this.menuElements.length - 1; i > index; i--){\r\n\t\t\t\tvar el = this.menuElements[i];\r\n\t\t\t\t\r\n\t\t\t\tif(el.parentNode){\r\n\t\t\t\t\tel.parentNode.removeChild(el);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.menuElements.pop();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tpositionMenu(element, parentEl, touch, e){\r\n\t\tvar x, y, parentOffset;\r\n\t\t\r\n\t\tif(!parentEl){\r\n\t\t\tx = touch ? e.touches[0].pageX : e.pageX;\r\n\t\t\ty = touch ? e.touches[0].pageY : e.pageY;\r\n\t\t\t\r\n\t\t\tif(this.menuContainer !== document.body){\r\n\t\t\t\tparentOffset = Helpers.elOffset(this.menuContainer);\r\n\t\t\t\t\r\n\t\t\t\tx -= parentOffset.left;\r\n\t\t\t\ty -= parentOffset.top;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.positionReversedX = false;\r\n\t\t}else{\r\n\t\t\tparentOffset = Helpers.elOffset(parentEl);\r\n\t\t\tx = parentOffset.left + parentEl.offsetWidth;\r\n\t\t\ty = parentOffset.top - 1;\r\n\t\t}\r\n\t\t\r\n\t\telement.style.top = y + \"px\";\r\n\t\telement.style.left = x + \"px\";\r\n\t\t\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.table.rowManager.element.addEventListener(\"scroll\", this.blurEvent);\r\n\t\t\tthis.subscribe(\"cell-editing\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"click\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"contextmenu\", this.blurEvent);\r\n\t\t\twindow.addEventListener(\"resize\", this.blurEvent);\r\n\t\t\tdocument.body.addEventListener(\"keydown\", this.escEvent);\r\n\t\t}, 100);\r\n\t\t\r\n\t\tthis.menuContainer.appendChild(element);\r\n\t\t\r\n\t\t//move menu to start on right edge if it is too close to the edge of the screen\r\n\t\tif((x + element.offsetWidth) >= this.menuContainer.offsetWidth || this.positionReversedX){\r\n\t\t\telement.style.left = \"\";\r\n\t\t\t\r\n\t\t\tif(parentEl){\r\n\t\t\t\telement.style.right = (this.menuContainer.offsetWidth - parentOffset.left) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\telement.style.right = (this.menuContainer.offsetWidth - x) + \"px\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.positionReversedX = true;\r\n\t\t}\r\n\t\t\r\n\t\t//move menu to start on bottom edge if it is too close to the edge of the screen\r\n\t\tif((y + element.offsetHeight) > this.menuContainer.offsetHeight) {\r\n\t\t\tif(parentEl){\r\n\t\t\t\telement.style.top = (parseInt(element.style.top) - element.offsetHeight + parentEl.offsetHeight + 1) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\telement.style.top = (parseInt(element.style.top) - element.offsetHeight) + \"px\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tisOpen(){\r\n\t\treturn !!this.menuElements.length;\r\n\t}\r\n\t\r\n\tescMenu(e){\r\n\t\tif(e.keyCode == 27){\r\n\t\t\tthis.hideMenu();\r\n\t\t}\r\n\t}\r\n\t\r\n\thideMenu(){\t\r\n\t\tthis.menuElements.forEach((menuEl) => {\r\n\t\t\tif(menuEl.parentNode){\r\n\t\t\t\tmenuEl.parentNode.removeChild(menuEl);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tdocument.body.removeEventListener(\"keydown\", this.escEvent);\r\n\t\tdocument.body.removeEventListener(\"click\", this.blurEvent);\r\n\t\tdocument.body.removeEventListener(\"contextmenu\", this.blurEvent);\r\n\t\twindow.removeEventListener(\"resize\", this.blurEvent);\r\n\t\tthis.table.rowManager.element.removeEventListener(\"scroll\", this.blurEvent);\r\n\t\tthis.unsubscribe(\"cell-editing\", this.blurEvent);\r\n\t\t\r\n\t\tif(this.currentComponent){\r\n\t\t\tthis.dispatchExternal(\"menuClosed\", this.currentComponent.getComponent());\r\n\t\t\tthis.currentComponent = null;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMenu.moduleName = \"menu\";\r\n\r\nexport default Menu;\r\n","export default {\r\n\tkeyBlock:function(e){\r\n\t\te.stopPropagation();\r\n\t\te.preventDefault();\r\n\t},\r\n\tscrollPageUp:function(e){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tnewPos = rowManager.scrollTop - rowManager.element.clientHeight,\r\n\t\tscrollMax = rowManager.element.scrollHeight;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\tif(newPos >= 0){\r\n\t\t\t\trowManager.element.scrollTop = newPos;\r\n\t\t\t}else{\r\n\t\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[0]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tscrollPageDown:function(e){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tnewPos = rowManager.scrollTop + rowManager.element.clientHeight,\r\n\t\tscrollMax = rowManager.element.scrollHeight;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\tif(newPos <= scrollMax){\r\n\t\t\t\trowManager.element.scrollTop = newPos;\r\n\t\t\t}else{\r\n\t\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\r\n\t},\r\n\tscrollToStart:function(e){\r\n\t\tvar rowManager = this.table.rowManager;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[0]);\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tscrollToEnd:function(e){\r\n\t\tvar rowManager = this.table.rowManager;\r\n\r\n\t\te.preventDefault();\r\n\r\n\t\tif(rowManager.displayRowsCount){\r\n\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]);\r\n\t\t}\r\n\r\n\t\tthis.table.element.focus();\r\n\t},\r\n\tnavPrev:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-prev\", e);\r\n\t},\r\n\r\n\tnavNext:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-next\", e);\r\n\t},\r\n\r\n\tnavLeft:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-left\", e);\r\n\t},\r\n\r\n\tnavRight:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-right\", e);\r\n\t},\r\n\r\n\tnavUp:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-up\", e);\r\n\t},\r\n\r\n\tnavDown:function(e){\r\n\t\tthis.dispatch(\"keybinding-nav-down\", e);\r\n\t},\r\n\r\n\tundo:function(e){\r\n\t\tvar cell = false;\r\n\t\tif(this.table.options.history && this.table.modExists(\"history\") && this.table.modExists(\"edit\")){\r\n\r\n\t\t\tcell = this.table.modules.edit.currentCell;\r\n\r\n\t\t\tif(!cell){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tthis.table.modules.history.undo();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tredo:function(e){\r\n\t\tvar cell = false;\r\n\t\tif(this.table.options.history && this.table.modExists(\"history\") && this.table.modExists(\"edit\")){\r\n\r\n\t\t\tcell = this.table.modules.edit.currentCell;\r\n\r\n\t\t\tif(!cell){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tthis.table.modules.history.redo();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tcopyToClipboard:function(e){\r\n\t\tif(!this.table.modules.edit.currentCell){\r\n\t\t\tif(this.table.modExists(\"clipboard\", true)){\r\n\t\t\t\tthis.table.modules.clipboard.copy(false, true);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass MoveColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.placeholderElement = this.createPlaceholderElement();\r\n\t\tthis.hoverElement = false; //floating column header element\r\n\t\tthis.checkTimeout = false; //click check timeout holder\r\n\t\tthis.checkPeriod = 250; //period to wait on mousedown to consider this a move and not a click\r\n\t\tthis.moving = false; //currently moving column\r\n\t\tthis.toCol = false; //destination column\r\n\t\tthis.toColAfter = false; //position of moving column relative to the desitnation column\r\n\t\tthis.startX = 0; //starting position within header element\r\n\t\tthis.autoScrollMargin = 40; //auto scroll on edge when within margin\r\n\t\tthis.autoScrollStep = 5; //auto scroll distance in pixels\r\n\t\tthis.autoScrollTimeout = false; //auto scroll timeout\r\n\t\tthis.touchMove = false;\r\n\t\t\r\n\t\tthis.moveHover = this.moveHover.bind(this);\r\n\t\tthis.endMove = this.endMove.bind(this);\r\n\t\t\r\n\t\tthis.registerTableOption(\"movableColumns\", false); //enable movable columns\r\n\t}\r\n\t\r\n\tcreatePlaceholderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-col\");\r\n\t\tel.classList.add(\"tabulator-col-placeholder\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.movableColumns){\r\n\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\tcolEl;\r\n\t\t\r\n\t\tif(!column.modules.frozen){\r\n\t\t\tcolEl = column.getElement();\r\n\t\t\t\r\n\t\t\tconfig.mousemove = function(e){\r\n\t\t\t\tif(column.parent === self.moving.parent){\r\n\t\t\t\t\tif((((self.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(colEl).left) + self.table.columnManager.element.scrollLeft) > (column.getWidth() / 2)){\r\n\t\t\t\t\t\tif(self.toCol !== column || !self.toColAfter){\r\n\t\t\t\t\t\t\tcolEl.parentNode.insertBefore(self.placeholderElement, colEl.nextSibling);\r\n\t\t\t\t\t\t\tself.moveColumn(column, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(self.toCol !== column || self.toColAfter){\r\n\t\t\t\t\t\t\tcolEl.parentNode.insertBefore(self.placeholderElement, colEl);\r\n\t\t\t\t\t\t\tself.moveColumn(column, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}.bind(self);\r\n\t\t\t\r\n\t\t\tcolEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tself.touchMove = false;\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, column);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tcolEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tself.bindTouchEvents(column);\r\n\t\t}\r\n\t\t\r\n\t\tcolumn.modules.moveColumn = config;\r\n\t}\r\n\t\r\n\tbindTouchEvents(column){\r\n\t\tvar colEl = column.getElement(),\r\n\t\tstartXMove = false, //shifting center position of the cell\r\n\t\tdir = false,\r\n\t\tcurrentCol, nextCol, prevCol, nextColWidth, prevColWidth, nextColWidthLast, prevColWidthLast;\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchstart\", (e) => {\r\n\t\t\tthis.checkTimeout = setTimeout(() => {\r\n\t\t\t\tthis.touchMove = true;\r\n\t\t\t\tcurrentCol = column;\r\n\t\t\t\tnextCol = column.nextColumn();\r\n\t\t\t\tnextColWidth = nextCol ? nextCol.getWidth()/2 : 0;\r\n\t\t\t\tprevCol = column.prevColumn();\r\n\t\t\t\tprevColWidth = prevCol ? prevCol.getWidth()/2 : 0;\r\n\t\t\t\tnextColWidthLast = 0;\r\n\t\t\t\tprevColWidthLast = 0;\r\n\t\t\t\tstartXMove = false;\r\n\t\t\t\t\r\n\t\t\t\tthis.startMove(e, column);\r\n\t\t\t}, this.checkPeriod);\r\n\t\t}, {passive: true});\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchmove\", (e) => {\r\n\t\t\tvar halfCol, diff, moveToCol;\r\n\t\t\t\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.moveHover(e);\r\n\t\t\t\t\r\n\t\t\t\tif(!startXMove){\r\n\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tdiff = e.touches[0].pageX - startXMove;\r\n\t\t\t\t\r\n\t\t\t\tif(diff > 0){\r\n\t\t\t\t\tif(nextCol && diff - nextColWidthLast > nextColWidth){\r\n\t\t\t\t\t\tmoveToCol = nextCol;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(moveToCol !== column){\r\n\t\t\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t\t\t\tmoveToCol.getElement().parentNode.insertBefore(this.placeholderElement, moveToCol.getElement().nextSibling);\r\n\t\t\t\t\t\t\tthis.moveColumn(moveToCol, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(prevCol && -diff - prevColWidthLast > prevColWidth){\r\n\t\t\t\t\t\tmoveToCol = prevCol;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(moveToCol !== column){\r\n\t\t\t\t\t\t\tstartXMove = e.touches[0].pageX;\r\n\t\t\t\t\t\t\tmoveToCol.getElement().parentNode.insertBefore(this.placeholderElement, moveToCol.getElement());\r\n\t\t\t\t\t\t\tthis.moveColumn(moveToCol, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(moveToCol){\r\n\t\t\t\t\tcurrentCol = moveToCol;\r\n\t\t\t\t\tnextCol = moveToCol.nextColumn();\r\n\t\t\t\t\tnextColWidthLast = nextColWidth;\r\n\t\t\t\t\tnextColWidth = nextCol ? nextCol.getWidth() / 2 : 0;\r\n\t\t\t\t\tprevCol = moveToCol.prevColumn();\r\n\t\t\t\t\tprevColWidthLast = prevColWidth;\r\n\t\t\t\t\tprevColWidth = prevCol ? prevCol.getWidth() / 2 : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}, {passive: true});\r\n\t\t\r\n\t\tcolEl.addEventListener(\"touchend\", (e) => {\r\n\t\t\tif(this.checkTimeout){\r\n\t\t\t\tclearTimeout(this.checkTimeout);\r\n\t\t\t}\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.endMove(e);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tstartMove(e, column){\r\n\t\tvar element = column.getElement(),\r\n\t\theaderElement = this.table.columnManager.getElement(),\r\n\t\theadersElement = this.table.columnManager.getHeadersElement();\r\n\t\t\r\n\t\tthis.moving = column;\r\n\t\tthis.startX = (this.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(element).left;\r\n\t\t\r\n\t\tthis.table.element.classList.add(\"tabulator-block-select\");\r\n\t\t\r\n\t\t//create placeholder\r\n\t\tthis.placeholderElement.style.width = column.getWidth() + \"px\";\r\n\t\tthis.placeholderElement.style.height = column.getHeight() + \"px\";\r\n\t\t\r\n\t\telement.parentNode.insertBefore(this.placeholderElement, element);\r\n\t\telement.parentNode.removeChild(element);\r\n\t\t\r\n\t\t//create hover element\r\n\t\tthis.hoverElement = element.cloneNode(true);\r\n\t\tthis.hoverElement.classList.add(\"tabulator-moving\");\r\n\t\t\r\n\t\tthis.table.columnManager.getElement().appendChild(this.hoverElement);\r\n\t\t\r\n\t\tthis.hoverElement.style.left = \"0\";\r\n\t\tthis.hoverElement.style.bottom = (headerElement.clientHeight - headersElement.offsetHeight) + \"px\";\r\n\t\t\r\n\t\tif(!this.touchMove){\r\n\t\t\tthis._bindMouseMove();\r\n\t\t\t\r\n\t\t\tdocument.body.addEventListener(\"mousemove\", this.moveHover);\r\n\t\t\tdocument.body.addEventListener(\"mouseup\", this.endMove);\r\n\t\t}\r\n\t\t\r\n\t\tthis.moveHover(e);\r\n\t}\r\n\t\r\n\t_bindMouseMove(){\r\n\t\tthis.table.columnManager.columnsByIndex.forEach(function(column){\r\n\t\t\tif(column.modules.moveColumn.mousemove){\r\n\t\t\t\tcolumn.getElement().addEventListener(\"mousemove\", column.modules.moveColumn.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t_unbindMouseMove(){\r\n\t\tthis.table.columnManager.columnsByIndex.forEach(function(column){\r\n\t\t\tif(column.modules.moveColumn.mousemove){\r\n\t\t\t\tcolumn.getElement().removeEventListener(\"mousemove\", column.modules.moveColumn.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tmoveColumn(column, after){\r\n\t\tvar movingCells = this.moving.getCells();\r\n\t\t\r\n\t\tthis.toCol = column;\r\n\t\tthis.toColAfter = after;\r\n\t\t\r\n\t\tif(after){\r\n\t\t\tcolumn.getCells().forEach(function(cell, i){\r\n\t\t\t\tvar cellEl = cell.getElement(true);\r\n\t\t\t\t\r\n\t\t\t\tif(cellEl.parentNode && movingCells[i]){\r\n\t\t\t\t\tcellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tcolumn.getCells().forEach(function(cell, i){\r\n\t\t\t\tvar cellEl = cell.getElement(true);\r\n\t\t\t\t\r\n\t\t\t\tif(cellEl.parentNode && movingCells[i]){\r\n\t\t\t\t\tcellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tendMove(e){\r\n\t\tif(e.which === 1 || this.touchMove){\r\n\t\t\tthis._unbindMouseMove();\r\n\t\t\t\r\n\t\t\tthis.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling);\r\n\t\t\tthis.placeholderElement.parentNode.removeChild(this.placeholderElement);\r\n\t\t\tthis.hoverElement.parentNode.removeChild(this.hoverElement);\r\n\t\t\t\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-block-select\");\r\n\t\t\t\r\n\t\t\tif(this.toCol){\r\n\t\t\t\tthis.table.columnManager.moveColumnActual(this.moving, this.toCol, this.toColAfter);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.moving = false;\r\n\t\t\tthis.toCol = false;\r\n\t\t\tthis.toColAfter = false;\r\n\t\t\t\r\n\t\t\tif(!this.touchMove){\r\n\t\t\t\tdocument.body.removeEventListener(\"mousemove\", this.moveHover);\r\n\t\t\t\tdocument.body.removeEventListener(\"mouseup\", this.endMove);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tmoveHover(e){\r\n\t\tvar columnHolder = this.table.columnManager.getElement(),\r\n\t\tscrollLeft = columnHolder.scrollLeft,\r\n\t\txPos = ((this.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(columnHolder).left) + scrollLeft,\r\n\t\tscrollPos;\r\n\t\t\r\n\t\tthis.hoverElement.style.left = (xPos - this.startX) + \"px\";\r\n\t\t\r\n\t\tif(xPos - scrollLeft < this.autoScrollMargin){\r\n\t\t\tif(!this.autoScrollTimeout){\r\n\t\t\t\tthis.autoScrollTimeout = setTimeout(() => {\r\n\t\t\t\t\tscrollPos = Math.max(0,scrollLeft-5);\r\n\t\t\t\t\tthis.table.rowManager.getElement().scrollLeft = scrollPos;\r\n\t\t\t\t\tthis.autoScrollTimeout = false;\r\n\t\t\t\t}, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(scrollLeft + columnHolder.clientWidth - xPos < this.autoScrollMargin){\r\n\t\t\tif(!this.autoScrollTimeout){\r\n\t\t\t\tthis.autoScrollTimeout = setTimeout(() => {\r\n\t\t\t\t\tscrollPos = Math.min(columnHolder.clientWidth, scrollLeft+5);\r\n\t\t\t\t\tthis.table.rowManager.getElement().scrollLeft = scrollPos;\r\n\t\t\t\t\tthis.autoScrollTimeout = false;\r\n\t\t\t\t}, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMoveColumns.moduleName = \"moveColumn\";\r\n\r\nexport default MoveColumns;\r\n","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nclass MoveRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.placeholderElement = this.createPlaceholderElement();\r\n\t\tthis.hoverElement = false; //floating row header element\r\n\t\tthis.checkTimeout = false; //click check timeout holder\r\n\t\tthis.checkPeriod = 150; //period to wait on mousedown to consider this a move and not a click\r\n\t\tthis.moving = false; //currently moving row\r\n\t\tthis.toRow = false; //destination row\r\n\t\tthis.toRowAfter = false; //position of moving row relative to the desitnation row\r\n\t\tthis.hasHandle = false; //row has handle instead of fully movable row\r\n\t\tthis.startY = 0; //starting Y position within header element\r\n\t\tthis.startX = 0; //starting X position within header element\r\n\r\n\t\tthis.moveHover = this.moveHover.bind(this);\r\n\t\tthis.endMove = this.endMove.bind(this);\r\n\t\tthis.tableRowDropEvent = false;\r\n\r\n\t\tthis.touchMove = false;\r\n\r\n\t\tthis.connection = false;\r\n\t\tthis.connectionSelectorsTables = false;\r\n\t\tthis.connectionSelectorsElements = false;\r\n\t\tthis.connectionElements = [];\r\n\t\tthis.connections = [];\r\n\r\n\t\tthis.connectedTable = false;\r\n\t\tthis.connectedRow = false;\r\n\r\n\t\tthis.registerTableOption(\"movableRows\", false); //enable movable rows\r\n\t\tthis.registerTableOption(\"movableRowsConnectedTables\", false); //tables for movable rows to be connected to\r\n\t\tthis.registerTableOption(\"movableRowsConnectedElements\", false); //other elements for movable rows to be connected to\r\n\t\tthis.registerTableOption(\"movableRowsSender\", false);\r\n\t\tthis.registerTableOption(\"movableRowsReceiver\", \"insert\");\r\n\r\n\t\tthis.registerColumnOption(\"rowHandle\");\r\n\t}\r\n\r\n\tcreatePlaceholderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\tel.classList.add(\"tabulator-row-placeholder\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.movableRows){\r\n\t\t\tthis.connectionSelectorsTables = this.table.options.movableRowsConnectedTables;\r\n\t\t\tthis.connectionSelectorsElements = this.table.options.movableRowsConnectedElements;\r\n\r\n\t\t\tthis.connection = this.connectionSelectorsTables || this.connectionSelectorsElements;\r\n\r\n\t\t\tthis.subscribe(\"cell-init\", this.initializeCell.bind(this));\r\n\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeGroupHeader(group){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\trowEl;\r\n\r\n\t\t//inter table drag drop\r\n\t\tconfig.mouseup = function(e){\r\n\t\t\tself.tableRowDrop(e, row);\r\n\t\t}.bind(self);\r\n\r\n\t\t//same table drag drop\r\n\t\tconfig.mousemove = function(e){\r\n\t\t\tif(((e.pageY - Helpers.elOffset(group.element).top) + self.table.rowManager.element.scrollTop) > (group.getHeight() / 2)){\r\n\t\t\t\tif(self.toRow !== group || !self.toRowAfter){\r\n\t\t\t\t\tvar rowEl = group.getElement();\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling);\r\n\t\t\t\t\tself.moveRow(group, true);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(self.toRow !== group || self.toRowAfter){\r\n\t\t\t\t\tvar rowEl = group.getElement();\r\n\t\t\t\t\tif(rowEl.previousSibling){\r\n\t\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl);\r\n\t\t\t\t\t\tself.moveRow(group, false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.bind(self);\r\n\r\n\t\tgroup.modules.moveRow = config;\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\tconfig = {},\r\n\t\trowEl;\r\n\r\n\t\t//inter table drag drop\r\n\t\tconfig.mouseup = function(e){\r\n\t\t\tself.tableRowDrop(e, row);\r\n\t\t}.bind(self);\r\n\r\n\t\t//same table drag drop\r\n\t\tconfig.mousemove = function(e){\r\n\t\t\tvar rowEl = row.getElement();\r\n\r\n\t\t\tif(((e.pageY - Helpers.elOffset(rowEl).top) + self.table.rowManager.element.scrollTop) > (row.getHeight() / 2)){\r\n\t\t\t\tif(self.toRow !== row || !self.toRowAfter){\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling);\r\n\t\t\t\t\tself.moveRow(row, true);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(self.toRow !== row || self.toRowAfter){\r\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl);\r\n\t\t\t\t\tself.moveRow(row, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.bind(self);\r\n\r\n\r\n\t\tif(!this.hasHandle){\r\n\r\n\t\t\trowEl = row.getElement();\r\n\r\n\t\t\trowEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, row);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\trowEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.bindTouchEvents(row, row.getElement());\r\n\t\t}\r\n\r\n\t\trow.modules.moveRow = config;\r\n\t}\r\n\r\n\tinitializeColumn(column){\r\n\t\tif(column.definition.rowHandle && this.table.options.movableRows !== false){\r\n\t\t\tthis.hasHandle = true;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeCell(cell){\r\n\t\tif(cell.column.definition.rowHandle && this.table.options.movableRows !== false){\r\n\t\t\tvar self = this,\r\n\t\t\tcellEl = cell.getElement(true);\r\n\r\n\t\t\tcellEl.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\r\n\t\t\t\t\t\tself.startMove(e, cell.row);\r\n\t\t\t\t\t}, self.checkPeriod);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tcellEl.addEventListener(\"mouseup\", function(e){\r\n\t\t\t\tif(e.which === 1){\r\n\t\t\t\t\tif(self.checkTimeout){\r\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.bindTouchEvents(cell.row, cellEl);\r\n\t\t}\r\n\t}\r\n\r\n\tbindTouchEvents(row, element){\r\n\t\tvar startYMove = false, //shifting center position of the cell\r\n\t\tdir = false,\r\n\t\tcurrentRow, nextRow, prevRow, nextRowHeight, prevRowHeight, nextRowHeightLast, prevRowHeightLast;\r\n\r\n\t\telement.addEventListener(\"touchstart\", (e) => {\r\n\t\t\tthis.checkTimeout = setTimeout(() => {\r\n\t\t\t\tthis.touchMove = true;\r\n\t\t\t\tcurrentRow = row;\r\n\t\t\t\tnextRow = row.nextRow();\r\n\t\t\t\tnextRowHeight = nextRow ? nextRow.getHeight()/2 : 0;\r\n\t\t\t\tprevRow = row.prevRow();\r\n\t\t\t\tprevRowHeight = prevRow ? prevRow.getHeight()/2 : 0;\r\n\t\t\t\tnextRowHeightLast = 0;\r\n\t\t\t\tprevRowHeightLast = 0;\r\n\t\t\t\tstartYMove = false;\r\n\r\n\t\t\t\tthis.startMove(e, row);\r\n\t\t\t}, this.checkPeriod);\r\n\t\t}, {passive: true});\r\n\t\tthis.moving, this.toRow, this.toRowAfter\r\n\t\telement.addEventListener(\"touchmove\", (e) => {\r\n\r\n\t\t\tvar halfCol, diff, moveToRow;\r\n\r\n\t\t\tif(this.moving){\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tthis.moveHover(e);\r\n\r\n\t\t\t\tif(!startYMove){\r\n\t\t\t\t\tstartYMove = e.touches[0].pageY;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdiff = e.touches[0].pageY - startYMove;\r\n\r\n\t\t\t\tif(diff > 0){\r\n\t\t\t\t\tif(nextRow && diff - nextRowHeightLast > nextRowHeight){\r\n\t\t\t\t\t\tmoveToRow = nextRow;\r\n\r\n\t\t\t\t\t\tif(moveToRow !== row){\r\n\t\t\t\t\t\t\tstartYMove = e.touches[0].pageY\r\n\t\t\t\t\t\t\tmoveToRow.getElement().parentNode.insertBefore(this.placeholderElement, moveToRow.getElement().nextSibling);\r\n\t\t\t\t\t\t\tthis.moveRow(moveToRow, true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(prevRow && -diff - prevRowHeightLast > prevRowHeight){\r\n\t\t\t\t\t\tmoveToRow = prevRow;\r\n\r\n\t\t\t\t\t\tif(moveToRow !== row){\r\n\t\t\t\t\t\t\tstartYMove = e.touches[0].pageY;\r\n\t\t\t\t\t\t\tmoveToRow.getElement().parentNode.insertBefore(this.placeholderElement, moveToRow.getElement());\r\n\t\t\t\t\t\t\tthis.moveRow(moveToRow, false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(moveToRow){\r\n\t\t\t\t\tcurrentRow = moveToRow;\r\n\t\t\t\t\tnextRow = moveToRow.nextRow();\r\n\t\t\t\t\tnextRowHeightLast = nextRowHeight;\r\n\t\t\t\t\tnextRowHeight = nextRow ? nextRow.getHeight() / 2 : 0;\r\n\t\t\t\t\tprevRow = moveToRow.prevRow();\r\n\t\t\t\t\tprevRowHeightLast = prevRowHeight;\r\n\t\t\t\t\tprevRowHeight = prevRow ? prevRow.getHeight() / 2 : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\telement.addEventListener(\"touchend\", (e) => {\r\n\t\t\tif(this.checkTimeout){\r\n\t\t\t\tclearTimeout(this.checkTimeout);\r\n\t\t\t}\r\n\t\t\tif(this.moving){\r\n\t\t\t\tthis.endMove(e);\r\n\t\t\t\tthis.touchMove = false;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t_bindMouseMove(){\r\n\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\tif((row.type === \"row\" || row.type === \"group\") && row.modules.moveRow && row.modules.moveRow.mousemove){\r\n\t\t\t\trow.getElement().addEventListener(\"mousemove\", row.modules.moveRow.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t_unbindMouseMove(){\r\n\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\tif((row.type === \"row\" || row.type === \"group\") && row.modules.moveRow && row.modules.moveRow.mousemove){\r\n\t\t\t\trow.getElement().removeEventListener(\"mousemove\", row.modules.moveRow.mousemove);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tstartMove(e, row){\r\n\t\tvar element = row.getElement();\r\n\r\n\t\tthis.setStartPosition(e, row);\r\n\r\n\t\tthis.moving = row;\r\n\r\n\t\tthis.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\t//create placeholder\r\n\t\tthis.placeholderElement.style.width = row.getWidth() + \"px\";\r\n\t\tthis.placeholderElement.style.height = row.getHeight() + \"px\";\r\n\r\n\t\tif(!this.connection){\r\n\t\t\telement.parentNode.insertBefore(this.placeholderElement, element);\r\n\t\t\telement.parentNode.removeChild(element);\r\n\t\t}else{\r\n\t\t\tthis.table.element.classList.add(\"tabulator-movingrow-sending\");\r\n\t\t\tthis.connectToTables(row);\r\n\t\t}\r\n\r\n\t\t//create hover element\r\n\t\tthis.hoverElement = element.cloneNode(true);\r\n\t\tthis.hoverElement.classList.add(\"tabulator-moving\");\r\n\r\n\t\tif(this.connection){\r\n\t\t\tdocument.body.appendChild(this.hoverElement);\r\n\t\t\tthis.hoverElement.style.left = \"0\";\r\n\t\t\tthis.hoverElement.style.top = \"0\";\r\n\t\t\tthis.hoverElement.style.width = this.table.element.clientWidth + \"px\";\r\n\t\t\tthis.hoverElement.style.whiteSpace = \"nowrap\";\r\n\t\t\tthis.hoverElement.style.overflow = \"hidden\";\r\n\t\t\tthis.hoverElement.style.pointerEvents = \"none\";\r\n\t\t}else{\r\n\t\t\tthis.table.rowManager.getTableElement().appendChild(this.hoverElement);\r\n\r\n\t\t\tthis.hoverElement.style.left = \"0\";\r\n\t\t\tthis.hoverElement.style.top = \"0\";\r\n\r\n\t\t\tthis._bindMouseMove();\r\n\t\t}\r\n\r\n\t\tdocument.body.addEventListener(\"mousemove\", this.moveHover);\r\n\t\tdocument.body.addEventListener(\"mouseup\", this.endMove);\r\n\r\n\t\tthis.dispatchExternal(\"rowMoving\", row.getComponent());\r\n\r\n\t\tthis.moveHover(e);\r\n\t}\r\n\r\n\tsetStartPosition(e, row){\r\n\t\tvar pageX = this.touchMove ? e.touches[0].pageX : e.pageX,\r\n\t\tpageY = this.touchMove ? e.touches[0].pageY : e.pageY,\r\n\t\telement, position;\r\n\r\n\t\telement = row.getElement();\r\n\t\tif(this.connection){\r\n\t\t\tposition = element.getBoundingClientRect();\r\n\r\n\t\t\tthis.startX = position.left - pageX + window.pageXOffset;\r\n\t\t\tthis.startY = position.top - pageY + window.pageYOffset;\r\n\t\t}else{\r\n\t\t\tthis.startY = (pageY - element.getBoundingClientRect().top);\r\n\t\t}\r\n\t}\r\n\r\n\tendMove(e){\r\n\t\tif(!e || e.which === 1 || this.touchMove){\r\n\t\t\tthis._unbindMouseMove();\r\n\r\n\t\t\tif(!this.connection){\r\n\t\t\t\tthis.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling);\r\n\t\t\t\tthis.placeholderElement.parentNode.removeChild(this.placeholderElement);\r\n\t\t\t}\r\n\r\n\t\t\tthis.hoverElement.parentNode.removeChild(this.hoverElement);\r\n\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tif(this.toRow){\r\n\t\t\t\tthis.table.rowManager.moveRow(this.moving, this.toRow, this.toRowAfter);\r\n\t\t\t}else{\r\n\t\t\t\tthis.dispatchExternal(\"rowMoveCancelled\", this.moving.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tthis.moving = false;\r\n\t\t\tthis.toRow = false;\r\n\t\t\tthis.toRowAfter = false;\r\n\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", this.moveHover);\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", this.endMove);\r\n\r\n\t\t\tif(this.connection){\r\n\t\t\t\tthis.table.element.classList.remove(\"tabulator-movingrow-sending\");\r\n\t\t\t\tthis.disconnectFromTables();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tmoveRow(row, after){\r\n\t\tthis.toRow = row;\r\n\t\tthis.toRowAfter = after;\r\n\t}\r\n\r\n\tmoveHover(e){\r\n\t\tif(this.connection){\r\n\t\t\tthis.moveHoverConnections.call(this, e);\r\n\t\t}else{\r\n\t\t\tthis.moveHoverTable.call(this, e);\r\n\t\t}\r\n\t}\r\n\r\n\tmoveHoverTable(e){\r\n\t\tvar rowHolder = this.table.rowManager.getElement(),\r\n\t\tscrollTop = rowHolder.scrollTop,\r\n\t\tyPos = ((this.touchMove ? e.touches[0].pageY : e.pageY) - rowHolder.getBoundingClientRect().top) + scrollTop,\r\n\t\tscrollPos;\r\n\r\n\t\tthis.hoverElement.style.top = (yPos - this.startY) + \"px\";\r\n\t}\r\n\r\n\tmoveHoverConnections(e){\r\n\t\tthis.hoverElement.style.left = (this.startX + (this.touchMove ? e.touches[0].pageX : e.pageX)) + \"px\";\r\n\t\tthis.hoverElement.style.top = (this.startY + (this.touchMove ? e.touches[0].pageY : e.pageY)) + \"px\";\r\n\t}\r\n\r\n\telementRowDrop(e, element, row){\r\n\t\tthis.dispatchExternal(\"movableRowsElementDrop\", e, element, row ? row.getComponent() : false);\r\n\t}\r\n\r\n\t//establish connection with other tables\r\n\tconnectToTables(row){\r\n\t\tvar connectionTables;\r\n\r\n\t\tif(this.connectionSelectorsTables){\r\n\t\t\tconnectionTables = this.commsConnections(this.connectionSelectorsTables);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSendingStart\", connectionTables);\r\n\r\n\t\t\tthis.commsSend(this.connectionSelectorsTables, \"moveRow\", \"connect\", {\r\n\t\t\t\trow:row,\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.connectionSelectorsElements){\r\n\r\n\t\t\tthis.connectionElements = [];\r\n\r\n\t\t\tif(!Array.isArray(this.connectionSelectorsElements)){\r\n\t\t\t\tthis.connectionSelectorsElements = [this.connectionSelectorsElements];\r\n\t\t\t}\r\n\r\n\t\t\tthis.connectionSelectorsElements.forEach((query) => {\r\n\t\t\t\tif(typeof query === \"string\"){\r\n\t\t\t\t\tthis.connectionElements = this.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(query)));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.connectionElements.push(query);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.connectionElements.forEach((element) => {\r\n\t\t\t\tvar dropEvent = (e) => {\r\n\t\t\t\t\tthis.elementRowDrop(e, element, this.moving);\r\n\t\t\t\t};\r\n\r\n\t\t\t\telement.addEventListener(\"mouseup\", dropEvent);\r\n\t\t\t\telement.tabulatorElementDropEvent = dropEvent;\r\n\r\n\t\t\t\telement.classList.add(\"tabulator-movingrow-receiving\");\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t//disconnect from other tables\r\n\tdisconnectFromTables(){\r\n\t\tvar connectionTables;\r\n\r\n\t\tif(this.connectionSelectorsTables){\r\n\t\t\tconnectionTables = this.commsConnections(this.connectionSelectorsTables);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSendingStop\", connectionTables);\r\n\r\n\t\t\tthis.commsSend(this.connectionSelectorsTables, \"moveRow\", \"disconnect\");\r\n\t\t}\r\n\r\n\t\tthis.connectionElements.forEach((element) => {\r\n\t\t\telement.classList.remove(\"tabulator-movingrow-receiving\");\r\n\t\t\telement.removeEventListener(\"mouseup\", element.tabulatorElementDropEvent);\r\n\t\t\tdelete element.tabulatorElementDropEvent;\r\n\t\t});\r\n\t}\r\n\r\n\t//accept incomming connection\r\n\tconnect(table, row){\r\n\t\tif(!this.connectedTable){\r\n\t\t\tthis.connectedTable = table;\r\n\t\t\tthis.connectedRow = row;\r\n\r\n\t\t\tthis.table.element.classList.add(\"tabulator-movingrow-receiving\");\r\n\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\r\n\t\t\t\tif(row.type === \"row\" && row.modules.moveRow && row.modules.moveRow.mouseup){\r\n\t\t\t\t\trow.getElement().addEventListener(\"mouseup\", row.modules.moveRow.mouseup);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.tableRowDropEvent = this.tableRowDrop.bind(this);\r\n\r\n\t\t\tthis.table.element.addEventListener(\"mouseup\", this.tableRowDropEvent);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivingStart\", row, table);\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Row Error - Table cannot accept connection, already connected to table:\", this.connectedTable);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//close incomming connection\r\n\tdisconnect(table){\r\n\t\tif(table === this.connectedTable){\r\n\t\t\tthis.connectedTable = false;\r\n\t\t\tthis.connectedRow = false;\r\n\r\n\t\t\tthis.table.element.classList.remove(\"tabulator-movingrow-receiving\");\r\n\r\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) =>{\r\n\t\t\t\tif(row.type === \"row\" && row.modules.moveRow && row.modules.moveRow.mouseup){\r\n\t\t\t\t\trow.getElement().removeEventListener(\"mouseup\", row.modules.moveRow.mouseup);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.table.element.removeEventListener(\"mouseup\", this.tableRowDropEvent);\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivingStop\", table);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Row Error - trying to disconnect from non connected table\")\r\n\t\t}\r\n\t}\r\n\r\n\tdropComplete(table, row, success){\r\n\t\tvar sender = false;\r\n\r\n\t\tif(success){\r\n\r\n\t\t\tswitch(typeof this.table.options.movableRowsSender){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tsender = this.senders[this.table.options.movableRowsSender];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\tsender = this.table.options.movableRowsSender;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(sender){\r\n\t\t\t\tsender.call(this, this.moving.getComponent(), row ? row.getComponent() : undefined, table)\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.options.movableRowsSender){\r\n\t\t\t\t\tconsole.warn(\"Mover Row Error - no matching sender found:\", this.table.options.movableRowsSender);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.dispatchExternal(\"movableRowsSent\", this.moving.getComponent(), row ? row.getComponent() : undefined, table);\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"movableRowsSentFailed\", this.moving.getComponent(), row ? row.getComponent() : undefined, table);\r\n\t\t}\r\n\r\n\t\tthis.endMove();\r\n\t}\r\n\r\n\ttableRowDrop(e, row){\r\n\t\tvar receiver = false,\r\n\t\tsuccess = false;\r\n\r\n\t\te.stopImmediatePropagation();\r\n\r\n\t\tswitch(typeof this.table.options.movableRowsReceiver){\r\n\t\t\tcase \"string\":\r\n\t\t\treceiver = this.receivers[this.table.options.movableRowsReceiver];\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\treceiver = this.table.options.movableRowsReceiver;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(receiver){\r\n\t\t\tsuccess = receiver.call(this, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Mover Row Error - no matching receiver found:\", this.table.options.movableRowsReceiver)\r\n\t\t}\r\n\r\n\t\tif(success){\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceived\", this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable);\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"movableRowsReceivedFailed\", this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable);\r\n\t\t}\r\n\r\n\t\tthis.commsSend(this.connectedTable, \"moveRow\", \"dropcomplete\", {\r\n\t\t\trow:row,\r\n\t\t\tsuccess:success,\r\n\t\t});\r\n\t}\r\n\r\n\tcommsReceived(table, action, data){\r\n\t\tswitch(action){\r\n\t\t\tcase \"connect\":\r\n\t\t\treturn this.connect(table, data.row);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"disconnect\":\r\n\t\t\treturn this.disconnect(table);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"dropcomplete\":\r\n\t\t\treturn this.dropComplete(table, data.row, data.success);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nMoveRows.prototype.receivers = {\r\n\tinsert:function(fromRow, toRow, fromTable){\r\n\t\tthis.table.addRow(fromRow.getData(), undefined, toRow);\r\n\t\treturn true;\r\n\t},\r\n\r\n\tadd:function(fromRow, toRow, fromTable){\r\n\t\tthis.table.addRow(fromRow.getData());\r\n\t\treturn true;\r\n\t},\r\n\r\n\tupdate:function(fromRow, toRow, fromTable){\r\n\t\tif(toRow){\r\n\t\t\ttoRow.update(fromRow.getData());\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\r\n\treplace:function(fromRow, toRow, fromTable){\r\n\t\tif(toRow){\r\n\t\t\tthis.table.addRow(fromRow.getData(), undefined, toRow);\r\n\t\t\ttoRow.delete();\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n};\r\n\r\nMoveRows.prototype.senders = {\r\n\tdelete:function(fromRow, toRow, toTable){\r\n\t\tfromRow.delete();\r\n\t}\r\n};\r\n\r\nMoveRows.moduleName = \"moveRow\";\r\n\r\nexport default MoveRows;","export default {};","import Module from '../../core/Module.js';\r\n\r\nimport defaultMutators from './defaults/mutators.js';\r\n\r\nclass Mutator extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.allowedTypes = [\"\", \"data\", \"edit\", \"clipboard\"]; //list of muatation types\r\n\t\tthis.enabled = true;\r\n\r\n\t\tthis.registerColumnOption(\"mutator\");\r\n\t\tthis.registerColumnOption(\"mutatorParams\");\r\n\t\tthis.registerColumnOption(\"mutatorData\");\r\n\t\tthis.registerColumnOption(\"mutatorDataParams\");\r\n\t\tthis.registerColumnOption(\"mutatorEdit\");\r\n\t\tthis.registerColumnOption(\"mutatorEditParams\");\r\n\t\tthis.registerColumnOption(\"mutatorClipboard\");\r\n\t\tthis.registerColumnOption(\"mutatorClipboardParams\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-value-changing\", this.transformCell.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\tthis.subscribe(\"row-data-init-before\", this.rowDataChanged.bind(this));\r\n\t\tthis.subscribe(\"row-data-changing\", this.rowDataChanged.bind(this));\r\n\t}\r\n\r\n\trowDataChanged(row, tempData, updatedData){\r\n\t\treturn this.transformRow(tempData, \"data\", updatedData);\r\n\t}\r\n\r\n\t//initialize column mutator\r\n\tinitializeColumn(column){\r\n\t\tvar match = false,\r\n\t\tconfig = {};\r\n\r\n\t\tthis.allowedTypes.forEach((type) => {\r\n\t\t\tvar key = \"mutator\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\t\tmutator;\r\n\r\n\t\t\tif(column.definition[key]){\r\n\t\t\t\tmutator = this.lookupMutator(column.definition[key]);\r\n\r\n\t\t\t\tif(mutator){\r\n\t\t\t\t\tmatch = true;\r\n\r\n\t\t\t\t\tconfig[key] = {\r\n\t\t\t\t\t\tmutator:mutator,\r\n\t\t\t\t\t\tparams: column.definition[key + \"Params\"] || {},\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(match){\r\n\t\t\tcolumn.modules.mutate = config;\r\n\t\t}\r\n\t}\r\n\r\n\tlookupMutator(value){\r\n\t\tvar mutator = false;\r\n\r\n\t\t//set column mutator\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Mutator.mutators[value]){\r\n\t\t\t\tmutator = Mutator.mutators[value];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Mutator Error - No such mutator found, ignoring: \", value);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tmutator = value;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn mutator;\r\n\t}\r\n\r\n\t//apply mutator to row\r\n\ttransformRow(data, type, updatedData){\r\n\t\tvar key = \"mutator\" + (type.charAt(0).toUpperCase() + type.slice(1)),\r\n\t\tvalue;\r\n\r\n\t\tif(this.enabled){\r\n\r\n\t\t\tthis.table.columnManager.traverse((column) => {\r\n\t\t\t\tvar mutator, params, component;\r\n\r\n\t\t\t\tif(column.modules.mutate){\r\n\t\t\t\t\tmutator = column.modules.mutate[key] || column.modules.mutate.mutator || false;\r\n\r\n\t\t\t\t\tif(mutator){\r\n\t\t\t\t\t\tvalue = column.getFieldValue(typeof updatedData !== \"undefined\" ? updatedData : data);\r\n\r\n\t\t\t\t\t\tif(type == \"data\" || typeof value !== \"undefined\"){\r\n\t\t\t\t\t\t\tcomponent = column.getComponent();\r\n\t\t\t\t\t\t\tparams = typeof mutator.params === \"function\" ? mutator.params(value, data, type, component) : mutator.params;\r\n\t\t\t\t\t\t\tcolumn.setFieldValue(data, mutator.mutator(value, data, type, params, component));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//apply mutator to new cell value\r\n\ttransformCell(cell, value){\r\n\t\tif(cell.column.modules.mutate){\r\n\t\t\tvar mutator = cell.column.modules.mutate.mutatorEdit || cell.column.modules.mutate.mutator || false,\r\n\t\t\ttempData = {};\r\n\r\n\t\t\tif(mutator){\r\n\t\t\t\ttempData = Object.assign(tempData, cell.row.getData());\r\n\t\t\t\tcell.column.setFieldValue(tempData, value);\r\n\t\t\t\treturn mutator.mutator(value, tempData, \"edit\", mutator.params, cell.getComponent());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\tenable(){\r\n\t\tthis.enabled = true;\r\n\t}\r\n\r\n\tdisable(){\r\n\t\tthis.enabled = false;\r\n\t}\r\n}\r\n\r\nMutator.moduleName = \"mutator\";\r\n\r\n//load defaults\r\nMutator.mutators = defaultMutators;\r\n\r\nexport default Mutator;","export default function(pageSize, currentRow, currentPage, totalRows, totalPages){\r\n\tvar el = document.createElement(\"span\"),\r\n\tshowingEl = document.createElement(\"span\"),\r\n\tvalueEl = document.createElement(\"span\"),\r\n\tofEl = document.createElement(\"span\"),\r\n\ttotalEl = document.createElement(\"span\"),\r\n\trowsEl = document.createElement(\"span\");\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|showing\", (value) => {\r\n\t\tshowingEl.innerHTML = value;\r\n\t});\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|of\", (value) => {\r\n\t\tofEl.innerHTML = value;\r\n\t});\r\n\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|rows\", (value) => {\r\n\t\trowsEl.innerHTML = value;\r\n\t});\r\n\r\n\tif(totalRows){\r\n\t\tvalueEl.innerHTML = \" \" + currentRow + \"-\" + Math.min((currentRow + pageSize - 1), totalRows) + \" \";\r\n\t\t\r\n\t\ttotalEl.innerHTML = \" \" + totalRows + \" \";\r\n\t\t\r\n\t\tel.appendChild(showingEl);\r\n\t\tel.appendChild(valueEl);\r\n\t\tel.appendChild(ofEl);\r\n\t\tel.appendChild(totalEl);\r\n\t\tel.appendChild(rowsEl);\r\n\t}else{\r\n\t\tvalueEl.innerHTML = \" 0 \";\r\n\r\n\t\tel.appendChild(showingEl);\r\n\t\tel.appendChild(valueEl);\r\n\t\tel.appendChild(rowsEl);\r\n\t}\r\n\t\r\n\treturn el;\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultPageCounters from './defaults/pageCounters.js';\r\n\r\nclass Page extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.mode = \"local\";\r\n\t\tthis.progressiveLoad = false;\r\n\t\t\r\n\t\tthis.element = null;\r\n\t\tthis.pageCounterElement = null;\r\n\t\tthis.pageCounter = null;\r\n\t\t\r\n\t\tthis.size = 0;\r\n\t\tthis.page = 1;\r\n\t\tthis.count = 5;\r\n\t\tthis.max = 1;\r\n\r\n\t\tthis.remoteRowCountEstimate = null;\r\n\t\t\r\n\t\tthis.displayIndex = 0; //index in display pipeline\r\n\t\t\r\n\t\tthis.initialLoad = true;\r\n\t\tthis.dataChanging = false; //flag to check if data is being changed by this module\r\n\t\t\r\n\t\tthis.pageSizes = [];\r\n\t\t\r\n\t\tthis.registerTableOption(\"pagination\", false); //set pagination type\r\n\t\tthis.registerTableOption(\"paginationMode\", \"local\"); //local or remote pagination\r\n\t\tthis.registerTableOption(\"paginationSize\", false); //set number of rows to a page\r\n\t\tthis.registerTableOption(\"paginationInitialPage\", 1); //initial page to show on load\r\n\t\tthis.registerTableOption(\"paginationCounter\", false); // set pagination counter\r\n\t\tthis.registerTableOption(\"paginationCounterElement\", false); // set pagination counter\r\n\t\tthis.registerTableOption(\"paginationButtonCount\", 5); // set count of page button\r\n\t\tthis.registerTableOption(\"paginationSizeSelector\", false); //add pagination size selector element\r\n\t\tthis.registerTableOption(\"paginationElement\", false); //element to hold pagination numbers\r\n\t\t// this.registerTableOption(\"paginationDataSent\", {}); //pagination data sent to the server\r\n\t\t// this.registerTableOption(\"paginationDataReceived\", {}); //pagination data received from the server\r\n\t\tthis.registerTableOption(\"paginationAddRow\", \"page\"); //add rows on table or page\r\n\t\t\r\n\t\tthis.registerTableOption(\"progressiveLoad\", false); //progressive loading\r\n\t\tthis.registerTableOption(\"progressiveLoadDelay\", 0); //delay between requests\r\n\t\tthis.registerTableOption(\"progressiveLoadScrollMargin\", 0); //margin before scroll begins\r\n\t\t\r\n\t\tthis.registerTableFunction(\"setMaxPage\", this.setMaxPage.bind(this));\r\n\t\tthis.registerTableFunction(\"setPage\", this.setPage.bind(this));\r\n\t\tthis.registerTableFunction(\"setPageToRow\", this.userSetPageToRow.bind(this));\r\n\t\tthis.registerTableFunction(\"setPageSize\", this.userSetPageSize.bind(this));\r\n\t\tthis.registerTableFunction(\"getPageSize\", this.getPageSize.bind(this));\r\n\t\tthis.registerTableFunction(\"previousPage\", this.previousPage.bind(this));\r\n\t\tthis.registerTableFunction(\"nextPage\", this.nextPage.bind(this));\r\n\t\tthis.registerTableFunction(\"getPage\", this.getPage.bind(this));\r\n\t\tthis.registerTableFunction(\"getPageMax\", this.getPageMax.bind(this));\r\n\t\t\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"pageTo\", this.setPageToRow.bind(this));\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"row-added\", this.rowsUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"data-processed\", this.initialLoadComplete.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.calculatePageSizes.bind(this));\r\n\r\n\t\t\tif(this.table.options.paginationAddRow == \"page\"){\r\n\t\t\t\tthis.subscribe(\"row-adding-position\", this.rowAddingPosition.bind(this));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.options.paginationMode === \"remote\"){\r\n\t\t\t\tthis.subscribe(\"data-params\", this.remotePageParams.bind(this));\r\n\t\t\t\tthis.subscribe(\"data-loaded\", this._parseRemoteData.bind(this));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.table.options.progressiveLoad){\r\n\t\t\t\tconsole.error(\"Progressive Load Error - Pagination and progressive load cannot be used at the same time\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.registerDisplayHandler(this.restOnRenderBefore.bind(this), 40);\r\n\t\t\tthis.registerDisplayHandler(this.getRows.bind(this), 50);\r\n\t\t\t\r\n\t\t\tthis.createElements();\r\n\t\t\tthis.initializePageCounter();\r\n\t\t\tthis.initializePaginator();\r\n\t\t}else if(this.table.options.progressiveLoad){\r\n\t\t\tthis.subscribe(\"data-params\", this.remotePageParams.bind(this));\r\n\t\t\tthis.subscribe(\"data-loaded\", this._parseRemoteData.bind(this));\r\n\t\t\tthis.subscribe(\"table-built\", this.calculatePageSizes.bind(this));\r\n\t\t\tthis.subscribe(\"data-processed\", this.initialLoadComplete.bind(this));\r\n\t\t\t\r\n\t\t\tthis.initializeProgressive(this.table.options.progressiveLoad)\r\n\t\t\t\r\n\t\t\tif(this.table.options.progressiveLoad === \"scroll\"){\r\n\t\t\t\tthis.subscribe(\"scroll-vertical\", this.scrollVertical.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trowAddingPosition(row, top){\r\n\t\tvar rowManager = this.table.rowManager,\r\n\t\tdispRows = rowManager.getDisplayRows(),\r\n\t\tindex;\r\n\t\t\r\n\t\tif(top){\r\n\t\t\tif(dispRows.length){\r\n\t\t\t\tindex = dispRows[0];\r\n\t\t\t}else{\r\n\t\t\t\tif(rowManager.activeRows.length){\r\n\t\t\t\t\tindex = rowManager.activeRows[rowManager.activeRows.length-1];\r\n\t\t\t\t\ttop = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(dispRows.length){\r\n\t\t\t\tindex = dispRows[dispRows.length - 1];\r\n\t\t\t\ttop = dispRows.length < this.size ? false : true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn {index, top}\r\n\t}\r\n\t\r\n\tcalculatePageSizes(){\r\n\t\tvar testElRow, testElCell;\r\n\t\t\r\n\t\tif(this.table.options.paginationSize){\r\n\t\t\tthis.size = this.table.options.paginationSize;\r\n\t\t}else{\r\n\t\t\ttestElRow = document.createElement(\"div\");\r\n\t\t\ttestElRow.classList.add(\"tabulator-row\");\r\n\t\t\ttestElRow.style.visibility = \"hidden\";\r\n\t\t\t\r\n\t\t\ttestElCell = document.createElement(\"div\");\r\n\t\t\ttestElCell.classList.add(\"tabulator-cell\");\r\n\t\t\ttestElCell.innerHTML = \"Page Row Test\";\r\n\t\t\t\r\n\t\t\ttestElRow.appendChild(testElCell);\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getTableElement().appendChild(testElRow);\r\n\t\t\t\r\n\t\t\tthis.size = Math.floor(this.table.rowManager.getElement().clientHeight / testElRow.offsetHeight);\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.getTableElement().removeChild(testElRow);\r\n\t\t}\r\n\t\t\r\n\t\tthis.generatePageSizeSelectList();\r\n\t}\r\n\t\r\n\tinitialLoadComplete(){\r\n\t\tthis.initialLoad = false;\r\n\t}\r\n\t\r\n\tremotePageParams(data, config, silent, params){\r\n\t\tif(!this.initialLoad){\r\n\t\t\tif((this.progressiveLoad && !silent) || (!this.progressiveLoad && !this.dataChanging)){\r\n\t\t\t\tthis.reset(true);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//configure request params\r\n\t\tparams.page = this.page;\r\n\t\t\r\n\t\t//set page size if defined\r\n\t\tif(this.size){\r\n\t\t\tparams.size = this.size;\r\n\t\t}\r\n\t\t\r\n\t\treturn params;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\tuserSetPageToRow(row){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\trow = this.rowManager.findRow(row);\r\n\t\t\t\r\n\t\t\tif(row){\r\n\t\t\t\treturn this.setPageToRow(row)\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn Promise.reject();\r\n\t}\r\n\t\r\n\tuserSetPageSize(size){\r\n\t\tif(this.table.options.pagination){\r\n\t\t\tthis.setPageSize(size);\r\n\t\t\treturn this.setPage(1);\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\r\n\tscrollVertical(top, dir){\r\n\t\tvar element, diff, margin;\r\n\t\tif(!dir && !this.table.dataLoader.loading){\r\n\t\t\telement = this.table.rowManager.getElement();\r\n\t\t\tdiff = element.scrollHeight - element.clientHeight - top;\r\n\t\t\tmargin = this.table.options.progressiveLoadScrollMargin || (element.clientHeight * 2);\r\n\t\t\t\r\n\t\t\tif(diff < margin){\r\n\t\t\t\tthis.nextPage()\r\n\t\t\t\t.catch(() => {}); //consume the exception thrown when on the last page\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trestOnRenderBefore(rows, renderInPosition){\r\n\t\tif(!renderInPosition){\r\n\t\t\tif(this.mode === \"local\"){\r\n\t\t\t\tthis.reset();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\trowsUpdated(){\r\n\t\tthis.refreshData(true, \"all\");\r\n\t}\r\n\t\r\n\tcreateElements(){\r\n\t\tvar button;\r\n\t\t\r\n\t\tthis.element = document.createElement(\"span\");\r\n\t\tthis.element.classList.add(\"tabulator-paginator\");\r\n\t\t\r\n\t\tthis.pagesElement = document.createElement(\"span\");\r\n\t\tthis.pagesElement.classList.add(\"tabulator-pages\");\r\n\t\t\r\n\t\tbutton = document.createElement(\"button\");\r\n\t\tbutton.classList.add(\"tabulator-page\");\r\n\t\tbutton.setAttribute(\"type\", \"button\");\r\n\t\tbutton.setAttribute(\"role\", \"button\");\r\n\t\tbutton.setAttribute(\"aria-label\", \"\");\r\n\t\tbutton.setAttribute(\"title\", \"\");\r\n\t\t\r\n\t\tthis.firstBut = button.cloneNode(true);\r\n\t\tthis.firstBut.setAttribute(\"data-page\", \"first\");\r\n\t\t\r\n\t\tthis.prevBut = button.cloneNode(true);\r\n\t\tthis.prevBut.setAttribute(\"data-page\", \"prev\");\r\n\t\t\r\n\t\tthis.nextBut = button.cloneNode(true);\r\n\t\tthis.nextBut.setAttribute(\"data-page\", \"next\");\r\n\t\t\r\n\t\tthis.lastBut = button.cloneNode(true);\r\n\t\tthis.lastBut.setAttribute(\"data-page\", \"last\");\r\n\t\t\r\n\t\tif(this.table.options.paginationSizeSelector){\r\n\t\t\tthis.pageSizeSelect = document.createElement(\"select\");\r\n\t\t\tthis.pageSizeSelect.classList.add(\"tabulator-page-size\");\r\n\t\t}\r\n\t}\r\n\t\r\n\tgeneratePageSizeSelectList(){\r\n\t\tvar pageSizes = [];\r\n\t\t\r\n\t\tif(this.pageSizeSelect){\r\n\t\t\t\r\n\t\t\tif(Array.isArray(this.table.options.paginationSizeSelector)){\r\n\t\t\t\tpageSizes = this.table.options.paginationSizeSelector;\r\n\t\t\t\tthis.pageSizes = pageSizes;\r\n\t\t\t\t\r\n\t\t\t\tif(this.pageSizes.indexOf(this.size) == -1){\r\n\t\t\t\t\tpageSizes.unshift(this.size);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t\r\n\t\t\t\tif(this.pageSizes.indexOf(this.size) == -1){\r\n\t\t\t\t\tpageSizes = [];\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (let i = 1; i < 5; i++){\r\n\t\t\t\t\t\tpageSizes.push(this.size * i);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.pageSizes = pageSizes;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tpageSizes = this.pageSizes;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\twhile(this.pageSizeSelect.firstChild) this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);\r\n\t\t\t\r\n\t\t\tpageSizes.forEach((item) => {\r\n\t\t\t\tvar itemEl = document.createElement(\"option\");\r\n\t\t\t\titemEl.value = item;\r\n\t\t\t\t\r\n\t\t\t\tif(item === true){\r\n\t\t\t\t\tthis.langBind(\"pagination|all\", function(value){\r\n\t\t\t\t\t\titemEl.innerHTML = value;\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\titemEl.innerHTML = item;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tthis.pageSizeSelect.appendChild(itemEl);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.pageSizeSelect.value = this.size;\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializePageCounter(){\r\n\t\tvar counter = this.table.options.paginationCounter,\r\n\t\tpageCounter = null;\r\n\t\t\r\n\t\tif(counter){\r\n\t\t\tif(typeof counter === \"function\"){\r\n\t\t\t\tpageCounter = counter;\r\n\t\t\t}else{\r\n\t\t\t\tpageCounter = Page.pageCounters[counter];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(pageCounter){\r\n\t\t\t\tthis.pageCounter = pageCounter;\r\n\t\t\t\t\r\n\t\t\t\tthis.pageCounterElement = document.createElement(\"span\");\r\n\t\t\t\tthis.pageCounterElement.classList.add(\"tabulator-page-counter\");\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Pagination Error - No such page counter found: \", counter);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//setup pagination\r\n\tinitializePaginator(hidden){\r\n\t\tvar pageSelectLabel, paginationCounterHolder;\r\n\t\t\r\n\t\tif(!hidden){\r\n\t\t\t//build pagination element\r\n\t\t\t\r\n\t\t\t//bind localizations\r\n\t\t\tthis.langBind(\"pagination|first\", (value) => {\r\n\t\t\t\tthis.firstBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|first_title\", (value) => {\r\n\t\t\t\tthis.firstBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.firstBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|prev\", (value) => {\r\n\t\t\t\tthis.prevBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|prev_title\", (value) => {\r\n\t\t\t\tthis.prevBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.prevBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|next\", (value) => {\r\n\t\t\t\tthis.nextBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|next_title\", (value) => {\r\n\t\t\t\tthis.nextBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.nextBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|last\", (value) => {\r\n\t\t\t\tthis.lastBut.innerHTML = value;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.langBind(\"pagination|last_title\", (value) => {\r\n\t\t\t\tthis.lastBut.setAttribute(\"aria-label\", value);\r\n\t\t\t\tthis.lastBut.setAttribute(\"title\", value);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t//click bindings\r\n\t\t\tthis.firstBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.setPage(1)\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.prevBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.previousPage()\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.nextBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.nextPage()\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.lastBut.addEventListener(\"click\", () => {\r\n\t\t\t\tthis.setPage(this.max)\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(this.table.options.paginationElement){\r\n\t\t\t\tthis.element = this.table.options.paginationElement;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.pageSizeSelect){\r\n\t\t\t\tpageSelectLabel = document.createElement(\"label\");\r\n\t\t\t\t\r\n\t\t\t\tthis.langBind(\"pagination|page_size\", (value) => {\r\n\t\t\t\t\tthis.pageSizeSelect.setAttribute(\"aria-label\", value);\r\n\t\t\t\t\tthis.pageSizeSelect.setAttribute(\"title\", value);\r\n\t\t\t\t\tpageSelectLabel.innerHTML = value;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.element.appendChild(pageSelectLabel);\r\n\t\t\t\tthis.element.appendChild(this.pageSizeSelect);\r\n\t\t\t\t\r\n\t\t\t\tthis.pageSizeSelect.addEventListener(\"change\", (e) => {\r\n\t\t\t\t\tthis.setPageSize(this.pageSizeSelect.value == \"true\" ? true : this.pageSizeSelect.value);\r\n\t\t\t\t\tthis.setPage(1)\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//append to DOM\r\n\t\t\tthis.element.appendChild(this.firstBut);\r\n\t\t\tthis.element.appendChild(this.prevBut);\r\n\t\t\tthis.element.appendChild(this.pagesElement);\r\n\t\t\tthis.element.appendChild(this.nextBut);\r\n\t\t\tthis.element.appendChild(this.lastBut);\r\n\t\t\t\r\n\t\t\tif(!this.table.options.paginationElement && !hidden){\r\n\t\t\t\tif(this.table.options.paginationCounter){\r\n\r\n\t\t\t\t\tpaginationCounterHolder \r\n\r\n\t\t\t\t\tif(this.table.options.paginationCounterElement){\r\n\t\t\t\t\t\tif(this.table.options.paginationCounterElement instanceof HTMLElement){\r\n\t\t\t\t\t\t\tthis.table.options.paginationCounterElement.appendChild(this.pageCounterElement);\r\n\t\t\t\t\t\t}else if(typeof this.table.options.paginationCounterElement === \"string\"){\r\n\t\t\t\t\t\t\tpaginationCounterHolder = document.querySelector(this.table.options.paginationCounterElement);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(paginationCounterHolder){\r\n\t\t\t\t\t\t\t\tpaginationCounterHolder.appendChild(this.pageCounterElement);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Pagination Error - Unable to find element matching paginationCounterElement selector:\", this.table.options.paginationCounterElement);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.table.footerManager.append(this.pageCounterElement);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.table.footerManager.append(this.element, this);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.page = this.table.options.paginationInitialPage;\r\n\t\t\tthis.count = this.table.options.paginationButtonCount;\r\n\t\t}\r\n\t\t\r\n\t\t//set default values\r\n\t\tthis.mode = this.table.options.paginationMode;\r\n\t}\r\n\t\r\n\tinitializeProgressive(mode){\r\n\t\tthis.initializePaginator(true);\r\n\t\tthis.mode = \"progressive_\" + mode;\r\n\t\tthis.progressiveLoad = true;\r\n\t}\r\n\t\r\n\ttrackChanges(){\r\n\t\tthis.dispatch(\"page-changed\");\r\n\t}\r\n\t\r\n\tsetDisplayIndex(index){\r\n\t\tthis.displayIndex = index;\r\n\t}\r\n\t\r\n\tgetDisplayIndex(){\r\n\t\treturn this.displayIndex;\r\n\t}\r\n\t\r\n\t//calculate maximum page from number of rows\r\n\tsetMaxRows(rowCount){\r\n\t\tif(!rowCount){\r\n\t\t\tthis.max = 1;\r\n\t\t}else{\r\n\t\t\tthis.max = this.size === true ? 1 : Math.ceil(rowCount/this.size);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.page > this.max){\r\n\t\t\tthis.page = this.max;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//reset to first page without triggering action\r\n\treset(force){\r\n\t\tif(!this.initialLoad){\r\n\t\t\tif(this.mode == \"local\" || force){\r\n\t\t\t\tthis.page = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set the maximum page\r\n\tsetMaxPage(max){\r\n\t\t\r\n\t\tmax = parseInt(max);\r\n\t\t\r\n\t\tthis.max = max || 1;\r\n\t\t\r\n\t\tif(this.page > this.max){\r\n\t\t\tthis.page = this.max;\r\n\t\t\tthis.trigger();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set current page number\r\n\tsetPage(page){\r\n\t\tswitch(page){\r\n\t\t\tcase \"first\":\r\n\t\t\treturn this.setPage(1);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"prev\":\r\n\t\t\treturn this.previousPage();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"next\":\r\n\t\t\treturn this.nextPage();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"last\":\r\n\t\t\treturn this.setPage(this.max);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tpage = parseInt(page);\r\n\t\t\r\n\t\tif((page > 0 && page <= this.max) || this.mode !== \"local\"){\r\n\t\t\tthis.page = page;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Requested page is out of range of 1 - \" + this.max + \":\", page);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetPageToRow(row){\r\n\t\tvar rows = this.table.rowManager.getDisplayRows(this.displayIndex - 1);\r\n\t\tvar index = rows.indexOf(row);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tvar page = this.size === true ? 1 : Math.ceil((index + 1) / this.size);\r\n\t\t\t\r\n\t\t\treturn this.setPage(page)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Requested row is not visible\");\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetPageSize(size){\r\n\t\tif(size !== true){\r\n\t\t\tsize = parseInt(size);\r\n\t\t}\r\n\t\t\r\n\t\tif(size > 0){\r\n\t\t\tthis.size = size;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.pageSizeSelect){\r\n\t\t\t// this.pageSizeSelect.value = size;\r\n\t\t\tthis.generatePageSizeSelectList();\r\n\t\t}\r\n\t\t\r\n\t\tthis.trackChanges();\r\n\t}\r\n\t\r\n\t_setPageCounter(totalRows, size, currentRow){\r\n\t\tvar content;\r\n\t\t\r\n\t\tif(this.pageCounter){\r\n\r\n\t\t\tif(this.mode === \"remote\"){\r\n\t\t\t\tsize = this.size;\r\n\t\t\t\tcurrentRow = ((this.page - 1) * this.size) + 1;\r\n\t\t\t\ttotalRows = this.remoteRowCountEstimate;\r\n\t\t\t}\r\n\r\n\t\t\tcontent = this.pageCounter.call(this, size, currentRow, this.page, totalRows, this.max);\r\n\t\t\t\r\n\t\t\tswitch(typeof content){\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\tif(content instanceof Node){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//clear previous cell contents\r\n\t\t\t\t\twhile(this.pageCounterElement.firstChild) this.pageCounterElement.removeChild(this.pageCounterElement.firstChild);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.pageCounterElement.appendChild(content);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(content != null){\r\n\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);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"undefined\":\r\n\t\t\t\tcase \"null\":\r\n\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.pageCounterElement.innerHTML = content;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//setup the pagination buttons\r\n\t_setPageButtons(){\r\n\t\tlet leftSize = Math.floor((this.count-1) / 2);\r\n\t\tlet rightSize = Math.ceil((this.count-1) / 2);\r\n\t\tlet min = this.max - this.page + leftSize + 1 < this.count ? this.max-this.count+1: Math.max(this.page-leftSize,1);\r\n\t\tlet max = this.page <= rightSize? Math.min(this.count, this.max) :Math.min(this.page+rightSize, this.max);\r\n\t\t\r\n\t\twhile(this.pagesElement.firstChild) this.pagesElement.removeChild(this.pagesElement.firstChild);\r\n\t\t\r\n\t\tif(this.page == 1){\r\n\t\t\tthis.firstBut.disabled = true;\r\n\t\t\tthis.prevBut.disabled = true;\r\n\t\t}else{\r\n\t\t\tthis.firstBut.disabled = false;\r\n\t\t\tthis.prevBut.disabled = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.page == this.max){\r\n\t\t\tthis.lastBut.disabled = true;\r\n\t\t\tthis.nextBut.disabled = true;\r\n\t\t}else{\r\n\t\t\tthis.lastBut.disabled = false;\r\n\t\t\tthis.nextBut.disabled = false;\r\n\t\t}\r\n\t\t\r\n\t\tfor(let i = min; i <= max; i++){\r\n\t\t\tif(i>0 && i <= this.max){\r\n\t\t\t\tthis.pagesElement.appendChild(this._generatePageButton(i));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.footerRedraw();\r\n\t}\r\n\t\r\n\t_generatePageButton(page){\r\n\t\tvar button = document.createElement(\"button\");\r\n\t\t\r\n\t\tbutton.classList.add(\"tabulator-page\");\r\n\t\tif(page == this.page){\r\n\t\t\tbutton.classList.add(\"active\");\r\n\t\t}\r\n\t\t\r\n\t\tbutton.setAttribute(\"type\", \"button\");\r\n\t\tbutton.setAttribute(\"role\", \"button\");\r\n\t\t\r\n\t\tthis.langBind(\"pagination|page_title\", (value) => {\r\n\t\t\tbutton.setAttribute(\"aria-label\", value + \" \" + page);\r\n\t\t\tbutton.setAttribute(\"title\", value + \" \" + page);\r\n\t\t});\r\n\t\t\r\n\t\tbutton.setAttribute(\"data-page\", page);\r\n\t\tbutton.textContent = page;\r\n\t\t\r\n\t\tbutton.addEventListener(\"click\", (e) => {\r\n\t\t\tthis.setPage(page)\r\n\t\t});\r\n\t\t\r\n\t\treturn button;\r\n\t}\r\n\t\r\n\t//previous page\r\n\tpreviousPage(){\r\n\t\tif(this.page > 1){\r\n\t\t\tthis.page--;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger()\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Pagination Error - Previous page would be less than page 1:\", 0);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//next page\r\n\tnextPage(){\r\n\t\tif(this.page < this.max){\r\n\t\t\tthis.page++;\r\n\t\t\t\r\n\t\t\tthis.trackChanges();\r\n\t\t\t\r\n\t\t\treturn this.trigger();\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tif(!this.progressiveLoad){\r\n\t\t\t\tconsole.warn(\"Pagination Error - Next page would be greater than maximum page of \" + this.max + \":\", this.max + 1);\r\n\t\t\t}\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return current page number\r\n\tgetPage(){\r\n\t\treturn this.page;\r\n\t}\r\n\t\r\n\t//return max page number\r\n\tgetPageMax(){\r\n\t\treturn this.max;\r\n\t}\r\n\t\r\n\tgetPageSize(size){\r\n\t\treturn this.size;\r\n\t}\r\n\t\r\n\tgetMode(){\r\n\t\treturn this.mode;\r\n\t}\r\n\t\r\n\t//return appropriate rows for current page\r\n\tgetRows(data){\r\n\t\tvar actualRowPageSize = 0,\r\n\t\toutput, start, end, actualStartRow;\r\n\r\n\t\tvar actualRows = data.filter((row) => {\r\n\t\t\treturn row.type === \"row\";\r\n\t\t});\r\n\t\t\r\n\t\tif(this.mode == \"local\"){\r\n\t\t\toutput = [];\r\n\t\t\t\r\n\t\t\tthis.setMaxRows(data.length);\r\n\t\t\t\r\n\t\t\tif(this.size === true){\r\n\t\t\t\tstart = 0;\r\n\t\t\t\tend = data.length;\r\n\t\t\t}else{\r\n\t\t\t\tstart = this.size * (this.page - 1);\r\n\t\t\t\tend = start + parseInt(this.size);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._setPageButtons();\r\n\t\t\t\r\n\t\t\tfor(let i = start; i < end; i++){\r\n\t\t\t\tlet row = data[i];\r\n\r\n\t\t\t\tif(row){\r\n\t\t\t\t\toutput.push(row);\r\n\r\n\t\t\t\t\tif(row.type === \"row\"){\r\n\t\t\t\t\t\tif(!actualStartRow){\r\n\t\t\t\t\t\t\tactualStartRow = row;\r\n\t\t\t\t\t\t}\t\r\n\r\n\t\t\t\t\t\tactualRowPageSize++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._setPageCounter(actualRows.length, actualRowPageSize, actualStartRow ? (actualRows.indexOf(actualStartRow) + 1) : 0);\r\n\t\t\t\r\n\t\t\treturn output;\r\n\t\t}else{\r\n\t\t\tthis._setPageButtons();\r\n\t\t\tthis._setPageCounter(actualRows.length);\r\n\t\t\t\r\n\t\t\treturn data.slice(0);\r\n\t\t}\r\n\t}\r\n\t\r\n\ttrigger(){\r\n\t\tvar left;\r\n\t\t\r\n\t\tswitch(this.mode){\r\n\t\t\tcase \"local\":\r\n\t\t\tleft = this.table.rowManager.scrollLeft;\r\n\t\t\t\r\n\t\t\tthis.refreshData();\r\n\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\r\n\t\t\t\r\n\t\t\treturn Promise.resolve();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"remote\":\r\n\t\t\tthis.dataChanging = true;\r\n\t\t\treturn this.reloadData(null)\r\n\t\t\t.finally(() => {\r\n\t\t\t\tthis.dataChanging = false;\r\n\t\t\t})\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"progressive_load\":\r\n\t\t\tcase \"progressive_scroll\":\r\n\t\t\treturn this.reloadData(null, true);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\tconsole.warn(\"Pagination Error - no such pagination mode:\", this.mode);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_parseRemoteData(data){\r\n\t\tvar left, data, margin;\r\n\t\t\r\n\t\tif(typeof data.last_page === \"undefined\"){\r\n\t\t\tconsole.warn(\"Remote Pagination Error - Server response missing '\" + (this.options(\"dataReceiveParams\").last_page || \"last_page\") + \"' property\");\r\n\t\t}\r\n\t\t\r\n\t\tif(data.data){\r\n\t\t\tthis.max = parseInt(data.last_page) || 1;\r\n\r\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));\r\n\t\t\t\r\n\t\t\tif(this.progressiveLoad){\r\n\t\t\t\tswitch(this.mode){\r\n\t\t\t\t\tcase \"progressive_load\":\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.page == 1){\r\n\t\t\t\t\t\tthis.table.rowManager.setData(data.data, false, this.page == 1)\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.table.rowManager.addRows(data.data);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.page < this.max){\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tthis.nextPage();\r\n\t\t\t\t\t\t}, this.table.options.progressiveLoadDelay);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"progressive_scroll\":\r\n\t\t\t\t\tdata = this.page === 1 ? data.data : this.table.rowManager.getData().concat(data.data);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.table.rowManager.setData(data, this.page !== 1, this.page == 1);\r\n\t\t\t\t\t\r\n\t\t\t\t\tmargin = this.table.options.progressiveLoadScrollMargin || (this.table.rowManager.element.clientHeight * 2);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.table.rowManager.element.scrollHeight <= (this.table.rowManager.element.clientHeight + margin)){\r\n\t\t\t\t\t\tif(this.page < this.max){\r\n\t\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\t\tthis.nextPage();\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\t// left = this.table.rowManager.scrollLeft;\r\n\t\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\r\n\t\t\t\t// this.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\t// this.table.columnManager.scrollHorizontal(left);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Remote Pagination Error - Server response missing '\" + (this.options(\"dataReceiveParams\").data || \"data\") + \"' property\");\r\n\t\t}\r\n\t\t\r\n\t\treturn data.data;\r\n\t}\r\n\t\r\n\t//handle the footer element being redrawn\r\n\tfooterRedraw(){\r\n\t\tvar footer = this.table.footerManager.containerElement;\r\n\r\n\t\tif((Math.ceil(footer.clientWidth) - footer.scrollWidth) < 0){\r\n\t\t\tthis.pagesElement.style.display = 'none';\r\n\t\t}else{\r\n\t\t\tthis.pagesElement.style.display = '';\r\n\t\t\t\r\n\t\t\tif((Math.ceil(footer.clientWidth) - footer.scrollWidth) < 0){\r\n\t\t\t\tthis.pagesElement.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nPage.moduleName = \"page\";\r\n\r\n//load defaults\r\nPage.pageCounters = defaultPageCounters;\r\n\r\nexport default Page;","export default function(pageSize, currentRow, currentPage, totalRows, totalPages){\r\n\r\n var el = document.createElement(\"span\"),\r\n\tshowingEl = document.createElement(\"span\"),\r\n\tvalueEl = document.createElement(\"span\"),\r\n\tofEl = document.createElement(\"span\"),\r\n\ttotalEl = document.createElement(\"span\"),\r\n\trowsEl = document.createElement(\"span\");\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|showing\", (value) => {\r\n\t\tshowingEl.innerHTML = value;\r\n\t});\r\n\t\r\n\tvalueEl.innerHTML = \" \" + currentPage + \" \";\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|of\", (value) => {\r\n\t\tofEl.innerHTML = value;\r\n\t});\r\n\t\r\n\ttotalEl.innerHTML = \" \" + totalPages + \" \";\r\n\t\r\n\tthis.table.modules.localize.langBind(\"pagination|counter|pages\", (value) => {\r\n\t\trowsEl.innerHTML = value;\r\n\t});\r\n\t\r\n\tel.appendChild(showingEl);\r\n\tel.appendChild(valueEl);\r\n\tel.appendChild(ofEl);\r\n\tel.appendChild(totalEl);\r\n\tel.appendChild(rowsEl);\r\n\t\r\n\treturn el;\r\n};","import rows from './pageCounters/rows.js';\r\nimport pages from './pageCounters/pages.js';\r\n\r\n\r\nexport default {\r\n\trows:rows,\r\n\tpages:pages,\r\n};","// read peristence information from storage\r\nexport default {\r\n\tlocal:function(id, type){\r\n\t\tvar data = localStorage.getItem(id + \"-\" + type);\r\n\r\n\t\treturn data ? JSON.parse(data) : false;\r\n\t},\r\n\tcookie:function(id, type){\r\n\t\tvar cookie = document.cookie,\r\n\t\tkey = id + \"-\" + type,\r\n\t\tcookiePos = cookie.indexOf(key + \"=\"),\r\n\t\tend, data;\r\n\r\n\t\t//if cookie exists, decode and load column data into tabulator\r\n\t\tif(cookiePos > -1){\r\n\t\t\tcookie = cookie.slice(cookiePos);\r\n\r\n\t\t\tend = cookie.indexOf(\";\");\r\n\r\n\t\t\tif(end > -1){\r\n\t\t\t\tcookie = cookie.slice(0, end);\r\n\t\t\t}\r\n\r\n\t\t\tdata = cookie.replace(key + \"=\", \"\");\r\n\t\t}\r\n\r\n\t\treturn data ? JSON.parse(data) : false;\r\n\t}\r\n};\r\n","//write persistence information to storage\r\nexport default {\r\n\tlocal:function(id, type, data){\r\n\t\tlocalStorage.setItem(id + \"-\" + type, JSON.stringify(data));\r\n\t},\r\n\tcookie:function(id, type, data){\r\n\t\tvar expireDate = new Date();\r\n\r\n\t\texpireDate.setDate(expireDate.getDate() + 10000);\r\n\r\n\t\tdocument.cookie = id + \"-\" + type + \"=\" + JSON.stringify(data) + \"; expires=\" + expireDate.toUTCString();\r\n\t}\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultReaders from './defaults/readers.js';\r\nimport defaultWriters from './defaults/writers.js';\r\n\r\nclass Persistence extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.mode = \"\";\r\n\t\tthis.id = \"\";\r\n\t\t// this.persistProps = [\"field\", \"width\", \"visible\"];\r\n\t\tthis.defWatcherBlock = false;\r\n\t\tthis.config = {};\r\n\t\tthis.readFunc = false;\r\n\t\tthis.writeFunc = false;\r\n\r\n\t\tthis.registerTableOption(\"persistence\", false);\r\n\t\tthis.registerTableOption(\"persistenceID\", \"\"); //key for persistent storage\r\n\t\tthis.registerTableOption(\"persistenceMode\", true); //mode for storing persistence information\r\n\t\tthis.registerTableOption(\"persistenceReaderFunc\", false); //function for handling persistence data reading\r\n\t\tthis.registerTableOption(\"persistenceWriterFunc\", false); //function for handling persistence data writing\r\n\t}\r\n\r\n\t// Test for whether localStorage is available for use.\r\n\tlocalStorageTest() {\r\n\t\tvar testKey = \"_tabulator_test\";\r\n\r\n\t\ttry {\r\n\t\t\twindow.localStorage.setItem( testKey, testKey);\r\n\t\t\twindow.localStorage.removeItem( testKey );\r\n\t\t\treturn true;\r\n\t\t} catch(e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//setup parameters\r\n\tinitialize(){\r\n\t\tif(this.table.options.persistence){\r\n\t\t\t//determine persistent layout storage type\r\n\t\t\tvar mode = this.table.options.persistenceMode,\r\n\t\t\tid = this.table.options.persistenceID,\r\n\t\t\tretreivedData;\r\n\r\n\t\t\tthis.mode = mode !== true ? mode : (this.localStorageTest() ? \"local\" : \"cookie\");\r\n\r\n\t\t\tif(this.table.options.persistenceReaderFunc){\r\n\t\t\t\tif(typeof this.table.options.persistenceReaderFunc === \"function\"){\r\n\t\t\t\t\tthis.readFunc = this.table.options.persistenceReaderFunc;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(Persistence.readers[this.table.options.persistenceReaderFunc]){\r\n\t\t\t\t\t\tthis.readFunc = Persistence.readers[this.table.options.persistenceReaderFunc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Persistence Read Error - invalid reader set\", this.table.options.persistenceReaderFunc);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(Persistence.readers[this.mode]){\r\n\t\t\t\t\tthis.readFunc = Persistence.readers[this.mode];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Persistence Read Error - invalid reader set\", this.mode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.options.persistenceWriterFunc){\r\n\t\t\t\tif(typeof this.table.options.persistenceWriterFunc === \"function\"){\r\n\t\t\t\t\tthis.writeFunc = this.table.options.persistenceWriterFunc;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(Persistence.writers[this.table.options.persistenceWriterFunc]){\r\n\t\t\t\t\t\tthis.writeFunc = Persistence.writers[this.table.options.persistenceWriterFunc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Persistence Write Error - invalid reader set\", this.table.options.persistenceWriterFunc);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(Persistence.writers[this.mode]){\r\n\t\t\t\t\tthis.writeFunc = Persistence.writers[this.mode];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Persistence Write Error - invalid writer set\", this.mode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//set storage tag\r\n\t\t\tthis.id = \"tabulator-\" + (id || (this.table.element.getAttribute(\"id\") || \"\"));\r\n\r\n\t\t\tthis.config = {\r\n\t\t\t\tsort:this.table.options.persistence === true || this.table.options.persistence.sort,\r\n\t\t\t\tfilter:this.table.options.persistence === true || this.table.options.persistence.filter,\r\n\t\t\t\tgroup:this.table.options.persistence === true || this.table.options.persistence.group,\r\n\t\t\t\tpage:this.table.options.persistence === true || this.table.options.persistence.page,\r\n\t\t\t\tcolumns:this.table.options.persistence === true ? [\"title\", \"width\", \"visible\"] : this.table.options.persistence.columns,\r\n\t\t\t};\r\n\r\n\t\t\t//load pagination data if needed\r\n\t\t\tif(this.config.page){\r\n\t\t\t\tretreivedData = this.retreiveData(\"page\");\r\n\r\n\t\t\t\tif(retreivedData){\r\n\t\t\t\t\tif(typeof retreivedData.paginationSize !== \"undefined\" && (this.config.page === true || this.config.page.size)){\r\n\t\t\t\t\t\tthis.table.options.paginationSize = retreivedData.paginationSize;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(typeof retreivedData.paginationInitialPage !== \"undefined\" && (this.config.page === true || this.config.page.page)){\r\n\t\t\t\t\t\tthis.table.options.paginationInitialPage = retreivedData.paginationInitialPage;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//load group data if needed\r\n\t\t\tif(this.config.group){\r\n\t\t\t\tretreivedData = this.retreiveData(\"group\");\r\n\r\n\t\t\t\tif(retreivedData){\r\n\t\t\t\t\tif(typeof retreivedData.groupBy !== \"undefined\" && (this.config.group === true || this.config.group.groupBy)){\r\n\t\t\t\t\t\tthis.table.options.groupBy = retreivedData.groupBy;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retreivedData.groupStartOpen !== \"undefined\" && (this.config.group === true || this.config.group.groupStartOpen)){\r\n\t\t\t\t\t\tthis.table.options.groupStartOpen = retreivedData.groupStartOpen;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retreivedData.groupHeader !== \"undefined\" && (this.config.group === true || this.config.group.groupHeader)){\r\n\t\t\t\t\t\tthis.table.options.groupHeader = retreivedData.groupHeader;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.columns){\r\n\t\t\t\tthis.table.options.columns = this.load(\"columns\", this.table.options.columns);\r\n\t\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t\t\t\tthis.subscribe(\"column-show\", this.save.bind(this, \"columns\"));\r\n\t\t\t\tthis.subscribe(\"column-hide\", this.save.bind(this, \"columns\"));\r\n\t\t\t\tthis.subscribe(\"column-moved\", this.save.bind(this, \"columns\"));\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-built\", this.tableBuilt.bind(this), 0);\r\n\r\n\t\t\tthis.subscribe(\"table-redraw\", this.tableRedraw.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"filter-changed\", this.eventSave.bind(this, \"filter\"));\r\n\t\t\tthis.subscribe(\"sort-changed\", this.eventSave.bind(this, \"sort\"));\r\n\t\t\tthis.subscribe(\"group-changed\", this.eventSave.bind(this, \"group\"));\r\n\t\t\tthis.subscribe(\"page-changed\", this.eventSave.bind(this, \"page\"));\r\n\t\t\tthis.subscribe(\"column-resized\", this.eventSave.bind(this, \"columns\"));\r\n\t\t\tthis.subscribe(\"layout-refreshed\", this.eventSave.bind(this, \"columns\"));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"getColumnLayout\", this.getColumnLayout.bind(this));\r\n\t\tthis.registerTableFunction(\"setColumnLayout\", this.setColumnLayout.bind(this));\r\n\t}\r\n\r\n\teventSave(type){\r\n\t\tif(this.config[type]){\r\n\t\t\tthis.save(type);\r\n\t\t}\r\n\t}\r\n\r\n\ttableBuilt(){\r\n\t\tvar options = this.table.options,\r\n\t\tsorters, filters;\r\n\r\n\t\tif(this.config.sort){\r\n\t\t\tsorters = this.load(\"sort\");\r\n\r\n\t\t\tif(!sorters === false){\r\n\t\t\t\tthis.table.options.initialSort = sorters;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.config.filter){\r\n\t\t\tfilters = this.load(\"filter\");\r\n\r\n\t\t\tif(!filters === false){\r\n\t\t\t\tthis.table.options.initialFilter = filters;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tif(force && this.config.columns){\r\n\t\t\tthis.save(\"columns\");\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tgetColumnLayout(){\r\n\t\treturn this.parseColumns(this.table.columnManager.getColumns());\r\n\t}\r\n\r\n\tsetColumnLayout(layout){\r\n\t\tthis.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns, layout))\r\n\t\treturn true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumn(column){\r\n\t\tvar def, keys;\r\n\r\n\t\tif(this.config.columns){\r\n\t\t\tthis.defWatcherBlock = true;\r\n\r\n\t\t\tdef = column.getDefinition();\r\n\r\n\t\t\tkeys = this.config.columns === true ? Object.keys(def) : this.config.columns;\r\n\r\n\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\tvar props = Object.getOwnPropertyDescriptor(def, key);\r\n\t\t\t\tvar value = def[key];\r\n\t\t\t\tif(props){\r\n\t\t\t\t\tObject.defineProperty(def, key, {\r\n\t\t\t\t\t\tset: function(newValue){\r\n\t\t\t\t\t\t\tvalue = newValue;\r\n\r\n\t\t\t\t\t\t\tif(!this.defWatcherBlock){\r\n\t\t\t\t\t\t\t\tthis.save(\"columns\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif(props.set){\r\n\t\t\t\t\t\t\t\tprops.set(newValue);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tget:function(){\r\n\t\t\t\t\t\t\tif(props.get){\r\n\t\t\t\t\t\t\t\tprops.get();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.defWatcherBlock = false;\r\n\t\t}\r\n\t}\r\n\r\n\t//load saved definitions\r\n\tload(type, current){\r\n\t\tvar data = this.retreiveData(type);\r\n\r\n\t\tif(current){\r\n\t\t\tdata = data ? this.mergeDefinition(current, data) : current;\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//retreive data from memory\r\n\tretreiveData(type){\r\n\t\treturn this.readFunc ? this.readFunc(this.id, type) : false;\r\n\t}\r\n\r\n\t//merge old and new column definitions\r\n\tmergeDefinition(oldCols, newCols){\r\n\t\tvar output = [];\r\n\r\n\t\tnewCols = newCols || [];\r\n\r\n\t\tnewCols.forEach((column, to) => {\r\n\t\t\tvar from = this._findColumn(oldCols, column),\r\n\t\t\tkeys;\r\n\r\n\t\t\tif(from){\r\n\t\t\t\tif(this.config.columns === true || this.config.columns == undefined){\r\n\t\t\t\t\tkeys = Object.keys(from);\r\n\t\t\t\t\tkeys.push(\"width\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tkeys = this.config.columns;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\t\tif(key !== \"columns\" && typeof column[key] !== \"undefined\"){\r\n\t\t\t\t\t\tfrom[key] = column[key];\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(from.columns){\r\n\t\t\t\t\tfrom.columns = this.mergeDefinition(from.columns, column.columns);\r\n\t\t\t\t}\r\n\r\n\t\t\t\toutput.push(from);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\toldCols.forEach((column, i) => {\r\n\t\t\tvar from = this._findColumn(newCols, column);\r\n\r\n\t\t\tif (!from) {\r\n\t\t\t\tif(output.length>i){\r\n\t\t\t\t\toutput.splice(i, 0, column);\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput.push(column);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//find matching columns\r\n\t_findColumn(columns, subject){\r\n\t\tvar type = subject.columns ? \"group\" : (subject.field ? \"field\" : \"object\");\r\n\r\n\t\treturn columns.find(function(col){\r\n\t\t\tswitch(type){\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\treturn col.title === subject.title && col.columns.length === subject.columns.length;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"field\":\r\n\t\t\t\treturn col.field === subject.field;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\treturn col === subject;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//save data\r\n\tsave(type){\r\n\t\tvar data = {};\r\n\r\n\t\tswitch(type){\r\n\t\t\tcase \"columns\":\r\n\t\t\tdata = this.parseColumns(this.table.columnManager.getColumns())\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"filter\":\r\n\t\t\tdata = this.table.modules.filter.getFilters();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"sort\":\r\n\t\t\tdata = this.validateSorters(this.table.modules.sort.getSort());\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\tdata = this.getGroupConfig();\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"page\":\r\n\t\t\tdata = this.getPageConfig();\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif(this.writeFunc){\r\n\t\t\tthis.writeFunc(this.id, type, data);\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t//ensure sorters contain no function data\r\n\tvalidateSorters(data){\r\n\t\tdata.forEach(function(item){\r\n\t\t\titem.column = item.field;\r\n\t\t\tdelete item.field;\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\tgetGroupConfig(){\r\n\t\tvar data = {};\r\n\r\n\t\tif(this.config.group){\r\n\t\t\tif(this.config.group === true || this.config.group.groupBy){\r\n\t\t\t\tdata.groupBy = this.table.options.groupBy;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.group === true || this.config.group.groupStartOpen){\r\n\t\t\t\tdata.groupStartOpen = this.table.options.groupStartOpen;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.group === true || this.config.group.groupHeader){\r\n\t\t\t\tdata.groupHeader = this.table.options.groupHeader;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\tgetPageConfig(){\r\n\t\tvar data = {};\r\n\r\n\t\tif(this.config.page){\r\n\t\t\tif(this.config.page === true || this.config.page.size){\r\n\t\t\t\tdata.paginationSize = this.table.modules.page.getPageSize();\r\n\t\t\t}\r\n\r\n\t\t\tif(this.config.page === true || this.config.page.page){\r\n\t\t\t\tdata.paginationInitialPage = this.table.modules.page.getPage();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\r\n\t//parse columns for data to store\r\n\tparseColumns(columns){\r\n\t\tvar definitions = [],\r\n\t\texcludedKeys = [\"headerContextMenu\", \"headerMenu\", \"contextMenu\", \"clickMenu\"];\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\tvar defStore = {},\r\n\t\t\tcolDef = column.getDefinition(),\r\n\t\t\tkeys;\r\n\r\n\t\t\tif(column.isGroup){\r\n\t\t\t\tdefStore.title = colDef.title;\r\n\t\t\t\tdefStore.columns = this.parseColumns(column.getColumns());\r\n\t\t\t}else{\r\n\t\t\t\tdefStore.field = column.getField();\r\n\r\n\t\t\t\tif(this.config.columns === true || this.config.columns == undefined){\r\n\t\t\t\t\tkeys = Object.keys(colDef);\r\n\t\t\t\t\tkeys.push(\"width\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tkeys = this.config.columns;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tkeys.forEach((key)=>{\r\n\t\t\t\t\tswitch(key){\r\n\t\t\t\t\t\tcase \"width\":\r\n\t\t\t\t\t\tdefStore.width = column.getWidth();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"visible\":\r\n\t\t\t\t\t\tdefStore.visible = column.visible;\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(typeof colDef[key] !== \"function\" && excludedKeys.indexOf(key) === -1){\r\n\t\t\t\t\t\t\tdefStore[key] = colDef[key];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tdefinitions.push(defStore);\r\n\t\t});\r\n\r\n\t\treturn definitions;\r\n\t}\r\n}\r\n\r\nPersistence.moduleName = \"persistence\";\r\n\r\nPersistence.moduleInitOrder = 1;\r\n\r\n//load defaults\r\nPersistence.readers = defaultReaders;\r\nPersistence.writers = defaultWriters;\r\n\r\nexport default Persistence;","import Module from '../../core/Module.js';\r\n\r\nclass Print extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.element = false;\r\n\t\tthis.manualBlock = false;\r\n\r\n\t\tthis.registerTableOption(\"printAsHtml\", false); //enable print as html\r\n\t\tthis.registerTableOption(\"printFormatter\", false); //printing page formatter\r\n\t\tthis.registerTableOption(\"printHeader\", false); //page header contents\r\n\t\tthis.registerTableOption(\"printFooter\", false); //page footer contents\r\n\t\tthis.registerTableOption(\"printStyled\", true); //enable print as html styling\r\n\t\tthis.registerTableOption(\"printRowRange\", \"visible\"); //restrict print to visible rows only\r\n\t\tthis.registerTableOption(\"printConfig\", {}); //print config options\r\n\r\n\t\tthis.registerColumnOption(\"print\");\r\n\t\tthis.registerColumnOption(\"titlePrint\");\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.printAsHtml){\r\n\t\t\twindow.addEventListener(\"beforeprint\", this.replaceTable.bind(this));\r\n\t\t\twindow.addEventListener(\"afterprint\", this.cleanup.bind(this));\r\n\t\t}\r\n\r\n\t\tthis.registerTableFunction(\"print\", this.printFullscreen.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\treplaceTable(){\r\n\t\tif(!this.manualBlock){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"tabulator-print-table\");\r\n\r\n\t\t\tthis.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig, this.table.options.printStyled, this.table.options.printRowRange, \"print\"));\r\n\r\n\t\t\tthis.table.element.style.display = \"none\";\r\n\r\n\t\t\tthis.table.element.parentNode.insertBefore(this.element, this.table.element);\r\n\t\t}\r\n\t}\r\n\r\n\tcleanup(){\r\n\t\tdocument.body.classList.remove(\"tabulator-print-fullscreen-hide\");\r\n\r\n\t\tif(this.element && this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\tthis.table.element.style.display = \"\";\r\n\t\t}\r\n\t}\r\n\r\n\tprintFullscreen(visible, style, config){\r\n\t\tvar scrollX = window.scrollX,\r\n\t\tscrollY = window.scrollY,\r\n\t\theaderEl = document.createElement(\"div\"),\r\n\t\tfooterEl = document.createElement(\"div\"),\r\n\t\ttableEl = this.table.modules.export.genereateTable(typeof config != \"undefined\" ? config : this.table.options.printConfig, typeof style != \"undefined\" ? style : this.table.options.printStyled, visible || this.table.options.printRowRange, \"print\"),\r\n\t\theaderContent, footerContent;\r\n\r\n\t\tthis.manualBlock = true;\r\n\r\n\t\tthis.element = document.createElement(\"div\");\r\n\t\tthis.element.classList.add(\"tabulator-print-fullscreen\");\r\n\r\n\t\tif(this.table.options.printHeader){\r\n\t\t\theaderEl.classList.add(\"tabulator-print-header\");\r\n\r\n\t\t\theaderContent = typeof this.table.options.printHeader == \"function\" ? this.table.options.printHeader.call(this.table) : this.table.options.printHeader;\r\n\r\n\t\t\tif(typeof headerContent == \"string\"){\r\n\t\t\t\theaderEl.innerHTML = headerContent;\r\n\t\t\t}else{\r\n\t\t\t\theaderEl.appendChild(headerContent);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.appendChild(headerEl);\r\n\t\t}\r\n\r\n\t\tthis.element.appendChild(tableEl);\r\n\r\n\t\tif(this.table.options.printFooter){\r\n\t\t\tfooterEl.classList.add(\"tabulator-print-footer\");\r\n\r\n\t\t\tfooterContent = typeof this.table.options.printFooter == \"function\" ? this.table.options.printFooter.call(this.table) : this.table.options.printFooter;\r\n\r\n\r\n\t\t\tif(typeof footerContent == \"string\"){\r\n\t\t\t\tfooterEl.innerHTML = footerContent;\r\n\t\t\t}else{\r\n\t\t\t\tfooterEl.appendChild(footerContent);\r\n\t\t\t}\r\n\r\n\t\t\tthis.element.appendChild(footerEl);\r\n\t\t}\r\n\r\n\t\tdocument.body.classList.add(\"tabulator-print-fullscreen-hide\");\r\n\t\tdocument.body.appendChild(this.element);\r\n\r\n\t\tif(this.table.options.printFormatter){\r\n\t\t\tthis.table.options.printFormatter(this.element, tableEl);\r\n\t\t}\r\n\r\n\t\twindow.print();\r\n\r\n\t\tthis.cleanup();\r\n\r\n\t\twindow.scrollTo(scrollX, scrollY);\r\n\r\n\t\tthis.manualBlock = false;\r\n\t}\r\n}\r\n\r\nPrint.moduleName = \"print\";\r\n\r\nexport default Print;","import Module from '../../core/Module.js';\r\n\r\nclass ReactiveData extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.data = false;\r\n\t\tthis.blocked = false; //block reactivity while performing update\r\n\t\tthis.origFuncs = {}; // hold original data array functions to allow replacement after data is done with\r\n\t\tthis.currentVersion = 0;\r\n\r\n\t\tthis.registerTableOption(\"reactiveData\", false); //enable data reactivity\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.reactiveData){\r\n\t\t\tthis.subscribe(\"cell-value-save-before\", this.block.bind(this));\r\n\t\t\tthis.subscribe(\"cell-value-save-after\", this.unblock.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-save-before\", this.block.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-save-after\", this.unblock.bind(this));\r\n\t\t\tthis.subscribe(\"row-data-init-after\", this.watchRow.bind(this));\r\n\t\t\tthis.subscribe(\"data-processing\", this.watchData.bind(this));\r\n\t\t\tthis.subscribe(\"table-destroy\", this.unwatchData.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\twatchData(data){\r\n\t\tvar self = this,\r\n\t\tpushFunc, version;\r\n\r\n\t\tthis.currentVersion ++;\r\n\r\n\t\tversion = this.currentVersion;\r\n\r\n\t\tthis.unwatchData();\r\n\r\n\t\tthis.data = data;\r\n\r\n\t\t//override array push function\r\n\t\tthis.origFuncs.push = data.push;\r\n\r\n\t\tObject.defineProperty(this.data, \"push\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments);\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\targs.forEach((arg) => {\r\n\t\t\t\t\t\tself.table.rowManager.addRowActual(arg, false);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.push.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//override array unshift function\r\n\t\tthis.origFuncs.unshift = data.unshift;\r\n\r\n\t\tObject.defineProperty(this.data, \"unshift\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments);\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\targs.forEach((arg) => {\r\n\t\t\t\t\t\tself.table.rowManager.addRowActual(arg, true);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.unshift.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\t//override array shift function\r\n\t\tthis.origFuncs.shift = data.shift;\r\n\r\n\t\tObject.defineProperty(this.data, \"shift\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar row;\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tif(self.data.length){\r\n\t\t\t\t\t\trow = self.table.rowManager.getRowFromDataObject(self.data[0]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.deleteActual();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.shift.call(data);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//override array pop function\r\n\t\tthis.origFuncs.pop = data.pop;\r\n\r\n\t\tObject.defineProperty(this.data, \"pop\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar row;\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tif(self.data.length){\r\n\t\t\t\t\t\trow = self.table.rowManager.getRowFromDataObject(self.data[self.data.length - 1]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.deleteActual();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn self.origFuncs.pop.call(data);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\t//override array splice function\r\n\t\tthis.origFuncs.splice = data.splice;\r\n\r\n\t\tObject.defineProperty(this.data, \"splice\", {\r\n\t\t\tenumerable: false,\r\n\t\t\tconfigurable: true,\r\n\t\t\tvalue: function(){\r\n\t\t\t\tvar args = Array.from(arguments),\r\n\t\t\t\tstart = args[0] < 0 ? data.length + args[0] : args[0],\r\n\t\t\t\tend = args[1],\r\n\t\t\t\tnewRows = args[2] ? args.slice(2) : false,\r\n\t\t\t\tstartRow;\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\r\n\t\t\t\t\t//add new rows\r\n\t\t\t\t\tif(newRows){\r\n\t\t\t\t\t\tstartRow = data[start] ? self.table.rowManager.getRowFromDataObject(data[start]) : false;\r\n\r\n\t\t\t\t\t\tif(startRow){\r\n\t\t\t\t\t\t\tnewRows.forEach((rowData) => {\r\n\t\t\t\t\t\t\t\tself.table.rowManager.addRowActual(rowData, true, startRow, true);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnewRows = newRows.slice().reverse();\r\n\r\n\t\t\t\t\t\t\tnewRows.forEach((rowData) => {\r\n\t\t\t\t\t\t\t\tself.table.rowManager.addRowActual(rowData, true, false, true);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//delete removed rows\r\n\t\t\t\t\tif(end !== 0){\r\n\t\t\t\t\t\tvar oldRows = data.slice(start, typeof args[1] === \"undefined\" ? args[1] : start + end);\r\n\r\n\t\t\t\t\t\toldRows.forEach((rowData, i) => {\r\n\t\t\t\t\t\t\tvar row = self.table.rowManager.getRowFromDataObject(rowData);\r\n\r\n\t\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\t\trow.deleteActual(i !== oldRows.length - 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(newRows || end !== 0){\r\n\t\t\t\t\t\tself.table.rowManager.reRenderInPosition();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.origFuncs.splice.apply(data, arguments);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tunwatchData(){\r\n\t\tif(this.data !== false){\r\n\t\t\tfor(var key in this.origFuncs){\r\n\t\t\t\tObject.defineProperty(this.data, key, {\r\n\t\t\t\t\tenumerable: true,\r\n\t\t\t\t\tconfigurable:true,\r\n\t\t\t\t\twritable:true,\r\n\t\t\t\t\tvalue: this.origFuncs.key,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\twatchRow(row){\r\n\t\tvar data = row.getData();\r\n\r\n\t\tthis.blocked = true;\r\n\r\n\t\tfor(var key in data){\r\n\t\t\tthis.watchKey(row, data, key);\r\n\t\t}\r\n\r\n\t\tif(this.table.options.dataTree){\r\n\t\t\tthis.watchTreeChildren(row);\r\n\t\t}\r\n\r\n\t\tthis.blocked = false;\r\n\t}\r\n\r\n\twatchTreeChildren (row){\r\n\t\tvar childField = row.getData()[this.table.options.dataTreeChildField],\r\n\t\torigFuncs = {};\r\n\r\n\t\tfunction rebuildTree(){\r\n\t\t\tthis.table.modules.dataTree.initializeRow(row);\r\n\t\t\tthis.table.modules.dataTree.layoutRow(row);\r\n\t\t\tthis.table.rowManager.refreshActiveData(\"tree\", false, true);\r\n\t\t}\r\n\r\n\t\tif(childField){\r\n\r\n\t\t\torigFuncs.push = childField.push;\r\n\r\n\t\t\tObject.defineProperty(childField, \"push\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.push.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.unshift = childField.unshift;\r\n\r\n\t\t\tObject.defineProperty(childField, \"unshift\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.unshift.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.shift = childField.shift;\r\n\r\n\t\t\tObject.defineProperty(childField, \"shift\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.shift.call(childField);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.pop = childField.pop;\r\n\r\n\t\t\tObject.defineProperty(childField, \"pop\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.pop.call(childField);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\torigFuncs.splice = childField.splice;\r\n\r\n\t\t\tObject.defineProperty(childField, \"splice\", {\r\n\t\t\t\tenumerable: false,\r\n\t\t\t\tconfigurable: true,\r\n\t\t\t\tvalue: () => {\r\n\t\t\t\t\tvar result = origFuncs.splice.apply(childField, arguments);\r\n\r\n\t\t\t\t\trebuildTree();\r\n\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\twatchKey(row, data, key){\r\n\t\tvar props = Object.getOwnPropertyDescriptor(data, key),\r\n\t\tvalue = data[key],\r\n\t\tversion = this.currentVersion;\r\n\r\n\t\tObject.defineProperty(data, key, {\r\n\t\t\tset: (newValue) => {\r\n\t\t\t\tvalue = newValue;\r\n\t\t\t\tif(!this.blocked && version === this.currentVersion){\r\n\t\t\t\t\tvar update = {};\r\n\t\t\t\t\tupdate[key] = newValue;\r\n\t\t\t\t\trow.updateData(update);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(props.set){\r\n\t\t\t\t\tprops.set(newValue);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tget:() => {\r\n\r\n\t\t\t\tif(props.get){\r\n\t\t\t\t\tprops.get();\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tunwatchRow(row){\r\n\t\tvar data = row.getData();\r\n\r\n\t\tfor(var key in data){\r\n\t\t\tObject.defineProperty(data, key, {\r\n\t\t\t\tvalue:data[key],\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tblock(){\r\n\t\tthis.blocked = true;\r\n\t}\r\n\r\n\tunblock(){\r\n\t\tthis.blocked = false;\r\n\t}\r\n}\r\n\r\nReactiveData.moduleName = \"reactiveData\";\r\n\r\nexport default ReactiveData;\r\n\r\n\r\n\r\n","import Module from '../../core/Module.js';\r\n\r\nclass ResizeColumns extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.startColumn = false;\r\n\t\tthis.startX = false;\r\n\t\tthis.startWidth = false;\r\n\t\tthis.handle = null;\r\n\t\tthis.prevHandle = null;\r\n\t\t\r\n\t\tthis.registerColumnOption(\"resizable\", true);\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\t// if(this.table.options.resizableColumns){\r\n\t\tthis.subscribe(\"cell-layout\", this.layoutCellHandles.bind(this));\r\n\t\tthis.subscribe(\"column-init\", this.layoutColumnHeader.bind(this));\r\n\t\t// }\r\n\t}\r\n\t\r\n\tlayoutCellHandles(cell){\r\n\t\tif(cell.row.type === \"row\"){\r\n\t\t\tthis.initializeColumn(\"cell\", cell.column, cell.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutColumnHeader(column){\r\n\t\tthis.initializeColumn(\"header\", column, column.element);\r\n\t}\r\n\t\r\n\tinitializeColumn(type, column, element){\r\n\t\tvar self = this,\r\n\t\tvariableHeight = false,\r\n\t\tmode = column.definition.resizable;\r\n\t\t\r\n\t\t//set column resize mode\r\n\t\tif(type === \"header\"){\r\n\t\t\tvariableHeight = column.definition.formatter == \"textarea\" || column.definition.variableHeight;\r\n\t\t\tcolumn.modules.resize = {variableHeight:variableHeight};\r\n\t\t}\r\n\t\t\r\n\t\tif(mode === true || mode == type){\r\n\t\t\t\r\n\t\t\tvar handle = document.createElement('div');\r\n\t\t\thandle.className = \"tabulator-col-resize-handle\";\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tvar prevHandle = document.createElement('div');\r\n\t\t\tprevHandle.className = \"tabulator-col-resize-handle prev\";\r\n\t\t\t\r\n\t\t\thandle.addEventListener(\"click\", function(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tvar handleDown = function(e){\r\n\t\t\t\tvar nearestColumn = column.getLastColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn && self._checkResizability(nearestColumn)){\r\n\t\t\t\t\tself.startColumn = column;\r\n\t\t\t\t\tself._mouseDown(e, nearestColumn, handle);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\thandle.addEventListener(\"mousedown\", handleDown);\r\n\t\t\thandle.addEventListener(\"touchstart\", handleDown, {passive: true});\r\n\t\t\t\r\n\t\t\t//reszie column on double click\r\n\t\t\thandle.addEventListener(\"dblclick\", function(e){\r\n\t\t\t\tvar col = column.getLastColumn(),\r\n\t\t\t\toldWidth;\r\n\t\t\t\t\r\n\t\t\t\tif(col && self._checkResizability(col)){\r\n\t\t\t\t\toldWidth = col.getWidth();\r\n\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tcol.reinitializeWidth(true);\r\n\r\n\t\t\t\t\tif(oldWidth !== col.getWidth()){\r\n\t\t\t\t\t\tself.dispatch(\"column-resized\", col);\r\n\t\t\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", col.getComponent());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tprevHandle.addEventListener(\"click\", function(e){\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tvar prevHandleDown = function(e){\r\n\t\t\t\tvar nearestColumn, colIndex, prevColumn;\r\n\t\t\t\t\r\n\t\t\t\tnearestColumn = column.getFirstColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn){\r\n\t\t\t\t\tcolIndex = self.table.columnManager.findColumnIndex(nearestColumn);\r\n\t\t\t\t\tprevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(prevColumn && self._checkResizability(prevColumn)){\r\n\t\t\t\t\t\tself.startColumn = column;\r\n\t\t\t\t\t\tself._mouseDown(e, prevColumn, prevHandle);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tprevHandle.addEventListener(\"mousedown\", prevHandleDown);\r\n\t\t\tprevHandle.addEventListener(\"touchstart\", prevHandleDown, {passive: true});\r\n\t\t\t\r\n\t\t\t//resize column on double click\r\n\t\t\tprevHandle.addEventListener(\"dblclick\", function(e){\r\n\t\t\t\tvar nearestColumn, colIndex, prevColumn;\r\n\t\t\t\t\r\n\t\t\t\tnearestColumn = column.getFirstColumn();\r\n\t\t\t\t\r\n\t\t\t\tif(nearestColumn){\r\n\t\t\t\t\tcolIndex = self.table.columnManager.findColumnIndex(nearestColumn);\r\n\t\t\t\t\tprevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(prevColumn && self._checkResizability(prevColumn)){\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\tprevColumn.reinitializeWidth(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\telement.appendChild(handle);\r\n\t\t\telement.appendChild(prevHandle);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_checkResizability(column){\r\n\t\treturn column.definition.resizable;\r\n\t}\r\n\t\r\n\t_mouseDown(e, column, handle){\r\n\t\tvar self = this;\r\n\t\t\r\n\t\tself.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tfunction mouseMove(e){\r\n\t\t\t// self.table.columnManager.tempScrollBlock();\r\n\t\t\t\r\n\t\t\tif(self.table.rtl){\r\n\t\t\t\tcolumn.setWidth(self.startWidth - ((typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX) - self.startX));\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.setWidth(self.startWidth + ((typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX) - self.startX));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself.table.columnManager.renderer.rerenderColumns(true);\r\n\t\t\t\r\n\t\t\tif(!self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight){\r\n\t\t\t\tcolumn.checkCellHeights();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfunction mouseUp(e){\r\n\t\t\t\r\n\t\t\t//block editor from taking action while resizing is taking place\r\n\t\t\tif(self.startColumn.modules.edit){\r\n\t\t\t\tself.startColumn.modules.edit.blocked = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight){\r\n\t\t\t\tcolumn.checkCellHeights();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", mouseUp);\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", mouseMove);\r\n\t\t\t\r\n\t\t\thandle.removeEventListener(\"touchmove\", mouseMove);\r\n\t\t\thandle.removeEventListener(\"touchend\", mouseUp);\r\n\t\t\t\r\n\t\t\tself.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tif(self.startWidth !== column.getWidth()){\r\n\t\t\t\tself.dispatch(\"column-resized\", column);\r\n\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", column.getComponent());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\te.stopPropagation(); //prevent resize from interfereing with movable columns\r\n\t\t\r\n\t\t//block editor from taking action while resizing is taking place\r\n\t\tif(self.startColumn.modules.edit){\r\n\t\t\tself.startColumn.modules.edit.blocked = true;\r\n\t\t}\r\n\t\t\r\n\t\tself.startX = typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX;\r\n\t\tself.startWidth = column.getWidth();\r\n\t\t\r\n\t\tdocument.body.addEventListener(\"mousemove\", mouseMove);\r\n\t\tdocument.body.addEventListener(\"mouseup\", mouseUp);\r\n\t\thandle.addEventListener(\"touchmove\", mouseMove, {passive: true});\r\n\t\thandle.addEventListener(\"touchend\", mouseUp);\r\n\t}\r\n}\r\n\r\nResizeColumns.moduleName = \"resizeColumns\";\r\n\r\nexport default ResizeColumns;","import Module from '../../core/Module.js';\r\n\r\nclass ResizeRows extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.startColumn = false;\r\n\t\tthis.startY = false;\r\n\t\tthis.startHeight = false;\r\n\t\tthis.handle = null;\r\n\t\tthis.prevHandle = null;\r\n\r\n\t\tthis.registerTableOption(\"resizableRows\", false); //resizable rows\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.resizableRows){\r\n\t\t\tthis.subscribe(\"row-layout-after\", this.initializeRow.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\trowEl = row.getElement();\r\n\r\n\t\tvar handle = document.createElement('div');\r\n\t\thandle.className = \"tabulator-row-resize-handle\";\r\n\r\n\t\tvar prevHandle = document.createElement('div');\r\n\t\tprevHandle.className = \"tabulator-row-resize-handle prev\";\r\n\r\n\t\thandle.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tvar handleDown = function(e){\r\n\t\t\tself.startRow = row;\r\n\t\t\tself._mouseDown(e, row, handle);\r\n\t\t};\r\n\r\n\t\thandle.addEventListener(\"mousedown\", handleDown);\r\n\t\thandle.addEventListener(\"touchstart\", handleDown, {passive: true});\r\n\r\n\t\tprevHandle.addEventListener(\"click\", function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tvar prevHandleDown = function(e){\r\n\t\t\tvar prevRow = self.table.rowManager.prevDisplayRow(row);\r\n\r\n\t\t\tif(prevRow){\r\n\t\t\t\tself.startRow = prevRow;\r\n\t\t\t\tself._mouseDown(e, prevRow, prevHandle);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tprevHandle.addEventListener(\"mousedown\",prevHandleDown);\r\n\t\tprevHandle.addEventListener(\"touchstart\",prevHandleDown, {passive: true});\r\n\r\n\t\trowEl.appendChild(handle);\r\n\t\trowEl.appendChild(prevHandle);\r\n\t}\r\n\r\n\t_mouseDown(e, row, handle){\r\n\t\tvar self = this;\r\n\r\n\t\tself.table.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tfunction mouseMove(e){\r\n\t\t\trow.setHeight(self.startHeight + ((typeof e.screenY === \"undefined\" ? e.touches[0].screenY : e.screenY) - self.startY));\r\n\t\t}\r\n\r\n\t\tfunction mouseUp(e){\r\n\r\n\t\t\t// //block editor from taking action while resizing is taking place\r\n\t\t\t// if(self.startColumn.modules.edit){\r\n\t\t\t// \tself.startColumn.modules.edit.blocked = false;\r\n\t\t\t// }\r\n\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", mouseMove);\r\n\t\t\tdocument.body.removeEventListener(\"mousemove\", mouseMove);\r\n\r\n\t\t\thandle.removeEventListener(\"touchmove\", mouseMove);\r\n\t\t\thandle.removeEventListener(\"touchend\", mouseUp);\r\n\r\n\t\t\tself.table.element.classList.remove(\"tabulator-block-select\");\r\n\r\n\t\t\tself.dispatchExternal(\"rowResized\", row.getComponent());\r\n\t\t}\r\n\r\n\t\te.stopPropagation(); //prevent resize from interfereing with movable columns\r\n\r\n\t\t//block editor from taking action while resizing is taking place\r\n\t\t// if(self.startColumn.modules.edit){\r\n\t\t// \tself.startColumn.modules.edit.blocked = true;\r\n\t\t// }\r\n\r\n\t\tself.startY = typeof e.screenY === \"undefined\" ? e.touches[0].screenY : e.screenY;\r\n\t\tself.startHeight = row.getHeight();\r\n\r\n\t\tdocument.body.addEventListener(\"mousemove\", mouseMove);\r\n\t\tdocument.body.addEventListener(\"mouseup\", mouseUp);\r\n\r\n\t\thandle.addEventListener(\"touchmove\", mouseMove, {passive: true});\r\n\t\thandle.addEventListener(\"touchend\", mouseUp);\r\n\t}\r\n}\r\n\r\nResizeRows.moduleName = \"resizeRows\";\r\n\r\nexport default ResizeRows;","import Module from '../../core/Module.js';\r\n\r\nclass ResizeTable extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.binding = false;\r\n\t\tthis.observer = false;\r\n\t\tthis.containerObserver = false;\r\n\r\n\t\tthis.tableHeight = 0;\r\n\t\tthis.tableWidth = 0;\r\n\t\tthis.containerHeight = 0;\r\n\t\tthis.containerWidth = 0;\r\n\r\n\t\tthis.autoResize = false;\r\n\r\n\t\tthis.registerTableOption(\"autoResize\", true); //auto resize table\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tif(this.table.options.autoResize){\r\n\t\t\tvar table = this.table,\r\n\t\t\ttableStyle;\r\n\r\n\t\t\tthis.tableHeight = table.element.clientHeight;\r\n\t\t\tthis.tableWidth = table.element.clientWidth;\r\n\r\n\t\t\tif(table.element.parentNode){\r\n\t\t\t\tthis.containerHeight = table.element.parentNode.clientHeight;\r\n\t\t\t\tthis.containerWidth = table.element.parentNode.clientWidth;\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof ResizeObserver !== \"undefined\" && table.rowManager.getRenderMode() === \"virtual\"){\r\n\r\n\t\t\t\tthis.autoResize = true;\r\n\r\n\t\t\t\tthis.observer = new ResizeObserver((entry) => {\r\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\tvar nodeHeight = Math.floor(entry[0].contentRect.height);\r\n\t\t\t\t\t\tvar nodeWidth = Math.floor(entry[0].contentRect.width);\r\n\r\n\t\t\t\t\t\tif(this.tableHeight != nodeHeight || this.tableWidth != nodeWidth){\r\n\t\t\t\t\t\t\tthis.tableHeight = nodeHeight;\r\n\t\t\t\t\t\t\tthis.tableWidth = nodeWidth;\r\n\r\n\t\t\t\t\t\t\tif(table.element.parentNode){\r\n\t\t\t\t\t\t\t\tthis.containerHeight = table.element.parentNode.clientHeight;\r\n\t\t\t\t\t\t\t\tthis.containerWidth = table.element.parentNode.clientWidth;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tthis.table.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.observer.observe(table.element);\r\n\r\n\t\t\t\ttableStyle = window.getComputedStyle(table.element);\r\n\r\n\t\t\t\tif(this.table.element.parentNode && !this.table.rowManager.fixedHeight && (tableStyle.getPropertyValue(\"max-height\") || tableStyle.getPropertyValue(\"min-height\"))){\r\n\r\n\t\t\t\t\tthis.containerObserver = new ResizeObserver((entry) => {\r\n\t\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\t\tvar nodeHeight = Math.floor(entry[0].contentRect.height);\r\n\t\t\t\t\t\t\tvar nodeWidth = Math.floor(entry[0].contentRect.width);\r\n\r\n\t\t\t\t\t\t\tif(this.containerHeight != nodeHeight || this.containerWidth != nodeWidth){\r\n\t\t\t\t\t\t\t\tthis.containerHeight = nodeHeight;\r\n\t\t\t\t\t\t\t\tthis.containerWidth = nodeWidth;\r\n\t\t\t\t\t\t\t\tthis.tableHeight = table.element.clientHeight;\r\n\t\t\t\t\t\t\t\tthis.tableWidth = table.element.clientWidth;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\ttable.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tthis.containerObserver.observe(this.table.element.parentNode);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.subscribe(\"table-resize\", this.tableResized.bind(this));\r\n\r\n\t\t\t}else{\r\n\t\t\t\tthis.binding = function(){\r\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile && !table.modules.edit.currentCell)){\r\n\r\n\t\t\t\t\t\ttable.columnManager.renderer.rerenderColumns(true);\r\n\r\n\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\twindow.addEventListener(\"resize\", this.binding);\r\n\t\t\t}\r\n\r\n\t\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\ttableResized(){\r\n\t\tthis.table.rowManager.redraw();\r\n\t}\r\n\r\n\tclearBindings(){\r\n\t\tif(this.binding){\r\n\t\t\twindow.removeEventListener(\"resize\", this.binding);\r\n\t\t}\r\n\r\n\t\tif(this.observer){\r\n\t\t\tthis.observer.unobserve(this.table.element);\r\n\t\t}\r\n\r\n\t\tif(this.containerObserver){\r\n\t\t\tthis.containerObserver.unobserve(this.table.element.parentNode);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nResizeTable.moduleName = \"resizeTable\";\r\n\r\nexport default ResizeTable;","import Module from '../../core/Module.js';\r\n\r\nclass ResponsiveLayout extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.columns = [];\r\n\t\tthis.hiddenColumns = [];\r\n\t\tthis.mode = \"\";\r\n\t\tthis.index = 0;\r\n\t\tthis.collapseFormatter = [];\r\n\t\tthis.collapseStartOpen = true;\r\n\t\tthis.collapseHandleColumn = false;\r\n\r\n\t\tthis.registerTableOption(\"responsiveLayout\", false); //responsive layout flags\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseStartOpen\", true); //start showing collapsed data\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseUseFormatters\", true); //responsive layout collapse formatter\r\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseFormatter\", false); //responsive layout collapse formatter\r\n\r\n\t\tthis.registerColumnOption(\"responsive\");\r\n\t}\r\n\r\n\t//generate responsive columns list\r\n\tinitialize(){\r\n\t\tvar self = this,\r\n\t\tcolumns = [];\r\n\r\n\t\tif(this.table.options.responsiveLayout){\r\n\t\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t\t\tthis.subscribe(\"column-show\", this.updateColumnVisibility.bind(this));\r\n\t\t\tthis.subscribe(\"column-hide\", this.updateColumnVisibility.bind(this));\r\n\t\t\tthis.subscribe(\"columns-loaded\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-moved\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-add\", this.initializeResponsivity.bind(this));\r\n\t\t\tthis.subscribe(\"column-delete\", this.initializeResponsivity.bind(this));\r\n\r\n\t\t\tthis.subscribe(\"table-redrawing\", this.tableRedraw.bind(this));\r\n\r\n\t\t\tif(this.table.options.responsiveLayout === \"collapse\"){\r\n\t\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\t\tthis.subscribe(\"row-layout\", this.layoutRow.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\ttableRedraw(force){\r\n\t\tif([\"fitColumns\", \"fitDataStretch\"].indexOf(this.layoutMode()) === -1){\r\n\t\t\tif(!force){\r\n\t\t\t\tthis.update();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeResponsivity(){\r\n\t\tvar columns = [];\r\n\r\n\t\tthis.mode = this.table.options.responsiveLayout;\r\n\t\tthis.collapseFormatter = this.table.options.responsiveLayoutCollapseFormatter || this.formatCollapsedData;\r\n\t\tthis.collapseStartOpen = this.table.options.responsiveLayoutCollapseStartOpen;\r\n\t\tthis.hiddenColumns = [];\r\n\r\n\t\t//determine level of responsivity for each column\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column, i) => {\r\n\t\t\tif(column.modules.responsive){\r\n\t\t\t\tif(column.modules.responsive.order && column.modules.responsive.visible){\r\n\t\t\t\t\tcolumn.modules.responsive.index = i;\r\n\t\t\t\t\tcolumns.push(column);\r\n\r\n\t\t\t\t\tif(!column.visible && this.mode === \"collapse\"){\r\n\t\t\t\t\t\tthis.hiddenColumns.push(column);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//sort list by responsivity\r\n\t\tcolumns = columns.reverse();\r\n\t\tcolumns = columns.sort((a, b) => {\r\n\t\t\tvar diff = b.modules.responsive.order - a.modules.responsive.order;\r\n\t\t\treturn diff || (b.modules.responsive.index - a.modules.responsive.index);\r\n\t\t});\r\n\r\n\t\tthis.columns = columns;\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tthis.generateCollapsedContent();\r\n\t\t}\r\n\r\n\t\t//assign collapse column\r\n\t\tfor (let col of this.table.columnManager.columnsByIndex){\r\n\t\t\tif(col.definition.formatter == \"responsiveCollapse\"){\r\n\t\t\t\tthis.collapseHandleColumn = col;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.collapseHandleColumn){\r\n\t\t\tif(this.hiddenColumns.length){\r\n\t\t\t\tthis.collapseHandleColumn.show();\r\n\t\t\t}else{\r\n\t\t\t\tthis.collapseHandleColumn.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//define layout information\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.getDefinition();\r\n\r\n\t\tcolumn.modules.responsive = {order: typeof def.responsive === \"undefined\" ? 1 : def.responsive, visible:def.visible === false ? false : true};\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar el;\r\n\r\n\t\tif(row.type !== \"calc\"){\r\n\t\t\tel = document.createElement(\"div\");\r\n\t\t\tel.classList.add(\"tabulator-responsive-collapse\");\r\n\r\n\t\t\trow.modules.responsiveLayout = {\r\n\t\t\t\telement:el,\r\n\t\t\t\topen:this.collapseStartOpen,\r\n\t\t\t};\r\n\r\n\t\t\tif(!this.collapseStartOpen){\r\n\t\t\t\tel.style.display = 'none';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tlayoutRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tif(row.modules.responsiveLayout){\r\n\t\t\trowEl.appendChild(row.modules.responsiveLayout.element);\r\n\t\t\tthis.generateCollapsedRowContent(row);\r\n\t\t}\r\n\t}\r\n\r\n\t//update column visibility\r\n\tupdateColumnVisibility(column, responsiveToggle){\r\n\t\tif(!responsiveToggle && column.modules.responsive){\r\n\t\t\tcolumn.modules.responsive.visible = column.visible;\r\n\t\t\tthis.initializeResponsivity();\r\n\t\t}\r\n\t}\r\n\r\n\thideColumn(column){\r\n\t\tvar colCount = this.hiddenColumns.length;\r\n\r\n\t\tcolumn.hide(false, true);\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tthis.hiddenColumns.unshift(column);\r\n\t\t\tthis.generateCollapsedContent();\r\n\r\n\t\t\tif(this.collapseHandleColumn && !colCount){\r\n\t\t\t\tthis.collapseHandleColumn.show();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tshowColumn(column){\r\n\t\tvar index;\r\n\r\n\t\tcolumn.show(false, true);\r\n\t\t//set column width to prevent calculation loops on uninitialized columns\r\n\t\tcolumn.setWidth(column.getWidth());\r\n\r\n\t\tif(this.mode === \"collapse\"){\r\n\t\t\tindex = this.hiddenColumns.indexOf(column);\r\n\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.hiddenColumns.splice(index, 1);\r\n\t\t\t}\r\n\r\n\t\t\tthis.generateCollapsedContent();\r\n\r\n\t\t\tif(this.collapseHandleColumn && !this.hiddenColumns.length){\r\n\t\t\t\tthis.collapseHandleColumn.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//redraw columns to fit space\r\n\tupdate(){\r\n\t\tvar self = this,\r\n\t\tworking = true;\r\n\r\n\t\twhile(working){\r\n\r\n\t\t\tlet width = self.table.modules.layout.getMode() == \"fitColumns\" ? self.table.columnManager.getFlexBaseWidth() : self.table.columnManager.getWidth();\r\n\r\n\t\t\tlet diff = (self.table.options.headerVisible ? self.table.columnManager.element.clientWidth : self.table.element.clientWidth) - width;\r\n\r\n\t\t\tif(diff < 0){\r\n\t\t\t\t//table is too wide\r\n\t\t\t\tlet column = self.columns[self.index];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tself.hideColumn(column);\r\n\t\t\t\t\tself.index ++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tworking = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\r\n\t\t\t\t//table has spare space\r\n\t\t\t\tlet column = self.columns[self.index -1];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tif(diff > 0){\r\n\t\t\t\t\t\tif(diff >= column.getWidth()){\r\n\t\t\t\t\t\t\tself.showColumn(column);\r\n\t\t\t\t\t\t\tself.index --;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tworking = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tworking = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(!self.table.rowManager.activeRowsCount){\r\n\t\t\t\tself.table.rowManager.renderEmptyScroll();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateCollapsedContent(){\r\n\t\tvar self = this,\r\n\t\trows = this.table.rowManager.getDisplayRows();\r\n\r\n\t\trows.forEach(function(row){\r\n\t\t\tself.generateCollapsedRowContent(row);\r\n\t\t});\r\n\t}\r\n\r\n\tgenerateCollapsedRowContent(row){\r\n\t\tvar el, contents;\r\n\r\n\t\tif(row.modules.responsiveLayout){\r\n\t\t\tel = row.modules.responsiveLayout.element;\r\n\r\n\t\t\twhile(el.firstChild) el.removeChild(el.firstChild);\r\n\r\n\t\t\tcontents = this.collapseFormatter(this.generateCollapsedRowData(row));\r\n\t\t\tif(contents){\r\n\t\t\t\tel.appendChild(contents);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateCollapsedRowData(row){\r\n\t\tvar self = this,\r\n\t\tdata = row.getData(),\r\n\t\toutput = [],\r\n\t\tmockCellComponent;\r\n\r\n\t\tthis.hiddenColumns.forEach(function(column){\r\n\t\t\tvar value = column.getFieldValue(data);\r\n\r\n\t\t\tif(column.definition.title && column.field){\r\n\t\t\t\tif(column.modules.format && self.table.options.responsiveLayoutCollapseUseFormatters){\r\n\r\n\t\t\t\t\tmockCellComponent = {\r\n\t\t\t\t\t\tvalue:false,\r\n\t\t\t\t\t\tdata:{},\r\n\t\t\t\t\t\tgetValue:function(){\r\n\t\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetData:function(){\r\n\t\t\t\t\t\t\treturn data;\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetElement:function(){\r\n\t\t\t\t\t\t\treturn document.createElement(\"div\");\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetRow:function(){\r\n\t\t\t\t\t\t\treturn row.getComponent();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tgetColumn:function(){\r\n\t\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tfunction onRendered(callback){\r\n\t\t\t\t\t\tcallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\toutput.push({\r\n\t\t\t\t\t\tfield: column.field,\r\n\t\t\t\t\t\ttitle: column.definition.title,\r\n\t\t\t\t\t\tvalue: column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params, onRendered)\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\toutput.push({\r\n\t\t\t\t\t\tfield: column.field,\r\n\t\t\t\t\t\ttitle: column.definition.title,\r\n\t\t\t\t\t\tvalue: value\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tformatCollapsedData(data){\r\n\t\tvar list = document.createElement(\"table\");\r\n\r\n\t\tdata.forEach(function(item){\r\n\t\t\tvar row = document.createElement(\"tr\");\r\n\t\t\tvar titleData = document.createElement(\"td\");\r\n\t\t\tvar valueData = document.createElement(\"td\");\r\n\t\t\tvar node_content;\r\n\r\n\t\t\tvar titleHighlight = document.createElement(\"strong\");\r\n\t\t\ttitleData.appendChild(titleHighlight);\r\n\t\t\tthis.langBind(\"columns|\" + item.field, function(text){\r\n\t\t\t\ttitleHighlight.innerHTML = text || item.title;\r\n\t\t\t});\r\n\r\n\t\t\tif(item.value instanceof Node){\r\n\t\t\t\tnode_content = document.createElement(\"div\");\r\n\t\t\t\tnode_content.appendChild(item.value);\r\n\t\t\t\tvalueData.appendChild(node_content);\r\n\t\t\t}else{\r\n\t\t\t\tvalueData.innerHTML = item.value;\r\n\t\t\t}\r\n\r\n\t\t\trow.appendChild(titleData);\r\n\t\t\trow.appendChild(valueData);\r\n\t\t\tlist.appendChild(row);\r\n\t\t}, this);\r\n\r\n\t\treturn Object.keys(data).length ? list : \"\";\r\n\t}\r\n}\r\n\r\nResponsiveLayout.moduleName = \"responsiveLayout\";\r\n\r\nexport default ResponsiveLayout;","import Module from '../../core/Module.js';\r\n\r\nclass SelectRow extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.selecting = false; //flag selecting in progress\r\n\t\tthis.lastClickedRow = false; //last clicked row\r\n\t\tthis.selectPrev = []; //hold previously selected element for drag drop selection\r\n\t\tthis.selectedRows = []; //hold selected rows\r\n\t\tthis.headerCheckboxElement = null; // hold header select element\r\n\t\t\r\n\t\tthis.registerTableOption(\"selectable\", \"highlight\"); //highlight rows on hover\r\n\t\tthis.registerTableOption(\"selectableRangeMode\", \"drag\"); //highlight rows on hover\r\n\t\tthis.registerTableOption(\"selectableRollingSelection\", true); //roll selection once maximum number of selectable rows is reached\r\n\t\tthis.registerTableOption(\"selectablePersistence\", true); // maintain selection when table view is updated\r\n\t\tthis.registerTableOption(\"selectableCheck\", function(data, row){return true;}); //check wheather row is selectable\r\n\t\t\r\n\t\tthis.registerTableFunction(\"selectRow\", this.selectRows.bind(this));\r\n\t\tthis.registerTableFunction(\"deselectRow\", this.deselectRows.bind(this));\r\n\t\tthis.registerTableFunction(\"toggleSelectRow\", this.toggleRow.bind(this));\r\n\t\tthis.registerTableFunction(\"getSelectedRows\", this.getSelectedRows.bind(this));\r\n\t\tthis.registerTableFunction(\"getSelectedData\", this.getSelectedData.bind(this));\r\n\t\t\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"select\", this.selectRows.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"deselect\", this.deselectRows.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"toggleSelect\", this.toggleRow.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"isSelected\", this.isRowSelected.bind(this));\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tif(this.table.options.selectable !== false){\r\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\r\n\t\t\tthis.subscribe(\"row-deleting\", this.rowDeleted.bind(this));\r\n\t\t\tthis.subscribe(\"rows-wipe\", this.clearSelectionData.bind(this));\r\n\t\t\tthis.subscribe(\"rows-retrieve\", this.rowRetrieve.bind(this));\r\n\t\t\t\r\n\t\t\tif(this.table.options.selectable && !this.table.options.selectablePersistence){\r\n\t\t\t\tthis.subscribe(\"data-refreshing\", this.deselectRows.bind(this));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trowRetrieve(type, prevValue){\r\n\t\treturn type === \"selected\" ? this.selectedRows : prevValue;\r\n\t}\r\n\t\r\n\trowDeleted(row){\r\n\t\tthis._deselectRow(row, true);\r\n\t}\r\n\t\r\n\tclearSelectionData(silent){\r\n\t\tthis.selecting = false;\r\n\t\tthis.lastClickedRow = false;\r\n\t\tthis.selectPrev = [];\r\n\t\tthis.selectedRows = [];\r\n\t\t\r\n\t\tif(silent !== true){\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRow(row){\r\n\t\tvar self = this,\r\n\t\telement = row.getElement();\r\n\t\t\r\n\t\t// trigger end of row selection\r\n\t\tvar endSelect = function(){\r\n\t\t\t\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tself.selecting = false;\r\n\t\t\t}, 50);\r\n\t\t\t\r\n\t\t\tdocument.body.removeEventListener(\"mouseup\", endSelect);\r\n\t\t};\r\n\t\t\r\n\t\trow.modules.select = {selected:false};\r\n\t\t\r\n\t\t//set row selection class\r\n\t\tif(self.table.options.selectableCheck.call(this.table, row.getComponent())){\r\n\t\t\telement.classList.add(\"tabulator-selectable\");\r\n\t\t\telement.classList.remove(\"tabulator-unselectable\");\r\n\t\t\t\r\n\t\t\tif(self.table.options.selectable && self.table.options.selectable != \"highlight\"){\r\n\t\t\t\tif(self.table.options.selectableRangeMode === \"click\"){\r\n\t\t\t\t\telement.addEventListener(\"click\", this.handleComplexRowClick.bind(this, row));\r\n\t\t\t\t}else{\r\n\t\t\t\t\telement.addEventListener(\"click\", function(e){\r\n\t\t\t\t\t\tif(!self.table.modExists(\"edit\") || !self.table.modules.edit.getCurrentCell()){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(!self.selecting){\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mousedown\", function(e){\r\n\t\t\t\t\t\tif(e.shiftKey){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.selecting = true;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.selectPrev = [];\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tdocument.body.addEventListener(\"mouseup\", endSelect);\r\n\t\t\t\t\t\t\tdocument.body.addEventListener(\"keyup\", endSelect);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mouseenter\", function(e){\r\n\t\t\t\t\t\tif(self.selecting){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\tself.toggleRow(row);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(self.selectPrev[1] == row){\r\n\t\t\t\t\t\t\t\tself.toggleRow(self.selectPrev[0]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\telement.addEventListener(\"mouseout\", function(e){\r\n\t\t\t\t\t\tif(self.selecting){\r\n\t\t\t\t\t\t\tself.table._clearSelection();\r\n\t\t\t\t\t\t\tself.selectPrev.unshift(row);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\telement.classList.add(\"tabulator-unselectable\");\r\n\t\t\telement.classList.remove(\"tabulator-selectable\");\r\n\t\t}\r\n\t}\r\n\t\r\n\thandleComplexRowClick(row, e){\r\n\t\tif(e.shiftKey){\r\n\t\t\tthis.table._clearSelection();\r\n\t\t\tthis.lastClickedRow = this.lastClickedRow || row;\r\n\t\t\t\r\n\t\t\tvar lastClickedRowIdx = this.table.rowManager.getDisplayRowIndex(this.lastClickedRow);\r\n\t\t\tvar rowIdx = this.table.rowManager.getDisplayRowIndex(row);\r\n\t\t\t\r\n\t\t\tvar fromRowIdx = lastClickedRowIdx <= rowIdx ? lastClickedRowIdx : rowIdx;\r\n\t\t\tvar toRowIdx = lastClickedRowIdx >= rowIdx ? lastClickedRowIdx : rowIdx;\r\n\t\t\t\r\n\t\t\tvar rows = this.table.rowManager.getDisplayRows().slice(0);\r\n\t\t\tvar toggledRows = rows.splice(fromRowIdx, toRowIdx - fromRowIdx + 1);\r\n\t\t\t\r\n\t\t\tif(e.ctrlKey || e.metaKey){\r\n\t\t\t\ttoggledRows.forEach((toggledRow)=>{\r\n\t\t\t\t\tif(toggledRow !== this.lastClickedRow){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.table.options.selectable !== true && !this.isRowSelected(row)){\r\n\t\t\t\t\t\t\tif(this.selectedRows.length < this.table.options.selectable){\r\n\t\t\t\t\t\t\t\tthis.toggleRow(toggledRow);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.toggleRow(toggledRow);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tthis.lastClickedRow = row;\r\n\t\t\t}else{\r\n\t\t\t\tthis.deselectRows(undefined, true);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.selectable !== true){\r\n\t\t\t\t\tif(toggledRows.length > this.table.options.selectable){\r\n\t\t\t\t\t\ttoggledRows = toggledRows.slice(0, this.table.options.selectable)\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.selectRows(toggledRows);\r\n\t\t\t}\r\n\t\t\tthis.table._clearSelection();\r\n\t\t}\r\n\t\telse if(e.ctrlKey || e.metaKey){\r\n\t\t\tthis.toggleRow(row);\r\n\t\t\tthis.lastClickedRow = row;\r\n\t\t}else{\r\n\t\t\tthis.deselectRows(undefined, true);\r\n\t\t\tthis.selectRows(row);\r\n\t\t\tthis.lastClickedRow = row;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//toggle row selection\r\n\ttoggleRow(row){\r\n\t\tif(this.table.options.selectableCheck.call(this.table, row.getComponent())){\r\n\t\t\tif(row.modules.select && row.modules.select.selected){\r\n\t\t\t\tthis._deselectRow(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis._selectRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//select a number of rows\r\n\tselectRows(rows){\r\n\t\tvar rowMatch;\r\n\t\t\r\n\t\tswitch(typeof rows){\r\n\t\t\tcase \"undefined\":\r\n\t\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"string\":\r\n\t\t\t\r\n\t\t\trowMatch = this.table.rowManager.findRow(rows);\r\n\t\t\t\r\n\t\t\tif(rowMatch){\r\n\t\t\t\tthis._selectRow(rowMatch, true, true);\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.rowManager.getRows(rows).forEach((row) => {\r\n\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._rowSelectionChanged();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\tif(Array.isArray(rows)){\r\n\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis._rowSelectionChanged();\r\n\t\t\t}else{\r\n\t\t\t\tthis._selectRow(rows, false, true);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//select an individual row\r\n\t_selectRow(rowInfo, silent, force){\r\n\t\tvar index;\r\n\t\t\r\n\t\t//handle max row count\r\n\t\tif(!isNaN(this.table.options.selectable) && this.table.options.selectable !== true && !force){\r\n\t\t\tif(this.selectedRows.length >= this.table.options.selectable){\r\n\t\t\t\tif(this.table.options.selectableRollingSelection){\r\n\t\t\t\t\tthis._deselectRow(this.selectedRows[0]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tvar row = this.table.rowManager.findRow(rowInfo);\r\n\t\t\r\n\t\tif(row){\r\n\t\t\tif(this.selectedRows.indexOf(row) == -1){\r\n\t\t\t\trow.getElement().classList.add(\"tabulator-selected\");\r\n\t\t\t\tif(!row.modules.select){\r\n\t\t\t\t\trow.modules.select = {};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\trow.modules.select.selected = true;\r\n\t\t\t\tif(row.modules.select.checkboxEl){\r\n\t\t\t\t\trow.modules.select.checkboxEl.checked = true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.selectedRows.push(row);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.dataTreeSelectPropagate){\r\n\t\t\t\t\tthis.childRowSelection(row, true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatchExternal(\"rowSelected\", row.getComponent());\r\n\t\t\t\t\r\n\t\t\t\tthis._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Selection Error - No such row found, ignoring selection:\" + rowInfo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tisRowSelected(row){\r\n\t\treturn this.selectedRows.indexOf(row) !== -1;\r\n\t}\r\n\t\r\n\t//deselect a number of rows\r\n\tdeselectRows(rows, silent){\r\n\t\tvar self = this,\r\n\t\trowCount;\r\n\t\t\r\n\t\tif(typeof rows == \"undefined\"){\r\n\t\t\t\r\n\t\t\trowCount = self.selectedRows.length;\r\n\t\t\t\r\n\t\t\tfor(let i = 0; i < rowCount; i++){\r\n\t\t\t\tself._deselectRow(self.selectedRows[0], true);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(rowCount){\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tif(Array.isArray(rows)){\r\n\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\tself._deselectRow(row, true);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}else{\r\n\t\t\t\tself._deselectRow(rows, silent);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//deselect an individual row\r\n\t_deselectRow(rowInfo, silent){\r\n\t\tvar self = this,\r\n\t\trow = self.table.rowManager.findRow(rowInfo),\r\n\t\tindex;\r\n\t\t\r\n\t\tif(row){\r\n\t\t\tindex = self.selectedRows.findIndex(function(selectedRow){\r\n\t\t\t\treturn selectedRow == row;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\t\r\n\t\t\t\trow.getElement().classList.remove(\"tabulator-selected\");\r\n\t\t\t\tif(!row.modules.select){\r\n\t\t\t\t\trow.modules.select = {};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\trow.modules.select.selected = false;\r\n\t\t\t\tif(row.modules.select.checkboxEl){\r\n\t\t\t\t\trow.modules.select.checkboxEl.checked = false;\r\n\t\t\t\t}\r\n\t\t\t\tself.selectedRows.splice(index, 1);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.options.dataTreeSelectPropagate){\r\n\t\t\t\t\tthis.childRowSelection(row, false);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatchExternal(\"rowDeselected\", row.getComponent());\r\n\t\t\t\t\r\n\t\t\t\tself._rowSelectionChanged(silent);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Deselection Error - No such row found, ignoring selection:\" + rowInfo);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSelectedData(){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tthis.selectedRows.forEach(function(row){\r\n\t\t\tdata.push(row.getData());\r\n\t\t});\r\n\t\t\r\n\t\treturn data;\r\n\t}\r\n\t\r\n\tgetSelectedRows(){\r\n\t\t\r\n\t\tvar rows = [];\r\n\t\t\r\n\t\tthis.selectedRows.forEach(function(row){\r\n\t\t\trows.push(row.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t_rowSelectionChanged(silent){\r\n\t\tif(this.headerCheckboxElement){\r\n\t\t\tif(this.selectedRows.length === 0){\r\n\t\t\t\tthis.headerCheckboxElement.checked = false;\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = false;\r\n\t\t\t} else if(this.table.rowManager.rows.length === this.selectedRows.length){\r\n\t\t\t\tthis.headerCheckboxElement.checked = true;\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = false;\r\n\t\t\t} else {\r\n\t\t\t\tthis.headerCheckboxElement.indeterminate = true;\r\n\t\t\t\tthis.headerCheckboxElement.checked = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(!silent){\r\n\t\t\tthis.dispatchExternal(\"rowSelectionChanged\", this.getSelectedData(), this.getSelectedRows());\r\n\t\t}\r\n\t}\r\n\t\r\n\tregisterRowSelectCheckbox (row, element) {\r\n\t\tif(!row._row.modules.select){\r\n\t\t\trow._row.modules.select = {};\r\n\t\t}\r\n\t\t\r\n\t\trow._row.modules.select.checkboxEl = element;\r\n\t}\r\n\t\r\n\tregisterHeaderSelectCheckbox (element) {\r\n\t\tthis.headerCheckboxElement = element;\r\n\t}\r\n\t\r\n\tchildRowSelection(row, select){\r\n\t\tvar children = this.table.modules.dataTree.getChildren(row, true);\r\n\t\t\r\n\t\tif(select){\r\n\t\t\tfor(let child of children){\r\n\t\t\t\tthis._selectRow(child, true);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tfor(let child of children){\r\n\t\t\t\tthis._deselectRow(child, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nSelectRow.moduleName = \"selectRow\";\r\n\r\nexport default SelectRow;","//sort datetime\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar DT = window.DateTime || luxon.DateTime;\r\n\tvar format = params.format || \"dd/MM/yyyy HH:mm:ss\",\r\n\talignEmptyValues = params.alignEmptyValues,\r\n\temptyAlign = 0;\r\n\r\n\tif(typeof DT != \"undefined\"){\r\n\t\ta = format === \"iso\" ? DT.fromISO(String(a)) : DT.fromFormat(String(a), format);\r\n\t\tb = format === \"iso\" ? DT.fromISO(String(b)) : DT.fromFormat(String(b), format);\r\n\r\n\t\tif(!a.isValid){\r\n\t\t\temptyAlign = !b.isValid ? 0 : -1;\r\n\t\t}else if(!b.isValid){\r\n\t\t\temptyAlign = 1;\r\n\t\t}else{\r\n\t\t\t//compare valid values\r\n\t\t\treturn a - b;\r\n\t\t}\r\n\r\n\t\t//fix empty values in position\r\n\t\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\t\temptyAlign *= -1;\r\n\t\t}\r\n\r\n\t\treturn emptyAlign;\r\n\r\n\t}else{\r\n\t\tconsole.error(\"Sort Error - 'datetime' sorter is dependant on luxon.js\");\r\n\t}\r\n};","import datetime from './datetime.js';\r\n\r\n//sort date\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tif(!params.format){\r\n\t\tparams.format = \"dd/MM/yyyy\";\r\n\t}\r\n\r\n\treturn datetime.call(this, a, b, aRow, bRow, column, dir, params);\r\n};","//sort numbers\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar decimal = params.decimalSeparator;\r\n\tvar thousand = params.thousandSeparator;\r\n\tvar emptyAlign = 0;\r\n\r\n\ta = String(a);\r\n\tb = String(b);\r\n\r\n\tif(thousand){\r\n\t\ta = a.split(thousand).join(\"\");\r\n\t\tb = b.split(thousand).join(\"\");\r\n\t}\r\n\r\n\tif(decimal){\r\n\t\ta = a.split(decimal).join(\".\");\r\n\t\tb = b.split(decimal).join(\".\");\r\n\t}\r\n\r\n\ta = parseFloat(a);\r\n\tb = parseFloat(b);\r\n\r\n\t//handle non numeric values\r\n\tif(isNaN(a)){\r\n\t\temptyAlign = isNaN(b) ? 0 : -1;\r\n\t}else if(isNaN(b)){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\t\t//compare valid values\r\n\t\treturn a - b;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","import number from './sorters/number.js';\r\nimport string from './sorters/string.js';\r\nimport date from './sorters/date.js';\r\nimport time from './sorters/time.js';\r\nimport datetime from './sorters/datetime.js';\r\nimport boolean from './sorters/boolean.js';\r\nimport array from './sorters/array.js';\r\nimport exists from './sorters/exists.js';\r\nimport alphanum from './sorters/alphanum.js';\r\n\r\nexport default {\r\n\tnumber:number,\r\n\tstring:string,\r\n\tdate:date,\r\n\ttime:time,\r\n\tdatetime:datetime,\r\n\tboolean:boolean,\r\n\tarray:array,\r\n\texists:exists,\r\n\talphanum:alphanum\r\n};","//sort strings\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\tvar locale;\r\n\r\n\t//handle empty values\r\n\tif(!a){\r\n\t\temptyAlign = !b ? 0 : -1;\r\n\t}else if(!b){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\t\t//compare valid values\r\n\t\tswitch(typeof params.locale){\r\n\t\t\tcase \"boolean\":\r\n\t\t\tif(params.locale){\r\n\t\t\t\tlocale = this.langLocale();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\tcase \"string\":\r\n\t\t\tlocale = params.locale;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn String(a).toLowerCase().localeCompare(String(b).toLowerCase(), locale);\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","import datetime from './datetime.js';\r\n\r\n//sort times\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tif(!params.format){\r\n\t\tparams.format = \"HH:mm\";\r\n\t}\r\n\r\n\treturn datetime.call(this, a, b, aRow, bRow, column, dir, params);\r\n};","//sort booleans\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = a === true || a === \"true\" || a === \"True\" || a === 1 ? 1 : 0;\r\n\tvar el2 = b === true || b === \"true\" || b === \"True\" || b === 1 ? 1 : 0;\r\n\r\n\treturn el1 - el2;\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultSorters from './defaults/sorters.js';\r\n\r\nclass Sort extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t \tthis.sortList = []; //holder current sort\r\n\t \tthis.changed = false; //has the sort changed since last render\r\n\r\n\t \tthis.registerTableOption(\"sortMode\", \"local\"); //local or remote sorting\r\n\r\n\t \tthis.registerTableOption(\"initialSort\", false); //initial sorting criteria\r\n\t \tthis.registerTableOption(\"columnHeaderSortMulti\", true); //multiple or single column sorting\r\n\t \tthis.registerTableOption(\"sortOrderReverse\", false); //reverse internal sort ordering\r\n\t \tthis.registerTableOption(\"headerSortElement\", \"
\"); //header sort element\r\n\r\n\t \tthis.registerColumnOption(\"sorter\");\r\n\t \tthis.registerColumnOption(\"sorterParams\");\r\n\r\n\t \tthis.registerColumnOption(\"headerSort\", true);\r\n\t \tthis.registerColumnOption(\"headerSortStartingDir\");\r\n\t \tthis.registerColumnOption(\"headerSortTristate\");\r\n\r\n\t }\r\n\r\n\t initialize(){\r\n\t \tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\r\n\t \tthis.subscribe(\"table-built\", this.tableBuilt.bind(this));\r\n\t \tthis.registerDataHandler(this.sort.bind(this), 20);\r\n\r\n\t \tthis.registerTableFunction(\"setSort\", this.userSetSort.bind(this));\r\n\t \tthis.registerTableFunction(\"getSorters\", this.getSort.bind(this));\r\n\t \tthis.registerTableFunction(\"clearSort\", this.clearSort.bind(this));\r\n\r\n\t \tif(this.table.options.sortMode === \"remote\"){\r\n\t \t\tthis.subscribe(\"data-params\", this.remoteSortParams.bind(this));\r\n\t \t}\r\n\t }\r\n\r\n\t tableBuilt(){\r\n\t \tif(this.table.options.initialSort){\r\n\t \t\tthis.setSort(this.table.options.initialSort);\r\n\t \t}\r\n\t }\r\n\r\n\t remoteSortParams(data, config, silent, params){\r\n\t \tvar sorters = this.getSort();\r\n\r\n\t \tsorters.forEach((item) => {\r\n\t \t\tdelete item.column;\r\n\t \t});\r\n\r\n\t \tparams.sort = sorters;\r\n\r\n\t \treturn params;\r\n\t }\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tuserSetSort(sortList, dir){\r\n\t\tthis.setSort(sortList, dir);\r\n\t\t// this.table.rowManager.sorterRefresh();\r\n\t\tthis.refreshSort();\r\n\t}\r\n\r\n\tclearSort(){\r\n\t\tthis.clear();\r\n\t\t// this.table.rowManager.sorterRefresh();\r\n\t\tthis.refreshSort();\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\t//initialize column header for sorting\r\n\tinitializeColumn(column){\r\n\t\tvar sorter = false,\r\n\t\tcolEl,\r\n\t\tarrowEl;\r\n\r\n\t\tswitch(typeof column.definition.sorter){\r\n\t\t\tcase \"string\":\r\n\t\t\tif(Sort.sorters[column.definition.sorter]){\r\n\t\t\t\tsorter = Sort.sorters[column.definition.sorter];\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Sort Error - No such sorter found: \", column.definition.sorter);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\tsorter = column.definition.sorter;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tcolumn.modules.sort = {\r\n\t\t\tsorter:sorter, dir:\"none\",\r\n\t\t\tparams:column.definition.sorterParams || {},\r\n\t\t\tstartingDir:column.definition.headerSortStartingDir || \"asc\",\r\n\t\t\ttristate: column.definition.headerSortTristate,\r\n\t\t};\r\n\r\n\t\tif(column.definition.headerSort !== false){\r\n\r\n\t\t\tcolEl = column.getElement();\r\n\r\n\t\t\tcolEl.classList.add(\"tabulator-sortable\");\r\n\r\n\r\n\t\t\tarrowEl = document.createElement(\"div\");\r\n\t\t\tarrowEl.classList.add(\"tabulator-col-sorter\");\r\n\r\n\t\t\tif(typeof this.table.options.headerSortElement == \"object\"){\r\n\t\t\t\tarrowEl.appendChild(this.table.options.headerSortElement);\r\n\t\t\t}else{\r\n\t\t\t\tarrowEl.innerHTML = this.table.options.headerSortElement;\r\n\t\t\t}\r\n\r\n\t\t\t//create sorter arrow\r\n\t\t\tcolumn.titleHolderElement.appendChild(arrowEl);\r\n\r\n\t\t\tcolumn.modules.sort.element = arrowEl;\r\n\r\n\t\t\t//sort on click\r\n\t\t\tcolEl.addEventListener(\"click\", (e) => {\r\n\t\t\t\tvar dir = \"\",\r\n\t\t\t\tsorters=[],\r\n\t\t\t\tmatch = false;\r\n\r\n\t\t\t\tif(column.modules.sort){\r\n\t\t\t\t\tif(column.modules.sort.tristate){\r\n\t\t\t\t\t\tif(column.modules.sort.dir == \"none\"){\r\n\t\t\t\t\t\t\tdir = column.modules.sort.startingDir;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(column.modules.sort.dir == column.modules.sort.startingDir){\r\n\t\t\t\t\t\t\t\tdir = column.modules.sort.dir == \"asc\" ? \"desc\" : \"asc\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tdir = \"none\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswitch(column.modules.sort.dir){\r\n\t\t\t\t\t\t\tcase \"asc\":\r\n\t\t\t\t\t\t\tdir = \"desc\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tcase \"desc\":\r\n\t\t\t\t\t\t\tdir = \"asc\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tdir = column.modules.sort.startingDir;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\tif (this.table.options.columnHeaderSortMulti && (e.shiftKey || e.ctrlKey)) {\r\n\t\t\t\t\t\tsorters = this.getSort();\r\n\r\n\t\t\t\t\t\tmatch = sorters.findIndex((sorter) => {\r\n\t\t\t\t\t\t\treturn sorter.field === column.getField();\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tif(match > -1){\r\n\t\t\t\t\t\t\tsorters[match].dir = dir;\r\n\r\n\t\t\t\t\t\t\tif(match != sorters.length -1){\r\n\t\t\t\t\t\t\t\tmatch = sorters.splice(match, 1)[0];\r\n\t\t\t\t\t\t\t\tif(dir != \"none\"){\r\n\t\t\t\t\t\t\t\t\tsorters.push(match);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(dir != \"none\"){\r\n\t\t\t\t\t\t\t\tsorters.push({column:column, dir:dir});\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t//add to existing sort\r\n\t\t\t\t\t\tthis.setSort(sorters);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(dir == \"none\"){\r\n\t\t\t\t\t\t\tthis.clear();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t//sort by column only\r\n\t\t\t\t\t\t\tthis.setSort(column, dir);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// this.table.rowManager.sorterRefresh(!this.sortList.length);\r\n\t\t\t\t\tthis.refreshSort();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\trefreshSort(){\r\n\t\tif(this.table.options.sortMode === \"remote\"){\r\n\t\t\tthis.reloadData();\r\n\t\t}else{\r\n\t\t\tthis.refreshData(true);\r\n\t\t}\r\n\r\n\t\t//TODO - Persist left position of row manager\r\n\t\t// left = this.scrollLeft;\r\n\t\t// this.scrollHorizontal(left);\r\n\t}\r\n\r\n\t//check if the sorters have changed since last use\r\n\thasChanged(){\r\n\t\tvar changed = this.changed;\r\n\t\tthis.changed = false;\r\n\t\treturn changed;\r\n\t}\r\n\r\n\t//return current sorters\r\n\tgetSort(){\r\n\t\tvar self = this,\r\n\t\tsorters = [];\r\n\r\n\t\tself.sortList.forEach(function(item){\r\n\t\t\tif(item.column){\r\n\t\t\t\tsorters.push({column:item.column.getComponent(), field:item.column.getField(), dir:item.dir});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn sorters;\r\n\t}\r\n\r\n\t//change sort list and trigger sort\r\n\tsetSort(sortList, dir){\r\n\t\tvar self = this,\r\n\t\tnewSortList = [];\r\n\r\n\t\tif(!Array.isArray(sortList)){\r\n\t\t\tsortList = [{column: sortList, dir:dir}];\r\n\t\t}\r\n\r\n\t\tsortList.forEach(function(item){\r\n\t\t\tvar column;\r\n\r\n\t\t\tcolumn = self.table.columnManager.findColumn(item.column);\r\n\r\n\t\t\tif(column){\r\n\t\t\t\titem.column = column;\r\n\t\t\t\tnewSortList.push(item);\r\n\t\t\t\tself.changed = true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Sort Warning - Sort field does not exist and is being ignored: \", item.column);\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\t\tself.sortList = newSortList;\r\n\r\n\t\tthis.dispatch(\"sort-changed\");\r\n\t}\r\n\r\n\t//clear sorters\r\n\tclear(){\r\n\t\tthis.setSort([]);\r\n\t}\r\n\r\n\t//find appropriate sorter for column\r\n\tfindSorter(column){\r\n\t\tvar row = this.table.rowManager.activeRows[0],\r\n\t\tsorter = \"string\",\r\n\t\tfield, value;\r\n\r\n\t\tif(row){\r\n\t\t\trow = row.getData();\r\n\t\t\tfield = column.getField();\r\n\r\n\t\t\tif(field){\r\n\r\n\t\t\t\tvalue = column.getFieldValue(row);\r\n\r\n\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){\r\n\t\t\t\t\t\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn Sort.sorters[sorter];\r\n\t}\r\n\r\n\t//work through sort list sorting data\r\n\tsort(data){\r\n\t\tvar self = this,\r\n\t\tsortList = this.table.options.sortOrderReverse ? self.sortList.slice().reverse() : self.sortList,\r\n\t\tsortListActual = [],\r\n\t\trowComponents = [],\r\n\t\tlastSort;\r\n\r\n\t\tif(this.subscribedExternal(\"dataSorting\")){\r\n\t\t\tthis.dispatchExternal(\"dataSorting\", self.getSort());\r\n\t\t}\r\n\r\n\t\tself.clearColumnHeaders();\r\n\r\n\t\tif(this.table.options.sortMode !== \"remote\"){\r\n\r\n\t\t\t//build list of valid sorters and trigger column specific callbacks before sort begins\r\n\t\t\tsortList.forEach(function(item, i){\r\n\t\t\t\tvar sortObj = item.column.modules.sort;\r\n\r\n\t\t\t\tif(item.column && sortObj){\r\n\r\n\t\t\t\t\t//if no sorter has been defined, take a guess\r\n\t\t\t\t\tif(!sortObj.sorter){\r\n\t\t\t\t\t\tsortObj.sorter = self.findSorter(item.column);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\titem.params = typeof sortObj.params === \"function\" ? sortObj.params(item.column.getComponent(), item.dir) : sortObj.params;\r\n\r\n\t\t\t\t\tsortListActual.push(item);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tself.setColumnHeader(item.column, item.dir);\r\n\t\t\t});\r\n\r\n\t\t\t//sort data\r\n\t\t\tif (sortListActual.length) {\r\n\t\t\t\tself._sortItems(data, sortListActual);\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tsortList.forEach(function(item, i){\r\n\t\t\t\tself.setColumnHeader(item.column, item.dir);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif(this.subscribedExternal(\"dataSorted\")){\r\n\t\t\tdata.forEach((row) => {\r\n\t\t\t\trowComponents.push(row.getComponent());\r\n\t\t\t});\r\n\r\n\t\t\tthis.dispatchExternal(\"dataSorted\", self.getSort(), rowComponents);\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\t//clear sort arrows on columns\r\n\tclearColumnHeaders(){\r\n\t\tthis.table.columnManager.getRealColumns().forEach(function(column){\r\n\t\t\tif(column.modules.sort){\r\n\t\t\t\tcolumn.modules.sort.dir = \"none\";\r\n\t\t\t\tcolumn.getElement().setAttribute(\"aria-sort\", \"none\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//set the column header sort direction\r\n\tsetColumnHeader(column, dir){\r\n\t\tcolumn.modules.sort.dir = dir;\r\n\t\tcolumn.getElement().setAttribute(\"aria-sort\", dir);\r\n\t}\r\n\r\n\t//sort each item in sort list\r\n\t_sortItems(data, sortList){\r\n\t\tvar sorterCount = sortList.length - 1;\r\n\r\n\t\tdata.sort((a, b) => {\r\n\t\t\tvar result;\r\n\r\n\t\t\tfor(var i = sorterCount; i>= 0; i--){\r\n\t\t\t\tlet sortItem = sortList[i];\r\n\r\n\t\t\t\tresult = this._sortRow(a, b, sortItem.column, sortItem.dir, sortItem.params);\r\n\r\n\t\t\t\tif(result !== 0){\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn result;\r\n\t\t});\r\n\t}\r\n\r\n\t//process individual rows for a sort function on active data\r\n\t_sortRow(a, b, column, dir, params){\r\n\t\tvar el1Comp, el2Comp, colComp;\r\n\r\n\t\t//switch elements depending on search direction\r\n\t\tvar el1 = dir == \"asc\" ? a : b;\r\n\t\tvar el2 = dir == \"asc\" ? b : a;\r\n\r\n\t\ta = column.getFieldValue(el1.getData());\r\n\t\tb = column.getFieldValue(el2.getData());\r\n\r\n\t\ta = typeof a !== \"undefined\" ? a : \"\";\r\n\t\tb = typeof b !== \"undefined\" ? b : \"\";\r\n\r\n\t\tel1Comp = el1.getComponent();\r\n\t\tel2Comp = el2.getComponent();\r\n\r\n\t\treturn column.modules.sort.sorter.call(this, a, b, el1Comp, el2Comp, column.getComponent(), dir, params);\r\n\t}\r\n}\r\n\r\nSort.moduleName = \"sort\";\r\n\r\n//load defaults\r\nSort.sorters = defaultSorters;\r\n\r\nexport default Sort;","//sort if element contains any data\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = 0;\r\n\tvar el2 = 0;\r\n\tvar type = params.type || \"length\";\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\r\n\tfunction calc(value){\r\n\r\n\t\tswitch(type){\r\n\t\t\tcase \"length\":\r\n\t\t\treturn value.length;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"sum\":\r\n\t\t\treturn value.reduce(function(c, d){\r\n\t\t\t\treturn c + d;\r\n\t\t\t});\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"max\":\r\n\t\t\treturn Math.max.apply(null, value) ;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"min\":\r\n\t\t\treturn Math.min.apply(null, value) ;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"avg\":\r\n\t\t\treturn value.reduce(function(c, d){\r\n\t\t\t\treturn c + d;\r\n\t\t\t}) / value.length;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t//handle non array values\r\n\tif(!Array.isArray(a)){\r\n\t\talignEmptyValues = !Array.isArray(b) ? 0 : -1;\r\n\t}else if(!Array.isArray(b)){\r\n\t\talignEmptyValues = 1;\r\n\t}else{\r\n\r\n\t\t//compare valid values\r\n\t\tel1 = a ? calc(a) : 0;\r\n\t\tel2 = b ? calc(b) : 0;\r\n\r\n\t\treturn el1 - el2;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","//sort if element contains any data\r\nexport default function(a, b, aRow, bRow, column, dir, params){\r\n\tvar el1 = typeof a == \"undefined\" ? 0 : 1;\r\n\tvar el2 = typeof b == \"undefined\" ? 0 : 1;\r\n\r\n\treturn el1 - el2;\r\n};","//sort alpha numeric strings\r\nexport default function(as, bs, aRow, bRow, column, dir, params){\r\n\tvar a, b, a1, b1, i= 0, L, rx = /(\\d+)|(\\D+)/g, rd = /\\d/;\r\n\tvar alignEmptyValues = params.alignEmptyValues;\r\n\tvar emptyAlign = 0;\r\n\r\n\t//handle empty values\r\n\tif(!as && as!== 0){\r\n\t\temptyAlign = !bs && bs!== 0 ? 0 : -1;\r\n\t}else if(!bs && bs!== 0){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\r\n\t\tif(isFinite(as) && isFinite(bs)) return as - bs;\r\n\t\ta = String(as).toLowerCase();\r\n\t\tb = String(bs).toLowerCase();\r\n\t\tif(a === b) return 0;\r\n\t\tif(!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1;\r\n\t\ta = a.match(rx);\r\n\t\tb = b.match(rx);\r\n\t\tL = a.length > b.length ? b.length : a.length;\r\n\t\twhile(i < L){\r\n\t\t\ta1= a[i];\r\n\t\t\tb1= b[i++];\r\n\t\t\tif(a1 !== b1){\r\n\t\t\t\tif(isFinite(a1) && isFinite(b1)){\r\n\t\t\t\t\tif(a1.charAt(0) === \"0\") a1 = \".\" + a1;\r\n\t\t\t\t\tif(b1.charAt(0) === \"0\") b1 = \".\" + b1;\r\n\t\t\t\t\treturn a1 - b1;\r\n\t\t\t\t}\r\n\t\t\t\telse return a1 > b1 ? 1 : -1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn a.length > b.length;\r\n\t}\r\n\r\n\t//fix empty values in position\r\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\r\n\t\temptyAlign *= -1;\r\n\t}\r\n\r\n\treturn emptyAlign;\r\n};","export default {\r\n\t//is integer\r\n\tinteger: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvalue = Number(value);\r\n\t\treturn typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\r\n\t},\r\n\r\n\t//is float\r\n\tfloat: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvalue = Number(value);\r\n\t\treturn typeof value === 'number' && isFinite(value) && value % 1 !== 0;\r\n\t},\r\n\r\n\t//must be a number\r\n\tnumeric: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn !isNaN(value);\r\n\t},\r\n\r\n\t//must be a string\r\n\tstring: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn isNaN(value);\r\n\t},\r\n\r\n\t//maximum value\r\n\tmax: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn parseFloat(value) <= parameters;\r\n\t},\r\n\r\n\t//minimum value\r\n\tmin: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn parseFloat(value) >= parameters;\r\n\t},\r\n\r\n\t//starts with value\r\n\tstarts: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).toLowerCase().startsWith(String(parameters).toLowerCase());\r\n\t},\r\n\r\n\t//ends with value\r\n\tends: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).toLowerCase().endsWith(String(parameters).toLowerCase());\r\n\t},\r\n\r\n\r\n\t//minimum string length\r\n\tminLength: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).length >= parameters;\r\n\t},\r\n\r\n\t//maximum string length\r\n\tmaxLength: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn String(value).length <= parameters;\r\n\t},\r\n\r\n\t//in provided value list\r\n\tin: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif(typeof parameters == \"string\"){\r\n\t\t\tparameters = parameters.split(\"|\");\r\n\t\t}\r\n\r\n\t\treturn value === \"\" || parameters.indexOf(value) > -1;\r\n\t},\r\n\r\n\t//must match provided regex\r\n\tregex: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar reg = new RegExp(parameters);\r\n\r\n\t\treturn reg.test(value);\r\n\t},\r\n\r\n\t//value must be unique in this column\r\n\tunique: function(cell, value, parameters){\r\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar unique = true;\r\n\r\n\t\tvar cellData = cell.getData();\r\n\t\tvar column = cell.getColumn()._getSelf();\r\n\r\n\t\tthis.table.rowManager.rows.forEach(function(row){\r\n\t\t\tvar data = row.getData();\r\n\r\n\t\t\tif(data !== cellData){\r\n\t\t\t\tif(value == column.getFieldValue(data)){\r\n\t\t\t\t\tunique = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn unique;\r\n\t},\r\n\r\n\t//must have a value\r\n\trequired:function(cell, value, parameters){\r\n\t\treturn value !== \"\" && value !== null && typeof value !== \"undefined\";\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultValidators from './defaults/validators.js';\r\n\r\nclass Validate extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.invalidCells = [];\r\n\r\n\t\tthis.registerTableOption(\"validationMode\", \"blocking\");\r\n\r\n\t\tthis.registerColumnOption(\"validator\");\r\n\r\n\t\tthis.registerTableFunction(\"getInvalidCells\", this.getInvalidCells.bind(this));\r\n\t\tthis.registerTableFunction(\"clearCellValidation\", this.userClearCellValidation.bind(this));\r\n\t\tthis.registerTableFunction(\"validate\", this.userValidate.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"isValid\", this.cellIsValid.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"clearValidation\", this.clearValidation.bind(this));\r\n\t\tthis.registerComponentFunction(\"cell\", \"validate\", this.cellValidate.bind(this));\r\n\r\n\t\tthis.registerComponentFunction(\"column\", \"validate\", this.columnValidate.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"validate\", this.rowValidate.bind(this));\r\n\t}\r\n\r\n\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"cell-delete\", this.clearValidation.bind(this));\r\n\t\tthis.subscribe(\"column-layout\", this.initializeColumnCheck.bind(this));\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Cell Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\tcellIsValid(cell){\r\n\t\treturn cell.modules.validate ? !cell.modules.validate.invalid : true;\r\n\t}\r\n\r\n\tcellValidate(cell){\r\n\t\treturn this.validate(cell.column.modules.validate, cell, cell.getValue());\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Column Functions ////////\r\n\t///////////////////////////////////\r\n\r\n\tcolumnValidate(column){\r\n\t\tvar invalid = [];\r\n\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tif(!this.cellValidate(cell)){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t////////// Row Functions //////////\r\n\t///////////////////////////////////\r\n\r\n\trowValidate(row){\r\n\t\tvar invalid = [];\r\n\r\n\t\trow.cells.forEach((cell) => {\r\n\t\t\tif(!this.cellValidate(cell)){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\r\n\tuserClearCellValidation(cells){\r\n\t\tif(!cells){\r\n\t\t\tcells = this.getInvalidCells();\r\n\t\t}\r\n\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\r\n\t\tcells.forEach((cell) => {\r\n\t\t\tthis.clearValidation(cell._getSelf());\r\n\t\t});\r\n\t}\r\n\r\n\tuserValidate(cells){\r\n\t\tvar output = [];\r\n\r\n\t\t//clear row data\r\n\t\tthis.table.rowManager.rows.forEach((row) => {\r\n\t\t\trow = row.getComponent();\r\n\r\n\t\t\tvar valid = row.validate();\r\n\r\n\t\t\tif(valid !== true){\r\n\t\t\t\toutput = output.concat(valid);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output.length ? output : true;\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\r\n\tinitializeColumnCheck(column){\r\n\t\tif(typeof column.definition.validator !== \"undefined\"){\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t}\r\n\t}\r\n\r\n\t//validate\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = [],\r\n\t\tvalidator;\r\n\r\n\t\tif(column.definition.validator){\r\n\r\n\t\t\tif(Array.isArray(column.definition.validator)){\r\n\t\t\t\tcolumn.definition.validator.forEach((item) => {\r\n\t\t\t\t\tvalidator = self._extractValidator(item);\r\n\r\n\t\t\t\t\tif(validator){\r\n\t\t\t\t\t\tconfig.push(validator);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t}else{\r\n\t\t\t\tvalidator = this._extractValidator(column.definition.validator);\r\n\r\n\t\t\t\tif(validator){\r\n\t\t\t\t\tconfig.push(validator);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcolumn.modules.validate = config.length ? config : false;\r\n\t\t}\r\n\t}\r\n\r\n\t_extractValidator(value){\r\n\t\tvar type, params, pos;\r\n\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\tpos = value.indexOf(':');\r\n\r\n\t\t\tif(pos > -1){\r\n\t\t\t\ttype = value.substring(0,pos);\r\n\t\t\t\tparams = value.substring(pos+1);\r\n\t\t\t}else{\r\n\t\t\t\ttype = value;\r\n\t\t\t}\r\n\r\n\t\t\treturn this._buildValidator(type, params);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\treturn this._buildValidator(value);\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"object\":\r\n\t\t\treturn this._buildValidator(value.type, value.parameters);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t_buildValidator(type, params){\r\n\r\n\t\tvar func = typeof type == \"function\" ? type : Validate.validators[type];\r\n\r\n\t\tif(!func){\r\n\t\t\tconsole.warn(\"Validator Setup Error - No matching validator found:\", type);\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn {\r\n\t\t\t\ttype:typeof type == \"function\" ? \"function\" : type,\r\n\t\t\t\tfunc:func,\r\n\t\t\t\tparams:params,\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\tvalidate(validators, cell, value){\r\n\t\tvar self = this,\r\n\t\tvalid = [],\r\n\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\r\n\t\tif(validators){\r\n\t\t\tvalidators.forEach((item) => {\r\n\t\t\t\tif(!item.func.call(self, cell.getComponent(), value, item.params)){\r\n\t\t\t\t\tvalid.push({\r\n\t\t\t\t\t\ttype:item.type,\r\n\t\t\t\t\t\tparameters:item.params\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tvalid = valid.length ? valid : true;\r\n\r\n\t\tif(!cell.modules.validate){\r\n\t\t\tcell.modules.validate = {};\r\n\t\t}\r\n\r\n\t\tif(valid === true){\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\r\n\t\t\tif(invalidIndex > -1){\r\n\t\t\t\tthis.invalidCells.splice(invalidIndex, 1);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcell.modules.validate.invalid = true;\r\n\r\n\t\t\tif(this.table.options.validationMode !== \"manual\"){\r\n\t\t\t\tcell.getElement().classList.add(\"tabulator-validation-fail\");\r\n\t\t\t}\r\n\r\n\t\t\tif(invalidIndex == -1){\r\n\t\t\t\tthis.invalidCells.push(cell);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn valid;\r\n\t}\r\n\r\n\tgetInvalidCells(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.invalidCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tclearValidation(cell){\r\n\t\tvar invalidIndex;\r\n\r\n\t\tif(cell.modules.validate && cell.modules.validate.invalid){\r\n\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\r\n\t\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\r\n\t\t\tif(invalidIndex > -1){\r\n\t\t\t\tthis.invalidCells.splice(invalidIndex, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nValidate.moduleName = \"validate\";\r\n\r\n//load defaults\r\nValidate.validators = defaultValidators;\r\n\r\nexport default Validate;","export default {\r\n\r\n\tdebugEventsExternal:false, //flag to console log events\r\n\tdebugEventsInternal:false, //flag to console log events\r\n\tdebugInvalidOptions:true, //allow toggling of invalid option warnings\r\n\r\n\theight:false, //height of tabulator\r\n\tminHeight:false, //minimum height of tabulator\r\n\tmaxHeight:false, //maximum height of tabulator\r\n\r\n\tcolumnHeaderVertAlign:\"top\", //vertical alignment of column headers\r\n\r\n\tcolumns:[],//store for colum header info\r\n\tcolumnDefaults:{}, //store column default props\r\n\r\n\tdata:false, //default starting data\r\n\r\n\tautoColumns:false, //build columns from data row structure\r\n\tautoColumnsDefinitions:false,\r\n\r\n\tnestedFieldSeparator:\".\", //separator for nested data\r\n\r\n\ttooltipGenerationMode:\"load\", //when to generate tooltips\r\n\r\n\tfooterElement:false, //hold footer element\r\n\r\n\tindex:\"id\", //filed for row index\r\n\r\n\ttextDirection:\"auto\",\r\n\r\n\taddRowPos:\"bottom\", //position to insert blank rows, top|bottom\r\n\r\n\theaderVisible:true, //hide header\r\n\r\n\trenderVertical:\"virtual\",\r\n\trenderHorizontal:\"basic\",\r\n\trenderVerticalBuffer:0, // set virtual DOM buffer size\r\n\r\n\tscrollToRowPosition:\"top\",\r\n\tscrollToRowIfVisible:true,\r\n\r\n\tscrollToColumnPosition:\"left\",\r\n\tscrollToColumnIfVisible:true,\r\n\r\n\trowFormatter:false,\r\n\trowFormatterPrint:null,\r\n\trowFormatterClipboard:null,\r\n\trowFormatterHtmlOutput:null,\r\n\r\n\tplaceholder:false,\r\n\r\n\tdataLoader:true,\r\n\tdataLoaderLoading:false,\r\n\tdataLoaderError:false,\r\n\tdataLoaderErrorTimeout:3000,\r\n\r\n\tdataSendParams:{},\r\n\r\n\tdataReceiveParams:{},\r\n}\r\n","export default class OptionsList {\r\n\tconstructor(table, msgType, defaults = {}){\r\n\t\tthis.table = table;\r\n\t\tthis.msgType = msgType;\r\n\t\tthis.registeredDefaults = Object.assign({}, defaults)\r\n\t}\r\n\r\n\tregister(option, value){\r\n\t\tthis.registeredDefaults[option] = value;\r\n\t}\r\n\r\n\tgenerate(defaultOptions, userOptions = {}){\r\n\t\tvar output = Object.assign({}, this.registeredDefaults);\r\n\r\n\t\tObject.assign(output, defaultOptions);\r\n\r\n\t\tif(userOptions.debugInvalidOptions !== false || this.table.options.debugInvalidOptions){\r\n\t\t\tfor (var key in userOptions){\r\n\t\t\t\tif(!output.hasOwnProperty(key)){\r\n\t\t\t\t\tconsole.warn(\"Invalid \" + this.msgType + \" option:\", key)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var key in output){\r\n\t\t\tif(key in userOptions){\r\n\t\t\t\toutput[key] = userOptions[key];\r\n\t\t\t}else{\r\n\t\t\t\tif(Array.isArray(output[key])){\r\n\t\t\t\t\toutput[key] = Object.assign([], output[key]);\r\n\t\t\t\t}else if(typeof output[key] === \"object\" && output[key] !== null){\r\n\t\t\t\t\toutput[key] = Object.assign({}, output[key]);\r\n\t\t\t\t}else if (typeof output[key] === \"undefined\"){\r\n\t\t\t\t\tdelete output[key];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport Helpers from '../tools/Helpers.js';\r\n\r\nexport default class Renderer extends CoreFeature{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.elementVertical = table.rowManager.element;\r\n\t\tthis.elementHorizontal = table.columnManager.element;\r\n\t\tthis.tableElement = table.rowManager.tableElement;\r\n\r\n\t\tthis.verticalFillMode = \"fit\"; // used by row manager to determin how to size the render area (\"fit\" - fits container to the contents, \"fill\" - fills the contianer without resizing it)\r\n\t}\r\n\r\n\r\n\t///////////////////////////////////\r\n\t/////// Internal Bindings /////////\r\n\t///////////////////////////////////\r\n\r\n\tinitialize(){\r\n\t\t//initialize core functionality\r\n\t}\r\n\r\n\tclearRows(){\r\n\t\t//clear down existing rows layout\r\n\t}\r\n\r\n\tclearColumns(){\r\n\t\t//clear down existing columns layout\r\n\t}\r\n\r\n\r\n\treinitializeColumnWidths(columns){\r\n\t\t//resize columns to fit data\r\n\t}\r\n\r\n\r\n\trenderRows(){\r\n\t\t//render rows from a clean slate\r\n\t}\r\n\r\n\trenderColumns(){\r\n\t\t//render columns from a clean slate\r\n\t}\r\n\r\n\trerenderRows(callback){\r\n\t\t// rerender rows and keep position\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\t}\r\n\r\n\trerenderColumns(update, blockRedraw){\r\n\t\t//rerender columns\r\n\t}\r\n\r\n\trenderRowCells(row){\r\n\t\t//render the cells in a row\r\n\t}\r\n\r\n\trerenderRowCells(row, force){\r\n\t\t//rerender the cells in a row\r\n\t}\r\n\r\n\tscrollColumns(left, dir){\r\n\t\t//handle horizontal scrolling\r\n\t}\r\n\r\n\tscrollRows(top, dir){\r\n\t\t//handle vertical scolling\r\n\t}\r\n\r\n\tresize(){\r\n\t\t//container has rezied, carry out any needed recalculations (DO NOT RERENDER IN THIS FUNCTION)\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\t//scroll to a specific row\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\t//determine weather the row is nearest the top or bottom of the table, retur true for top or false for bottom\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\t//return the visible rows\r\n\t\treturn [];\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t//////// Helper Functions /////////\r\n\t///////////////////////////////////\r\n\r\n\trows(){\r\n\t\treturn this.table.rowManager.getDisplayRows();\r\n\t}\r\n\r\n\tstyleRow(row, index){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tif(index % 2){\r\n\t\t\trowEl.classList.add(\"tabulator-row-even\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-odd\");\r\n\t\t}else{\r\n\t\t\trowEl.classList.add(\"tabulator-row-odd\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-even\");\r\n\t\t}\r\n\t}\r\n\r\n\t///////////////////////////////////\r\n\t/////// External Triggers /////////\r\n\t/////// (DO NOT OVERRIDE) /////////\r\n\t///////////////////////////////////\r\n\r\n\tclear(){\r\n\t\t//clear down existing layout\r\n\t\tthis.clearRows();\r\n\t\tthis.clearColumns();\r\n\t}\r\n\r\n\trender(){\r\n\t\t//render from a clean slate\r\n\t\tthis.renderRows();\r\n\t\tthis.renderColumns();\r\n\t}\r\n\r\n\trerender(callback){\r\n\t\t// rerender and keep position\r\n\t\tthis.rerenderRows();\r\n\t\tthis.rerenderColumns();\r\n\t}\r\n\r\n\tscrollToRowPosition(row, position, ifVisible){\r\n\t\tvar rowIndex = this.rows().indexOf(row),\r\n\t\trowEl = row.getElement(),\r\n\t\toffset = 0;\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tif(rowIndex > -1){\r\n\r\n\t\t\t\tif(typeof ifVisible === \"undefined\"){\r\n\t\t\t\t\tifVisible = this.table.options.scrollToRowIfVisible;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//check row visibility\r\n\t\t\t\tif(!ifVisible){\r\n\t\t\t\t\tif(Helpers.elVisible(rowEl)){\r\n\t\t\t\t\t\toffset = Helpers.elOffset(rowEl).top - Helpers.elOffset(this.elementVertical).top;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(offset > 0 && offset < this.elementVertical.clientHeight - rowEl.offsetHeight){\r\n\t\t\t\t\t\t\tresolve();\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(typeof position === \"undefined\"){\r\n\t\t\t\t\tposition = this.table.options.scrollToRowPosition;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(position === \"nearest\"){\r\n\t\t\t\t\tposition = this.scrollToRowNearestTop(row) ? \"top\" : \"bottom\"\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//scroll to row\r\n\t\t\t\tthis.scrollToRow(row);\r\n\r\n\t\t\t\t//align to correct position\r\n\t\t\t\tswitch(position){\r\n\t\t\t\t\tcase \"middle\":\r\n\t\t\t\t\tcase \"center\":\r\n\r\n\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop + (rowEl.offsetTop - this.elementVertical.scrollTop) - ((this.elementVertical.scrollHeight - rowEl.offsetTop) / 2);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.clientHeight / 2);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"bottom\":\r\n\r\n\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.scrollHeight - rowEl.offsetTop) + rowEl.offsetHeight;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - this.elementVertical.clientHeight + rowEl.offsetHeight;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresolve();\r\n\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - Row not visible\");\r\n\t\t\t\treject(\"Scroll Error - Row not visible\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class BaiscHorizontal extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t}\r\n\r\n\trenderRowCells(row){\r\n\t\trow.cells.forEach((cell) => {\r\n\t\t\trow.element.appendChild(cell.getElement());\r\n\t\t\tcell.cellRendered();\r\n\t\t});\r\n\t}\r\n\r\n\treinitializeColumnWidths(columns){\r\n\t\tcolumns.forEach(function(column){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t});\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class VirtualDomHorizontal extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.leftCol = 0;\r\n\t\tthis.rightCol = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = 0;\r\n\t\tthis.vDomScrollPosRight = 0;\r\n\t\t\r\n\t\tthis.vDomPadLeft = 0;\r\n\t\tthis.vDomPadRight = 0;\r\n\t\t\r\n\t\tthis.fitDataColAvg = 0;\r\n\t\t\r\n\t\tthis.windowBuffer = 200; //pixel margin to make column visible before it is shown on screen\r\n\t\t\r\n\t\tthis.visibleRows = null;\r\n\r\n\t\tthis.initialized = false;\r\n\t\tthis.isFitData = false;\r\n\t\t\r\n\t\tthis.columns = [];\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.compatibilityCheck();\r\n\t\tthis.layoutCheck();\r\n\t\tthis.vertScrollListen();\r\n\t}\r\n\t\r\n\tcompatibilityCheck(){\r\n\t\tvar columns = this.options(\"columns\"),\r\n\t\tfrozen = false,\r\n\t\tok = true;\r\n\t\t\r\n\t\tif(this.options(\"layout\") == \"fitDataTable\"){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with fitDataTable layout mode\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.options(\"responsiveLayout\")){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with responsive columns\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.options(\"rtl\")){\r\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not currently compatible with RTL text direction\");\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\t\r\n\t\tif(columns){\r\n\t\t\tfrozen = columns.find((col) => {\r\n\t\t\t\treturn col.frozen;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(frozen){\r\n\t\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with frozen columns\");\r\n\t\t\t\tok = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// if(!ok){\r\n\t\t// \toptions.virtualDomHoz = false;\r\n\t\t// }\r\n\t\t\r\n\t\treturn ok;\r\n\t}\r\n\t\r\n\tlayoutCheck(){\r\n\t\tthis.isFitData = this.options(\"layout\").startsWith('fitData');\r\n\t}\r\n\r\n\tvertScrollListen(){\r\n\t\tthis.subscribe(\"scroll-vertical\", this.clearVisRowCache.bind(this));\r\n\t\tthis.subscribe(\"data-refreshed\", this.clearVisRowCache.bind(this));\r\n\t}\r\n\r\n\tclearVisRowCache(){\r\n\t\tthis.visibleRows = null;\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t///////// Public Functions ///////////\r\n\t//////////////////////////////////////\r\n\t\r\n\trenderColumns(row, force){\r\n\t\tthis.dataChange();\r\n\t}\r\n\r\n\t\r\n\tscrollColumns(left, dir){\r\n\t\tif(this.scrollLeft != left){\r\n\t\t\tthis.scrollLeft = left;\r\n\t\t\t\r\n\t\t\tthis.scroll(left - (this.vDomScrollPosLeft + this.windowBuffer));\r\n\t\t}\r\n\t}\r\n\t\r\n\tcalcWindowBuffer(){\r\n\t\tvar buffer = this.elementVertical.clientWidth;\r\n\t\t\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvar width = column.getWidth();\r\n\t\t\t\t\r\n\t\t\t\tif(width > buffer){\r\n\t\t\t\t\tbuffer = width;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.windowBuffer = buffer * 2;\r\n\t}\r\n\t\r\n\trerenderColumns(update, blockRedraw){\t\t\r\n\t\tvar old = {\r\n\t\t\tcols:this.columns,\r\n\t\t\tleftCol:this.leftCol,\r\n\t\t\trightCol:this.rightCol,\r\n\t\t},\r\n\t\tcolPos = 0;\r\n\t\t\r\n\t\t\r\n\t\tif(update && !this.initialized){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tthis.clear();\r\n\t\t\r\n\t\tthis.calcWindowBuffer();\r\n\t\t\r\n\t\tthis.scrollLeft = this.elementVertical.scrollLeft;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = this.scrollLeft - this.windowBuffer;\r\n\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\r\n\t\t\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tvar config = {};\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\tvar width = column.getWidth();\r\n\t\t\t\t\r\n\t\t\t\tconfig.leftPos = colPos;\r\n\t\t\t\tconfig.rightPos = colPos + width;\r\n\t\t\t\t\r\n\t\t\t\tconfig.width = width;\r\n\t\t\t\t\r\n\t\t\t\tif (this.isFitData) {\r\n\t\t\t\t\tconfig.fitDataCheck = column.modules.vdomHoz ? column.modules.vdomHoz.fitDataCheck : true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif((colPos + width > this.vDomScrollPosLeft) && (colPos < this.vDomScrollPosRight)){\r\n\t\t\t\t\t//column is visible\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.leftCol == -1){\r\n\t\t\t\t\t\tthis.leftCol = this.columns.length;\r\n\t\t\t\t\t\tthis.vDomPadLeft = colPos;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.rightCol = this.columns.length;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// column is hidden\r\n\t\t\t\t\tif(this.leftCol !== -1){\r\n\t\t\t\t\t\tthis.vDomPadRight += width;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.columns.push(column);\r\n\t\t\t\t\r\n\t\t\t\tcolumn.modules.vdomHoz = config;\r\n\t\t\t\t\r\n\t\t\t\tcolPos += width;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t\r\n\t\tthis.initialized = true;\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tif(!update || this.reinitChanged(old)){\r\n\t\t\t\tthis.reinitializeRows();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.elementVertical.scrollLeft = this.scrollLeft;\r\n\t}\r\n\t\r\n\trenderRowCells(row){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.initializeRow(row);\r\n\t\t}else{\r\n\t\t\trow.cells.forEach((cell) => {\r\n\t\t\t\trow.element.appendChild(cell.getElement());\r\n\t\t\t\tcell.cellRendered();\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\trerenderRowCells(row, force){\r\n\t\tthis.reinitializeRow(row, force);\r\n\t}\r\n\t\r\n\treinitializeColumnWidths(columns){\r\n\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\r\n\t\t\tthis.columns[i].reinitializeWidth();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t//////// Internal Rendering //////////\r\n\t//////////////////////////////////////\r\n\t\r\n\tdeinitialize(){\r\n\t\tthis.initialized = false;\r\n\t}\r\n\t\r\n\tclear(){\r\n\t\tthis.columns = [];\r\n\t\t\r\n\t\tthis.leftCol = -1;\r\n\t\tthis.rightCol = 0;\r\n\t\t\r\n\t\tthis.vDomScrollPosLeft = 0;\r\n\t\tthis.vDomScrollPosRight = 0;\r\n\t\tthis.vDomPadLeft = 0;\r\n\t\tthis.vDomPadRight = 0;\r\n\t}\r\n\t\r\n\tdataChange(){\r\n\t\tvar change = false,\r\n\t\tcollsWidth = 0,\r\n\t\tcolEnd = 0,\r\n\t\tgroup, row, rowEl;\r\n\t\t\r\n\t\tif(this.isFitData){\r\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\t\tif(!column.definition.width && column.visible){\r\n\t\t\t\t\tchange = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(change){\r\n\t\t\t\tif(change && this.table.rowManager.getDisplayRows().length){\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar row = this.chain(\"rows-sample\", [1], [], () => {\r\n\t\t\t\t\t\treturn this.table.rowManager.getDisplayRows();\r\n\t\t\t\t\t})[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trowEl = row.getElement();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trow.generateCells();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.tableElement.appendChild(rowEl);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfor(var colEnd = 0; colEnd < row.cells.length; colEnd++){\r\n\t\t\t\t\t\t\tlet cell = row.cells[colEnd];\r\n\t\t\t\t\t\t\trowEl.appendChild(cell.getElement());\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcell.column.reinitializeWidth();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcollsWidth += cell.column.getWidth();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// if(collsWidth > this.vDomScrollPosRight){\r\n\t\t\t\t\t\t\t// \tbreak;\r\n\t\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// this.fitDataColAvg = Math.floor(collsWidth / (colEnd + 1));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// for(colEnd; colEnd < this.table.columnManager.columnsByIndex.length; colEnd++){\r\n\t\t\t\t\t\t// \tthis.table.columnManager.columnsByIndex[colEnd].setWidth(this.fitDataColAvg);\r\n\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.rerenderColumns(false, true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(this.options(\"layout\") === \"fitColumns\"){\r\n\t\t\t\tthis.layoutRefresh();\r\n\t\t\t\tthis.rerenderColumns(false, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitChanged(old){\r\n\t\tvar match = true;\r\n\t\t\r\n\t\tif(old.cols.length !== this.columns.length || old.leftCol !== this.leftCol || old.rightCol !== this.rightCol){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\told.cols.forEach((col, i) => {\r\n\t\t\tif(col !== this.columns[i]){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn !match;\r\n\t}\r\n\t\r\n\treinitializeRows(){\r\n\t\tvar rows = this.getVisibleRows();\r\n\t\trows.forEach((row) => {\r\n\t\t\tthis.reinitializeRow(row, true);\r\n\t\t});\r\n\t}\r\n\t\r\n\tgetVisibleRows(){\r\n\t\tif (!this.visibleRows){\r\n\t\t\tthis.visibleRows = this.table.rowManager.getVisibleRows();\r\n\t\t}\r\n\r\n\t\treturn this.visibleRows;\t\r\n\t}\r\n\t\r\n\tscroll(diff){\r\n\t\tthis.vDomScrollPosLeft += diff;\r\n\t\tthis.vDomScrollPosRight += diff;\r\n\r\n\t\tif(Math.abs(diff) > (this.windowBuffer / 2)){\r\n\t\t\tthis.rerenderColumns();\r\n\t\t}else{\r\n\t\t\tif(diff > 0){\r\n\t\t\t\t//scroll right\r\n\t\t\t\tthis.addColRight();\r\n\t\t\t\tthis.removeColLeft();\r\n\t\t\t}else{\r\n\t\t\t\t//scroll left\r\n\t\t\t\tthis.addColLeft();\r\n\t\t\t\tthis.removeColRight();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tcolPositionAdjust (start, end, diff){\r\n\t\tfor(let i = start; i < end; i++){\r\n\t\t\tlet column = this.columns[i];\r\n\t\t\t\r\n\t\t\tcolumn.modules.vdomHoz.leftPos += diff;\r\n\t\t\tcolumn.modules.vdomHoz.rightPos += diff;\r\n\t\t}\r\n\t}\r\n\t\r\n\taddColRight(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\t\r\n\t\t\tlet column = this.columns[this.rightCol + 1];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.leftPos <= this.vDomScrollPosRight){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\trow.getElement().appendChild(cell.getElement());\r\n\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.fitDataColActualWidthCheck(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.rightCol++; // Don't move this below the >= check below\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.rightCol >= (this.columns.length - 1)){\r\n\t\t\t\t\t\tthis.vDomPadRight = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomPadRight -= column.getWidth();\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\taddColLeft(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.leftCol - 1];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.rightPos >= this.vDomScrollPosLeft){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\trow.getElement().prepend(cell.getElement());\r\n\t\t\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.leftCol--; // don't move this below the <= check below\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.leftCol <= 0){ // replicating logic in addColRight\r\n\t\t\t\t\t\tthis.vDomPadLeft = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomPadLeft -= column.getWidth();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tlet diff = this.fitDataColActualWidthCheck(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(diff){\r\n\t\t\t\t\t\tthis.scrollLeft = this.elementVertical.scrollLeft = this.elementVertical.scrollLeft + diff;\r\n\t\t\t\t\t\tthis.vDomPadRight -= diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveColRight(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.rightCol];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.leftPos > this.vDomScrollPosRight){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\trow.getElement().removeChild(cell.getElement());\r\n\t\t\t\t\t\t\t} catch (ex) {\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Could not removeColRight\", ex.message)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomPadRight += column.getWidth();\r\n\t\t\t\t\tthis.rightCol --;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tremoveColLeft(){\r\n\t\tvar changes = false;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tlet column = this.columns[this.leftCol];\r\n\t\t\t\r\n\t\t\tif(column){\r\n\t\t\t\tif(column.modules.vdomHoz.rightPos < this.vDomScrollPosLeft){\r\n\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\t\t\t\t\t\r\n\t\t\t\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\trow.getElement().removeChild(cell.getElement());\r\n\t\t\t\t\t\t\t} catch (ex) {\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Could not removeColLeft\", ex.message)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.vDomPadLeft += column.getWidth();\r\n\t\t\t\t\tthis.leftCol ++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(changes){\r\n\t\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\tfitDataColActualWidthCheck(column){\r\n\t\tvar newWidth, widthDiff;\r\n\t\t\r\n\t\tif(column.modules.vdomHoz.fitDataCheck){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t\t\r\n\t\t\tnewWidth = column.getWidth();\r\n\t\t\twidthDiff = newWidth - column.modules.vdomHoz.width;\r\n\t\t\t\r\n\t\t\tif(widthDiff){\r\n\t\t\t\tcolumn.modules.vdomHoz.rightPos += widthDiff;\r\n\t\t\t\tcolumn.modules.vdomHoz.width = newWidth;\r\n\t\t\t\tthis.colPositionAdjust(this.columns.indexOf(column) + 1, this.columns.length, widthDiff);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcolumn.modules.vdomHoz.fitDataCheck = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn widthDiff;\r\n\t}\r\n\t\r\n\tinitializeRow(row){\r\n\t\tif(row.type !== \"group\"){\r\n\t\t\trow.modules.vdomHoz = {\r\n\t\t\t\tleftCol:this.leftCol,\r\n\t\t\t\trightCol:this.rightCol,\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\r\n\t\t\t\tlet column = this.columns[i];\r\n\t\t\t\t\r\n\t\t\t\tif(column && column.visible){\r\n\t\t\t\t\tlet cell = row.getCell(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\trow.getElement().appendChild(cell.getElement());\r\n\t\t\t\t\tcell.cellRendered();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitializeRow(row, force){\r\n\t\tif(row.type !== \"group\"){\r\n\t\t\tif(force || !row.modules.vdomHoz || row.modules.vdomHoz.leftCol !== this.leftCol || row.modules.vdomHoz.rightCol !== this.rightCol){\r\n\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\twhile(rowEl.firstChild) rowEl.removeChild(rowEl.firstChild);\r\n\t\t\t\t\r\n\t\t\t\tthis.initializeRow(row);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\nimport Column from './column/Column.js';\r\nimport ColumnComponent from './column/ColumnComponent.js';\r\nimport Helpers from './tools/Helpers.js';\r\nimport OptionsList from './tools/OptionsList.js';\r\n\r\nimport RendererBasicHorizontal from './rendering/renderers/BasicHorizontal.js';\r\nimport RendererVirtualDomHorizontal from './rendering/renderers/VirtualDomHorizontal.js';\r\n\r\nimport defaultColumnOptions from './column/defaults/options.js';\r\n\r\nexport default class ColumnManager extends CoreFeature {\r\n\r\n\tconstructor (table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.blockHozScrollEvent = false;\r\n\t\tthis.headersElement = null;\r\n\t\tthis.element = null ; //containing element\r\n\t\tthis.columns = []; // column definition object\r\n\t\tthis.columnsByIndex = []; //columns by index\r\n\t\tthis.columnsByField = {}; //columns by field\r\n\t\tthis.scrollLeft = 0;\r\n\t\tthis.optionsList = new OptionsList(this.table, \"column definition\", defaultColumnOptions);\r\n\r\n\t\tthis.renderer = null;\r\n\t}\r\n\r\n\t////////////// Setup Functions /////////////////\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeRenderer();\r\n\r\n\t\tthis.headersElement = this.createHeadersElement();\r\n\t\tthis.element = this.createHeaderElement();\r\n\r\n\t\tthis.element.insertBefore(this.headersElement, this.element.firstChild);\r\n\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t}\r\n\r\n\tinitializeRenderer(){\r\n\t\tvar renderClass;\r\n\r\n\t\tvar renderers = {\r\n\t\t\t\"virtual\": RendererVirtualDomHorizontal,\r\n\t\t\t\"basic\": RendererBasicHorizontal,\r\n\t\t};\r\n\r\n\t\tif(typeof this.table.options.renderHorizontal === \"string\"){\r\n\t\t\trenderClass = renderers[this.table.options.renderHorizontal];\r\n\t\t}else{\r\n\t\t\trenderClass = this.table.options.renderHorizontal;\r\n\t\t}\r\n\r\n\t\tif(renderClass){\r\n\t\t\tthis.renderer = new renderClass(this.table, this.element, this.tableElement);\r\n\t\t\tthis.renderer.initialize();\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Unable to find matching renderer:\", table.options.renderHorizontal);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tcreateHeadersElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-headers\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateHeaderElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-header\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\r\n\t\tif(!this.table.options.headerVisible){\r\n\t\t\tel.classList.add(\"tabulator-header-hidden\");\r\n\t\t}\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\t//return containing element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\t//return header containing element\r\n\tgetHeadersElement(){\r\n\t\treturn this.headersElement;\r\n\t}\r\n\r\n\t//scroll horizontally to match table body\r\n\tscrollHorizontal(left){\r\n\t\tvar hozAdjust = 0,\r\n\t\tscrollWidth = this.element.scrollWidth - this.table.element.clientWidth;\r\n\r\n\t\t// this.tempScrollBlock();\r\n\t\tthis.element.scrollLeft = left;\r\n\r\n\t\t//adjust for vertical scrollbar moving table when present\r\n\t\tif(left > scrollWidth){\r\n\t\t\thozAdjust = left - scrollWidth;\r\n\t\t\tthis.element.style.marginLeft = (-(hozAdjust)) + \"px\";\r\n\t\t}else{\r\n\t\t\tthis.element.style.marginLeft = 0;\r\n\t\t}\r\n\r\n\t\tthis.scrollLeft = left;\r\n\r\n\t\tthis.renderer.scrollColumns(left);\r\n\t}\r\n\r\n\t///////////// Column Setup Functions /////////////\r\n\tgenerateColumnsFromRowData(data){\r\n\t\tvar cols = [],\r\n\t\tdefinitions = this.table.options.autoColumnsDefinitions,\r\n\t\trow, sorter;\r\n\r\n\t\tif(data && data.length){\r\n\r\n\t\t\trow = data[0];\r\n\r\n\t\t\tfor(var key in row){\r\n\t\t\t\tlet col = {\r\n\t\t\t\t\tfield:key,\r\n\t\t\t\t\ttitle:key,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tlet value = row[key];\r\n\r\n\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tif(Array.isArray(value)){\r\n\t\t\t\t\t\tsorter = \"array\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){\r\n\t\t\t\t\t\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcol.sorter = sorter;\r\n\r\n\t\t\t\tcols.push(col);\r\n\t\t\t}\r\n\r\n\t\t\tif(definitions){\r\n\r\n\t\t\t\tswitch(typeof definitions){\r\n\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\tthis.table.options.columns = definitions.call(this.table, cols);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\tif(Array.isArray(definitions)){\r\n\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\tvar match = definitions.find((def) => {\r\n\t\t\t\t\t\t\t\treturn def.field === col.field;\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tif(match){\r\n\t\t\t\t\t\t\t\tObject.assign(col, match);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\tif(definitions[col.field]){\r\n\t\t\t\t\t\t\t\tObject.assign(col, definitions[col.field]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.table.options.columns = cols;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.table.options.columns = cols;\r\n\t\t\t}\r\n\r\n\t\t\tthis.setColumns(this.table.options.columns);\r\n\t\t}\r\n\t}\r\n\r\n\tsetColumns(cols, row){\r\n\t\twhile(this.headersElement.firstChild) this.headersElement.removeChild(this.headersElement.firstChild);\r\n\r\n\t\tthis.columns = [];\r\n\t\tthis.columnsByIndex = [];\r\n\t\tthis.columnsByField = {};\r\n\r\n\t\tthis.dispatch(\"columns-loading\");\r\n\r\n\t\tcols.forEach((def, i) => {\r\n\t\t\tthis._addColumn(def);\r\n\t\t});\r\n\r\n\t\tthis._reIndexColumns();\r\n\r\n\t\tthis.dispatch(\"columns-loaded\");\r\n\r\n\t\tthis.renderer.rerenderColumns(false, true);\r\n\r\n\t\tthis.redraw(true);\r\n\t}\r\n\r\n\t_addColumn(definition, before, nextToColumn){\r\n\t\tvar column = new Column(definition, this),\r\n\t\tcolEl = column.getElement(),\r\n\t\tindex = nextToColumn ? this.findColumnIndex(nextToColumn) : nextToColumn;\r\n\r\n\t\tif(nextToColumn && index > -1){\r\n\t\t\tvar topColumn = nextToColumn.getTopColumn()\r\n\t\t\tvar parentIndex = this.columns.indexOf(topColumn);\r\n\t\t\tvar nextEl = topColumn.getElement();\r\n\r\n\t\t\tif(before){\r\n\t\t\t\tthis.columns.splice(parentIndex, 0, column);\r\n\t\t\t\tnextEl.parentNode.insertBefore(colEl, nextEl);\r\n\t\t\t}else{\r\n\t\t\t\tthis.columns.splice(parentIndex + 1, 0, column);\r\n\t\t\t\tnextEl.parentNode.insertBefore(colEl, nextEl.nextSibling);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(before){\r\n\t\t\t\tthis.columns.unshift(column);\r\n\t\t\t\tthis.headersElement.insertBefore(column.getElement(), this.headersElement.firstChild);\r\n\t\t\t}else{\r\n\t\t\t\tthis.columns.push(column);\r\n\t\t\t\tthis.headersElement.appendChild(column.getElement());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcolumn.columnRendered();\r\n\r\n\t\treturn column;\r\n\t}\r\n\r\n\tregisterColumnField(col){\r\n\t\tif(col.definition.field){\r\n\t\t\tthis.columnsByField[col.definition.field] = col;\r\n\t\t}\r\n\t}\r\n\r\n\tregisterColumnPosition(col){\r\n\t\tthis.columnsByIndex.push(col);\r\n\t}\r\n\r\n\t_reIndexColumns(){\r\n\t\tthis.columnsByIndex = [];\r\n\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.reRegisterPosition();\r\n\t\t});\r\n\t}\r\n\r\n\t//ensure column headers take up the correct amount of space in column groups\r\n\tverticalAlignHeaders(){\r\n\t\tvar minHeight = 0;\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\tvar height;\r\n\r\n\t\t\tcolumn.clearVerticalAlign();\r\n\r\n\t\t\theight = column.getHeight();\r\n\r\n\t\t\tif(height > minHeight){\r\n\t\t\t\tminHeight = height;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\tcolumn.verticalAlign(this.table.options.columnHeaderVertAlign, minHeight);\r\n\t\t});\r\n\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\t//////////////// Column Details /////////////////\r\n\tfindColumn(subject){\r\n\t\tif(typeof subject == \"object\"){\r\n\r\n\t\t\tif(subject instanceof Column){\r\n\t\t\t\t//subject is column element\r\n\t\t\t\treturn subject;\r\n\t\t\t}else if(subject instanceof ColumnComponent){\r\n\t\t\t\t//subject is public column component\r\n\t\t\t\treturn subject._getSelf() || false;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\t//subject is a HTML element of the column header\r\n\t\t\t\tlet match = this.columns.find((column) => {\r\n\t\t\t\t\treturn column.element === subject;\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn match || false;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the field name of the column\r\n\t\t\treturn this.columnsByField[subject] || false;\r\n\t\t}\r\n\r\n\t\t//catch all for any other type of input\r\n\t\treturn false;\r\n\t}\r\n\r\n\tgetColumnByField(field){\r\n\t\treturn this.columnsByField[field];\r\n\t}\r\n\r\n\tgetColumnsByFieldRoot(root){\r\n\t\tvar matches = [];\r\n\r\n\t\tObject.keys(this.columnsByField).forEach((field) => {\r\n\t\t\tvar fieldRoot = field.split(\".\")[0];\r\n\t\t\tif(fieldRoot === root){\r\n\t\t\t\tmatches.push(this.columnsByField[field]);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn matches;\r\n\t}\r\n\r\n\tgetColumnByIndex(index){\r\n\t\treturn this.columnsByIndex[index];\r\n\t}\r\n\r\n\tgetFirstVisibleColumn(index){\r\n\t\tvar index = this.columnsByIndex.findIndex((col) => {\r\n\t\t\treturn col.visible;\r\n\t\t});\r\n\r\n\t\treturn index > -1 ? this.columnsByIndex[index] : false;\r\n\t}\r\n\r\n\tgetColumns(){\r\n\t\treturn this.columns;\r\n\t}\r\n\r\n\tfindColumnIndex(column){\r\n\t\treturn this.columnsByIndex.findIndex((col) => {\r\n\t\t\treturn column === col;\r\n\t\t});\r\n\t}\r\n\r\n\t//return all columns that are not groups\r\n\tgetRealColumns(){\r\n\t\treturn this.columnsByIndex;\r\n\t}\r\n\r\n\t//travers across columns and call action\r\n\ttraverse(callback){\r\n\t\tthis.columnsByIndex.forEach((column,i) =>{\r\n\t\t\tcallback(column, i);\r\n\t\t});\r\n\t}\r\n\r\n\t//get defintions of actual columns\r\n\tgetDefinitions(active){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tif(!active || (active && column.visible)){\r\n\t\t\t\toutput.push(column.getDefinition());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\t//get full nested definition tree\r\n\tgetDefinitionTree(){\r\n\t\tvar output = [];\r\n\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\toutput.push(column.getDefinition(true));\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetComponents(structured){\r\n\t\tvar output = [],\r\n\t\tcolumns = structured ? this.columns : this.columnsByIndex;\r\n\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\toutput.push(column.getComponent());\r\n\t\t});\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tgetWidth(){\r\n\t\tvar width = 0;\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tif(column.visible){\r\n\t\t\t\twidth += column.getWidth();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn width;\r\n\t}\r\n\r\n\tmoveColumn(from, to, after){\r\n\t\tthis.moveColumnActual(from, to, after);\r\n\r\n\t\tto.element.parentNode.insertBefore(from.element, to.element);\r\n\r\n\t\tif(after){\r\n\t\t\tto.element.parentNode.insertBefore(to.element, from.element);\r\n\t\t}\r\n\r\n\t\tthis.verticalAlignHeaders();\r\n\r\n\t\tthis.table.rowManager.reinitialize();\r\n\t}\r\n\r\n\tmoveColumnActual(from, to, after){\r\n\t\tif(from.parent.isGroup){\r\n\t\t\tthis._moveColumnInArray(from.parent.columns, from, to, after);\r\n\t\t}else{\r\n\t\t\tthis._moveColumnInArray(this.columns, from, to, after);\r\n\t\t}\r\n\r\n\t\tthis._moveColumnInArray(this.columnsByIndex, from, to, after, true);\r\n\r\n\t\tthis.renderer.rerenderColumns(true);\r\n\r\n\t\tthis.dispatch(\"column-moved\", from, to, after);\r\n\r\n\t\tif(this.subscribedExternal(\"columnMoved\")){\r\n\t\t\tthis.dispatchExternal(\"columnMoved\", from.getComponent(), this.table.columnManager.getComponents());\r\n\t\t}\r\n\t}\r\n\r\n\t_moveColumnInArray(columns, from, to, after, updateRows){\r\n\t\tvar\tfromIndex = columns.indexOf(from),\r\n\t\ttoIndex, rows = [];\r\n\r\n\t\tif (fromIndex > -1) {\r\n\r\n\t\t\tcolumns.splice(fromIndex, 1);\r\n\r\n\t\t\ttoIndex = columns.indexOf(to);\r\n\r\n\t\t\tif (toIndex > -1) {\r\n\r\n\t\t\t\tif(after){\r\n\t\t\t\t\ttoIndex = toIndex+1;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\ttoIndex = fromIndex;\r\n\t\t\t}\r\n\r\n\t\t\tcolumns.splice(toIndex, 0, from);\r\n\r\n\t\t\tif(updateRows){\r\n\r\n\t\t\t\trows = this.chain(\"column-moving-rows\", [from, to, after], null, []) || [];\r\n\r\n\t\t\t\trows = rows.concat(this.table.rowManager.rows);\r\n\r\n\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\tif(row.cells.length){\r\n\t\t\t\t\t\tvar cell = row.cells.splice(fromIndex, 1)[0];\r\n\t\t\t\t\t\trow.cells.splice(toIndex, 0, cell);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscrollToColumn(column, position, ifVisible){\r\n\t\tvar left = 0,\r\n\t\toffset = 0,\r\n\t\tadjust = 0,\r\n\t\tcolEl = column.getElement();\r\n\r\n\t\treturn new Promise((resolve, reject) => {\r\n\r\n\t\t\tif(typeof position === \"undefined\"){\r\n\t\t\t\tposition = this.table.options.scrollToColumnPosition;\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof ifVisible === \"undefined\"){\r\n\t\t\t\tifVisible = this.table.options.scrollToColumnIfVisible;\r\n\t\t\t}\r\n\r\n\t\t\tif(column.visible){\r\n\r\n\t\t\t\t//align to correct position\r\n\t\t\t\tswitch(position){\r\n\t\t\t\t\tcase \"middle\":\r\n\t\t\t\t\tcase \"center\":\r\n\t\t\t\t\tadjust = -this.element.clientWidth / 2;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"right\":\r\n\t\t\t\t\tadjust = colEl.clientWidth - this.headersElement.clientWidth;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//check column visibility\r\n\t\t\t\tif(!ifVisible){\r\n\r\n\t\t\t\t\toffset = colEl.offsetLeft;\r\n\r\n\t\t\t\t\tif(offset > 0 && offset + colEl.offsetWidth < this.element.clientWidth){\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//calculate scroll position\r\n\t\t\t\tleft = colEl.offsetLeft + adjust;\r\n\r\n\t\t\t\tleft = Math.max(Math.min(left, this.table.rowManager.element.scrollWidth - this.table.rowManager.element.clientWidth),0);\r\n\r\n\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\tthis.scrollHorizontal(left);\r\n\r\n\t\t\t\tresolve();\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - Column not visible\");\r\n\t\t\t\treject(\"Scroll Error - Column not visible\");\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\t//////////////// Cell Management /////////////////\r\n\tgenerateCells(row){\r\n\t\tvar cells = [];\r\n\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tcells.push(column.generateCell(row));\r\n\t\t});\r\n\r\n\t\treturn cells;\r\n\t}\r\n\r\n\t//////////////// Column Management /////////////////\r\n\tgetFlexBaseWidth(){\r\n\t\tvar totalWidth = this.table.element.clientWidth, //table element width\r\n\t\tfixedWidth = 0;\r\n\r\n\t\t//adjust for vertical scrollbar if present\r\n\t\tif(this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight){\r\n\t\t\ttotalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth;\r\n\t\t}\r\n\r\n\t\tthis.columnsByIndex.forEach(function(column){\r\n\t\t\tvar width, minWidth, colWidth;\r\n\r\n\t\t\tif(column.visible){\r\n\r\n\t\t\t\twidth = column.definition.width || 0;\r\n\r\n\t\t\t\tminWidth = parseInt(column.minWidth);\r\n\r\n\t\t\t\tif(typeof(width) == \"string\"){\r\n\t\t\t\t\tif(width.indexOf(\"%\") > -1){\r\n\t\t\t\t\t\tcolWidth = (totalWidth / 100) * parseInt(width) ;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tcolWidth = parseInt(width);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcolWidth = width;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn fixedWidth;\r\n\t}\r\n\r\n\taddColumn(definition, before, nextToColumn){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar column = this._addColumn(definition, before, nextToColumn);\r\n\r\n\t\t\tthis._reIndexColumns();\r\n\r\n\t\t\tthis.dispatch(\"column-add\", definition, before, nextToColumn);\r\n\r\n\t\t\tif(this.layoutMode() != \"fitColumns\"){\r\n\t\t\t\tcolumn.reinitializeWidth();\r\n\t\t\t}\r\n\r\n\t\t\tthis.redraw(true);\r\n\r\n\t\t\tthis.table.rowManager.reinitialize();\r\n\r\n\t\t\tthis.renderer.rerenderColumns();\r\n\r\n\t\t\tresolve(column);\r\n\t\t});\r\n\t}\r\n\r\n\t//remove column from system\r\n\tderegisterColumn(column){\r\n\t\tvar field = column.getField(),\r\n\t\tindex;\r\n\r\n\t\t//remove from field list\r\n\t\tif(field){\r\n\t\t\tdelete this.columnsByField[field];\r\n\t\t}\r\n\r\n\t\t//remove from index list\r\n\t\tindex = this.columnsByIndex.indexOf(column);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columnsByIndex.splice(index, 1);\r\n\t\t}\r\n\r\n\t\t//remove from column list\r\n\t\tindex = this.columns.indexOf(column);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis.columns.splice(index, 1);\r\n\t\t}\r\n\r\n\t\tthis.verticalAlignHeaders();\r\n\r\n\t\tthis.redraw();\r\n\t}\r\n\r\n\t//redraw columns\r\n\tredraw(force){\r\n\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\tthis.verticalAlignHeaders();\r\n\t\t}\r\n\r\n\t\tif(force){\r\n\t\t\tthis.table.rowManager.resetScroll();\r\n\t\t\tthis.table.rowManager.reinitialize();\r\n\t\t}\r\n\r\n\t\tif(!this.confirm(\"table-redrawing\", force)){\r\n\t\t\tthis.layoutRefresh();\r\n\t\t}\r\n\r\n\t\tthis.dispatch(\"table-redraw\", force);\r\n\r\n\t\tthis.table.footerManager.redraw();\r\n\t}\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class BaiscVertical extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.verticalFillMode = \"fill\";\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t}\r\n\r\n\tclearRows(){\r\n\t\tvar element = this.tableElement;\r\n\r\n\t\t// element.children.detach();\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\telement.scrollTop = 0;\r\n\t\telement.scrollLeft = 0;\r\n\r\n\t\telement.style.minWidth = \"\";\r\n\t\telement.style.minHeight = \"\";\r\n\t\telement.style.display = \"\";\r\n\t\telement.style.visibility = \"\";\r\n\t}\r\n\r\n\trenderRows(){\r\n\t\tvar element = this.tableElement,\r\n\t\tonlyGroupHeaders = true;\r\n\r\n\t\tthis.rows().forEach((row, index) => {\r\n\t\t\tthis.styleRow(row, index);\r\n\t\t\telement.appendChild(row.getElement());\r\n\t\t\trow.initialize(true);\r\n\r\n\t\t\tif(row.type !== \"group\"){\r\n\t\t\t\tonlyGroupHeaders = false;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(onlyGroupHeaders){\r\n\t\t\telement.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t}else{\r\n\t\t\telement.style.minWidth = \"\";\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trerenderRows(callback){\r\n\t\tthis.clearRows();\r\n\t\tthis.renderRows();\r\n\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\tvar rowTop = Helpers.elOffset(row.getElement()).top;\r\n\r\n\t\treturn !(Math.abs(this.elementVertical.scrollTop - rowTop) > Math.abs(this.elementVertical.scrollTop + this.elementVertical.clientHeight - rowTop));\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\tvar rowEl = row.getElement();\r\n\r\n\t\tthis.elementVertical.scrollTop = Helpers.elOffset(rowEl).top - Helpers.elOffset(this.elementVertical).top + this.elementVertical.scrollTop;\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\treturn this.rows();\r\n\t}\r\n\r\n}","import Renderer from '../Renderer.js';\r\nimport Helpers from '../../tools/Helpers.js';\r\n\r\nexport default class VirtualDomVertical extends Renderer{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.verticalFillMode = \"fill\";\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.vDomRowHeight = 20; //approximation of row heights for padding\r\n\r\n\t\tthis.vDomTop = 0; //hold position for first rendered row in the virtual DOM\r\n\t\tthis.vDomBottom = 0; //hold possition for last rendered row in the virtual DOM\r\n\r\n\t\tthis.vDomScrollPosTop = 0; //last scroll position of the vDom top;\r\n\t\tthis.vDomScrollPosBottom = 0; //last scroll position of the vDom bottom;\r\n\r\n\t\tthis.vDomTopPad = 0; //hold value of padding for top of virtual DOM\r\n\t\tthis.vDomBottomPad = 0; //hold value of padding for bottom of virtual DOM\r\n\r\n\t\tthis.vDomMaxRenderChain = 90; //the maximum number of dom elements that can be rendered in 1 go\r\n\r\n\t\tthis.vDomWindowBuffer = 0; //window row buffer before removing elements, to smooth scrolling\r\n\r\n\t\tthis.vDomWindowMinTotalRows = 20; //minimum number of rows to be generated in virtual dom (prevent buffering issues on tables with tall rows)\r\n\t\tthis.vDomWindowMinMarginRows = 5; //minimum number of rows to be generated in virtual dom margin\r\n\r\n\t\tthis.vDomTopNewRows = []; //rows to normalize after appending to optimize render speed\r\n\t\tthis.vDomBottomNewRows = []; //rows to normalize after appending to optimize render speed\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t///////// Public Functions ///////////\r\n\t//////////////////////////////////////\r\n\r\n\tclearRows(){\r\n\t\tvar element = this.tableElement;\r\n\r\n\t\t// element.children.detach();\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\telement.style.paddingTop = \"\";\r\n\t\telement.style.paddingBottom = \"\";\r\n\t\t// element.style.minWidth = \"\";\r\n\t\telement.style.minHeight = \"\";\r\n\t\telement.style.display = \"\";\r\n\t\telement.style.visibility = \"\";\r\n\r\n\t\tthis.elementVertical.scrollTop = 0;\r\n\t\tthis.elementVertical.scrollLeft = 0;\r\n\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\r\n\t\tthis.vDomTop = 0;\r\n\t\tthis.vDomBottom = 0;\r\n\t\tthis.vDomTopPad = 0;\r\n\t\tthis.vDomBottomPad = 0;\r\n\t\tthis.vDomScrollPosTop = 0;\r\n\t\tthis.vDomScrollPosBottom = 0;\r\n\t}\r\n\r\n\trenderRows(){\r\n\t\tthis._virtualRenderFill();\r\n\t}\r\n\r\n\trerenderRows(callback){\r\n\t\tvar scrollTop = this.elementVertical.scrollTop;\r\n\t\tvar topRow = false;\r\n\t\tvar topOffset = false;\r\n\r\n\t\tvar left = this.table.rowManager.scrollLeft;\r\n\r\n\t\tvar rows = this.rows();\r\n\r\n\t\tfor(var i = this.vDomTop; i <= this.vDomBottom; i++){\r\n\r\n\t\t\tif(rows[i]){\r\n\t\t\t\tvar diff = scrollTop - rows[i].getElement().offsetTop;\r\n\r\n\t\t\t\tif(topOffset === false || Math.abs(diff) < topOffset){\r\n\t\t\t\t\ttopOffset = diff;\r\n\t\t\t\t\ttopRow = i;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\trows.forEach((row) => {\r\n\t\t\trow.deinitializeHeight();\r\n\t\t});\r\n\r\n\t\tif(callback){\r\n\t\t\tcallback();\r\n\t\t}\r\n\r\n\t\tthis._virtualRenderFill((topRow === false ? this.rows.length - 1 : topRow), true, topOffset || 0);\r\n\r\n\t\tthis.scrollColumns(left);\r\n\t}\r\n\r\n\tscrollColumns(left){\r\n\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t}\r\n\r\n\tscrollRows(top, dir){\r\n\t\tvar topDiff = top - this.vDomScrollPosTop;\r\n\t\tvar bottomDiff = top - this.vDomScrollPosBottom;\r\n\t\tvar margin = this.vDomWindowBuffer * 2;\r\n\t\tvar rows = this.rows();\r\n\r\n\t\tthis.scrollTop = top;\r\n\r\n\t\tif(-topDiff > margin || bottomDiff > margin){\r\n\t\t\t//if big scroll redraw table;\r\n\t\t\tvar left = this.table.rowManager.scrollLeft;\r\n\t\t\tthis._virtualRenderFill(Math.floor((this.elementVertical.scrollTop / this.elementVertical.scrollHeight) * rows.length));\r\n\t\t\tthis.scrollColumns(left);\r\n\t\t}else{\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\t//scrolling up\r\n\t\t\t\tif(topDiff < 0){\r\n\t\t\t\t\tthis._addTopRow(rows, -topDiff);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(bottomDiff < 0){\r\n\t\t\t\t\t//hide bottom row if needed\r\n\t\t\t\t\tif(this.vDomScrollHeight - this.scrollTop > this.vDomWindowBuffer){\r\n\t\t\t\t\t\tthis._removeBottomRow(rows, -bottomDiff);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomScrollPosBottom = this.scrollTop;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\r\n\t\t\t\tif(bottomDiff >= 0){\r\n\t\t\t\t\tthis._addBottomRow(rows, bottomDiff);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//scrolling down\r\n\t\t\t\tif(topDiff >= 0){\r\n\t\t\t\t\t//hide top row if needed\r\n\t\t\t\t\tif(this.scrollTop > this.vDomWindowBuffer){\r\n\t\t\t\t\t\tthis._removeTopRow(rows, topDiff);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.vDomScrollPosTop = this.scrollTop;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tresize(){\r\n\t\tthis.vDomWindowBuffer = this.table.options.renderVerticalBuffer || this.elementVertical.clientHeight;\r\n\t}\r\n\r\n\tscrollToRowNearestTop(row){\r\n\t\tvar rowIndex = this.rows().indexOf(row);\r\n\r\n\t\treturn !(Math.abs(this.vDomTop - rowIndex) > Math.abs(this.vDomBottom - rowIndex));\r\n\t}\r\n\r\n\tscrollToRow(row){\r\n\t\tvar index = this.rows().indexOf(row);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tthis._virtualRenderFill(index, true);\r\n\t\t}\r\n\t}\r\n\r\n\tvisibleRows(includingBuffer){\r\n\t\tvar topEdge = this.elementVertical.scrollTop,\r\n\t\tbottomEdge = this.elementVertical.clientHeight + topEdge,\r\n\t\ttopFound = false,\r\n\t\ttopRow = 0,\r\n\t\tbottomRow = 0,\r\n\t\trows = this.rows();\r\n\r\n\t\tif(includingBuffer){\r\n\t\t\ttopRow = this.vDomTop;\r\n\t\t\tbottomRow = this.vDomBottom;\r\n\t\t}else{\r\n\t\t\tfor(var i = this.vDomTop; i <= this.vDomBottom; i++){\r\n\t\t\t\tif(rows[i]){\r\n\t\t\t\t\tif(!topFound){\r\n\t\t\t\t\t\tif((topEdge - rows[i].getElement().offsetTop) >= 0){\r\n\t\t\t\t\t\t\ttopRow = i;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\ttopFound = true;\r\n\r\n\t\t\t\t\t\t\tif(bottomEdge - rows[i].getElement().offsetTop >= 0){\r\n\t\t\t\t\t\t\t\tbottomRow = i;\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(bottomEdge - rows[i].getElement().offsetTop >= 0){\r\n\t\t\t\t\t\t\tbottomRow = i;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn rows.slice(topRow, bottomRow + 1);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t//////// Internal Rendering //////////\r\n\t//////////////////////////////////////\r\n\r\n\t//full virtual render\r\n\t_virtualRenderFill(position, forceMove, offset){\r\n\t\tvar\telement = this.tableElement,\r\n\t\tholder = this.elementVertical,\r\n\t\ttopPad = 0,\r\n\t\trowsHeight = 0,\r\n\t\theightOccupied = 0,\r\n\t\ttopPadHeight = 0,\r\n\t\ti = 0,\r\n\t\trows = this.rows(),\r\n\t\trowsCount = rows.length,\r\n\t\tcontainerHeight = this.elementVertical.clientHeight;\r\n\r\n\t\tposition = position || 0;\r\n\r\n\t\toffset = offset || 0;\r\n\r\n\t\tif(!position){\r\n\t\t\tthis.clear();\r\n\t\t}else{\r\n\t\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\t\t//check if position is too close to bottom of table\r\n\t\t\theightOccupied = (rowsCount - position + 1) * this.vDomRowHeight;\r\n\r\n\t\t\tif(heightOccupied < containerHeight){\r\n\t\t\t\tposition -= Math.ceil((containerHeight - heightOccupied) / this.vDomRowHeight);\r\n\t\t\t\tif(position < 0){\r\n\t\t\t\t\tposition = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//calculate initial pad\r\n\t\t\ttopPad = Math.min(Math.max(Math.floor(this.vDomWindowBuffer / this.vDomRowHeight), this.vDomWindowMinMarginRows), position);\r\n\t\t\tposition -= topPad;\r\n\t\t}\r\n\r\n\t\tif(rowsCount && Helpers.elVisible(this.elementVertical)){\r\n\t\t\tthis.vDomTop = position;\r\n\r\n\t\t\tthis.vDomBottom = position -1;\r\n\r\n\t\t\twhile ((rowsHeight <= containerHeight + this.vDomWindowBuffer || i < this.vDomWindowMinTotalRows) && this.vDomBottom < rowsCount -1){\r\n\t\t\t\tvar index = this.vDomBottom + 1,\r\n\t\t\t\trow = rows[index],\r\n\t\t\t\trowHeight = 0;\r\n\r\n\t\t\t\tthis.styleRow(row, index);\r\n\r\n\t\t\t\telement.appendChild(row.getElement());\r\n\r\n\t\t\t\trow.initialize();\r\n\r\n\t\t\t\tif(!row.heightInitialized){\r\n\t\t\t\t\trow.normalizeHeight(true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trowHeight = row.getHeight();\r\n\r\n\t\t\t\tif(i < topPad){\r\n\t\t\t\t\ttopPadHeight += rowHeight;\r\n\t\t\t\t}else{\r\n\t\t\t\t\trowsHeight += rowHeight;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.vDomBottom ++;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\r\n\t\t\tif(!position){\r\n\t\t\t\tthis.vDomTopPad = 0;\r\n\t\t\t\t//adjust rowheight to match average of rendered elements\r\n\t\t\t\tthis.vDomRowHeight = Math.floor((rowsHeight + topPadHeight) / i);\r\n\t\t\t\tthis.vDomBottomPad = this.vDomRowHeight * (rowsCount - this.vDomBottom -1);\r\n\r\n\t\t\t\tthis.vDomScrollHeight = topPadHeight + rowsHeight + this.vDomBottomPad - containerHeight;\r\n\t\t\t}else{\r\n\t\t\t\tthis.vDomTopPad = !forceMove ? this.scrollTop - topPadHeight : (this.vDomRowHeight * this.vDomTop) + offset;\r\n\t\t\t\tthis.vDomBottomPad = this.vDomBottom == rowsCount-1 ? 0 : Math.max(this.vDomScrollHeight - this.vDomTopPad - rowsHeight - topPadHeight, 0);\r\n\t\t\t}\r\n\r\n\t\t\telement.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\telement.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\r\n\t\t\tif(forceMove){\r\n\t\t\t\tthis.scrollTop = this.vDomTopPad + (topPadHeight) + offset - (this.elementVertical.scrollWidth > this.elementVertical.clientWidth ? this.elementVertical.offsetHeight - containerHeight : 0);\r\n\t\t\t}\r\n\r\n\t\t\tthis.scrollTop = Math.min(this.scrollTop, this.elementVertical.scrollHeight - containerHeight);\r\n\r\n\t\t\t//adjust for horizontal scrollbar if present (and not at top of table)\r\n\t\t\tif(this.elementVertical.scrollWidth > this.elementVertical.offsetWidth && forceMove){\r\n\t\t\t\tthis.scrollTop += this.elementVertical.offsetHeight - containerHeight;\r\n\t\t\t}\r\n\r\n\t\t\tthis.vDomScrollPosTop = this.scrollTop;\r\n\t\t\tthis.vDomScrollPosBottom = this.scrollTop;\r\n\r\n\t\t\tholder.scrollTop = this.scrollTop;\r\n\r\n\t\t\tthis.dispatch(\"render-virtual-fill\");\r\n\t\t}\r\n\t}\r\n\r\n\t_addTopRow(rows, fillableSpace){\r\n\t\tvar table = this.tableElement,\r\n\t\taddedRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\tindex = this.vDomTop -1,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tif(this.vDomTop){\r\n\t\t\t\tlet row = rows[index],\r\n\t\t\t\trowHeight, initialized;\r\n\r\n\t\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\t\t\t\t\tinitialized = row.initialized;\r\n\r\n\t\t\t\t\tif(fillableSpace >= rowHeight){\r\n\r\n\t\t\t\t\t\tthis.styleRow(row, index);\r\n\t\t\t\t\t\ttable.insertBefore(row.getElement(), table.firstChild);\r\n\r\n\t\t\t\t\t\tif(!row.initialized || !row.heightInitialized){\r\n\t\t\t\t\t\t\taddedRows.push(row);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trow.initialize();\r\n\r\n\t\t\t\t\t\tif(!initialized){\r\n\t\t\t\t\t\t\trowHeight = row.getElement().offsetHeight;\r\n\r\n\t\t\t\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\t\tthis.vDomTop--;\r\n\t\t\t\t\t\tindex--;\r\n\t\t\t\t\t\ti++;\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of addedRows){\r\n\t\t\trow.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis._quickNormalizeRowHeight(addedRows);\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomTopPad -= paddingAdjust;\r\n\r\n\t\t\tif(this.vDomTopPad < 0){\r\n\t\t\t\tthis.vDomTopPad = index * this.vDomRowHeight;\r\n\t\t\t}\r\n\r\n\t\t\tif(index < 1){\r\n\t\t\t\tthis.vDomTopPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\ttable.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\tthis.vDomScrollPosTop -= paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_removeTopRow(rows, fillableSpace){\r\n\t\tvar removableRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[this.vDomTop],\r\n\t\t\trowHeight, diff;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\t\t\t\t\tthis.vDomTop++;\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tremovableRows.push(row);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of removableRows){\r\n\t\t\tlet rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomTopPad += paddingAdjust;\r\n\t\t\tthis.tableElement.style.paddingTop = this.vDomTopPad + \"px\";\r\n\t\t\tthis.vDomScrollPosTop += this.vDomTop ? paddingAdjust : paddingAdjust + this.vDomWindowBuffer;\r\n\t\t}\r\n\t}\r\n\r\n\t_addBottomRow(rows, fillableSpace){\r\n\t\tvar table = this.tableElement,\r\n\t\taddedRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\tindex = this.vDomBottom + 1,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[index],\r\n\t\t\trowHeight, initialized;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\t\t\t\tinitialized = row.initialized;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\r\n\t\t\t\t\tthis.styleRow(row, index);\r\n\t\t\t\t\ttable.appendChild(row.getElement());\r\n\r\n\t\t\t\t\tif(!row.initialized || !row.heightInitialized){\r\n\t\t\t\t\t\taddedRows.push(row);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\trow.initialize();\r\n\r\n\t\t\t\t\tif(!initialized){\r\n\t\t\t\t\t\trowHeight = row.getElement().offsetHeight;\r\n\r\n\t\t\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\r\n\t\t\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tthis.vDomBottom++;\r\n\t\t\t\t\tindex++;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of addedRows){\r\n\t\t\trow.clearCellHeight();\r\n\t\t}\r\n\r\n\t\tthis._quickNormalizeRowHeight(addedRows);\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomBottomPad -= paddingAdjust;\r\n\r\n\t\t\tif(this.vDomBottomPad < 0 || index == rows.length -1){\r\n\t\t\t\tthis.vDomBottomPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\ttable.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\t\t\tthis.vDomScrollPosBottom += paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_removeBottomRow(rows, fillableSpace){\r\n\t\tvar removableRows = [],\r\n\t\tpaddingAdjust = 0,\r\n\t\ti = 0;\r\n\r\n\t\twhile(true){\r\n\t\t\tlet row = rows[this.vDomBottom],\r\n\t\t\trowHeight, diff;\r\n\r\n\t\t\tif(row && i < this.vDomMaxRenderChain){\r\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\r\n\r\n\t\t\t\tif(fillableSpace >= rowHeight){\r\n\t\t\t\t\tthis.vDomBottom --;\r\n\r\n\t\t\t\t\tfillableSpace -= rowHeight;\r\n\t\t\t\t\tpaddingAdjust += rowHeight;\r\n\r\n\t\t\t\t\tremovableRows.push(row);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (let row of removableRows){\r\n\t\t\tlet rowEl = row.getElement();\r\n\r\n\t\t\tif(rowEl.parentNode){\r\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(paddingAdjust){\r\n\t\t\tthis.vDomBottomPad += paddingAdjust;\r\n\r\n\t\t\tif(this.vDomBottomPad < 0){\r\n\t\t\t\tthis.vDomBottomPad = 0;\r\n\t\t\t}\r\n\r\n\t\t\tthis.tableElement.style.paddingBottom = this.vDomBottomPad + \"px\";\r\n\t\t\tthis.vDomScrollPosBottom -= paddingAdjust;\r\n\t\t}\r\n\t}\r\n\r\n\t_quickNormalizeRowHeight(rows){\r\n\t\tfor(let row of rows){\r\n\t\t\trow.calcHeight();\r\n\t\t}\r\n\r\n\t\tfor(let row of rows){\r\n\t\t\trow.setCellHeight();\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\nimport Row from './row/Row.js';\r\nimport RowComponent from './row/RowComponent.js';\r\nimport Helpers from './tools/Helpers.js';\r\n\r\nimport RendererBasicVertical from './rendering/renderers/BasicVertical.js';\r\nimport RendererVirtualDomVertical from './rendering/renderers/VirtualDomVertical.js';\r\n\r\nexport default class RowManager extends CoreFeature{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.element = this.createHolderElement(); //containing element\r\n\t\tthis.tableElement = this.createTableElement(); //table element\r\n\t\tthis.heightFixer = this.createTableElement(); //table element\r\n\t\tthis.placeholder = null; //placeholder element\r\n\t\tthis.placeholderContents = null; //placeholder element\r\n\t\t\r\n\t\tthis.firstRender = false; //handle first render\r\n\t\tthis.renderMode = \"virtual\"; //current rendering mode\r\n\t\tthis.fixedHeight = false; //current rendering mode\r\n\t\t\r\n\t\tthis.rows = []; //hold row data objects\r\n\t\tthis.activeRowsPipeline = []; //hold calculation of active rows\r\n\t\tthis.activeRows = []; //rows currently available to on display in the table\r\n\t\tthis.activeRowsCount = 0; //count of active rows\r\n\t\t\r\n\t\tthis.displayRows = []; //rows currently on display in the table\r\n\t\tthis.displayRowsCount = 0; //count of display rows\r\n\t\t\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.rowNumColumn = false; //hold column component for row number column\r\n\t\t\r\n\t\tthis.redrawBlock = false; //prevent redraws to allow multiple data manipulations before continuing\r\n\t\tthis.redrawBlockRestoreConfig = false; //store latest redraw function calls for when redraw is needed\r\n\t\tthis.redrawBlockRenderInPosition = false; //store latest redraw function calls for when redraw is needed\r\n\t\t\r\n\t\tthis.dataPipeline = []; //hold data pipeline tasks\r\n\t\tthis.displayPipeline = []; //hold data display pipeline tasks\r\n\t\t\r\n\t\tthis.renderer = null;\r\n\t}\r\n\t\r\n\t//////////////// Setup Functions /////////////////\r\n\t\r\n\tcreateHolderElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-tableholder\");\r\n\t\tel.setAttribute(\"tabindex\", 0);\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tcreateTableElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-table\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tinitializePlaceholder(){\r\n\t\t//configure placeholder element\r\n\t\tif(typeof this.table.options.placeholder == \"string\"){\r\n\t\t\tlet el = document.createElement(\"div\");\r\n\t\t\tel.classList.add(\"tabulator-placeholder\");\r\n\t\t\t\r\n\t\t\tlet contents = document.createElement(\"div\");\r\n\t\t\tcontents.classList.add(\"tabulator-placeholder-contents\");\r\n\t\t\tcontents.innerHTML = this.table.options.placeholder;\r\n\t\t\t\r\n\t\t\tel.appendChild(contents);\r\n\t\t\t\r\n\t\t\tthis.placeholderContents = contents;\r\n\t\t\tthis.placeholder = el;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//return containing element\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\t\r\n\t//return table element\r\n\tgetTableElement(){\r\n\t\treturn this.tableElement;\r\n\t}\r\n\t\r\n\t//return position of row in table\r\n\tgetRowPosition(row, active){\r\n\t\tif(active){\r\n\t\t\treturn this.activeRows.indexOf(row);\r\n\t\t}else{\r\n\t\t\treturn this.rows.indexOf(row);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.initializePlaceholder()\r\n\t\tthis.initializeRenderer();\r\n\t\t\r\n\t\t//initialize manager\r\n\t\tthis.element.appendChild(this.tableElement);\r\n\t\t\r\n\t\tthis.firstRender = true;\r\n\t\t\r\n\t\t//scroll header along with table body\r\n\t\tthis.element.addEventListener(\"scroll\", () => {\r\n\t\t\tvar left = this.element.scrollLeft,\r\n\t\t\tleftDir = this.scrollLeft > left,\r\n\t\t\ttop = this.element.scrollTop,\r\n\t\t\ttopDir = this.scrollTop > top;\r\n\t\t\t\r\n\t\t\t//handle horizontal scrolling\r\n\t\t\tif(this.scrollLeft != left){\r\n\t\t\t\tthis.scrollLeft = left;\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"scroll-horizontal\", left, leftDir);\r\n\t\t\t\tthis.dispatchExternal(\"scrollHorizontal\", left, leftDir);\r\n\r\n\t\t\t\tthis._positionPlaceholder();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//handle vertical scrolling\r\n\t\t\tif(this.scrollTop != top){\r\n\t\t\t\tthis.scrollTop = top;\r\n\t\t\t\t\r\n\t\t\t\tthis.renderer.scrollRows(top, topDir);\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"scroll-vertical\", top, topDir);\r\n\t\t\t\tthis.dispatchExternal(\"scrollVertical\", top, topDir);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t////////////////// Row Manipulation //////////////////\r\n\tfindRow(subject){\r\n\t\tif(typeof subject == \"object\"){\r\n\t\t\tif(subject instanceof Row){\r\n\t\t\t\t//subject is row element\r\n\t\t\t\treturn subject;\r\n\t\t\t}else if(subject instanceof RowComponent){\r\n\t\t\t\t//subject is public row component\r\n\t\t\t\treturn subject._getSelf() || false;\r\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\r\n\t\t\t\t//subject is a HTML element of the row\r\n\t\t\t\tlet match = this.rows.find((row) => {\r\n\t\t\t\t\treturn row.getElement() === subject;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\treturn match || false;\r\n\t\t\t}\r\n\t\t}else if(typeof subject == \"undefined\" || subject === null){\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\t//subject should be treated as the index of the row\r\n\t\t\tlet match = this.rows.find((row) => {\r\n\t\t\t\treturn row.data[this.table.options.index] == subject;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\treturn match || false;\r\n\t\t}\r\n\t\t\r\n\t\t//catch all for any other type of input\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tgetRowFromDataObject(data){\r\n\t\tvar match = this.rows.find((row) => {\r\n\t\t\treturn row.data === data;\r\n\t\t});\r\n\t\t\r\n\t\treturn match || false;\r\n\t}\r\n\t\r\n\tgetRowFromPosition(position, active){\r\n\t\tif(active){\r\n\t\t\treturn this.activeRows[position];\r\n\t\t}else{\r\n\t\t\treturn this.rows[position];\r\n\t\t}\r\n\t}\r\n\t\r\n\tscrollToRow(row, position, ifVisible){\r\n\t\treturn this.renderer.scrollToRowPosition(row, position, ifVisible);\r\n\t}\r\n\t\r\n\t////////////////// Data Handling //////////////////\r\n\tsetData(data, renderInPosition, columnsChanged){\r\n\t\treturn new Promise((resolve, reject)=>{\r\n\t\t\tif(renderInPosition && this.getDisplayRows().length){\r\n\t\t\t\tif(this.table.options.pagination){\r\n\t\t\t\t\tthis._setDataActual(data, true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.reRenderInPosition(() => {\r\n\t\t\t\t\t\tthis._setDataActual(data);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(this.table.options.autoColumns && columnsChanged && this.table.initialized){\r\n\t\t\t\t\tthis.table.columnManager.generateColumnsFromRowData(data);\r\n\t\t\t\t}\r\n\t\t\t\tthis.resetScroll();\r\n\t\t\t\t\r\n\t\t\t\tthis._setDataActual(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\t\r\n\t_setDataActual(data, renderInPosition){\r\n\t\tthis.dispatchExternal(\"dataProcessing\", data);\r\n\t\t\r\n\t\tthis._wipeElements();\r\n\t\t\r\n\t\tif(Array.isArray(data)){\r\n\t\t\tthis.dispatch(\"data-processing\", data);\r\n\t\t\t\r\n\t\t\tdata.forEach((def, i) => {\r\n\t\t\t\tif(def && typeof def === \"object\"){\r\n\t\t\t\t\tvar row = new Row(def, this);\r\n\t\t\t\t\tthis.rows.push(row);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Data Loading Warning - Invalid row data detected and ignored, expecting object but received:\", def);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.refreshActiveData(false, false, renderInPosition);\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"data-processed\", data);\r\n\t\t\tthis.dispatchExternal(\"dataProcessed\", data);\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Data Loading Error - Unable to process data due to invalid data type \\nExpecting: array \\nReceived: \", typeof data, \"\\nData: \", data);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_wipeElements(){\r\n\t\tthis.dispatch(\"rows-wipe\");\r\n\t\t\r\n\t\tthis.rows.forEach((row) => {\r\n\t\t\trow.wipe();\r\n\t\t});\r\n\t\t\r\n\t\tthis.rows = [];\r\n\t\tthis.activeRows = [];\r\n\t\tthis.activeRowsPipeline = [];\r\n\t\tthis.activeRowsCount = 0;\r\n\t\tthis.displayRows = [];\r\n\t\tthis.displayRowsCount = 0;\r\n\t\t\r\n\t\tthis.adjustTableSize();\r\n\t}\r\n\t\r\n\tdeleteRow(row, blockRedraw){\r\n\t\tvar allIndex = this.rows.indexOf(row),\r\n\t\tactiveIndex = this.activeRows.indexOf(row);\r\n\t\t\r\n\t\tif(activeIndex > -1){\r\n\t\t\tthis.activeRows.splice(activeIndex, 1);\r\n\t\t}\r\n\t\t\r\n\t\tif(allIndex > -1){\r\n\t\t\tthis.rows.splice(allIndex, 1);\r\n\t\t}\r\n\t\t\r\n\t\tthis.setActiveRows(this.activeRows);\r\n\t\t\r\n\t\tthis.displayRowIterator((rows) => {\r\n\t\t\tvar displayIndex = rows.indexOf(row);\r\n\t\t\t\r\n\t\t\tif(displayIndex > -1){\r\n\t\t\t\trows.splice(displayIndex, 1);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t}\r\n\t\t\r\n\t\tthis.regenerateRowNumbers();\r\n\t\t\r\n\t\tthis.dispatchExternal(\"rowDeleted\", row.getComponent());\r\n\t\t\r\n\t\tif(!this.displayRowsCount){\r\n\t\t\tthis._showPlaceholder();\r\n\t\t}\r\n\t\t\r\n\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\tthis.dispatchExternal(\"dataChanged\", this.getData());\r\n\t\t}\r\n\t}\r\n\t\r\n\taddRow(data, pos, index, blockRedraw){\r\n\t\tvar row = this.addRowActual(data, pos, index, blockRedraw);\r\n\t\treturn row;\r\n\t}\r\n\t\r\n\t//add multiple rows\r\n\taddRows(data, pos, index){\r\n\t\tvar length = 0,\r\n\t\trows = [];\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tpos = this.findAddRowPos(pos);\r\n\t\t\t\r\n\t\t\tif(!Array.isArray(data)){\r\n\t\t\t\tdata = [data];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlength = data.length - 1;\r\n\t\t\t\r\n\t\t\tif((typeof index == \"undefined\" && pos) || (typeof index !== \"undefined\" && !pos)){\r\n\t\t\t\tdata.reverse();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdata.forEach((item, i) => {\r\n\t\t\t\tvar row = this.addRow(item, pos, index, true);\r\n\t\t\t\trows.push(row);\r\n\t\t\t\tthis.dispatch(\"row-added\", row, data, pos, index);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.refreshActiveData(false, false, true);\r\n\t\t\t\r\n\t\t\tthis.regenerateRowNumbers();\r\n\t\t\t\r\n\t\t\tif(rows.length){\r\n\t\t\t\tthis._clearPlaceholder();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tresolve(rows);\r\n\t\t});\r\n\t}\r\n\t\r\n\tfindAddRowPos(pos){\r\n\t\tif(typeof pos === \"undefined\"){\r\n\t\t\tpos = this.table.options.addRowPos;\r\n\t\t}\r\n\t\t\r\n\t\tif(pos === \"pos\"){\r\n\t\t\tpos = true;\r\n\t\t}\r\n\t\t\r\n\t\tif(pos === \"bottom\"){\r\n\t\t\tpos = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn pos;\r\n\t}\r\n\t\r\n\taddRowActual(data, pos, index, blockRedraw){\r\n\t\tvar row = data instanceof Row ? data : new Row(data || {}, this),\r\n\t\ttop = this.findAddRowPos(pos),\r\n\t\tallIndex = -1,\r\n\t\tactiveIndex, chainResult;\r\n\t\t\r\n\t\tif(!index){\r\n\t\t\tchainResult = this.chain(\"row-adding-position\", [row, top], null, {index, top});\r\n\t\t\t\r\n\t\t\tindex = chainResult.index;\r\n\t\t\ttop = chainResult.top;\r\n\t\t}\r\n\t\t\r\n\t\tif(typeof index !== \"undefined\"){\r\n\t\t\tindex = this.findRow(index);\r\n\t\t}\r\n\t\t\r\n\t\tindex = this.chain(\"row-adding-index\", [row, index, top], null, index);\r\n\t\t\r\n\t\tif(index){\r\n\t\t\tallIndex = this.rows.indexOf(index);\r\n\t\t}\r\n\t\t\r\n\t\tif(index && allIndex > -1){\r\n\t\t\tactiveIndex = this.activeRows.indexOf(index);\r\n\t\t\t\r\n\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\tvar displayIndex = rows.indexOf(index);\r\n\t\t\t\t\r\n\t\t\t\tif(displayIndex > -1){\r\n\t\t\t\t\trows.splice((top ? displayIndex : displayIndex + 1), 0, row);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(activeIndex > -1){\r\n\t\t\t\tthis.activeRows.splice((top ? activeIndex : activeIndex + 1), 0, row);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.rows.splice((top ? allIndex : allIndex + 1), 0, row);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tif(top){\r\n\t\t\t\t\r\n\t\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\t\trows.unshift(row);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRows.unshift(row);\r\n\t\t\t\tthis.rows.unshift(row);\r\n\t\t\t}else{\r\n\t\t\t\tthis.displayRowIterator(function(rows){\r\n\t\t\t\t\trows.push(row);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRows.push(row);\r\n\t\t\t\tthis.rows.push(row);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.setActiveRows(this.activeRows);\r\n\t\t\r\n\t\tthis.dispatchExternal(\"rowAdded\", row.getComponent());\r\n\t\t\r\n\t\tif(this.subscribedExternal(\"dataChanged\")){\r\n\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\r\n\t\t}\r\n\t\t\r\n\t\tif(!blockRedraw){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t}\r\n\t\t\r\n\t\treturn row;\r\n\t}\r\n\t\r\n\tmoveRow(from, to, after){\r\n\t\tthis.dispatch(\"row-move\", from, to, after);\r\n\t\t\r\n\t\tthis.moveRowActual(from, to, after);\r\n\t\t\r\n\t\tthis.regenerateRowNumbers();\r\n\t\t\r\n\t\tthis.dispatch(\"row-moved\", from, to, after);\r\n\t\tthis.dispatchExternal(\"rowMoved\", from.getComponent());\r\n\t}\r\n\t\r\n\tmoveRowActual(from, to, after){\r\n\t\tthis.moveRowInArray(this.rows, from, to, after);\r\n\t\tthis.moveRowInArray(this.activeRows, from, to, after);\r\n\t\t\r\n\t\tthis.displayRowIterator((rows) => {\r\n\t\t\tthis.moveRowInArray(rows, from, to, after);\r\n\t\t});\r\n\t\t\r\n\t\tthis.dispatch(\"row-moving\", from, to, after);\r\n\t}\r\n\t\r\n\tmoveRowInArray(rows, from, to, after){\r\n\t\tvar\tfromIndex, toIndex, start, end;\r\n\t\t\r\n\t\tif(from !== to){\r\n\t\t\t\r\n\t\t\tfromIndex = rows.indexOf(from);\r\n\t\t\t\r\n\t\t\tif (fromIndex > -1) {\r\n\t\t\t\t\r\n\t\t\t\trows.splice(fromIndex, 1);\r\n\t\t\t\t\r\n\t\t\t\ttoIndex = rows.indexOf(to);\r\n\t\t\t\t\r\n\t\t\t\tif (toIndex > -1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(after){\r\n\t\t\t\t\t\trows.splice(toIndex+1, 0, from);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trows.splice(toIndex, 0, from);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\trows.splice(fromIndex, 0, from);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//restyle rows\r\n\t\t\tif(rows === this.getDisplayRows()){\r\n\t\t\t\t\r\n\t\t\t\tstart = fromIndex < toIndex ? fromIndex : toIndex;\r\n\t\t\t\tend = toIndex > fromIndex ? toIndex : fromIndex +1;\r\n\t\t\t\t\r\n\t\t\t\tfor(let i = start; i <= end; i++){\r\n\t\t\t\t\tif(rows[i]){\r\n\t\t\t\t\t\tthis.styleRow(rows[i], i);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tclearData(){\r\n\t\tthis.setData([]);\r\n\t}\r\n\t\r\n\tgetRowIndex(row){\r\n\t\treturn this.findRowIndex(row, this.rows);\r\n\t}\r\n\t\r\n\tgetDisplayRowIndex(row){\r\n\t\tvar index = this.getDisplayRows().indexOf(row);\r\n\t\treturn index > -1 ? index : false;\r\n\t}\r\n\t\r\n\tnextDisplayRow(row, rowOnly){\r\n\t\tvar index = this.getDisplayRowIndex(row),\r\n\t\tnextRow = false;\r\n\t\t\r\n\t\t\r\n\t\tif(index !== false && index < this.displayRowsCount -1){\r\n\t\t\tnextRow = this.getDisplayRows()[index+1];\r\n\t\t}\r\n\t\t\r\n\t\tif(nextRow && (!(nextRow instanceof Row) || nextRow.type != \"row\")){\r\n\t\t\treturn this.nextDisplayRow(nextRow, rowOnly);\r\n\t\t}\r\n\t\t\r\n\t\treturn nextRow;\r\n\t}\r\n\t\r\n\tprevDisplayRow(row, rowOnly){\r\n\t\tvar index = this.getDisplayRowIndex(row),\r\n\t\tprevRow = false;\r\n\t\t\r\n\t\tif(index){\r\n\t\t\tprevRow = this.getDisplayRows()[index-1];\r\n\t\t}\r\n\t\t\r\n\t\tif(rowOnly && prevRow && (!(prevRow instanceof Row) || prevRow.type != \"row\")){\r\n\t\t\treturn this.prevDisplayRow(prevRow, rowOnly);\r\n\t\t}\r\n\t\t\r\n\t\treturn prevRow;\r\n\t}\r\n\t\r\n\tfindRowIndex(row, list){\r\n\t\tvar rowIndex;\r\n\t\t\r\n\t\trow = this.findRow(row);\r\n\t\t\r\n\t\tif(row){\r\n\t\t\trowIndex = list.indexOf(row);\r\n\t\t\t\r\n\t\t\tif(rowIndex > -1){\r\n\t\t\t\treturn rowIndex;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tgetData(active, transform){\r\n\t\tvar output = [],\r\n\t\trows = this.getRows(active);\r\n\t\t\r\n\t\trows.forEach(function(row){\r\n\t\t\tif(row.type == \"row\"){\r\n\t\t\t\toutput.push(row.getData(transform || \"data\"));\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetComponents(active){\r\n\t\tvar\toutput = [],\r\n\t\trows = this.getRows(active);\r\n\t\t\r\n\t\trows.forEach(function(row){\r\n\t\t\toutput.push(row.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetDataCount(active){\r\n\t\tvar rows = this.getRows(active);\r\n\t\t\r\n\t\treturn rows.length;\r\n\t}\r\n\t\r\n\tscrollHorizontal(left){\r\n\t\tthis.scrollLeft = left;\r\n\t\tthis.element.scrollLeft = left;\r\n\t\t\r\n\t\tthis.dispatch(\"scroll-horizontal\", left);\r\n\t}\r\n\t\r\n\tregisterDataPipelineHandler(handler, priority){\r\n\t\tif(typeof priority !== \"undefined\"){\r\n\t\t\tthis.dataPipeline.push({handler, priority})\r\n\t\t\tthis.dataPipeline.sort((a, b) => {\r\n\t\t\t\treturn a.priority - b.priority;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Data pipeline handlers must have a priority in order to be registered\")\r\n\t\t}\r\n\t}\r\n\t\r\n\tregisterDisplayPipelineHandler(handler, priority){\r\n\t\tif(typeof priority !== \"undefined\"){\r\n\t\t\tthis.displayPipeline.push({handler, priority})\r\n\t\t\tthis.displayPipeline.sort((a, b) => {\r\n\t\t\t\treturn a.priority - b.priority;\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Display pipeline handlers must have a priority in order to be registered\")\r\n\t\t}\r\n\t}\r\n\t\r\n\t//set active data set\r\n\trefreshActiveData(handler, skipStage, renderInPosition){\r\n\t\tvar table = this.table,\r\n\t\tstage = \"\",\r\n\t\tindex = 0,\r\n\t\tcascadeOrder = [\"all\", \"dataPipeline\", \"display\", \"displayPipeline\", \"end\"],\r\n\t\tdisplayIndex;\r\n\t\t\r\n\t\t\r\n\t\tif(typeof handler === \"function\"){\r\n\t\t\tindex = this.dataPipeline.findIndex((item) => {\r\n\t\t\t\treturn item.handler === handler;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\tstage = \"dataPipeline\";\r\n\t\t\t\t\r\n\t\t\t\tif(skipStage){\r\n\t\t\t\t\tif(index == this.dataPipeline.length - 1){\r\n\t\t\t\t\t\tstage = \"display\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tindex++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tindex = this.displayPipeline.findIndex((item) => {\r\n\t\t\t\t\treturn item.handler === handler;\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tstage = \"displayPipeline\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(skipStage){\r\n\t\t\t\t\t\tif(index == this.displayPipeline.length - 1){\r\n\t\t\t\t\t\t\tstage = \"end\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tindex++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.error(\"Unable to refresh data, invalid handler provided\", handler)\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tstage = handler || \"all\";\r\n\t\t\tindex = 0;\r\n\t\t}\r\n\t\t\r\n\t\tif(this.redrawBlock){\r\n\t\t\tif(!this.redrawBlockRestoreConfig || (this.redrawBlockRestoreConfig && ((this.redrawBlockRestoreConfig.stage === stage && index < this.redrawBlockRestoreConfig.index) || (cascadeOrder.indexOf(stage) < cascadeOrder.indexOf(this.redrawBlockRestoreConfig.stage))))){\r\n\t\t\t\tthis.redrawBlockRestoreConfig = {\r\n\t\t\t\t\thandler: handler,\r\n\t\t\t\t\tskipStage: skipStage,\r\n\t\t\t\t\trenderInPosition: renderInPosition,\r\n\t\t\t\t\tstage:stage,\r\n\t\t\t\t\tindex:index,\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn;\r\n\t\t}else{\r\n\t\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\t\tif(renderInPosition){\r\n\t\t\t\t\tthis.reRenderInPosition(this.refreshPipelines.bind(this, handler, stage, index, renderInPosition));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!handler){\r\n\t\t\t\t\t\tthis.table.columnManager.renderer.renderColumns();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.renderTable();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(table.options.layoutColumnsOnNewData){\r\n\t\t\t\t\t\tthis.table.columnManager.redraw(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"data-refreshed\");\r\n\t\t}\r\n\t}\r\n\t\r\n\trefreshPipelines(handler, stage, index, renderInPosition){\r\n\t\tthis.dispatch(\"data-refreshing\");\r\n\t\t\r\n\t\tif(!handler){\r\n\t\t\tthis.activeRowsPipeline[0] = this.rows.slice(0);\r\n\t\t}\r\n\t\t\r\n\t\t//cascade through data refresh stages\r\n\t\tswitch(stage){\r\n\t\t\tcase \"all\":\r\n\t\t\t//handle case where alldata needs refreshing\r\n\t\t\t\r\n\t\t\tcase \"dataPipeline\":\r\n\t\t\t\r\n\t\t\tfor(let i = index; i < this.dataPipeline.length; i++){\r\n\t\t\t\tlet result = this.dataPipeline[i].handler(this.activeRowsPipeline[i].slice(0));\r\n\t\t\t\t\r\n\t\t\t\tthis.activeRowsPipeline[i + 1] = result || this.activeRowsPipeline[i].slice(0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);\r\n\t\t\t\r\n\t\t\tthis.regenerateRowNumbers();\r\n\t\t\t\r\n\t\t\tcase \"display\":\r\n\t\t\tindex = 0;\r\n\t\t\tthis.resetDisplayRows();\r\n\t\t\t\r\n\t\t\tcase \"displayPipeline\":\r\n\t\t\tfor(let i = index; i < this.displayPipeline.length; i++){\r\n\t\t\t\tlet result = this.displayPipeline[i].handler((i ? this.getDisplayRows(i - 1) : this.activeRows).slice(0), renderInPosition);\r\n\t\t\t\t\r\n\t\t\t\tthis.setDisplayRows(result || this.getDisplayRows(i - 1).slice(0), i);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase \"end\":\r\n\t\t\t//case to handle scenario when trying to skip past end stage\r\n\t\t}\r\n\t}\r\n\t\r\n\t//regenerate row numbers for row number formatter if in use\r\n\tregenerateRowNumbers(){\r\n\t\tif(this.rowNumColumn){\r\n\t\t\tthis.activeRows.forEach((row) => {\r\n\t\t\t\tvar cell = row.getCell(this.rowNumColumn);\r\n\t\t\t\t\r\n\t\t\t\tif(cell){\r\n\t\t\t\t\tcell._generateContents();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetActiveRows(activeRows){\r\n\t\tthis.activeRows = activeRows;\r\n\t\tthis.activeRowsCount = this.activeRows.length;\r\n\t}\r\n\t\r\n\t//reset display rows array\r\n\tresetDisplayRows(){\r\n\t\tthis.displayRows = [];\r\n\t\t\r\n\t\tthis.displayRows.push(this.activeRows.slice(0));\r\n\t\t\r\n\t\tthis.displayRowsCount = this.displayRows[0].length;\r\n\t}\r\n\t\r\n\tgetNextDisplayIndex(){\r\n\t\treturn this.displayRows.length;\r\n\t}\r\n\t\r\n\t//set display row pipeline data\r\n\tsetDisplayRows(displayRows, index){\r\n\t\t\r\n\t\tvar output = true;\r\n\t\t\r\n\t\tif(index && typeof this.displayRows[index] != \"undefined\"){\r\n\t\t\tthis.displayRows[index] = displayRows;\r\n\t\t\toutput = true;\r\n\t\t}else{\r\n\t\t\tthis.displayRows.push(displayRows)\r\n\t\t\toutput = index = this.displayRows.length -1;\r\n\t\t}\r\n\t\t\r\n\t\tif(index == this.displayRows.length -1){\r\n\t\t\tthis.displayRowsCount = this.displayRows[this.displayRows.length -1].length;\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetDisplayRows(index){\r\n\t\tif(typeof index == \"undefined\"){\r\n\t\t\treturn this.displayRows.length ? this.displayRows[this.displayRows.length -1] : [];\r\n\t\t}else{\r\n\t\t\treturn this.displayRows[index] || [];\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetVisibleRows(chain, viewable){\r\n\t\tvar rows = Object.assign([], this.renderer.visibleRows(!viewable));\r\n\t\t\r\n\t\tif(chain){\r\n\t\t\trows = this.chain(\"rows-visible\", [viewable], rows, rows);\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t//repeat action accross display rows\r\n\tdisplayRowIterator(callback){\r\n\t\tthis.activeRowsPipeline.forEach(callback);\r\n\t\tthis.displayRows.forEach(callback);\r\n\t\t\r\n\t\tthis.displayRowsCount = this.displayRows[this.displayRows.length -1].length;\r\n\t}\r\n\t\r\n\t//return only actual rows (not group headers etc)\r\n\tgetRows(type){\r\n\t\tvar rows;\r\n\t\t\r\n\t\tswitch(type){\r\n\t\t\tcase \"active\":\r\n\t\t\trows = this.activeRows;\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"display\":\r\n\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"visible\":\r\n\t\t\trows = this.getVisibleRows(false, true);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\trows = this.chain(\"rows-retrieve\", type, null, this.rows) || this.rows;\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\t///////////////// Table Rendering /////////////////\r\n\t//trigger rerender of table in current position\r\n\treRenderInPosition(callback){\r\n\t\tif(this.redrawBlock){\r\n\t\t\tif(callback){\r\n\t\t\t\tcallback();\r\n\t\t\t}else{\r\n\t\t\t\tthis.redrawBlockRenderInPosition = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.renderer.rerenderRows(callback);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeRenderer(){\r\n\t\tvar renderClass;\r\n\t\t\r\n\t\tvar renderers = {\r\n\t\t\t\"virtual\": RendererVirtualDomVertical,\r\n\t\t\t\"basic\": RendererBasicVertical,\r\n\t\t};\r\n\t\t\r\n\t\tif(typeof this.table.options.renderVertical === \"string\"){\r\n\t\t\trenderClass = renderers[this.table.options.renderVertical];\r\n\t\t}else{\r\n\t\t\trenderClass = this.table.options.renderVertical;\r\n\t\t}\r\n\t\t\r\n\t\tif(renderClass){\r\n\t\t\tthis.renderer = new renderClass(this.table, this.element, this.tableElement);\r\n\t\t\tthis.renderer.initialize();\r\n\t\t\t\r\n\t\t\tif((this.table.element.clientHeight || this.table.options.height)){\r\n\t\t\t\tthis.fixedHeight = true;\r\n\t\t\t}else{\r\n\t\t\t\tthis.fixedHeight = false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Unable to find matching renderer:\", table.options.renderVertical);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetRenderMode(){\r\n\t\treturn this.renderMode;\r\n\t}\r\n\t\r\n\trenderTable(){\r\n\t\tthis.dispatchExternal(\"renderStarted\");\r\n\t\t\r\n\t\tthis.element.scrollTop = 0;\r\n\t\t\r\n\t\tthis._clearTable();\r\n\t\t\r\n\t\tif(this.displayRowsCount){\r\n\t\t\tthis.renderer.renderRows();\r\n\t\t\t\r\n\t\t\tif(this.firstRender){\r\n\t\t\t\tthis.firstRender = false;\r\n\t\t\t\tthis.layoutRefresh();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthis.renderEmptyScroll();\r\n\t\t}\r\n\t\t\r\n\t\tif(!this.fixedHeight){\r\n\t\t\tthis.adjustTableSize();\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatch(\"table-layout\");\r\n\t\t\r\n\t\tif(!this.displayRowsCount){\r\n\t\t\tthis._showPlaceholder();\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatchExternal(\"renderComplete\");\r\n\t}\r\n\t\r\n\t//show scrollbars on empty table div\r\n\trenderEmptyScroll(){\r\n\t\tif(this.placeholder){\r\n\t\t\tthis.tableElement.style.display = \"none\";\r\n\t\t}else{\r\n\t\t\tthis.tableElement.style.minWidth = this.table.columnManager.getWidth() + \"px\";\r\n\t\t\t// this.tableElement.style.minHeight = \"1px\";\r\n\t\t\t// this.tableElement.style.visibility = \"hidden\";\r\n\t\t}\r\n\t}\r\n\t\r\n\t_clearTable(){\r\n\t\tvar element = this.tableElement;\r\n\t\t\r\n\t\tthis._clearPlaceholder();\r\n\t\t\r\n\t\tthis.scrollTop = 0;\r\n\t\tthis.scrollLeft = 0;\r\n\t\t\r\n\t\tthis.renderer.clearRows();\r\n\t}\r\n\t\r\n\t_showPlaceholder(){\r\n\t\tif(this.placeholder){\r\n\t\t\tthis.placeholder.setAttribute(\"tabulator-render-mode\", this.renderMode);\r\n\t\t\t\r\n\t\t\tthis.getElement().appendChild(this.placeholder);\r\n\t\t\tthis._positionPlaceholder();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_clearPlaceholder(){\r\n\t\tif(this.placeholder && this.placeholder.parentNode){\r\n\t\t\tthis.placeholder.parentNode.removeChild(this.placeholder);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_positionPlaceholder(){\r\n\t\tif(this.placeholder && this.placeholder.parentNode){\r\n\t\t\tthis.placeholder.style.width = this.table.columnManager.getWidth() + \"px\";\r\n\t\t\tthis.placeholderContents.style.width = this.table.rowManager.element.clientWidth + \"px\";\r\n\t\t\tthis.placeholderContents.style.marginLeft = this.scrollLeft + \"px\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tstyleRow(row, index){\r\n\t\tvar rowEl = row.getElement();\r\n\t\t\r\n\t\tif(index % 2){\r\n\t\t\trowEl.classList.add(\"tabulator-row-even\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-odd\");\r\n\t\t}else{\r\n\t\t\trowEl.classList.add(\"tabulator-row-odd\");\r\n\t\t\trowEl.classList.remove(\"tabulator-row-even\");\r\n\t\t}\r\n\t}\r\n\t\r\n\t//normalize height of active rows\r\n\tnormalizeHeight(){\r\n\t\tthis.activeRows.forEach(function(row){\r\n\t\t\trow.normalizeHeight();\r\n\t\t});\r\n\t}\r\n\t\r\n\t//adjust the height of the table holder to fit in the Tabulator element\r\n\tadjustTableSize(){\r\n\t\tvar initialHeight = this.element.clientHeight,\r\n\t\tmodExists;\r\n\t\t\r\n\t\tif(this.renderer.verticalFillMode === \"fill\"){\r\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));\r\n\t\t\t\r\n\t\t\tif(this.fixedHeight){\r\n\t\t\t\tthis.element.style.minHeight = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t\tthis.element.style.height = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t\tthis.element.style.maxHeight = \"calc(100% - \" + otherHeight + \"px)\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.height = \"\";\r\n\t\t\t\tthis.element.style.height = (this.table.element.clientHeight - otherHeight) + \"px\";\r\n\t\t\t\tthis.element.scrollTop = this.scrollTop;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.renderer.resize();\r\n\t\t\t\r\n\t\t\t//check if the table has changed size when dealing with variable height tables\r\n\t\t\tif(!this.fixedHeight && initialHeight != this.element.clientHeight){\r\n\t\t\t\tif(this.subscribed(\"table-resize\")){\r\n\t\t\t\t\tthis.dispatch(\"table-resize\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.redraw();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._positionPlaceholder();\r\n\t}\r\n\t\r\n\t//renitialize all rows\r\n\treinitialize(){\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\trow.reinitialize(true);\r\n\t\t});\r\n\t}\r\n\t\r\n\t//prevent table from being redrawn\r\n\tblockRedraw (){\r\n\t\tthis.redrawBlock = true;\r\n\t\tthis.redrawBlockRestoreConfig = false;\r\n\t}\r\n\t\r\n\t//restore table redrawing\r\n\trestoreRedraw (){\r\n\t\tthis.redrawBlock = false;\r\n\t\t\r\n\t\tif(this.redrawBlockRestoreConfig){\r\n\t\t\tthis.refreshActiveData(this.redrawBlockRestoreConfig.handler, this.redrawBlockRestoreConfig.skipStage, this.redrawBlockRestoreConfig.renderInPosition)\r\n\t\t\t\r\n\t\t\tthis.redrawBlockRestoreConfig = false;\r\n\t\t}else{\r\n\t\t\tif(this.redrawBlockRenderInPosition){\r\n\t\t\t\tthis.reRenderInPosition();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.redrawBlockRenderInPosition = false;\r\n\t}\r\n\t\r\n\t//redraw table\r\n\tredraw (force){\r\n\t\tvar pos = 0,\r\n\t\tleft = this.scrollLeft;\r\n\t\t\r\n\t\tthis.adjustTableSize();\r\n\t\t\r\n\t\tthis.table.tableWidth = this.table.element.clientWidth;\r\n\t\t\r\n\t\tif(!force){\r\n\t\t\tthis.reRenderInPosition();\r\n\t\t\tthis.scrollHorizontal(left);\r\n\t\t}else{\r\n\t\t\tthis.renderTable();\r\n\t\t}\r\n\t}\r\n\t\r\n\tresetScroll(){\r\n\t\tthis.element.scrollLeft = 0;\r\n\t\tthis.element.scrollTop = 0;\r\n\t\t\r\n\t\tif(this.table.browser === \"ie\"){\r\n\t\t\tvar event = document.createEvent(\"Event\");\r\n\t\t\tevent.initEvent(\"scroll\", false, true);\r\n\t\t\tthis.element.dispatchEvent(event);\r\n\t\t}else{\r\n\t\t\tthis.element.dispatchEvent(new Event('scroll'));\r\n\t\t}\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\n\r\nexport default class FooterManager extends CoreFeature{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.active = false;\r\n\t\tthis.element = this.createElement(); //containing element\r\n\t\tthis.containerElement = this.createContainerElement(); //containing element\r\n\t\tthis.external = false;\r\n\t\tthis.links = [];\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.initializeElement();\r\n\t}\r\n\r\n\tcreateElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-footer\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\t\r\n\tcreateContainerElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-footer-contents\");\r\n\r\n\t\tthis.element.appendChild(el);\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tinitializeElement(){\r\n\t\tif(this.table.options.footerElement){\r\n\r\n\t\t\tswitch(typeof this.table.options.footerElement){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\tif(this.table.options.footerElement[0] === \"<\"){\r\n\t\t\t\t\tthis.containerElement.innerHTML = this.table.options.footerElement;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.external = true;\r\n\t\t\t\t\tthis.containerElement = document.querySelector(this.table.options.footerElement);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tthis.element = this.table.options.footerElement;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tappend(element, parent){\r\n\t\tthis.activate(parent);\r\n\r\n\t\tthis.containerElement.appendChild(element);\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\tprepend(element, parent){\r\n\t\tthis.activate(parent);\r\n\r\n\t\tthis.element.insertBefore(element, this.element.firstChild);\r\n\t\tthis.table.rowManager.adjustTableSize();\r\n\t}\r\n\r\n\tremove(element){\r\n\t\telement.parentNode.removeChild(element);\r\n\t\tthis.deactivate();\r\n\t}\r\n\r\n\tdeactivate(force){\r\n\t\tif(!this.element.firstChild || force){\r\n\t\t\tif(!this.external){\r\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t\t}\r\n\t\t\tthis.active = false;\r\n\t\t}\r\n\t}\r\n\r\n\tactivate(parent){\r\n\t\tif(!this.active){\r\n\t\t\tthis.active = true;\r\n\t\t\tif(!this.external){\r\n\t\t\t\tthis.table.element.appendChild(this.getElement());\r\n\t\t\t\tthis.table.element.style.display = '';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(parent){\r\n\t\t\tthis.links.push(parent);\r\n\t\t}\r\n\t}\r\n\r\n\tredraw(){\r\n\t\tthis.links.forEach(function(link){\r\n\t\t\tlink.footerRedraw();\r\n\t\t});\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\nimport Helpers from './Helpers.js';\r\nimport Row from '../row/Row.js';\r\n\r\nexport default class InteractionManager extends CoreFeature {\r\n\t\r\n\tconstructor (table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.el = null;\r\n\t\t\r\n\t\tthis.abortClasses = [\"tabulator-headers\", \"tabulator-table\"];\r\n\t\t\r\n\t\tthis.previousTargets = {};\r\n\t\t\r\n\t\tthis.listeners = [\r\n\t\t\t\"click\",\r\n\t\t\t\"dblclick\",\r\n\t\t\t\"contextmenu\",\r\n\t\t\t\"mouseenter\",\r\n\t\t\t\"mouseleave\",\r\n\t\t\t\"mouseover\",\r\n\t\t\t\"mouseout\",\r\n\t\t\t\"mousemove\",\r\n\t\t\t\"touchstart\",\r\n\t\t\t\"touchend\",\r\n\t\t];\r\n\t\t\r\n\t\tthis.componentMap = {\r\n\t\t\t\"tabulator-cell\":\"cell\",\r\n\t\t\t\"tabulator-row\":\"row\",\r\n\t\t\t\"tabulator-group\":\"group\",\r\n\t\t\t\"tabulator-col\":\"column\",\r\n\t\t};\r\n\t\t\r\n\t\tthis.pseudoTrackers = {\r\n\t\t\t\"row\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"cell\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"group\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t\t\"column\":{\r\n\t\t\t\tsubscriber:null,\r\n\t\t\t\ttarget:null,\r\n\t\t\t},\r\n\t\t}\r\n\t\t\r\n\t\tthis.pseudoTracking = false;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.el = this.table.element;\r\n\t\t\r\n\t\tthis.buildListenerMap();\r\n\t\tthis.bindSubscriptionWatchers();\r\n\t}\r\n\t\r\n\tbuildListenerMap(){\r\n\t\tvar listenerMap = {};\r\n\t\t\r\n\t\tthis.listeners.forEach((listener) => {\r\n\t\t\tlistenerMap[listener] = {\r\n\t\t\t\thandler:null,\r\n\t\t\t\tcomponents:[],\r\n\t\t\t}\r\n\t\t})\r\n\t\t\r\n\t\tthis.listeners = listenerMap;\r\n\t}\r\n\t\r\n\tbindPseudoEvents(){\r\n\t\tObject.keys(this.pseudoTrackers).forEach((key) => {\r\n\t\t\tthis.pseudoTrackers[key].subscriber = this.pseudoMouseEnter.bind(this, key);\r\n\t\t\tthis.subscribe(key + \"-mouseover\", this.pseudoTrackers[key].subscriber);\r\n\t\t});\r\n\t\t\r\n\t\tthis.pseudoTracking = true;\r\n\t}\r\n\t\r\n\tpseudoMouseEnter(key, e, target){\r\n\t\tif(this.pseudoTrackers[key].target !== target){\r\n\t\t\t\r\n\t\t\tif(this.pseudoTrackers[key].target){\r\n\t\t\t\tthis.dispatch(key + \"-mouseleave\", e, target);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.pseudoMouseLeave(key, e);\r\n\t\t\t\r\n\t\t\tthis.pseudoTrackers[key].target = target;\r\n\t\t\t\r\n\t\t\tthis.dispatch(key + \"-mouseenter\", e, target);\r\n\t\t}\r\n\t}\r\n\t\r\n\tpseudoMouseLeave(key, e){\r\n\t\tvar leaveList = Object.keys(this.pseudoTrackers),\r\n\t\tlinkedKeys = {\r\n\t\t\t\"row\":[\"cell\"],\r\n\t\t\t\"cell\":[\"row\"],\r\n\t\t};\r\n\t\t\r\n\t\tleaveList = leaveList.filter((item) => {\r\n\t\t\tvar links = linkedKeys[key];\r\n\t\t\treturn item !== key && (!links || (links && !links.includes(item)));\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\tleaveList.forEach((key) => {\r\n\t\t\tvar target = this.pseudoTrackers[key].target;\r\n\t\t\t\r\n\t\t\tif(this.pseudoTrackers[key].target){\r\n\t\t\t\tthis.dispatch(key + \"-mouseleave\", e, target);\r\n\t\t\t\t\r\n\t\t\t\tthis.pseudoTrackers[key].target = null;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t\r\n\tbindSubscriptionWatchers(){\r\n\t\tvar listeners = Object.keys(this.listeners),\r\n\t\tcomponents = Object.values(this.componentMap);\r\n\t\t\r\n\t\tfor(let comp of components){\r\n\t\t\tfor(let listener of listeners){\r\n\t\t\t\tlet key = comp + \"-\" + listener;\r\n\t\t\t\t\r\n\t\t\t\tthis.subscriptionChange(key, this.subscriptionChanged.bind(this, comp, listener));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.subscribe(\"table-destroy\", this.clearWatchers.bind(this))\r\n\t}\r\n\t\r\n\tsubscriptionChanged(component, key, added){\r\n\t\tvar listener = this.listeners[key].components,\r\n\t\tindex = listener.indexOf(component),\r\n\t\tchanged = false;\r\n\t\t\r\n\t\tif(added){\r\n\t\t\tif(index === -1){\r\n\t\t\t\tlistener.push(component);\r\n\t\t\t\tchanged = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(!this.subscribed(component + \"-\" + key)){\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tlistener.splice(index, 1);\r\n\t\t\t\t\tchanged = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif((key === \"mouseenter\" || key === \"mouseleave\") && !this.pseudoTracking){\r\n\t\t\tthis.bindPseudoEvents();\r\n\t\t}\r\n\t\t\r\n\t\tif(changed){\r\n\t\t\tthis.updateEventListeners();\r\n\t\t}\r\n\t}\r\n\t\r\n\tupdateEventListeners(){\r\n\t\tfor(let key in this.listeners){\r\n\t\t\tlet listener = this.listeners[key];\r\n\t\t\t\r\n\t\t\tif(listener.components.length){\r\n\t\t\t\tif(!listener.handler){\r\n\t\t\t\t\tlistener.handler = this.track.bind(this, key);\r\n\t\t\t\t\tthis.el.addEventListener(key, listener.handler)\r\n\t\t\t\t\t// this.el.addEventListener(key, listener.handler, {passive: true})\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(listener.handler){\r\n\t\t\t\t\tthis.el.removeEventListener(key, listener.handler)\r\n\t\t\t\t\tlistener.handler = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\ttrack(type, e){\r\n\t\tvar path = (e.composedPath && e.composedPath()) || e.path;\r\n\t\t\r\n\t\tvar targets = this.findTargets(path);\r\n\t\ttargets = this.bindComponents(type, targets);\r\n\t\t\r\n\t\tthis.triggerEvents(type, e, targets);\r\n\t\t\r\n\t\tif(this.pseudoTracking && (type == \"mouseover\" || type == \"mouseleave\") && !Object.keys(targets).length){\r\n\t\t\tthis.pseudoMouseLeave(\"none\", e);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfindTargets(path){\r\n\t\tvar targets = {};\r\n\t\t\r\n\t\tlet componentMap = Object.keys(this.componentMap);\r\n\t\t\r\n\t\tfor (let el of path) {\r\n\t\t\tlet classList = el.classList ? [...el.classList] : [];\r\n\t\t\t\r\n\t\t\tlet abort = classList.filter((item) => {\r\n\t\t\t\treturn this.abortClasses.includes(item);\r\n\t\t\t})\r\n\t\t\t\r\n\t\t\tif(abort.length){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlet elTargets = classList.filter((item) => {\r\n\t\t\t\treturn componentMap.includes(item);\r\n\t\t\t})\r\n\t\t\t\r\n\t\t\tfor (let target of elTargets) {\r\n\t\t\t\ttargets[this.componentMap[target]] = el;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(targets.group && targets.group === targets.row){\r\n\t\t\tdelete targets.row;\r\n\t\t}\r\n\t\t\r\n\t\treturn targets;\r\n\t}\r\n\t\r\n\tbindComponents(type, targets){\r\n\t\t//ensure row component is looked up before cell\r\n\t\tvar keys = Object.keys(targets).reverse(),\r\n\t\tlistener = this.listeners[type],\r\n\t\ttargetMatches = {};\r\n\t\t\r\n\t\tfor(let key of keys){\r\n\t\t\tlet component;\r\n\t\t\tlet target = targets[key];\r\n\t\t\tlet previousTarget = this.previousTargets[key];\r\n\t\t\t\r\n\t\t\tif(previousTarget && previousTarget.target === target){\r\n\t\t\t\tcomponent = previousTarget.component;\r\n\t\t\t}else{\r\n\t\t\t\tswitch(key){\r\n\t\t\t\t\tcase \"row\":\r\n\t\t\t\t\tcase \"group\":\r\n\t\t\t\t\tif(listener.components.includes(\"row\") || listener.components.includes(\"cell\") || listener.components.includes(\"group\")){\r\n\t\t\t\t\t\tlet rows = this.table.rowManager.getVisibleRows(true);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcomponent = rows.find((row) => {\r\n\t\t\t\t\t\t\treturn row.getElement() === target;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(targets[\"row\"] && targets[\"row\"].parentNode && targets[\"row\"].parentNode.closest(\".tabulator-row\")){\r\n\t\t\t\t\t\t\ttargets[key] = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"column\":\r\n\t\t\t\t\tif(listener.components.includes(\"column\")){\r\n\t\t\t\t\t\tcomponent = this.table.columnManager.findColumn(target);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"cell\":\r\n\t\t\t\t\tif(listener.components.includes(\"cell\")){\r\n\t\t\t\t\t\tif(targets[\"row\"] instanceof Row){\r\n\t\t\t\t\t\t\tcomponent = targets[\"row\"].findCell(target);\r\n\t\t\t\t\t\t}else{\t\r\n\t\t\t\t\t\t\tif(targets[\"row\"]){\r\n\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?\")\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(component){\r\n\t\t\t\ttargets[key] = component;\r\n\t\t\t\ttargetMatches[key] = {\r\n\t\t\t\t\ttarget:target,\r\n\t\t\t\t\tcomponent:component,\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.previousTargets = targetMatches;\r\n\t\t\r\n\t\treturn targets;\r\n\t}\r\n\t\r\n\ttriggerEvents(type, e, targets){\r\n\t\tvar listener = this.listeners[type];\r\n\t\t\r\n\t\tfor(let key in targets){\r\n\t\t\tif(targets[key] && listener.components.includes(key)){\r\n\t\t\t\tthis.dispatch(key + \"-\" + type, e, targets[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tclearWatchers(){\r\n\t\tfor(let key in this.listeners){\r\n\t\t\tlet listener = this.listeners[key];\r\n\t\t\t\r\n\t\t\tif(listener.handler){\r\n\t\t\t\tthis.el.removeEventListener(key, listener.handler)\r\n\t\t\t\tlistener.handler = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}","export default class ComponentFunctionBinder{\r\n\r\n\tconstructor(table){\r\n\t\tthis.table = table;\r\n\r\n\t\tthis.bindings = {};\r\n\t}\r\n\r\n\tbind(type, funcName, handler){\r\n\t\tif(!this.bindings[type]){\r\n\t\t\tthis.bindings[type] = {};\r\n\t\t}\r\n\r\n\t\tif(this.bindings[type][funcName]){\r\n\t\t\tconsole.warn(\"Unable to bind component handler, a matching function name is already bound\", type, funcName, handler)\r\n\t\t}else{\r\n\t\t\tthis.bindings[type][funcName] = handler;\r\n\t\t}\r\n\t}\r\n\r\n\thandle(type, component, name){\r\n\t\tif(this.bindings[type] && this.bindings[type][name] && typeof this.bindings[type][name].bind === 'function'){\r\n\t\t\treturn this.bindings[type][name].bind(null, component);\r\n\t\t}else{\r\n\t\t\tif(name !== \"then\" && typeof name === \"string\" && !name.startsWith(\"_\")){\r\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?\")\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","import CoreFeature from '../CoreFeature.js';\r\n\r\nexport default class DataLoader extends CoreFeature{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.loaderElement = this.createLoaderElement(); //loader message div\r\n\t\tthis.msgElement = this.createMsgElement(); //message element\r\n\t\tthis.loadingElement = null;\r\n\t\tthis.errorElement = null;\r\n\r\n\t\tthis.requestOrder = 0; //prevent requests comming out of sequence if overridden by another load request\r\n\t\tthis.loading = false;\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tvar template;\r\n\r\n\t\tthis.loaderElement.appendChild(this.msgElement);\r\n\r\n\t\tif(this.table.options.dataLoaderLoading){\r\n\t\t\tif(typeof this.table.options.dataLoaderLoading == \"string\"){\r\n\t\t\t\ttemplate = document.createElement('template');\r\n\t\t\t\ttemplate.innerHTML = this.table.options.dataLoaderLoading.trim();\r\n\t\t\t\tthis.loadingElement = template.firstElementChild;\r\n\t\t\t}else{\r\n\t\t\t\tthis.loadingElement = this.table.options.dataLoaderLoading;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.table.options.dataLoaderError){\r\n\t\t\tif(typeof this.table.options.dataLoaderError == \"string\"){\r\n\t\t\t\ttemplate = document.createElement('template');\r\n\t\t\t\ttemplate.innerHTML = this.table.options.dataLoaderError.trim();\r\n\t\t\t\tthis.errorElement = template.firstElementChild;\r\n\t\t\t}else{\r\n\t\t\t\tthis.errorElement = this.table.options.dataLoaderError;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tcreateLoaderElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-loader\");\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateMsgElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\r\n\t\tel.classList.add(\"tabulator-loader-msg\");\r\n\t\tel.setAttribute(\"role\", \"alert\");\r\n\r\n\t\treturn el;\r\n\t}\r\n\r\n\tload(data, params, config, replace, silent){\r\n\t\tvar requestNo = ++this.requestOrder;\r\n\r\n\t\tthis.dispatchExternal(\"dataLoading\", data);\r\n\r\n\t\t//parse json data to array\r\n\t\tif (data && (data.indexOf(\"{\") == 0 || data.indexOf(\"[\") == 0)){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(this.confirm(\"data-loading\", [data, params, config, silent])){\r\n\t\t\tthis.loading = true;\r\n\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis.showLoader();\r\n\t\t\t}\r\n\r\n\t\t\t//get params for request\r\n\t\t\tparams = this.chain(\"data-params\", [data, config, silent], params || {}, params || {});\r\n\r\n\t\t\tparams = this.mapParams(params, this.table.options.dataSendParams);\r\n\r\n\t\t\tvar result = this.chain(\"data-load\", [data, params, config, silent], false, Promise.resolve([]));\r\n\t\t\t\r\n\t\t\treturn result.then((response) => {\r\n\t\t\t\tif(!Array.isArray(response) && typeof response == \"object\"){\r\n\t\t\t\t\tresponse = this.mapParams(response, this.objectInvert(this.table.options.dataReceiveParams));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar rowData = this.chain(\"data-loaded\", response, null, response);\r\n\r\n\t\t\t\tif(requestNo == this.requestOrder){\r\n\t\t\t\t\tthis.hideLoader();\r\n\r\n\t\t\t\t\tif(rowData !== false){\r\n\t\t\t\t\t\tthis.dispatchExternal(\"dataLoaded\", rowData);\r\n\t\t\t\t\t\tthis.table.rowManager.setData(rowData, replace, !replace);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\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\");\r\n\t\t\t\t}\r\n\t\t\t}).catch((error) => {\r\n\t\t\t\tconsole.error(\"Data Load Error: \", error);\r\n\t\t\t\tthis.dispatchExternal(\"dataLoadError\", error);\r\n\r\n\t\t\t\tif(!silent){\r\n\t\t\t\t\tthis.showError();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.hideLoader();\r\n\t\t\t\t}, this.table.options.dataLoaderErrorTimeout);\r\n\t\t\t})\r\n\t\t\t.finally(() => {\r\n\t\t\t\tthis.loading = false;\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\tthis.dispatchExternal(\"dataLoaded\", data);\r\n\r\n\t\t\tif(!data){\r\n\t\t\t\tdata = [];\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.rowManager.setData(data, replace, !replace);\r\n\t\t\treturn Promise.resolve();\r\n\t\t}\r\n\t}\r\n\r\n\tmapParams(params, map){\r\n\t\tvar output = {};\r\n\r\n\t\tfor(let key in params){\r\n\t\t\toutput[map.hasOwnProperty(key) ? map[key] : key] = params[key];\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tobjectInvert(obj){\r\n\t\tvar output = {};\r\n\r\n\t\tfor(let key in obj){\r\n\t\t\toutput[obj[key]] = key;\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tblockActiveLoad(){\r\n\t\tthis.requestOrder++;\r\n\t}\r\n\r\n\tshowLoader(){\r\n\t\tvar shouldLoad = typeof this.table.options.dataLoader === \"function\" ? this.table.options.dataLoader() : this.table.options.dataLoader;\r\n\r\n\t\tif(shouldLoad){\r\n\t\t\tthis.hideLoader();\r\n\r\n\t\t\twhile(this.msgElement.firstChild) this.msgElement.removeChild(this.msgElement.firstChild);\r\n\r\n\t\t\tthis.msgElement.classList.remove(\"tabulator-error\");\r\n\t\t\tthis.msgElement.classList.add(\"tabulator-loading\");\r\n\r\n\t\t\tif(this.loadingElement){\r\n\t\t\t\tthis.msgElement.appendChild(this.loadingElement);\r\n\t\t\t}else{\r\n\t\t\t\tthis.msgElement.innerHTML = this.langText(\"data|loading\");\r\n\t\t\t}\r\n\r\n\t\t\tthis.table.element.appendChild(this.loaderElement);\r\n\t\t}\r\n\t}\r\n\r\n\tshowError(){\r\n\t\tthis.hideLoader();\r\n\r\n\t\twhile(this.msgElement.firstChild) this.msgElement.removeChild(this.msgElement.firstChild);\r\n\t\tthis.msgElement.classList.remove(\"tabulator-loading\");\r\n\t\tthis.msgElement.classList.add(\"tabulator-error\");\r\n\r\n\t\tif(this.errorElement){\r\n\t\t\tthis.msgElement.appendChild(this.errorElement);\r\n\t\t}else{\r\n\t\t\tthis.msgElement.innerHTML = this.langText(\"data|error\");\r\n\t\t}\r\n\r\n\t\tthis.table.element.appendChild(this.loaderElement);\r\n\t}\r\n\r\n\r\n\thideLoader(){\r\n\t\tif(this.loaderElement.parentNode){\r\n\t\t\tthis.loaderElement.parentNode.removeChild(this.loaderElement);\r\n\t\t}\r\n\t}\r\n}","export default class ExternalEventBus {\r\n\r\n\tconstructor(table, optionsList, debug){\r\n\t\tthis.table = table;\r\n\t\tthis.events = {};\r\n\t\tthis.optionsList = optionsList || {};\r\n\t\tthis.subscriptionNotifiers = {};\r\n\r\n\t\tthis.dispatch = debug ? this._debugDispatch.bind(this) : this._dispatch.bind(this);\r\n\t\tthis.debug = debug;\r\n\t}\r\n\r\n\tsubscriptionChange(key, callback){\r\n\t\tif(!this.subscriptionNotifiers[key]){\r\n\t\t\tthis.subscriptionNotifiers[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.subscriptionNotifiers[key].push(callback);\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis._notifiySubscriptionChange(key, true);\r\n\t\t}\r\n\t}\r\n\r\n\tsubscribe(key, callback){\r\n\t\tif(!this.events[key]){\r\n\t\t\tthis.events[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.events[key].push(callback);\r\n\r\n\t\tthis._notifiySubscriptionChange(key, true);\r\n\t}\r\n\r\n\tunsubscribe(key, callback){\r\n\t\tvar index;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tif(callback){\r\n\t\t\t\tindex = this.events[key].findIndex((item) => {\r\n\t\t\t\t\treturn item === callback;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tthis.events[key].splice(index, 1);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Cannot remove event, no matching event found:\", key, callback);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tdelete this.events[key];\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cannot remove event, no events set on:\", key);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._notifiySubscriptionChange(key, false);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.events[key] && this.events[key].length;\r\n\t}\r\n\r\n\t_notifiySubscriptionChange(key, subscribed){\r\n\t\tvar notifiers = this.subscriptionNotifiers[key];\r\n\r\n\t\tif(notifiers){\r\n\t\t\tnotifiers.forEach((callback)=>{\r\n\t\t\t\tcallback(subscribed);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_dispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift(),\r\n\t\tresult;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tthis.events[key].forEach((callback, i) => {\r\n\t\t\t\tlet callResult = callback.apply(this.table, args);\r\n\r\n\t\t\t\tif(!i){\r\n\t\t\t\t\tresult = callResult;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t_debugDispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"ExternalEvent:\" + args[0];\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._dispatch(...arguments)\r\n\t}\r\n}","export default class InternalEventBus {\r\n\r\n\tconstructor(debug){\r\n\t\tthis.events = {};\r\n\t\tthis.subscriptionNotifiers = {};\r\n\r\n\t\tthis.dispatch = debug ? this._debugDispatch.bind(this) : this._dispatch.bind(this);\r\n\t\tthis.chain = debug ? this._debugChain.bind(this) : this._chain.bind(this);\r\n\t\tthis.confirm = debug ? this._debugConfirm.bind(this) : this._confirm.bind(this);\r\n\t\tthis.debug = debug;\r\n\t}\r\n\r\n\tsubscriptionChange(key, callback){\r\n\t\tif(!this.subscriptionNotifiers[key]){\r\n\t\t\tthis.subscriptionNotifiers[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.subscriptionNotifiers[key].push(callback);\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis._notifiySubscriptionChange(key, true);\r\n\t\t}\r\n\t}\r\n\r\n\tsubscribe(key, callback, priority = 10000){\r\n\t\tif(!this.events[key]){\r\n\t\t\tthis.events[key] = [];\r\n\t\t}\r\n\r\n\t\tthis.events[key].push({callback, priority});\r\n\r\n\t\tthis.events[key].sort((a, b) => {\r\n\t\t\treturn a.priority - b.priority;\r\n\t\t});\r\n\r\n\t\tthis._notifiySubscriptionChange(key, true);\r\n\t}\r\n\r\n\tunsubscribe(key, callback){\r\n\t\tvar index;\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tif(callback){\r\n\t\t\t\tindex = this.events[key].findIndex((item) => {\r\n\t\t\t\t\treturn item.callback === callback;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(index > -1){\r\n\t\t\t\t\tthis.events[key].splice(index, 1);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Cannot remove event, no matching event found:\", key, callback);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Cannot remove event, no events set on:\", key);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._notifiySubscriptionChange(key, false);\r\n\t}\r\n\r\n\tsubscribed(key){\r\n\t\treturn this.events[key] && this.events[key].length;\r\n\t}\r\n\r\n\t_chain(key, args, initialValue, fallback){\r\n\t\tvar value = initialValue;\r\n\r\n\t\tif(!Array.isArray(args)){\r\n\t\t\targs = [args];\r\n\t\t}\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis.events[key].forEach((subscriber, i) => {\r\n\t\t\t\tvalue = subscriber.callback.apply(this, args.concat([value]));\r\n\t\t\t});\r\n\r\n\t\t\treturn value;\r\n\t\t}else{\r\n\t\t\treturn typeof fallback === \"function\" ? fallback() : fallback;\r\n\t\t}\r\n\t}\r\n\r\n\t_confirm(key, args){\r\n\t\tvar confirmed = false;\r\n\r\n\t\tif(!Array.isArray(args)){\r\n\t\t\targs = [args];\r\n\t\t}\r\n\r\n\t\tif(this.subscribed(key)){\r\n\t\t\tthis.events[key].forEach((subscriber, i) => {\r\n\t\t\t\tif(subscriber.callback.apply(this, args)){\r\n\t\t\t\t\tconfirmed = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn confirmed;\r\n\t}\r\n\r\n\t_notifiySubscriptionChange(key, subscribed){\r\n\t\tvar notifiers = this.subscriptionNotifiers[key];\r\n\r\n\t\tif(notifiers){\r\n\t\t\tnotifiers.forEach((callback)=>{\r\n\t\t\t\tcallback(subscribed);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_dispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift();\r\n\r\n\t\tif(this.events[key]){\r\n\t\t\tthis.events[key].forEach((subscriber) => {\r\n\t\t\t\tlet callResult = subscriber.callback.apply(this, args);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t_debugDispatch(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._dispatch(...arguments);\r\n\t}\r\n\r\n\t_debugChain(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._chain(...arguments);\r\n\t}\r\n\r\n\t_debugConfirm(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args[0];\r\n\r\n\t\targs[0] = \"InternalEvent:\" + key;\r\n\r\n\t\tif(this.debug === true || this.debug.includes(key)){\r\n\t\t\tconsole.log(...args);\r\n\t\t}\r\n\r\n\t\treturn this._confirm(...arguments);\r\n\t}\r\n}","import Tabulator from '../Tabulator.js';\r\n\r\nclass TableRegistry {\r\n\r\n\tstatic register(table){\r\n\t\tTableRegistry.tables.push(table);\r\n\t}\r\n\r\n\tstatic deregister(table){\r\n\t\tvar index = TableRegistry.tables.indexOf(table);\r\n\r\n\t\tif(index > -1){\r\n\t\t\tTableRegistry.tables.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\tstatic lookupTable(query, silent){\r\n\t\tvar results = [],\r\n\t\tmatches, match;\r\n\r\n\t\tif(typeof query === \"string\"){\r\n\t\t\tmatches = document.querySelectorAll(query);\r\n\r\n\t\t\tif(matches.length){\r\n\t\t\t\tfor(var i = 0; i < matches.length; i++){\r\n\t\t\t\t\tmatch = TableRegistry.matchElement(matches[i]);\r\n\r\n\t\t\t\t\tif(match){\r\n\t\t\t\t\t\tresults.push(match);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}else if((typeof HTMLElement !== \"undefined\" && query instanceof HTMLElement) || query instanceof Tabulator){\r\n\t\t\tmatch = TableRegistry.matchElement(query);\r\n\r\n\t\t\tif(match){\r\n\t\t\t\tresults.push(match);\r\n\t\t\t}\r\n\t\t}else if(Array.isArray(query)){\r\n\t\t\tquery.forEach(function(item){\r\n\t\t\t\tresults = results.concat(TableRegistry.lookupTable(item));\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tif(!silent){\r\n\t\t\t\tconsole.warn(\"Table Connection Error - Invalid Selector\", query);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn results;\r\n\t}\r\n\r\n\tstatic matchElement(element){\r\n\t\treturn TableRegistry.tables.find(function(table){\r\n\t\t\treturn element instanceof Tabulator ? table === element : table.element === element;\r\n\t\t});\r\n\t}\r\n}\r\n\r\nTableRegistry.tables = [];\r\n\r\nexport default TableRegistry;","//resize columns to fit data they contain\r\nexport default function(columns){\r\n\tthis.table.columnManager.renderer.reinitializeColumnWidths(columns);\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n};","//resize columns to fit data the contain and stretch last column to fill table\r\nexport default function(columns){\r\n\tvar colsWidth = 0,\r\n\ttableWidth = this.table.rowManager.element.clientWidth,\r\n\tgap = 0,\r\n\tlastCol = false;\r\n\r\n\tcolumns.forEach((column, i) => {\r\n\t\tif(!column.widthFixed){\r\n\t\t\tcolumn.reinitializeWidth();\r\n\t\t}\r\n\r\n\t\tif(this.table.options.responsiveLayout ? column.modules.responsive.visible : column.visible){\r\n\t\t\tlastCol = column;\r\n\t\t}\r\n\r\n\t\tif(column.visible){\r\n\t\t\tcolsWidth += column.getWidth();\r\n\t\t}\r\n\t});\r\n\r\n\tif(lastCol){\r\n\t\tgap = tableWidth - colsWidth + lastCol.getWidth();\r\n\r\n\t\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\t\tlastCol.setWidth(0);\r\n\t\t\tthis.table.modules.responsiveLayout.update();\r\n\t\t}\r\n\r\n\t\tif(gap > 0){\r\n\t\t\tlastCol.setWidth(gap);\r\n\t\t}else{\r\n\t\t\tlastCol.reinitializeWidth();\r\n\t\t}\r\n\t}else{\r\n\t\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\t\tthis.table.modules.responsiveLayout.update();\r\n\t\t}\r\n\t}\r\n};","//resize columns to fit data they contain and stretch row to fill table, also used for fitDataTable\r\nexport default function(columns){\r\n\tcolumns.forEach(function(column){\r\n\t\tcolumn.reinitializeWidth();\r\n\t});\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport defaultModes from './defaults/modes.js';\r\n\r\nclass Layout extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table, \"layout\");\r\n\r\n\t\tthis.mode = null;\r\n\r\n\t\tthis.registerTableOption(\"layout\", \"fitData\"); //layout type\r\n\t\tthis.registerTableOption(\"layoutColumnsOnNewData\", false); //update column widths on setData\r\n\r\n\t\tthis.registerColumnOption(\"widthGrow\");\r\n\t\tthis.registerColumnOption(\"widthShrink\");\r\n\t}\r\n\r\n\t//initialize layout system\r\n\tinitialize(){\r\n\t\tvar layout = this.table.options.layout;\r\n\r\n\t\tif(Layout.modes[layout]){\r\n\t\t\tthis.mode = layout;\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Layout Error - invalid mode set, defaulting to 'fitData' : \" + layout);\r\n\t\t\tthis.mode = 'fitData';\r\n\t\t}\r\n\r\n\t\tthis.table.element.setAttribute(\"tabulator-layout\", this.mode);\r\n\t}\r\n\r\n\tgetMode(){\r\n\t\treturn this.mode;\r\n\t}\r\n\r\n\t//trigger table layout\r\n\tlayout(){\r\n\t\tthis.dispatch(\"layout-refreshing\")\r\n\t\tLayout.modes[this.mode].call(this, this.table.columnManager.columnsByIndex);\r\n\r\n\t\tthis.dispatch(\"layout-refreshed\")\r\n\t}\r\n}\r\n\r\nLayout.moduleName = \"layout\";\r\n\r\n//load defaults\r\nLayout.modes = defaultModes;\r\n\r\nexport default Layout;","//resize columns to fit\r\nexport default function(columns){\r\n\tvar totalWidth = this.table.element.clientWidth; //table element width\r\n\tvar fixedWidth = 0; //total width of columns with a defined width\r\n\tvar flexWidth = 0; //total width available to flexible columns\r\n\tvar flexGrowUnits = 0; //total number of widthGrow blocks accross all columns\r\n\tvar flexColWidth = 0; //desired width of flexible columns\r\n\tvar flexColumns = []; //array of flexible width columns\r\n\tvar fixedShrinkColumns = []; //array of fixed width columns that can shrink\r\n\tvar flexShrinkUnits = 0; //total number of widthShrink blocks accross all columns\r\n\tvar overflowWidth = 0; //horizontal overflow width\r\n\tvar gapFill=0; //number of pixels to be added to final column to close and half pixel gaps\r\n\r\n\tfunction calcWidth(width){\r\n\t\tvar colWidth;\r\n\r\n\t\tif(typeof(width) == \"string\"){\r\n\t\t\tif(width.indexOf(\"%\") > -1){\r\n\t\t\t\tcolWidth = (totalWidth / 100) * parseInt(width);\r\n\t\t\t}else{\r\n\t\t\t\tcolWidth = parseInt(width);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tcolWidth = width;\r\n\t\t}\r\n\r\n\t\treturn colWidth;\r\n\t}\r\n\r\n\t//ensure columns resize to take up the correct amount of space\r\n\tfunction scaleColumns(columns, freeSpace, colWidth, shrinkCols){\r\n\r\n\t\tvar oversizeCols = [],\r\n\t\toversizeSpace = 0,\r\n\t\tremainingSpace = 0,\r\n\t\tnextColWidth = 0,\r\n\t\tremainingFlexGrowUnits = flexGrowUnits,\r\n\t\tgap = 0,\r\n\t\tchangeUnits = 0,\r\n\t\tundersizeCols = [];\r\n\r\n\t\tfunction calcGrow(col){\r\n\t\t\treturn (colWidth * (col.column.definition.widthGrow || 1));\r\n\t\t}\r\n\r\n\t\tfunction calcShrink(col){\r\n\t\t\treturn (calcWidth(col.width) - (colWidth * (col.column.definition.widthShrink || 0)))\r\n\t\t}\r\n\r\n\t\tcolumns.forEach(function(col, i){\r\n\t\t\tvar width = shrinkCols ? calcShrink(col) : calcGrow(col);\r\n\t\t\tif(col.column.minWidth >= width){\r\n\t\t\t\toversizeCols.push(col);\r\n\t\t\t}else{\r\n\t\t\t\tif(col.column.maxWidth && col.column.maxWidth < width){\r\n\t\t\t\t\tcol.width = col.column.maxWidth;\r\n\t\t\t\t\tfreeSpace -= col.column.maxWidth;\r\n\r\n\t\t\t\t\tremainingFlexGrowUnits -= shrinkCols ? (col.column.definition.widthShrink || 1) : (col.column.definition.widthGrow || 1);\r\n\r\n\t\t\t\t\tif(remainingFlexGrowUnits){\r\n\t\t\t\t\t\tcolWidth = Math.floor(freeSpace/remainingFlexGrowUnits);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tundersizeCols.push(col);\r\n\t\t\t\t\tchangeUnits += shrinkCols ? (col.column.definition.widthShrink || 1) : (col.column.definition.widthGrow || 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(oversizeCols.length){\r\n\t\t\toversizeCols.forEach(function(col){\r\n\t\t\t\toversizeSpace += shrinkCols ? col.width - col.column.minWidth : col.column.minWidth;\r\n\t\t\t\tcol.width = col.column.minWidth;\r\n\t\t\t});\r\n\r\n\t\t\tremainingSpace = freeSpace - oversizeSpace;\r\n\r\n\t\t\tnextColWidth = changeUnits ? Math.floor(remainingSpace/changeUnits) : remainingSpace;\r\n\r\n\t\t\tgap = remainingSpace - (nextColWidth * changeUnits);\r\n\r\n\t\t\tgap += scaleColumns(undersizeCols, remainingSpace, nextColWidth, shrinkCols);\r\n\t\t}else{\r\n\t\t\tgap = changeUnits ? freeSpace - (Math.floor(freeSpace/changeUnits) * changeUnits) : freeSpace;\r\n\r\n\t\t\tundersizeCols.forEach(function(column){\r\n\t\t\t\tcolumn.width = shrinkCols ? calcShrink(column) : calcGrow(column);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn gap;\r\n\t}\r\n\r\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\r\n\t\tthis.table.modules.responsiveLayout.update();\r\n\t}\r\n\r\n\t//adjust for vertical scrollbar if present\r\n\tif(this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight){\r\n\t\ttotalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth;\r\n\t}\r\n\r\n\tcolumns.forEach(function(column){\r\n\t\tvar width, minWidth, colWidth;\r\n\r\n\t\tif(column.visible){\r\n\r\n\t\t\twidth = column.definition.width;\r\n\t\t\tminWidth = parseInt(column.minWidth);\r\n\r\n\t\t\tif(width){\r\n\r\n\t\t\t\tcolWidth = calcWidth(width);\r\n\r\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\r\n\r\n\t\t\t\tif(column.definition.widthShrink){\r\n\t\t\t\t\tfixedShrinkColumns.push({\r\n\t\t\t\t\t\tcolumn:column,\r\n\t\t\t\t\t\twidth:colWidth > minWidth ? colWidth : minWidth\r\n\t\t\t\t\t});\r\n\t\t\t\t\tflexShrinkUnits += column.definition.widthShrink;\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\tflexColumns.push({\r\n\t\t\t\t\tcolumn:column,\r\n\t\t\t\t\twidth:0,\r\n\t\t\t\t});\r\n\t\t\t\tflexGrowUnits += column.definition.widthGrow || 1;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\t//calculate available space\r\n\tflexWidth = totalWidth - fixedWidth;\r\n\r\n\t//calculate correct column size\r\n\tflexColWidth = Math.floor(flexWidth / flexGrowUnits)\r\n\r\n\t//generate column widths\r\n\tvar gapFill = scaleColumns(flexColumns, flexWidth, flexColWidth, false);\r\n\r\n\t//increase width of last column to account for rounding errors\r\n\tif(flexColumns.length && gapFill > 0){\r\n\t\tflexColumns[flexColumns.length-1].width += + gapFill;\r\n\t}\r\n\r\n\t//caculate space for columns to be shrunk into\r\n\tflexColumns.forEach(function(col){\r\n\t\tflexWidth -= col.width;\r\n\t});\r\n\r\n\toverflowWidth = Math.abs(gapFill) + flexWidth;\r\n\r\n\t//shrink oversize columns if there is no available space\r\n\tif(overflowWidth > 0 && flexShrinkUnits){\r\n\t\tgapFill = scaleColumns(fixedShrinkColumns, overflowWidth, Math.floor(overflowWidth / flexShrinkUnits), true);\r\n\t}\r\n\r\n\t//decrease width of last column to account for rounding errors\r\n\tif(fixedShrinkColumns.length){\r\n\t\tfixedShrinkColumns[fixedShrinkColumns.length-1].width -= gapFill;\r\n\t}\r\n\r\n\tflexColumns.forEach(function(col){\r\n\t\tcol.column.setWidth(col.width);\r\n\t});\r\n\r\n\tfixedShrinkColumns.forEach(function(col){\r\n\t\tcol.column.setWidth(col.width);\r\n\t});\r\n};","import fitData from './modes/fitData.js';\r\nimport fitDataGeneral from './modes/fitDataGeneral.js';\r\nimport fitDataStretch from './modes/fitDataStretch.js';\r\nimport fitColumns from './modes/fitColumns.js';\r\n\r\nexport default {\r\n\tfitData:fitData,\r\n\tfitDataFill:fitDataGeneral,\r\n\tfitDataTable:fitDataGeneral,\r\n\tfitDataStretch:fitDataStretch,\r\n\tfitColumns:fitColumns ,\r\n};","export default {\r\n\t\"default\":{ //hold default locale text\r\n\t\t\"groups\":{\r\n\t\t\t\"item\":\"item\",\r\n\t\t\t\"items\":\"items\",\r\n\t\t},\r\n\t\t\"columns\":{\r\n\t\t},\r\n\t\t\"data\":{\r\n\t\t\t\"loading\":\"Loading\",\r\n\t\t\t\"error\":\"Error\",\r\n\t\t},\r\n\t\t\"pagination\":{\r\n\t\t\t\"page_size\":\"Page Size\",\r\n\t\t\t\"page_title\":\"Show Page\",\r\n\t\t\t\"first\":\"First\",\r\n\t\t\t\"first_title\":\"First Page\",\r\n\t\t\t\"last\":\"Last\",\r\n\t\t\t\"last_title\":\"Last Page\",\r\n\t\t\t\"prev\":\"Prev\",\r\n\t\t\t\"prev_title\":\"Prev Page\",\r\n\t\t\t\"next\":\"Next\",\r\n\t\t\t\"next_title\":\"Next Page\",\r\n\t\t\t\"all\":\"All\",\r\n\t\t\t\"counter\":{\r\n\t\t\t\t\"showing\": \"Showing\",\r\n\t\t\t\t\"of\": \"of\",\r\n\t\t\t\t\"rows\": \"rows\",\r\n\t\t\t\t\"pages\": \"pages\",\r\n\t\t\t}\r\n\t\t},\r\n\t\t\"headerFilters\":{\r\n\t\t\t\"default\":\"filter column...\",\r\n\t\t\t\"columns\":{}\r\n\t\t}\r\n\t},\r\n};","import Module from '../../core/Module.js';\r\n\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defaultLangs from './defaults/langs.js';\r\n\r\nclass Localize extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\r\n\t\tthis.locale = \"default\"; //current locale\r\n\t\tthis.lang = false; //current language\r\n\t\tthis.bindings = {}; //update events to call when locale is changed\r\n\t\tthis.langList = {};\r\n\r\n\t\tthis.registerTableOption(\"locale\", false); //current system language\r\n\t\tthis.registerTableOption(\"langs\", {});\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.langList = Helpers.deepClone(Localize.langs);\r\n\r\n\t\tif(this.table.options.columnDefaults.headerFilterPlaceholder !== false){\r\n\t\t\tthis.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder);\r\n\t\t}\r\n\r\n\t\tfor(let locale in this.table.options.langs){\r\n\t\t\tthis.installLang(locale, this.table.options.langs[locale]);\r\n\t\t}\r\n\r\n\t\tthis.setLocale(this.table.options.locale);\r\n\r\n\t\tthis.registerTableFunction(\"setLocale\", this.setLocale.bind(this));\r\n\t\tthis.registerTableFunction(\"getLocale\", this.getLocale.bind(this));\r\n\t\tthis.registerTableFunction(\"getLang\", this.getLang.bind(this));\r\n\t}\r\n\r\n\t//set header placehoder\r\n\tsetHeaderFilterPlaceholder(placeholder){\r\n\t\tthis.langList.default.headerFilters.default = placeholder;\r\n\t}\r\n\r\n\t//set header filter placeholder by column\r\n\tsetHeaderFilterColumnPlaceholder(column, placeholder){\r\n\t\tthis.langList.default.headerFilters.columns[column] = placeholder;\r\n\r\n\t\tif(this.lang && !this.lang.headerFilters.columns[column]){\r\n\t\t\tthis.lang.headerFilters.columns[column] = placeholder;\r\n\t\t}\r\n\t}\r\n\r\n\t//setup a lang description object\r\n\tinstallLang(locale, lang){\r\n\t\tif(this.langList[locale]){\r\n\t\t\tthis._setLangProp(this.langList[locale], lang);\r\n\t\t}else{\r\n\t\t\tthis.langList[locale] = lang;\r\n\t\t}\r\n\t}\r\n\r\n\t_setLangProp(lang, values){\r\n\t\tfor(let key in values){\r\n\t\t\tif(lang[key] && typeof lang[key] == \"object\"){\r\n\t\t\t\tthis._setLangProp(lang[key], values[key])\r\n\t\t\t}else{\r\n\t\t\t\tlang[key] = values[key];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//set current locale\r\n\tsetLocale(desiredLocale){\r\n\t\tdesiredLocale = desiredLocale || \"default\";\r\n\r\n\t\t//fill in any matching languge values\r\n\t\tfunction traverseLang(trans, path){\r\n\t\t\tfor(var prop in trans){\r\n\t\t\t\tif(typeof trans[prop] == \"object\"){\r\n\t\t\t\t\tif(!path[prop]){\r\n\t\t\t\t\t\tpath[prop] = {};\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttraverseLang(trans[prop], path[prop]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tpath[prop] = trans[prop];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//determing correct locale to load\r\n\t\tif(desiredLocale === true && navigator.language){\r\n\t\t\t//get local from system\r\n\t\t\tdesiredLocale = navigator.language.toLowerCase();\r\n\t\t}\r\n\r\n\t\tif(desiredLocale){\r\n\t\t\t//if locale is not set, check for matching top level locale else use default\r\n\t\t\tif(!this.langList[desiredLocale]){\r\n\t\t\t\tlet prefix = desiredLocale.split(\"-\")[0];\r\n\r\n\t\t\t\tif(this.langList[prefix]){\r\n\t\t\t\t\tconsole.warn(\"Localization Error - Exact matching locale not found, using closest match: \", desiredLocale, prefix);\r\n\t\t\t\t\tdesiredLocale = prefix;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Localization Error - Matching locale not found, using default: \", desiredLocale);\r\n\t\t\t\t\tdesiredLocale = \"default\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.locale = desiredLocale;\r\n\r\n\t\t//load default lang template\r\n\t\tthis.lang = Helpers.deepClone(this.langList.default || {});\r\n\r\n\t\tif(desiredLocale != \"default\"){\r\n\t\t\ttraverseLang(this.langList[desiredLocale], this.lang);\r\n\t\t}\r\n\r\n\t\tthis.dispatchExternal(\"localized\", this.locale, this.lang);\r\n\r\n\t\tthis._executeBindings();\r\n\t}\r\n\r\n\t//get current locale\r\n\tgetLocale(locale){\r\n\t\treturn this.locale;\r\n\t}\r\n\r\n\t//get lang object for given local or current if none provided\r\n\tgetLang(locale){\r\n\t\treturn locale ? this.langList[locale] : this.lang;\r\n\t}\r\n\r\n\t//get text for current locale\r\n\tgetText(path, value){\r\n\t\tvar path = value ? path + \"|\" + value : path,\r\n\t\tpathArray = path.split(\"|\"),\r\n\t\ttext = this._getLangElement(pathArray, this.locale);\r\n\r\n\t\t// if(text === false){\r\n\t\t// \tconsole.warn(\"Localization Error - Matching localized text not found for given path: \", path);\r\n\t\t// }\r\n\r\n\t\treturn text || \"\";\r\n\t}\r\n\r\n\t//traverse langs object and find localized copy\r\n\t_getLangElement(path, locale){\r\n\t\tvar root = this.lang;\r\n\r\n\t\tpath.forEach(function(level){\r\n\t\t\tvar rootPath;\r\n\r\n\t\t\tif(root){\r\n\t\t\t\trootPath = root[level];\r\n\r\n\t\t\t\tif(typeof rootPath != \"undefined\"){\r\n\t\t\t\t\troot = rootPath;\r\n\t\t\t\t}else{\r\n\t\t\t\t\troot = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn root;\r\n\t}\r\n\r\n\t//set update binding\r\n\tbind(path, callback){\r\n\t\tif(!this.bindings[path]){\r\n\t\t\tthis.bindings[path] = [];\r\n\t\t}\r\n\r\n\t\tthis.bindings[path].push(callback);\r\n\r\n\t\tcallback(this.getText(path), this.lang);\r\n\t}\r\n\r\n\t//itterate through bindings and trigger updates\r\n\t_executeBindings(){\r\n\t\tfor(let path in this.bindings){\r\n\t\t\tthis.bindings[path].forEach((binding) => {\r\n\t\t\t\tbinding(this.getText(path), this.lang);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}\r\n\r\nLocalize.moduleName = \"localize\";\r\n\r\n//load defaults\r\nLocalize.langs = defaultLangs;\r\n\r\nexport default Localize;","import Module from '../../core/Module.js';\r\nimport TableRegistry from '../../core/tools/TableRegistry.js';\r\n\r\nclass Comms extends Module{\r\n\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t}\r\n\r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"tableComms\", this.receive.bind(this));\r\n\t}\r\n\r\n\tgetConnections(selectors){\r\n\t\tvar connections = [],\r\n\t\tconnection;\r\n\r\n\t\tconnection = TableRegistry.lookupTable(selectors);\r\n\r\n\t\tconnection.forEach((con) =>{\r\n\t\t\tif(this.table !== con){\r\n\t\t\t\tconnections.push(con);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn connections;\r\n\t}\r\n\r\n\tsend(selectors, module, action, data){\r\n\t\tvar connections = this.getConnections(selectors);\r\n\r\n\t\tconnections.forEach((connection) => {\r\n\t\t\tconnection.tableComms(this.table.element, module, action, data);\r\n\t\t});\r\n\r\n\t\tif(!connections.length && selectors){\r\n\t\t\tconsole.warn(\"Table Connection Error - No tables matching selector found\", selectors);\r\n\t\t}\r\n\t}\r\n\r\n\treceive(table, module, action, data){\r\n\t\tif(this.table.modExists(module)){\r\n\t\t\treturn this.table.modules[module].commsReceived(table, action, data);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Inter-table Comms Error - no such module:\", module);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nComms.moduleName = \"comms\";\r\n\r\nexport default Comms;","import * as coreModules from '../modules/core.js';\r\nimport TableRegistry from './TableRegistry.js';\r\n\r\nexport default class ModuleBinder {\r\n\r\n\tconstructor(tabulator, modules){\r\n\t\tthis.bindStaticFuctionality(tabulator);\r\n\t\tthis.bindModules(tabulator, coreModules, true);\r\n\r\n\t\tif(modules){\r\n\t\t\tthis.bindModules(tabulator, modules);\r\n\t\t}\r\n\t}\r\n\r\n\tbindStaticFuctionality(tabulator){\r\n\t\ttabulator.moduleBindings = {};\r\n\r\n\t\ttabulator.extendModule = function(name, property, values){\r\n\t\t\tif(tabulator.moduleBindings[name]){\r\n\t\t\t\tvar source = tabulator.moduleBindings[name][property];\r\n\r\n\t\t\t\tif(source){\r\n\t\t\t\t\tif(typeof values == \"object\"){\r\n\t\t\t\t\t\tfor(let key in values){\r\n\t\t\t\t\t\t\tsource[key] = values[key];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Module Error - Invalid value type, it must be an object\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Module Error - property does not exist:\", property);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Module Error - module does not exist:\", name);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\ttabulator.registerModule = function(modules){\r\n\t\t\tif(!Array.isArray(modules)){\r\n\t\t\t\tmodules = [modules];\r\n\t\t\t}\r\n\r\n\t\t\tmodules.forEach((mod) => {\r\n\t\t\t\ttabulator.registerModuleBinding(mod)\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\ttabulator.registerModuleBinding = function(mod){\r\n\t\t\ttabulator.moduleBindings[mod.moduleName] = mod;\r\n\t\t};\r\n\r\n\t\ttabulator.findTable = function(query){\r\n\t\t\tvar results = TableRegistry.lookupTable(query, true);\r\n\t\t\treturn Array.isArray(results) && !results.length ? false : results;\r\n\t\t}\r\n\r\n\t\t//ensure that module are bound to instantiated function\r\n\t\ttabulator.prototype.bindModules = function(){\r\n\t\t\tvar orderedMods = [],\r\n\t\t\tunOrderedMods = [];\r\n\r\n\t\t\tthis.modules = {};\r\n\r\n\t\t\tfor(var name in tabulator.moduleBindings){\r\n\t\t\t\tlet mod = tabulator.moduleBindings[name];\r\n\t\t\t\tlet module = new mod(this);\r\n\r\n\t\t\t\tthis.modules[name] = module;\r\n\r\n\t\t\t\tif(mod.prototype.moduleCore){\r\n\t\t\t\t\tthis.modulesCore.push(module);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(mod.moduleInitOrder){\r\n\t\t\t\t\t\torderedMods.push(module);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tunOrderedMods.push(module);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\torderedMods.sort((a, b) => a.moduleInitOrder > b.moduleInitOrder ? 1 : -1);\r\n\r\n\t\t\tthis.modulesRegular = orderedMods.concat(unOrderedMods);\r\n\t\t}\r\n\t}\r\n\r\n\tbindModules(tabulator, modules, core){\r\n\t\tvar mods = Object.values(modules);\r\n\r\n\t\tif(core){\r\n\t\t\tmods.forEach((mod) => {\r\n\t\t\t\tmod.prototype.moduleCore = true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\ttabulator.registerModule(mods);\r\n\t}\r\n}","'use strict';\r\n\r\nimport defaultOptions from './defaults/options.js';\r\n\r\nimport ColumnManager from './ColumnManager.js';\r\nimport RowManager from './RowManager.js';\r\nimport FooterManager from './FooterManager.js';\r\n\r\nimport InteractionMonitor from './tools/InteractionMonitor.js';\r\nimport ComponentFunctionBinder from './tools/ComponentFunctionBinder.js';\r\nimport DataLoader from './tools/DataLoader.js';\r\n\r\nimport ExternalEventBus from './tools/ExternalEventBus.js';\r\nimport InternalEventBus from './tools/InternalEventBus.js';\r\n\r\nimport TableRegistry from './tools/TableRegistry.js';\r\nimport ModuleBinder from './tools/ModuleBinder.js';\r\n\r\nimport OptionsList from './tools/OptionsList.js';\r\n\r\nclass Tabulator {\r\n\r\n\tconstructor(element, options){\r\n\r\n\t\tthis.options = {};\r\n\r\n\t\tthis.columnManager = null; // hold Column Manager\r\n\t\tthis.rowManager = null; //hold Row Manager\r\n\t\tthis.footerManager = null; //holder Footer Manager\r\n\t\tthis.vdomHoz = null; //holder horizontal virtual dom\r\n\t\tthis.externalEvents = null; //handle external event messaging\r\n\t\tthis.eventBus = null; //handle internal event messaging\r\n\t\tthis.interactionMonitor = false; //track user interaction\r\n\t\tthis.browser = \"\"; //hold current browser type\r\n\t\tthis.browserSlow = false; //handle reduced functionality for slower browsers\r\n\t\tthis.browserMobile = false; //check if running on mobile, prevent resize cancelling edit on keyboard appearance\r\n\t\tthis.rtl = false; //check if the table is in RTL mode\r\n\t\tthis.originalElement = null; //hold original table element if it has been replaced\r\n\r\n\t\tthis.componentFunctionBinder = new ComponentFunctionBinder(this); //bind component functions\r\n\t\tthis.dataLoader = false; //bind component functions\r\n\r\n\t\tthis.modules = {}; //hold all modules bound to this table\r\n\t\tthis.modulesCore = []; //hold core modules bound to this table (for initialization purposes)\r\n\t\tthis.modulesRegular = []; //hold regular modules bound to this table (for initialization purposes)\r\n\r\n\t\tthis.optionsList = new OptionsList(this, \"table constructor\");\r\n\r\n\t\tthis.initialized = false;\r\n\r\n\t\tif(this.initializeElement(element)){\r\n\r\n\t\t\tthis.initializeCoreSystems(options);\r\n\r\n\t\t\t//delay table creation to allow event bindings immediately after the constructor\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis._create();\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tTableRegistry.register(this); //register table for inter-device communication\r\n\t}\r\n\r\n\tinitializeElement(element){\r\n\t\tif(typeof HTMLElement !== \"undefined\" && element instanceof HTMLElement){\r\n\t\t\tthis.element = element;\r\n\t\t\treturn true;\r\n\t\t}else if(typeof element === \"string\"){\r\n\t\t\tthis.element = document.querySelector(element);\r\n\r\n\t\t\tif(this.element){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Tabulator Creation Error - no element found matching selector: \", element);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Tabulator Creation Error - Invalid element provided:\", element);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeCoreSystems(options){\r\n\t\tthis.columnManager = new ColumnManager(this);\r\n\t\tthis.rowManager = new RowManager(this);\r\n\t\tthis.footerManager = new FooterManager(this);\r\n\t\tthis.dataLoader = new DataLoader(this);\r\n\r\n\t\tthis.bindModules();\r\n\r\n\t\tthis.options = this.optionsList.generate(Tabulator.defaultOptions, options)\r\n\r\n\t\tthis._clearObjectPointers();\r\n\r\n\t\tthis._mapDeprecatedFunctionality();\r\n\r\n\t\tthis.externalEvents = new ExternalEventBus(this, this.options, this.options.debugEventsExternal);\r\n\t\tthis.eventBus = new InternalEventBus(this.options.debugEventsInternal);\r\n\r\n\t\tthis.interactionMonitor = new InteractionMonitor(this);\r\n\r\n\t\tthis.dataLoader.initialize();\r\n\t\t// this.columnManager.initialize();\r\n\t\t// this.rowManager.initialize();\r\n\t\tthis.footerManager.initialize();\r\n\t}\r\n\r\n\t//convert deprecated functionality to new functions\r\n\t_mapDeprecatedFunctionality(){\r\n\t\t//all previously deprecated functionality removed in the 5.0 release\r\n\t}\r\n\r\n\t_clearSelection(){\r\n\r\n\t\tthis.element.classList.add(\"tabulator-block-select\");\r\n\r\n\t\tif (window.getSelection) {\r\n\t\t if (window.getSelection().empty) { // Chrome\r\n\t\t \twindow.getSelection().empty();\r\n\t\t } else if (window.getSelection().removeAllRanges) { // Firefox\r\n\t\t \twindow.getSelection().removeAllRanges();\r\n\t\t }\r\n\t\t} else if (document.selection) { // IE?\r\n\t\t\tdocument.selection.empty();\r\n\t\t}\r\n\r\n\t\tthis.element.classList.remove(\"tabulator-block-select\");\r\n\t}\r\n\r\n\t//create table\r\n\t_create(){\r\n\t\tthis.externalEvents.dispatch(\"tableBuilding\");\r\n\t\tthis.eventBus.dispatch(\"table-building\");\r\n\r\n\t\tthis._rtlCheck();\r\n\r\n\t\tthis._buildElement();\r\n\r\n\t\tthis._initializeTable();\r\n\r\n\t\tthis._loadInitialData();\r\n\r\n\t\tthis.initialized = true;\r\n\r\n\t\tthis.externalEvents.dispatch(\"tableBuilt\");\r\n\t}\r\n\r\n\t_rtlCheck(){\r\n\t\tvar style = window.getComputedStyle(this.element);\r\n\r\n\t\tswitch(this.options.textDirection){\r\n\t\t\tcase\"auto\":\r\n\t\t\tif(style.direction !== \"rtl\"){\r\n\t\t\t\tbreak;\r\n\t\t\t};\r\n\r\n\t\t\tcase \"rtl\":\r\n\t\t\tthis.element.classList.add(\"tabulator-rtl\");\r\n\t\t\tthis.rtl = true;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"ltr\":\r\n\t\t\tthis.element.classList.add(\"tabulator-ltr\");\r\n\r\n\t\t\tdefault:\r\n\t\t\tthis.rtl = false;\r\n\t\t}\r\n\t}\r\n\r\n\t//clear pointers to objects in default config object\r\n\t_clearObjectPointers(){\r\n\t\tthis.options.columns = this.options.columns.slice(0);\r\n\r\n\t\tif(Array.isArray(this.options.data) && !this.options.reactiveData){\r\n\t\t\tthis.options.data = this.options.data.slice(0);\r\n\t\t}\r\n\t}\r\n\r\n\t//build tabulator element\r\n\t_buildElement(){\r\n\t\tvar element = this.element,\r\n\t\toptions = this.options,\r\n\t\tnewElement;\r\n\r\n\t\tif(element.tagName === \"TABLE\"){\r\n\t\t\tthis.originalElement = this.element;\r\n\t\t\tnewElement = document.createElement(\"div\");\r\n\r\n\t\t\t//transfer attributes to new element\r\n\t\t\tvar attributes = element.attributes;\r\n\r\n\t\t\t// loop through attributes and apply them on div\r\n\t\t\tfor(var i in attributes){\r\n\t\t\t\tif(typeof attributes[i] == \"object\"){\r\n\t\t\t\t\tnewElement.setAttribute(attributes[i].name, attributes[i].value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// replace table with div element\r\n\t\t\telement.parentNode.replaceChild(newElement, element);\r\n\r\n\t\t\tthis.element = element = newElement;\r\n\t\t}\r\n\r\n\t\telement.classList.add(\"tabulator\");\r\n\t\telement.setAttribute(\"role\", \"grid\");\r\n\r\n\t\t//empty element\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\r\n\t\t//set table height\r\n\t\tif(options.height){\r\n\t\t\toptions.height = isNaN(options.height) ? options.height : options.height + \"px\";\r\n\t\t\telement.style.height = options.height;\r\n\t\t}\r\n\r\n\t\t//set table min height\r\n\t\tif(options.minHeight !== false){\r\n\t\t\toptions.minHeight = isNaN(options.minHeight) ? options.minHeight : options.minHeight + \"px\";\r\n\t\t\telement.style.minHeight = options.minHeight;\r\n\t\t}\r\n\r\n\t\t//set table maxHeight\r\n\t\tif(options.maxHeight !== false){\r\n\t\t\toptions.maxHeight = isNaN(options.maxHeight) ? options.maxHeight : options.maxHeight + \"px\";\r\n\t\t\telement.style.maxHeight = options.maxHeight;\r\n\t\t}\r\n\t}\r\n\r\n\t//initialize core systems and modules\r\n\t_initializeTable(){\r\n\t\tvar element = this.element,\r\n\t\toptions = this.options;\r\n\r\n\t\tthis.interactionMonitor.initialize();\r\n\r\n\t\tthis.columnManager.initialize();\r\n\t\tthis.rowManager.initialize();\r\n\r\n\t\tthis._detectBrowser();\r\n\r\n\t\t//initialize core modules\r\n\t\tthis.modulesCore.forEach((mod) => {\r\n\t\t\tmod.initialize();\r\n\t\t})\r\n\r\n\t\t//build table elements\r\n\t\telement.appendChild(this.columnManager.getElement());\r\n\t\telement.appendChild(this.rowManager.getElement());\r\n\r\n\t\tif(options.footerElement){\r\n\t\t\tthis.footerManager.activate();\r\n\t\t}\r\n\r\n\t\tif(options.autoColumns && options.data){\r\n\r\n\t\t\tthis.columnManager.generateColumnsFromRowData(this.options.data);\r\n\t\t}\r\n\r\n\t\t//initialize regular modules\r\n\t\tthis.modulesRegular.forEach((mod) => {\r\n\t\t\tmod.initialize();\r\n\t\t});\r\n\r\n\t\tthis.columnManager.setColumns(options.columns);\r\n\r\n\t\tthis.eventBus.dispatch(\"table-built\");\r\n\t}\r\n\r\n\t_loadInitialData(){\r\n\t\tthis.dataLoader.load(this.options.data);\r\n\t}\r\n\r\n\t//deconstructor\r\n\tdestroy(){\r\n\t\tvar element = this.element;\r\n\r\n\t\tTableRegistry.deregister(this); //deregister table from inter-device communication\r\n\r\n\t\tthis.eventBus.dispatch(\"table-destroy\");\r\n\r\n\t\t//clear row data\r\n\t\tthis.rowManager.rows.forEach(function(row){\r\n\t\t\trow.wipe();\r\n\t\t});\r\n\r\n\t\tthis.rowManager.rows = [];\r\n\t\tthis.rowManager.activeRows = [];\r\n\t\tthis.rowManager.displayRows = [];\r\n\r\n\t\t//clear DOM\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\t\telement.classList.remove(\"tabulator\");\r\n\t}\r\n\r\n\t_detectBrowser(){\r\n\t\tvar ua = navigator.userAgent||navigator.vendor||window.opera;\r\n\r\n\t\tif(ua.indexOf(\"Trident\") > -1){\r\n\t\t\tthis.browser = \"ie\";\r\n\t\t\tthis.browserSlow = true;\r\n\t\t}else if(ua.indexOf(\"Edge\") > -1){\r\n\t\t\tthis.browser = \"edge\";\r\n\t\t\tthis.browserSlow = true;\r\n\t\t}else if(ua.indexOf(\"Firefox\") > -1){\r\n\t\t\tthis.browser = \"firefox\";\r\n\t\t\tthis.browserSlow = false;\r\n\t\t}else{\r\n\t\t\tthis.browser = \"other\";\r\n\t\t\tthis.browserSlow = false;\r\n\t\t}\r\n\r\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));\r\n\t}\r\n\r\n\t////////////////// Data Handling //////////////////\r\n\t//block table redrawing\r\n\tblockRedraw(){\r\n\t\treturn this.rowManager.blockRedraw();\r\n\t}\r\n\r\n\t//restore table redrawing\r\n\trestoreRedraw(){\r\n\t\treturn this.rowManager.restoreRedraw();\r\n\t}\r\n\r\n\t//load data\r\n\tsetData(data, params, config){\r\n\t\tif(this.initialized){\r\n\t\t\treturn this.dataLoader.load(data, params, config, false);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"setData failed - table not yet initialized. To set initial data please use the 'data' property in the table constructor.\")\r\n\t\t}\r\n\t}\r\n\r\n\t//clear data\r\n\tclearData(){\r\n\t\tthis.dataLoader.blockActiveLoad();\r\n\t\tthis.rowManager.clearData();\r\n\t}\r\n\r\n\t//get table data array\r\n\tgetData(active){\r\n\t\treturn this.rowManager.getData(active);\r\n\t}\r\n\r\n\t//get table data array count\r\n\tgetDataCount(active){\r\n\t\treturn this.rowManager.getDataCount(active);\r\n\t}\r\n\r\n\t//replace data, keeping table in position with same sort\r\n\treplaceData(data, params, config){\r\n\t\tif(this.initialized){\r\n\t\t\treturn this.dataLoader.load(data, params, config, true, true);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"replaceData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update table data\r\n\tupdateData(data){\r\n\t\tvar responses = 0;\r\n\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\tresponses++;\r\n\r\n\t\t\t\t\t\t\trow.updateData(item)\r\n\t\t\t\t\t\t\t.then(()=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"updateData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\taddData(data, pos, index){\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tthis.rowManager.addRows(data, pos, index)\r\n\t\t\t\t\t.then((rows) => {\r\n\t\t\t\t\t\tvar output = [];\r\n\r\n\t\t\t\t\t\trows.forEach(function(row){\r\n\t\t\t\t\t\t\toutput.push(row.getComponent());\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tresolve(output);\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"addData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update table data\r\n\tupdateOrAddData(data){\r\n\t\tvar rows = [],\r\n\t\tresponses = 0;\r\n\r\n\t\tif(this.initialized){\r\n\t\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\tthis.dataLoader.blockActiveLoad();\r\n\r\n\t\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(data){\r\n\t\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\r\n\t\t\t\t\t\tresponses++;\r\n\r\n\t\t\t\t\t\tif(row){\r\n\t\t\t\t\t\t\trow.updateData(item)\r\n\t\t\t\t\t\t\t.then(()=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\t\t\t\t\t\t\t\trows.push(row.getComponent());\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve(rows);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.rowManager.addRows(item)\r\n\t\t\t\t\t\t\t.then((newRows)=>{\r\n\t\t\t\t\t\t\t\tresponses--;\r\n\t\t\t\t\t\t\t\trows.push(newRows[0].getComponent());\r\n\r\n\t\t\t\t\t\t\t\tif(!responses){\r\n\t\t\t\t\t\t\t\t\tresolve(rows);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"updateOrAddData failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//get row object\r\n\tgetRow(index){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching row found:\", index);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//get row object\r\n\tgetRowFromPosition(position, active){\r\n\t\tvar row = this.rowManager.getRowFromPosition(position, active);\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching row found:\", position);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t//delete row from table\r\n\tdeleteRow(index){\r\n\t\tvar foundRows = [];\r\n\r\n\t\tif(!Array.isArray(index)){\r\n\t\t\tindex = [index];\r\n\t\t}\r\n\r\n\t\t//find matching rows\r\n\t\tfor(let item of index){\r\n\t\t\tlet row = this.rowManager.findRow(item, true);\r\n\r\n\t\t\tif(row){\r\n\t\t\t\tfoundRows.push(row);\r\n\t\t\t}else{\r\n\t\t\t\tconsole.error(\"Delete Error - No matching row found:\", item);\r\n\t\t\t\treturn Promise.reject(\"Delete Error - No matching row found\")\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//sort rows into correct order to ensure smooth delete from table\r\n\t\tfoundRows.sort((a, b) => {\r\n\t\t\treturn this.rowManager.rows.indexOf(a) > this.rowManager.rows.indexOf(b) ? 1 : -1;\r\n\t\t});\r\n\r\n\t\t//delete rows\r\n\t\tfoundRows.forEach((row) =>{\r\n\t\t\trow.delete()\r\n\t\t});\r\n\r\n\t\tthis.rowManager.reRenderInPosition();\r\n\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\r\n\t//add row to table\r\n\taddRow(data, pos, index){\r\n\t\tif(this.initialized){\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\r\n\t\t\treturn this.rowManager.addRows(data, pos, index)\r\n\t\t\t.then((rows)=>{\r\n\t\t\t\treturn rows[0].getComponent();\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"addRow failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\t//update a row if it exitsts otherwise create it\r\n\tupdateOrAddRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t.then(()=>{\r\n\t\t\t\treturn row.getComponent();\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\treturn this.rowManager.addRows(data)\r\n\t\t\t.then((rows)=>{\r\n\t\t\t\treturn rows[0].getComponent();\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\t//update row data\r\n\tupdateRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t.then(()=>{\r\n\t\t\t\treturn Promise.resolve(row.getComponent());\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Update Error - No matching row found:\", index);\r\n\t\t\treturn Promise.reject(\"Update Error - No matching row found\");\r\n\t\t}\r\n\t}\r\n\r\n\t//scroll to row in DOM\r\n\tscrollToRow(index, position, ifVisible){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn this.rowManager.scrollToRow(row, position, ifVisible)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Scroll Error - No matching row found:\", index);\r\n\t\t\treturn Promise.reject(\"Scroll Error - No matching row found\");\r\n\t\t}\r\n\t}\r\n\r\n\tmoveRow(from, to, after){\r\n\t\tvar fromRow = this.rowManager.findRow(from);\r\n\r\n\t\tif(fromRow){\r\n\t\t\tfromRow.moveToRow(to, after);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching row found:\", from);\r\n\t\t}\r\n\t}\r\n\r\n\tgetRows(active){\r\n\t\treturn this.rowManager.getComponents(active);\r\n\t}\r\n\r\n\t//get position of row in table\r\n\tgetRowPosition(index, active){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\r\n\t\tif(row){\r\n\t\t\treturn this.rowManager.getRowPosition(row, active);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Position Error - No matching row found:\", index);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t/////////////// Column Functions ///////////////\r\n\tsetColumns(definition){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.columnManager.setColumns(definition);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"setColumns failed - table not yet initialized. To set initial data please use the 'columns' property in the table constructor.\")\r\n\t\t}\r\n\t}\r\n\r\n\tgetColumns(structured){\r\n\t\treturn this.columnManager.getComponents(structured);\r\n\t}\r\n\r\n\tgetColumn(field){\r\n\t\tvar col = this.columnManager.findColumn(field);\r\n\r\n\t\tif(col){\r\n\t\t\treturn col.getComponent();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Find Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tgetColumnDefinitions(){\r\n\t\treturn this.columnManager.getDefinitionTree();\r\n\t}\r\n\r\n\tshowColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tcolumn.show();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Show Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\thideColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tcolumn.hide();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Hide Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\ttoggleColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\tif(column.visible){\r\n\t\t\t\tcolumn.hide();\r\n\t\t\t}else{\r\n\t\t\t\tcolumn.show();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Visibility Toggle Error - No matching column found:\", field);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\taddColumn(definition, before, field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\treturn this.columnManager.addColumn(definition, before, column)\r\n\t\t.then((column) => {\r\n\t\t\treturn column.getComponent();\r\n\t\t});\r\n\t}\r\n\r\n\tdeleteColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn column.delete();\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Delete Error - No matching column found:\", field);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\r\n\tupdateColumnDefinition(field, definition){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\tif(column){\r\n\t\t\treturn column.updateDefinition(definition)\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Column Update Error - No matching column found:\", field);\r\n\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\r\n\tmoveColumn(from, to, after){\r\n\t\tvar fromColumn = this.columnManager.findColumn(from);\r\n\t\tvar toColumn = this.columnManager.findColumn(to);\r\n\r\n\t\tif(fromColumn){\r\n\t\t\tif(toColumn){\r\n\t\t\t\tthis.columnManager.moveColumn(fromColumn, toColumn, after)\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Move Error - No matching column found:\", toColumn);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"Move Error - No matching column found:\", from);\r\n\t\t}\r\n\t}\r\n\r\n\t//scroll to column in DOM\r\n\tscrollToColumn(field, position, ifVisible){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar column = this.columnManager.findColumn(field);\r\n\r\n\t\t\tif(column){\r\n\t\t\t\treturn this.columnManager.scrollToColumn(column, position, ifVisible)\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Scroll Error - No matching column found:\", field);\r\n\t\t\t\treturn Promise.reject(\"Scroll Error - No matching column found\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t//////////// General Public Functions ////////////\r\n\t//redraw list without updating data\r\n\tredraw(force){\r\n\t\tif(this.initialized){\r\n\t\t\tthis.columnManager.redraw(force);\r\n\t\t\tthis.rowManager.redraw(force);\r\n\t\t}else{\r\n\t\t\tconsole.warn(\"redraw failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.\");\r\n\t\t}\r\n\t}\r\n\r\n\tsetHeight(height){\r\n\t\tthis.options.height = isNaN(height) ? height : height + \"px\";\r\n\t\tthis.element.style.height = this.options.height;\r\n\t\tthis.rowManager.initializeRenderer();\r\n\t\tthis.rowManager.redraw();\r\n\t}\r\n\r\n\t//////////////////// Event Bus ///////////////////\r\n\r\n\ton(key, callback){\r\n\t\tthis.externalEvents.subscribe(key, callback);\r\n\t}\r\n\r\n\toff(key, callback){\r\n\t\tthis.externalEvents.unsubscribe(key, callback);\r\n\t}\r\n\r\n\tdispatchEvent(){\r\n\t\tvar args = Array.from(arguments),\r\n\t\tkey = args.shift();\r\n\r\n\t\tthis.externalEvents.dispatch(...arguments)\r\n\t}\r\n\r\n\t////////////// Extension Management //////////////\r\n\tmodExists(plugin, required){\r\n\t\tif(this.modules[plugin]){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\tif(required){\r\n\t\t\t\tconsole.error(\"Tabulator Module Not Installed: \" + plugin);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tmodule(key){\r\n\t\tvar mod = this.modules[key];\r\n\r\n\t\tif(!mod){\r\n\t\t\tconsole.error(\"Tabulator module not installed: \" + key);\r\n\t\t}\r\n\r\n\t\treturn mod;\r\n\t}\r\n}\r\n\r\n//default setup options\r\nTabulator.defaultOptions = defaultOptions;\r\n\r\n//bind modules and static functionality\r\nnew ModuleBinder(Tabulator);\r\n\r\nexport default Tabulator;\r\n","export default class PseudoRow {\r\n\r\n\tconstructor (type){\r\n\t\tthis.type = type;\r\n\t\tthis.element = this._createElement();\r\n\t}\r\n\r\n\t_createElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\treturn el;\r\n\t}\r\n\r\n\tgetElement(){\r\n\t\treturn this.element;\r\n\t}\r\n\r\n\tgetComponent(){\r\n\t\treturn false;\r\n\t}\r\n\r\n\tgetData(){\r\n\t\treturn {};\r\n\t}\r\n\r\n\tgetHeight(){\r\n\t\treturn this.element.outerHeight;\r\n\t}\r\n\r\n\tinitialize(){}\r\n\r\n\treinitialize(){}\r\n\r\n\tnormalizeHeight(){}\r\n\r\n\tgenerateCells(){}\r\n\r\n\treinitializeHeight(){}\r\n\r\n\tcalcHeight(){}\r\n\r\n\tsetCellHeight(){}\r\n\r\n\tclearCellHeight(){}\r\n}"],"names":["CoreFeature","[object Object]","table","this","data","silent","dataLoader","load","undefined","modules","localize","getText","arguments","bind","getLocale","comms","getConnections","send","layout","getMode","eventBus","subscribe","unsubscribe","key","subscribed","subscriptionChange","dispatch","chain","confirm","externalEvents","options","value","module","Module","name","super","_handler","optionsList","register","columnManager","func","console","warn","component","handler","componentFunctionBinder","priority","rowManager","registerDataPipelineHandler","registerDisplayPipelineHandler","renderInPosition","refreshActiveData","Helpers","el","offsetWidth","offsetHeight","box","getBoundingClientRect","top","window","pageYOffset","document","documentElement","clientTop","left","pageXOffset","clientLeft","obj","clone","list","objectProto","__proto__","arrayProto","i","Object","assign","Array","isArray","match","copy","subject","findIndex","item","unshift","deepClone","Accessor","allowedTypes","registerColumnOption","initializeColumn","transformRow","column","config","forEach","type","accessor","charAt","toUpperCase","slice","definition","lookupAccessor","params","accessors","row","rowComponent","getComponent","traverse","colCompnent","getFieldValue","setFieldValue","moduleName","generateParamsList","prefix","output","concat","push","serializeParams","encoded","encodeURIComponent","join","json","headers","Content-Type","body","url","JSON","stringify","form","FormData","append","Ajax","urlGenerator","loaderPromise","registerTableOption","contentTypeFormatters","ajaxRequestFunc","defaultLoaderPromise","ajaxURLGenerator","defaultURLGenerator","ajaxURL","setUrl","setDefaultConfig","ajaxConfig","registerTableFunction","getUrl","requestDataCheck","requestParams","requestData","ajaxParams","call","previousData","generateConfig","sendRequest","defaultConfig","method","ajaxRequesting","then","ajaxResponse","Promise","reject","keys","length","toLowerCase","includes","contentType","resolve","ajaxContentType","Accept","mode","location","origin","credentials","fetch","response","ok","catch","error","status","statusText","defaultContentTypeFormatters","Clipboard","pasteParser","pasteAction","customSelection","rowRange","blocked","clipboard","clipboardCopyRowRange","element","addEventListener","e","plain","html","preventDefault","clipboardCopyFormatter","export","generateExportList","clipboardCopyConfig","clipboardCopyStyled","genereateHTMLTable","generatePlainContent","clipboardData","setData","originalEvent","dispatchExternal","reset","paste","setPasteParser","clipboardPasteParser","setPasteAction","clipboardPasteAction","rowData","columns","col","getKey","range","internal","sel","textRange","getSelection","createRange","selectNodeContents","toString","removeAllRanges","addRange","selection","createTextRange","moveToElementText","select","execCommand","action","pasteActions","parser","pasteParsers","rows","checkPaseOrigin","getPasteData","modExists","mutateData","mutator","valid","target","tagName","edit","currentCell","getData","replace","update","updateOrAddData","insert","addData","headerFindSuccess","columnMap","split","find","title","trim","field","columnsByIndex","shift","CalcComponent","_row","Proxy","get","receiver","handle","transform","getElement","cells","getCells","cell","getCell","CellComponent","_cell","getValue","getOldValue","initialValue","getField","mutate","setValue","setValueActual","checkHeight","Cell","oldValue","height","width","minWidth","loaded","build","generateElement","setWidth","_configureCell","createElement","className","setAttribute","style","textAlign","hozAlign","vertAlign","display","alignItems","bottom","middle","justifyContent","right","center","cssClass","classList","add","tooltipGenerationMode","_generateTooltip","visible","hide","val","innerHTML","Node","firstChild","removeChild","appendChild","tooltip","containerOnly","layoutElement","setValueProcessData","cellRendered","cellEdited","subscribedExternal","changed","_generateContents","widthStyled","minWidthStyled","maxWidth","maxWidthStyled","reinitializeHeight","heightStyled","redrawBlock","parentNode","deleteCell","calcs","getCellIndex","ColumnComponent","_column","getDefinition","getTitleDownload","isGroup","show","delete","parent","Column","scrollToColumn","to","after","toColumn","findColumn","moveColumn","nextCol","nextColumn","prevCol","prevColumn","updates","updateDefinition","getWidth","result","reinitializeWidth","renderer","rerenderColumns","maxInitialWidth","variableHeight","headerTooltip","headerVertical","headerHozAlign","editableTitle","def","contentElement","titleHolderElement","titleElement","groupElement","createGroupElement","fieldStructure","titleDownload","titleFormatterRendered","mapDefinitions","setField","widthFixed","newCol","attachColumn","checkColumnVisibility","registerColumnField","_initialize","bindModuleColumns","defaults","columnDefaults","generate","defaultOptionList","indexOf","nestedFieldSeparator","_getNestedData","_getFlatData","_setNestedData","_setFlatData","registerColumnPosition","reRegisterPosition","langBind","_bindEvents","_buildColumnHeaderContent","_buildGroupHeader","_buildColumnHeader","setTooltip","dblTap","tapHold","tap","headerClick","headerDblClick","headerContext","passive","headerTap","clearTimeout","headerDblTap","setTimeout","headerTapHold","setMinWidth","parseInt","setMaxWidth","_buildColumnHeaderTitle","contents","structure","dataObj","paddingTop","colDefs","childWidth","heightInitialized","index","setTo","force","active","manualHeight","outerHeight","initialized","created","maxHeight","tempData","updatedData","findCell","moveRowActual","blockRedraw","detatchModules","values","topCalcs","botCalcs","genColumn","topElement","botElement","topRow","botRow","topInitialized","initializeColumnCheck","tableRedraw","recalcRowGroup","recalcAll","groupBy","columnCalcs","topCalcParams","botCalcParams","calculations","botInitialized","generateRow","group","updateData","dataTreeChildColumnCalcs","children","pos","format","formatter","paramKey","results","subGroups","getSubGroups","subGroupResults","groupObj","ColumnCalcs","indent","collapseEl","expandEl","branchEl","registerComponentFunction","expandRow","dataTreeChildField","dummyEl","dataTreeCollapseElement","tabIndex","dataTreeExpandElement","rowDelete","layoutRow","childArray","dataTree","open","controlEl","child","cloneNode","stopPropagation","oldControl","create","allChildren","childData","childRow","collapseRow","Row","initializeRow","defaultDownloaders","csv","setFileContents","fileContents","depth","jsonLines","pdf","header","autoTableParams","fontStyle","fontSize","cellPadding","fillColor","jsPDFParams","content","colSpan","rowSpan","doc","head","xlsx","sheetName","workbook","utils","tableFeatures","generateSheet","merges","worksheet","SheetNames","sheet","buf","s","Uint8Array","download","downloadFunc","triggerDownload","interceptCallback","groupHeader","blob","Blob","navigator","maskInput","maskLetter","maskLetterChar","maskNumber","symbol","char","isNaN","Download","onRendered","input","editorParams","padding","elementAttributes","cellValue","cancel","vertNav","String","boxSizing","onChange","removeEventListener","blurFunc","cellEl","initialDisplayValue","listEl","multiselect","dataItems","currentItem","displayItems","currentItems","blurable","blockListShow","searchWordTimeout","self","getColumnByField","label","itemParams","displayList","dataList","sortValuesList","toggleItem","splice","unsetItem","fillInput","hideList","cancelItem","len","unsetItems","chooseItems","keyCode","stopImmediatePropagation","setCurrentItem","searchWord","parseItems","getUniqueColumnValues","elOffset","showList","autocomplete","uniqueColumnValues","sort","filterList","matches","addNotice","fillListIfNotEmpty","items","clearList","searchEl","notice","fillList","intialLoad","success","chooseItem","genUniqueColumnValues","star","maxStars","size","stars","starChange","nextStar","starsHolder","whiteSpace","verticalAlign","getAttribute","progress","max","min","percent","bar","calcVal","position","backgroundColor","mouseDrag","mouseDragWidth","updateValue","tristate","indetermState","indetermValue","browser","mouseClick","recursionBlock","editedCells","editors","navigatePrev","navigateNext","keybindingNavigateNext","newRow","addRow","nextCell","prevRow","nextRow","allowEdit","elVisible","prevCell","editor","clearEditor","button","forceEdit","getRenderMode","bottomEdge","rowEl","rightEdge","leftEdge","renderHorizontal","scrollLeft","rendered","cancelEdit","invalidEdit","focusCellNoEvent","editIndex","Edit","defaultEditors","ExportRow","ExportColumn","colVisProp","cloneTableStyle","getDisplayRows","groupData","maxDepth","exportRows","headerDepth","headerEl","bodyEl","styles","setup","rowFormatter","oddRow","querySelector","evenRow","calcRow","styleCells","getElementsByClassName","mapElementStyles","treeElementField","holder","genereateTableElement","background-color","color","font-weight","font-family","font-size","text-align","border-top","border-left","border-right","border-bottom","padding-top","padding-left","padding-right","getComputedStyle","Export","filterParams","rowVal","filterVal","headerFilterColumns","prevHeaderFilterChangeCheck","tableInitialized","userSetFilter","userSetHeaderFilterFocus","userRemoveFilter","initialHeaderFilter","getHeaderFilterValue","filterChangeCheck","filter","prevSuccess","Filter","filterFunc","attrType","filterElement","getColumn","normalizeHeight","typingTimer","headerFilterLiveFilterDelay","headerFilter","editorElement","filterMode","ajax","headerFilters","activeRows","getFilters","plaintext","textarea","money","number","sign","decimalSym","thousandSym","negativeSign","integer","link","urlPrefix","formatterParams","image","tickCross","empty","tick","tickElement","datetime","DT","inputFormat","newDatetime","setZone","invalid","datetimediff","invalidPlaceholder","suffix","unit","lookup","Math","traffic","percentValue","round","colors","floor","legend","legendColor","barEl","barContainer","legendEl","legendAlign","holderEl","buttonTick","buttonCross","rownum","checkbox","selectRow","Format","formatters","entityMap","&","<",">","\"","'","/","leftColumns","rightColumns","leftMargin","rightMargin","rightPadding","initializationMode","scrollEndTimer","layoutCell","scrollHorizontal","groups","leftParents","headersElement","frozen","margin","parentEl","allCells","layoutCalcRows","paddingLeft","FrozenColumns","refreshData","FrozenRows","GroupComponent","_group","Group","groupManager","level","hasSubGroups","old","groupList","generator","elementContents","createElements","createValueGroups","arrow","groupKey","groupID","toIndex","generateGroupHeaderContents","marginLeft","noCalc","_visSet","remove","getHeadersAndRows","prev","compoment","groupIDLookups","startOpen","headerGenerator","displayHandler","userGetGroupedData","configureGroupSetup","wipe","rowMoving","groupStartOpen","prevValue","groupRows","moveRowInArray","prevDisplayRow","from","generateGroups","updateGroupRows","groupComponents","headerContent","groupListData","oldGroups","oldRowGroup","groupId","GroupRows","cellUpdated","rowMoved","clear","getRowPosition","history","History","oldRow","rowAdd","deleteActual","_rebindRow","rowMove","hasIndex","_extractOptions","fieldIndex","HtmlTableImport","inQuote","importFormat","importer","extension","pickFile","importData","onerror","parsedData","Import","rowClick","rowDblClick","rowContext","rowMouseEnter","rowMouseLeave","rowMouseMove","rowTap","rowDblTap","rowTapHold","cellClick","cellDblClick","cellContext","cellMouseEnter","cellMouseLeave","cellMouseMove","cellTap","cellDblTap","cellTapHold","headerMouseEnter","headerMouseLeave","headerMouseMove","groupClick","groupDblClick","groupContext","groupMouseEnter","groupMouseLeave","subscribers","touchSubscribers","touchWatchers","tapDbl","added","eventMap","subscribeTouchEvents","subscriptionChanged","watchers","callback","Interaction","Keybindings","watchKeys","pressedKeys","mergedBindings","actions","bindings","meta","binding","navPrev","navNext","navUp","navDown","scrollPageUp","scrollPageDown","undo","scrollToRow","focus","Menu","menuElements","escEvent","positionReversedX","currentComponent","columnSubscribers","menuContainer","checkMenuContainerIsParent","rowClickMenu","headerContextMenu","initializeColumnHeaderMenu","contextMenu","headerMenu","menu","isOpen","hideMenu","itemEl","hideOldSubMenus","x","y","MoveColumns","placeholderElement","hoverElement","checkTimeout","checkPeriod","moving","toCol","startX","autoScrollMargin","autoScrollTimeout","touches","colEl","nextColWidthLast","prevColWidth","startXMove","moveToCol","nextColWidth","headerElement","pageX","clientHeight","toColAfter","_unbindMouseMove","xPos","MoveRows","toRow","toRowAfter","hasHandle","moveHover","endMove","tableRowDropEvent","touchMove","connection","connectionSelectorsTables","connectionElements","connections","connectedTable","connectedRow","movableRowsConnectedTables","connectionSelectorsElements","mousemove","insertBefore","nextSibling","moveRow","tableRowDrop","pageY","which","rowHandle","nextRowHeight","diff","startYMove","moveToRow","nextRowHeightLast","setStartPosition","scrollTop","yPos","connectionTables","commsConnections","prototype","fromRow","Mutator","enabled","ofEl","showingEl","rowsEl","totalRows","valueEl","totalEl","Page","progressiveLoad","pageCounterElement","page","count","displayIndex","initialLoad","dataChanging","pageSizes","setMaxPage","calculatePageSizes","registerDisplayHandler","initializePageCounter","remotePageParams","dispRows","paginationSize","testElRow","testElCell","setPageToRow","firstBut","nextBut","paginationSizeSelector","pageCounter","pageSelectLabel","prevBut","setPage","previousPage","nextPage","paginationElement","pageSizeSelect","lastBut","rowCount","currentRow","rightSize","disabled","end","_setPageButtons","actualStartRow","cookie","cookiePos","localStorage","expireDate","setDate","Persistence","id","defWatcherBlock","persistence","readers","readFunc","persistenceWriterFunc","retreiveData","retreivedData","sorters","initialSort","props","mergeDefinition","current","oldCols","parseColumns","validateSorters","writeFunc","definitions","defStore","moduleInitOrder","defaultReaders","Print","manualBlock","scrollY","tableEl","printHeader","footerContent","scrollX","ReactiveData","origFuncs","currentVersion","version","defineProperty","pop","childField","configurable","apply","getOwnPropertyDescriptor","ResizeColumns","prevHandle","_mouseDown","nearestColumn","colIndex","rtl","mouseUp","startColumn","ResizeRows","handleDown","observer","autoResize","containerHeight","containerWidth","tableHeight","browserMobile","ResizeTable","ResponsiveLayout","hiddenColumns","collapseStartOpen","responsiveLayout","collapseHandleColumn","generateCollapsedRowContent","colCount","working","titleHighlight","text","SelectRow","selecting","lastClickedRow","selectPrev","headerCheckboxElement","toggleRow","shiftKey","rowIdx","fromRowIdx","deselectRows","toggledRows","_rowSelectionChanged","_selectRow","rowInfo","selectedRows","dir","emptyAlign","decimalSeparator","thousandSeparator","a","b","string","langLocale","datetime$1","boolean","d","c","calc","alignEmptyValues","aRow","bs","as","rd","b1","sortList","tableBuilt","setSort","sorter","startingDir","columnHeaderSortMulti","rowComponents","sortMode","sortObj","_sortItems","el1Comp","el2","Sort","Number","isFinite","float","parameters","ends","Validate","clearValidation","_buildValidator","validators","validate","invalidIndex","invalidCells","ResizeTableModule","ResponsiveLayoutModule","SelectRowModule","ValidateModule","ifVisible","rowIndex","elementVertical","VirtualDomHorizontal","rightCol","vDomScrollPosRight","vDomPadLeft","vDomPadRight","fitDataColAvg","visibleRows","isFitData","scroll","cols","colPos","reinitChanged","change","layoutRefresh","removeColRight","fitDataColActualWidthCheck","changes","widthDiff","newWidth","ColumnManager","blockHozScrollEvent","renderClass","renderers","redraw","nextToColumn","parentIndex","nextEl","minHeight","verticalAlignHeaders","updateRows","fromIndex","adjust","offsetLeft","scrollHeight","reinitialize","BaiscVertical","VirtualDomVertical","vDomRowHeight","vDomTop","vDomScrollPosBottom","vDomBottomPad","paddingBottom","topOffset","deinitializeHeight","_addBottomRow","bottomDiff","topPad","heightOccupied","vDomWindowBuffer","fillableSpace","getHeight","vDomScrollPosTop","removableRows","vDomBottom","RowManager","tableElement","heightFixer","placeholder","placeholderContents","firstRender","renderMode","displayRows","displayRowsCount","rowNumColumn","initializePlaceholder","initializeRenderer","_positionPlaceholder","activeIndex","displayRowIterator","regenerateRowNumbers","_clearPlaceholder","setActiveRows","findRowIndex","getRows","skipStage","stage","renderColumns","dataPipeline","displayPipeline","basic","fixedHeight","_clearTable","renderEmptyScroll","_showPlaceholder","otherHeight","redrawBlockRestoreConfig","renderTable","containerElement","links","InteractionManager","tabulator-cell","subscriber","listenerMap","components","pseudoTrackers","pseudoMouseLeave","linkedKeys","listeners","listener","targets","previousTargets","funcName","msgElement","dataLoaderLoading","template","loadingElement","requestOrder","errorElement","debug","subscriptionNotifiers","args","events","_notifiySubscriptionChange","confirmed","notifiers","_confirm","TableRegistry","lastCol","flexGrowUnits","remainingSpace","changeUnits","calcShrink","remainingFlexGrowUnits","shrinkCols","oversizeCols","oversizeSpace","freeSpace","fixedWidth","fixedShrinkColumns","flexColWidth","flexColumns","Layout","Localize","lang","_setLangProp","langList","desiredLocale","locale","path","trans","root","rootPath","loading","page_size","next","next_title","all","Comms","con","coreModules","tabulator","registerModule","query","orderedMods","moduleBindings","moduleCore","Tabulator","footerManager","vdomHoz","interactionMonitor","originalElement","ComponentFunctionBinder","bindModules","initialize","_loadInitialData","attributes","setColumns","parse","responses","findRow","foundRows","plugin","debugEventsInternal","debugInvalidOptions","autoColumns","addRowPos","headerVisible","renderVerticalBuffer","scrollToRowPosition","scrollToColumnIfVisible","rowFormatterPrint","rowFormatterHtmlOutput","dataLoaderError","ModuleBinder"],"mappings":";AAAe,MAAMA,EAEpBC,YAAYC,GACXC,KAAKD,MAAQA,EAOdD,WAAWG,EAAMC,GAChB,OAAOF,KAAKD,MAAMI,WAAWC,KAAKH,OAAMI,OAAWA,OAAWA,EAAWH,GAO1EJ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y7B,mBAEAC,0CAGA5sB,yBACA6sB,uBAEAC,gFAIAC,2BAEAzrB,gBACA0rB,kDAEAC,4BAEA5H,kDCzDA6H,sF0BED,WAIA,qBAEA,IAAIC,UAEJ,SAEC72C,eACCE,UAAY0F,EACZ1F,oDAIA"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 8cbefcaba..61ba350f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "tabulator-tables", - "version": "5.1.7", + "version": "5.1.8", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 9773a20e4..2d4813c4b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tabulator-tables", - "version": "5.1.7", + "version": "5.1.8", "description": "Interactive table generation JavaScript library", "style": "dist/css/tabulator.css", "main": "dist/js/tabulator.js",